1000 lines
1.2 MiB
1000 lines
1.2 MiB
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,55838,(e,t,i)=>{"use strict";var n=e.r(71645),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=n.useState,s=n.useEffect,o=n.useLayoutEffect,l=n.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!r(e,i)}catch(e){return!0}}var c="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var i=t(),n=a({inst:{value:i,getSnapshot:t}}),r=n[0].inst,c=n[1];return o(function(){r.value=i,r.getSnapshot=t,u(r)&&c({inst:r})},[e,i,t]),s(function(){return u(r)&&c({inst:r}),e(function(){u(r)&&c({inst:r})})},[e]),l(i),i};i.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:c},2239,(e,t,i)=>{"use strict";t.exports=e.r(55838)},52822,(e,t,i)=>{"use strict";var n=e.r(71645),r=e.r(2239),a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=r.useSyncExternalStore,o=n.useRef,l=n.useEffect,u=n.useMemo,c=n.useDebugValue;i.useSyncExternalStoreWithSelector=function(e,t,i,n,r){var h=o(null);if(null===h.current){var d={hasValue:!1,value:null};h.current=d}else d=h.current;var f=s(e,(h=u(function(){function e(e){if(!l){if(l=!0,s=e,e=n(e),void 0!==r&&d.hasValue){var t=d.value;if(r(t,e))return o=t}return o=e}if(t=o,a(s,e))return t;var i=n(e);return void 0!==r&&r(t,i)?(s=e,t):(s=e,o=i)}var s,o,l=!1,u=void 0===i?null:i;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]},[t,i,n,r]))[0],h[1]);return l(function(){d.hasValue=!0,d.value=f},[f]),c(f),f}},30224,(e,t,i)=>{"use strict";t.exports=e.r(52822)},66936,(e,t,i)=>{"use strict";function n(e,t){var i=e.length;for(e.push(t);0<i;){var n=i-1>>>1,r=e[n];if(0<s(r,t))e[n]=t,e[i]=r,i=n;else break}}function r(e){return 0===e.length?null:e[0]}function a(e){if(0===e.length)return null;var t=e[0],i=e.pop();if(i!==t){e[0]=i;for(var n=0,r=e.length,a=r>>>1;n<a;){var o=2*(n+1)-1,l=e[o],u=o+1,c=e[u];if(0>s(l,i))u<r&&0>s(c,l)?(e[n]=c,e[u]=i,n=u):(e[n]=l,e[o]=i,n=o);else if(u<r&&0>s(c,i))e[n]=c,e[u]=i,n=u;else break}}return t}function s(e,t){var i=e.sortIndex-t.sortIndex;return 0!==i?i:e.id-t.id}if(i.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var o,l=performance;i.unstable_now=function(){return l.now()}}else{var u=Date,c=u.now();i.unstable_now=function(){return u.now()-c}}var h=[],d=[],f=1,p=null,m=3,g=!1,v=!1,x=!1,y=!1,S="function"==typeof setTimeout?setTimeout:null,A="function"==typeof clearTimeout?clearTimeout:null,M="u">typeof setImmediate?setImmediate:null;function b(e){for(var t=r(d);null!==t;){if(null===t.callback)a(d);else if(t.startTime<=e)a(d),t.sortIndex=t.expirationTime,n(h,t);else break;t=r(d)}}function w(e){if(x=!1,b(e),!v)if(null!==r(h))v=!0,T||(T=!0,o());else{var t=r(d);null!==t&&L(w,t.startTime-e)}}var T=!1,E=-1,_=5,C=-1;function R(){return!!y||!(i.unstable_now()-C<_)}function P(){if(y=!1,T){var e=i.unstable_now();C=e;var t=!0;try{e:{v=!1,x&&(x=!1,A(E),E=-1),g=!0;var n=m;try{t:{for(b(e),p=r(h);null!==p&&!(p.expirationTime>e&&R());){var s=p.callback;if("function"==typeof s){p.callback=null,m=p.priorityLevel;var l=s(p.expirationTime<=e);if(e=i.unstable_now(),"function"==typeof l){p.callback=l,b(e),t=!0;break t}p===r(h)&&a(h),b(e)}else a(h);p=r(h)}if(null!==p)t=!0;else{var u=r(d);null!==u&&L(w,u.startTime-e),t=!1}}break e}finally{p=null,m=n,g=!1}}}finally{t?o():T=!1}}}if("function"==typeof M)o=function(){M(P)};else if("u">typeof MessageChannel){var D=new MessageChannel,I=D.port2;D.port1.onmessage=P,o=function(){I.postMessage(null)}}else o=function(){S(P,0)};function L(e,t){E=S(function(){e(i.unstable_now())},t)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(e){e.callback=null},i.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<e?Math.floor(1e3/e):5},i.unstable_getCurrentPriorityLevel=function(){return m},i.unstable_next=function(e){switch(m){case 1:case 2:case 3:var t=3;break;default:t=m}var i=m;m=t;try{return e()}finally{m=i}},i.unstable_requestPaint=function(){y=!0},i.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var i=m;m=e;try{return t()}finally{m=i}},i.unstable_scheduleCallback=function(e,t,a){var s=i.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?s+a:s,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=0x3fffffff;break;case 4:l=1e4;break;default:l=5e3}return l=a+l,e={id:f++,callback:t,priorityLevel:e,startTime:a,expirationTime:l,sortIndex:-1},a>s?(e.sortIndex=a,n(d,e),null===r(h)&&e===r(d)&&(x?(A(E),E=-1):x=!0,L(w,a-s))):(e.sortIndex=l,n(h,e),v||g||(v=!0,T||(T=!0,o()))),e},i.unstable_shouldYield=R,i.unstable_wrapCallback=function(e){var t=m;return function(){var i=m;m=t;try{return e.apply(this,arguments)}finally{m=i}}}},89499,(e,t,i)=>{"use strict";t.exports=e.r(66936)},75056,90072,8560,1950,25234,28600,67335,e=>{"use strict";let t,i,n,r,a,s,o,l,u,c,h,d,f,p,m,g,v,x;var y,S,A,M,b,w,T=e.i(47167),E=e.i(71645);let _={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},C={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},R="attached",P="detached",D="srgb",I="srgb-linear",L="linear",B="srgb",U="300 es";class N{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});let i=this._listeners;void 0===i[e]&&(i[e]=[]),-1===i[e].indexOf(t)&&i[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;let i=this._listeners;return void 0!==i[e]&&-1!==i[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;let i=this._listeners[e];if(void 0!==i){let e=i.indexOf(t);-1!==e&&i.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;let t=this._listeners[e.type];if(void 0!==t){e.target=this;let i=t.slice(0);for(let t=0,n=i.length;t<n;t++)i[t].call(this,e);e.target=null}}}let F=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"],O=1234567,z=Math.PI/180,k=180/Math.PI;function H(){let e=0xffffffff*Math.random()|0,t=0xffffffff*Math.random()|0,i=0xffffffff*Math.random()|0,n=0xffffffff*Math.random()|0;return(F[255&e]+F[e>>8&255]+F[e>>16&255]+F[e>>24&255]+"-"+F[255&t]+F[t>>8&255]+"-"+F[t>>16&15|64]+F[t>>24&255]+"-"+F[63&i|128]+F[i>>8&255]+"-"+F[i>>16&255]+F[i>>24&255]+F[255&n]+F[n>>8&255]+F[n>>16&255]+F[n>>24&255]).toLowerCase()}function G(e,t,i){return Math.max(t,Math.min(i,e))}function V(e,t){return(e%t+t)%t}function W(e,t,i){return(1-i)*e+i*t}function j(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return e/0xffffffff;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int32Array:return Math.max(e/0x7fffffff,-1);case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw Error("Invalid component type.")}}function X(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return Math.round(0xffffffff*e);case Uint16Array:return Math.round(65535*e);case Uint8Array:return Math.round(255*e);case Int32Array:return Math.round(0x7fffffff*e);case Int16Array:return Math.round(32767*e);case Int8Array:return Math.round(127*e);default:throw Error("Invalid component type.")}}let Y={DEG2RAD:z,RAD2DEG:k,generateUUID:H,clamp:G,euclideanModulo:V,mapLinear:function(e,t,i,n,r){return n+(e-t)*(r-n)/(i-t)},inverseLerp:function(e,t,i){return e!==t?(i-e)/(t-e):0},lerp:W,damp:function(e,t,i,n){return W(e,t,1-Math.exp(-i*n))},pingpong:function(e,t=1){return t-Math.abs(V(e,2*t)-t)},smoothstep:function(e,t,i){return e<=t?0:e>=i?1:(e=(e-t)/(i-t))*e*(3-2*e)},smootherstep:function(e,t,i){return e<=t?0:e>=i?1:(e=(e-t)/(i-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},seededRandom:function(e){void 0!==e&&(O=e);let t=O+=0x6d2b79f5;return t=Math.imul(t^t>>>15,1|t),(((t^=t+Math.imul(t^t>>>7,61|t))^t>>>14)>>>0)/0x100000000},degToRad:function(e){return e*z},radToDeg:function(e){return e*k},isPowerOfTwo:function(e){return(e&e-1)==0&&0!==e},ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:function(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))},setQuaternionFromProperEuler:function(e,t,i,n,r){let a=Math.cos,s=Math.sin,o=a(i/2),l=s(i/2),u=a((t+n)/2),c=s((t+n)/2),h=a((t-n)/2),d=s((t-n)/2),f=a((n-t)/2),p=s((n-t)/2);switch(r){case"XYX":e.set(o*c,l*h,l*d,o*u);break;case"YZY":e.set(l*d,o*c,l*h,o*u);break;case"ZXZ":e.set(l*h,l*d,o*c,o*u);break;case"XZX":e.set(o*c,l*p,l*f,o*u);break;case"YXY":e.set(l*f,o*c,l*p,o*u);break;case"ZYZ":e.set(l*p,l*f,o*c,o*u);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}},normalize:X,denormalize:j};class Q{constructor(e=0,t=0){Q.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 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 Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,i=this.y,n=e.elements;return this.x=n[0]*t+n[3]*i+n[6],this.y=n[1]*t+n[4]*i+n[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=G(this.x,e.x,t.x),this.y=G(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=G(this.x,e,t),this.y=G(this.y,e,t),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(G(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());return 0===t?Math.PI/2:Math.acos(G(this.dot(e)/t,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let 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){let i=Math.cos(t),n=Math.sin(t),r=this.x-e.x,a=this.y-e.y;return this.x=r*i-a*n+e.x,this.y=r*n+a*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class q{constructor(e,t,i,n,r,a,s,o,l){q.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==e&&this.set(e,t,i,n,r,a,s,o,l)}set(e,t,i,n,r,a,s,o,l){let u=this.elements;return u[0]=e,u[1]=n,u[2]=s,u[3]=t,u[4]=r,u[5]=o,u[6]=i,u[7]=a,u[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let 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){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let i=e.elements,n=t.elements,r=this.elements,a=i[0],s=i[3],o=i[6],l=i[1],u=i[4],c=i[7],h=i[2],d=i[5],f=i[8],p=n[0],m=n[3],g=n[6],v=n[1],x=n[4],y=n[7],S=n[2],A=n[5],M=n[8];return r[0]=a*p+s*v+o*S,r[3]=a*m+s*x+o*A,r[6]=a*g+s*y+o*M,r[1]=l*p+u*v+c*S,r[4]=l*m+u*x+c*A,r[7]=l*g+u*y+c*M,r[2]=h*p+d*v+f*S,r[5]=h*m+d*x+f*A,r[8]=h*g+d*y+f*M,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],i=e[1],n=e[2],r=e[3],a=e[4],s=e[5],o=e[6],l=e[7],u=e[8];return t*a*u-t*s*l-i*r*u+i*s*o+n*r*l-n*a*o}invert(){let e=this.elements,t=e[0],i=e[1],n=e[2],r=e[3],a=e[4],s=e[5],o=e[6],l=e[7],u=e[8],c=u*a-s*l,h=s*o-u*r,d=l*r-a*o,f=t*c+i*h+n*d;if(0===f)return this.set(0,0,0,0,0,0,0,0,0);let p=1/f;return e[0]=c*p,e[1]=(n*l-u*i)*p,e[2]=(s*i-n*a)*p,e[3]=h*p,e[4]=(u*t-n*o)*p,e[5]=(n*r-s*t)*p,e[6]=d*p,e[7]=(i*o-l*t)*p,e[8]=(a*t-i*r)*p,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,n,r,a,s){let o=Math.cos(r),l=Math.sin(r);return this.set(i*o,i*l,-i*(o*a+l*s)+a+e,-n*l,n*o,-n*(-l*a+o*s)+s+t,0,0,1),this}scale(e,t){return this.premultiply(K.makeScale(e,t)),this}rotate(e){return this.premultiply(K.makeRotation(-e)),this}translate(e,t){return this.premultiply(K.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){let t=Math.cos(e),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){let t=this.elements,i=e.elements;for(let e=0;e<9;e++)if(t[e]!==i[e])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){let 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)}}let K=new q;function Z(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}let J={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function $(e,t){return new J[e](t)}function ee(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}function et(){let e=ee("canvas");return e.style.display="block",e}let ei={};function en(e){e in ei||(ei[e]=!0,console.warn(e))}function er(e,t,i){return new Promise(function(n,r){setTimeout(function a(){switch(e.clientWaitSync(t,e.SYNC_FLUSH_COMMANDS_BIT,0)){case e.WAIT_FAILED:r();break;case e.TIMEOUT_EXPIRED:setTimeout(a,i);break;default:n()}},i)})}function ea(e){let t=e.elements;t[2]=.5*t[2]+.5*t[3],t[6]=.5*t[6]+.5*t[7],t[10]=.5*t[10]+.5*t[11],t[14]=.5*t[14]+.5*t[15]}function es(e){let t=e.elements;-1===t[11]?(t[10]=-t[10]-1,t[14]=-t[14]):(t[10]=-t[10],t[14]=-t[14]+1)}let eo=new q().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),el=new q().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715),eu=(d=[.64,.33,.3,.6,.15,.06],f=[.2126,.7152,.0722],p=[.3127,.329],(h={enabled:!0,workingColorSpace:I,spaces:{},convert:function(e,t,i){return!1!==this.enabled&&t!==i&&t&&i&&(this.spaces[t].transfer===B&&(e.r=ec(e.r),e.g=ec(e.g),e.b=ec(e.b)),this.spaces[t].primaries!==this.spaces[i].primaries&&(e.applyMatrix3(this.spaces[t].toXYZ),e.applyMatrix3(this.spaces[i].fromXYZ)),this.spaces[i].transfer===B&&(e.r=eh(e.r),e.g=eh(e.g),e.b=eh(e.b))),e},fromWorkingColorSpace:function(e,t){return this.convert(e,this.workingColorSpace,t)},toWorkingColorSpace:function(e,t){return this.convert(e,t,this.workingColorSpace)},getPrimaries:function(e){return this.spaces[e].primaries},getTransfer:function(e){return""===e?L:this.spaces[e].transfer},getLuminanceCoefficients:function(e,t=this.workingColorSpace){return e.fromArray(this.spaces[t].luminanceCoefficients)},define:function(e){Object.assign(this.spaces,e)},_getMatrix:function(e,t,i){return e.copy(this.spaces[t].toXYZ).multiply(this.spaces[i].fromXYZ)},_getDrawingBufferColorSpace:function(e){return this.spaces[e].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(e=this.workingColorSpace){return this.spaces[e].workingColorSpaceConfig.unpackColorSpace}}).define({[I]:{primaries:d,whitePoint:p,transfer:L,toXYZ:eo,fromXYZ:el,luminanceCoefficients:f,workingColorSpaceConfig:{unpackColorSpace:D},outputColorSpaceConfig:{drawingBufferColorSpace:D}},[D]:{primaries:d,whitePoint:p,transfer:B,toXYZ:eo,fromXYZ:el,luminanceCoefficients:f,outputColorSpaceConfig:{drawingBufferColorSpace:D}}}),h);function ec(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function eh(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}class ed{static getDataURL(e){let i;if(/^data:/i.test(e.src)||"u"<typeof HTMLCanvasElement)return e.src;if(e instanceof HTMLCanvasElement)i=e;else{void 0===t&&(t=ee("canvas")),t.width=e.width,t.height=e.height;let n=t.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),i=t}return i.width>2048||i.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),i.toDataURL("image/jpeg",.6)):i.toDataURL("image/png")}static sRGBToLinear(e){if("u">typeof HTMLImageElement&&e instanceof HTMLImageElement||"u">typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"u">typeof ImageBitmap&&e instanceof ImageBitmap){let t=ee("canvas");t.width=e.width,t.height=e.height;let i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);let n=i.getImageData(0,0,e.width,e.height),r=n.data;for(let e=0;e<r.length;e++)r[e]=255*ec(r[e]/255);return i.putImageData(n,0,0),t}if(!e.data)return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e;{let t=e.data.slice(0);for(let e=0;e<t.length;e++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[e]=Math.floor(255*ec(t[e]/255)):t[e]=ec(t[e]);return{data:t,width:e.width,height:e.height}}}}let ef=0;class ep{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:ef++}),this.uuid=H(),this.data=e,this.dataReady=!0,this.version=0}set needsUpdate(e){!0===e&&this.version++}toJSON(e){let t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.images[this.uuid])return e.images[this.uuid];let i={uuid:this.uuid,url:""},n=this.data;if(null!==n){let e;if(Array.isArray(n)){e=[];for(let t=0,i=n.length;t<i;t++)n[t].isDataTexture?e.push(em(n[t].image)):e.push(em(n[t]))}else e=em(n);i.url=e}return t||(e.images[this.uuid]=i),i}}function em(e){return"u">typeof HTMLImageElement&&e instanceof HTMLImageElement||"u">typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"u">typeof ImageBitmap&&e instanceof ImageBitmap?ed.getDataURL(e):e.data?{data:Array.from(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let eg=0;class ev extends N{constructor(e=ev.DEFAULT_IMAGE,t=ev.DEFAULT_MAPPING,i=1001,n=1001,r=1006,a=1008,s=1023,o=1009,l=ev.DEFAULT_ANISOTROPY,u=""){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:eg++}),this.uuid=H(),this.name="",this.source=new ep(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=i,this.wrapT=n,this.magFilter=r,this.minFilter=a,this.anisotropy=l,this.format=s,this.internalFormat=null,this.type=o,this.offset=new Q(0,0),this.repeat=new Q(1,1),this.center=new Q(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new q,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=u,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=e.colorSpace,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}toJSON(e){let t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];let 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(300!==this.mapping)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case 1e3:e.x=e.x-Math.floor(e.x);break;case 1001:e.x=e.x<0?0:1;break;case 1002:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case 1e3:e.y=e.y-Math.floor(e.y);break;case 1001:e.y=e.y<0?0:1;break;case 1002:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){!0===e&&this.pmremVersion++}}ev.DEFAULT_IMAGE=null,ev.DEFAULT_MAPPING=300,ev.DEFAULT_ANISOTROPY=1;class ex{constructor(e=0,t=0,i=0,n=1){ex.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=n}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,n){return this.x=e,this.y=t,this.z=i,this.w=n,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 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 Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,i=this.y,n=this.z,r=this.w,a=e.elements;return this.x=a[0]*t+a[4]*i+a[8]*n+a[12]*r,this.y=a[1]*t+a[5]*i+a[9]*n+a[13]*r,this.z=a[2]*t+a[6]*i+a[10]*n+a[14]*r,this.w=a[3]*t+a[7]*i+a[11]*n+a[15]*r,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,n,r,a=e.elements,s=a[0],o=a[4],l=a[8],u=a[1],c=a[5],h=a[9],d=a[2],f=a[6],p=a[10];if(.01>Math.abs(o-u)&&.01>Math.abs(l-d)&&.01>Math.abs(h-f)){if(.1>Math.abs(o+u)&&.1>Math.abs(l+d)&&.1>Math.abs(h+f)&&.1>Math.abs(s+c+p-3))return this.set(1,0,0,0),this;t=Math.PI;let e=(s+1)/2,a=(c+1)/2,m=(p+1)/2,g=(o+u)/4,v=(l+d)/4,x=(h+f)/4;return e>a&&e>m?e<.01?(i=0,n=.707106781,r=.707106781):(n=g/(i=Math.sqrt(e)),r=v/i):a>m?a<.01?(i=.707106781,n=0,r=.707106781):(i=g/(n=Math.sqrt(a)),r=x/n):m<.01?(i=.707106781,n=.707106781,r=0):(i=v/(r=Math.sqrt(m)),n=x/r),this.set(i,n,r,t),this}let m=Math.sqrt((f-h)*(f-h)+(l-d)*(l-d)+(u-o)*(u-o));return .001>Math.abs(m)&&(m=1),this.x=(f-h)/m,this.y=(l-d)/m,this.z=(u-o)/m,this.w=Math.acos((s+c+p-1)/2),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=G(this.x,e.x,t.x),this.y=G(this.y,e.y,t.y),this.z=G(this.z,e.z,t.z),this.w=G(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=G(this.x,e,t),this.y=G(this.y,e,t),this.z=G(this.z,e,t),this.w=G(this.w,e,t),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(G(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class ey extends N{constructor(e=1,t=1,i={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new ex(0,0,e,t),this.scissorTest=!1,this.viewport=new ex(0,0,e,t);const n=new ev({width:e,height:t,depth:1},(i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:1006,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},i)).mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace);n.flipY=!1,n.generateMipmaps=i.generateMipmaps,n.internalFormat=i.internalFormat,this.textures=[];const r=i.count;for(let e=0;e<r;e++)this.textures[e]=n.clone(),this.textures[e].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 n=0,r=this.textures.length;n<r;n++)this.textures[n].image.width=e,this.textures[n].image.height=t,this.textures[n].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 t=0,i=e.textures.length;t<i;t++)this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0;let t=Object.assign({},e.texture.image);return this.texture.source=new ep(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class eS extends ey{constructor(e=1,t=1,i={}){super(e,t,i),this.isWebGLRenderTarget=!0}}class eA extends ev{constructor(e=null,t=1,i=1,n=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:i,depth:n},this.magFilter=1003,this.minFilter=1003,this.wrapR=1001,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class eM extends eS{constructor(e=1,t=1,i=1,n={}){super(e,t,n),this.isWebGLArrayRenderTarget=!0,this.depth=i,this.texture=new eA(null,e,t,i),this.texture.isRenderTargetTexture=!0}}class eb extends ev{constructor(e=null,t=1,i=1,n=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:i,depth:n},this.magFilter=1003,this.minFilter=1003,this.wrapR=1001,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class ew extends eS{constructor(e=1,t=1,i=1,n={}){super(e,t,n),this.isWebGL3DRenderTarget=!0,this.depth=i,this.texture=new eb(null,e,t,i),this.texture.isRenderTargetTexture=!0}}class eT{constructor(e=0,t=0,i=0,n=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=i,this._w=n}static slerpFlat(e,t,i,n,r,a,s){let o=i[n+0],l=i[n+1],u=i[n+2],c=i[n+3],h=r[a+0],d=r[a+1],f=r[a+2],p=r[a+3];if(0===s){e[t+0]=o,e[t+1]=l,e[t+2]=u,e[t+3]=c;return}if(1===s){e[t+0]=h,e[t+1]=d,e[t+2]=f,e[t+3]=p;return}if(c!==p||o!==h||l!==d||u!==f){let e=1-s,t=o*h+l*d+u*f+c*p,i=t>=0?1:-1,n=1-t*t;if(n>Number.EPSILON){let r=Math.sqrt(n),a=Math.atan2(r,t*i);e=Math.sin(e*a)/r,s=Math.sin(s*a)/r}let r=s*i;if(o=o*e+h*r,l=l*e+d*r,u=u*e+f*r,c=c*e+p*r,e===1-s){let e=1/Math.sqrt(o*o+l*l+u*u+c*c);o*=e,l*=e,u*=e,c*=e}}e[t]=o,e[t+1]=l,e[t+2]=u,e[t+3]=c}static multiplyQuaternionsFlat(e,t,i,n,r,a){let s=i[n],o=i[n+1],l=i[n+2],u=i[n+3],c=r[a],h=r[a+1],d=r[a+2],f=r[a+3];return e[t]=s*f+u*c+o*d-l*h,e[t+1]=o*f+u*h+l*c-s*d,e[t+2]=l*f+u*d+s*h-o*c,e[t+3]=u*f-s*c-o*h-l*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,n){return this._x=e,this._y=t,this._z=i,this._w=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){let i=e._x,n=e._y,r=e._z,a=e._order,s=Math.cos,o=Math.sin,l=s(i/2),u=s(n/2),c=s(r/2),h=o(i/2),d=o(n/2),f=o(r/2);switch(a){case"XYZ":this._x=h*u*c+l*d*f,this._y=l*d*c-h*u*f,this._z=l*u*f+h*d*c,this._w=l*u*c-h*d*f;break;case"YXZ":this._x=h*u*c+l*d*f,this._y=l*d*c-h*u*f,this._z=l*u*f-h*d*c,this._w=l*u*c+h*d*f;break;case"ZXY":this._x=h*u*c-l*d*f,this._y=l*d*c+h*u*f,this._z=l*u*f+h*d*c,this._w=l*u*c-h*d*f;break;case"ZYX":this._x=h*u*c-l*d*f,this._y=l*d*c+h*u*f,this._z=l*u*f-h*d*c,this._w=l*u*c+h*d*f;break;case"YZX":this._x=h*u*c+l*d*f,this._y=l*d*c+h*u*f,this._z=l*u*f-h*d*c,this._w=l*u*c-h*d*f;break;case"XZY":this._x=h*u*c-l*d*f,this._y=l*d*c-h*u*f,this._z=l*u*f+h*d*c,this._w=l*u*c+h*d*f;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return!0===t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let i=t/2,n=Math.sin(i);return this._x=e.x*n,this._y=e.y*n,this._z=e.z*n,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,i=t[0],n=t[4],r=t[8],a=t[1],s=t[5],o=t[9],l=t[2],u=t[6],c=t[10],h=i+s+c;if(h>0){let e=.5/Math.sqrt(h+1);this._w=.25/e,this._x=(u-o)*e,this._y=(r-l)*e,this._z=(a-n)*e}else if(i>s&&i>c){let e=2*Math.sqrt(1+i-s-c);this._w=(u-o)/e,this._x=.25*e,this._y=(n+a)/e,this._z=(r+l)/e}else if(s>c){let e=2*Math.sqrt(1+s-i-c);this._w=(r-l)/e,this._x=(n+a)/e,this._y=.25*e,this._z=(o+u)/e}else{let e=2*Math.sqrt(1+c-i-s);this._w=(a-n)/e,this._x=(r+l)/e,this._y=(o+u)/e,this._z=.25*e}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._x=0,this._y=-e.z,this._z=e.y)):(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(G(this.dot(e),-1,1)))}rotateTowards(e,t){let i=this.angleTo(e);if(0===i)return this;let n=Math.min(1,t/i);return this.slerp(e,n),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 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let i=e._x,n=e._y,r=e._z,a=e._w,s=t._x,o=t._y,l=t._z,u=t._w;return this._x=i*u+a*s+n*l-r*o,this._y=n*u+a*o+r*s-i*l,this._z=r*u+a*l+i*o-n*s,this._w=a*u-i*s-n*o-r*l,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);let i=this._x,n=this._y,r=this._z,a=this._w,s=a*e._w+i*e._x+n*e._y+r*e._z;if(s<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,s=-s):this.copy(e),s>=1)return this._w=a,this._x=i,this._y=n,this._z=r,this;let o=1-s*s;if(o<=Number.EPSILON){let e=1-t;return this._w=e*a+t*this._w,this._x=e*i+t*this._x,this._y=e*n+t*this._y,this._z=e*r+t*this._z,this.normalize(),this}let l=Math.sqrt(o),u=Math.atan2(l,s),c=Math.sin((1-t)*u)/l,h=Math.sin(t*u)/l;return this._w=a*c+this._w*h,this._x=i*c+this._x*h,this._y=n*c+this._y*h,this._z=r*c+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),i=Math.random(),n=Math.sqrt(1-i),r=Math.sqrt(i);return this.set(n*Math.sin(e),n*Math.cos(e),r*Math.sin(t),r*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 eE{constructor(e=0,t=0,i=0){eE.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return void 0===i&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw 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 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(eC.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(eC.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,i=this.y,n=this.z,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6]*n,this.y=r[1]*t+r[4]*i+r[7]*n,this.z=r[2]*t+r[5]*i+r[8]*n,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,i=this.y,n=this.z,r=e.elements,a=1/(r[3]*t+r[7]*i+r[11]*n+r[15]);return this.x=(r[0]*t+r[4]*i+r[8]*n+r[12])*a,this.y=(r[1]*t+r[5]*i+r[9]*n+r[13])*a,this.z=(r[2]*t+r[6]*i+r[10]*n+r[14])*a,this}applyQuaternion(e){let t=this.x,i=this.y,n=this.z,r=e.x,a=e.y,s=e.z,o=e.w,l=2*(a*n-s*i),u=2*(s*t-r*n),c=2*(r*i-a*t);return this.x=t+o*l+a*c-s*u,this.y=i+o*u+s*l-r*c,this.z=n+o*c+r*u-a*l,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,i=this.y,n=this.z,r=e.elements;return this.x=r[0]*t+r[4]*i+r[8]*n,this.y=r[1]*t+r[5]*i+r[9]*n,this.z=r[2]*t+r[6]*i+r[10]*n,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=G(this.x,e.x,t.x),this.y=G(this.y,e.y,t.y),this.z=G(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=G(this.x,e,t),this.y=G(this.y,e,t),this.z=G(this.z,e,t),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(G(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let i=e.x,n=e.y,r=e.z,a=t.x,s=t.y,o=t.z;return this.x=n*o-r*s,this.y=r*a-i*o,this.z=i*s-n*a,this}projectOnVector(e){let t=e.lengthSq();if(0===t)return this.set(0,0,0);let i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return e_.copy(this).projectOnVector(e),this.sub(e_)}reflect(e){return this.sub(e_.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());return 0===t?Math.PI/2:Math.acos(G(this.dot(e)/t,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,i=this.y-e.y,n=this.z-e.z;return t*t+i*i+n*n}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){let n=Math.sin(t)*e;return this.x=n*Math.sin(i),this.y=Math.cos(t)*e,this.z=n*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){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),n=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=n,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=Math.random()*Math.PI*2,t=2*Math.random()-1,i=Math.sqrt(1-t*t);return this.x=i*Math.cos(e),this.y=t,this.z=i*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}let e_=new eE,eC=new eT;class eR{constructor(e=new eE(Infinity,Infinity,Infinity),t=new eE(-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(eD.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,i=e.count;t<i;t++)this.expandByPoint(eD.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){let i=eD.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=Infinity,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);let i=e.geometry;if(void 0!==i){let n=i.getAttribute("position");if(!0===t&&void 0!==n&&!0!==e.isInstancedMesh)for(let t=0,i=n.count;t<i;t++)!0===e.isMesh?e.getVertexPosition(t,eD):eD.fromBufferAttribute(n,t),eD.applyMatrix4(e.matrixWorld),this.expandByPoint(eD);else void 0!==e.boundingBox?(null===e.boundingBox&&e.computeBoundingBox(),eI.copy(e.boundingBox)):(null===i.boundingBox&&i.computeBoundingBox(),eI.copy(i.boundingBox)),eI.applyMatrix4(e.matrixWorld),this.union(eI)}let n=e.children;for(let e=0,i=n.length;e<i;e++)this.expandByObject(n[e],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,eD),eD.distanceToSquared(e.center)<=e.radius*e.radius}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(ez),ek.subVectors(this.max,ez),eL.subVectors(e.a,ez),eB.subVectors(e.b,ez),eU.subVectors(e.c,ez),eN.subVectors(eB,eL),eF.subVectors(eU,eB),eO.subVectors(eL,eU);let t=[0,-eN.z,eN.y,0,-eF.z,eF.y,0,-eO.z,eO.y,eN.z,0,-eN.x,eF.z,0,-eF.x,eO.z,0,-eO.x,-eN.y,eN.x,0,-eF.y,eF.x,0,-eO.y,eO.x,0];return!!eV(t,eL,eB,eU,ek)&&!!eV(t=[1,0,0,0,1,0,0,0,1],eL,eB,eU,ek)&&(eH.crossVectors(eN,eF),eV(t=[eH.x,eH.y,eH.z],eL,eB,eU,ek))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,eD).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=.5*this.getSize(eD).length()),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||(eP[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),eP[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),eP[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),eP[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),eP[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),eP[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),eP[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),eP[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(eP)),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)}}let eP=[new eE,new eE,new eE,new eE,new eE,new eE,new eE,new eE],eD=new eE,eI=new eR,eL=new eE,eB=new eE,eU=new eE,eN=new eE,eF=new eE,eO=new eE,ez=new eE,ek=new eE,eH=new eE,eG=new eE;function eV(e,t,i,n,r){for(let a=0,s=e.length-3;a<=s;a+=3){eG.fromArray(e,a);let s=r.x*Math.abs(eG.x)+r.y*Math.abs(eG.y)+r.z*Math.abs(eG.z),o=t.dot(eG),l=i.dot(eG),u=n.dot(eG);if(Math.max(-Math.max(o,l,u),Math.min(o,l,u))>s)return!1}return!0}let eW=new eR,ej=new eE,eX=new eE;class eY{constructor(e=new eE,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){let i=this.center;void 0!==t?i.copy(t):eW.setFromPoints(e).getCenter(i);let n=0;for(let t=0,r=e.length;t<r;t++)n=Math.max(n,i.distanceToSquared(e[t]));return this.radius=Math.sqrt(n),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){let t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){let 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.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;ej.subVectors(e,this.center);let t=ej.lengthSq();if(t>this.radius*this.radius){let e=Math.sqrt(t),i=(e-this.radius)*.5;this.center.addScaledVector(ej,i/e),this.radius+=i}return this}union(e){return e.isEmpty()||(this.isEmpty()?this.copy(e):!0===this.center.equals(e.center)?this.radius=Math.max(this.radius,e.radius):(eX.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(ej.copy(e.center).add(eX)),this.expandByPoint(ej.copy(e.center).sub(eX)))),this}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}let eQ=new eE,eq=new eE,eK=new eE,eZ=new eE,eJ=new eE,e$=new eE,e0=new eE;class e1{constructor(e=new eE,t=new eE(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,eQ)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let 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){let t=eQ.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(eQ.copy(this.origin).addScaledVector(this.direction,t),eQ.distanceToSquared(e))}distanceSqToSegment(e,t,i,n){let r,a,s,o;eq.copy(e).add(t).multiplyScalar(.5),eK.copy(t).sub(e).normalize(),eZ.copy(this.origin).sub(eq);let l=.5*e.distanceTo(t),u=-this.direction.dot(eK),c=eZ.dot(this.direction),h=-eZ.dot(eK),d=eZ.lengthSq(),f=Math.abs(1-u*u);if(f>0)if(r=u*h-c,a=u*c-h,o=l*f,r>=0)if(a>=-o)if(a<=o){let e=1/f;r*=e,a*=e,s=r*(r+u*a+2*c)+a*(u*r+a+2*h)+d}else s=-(r=Math.max(0,-(u*(a=l)+c)))*r+a*(a+2*h)+d;else s=-(r=Math.max(0,-(u*(a=-l)+c)))*r+a*(a+2*h)+d;else a<=-o?(a=(r=Math.max(0,-(-u*l+c)))>0?-l:Math.min(Math.max(-l,-h),l),s=-r*r+a*(a+2*h)+d):a<=o?(r=0,s=(a=Math.min(Math.max(-l,-h),l))*(a+2*h)+d):(a=(r=Math.max(0,-(u*l+c)))>0?l:Math.min(Math.max(-l,-h),l),s=-r*r+a*(a+2*h)+d);else a=u>0?-l:l,s=-(r=Math.max(0,-(u*a+c)))*r+a*(a+2*h)+d;return i&&i.copy(this.origin).addScaledVector(this.direction,r),n&&n.copy(eq).addScaledVector(eK,a),s}intersectSphere(e,t){eQ.subVectors(e.center,this.origin);let i=eQ.dot(this.direction),n=eQ.dot(eQ)-i*i,r=e.radius*e.radius;if(n>r)return null;let a=Math.sqrt(r-n),s=i-a,o=i+a;return o<0?null:s<0?this.at(o,t):this.at(s,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;let i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){let i=this.distanceToPlane(e);return null===i?null:this.at(i,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return!!(0===t||e.normal.dot(this.direction)*t<0)}intersectBox(e,t){let i,n,r,a,s,o,l=1/this.direction.x,u=1/this.direction.y,c=1/this.direction.z,h=this.origin;return(l>=0?(i=(e.min.x-h.x)*l,n=(e.max.x-h.x)*l):(i=(e.max.x-h.x)*l,n=(e.min.x-h.x)*l),u>=0?(r=(e.min.y-h.y)*u,a=(e.max.y-h.y)*u):(r=(e.max.y-h.y)*u,a=(e.min.y-h.y)*u),i>a||r>n||((r>i||isNaN(i))&&(i=r),(a<n||isNaN(n))&&(n=a),c>=0?(s=(e.min.z-h.z)*c,o=(e.max.z-h.z)*c):(s=(e.max.z-h.z)*c,o=(e.min.z-h.z)*c),i>o||s>n||((s>i||i!=i)&&(i=s),(o<n||n!=n)&&(n=o),n<0)))?null:this.at(i>=0?i:n,t)}intersectsBox(e){return null!==this.intersectBox(e,eQ)}intersectTriangle(e,t,i,n,r){let a;eJ.subVectors(t,e),e$.subVectors(i,e),e0.crossVectors(eJ,e$);let s=this.direction.dot(e0);if(s>0){if(n)return null;a=1}else{if(!(s<0))return null;a=-1,s=-s}eZ.subVectors(this.origin,e);let o=a*this.direction.dot(e$.crossVectors(eZ,e$));if(o<0)return null;let l=a*this.direction.dot(eJ.cross(eZ));if(l<0||o+l>s)return null;let u=-a*eZ.dot(e0);return u<0?null:this.at(u/s,r)}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 e2{constructor(e,t,i,n,r,a,s,o,l,u,c,h,d,f,p,m){e2.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==e&&this.set(e,t,i,n,r,a,s,o,l,u,c,h,d,f,p,m)}set(e,t,i,n,r,a,s,o,l,u,c,h,d,f,p,m){let g=this.elements;return g[0]=e,g[4]=t,g[8]=i,g[12]=n,g[1]=r,g[5]=a,g[9]=s,g[13]=o,g[2]=l,g[6]=u,g[10]=c,g[14]=h,g[3]=d,g[7]=f,g[11]=p,g[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 e2().fromArray(this.elements)}copy(e){let 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){let t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,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){let t=this.elements,i=e.elements,n=1/e3.setFromMatrixColumn(e,0).length(),r=1/e3.setFromMatrixColumn(e,1).length(),a=1/e3.setFromMatrixColumn(e,2).length();return t[0]=i[0]*n,t[1]=i[1]*n,t[2]=i[2]*n,t[3]=0,t[4]=i[4]*r,t[5]=i[5]*r,t[6]=i[6]*r,t[7]=0,t[8]=i[8]*a,t[9]=i[9]*a,t[10]=i[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){let t=this.elements,i=e.x,n=e.y,r=e.z,a=Math.cos(i),s=Math.sin(i),o=Math.cos(n),l=Math.sin(n),u=Math.cos(r),c=Math.sin(r);if("XYZ"===e.order){let e=a*u,i=a*c,n=s*u,r=s*c;t[0]=o*u,t[4]=-o*c,t[8]=l,t[1]=i+n*l,t[5]=e-r*l,t[9]=-s*o,t[2]=r-e*l,t[6]=n+i*l,t[10]=a*o}else if("YXZ"===e.order){let e=o*u,i=o*c,n=l*u,r=l*c;t[0]=e+r*s,t[4]=n*s-i,t[8]=a*l,t[1]=a*c,t[5]=a*u,t[9]=-s,t[2]=i*s-n,t[6]=r+e*s,t[10]=a*o}else if("ZXY"===e.order){let e=o*u,i=o*c,n=l*u,r=l*c;t[0]=e-r*s,t[4]=-a*c,t[8]=n+i*s,t[1]=i+n*s,t[5]=a*u,t[9]=r-e*s,t[2]=-a*l,t[6]=s,t[10]=a*o}else if("ZYX"===e.order){let e=a*u,i=a*c,n=s*u,r=s*c;t[0]=o*u,t[4]=n*l-i,t[8]=e*l+r,t[1]=o*c,t[5]=r*l+e,t[9]=i*l-n,t[2]=-l,t[6]=s*o,t[10]=a*o}else if("YZX"===e.order){let e=a*o,i=a*l,n=s*o,r=s*l;t[0]=o*u,t[4]=r-e*c,t[8]=n*c+i,t[1]=c,t[5]=a*u,t[9]=-s*u,t[2]=-l*u,t[6]=i*c+n,t[10]=e-r*c}else if("XZY"===e.order){let e=a*o,i=a*l,n=s*o,r=s*l;t[0]=o*u,t[4]=-c,t[8]=l*u,t[1]=e*c+r,t[5]=a*u,t[9]=i*c-n,t[2]=n*c-i,t[6]=s*u,t[10]=r*c+e}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(e5,e,e6)}lookAt(e,t,i){let n=this.elements;return e7.subVectors(e,t),0===e7.lengthSq()&&(e7.z=1),e7.normalize(),e8.crossVectors(i,e7),0===e8.lengthSq()&&(1===Math.abs(i.z)?e7.x+=1e-4:e7.z+=1e-4,e7.normalize(),e8.crossVectors(i,e7)),e8.normalize(),e9.crossVectors(e7,e8),n[0]=e8.x,n[4]=e9.x,n[8]=e7.x,n[1]=e8.y,n[5]=e9.y,n[9]=e7.y,n[2]=e8.z,n[6]=e9.z,n[10]=e7.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let i=e.elements,n=t.elements,r=this.elements,a=i[0],s=i[4],o=i[8],l=i[12],u=i[1],c=i[5],h=i[9],d=i[13],f=i[2],p=i[6],m=i[10],g=i[14],v=i[3],x=i[7],y=i[11],S=i[15],A=n[0],M=n[4],b=n[8],w=n[12],T=n[1],E=n[5],_=n[9],C=n[13],R=n[2],P=n[6],D=n[10],I=n[14],L=n[3],B=n[7],U=n[11],N=n[15];return r[0]=a*A+s*T+o*R+l*L,r[4]=a*M+s*E+o*P+l*B,r[8]=a*b+s*_+o*D+l*U,r[12]=a*w+s*C+o*I+l*N,r[1]=u*A+c*T+h*R+d*L,r[5]=u*M+c*E+h*P+d*B,r[9]=u*b+c*_+h*D+d*U,r[13]=u*w+c*C+h*I+d*N,r[2]=f*A+p*T+m*R+g*L,r[6]=f*M+p*E+m*P+g*B,r[10]=f*b+p*_+m*D+g*U,r[14]=f*w+p*C+m*I+g*N,r[3]=v*A+x*T+y*R+S*L,r[7]=v*M+x*E+y*P+S*B,r[11]=v*b+x*_+y*D+S*U,r[15]=v*w+x*C+y*I+S*N,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],i=e[4],n=e[8],r=e[12],a=e[1],s=e[5],o=e[9],l=e[13],u=e[2],c=e[6],h=e[10],d=e[14];return e[3]*(r*o*c-n*l*c-r*s*h+i*l*h+n*s*d-i*o*d)+e[7]*(t*o*d-t*l*h+r*a*h-n*a*d+n*l*u-r*o*u)+e[11]*(t*l*c-t*s*d-r*a*c+i*a*d+r*s*u-i*l*u)+e[15]*(-n*s*u-t*o*c+t*s*h+n*a*c-i*a*h+i*o*u)}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(e,t,i){let n=this.elements;return e.isVector3?(n[12]=e.x,n[13]=e.y,n[14]=e.z):(n[12]=e,n[13]=t,n[14]=i),this}invert(){let e=this.elements,t=e[0],i=e[1],n=e[2],r=e[3],a=e[4],s=e[5],o=e[6],l=e[7],u=e[8],c=e[9],h=e[10],d=e[11],f=e[12],p=e[13],m=e[14],g=e[15],v=c*m*l-p*h*l+p*o*d-s*m*d-c*o*g+s*h*g,x=f*h*l-u*m*l-f*o*d+a*m*d+u*o*g-a*h*g,y=u*p*l-f*c*l+f*s*d-a*p*d-u*s*g+a*c*g,S=f*c*o-u*p*o-f*s*h+a*p*h+u*s*m-a*c*m,A=t*v+i*x+n*y+r*S;if(0===A)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let M=1/A;return e[0]=v*M,e[1]=(p*h*r-c*m*r-p*n*d+i*m*d+c*n*g-i*h*g)*M,e[2]=(s*m*r-p*o*r+p*n*l-i*m*l-s*n*g+i*o*g)*M,e[3]=(c*o*r-s*h*r-c*n*l+i*h*l+s*n*d-i*o*d)*M,e[4]=x*M,e[5]=(u*m*r-f*h*r+f*n*d-t*m*d-u*n*g+t*h*g)*M,e[6]=(f*o*r-a*m*r-f*n*l+t*m*l+a*n*g-t*o*g)*M,e[7]=(a*h*r-u*o*r+u*n*l-t*h*l-a*n*d+t*o*d)*M,e[8]=y*M,e[9]=(f*c*r-u*p*r-f*i*d+t*p*d+u*i*g-t*c*g)*M,e[10]=(a*p*r-f*s*r+f*i*l-t*p*l-a*i*g+t*s*g)*M,e[11]=(u*s*r-a*c*r-u*i*l+t*c*l+a*i*d-t*s*d)*M,e[12]=S*M,e[13]=(u*p*n-f*c*n+f*i*h-t*p*h-u*i*m+t*c*m)*M,e[14]=(f*s*n-a*p*n-f*i*o+t*p*o+a*i*m-t*s*m)*M,e[15]=(a*c*n-u*s*n+u*i*o-t*c*o-a*i*h+t*s*h)*M,this}scale(e){let t=this.elements,i=e.x,n=e.y,r=e.z;return t[0]*=i,t[4]*=n,t[8]*=r,t[1]*=i,t[5]*=n,t[9]*=r,t[2]*=i,t[6]*=n,t[10]*=r,t[3]*=i,t[7]*=n,t[11]*=r,this}getMaxScaleOnAxis(){let e=this.elements;return Math.sqrt(Math.max(e[0]*e[0]+e[1]*e[1]+e[2]*e[2],e[4]*e[4]+e[5]*e[5]+e[6]*e[6],e[8]*e[8]+e[9]*e[9]+e[10]*e[10]))}makeTranslation(e,t,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){let 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){let 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){let 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){let i=Math.cos(t),n=Math.sin(t),r=1-i,a=e.x,s=e.y,o=e.z,l=r*a,u=r*s;return this.set(l*a+i,l*s-n*o,l*o+n*s,0,l*s+n*o,u*s+i,u*o-n*a,0,l*o-n*s,u*o+n*a,r*o*o+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,n,r,a){return this.set(1,i,r,0,e,1,a,0,t,n,1,0,0,0,0,1),this}compose(e,t,i){let n=this.elements,r=t._x,a=t._y,s=t._z,o=t._w,l=r+r,u=a+a,c=s+s,h=r*l,d=r*u,f=r*c,p=a*u,m=a*c,g=s*c,v=o*l,x=o*u,y=o*c,S=i.x,A=i.y,M=i.z;return n[0]=(1-(p+g))*S,n[1]=(d+y)*S,n[2]=(f-x)*S,n[3]=0,n[4]=(d-y)*A,n[5]=(1-(h+g))*A,n[6]=(m+v)*A,n[7]=0,n[8]=(f+x)*M,n[9]=(m-v)*M,n[10]=(1-(h+p))*M,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,this}decompose(e,t,i){let n=this.elements,r=e3.set(n[0],n[1],n[2]).length(),a=e3.set(n[4],n[5],n[6]).length(),s=e3.set(n[8],n[9],n[10]).length();0>this.determinant()&&(r=-r),e.x=n[12],e.y=n[13],e.z=n[14],e4.copy(this);let o=1/r,l=1/a,u=1/s;return e4.elements[0]*=o,e4.elements[1]*=o,e4.elements[2]*=o,e4.elements[4]*=l,e4.elements[5]*=l,e4.elements[6]*=l,e4.elements[8]*=u,e4.elements[9]*=u,e4.elements[10]*=u,t.setFromRotationMatrix(e4),i.x=r,i.y=a,i.z=s,this}makePerspective(e,t,i,n,r,a,s=2e3){let o,l,u=this.elements;if(2e3===s)o=-(a+r)/(a-r),l=-2*a*r/(a-r);else if(2001===s)o=-a/(a-r),l=-a*r/(a-r);else throw Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+s);return u[0]=2*r/(t-e),u[4]=0,u[8]=(t+e)/(t-e),u[12]=0,u[1]=0,u[5]=2*r/(i-n),u[9]=(i+n)/(i-n),u[13]=0,u[2]=0,u[6]=0,u[10]=o,u[14]=l,u[3]=0,u[7]=0,u[11]=-1,u[15]=0,this}makeOrthographic(e,t,i,n,r,a,s=2e3){let o,l,u=this.elements,c=1/(t-e),h=1/(i-n),d=1/(a-r);if(2e3===s)o=(a+r)*d,l=-2*d;else if(2001===s)o=r*d,l=-1*d;else throw Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+s);return u[0]=2*c,u[4]=0,u[8]=0,u[12]=-((t+e)*c),u[1]=0,u[5]=2*h,u[9]=0,u[13]=-((i+n)*h),u[2]=0,u[6]=0,u[10]=l,u[14]=-o,u[3]=0,u[7]=0,u[11]=0,u[15]=1,this}equals(e){let t=this.elements,i=e.elements;for(let e=0;e<16;e++)if(t[e]!==i[e])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){let 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}}let e3=new eE,e4=new e2,e5=new eE(0,0,0),e6=new eE(1,1,1),e8=new eE,e9=new eE,e7=new eE,te=new e2,tt=new eT;class ti{constructor(e=0,t=0,i=0,n=ti.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=n}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,n=this._order){return this._x=e,this._y=t,this._z=i,this._order=n,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){let n=e.elements,r=n[0],a=n[4],s=n[8],o=n[1],l=n[5],u=n[9],c=n[2],h=n[6],d=n[10];switch(t){case"XYZ":this._y=Math.asin(G(s,-1,1)),.9999999>Math.abs(s)?(this._x=Math.atan2(-u,d),this._z=Math.atan2(-a,r)):(this._x=Math.atan2(h,l),this._z=0);break;case"YXZ":this._x=Math.asin(-G(u,-1,1)),.9999999>Math.abs(u)?(this._y=Math.atan2(s,d),this._z=Math.atan2(o,l)):(this._y=Math.atan2(-c,r),this._z=0);break;case"ZXY":this._x=Math.asin(G(h,-1,1)),.9999999>Math.abs(h)?(this._y=Math.atan2(-c,d),this._z=Math.atan2(-a,l)):(this._y=0,this._z=Math.atan2(o,r));break;case"ZYX":this._y=Math.asin(-G(c,-1,1)),.9999999>Math.abs(c)?(this._x=Math.atan2(h,d),this._z=Math.atan2(o,r)):(this._x=0,this._z=Math.atan2(-a,l));break;case"YZX":this._z=Math.asin(G(o,-1,1)),.9999999>Math.abs(o)?(this._x=Math.atan2(-u,l),this._y=Math.atan2(-c,r)):(this._x=0,this._y=Math.atan2(s,d));break;case"XZY":this._z=Math.asin(-G(a,-1,1)),.9999999>Math.abs(a)?(this._x=Math.atan2(h,l),this._y=Math.atan2(s,r)):(this._x=Math.atan2(-u,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===i&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return te.makeRotationFromQuaternion(e),this.setFromRotationMatrix(te,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return tt.setFromEuler(this),this.setFromQuaternion(tt,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],void 0!==e[3]&&(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}}ti.DEFAULT_ORDER="XYZ";class tn{constructor(){this.mask=1}set(e){this.mask=1<<e>>>0}enable(e){this.mask|=1<<e}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e}disable(e){this.mask&=~(1<<e)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!=0}isEnabled(e){return(this.mask&1<<e)!=0}}let tr=0,ta=new eE,ts=new eT,to=new e2,tl=new eE,tu=new eE,tc=new eE,th=new eT,td=new eE(1,0,0),tf=new eE(0,1,0),tp=new eE(0,0,1),tm={type:"added"},tg={type:"removed"},tv={type:"childadded",child:null},tx={type:"childremoved",child:null};class ty extends N{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:tr++}),this.uuid=H(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=ty.DEFAULT_UP.clone();const e=new eE,t=new ti,i=new eT,n=new eE(1,1,1);t._onChange(function(){i.setFromEuler(t,!1)}),i._onChange(function(){t.setFromQuaternion(i,void 0,!1)}),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:n},modelViewMatrix:{value:new e2},normalMatrix:{value:new q}}),this.matrix=new e2,this.matrixWorld=new e2,this.matrixAutoUpdate=ty.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=ty.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new tn,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)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return ts.setFromAxisAngle(e,t),this.quaternion.multiply(ts),this}rotateOnWorldAxis(e,t){return ts.setFromAxisAngle(e,t),this.quaternion.premultiply(ts),this}rotateX(e){return this.rotateOnAxis(td,e)}rotateY(e){return this.rotateOnAxis(tf,e)}rotateZ(e){return this.rotateOnAxis(tp,e)}translateOnAxis(e,t){return ta.copy(e).applyQuaternion(this.quaternion),this.position.add(ta.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(td,e)}translateY(e){return this.translateOnAxis(tf,e)}translateZ(e){return this.translateOnAxis(tp,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(to.copy(this.matrixWorld).invert())}lookAt(e,t,i){e.isVector3?tl.copy(e):tl.set(e,t,i);let n=this.parent;this.updateWorldMatrix(!0,!1),tu.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?to.lookAt(tu,tl,this.up):to.lookAt(tl,tu,this.up),this.quaternion.setFromRotationMatrix(to),n&&(to.extractRotation(n.matrixWorld),ts.setFromRotationMatrix(to),this.quaternion.premultiply(ts.invert()))}add(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return e===this?console.error("THREE.Object3D.add: object can't be added as a child of itself.",e):e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(tm),tv.child=e,this.dispatchEvent(tv),tv.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this}remove(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}let t=this.children.indexOf(e);return -1!==t&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(tg),tx.child=e,this.dispatchEvent(tx),tx.child=null),this}removeFromParent(){let e=this.parent;return null!==e&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),to.copy(this.matrixWorld).invert(),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),to.multiply(e.parent.matrixWorld)),e.applyMatrix4(to),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(tm),tv.child=e,this.dispatchEvent(tv),tv.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,n=this.children.length;i<n;i++){let n=this.children[i].getObjectByProperty(e,t);if(void 0!==n)return n}}getObjectsByProperty(e,t,i=[]){this[e]===t&&i.push(this);let n=this.children;for(let r=0,a=n.length;r<a;r++)n[r].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(tu,e,tc),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(tu,th,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);let t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);let t=this.children;for(let i=0,n=t.length;i<n;i++)t[i].traverse(e)}traverseVisible(e){if(!1===this.visible)return;e(this);let t=this.children;for(let i=0,n=t.length;i<n;i++)t[i].traverseVisible(e)}traverseAncestors(e){let t=this.parent;null!==t&&(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)&&(!0===this.matrixWorldAutoUpdate&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);let t=this.children;for(let i=0,n=t.length;i<n;i++)t[i].updateMatrixWorld(e)}updateWorldMatrix(e,t){let i=this.parent;if(!0===e&&null!==i&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),!0===this.matrixWorldAutoUpdate&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),!0===t){let e=this.children;for(let t=0,i=e.length;t<i;t++)e[t].updateWorldMatrix(!1,!0)}}toJSON(e){let t=void 0===e||"string"==typeof e,i={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},i.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"});let n={};function r(t,i){return void 0===t[i.uuid]&&(t[i.uuid]=i.toJSON(e)),i.uuid}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),!0===this.castShadow&&(n.castShadow=!0),!0===this.receiveShadow&&(n.receiveShadow=!0),!1===this.visible&&(n.visible=!1),!1===this.frustumCulled&&(n.frustumCulled=!1),0!==this.renderOrder&&(n.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(n.userData=this.userData),n.layers=this.layers.mask,n.matrix=this.matrix.toArray(),n.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(n.matrixAutoUpdate=!1),this.isInstancedMesh&&(n.type="InstancedMesh",n.count=this.count,n.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(n.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(n.type="BatchedMesh",n.perObjectFrustumCulled=this.perObjectFrustumCulled,n.sortObjects=this.sortObjects,n.drawRanges=this._drawRanges,n.reservedRanges=this._reservedRanges,n.visibility=this._visibility,n.active=this._active,n.bounds=this._bounds.map(e=>({boxInitialized:e.boxInitialized,boxMin:e.box.min.toArray(),boxMax:e.box.max.toArray(),sphereInitialized:e.sphereInitialized,sphereRadius:e.sphere.radius,sphereCenter:e.sphere.center.toArray()})),n.maxInstanceCount=this._maxInstanceCount,n.maxVertexCount=this._maxVertexCount,n.maxIndexCount=this._maxIndexCount,n.geometryInitialized=this._geometryInitialized,n.geometryCount=this._geometryCount,n.matricesTexture=this._matricesTexture.toJSON(e),null!==this._colorsTexture&&(n.colorsTexture=this._colorsTexture.toJSON(e)),null!==this.boundingSphere&&(n.boundingSphere={center:n.boundingSphere.center.toArray(),radius:n.boundingSphere.radius}),null!==this.boundingBox&&(n.boundingBox={min:n.boundingBox.min.toArray(),max:n.boundingBox.max.toArray()})),this.isScene)this.background&&(this.background.isColor?n.background=this.background.toJSON():this.background.isTexture&&(n.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(n.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){n.geometry=r(e.geometries,this.geometry);let t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){let i=t.shapes;if(Array.isArray(i))for(let t=0,n=i.length;t<n;t++){let n=i[t];r(e.shapes,n)}else r(e.shapes,i)}}if(this.isSkinnedMesh&&(n.bindMode=this.bindMode,n.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(r(e.skeletons,this.skeleton),n.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){let t=[];for(let i=0,n=this.material.length;i<n;i++)t.push(r(e.materials,this.material[i]));n.material=t}else n.material=r(e.materials,this.material);if(this.children.length>0){n.children=[];for(let t=0;t<this.children.length;t++)n.children.push(this.children[t].toJSON(e).object)}if(this.animations.length>0){n.animations=[];for(let t=0;t<this.animations.length;t++){let i=this.animations[t];n.animations.push(r(e.animations,i))}}if(t){let t=a(e.geometries),n=a(e.materials),r=a(e.textures),s=a(e.images),o=a(e.shapes),l=a(e.skeletons),u=a(e.animations),c=a(e.nodes);t.length>0&&(i.geometries=t),n.length>0&&(i.materials=n),r.length>0&&(i.textures=r),s.length>0&&(i.images=s),o.length>0&&(i.shapes=o),l.length>0&&(i.skeletons=l),u.length>0&&(i.animations=u),c.length>0&&(i.nodes=c)}return i.object=n,i;function a(e){let t=[];for(let i in e){let n=e[i];delete n.metadata,t.push(n)}return t}}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)),!0===t)for(let t=0;t<e.children.length;t++){let i=e.children[t];this.add(i.clone())}return this}}ty.DEFAULT_UP=new eE(0,1,0),ty.DEFAULT_MATRIX_AUTO_UPDATE=!0,ty.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;let tS=new eE,tA=new eE,tM=new eE,tb=new eE,tw=new eE,tT=new eE,tE=new eE,t_=new eE,tC=new eE,tR=new eE,tP=new ex,tD=new ex,tI=new ex;class tL{constructor(e=new eE,t=new eE,i=new eE){this.a=e,this.b=t,this.c=i}static getNormal(e,t,i,n){n.subVectors(i,t),tS.subVectors(e,t),n.cross(tS);let r=n.lengthSq();return r>0?n.multiplyScalar(1/Math.sqrt(r)):n.set(0,0,0)}static getBarycoord(e,t,i,n,r){tS.subVectors(n,t),tA.subVectors(i,t),tM.subVectors(e,t);let a=tS.dot(tS),s=tS.dot(tA),o=tS.dot(tM),l=tA.dot(tA),u=tA.dot(tM),c=a*l-s*s;if(0===c)return r.set(0,0,0),null;let h=1/c,d=(l*o-s*u)*h,f=(a*u-s*o)*h;return r.set(1-d-f,f,d)}static containsPoint(e,t,i,n){return null!==this.getBarycoord(e,t,i,n,tb)&&tb.x>=0&&tb.y>=0&&tb.x+tb.y<=1}static getInterpolation(e,t,i,n,r,a,s,o){return null===this.getBarycoord(e,t,i,n,tb)?(o.x=0,o.y=0,"z"in o&&(o.z=0),"w"in o&&(o.w=0),null):(o.setScalar(0),o.addScaledVector(r,tb.x),o.addScaledVector(a,tb.y),o.addScaledVector(s,tb.z),o)}static getInterpolatedAttribute(e,t,i,n,r,a){return tP.setScalar(0),tD.setScalar(0),tI.setScalar(0),tP.fromBufferAttribute(e,t),tD.fromBufferAttribute(e,i),tI.fromBufferAttribute(e,n),a.setScalar(0),a.addScaledVector(tP,r.x),a.addScaledVector(tD,r.y),a.addScaledVector(tI,r.z),a}static isFrontFacing(e,t,i,n){return tS.subVectors(i,t),tA.subVectors(e,t),0>tS.cross(tA).dot(n)}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,n){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[n]),this}setFromAttributeAndIndices(e,t,i,n){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,n),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 tS.subVectors(this.c,this.b),tA.subVectors(this.a,this.b),.5*tS.cross(tA).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return tL.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return tL.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,i,n,r){return tL.getInterpolation(e,this.a,this.b,this.c,t,i,n,r)}containsPoint(e){return tL.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return tL.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let i,n,r=this.a,a=this.b,s=this.c;tw.subVectors(a,r),tT.subVectors(s,r),t_.subVectors(e,r);let o=tw.dot(t_),l=tT.dot(t_);if(o<=0&&l<=0)return t.copy(r);tC.subVectors(e,a);let u=tw.dot(tC),c=tT.dot(tC);if(u>=0&&c<=u)return t.copy(a);let h=o*c-u*l;if(h<=0&&o>=0&&u<=0)return i=o/(o-u),t.copy(r).addScaledVector(tw,i);tR.subVectors(e,s);let d=tw.dot(tR),f=tT.dot(tR);if(f>=0&&d<=f)return t.copy(s);let p=d*l-o*f;if(p<=0&&l>=0&&f<=0)return n=l/(l-f),t.copy(r).addScaledVector(tT,n);let m=u*f-d*c;if(m<=0&&c-u>=0&&d-f>=0)return tE.subVectors(s,a),n=(c-u)/(c-u+(d-f)),t.copy(a).addScaledVector(tE,n);let g=1/(m+p+h);return i=p*g,n=h*g,t.copy(r).addScaledVector(tw,i).addScaledVector(tT,n)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let tB={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32},tU={h:0,s:0,l:0},tN={h:0,s:0,l:0};function tF(e,t,i){return(i<0&&(i+=1),i>1&&(i-=1),i<1/6)?e+(t-e)*6*i:i<.5?t:i<2/3?e+(t-e)*6*(2/3-i):e}class tO{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){return void 0===t&&void 0===i?e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e):this.setRGB(e,t,i),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=D){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,eu.toWorkingColorSpace(this,t),this}setRGB(e,t,i,n=eu.workingColorSpace){return this.r=e,this.g=t,this.b=i,eu.toWorkingColorSpace(this,n),this}setHSL(e,t,i,n=eu.workingColorSpace){if(e=V(e,1),t=G(t,0,1),i=G(i,0,1),0===t)this.r=this.g=this.b=i;else{let n=i<=.5?i*(1+t):i+t-i*t,r=2*i-n;this.r=tF(r,n,e+1/3),this.g=tF(r,n,e),this.b=tF(r,n,e-1/3)}return eu.toWorkingColorSpace(this,n),this}setStyle(e,t=D){let i;function n(t){void 0!==t&&1>parseFloat(t)&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let r,a=i[1],s=i[2];switch(a){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,t);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,t);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){let n=i[1],r=n.length;if(3===r)return this.setRGB(parseInt(n.charAt(0),16)/15,parseInt(n.charAt(1),16)/15,parseInt(n.charAt(2),16)/15,t);if(6===r)return this.setHex(parseInt(n,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=D){let i=tB[e.toLowerCase()];return void 0!==i?this.setHex(i,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=ec(e.r),this.g=ec(e.g),this.b=ec(e.b),this}copyLinearToSRGB(e){return this.r=eh(e.r),this.g=eh(e.g),this.b=eh(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=D){return eu.fromWorkingColorSpace(tz.copy(this),e),65536*Math.round(G(255*tz.r,0,255))+256*Math.round(G(255*tz.g,0,255))+Math.round(G(255*tz.b,0,255))}getHexString(e=D){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=eu.workingColorSpace){let i,n;eu.fromWorkingColorSpace(tz.copy(this),t);let r=tz.r,a=tz.g,s=tz.b,o=Math.max(r,a,s),l=Math.min(r,a,s),u=(l+o)/2;if(l===o)i=0,n=0;else{let e=o-l;switch(n=u<=.5?e/(o+l):e/(2-o-l),o){case r:i=(a-s)/e+6*(a<s);break;case a:i=(s-r)/e+2;break;case s:i=(r-a)/e+4}i/=6}return e.h=i,e.s=n,e.l=u,e}getRGB(e,t=eu.workingColorSpace){return eu.fromWorkingColorSpace(tz.copy(this),t),e.r=tz.r,e.g=tz.g,e.b=tz.b,e}getStyle(e=D){eu.fromWorkingColorSpace(tz.copy(this),e);let t=tz.r,i=tz.g,n=tz.b;return e!==D?`color(${e} ${t.toFixed(3)} ${i.toFixed(3)} ${n.toFixed(3)})`:`rgb(${Math.round(255*t)},${Math.round(255*i)},${Math.round(255*n)})`}offsetHSL(e,t,i){return this.getHSL(tU),this.setHSL(tU.h+e,tU.s+t,tU.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(tU),e.getHSL(tN);let i=W(tU.h,tN.h,t),n=W(tU.s,tN.s,t),r=W(tU.l,tN.l,t);return this.setHSL(i,n,r),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){let t=this.r,i=this.g,n=this.b,r=e.elements;return this.r=r[0]*t+r[3]*i+r[6]*n,this.g=r[1]*t+r[4]*i+r[7]*n,this.b=r[2]*t+r[5]*i+r[8]*n,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}}let tz=new tO;tO.NAMES=tB;let tk=0;class tH extends N{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:tk++}),this.uuid=H(),this.name="",this.type="Material",this.blending=1,this.side=0,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new tO(0,0,0),this.blendAlpha=0,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=7680,this.stencilZFail=7680,this.stencilZPass=7680,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(let t in e){let i=e[t];if(void 0===i){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}let n=this[t];if(void 0===n){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):this[t]=i}}toJSON(e){let t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});let i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};function n(e){let t=[];for(let i in e){let n=e[i];delete n.metadata,t.push(n)}return t}if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),void 0!==this.roughness&&(i.roughness=this.roughness),void 0!==this.metalness&&(i.metalness=this.metalness),void 0!==this.sheen&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),void 0!==this.emissiveIntensity&&1!==this.emissiveIntensity&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(i.shininess=this.shininess),void 0!==this.clearcoat&&(i.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.dispersion&&(i.dispersion=this.dispersion),void 0!==this.iridescence&&(i.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(i.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),void 0!==this.anisotropy&&(i.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(i.combine=this.combine)),void 0!==this.envMapRotation&&(i.envMapRotation=this.envMapRotation.toArray()),void 0!==this.envMapIntensity&&(i.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(i.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(i.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(i.size=this.size),null!==this.shadowSide&&(i.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(i.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(i.blending=this.blending),0!==this.side&&(i.side=this.side),!0===this.vertexColors&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),!0===this.transparent&&(i.transparent=!0),204!==this.blendSrc&&(i.blendSrc=this.blendSrc),205!==this.blendDst&&(i.blendDst=this.blendDst),100!==this.blendEquation&&(i.blendEquation=this.blendEquation),null!==this.blendSrcAlpha&&(i.blendSrcAlpha=this.blendSrcAlpha),null!==this.blendDstAlpha&&(i.blendDstAlpha=this.blendDstAlpha),null!==this.blendEquationAlpha&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),0!==this.blendAlpha&&(i.blendAlpha=this.blendAlpha),3!==this.depthFunc&&(i.depthFunc=this.depthFunc),!1===this.depthTest&&(i.depthTest=this.depthTest),!1===this.depthWrite&&(i.depthWrite=this.depthWrite),!1===this.colorWrite&&(i.colorWrite=this.colorWrite),255!==this.stencilWriteMask&&(i.stencilWriteMask=this.stencilWriteMask),519!==this.stencilFunc&&(i.stencilFunc=this.stencilFunc),0!==this.stencilRef&&(i.stencilRef=this.stencilRef),255!==this.stencilFuncMask&&(i.stencilFuncMask=this.stencilFuncMask),7680!==this.stencilFail&&(i.stencilFail=this.stencilFail),7680!==this.stencilZFail&&(i.stencilZFail=this.stencilZFail),7680!==this.stencilZPass&&(i.stencilZPass=this.stencilZPass),!0===this.stencilWrite&&(i.stencilWrite=this.stencilWrite),void 0!==this.rotation&&0!==this.rotation&&(i.rotation=this.rotation),!0===this.polygonOffset&&(i.polygonOffset=!0),0!==this.polygonOffsetFactor&&(i.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(i.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(i.linewidth=this.linewidth),void 0!==this.dashSize&&(i.dashSize=this.dashSize),void 0!==this.gapSize&&(i.gapSize=this.gapSize),void 0!==this.scale&&(i.scale=this.scale),!0===this.dithering&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),!0===this.alphaHash&&(i.alphaHash=!0),!0===this.alphaToCoverage&&(i.alphaToCoverage=!0),!0===this.premultipliedAlpha&&(i.premultipliedAlpha=!0),!0===this.forceSinglePass&&(i.forceSinglePass=!0),!0===this.wireframe&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(i.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(i.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(i.flatShading=!0),!1===this.visible&&(i.visible=!1),!1===this.toneMapped&&(i.toneMapped=!1),!1===this.fog&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData),t){let t=n(e.textures),r=n(e.images);t.length>0&&(i.textures=t),r.length>0&&(i.images=r)}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;let t=e.clippingPlanes,i=null;if(null!==t){let e=t.length;i=Array(e);for(let n=0;n!==e;++n)i[n]=t[n].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){!0===e&&this.version++}onBuild(){console.warn("Material: onBuild() has been removed.")}}class tG extends tH{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new tO(0xffffff),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 ti,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}let tV=function(){let e=new ArrayBuffer(4),t=new Float32Array(e),i=new Uint32Array(e),n=new Uint32Array(512),r=new Uint32Array(512);for(let e=0;e<256;++e){let t=e-127;t<-27?(n[e]=0,n[256|e]=32768,r[e]=24,r[256|e]=24):t<-14?(n[e]=1024>>-t-14,n[256|e]=1024>>-t-14|32768,r[e]=-t-1,r[256|e]=-t-1):t<=15?(n[e]=t+15<<10,n[256|e]=t+15<<10|32768,r[e]=13,r[256|e]=13):t<128?(n[e]=31744,n[256|e]=64512,r[e]=24,r[256|e]=24):(n[e]=31744,n[256|e]=64512,r[e]=13,r[256|e]=13)}let a=new Uint32Array(2048),s=new Uint32Array(64),o=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,i=0;for(;(8388608&t)==0;)t<<=1,i-=8388608;t&=-8388609,i+=0x38800000,a[e]=t|i}for(let e=1024;e<2048;++e)a[e]=0x38000000+(e-1024<<13);for(let e=1;e<31;++e)s[e]=e<<23;s[31]=0x47800000,s[32]=0x80000000;for(let e=33;e<63;++e)s[e]=0x80000000+(e-32<<23);s[63]=0xc7800000;for(let e=1;e<64;++e)32!==e&&(o[e]=1024);return{floatView:t,uint32View:i,baseTable:n,shiftTable:r,mantissaTable:a,exponentTable:s,offsetTable:o}}();function tW(e){Math.abs(e)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),e=G(e,-65504,65504),tV.floatView[0]=e;let t=tV.uint32View[0],i=t>>23&511;return tV.baseTable[i]+((8388607&t)>>tV.shiftTable[i])}function tj(e){let t=e>>10;return tV.uint32View[0]=tV.mantissaTable[tV.offsetTable[t]+(1023&e)]+tV.exponentTable[t],tV.floatView[0]}let tX={toHalfFloat:tW,fromHalfFloat:tj},tY=new eE,tQ=new Q;class tq{constructor(e,t,i=!1){if(Array.isArray(e))throw TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=i,this.usage=35044,this.updateRanges=[],this.gpuType=1015,this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(let n=0,r=this.itemSize;n<r;n++)this.array[e+n]=t.array[i+n];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(2===this.itemSize)for(let t=0,i=this.count;t<i;t++)tQ.fromBufferAttribute(this,t),tQ.applyMatrix3(e),this.setXY(t,tQ.x,tQ.y);else if(3===this.itemSize)for(let t=0,i=this.count;t<i;t++)tY.fromBufferAttribute(this,t),tY.applyMatrix3(e),this.setXYZ(t,tY.x,tY.y,tY.z);return this}applyMatrix4(e){for(let t=0,i=this.count;t<i;t++)tY.fromBufferAttribute(this,t),tY.applyMatrix4(e),this.setXYZ(t,tY.x,tY.y,tY.z);return this}applyNormalMatrix(e){for(let t=0,i=this.count;t<i;t++)tY.fromBufferAttribute(this,t),tY.applyNormalMatrix(e),this.setXYZ(t,tY.x,tY.y,tY.z);return this}transformDirection(e){for(let t=0,i=this.count;t<i;t++)tY.fromBufferAttribute(this,t),tY.transformDirection(e),this.setXYZ(t,tY.x,tY.y,tY.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=j(i,this.array)),i}setComponent(e,t,i){return this.normalized&&(i=X(i,this.array)),this.array[e*this.itemSize+t]=i,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=j(t,this.array)),t}setX(e,t){return this.normalized&&(t=X(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=j(t,this.array)),t}setY(e,t){return this.normalized&&(t=X(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=j(t,this.array)),t}setZ(e,t){return this.normalized&&(t=X(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=j(t,this.array)),t}setW(e,t){return this.normalized&&(t=X(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,i){return e*=this.itemSize,this.normalized&&(t=X(t,this.array),i=X(i,this.array)),this.array[e+0]=t,this.array[e+1]=i,this}setXYZ(e,t,i,n){return e*=this.itemSize,this.normalized&&(t=X(t,this.array),i=X(i,this.array),n=X(n,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=n,this}setXYZW(e,t,i,n,r){return e*=this.itemSize,this.normalized&&(t=X(t,this.array),i=X(i,this.array),n=X(n,this.array),r=X(r,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=n,this.array[e+3]=r,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){let e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return""!==this.name&&(e.name=this.name),35044!==this.usage&&(e.usage=this.usage),e}}class tK extends tq{constructor(e,t,i){super(new Int8Array(e),t,i)}}class tZ extends tq{constructor(e,t,i){super(new Uint8Array(e),t,i)}}class tJ extends tq{constructor(e,t,i){super(new Uint8ClampedArray(e),t,i)}}class t$ extends tq{constructor(e,t,i){super(new Int16Array(e),t,i)}}class t0 extends tq{constructor(e,t,i){super(new Uint16Array(e),t,i)}}class t1 extends tq{constructor(e,t,i){super(new Int32Array(e),t,i)}}class t2 extends tq{constructor(e,t,i){super(new Uint32Array(e),t,i)}}class t3 extends tq{constructor(e,t,i){super(new Uint16Array(e),t,i),this.isFloat16BufferAttribute=!0}getX(e){let t=tj(this.array[e*this.itemSize]);return this.normalized&&(t=j(t,this.array)),t}setX(e,t){return this.normalized&&(t=X(t,this.array)),this.array[e*this.itemSize]=tW(t),this}getY(e){let t=tj(this.array[e*this.itemSize+1]);return this.normalized&&(t=j(t,this.array)),t}setY(e,t){return this.normalized&&(t=X(t,this.array)),this.array[e*this.itemSize+1]=tW(t),this}getZ(e){let t=tj(this.array[e*this.itemSize+2]);return this.normalized&&(t=j(t,this.array)),t}setZ(e,t){return this.normalized&&(t=X(t,this.array)),this.array[e*this.itemSize+2]=tW(t),this}getW(e){let t=tj(this.array[e*this.itemSize+3]);return this.normalized&&(t=j(t,this.array)),t}setW(e,t){return this.normalized&&(t=X(t,this.array)),this.array[e*this.itemSize+3]=tW(t),this}setXY(e,t,i){return e*=this.itemSize,this.normalized&&(t=X(t,this.array),i=X(i,this.array)),this.array[e+0]=tW(t),this.array[e+1]=tW(i),this}setXYZ(e,t,i,n){return e*=this.itemSize,this.normalized&&(t=X(t,this.array),i=X(i,this.array),n=X(n,this.array)),this.array[e+0]=tW(t),this.array[e+1]=tW(i),this.array[e+2]=tW(n),this}setXYZW(e,t,i,n,r){return e*=this.itemSize,this.normalized&&(t=X(t,this.array),i=X(i,this.array),n=X(n,this.array),r=X(r,this.array)),this.array[e+0]=tW(t),this.array[e+1]=tW(i),this.array[e+2]=tW(n),this.array[e+3]=tW(r),this}}class t4 extends tq{constructor(e,t,i){super(new Float32Array(e),t,i)}}let t5=0,t6=new e2,t8=new ty,t9=new eE,t7=new eR,ie=new eR,it=new eE;class ii extends N{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:t5++}),this.uuid=H(),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(Z(e)?t2:t0)(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 void 0!==this.attributes[e]}addGroup(e,t,i=0){this.groups.push({start:e,count:t,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){let t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);let i=this.attributes.normal;if(void 0!==i){let t=new q().getNormalMatrix(e);i.applyNormalMatrix(t),i.needsUpdate=!0}let n=this.attributes.tangent;return void 0!==n&&(n.transformDirection(e),n.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(e){return t6.makeRotationFromQuaternion(e),this.applyMatrix4(t6),this}rotateX(e){return t6.makeRotationX(e),this.applyMatrix4(t6),this}rotateY(e){return t6.makeRotationY(e),this.applyMatrix4(t6),this}rotateZ(e){return t6.makeRotationZ(e),this.applyMatrix4(t6),this}translate(e,t,i){return t6.makeTranslation(e,t,i),this.applyMatrix4(t6),this}scale(e,t,i){return t6.makeScale(e,t,i),this.applyMatrix4(t6),this}lookAt(e){return t8.lookAt(e),t8.updateMatrix(),this.applyMatrix4(t8.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(t9).negate(),this.translate(t9.x,t9.y,t9.z),this}setFromPoints(e){let t=this.getAttribute("position");if(void 0===t){let t=[];for(let i=0,n=e.length;i<n;i++){let n=e[i];t.push(n.x,n.y,n.z||0)}this.setAttribute("position",new t4(t,3))}else{let i=Math.min(e.length,t.count);for(let n=0;n<i;n++){let i=e[n];t.setXYZ(n,i.x,i.y,i.z||0)}e.length>t.count&&console.warn("THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new eR);let 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 eE(-1/0,-1/0,-1/0),new eE(Infinity,Infinity,Infinity));return}if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(let e=0,i=t.length;e<i;e++){let i=t[e];t7.setFromBufferAttribute(i),this.morphTargetsRelative?(it.addVectors(this.boundingBox.min,t7.min),this.boundingBox.expandByPoint(it),it.addVectors(this.boundingBox.max,t7.max),this.boundingBox.expandByPoint(it)):(this.boundingBox.expandByPoint(t7.min),this.boundingBox.expandByPoint(t7.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new eY);let 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 eE,1/0);return}if(e){let i=this.boundingSphere.center;if(t7.setFromBufferAttribute(e),t)for(let e=0,i=t.length;e<i;e++){let i=t[e];ie.setFromBufferAttribute(i),this.morphTargetsRelative?(it.addVectors(t7.min,ie.min),t7.expandByPoint(it),it.addVectors(t7.max,ie.max),t7.expandByPoint(it)):(t7.expandByPoint(ie.min),t7.expandByPoint(ie.max))}t7.getCenter(i);let n=0;for(let t=0,r=e.count;t<r;t++)it.fromBufferAttribute(e,t),n=Math.max(n,i.distanceToSquared(it));if(t)for(let r=0,a=t.length;r<a;r++){let a=t[r],s=this.morphTargetsRelative;for(let t=0,r=a.count;t<r;t++)it.fromBufferAttribute(a,t),s&&(t9.fromBufferAttribute(e,t),it.add(t9)),n=Math.max(n,i.distanceToSquared(it))}this.boundingSphere.radius=Math.sqrt(n),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){let e=this.index,t=this.attributes;if(null===e||void 0===t.position||void 0===t.normal||void 0===t.uv)return void console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");let i=t.position,n=t.normal,r=t.uv;!1===this.hasAttribute("tangent")&&this.setAttribute("tangent",new tq(new Float32Array(4*i.count),4));let a=this.getAttribute("tangent"),s=[],o=[];for(let e=0;e<i.count;e++)s[e]=new eE,o[e]=new eE;let l=new eE,u=new eE,c=new eE,h=new Q,d=new Q,f=new Q,p=new eE,m=new eE,g=this.groups;0===g.length&&(g=[{start:0,count:e.count}]);for(let t=0,n=g.length;t<n;++t){let n=g[t],a=n.start,v=n.count;for(let t=a,n=a+v;t<n;t+=3)!function(e,t,n){l.fromBufferAttribute(i,e),u.fromBufferAttribute(i,t),c.fromBufferAttribute(i,n),h.fromBufferAttribute(r,e),d.fromBufferAttribute(r,t),f.fromBufferAttribute(r,n),u.sub(l),c.sub(l),d.sub(h),f.sub(h);let a=1/(d.x*f.y-f.x*d.y);isFinite(a)&&(p.copy(u).multiplyScalar(f.y).addScaledVector(c,-d.y).multiplyScalar(a),m.copy(c).multiplyScalar(d.x).addScaledVector(u,-f.x).multiplyScalar(a),s[e].add(p),s[t].add(p),s[n].add(p),o[e].add(m),o[t].add(m),o[n].add(m))}(e.getX(t+0),e.getX(t+1),e.getX(t+2))}let v=new eE,x=new eE,y=new eE,S=new eE;function A(e){y.fromBufferAttribute(n,e),S.copy(y);let t=s[e];v.copy(t),v.sub(y.multiplyScalar(y.dot(t))).normalize(),x.crossVectors(S,t);let i=x.dot(o[e]);a.setXYZW(e,v.x,v.y,v.z,i<0?-1:1)}for(let t=0,i=g.length;t<i;++t){let i=g[t],n=i.start,r=i.count;for(let t=n,i=n+r;t<i;t+=3)A(e.getX(t+0)),A(e.getX(t+1)),A(e.getX(t+2))}}computeVertexNormals(){let e=this.index,t=this.getAttribute("position");if(void 0!==t){let i=this.getAttribute("normal");if(void 0===i)i=new tq(new Float32Array(3*t.count),3),this.setAttribute("normal",i);else for(let e=0,t=i.count;e<t;e++)i.setXYZ(e,0,0,0);let n=new eE,r=new eE,a=new eE,s=new eE,o=new eE,l=new eE,u=new eE,c=new eE;if(e)for(let h=0,d=e.count;h<d;h+=3){let d=e.getX(h+0),f=e.getX(h+1),p=e.getX(h+2);n.fromBufferAttribute(t,d),r.fromBufferAttribute(t,f),a.fromBufferAttribute(t,p),u.subVectors(a,r),c.subVectors(n,r),u.cross(c),s.fromBufferAttribute(i,d),o.fromBufferAttribute(i,f),l.fromBufferAttribute(i,p),s.add(u),o.add(u),l.add(u),i.setXYZ(d,s.x,s.y,s.z),i.setXYZ(f,o.x,o.y,o.z),i.setXYZ(p,l.x,l.y,l.z)}else for(let e=0,s=t.count;e<s;e+=3)n.fromBufferAttribute(t,e+0),r.fromBufferAttribute(t,e+1),a.fromBufferAttribute(t,e+2),u.subVectors(a,r),c.subVectors(n,r),u.cross(c),i.setXYZ(e+0,u.x,u.y,u.z),i.setXYZ(e+1,u.x,u.y,u.z),i.setXYZ(e+2,u.x,u.y,u.z);this.normalizeNormals(),i.needsUpdate=!0}}normalizeNormals(){let e=this.attributes.normal;for(let t=0,i=e.count;t<i;t++)it.fromBufferAttribute(e,t),it.normalize(),e.setXYZ(t,it.x,it.y,it.z)}toNonIndexed(){function e(e,t){let i=e.array,n=e.itemSize,r=e.normalized,a=new i.constructor(t.length*n),s=0,o=0;for(let r=0,l=t.length;r<l;r++){s=e.isInterleavedBufferAttribute?t[r]*e.data.stride+e.offset:t[r]*n;for(let e=0;e<n;e++)a[o++]=i[s++]}return new tq(a,n,r)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;let t=new ii,i=this.index.array,n=this.attributes;for(let r in n){let a=e(n[r],i);t.setAttribute(r,a)}let r=this.morphAttributes;for(let n in r){let a=[],s=r[n];for(let t=0,n=s.length;t<n;t++){let n=e(s[t],i);a.push(n)}t.morphAttributes[n]=a}t.morphTargetsRelative=this.morphTargetsRelative;let a=this.groups;for(let e=0,i=a.length;e<i;e++){let i=a[e];t.addGroup(i.start,i.count,i.materialIndex)}return t}toJSON(){let e={metadata:{version:4.6,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),void 0!==this.parameters){let t=this.parameters;for(let i in t)void 0!==t[i]&&(e[i]=t[i]);return e}e.data={attributes:{}};let t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let i=this.attributes;for(let t in i){let n=i[t];e.data.attributes[t]=n.toJSON(e.data)}let n={},r=!1;for(let t in this.morphAttributes){let i=this.morphAttributes[t],a=[];for(let t=0,n=i.length;t<n;t++){let n=i[t];a.push(n.toJSON(e.data))}a.length>0&&(n[t]=a,r=!0)}r&&(e.data.morphAttributes=n,e.data.morphTargetsRelative=this.morphTargetsRelative);let a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));let s=this.boundingSphere;return null!==s&&(e.data.boundingSphere={center:s.center.toArray(),radius:s.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;let t={};this.name=e.name;let i=e.index;null!==i&&this.setIndex(i.clone(t));let n=e.attributes;for(let e in n){let i=n[e];this.setAttribute(e,i.clone(t))}let r=e.morphAttributes;for(let e in r){let i=[],n=r[e];for(let e=0,r=n.length;e<r;e++)i.push(n[e].clone(t));this.morphAttributes[e]=i}this.morphTargetsRelative=e.morphTargetsRelative;let a=e.groups;for(let e=0,t=a.length;e<t;e++){let t=a[e];this.addGroup(t.start,t.count,t.materialIndex)}let s=e.boundingBox;null!==s&&(this.boundingBox=s.clone());let o=e.boundingSphere;return null!==o&&(this.boundingSphere=o.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}let ir=new e2,ia=new e1,is=new eY,io=new eE,il=new eE,iu=new eE,ic=new eE,ih=new eE,id=new eE,ip=new eE,im=new eE;class ig extends ty{constructor(e=new ii,t=new tG){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){let e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){let i=e[t[0]];if(void 0!==i){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=i.length;e<t;e++){let t=i[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}getVertexPosition(e,t){let i=this.geometry,n=i.attributes.position,r=i.morphAttributes.position,a=i.morphTargetsRelative;t.fromBufferAttribute(n,e);let s=this.morphTargetInfluences;if(r&&s){id.set(0,0,0);for(let i=0,n=r.length;i<n;i++){let n=s[i],o=r[i];0!==n&&(ih.fromBufferAttribute(o,e),a?id.addScaledVector(ih,n):id.addScaledVector(ih.sub(t),n))}t.add(id)}return t}raycast(e,t){let i=this.geometry,n=this.material,r=this.matrixWorld;void 0===n||(null===i.boundingSphere&&i.computeBoundingSphere(),is.copy(i.boundingSphere),is.applyMatrix4(r),ia.copy(e.ray).recast(e.near),!1===is.containsPoint(ia.origin)&&(null===ia.intersectSphere(is,io)||ia.origin.distanceToSquared(io)>(e.far-e.near)**2)||(ir.copy(r).invert(),ia.copy(e.ray).applyMatrix4(ir),(null===i.boundingBox||!1!==ia.intersectsBox(i.boundingBox))&&this._computeIntersections(e,t,ia)))}_computeIntersections(e,t,i){let n,r=this.geometry,a=this.material,s=r.index,o=r.attributes.position,l=r.attributes.uv,u=r.attributes.uv1,c=r.attributes.normal,h=r.groups,d=r.drawRange;if(null!==s)if(Array.isArray(a))for(let r=0,o=h.length;r<o;r++){let o=h[r],f=a[o.materialIndex],p=Math.max(o.start,d.start),m=Math.min(s.count,Math.min(o.start+o.count,d.start+d.count));for(let r=p;r<m;r+=3)(n=iv(this,f,e,i,l,u,c,s.getX(r),s.getX(r+1),s.getX(r+2)))&&(n.faceIndex=Math.floor(r/3),n.face.materialIndex=o.materialIndex,t.push(n))}else{let r=Math.max(0,d.start),o=Math.min(s.count,d.start+d.count);for(let h=r;h<o;h+=3)(n=iv(this,a,e,i,l,u,c,s.getX(h),s.getX(h+1),s.getX(h+2)))&&(n.faceIndex=Math.floor(h/3),t.push(n))}else if(void 0!==o)if(Array.isArray(a))for(let r=0,s=h.length;r<s;r++){let s=h[r],f=a[s.materialIndex],p=Math.max(s.start,d.start),m=Math.min(o.count,Math.min(s.start+s.count,d.start+d.count));for(let r=p;r<m;r+=3)(n=iv(this,f,e,i,l,u,c,r,r+1,r+2))&&(n.faceIndex=Math.floor(r/3),n.face.materialIndex=s.materialIndex,t.push(n))}else{let r=Math.max(0,d.start),s=Math.min(o.count,d.start+d.count);for(let o=r;o<s;o+=3)(n=iv(this,a,e,i,l,u,c,o,o+1,o+2))&&(n.faceIndex=Math.floor(o/3),t.push(n))}}}function iv(e,t,i,n,r,a,s,o,l,u){e.getVertexPosition(o,il),e.getVertexPosition(l,iu),e.getVertexPosition(u,ic);let c=function(e,t,i,n,r,a,s,o){if(null===(1===t.side?n.intersectTriangle(s,a,r,!0,o):n.intersectTriangle(r,a,s,0===t.side,o)))return null;im.copy(o),im.applyMatrix4(e.matrixWorld);let l=i.ray.origin.distanceTo(im);return l<i.near||l>i.far?null:{distance:l,point:im.clone(),object:e}}(e,t,i,n,il,iu,ic,ip);if(c){let e=new eE;tL.getBarycoord(ip,il,iu,ic,e),r&&(c.uv=tL.getInterpolatedAttribute(r,o,l,u,e,new Q)),a&&(c.uv1=tL.getInterpolatedAttribute(a,o,l,u,e,new Q)),s&&(c.normal=tL.getInterpolatedAttribute(s,o,l,u,e,new eE),c.normal.dot(n.direction)>0&&c.normal.multiplyScalar(-1));let t={a:o,b:l,c:u,normal:new eE,materialIndex:0};tL.getNormal(il,iu,ic,t.normal),c.face=t,c.barycoord=e}return c}class ix extends ii{constructor(e=1,t=1,i=1,n=1,r=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:n,heightSegments:r,depthSegments:a};const s=this;n=Math.floor(n),r=Math.floor(r);const o=[],l=[],u=[],c=[];let h=0,d=0;function f(e,t,i,n,r,a,f,p,m,g,v){let x=a/m,y=f/g,S=a/2,A=f/2,M=p/2,b=m+1,w=g+1,T=0,E=0,_=new eE;for(let a=0;a<w;a++){let s=a*y-A;for(let o=0;o<b;o++){let h=o*x-S;_[e]=h*n,_[t]=s*r,_[i]=M,l.push(_.x,_.y,_.z),_[e]=0,_[t]=0,_[i]=p>0?1:-1,u.push(_.x,_.y,_.z),c.push(o/m),c.push(1-a/g),T+=1}}for(let e=0;e<g;e++)for(let t=0;t<m;t++){let i=h+t+b*e,n=h+t+b*(e+1),r=h+(t+1)+b*(e+1),a=h+(t+1)+b*e;o.push(i,n,a),o.push(n,r,a),E+=6}s.addGroup(d,E,v),d+=E,h+=T}f("z","y","x",-1,-1,i,t,e,a=Math.floor(a),r,0),f("z","y","x",1,-1,i,t,-e,a,r,1),f("x","z","y",1,1,e,i,t,n,a,2),f("x","z","y",1,-1,e,i,-t,n,a,3),f("x","y","z",1,-1,e,t,i,n,r,4),f("x","y","z",-1,-1,e,t,-i,n,r,5),this.setIndex(o),this.setAttribute("position",new t4(l,3)),this.setAttribute("normal",new t4(u,3)),this.setAttribute("uv",new t4(c,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new ix(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function iy(e){let t={};for(let i in e)for(let n in t[i]={},e[i]){let r=e[i][n];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()."),t[i][n]=null):t[i][n]=r.clone():Array.isArray(r)?t[i][n]=r.slice():t[i][n]=r}return t}function iS(e){let t={};for(let i=0;i<e.length;i++){let n=iy(e[i]);for(let e in n)t[e]=n[e]}return t}function iA(e){let t=e.getRenderTarget();return null===t?e.outputColorSpace:!0===t.isXRRenderTarget?t.texture.colorSpace:eu.workingColorSpace}let iM={clone:iy,merge:iS};class ib extends tH{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader="void main() {\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==e&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=iy(e.uniforms),this.uniformsGroups=function(e){let t=[];for(let i=0;i<e.length;i++)t.push(e[i].clone());return t}(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){let t=super.toJSON(e);for(let i in t.glslVersion=this.glslVersion,t.uniforms={},this.uniforms){let n=this.uniforms[i].value;n&&n.isTexture?t.uniforms[i]={type:"t",value:n.toJSON(e).uuid}:n&&n.isColor?t.uniforms[i]={type:"c",value:n.getHex()}:n&&n.isVector2?t.uniforms[i]={type:"v2",value:n.toArray()}:n&&n.isVector3?t.uniforms[i]={type:"v3",value:n.toArray()}:n&&n.isVector4?t.uniforms[i]={type:"v4",value:n.toArray()}:n&&n.isMatrix3?t.uniforms[i]={type:"m3",value:n.toArray()}:n&&n.isMatrix4?t.uniforms[i]={type:"m4",value:n.toArray()}:t.uniforms[i]={value:n}}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;let i={};for(let e in this.extensions)!0===this.extensions[e]&&(i[e]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}}class iw extends ty{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new e2,this.projectionMatrix=new e2,this.projectionMatrixInverse=new e2,this.coordinateSystem=2e3}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)}}let iT=new eE,iE=new Q,i_=new Q;class iC extends iw{constructor(e=50,t=1,i=.1,n=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=n,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){let t=.5*this.getFilmHeight()/e;this.fov=2*k*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){let e=Math.tan(.5*z*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*k*Math.atan(Math.tan(.5*z*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){iT.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(iT.x,iT.y).multiplyScalar(-e/iT.z),iT.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(iT.x,iT.y).multiplyScalar(-e/iT.z)}getViewSize(e,t){return this.getViewBounds(e,iE,i_),t.subVectors(i_,iE)}setViewOffset(e,t,i,n,r,a){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=n,this.view.width=r,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=this.near,t=e*Math.tan(.5*z*this.fov)/this.zoom,i=2*t,n=this.aspect*i,r=-.5*n,a=this.view;if(null!==this.view&&this.view.enabled){let e=a.fullWidth,s=a.fullHeight;r+=a.offsetX*n/e,t-=a.offsetY*i/s,n*=a.width/e,i*=a.height/s}let s=this.filmOffset;0!==s&&(r+=e*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+n,t,t-i,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}class iR extends ty{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const n=new iC(-90,1,e,t);n.layers=this.layers,this.add(n);const r=new iC(-90,1,e,t);r.layers=this.layers,this.add(r);const a=new iC(-90,1,e,t);a.layers=this.layers,this.add(a);const s=new iC(-90,1,e,t);s.layers=this.layers,this.add(s);const o=new iC(-90,1,e,t);o.layers=this.layers,this.add(o);const l=new iC(-90,1,e,t);l.layers=this.layers,this.add(l)}updateCoordinateSystem(){let e=this.coordinateSystem,t=this.children.concat(),[i,n,r,a,s,o]=t;for(let e of t)this.remove(e);if(2e3===e)i.up.set(0,1,0),i.lookAt(1,0,0),n.up.set(0,1,0),n.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),a.up.set(0,0,1),a.lookAt(0,-1,0),s.up.set(0,1,0),s.lookAt(0,0,1),o.up.set(0,1,0),o.lookAt(0,0,-1);else if(2001===e)i.up.set(0,-1,0),i.lookAt(-1,0,0),n.up.set(0,-1,0),n.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),a.up.set(0,0,-1),a.lookAt(0,-1,0),s.up.set(0,-1,0),s.lookAt(0,0,1),o.up.set(0,-1,0),o.lookAt(0,0,-1);else throw Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(let e of t)this.add(e),e.updateMatrixWorld()}update(e,t){null===this.parent&&this.updateMatrixWorld();let{renderTarget:i,activeMipmapLevel:n}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());let[r,a,s,o,l,u]=this.children,c=e.getRenderTarget(),h=e.getActiveCubeFace(),d=e.getActiveMipmapLevel(),f=e.xr.enabled;e.xr.enabled=!1;let p=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0,n),e.render(t,r),e.setRenderTarget(i,1,n),e.render(t,a),e.setRenderTarget(i,2,n),e.render(t,s),e.setRenderTarget(i,3,n),e.render(t,o),e.setRenderTarget(i,4,n),e.render(t,l),i.texture.generateMipmaps=p,e.setRenderTarget(i,5,n),e.render(t,u),e.setRenderTarget(c,h,d),e.xr.enabled=f,i.texture.needsPMREMUpdate=!0}}class iP extends ev{constructor(e,t,i,n,r,a,s,o,l,u){super(e=void 0!==e?e:[],t=void 0!==t?t:301,i,n,r,a,s,o,l,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class iD extends eS{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1};this.texture=new iP([i,i,i,i,i,i],t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:1006}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;let i={uniforms:{tEquirect:{value:null}},vertexShader:`
|
|
|
|
varying vec3 vWorldDirection;
|
|
|
|
vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
|
|
|
|
return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
|
|
|
|
}
|
|
|
|
void main() {
|
|
|
|
vWorldDirection = transformDirection( position, modelMatrix );
|
|
|
|
#include <begin_vertex>
|
|
#include <project_vertex>
|
|
|
|
}
|
|
`,fragmentShader:`
|
|
|
|
uniform sampler2D tEquirect;
|
|
|
|
varying vec3 vWorldDirection;
|
|
|
|
#include <common>
|
|
|
|
void main() {
|
|
|
|
vec3 direction = normalize( vWorldDirection );
|
|
|
|
vec2 sampleUV = equirectUv( direction );
|
|
|
|
gl_FragColor = texture2D( tEquirect, sampleUV );
|
|
|
|
}
|
|
`},n=new ix(5,5,5),r=new ib({name:"CubemapFromEquirect",uniforms:iy(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:1,blending:0});r.uniforms.tEquirect.value=t;let a=new ig(n,r),s=t.minFilter;return 1008===t.minFilter&&(t.minFilter=1006),new iR(1,10,this).update(e,a),t.minFilter=s,a.geometry.dispose(),a.material.dispose(),this}clear(e,t,i,n){let r=e.getRenderTarget();for(let r=0;r<6;r++)e.setRenderTarget(this,r),e.clear(t,i,n);e.setRenderTarget(r)}}class iI{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new tO(e),this.density=t}clone(){return new iI(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class iL{constructor(e,t=1,i=1e3){this.isFog=!0,this.name="",this.color=new tO(e),this.near=t,this.far=i}clone(){return new iL(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class iB extends ty{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 ti,this.environmentIntensity=1,this.environmentRotation=new ti,this.overrideMaterial=null,"u">typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){let t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),1!==this.environmentIntensity&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}}class iU{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=35044,this.updateRanges=[],this.version=0,this.uuid=H()}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,i){e*=this.stride,i*=t.stride;for(let n=0,r=this.stride;n<r;n++)this.array[e+n]=t.array[i+n];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=H()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);let t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),i=new this.constructor(t,this.stride);return i.setUsage(this.usage),i}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=H()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}let iN=new eE;class iF{constructor(e,t,i,n=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=i,this.normalized=n}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,i=this.data.count;t<i;t++)iN.fromBufferAttribute(this,t),iN.applyMatrix4(e),this.setXYZ(t,iN.x,iN.y,iN.z);return this}applyNormalMatrix(e){for(let t=0,i=this.count;t<i;t++)iN.fromBufferAttribute(this,t),iN.applyNormalMatrix(e),this.setXYZ(t,iN.x,iN.y,iN.z);return this}transformDirection(e){for(let t=0,i=this.count;t<i;t++)iN.fromBufferAttribute(this,t),iN.transformDirection(e),this.setXYZ(t,iN.x,iN.y,iN.z);return this}getComponent(e,t){let i=this.array[e*this.data.stride+this.offset+t];return this.normalized&&(i=j(i,this.array)),i}setComponent(e,t,i){return this.normalized&&(i=X(i,this.array)),this.data.array[e*this.data.stride+this.offset+t]=i,this}setX(e,t){return this.normalized&&(t=X(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=X(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=X(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=X(t,this.array)),this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){let t=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(t=j(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=j(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=j(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=j(t,this.array)),t}setXY(e,t,i){return e=e*this.data.stride+this.offset,this.normalized&&(t=X(t,this.array),i=X(i,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=i,this}setXYZ(e,t,i,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=X(t,this.array),i=X(i,this.array),n=X(n,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=i,this.data.array[e+2]=n,this}setXYZW(e,t,i,n,r){return e=e*this.data.stride+this.offset,this.normalized&&(t=X(t,this.array),i=X(i,this.array),n=X(n,this.array),r=X(r,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=i,this.data.array[e+2]=n,this.data.array[e+3]=r,this}clone(e){if(void 0!==e)return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new iF(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized);{console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");let e=[];for(let t=0;t<this.count;t++){let i=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[i+t])}return new tq(new this.array.constructor(e),this.itemSize,this.normalized)}}toJSON(e){if(void 0!==e)return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized};{console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");let e=[];for(let t=0;t<this.count;t++){let i=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[i+t])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:e,normalized:this.normalized}}}}class iO extends tH{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new tO(0xffffff),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}let iz=new eE,ik=new eE,iH=new eE,iG=new Q,iV=new Q,iW=new e2,ij=new eE,iX=new eE,iY=new eE,iQ=new Q,iq=new Q,iK=new Q;class iZ extends ty{constructor(e=new iO){if(super(),this.isSprite=!0,this.type="Sprite",void 0===i){i=new ii;const e=new iU(new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),5);i.setIndex([0,1,2,0,2,3]),i.setAttribute("position",new iF(e,3,0,!1)),i.setAttribute("uv",new iF(e,2,3,!1))}this.geometry=i,this.material=e,this.center=new Q(.5,.5)}raycast(e,t){let i,n;null===e.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),ik.setFromMatrixScale(this.matrixWorld),iW.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),iH.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&ik.multiplyScalar(-iH.z);let r=this.material.rotation;0!==r&&(n=Math.cos(r),i=Math.sin(r));let a=this.center;iJ(ij.set(-.5,-.5,0),iH,a,ik,i,n),iJ(iX.set(.5,-.5,0),iH,a,ik,i,n),iJ(iY.set(.5,.5,0),iH,a,ik,i,n),iQ.set(0,0),iq.set(1,0),iK.set(1,1);let s=e.ray.intersectTriangle(ij,iX,iY,!1,iz);if(null===s&&(iJ(iX.set(-.5,.5,0),iH,a,ik,i,n),iq.set(0,1),null===(s=e.ray.intersectTriangle(ij,iY,iX,!1,iz))))return;let o=e.ray.origin.distanceTo(iz);o<e.near||o>e.far||t.push({distance:o,point:iz.clone(),uv:tL.getInterpolation(iz,ij,iX,iY,iQ,iq,iK,new Q),face:null,object:this})}copy(e,t){return super.copy(e,t),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}}function iJ(e,t,i,n,r,a){iG.subVectors(e,i).addScalar(.5).multiply(n),void 0!==r?(iV.x=a*iG.x-r*iG.y,iV.y=r*iG.x+a*iG.y):iV.copy(iG),e.copy(t),e.x+=iV.x,e.y+=iV.y,e.applyMatrix4(iW)}let i$=new eE,i0=new eE;class i1 extends ty{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);let t=e.levels;for(let e=0,i=t.length;e<i;e++){let i=t[e];this.addLevel(i.object.clone(),i.distance,i.hysteresis)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,t=0,i=0){let n;t=Math.abs(t);let r=this.levels;for(n=0;n<r.length&&!(t<r[n].distance);n++);return r.splice(n,0,{distance:t,hysteresis:i,object:e}),this.add(e),this}removeLevel(e){let t=this.levels;for(let i=0;i<t.length;i++)if(t[i].distance===e){let e=t.splice(i,1);return this.remove(e[0].object),!0}return!1}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){let t=this.levels;if(t.length>0){let i,n;for(i=1,n=t.length;i<n;i++){let n=t[i].distance;if(t[i].object.visible&&(n-=n*t[i].hysteresis),e<n)break}return t[i-1].object}return null}raycast(e,t){if(this.levels.length>0){i$.setFromMatrixPosition(this.matrixWorld);let i=e.ray.origin.distanceTo(i$);this.getObjectForDistance(i).raycast(e,t)}}update(e){let t=this.levels;if(t.length>1){let i,n;i$.setFromMatrixPosition(e.matrixWorld),i0.setFromMatrixPosition(this.matrixWorld);let r=i$.distanceTo(i0)/e.zoom;for(i=1,t[0].object.visible=!0,n=t.length;i<n;i++){let e=t[i].distance;if(t[i].object.visible&&(e-=e*t[i].hysteresis),r>=e)t[i-1].object.visible=!1,t[i].object.visible=!0;else break}for(this._currentLevel=i-1;i<n;i++)t[i].object.visible=!1}}toJSON(e){let t=super.toJSON(e);!1===this.autoUpdate&&(t.object.autoUpdate=!1),t.object.levels=[];let i=this.levels;for(let e=0,n=i.length;e<n;e++){let n=i[e];t.object.levels.push({object:n.object.uuid,distance:n.distance,hysteresis:n.hysteresis})}return t}}let i2=new eE,i3=new ex,i4=new ex,i5=new eE,i6=new e2,i8=new eE,i9=new eY,i7=new e2,ne=new e1;class nt extends ig{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=R,this.bindMatrix=new e2,this.bindMatrixInverse=new e2,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){let e=this.geometry;null===this.boundingBox&&(this.boundingBox=new eR),this.boundingBox.makeEmpty();let t=e.getAttribute("position");for(let e=0;e<t.count;e++)this.getVertexPosition(e,i8),this.boundingBox.expandByPoint(i8)}computeBoundingSphere(){let e=this.geometry;null===this.boundingSphere&&(this.boundingSphere=new eY),this.boundingSphere.makeEmpty();let t=e.getAttribute("position");for(let e=0;e<t.count;e++)this.getVertexPosition(e,i8),this.boundingSphere.expandByPoint(i8)}copy(e,t){return super.copy(e,t),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,t){let i=this.material,n=this.matrixWorld;void 0===i||(null===this.boundingSphere&&this.computeBoundingSphere(),i9.copy(this.boundingSphere),i9.applyMatrix4(n),!1===e.ray.intersectsSphere(i9)||(i7.copy(n).invert(),ne.copy(e.ray).applyMatrix4(i7),(null===this.boundingBox||!1!==ne.intersectsBox(this.boundingBox))&&this._computeIntersections(e,t,ne)))}getVertexPosition(e,t){return super.getVertexPosition(e,t),this.applyBoneTransform(e,t),t}bind(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){let e=new ex,t=this.geometry.attributes.skinWeight;for(let i=0,n=t.count;i<n;i++){e.fromBufferAttribute(t,i);let n=1/e.manhattanLength();n!==1/0?e.multiplyScalar(n):e.set(1,0,0,0),t.setXYZW(i,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===R?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===P?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,t){let i=this.skeleton,n=this.geometry;i3.fromBufferAttribute(n.attributes.skinIndex,e),i4.fromBufferAttribute(n.attributes.skinWeight,e),i2.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let e=0;e<4;e++){let n=i4.getComponent(e);if(0!==n){let r=i3.getComponent(e);i6.multiplyMatrices(i.bones[r].matrixWorld,i.boneInverses[r]),t.addScaledVector(i5.copy(i2).applyMatrix4(i6),n)}}return t.applyMatrix4(this.bindMatrixInverse)}}class ni extends ty{constructor(){super(),this.isBone=!0,this.type="Bone"}}class nn extends ev{constructor(e=null,t=1,i=1,n,r,a,s,o,l=1003,u=1003,c,h){super(null,a,s,o,l,u,n,r,c,h),this.isDataTexture=!0,this.image={data:e,width:t,height:i},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}let nr=new e2,na=new e2;class ns{constructor(e=[],t=[]){this.uuid=H(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.init()}init(){let e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(16*e.length),0===t.length)this.calculateInverses();else if(e.length!==t.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let e=0,t=this.bones.length;e<t;e++)this.boneInverses.push(new e2)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){let t=new e2;this.bones[e]&&t.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(t)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){let t=this.bones[e];t&&t.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){let t=this.bones[e];t&&(t.parent&&t.parent.isBone?(t.matrix.copy(t.parent.matrixWorld).invert(),t.matrix.multiply(t.matrixWorld)):t.matrix.copy(t.matrixWorld),t.matrix.decompose(t.position,t.quaternion,t.scale))}}update(){let e=this.bones,t=this.boneInverses,i=this.boneMatrices,n=this.boneTexture;for(let n=0,r=e.length;n<r;n++){let r=e[n]?e[n].matrixWorld:na;nr.multiplyMatrices(r,t[n]),nr.toArray(i,16*n)}null!==n&&(n.needsUpdate=!0)}clone(){return new ns(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(4*this.bones.length),t=new Float32Array((e=Math.max(e=4*Math.ceil(e/4),4))*e*4);t.set(this.boneMatrices);let i=new nn(t,e,e,1023,1015);return i.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=i,this}getBoneByName(e){for(let t=0,i=this.bones.length;t<i;t++){let i=this.bones[t];if(i.name===e)return i}}dispose(){null!==this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let i=0,n=e.bones.length;i<n;i++){let n=e.bones[i],r=t[n];void 0===r&&(console.warn("THREE.Skeleton: No bone found with UUID:",n),r=new ni),this.bones.push(r),this.boneInverses.push(new e2().fromArray(e.boneInverses[i]))}return this.init(),this}toJSON(){let e={metadata:{version:4.6,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;let t=this.bones,i=this.boneInverses;for(let n=0,r=t.length;n<r;n++){let r=t[n];e.bones.push(r.uuid);let a=i[n];e.boneInverses.push(a.toArray())}return e}}class no extends tq{constructor(e,t,i,n=1){super(e,t,i),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=n}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){let e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}let nl=new e2,nu=new e2,nc=[],nh=new eR,nd=new e2,nf=new ig,np=new eY;class nm extends ig{constructor(e,t,i){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new no(new Float32Array(16*i),16),this.instanceColor=null,this.morphTexture=null,this.count=i,this.boundingBox=null,this.boundingSphere=null;for(let e=0;e<i;e++)this.setMatrixAt(e,nd)}computeBoundingBox(){let e=this.geometry,t=this.count;null===this.boundingBox&&(this.boundingBox=new eR),null===e.boundingBox&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let i=0;i<t;i++)this.getMatrixAt(i,nl),nh.copy(e.boundingBox).applyMatrix4(nl),this.boundingBox.union(nh)}computeBoundingSphere(){let e=this.geometry,t=this.count;null===this.boundingSphere&&(this.boundingSphere=new eY),null===e.boundingSphere&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let i=0;i<t;i++)this.getMatrixAt(i,nl),np.copy(e.boundingSphere).applyMatrix4(nl),this.boundingSphere.union(np)}copy(e,t){return super.copy(e,t),this.instanceMatrix.copy(e.instanceMatrix),null!==e.morphTexture&&(this.morphTexture=e.morphTexture.clone()),null!==e.instanceColor&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),this}getColorAt(e,t){t.fromArray(this.instanceColor.array,3*e)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,16*e)}getMorphAt(e,t){let i=t.morphTargetInfluences,n=this.morphTexture.source.data.data,r=e*(i.length+1)+1;for(let e=0;e<i.length;e++)i[e]=n[r+e]}raycast(e,t){let i=this.matrixWorld,n=this.count;if((nf.geometry=this.geometry,nf.material=this.material,void 0!==nf.material)&&(null===this.boundingSphere&&this.computeBoundingSphere(),np.copy(this.boundingSphere),np.applyMatrix4(i),!1!==e.ray.intersectsSphere(np)))for(let r=0;r<n;r++){this.getMatrixAt(r,nl),nu.multiplyMatrices(i,nl),nf.matrixWorld=nu,nf.raycast(e,nc);for(let e=0,i=nc.length;e<i;e++){let i=nc[e];i.instanceId=r,i.object=this,t.push(i)}nc.length=0}}setColorAt(e,t){null===this.instanceColor&&(this.instanceColor=new no(new Float32Array(3*this.instanceMatrix.count).fill(1),3)),t.toArray(this.instanceColor.array,3*e)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,16*e)}setMorphAt(e,t){let i=t.morphTargetInfluences,n=i.length+1;null===this.morphTexture&&(this.morphTexture=new nn(new Float32Array(n*this.count),n,this.count,1028,1015));let r=this.morphTexture.source.data.data,a=0;for(let e=0;e<i.length;e++)a+=i[e];let s=this.geometry.morphTargetsRelative?1:1-a,o=n*e;r[o]=s,r.set(i,o+1)}updateMorphTargets(){}dispose(){return this.dispatchEvent({type:"dispose"}),null!==this.morphTexture&&(this.morphTexture.dispose(),this.morphTexture=null),this}}let ng=new eE,nv=new eE,nx=new q;class ny{constructor(e=new eE(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,n){return this.normal.set(e,t,i),this.constant=n,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){let n=ng.subVectors(i,t).cross(nv.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(n,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){let 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){let i=e.delta(ng),n=this.normal.dot(i);if(0===n)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;let r=-(e.start.dot(this.normal)+this.constant)/n;return r<0||r>1?null:t.copy(e.start).addScaledVector(i,r)}intersectsLine(e){let 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){let i=t||nx.getNormalMatrix(e),n=this.coplanarPoint(ng).applyMatrix4(e),r=this.normal.applyMatrix3(i).normalize();return this.constant=-n.dot(r),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)}}let nS=new eY,nA=new eE;class nM{constructor(e=new ny,t=new ny,i=new ny,n=new ny,r=new ny,a=new ny){this.planes=[e,t,i,n,r,a]}set(e,t,i,n,r,a){let s=this.planes;return s[0].copy(e),s[1].copy(t),s[2].copy(i),s[3].copy(n),s[4].copy(r),s[5].copy(a),this}copy(e){let t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,t=2e3){let i=this.planes,n=e.elements,r=n[0],a=n[1],s=n[2],o=n[3],l=n[4],u=n[5],c=n[6],h=n[7],d=n[8],f=n[9],p=n[10],m=n[11],g=n[12],v=n[13],x=n[14],y=n[15];if(i[0].setComponents(o-r,h-l,m-d,y-g).normalize(),i[1].setComponents(o+r,h+l,m+d,y+g).normalize(),i[2].setComponents(o+a,h+u,m+f,y+v).normalize(),i[3].setComponents(o-a,h-u,m-f,y-v).normalize(),i[4].setComponents(o-s,h-c,m-p,y-x).normalize(),2e3===t)i[5].setComponents(o+s,h+c,m+p,y+x).normalize();else if(2001===t)i[5].setComponents(s,c,p,x).normalize();else throw Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(void 0!==e.boundingSphere)null===e.boundingSphere&&e.computeBoundingSphere(),nS.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{let t=e.geometry;null===t.boundingSphere&&t.computeBoundingSphere(),nS.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(nS)}intersectsSprite(e){return nS.center.set(0,0,0),nS.radius=.7071067811865476,nS.applyMatrix4(e.matrixWorld),this.intersectsSphere(nS)}intersectsSphere(e){let t=this.planes,i=e.center,n=-e.radius;for(let e=0;e<6;e++)if(t[e].distanceToPoint(i)<n)return!1;return!0}intersectsBox(e){let t=this.planes;for(let i=0;i<6;i++){let n=t[i];if(nA.x=n.normal.x>0?e.max.x:e.min.x,nA.y=n.normal.y>0?e.max.y:e.min.y,nA.z=n.normal.z>0?e.max.z:e.min.z,0>n.distanceToPoint(nA))return!1}return!0}containsPoint(e){let t=this.planes;for(let i=0;i<6;i++)if(0>t[i].distanceToPoint(e))return!1;return!0}clone(){return new this.constructor().copy(this)}}function nb(e,t){return e-t}function nw(e,t){return e.z-t.z}function nT(e,t){return t.z-e.z}let nE=new e2,n_=new tO(1,1,1),nC=new nM,nR=new eR,nP=new eY,nD=new eE,nI=new eE,nL=new eE,nB=new class{constructor(){this.index=0,this.pool=[],this.list=[]}push(e,t,i,n){let r=this.pool,a=this.list;this.index>=r.length&&r.push({start:-1,count:-1,z:-1,index:-1});let s=r[this.index];a.push(s),this.index++,s.start=e,s.count=t,s.z=i,s.index=n}reset(){this.list.length=0,this.index=0}},nU=new ig,nN=[];function nF(e,t){if(e.constructor!==t.constructor){let i=Math.min(e.length,t.length);for(let n=0;n<i;n++)t[n]=e[n]}else{let i=Math.min(e.length,t.length);t.set(new e.constructor(e.buffer,0,i))}}class nO extends ig{get maxInstanceCount(){return this._maxInstanceCount}get instanceCount(){return this._instanceInfo.length-this._availableInstanceIds.length}get unusedVertexCount(){return this._maxVertexCount-this._nextVertexStart}get unusedIndexCount(){return this._maxIndexCount-this._nextIndexStart}constructor(e,t,i=2*t,n){super(new ii,n),this.isBatchedMesh=!0,this.perObjectFrustumCulled=!0,this.sortObjects=!0,this.boundingBox=null,this.boundingSphere=null,this.customSort=null,this._instanceInfo=[],this._geometryInfo=[],this._availableInstanceIds=[],this._availableGeometryIds=[],this._nextIndexStart=0,this._nextVertexStart=0,this._geometryCount=0,this._visibilityChanged=!0,this._geometryInitialized=!1,this._maxInstanceCount=e,this._maxVertexCount=t,this._maxIndexCount=i,this._multiDrawCounts=new Int32Array(e),this._multiDrawStarts=new Int32Array(e),this._multiDrawCount=0,this._multiDrawInstances=null,this._matricesTexture=null,this._indirectTexture=null,this._colorsTexture=null,this._initMatricesTexture(),this._initIndirectTexture()}_initMatricesTexture(){let e=Math.sqrt(4*this._maxInstanceCount),t=new nn(new Float32Array((e=Math.max(e=4*Math.ceil(e/4),4))*e*4),e,e,1023,1015);this._matricesTexture=t}_initIndirectTexture(){let e=Math.sqrt(this._maxInstanceCount),t=new nn(new Uint32Array((e=Math.ceil(e))*e),e,e,1029,1014);this._indirectTexture=t}_initColorsTexture(){let e=Math.sqrt(this._maxInstanceCount),t=new nn(new Float32Array((e=Math.ceil(e))*e*4).fill(1),e,e,1023,1015);t.colorSpace=eu.workingColorSpace,this._colorsTexture=t}_initializeGeometry(e){let t=this.geometry,i=this._maxVertexCount,n=this._maxIndexCount;if(!1===this._geometryInitialized){for(let n in e.attributes){let{array:r,itemSize:a,normalized:s}=e.getAttribute(n),o=new tq(new r.constructor(i*a),a,s);t.setAttribute(n,o)}if(null!==e.getIndex()){let e=i>65535?new Uint32Array(n):new Uint16Array(n);t.setIndex(new tq(e,1))}this._geometryInitialized=!0}}_validateGeometry(e){let t=this.geometry;if(!!e.getIndex()!=!!t.getIndex())throw Error('THREE.BatchedMesh: All geometries must consistently have "index".');for(let i in t.attributes){if(!e.hasAttribute(i))throw Error(`THREE.BatchedMesh: Added geometry missing "${i}". All geometries must have consistent attributes.`);let n=e.getAttribute(i),r=t.getAttribute(i);if(n.itemSize!==r.itemSize||n.normalized!==r.normalized)throw Error("THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}validateInstanceId(e){let t=this._instanceInfo;if(e<0||e>=t.length||!1===t[e].active)throw Error(`THREE.BatchedMesh: Invalid instanceId ${e}. Instance is either out of range or has been deleted.`)}validateGeometryId(e){let t=this._geometryInfo;if(e<0||e>=t.length||!1===t[e].active)throw Error(`THREE.BatchedMesh: Invalid geometryId ${e}. Geometry is either out of range or has been deleted.`)}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new eR);let e=this.boundingBox,t=this._instanceInfo;e.makeEmpty();for(let i=0,n=t.length;i<n;i++){if(!1===t[i].active)continue;let n=t[i].geometryIndex;this.getMatrixAt(i,nE),this.getBoundingBoxAt(n,nR).applyMatrix4(nE),e.union(nR)}}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new eY);let e=this.boundingSphere,t=this._instanceInfo;e.makeEmpty();for(let i=0,n=t.length;i<n;i++){if(!1===t[i].active)continue;let n=t[i].geometryIndex;this.getMatrixAt(i,nE),this.getBoundingSphereAt(n,nP).applyMatrix4(nE),e.union(nP)}}addInstance(e){if(this._instanceInfo.length>=this.maxInstanceCount&&0===this._availableInstanceIds.length)throw Error("THREE.BatchedMesh: Maximum item count reached.");let t={visible:!0,active:!0,geometryIndex:e},i=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(nb),i=this._availableInstanceIds.shift(),this._instanceInfo[i]=t):(i=this._instanceInfo.length,this._instanceInfo.push(t));let n=this._matricesTexture;nE.identity().toArray(n.image.data,16*i),n.needsUpdate=!0;let r=this._colorsTexture;return r&&(n_.toArray(r.image.data,4*i),r.needsUpdate=!0),this._visibilityChanged=!0,i}addGeometry(e,t=-1,i=-1){let n;this._initializeGeometry(e),this._validateGeometry(e);let r={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},a=this._geometryInfo;r.vertexStart=this._nextVertexStart,r.reservedVertexCount=-1===t?e.getAttribute("position").count:t;let s=e.getIndex();if(null!==s&&(r.indexStart=this._nextIndexStart,r.reservedIndexCount=-1===i?s.count:i),-1!==r.indexStart&&r.indexStart+r.reservedIndexCount>this._maxIndexCount||r.vertexStart+r.reservedVertexCount>this._maxVertexCount)throw Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.");return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(nb),a[n=this._availableGeometryIds.shift()]=r):(n=this._geometryCount,this._geometryCount++,a.push(r)),this.setGeometryAt(n,e),this._nextIndexStart=r.indexStart+r.reservedIndexCount,this._nextVertexStart=r.vertexStart+r.reservedVertexCount,n}setGeometryAt(e,t){if(e>=this._geometryCount)throw Error("THREE.BatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);let i=this.geometry,n=null!==i.getIndex(),r=i.getIndex(),a=t.getIndex(),s=this._geometryInfo[e];if(n&&a.count>s.reservedIndexCount||t.attributes.position.count>s.reservedVertexCount)throw Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.");let o=s.vertexStart,l=s.reservedVertexCount;for(let e in s.vertexCount=t.getAttribute("position").count,i.attributes){let n=t.getAttribute(e),r=i.getAttribute(e);!function(e,t,i=0){let n=t.itemSize;if(e.isInterleavedBufferAttribute||e.array.constructor!==t.array.constructor){let r=e.count;for(let a=0;a<r;a++)for(let r=0;r<n;r++)t.setComponent(a+i,r,e.getComponent(a,r))}else t.array.set(e.array,i*n);t.needsUpdate=!0}(n,r,o);let a=n.itemSize;for(let e=n.count;e<l;e++){let t=o+e;for(let e=0;e<a;e++)r.setComponent(t,e,0)}r.needsUpdate=!0,r.addUpdateRange(o*a,l*a)}if(n){let e=s.indexStart,i=s.reservedIndexCount;s.indexCount=t.getIndex().count;for(let t=0;t<a.count;t++)r.setX(e+t,o+a.getX(t));for(let t=a.count;t<i;t++)r.setX(e+t,o);r.needsUpdate=!0,r.addUpdateRange(e,s.reservedIndexCount)}return s.start=n?s.indexStart:s.vertexStart,s.count=n?s.indexCount:s.vertexCount,s.boundingBox=null,null!==t.boundingBox&&(s.boundingBox=t.boundingBox.clone()),s.boundingSphere=null,null!==t.boundingSphere&&(s.boundingSphere=t.boundingSphere.clone()),this._visibilityChanged=!0,e}deleteGeometry(e){let t=this._geometryInfo;if(e>=t.length||!1===t[e].active)return this;let i=this._instanceInfo;for(let t=0,n=i.length;t<n;t++)i[t].geometryIndex===e&&this.deleteInstance(t);return t[e].active=!1,this._availableGeometryIds.push(e),this._visibilityChanged=!0,this}deleteInstance(e){return this.validateInstanceId(e),this._instanceInfo[e].active=!1,this._availableInstanceIds.push(e),this._visibilityChanged=!0,this}optimize(){let e=0,t=0,i=this._geometryInfo,n=i.map((e,t)=>t).sort((e,t)=>i[e].vertexStart-i[t].vertexStart),r=this.geometry;for(let a=0,s=i.length;a<s;a++){let s=i[n[a]];if(!1!==s.active){if(null!==r.index){if(s.indexStart!==t){let{indexStart:i,vertexStart:n,reservedIndexCount:a}=s,o=r.index,l=o.array,u=e-n;for(let e=i;e<i+a;e++)l[e]=l[e]+u;o.array.copyWithin(t,i,i+a),o.addUpdateRange(t,a),s.indexStart=t}t+=s.reservedIndexCount}if(s.vertexStart!==e){let{vertexStart:t,reservedVertexCount:i}=s,n=r.attributes;for(let r in n){let a=n[r],{array:s,itemSize:o}=a;s.copyWithin(e*o,t*o,(t+i)*o),a.addUpdateRange(e*o,i*o)}s.vertexStart=e}e+=s.reservedVertexCount,s.start=r.index?s.indexStart:s.vertexStart,this._nextIndexStart=r.index?s.indexStart+s.reservedIndexCount:0,this._nextVertexStart=s.vertexStart+s.reservedVertexCount}}return this}getBoundingBoxAt(e,t){if(e>=this._geometryCount)return null;let i=this.geometry,n=this._geometryInfo[e];if(null===n.boundingBox){let e=new eR,t=i.index,r=i.attributes.position;for(let i=n.start,a=n.start+n.count;i<a;i++){let n=i;t&&(n=t.getX(n)),e.expandByPoint(nD.fromBufferAttribute(r,n))}n.boundingBox=e}return t.copy(n.boundingBox),t}getBoundingSphereAt(e,t){if(e>=this._geometryCount)return null;let i=this.geometry,n=this._geometryInfo[e];if(null===n.boundingSphere){let t=new eY;this.getBoundingBoxAt(e,nR),nR.getCenter(t.center);let r=i.index,a=i.attributes.position,s=0;for(let e=n.start,i=n.start+n.count;e<i;e++){let i=e;r&&(i=r.getX(i)),nD.fromBufferAttribute(a,i),s=Math.max(s,t.center.distanceToSquared(nD))}t.radius=Math.sqrt(s),n.boundingSphere=t}return t.copy(n.boundingSphere),t}setMatrixAt(e,t){this.validateInstanceId(e);let i=this._matricesTexture,n=this._matricesTexture.image.data;return t.toArray(n,16*e),i.needsUpdate=!0,this}getMatrixAt(e,t){return this.validateInstanceId(e),t.fromArray(this._matricesTexture.image.data,16*e)}setColorAt(e,t){return this.validateInstanceId(e),null===this._colorsTexture&&this._initColorsTexture(),t.toArray(this._colorsTexture.image.data,4*e),this._colorsTexture.needsUpdate=!0,this}getColorAt(e,t){return this.validateInstanceId(e),t.fromArray(this._colorsTexture.image.data,4*e)}setVisibleAt(e,t){return this.validateInstanceId(e),this._instanceInfo[e].visible===t||(this._instanceInfo[e].visible=t,this._visibilityChanged=!0),this}getVisibleAt(e){return this.validateInstanceId(e),this._instanceInfo[e].visible}setGeometryIdAt(e,t){return this.validateInstanceId(e),this.validateGeometryId(t),this._instanceInfo[e].geometryIndex=t,this}getGeometryIdAt(e){return this.validateInstanceId(e),this._instanceInfo[e].geometryIndex}getGeometryRangeAt(e,t={}){this.validateGeometryId(e);let i=this._geometryInfo[e];return t.vertexStart=i.vertexStart,t.vertexCount=i.vertexCount,t.reservedVertexCount=i.reservedVertexCount,t.indexStart=i.indexStart,t.indexCount=i.indexCount,t.reservedIndexCount=i.reservedIndexCount,t.start=i.start,t.count=i.count,t}setInstanceCount(e){let t=this._availableInstanceIds,i=this._instanceInfo;for(t.sort(nb);t[t.length-1]===i.length;)i.pop(),t.pop();if(e<i.length)throw Error(`BatchedMesh: Instance ids outside the range ${e} are being used. Cannot shrink instance count.`);let n=new Int32Array(e),r=new Int32Array(e);nF(this._multiDrawCounts,n),nF(this._multiDrawStarts,r),this._multiDrawCounts=n,this._multiDrawStarts=r,this._maxInstanceCount=e;let a=this._indirectTexture,s=this._matricesTexture,o=this._colorsTexture;a.dispose(),this._initIndirectTexture(),nF(a.image.data,this._indirectTexture.image.data),s.dispose(),this._initMatricesTexture(),nF(s.image.data,this._matricesTexture.image.data),o&&(o.dispose(),this._initColorsTexture(),nF(o.image.data,this._colorsTexture.image.data))}setGeometrySize(e,t){let i=[...this._geometryInfo].filter(e=>e.active);if(Math.max(...i.map(e=>e.vertexStart+e.reservedVertexCount))>e)throw Error(`BatchedMesh: Geometry vertex values are being used outside the range ${t}. Cannot shrink further.`);if(this.geometry.index&&Math.max(...i.map(e=>e.indexStart+e.reservedIndexCount))>t)throw Error(`BatchedMesh: Geometry index values are being used outside the range ${t}. Cannot shrink further.`);let n=this.geometry;n.dispose(),this._maxVertexCount=e,this._maxIndexCount=t,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new ii,this._initializeGeometry(n));let r=this.geometry;for(let e in n.index&&nF(n.index.array,r.index.array),n.attributes)nF(n.attributes[e].array,r.attributes[e].array)}raycast(e,t){let i=this._instanceInfo,n=this._geometryInfo,r=this.matrixWorld,a=this.geometry;nU.material=this.material,nU.geometry.index=a.index,nU.geometry.attributes=a.attributes,null===nU.geometry.boundingBox&&(nU.geometry.boundingBox=new eR),null===nU.geometry.boundingSphere&&(nU.geometry.boundingSphere=new eY);for(let a=0,s=i.length;a<s;a++){if(!i[a].visible||!i[a].active)continue;let s=i[a].geometryIndex,o=n[s];nU.geometry.setDrawRange(o.start,o.count),this.getMatrixAt(a,nU.matrixWorld).premultiply(r),this.getBoundingBoxAt(s,nU.geometry.boundingBox),this.getBoundingSphereAt(s,nU.geometry.boundingSphere),nU.raycast(e,nN);for(let e=0,i=nN.length;e<i;e++){let i=nN[e];i.object=this,i.batchId=a,t.push(i)}nN.length=0}nU.material=null,nU.geometry.index=null,nU.geometry.attributes={},nU.geometry.setDrawRange(0,1/0)}copy(e){return super.copy(e),this.geometry=e.geometry.clone(),this.perObjectFrustumCulled=e.perObjectFrustumCulled,this.sortObjects=e.sortObjects,this.boundingBox=null!==e.boundingBox?e.boundingBox.clone():null,this.boundingSphere=null!==e.boundingSphere?e.boundingSphere.clone():null,this._geometryInfo=e._geometryInfo.map(e=>({...e,boundingBox:null!==e.boundingBox?e.boundingBox.clone():null,boundingSphere:null!==e.boundingSphere?e.boundingSphere.clone():null})),this._instanceInfo=e._instanceInfo.map(e=>({...e})),this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._geometryCount=e._geometryCount,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),null!==this._colorsTexture&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,null!==this._colorsTexture&&(this._colorsTexture.dispose(),this._colorsTexture=null),this}onBeforeRender(e,t,i,n,r){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;let a=n.getIndex(),s=null===a?1:a.array.BYTES_PER_ELEMENT,o=this._instanceInfo,l=this._multiDrawStarts,u=this._multiDrawCounts,c=this._geometryInfo,h=this.perObjectFrustumCulled,d=this._indirectTexture,f=d.image.data;h&&(nE.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse).multiply(this.matrixWorld),nC.setFromProjectionMatrix(nE,e.coordinateSystem));let p=0;if(this.sortObjects){nE.copy(this.matrixWorld).invert(),nD.setFromMatrixPosition(i.matrixWorld).applyMatrix4(nE),nI.set(0,0,-1).transformDirection(i.matrixWorld).transformDirection(nE);for(let e=0,t=o.length;e<t;e++)if(o[e].visible&&o[e].active){let t=o[e].geometryIndex;this.getMatrixAt(e,nE),this.getBoundingSphereAt(t,nP).applyMatrix4(nE);let i=!1;if(h&&(i=!nC.intersectsSphere(nP)),!i){let i=c[t],n=nL.subVectors(nP.center,nD).dot(nI);nB.push(i.start,i.count,n,e)}}let e=nB.list,t=this.customSort;null===t?e.sort(r.transparent?nT:nw):t.call(this,e,i);for(let t=0,i=e.length;t<i;t++){let i=e[t];l[p]=i.start*s,u[p]=i.count,f[p]=i.index,p++}nB.reset()}else for(let e=0,t=o.length;e<t;e++)if(o[e].visible&&o[e].active){let t=o[e].geometryIndex,i=!1;if(h&&(this.getMatrixAt(e,nE),this.getBoundingSphereAt(t,nP).applyMatrix4(nE),i=!nC.intersectsSphere(nP)),!i){let i=c[t];l[p]=i.start*s,u[p]=i.count,f[p]=e,p++}}d.needsUpdate=!0,this._multiDrawCount=p,this._visibilityChanged=!1}onBeforeShadow(e,t,i,n,r,a){this.onBeforeRender(e,null,n,r,a)}}class nz extends tH{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new tO(0xffffff),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}let nk=new eE,nH=new eE,nG=new e2,nV=new e1,nW=new eY,nj=new eE,nX=new eE;class nY extends ty{constructor(e=new ii,t=new nz){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){let e=this.geometry;if(null===e.index){let t=e.attributes.position,i=[0];for(let e=1,n=t.count;e<n;e++)nk.fromBufferAttribute(t,e-1),nH.fromBufferAttribute(t,e),i[e]=i[e-1],i[e]+=nk.distanceTo(nH);e.setAttribute("lineDistance",new t4(i,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){let i=this.geometry,n=this.matrixWorld,r=e.params.Line.threshold,a=i.drawRange;if(null===i.boundingSphere&&i.computeBoundingSphere(),nW.copy(i.boundingSphere),nW.applyMatrix4(n),nW.radius+=r,!1===e.ray.intersectsSphere(nW))return;nG.copy(n).invert(),nV.copy(e.ray).applyMatrix4(nG);let s=r/((this.scale.x+this.scale.y+this.scale.z)/3),o=s*s,l=this.isLineSegments?2:1,u=i.index,c=i.attributes.position;if(null!==u){let i=Math.max(0,a.start),n=Math.min(u.count,a.start+a.count);for(let r=i,a=n-1;r<a;r+=l){let i=nQ(this,e,nV,o,u.getX(r),u.getX(r+1));i&&t.push(i)}if(this.isLineLoop){let r=nQ(this,e,nV,o,u.getX(n-1),u.getX(i));r&&t.push(r)}}else{let i=Math.max(0,a.start),n=Math.min(c.count,a.start+a.count);for(let r=i,a=n-1;r<a;r+=l){let i=nQ(this,e,nV,o,r,r+1);i&&t.push(i)}if(this.isLineLoop){let r=nQ(this,e,nV,o,n-1,i);r&&t.push(r)}}}updateMorphTargets(){let e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){let i=e[t[0]];if(void 0!==i){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=i.length;e<t;e++){let t=i[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}}function nQ(e,t,i,n,r,a){let s=e.geometry.attributes.position;if(nk.fromBufferAttribute(s,r),nH.fromBufferAttribute(s,a),i.distanceSqToSegment(nk,nH,nj,nX)>n)return;nj.applyMatrix4(e.matrixWorld);let o=t.ray.origin.distanceTo(nj);if(!(o<t.near)&&!(o>t.far))return{distance:o,point:nX.clone().applyMatrix4(e.matrixWorld),index:r,face:null,faceIndex:null,barycoord:null,object:e}}let nq=new eE,nK=new eE;class nZ extends nY{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){let e=this.geometry;if(null===e.index){let t=e.attributes.position,i=[];for(let e=0,n=t.count;e<n;e+=2)nq.fromBufferAttribute(t,e),nK.fromBufferAttribute(t,e+1),i[e]=0===e?0:i[e-1],i[e+1]=i[e]+nq.distanceTo(nK);e.setAttribute("lineDistance",new t4(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class nJ extends nY{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}}class n$ extends tH{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new tO(0xffffff),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}let n0=new e2,n1=new e1,n2=new eY,n3=new eE;class n4 extends ty{constructor(e=new ii,t=new n$){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,t){let i=this.geometry,n=this.matrixWorld,r=e.params.Points.threshold,a=i.drawRange;if(null===i.boundingSphere&&i.computeBoundingSphere(),n2.copy(i.boundingSphere),n2.applyMatrix4(n),n2.radius+=r,!1===e.ray.intersectsSphere(n2))return;n0.copy(n).invert(),n1.copy(e.ray).applyMatrix4(n0);let s=r/((this.scale.x+this.scale.y+this.scale.z)/3),o=s*s,l=i.index,u=i.attributes.position;if(null!==l){let i=Math.max(0,a.start),r=Math.min(l.count,a.start+a.count);for(let a=i;a<r;a++){let i=l.getX(a);n3.fromBufferAttribute(u,i),n5(n3,i,o,n,e,t,this)}}else{let i=Math.max(0,a.start),r=Math.min(u.count,a.start+a.count);for(let a=i;a<r;a++)n3.fromBufferAttribute(u,a),n5(n3,a,o,n,e,t,this)}}updateMorphTargets(){let e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){let i=e[t[0]];if(void 0!==i){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=i.length;e<t;e++){let t=i[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}}function n5(e,t,i,n,r,a,s){let o=n1.distanceSqToPoint(e);if(o<i){let i=new eE;n1.closestPointToPoint(e,i),i.applyMatrix4(n);let l=r.ray.origin.distanceTo(i);if(l<r.near||l>r.far)return;a.push({distance:l,distanceToRay:Math.sqrt(o),point:i,index:t,face:null,faceIndex:null,barycoord:null,object:s})}}class n6 extends ty{constructor(){super(),this.isGroup=!0,this.type="Group"}}class n8 extends ev{constructor(e,t,i,n,r,a,s,o,l){super(e,t,i,n,r,a,s,o,l),this.isVideoTexture=!0,this.minFilter=void 0!==a?a:1006,this.magFilter=void 0!==r?r:1006,this.generateMipmaps=!1;const u=this;"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(function t(){u.needsUpdate=!0,e.requestVideoFrameCallback(t)})}clone(){return new this.constructor(this.image).copy(this)}update(){let e=this.image;!1=="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class n9 extends ev{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=1003,this.minFilter=1003,this.generateMipmaps=!1,this.needsUpdate=!0}}class n7 extends ev{constructor(e,t,i,n,r,a,s,o,l,u,c,h){super(null,a,s,o,l,u,n,r,c,h),this.isCompressedTexture=!0,this.image={width:t,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class re extends n7{constructor(e,t,i,n,r,a){super(e,t,i,r,a),this.isCompressedArrayTexture=!0,this.image.depth=n,this.wrapR=1001,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class rt extends n7{constructor(e,t,i){super(void 0,e[0].width,e[0].height,t,i,301),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class ri extends ev{constructor(e,t,i,n,r,a,s,o,l){super(e,t,i,n,r,a,s,o,l),this.isCanvasTexture=!0,this.needsUpdate=!0}}class rn extends ev{constructor(e,t,i,n,r,a,s,o,l,u=1026){if(1026!==u&&1027!==u)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===i&&1026===u&&(i=1014),void 0===i&&1027===u&&(i=1020),super(null,n,r,a,s,o,u,i,l),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=void 0!==s?s:1003,this.minFilter=void 0!==o?o:1003,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){let t=super.toJSON(e);return null!==this.compareFunction&&(t.compareFunction=this.compareFunction),t}}class rr{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){let i=this.getUtoTmapping(e);return this.getPoint(i,t)}getPoints(e=5){let t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return t}getSpacedPoints(e=5){let t=[];for(let i=0;i<=e;i++)t.push(this.getPointAt(i/e));return t}getLength(){let e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;let t=[],i,n=this.getPoint(0),r=0;t.push(0);for(let a=1;a<=e;a++)t.push(r+=(i=this.getPoint(a/e)).distanceTo(n)),n=i;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){let i,n=this.getLengths(),r=0,a=n.length;i=t||e*n[a-1];let s=0,o=a-1,l;for(;s<=o;)if((l=n[r=Math.floor(s+(o-s)/2)]-i)<0)s=r+1;else if(l>0)o=r-1;else{o=r;break}if(n[r=o]===i)return r/(a-1);let u=n[r],c=n[r+1];return(r+(i-u)/(c-u))/(a-1)}getTangent(e,t){let i=e-1e-4,n=e+1e-4;i<0&&(i=0),n>1&&(n=1);let r=this.getPoint(i),a=this.getPoint(n),s=t||(r.isVector2?new Q:new eE);return s.copy(a).sub(r).normalize(),s}getTangentAt(e,t){let i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t){let i=new eE,n=[],r=[],a=[],s=new eE,o=new e2;for(let t=0;t<=e;t++){let i=t/e;n[t]=this.getTangentAt(i,new eE)}r[0]=new eE,a[0]=new eE;let l=Number.MAX_VALUE,u=Math.abs(n[0].x),c=Math.abs(n[0].y),h=Math.abs(n[0].z);u<=l&&(l=u,i.set(1,0,0)),c<=l&&(l=c,i.set(0,1,0)),h<=l&&i.set(0,0,1),s.crossVectors(n[0],i).normalize(),r[0].crossVectors(n[0],s),a[0].crossVectors(n[0],r[0]);for(let t=1;t<=e;t++){if(r[t]=r[t-1].clone(),a[t]=a[t-1].clone(),s.crossVectors(n[t-1],n[t]),s.length()>Number.EPSILON){s.normalize();let e=Math.acos(G(n[t-1].dot(n[t]),-1,1));r[t].applyMatrix4(o.makeRotationAxis(s,e))}a[t].crossVectors(n[t],r[t])}if(!0===t){let t=Math.acos(G(r[0].dot(r[e]),-1,1));t/=e,n[0].dot(s.crossVectors(r[0],r[e]))>0&&(t=-t);for(let i=1;i<=e;i++)r[i].applyMatrix4(o.makeRotationAxis(n[i],t*i)),a[i].crossVectors(n[i],r[i])}return{tangents:n,normals:r,binormals:a}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){let e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class ra extends rr{constructor(e=0,t=0,i=1,n=1,r=0,a=2*Math.PI,s=!1,o=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=i,this.yRadius=n,this.aStartAngle=r,this.aEndAngle=a,this.aClockwise=s,this.aRotation=o}getPoint(e,t=new Q){let i=2*Math.PI,n=this.aEndAngle-this.aStartAngle,r=Math.abs(n)<Number.EPSILON;for(;n<0;)n+=i;for(;n>i;)n-=i;n<Number.EPSILON&&(n=r?0:i),!0!==this.aClockwise||r||(n===i?n=-i:n-=i);let a=this.aStartAngle+e*n,s=this.aX+this.xRadius*Math.cos(a),o=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){let e=Math.cos(this.aRotation),t=Math.sin(this.aRotation),i=s-this.aX,n=o-this.aY;s=i*e-n*t+this.aX,o=i*t+n*e+this.aY}return t.set(s,o)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){let e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}class rs extends ra{constructor(e,t,i,n,r,a){super(e,t,i,i,n,r,a),this.isArcCurve=!0,this.type="ArcCurve"}}function ro(){let e=0,t=0,i=0,n=0;function r(r,a,s,o){e=r,t=s,i=-3*r+3*a-2*s-o,n=2*r-2*a+s+o}return{initCatmullRom:function(e,t,i,n,a){r(t,i,a*(i-e),a*(n-t))},initNonuniformCatmullRom:function(e,t,i,n,a,s,o){let l=(t-e)/a-(i-e)/(a+s)+(i-t)/s,u=(i-t)/s-(n-t)/(s+o)+(n-i)/o;r(t,i,l*=s,u*=s)},calc:function(r){let a=r*r;return e+t*r+i*a+a*r*n}}}let rl=new eE,ru=new ro,rc=new ro,rh=new ro;class rd extends rr{constructor(e=[],t=!1,i="centripetal",n=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=i,this.tension=n}getPoint(e,t=new eE){let i,n,r=this.points,a=r.length,s=(a-!this.closed)*e,o=Math.floor(s),l=s-o;this.closed?o+=o>0?0:(Math.floor(Math.abs(o)/a)+1)*a:0===l&&o===a-1&&(o=a-2,l=1),this.closed||o>0?i=r[(o-1)%a]:(rl.subVectors(r[0],r[1]).add(r[0]),i=rl);let u=r[o%a],c=r[(o+1)%a];if(this.closed||o+2<a?n=r[(o+2)%a]:(rl.subVectors(r[a-1],r[a-2]).add(r[a-1]),n=rl),"centripetal"===this.curveType||"chordal"===this.curveType){let e="chordal"===this.curveType?.5:.25,t=Math.pow(i.distanceToSquared(u),e),r=Math.pow(u.distanceToSquared(c),e),a=Math.pow(c.distanceToSquared(n),e);r<1e-4&&(r=1),t<1e-4&&(t=r),a<1e-4&&(a=r),ru.initNonuniformCatmullRom(i.x,u.x,c.x,n.x,t,r,a),rc.initNonuniformCatmullRom(i.y,u.y,c.y,n.y,t,r,a),rh.initNonuniformCatmullRom(i.z,u.z,c.z,n.z,t,r,a)}else"catmullrom"===this.curveType&&(ru.initCatmullRom(i.x,u.x,c.x,n.x,this.tension),rc.initCatmullRom(i.y,u.y,c.y,n.y,this.tension),rh.initCatmullRom(i.z,u.z,c.z,n.z,this.tension));return t.set(ru.calc(l),rc.calc(l),rh.calc(l)),t}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t<i;t++){let i=e.points[t];this.points.push(i.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){let e=super.toJSON();e.points=[];for(let t=0,i=this.points.length;t<i;t++){let i=this.points[t];e.points.push(i.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,i=e.points.length;t<i;t++){let i=e.points[t];this.points.push(new eE().fromArray(i))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function rf(e,t,i,n,r){let a=(n-t)*.5,s=(r-i)*.5,o=e*e;return e*o*(2*i-2*n+a+s)+(-3*i+3*n-2*a-s)*o+a*e+i}function rp(e,t,i,n){let r;return(r=1-e)*r*t+2*(1-e)*e*i+e*e*n}function rm(e,t,i,n,r){let a,s;return(a=1-e)*a*a*t+3*(s=1-e)*s*e*i+3*(1-e)*e*e*n+e*e*e*r}class rg extends rr{constructor(e=new Q,t=new Q,i=new Q,n=new Q){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=i,this.v3=n}getPoint(e,t=new Q){let i=this.v0,n=this.v1,r=this.v2,a=this.v3;return t.set(rm(e,i.x,n.x,r.x,a.x),rm(e,i.y,n.y,r.y,a.y)),t}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){let e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class rv extends rr{constructor(e=new eE,t=new eE,i=new eE,n=new eE){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=i,this.v3=n}getPoint(e,t=new eE){let i=this.v0,n=this.v1,r=this.v2,a=this.v3;return t.set(rm(e,i.x,n.x,r.x,a.x),rm(e,i.y,n.y,r.y,a.y),rm(e,i.z,n.z,r.z,a.z)),t}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){let e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class rx extends rr{constructor(e=new Q,t=new Q){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new Q){return 1===e?t.copy(this.v2):(t.copy(this.v2).sub(this.v1),t.multiplyScalar(e).add(this.v1)),t}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new Q){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){let e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class ry extends rr{constructor(e=new eE,t=new eE){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}getPoint(e,t=new eE){return 1===e?t.copy(this.v2):(t.copy(this.v2).sub(this.v1),t.multiplyScalar(e).add(this.v1)),t}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new eE){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){let e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class rS extends rr{constructor(e=new Q,t=new Q,i=new Q){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=i}getPoint(e,t=new Q){let i=this.v0,n=this.v1,r=this.v2;return t.set(rp(e,i.x,n.x,r.x),rp(e,i.y,n.y,r.y)),t}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){let e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class rA extends rr{constructor(e=new eE,t=new eE,i=new eE){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=i}getPoint(e,t=new eE){let i=this.v0,n=this.v1,r=this.v2;return t.set(rp(e,i.x,n.x,r.x),rp(e,i.y,n.y,r.y),rp(e,i.z,n.z,r.z)),t}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){let e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class rM extends rr{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,t=new Q){let i=this.points,n=(i.length-1)*e,r=Math.floor(n),a=n-r,s=i[0===r?r:r-1],o=i[r],l=i[r>i.length-2?i.length-1:r+1],u=i[r>i.length-3?i.length-1:r+2];return t.set(rf(a,s.x,o.x,l.x,u.x),rf(a,s.y,o.y,l.y,u.y)),t}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t<i;t++){let i=e.points[t];this.points.push(i.clone())}return this}toJSON(){let e=super.toJSON();e.points=[];for(let t=0,i=this.points.length;t<i;t++){let i=this.points[t];e.points.push(i.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,i=e.points.length;t<i;t++){let i=e.points[t];this.points.push(new Q().fromArray(i))}return this}}var rb=Object.freeze({__proto__:null,ArcCurve:rs,CatmullRomCurve3:rd,CubicBezierCurve:rg,CubicBezierCurve3:rv,EllipseCurve:ra,LineCurve:rx,LineCurve3:ry,QuadraticBezierCurve:rS,QuadraticBezierCurve3:rA,SplineCurve:rM});class rw extends rr{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){let e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);if(!e.equals(t)){let i=!0===e.isVector2?"LineCurve":"LineCurve3";this.curves.push(new rb[i](t,e))}return this}getPoint(e,t){let i=e*this.getLength(),n=this.getCurveLengths(),r=0;for(;r<n.length;){if(n[r]>=i){let e=n[r]-i,a=this.curves[r],s=a.getLength(),o=0===s?0:1-e/s;return a.getPointAt(o,t)}r++}return null}getLength(){let e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;let e=[],t=0;for(let i=0,n=this.curves.length;i<n;i++)e.push(t+=this.curves[i].getLength());return this.cacheLengths=e,e}getSpacedPoints(e=40){let t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){let t,i=[];for(let n=0,r=this.curves;n<r.length;n++){let a=r[n],s=a.isEllipseCurve?2*e:a.isLineCurve||a.isLineCurve3?1:a.isSplineCurve?e*a.points.length:e,o=a.getPoints(s);for(let e=0;e<o.length;e++){let n=o[e];t&&t.equals(n)||(i.push(n),t=n)}}return this.autoClose&&i.length>1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i}copy(e){super.copy(e),this.curves=[];for(let t=0,i=e.curves.length;t<i;t++){let i=e.curves[t];this.curves.push(i.clone())}return this.autoClose=e.autoClose,this}toJSON(){let e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,i=this.curves.length;t<i;t++){let i=this.curves[t];e.curves.push(i.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,i=e.curves.length;t<i;t++){let i=e.curves[t];this.curves.push(new rb[i.type]().fromJSON(i))}return this}}class rT extends rw{constructor(e){super(),this.type="Path",this.currentPoint=new Q,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,i=e.length;t<i;t++)this.lineTo(e[t].x,e[t].y);return this}moveTo(e,t){return this.currentPoint.set(e,t),this}lineTo(e,t){let i=new rx(this.currentPoint.clone(),new Q(e,t));return this.curves.push(i),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,i,n){let r=new rS(this.currentPoint.clone(),new Q(e,t),new Q(i,n));return this.curves.push(r),this.currentPoint.set(i,n),this}bezierCurveTo(e,t,i,n,r,a){let s=new rg(this.currentPoint.clone(),new Q(e,t),new Q(i,n),new Q(r,a));return this.curves.push(s),this.currentPoint.set(r,a),this}splineThru(e){let t=new rM([this.currentPoint.clone()].concat(e));return this.curves.push(t),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,i,n,r,a){let s=this.currentPoint.x,o=this.currentPoint.y;return this.absarc(e+s,t+o,i,n,r,a),this}absarc(e,t,i,n,r,a){return this.absellipse(e,t,i,i,n,r,a),this}ellipse(e,t,i,n,r,a,s,o){let l=this.currentPoint.x,u=this.currentPoint.y;return this.absellipse(e+l,t+u,i,n,r,a,s,o),this}absellipse(e,t,i,n,r,a,s,o){let l=new ra(e,t,i,n,r,a,s,o);if(this.curves.length>0){let e=l.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(l);let u=l.getPoint(1);return this.currentPoint.copy(u),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){let e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class rE extends ii{constructor(e=[new Q(0,-.5),new Q(.5,0),new Q(0,.5)],t=12,i=0,n=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:i,phiLength:n},t=Math.floor(t),n=G(n,0,2*Math.PI);const r=[],a=[],s=[],o=[],l=[],u=1/t,c=new eE,h=new Q,d=new eE,f=new eE,p=new eE;let m=0,g=0;for(let t=0;t<=e.length-1;t++)switch(t){case 0:m=e[t+1].x-e[t].x,d.x=+(g=e[t+1].y-e[t].y),d.y=-m,d.z=0*g,p.copy(d),d.normalize(),o.push(d.x,d.y,d.z);break;case e.length-1:o.push(p.x,p.y,p.z);break;default:m=e[t+1].x-e[t].x,d.x=+(g=e[t+1].y-e[t].y),d.y=-m,d.z=0*g,f.copy(d),d.x+=p.x,d.y+=p.y,d.z+=p.z,d.normalize(),o.push(d.x,d.y,d.z),p.copy(f)}for(let r=0;r<=t;r++){const d=i+r*u*n,f=Math.sin(d),p=Math.cos(d);for(let i=0;i<=e.length-1;i++){c.x=e[i].x*f,c.y=e[i].y,c.z=e[i].x*p,a.push(c.x,c.y,c.z),h.x=r/t,h.y=i/(e.length-1),s.push(h.x,h.y);const n=o[3*i+0]*f,u=o[3*i+1],d=o[3*i+0]*p;l.push(n,u,d)}}for(let i=0;i<t;i++)for(let t=0;t<e.length-1;t++){const n=t+i*e.length,a=n+e.length,s=n+e.length+1,o=n+1;r.push(n,a,o),r.push(s,o,a)}this.setIndex(r),this.setAttribute("position",new t4(a,3)),this.setAttribute("uv",new t4(s,2)),this.setAttribute("normal",new t4(l,3))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new rE(e.points,e.segments,e.phiStart,e.phiLength)}}class r_ extends rE{constructor(e=1,t=1,i=4,n=8){const r=new rT;r.absarc(0,-t/2,e,1.5*Math.PI,0),r.absarc(0,t/2,e,0,.5*Math.PI),super(r.getPoints(i),n),this.type="CapsuleGeometry",this.parameters={radius:e,length:t,capSegments:i,radialSegments:n}}static fromJSON(e){return new r_(e.radius,e.length,e.capSegments,e.radialSegments)}}class rC extends ii{constructor(e=1,t=32,i=0,n=2*Math.PI){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:i,thetaLength:n},t=Math.max(3,t);const r=[],a=[],s=[],o=[],l=new eE,u=new Q;a.push(0,0,0),s.push(0,0,1),o.push(.5,.5);for(let r=0,c=3;r<=t;r++,c+=3){const h=i+r/t*n;l.x=e*Math.cos(h),l.y=e*Math.sin(h),a.push(l.x,l.y,l.z),s.push(0,0,1),u.x=(a[c]/e+1)/2,u.y=(a[c+1]/e+1)/2,o.push(u.x,u.y)}for(let e=1;e<=t;e++)r.push(e,e+1,0);this.setIndex(r),this.setAttribute("position",new t4(a,3)),this.setAttribute("normal",new t4(s,3)),this.setAttribute("uv",new t4(o,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new rC(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class rR extends ii{constructor(e=1,t=1,i=1,n=32,r=1,a=!1,s=0,o=2*Math.PI){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:i,radialSegments:n,heightSegments:r,openEnded:a,thetaStart:s,thetaLength:o};const l=this;n=Math.floor(n),r=Math.floor(r);const u=[],c=[],h=[],d=[];let f=0;const p=[],m=i/2;let g=0;function v(i){let r=f,a=new Q,p=new eE,v=0,x=!0===i?e:t,y=!0===i?1:-1;for(let e=1;e<=n;e++)c.push(0,m*y,0),h.push(0,y,0),d.push(.5,.5),f++;let S=f;for(let e=0;e<=n;e++){let t=e/n*o+s,i=Math.cos(t),r=Math.sin(t);p.x=x*r,p.y=m*y,p.z=x*i,c.push(p.x,p.y,p.z),h.push(0,y,0),a.x=.5*i+.5,a.y=.5*r*y+.5,d.push(a.x,a.y),f++}for(let e=0;e<n;e++){let t=r+e,n=S+e;!0===i?u.push(n,n+1,t):u.push(n+1,n,t),v+=3}l.addGroup(g,v,!0===i?1:2),g+=v}(function(){let a=new eE,v=new eE,x=0,y=(t-e)/i;for(let l=0;l<=r;l++){let u=[],g=l/r,x=g*(t-e)+e;for(let e=0;e<=n;e++){let t=e/n,r=t*o+s,l=Math.sin(r),p=Math.cos(r);v.x=x*l,v.y=-g*i+m,v.z=x*p,c.push(v.x,v.y,v.z),a.set(l,y,p).normalize(),h.push(a.x,a.y,a.z),d.push(t,1-g),u.push(f++)}p.push(u)}for(let i=0;i<n;i++)for(let n=0;n<r;n++){let a=p[n][i],s=p[n+1][i],o=p[n+1][i+1],l=p[n][i+1];(e>0||0!==n)&&(u.push(a,s,l),x+=3),(t>0||n!==r-1)&&(u.push(s,o,l),x+=3)}l.addGroup(g,x,0),g+=x})(),!1===a&&(e>0&&v(!0),t>0&&v(!1)),this.setIndex(u),this.setAttribute("position",new t4(c,3)),this.setAttribute("normal",new t4(h,3)),this.setAttribute("uv",new t4(d,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new rR(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class rP extends rR{constructor(e=1,t=1,i=32,n=1,r=!1,a=0,s=2*Math.PI){super(0,e,t,i,n,r,a,s),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:i,heightSegments:n,openEnded:r,thetaStart:a,thetaLength:s}}static fromJSON(e){return new rP(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class rD extends ii{constructor(e=[],t=[],i=1,n=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:i,detail:n};const r=[],a=[];function s(e){r.push(e.x,e.y,e.z)}function o(t,i){let n=3*t;i.x=e[n+0],i.y=e[n+1],i.z=e[n+2]}function l(e,t,i,n){n<0&&1===e.x&&(a[t]=e.x-1),0===i.x&&0===i.z&&(a[t]=n/2/Math.PI+.5)}function u(e){return Math.atan2(e.z,-e.x)}(function(e){let i=new eE,n=new eE,r=new eE;for(let a=0;a<t.length;a+=3)o(t[a+0],i),o(t[a+1],n),o(t[a+2],r),function(e,t,i,n){let r=n+1,a=[];for(let n=0;n<=r;n++){a[n]=[];let s=e.clone().lerp(i,n/r),o=t.clone().lerp(i,n/r),l=r-n;for(let e=0;e<=l;e++)0===e&&n===r?a[n][e]=s:a[n][e]=s.clone().lerp(o,e/l)}for(let e=0;e<r;e++)for(let t=0;t<2*(r-e)-1;t++){let i=Math.floor(t/2);t%2==0?(s(a[e][i+1]),s(a[e+1][i]),s(a[e][i])):(s(a[e][i+1]),s(a[e+1][i+1]),s(a[e+1][i]))}}(i,n,r,e)})(n),function(e){let t=new eE;for(let i=0;i<r.length;i+=3)t.x=r[i+0],t.y=r[i+1],t.z=r[i+2],t.normalize().multiplyScalar(e),r[i+0]=t.x,r[i+1]=t.y,r[i+2]=t.z}(i),function(){let e=new eE;for(let i=0;i<r.length;i+=3){var t;e.x=r[i+0],e.y=r[i+1],e.z=r[i+2];let n=u(e)/2/Math.PI+.5,s=Math.atan2(-(t=e).y,Math.sqrt(t.x*t.x+t.z*t.z))/Math.PI+.5;a.push(n,1-s)}(function(){let e=new eE,t=new eE,i=new eE,n=new eE,s=new Q,o=new Q,c=new Q;for(let h=0,d=0;h<r.length;h+=9,d+=6){e.set(r[h+0],r[h+1],r[h+2]),t.set(r[h+3],r[h+4],r[h+5]),i.set(r[h+6],r[h+7],r[h+8]),s.set(a[d+0],a[d+1]),o.set(a[d+2],a[d+3]),c.set(a[d+4],a[d+5]),n.copy(e).add(t).add(i).divideScalar(3);let f=u(n);l(s,d+0,e,f),l(o,d+2,t,f),l(c,d+4,i,f)}})(),function(){for(let e=0;e<a.length;e+=6){let t=a[e+0],i=a[e+2],n=a[e+4],r=Math.max(t,i,n),s=Math.min(t,i,n);r>.9&&s<.1&&(t<.2&&(a[e+0]+=1),i<.2&&(a[e+2]+=1),n<.2&&(a[e+4]+=1))}}()}(),this.setAttribute("position",new t4(r,3)),this.setAttribute("normal",new t4(r.slice(),3)),this.setAttribute("uv",new t4(a,2)),0===n?this.computeVertexNormals():this.normalizeNormals()}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new rD(e.vertices,e.indices,e.radius,e.details)}}class rI extends rD{constructor(e=1,t=0){const i=(1+Math.sqrt(5))/2,n=1/i;super([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-n,-i,0,-n,i,0,n,-i,0,n,i,-n,-i,0,-n,i,0,n,-i,0,n,i,0,-i,0,-n,i,0,-n,-i,0,n,i,0,n],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new rI(e.radius,e.detail)}}let rL=new eE,rB=new eE,rU=new eE,rN=new tL;class rF extends ii{constructor(e=null,t=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:t},null!==e){const i=Math.cos(z*t),n=e.getIndex(),r=e.getAttribute("position"),a=n?n.count:r.count,s=[0,0,0],o=["a","b","c"],l=[,,,],u={},c=[];for(let e=0;e<a;e+=3){n?(s[0]=n.getX(e),s[1]=n.getX(e+1),s[2]=n.getX(e+2)):(s[0]=e,s[1]=e+1,s[2]=e+2);const{a:t,b:a,c:h}=rN;if(t.fromBufferAttribute(r,s[0]),a.fromBufferAttribute(r,s[1]),h.fromBufferAttribute(r,s[2]),rN.getNormal(rU),l[0]=`${Math.round(1e4*t.x)},${Math.round(1e4*t.y)},${Math.round(1e4*t.z)}`,l[1]=`${Math.round(1e4*a.x)},${Math.round(1e4*a.y)},${Math.round(1e4*a.z)}`,l[2]=`${Math.round(1e4*h.x)},${Math.round(1e4*h.y)},${Math.round(1e4*h.z)}`,l[0]!==l[1]&&l[1]!==l[2]&&l[2]!==l[0])for(let e=0;e<3;e++){const t=(e+1)%3,n=l[e],r=l[t],a=rN[o[e]],h=rN[o[t]],d=`${n}_${r}`,f=`${r}_${n}`;f in u&&u[f]?(rU.dot(u[f].normal)<=i&&(c.push(a.x,a.y,a.z),c.push(h.x,h.y,h.z)),u[f]=null):d in u||(u[d]={index0:s[e],index1:s[t],normal:rU.clone()})}}for(const e in u)if(u[e]){const{index0:t,index1:i}=u[e];rL.fromBufferAttribute(r,t),rB.fromBufferAttribute(r,i),c.push(rL.x,rL.y,rL.z),c.push(rB.x,rB.y,rB.z)}this.setAttribute("position",new t4(c,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}class rO extends rT{constructor(e){super(e),this.uuid=H(),this.type="Shape",this.holes=[]}getPointsHoles(e){let t=[];for(let i=0,n=this.holes.length;i<n;i++)t[i]=this.holes[i].getPoints(e);return t}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let t=0,i=e.holes.length;t<i;t++){let i=e.holes[t];this.holes.push(i.clone())}return this}toJSON(){let e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,i=this.holes.length;t<i;t++){let i=this.holes[t];e.holes.push(i.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,i=e.holes.length;t<i;t++){let i=e.holes[t];this.holes.push(new rT().fromJSON(i))}return this}}let rz=function(e,t,i=2){let n,r,a,s,o,l,u,c=t&&t.length,h=c?t[0]*i:e.length,d=rk(e,0,h,i,!0),f=[];if(!d||d.next===d.prev)return f;if(c&&(d=function(e,t,i,n){let r,a,s,o,l,u=[];for(r=0,a=t.length;r<a;r++)s=t[r]*n,o=r<a-1?t[r+1]*n:e.length,(l=rk(e,s,o,n,!1))===l.next&&(l.steiner=!0),u.push(function(e){let t=e,i=e;do(t.x<i.x||t.x===i.x&&t.y<i.y)&&(i=t),t=t.next;while(t!==e)return i}(l));for(u.sort(rG),r=0;r<u.length;r++)i=function(e,t){let i=function(e,t){let i=t,n=-1/0,r,a=e.x,s=e.y;do{if(s<=i.y&&s>=i.next.y&&i.next.y!==i.y){let e=i.x+(s-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(e<=a&&e>n&&(n=e,r=i.x<i.next.x?i:i.next,e===a))return r}i=i.next}while(i!==t)if(!r)return null;let o=r,l=r.x,u=r.y,c=1/0,h;i=r;do{var d,f;a>=i.x&&i.x>=l&&a!==i.x&&rW(s<u?a:n,s,l,u,s<u?n:a,s,i.x,i.y)&&(h=Math.abs(s-i.y)/(a-i.x),rK(i,e)&&(h<c||h===c&&(i.x>r.x||i.x===r.x&&(d=r,f=i,0>rj(d.prev,d,f.prev)&&0>rj(f.next,d,d.next))))&&(r=i,c=h)),i=i.next}while(i!==o)return r}(e,t);if(!i)return t;let n=rZ(i,e);return rH(n,n.next),rH(i,i.next)}(u[r],i);return i}(e,t,d,i)),e.length>80*i){n=a=e[0],r=s=e[1];for(let t=i;t<h;t+=i)o=e[t],l=e[t+1],o<n&&(n=o),l<r&&(r=l),o>a&&(a=o),l>s&&(s=l);u=0!==(u=Math.max(a-n,s-r))?32767/u:0}return function e(t,i,n,r,a,s,o){if(!t)return;!o&&s&&function(e,t,i,n){let r=e;do 0===r.z&&(r.z=rV(r.x,r.y,t,i,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==e)r.prevZ.nextZ=null,r.prevZ=null,function(e){let t,i,n,r,a,s,o,l,u=1;do{for(i=e,e=null,a=null,s=0;i;){for(s++,n=i,o=0,t=0;t<u&&(o++,n=n.nextZ);t++);for(l=u;o>0||l>0&&n;)0!==o&&(0===l||!n||i.z<=n.z)?(r=i,i=i.nextZ,o--):(r=n,n=n.nextZ,l--),a?a.nextZ=r:e=r,r.prevZ=a,a=r;i=n}a.nextZ=null,u*=2}while(s>1)}(r)}(t,r,a,s);let l=t,u,c;for(;t.prev!==t.next;){if(u=t.prev,c=t.next,s?function(e,t,i,n){let r=e.prev,a=e.next;if(rj(r,e,a)>=0)return!1;let s=r.x,o=e.x,l=a.x,u=r.y,c=e.y,h=a.y,d=s<o?s<l?s:l:o<l?o:l,f=u<c?u<h?u:h:c<h?c:h,p=s>o?s>l?s:l:o>l?o:l,m=u>c?u>h?u:h:c>h?c:h,g=rV(d,f,t,i,n),v=rV(p,m,t,i,n),x=e.prevZ,y=e.nextZ;for(;x&&x.z>=g&&y&&y.z<=v;){if(x.x>=d&&x.x<=p&&x.y>=f&&x.y<=m&&x!==r&&x!==a&&rW(s,u,o,c,l,h,x.x,x.y)&&rj(x.prev,x,x.next)>=0||(x=x.prevZ,y.x>=d&&y.x<=p&&y.y>=f&&y.y<=m&&y!==r&&y!==a&&rW(s,u,o,c,l,h,y.x,y.y)&&rj(y.prev,y,y.next)>=0))return!1;y=y.nextZ}for(;x&&x.z>=g;){if(x.x>=d&&x.x<=p&&x.y>=f&&x.y<=m&&x!==r&&x!==a&&rW(s,u,o,c,l,h,x.x,x.y)&&rj(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;y&&y.z<=v;){if(y.x>=d&&y.x<=p&&y.y>=f&&y.y<=m&&y!==r&&y!==a&&rW(s,u,o,c,l,h,y.x,y.y)&&rj(y.prev,y,y.next)>=0)return!1;y=y.nextZ}return!0}(t,r,a,s):function(e){let t=e.prev,i=e.next;if(rj(t,e,i)>=0)return!1;let n=t.x,r=e.x,a=i.x,s=t.y,o=e.y,l=i.y,u=n<r?n<a?n:a:r<a?r:a,c=s<o?s<l?s:l:o<l?o:l,h=n>r?n>a?n:a:r>a?r:a,d=s>o?s>l?s:l:o>l?o:l,f=i.next;for(;f!==t;){if(f.x>=u&&f.x<=h&&f.y>=c&&f.y<=d&&rW(n,s,r,o,a,l,f.x,f.y)&&rj(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}(t)){i.push(u.i/n|0),i.push(t.i/n|0),i.push(c.i/n|0),r$(t),t=c.next,l=c.next;continue}if((t=c)===l){o?1===o?e(t=function(e,t,i){let n=e;do{let r=n.prev,a=n.next.next;!rX(r,a)&&rY(r,n,n.next,a)&&rK(r,a)&&rK(a,r)&&(t.push(r.i/i|0),t.push(n.i/i|0),t.push(a.i/i|0),r$(n),r$(n.next),n=e=a),n=n.next}while(n!==e)return rH(n)}(rH(t),i,n),i,n,r,a,s,2):2===o&&function(t,i,n,r,a,s){let o=t;do{let t=o.next.next;for(;t!==o.prev;){var l,u;if(o.i!==t.i&&(l=o,u=t,l.next.i!==u.i&&l.prev.i!==u.i&&!function(e,t){let i=e;do{if(i.i!==e.i&&i.next.i!==e.i&&i.i!==t.i&&i.next.i!==t.i&&rY(i,i.next,e,t))return!0;i=i.next}while(i!==e)return!1}(l,u)&&(rK(l,u)&&rK(u,l)&&function(e,t){let i=e,n=!1,r=(e.x+t.x)/2,a=(e.y+t.y)/2;do i.y>a!=i.next.y>a&&i.next.y!==i.y&&r<(i.next.x-i.x)*(a-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next;while(i!==e)return n}(l,u)&&(rj(l.prev,l,u.prev)||rj(l,u.prev,u))||rX(l,u)&&rj(l.prev,l,l.next)>0&&rj(u.prev,u,u.next)>0))){let l=rZ(o,t);o=rH(o,o.next),l=rH(l,l.next),e(o,i,n,r,a,s,0),e(l,i,n,r,a,s,0);return}t=t.next}o=o.next}while(o!==t)}(t,i,n,r,a,s):e(rH(t),i,n,r,a,s,1);break}}}(d,f,i,n,r,u,0),f};function rk(e,t,i,n,r){let a,s;if(r===function(e,t,i,n){let r=0;for(let a=t,s=i-n;a<i;a+=n)r+=(e[s]-e[a])*(e[a+1]+e[s+1]),s=a;return r}(e,t,i,n)>0)for(a=t;a<i;a+=n)s=rJ(a,e[a],e[a+1],s);else for(a=i-n;a>=t;a-=n)s=rJ(a,e[a],e[a+1],s);return s&&rX(s,s.next)&&(r$(s),s=s.next),s}function rH(e,t){if(!e)return e;t||(t=e);let i=e,n;do if(n=!1,!i.steiner&&(rX(i,i.next)||0===rj(i.prev,i,i.next))){if(r$(i),(i=t=i.prev)===i.next)break;n=!0}else i=i.next;while(n||i!==t)return t}function rG(e,t){return e.x-t.x}function rV(e,t,i,n,r){return(e=((e=((e=((e=((e=(e-i)*r|0)|e<<8)&0xff00ff)|e<<4)&0xf0f0f0f)|e<<2)&0x33333333)|e<<1)&0x55555555)|(t=((t=((t=((t=((t=(t-n)*r|0)|t<<8)&0xff00ff)|t<<4)&0xf0f0f0f)|t<<2)&0x33333333)|t<<1)&0x55555555)<<1}function rW(e,t,i,n,r,a,s,o){return(r-s)*(t-o)>=(e-s)*(a-o)&&(e-s)*(n-o)>=(i-s)*(t-o)&&(i-s)*(a-o)>=(r-s)*(n-o)}function rj(e,t,i){return(t.y-e.y)*(i.x-t.x)-(t.x-e.x)*(i.y-t.y)}function rX(e,t){return e.x===t.x&&e.y===t.y}function rY(e,t,i,n){let r=rq(rj(e,t,i)),a=rq(rj(e,t,n)),s=rq(rj(i,n,e)),o=rq(rj(i,n,t));return!!(r!==a&&s!==o||0===r&&rQ(e,i,t)||0===a&&rQ(e,n,t)||0===s&&rQ(i,e,n)||0===o&&rQ(i,t,n))}function rQ(e,t,i){return t.x<=Math.max(e.x,i.x)&&t.x>=Math.min(e.x,i.x)&&t.y<=Math.max(e.y,i.y)&&t.y>=Math.min(e.y,i.y)}function rq(e){return e>0?1:e<0?-1:0}function rK(e,t){return 0>rj(e.prev,e,e.next)?rj(e,t,e.next)>=0&&rj(e,e.prev,t)>=0:0>rj(e,t,e.prev)||0>rj(e,e.next,t)}function rZ(e,t){let i=new r0(e.i,e.x,e.y),n=new r0(t.i,t.x,t.y),r=e.next,a=t.prev;return e.next=t,t.prev=e,i.next=r,r.prev=i,n.next=i,i.prev=n,a.next=n,n.prev=a,n}function rJ(e,t,i,n){let r=new r0(e,t,i);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function r$(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function r0(e,t,i){this.i=e,this.x=t,this.y=i,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}class r1{static area(e){let t=e.length,i=0;for(let n=t-1,r=0;r<t;n=r++)i+=e[n].x*e[r].y-e[r].x*e[n].y;return .5*i}static isClockWise(e){return 0>r1.area(e)}static triangulateShape(e,t){let i=[],n=[],r=[];r2(e),r3(i,e);let a=e.length;t.forEach(r2);for(let e=0;e<t.length;e++)n.push(a),a+=t[e].length,r3(i,t[e]);let s=rz(i,n);for(let e=0;e<s.length;e+=3)r.push(s.slice(e,e+3));return r}}function r2(e){let t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function r3(e,t){for(let i=0;i<t.length;i++)e.push(t[i].x),e.push(t[i].y)}class r4 extends ii{constructor(e=new rO([new Q(.5,.5),new Q(-.5,.5),new Q(-.5,-.5),new Q(.5,-.5)]),t={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const i=this,n=[],r=[];for(let a=0,s=e.length;a<s;a++)!function(e){let a,s,o,l,u=[],c=void 0!==t.curveSegments?t.curveSegments:12,h=void 0!==t.steps?t.steps:1,d=void 0!==t.depth?t.depth:1,f=void 0===t.bevelEnabled||t.bevelEnabled,p=void 0!==t.bevelThickness?t.bevelThickness:.2,m=void 0!==t.bevelSize?t.bevelSize:p-.1,g=void 0!==t.bevelOffset?t.bevelOffset:0,v=void 0!==t.bevelSegments?t.bevelSegments:3,x=t.extrudePath,y=void 0!==t.UVGenerator?t.UVGenerator:r5,S,A=!1;x&&(S=x.getSpacedPoints(h),A=!0,f=!1,a=x.computeFrenetFrames(h,!1),s=new eE,o=new eE,l=new eE),f||(v=0,p=0,m=0,g=0);let M=e.extractPoints(c),b=M.shape,w=M.holes;if(!r1.isClockWise(b)){b=b.reverse();for(let e=0,t=w.length;e<t;e++){let t=w[e];r1.isClockWise(t)&&(w[e]=t.reverse())}}let T=r1.triangulateShape(b,w),E=b;for(let e=0,t=w.length;e<t;e++){let t=w[e];b=b.concat(t)}function _(e,t,i){return t||console.error("THREE.ExtrudeGeometry: vec does not exist"),e.clone().addScaledVector(t,i)}let C=b.length,R=T.length;function P(e,t,i){let n,r,a,s=e.x-t.x,o=e.y-t.y,l=i.x-e.x,u=i.y-e.y,c=s*s+o*o;if(Math.abs(s*u-o*l)>Number.EPSILON){let h=Math.sqrt(c),d=Math.sqrt(l*l+u*u),f=t.x-o/h,p=t.y+s/h,m=((i.x-u/d-f)*u-(i.y+l/d-p)*l)/(s*u-o*l),g=(n=f+s*m-e.x)*n+(r=p+o*m-e.y)*r;if(g<=2)return new Q(n,r);a=Math.sqrt(g/2)}else{let e=!1;s>Number.EPSILON?l>Number.EPSILON&&(e=!0):s<-Number.EPSILON?l<-Number.EPSILON&&(e=!0):Math.sign(o)===Math.sign(u)&&(e=!0),e?(n=-o,r=s,a=Math.sqrt(c)):(n=s,r=o,a=Math.sqrt(c/2))}return new Q(n/a,r/a)}let D=[];for(let e=0,t=E.length,i=t-1,n=e+1;e<t;e++,i++,n++)i===t&&(i=0),n===t&&(n=0),D[e]=P(E[e],E[i],E[n]);let I=[],L,B=D.concat();for(let e=0,t=w.length;e<t;e++){let t=w[e];L=[];for(let e=0,i=t.length,n=i-1,r=e+1;e<i;e++,n++,r++)n===i&&(n=0),r===i&&(r=0),L[e]=P(t[e],t[n],t[r]);I.push(L),B=B.concat(L)}for(let e=0;e<v;e++){let t=e/v,i=p*Math.cos(t*Math.PI/2),n=m*Math.sin(t*Math.PI/2)+g;for(let e=0,t=E.length;e<t;e++){let t=_(E[e],D[e],n);F(t.x,t.y,-i)}for(let e=0,t=w.length;e<t;e++){let t=w[e];L=I[e];for(let e=0,r=t.length;e<r;e++){let r=_(t[e],L[e],n);F(r.x,r.y,-i)}}}let U=m+g;for(let e=0;e<C;e++){let t=f?_(b[e],B[e],U):b[e];A?(o.copy(a.normals[0]).multiplyScalar(t.x),s.copy(a.binormals[0]).multiplyScalar(t.y),l.copy(S[0]).add(o).add(s),F(l.x,l.y,l.z)):F(t.x,t.y,0)}for(let e=1;e<=h;e++)for(let t=0;t<C;t++){let i=f?_(b[t],B[t],U):b[t];A?(o.copy(a.normals[e]).multiplyScalar(i.x),s.copy(a.binormals[e]).multiplyScalar(i.y),l.copy(S[e]).add(o).add(s),F(l.x,l.y,l.z)):F(i.x,i.y,d/h*e)}for(let e=v-1;e>=0;e--){let t=e/v,i=p*Math.cos(t*Math.PI/2),n=m*Math.sin(t*Math.PI/2)+g;for(let e=0,t=E.length;e<t;e++){let t=_(E[e],D[e],n);F(t.x,t.y,d+i)}for(let e=0,t=w.length;e<t;e++){let t=w[e];L=I[e];for(let e=0,r=t.length;e<r;e++){let r=_(t[e],L[e],n);A?F(r.x,r.y+S[h-1].y,S[h-1].x+i):F(r.x,r.y,d+i)}}}function N(e,t){let r=e.length;for(;--r>=0;){let a=r,s=r-1;s<0&&(s=e.length-1);for(let e=0,r=h+2*v;e<r;e++){let r=C*e,o=C*(e+1);!function(e,t,r,a){z(e),z(t),z(a),z(t),z(r),z(a);let s=n.length/3,o=y.generateSideWallUV(i,n,s-6,s-3,s-2,s-1);k(o[0]),k(o[1]),k(o[3]),k(o[1]),k(o[2]),k(o[3])}(t+a+r,t+s+r,t+s+o,t+a+o)}}}function F(e,t,i){u.push(e),u.push(t),u.push(i)}function O(e,t,r){z(e),z(t),z(r);let a=n.length/3,s=y.generateTopUV(i,n,a-3,a-2,a-1);k(s[0]),k(s[1]),k(s[2])}function z(e){n.push(u[3*e+0]),n.push(u[3*e+1]),n.push(u[3*e+2])}function k(e){r.push(e.x),r.push(e.y)}(function(){let e=n.length/3;if(f){let e=0*C;for(let t=0;t<R;t++){let i=T[t];O(i[2]+e,i[1]+e,i[0]+e)}e=C*(h+2*v);for(let t=0;t<R;t++){let i=T[t];O(i[0]+e,i[1]+e,i[2]+e)}}else{for(let e=0;e<R;e++){let t=T[e];O(t[2],t[1],t[0])}for(let e=0;e<R;e++){let t=T[e];O(t[0]+C*h,t[1]+C*h,t[2]+C*h)}}i.addGroup(e,n.length/3-e,0)})(),function(){let e=n.length/3,t=0;N(E,0),t+=E.length;for(let e=0,i=w.length;e<i;e++){let i=w[e];N(i,t),t+=i.length}i.addGroup(e,n.length/3-e,1)}()}(e[a]);this.setAttribute("position",new t4(n,3)),this.setAttribute("uv",new t4(r,2)),this.computeVertexNormals()}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){let e=super.toJSON();return function(e,t,i){if(i.shapes=[],Array.isArray(e))for(let t=0,n=e.length;t<n;t++){let n=e[t];i.shapes.push(n.uuid)}else i.shapes.push(e.uuid);return i.options=Object.assign({},t),void 0!==t.extrudePath&&(i.options.extrudePath=t.extrudePath.toJSON()),i}(this.parameters.shapes,this.parameters.options,e)}static fromJSON(e,t){let i=[];for(let n=0,r=e.shapes.length;n<r;n++){let r=t[e.shapes[n]];i.push(r)}let n=e.options.extrudePath;return void 0!==n&&(e.options.extrudePath=new rb[n.type]().fromJSON(n)),new r4(i,e.options)}}let r5={generateTopUV:function(e,t,i,n,r){let a=t[3*i],s=t[3*i+1],o=t[3*n],l=t[3*n+1],u=t[3*r],c=t[3*r+1];return[new Q(a,s),new Q(o,l),new Q(u,c)]},generateSideWallUV:function(e,t,i,n,r,a){let s=t[3*i],o=t[3*i+1],l=t[3*i+2],u=t[3*n],c=t[3*n+1],h=t[3*n+2],d=t[3*r],f=t[3*r+1],p=t[3*r+2],m=t[3*a],g=t[3*a+1],v=t[3*a+2];return Math.abs(o-c)<Math.abs(s-u)?[new Q(s,1-l),new Q(u,1-h),new Q(d,1-p),new Q(m,1-v)]:[new Q(o,1-l),new Q(c,1-h),new Q(f,1-p),new Q(g,1-v)]}};class r6 extends rD{constructor(e=1,t=0){const i=(1+Math.sqrt(5))/2;super([-1,i,0,1,i,0,-1,-i,0,1,-i,0,0,-1,i,0,1,i,0,-1,-i,0,1,-i,i,0,-1,i,0,1,-i,0,-1,-i,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],e,t),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new r6(e.radius,e.detail)}}class r8 extends rD{constructor(e=1,t=0){super([1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],e,t),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new r8(e.radius,e.detail)}}class r9 extends ii{constructor(e=1,t=1,i=1,n=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:i,heightSegments:n};const r=e/2,a=t/2,s=Math.floor(i),o=Math.floor(n),l=s+1,u=o+1,c=e/s,h=t/o,d=[],f=[],p=[],m=[];for(let e=0;e<u;e++){const t=e*h-a;for(let i=0;i<l;i++){const n=i*c-r;f.push(n,-t,0),p.push(0,0,1),m.push(i/s),m.push(1-e/o)}}for(let e=0;e<o;e++)for(let t=0;t<s;t++){const i=t+l*e,n=t+l*(e+1),r=t+1+l*(e+1),a=t+1+l*e;d.push(i,n,a),d.push(n,r,a)}this.setIndex(d),this.setAttribute("position",new t4(f,3)),this.setAttribute("normal",new t4(p,3)),this.setAttribute("uv",new t4(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new r9(e.width,e.height,e.widthSegments,e.heightSegments)}}class r7 extends ii{constructor(e=.5,t=1,i=32,n=1,r=0,a=2*Math.PI){super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:i,phiSegments:n,thetaStart:r,thetaLength:a},i=Math.max(3,i);const s=[],o=[],l=[],u=[];let c=e;const h=(t-e)/(n=Math.max(1,n)),d=new eE,f=new Q;for(let e=0;e<=n;e++){for(let e=0;e<=i;e++){const n=r+e/i*a;d.x=c*Math.cos(n),d.y=c*Math.sin(n),o.push(d.x,d.y,d.z),l.push(0,0,1),f.x=(d.x/t+1)/2,f.y=(d.y/t+1)/2,u.push(f.x,f.y)}c+=h}for(let e=0;e<n;e++){const t=e*(i+1);for(let e=0;e<i;e++){const n=e+t,r=n+i+1,a=n+i+2,o=n+1;s.push(n,r,o),s.push(r,a,o)}}this.setIndex(s),this.setAttribute("position",new t4(o,3)),this.setAttribute("normal",new t4(l,3)),this.setAttribute("uv",new t4(u,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new r7(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class ae extends ii{constructor(e=new rO([new Q(0,.5),new Q(-.5,-.5),new Q(.5,-.5)]),t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const i=[],n=[],r=[],a=[];let s=0,o=0;if(!1===Array.isArray(e))l(e);else for(let t=0;t<e.length;t++)l(e[t]),this.addGroup(s,o,t),s+=o,o=0;function l(e){let s=n.length/3,l=e.extractPoints(t),u=l.shape,c=l.holes;!1===r1.isClockWise(u)&&(u=u.reverse());for(let e=0,t=c.length;e<t;e++){let t=c[e];!0===r1.isClockWise(t)&&(c[e]=t.reverse())}let h=r1.triangulateShape(u,c);for(let e=0,t=c.length;e<t;e++){let t=c[e];u=u.concat(t)}for(let e=0,t=u.length;e<t;e++){let t=u[e];n.push(t.x,t.y,0),r.push(0,0,1),a.push(t.x,t.y)}for(let e=0,t=h.length;e<t;e++){let t=h[e],n=t[0]+s,r=t[1]+s,a=t[2]+s;i.push(n,r,a),o+=3}}this.setIndex(i),this.setAttribute("position",new t4(n,3)),this.setAttribute("normal",new t4(r,3)),this.setAttribute("uv",new t4(a,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){let e=super.toJSON();return function(e,t){if(t.shapes=[],Array.isArray(e))for(let i=0,n=e.length;i<n;i++){let n=e[i];t.shapes.push(n.uuid)}else t.shapes.push(e.uuid);return t}(this.parameters.shapes,e)}static fromJSON(e,t){let i=[];for(let n=0,r=e.shapes.length;n<r;n++){let r=t[e.shapes[n]];i.push(r)}return new ae(i,e.curveSegments)}}class at extends ii{constructor(e=1,t=32,i=16,n=0,r=2*Math.PI,a=0,s=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:i,phiStart:n,phiLength:r,thetaStart:a,thetaLength:s},t=Math.max(3,Math.floor(t)),i=Math.max(2,Math.floor(i));const o=Math.min(a+s,Math.PI);let l=0;const u=[],c=new eE,h=new eE,d=[],f=[],p=[],m=[];for(let d=0;d<=i;d++){const g=[],v=d/i;let x=0;0===d&&0===a?x=.5/t:d===i&&o===Math.PI&&(x=-.5/t);for(let i=0;i<=t;i++){const o=i/t;c.x=-e*Math.cos(n+o*r)*Math.sin(a+v*s),c.y=e*Math.cos(a+v*s),c.z=e*Math.sin(n+o*r)*Math.sin(a+v*s),f.push(c.x,c.y,c.z),h.copy(c).normalize(),p.push(h.x,h.y,h.z),m.push(o+x,1-v),g.push(l++)}u.push(g)}for(let e=0;e<i;e++)for(let n=0;n<t;n++){const t=u[e][n+1],r=u[e][n],s=u[e+1][n],l=u[e+1][n+1];(0!==e||a>0)&&d.push(t,r,l),(e!==i-1||o<Math.PI)&&d.push(r,s,l)}this.setIndex(d),this.setAttribute("position",new t4(f,3)),this.setAttribute("normal",new t4(p,3)),this.setAttribute("uv",new t4(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new at(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class ai extends rD{constructor(e=1,t=0){super([1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],e,t),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new ai(e.radius,e.detail)}}class an extends ii{constructor(e=1,t=.4,i=12,n=48,r=2*Math.PI){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:i,tubularSegments:n,arc:r},i=Math.floor(i),n=Math.floor(n);const a=[],s=[],o=[],l=[],u=new eE,c=new eE,h=new eE;for(let a=0;a<=i;a++)for(let d=0;d<=n;d++){const f=d/n*r,p=a/i*Math.PI*2;c.x=(e+t*Math.cos(p))*Math.cos(f),c.y=(e+t*Math.cos(p))*Math.sin(f),c.z=t*Math.sin(p),s.push(c.x,c.y,c.z),u.x=e*Math.cos(f),u.y=e*Math.sin(f),h.subVectors(c,u).normalize(),o.push(h.x,h.y,h.z),l.push(d/n),l.push(a/i)}for(let e=1;e<=i;e++)for(let t=1;t<=n;t++){const i=(n+1)*e+t-1,r=(n+1)*(e-1)+t-1,s=(n+1)*(e-1)+t,o=(n+1)*e+t;a.push(i,r,o),a.push(r,s,o)}this.setIndex(a),this.setAttribute("position",new t4(s,3)),this.setAttribute("normal",new t4(o,3)),this.setAttribute("uv",new t4(l,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new an(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class ar extends ii{constructor(e=1,t=.4,i=64,n=8,r=2,a=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:i,radialSegments:n,p:r,q:a},i=Math.floor(i),n=Math.floor(n);const s=[],o=[],l=[],u=[],c=new eE,h=new eE,d=new eE,f=new eE,p=new eE,m=new eE,g=new eE;for(let s=0;s<=i;++s){const x=s/i*r*Math.PI*2;v(x,r,a,e,d),v(x+.01,r,a,e,f),m.subVectors(f,d),g.addVectors(f,d),p.crossVectors(m,g),g.crossVectors(p,m),p.normalize(),g.normalize();for(let e=0;e<=n;++e){const r=e/n*Math.PI*2,a=-t*Math.cos(r),f=t*Math.sin(r);c.x=d.x+(a*g.x+f*p.x),c.y=d.y+(a*g.y+f*p.y),c.z=d.z+(a*g.z+f*p.z),o.push(c.x,c.y,c.z),h.subVectors(c,d).normalize(),l.push(h.x,h.y,h.z),u.push(s/i),u.push(e/n)}}for(let e=1;e<=i;e++)for(let t=1;t<=n;t++){const i=(n+1)*(e-1)+(t-1),r=(n+1)*e+(t-1),a=(n+1)*e+t,o=(n+1)*(e-1)+t;s.push(i,r,o),s.push(r,a,o)}function v(e,t,i,n,r){let a=Math.cos(e),s=Math.sin(e),o=i/t*e,l=Math.cos(o);r.x=n*(2+l)*.5*a,r.y=n*(2+l)*s*.5,r.z=n*Math.sin(o)*.5}this.setIndex(s),this.setAttribute("position",new t4(o,3)),this.setAttribute("normal",new t4(l,3)),this.setAttribute("uv",new t4(u,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new ar(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}class aa extends ii{constructor(e=new rA(new eE(-1,-1,0),new eE(-1,1,0),new eE(1,1,0)),t=64,i=1,n=8,r=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:i,radialSegments:n,closed:r};const a=e.computeFrenetFrames(t,r);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals;const s=new eE,o=new eE,l=new Q;let u=new eE;const c=[],h=[],d=[],f=[];function p(r){u=e.getPointAt(r/t,u);let l=a.normals[r],d=a.binormals[r];for(let e=0;e<=n;e++){let t=e/n*Math.PI*2,r=Math.sin(t),a=-Math.cos(t);o.x=a*l.x+r*d.x,o.y=a*l.y+r*d.y,o.z=a*l.z+r*d.z,o.normalize(),h.push(o.x,o.y,o.z),s.x=u.x+i*o.x,s.y=u.y+i*o.y,s.z=u.z+i*o.z,c.push(s.x,s.y,s.z)}}(function(){for(let e=0;e<t;e++)p(e);p(!1===r?t:0),function(){for(let e=0;e<=t;e++)for(let i=0;i<=n;i++)l.x=e/t,l.y=i/n,d.push(l.x,l.y)}(),function(){for(let e=1;e<=t;e++)for(let t=1;t<=n;t++){let i=(n+1)*(e-1)+(t-1),r=(n+1)*e+(t-1),a=(n+1)*e+t,s=(n+1)*(e-1)+t;f.push(i,r,s),f.push(r,a,s)}}()})(),this.setIndex(f),this.setAttribute("position",new t4(c,3)),this.setAttribute("normal",new t4(h,3)),this.setAttribute("uv",new t4(d,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){let e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new aa(new rb[e.path.type]().fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class as extends ii{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},null!==e){const t=[],i=new Set,n=new eE,r=new eE;if(null!==e.index){const a=e.attributes.position,s=e.index;let o=e.groups;0===o.length&&(o=[{start:0,count:s.count,materialIndex:0}]);for(let e=0,l=o.length;e<l;++e){const l=o[e],u=l.start,c=l.count;for(let e=u,o=u+c;e<o;e+=3)for(let o=0;o<3;o++){const l=s.getX(e+o),u=s.getX(e+(o+1)%3);n.fromBufferAttribute(a,l),r.fromBufferAttribute(a,u),!0===ao(n,r,i)&&(t.push(n.x,n.y,n.z),t.push(r.x,r.y,r.z))}}}else{const a=e.attributes.position;for(let e=0,s=a.count/3;e<s;e++)for(let s=0;s<3;s++){const o=3*e+s,l=3*e+(s+1)%3;n.fromBufferAttribute(a,o),r.fromBufferAttribute(a,l),!0===ao(n,r,i)&&(t.push(n.x,n.y,n.z),t.push(r.x,r.y,r.z))}}this.setAttribute("position",new t4(t,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}function ao(e,t,i){let n=`${e.x},${e.y},${e.z}-${t.x},${t.y},${t.z}`,r=`${t.x},${t.y},${t.z}-${e.x},${e.y},${e.z}`;return!0!==i.has(n)&&!0!==i.has(r)&&(i.add(n),i.add(r),!0)}var al=Object.freeze({__proto__:null,BoxGeometry:ix,CapsuleGeometry:r_,CircleGeometry:rC,ConeGeometry:rP,CylinderGeometry:rR,DodecahedronGeometry:rI,EdgesGeometry:rF,ExtrudeGeometry:r4,IcosahedronGeometry:r6,LatheGeometry:rE,OctahedronGeometry:r8,PlaneGeometry:r9,PolyhedronGeometry:rD,RingGeometry:r7,ShapeGeometry:ae,SphereGeometry:at,TetrahedronGeometry:ai,TorusGeometry:an,TorusKnotGeometry:ar,TubeGeometry:aa,WireframeGeometry:as});class au extends tH{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new tO(0),this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.fog=e.fog,this}}class ac extends ib{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class ah extends tH{constructor(e){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new tO(0xffffff),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new tO(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Q(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new ti,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class ad extends ah{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Q(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return G(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(e){this.ior=(1+.4*e)/(1-.4*e)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new tO(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new tO(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new tO(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._dispersion=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class af extends tH{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new tO(0xffffff),this.specular=new tO(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new tO(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Q(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new ti,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class ap extends tH{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new tO(0xffffff),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new tO(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Q(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,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.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class am extends tH{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Q(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class ag extends tH{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new tO(0xffffff),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new tO(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Q(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new ti,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class av extends tH{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=3200,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class ax extends tH{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}class ay extends tH{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new tO(0xffffff),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new Q(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class aS extends nz{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function aA(e,t,i){return e&&(i||e.constructor!==t)?"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e):e}function aM(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function ab(e){let t=e.length,i=Array(t);for(let e=0;e!==t;++e)i[e]=e;return i.sort(function(t,i){return e[t]-e[i]}),i}function aw(e,t,i){let n=e.length,r=new e.constructor(n);for(let a=0,s=0;s!==n;++a){let n=i[a]*t;for(let i=0;i!==t;++i)r[s++]=e[n+i]}return r}function aT(e,t,i,n){let r=1,a=e[0];for(;void 0!==a&&void 0===a[n];)a=e[r++];if(void 0===a)return;let s=a[n];if(void 0!==s)if(Array.isArray(s))do void 0!==(s=a[n])&&(t.push(a.time),i.push.apply(i,s)),a=e[r++];while(void 0!==a)else if(void 0!==s.toArray)do void 0!==(s=a[n])&&(t.push(a.time),s.toArray(i,i.length)),a=e[r++];while(void 0!==a)else do void 0!==(s=a[n])&&(t.push(a.time),i.push(s)),a=e[r++];while(void 0!==a)}let aE={convertArray:aA,isTypedArray:aM,getKeyframeOrder:ab,sortedArray:aw,flattenJSON:aT,subclip:function(e,t,i,n,r=30){let a=e.clone();a.name=t;let s=[];for(let e=0;e<a.tracks.length;++e){let t=a.tracks[e],o=t.getValueSize(),l=[],u=[];for(let e=0;e<t.times.length;++e){let a=t.times[e]*r;if(!(a<i)&&!(a>=n)){l.push(t.times[e]);for(let i=0;i<o;++i)u.push(t.values[e*o+i])}}0!==l.length&&(t.times=aA(l,t.times.constructor),t.values=aA(u,t.values.constructor),s.push(t))}a.tracks=s;let o=1/0;for(let e=0;e<a.tracks.length;++e)o>a.tracks[e].times[0]&&(o=a.tracks[e].times[0]);for(let e=0;e<a.tracks.length;++e)a.tracks[e].shift(-1*o);return a.resetDuration(),a},makeClipAdditive:function(e,t=0,i=e,n=30){n<=0&&(n=30);let r=i.tracks.length,a=t/n;for(let t=0;t<r;++t){let n,r=i.tracks[t],s=r.ValueTypeName;if("bool"===s||"string"===s)continue;let o=e.tracks.find(function(e){return e.name===r.name&&e.ValueTypeName===s});if(void 0===o)continue;let l=0,u=r.getValueSize();r.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(l=u/3);let c=0,h=o.getValueSize();o.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(c=h/3);let d=r.times.length-1;if(a<=r.times[0]){let e=l,t=u-l;n=r.values.slice(e,t)}else if(a>=r.times[d]){let e=d*u+l,t=e+u-l;n=r.values.slice(e,t)}else{let e=r.createInterpolant(),t=l,i=u-l;e.evaluate(a),n=e.resultBuffer.slice(t,i)}"quaternion"===s&&new eT().fromArray(n).normalize().conjugate().toArray(n);let f=o.times.length;for(let e=0;e<f;++e){let t=e*h+c;if("quaternion"===s)eT.multiplyQuaternionsFlat(o.values,t,n,0,o.values,t);else{let e=h-2*c;for(let i=0;i<e;++i)o.values[t+i]-=n[i]}}}return e.blendMode=2501,e}};class a_{constructor(e,t,i,n){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==n?n:new t.constructor(i),this.sampleValues=t,this.valueSize=i,this.settings=null,this.DefaultSettings_={}}evaluate(e){let t=this.parameterPositions,i=this._cachedIndex,n=t[i],r=t[i-1];i:{n:{let a;r:{a:if(!(e<n)){for(let a=i+2;;){if(void 0===n){if(e<r)break a;return i=t.length,this._cachedIndex=i,this.copySampleValue_(i-1)}if(i===a)break;if(r=n,e<(n=t[++i]))break n}a=t.length;break r}if(!(e>=r)){let s=t[1];e<s&&(i=2,r=s);for(let a=i-2;;){if(void 0===r)return this._cachedIndex=0,this.copySampleValue_(0);if(i===a)break;if(n=r,e>=(r=t[--i-1]))break n}a=i,i=0;break r}break i}for(;i<a;){let n=i+a>>>1;e<t[n]?a=n:i=n+1}if(n=t[i],void 0===(r=t[i-1]))return this._cachedIndex=0,this.copySampleValue_(0);if(void 0===n)return i=t.length,this._cachedIndex=i,this.copySampleValue_(i-1)}this._cachedIndex=i,this.intervalChanged_(i,r,n)}return this.interpolate_(i,r,e,n)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){let t=this.resultBuffer,i=this.sampleValues,n=this.valueSize,r=e*n;for(let e=0;e!==n;++e)t[e]=i[r+e];return t}interpolate_(){throw Error("call to abstract method")}intervalChanged_(){}}class aC extends a_{constructor(e,t,i,n){super(e,t,i,n),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:2400,endingEnd:2400}}intervalChanged_(e,t,i){let n=this.parameterPositions,r=e-2,a=e+1,s=n[r],o=n[a];if(void 0===s)switch(this.getSettings_().endingStart){case 2401:r=e,s=2*t-i;break;case 2402:r=n.length-2,s=t+n[r]-n[r+1];break;default:r=e,s=i}if(void 0===o)switch(this.getSettings_().endingEnd){case 2401:a=e,o=2*i-t;break;case 2402:a=1,o=i+n[1]-n[0];break;default:a=e-1,o=t}let l=(i-t)*.5,u=this.valueSize;this._weightPrev=l/(t-s),this._weightNext=l/(o-i),this._offsetPrev=r*u,this._offsetNext=a*u}interpolate_(e,t,i,n){let r=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=e*s,l=o-s,u=this._offsetPrev,c=this._offsetNext,h=this._weightPrev,d=this._weightNext,f=(i-t)/(n-t),p=f*f,m=p*f,g=-h*m+2*h*p-h*f,v=(1+h)*m+(-1.5-2*h)*p+(-.5+h)*f+1,x=(-1-d)*m+(1.5+d)*p+.5*f,y=d*m-d*p;for(let e=0;e!==s;++e)r[e]=g*a[u+e]+v*a[l+e]+x*a[o+e]+y*a[c+e];return r}}class aR extends a_{constructor(e,t,i,n){super(e,t,i,n)}interpolate_(e,t,i,n){let r=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=e*s,l=o-s,u=(i-t)/(n-t),c=1-u;for(let e=0;e!==s;++e)r[e]=a[l+e]*c+a[o+e]*u;return r}}class aP extends a_{constructor(e,t,i,n){super(e,t,i,n)}interpolate_(e){return this.copySampleValue_(e-1)}}class aD{constructor(e,t,i,n){if(void 0===e)throw Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=aA(t,this.TimeBufferType),this.values=aA(i,this.ValueBufferType),this.setInterpolation(n||this.DefaultInterpolation)}static toJSON(e){let t,i=e.constructor;if(i.toJSON!==this.toJSON)t=i.toJSON(e);else{t={name:e.name,times:aA(e.times,Array),values:aA(e.values,Array)};let i=e.getInterpolation();i!==e.DefaultInterpolation&&(t.interpolation=i)}return t.type=e.ValueTypeName,t}InterpolantFactoryMethodDiscrete(e){return new aP(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new aR(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new aC(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case 2300:t=this.InterpolantFactoryMethodDiscrete;break;case 2301:t=this.InterpolantFactoryMethodLinear;break;case 2302:t=this.InterpolantFactoryMethodSmooth}if(void 0===t){let t="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw Error(t);return console.warn("THREE.KeyframeTrack:",t),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}}getValueSize(){return this.values.length/this.times.length}shift(e){if(0!==e){let t=this.times;for(let i=0,n=t.length;i!==n;++i)t[i]+=e}return this}scale(e){if(1!==e){let t=this.times;for(let i=0,n=t.length;i!==n;++i)t[i]*=e}return this}trim(e,t){let i=this.times,n=i.length,r=0,a=n-1;for(;r!==n&&i[r]<e;)++r;for(;-1!==a&&i[a]>t;)--a;if(++a,0!==r||a!==n){r>=a&&(r=(a=Math.max(a,1))-1);let e=this.getValueSize();this.times=i.slice(r,a),this.values=this.values.slice(r*e,a*e)}return this}validate(){let e=!0,t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);let i=this.times,n=this.values,r=i.length;0===r&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let a=null;for(let t=0;t!==r;t++){let n=i[t];if("number"==typeof n&&isNaN(n)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,t,n),e=!1;break}if(null!==a&&a>n){console.error("THREE.KeyframeTrack: Out of order keys.",this,t,n,a),e=!1;break}a=n}if(void 0!==n&&aM(n))for(let t=0,i=n.length;t!==i;++t){let i=n[t];if(isNaN(i)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,t,i),e=!1;break}}return e}optimize(){let e=this.times.slice(),t=this.values.slice(),i=this.getValueSize(),n=2302===this.getInterpolation(),r=e.length-1,a=1;for(let s=1;s<r;++s){let r=!1,o=e[s];if(o!==e[s+1]&&(1!==s||o!==e[0]))if(n)r=!0;else{let e=s*i,n=e-i,a=e+i;for(let s=0;s!==i;++s){let i=t[e+s];if(i!==t[n+s]||i!==t[a+s]){r=!0;break}}}if(r){if(s!==a){e[a]=e[s];let n=s*i,r=a*i;for(let e=0;e!==i;++e)t[r+e]=t[n+e]}++a}}if(r>0){e[a]=e[r];for(let e=r*i,n=a*i,s=0;s!==i;++s)t[n+s]=t[e+s];++a}return a!==e.length?(this.times=e.slice(0,a),this.values=t.slice(0,a*i)):(this.times=e,this.values=t),this}clone(){let e=this.times.slice(),t=this.values.slice(),i=new this.constructor(this.name,e,t);return i.createInterpolant=this.createInterpolant,i}}aD.prototype.TimeBufferType=Float32Array,aD.prototype.ValueBufferType=Float32Array,aD.prototype.DefaultInterpolation=2301;class aI extends aD{constructor(e,t,i){super(e,t,i)}}aI.prototype.ValueTypeName="bool",aI.prototype.ValueBufferType=Array,aI.prototype.DefaultInterpolation=2300,aI.prototype.InterpolantFactoryMethodLinear=void 0,aI.prototype.InterpolantFactoryMethodSmooth=void 0;class aL extends aD{}aL.prototype.ValueTypeName="color";class aB extends aD{}aB.prototype.ValueTypeName="number";class aU extends a_{constructor(e,t,i,n){super(e,t,i,n)}interpolate_(e,t,i,n){let r=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=(i-t)/(n-t),l=e*s;for(let e=l+s;l!==e;l+=4)eT.slerpFlat(r,0,a,l-s,a,l,o);return r}}class aN extends aD{InterpolantFactoryMethodLinear(e){return new aU(this.times,this.values,this.getValueSize(),e)}}aN.prototype.ValueTypeName="quaternion",aN.prototype.InterpolantFactoryMethodSmooth=void 0;class aF extends aD{constructor(e,t,i){super(e,t,i)}}aF.prototype.ValueTypeName="string",aF.prototype.ValueBufferType=Array,aF.prototype.DefaultInterpolation=2300,aF.prototype.InterpolantFactoryMethodLinear=void 0,aF.prototype.InterpolantFactoryMethodSmooth=void 0;class aO extends aD{}aO.prototype.ValueTypeName="vector";class az{constructor(e="",t=-1,i=[],n=2500){this.name=e,this.tracks=i,this.duration=t,this.blendMode=n,this.uuid=H(),this.duration<0&&this.resetDuration()}static parse(e){let t=[],i=e.tracks,n=1/(e.fps||1);for(let e=0,r=i.length;e!==r;++e)t.push((function(e){if(void 0===e.type)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");let t=function(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return aB;case"vector":case"vector2":case"vector3":case"vector4":return aO;case"color":return aL;case"quaternion":return aN;case"bool":case"boolean":return aI;case"string":return aF}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}(e.type);if(void 0===e.times){let t=[],i=[];aT(e.keys,t,i,"value"),e.times=t,e.values=i}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)})(i[e]).scale(n));let r=new this(e.name,e.duration,t,e.blendMode);return r.uuid=e.uuid,r}static toJSON(e){let t=[],i=e.tracks,n={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let e=0,n=i.length;e!==n;++e)t.push(aD.toJSON(i[e]));return n}static CreateFromMorphTargetSequence(e,t,i,n){let r=t.length,a=[];for(let e=0;e<r;e++){let s=[],o=[];s.push((e+r-1)%r,e,(e+1)%r),o.push(0,1,0);let l=ab(s);s=aw(s,1,l),o=aw(o,1,l),n||0!==s[0]||(s.push(r),o.push(o[0])),a.push(new aB(".morphTargetInfluences["+t[e].name+"]",s,o).scale(1/i))}return new this(e,-1,a)}static findByName(e,t){let i=e;Array.isArray(e)||(i=e.geometry&&e.geometry.animations||e.animations);for(let e=0;e<i.length;e++)if(i[e].name===t)return i[e];return null}static CreateClipsFromMorphTargetSequences(e,t,i){let n={},r=/^([\w-]*?)([\d]+)$/;for(let t=0,i=e.length;t<i;t++){let i=e[t],a=i.name.match(r);if(a&&a.length>1){let e=a[1],t=n[e];t||(n[e]=t=[]),t.push(i)}}let a=[];for(let e in n)a.push(this.CreateFromMorphTargetSequence(e,n[e],t,i));return a}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;let i=function(e,t,i,n,r){if(0!==i.length){let a=[],s=[];aT(i,a,s,n),0!==a.length&&r.push(new e(t,a,s))}},n=[],r=e.name||"default",a=e.fps||30,s=e.blendMode,o=e.length||-1,l=e.hierarchy||[];for(let e=0;e<l.length;e++){let r=l[e].keys;if(r&&0!==r.length)if(r[0].morphTargets){let e,t={};for(e=0;e<r.length;e++)if(r[e].morphTargets)for(let i=0;i<r[e].morphTargets.length;i++)t[r[e].morphTargets[i]]=-1;for(let i in t){let t=[],a=[];for(let n=0;n!==r[e].morphTargets.length;++n){let n=r[e];t.push(n.time),a.push(+(n.morphTarget===i))}n.push(new aB(".morphTargetInfluence["+i+"]",t,a))}o=t.length*a}else{let a=".bones["+t[e].name+"]";i(aO,a+".position",r,"pos",n),i(aN,a+".quaternion",r,"rot",n),i(aO,a+".scale",r,"scl",n)}}return 0===n.length?null:new this(r,o,n,s)}resetDuration(){let e=this.tracks,t=0;for(let i=0,n=e.length;i!==n;++i){let e=this.tracks[i];t=Math.max(t,e.times[e.times.length-1])}return this.duration=t,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){let e=[];for(let t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}let ak={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};class aH{constructor(e,t,i){let n;const r=this;let a=!1,s=0,o=0;const l=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=i,this.itemStart=function(e){o++,!1===a&&void 0!==r.onStart&&r.onStart(e,s,o),a=!0},this.itemEnd=function(e){s++,void 0!==r.onProgress&&r.onProgress(e,s,o),s===o&&(a=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(e){void 0!==r.onError&&r.onError(e)},this.resolveURL=function(e){return n?n(e):e},this.setURLModifier=function(e){return n=e,this},this.addHandler=function(e,t){return l.push(e,t),this},this.removeHandler=function(e){let t=l.indexOf(e);return -1!==t&&l.splice(t,2),this},this.getHandler=function(e){for(let t=0,i=l.length;t<i;t+=2){let i=l[t],n=l[t+1];if(i.global&&(i.lastIndex=0),i.test(e))return n}return null}}}let aG=new aH;class aV{constructor(e){this.manager=void 0!==e?e:aG,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){let i=this;return new Promise(function(n,r){i.load(e,n,t,r)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}aV.DEFAULT_MATERIAL_NAME="__DEFAULT";let aW={};class aj extends Error{constructor(e,t){super(e),this.response=t}}class aX extends aV{constructor(e){super(e)}load(e,t,i,n){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);let r=ak.get(e);if(void 0!==r)return this.manager.itemStart(e),setTimeout(()=>{t&&t(r),this.manager.itemEnd(e)},0),r;if(void 0!==aW[e])return void aW[e].push({onLoad:t,onProgress:i,onError:n});aW[e]=[],aW[e].push({onLoad:t,onProgress:i,onError:n});let a=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),s=this.mimeType,o=this.responseType;fetch(a).then(t=>{if(200===t.status||0===t.status){if(0===t.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),"u"<typeof ReadableStream||void 0===t.body||void 0===t.body.getReader)return t;let i=aW[e],n=t.body.getReader(),r=t.headers.get("X-File-Size")||t.headers.get("Content-Length"),a=r?parseInt(r):0,s=0!==a,o=0;return new Response(new ReadableStream({start(e){!function t(){n.read().then(({done:n,value:r})=>{if(n)e.close();else{let n=new ProgressEvent("progress",{lengthComputable:s,loaded:o+=r.byteLength,total:a});for(let e=0,t=i.length;e<t;e++){let t=i[e];t.onProgress&&t.onProgress(n)}e.enqueue(r),t()}},t=>{e.error(t)})}()}}))}throw new aj(`fetch for "${t.url}" responded with ${t.status}: ${t.statusText}`,t)}).then(e=>{switch(o){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then(e=>new DOMParser().parseFromString(e,s));case"json":return e.json();default:if(void 0===s)return e.text();{let t=/charset="?([^;"\s]*)"?/i.exec(s),i=new TextDecoder(t&&t[1]?t[1].toLowerCase():void 0);return e.arrayBuffer().then(e=>i.decode(e))}}}).then(t=>{ak.add(e,t);let i=aW[e];delete aW[e];for(let e=0,n=i.length;e<n;e++){let n=i[e];n.onLoad&&n.onLoad(t)}}).catch(t=>{let i=aW[e];if(void 0===i)throw this.manager.itemError(e),t;delete aW[e];for(let e=0,n=i.length;e<n;e++){let n=i[e];n.onError&&n.onError(t)}this.manager.itemError(e)}).finally(()=>{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class aY extends aV{constructor(e){super(e)}load(e,t,i,n){let r=this,a=new aX(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(i){try{t(r.parse(JSON.parse(i)))}catch(t){n?n(t):console.error(t),r.manager.itemError(e)}},i,n)}parse(e){let t=[];for(let i=0;i<e.length;i++){let n=az.parse(e[i]);t.push(n)}return t}}class aQ extends aV{constructor(e){super(e)}load(e,t,i,n){let r=this,a=[],s=new n7,o=new aX(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(r.withCredentials);let l=0;if(Array.isArray(e))for(let u=0,c=e.length;u<c;++u)!function(u){o.load(e[u],function(e){let i=r.parse(e,!0);a[u]={width:i.width,height:i.height,format:i.format,mipmaps:i.mipmaps},6===(l+=1)&&(1===i.mipmapCount&&(s.minFilter=1006),s.image=a,s.format=i.format,s.needsUpdate=!0,t&&t(s))},i,n)}(u);else o.load(e,function(e){let i=r.parse(e,!0);if(i.isCubemap){let e=i.mipmaps.length/i.mipmapCount;for(let t=0;t<e;t++){a[t]={mipmaps:[]};for(let e=0;e<i.mipmapCount;e++)a[t].mipmaps.push(i.mipmaps[t*i.mipmapCount+e]),a[t].format=i.format,a[t].width=i.width,a[t].height=i.height}s.image=a}else s.image.width=i.width,s.image.height=i.height,s.mipmaps=i.mipmaps;1===i.mipmapCount&&(s.minFilter=1006),s.format=i.format,s.needsUpdate=!0,t&&t(s)},i,n);return s}}class aq extends aV{constructor(e){super(e)}load(e,t,i,n){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);let r=this,a=ak.get(e);if(void 0!==a)return r.manager.itemStart(e),setTimeout(function(){t&&t(a),r.manager.itemEnd(e)},0),a;let s=ee("img");function o(){u(),ak.add(e,this),t&&t(this),r.manager.itemEnd(e)}function l(t){u(),n&&n(t),r.manager.itemError(e),r.manager.itemEnd(e)}function u(){s.removeEventListener("load",o,!1),s.removeEventListener("error",l,!1)}return s.addEventListener("load",o,!1),s.addEventListener("error",l,!1),"data:"!==e.slice(0,5)&&void 0!==this.crossOrigin&&(s.crossOrigin=this.crossOrigin),r.manager.itemStart(e),s.src=e,s}}class aK extends aV{constructor(e){super(e)}load(e,t,i,n){let r=new iP;r.colorSpace=D;let a=new aq(this.manager);a.setCrossOrigin(this.crossOrigin),a.setPath(this.path);let s=0;for(let i=0;i<e.length;++i)!function(i){a.load(e[i],function(e){r.images[i]=e,6==++s&&(r.needsUpdate=!0,t&&t(r))},void 0,n)}(i);return r}}class aZ extends aV{constructor(e){super(e)}load(e,t,i,n){let r=this,a=new nn,s=new aX(this.manager);return s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setPath(this.path),s.setWithCredentials(r.withCredentials),s.load(e,function(e){let i;try{i=r.parse(e)}catch(e){if(void 0===n)return void console.error(e);n(e)}void 0!==i.image?a.image=i.image:void 0!==i.data&&(a.image.width=i.width,a.image.height=i.height,a.image.data=i.data),a.wrapS=void 0!==i.wrapS?i.wrapS:1001,a.wrapT=void 0!==i.wrapT?i.wrapT:1001,a.magFilter=void 0!==i.magFilter?i.magFilter:1006,a.minFilter=void 0!==i.minFilter?i.minFilter:1006,a.anisotropy=void 0!==i.anisotropy?i.anisotropy:1,void 0!==i.colorSpace&&(a.colorSpace=i.colorSpace),void 0!==i.flipY&&(a.flipY=i.flipY),void 0!==i.format&&(a.format=i.format),void 0!==i.type&&(a.type=i.type),void 0!==i.mipmaps&&(a.mipmaps=i.mipmaps,a.minFilter=1008),1===i.mipmapCount&&(a.minFilter=1006),void 0!==i.generateMipmaps&&(a.generateMipmaps=i.generateMipmaps),a.needsUpdate=!0,t&&t(a,i)},i,n),a}}class aJ extends aV{constructor(e){super(e)}load(e,t,i,n){let r=new ev,a=new aq(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(e,function(e){r.image=e,r.needsUpdate=!0,void 0!==t&&t(r)},i,n),r}}class a$ extends ty{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new tO(e),this.intensity=t}dispose(){}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){let t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),void 0!==this.target&&(t.object.target=this.target.uuid),t}}class a0 extends a${constructor(e,t,i){super(e,i),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(ty.DEFAULT_UP),this.updateMatrix(),this.groundColor=new tO(t)}copy(e,t){return super.copy(e,t),this.groundColor.copy(e.groundColor),this}}let a1=new e2,a2=new eE,a3=new eE;class a4{constructor(e){this.camera=e,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Q(512,512),this.map=null,this.mapPass=null,this.matrix=new e2,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new nM,this._frameExtents=new Q(1,1),this._viewportCount=1,this._viewports=[new ex(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){let t=this.camera,i=this.matrix;a2.setFromMatrixPosition(e.matrixWorld),t.position.copy(a2),a3.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(a3),t.updateMatrixWorld(),a1.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(a1),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(a1)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.intensity=e.intensity,this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){let e={};return 1!==this.intensity&&(e.intensity=this.intensity),0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radius=this.radius),(512!==this.mapSize.x||512!==this.mapSize.y)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class a5 extends a4{constructor(){super(new iC(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){let t=this.camera,i=2*k*e.angle*this.focus,n=this.mapSize.width/this.mapSize.height,r=e.distance||t.far;(i!==t.fov||n!==t.aspect||r!==t.far)&&(t.fov=i,t.aspect=n,t.far=r,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class a6 extends a${constructor(e,t,i=0,n=Math.PI/3,r=0,a=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(ty.DEFAULT_UP),this.updateMatrix(),this.target=new ty,this.distance=i,this.angle=n,this.penumbra=r,this.decay=a,this.map=null,this.shadow=new a5}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}let a8=new e2,a9=new eE,a7=new eE;class se extends a4{constructor(){super(new iC(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Q(4,2),this._viewportCount=6,this._viewports=[new ex(2,1,1,1),new ex(0,1,1,1),new ex(3,1,1,1),new ex(1,1,1,1),new ex(3,0,1,1),new ex(1,0,1,1)],this._cubeDirections=[new eE(1,0,0),new eE(-1,0,0),new eE(0,0,1),new eE(0,0,-1),new eE(0,1,0),new eE(0,-1,0)],this._cubeUps=[new eE(0,1,0),new eE(0,1,0),new eE(0,1,0),new eE(0,1,0),new eE(0,0,1),new eE(0,0,-1)]}updateMatrices(e,t=0){let i=this.camera,n=this.matrix,r=e.distance||i.far;r!==i.far&&(i.far=r,i.updateProjectionMatrix()),a9.setFromMatrixPosition(e.matrixWorld),i.position.copy(a9),a7.copy(i.position),a7.add(this._cubeDirections[t]),i.up.copy(this._cubeUps[t]),i.lookAt(a7),i.updateMatrixWorld(),n.makeTranslation(-a9.x,-a9.y,-a9.z),a8.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),this._frustum.setFromProjectionMatrix(a8)}}class st extends a${constructor(e,t,i=0,n=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=i,this.decay=n,this.shadow=new se}get power(){return 4*this.intensity*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class si extends iw{constructor(e=-1,t=1,i=1,n=-1,r=.1,a=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=n,this.near=r,this.far=a,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,i,n,r,a){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=n,this.view.width=r,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,n=(this.top+this.bottom)/2,r=i-e,a=i+e,s=n+t,o=n-t;if(null!==this.view&&this.view.enabled){let e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=e*this.view.offsetX,a=r+e*this.view.width,s-=t*this.view.offsetY,o=s-t*this.view.height}this.projectionMatrix.makeOrthographic(r,a,s,o,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}class sn extends a4{constructor(){super(new si(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class sr extends a${constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(ty.DEFAULT_UP),this.updateMatrix(),this.target=new ty,this.shadow=new sn}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class sa extends a${constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class ss extends a${constructor(e,t,i=10,n=10){super(e,t),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=i,this.height=n}get power(){return this.intensity*this.width*this.height*Math.PI}set power(e){this.intensity=e/(this.width*this.height*Math.PI)}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){let t=super.toJSON(e);return t.object.width=this.width,t.object.height=this.height,t}}class so{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new eE)}set(e){for(let t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){let i=e.x,n=e.y,r=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.282095),t.addScaledVector(a[1],.488603*n),t.addScaledVector(a[2],.488603*r),t.addScaledVector(a[3],.488603*i),t.addScaledVector(a[4],i*n*1.092548),t.addScaledVector(a[5],n*r*1.092548),t.addScaledVector(a[6],.315392*(3*r*r-1)),t.addScaledVector(a[7],i*r*1.092548),t.addScaledVector(a[8],.546274*(i*i-n*n)),t}getIrradianceAt(e,t){let i=e.x,n=e.y,r=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.886227),t.addScaledVector(a[1],1.023328*n),t.addScaledVector(a[2],1.023328*r),t.addScaledVector(a[3],1.023328*i),t.addScaledVector(a[4],.858086*i*n),t.addScaledVector(a[5],.858086*n*r),t.addScaledVector(a[6],.743125*r*r-.247708),t.addScaledVector(a[7],.858086*i*r),t.addScaledVector(a[8],.429043*(i*i-n*n)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let i=0;i<9;i++)this.coefficients[i].addScaledVector(e.coefficients[i],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let i=0;i<9;i++)this.coefficients[i].lerp(e.coefficients[i],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return new this.constructor().copy(this)}fromArray(e,t=0){let i=this.coefficients;for(let n=0;n<9;n++)i[n].fromArray(e,t+3*n);return this}toArray(e=[],t=0){let i=this.coefficients;for(let n=0;n<9;n++)i[n].toArray(e,t+3*n);return e}static getBasisAt(e,t){let i=e.x,n=e.y,r=e.z;t[0]=.282095,t[1]=.488603*n,t[2]=.488603*r,t[3]=.488603*i,t[4]=1.092548*i*n,t[5]=1.092548*n*r,t[6]=.315392*(3*r*r-1),t[7]=1.092548*i*r,t[8]=.546274*(i*i-n*n)}}class sl extends a${constructor(e=new so,t=1){super(void 0,t),this.isLightProbe=!0,this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}fromJSON(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this}toJSON(e){let t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}}class su extends aV{constructor(e){super(e),this.textures={}}load(e,t,i,n){let r=this,a=new aX(r.manager);a.setPath(r.path),a.setRequestHeader(r.requestHeader),a.setWithCredentials(r.withCredentials),a.load(e,function(i){try{t(r.parse(JSON.parse(i)))}catch(t){n?n(t):console.error(t),r.manager.itemError(e)}},i,n)}parse(e){let t=this.textures;function i(e){return void 0===t[e]&&console.warn("THREE.MaterialLoader: Undefined texture",e),t[e]}let n=this.createMaterialFromType(e.type);if(void 0!==e.uuid&&(n.uuid=e.uuid),void 0!==e.name&&(n.name=e.name),void 0!==e.color&&void 0!==n.color&&n.color.setHex(e.color),void 0!==e.roughness&&(n.roughness=e.roughness),void 0!==e.metalness&&(n.metalness=e.metalness),void 0!==e.sheen&&(n.sheen=e.sheen),void 0!==e.sheenColor&&(n.sheenColor=new tO().setHex(e.sheenColor)),void 0!==e.sheenRoughness&&(n.sheenRoughness=e.sheenRoughness),void 0!==e.emissive&&void 0!==n.emissive&&n.emissive.setHex(e.emissive),void 0!==e.specular&&void 0!==n.specular&&n.specular.setHex(e.specular),void 0!==e.specularIntensity&&(n.specularIntensity=e.specularIntensity),void 0!==e.specularColor&&void 0!==n.specularColor&&n.specularColor.setHex(e.specularColor),void 0!==e.shininess&&(n.shininess=e.shininess),void 0!==e.clearcoat&&(n.clearcoat=e.clearcoat),void 0!==e.clearcoatRoughness&&(n.clearcoatRoughness=e.clearcoatRoughness),void 0!==e.dispersion&&(n.dispersion=e.dispersion),void 0!==e.iridescence&&(n.iridescence=e.iridescence),void 0!==e.iridescenceIOR&&(n.iridescenceIOR=e.iridescenceIOR),void 0!==e.iridescenceThicknessRange&&(n.iridescenceThicknessRange=e.iridescenceThicknessRange),void 0!==e.transmission&&(n.transmission=e.transmission),void 0!==e.thickness&&(n.thickness=e.thickness),void 0!==e.attenuationDistance&&(n.attenuationDistance=e.attenuationDistance),void 0!==e.attenuationColor&&void 0!==n.attenuationColor&&n.attenuationColor.setHex(e.attenuationColor),void 0!==e.anisotropy&&(n.anisotropy=e.anisotropy),void 0!==e.anisotropyRotation&&(n.anisotropyRotation=e.anisotropyRotation),void 0!==e.fog&&(n.fog=e.fog),void 0!==e.flatShading&&(n.flatShading=e.flatShading),void 0!==e.blending&&(n.blending=e.blending),void 0!==e.combine&&(n.combine=e.combine),void 0!==e.side&&(n.side=e.side),void 0!==e.shadowSide&&(n.shadowSide=e.shadowSide),void 0!==e.opacity&&(n.opacity=e.opacity),void 0!==e.transparent&&(n.transparent=e.transparent),void 0!==e.alphaTest&&(n.alphaTest=e.alphaTest),void 0!==e.alphaHash&&(n.alphaHash=e.alphaHash),void 0!==e.depthFunc&&(n.depthFunc=e.depthFunc),void 0!==e.depthTest&&(n.depthTest=e.depthTest),void 0!==e.depthWrite&&(n.depthWrite=e.depthWrite),void 0!==e.colorWrite&&(n.colorWrite=e.colorWrite),void 0!==e.blendSrc&&(n.blendSrc=e.blendSrc),void 0!==e.blendDst&&(n.blendDst=e.blendDst),void 0!==e.blendEquation&&(n.blendEquation=e.blendEquation),void 0!==e.blendSrcAlpha&&(n.blendSrcAlpha=e.blendSrcAlpha),void 0!==e.blendDstAlpha&&(n.blendDstAlpha=e.blendDstAlpha),void 0!==e.blendEquationAlpha&&(n.blendEquationAlpha=e.blendEquationAlpha),void 0!==e.blendColor&&void 0!==n.blendColor&&n.blendColor.setHex(e.blendColor),void 0!==e.blendAlpha&&(n.blendAlpha=e.blendAlpha),void 0!==e.stencilWriteMask&&(n.stencilWriteMask=e.stencilWriteMask),void 0!==e.stencilFunc&&(n.stencilFunc=e.stencilFunc),void 0!==e.stencilRef&&(n.stencilRef=e.stencilRef),void 0!==e.stencilFuncMask&&(n.stencilFuncMask=e.stencilFuncMask),void 0!==e.stencilFail&&(n.stencilFail=e.stencilFail),void 0!==e.stencilZFail&&(n.stencilZFail=e.stencilZFail),void 0!==e.stencilZPass&&(n.stencilZPass=e.stencilZPass),void 0!==e.stencilWrite&&(n.stencilWrite=e.stencilWrite),void 0!==e.wireframe&&(n.wireframe=e.wireframe),void 0!==e.wireframeLinewidth&&(n.wireframeLinewidth=e.wireframeLinewidth),void 0!==e.wireframeLinecap&&(n.wireframeLinecap=e.wireframeLinecap),void 0!==e.wireframeLinejoin&&(n.wireframeLinejoin=e.wireframeLinejoin),void 0!==e.rotation&&(n.rotation=e.rotation),void 0!==e.linewidth&&(n.linewidth=e.linewidth),void 0!==e.dashSize&&(n.dashSize=e.dashSize),void 0!==e.gapSize&&(n.gapSize=e.gapSize),void 0!==e.scale&&(n.scale=e.scale),void 0!==e.polygonOffset&&(n.polygonOffset=e.polygonOffset),void 0!==e.polygonOffsetFactor&&(n.polygonOffsetFactor=e.polygonOffsetFactor),void 0!==e.polygonOffsetUnits&&(n.polygonOffsetUnits=e.polygonOffsetUnits),void 0!==e.dithering&&(n.dithering=e.dithering),void 0!==e.alphaToCoverage&&(n.alphaToCoverage=e.alphaToCoverage),void 0!==e.premultipliedAlpha&&(n.premultipliedAlpha=e.premultipliedAlpha),void 0!==e.forceSinglePass&&(n.forceSinglePass=e.forceSinglePass),void 0!==e.visible&&(n.visible=e.visible),void 0!==e.toneMapped&&(n.toneMapped=e.toneMapped),void 0!==e.userData&&(n.userData=e.userData),void 0!==e.vertexColors&&("number"==typeof e.vertexColors?n.vertexColors=e.vertexColors>0:n.vertexColors=e.vertexColors),void 0!==e.uniforms)for(let t in e.uniforms){let r=e.uniforms[t];switch(n.uniforms[t]={},r.type){case"t":n.uniforms[t].value=i(r.value);break;case"c":n.uniforms[t].value=new tO().setHex(r.value);break;case"v2":n.uniforms[t].value=new Q().fromArray(r.value);break;case"v3":n.uniforms[t].value=new eE().fromArray(r.value);break;case"v4":n.uniforms[t].value=new ex().fromArray(r.value);break;case"m3":n.uniforms[t].value=new q().fromArray(r.value);break;case"m4":n.uniforms[t].value=new e2().fromArray(r.value);break;default:n.uniforms[t].value=r.value}}if(void 0!==e.defines&&(n.defines=e.defines),void 0!==e.vertexShader&&(n.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(n.fragmentShader=e.fragmentShader),void 0!==e.glslVersion&&(n.glslVersion=e.glslVersion),void 0!==e.extensions)for(let t in e.extensions)n.extensions[t]=e.extensions[t];if(void 0!==e.lights&&(n.lights=e.lights),void 0!==e.clipping&&(n.clipping=e.clipping),void 0!==e.size&&(n.size=e.size),void 0!==e.sizeAttenuation&&(n.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(n.map=i(e.map)),void 0!==e.matcap&&(n.matcap=i(e.matcap)),void 0!==e.alphaMap&&(n.alphaMap=i(e.alphaMap)),void 0!==e.bumpMap&&(n.bumpMap=i(e.bumpMap)),void 0!==e.bumpScale&&(n.bumpScale=e.bumpScale),void 0!==e.normalMap&&(n.normalMap=i(e.normalMap)),void 0!==e.normalMapType&&(n.normalMapType=e.normalMapType),void 0!==e.normalScale){let t=e.normalScale;!1===Array.isArray(t)&&(t=[t,t]),n.normalScale=new Q().fromArray(t)}return void 0!==e.displacementMap&&(n.displacementMap=i(e.displacementMap)),void 0!==e.displacementScale&&(n.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(n.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(n.roughnessMap=i(e.roughnessMap)),void 0!==e.metalnessMap&&(n.metalnessMap=i(e.metalnessMap)),void 0!==e.emissiveMap&&(n.emissiveMap=i(e.emissiveMap)),void 0!==e.emissiveIntensity&&(n.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(n.specularMap=i(e.specularMap)),void 0!==e.specularIntensityMap&&(n.specularIntensityMap=i(e.specularIntensityMap)),void 0!==e.specularColorMap&&(n.specularColorMap=i(e.specularColorMap)),void 0!==e.envMap&&(n.envMap=i(e.envMap)),void 0!==e.envMapRotation&&n.envMapRotation.fromArray(e.envMapRotation),void 0!==e.envMapIntensity&&(n.envMapIntensity=e.envMapIntensity),void 0!==e.reflectivity&&(n.reflectivity=e.reflectivity),void 0!==e.refractionRatio&&(n.refractionRatio=e.refractionRatio),void 0!==e.lightMap&&(n.lightMap=i(e.lightMap)),void 0!==e.lightMapIntensity&&(n.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(n.aoMap=i(e.aoMap)),void 0!==e.aoMapIntensity&&(n.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(n.gradientMap=i(e.gradientMap)),void 0!==e.clearcoatMap&&(n.clearcoatMap=i(e.clearcoatMap)),void 0!==e.clearcoatRoughnessMap&&(n.clearcoatRoughnessMap=i(e.clearcoatRoughnessMap)),void 0!==e.clearcoatNormalMap&&(n.clearcoatNormalMap=i(e.clearcoatNormalMap)),void 0!==e.clearcoatNormalScale&&(n.clearcoatNormalScale=new Q().fromArray(e.clearcoatNormalScale)),void 0!==e.iridescenceMap&&(n.iridescenceMap=i(e.iridescenceMap)),void 0!==e.iridescenceThicknessMap&&(n.iridescenceThicknessMap=i(e.iridescenceThicknessMap)),void 0!==e.transmissionMap&&(n.transmissionMap=i(e.transmissionMap)),void 0!==e.thicknessMap&&(n.thicknessMap=i(e.thicknessMap)),void 0!==e.anisotropyMap&&(n.anisotropyMap=i(e.anisotropyMap)),void 0!==e.sheenColorMap&&(n.sheenColorMap=i(e.sheenColorMap)),void 0!==e.sheenRoughnessMap&&(n.sheenRoughnessMap=i(e.sheenRoughnessMap)),n}setTextures(e){return this.textures=e,this}createMaterialFromType(e){return su.createMaterialFromType(e)}static createMaterialFromType(e){return new({ShadowMaterial:au,SpriteMaterial:iO,RawShaderMaterial:ac,ShaderMaterial:ib,PointsMaterial:n$,MeshPhysicalMaterial:ad,MeshStandardMaterial:ah,MeshPhongMaterial:af,MeshToonMaterial:ap,MeshNormalMaterial:am,MeshLambertMaterial:ag,MeshDepthMaterial:av,MeshDistanceMaterial:ax,MeshBasicMaterial:tG,MeshMatcapMaterial:ay,LineDashedMaterial:aS,LineBasicMaterial:nz,Material:tH})[e]}}class sc{static decodeText(e){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),"u">typeof TextDecoder)return new TextDecoder().decode(e);let t="";for(let i=0,n=e.length;i<n;i++)t+=String.fromCharCode(e[i]);try{return decodeURIComponent(escape(t))}catch(e){return t}}static extractUrlBase(e){let t=e.lastIndexOf("/");return -1===t?"./":e.slice(0,t+1)}static resolveURL(e,t){return"string"!=typeof e||""===e?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e))?e:t+e}}class sh extends ii{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){let e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}class sd extends aV{constructor(e){super(e)}load(e,t,i,n){let r=this,a=new aX(r.manager);a.setPath(r.path),a.setRequestHeader(r.requestHeader),a.setWithCredentials(r.withCredentials),a.load(e,function(i){try{t(r.parse(JSON.parse(i)))}catch(t){n?n(t):console.error(t),r.manager.itemError(e)}},i,n)}parse(e){let t={},i={};function n(e,n){if(void 0!==t[n])return t[n];let r=e.interleavedBuffers[n],a=function(e,t){if(void 0!==i[t])return i[t];let n=new Uint32Array(e.arrayBuffers[t]).buffer;return i[t]=n,n}(e,r.buffer),s=new iU($(r.type,a),r.stride);return s.uuid=r.uuid,t[n]=s,s}let r=e.isInstancedBufferGeometry?new sh:new ii,a=e.data.index;if(void 0!==a){let e=$(a.type,a.array);r.setIndex(new tq(e,1))}let s=e.data.attributes;for(let t in s){let i,a=s[t];if(a.isInterleavedBufferAttribute)i=new iF(n(e.data,a.data),a.itemSize,a.offset,a.normalized);else{let e=$(a.type,a.array);i=new(a.isInstancedBufferAttribute?no:tq)(e,a.itemSize,a.normalized)}void 0!==a.name&&(i.name=a.name),void 0!==a.usage&&i.setUsage(a.usage),r.setAttribute(t,i)}let o=e.data.morphAttributes;if(o)for(let t in o){let i=o[t],a=[];for(let t=0,r=i.length;t<r;t++){let r,s=i[t];r=s.isInterleavedBufferAttribute?new iF(n(e.data,s.data),s.itemSize,s.offset,s.normalized):new tq($(s.type,s.array),s.itemSize,s.normalized),void 0!==s.name&&(r.name=s.name),a.push(r)}r.morphAttributes[t]=a}e.data.morphTargetsRelative&&(r.morphTargetsRelative=!0);let l=e.data.groups||e.data.drawcalls||e.data.offsets;if(void 0!==l)for(let e=0,t=l.length;e!==t;++e){let t=l[e];r.addGroup(t.start,t.count,t.materialIndex)}let u=e.data.boundingSphere;if(void 0!==u){let e=new eE;void 0!==u.center&&e.fromArray(u.center),r.boundingSphere=new eY(e,u.radius)}return e.name&&(r.name=e.name),e.userData&&(r.userData=e.userData),r}}class sf extends aV{constructor(e){super(e)}load(e,t,i,n){let r=this,a=""===this.path?sc.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||a;let s=new aX(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,function(i){let a=null;try{a=JSON.parse(i)}catch(t){void 0!==n&&n(t),console.error("THREE:ObjectLoader: Can't parse "+e+".",t.message);return}let s=a.metadata;if(void 0===s||void 0===s.type||"geometry"===s.type.toLowerCase()){void 0!==n&&n(Error("THREE.ObjectLoader: Can't load "+e)),console.error("THREE.ObjectLoader: Can't load "+e);return}r.parse(a,t)},i,n)}async loadAsync(e,t){let i=""===this.path?sc.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||i;let n=new aX(this.manager);n.setPath(this.path),n.setRequestHeader(this.requestHeader),n.setWithCredentials(this.withCredentials);let r=JSON.parse(await n.loadAsync(e,t)),a=r.metadata;if(void 0===a||void 0===a.type||"geometry"===a.type.toLowerCase())throw Error("THREE.ObjectLoader: Can't load "+e);return await this.parseAsync(r)}parse(e,t){let i=this.parseAnimations(e.animations),n=this.parseShapes(e.shapes),r=this.parseGeometries(e.geometries,n),a=this.parseImages(e.images,function(){void 0!==t&&t(l)}),s=this.parseTextures(e.textures,a),o=this.parseMaterials(e.materials,s),l=this.parseObject(e.object,r,o,s,i),u=this.parseSkeletons(e.skeletons,l);if(this.bindSkeletons(l,u),this.bindLightTargets(l),void 0!==t){let e=!1;for(let t in a)if(a[t].data instanceof HTMLImageElement){e=!0;break}!1===e&&t(l)}return l}async parseAsync(e){let t=this.parseAnimations(e.animations),i=this.parseShapes(e.shapes),n=this.parseGeometries(e.geometries,i),r=await this.parseImagesAsync(e.images),a=this.parseTextures(e.textures,r),s=this.parseMaterials(e.materials,a),o=this.parseObject(e.object,n,s,a,t),l=this.parseSkeletons(e.skeletons,o);return this.bindSkeletons(o,l),this.bindLightTargets(o),o}parseShapes(e){let t={};if(void 0!==e)for(let i=0,n=e.length;i<n;i++){let n=new rO().fromJSON(e[i]);t[n.uuid]=n}return t}parseSkeletons(e,t){let i={},n={};if(t.traverse(function(e){e.isBone&&(n[e.uuid]=e)}),void 0!==e)for(let t=0,r=e.length;t<r;t++){let r=new ns().fromJSON(e[t],n);i[r.uuid]=r}return i}parseGeometries(e,t){let i={};if(void 0!==e){let n=new sd;for(let r=0,a=e.length;r<a;r++){let a,s=e[r];switch(s.type){case"BufferGeometry":case"InstancedBufferGeometry":a=n.parse(s);break;default:s.type in al?a=al[s.type].fromJSON(s,t):console.warn(`THREE.ObjectLoader: Unsupported geometry type "${s.type}"`)}a.uuid=s.uuid,void 0!==s.name&&(a.name=s.name),void 0!==s.userData&&(a.userData=s.userData),i[s.uuid]=a}}return i}parseMaterials(e,t){let i={},n={};if(void 0!==e){let r=new su;r.setTextures(t);for(let t=0,a=e.length;t<a;t++){let a=e[t];void 0===i[a.uuid]&&(i[a.uuid]=r.parse(a)),n[a.uuid]=i[a.uuid]}}return n}parseAnimations(e){let t={};if(void 0!==e)for(let i=0;i<e.length;i++){let n=e[i],r=az.parse(n);t[r.uuid]=r}return t}parseImages(e,t){let i,n=this,r={};function a(e){if("string"==typeof e){var t;return t=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(e)?e:n.resourcePath+e,n.manager.itemStart(t),i.load(t,function(){n.manager.itemEnd(t)},void 0,function(){n.manager.itemError(t),n.manager.itemEnd(t)})}return e.data?{data:$(e.type,e.data),width:e.width,height:e.height}:null}if(void 0!==e&&e.length>0){(i=new aq(new aH(t))).setCrossOrigin(this.crossOrigin);for(let t=0,i=e.length;t<i;t++){let i=e[t],n=i.url;if(Array.isArray(n)){let e=[];for(let t=0,i=n.length;t<i;t++){let i=a(n[t]);null!==i&&(i instanceof HTMLImageElement?e.push(i):e.push(new nn(i.data,i.width,i.height)))}r[i.uuid]=new ep(e)}else{let e=a(i.url);r[i.uuid]=new ep(e)}}}return r}async parseImagesAsync(e){let t,i=this,n={};async function r(e){if("string"==typeof e){let n=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(e)?e:i.resourcePath+e;return await t.loadAsync(n)}return e.data?{data:$(e.type,e.data),width:e.width,height:e.height}:null}if(void 0!==e&&e.length>0){(t=new aq(this.manager)).setCrossOrigin(this.crossOrigin);for(let t=0,i=e.length;t<i;t++){let i=e[t],a=i.url;if(Array.isArray(a)){let e=[];for(let t=0,i=a.length;t<i;t++){let i=a[t],n=await r(i);null!==n&&(n instanceof HTMLImageElement?e.push(n):e.push(new nn(n.data,n.width,n.height)))}n[i.uuid]=new ep(e)}else{let e=await r(i.url);n[i.uuid]=new ep(e)}}}return n}parseTextures(e,t){function i(e,t){return"number"==typeof e?e:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",e),t[e])}let n={};if(void 0!==e)for(let r=0,a=e.length;r<a;r++){let a,s=e[r];void 0===s.image&&console.warn('THREE.ObjectLoader: No "image" specified for',s.uuid),void 0===t[s.image]&&console.warn("THREE.ObjectLoader: Undefined image",s.image);let o=t[s.image],l=o.data;Array.isArray(l)?(a=new iP,6===l.length&&(a.needsUpdate=!0)):(a=l&&l.data?new nn:new ev,l&&(a.needsUpdate=!0)),a.source=o,a.uuid=s.uuid,void 0!==s.name&&(a.name=s.name),void 0!==s.mapping&&(a.mapping=i(s.mapping,sp)),void 0!==s.channel&&(a.channel=s.channel),void 0!==s.offset&&a.offset.fromArray(s.offset),void 0!==s.repeat&&a.repeat.fromArray(s.repeat),void 0!==s.center&&a.center.fromArray(s.center),void 0!==s.rotation&&(a.rotation=s.rotation),void 0!==s.wrap&&(a.wrapS=i(s.wrap[0],sm),a.wrapT=i(s.wrap[1],sm)),void 0!==s.format&&(a.format=s.format),void 0!==s.internalFormat&&(a.internalFormat=s.internalFormat),void 0!==s.type&&(a.type=s.type),void 0!==s.colorSpace&&(a.colorSpace=s.colorSpace),void 0!==s.minFilter&&(a.minFilter=i(s.minFilter,sg)),void 0!==s.magFilter&&(a.magFilter=i(s.magFilter,sg)),void 0!==s.anisotropy&&(a.anisotropy=s.anisotropy),void 0!==s.flipY&&(a.flipY=s.flipY),void 0!==s.generateMipmaps&&(a.generateMipmaps=s.generateMipmaps),void 0!==s.premultiplyAlpha&&(a.premultiplyAlpha=s.premultiplyAlpha),void 0!==s.unpackAlignment&&(a.unpackAlignment=s.unpackAlignment),void 0!==s.compareFunction&&(a.compareFunction=s.compareFunction),void 0!==s.userData&&(a.userData=s.userData),n[s.uuid]=a}return n}parseObject(e,t,i,n,r){let a,s,o;function l(e){return void 0===t[e]&&console.warn("THREE.ObjectLoader: Undefined geometry",e),t[e]}function u(e){if(void 0!==e){if(Array.isArray(e)){let t=[];for(let n=0,r=e.length;n<r;n++){let r=e[n];void 0===i[r]&&console.warn("THREE.ObjectLoader: Undefined material",r),t.push(i[r])}return t}return void 0===i[e]&&console.warn("THREE.ObjectLoader: Undefined material",e),i[e]}}function c(e){return void 0===n[e]&&console.warn("THREE.ObjectLoader: Undefined texture",e),n[e]}switch(e.type){case"Scene":a=new iB,void 0!==e.background&&(Number.isInteger(e.background)?a.background=new tO(e.background):a.background=c(e.background)),void 0!==e.environment&&(a.environment=c(e.environment)),void 0!==e.fog&&("Fog"===e.fog.type?a.fog=new iL(e.fog.color,e.fog.near,e.fog.far):"FogExp2"===e.fog.type&&(a.fog=new iI(e.fog.color,e.fog.density)),""!==e.fog.name&&(a.fog.name=e.fog.name)),void 0!==e.backgroundBlurriness&&(a.backgroundBlurriness=e.backgroundBlurriness),void 0!==e.backgroundIntensity&&(a.backgroundIntensity=e.backgroundIntensity),void 0!==e.backgroundRotation&&a.backgroundRotation.fromArray(e.backgroundRotation),void 0!==e.environmentIntensity&&(a.environmentIntensity=e.environmentIntensity),void 0!==e.environmentRotation&&a.environmentRotation.fromArray(e.environmentRotation);break;case"PerspectiveCamera":a=new iC(e.fov,e.aspect,e.near,e.far),void 0!==e.focus&&(a.focus=e.focus),void 0!==e.zoom&&(a.zoom=e.zoom),void 0!==e.filmGauge&&(a.filmGauge=e.filmGauge),void 0!==e.filmOffset&&(a.filmOffset=e.filmOffset),void 0!==e.view&&(a.view=Object.assign({},e.view));break;case"OrthographicCamera":a=new si(e.left,e.right,e.top,e.bottom,e.near,e.far),void 0!==e.zoom&&(a.zoom=e.zoom),void 0!==e.view&&(a.view=Object.assign({},e.view));break;case"AmbientLight":a=new sa(e.color,e.intensity);break;case"DirectionalLight":(a=new sr(e.color,e.intensity)).target=e.target||"";break;case"PointLight":a=new st(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":a=new ss(e.color,e.intensity,e.width,e.height);break;case"SpotLight":(a=new a6(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay)).target=e.target||"";break;case"HemisphereLight":a=new a0(e.color,e.groundColor,e.intensity);break;case"LightProbe":a=new sl().fromJSON(e);break;case"SkinnedMesh":a=new nt(s=l(e.geometry),o=u(e.material)),void 0!==e.bindMode&&(a.bindMode=e.bindMode),void 0!==e.bindMatrix&&a.bindMatrix.fromArray(e.bindMatrix),void 0!==e.skeleton&&(a.skeleton=e.skeleton);break;case"Mesh":a=new ig(s=l(e.geometry),o=u(e.material));break;case"InstancedMesh":s=l(e.geometry),o=u(e.material);let h=e.count,d=e.instanceMatrix,f=e.instanceColor;(a=new nm(s,o,h)).instanceMatrix=new no(new Float32Array(d.array),16),void 0!==f&&(a.instanceColor=new no(new Float32Array(f.array),f.itemSize));break;case"BatchedMesh":s=l(e.geometry),o=u(e.material),(a=new nO(e.maxInstanceCount,e.maxVertexCount,e.maxIndexCount,o)).geometry=s,a.perObjectFrustumCulled=e.perObjectFrustumCulled,a.sortObjects=e.sortObjects,a._drawRanges=e.drawRanges,a._reservedRanges=e.reservedRanges,a._visibility=e.visibility,a._active=e.active,a._bounds=e.bounds.map(e=>{let t=new eR;t.min.fromArray(e.boxMin),t.max.fromArray(e.boxMax);let i=new eY;return i.radius=e.sphereRadius,i.center.fromArray(e.sphereCenter),{boxInitialized:e.boxInitialized,box:t,sphereInitialized:e.sphereInitialized,sphere:i}}),a._maxInstanceCount=e.maxInstanceCount,a._maxVertexCount=e.maxVertexCount,a._maxIndexCount=e.maxIndexCount,a._geometryInitialized=e.geometryInitialized,a._geometryCount=e.geometryCount,a._matricesTexture=c(e.matricesTexture.uuid),void 0!==e.colorsTexture&&(a._colorsTexture=c(e.colorsTexture.uuid));break;case"LOD":a=new i1;break;case"Line":a=new nY(l(e.geometry),u(e.material));break;case"LineLoop":a=new nJ(l(e.geometry),u(e.material));break;case"LineSegments":a=new nZ(l(e.geometry),u(e.material));break;case"PointCloud":case"Points":a=new n4(l(e.geometry),u(e.material));break;case"Sprite":a=new iZ(u(e.material));break;case"Group":a=new n6;break;case"Bone":a=new ni;break;default:a=new ty}if(a.uuid=e.uuid,void 0!==e.name&&(a.name=e.name),void 0!==e.matrix?(a.matrix.fromArray(e.matrix),void 0!==e.matrixAutoUpdate&&(a.matrixAutoUpdate=e.matrixAutoUpdate),a.matrixAutoUpdate&&a.matrix.decompose(a.position,a.quaternion,a.scale)):(void 0!==e.position&&a.position.fromArray(e.position),void 0!==e.rotation&&a.rotation.fromArray(e.rotation),void 0!==e.quaternion&&a.quaternion.fromArray(e.quaternion),void 0!==e.scale&&a.scale.fromArray(e.scale)),void 0!==e.up&&a.up.fromArray(e.up),void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.intensity&&(a.shadow.intensity=e.shadow.intensity),void 0!==e.shadow.bias&&(a.shadow.bias=e.shadow.bias),void 0!==e.shadow.normalBias&&(a.shadow.normalBias=e.shadow.normalBias),void 0!==e.shadow.radius&&(a.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&a.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(a.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(a.visible=e.visible),void 0!==e.frustumCulled&&(a.frustumCulled=e.frustumCulled),void 0!==e.renderOrder&&(a.renderOrder=e.renderOrder),void 0!==e.userData&&(a.userData=e.userData),void 0!==e.layers&&(a.layers.mask=e.layers),void 0!==e.children){let s=e.children;for(let e=0;e<s.length;e++)a.add(this.parseObject(s[e],t,i,n,r))}if(void 0!==e.animations){let t=e.animations;for(let e=0;e<t.length;e++){let i=t[e];a.animations.push(r[i])}}if("LOD"===e.type){void 0!==e.autoUpdate&&(a.autoUpdate=e.autoUpdate);let t=e.levels;for(let e=0;e<t.length;e++){let i=t[e],n=a.getObjectByProperty("uuid",i.object);void 0!==n&&a.addLevel(n,i.distance,i.hysteresis)}}return a}bindSkeletons(e,t){0!==Object.keys(t).length&&e.traverse(function(e){if(!0===e.isSkinnedMesh&&void 0!==e.skeleton){let i=t[e.skeleton];void 0===i?console.warn("THREE.ObjectLoader: No skeleton found with UUID:",e.skeleton):e.bind(i,e.bindMatrix)}})}bindLightTargets(e){e.traverse(function(t){if(t.isDirectionalLight||t.isSpotLight){let i=t.target,n=e.getObjectByProperty("uuid",i);void 0!==n?t.target=n:t.target=new ty}})}}let sp={UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,CubeUVReflectionMapping:306},sm={RepeatWrapping:1e3,ClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002},sg={NearestFilter:1003,NearestMipmapNearestFilter:1004,NearestMipmapLinearFilter:1005,LinearFilter:1006,LinearMipmapNearestFilter:1007,LinearMipmapLinearFilter:1008};class sv extends aV{constructor(e){super(e),this.isImageBitmapLoader=!0,"u"<typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"u"<typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,i,n){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);let r=this,a=ak.get(e);if(void 0!==a)return(r.manager.itemStart(e),a.then)?void a.then(i=>{t&&t(i),r.manager.itemEnd(e)}).catch(e=>{n&&n(e)}):(setTimeout(function(){t&&t(a),r.manager.itemEnd(e)},0),a);let s={};s.credentials="anonymous"===this.crossOrigin?"same-origin":"include",s.headers=this.requestHeader;let o=fetch(e,s).then(function(e){return e.blob()}).then(function(e){return createImageBitmap(e,Object.assign(r.options,{colorSpaceConversion:"none"}))}).then(function(i){return ak.add(e,i),t&&t(i),r.manager.itemEnd(e),i}).catch(function(t){n&&n(t),ak.remove(e),r.manager.itemError(e),r.manager.itemEnd(e)});ak.add(e,o),r.manager.itemStart(e)}}class sx{static getContext(){return void 0===n&&(n=new(window.AudioContext||window.webkitAudioContext)),n}static setContext(e){n=e}}class sy extends aV{constructor(e){super(e)}load(e,t,i,n){let r=this,a=new aX(this.manager);function s(t){n?n(t):console.error(t),r.manager.itemError(e)}a.setResponseType("arraybuffer"),a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(e){try{let i=e.slice(0);sx.getContext().decodeAudioData(i,function(e){t(e)}).catch(s)}catch(e){s(e)}},i,n)}}let sS=new e2,sA=new e2,sM=new e2;class sb{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new iC,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new iC,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){let t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){let i,n;t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep,sM.copy(e.projectionMatrix);let r=t.eyeSep/2,a=r*t.near/t.focus,s=t.near*Math.tan(z*t.fov*.5)/t.zoom;sA.elements[12]=-r,sS.elements[12]=r,i=-s*t.aspect+a,n=s*t.aspect+a,sM.elements[0]=2*t.near/(n-i),sM.elements[8]=(n+i)/(n-i),this.cameraL.projectionMatrix.copy(sM),i=-s*t.aspect-a,n=s*t.aspect-a,sM.elements[0]=2*t.near/(n-i),sM.elements[8]=(n+i)/(n-i),this.cameraR.projectionMatrix.copy(sM)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(sA),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(sS)}}class sw extends iC{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class sT{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=sE(),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){let t=sE();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function sE(){return performance.now()}let s_=new eE,sC=new eT,sR=new eE,sP=new eE;class sD extends ty{constructor(){super(),this.type="AudioListener",this.context=sx.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new sT}getInput(){return this.gain}removeFilter(){return null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);let t=this.context.listener,i=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(s_,sC,sR),sP.set(0,0,-1).applyQuaternion(sC),t.positionX){let e=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(s_.x,e),t.positionY.linearRampToValueAtTime(s_.y,e),t.positionZ.linearRampToValueAtTime(s_.z,e),t.forwardX.linearRampToValueAtTime(sP.x,e),t.forwardY.linearRampToValueAtTime(sP.y,e),t.forwardZ.linearRampToValueAtTime(sP.z,e),t.upX.linearRampToValueAtTime(i.x,e),t.upY.linearRampToValueAtTime(i.y,e),t.upZ.linearRampToValueAtTime(i.z,e)}else t.setPosition(s_.x,s_.y,s_.z),t.setOrientation(sP.x,sP.y,sP.z,i.x,i.y,i.z)}}class sI extends ty{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(!0===this.isPlaying)return void console.warn("THREE.Audio: Audio is already playing.");if(!1===this.hasPlaybackControl)return void console.warn("THREE.Audio: this Audio has no playback control.");this._startedAt=this.context.currentTime+e;let t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){return!1===this.hasPlaybackControl?void console.warn("THREE.Audio: this Audio has no playback control."):(!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this)}stop(e=0){return!1===this.hasPlaybackControl?void console.warn("THREE.Audio: this Audio has no playback control."):(this._progress=0,null!==this.source&&(this.source.stop(this.context.currentTime+e),this.source.onended=null),this.isPlaying=!1,this)}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(!1!==this._connected){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}}getFilters(){return this.filters}setFilters(e){return e||(e=[]),!0===this._connected?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this}setDetune(e){return this.detune=e,!0===this.isPlaying&&void 0!==this.source.detune&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(e){return this.setFilters(e?[e]:[])}setPlaybackRate(e){return!1===this.hasPlaybackControl?void console.warn("THREE.Audio: this Audio has no playback control."):(this.playbackRate=e,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this)}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1,this._progress=0}getLoop(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop}setLoop(e){return!1===this.hasPlaybackControl?void console.warn("THREE.Audio: this Audio has no playback control."):(this.loop=e,!0===this.isPlaying&&(this.source.loop=this.loop),this)}setLoopStart(e){return this.loopStart=e,this}setLoopEnd(e){return this.loopEnd=e,this}getVolume(){return this.gain.gain.value}setVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}copy(e,t){return(super.copy(e,t),"buffer"!==e.sourceType)?console.warn("THREE.Audio: Audio source type cannot be copied."):(this.autoplay=e.autoplay,this.buffer=e.buffer,this.detune=e.detune,this.loop=e.loop,this.loopStart=e.loopStart,this.loopEnd=e.loopEnd,this.offset=e.offset,this.duration=e.duration,this.playbackRate=e.playbackRate,this.hasPlaybackControl=e.hasPlaybackControl,this.sourceType=e.sourceType,this.filters=e.filters.slice()),this}clone(e){return new this.constructor(this.listener).copy(this,e)}}let sL=new eE,sB=new eT,sU=new eE,sN=new eE;class sF extends sI{constructor(e){super(e),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}connect(){super.connect(),this.panner.connect(this.gain)}disconnect(){super.disconnect(),this.panner.disconnect(this.gain)}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(e){return this.panner.refDistance=e,this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(e){return this.panner.rolloffFactor=e,this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(e){return this.panner.distanceModel=e,this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(e){return this.panner.maxDistance=e,this}setDirectionalCone(e,t,i){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=t,this.panner.coneOuterGain=i,this}updateMatrixWorld(e){if(super.updateMatrixWorld(e),!0===this.hasPlaybackControl&&!1===this.isPlaying)return;this.matrixWorld.decompose(sL,sB,sU),sN.set(0,0,1).applyQuaternion(sB);let t=this.panner;if(t.positionX){let e=this.context.currentTime+this.listener.timeDelta;t.positionX.linearRampToValueAtTime(sL.x,e),t.positionY.linearRampToValueAtTime(sL.y,e),t.positionZ.linearRampToValueAtTime(sL.z,e),t.orientationX.linearRampToValueAtTime(sN.x,e),t.orientationY.linearRampToValueAtTime(sN.y,e),t.orientationZ.linearRampToValueAtTime(sN.z,e)}else t.setPosition(sL.x,sL.y,sL.z),t.setOrientation(sN.x,sN.y,sN.z)}}class sO{constructor(e,t=2048){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=t,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let e=0,t=this.getFrequencyData();for(let i=0;i<t.length;i++)e+=t[i];return e/t.length}}class sz{constructor(e,t,i){let n,r,a;switch(this.binding=e,this.valueSize=i,t){case"quaternion":n=this._slerp,r=this._slerpAdditive,a=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*i),this._workIndex=5;break;case"string":case"bool":n=this._select,r=this._select,a=this._setAdditiveIdentityOther,this.buffer=Array(5*i);break;default:n=this._lerp,r=this._lerpAdditive,a=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*i)}this._mixBufferRegion=n,this._mixBufferRegionAdditive=r,this._setIdentity=a,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,t){let i=this.buffer,n=this.valueSize,r=e*n+n,a=this.cumulativeWeight;if(0===a){for(let e=0;e!==n;++e)i[r+e]=i[e];a=t}else{a+=t;let e=t/a;this._mixBufferRegion(i,r,0,e,n)}this.cumulativeWeight=a}accumulateAdditive(e){let t=this.buffer,i=this.valueSize,n=i*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(t,n,0,e,i),this.cumulativeWeightAdditive+=e}apply(e){let t=this.valueSize,i=this.buffer,n=e*t+t,r=this.cumulativeWeight,a=this.cumulativeWeightAdditive,s=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,r<1){let e=t*this._origIndex;this._mixBufferRegion(i,n,e,1-r,t)}a>0&&this._mixBufferRegionAdditive(i,n,this._addIndex*t,1,t);for(let e=t,r=t+t;e!==r;++e)if(i[e]!==i[e+t]){s.setValue(i,n);break}}saveOriginalState(){let e=this.binding,t=this.buffer,i=this.valueSize,n=i*this._origIndex;e.getValue(t,n);for(let e=i;e!==n;++e)t[e]=t[n+e%i];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){let e=3*this.valueSize;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){let e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let i=e;i<t;i++)this.buffer[i]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){let e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize;for(let i=0;i<this.valueSize;i++)this.buffer[t+i]=this.buffer[e+i]}_select(e,t,i,n,r){if(n>=.5)for(let n=0;n!==r;++n)e[t+n]=e[i+n]}_slerp(e,t,i,n){eT.slerpFlat(e,t,e,t,e,i,n)}_slerpAdditive(e,t,i,n,r){let a=this._workIndex*r;eT.multiplyQuaternionsFlat(e,a,e,t,e,i),eT.slerpFlat(e,t,e,t,e,a,n)}_lerp(e,t,i,n,r){let a=1-n;for(let s=0;s!==r;++s){let r=t+s;e[r]=e[r]*a+e[i+s]*n}}_lerpAdditive(e,t,i,n,r){for(let a=0;a!==r;++a){let r=t+a;e[r]=e[r]+e[i+a]*n}}}let sk="\\[\\]\\.:\\/",sH=RegExp("["+sk+"]","g"),sG="[^"+sk+"]",sV="[^"+sk.replace("\\.","")+"]",sW=RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",sG)+/(WCOD+)?/.source.replace("WCOD",sV)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",sG)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",sG)+"$"),sj=["material","materials","bones","map"];class sX{constructor(e,t,i){this.path=t,this.parsedPath=i||sX.parseTrackName(t),this.node=sX.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,i){return e&&e.isAnimationObjectGroup?new sX.Composite(e,t,i):new sX(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(sH,"")}static parseTrackName(e){let t=sW.exec(e);if(null===t)throw Error("PropertyBinding: Cannot parse trackName: "+e);let i={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},n=i.nodeName&&i.nodeName.lastIndexOf(".");if(void 0!==n&&-1!==n){let e=i.nodeName.substring(n+1);-1!==sj.indexOf(e)&&(i.nodeName=i.nodeName.substring(0,n),i.objectName=e)}if(null===i.propertyName||0===i.propertyName.length)throw Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,t){if(void 0===t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){let i=e.skeleton.getBoneByName(t);if(void 0!==i)return i}if(e.children){let i=function(e){for(let n=0;n<e.length;n++){let r=e[n];if(r.name===t||r.uuid===t)return r;let a=i(r.children);if(a)return a}return null},n=i(e.children);if(n)return n}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){let i=this.resolvedProperty;for(let n=0,r=i.length;n!==r;++n)e[t++]=i[n]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){let i=this.resolvedProperty;for(let n=0,r=i.length;n!==r;++n)i[n]=e[t++]}_setValue_array_setNeedsUpdate(e,t){let i=this.resolvedProperty;for(let n=0,r=i.length;n!==r;++n)i[n]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){let i=this.resolvedProperty;for(let n=0,r=i.length;n!==r;++n)i[n]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node,t=this.parsedPath,i=t.objectName,n=t.propertyName,r=t.propertyIndex;if(e||(e=sX.findNode(this.rootNode,t.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e)return void console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");if(i){let n=t.objectIndex;switch(i){case"materials":if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);e=e.skeleton.bones;for(let t=0;t<e.length;t++)if(e[t].name===n){n=t;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.map)return void console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);e=e.material.map;break;default:if(void 0===e[i])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[i]}if(void 0!==n){if(void 0===e[n])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[n]}}let a=e[n];if(void 0===a)return void console.error("THREE.PropertyBinding: Trying to update property for track: "+t.nodeName+"."+n+" but it wasn't found.",e);let s=this.Versioning.None;this.targetObject=e,void 0!==e.needsUpdate?s=this.Versioning.NeedsUpdate:void 0!==e.matrixWorldNeedsUpdate&&(s=this.Versioning.MatrixWorldNeedsUpdate);let o=this.BindingType.Direct;if(void 0!==r){if("morphTargetInfluences"===n){if(!e.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!e.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==e.morphTargetDictionary[r]&&(r=e.morphTargetDictionary[r])}o=this.BindingType.ArrayElement,this.resolvedProperty=a,this.propertyIndex=r}else void 0!==a.fromArray&&void 0!==a.toArray?(o=this.BindingType.HasFromToArray,this.resolvedProperty=a):Array.isArray(a)?(o=this.BindingType.EntireArray,this.resolvedProperty=a):this.propertyName=n;this.getValue=this.GetterByBindingType[o],this.setValue=this.SetterByBindingTypeAndVersioning[o][s]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}sX.Composite=class{constructor(e,t,i){const n=i||sX.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,n)}getValue(e,t){this.bind();let i=this._targetGroup.nCachedObjects_,n=this._bindings[i];void 0!==n&&n.getValue(e,t)}setValue(e,t){let i=this._bindings;for(let n=this._targetGroup.nCachedObjects_,r=i.length;n!==r;++n)i[n].setValue(e,t)}bind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].bind()}unbind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].unbind()}},sX.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},sX.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},sX.prototype.GetterByBindingType=[sX.prototype._getValue_direct,sX.prototype._getValue_array,sX.prototype._getValue_arrayElement,sX.prototype._getValue_toArray],sX.prototype.SetterByBindingTypeAndVersioning=[[sX.prototype._setValue_direct,sX.prototype._setValue_direct_setNeedsUpdate,sX.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[sX.prototype._setValue_array,sX.prototype._setValue_array_setNeedsUpdate,sX.prototype._setValue_array_setMatrixWorldNeedsUpdate],[sX.prototype._setValue_arrayElement,sX.prototype._setValue_arrayElement_setNeedsUpdate,sX.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[sX.prototype._setValue_fromArray,sX.prototype._setValue_fromArray_setNeedsUpdate,sX.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class sY{constructor(){this.isAnimationObjectGroup=!0,this.uuid=H(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const e={};this._indicesByUUID=e;for(let t=0,i=arguments.length;t!==i;++t)e[arguments[t].uuid]=t;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const t=this;this.stats={objects:{get total(){return t._objects.length},get inUse(){return this.total-t.nCachedObjects_}},get bindingsPerObject(){return t._bindings.length}}}add(){let e=this._objects,t=this._indicesByUUID,i=this._paths,n=this._parsedPaths,r=this._bindings,a=r.length,s,o=e.length,l=this.nCachedObjects_;for(let u=0,c=arguments.length;u!==c;++u){let c=arguments[u],h=c.uuid,d=t[h];if(void 0===d){d=o++,t[h]=d,e.push(c);for(let e=0;e!==a;++e)r[e].push(new sX(c,i[e],n[e]))}else if(d<l){s=e[d];let o=--l,u=e[o];t[u.uuid]=d,e[d]=u,t[h]=o,e[o]=c;for(let e=0;e!==a;++e){let t=r[e],a=t[o],s=t[d];t[d]=a,void 0===s&&(s=new sX(c,i[e],n[e])),t[o]=s}}else e[d]!==s&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=l}remove(){let e=this._objects,t=this._indicesByUUID,i=this._bindings,n=i.length,r=this.nCachedObjects_;for(let a=0,s=arguments.length;a!==s;++a){let s=arguments[a],o=s.uuid,l=t[o];if(void 0!==l&&l>=r){let a=r++,u=e[a];t[u.uuid]=l,e[l]=u,t[o]=a,e[a]=s;for(let e=0;e!==n;++e){let t=i[e],n=t[a],r=t[l];t[l]=n,t[a]=r}}}this.nCachedObjects_=r}uncache(){let e=this._objects,t=this._indicesByUUID,i=this._bindings,n=i.length,r=this.nCachedObjects_,a=e.length;for(let s=0,o=arguments.length;s!==o;++s){let o=arguments[s],l=o.uuid,u=t[l];if(void 0!==u)if(delete t[l],u<r){let s=--r,o=e[s],l=--a,c=e[l];t[o.uuid]=u,e[u]=o,t[c.uuid]=s,e[s]=c,e.pop();for(let e=0;e!==n;++e){let t=i[e],n=t[s],r=t[l];t[u]=n,t[s]=r,t.pop()}}else{let r=--a,s=e[r];r>0&&(t[s.uuid]=u),e[u]=s,e.pop();for(let e=0;e!==n;++e){let t=i[e];t[u]=t[r],t.pop()}}}this.nCachedObjects_=r}subscribe_(e,t){let i=this._bindingsIndicesByPath,n=i[e],r=this._bindings;if(void 0!==n)return r[n];let a=this._paths,s=this._parsedPaths,o=this._objects,l=o.length,u=this.nCachedObjects_,c=Array(l);n=r.length,i[e]=n,a.push(e),s.push(t),r.push(c);for(let i=u,n=o.length;i!==n;++i){let n=o[i];c[i]=new sX(n,e,t)}return c}unsubscribe_(e){let t=this._bindingsIndicesByPath,i=t[e];if(void 0!==i){let n=this._paths,r=this._parsedPaths,a=this._bindings,s=a.length-1,o=a[s];t[e[s]]=i,a[i]=o,a.pop(),r[i]=r[s],r.pop(),n[i]=n[s],n.pop()}}}class sQ{constructor(e,t,i=null,n=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=i,this.blendMode=n;const r=t.tracks,a=r.length,s=Array(a),o={endingStart:2400,endingEnd:2400};for(let e=0;e!==a;++e){const t=r[e].createInterpolant(null);s[e]=t,t.settings=o}this._interpolantSettings=o,this._interpolants=s,this._propertyBindings=Array(a),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,i){if(e.fadeOut(t),this.fadeIn(t),i){let i=this._clip.duration,n=e._clip.duration;e.warp(1,n/i,t),this.warp(i/n,1,t)}return this}crossFadeTo(e,t,i){return e.crossFadeFrom(this,t,i)}stopFading(){let e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,i){let n=this._mixer,r=n.time,a=this.timeScale,s=this._timeScaleInterpolant;null===s&&(s=n._lendControlInterpolant(),this._timeScaleInterpolant=s);let o=s.parameterPositions,l=s.sampleValues;return o[0]=r,o[1]=r+i,l[0]=e/a,l[1]=t/a,this}stopWarping(){let e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,i,n){if(!this.enabled)return void this._updateWeight(e);let r=this._startTime;if(null!==r){let n=(e-r)*i;n<0||0===i?t=0:(this._startTime=null,t=i*n)}t*=this._updateTimeScale(e);let a=this._updateTime(t),s=this._updateWeight(e);if(s>0){let e=this._interpolants,t=this._propertyBindings;if(2501===this.blendMode)for(let i=0,n=e.length;i!==n;++i)e[i].evaluate(a),t[i].accumulateAdditive(s);else for(let i=0,r=e.length;i!==r;++i)e[i].evaluate(a),t[i].accumulate(n,s)}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;let i=this._weightInterpolant;if(null!==i){let n=i.evaluate(e)[0];t*=n,e>i.parameterPositions[1]&&(this.stopFading(),0===n&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;let i=this._timeScaleInterpolant;null!==i&&(t*=i.evaluate(e)[0],e>i.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t))}return this._effectiveTimeScale=t,t}_updateTime(e){let t=this._clip.duration,i=this.loop,n=this.time+e,r=this._loopCount,a=2202===i;if(0===e)return -1===r?n:a&&(1&r)==1?t-n:n;if(2200===i){-1===r&&(this._loopCount=0,this._setEndings(!0,!0,!1));s:{if(n>=t)n=t;else if(n<0)n=0;else{this.time=n;break s}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=n,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===r&&(e>=0?(r=0,this._setEndings(!0,0===this.repetitions,a)):this._setEndings(0===this.repetitions,!0,a)),n>=t||n<0){let i=Math.floor(n/t);n-=t*i,r+=Math.abs(i);let s=this.repetitions-r;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,n=e>0?t:0,this.time=n,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===s){let t=e<0;this._setEndings(t,!t,a)}else this._setEndings(!1,!1,a);this._loopCount=r,this.time=n,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:i})}}else this.time=n;if(a&&(1&r)==1)return t-n}return n}_setEndings(e,t,i){let n=this._interpolantSettings;i?(n.endingStart=2401,n.endingEnd=2401):(e?n.endingStart=this.zeroSlopeAtStart?2401:2400:n.endingStart=2402,t?n.endingEnd=this.zeroSlopeAtEnd?2401:2400:n.endingEnd=2402)}_scheduleFading(e,t,i){let n=this._mixer,r=n.time,a=this._weightInterpolant;null===a&&(a=n._lendControlInterpolant(),this._weightInterpolant=a);let s=a.parameterPositions,o=a.sampleValues;return s[0]=r,o[0]=t,s[1]=r+e,o[1]=i,this}}let sq=new Float32Array(1);class sK extends N{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){let i=e._localRoot||this._root,n=e._clip.tracks,r=n.length,a=e._propertyBindings,s=e._interpolants,o=i.uuid,l=this._bindingsByRootAndName,u=l[o];void 0===u&&(u={},l[o]=u);for(let e=0;e!==r;++e){let r=n[e],l=r.name,c=u[l];if(void 0!==c)++c.referenceCount,a[e]=c;else{if(void 0!==(c=a[e])){null===c._cacheIndex&&(++c.referenceCount,this._addInactiveBinding(c,o,l));continue}let n=t&&t._propertyBindings[e].binding.parsedPath;c=new sz(sX.create(i,l,n),r.ValueTypeName,r.getValueSize()),++c.referenceCount,this._addInactiveBinding(c,o,l),a[e]=c}s[e].resultBuffer=c.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){let t=(e._localRoot||this._root).uuid,i=e._clip.uuid,n=this._actionsByClip[i];this._bindAction(e,n&&n.knownActions[0]),this._addInactiveAction(e,i,t)}let t=e._propertyBindings;for(let e=0,i=t.length;e!==i;++e){let i=t[e];0==i.useCount++&&(this._lendBinding(i),i.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){let t=e._propertyBindings;for(let e=0,i=t.length;e!==i;++e){let i=t[e];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;let e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){let t=e._cacheIndex;return null!==t&&t<this._nActiveActions}_addInactiveAction(e,t,i){let n=this._actions,r=this._actionsByClip,a=r[t];if(void 0===a)a={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,r[t]=a;else{let t=a.knownActions;e._byClipCacheIndex=t.length,t.push(e)}e._cacheIndex=n.length,n.push(e),a.actionByRoot[i]=e}_removeInactiveAction(e){let t=this._actions,i=t[t.length-1],n=e._cacheIndex;i._cacheIndex=n,t[n]=i,t.pop(),e._cacheIndex=null;let r=e._clip.uuid,a=this._actionsByClip,s=a[r],o=s.knownActions,l=o[o.length-1],u=e._byClipCacheIndex;l._byClipCacheIndex=u,o[u]=l,o.pop(),e._byClipCacheIndex=null;let c=s.actionByRoot,h=(e._localRoot||this._root).uuid;delete c[h],0===o.length&&delete a[r],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){let t=e._propertyBindings;for(let e=0,i=t.length;e!==i;++e){let i=t[e];0==--i.referenceCount&&this._removeInactiveBinding(i)}}_lendAction(e){let t=this._actions,i=e._cacheIndex,n=this._nActiveActions++,r=t[n];e._cacheIndex=n,t[n]=e,r._cacheIndex=i,t[i]=r}_takeBackAction(e){let t=this._actions,i=e._cacheIndex,n=--this._nActiveActions,r=t[n];e._cacheIndex=n,t[n]=e,r._cacheIndex=i,t[i]=r}_addInactiveBinding(e,t,i){let n=this._bindingsByRootAndName,r=this._bindings,a=n[t];void 0===a&&(a={},n[t]=a),a[i]=e,e._cacheIndex=r.length,r.push(e)}_removeInactiveBinding(e){let t=this._bindings,i=e.binding,n=i.rootNode.uuid,r=i.path,a=this._bindingsByRootAndName,s=a[n],o=t[t.length-1],l=e._cacheIndex;o._cacheIndex=l,t[l]=o,t.pop(),delete s[r],0===Object.keys(s).length&&delete a[n]}_lendBinding(e){let t=this._bindings,i=e._cacheIndex,n=this._nActiveBindings++,r=t[n];e._cacheIndex=n,t[n]=e,r._cacheIndex=i,t[i]=r}_takeBackBinding(e){let t=this._bindings,i=e._cacheIndex,n=--this._nActiveBindings,r=t[n];e._cacheIndex=n,t[n]=e,r._cacheIndex=i,t[i]=r}_lendControlInterpolant(){let e=this._controlInterpolants,t=this._nActiveControlInterpolants++,i=e[t];return void 0===i&&((i=new aR(new Float32Array(2),new Float32Array(2),1,sq)).__cacheIndex=t,e[t]=i),i}_takeBackControlInterpolant(e){let t=this._controlInterpolants,i=e.__cacheIndex,n=--this._nActiveControlInterpolants,r=t[n];e.__cacheIndex=n,t[n]=e,r.__cacheIndex=i,t[i]=r}clipAction(e,t,i){let n=t||this._root,r=n.uuid,a="string"==typeof e?az.findByName(n,e):e,s=null!==a?a.uuid:e,o=this._actionsByClip[s],l=null;if(void 0===i&&(i=null!==a?a.blendMode:2500),void 0!==o){let e=o.actionByRoot[r];if(void 0!==e&&e.blendMode===i)return e;l=o.knownActions[0],null===a&&(a=l._clip)}if(null===a)return null;let u=new sQ(this,a,t,i);return this._bindAction(u,l),this._addInactiveAction(u,s,r),u}existingAction(e,t){let i=t||this._root,n=i.uuid,r="string"==typeof e?az.findByName(i,e):e,a=r?r.uuid:e,s=this._actionsByClip[a];return void 0!==s&&s.actionByRoot[n]||null}stopAllAction(){let e=this._actions,t=this._nActiveActions;for(let i=t-1;i>=0;--i)e[i].stop();return this}update(e){e*=this.timeScale;let t=this._actions,i=this._nActiveActions,n=this.time+=e,r=Math.sign(e),a=this._accuIndex^=1;for(let s=0;s!==i;++s)t[s]._update(n,e,r,a);let s=this._bindings,o=this._nActiveBindings;for(let e=0;e!==o;++e)s[e].apply(a);return this}setTime(e){this.time=0;for(let e=0;e<this._actions.length;e++)this._actions[e].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){let t=this._actions,i=e.uuid,n=this._actionsByClip,r=n[i];if(void 0!==r){let e=r.knownActions;for(let i=0,n=e.length;i!==n;++i){let n=e[i];this._deactivateAction(n);let r=n._cacheIndex,a=t[t.length-1];n._cacheIndex=null,n._byClipCacheIndex=null,a._cacheIndex=r,t[r]=a,t.pop(),this._removeInactiveBindingsForAction(n)}delete n[i]}}uncacheRoot(e){let t=e.uuid,i=this._actionsByClip;for(let e in i){let n=i[e].actionByRoot[t];void 0!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}let n=this._bindingsByRootAndName[t];if(void 0!==n)for(let e in n){let t=n[e];t.restoreOriginalState(),this._removeInactiveBinding(t)}}uncacheAction(e,t){let i=this.existingAction(e,t);null!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}}class sZ{constructor(e){this.value=e}clone(){return new sZ(void 0===this.value.clone?this.value:this.value.clone())}}let sJ=0;class s$ extends N{constructor(){super(),this.isUniformsGroup=!0,Object.defineProperty(this,"id",{value:sJ++}),this.name="",this.usage=35044,this.uniforms=[]}add(e){return this.uniforms.push(e),this}remove(e){let t=this.uniforms.indexOf(e);return -1!==t&&this.uniforms.splice(t,1),this}setName(e){return this.name=e,this}setUsage(e){return this.usage=e,this}dispose(){return this.dispatchEvent({type:"dispose"}),this}copy(e){this.name=e.name,this.usage=e.usage;let t=e.uniforms;this.uniforms.length=0;for(let e=0,i=t.length;e<i;e++){let i=Array.isArray(t[e])?t[e]:[t[e]];for(let e=0;e<i.length;e++)this.uniforms.push(i[e].clone())}return this}clone(){return new this.constructor().copy(this)}}class s0 extends iU{constructor(e,t,i=1){super(e,t),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=i}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){let t=super.clone(e);return t.meshPerAttribute=this.meshPerAttribute,t}toJSON(e){let t=super.toJSON(e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}}class s1{constructor(e,t,i,n,r){this.isGLBufferAttribute=!0,this.name="",this.buffer=e,this.type=t,this.itemSize=i,this.elementSize=n,this.count=r,this.version=0}set needsUpdate(e){!0===e&&this.version++}setBuffer(e){return this.buffer=e,this}setType(e,t){return this.type=e,this.elementSize=t,this}setItemSize(e){return this.itemSize=e,this}setCount(e){return this.count=e,this}}let s2=new e2;class s3{constructor(e,t,i=0,n=1/0){this.ray=new e1(e,t),this.near=i,this.far=n,this.camera=null,this.layers=new tn,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):console.error("THREE.Raycaster: Unsupported camera type: "+t.type)}setFromXRController(e){return s2.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(s2),this}intersectObject(e,t=!0,i=[]){return s5(e,this,i,t),i.sort(s4),i}intersectObjects(e,t=!0,i=[]){for(let n=0,r=e.length;n<r;n++)s5(e[n],this,i,t);return i.sort(s4),i}}function s4(e,t){return e.distance-t.distance}function s5(e,t,i,n){let r=!0;if(e.layers.test(t.layers)&&!1===e.raycast(t,i)&&(r=!1),!0===r&&!0===n){let n=e.children;for(let e=0,r=n.length;e<r;e++)s5(n[e],t,i,!0)}}class s6{constructor(e=1,t=0,i=0){return this.radius=e,this.phi=t,this.theta=i,this}set(e,t,i){return this.radius=e,this.phi=t,this.theta=i,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=G(this.phi,1e-6,Math.PI-1e-6),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,i){return this.radius=Math.sqrt(e*e+t*t+i*i),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,i),this.phi=Math.acos(G(t/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}class s8{constructor(e=1,t=0,i=0){return this.radius=e,this.theta=t,this.y=i,this}set(e,t,i){return this.radius=e,this.theta=t,this.y=i,this}copy(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,i){return this.radius=Math.sqrt(e*e+i*i),this.theta=Math.atan2(e,i),this.y=t,this}clone(){return new this.constructor().copy(this)}}class s9{constructor(e,t,i,n){s9.prototype.isMatrix2=!0,this.elements=[1,0,0,1],void 0!==e&&this.set(e,t,i,n)}identity(){return this.set(1,0,0,1),this}fromArray(e,t=0){for(let i=0;i<4;i++)this.elements[i]=e[i+t];return this}set(e,t,i,n){let r=this.elements;return r[0]=e,r[2]=t,r[1]=i,r[3]=n,this}}let s7=new Q;class oe{constructor(e=new Q(Infinity,Infinity),t=new Q(-1/0,-1/0)){this.isBox2=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromPoints(e){this.makeEmpty();for(let t=0,i=e.length;t<i;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){let i=s7.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(i),this.max.copy(e).add(i),this}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=Infinity,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(e){return this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(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}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y}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}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))}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}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,s7).distanceTo(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}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)}}let ot=new eE,oi=new eE;class on{constructor(e=new eE,t=new eE){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){ot.subVectors(e,this.start),oi.subVectors(this.end,this.start);let i=oi.dot(oi),n=oi.dot(ot)/i;return t&&(n=G(n,0,1)),n}closestPointToPoint(e,t,i){let n=this.closestPointToPointParameter(e,t);return this.delta(i).multiplyScalar(n).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}let or=new eE;class oa extends ty{constructor(e,t){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const i=new ii,n=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let e=0,t=1;e<32;e++,t++){const i=e/32*Math.PI*2,r=t/32*Math.PI*2;n.push(Math.cos(i),Math.sin(i),1,Math.cos(r),Math.sin(r),1)}i.setAttribute("position",new t4(n,3));const r=new nz({fog:!1,toneMapped:!1});this.cone=new nZ(i,r),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),this.parent?(this.parent.updateWorldMatrix(!0),this.matrix.copy(this.parent.matrixWorld).invert().multiply(this.light.matrixWorld)):this.matrix.copy(this.light.matrixWorld),this.matrixWorld.copy(this.light.matrixWorld);let e=this.light.distance?this.light.distance:1e3,t=e*Math.tan(this.light.angle);this.cone.scale.set(t,t,e),or.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(or),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}let os=new eE,oo=new e2,ol=new e2;class ou extends nZ{constructor(e){const t=function e(t){let i=[];!0===t.isBone&&i.push(t);for(let n=0;n<t.children.length;n++)i.push.apply(i,e(t.children[n]));return i}(e),i=new ii,n=[],r=[],a=new tO(0,0,1),s=new tO(0,1,0);for(let e=0;e<t.length;e++){const i=t[e];i.parent&&i.parent.isBone&&(n.push(0,0,0),n.push(0,0,0),r.push(a.r,a.g,a.b),r.push(s.r,s.g,s.b))}i.setAttribute("position",new t4(n,3)),i.setAttribute("color",new t4(r,3)),super(i,new nz({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0})),this.isSkeletonHelper=!0,this.type="SkeletonHelper",this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(e){let t=this.bones,i=this.geometry,n=i.getAttribute("position");ol.copy(this.root.matrixWorld).invert();for(let e=0,i=0;e<t.length;e++){let r=t[e];r.parent&&r.parent.isBone&&(oo.multiplyMatrices(ol,r.matrixWorld),os.setFromMatrixPosition(oo),n.setXYZ(i,os.x,os.y,os.z),oo.multiplyMatrices(ol,r.parent.matrixWorld),os.setFromMatrixPosition(oo),n.setXYZ(i+1,os.x,os.y,os.z),i+=2)}i.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}dispose(){this.geometry.dispose(),this.material.dispose()}}class oc extends ig{constructor(e,t,i){super(new at(t,4,2),new tG({wireframe:!0,fog:!1,toneMapped:!1})),this.light=e,this.color=i,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)}}let oh=new eE,od=new tO,of=new tO;class op extends ty{constructor(e,t,i){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,this.type="HemisphereLightHelper";const n=new r8(t);n.rotateY(.5*Math.PI),this.material=new tG({wireframe:!0,fog:!1,toneMapped:!1}),void 0===this.color&&(this.material.vertexColors=!0);const r=new Float32Array(3*n.getAttribute("position").count);n.setAttribute("color",new tq(r,3)),this.add(new ig(n,this.material)),this.update()}dispose(){this.children[0].geometry.dispose(),this.children[0].material.dispose()}update(){let e=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{let t=e.geometry.getAttribute("color");od.copy(this.light.color),of.copy(this.light.groundColor);for(let e=0,i=t.count;e<i;e++){let n=e<i/2?od:of;t.setXYZ(e,n.r,n.g,n.b)}t.needsUpdate=!0}this.light.updateWorldMatrix(!0,!1),e.lookAt(oh.setFromMatrixPosition(this.light.matrixWorld).negate())}}class om extends nZ{constructor(e=10,t=10,i=4473924,n=8947848){i=new tO(i),n=new tO(n);const r=t/2,a=e/t,s=e/2,o=[],l=[];for(let e=0,u=0,c=-s;e<=t;e++,c+=a){o.push(-s,0,c,s,0,c),o.push(c,0,-s,c,0,s);const t=e===r?i:n;t.toArray(l,u),u+=3,t.toArray(l,u),u+=3,t.toArray(l,u),u+=3,t.toArray(l,u),u+=3}const u=new ii;u.setAttribute("position",new t4(o,3)),u.setAttribute("color",new t4(l,3)),super(u,new nz({vertexColors:!0,toneMapped:!1})),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}class og extends nZ{constructor(e=10,t=16,i=8,n=64,r=4473924,a=8947848){r=new tO(r),a=new tO(a);const s=[],o=[];if(t>1)for(let i=0;i<t;i++){const n=i/t*(2*Math.PI),l=Math.sin(n)*e,u=Math.cos(n)*e;s.push(0,0,0),s.push(l,0,u);const c=1&i?r:a;o.push(c.r,c.g,c.b),o.push(c.r,c.g,c.b)}for(let t=0;t<i;t++){const l=1&t?r:a,u=e-e/i*t;for(let e=0;e<n;e++){let t=e/n*(2*Math.PI),i=Math.sin(t)*u,r=Math.cos(t)*u;s.push(i,0,r),o.push(l.r,l.g,l.b),i=Math.sin(t=(e+1)/n*(2*Math.PI))*u,r=Math.cos(t)*u,s.push(i,0,r),o.push(l.r,l.g,l.b)}}const l=new ii;l.setAttribute("position",new t4(s,3)),l.setAttribute("color",new t4(o,3)),super(l,new nz({vertexColors:!0,toneMapped:!1})),this.type="PolarGridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}let ov=new eE,ox=new eE,oy=new eE;class oS extends ty{constructor(e,t,i){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,this.type="DirectionalLightHelper",void 0===t&&(t=1);let n=new ii;n.setAttribute("position",new t4([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3));const r=new nz({fog:!1,toneMapped:!1});this.lightPlane=new nY(n,r),this.add(this.lightPlane),(n=new ii).setAttribute("position",new t4([0,0,0,0,0,1],3)),this.targetLine=new nY(n,r),this.add(this.targetLine),this.update()}dispose(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),ov.setFromMatrixPosition(this.light.matrixWorld),ox.setFromMatrixPosition(this.light.target.matrixWorld),oy.subVectors(ox,ov),this.lightPlane.lookAt(ox),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(ox),this.targetLine.scale.z=oy.length()}}let oA=new eE,oM=new iw;class ob extends nZ{constructor(e){const t=new ii,i=new nz({color:0xffffff,vertexColors:!0,toneMapped:!1}),n=[],r=[],a={};function s(e,t){o(e),o(t)}function o(e){n.push(0,0,0),r.push(0,0,0),void 0===a[e]&&(a[e]=[]),a[e].push(n.length/3-1)}s("n1","n2"),s("n2","n4"),s("n4","n3"),s("n3","n1"),s("f1","f2"),s("f2","f4"),s("f4","f3"),s("f3","f1"),s("n1","f1"),s("n2","f2"),s("n3","f3"),s("n4","f4"),s("p","n1"),s("p","n2"),s("p","n3"),s("p","n4"),s("u1","u2"),s("u2","u3"),s("u3","u1"),s("c","t"),s("p","c"),s("cn1","cn2"),s("cn3","cn4"),s("cf1","cf2"),s("cf3","cf4"),t.setAttribute("position",new t4(n,3)),t.setAttribute("color",new t4(r,3)),super(t,i),this.type="CameraHelper",this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=a,this.update();const l=new tO(0xffaa00),u=new tO(0xff0000),c=new tO(43775),h=new tO(0xffffff),d=new tO(3355443);this.setColors(l,u,c,h,d)}setColors(e,t,i,n,r){let a=this.geometry.getAttribute("color");a.setXYZ(0,e.r,e.g,e.b),a.setXYZ(1,e.r,e.g,e.b),a.setXYZ(2,e.r,e.g,e.b),a.setXYZ(3,e.r,e.g,e.b),a.setXYZ(4,e.r,e.g,e.b),a.setXYZ(5,e.r,e.g,e.b),a.setXYZ(6,e.r,e.g,e.b),a.setXYZ(7,e.r,e.g,e.b),a.setXYZ(8,e.r,e.g,e.b),a.setXYZ(9,e.r,e.g,e.b),a.setXYZ(10,e.r,e.g,e.b),a.setXYZ(11,e.r,e.g,e.b),a.setXYZ(12,e.r,e.g,e.b),a.setXYZ(13,e.r,e.g,e.b),a.setXYZ(14,e.r,e.g,e.b),a.setXYZ(15,e.r,e.g,e.b),a.setXYZ(16,e.r,e.g,e.b),a.setXYZ(17,e.r,e.g,e.b),a.setXYZ(18,e.r,e.g,e.b),a.setXYZ(19,e.r,e.g,e.b),a.setXYZ(20,e.r,e.g,e.b),a.setXYZ(21,e.r,e.g,e.b),a.setXYZ(22,e.r,e.g,e.b),a.setXYZ(23,e.r,e.g,e.b),a.setXYZ(24,t.r,t.g,t.b),a.setXYZ(25,t.r,t.g,t.b),a.setXYZ(26,t.r,t.g,t.b),a.setXYZ(27,t.r,t.g,t.b),a.setXYZ(28,t.r,t.g,t.b),a.setXYZ(29,t.r,t.g,t.b),a.setXYZ(30,t.r,t.g,t.b),a.setXYZ(31,t.r,t.g,t.b),a.setXYZ(32,i.r,i.g,i.b),a.setXYZ(33,i.r,i.g,i.b),a.setXYZ(34,i.r,i.g,i.b),a.setXYZ(35,i.r,i.g,i.b),a.setXYZ(36,i.r,i.g,i.b),a.setXYZ(37,i.r,i.g,i.b),a.setXYZ(38,n.r,n.g,n.b),a.setXYZ(39,n.r,n.g,n.b),a.setXYZ(40,r.r,r.g,r.b),a.setXYZ(41,r.r,r.g,r.b),a.setXYZ(42,r.r,r.g,r.b),a.setXYZ(43,r.r,r.g,r.b),a.setXYZ(44,r.r,r.g,r.b),a.setXYZ(45,r.r,r.g,r.b),a.setXYZ(46,r.r,r.g,r.b),a.setXYZ(47,r.r,r.g,r.b),a.setXYZ(48,r.r,r.g,r.b),a.setXYZ(49,r.r,r.g,r.b),a.needsUpdate=!0}update(){let e=this.geometry,t=this.pointMap;oM.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),ow("c",t,e,oM,0,0,-1),ow("t",t,e,oM,0,0,1),ow("n1",t,e,oM,-1,-1,-1),ow("n2",t,e,oM,1,-1,-1),ow("n3",t,e,oM,-1,1,-1),ow("n4",t,e,oM,1,1,-1),ow("f1",t,e,oM,-1,-1,1),ow("f2",t,e,oM,1,-1,1),ow("f3",t,e,oM,-1,1,1),ow("f4",t,e,oM,1,1,1),ow("u1",t,e,oM,.7,1.1,-1),ow("u2",t,e,oM,-.7,1.1,-1),ow("u3",t,e,oM,0,2,-1),ow("cf1",t,e,oM,-1,0,1),ow("cf2",t,e,oM,1,0,1),ow("cf3",t,e,oM,0,-1,1),ow("cf4",t,e,oM,0,1,1),ow("cn1",t,e,oM,-1,0,-1),ow("cn2",t,e,oM,1,0,-1),ow("cn3",t,e,oM,0,-1,-1),ow("cn4",t,e,oM,0,1,-1),e.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}}function ow(e,t,i,n,r,a,s){oA.set(r,a,s).unproject(n);let o=t[e];if(void 0!==o){let e=i.getAttribute("position");for(let t=0,i=o.length;t<i;t++)e.setXYZ(o[t],oA.x,oA.y,oA.z)}}let oT=new eR;class oE extends nZ{constructor(e,t=0xffff00){const i=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),n=new Float32Array(24),r=new ii;r.setIndex(new tq(i,1)),r.setAttribute("position",new tq(n,3)),super(r,new nz({color:t,toneMapped:!1})),this.object=e,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&oT.setFromObject(this.object),oT.isEmpty())return;let t=oT.min,i=oT.max,n=this.geometry.attributes.position,r=n.array;r[0]=i.x,r[1]=i.y,r[2]=i.z,r[3]=t.x,r[4]=i.y,r[5]=i.z,r[6]=t.x,r[7]=t.y,r[8]=i.z,r[9]=i.x,r[10]=t.y,r[11]=i.z,r[12]=i.x,r[13]=i.y,r[14]=t.z,r[15]=t.x,r[16]=i.y,r[17]=t.z,r[18]=t.x,r[19]=t.y,r[20]=t.z,r[21]=i.x,r[22]=t.y,r[23]=t.z,n.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(e){return this.object=e,this.update(),this}copy(e,t){return super.copy(e,t),this.object=e.object,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class o_ extends nZ{constructor(e,t=0xffff00){const i=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),n=new ii;n.setIndex(new tq(i,1)),n.setAttribute("position",new t4([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),super(n,new nz({color:t,toneMapped:!1})),this.box=e,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(e){let t=this.box;t.isEmpty()||(t.getCenter(this.position),t.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(e))}dispose(){this.geometry.dispose(),this.material.dispose()}}class oC extends nY{constructor(e,t=1,i=0xffff00){const n=new ii;n.setAttribute("position",new t4([1,-1,0,-1,1,0,-1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],3)),n.computeBoundingSphere(),super(n,new nz({color:i,toneMapped:!1})),this.type="PlaneHelper",this.plane=e,this.size=t;const r=new ii;r.setAttribute("position",new t4([1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],3)),r.computeBoundingSphere(),this.add(new ig(r,new tG({color:i,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}updateMatrixWorld(e){this.position.set(0,0,0),this.scale.set(.5*this.size,.5*this.size,1),this.lookAt(this.plane.normal),this.translateZ(-this.plane.constant),super.updateMatrixWorld(e)}dispose(){this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()}}let oR=new eE;class oP extends ty{constructor(e=new eE(0,0,1),t=new eE(0,0,0),i=1,n=0xffff00,s=.2*i,o=.2*s){super(),this.type="ArrowHelper",void 0===r&&((r=new ii).setAttribute("position",new t4([0,0,0,0,1,0],3)),(a=new rR(0,.5,1,5,1)).translate(0,-.5,0)),this.position.copy(t),this.line=new nY(r,new nz({color:n,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new ig(a,new tG({color:n,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(i,s,o)}setDirection(e){if(e.y>.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{oR.set(e.z,0,-e.x).normalize();let t=Math.acos(e.y);this.quaternion.setFromAxisAngle(oR,t)}}setLength(e,t=.2*e,i=.2*t){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(i,t,i),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class oD extends nZ{constructor(e=1){const t=new ii;t.setAttribute("position",new t4([0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],3)),t.setAttribute("color",new t4([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3)),super(t,new nz({vertexColors:!0,toneMapped:!1})),this.type="AxesHelper"}setColors(e,t,i){let n=new tO,r=this.geometry.attributes.color.array;return n.set(e),n.toArray(r,0),n.toArray(r,3),n.set(t),n.toArray(r,6),n.toArray(r,9),n.set(i),n.toArray(r,12),n.toArray(r,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class oI{constructor(){this.type="ShapePath",this.color=new tO,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new rT,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,i,n){return this.currentPath.quadraticCurveTo(e,t,i,n),this}bezierCurveTo(e,t,i,n,r,a){return this.currentPath.bezierCurveTo(e,t,i,n,r,a),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){let t,i,n,r,a,s=r1.isClockWise,o=this.subPaths;if(0===o.length)return[];let l=[];if(1===o.length)return i=o[0],(n=new rO).curves=i.curves,l.push(n),l;let u=!s(o[0].getPoints());u=e?!u:u;let c=[],h=[],d=[],f=0;h[0]=void 0,d[f]=[];for(let n=0,a=o.length;n<a;n++)t=s(r=(i=o[n]).getPoints()),(t=e?!t:t)?(!u&&h[f]&&f++,h[f]={s:new rO,p:r},h[f].s.curves=i.curves,u&&f++,d[f]=[]):d[f].push({h:i,p:r[0]});if(!h[0])return function(e){let t=[];for(let i=0,n=e.length;i<n;i++){let n=e[i],r=new rO;r.curves=n.curves,t.push(r)}return t}(o);if(h.length>1){let e=!1,t=0;for(let e=0,t=h.length;e<t;e++)c[e]=[];for(let i=0,n=h.length;i<n;i++){let n=d[i];for(let r=0;r<n.length;r++){let a=n[r],s=!0;for(let n=0;n<h.length;n++)(function(e,t){let i=t.length,n=!1;for(let r=i-1,a=0;a<i;r=a++){let i=t[r],s=t[a],o=s.x-i.x,l=s.y-i.y;if(Math.abs(l)>Number.EPSILON){if(l<0&&(i=t[a],o=-o,s=t[r],l=-l),e.y<i.y||e.y>s.y)continue;if(e.y===i.y){if(e.x===i.x)return!0}else{let t=l*(e.x-i.x)-o*(e.y-i.y);if(0===t)return!0;if(t<0)continue;n=!n}}else{if(e.y!==i.y)continue;if(s.x<=e.x&&e.x<=i.x||i.x<=e.x&&e.x<=s.x)return!0}}return n})(a.p,h[n].p)&&(i!==n&&t++,s?(s=!1,c[n].push(a)):e=!0);s&&c[i].push(a)}}t>0&&!1===e&&(d=c)}for(let e=0,t=h.length;e<t;e++){n=h[e].s,l.push(n),a=d[e];for(let e=0,t=a.length;e<t;e++)n.holes.push(a[e].h)}return l}}class oL extends N{constructor(e,t=null){super(),this.object=e,this.domElement=t,this.enabled=!0,this.state=-1,this.keys={},this.mouseButtons={LEFT:null,MIDDLE:null,RIGHT:null},this.touches={ONE:null,TWO:null}}connect(){}disconnect(){}dispose(){}update(){}}function oB(e,t,i,n){let r=function(e){switch(e){case 1009:case 1010:return{byteLength:1,components:1};case 1012:case 1011:case 1016:return{byteLength:2,components:1};case 1017:case 1018:return{byteLength:2,components:4};case 1014:case 1013:case 1015:return{byteLength:4,components:1};case 35902:return{byteLength:4,components:3}}throw Error(`Unknown texture type ${e}.`)}(n);switch(i){case 1021:case 1024:return e*t;case 1025:return e*t*2;case 1028:case 1029:return e*t/r.components*r.byteLength;case 1030:case 1031:return e*t*2/r.components*r.byteLength;case 1022:return e*t*3/r.components*r.byteLength;case 1023:case 1033:return e*t*4/r.components*r.byteLength;case 33776:case 33777:case 36196:case 37492:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*8;case 33778:case 33779:case 37496:case 37808:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*16;case 35841:case 35843:return Math.max(e,16)*Math.max(t,8)/4;case 35840:case 35842:return Math.max(e,8)*Math.max(t,8)/2;case 37809:return Math.floor((e+4)/5)*Math.floor((t+3)/4)*16;case 37810:return Math.floor((e+4)/5)*Math.floor((t+4)/5)*16;case 37811:return Math.floor((e+5)/6)*Math.floor((t+4)/5)*16;case 37812:return Math.floor((e+5)/6)*Math.floor((t+5)/6)*16;case 37813:return Math.floor((e+7)/8)*Math.floor((t+4)/5)*16;case 37814:return Math.floor((e+7)/8)*Math.floor((t+5)/6)*16;case 37815:return Math.floor((e+7)/8)*Math.floor((t+7)/8)*16;case 37816:return Math.floor((e+9)/10)*Math.floor((t+4)/5)*16;case 37817:return Math.floor((e+9)/10)*Math.floor((t+5)/6)*16;case 37818:return Math.floor((e+9)/10)*Math.floor((t+7)/8)*16;case 37819:return Math.floor((e+9)/10)*Math.floor((t+9)/10)*16;case 37820:return Math.floor((e+11)/12)*Math.floor((t+9)/10)*16;case 37821:return Math.floor((e+11)/12)*Math.floor((t+11)/12)*16;case 36492:case 36494:case 36495:case 36285:case 36286:return Math.ceil(e/4)*Math.ceil(t/4)*16;case 36283:case 36284:return Math.ceil(e/4)*Math.ceil(t/4)*8}throw Error(`Unable to determine texture byte length for ${i} format.`)}let oU={contain:function(e,t){let i=e.image&&e.image.width?e.image.width/e.image.height:1;return i>t?(e.repeat.x=1,e.repeat.y=i/t,e.offset.x=0,e.offset.y=(1-e.repeat.y)/2):(e.repeat.x=t/i,e.repeat.y=1,e.offset.x=(1-e.repeat.x)/2,e.offset.y=0),e},cover:function(e,t){let i=e.image&&e.image.width?e.image.width/e.image.height:1;return i>t?(e.repeat.x=t/i,e.repeat.y=1,e.offset.x=(1-e.repeat.x)/2,e.offset.y=0):(e.repeat.x=1,e.repeat.y=i/t,e.offset.x=0,e.offset.y=(1-e.repeat.y)/2),e},fill:function(e){return e.repeat.x=1,e.repeat.y=1,e.offset.x=0,e.offset.y=0,e},getByteLength:oB};class oN extends eS{constructor(e=1,t=1,i=1,n={}){console.warn('THREE.WebGLMultipleRenderTargets has been deprecated and will be removed in r172. Use THREE.WebGLRenderTarget and set the "count" parameter to enable MRT.'),super(e,t,{...n,count:i}),this.isWebGLMultipleRenderTargets=!0}get texture(){return this.textures}}function oF(){let e=null,t=!1,i=null,n=null;function r(t,a){i(t,a),n=e.requestAnimationFrame(r)}return{start:function(){!0===t||null!==i&&(n=e.requestAnimationFrame(r),t=!0)},stop:function(){e.cancelAnimationFrame(n),t=!1},setAnimationLoop:function(e){i=e},setContext:function(t){e=t}}}function oO(e){let t=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),t.get(e)},remove:function(i){i.isInterleavedBufferAttribute&&(i=i.data);let n=t.get(i);n&&(e.deleteBuffer(n.buffer),t.delete(i))},update:function(i,n){if(i.isInterleavedBufferAttribute&&(i=i.data),i.isGLBufferAttribute){let e=t.get(i);(!e||e.version<i.version)&&t.set(i,{buffer:i.buffer,type:i.type,bytesPerElement:i.elementSize,version:i.version});return}let r=t.get(i);if(void 0===r)t.set(i,function(t,i){let n,r=t.array,a=t.usage,s=r.byteLength,o=e.createBuffer();if(e.bindBuffer(i,o),e.bufferData(i,r,a),t.onUploadCallback(),r instanceof Float32Array)n=e.FLOAT;else if(r instanceof Uint16Array)n=t.isFloat16BufferAttribute?e.HALF_FLOAT:e.UNSIGNED_SHORT;else if(r instanceof Int16Array)n=e.SHORT;else if(r instanceof Uint32Array)n=e.UNSIGNED_INT;else if(r instanceof Int32Array)n=e.INT;else if(r instanceof Int8Array)n=e.BYTE;else if(r instanceof Uint8Array)n=e.UNSIGNED_BYTE;else if(r instanceof Uint8ClampedArray)n=e.UNSIGNED_BYTE;else throw Error("THREE.WebGLAttributes: Unsupported buffer data format: "+r);return{buffer:o,type:n,bytesPerElement:r.BYTES_PER_ELEMENT,version:t.version,size:s}}(i,n));else if(r.version<i.version){if(r.size!==i.array.byteLength)throw Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.");!function(t,i,n){let r=i.array,a=i.updateRanges;if(e.bindBuffer(n,t),0===a.length)e.bufferSubData(n,0,r);else{a.sort((e,t)=>e.start-t.start);let t=0;for(let e=1;e<a.length;e++){let i=a[t],n=a[e];n.start<=i.start+i.count+1?i.count=Math.max(i.count,n.start+n.count-i.start):a[++t]=n}a.length=t+1;for(let t=0,i=a.length;t<i;t++){let i=a[t];e.bufferSubData(n,i.start*r.BYTES_PER_ELEMENT,r,i.start,i.count)}i.clearUpdateRanges()}i.onUploadCallback()}(r.buffer,i,n),r.version=i.version}}}}"u">typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:"171"}})),"u">typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__="171"),e.s(["ACESFilmicToneMapping",0,4,"AddEquation",0,100,"AddOperation",0,2,"AdditiveAnimationBlendMode",0,2501,"AdditiveBlending",0,2,"AgXToneMapping",0,6,"AlphaFormat",0,1021,"AlwaysCompare",0,519,"AlwaysDepth",0,1,"AlwaysStencilFunc",0,519,"AmbientLight",0,sa,"AnimationAction",0,sQ,"AnimationClip",0,az,"AnimationLoader",0,aY,"AnimationMixer",0,sK,"AnimationObjectGroup",0,sY,"AnimationUtils",0,aE,"ArcCurve",0,rs,"ArrayCamera",0,sw,"ArrowHelper",0,oP,"AttachedBindMode",0,R,"Audio",0,sI,"AudioAnalyser",0,sO,"AudioContext",0,sx,"AudioListener",0,sD,"AudioLoader",0,sy,"AxesHelper",0,oD,"BackSide",0,1,"BasicDepthPacking",0,3200,"BasicShadowMap",0,0,"BatchedMesh",0,nO,"Bone",0,ni,"BooleanKeyframeTrack",0,aI,"Box2",0,oe,"Box3",0,eR,"Box3Helper",0,o_,"BoxGeometry",0,ix,"BoxHelper",0,oE,"BufferAttribute",0,tq,"BufferGeometry",0,ii,"BufferGeometryLoader",0,sd,"ByteType",0,1010,"Cache",0,ak,"Camera",0,iw,"CameraHelper",0,ob,"CanvasTexture",0,ri,"CapsuleGeometry",0,r_,"CatmullRomCurve3",0,rd,"CineonToneMapping",0,3,"CircleGeometry",0,rC,"ClampToEdgeWrapping",0,1001,"Clock",0,sT,"Color",0,tO,"ColorKeyframeTrack",0,aL,"ColorManagement",0,eu,"CompressedArrayTexture",0,re,"CompressedCubeTexture",0,rt,"CompressedTexture",0,n7,"CompressedTextureLoader",0,aQ,"ConeGeometry",0,rP,"ConstantAlphaFactor",0,213,"ConstantColorFactor",0,211,"Controls",0,oL,"CubeCamera",0,iR,"CubeReflectionMapping",0,301,"CubeRefractionMapping",0,302,"CubeTexture",0,iP,"CubeTextureLoader",0,aK,"CubeUVReflectionMapping",0,306,"CubicBezierCurve",0,rg,"CubicBezierCurve3",0,rv,"CubicInterpolant",0,aC,"CullFaceBack",0,1,"CullFaceFront",0,2,"CullFaceFrontBack",0,3,"CullFaceNone",0,0,"Curve",0,rr,"CurvePath",0,rw,"CustomBlending",0,5,"CustomToneMapping",0,5,"CylinderGeometry",0,rR,"Cylindrical",0,s8,"Data3DTexture",0,eb,"DataArrayTexture",0,eA,"DataTexture",0,nn,"DataTextureLoader",0,aZ,"DataUtils",0,tX,"DecrementStencilOp",0,7683,"DecrementWrapStencilOp",0,34056,"DefaultLoadingManager",0,aG,"DepthFormat",0,1026,"DepthStencilFormat",0,1027,"DepthTexture",0,rn,"DetachedBindMode",0,P,"DirectionalLight",0,sr,"DirectionalLightHelper",0,oS,"DiscreteInterpolant",0,aP,"DodecahedronGeometry",0,rI,"DoubleSide",0,2,"DstAlphaFactor",0,206,"DstColorFactor",0,208,"DynamicCopyUsage",0,35050,"DynamicDrawUsage",0,35048,"DynamicReadUsage",0,35049,"EdgesGeometry",0,rF,"EllipseCurve",0,ra,"EqualCompare",0,514,"EqualDepth",0,4,"EqualStencilFunc",0,514,"EquirectangularReflectionMapping",0,303,"EquirectangularRefractionMapping",0,304,"Euler",0,ti,"EventDispatcher",0,N,"ExtrudeGeometry",0,r4,"FileLoader",0,aX,"Float16BufferAttribute",0,t3,"Float32BufferAttribute",0,t4,"FloatType",0,1015,"Fog",0,iL,"FogExp2",0,iI,"FramebufferTexture",0,n9,"FrontSide",0,0,"Frustum",0,nM,"GLBufferAttribute",0,s1,"GLSL1",0,"100","GLSL3",0,U,"GreaterCompare",0,516,"GreaterDepth",0,6,"GreaterEqualCompare",0,518,"GreaterEqualDepth",0,5,"GreaterEqualStencilFunc",0,518,"GreaterStencilFunc",0,516,"GridHelper",0,om,"Group",0,n6,"HalfFloatType",0,1016,"HemisphereLight",0,a0,"HemisphereLightHelper",0,op,"IcosahedronGeometry",0,r6,"ImageBitmapLoader",0,sv,"ImageLoader",0,aq,"ImageUtils",0,ed,"IncrementStencilOp",0,7682,"IncrementWrapStencilOp",0,34055,"InstancedBufferAttribute",0,no,"InstancedBufferGeometry",0,sh,"InstancedInterleavedBuffer",0,s0,"InstancedMesh",0,nm,"Int16BufferAttribute",0,t$,"Int32BufferAttribute",0,t1,"Int8BufferAttribute",0,tK,"IntType",0,1013,"InterleavedBuffer",0,iU,"InterleavedBufferAttribute",0,iF,"Interpolant",0,a_,"InterpolateDiscrete",0,2300,"InterpolateLinear",0,2301,"InterpolateSmooth",0,2302,"InvertStencilOp",0,5386,"KeepStencilOp",0,7680,"KeyframeTrack",0,aD,"LOD",0,i1,"LatheGeometry",0,rE,"Layers",0,tn,"LessCompare",0,513,"LessDepth",0,2,"LessEqualCompare",0,515,"LessEqualDepth",0,3,"LessEqualStencilFunc",0,515,"LessStencilFunc",0,513,"Light",0,a$,"LightProbe",0,sl,"Line",0,nY,"Line3",0,on,"LineBasicMaterial",0,nz,"LineCurve",0,rx,"LineCurve3",0,ry,"LineDashedMaterial",0,aS,"LineLoop",0,nJ,"LineSegments",0,nZ,"LinearFilter",0,1006,"LinearInterpolant",0,aR,"LinearMipMapLinearFilter",0,1008,"LinearMipMapNearestFilter",0,1007,"LinearMipmapLinearFilter",0,1008,"LinearMipmapNearestFilter",0,1007,"LinearSRGBColorSpace",0,I,"LinearToneMapping",0,1,"LinearTransfer",0,L,"Loader",0,aV,"LoaderUtils",0,sc,"LoadingManager",0,aH,"LoopOnce",0,2200,"LoopPingPong",0,2202,"LoopRepeat",0,2201,"LuminanceAlphaFormat",0,1025,"LuminanceFormat",0,1024,"MOUSE",0,_,"Material",0,tH,"MaterialLoader",0,su,"MathUtils",0,Y,"Matrix2",0,s9,"Matrix3",0,q,"Matrix4",0,e2,"MaxEquation",0,104,"Mesh",0,ig,"MeshBasicMaterial",0,tG,"MeshDepthMaterial",0,av,"MeshDistanceMaterial",0,ax,"MeshLambertMaterial",0,ag,"MeshMatcapMaterial",0,ay,"MeshNormalMaterial",0,am,"MeshPhongMaterial",0,af,"MeshPhysicalMaterial",0,ad,"MeshStandardMaterial",0,ah,"MeshToonMaterial",0,ap,"MinEquation",0,103,"MirroredRepeatWrapping",0,1002,"MixOperation",0,1,"MultiplyBlending",0,4,"MultiplyOperation",0,0,"NearestFilter",0,1003,"NearestMipMapLinearFilter",0,1005,"NearestMipMapNearestFilter",0,1004,"NearestMipmapLinearFilter",0,1005,"NearestMipmapNearestFilter",0,1004,"NeutralToneMapping",0,7,"NeverCompare",0,512,"NeverDepth",0,0,"NeverStencilFunc",0,512,"NoBlending",0,0,"NoColorSpace",0,"","NoToneMapping",0,0,"NormalAnimationBlendMode",0,2500,"NormalBlending",0,1,"NotEqualCompare",0,517,"NotEqualDepth",0,7,"NotEqualStencilFunc",0,517,"NumberKeyframeTrack",0,aB,"Object3D",0,ty,"ObjectLoader",0,sf,"ObjectSpaceNormalMap",0,1,"OctahedronGeometry",0,r8,"OneFactor",0,201,"OneMinusConstantAlphaFactor",0,214,"OneMinusConstantColorFactor",0,212,"OneMinusDstAlphaFactor",0,207,"OneMinusDstColorFactor",0,209,"OneMinusSrcAlphaFactor",0,205,"OneMinusSrcColorFactor",0,203,"OrthographicCamera",0,si,"PCFShadowMap",0,1,"PCFSoftShadowMap",0,2,"Path",0,rT,"PerspectiveCamera",0,iC,"Plane",0,ny,"PlaneGeometry",0,r9,"PlaneHelper",0,oC,"PointLight",0,st,"PointLightHelper",0,oc,"Points",0,n4,"PointsMaterial",0,n$,"PolarGridHelper",0,og,"PolyhedronGeometry",0,rD,"PositionalAudio",0,sF,"PropertyBinding",0,sX,"PropertyMixer",0,sz,"QuadraticBezierCurve",0,rS,"QuadraticBezierCurve3",0,rA,"Quaternion",0,eT,"QuaternionKeyframeTrack",0,aN,"QuaternionLinearInterpolant",0,aU,"RAD2DEG",0,k,"RED_GREEN_RGTC2_Format",0,36285,"RED_RGTC1_Format",0,36283,"REVISION",0,"171","RGBADepthPacking",0,3201,"RGBAFormat",0,1023,"RGBAIntegerFormat",0,1033,"RGBA_ASTC_10x10_Format",0,37819,"RGBA_ASTC_10x5_Format",0,37816,"RGBA_ASTC_10x6_Format",0,37817,"RGBA_ASTC_10x8_Format",0,37818,"RGBA_ASTC_12x10_Format",0,37820,"RGBA_ASTC_12x12_Format",0,37821,"RGBA_ASTC_4x4_Format",0,37808,"RGBA_ASTC_5x4_Format",0,37809,"RGBA_ASTC_5x5_Format",0,37810,"RGBA_ASTC_6x5_Format",0,37811,"RGBA_ASTC_6x6_Format",0,37812,"RGBA_ASTC_8x5_Format",0,37813,"RGBA_ASTC_8x6_Format",0,37814,"RGBA_ASTC_8x8_Format",0,37815,"RGBA_BPTC_Format",0,36492,"RGBA_ETC2_EAC_Format",0,37496,"RGBA_PVRTC_2BPPV1_Format",0,35843,"RGBA_PVRTC_4BPPV1_Format",0,35842,"RGBA_S3TC_DXT1_Format",0,33777,"RGBA_S3TC_DXT3_Format",0,33778,"RGBA_S3TC_DXT5_Format",0,33779,"RGBDepthPacking",0,3202,"RGBFormat",0,1022,"RGBIntegerFormat",0,1032,"RGB_BPTC_SIGNED_Format",0,36494,"RGB_BPTC_UNSIGNED_Format",0,36495,"RGB_ETC1_Format",0,36196,"RGB_ETC2_Format",0,37492,"RGB_PVRTC_2BPPV1_Format",0,35841,"RGB_PVRTC_4BPPV1_Format",0,35840,"RGB_S3TC_DXT1_Format",0,33776,"RGDepthPacking",0,3203,"RGFormat",0,1030,"RGIntegerFormat",0,1031,"RawShaderMaterial",0,ac,"Ray",0,e1,"Raycaster",0,s3,"RectAreaLight",0,ss,"RedFormat",0,1028,"RedIntegerFormat",0,1029,"ReinhardToneMapping",0,2,"RenderTarget",0,ey,"RepeatWrapping",0,1e3,"ReplaceStencilOp",0,7681,"ReverseSubtractEquation",0,102,"RingGeometry",0,r7,"SIGNED_RED_GREEN_RGTC2_Format",0,36286,"SIGNED_RED_RGTC1_Format",0,36284,"SRGBColorSpace",0,D,"SRGBTransfer",0,B,"Scene",0,iB,"ShaderMaterial",0,ib,"ShadowMaterial",0,au,"Shape",0,rO,"ShapeGeometry",0,ae,"ShapePath",0,oI,"ShapeUtils",0,r1,"ShortType",0,1011,"Skeleton",0,ns,"SkeletonHelper",0,ou,"SkinnedMesh",0,nt,"Source",0,ep,"Sphere",0,eY,"SphereGeometry",0,at,"Spherical",0,s6,"SphericalHarmonics3",0,so,"SplineCurve",0,rM,"SpotLight",0,a6,"SpotLightHelper",0,oa,"Sprite",0,iZ,"SpriteMaterial",0,iO,"SrcAlphaFactor",0,204,"SrcAlphaSaturateFactor",0,210,"SrcColorFactor",0,202,"StaticCopyUsage",0,35046,"StaticDrawUsage",0,35044,"StaticReadUsage",0,35045,"StereoCamera",0,sb,"StreamCopyUsage",0,35042,"StreamDrawUsage",0,35040,"StreamReadUsage",0,35041,"StringKeyframeTrack",0,aF,"SubtractEquation",0,101,"SubtractiveBlending",0,3,"TOUCH",0,C,"TangentSpaceNormalMap",0,0,"TetrahedronGeometry",0,ai,"Texture",0,ev,"TextureLoader",0,aJ,"TextureUtils",0,oU,"TorusGeometry",0,an,"TorusKnotGeometry",0,ar,"Triangle",0,tL,"TriangleFanDrawMode",0,2,"TriangleStripDrawMode",0,1,"TrianglesDrawMode",0,0,"TubeGeometry",0,aa,"UVMapping",0,300,"Uint16BufferAttribute",0,t0,"Uint32BufferAttribute",0,t2,"Uint8BufferAttribute",0,tZ,"Uint8ClampedBufferAttribute",0,tJ,"Uniform",0,sZ,"UniformsGroup",0,s$,"UniformsUtils",0,iM,"UnsignedByteType",0,1009,"UnsignedInt248Type",0,1020,"UnsignedInt5999Type",0,35902,"UnsignedIntType",0,1014,"UnsignedShort4444Type",0,1017,"UnsignedShort5551Type",0,1018,"UnsignedShortType",0,1012,"VSMShadowMap",0,3,"Vector2",0,Q,"Vector3",0,eE,"Vector4",0,ex,"VectorKeyframeTrack",0,aO,"VideoTexture",0,n8,"WebGL3DRenderTarget",0,ew,"WebGLArrayRenderTarget",0,eM,"WebGLCoordinateSystem",0,2e3,"WebGLCubeRenderTarget",0,iD,"WebGLMultipleRenderTargets",0,oN,"WebGLRenderTarget",0,eS,"WebGPUCoordinateSystem",0,2001,"WireframeGeometry",0,as,"WrapAroundEnding",0,2402,"ZeroCurvatureEnding",0,2400,"ZeroFactor",0,200,"ZeroSlopeEnding",0,2401,"ZeroStencilOp",0,0,"arrayNeedsUint32",0,Z,"cloneUniforms",0,iy,"createCanvasElement",0,et,"createElementNS",0,ee,"getByteLength",0,oB,"getUnlitUniformColorSpace",0,iA,"mergeUniforms",0,iS,"probeAsync",0,er,"toNormalizedProjectionMatrix",0,ea,"toReversedProjectionMatrix",0,es,"warnOnce",0,en],90072);let oz={alphahash_fragment:"#ifdef USE_ALPHAHASH\n if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\n#endif",alphahash_pars_fragment:"#ifdef USE_ALPHAHASH\n const float ALPHA_HASH_SCALE = 0.05;\n float hash2D( vec2 value ) {\n return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\n }\n float hash3D( vec3 value ) {\n return hash2D( vec2( hash2D( value.xy ), value.z ) );\n }\n float getAlphaHashThreshold( vec3 position ) {\n float maxDeriv = max(\n length( dFdx( position.xyz ) ),\n length( dFdy( position.xyz ) )\n );\n float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\n vec2 pixScales = vec2(\n exp2( floor( log2( pixScale ) ) ),\n exp2( ceil( log2( pixScale ) ) )\n );\n vec2 alpha = vec2(\n hash3D( floor( pixScales.x * position.xyz ) ),\n hash3D( floor( pixScales.y * position.xyz ) )\n );\n float lerpFactor = fract( log2( pixScale ) );\n float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\n float a = min( lerpFactor, 1.0 - lerpFactor );\n vec3 cases = vec3(\n x * x / ( 2.0 * a * ( 1.0 - a ) ),\n ( x - 0.5 * a ) / ( 1.0 - a ),\n 1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\n );\n float threshold = ( x < ( 1.0 - a ) )\n ? ( ( x < a ) ? cases.x : cases.y )\n : cases.z;\n return clamp( threshold , 1.0e-6, 1.0 );\n }\n#endif",alphamap_fragment:"#ifdef USE_ALPHAMAP\n diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n uniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef USE_ALPHATEST\n #ifdef ALPHA_TO_COVERAGE\n diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );\n if ( diffuseColor.a == 0.0 ) discard;\n #else\n if ( diffuseColor.a < alphaTest ) discard;\n #endif\n#endif",alphatest_pars_fragment:"#ifdef USE_ALPHATEST\n uniform float alphaTest;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n reflectedLight.indirectDiffuse *= ambientOcclusion;\n #if defined( USE_CLEARCOAT ) \n clearcoatSpecularIndirect *= ambientOcclusion;\n #endif\n #if defined( USE_SHEEN ) \n sheenSpecularIndirect *= ambientOcclusion;\n #endif\n #if defined( USE_ENVMAP ) && defined( STANDARD )\n float dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n #endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n uniform sampler2D aoMap;\n uniform float aoMapIntensity;\n#endif",batching_pars_vertex:"#ifdef USE_BATCHING\n #if ! defined( GL_ANGLE_multi_draw )\n #define gl_DrawID _gl_DrawID\n uniform int _gl_DrawID;\n #endif\n uniform highp sampler2D batchingTexture;\n uniform highp usampler2D batchingIdTexture;\n mat4 getBatchingMatrix( const in float i ) {\n int size = textureSize( batchingTexture, 0 ).x;\n int j = int( i ) * 4;\n int x = j % size;\n int y = j / size;\n vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );\n vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );\n vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );\n vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );\n return mat4( v1, v2, v3, v4 );\n }\n float getIndirectIndex( const in int i ) {\n int size = textureSize( batchingIdTexture, 0 ).x;\n int x = i % size;\n int y = i / size;\n return float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r );\n }\n#endif\n#ifdef USE_BATCHING_COLOR\n uniform sampler2D batchingColorTexture;\n vec3 getBatchingColor( const in float i ) {\n int size = textureSize( batchingColorTexture, 0 ).x;\n int j = int( i );\n int x = j % size;\n int y = j / size;\n return texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb;\n }\n#endif",batching_vertex:"#ifdef USE_BATCHING\n mat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) );\n#endif",begin_vertex:"vec3 transformed = vec3( position );\n#ifdef USE_ALPHAHASH\n vPosition = vec3( position );\n#endif",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n vec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"float G_BlinnPhong_Implicit( ) {\n return 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNH = saturate( dot( normal, halfDir ) );\n float dotVH = saturate( dot( viewDir, halfDir ) );\n vec3 F = F_Schlick( specularColor, 1.0, dotVH );\n float G = G_BlinnPhong_Implicit( );\n float D = D_BlinnPhong( shininess, dotNH );\n return F * ( G * D );\n} // validated",iridescence_fragment:"#ifdef USE_IRIDESCENCE\n const mat3 XYZ_TO_REC709 = mat3(\n 3.2404542, -0.9692660, 0.0556434,\n -1.5371385, 1.8760108, -0.2040259,\n -0.4985314, 0.0415560, 1.0572252\n );\n vec3 Fresnel0ToIor( vec3 fresnel0 ) {\n vec3 sqrtF0 = sqrt( fresnel0 );\n return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n }\n vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n }\n float IorToFresnel0( float transmittedIor, float incidentIor ) {\n return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n }\n vec3 evalSensitivity( float OPD, vec3 shift ) {\n float phase = 2.0 * PI * OPD * 1.0e-9;\n vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n 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 ) );\n xyz /= 1.0685e-7;\n vec3 rgb = XYZ_TO_REC709 * xyz;\n return rgb;\n }\n vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n vec3 I;\n float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n float cosTheta2Sq = 1.0 - sinTheta2Sq;\n if ( cosTheta2Sq < 0.0 ) {\n return vec3( 1.0 );\n }\n float cosTheta2 = sqrt( cosTheta2Sq );\n float R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n float R12 = F_Schlick( R0, 1.0, cosTheta1 );\n float T121 = 1.0 - R12;\n float phi12 = 0.0;\n if ( iridescenceIOR < outsideIOR ) phi12 = PI;\n float phi21 = PI - phi12;\n vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n vec3 phi23 = vec3( 0.0 );\n if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n vec3 phi = vec3( phi21 ) + phi23;\n vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n vec3 r123 = sqrt( R123 );\n vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n vec3 C0 = R12 + Rs;\n I = C0;\n vec3 Cm = Rs - T121;\n for ( int m = 1; m <= 2; ++ m ) {\n Cm *= r123;\n vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n I += Cm * Sm;\n }\n return max( I, vec3( 0.0 ) );\n }\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n uniform sampler2D bumpMap;\n uniform float bumpScale;\n vec2 dHdxy_fwd() {\n vec2 dSTdx = dFdx( vBumpMapUv );\n vec2 dSTdy = dFdy( vBumpMapUv );\n float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\n return vec2( dBx, dBy );\n }\n vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );\n vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );\n vec3 vN = surf_norm;\n vec3 R1 = cross( vSigmaY, vN );\n vec3 R2 = cross( vN, vSigmaX );\n float fDet = dot( vSigmaX, R1 ) * faceDirection;\n vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n return normalize( abs( fDet ) * surf_norm - vGrad );\n }\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n vec4 plane;\n #ifdef ALPHA_TO_COVERAGE\n float distanceToPlane, distanceGradient;\n float clipOpacity = 1.0;\n #pragma unroll_loop_start\n for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n distanceGradient = fwidth( distanceToPlane ) / 2.0;\n clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n if ( clipOpacity == 0.0 ) discard;\n }\n #pragma unroll_loop_end\n #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n float unionClipOpacity = 1.0;\n #pragma unroll_loop_start\n for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n distanceGradient = fwidth( distanceToPlane ) / 2.0;\n unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n }\n #pragma unroll_loop_end\n clipOpacity *= 1.0 - unionClipOpacity;\n #endif\n diffuseColor.a *= clipOpacity;\n if ( diffuseColor.a == 0.0 ) discard;\n #else\n #pragma unroll_loop_start\n for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n }\n #pragma unroll_loop_end\n #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n bool clipped = true;\n #pragma unroll_loop_start\n for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n }\n #pragma unroll_loop_end\n if ( clipped ) discard;\n #endif\n #endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n varying vec3 vClipPosition;\n uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n varying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n vClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n diffuseColor *= vColor;\n#elif defined( USE_COLOR )\n diffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n varying vec4 vColor;\n#elif defined( USE_COLOR )\n varying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n varying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n varying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n vColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n vColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n vColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n vColor.xyz *= instanceColor.xyz;\n#endif\n#ifdef USE_BATCHING_COLOR\n vec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n vColor.xyz *= batchingColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\n highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n return fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n float precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n float precisionSafeLength( vec3 v ) {\n float maxComponent = max3( abs( v ) );\n return length( v / maxComponent ) * maxComponent;\n }\n#endif\nstruct IncidentLight {\n vec3 color;\n vec3 direction;\n bool visible;\n};\nstruct ReflectedLight {\n vec3 directDiffuse;\n vec3 directSpecular;\n vec3 indirectDiffuse;\n vec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n varying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n mat3 tmp;\n tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n return tmp;\n}\nbool isPerspectiveMatrix( mat4 m ) {\n return m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n return vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n return RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n #define cubeUV_minMipLevel 4.0\n #define cubeUV_minTileSize 16.0\n float getFace( vec3 direction ) {\n vec3 absDirection = abs( direction );\n float face = - 1.0;\n if ( absDirection.x > absDirection.z ) {\n if ( absDirection.x > absDirection.y )\n face = direction.x > 0.0 ? 0.0 : 3.0;\n else\n face = direction.y > 0.0 ? 1.0 : 4.0;\n } else {\n if ( absDirection.z > absDirection.y )\n face = direction.z > 0.0 ? 2.0 : 5.0;\n else\n face = direction.y > 0.0 ? 1.0 : 4.0;\n }\n return face;\n }\n vec2 getUV( vec3 direction, float face ) {\n vec2 uv;\n if ( face == 0.0 ) {\n uv = vec2( direction.z, direction.y ) / abs( direction.x );\n } else if ( face == 1.0 ) {\n uv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n } else if ( face == 2.0 ) {\n uv = vec2( - direction.x, direction.y ) / abs( direction.z );\n } else if ( face == 3.0 ) {\n uv = vec2( - direction.z, direction.y ) / abs( direction.x );\n } else if ( face == 4.0 ) {\n uv = vec2( - direction.x, direction.z ) / abs( direction.y );\n } else {\n uv = vec2( direction.x, direction.y ) / abs( direction.z );\n }\n return 0.5 * ( uv + 1.0 );\n }\n vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n float face = getFace( direction );\n float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n mipInt = max( mipInt, cubeUV_minMipLevel );\n float faceSize = exp2( mipInt );\n highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n if ( face > 2.0 ) {\n uv.y += faceSize;\n face -= 3.0;\n }\n uv.x += face * faceSize;\n uv.x += filterInt * 3.0 * cubeUV_minTileSize;\n uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n uv.x *= CUBEUV_TEXEL_WIDTH;\n uv.y *= CUBEUV_TEXEL_HEIGHT;\n #ifdef texture2DGradEXT\n return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n #else\n return texture2D( envMap, uv ).rgb;\n #endif\n }\n #define cubeUV_r0 1.0\n #define cubeUV_m0 - 2.0\n #define cubeUV_r1 0.8\n #define cubeUV_m1 - 1.0\n #define cubeUV_r4 0.4\n #define cubeUV_m4 2.0\n #define cubeUV_r5 0.305\n #define cubeUV_m5 3.0\n #define cubeUV_r6 0.21\n #define cubeUV_m6 4.0\n float roughnessToMip( float roughness ) {\n float mip = 0.0;\n if ( roughness >= cubeUV_r1 ) {\n mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n } else if ( roughness >= cubeUV_r4 ) {\n mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n } else if ( roughness >= cubeUV_r5 ) {\n mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n } else if ( roughness >= cubeUV_r6 ) {\n mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n } else {\n mip = - 2.0 * log2( 1.16 * roughness ); }\n return mip;\n }\n vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n float mipF = fract( mip );\n float mipInt = floor( mip );\n vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n if ( mipF == 0.0 ) {\n return vec4( color0, 1.0 );\n } else {\n vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n return vec4( mix( color0, color1, mipF ), 1.0 );\n }\n }\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n vec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n mat3 bm = mat3( batchingMatrix );\n transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n transformedNormal = bm * transformedNormal;\n #ifdef USE_TANGENT\n transformedTangent = bm * transformedTangent;\n #endif\n#endif\n#ifdef USE_INSTANCING\n mat3 im = mat3( instanceMatrix );\n transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n transformedNormal = im * transformedNormal;\n #ifdef USE_TANGENT\n transformedTangent = im * transformedTangent;\n #endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n transformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n #ifdef FLIP_SIDED\n transformedTangent = - transformedTangent;\n #endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n uniform sampler2D displacementMap;\n uniform float displacementScale;\n uniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n #ifdef DECODE_VIDEO_TEXTURE_EMISSIVE\n emissiveColor = sRGBTransferEOTF( emissiveColor );\n #endif\n totalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n uniform sampler2D emissiveMap;\n#endif",colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_pars_fragment:"vec4 LinearTransferOETF( in vec4 value ) {\n return value;\n}\nvec4 sRGBTransferEOTF( in vec4 value ) {\n 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 );\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n 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 );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n #ifdef ENV_WORLDPOS\n vec3 cameraToFrag;\n if ( isOrthographic ) {\n cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n } else {\n cameraToFrag = normalize( vWorldPosition - cameraPosition );\n }\n vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n #ifdef ENVMAP_MODE_REFLECTION\n vec3 reflectVec = reflect( cameraToFrag, worldNormal );\n #else\n vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n #endif\n #else\n vec3 reflectVec = vReflect;\n #endif\n #ifdef ENVMAP_TYPE_CUBE\n vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n #else\n vec4 envColor = vec4( 0.0 );\n #endif\n #ifdef ENVMAP_BLENDING_MULTIPLY\n outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n #elif defined( ENVMAP_BLENDING_MIX )\n outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n #elif defined( ENVMAP_BLENDING_ADD )\n outgoingLight += envColor.xyz * specularStrength * reflectivity;\n #endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n uniform float envMapIntensity;\n uniform float flipEnvMap;\n uniform mat3 envMapRotation;\n #ifdef ENVMAP_TYPE_CUBE\n uniform samplerCube envMap;\n #else\n uniform sampler2D envMap;\n #endif\n \n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n uniform float reflectivity;\n #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n #define ENV_WORLDPOS\n #endif\n #ifdef ENV_WORLDPOS\n varying vec3 vWorldPosition;\n uniform float refractionRatio;\n #else\n varying vec3 vReflect;\n #endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n #define ENV_WORLDPOS\n #endif\n #ifdef ENV_WORLDPOS\n \n varying vec3 vWorldPosition;\n #else\n varying vec3 vReflect;\n uniform float refractionRatio;\n #endif\n#endif",envmap_physical_pars_fragment:"#ifdef USE_ENVMAP\n vec3 getIBLIrradiance( const in vec3 normal ) {\n #ifdef ENVMAP_TYPE_CUBE_UV\n vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );\n return PI * envMapColor.rgb * envMapIntensity;\n #else\n return vec3( 0.0 );\n #endif\n }\n vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n #ifdef ENVMAP_TYPE_CUBE_UV\n vec3 reflectVec = reflect( - viewDir, normal );\n reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n reflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );\n return envMapColor.rgb * envMapIntensity;\n #else\n return vec3( 0.0 );\n #endif\n }\n #ifdef USE_ANISOTROPY\n vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n #ifdef ENVMAP_TYPE_CUBE_UV\n vec3 bentNormal = cross( bitangent, viewDir );\n bentNormal = normalize( cross( bentNormal, bitangent ) );\n bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n return getIBLRadiance( viewDir, bentNormal, roughness );\n #else\n return vec3( 0.0 );\n #endif\n }\n #endif\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n #ifdef ENV_WORLDPOS\n vWorldPosition = worldPosition.xyz;\n #else\n vec3 cameraToVertex;\n if ( isOrthographic ) {\n cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n } else {\n cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n }\n vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n #ifdef ENVMAP_MODE_REFLECTION\n vReflect = reflect( cameraToVertex, worldNormal );\n #else\n vReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n #endif\n #endif\n#endif",fog_vertex:"#ifdef USE_FOG\n vFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n varying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n #ifdef FOG_EXP2\n float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n #else\n float fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n #endif\n gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n uniform vec3 fogColor;\n varying float vFogDepth;\n #ifdef FOG_EXP2\n uniform float fogDensity;\n #else\n uniform float fogNear;\n uniform float fogFar;\n #endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n uniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n float dotNL = dot( normal, lightDirection );\n vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n #ifdef USE_GRADIENTMAP\n return vec3( texture2D( gradientMap, coord ).r );\n #else\n vec2 fw = fwidth( coord ) * 0.5;\n return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n #endif\n}",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n uniform sampler2D lightMap;\n uniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n vec3 diffuseColor;\n float specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n float dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct RE_Direct_Lambert\n#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n uniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n float x = normal.x, y = normal.y, z = normal.z;\n vec3 result = shCoefficients[ 0 ] * 0.886227;\n result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n return result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n return irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n vec3 irradiance = ambientLightColor;\n return irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n if ( cutoffDistance > 0.0 ) {\n distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n }\n return distanceFalloff;\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n return smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n struct DirectionalLight {\n vec3 direction;\n vec3 color;\n };\n uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n light.color = directionalLight.color;\n light.direction = directionalLight.direction;\n light.visible = true;\n }\n#endif\n#if NUM_POINT_LIGHTS > 0\n struct PointLight {\n vec3 position;\n vec3 color;\n float distance;\n float decay;\n };\n uniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n vec3 lVector = pointLight.position - geometryPosition;\n light.direction = normalize( lVector );\n float lightDistance = length( lVector );\n light.color = pointLight.color;\n light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n light.visible = ( light.color != vec3( 0.0 ) );\n }\n#endif\n#if NUM_SPOT_LIGHTS > 0\n struct SpotLight {\n vec3 position;\n vec3 direction;\n vec3 color;\n float distance;\n float decay;\n float coneCos;\n float penumbraCos;\n };\n uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n vec3 lVector = spotLight.position - geometryPosition;\n light.direction = normalize( lVector );\n float angleCos = dot( light.direction, spotLight.direction );\n float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n if ( spotAttenuation > 0.0 ) {\n float lightDistance = length( lVector );\n light.color = spotLight.color * spotAttenuation;\n light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n light.visible = ( light.color != vec3( 0.0 ) );\n } else {\n light.color = vec3( 0.0 );\n light.visible = false;\n }\n }\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n struct RectAreaLight {\n vec3 color;\n vec3 position;\n vec3 halfWidth;\n vec3 halfHeight;\n };\n uniform sampler2D ltc_1; uniform sampler2D ltc_2;\n uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n struct HemisphereLight {\n vec3 direction;\n vec3 skyColor;\n vec3 groundColor;\n };\n uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n float dotNL = dot( normal, hemiLight.direction );\n float hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n return irradiance;\n }\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n vec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct RE_Direct_Toon\n#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n vec3 diffuseColor;\n vec3 specularColor;\n float specularShininess;\n float specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n float dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct RE_Direct_BlinnPhong\n#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n material.ior = ior;\n #ifdef USE_SPECULAR\n float specularIntensityFactor = specularIntensity;\n vec3 specularColorFactor = specularColor;\n #ifdef USE_SPECULAR_COLORMAP\n specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n #endif\n #ifdef USE_SPECULAR_INTENSITYMAP\n specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n #endif\n material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n #else\n float specularIntensityFactor = 1.0;\n vec3 specularColorFactor = vec3( 1.0 );\n material.specularF90 = 1.0;\n #endif\n material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n material.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n material.clearcoat = clearcoat;\n material.clearcoatRoughness = clearcoatRoughness;\n material.clearcoatF0 = vec3( 0.04 );\n material.clearcoatF90 = 1.0;\n #ifdef USE_CLEARCOATMAP\n material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n #endif\n #ifdef USE_CLEARCOAT_ROUGHNESSMAP\n material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n #endif\n material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n material.clearcoatRoughness += geometryRoughness;\n material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_DISPERSION\n material.dispersion = dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n material.iridescence = iridescence;\n material.iridescenceIOR = iridescenceIOR;\n #ifdef USE_IRIDESCENCEMAP\n material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n #endif\n #ifdef USE_IRIDESCENCE_THICKNESSMAP\n material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n #else\n material.iridescenceThickness = iridescenceThicknessMaximum;\n #endif\n#endif\n#ifdef USE_SHEEN\n material.sheenColor = sheenColor;\n #ifdef USE_SHEEN_COLORMAP\n material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n #endif\n material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n #ifdef USE_SHEEN_ROUGHNESSMAP\n material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n #endif\n#endif\n#ifdef USE_ANISOTROPY\n #ifdef USE_ANISOTROPYMAP\n mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n #else\n vec2 anisotropyV = anisotropyVector;\n #endif\n material.anisotropy = length( anisotropyV );\n if( material.anisotropy == 0.0 ) {\n anisotropyV = vec2( 1.0, 0.0 );\n } else {\n anisotropyV /= material.anisotropy;\n material.anisotropy = saturate( material.anisotropy );\n }\n material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n vec3 diffuseColor;\n float roughness;\n vec3 specularColor;\n float specularF90;\n float dispersion;\n #ifdef USE_CLEARCOAT\n float clearcoat;\n float clearcoatRoughness;\n vec3 clearcoatF0;\n float clearcoatF90;\n #endif\n #ifdef USE_IRIDESCENCE\n float iridescence;\n float iridescenceIOR;\n float iridescenceThickness;\n vec3 iridescenceFresnel;\n vec3 iridescenceF0;\n #endif\n #ifdef USE_SHEEN\n vec3 sheenColor;\n float sheenRoughness;\n #endif\n #ifdef IOR\n float ior;\n #endif\n #ifdef USE_TRANSMISSION\n float transmission;\n float transmissionAlpha;\n float thickness;\n float attenuationDistance;\n vec3 attenuationColor;\n #endif\n #ifdef USE_ANISOTROPY\n float anisotropy;\n float alphaT;\n vec3 anisotropyT;\n vec3 anisotropyB;\n #endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n float a2 = pow2( alpha );\n float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n return 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n float a2 = pow2( alpha );\n float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n return RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n 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 ) {\n float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n float v = 0.5 / ( gv + gl );\n return saturate(v);\n }\n float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n float a2 = alphaT * alphaB;\n highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n highp float v2 = dot( v, v );\n float w2 = a2 / v2;\n return RECIPROCAL_PI * a2 * pow2 ( w2 );\n }\n#endif\n#ifdef USE_CLEARCOAT\n vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n vec3 f0 = material.clearcoatF0;\n float f90 = material.clearcoatF90;\n float roughness = material.clearcoatRoughness;\n float alpha = pow2( roughness );\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNL = saturate( dot( normal, lightDir ) );\n float dotNV = saturate( dot( normal, viewDir ) );\n float dotNH = saturate( dot( normal, halfDir ) );\n float dotVH = saturate( dot( viewDir, halfDir ) );\n vec3 F = F_Schlick( f0, f90, dotVH );\n float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n float D = D_GGX( alpha, dotNH );\n return F * ( V * D );\n }\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n vec3 f0 = material.specularColor;\n float f90 = material.specularF90;\n float roughness = material.roughness;\n float alpha = pow2( roughness );\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNL = saturate( dot( normal, lightDir ) );\n float dotNV = saturate( dot( normal, viewDir ) );\n float dotNH = saturate( dot( normal, halfDir ) );\n float dotVH = saturate( dot( viewDir, halfDir ) );\n vec3 F = F_Schlick( f0, f90, dotVH );\n #ifdef USE_IRIDESCENCE\n F = mix( F, material.iridescenceFresnel, material.iridescence );\n #endif\n #ifdef USE_ANISOTROPY\n float dotTL = dot( material.anisotropyT, lightDir );\n float dotTV = dot( material.anisotropyT, viewDir );\n float dotTH = dot( material.anisotropyT, halfDir );\n float dotBL = dot( material.anisotropyB, lightDir );\n float dotBV = dot( material.anisotropyB, viewDir );\n float dotBH = dot( material.anisotropyB, halfDir );\n float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n #else\n float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n float D = D_GGX( alpha, dotNH );\n #endif\n return F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n const float LUT_SIZE = 64.0;\n const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n const float LUT_BIAS = 0.5 / LUT_SIZE;\n float dotNV = saturate( dot( N, V ) );\n vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n uv = uv * LUT_SCALE + LUT_BIAS;\n return uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n float l = length( f );\n return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n float x = dot( v1, v2 );\n float y = abs( x );\n float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n float b = 3.4175940 + ( 4.1616724 + y ) * y;\n float v = a / b;\n float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n return cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n vec3 lightNormal = cross( v1, v2 );\n if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n vec3 T1, T2;\n T1 = normalize( V - N * dot( V, N ) );\n T2 = - cross( N, T1 );\n mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n vec3 coords[ 4 ];\n coords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n coords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n coords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n coords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n coords[ 0 ] = normalize( coords[ 0 ] );\n coords[ 1 ] = normalize( coords[ 1 ] );\n coords[ 2 ] = normalize( coords[ 2 ] );\n coords[ 3 ] = normalize( coords[ 3 ] );\n vec3 vectorFormFactor = vec3( 0.0 );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n float result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n return vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n float alpha = pow2( roughness );\n float invAlpha = 1.0 / alpha;\n float cos2h = dotNH * dotNH;\n float sin2h = max( 1.0 - cos2h, 0.0078125 );\n return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNL = saturate( dot( normal, lightDir ) );\n float dotNV = saturate( dot( normal, viewDir ) );\n float dotNH = saturate( dot( normal, halfDir ) );\n float D = D_Charlie( sheenRoughness, dotNH );\n float V = V_Neubelt( dotNV, dotNL );\n return sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n float dotNV = saturate( dot( normal, viewDir ) );\n float r2 = roughness * roughness;\n float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n return saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n float dotNV = saturate( dot( normal, viewDir ) );\n const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n vec4 r = roughness * c0 + c1;\n float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n return fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n vec2 fab = DFGApprox( normal, viewDir, roughness );\n return specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n vec2 fab = DFGApprox( normal, viewDir, roughness );\n #ifdef USE_IRIDESCENCE\n vec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n #else\n vec3 Fr = specularColor;\n #endif\n vec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n float Ess = fab.x + fab.y;\n float Ems = 1.0 - Ess;\n vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n singleScatter += FssEss;\n multiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n 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 ) {\n vec3 normal = geometryNormal;\n vec3 viewDir = geometryViewDir;\n vec3 position = geometryPosition;\n vec3 lightPos = rectAreaLight.position;\n vec3 halfWidth = rectAreaLight.halfWidth;\n vec3 halfHeight = rectAreaLight.halfHeight;\n vec3 lightColor = rectAreaLight.color;\n float roughness = material.roughness;\n vec3 rectCoords[ 4 ];\n rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n rectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n rectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n vec2 uv = LTC_Uv( normal, viewDir, roughness );\n vec4 t1 = texture2D( ltc_1, uv );\n vec4 t2 = texture2D( ltc_2, uv );\n mat3 mInv = mat3(\n vec3( t1.x, 0, t1.y ),\n vec3( 0, 1, 0 ),\n vec3( t1.z, 0, t1.w )\n );\n vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n }\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n float dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n #ifdef USE_CLEARCOAT\n float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n vec3 ccIrradiance = dotNLcc * directLight.color;\n clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n #endif\n #ifdef USE_SHEEN\n sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n #endif\n reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n #ifdef USE_CLEARCOAT\n clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n #endif\n #ifdef USE_SHEEN\n sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n #endif\n vec3 singleScattering = vec3( 0.0 );\n vec3 multiScattering = vec3( 0.0 );\n vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n #ifdef USE_IRIDESCENCE\n computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n #else\n computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n #endif\n vec3 totalScattering = singleScattering + multiScattering;\n vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n reflectedLight.indirectSpecular += radiance * singleScattering;\n reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct RE_Direct_Physical\n#define RE_Direct_RectArea RE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular RE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n geometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n float dotNVi = saturate( dot( normal, geometryViewDir ) );\n if ( material.iridescenceThickness == 0.0 ) {\n material.iridescence = 0.0;\n } else {\n material.iridescence = saturate( material.iridescence );\n }\n if ( material.iridescence > 0.0 ) {\n material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n }\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n PointLight pointLight;\n #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n PointLightShadow pointLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n pointLight = pointLights[ i ];\n getPointLightInfo( pointLight, geometryPosition, directLight );\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n pointLightShadow = pointLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n SpotLight spotLight;\n vec4 spotColor;\n vec3 spotLightCoord;\n bool inSpotLightMap;\n #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n SpotLightShadow spotLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n spotLight = spotLights[ i ];\n getSpotLightInfo( spotLight, geometryPosition, directLight );\n #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n #else\n #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n #endif\n #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n #endif\n #undef SPOT_LIGHT_MAP_INDEX\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n spotLightShadow = spotLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n DirectionalLight directionalLight;\n #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n DirectionalLightShadow directionalLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n directionalLight = directionalLights[ i ];\n getDirectionalLightInfo( directionalLight, directLight );\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n directionalLightShadow = directionalLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n RectAreaLight rectAreaLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n rectAreaLight = rectAreaLights[ i ];\n RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n vec3 iblIrradiance = vec3( 0.0 );\n vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n #if defined( USE_LIGHT_PROBES )\n irradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n #endif\n #if ( NUM_HEMI_LIGHTS > 0 )\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n }\n #pragma unroll_loop_end\n #endif\n#endif\n#if defined( RE_IndirectSpecular )\n vec3 radiance = vec3( 0.0 );\n vec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n #ifdef USE_LIGHTMAP\n vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n irradiance += lightMapIrradiance;\n #endif\n #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n iblIrradiance += getIBLIrradiance( geometryNormal );\n #endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n #ifdef USE_ANISOTROPY\n radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n #else\n radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n #endif\n #ifdef USE_CLEARCOAT\n clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n #endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF )\n gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF )\n uniform float logDepthBufFC;\n varying float vFragDepth;\n varying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n varying float vFragDepth;\n varying float vIsPerspective;\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n vFragDepth = 1.0 + gl_Position.w;\n vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n#endif",map_fragment:"#ifdef USE_MAP\n vec4 sampledDiffuseColor = texture2D( map, vMapUv );\n #ifdef DECODE_VIDEO_TEXTURE\n sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor );\n #endif\n diffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n uniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n #if defined( USE_POINTS_UV )\n vec2 uv = vUv;\n #else\n vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n #endif\n#endif\n#ifdef USE_MAP\n diffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n diffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n varying vec2 vUv;\n#else\n #if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n uniform mat3 uvTransform;\n #endif\n#endif\n#ifdef USE_MAP\n uniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n uniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n metalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n uniform sampler2D metalnessMap;\n#endif",morphinstance_vertex:"#ifdef USE_INSTANCING_MORPH\n float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;\n }\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS )\n vColor *= morphTargetBaseInfluence;\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n #if defined( USE_COLOR_ALPHA )\n if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n #elif defined( USE_COLOR )\n if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n #endif\n }\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n objectNormal *= morphTargetBaseInfluence;\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n }\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n #ifndef USE_INSTANCING_MORPH\n uniform float morphTargetBaseInfluence;\n uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n #endif\n uniform sampler2DArray morphTargetsTexture;\n uniform ivec2 morphTargetsTextureSize;\n vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n int y = texelIndex / morphTargetsTextureSize.x;\n int x = texelIndex - y * morphTargetsTextureSize.x;\n ivec3 morphUV = ivec3( x, y, morphTargetIndex );\n return texelFetch( morphTargetsTexture, morphUV, 0 );\n }\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n transformed *= morphTargetBaseInfluence;\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n }\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n vec3 fdx = dFdx( vViewPosition );\n vec3 fdy = dFdy( vViewPosition );\n vec3 normal = normalize( cross( fdx, fdy ) );\n#else\n vec3 normal = normalize( vNormal );\n #ifdef DOUBLE_SIDED\n normal *= faceDirection;\n #endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n #ifdef USE_TANGENT\n mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n #else\n mat3 tbn = getTangentFrame( - vViewPosition, normal,\n #if defined( USE_NORMALMAP )\n vNormalMapUv\n #elif defined( USE_CLEARCOAT_NORMALMAP )\n vClearcoatNormalMapUv\n #else\n vUv\n #endif\n );\n #endif\n #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n tbn[0] *= faceDirection;\n tbn[1] *= faceDirection;\n #endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n #ifdef USE_TANGENT\n mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n #else\n mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n #endif\n #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n tbn2[0] *= faceDirection;\n tbn2[1] *= faceDirection;\n #endif\n#endif\nvec3 nonPerturbedNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n #ifdef FLIP_SIDED\n normal = - normal;\n #endif\n #ifdef DOUBLE_SIDED\n normal = normal * faceDirection;\n #endif\n normal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n mapN.xy *= normalScale;\n normal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n varying vec3 vNormal;\n #ifdef USE_TANGENT\n varying vec3 vTangent;\n varying vec3 vBitangent;\n #endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n varying vec3 vNormal;\n #ifdef USE_TANGENT\n varying vec3 vTangent;\n varying vec3 vBitangent;\n #endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n vNormal = normalize( transformedNormal );\n #ifdef USE_TANGENT\n vTangent = normalize( transformedTangent );\n vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n #endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n uniform sampler2D normalMap;\n uniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n uniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n vec3 q0 = dFdx( eye_pos.xyz );\n vec3 q1 = dFdy( eye_pos.xyz );\n vec2 st0 = dFdx( uv.st );\n vec2 st1 = dFdy( uv.st );\n vec3 N = surf_norm;\n vec3 q1perp = cross( q1, N );\n vec3 q0perp = cross( N, q0 );\n vec3 T = q1perp * st0.x + q0perp * st1.x;\n vec3 B = q1perp * st0.y + q0perp * st1.y;\n float det = max( dot( T, T ), dot( B, B ) );\n float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n return mat3( T * scale, B * scale, N );\n }\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n vec3 clearcoatNormal = nonPerturbedNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n clearcoatMapN.xy *= clearcoatNormalScale;\n clearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n uniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n uniform sampler2D clearcoatNormalMap;\n uniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n uniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n uniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n uniform sampler2D iridescenceThicknessMap;\n#endif",opaque_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n return normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n return 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n if( v <= 0.0 )\n return vec4( 0., 0., 0., 0. );\n if( v >= 1.0 )\n return vec4( 1., 1., 1., 1. );\n float vuf;\n float af = modf( v * PackFactors.a, vuf );\n float bf = modf( vuf * ShiftRight8, vuf );\n float gf = modf( vuf * ShiftRight8, vuf );\n return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n if( v <= 0.0 )\n return vec3( 0., 0., 0. );\n if( v >= 1.0 )\n return vec3( 1., 1., 1. );\n float vuf;\n float bf = modf( v * PackFactors.b, vuf );\n float gf = modf( vuf * ShiftRight8, vuf );\n return vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n if( v <= 0.0 )\n return vec2( 0., 0. );\n if( v >= 1.0 )\n return vec2( 1., 1. );\n float vuf;\n float gf = modf( v * 256., vuf );\n return vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n return dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n return dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in vec2 v ) {\n vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( const in vec4 v ) {\n return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n return ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n return depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n return ( near * far ) / ( ( far - near ) * depth - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n gl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n mvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n mvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n gl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n vec3 dithering( vec3 color ) {\n float grid_position = rand( gl_FragCoord.xy );\n vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n return color + dither_shift_RGB;\n }\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n roughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n uniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0\n uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n struct DirectionalLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n struct SpotLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n struct PointLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n float shadowCameraNear;\n float shadowCameraFar;\n };\n uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n #endif\n float texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n }\n vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n return unpackRGBATo2Half( texture2D( shadow, uv ) );\n }\n float VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n float occlusion = 1.0;\n vec2 distribution = texture2DDistribution( shadow, uv );\n float hard_shadow = step( compare , distribution.x );\n if (hard_shadow != 1.0 ) {\n float distance = compare - distribution.x ;\n float variance = max( 0.00000, distribution.y * distribution.y );\n 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 );\n }\n return occlusion;\n }\n float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n float shadow = 1.0;\n shadowCoord.xyz /= shadowCoord.w;\n shadowCoord.z += shadowBias;\n bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n bool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n if ( frustumTest ) {\n #if defined( SHADOWMAP_TYPE_PCF )\n vec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n float dx0 = - texelSize.x * shadowRadius;\n float dy0 = - texelSize.y * shadowRadius;\n float dx1 = + texelSize.x * shadowRadius;\n float dy1 = + texelSize.y * shadowRadius;\n float dx2 = dx0 / 2.0;\n float dy2 = dy0 / 2.0;\n float dx3 = dx1 / 2.0;\n float dy3 = dy1 / 2.0;\n shadow = (\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n ) * ( 1.0 / 17.0 );\n #elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n vec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n float dx = texelSize.x;\n float dy = texelSize.y;\n vec2 uv = shadowCoord.xy;\n vec2 f = fract( uv * shadowMapSize + 0.5 );\n uv -= f * texelSize;\n shadow = (\n texture2DCompare( shadowMap, uv, shadowCoord.z ) +\n texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n f.x ) +\n mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n f.x ) +\n mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n f.y ) +\n mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n f.y ) +\n mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n f.x ),\n mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n f.x ),\n f.y )\n ) * ( 1.0 / 9.0 );\n #elif defined( SHADOWMAP_TYPE_VSM )\n shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n #else\n shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n #endif\n }\n return mix( 1.0, shadow, shadowIntensity );\n }\n vec2 cubeToUV( vec3 v, float texelSizeY ) {\n vec3 absV = abs( v );\n float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n absV *= scaleToCube;\n v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n vec2 planar = v.xy;\n float almostATexel = 1.5 * texelSizeY;\n float almostOne = 1.0 - almostATexel;\n if ( absV.z >= almostOne ) {\n if ( v.z > 0.0 )\n planar.x = 4.0 - v.x;\n } else if ( absV.x >= almostOne ) {\n float signX = sign( v.x );\n planar.x = v.z * signX + 2.0 * signX;\n } else if ( absV.y >= almostOne ) {\n float signY = sign( v.y );\n planar.x = v.x + 2.0 * signY + 2.0;\n planar.y = v.z * signY - 2.0;\n }\n return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n }\n float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n float shadow = 1.0;\n vec3 lightToPosition = shadowCoord.xyz;\n \n float lightToPositionLength = length( lightToPosition );\n if ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) {\n float dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias;\n vec3 bd3D = normalize( lightToPosition );\n vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n shadow = (\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n ) * ( 1.0 / 9.0 );\n #else\n shadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n #endif\n }\n return mix( 1.0, shadow, shadowIntensity );\n }\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0\n uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n struct DirectionalLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n struct SpotLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n struct PointLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n float shadowCameraNear;\n float shadowCameraFar;\n };\n uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n #endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n vec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n #if NUM_DIR_LIGHT_SHADOWS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n }\n #pragma unroll_loop_end\n #endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n shadowWorldPosition = worldPosition;\n #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n #endif\n vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n }\n #pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n float shadow = 1.0;\n #ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0\n DirectionalLightShadow directionalLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n directionalLight = directionalLightShadows[ i ];\n shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n SpotLightShadow spotLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n spotLight = spotLightShadows[ i ];\n shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n PointLightShadow pointLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n pointLight = pointLightShadows[ i ];\n shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n }\n #pragma unroll_loop_end\n #endif\n #endif\n return shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n mat4 boneMatX = getBoneMatrix( skinIndex.x );\n mat4 boneMatY = getBoneMatrix( skinIndex.y );\n mat4 boneMatZ = getBoneMatrix( skinIndex.z );\n mat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n uniform mat4 bindMatrix;\n uniform mat4 bindMatrixInverse;\n uniform highp sampler2D boneTexture;\n mat4 getBoneMatrix( const in float i ) {\n int size = textureSize( boneTexture, 0 ).x;\n int j = int( i ) * 4;\n int x = j % size;\n int y = j / size;\n vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n return mat4( v1, v2, v3, v4 );\n }\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n vec4 skinned = vec4( 0.0 );\n skinned += boneMatX * skinVertex * skinWeight.x;\n skinned += boneMatY * skinVertex * skinWeight.y;\n skinned += boneMatZ * skinVertex * skinWeight.z;\n skinned += boneMatW * skinVertex * skinWeight.w;\n transformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n mat4 skinMatrix = mat4( 0.0 );\n skinMatrix += skinWeight.x * boneMatX;\n skinMatrix += skinWeight.y * boneMatY;\n skinMatrix += skinWeight.z * boneMatZ;\n skinMatrix += skinWeight.w * boneMatW;\n skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n #ifdef USE_TANGENT\n objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n #endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n specularStrength = texelSpecular.r;\n#else\n specularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n uniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n return saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n return saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 CineonToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n color = max( vec3( 0.0 ), color - 0.004 );\n return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n vec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n return a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n const mat3 ACESInputMat = mat3(\n vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ),\n vec3( 0.04823, 0.01566, 0.83777 )\n );\n const mat3 ACESOutputMat = mat3(\n vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ),\n vec3( -0.07367, -0.00605, 1.07602 )\n );\n color *= toneMappingExposure / 0.6;\n color = ACESInputMat * color;\n color = RRTAndODTFit( color );\n color = ACESOutputMat * color;\n return saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n vec3( 1.6605, - 0.1246, - 0.0182 ),\n vec3( - 0.5876, 1.1329, - 0.1006 ),\n vec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n vec3( 0.6274, 0.0691, 0.0164 ),\n vec3( 0.3293, 0.9195, 0.0880 ),\n vec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n vec3 x2 = x * x;\n vec3 x4 = x2 * x2;\n return + 15.5 * x4 * x2\n - 40.14 * x4 * x\n + 31.96 * x4\n - 6.868 * x2 * x\n + 0.4298 * x2\n + 0.1191 * x\n - 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n const mat3 AgXInsetMatrix = mat3(\n vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n );\n const mat3 AgXOutsetMatrix = mat3(\n vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n );\n const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069;\n color *= toneMappingExposure;\n color = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n color = AgXInsetMatrix * color;\n color = max( color, 1e-10 ); color = log2( color );\n color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n color = clamp( color, 0.0, 1.0 );\n color = agxDefaultContrastApprox( color );\n color = AgXOutsetMatrix * color;\n color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n color = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n color = clamp( color, 0.0, 1.0 );\n return color;\n}\nvec3 NeutralToneMapping( vec3 color ) {\n const float StartCompression = 0.8 - 0.04;\n const float Desaturation = 0.15;\n color *= toneMappingExposure;\n float x = min( color.r, min( color.g, color.b ) );\n float offset = x < 0.08 ? x - 6.25 * x * x : 0.04;\n color -= offset;\n float peak = max( color.r, max( color.g, color.b ) );\n if ( peak < StartCompression ) return color;\n float d = 1. - StartCompression;\n float newPeak = 1. - d * d / ( peak + d - StartCompression );\n color *= newPeak / peak;\n float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );\n return mix( color, vec3( newPeak ), g );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n material.transmission = transmission;\n material.transmissionAlpha = 1.0;\n material.thickness = thickness;\n material.attenuationDistance = attenuationDistance;\n material.attenuationColor = attenuationColor;\n #ifdef USE_TRANSMISSIONMAP\n material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n #endif\n #ifdef USE_THICKNESSMAP\n material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n #endif\n vec3 pos = vWorldPosition;\n vec3 v = normalize( cameraPosition - pos );\n vec3 n = inverseTransformDirection( normal, viewMatrix );\n vec4 transmitted = getIBLVolumeRefraction(\n n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,\n material.attenuationColor, material.attenuationDistance );\n material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n uniform float transmission;\n uniform float thickness;\n uniform float attenuationDistance;\n uniform vec3 attenuationColor;\n #ifdef USE_TRANSMISSIONMAP\n uniform sampler2D transmissionMap;\n #endif\n #ifdef USE_THICKNESSMAP\n uniform sampler2D thicknessMap;\n #endif\n uniform vec2 transmissionSamplerSize;\n uniform sampler2D transmissionSamplerMap;\n uniform mat4 modelMatrix;\n uniform mat4 projectionMatrix;\n varying vec3 vWorldPosition;\n float w0( float a ) {\n return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n }\n float w1( float a ) {\n return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n }\n float w2( float a ){\n return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n }\n float w3( float a ) {\n return ( 1.0 / 6.0 ) * ( a * a * a );\n }\n float g0( float a ) {\n return w0( a ) + w1( a );\n }\n float g1( float a ) {\n return w2( a ) + w3( a );\n }\n float h0( float a ) {\n return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n }\n float h1( float a ) {\n return 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n }\n vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n uv = uv * texelSize.zw + 0.5;\n vec2 iuv = floor( uv );\n vec2 fuv = fract( uv );\n float g0x = g0( fuv.x );\n float g1x = g1( fuv.x );\n float h0x = h0( fuv.x );\n float h1x = h1( fuv.x );\n float h0y = h0( fuv.y );\n float h1y = h1( fuv.y );\n vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n }\n vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n vec2 fLodSizeInv = 1.0 / fLodSize;\n vec2 cLodSizeInv = 1.0 / cLodSize;\n vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n return mix( fSample, cSample, fract( lod ) );\n }\n vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n vec3 modelScale;\n modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n return normalize( refractionVector ) * thickness * modelScale;\n }\n float applyIorToRoughness( const in float roughness, const in float ior ) {\n return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n }\n vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n }\n vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n if ( isinf( attenuationDistance ) ) {\n return vec3( 1.0 );\n } else {\n vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance;\n }\n }\n vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,\n const in vec3 attenuationColor, const in float attenuationDistance ) {\n vec4 transmittedLight;\n vec3 transmittance;\n #ifdef USE_DISPERSION\n float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n for ( int i = 0; i < 3; i ++ ) {\n vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n vec3 refractedRayExit = position + transmissionRay;\n \n vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n vec2 refractionCoords = ndcPos.xy / ndcPos.w;\n refractionCoords += 1.0;\n refractionCoords /= 2.0;\n \n vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n transmittedLight[ i ] = transmissionSample[ i ];\n transmittedLight.a += transmissionSample.a;\n transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n }\n transmittedLight.a /= 3.0;\n \n #else\n \n vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n vec3 refractedRayExit = position + transmissionRay;\n vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n vec2 refractionCoords = ndcPos.xy / ndcPos.w;\n refractionCoords += 1.0;\n refractionCoords /= 2.0;\n transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n \n #endif\n vec3 attenuatedColor = transmittance * transmittedLight.rgb;\n vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n }\n#endif",uv_pars_fragment:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n varying vec2 vUv;\n#endif\n#ifdef USE_MAP\n varying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n varying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n varying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n varying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n varying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n varying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n varying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n varying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n varying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n varying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n varying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n varying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n varying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n varying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n varying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n varying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n varying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n varying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n varying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n varying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n uniform mat3 transmissionMapTransform;\n varying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n uniform mat3 thicknessMapTransform;\n varying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n varying vec2 vUv;\n#endif\n#ifdef USE_MAP\n uniform mat3 mapTransform;\n varying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n uniform mat3 alphaMapTransform;\n varying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n uniform mat3 lightMapTransform;\n varying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n uniform mat3 aoMapTransform;\n varying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n uniform mat3 bumpMapTransform;\n varying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n uniform mat3 normalMapTransform;\n varying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n uniform mat3 displacementMapTransform;\n varying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n uniform mat3 emissiveMapTransform;\n varying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n uniform mat3 metalnessMapTransform;\n varying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n uniform mat3 roughnessMapTransform;\n varying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n uniform mat3 anisotropyMapTransform;\n varying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n uniform mat3 clearcoatMapTransform;\n varying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n uniform mat3 clearcoatNormalMapTransform;\n varying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n uniform mat3 clearcoatRoughnessMapTransform;\n varying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n uniform mat3 sheenColorMapTransform;\n varying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n uniform mat3 sheenRoughnessMapTransform;\n varying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n uniform mat3 iridescenceMapTransform;\n varying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n uniform mat3 iridescenceThicknessMapTransform;\n varying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n uniform mat3 specularMapTransform;\n varying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n uniform mat3 specularColorMapTransform;\n varying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n uniform mat3 specularIntensityMapTransform;\n varying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n uniform mat3 transmissionMapTransform;\n varying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n uniform mat3 thicknessMapTransform;\n varying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n vUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n vec4 worldPosition = vec4( transformed, 1.0 );\n #ifdef USE_BATCHING\n worldPosition = batchingMatrix * worldPosition;\n #endif\n #ifdef USE_INSTANCING\n worldPosition = instanceMatrix * worldPosition;\n #endif\n worldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n vUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n gl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n vec4 texColor = texture2D( t2D, vUv );\n #ifdef DECODE_VIDEO_TEXTURE\n 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 );\n #endif\n texColor.rgb *= backgroundIntensity;\n gl_FragColor = texColor;\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n vWorldDirection = transformDirection( position, modelMatrix );\n #include <begin_vertex>\n #include <project_vertex>\n gl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n uniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n uniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nuniform mat3 backgroundRotation;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n #ifdef ENVMAP_TYPE_CUBE\n vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n #elif defined( ENVMAP_TYPE_CUBE_UV )\n vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );\n #else\n vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n #endif\n texColor.rgb *= backgroundIntensity;\n gl_FragColor = texColor;\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n vWorldDirection = transformDirection( position, modelMatrix );\n #include <begin_vertex>\n #include <project_vertex>\n gl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n gl_FragColor = texColor;\n gl_FragColor.a *= opacity;\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n}",depth_vert:"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n #include <uv_vertex>\n #include <batching_vertex>\n #include <skinbase_vertex>\n #include <morphinstance_vertex>\n #ifdef USE_DISPLACEMENTMAP\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinnormal_vertex>\n #endif\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n vHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n uniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n vec4 diffuseColor = vec4( 1.0 );\n #include <clipping_planes_fragment>\n #if DEPTH_PACKING == 3200\n diffuseColor.a = opacity;\n #endif\n #include <map_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <logdepthbuf_fragment>\n float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n #if DEPTH_PACKING == 3200\n gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n #elif DEPTH_PACKING == 3201\n gl_FragColor = packDepthToRGBA( fragCoordZ );\n #elif DEPTH_PACKING == 3202\n gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n #elif DEPTH_PACKING == 3203\n gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\n #endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <batching_vertex>\n #include <skinbase_vertex>\n #include <morphinstance_vertex>\n #ifdef USE_DISPLACEMENTMAP\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinnormal_vertex>\n #endif\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <worldpos_vertex>\n #include <clipping_planes_vertex>\n vWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n vec4 diffuseColor = vec4( 1.0 );\n #include <clipping_planes_fragment>\n #include <map_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n float dist = length( vWorldPosition - referencePosition );\n dist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n dist = saturate( dist );\n gl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n vWorldDirection = transformDirection( position, modelMatrix );\n #include <begin_vertex>\n #include <project_vertex>\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n vec3 direction = normalize( vWorldDirection );\n vec2 sampleUV = equirectUv( direction );\n gl_FragColor = texture2D( tEquirect, sampleUV );\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n vLineDistance = scale * lineDistance;\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <fog_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n if ( mod( vLineDistance, totalSize ) > dashSize ) {\n discard;\n }\n vec3 outgoingLight = vec3( 0.0 );\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n outgoingLight = diffuseColor.rgb;\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n}",meshbasic_vert:"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <batching_vertex>\n #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #endif\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <worldpos_vertex>\n #include <envmap_vertex>\n #include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <specularmap_fragment>\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n #ifdef USE_LIGHTMAP\n vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n #else\n reflectedLight.indirectDiffuse += vec3( 1.0 );\n #endif\n #include <aomap_fragment>\n reflectedLight.indirectDiffuse *= diffuseColor.rgb;\n vec3 outgoingLight = reflectedLight.indirectDiffuse;\n #include <envmap_fragment>\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <batching_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <normal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n vViewPosition = - mvPosition.xyz;\n #include <worldpos_vertex>\n #include <envmap_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_lambert_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <specularmap_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n #include <emissivemap_fragment>\n #include <lights_lambert_fragment>\n #include <lights_fragment_begin>\n #include <lights_fragment_maps>\n #include <lights_fragment_end>\n #include <aomap_fragment>\n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n #include <envmap_fragment>\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <batching_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <normal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <fog_vertex>\n vViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n vec3 viewDir = normalize( vViewPosition );\n vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n vec3 y = cross( viewDir, x );\n vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n #ifdef USE_MATCAP\n vec4 matcapColor = texture2D( matcap, uv );\n #else\n vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n #endif\n vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n varying vec3 vViewPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <batching_vertex>\n #include <beginnormal_vertex>\n #include <morphinstance_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <normal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n vViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n varying vec3 vViewPosition;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );\n #include <clipping_planes_fragment>\n #include <logdepthbuf_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a );\n #ifdef OPAQUE\n gl_FragColor.a = 1.0;\n #endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphcolor_vertex>\n #include <batching_vertex>\n #include <beginnormal_vertex>\n #include <morphinstance_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <normal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n vViewPosition = - mvPosition.xyz;\n #include <worldpos_vertex>\n #include <envmap_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <specularmap_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n #include <emissivemap_fragment>\n #include <lights_phong_fragment>\n #include <lights_fragment_begin>\n #include <lights_fragment_maps>\n #include <lights_fragment_end>\n #include <aomap_fragment>\n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n #include <envmap_fragment>\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n varying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <batching_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <normal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n vViewPosition = - mvPosition.xyz;\n #include <worldpos_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n#ifdef USE_TRANSMISSION\n vWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n #define IOR\n #define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n uniform float ior;\n#endif\n#ifdef USE_SPECULAR\n uniform float specularIntensity;\n uniform vec3 specularColor;\n #ifdef USE_SPECULAR_COLORMAP\n uniform sampler2D specularColorMap;\n #endif\n #ifdef USE_SPECULAR_INTENSITYMAP\n uniform sampler2D specularIntensityMap;\n #endif\n#endif\n#ifdef USE_CLEARCOAT\n uniform float clearcoat;\n uniform float clearcoatRoughness;\n#endif\n#ifdef USE_DISPERSION\n uniform float dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n uniform float iridescence;\n uniform float iridescenceIOR;\n uniform float iridescenceThicknessMinimum;\n uniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n uniform vec3 sheenColor;\n uniform float sheenRoughness;\n #ifdef USE_SHEEN_COLORMAP\n uniform sampler2D sheenColorMap;\n #endif\n #ifdef USE_SHEEN_ROUGHNESSMAP\n uniform sampler2D sheenRoughnessMap;\n #endif\n#endif\n#ifdef USE_ANISOTROPY\n uniform vec2 anisotropyVector;\n #ifdef USE_ANISOTROPYMAP\n uniform sampler2D anisotropyMap;\n #endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <roughnessmap_fragment>\n #include <metalnessmap_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n #include <clearcoat_normal_fragment_begin>\n #include <clearcoat_normal_fragment_maps>\n #include <emissivemap_fragment>\n #include <lights_physical_fragment>\n #include <lights_fragment_begin>\n #include <lights_fragment_maps>\n #include <lights_fragment_end>\n #include <aomap_fragment>\n vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n #include <transmission_fragment>\n vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n #ifdef USE_SHEEN\n float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n #endif\n #ifdef USE_CLEARCOAT\n float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n #endif\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <batching_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <normal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n vViewPosition = - mvPosition.xyz;\n #include <worldpos_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n #include <emissivemap_fragment>\n #include <lights_toon_fragment>\n #include <lights_fragment_begin>\n #include <lights_fragment_maps>\n #include <lights_fragment_end>\n #include <aomap_fragment>\n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n#ifdef USE_POINTS_UV\n varying vec2 vUv;\n uniform mat3 uvTransform;\n#endif\nvoid main() {\n #ifdef USE_POINTS_UV\n vUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n #endif\n #include <color_vertex>\n #include <morphinstance_vertex>\n #include <morphcolor_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <project_vertex>\n gl_PointSize = size;\n #ifdef USE_SIZEATTENUATION\n bool isPerspective = isPerspectiveMatrix( projectionMatrix );\n if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n #endif\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <worldpos_vertex>\n #include <fog_vertex>\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n vec3 outgoingLight = vec3( 0.0 );\n #include <logdepthbuf_fragment>\n #include <map_particle_fragment>\n #include <color_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n outgoingLight = diffuseColor.rgb;\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n}",shadow_vert:"#include <common>\n#include <batching_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n #include <batching_vertex>\n #include <beginnormal_vertex>\n #include <morphinstance_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <worldpos_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <logdepthbuf_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n #include <logdepthbuf_fragment>\n gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n vec4 mvPosition = modelViewMatrix[ 3 ];\n vec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) );\n #ifndef USE_SIZEATTENUATION\n bool isPerspective = isPerspectiveMatrix( projectionMatrix );\n if ( isPerspective ) scale *= - mvPosition.z;\n #endif\n vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n vec2 rotatedPosition;\n rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n mvPosition.xy += rotatedPosition;\n gl_Position = projectionMatrix * mvPosition;\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <clipping_planes_fragment>\n vec3 outgoingLight = vec3( 0.0 );\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n outgoingLight = diffuseColor.rgb;\n #include <opaque_fragment>\n #include <tonemapping_fragment>\n #include <colorspace_fragment>\n #include <fog_fragment>\n}"},ok={common:{diffuse:{value:new tO(0xffffff)},opacity:{value:1},map:{value:null},mapTransform:{value:new q},alphaMap:{value:null},alphaMapTransform:{value:new q},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new q}},envmap:{envMap:{value:null},envMapRotation:{value:new q},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new q}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new q}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new q},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new q},normalScale:{value:new Q(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new q},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new q}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new q}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new q}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new tO(0xffffff)}},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 tO(0xffffff)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new q},alphaTest:{value:0},uvTransform:{value:new q}},sprite:{diffuse:{value:new tO(0xffffff)},opacity:{value:1},center:{value:new Q(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new q},alphaMap:{value:null},alphaMapTransform:{value:new q},alphaTest:{value:0}}},oH={basic:{uniforms:iS([ok.common,ok.specularmap,ok.envmap,ok.aomap,ok.lightmap,ok.fog]),vertexShader:oz.meshbasic_vert,fragmentShader:oz.meshbasic_frag},lambert:{uniforms:iS([ok.common,ok.specularmap,ok.envmap,ok.aomap,ok.lightmap,ok.emissivemap,ok.bumpmap,ok.normalmap,ok.displacementmap,ok.fog,ok.lights,{emissive:{value:new tO(0)}}]),vertexShader:oz.meshlambert_vert,fragmentShader:oz.meshlambert_frag},phong:{uniforms:iS([ok.common,ok.specularmap,ok.envmap,ok.aomap,ok.lightmap,ok.emissivemap,ok.bumpmap,ok.normalmap,ok.displacementmap,ok.fog,ok.lights,{emissive:{value:new tO(0)},specular:{value:new tO(1118481)},shininess:{value:30}}]),vertexShader:oz.meshphong_vert,fragmentShader:oz.meshphong_frag},standard:{uniforms:iS([ok.common,ok.envmap,ok.aomap,ok.lightmap,ok.emissivemap,ok.bumpmap,ok.normalmap,ok.displacementmap,ok.roughnessmap,ok.metalnessmap,ok.fog,ok.lights,{emissive:{value:new tO(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:oz.meshphysical_vert,fragmentShader:oz.meshphysical_frag},toon:{uniforms:iS([ok.common,ok.aomap,ok.lightmap,ok.emissivemap,ok.bumpmap,ok.normalmap,ok.displacementmap,ok.gradientmap,ok.fog,ok.lights,{emissive:{value:new tO(0)}}]),vertexShader:oz.meshtoon_vert,fragmentShader:oz.meshtoon_frag},matcap:{uniforms:iS([ok.common,ok.bumpmap,ok.normalmap,ok.displacementmap,ok.fog,{matcap:{value:null}}]),vertexShader:oz.meshmatcap_vert,fragmentShader:oz.meshmatcap_frag},points:{uniforms:iS([ok.points,ok.fog]),vertexShader:oz.points_vert,fragmentShader:oz.points_frag},dashed:{uniforms:iS([ok.common,ok.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:oz.linedashed_vert,fragmentShader:oz.linedashed_frag},depth:{uniforms:iS([ok.common,ok.displacementmap]),vertexShader:oz.depth_vert,fragmentShader:oz.depth_frag},normal:{uniforms:iS([ok.common,ok.bumpmap,ok.normalmap,ok.displacementmap,{opacity:{value:1}}]),vertexShader:oz.meshnormal_vert,fragmentShader:oz.meshnormal_frag},sprite:{uniforms:iS([ok.sprite,ok.fog]),vertexShader:oz.sprite_vert,fragmentShader:oz.sprite_frag},background:{uniforms:{uvTransform:{value:new q},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:oz.background_vert,fragmentShader:oz.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new q}},vertexShader:oz.backgroundCube_vert,fragmentShader:oz.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:oz.cube_vert,fragmentShader:oz.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:oz.equirect_vert,fragmentShader:oz.equirect_frag},distanceRGBA:{uniforms:iS([ok.common,ok.displacementmap,{referencePosition:{value:new eE},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:oz.distanceRGBA_vert,fragmentShader:oz.distanceRGBA_frag},shadow:{uniforms:iS([ok.lights,ok.fog,{color:{value:new tO(0)},opacity:{value:1}}]),vertexShader:oz.shadow_vert,fragmentShader:oz.shadow_frag}};oH.physical={uniforms:iS([oH.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new q},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new q},clearcoatNormalScale:{value:new Q(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new q},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new q},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new q},sheen:{value:0},sheenColor:{value:new tO(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new q},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new q},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new q},transmissionSamplerSize:{value:new Q},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new q},attenuationDistance:{value:0},attenuationColor:{value:new tO(0)},specularColor:{value:new tO(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new q},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new q},anisotropyVector:{value:new Q},anisotropyMap:{value:null},anisotropyMapTransform:{value:new q}}]),vertexShader:oz.meshphysical_vert,fragmentShader:oz.meshphysical_frag};let oG={r:0,b:0,g:0},oV=new ti,oW=new e2;function oj(e,t,i,n,r,a,s){let o,l,u=new tO(0),c=+(!0!==a),h=null,d=0,f=null;function p(e){let n=!0===e.isScene?e.background:null;return n&&n.isTexture&&(n=(e.backgroundBlurriness>0?i:t).get(n)),n}function m(t,i){t.getRGB(oG,iA(e)),n.buffers.color.setClear(oG.r,oG.g,oG.b,i,s)}return{getClearColor:function(){return u},setClearColor:function(e,t=1){u.set(e),m(u,c=t)},getClearAlpha:function(){return c},setClearAlpha:function(e){m(u,c=e)},render:function(t){let i=!1,r=p(t);null===r?m(u,c):r&&r.isColor&&(m(r,1),i=!0);let a=e.xr.getEnvironmentBlendMode();"additive"===a?n.buffers.color.setClear(0,0,0,1,s):"alpha-blend"===a&&n.buffers.color.setClear(0,0,0,0,s),(e.autoClear||i)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil))},addToRenderList:function(t,i){let n=p(i);n&&(n.isCubeTexture||306===n.mapping)?(void 0===l&&((l=new ig(new ix(1,1,1),new ib({name:"BackgroundCubeMaterial",uniforms:iy(oH.backgroundCube.uniforms),vertexShader:oH.backgroundCube.vertexShader,fragmentShader:oH.backgroundCube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1}))).geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(e,t,i){this.matrixWorld.copyPosition(i.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(l)),oV.copy(i.backgroundRotation),oV.x*=-1,oV.y*=-1,oV.z*=-1,n.isCubeTexture&&!1===n.isRenderTargetTexture&&(oV.y*=-1,oV.z*=-1),l.material.uniforms.envMap.value=n,l.material.uniforms.flipEnvMap.value=n.isCubeTexture&&!1===n.isRenderTargetTexture?-1:1,l.material.uniforms.backgroundBlurriness.value=i.backgroundBlurriness,l.material.uniforms.backgroundIntensity.value=i.backgroundIntensity,l.material.uniforms.backgroundRotation.value.setFromMatrix4(oW.makeRotationFromEuler(oV)),l.material.toneMapped=eu.getTransfer(n.colorSpace)!==B,(h!==n||d!==n.version||f!==e.toneMapping)&&(l.material.needsUpdate=!0,h=n,d=n.version,f=e.toneMapping),l.layers.enableAll(),t.unshift(l,l.geometry,l.material,0,0,null)):n&&n.isTexture&&(void 0===o&&((o=new ig(new r9(2,2),new ib({name:"BackgroundMaterial",uniforms:iy(oH.background.uniforms),vertexShader:oH.background.vertexShader,fragmentShader:oH.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1}))).geometry.deleteAttribute("normal"),Object.defineProperty(o.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(o)),o.material.uniforms.t2D.value=n,o.material.uniforms.backgroundIntensity.value=i.backgroundIntensity,o.material.toneMapped=eu.getTransfer(n.colorSpace)!==B,!0===n.matrixAutoUpdate&&n.updateMatrix(),o.material.uniforms.uvTransform.value.copy(n.matrix),(h!==n||d!==n.version||f!==e.toneMapping)&&(o.material.needsUpdate=!0,h=n,d=n.version,f=e.toneMapping),o.layers.enableAll(),t.unshift(o,o.geometry,o.material,0,0,null))},dispose:function(){void 0!==l&&(l.geometry.dispose(),l.material.dispose()),void 0!==o&&(o.geometry.dispose(),o.material.dispose())}}}function oX(e,t){let i=e.getParameter(e.MAX_VERTEX_ATTRIBS),n={},r=u(null),a=r,s=!1;function o(t){return e.bindVertexArray(t)}function l(t){return e.deleteVertexArray(t)}function u(e){let t=[],n=[],r=[];for(let e=0;e<i;e++)t[e]=0,n[e]=0,r[e]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:t,enabledAttributes:n,attributeDivisors:r,object:e,attributes:{},index:null}}function c(){let e=a.newAttributes;for(let t=0,i=e.length;t<i;t++)e[t]=0}function h(e){d(e,0)}function d(t,i){let n=a.newAttributes,r=a.enabledAttributes,s=a.attributeDivisors;n[t]=1,0===r[t]&&(e.enableVertexAttribArray(t),r[t]=1),s[t]!==i&&(e.vertexAttribDivisor(t,i),s[t]=i)}function f(){let t=a.newAttributes,i=a.enabledAttributes;for(let n=0,r=i.length;n<r;n++)i[n]!==t[n]&&(e.disableVertexAttribArray(n),i[n]=0)}function p(t,i,n,r,a,s,o){!0===o?e.vertexAttribIPointer(t,i,n,a,s):e.vertexAttribPointer(t,i,n,r,a,s)}function m(){g(),s=!0,a!==r&&o((a=r).object)}function g(){r.geometry=null,r.program=null,r.wireframe=!1}return{setup:function(i,r,l,m,g){var v,x;let y,S,A,M,b=!1,w=(v=m,x=l,y=!0===r.wireframe,void 0===(S=n[v.id])&&(S={},n[v.id]=S),void 0===(A=S[x.id])&&(A={},S[x.id]=A),void 0===(M=A[y])&&(M=u(e.createVertexArray()),A[y]=M),M);a!==w&&o((a=w).object),(b=function(e,t,i,n){let r=a.attributes,s=t.attributes,o=0,l=i.getAttributes();for(let t in l)if(l[t].location>=0){let i=r[t],n=s[t];if(void 0===n&&("instanceMatrix"===t&&e.instanceMatrix&&(n=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(n=e.instanceColor)),void 0===i||i.attribute!==n||n&&i.data!==n.data)return!0;o++}return a.attributesNum!==o||a.index!==n}(i,m,l,g))&&function(e,t,i,n){let r={},s=t.attributes,o=0,l=i.getAttributes();for(let t in l)if(l[t].location>=0){let i=s[t];void 0===i&&("instanceMatrix"===t&&e.instanceMatrix&&(i=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(i=e.instanceColor));let n={};n.attribute=i,i&&i.data&&(n.data=i.data),r[t]=n,o++}a.attributes=r,a.attributesNum=o,a.index=n}(i,m,l,g),null!==g&&t.update(g,e.ELEMENT_ARRAY_BUFFER),(b||s)&&(s=!1,function(i,n,r,a){c();let s=a.attributes,o=r.getAttributes(),l=n.defaultAttributeValues;for(let n in o){let r=o[n];if(r.location>=0){let o=s[n];if(void 0===o&&("instanceMatrix"===n&&i.instanceMatrix&&(o=i.instanceMatrix),"instanceColor"===n&&i.instanceColor&&(o=i.instanceColor)),void 0!==o){let n=o.normalized,s=o.itemSize,l=t.get(o);if(void 0===l)continue;let u=l.buffer,c=l.type,f=l.bytesPerElement,m=c===e.INT||c===e.UNSIGNED_INT||1013===o.gpuType;if(o.isInterleavedBufferAttribute){let t=o.data,l=t.stride,g=o.offset;if(t.isInstancedInterleavedBuffer){for(let e=0;e<r.locationSize;e++)d(r.location+e,t.meshPerAttribute);!0!==i.isInstancedMesh&&void 0===a._maxInstanceCount&&(a._maxInstanceCount=t.meshPerAttribute*t.count)}else for(let e=0;e<r.locationSize;e++)h(r.location+e);e.bindBuffer(e.ARRAY_BUFFER,u);for(let e=0;e<r.locationSize;e++)p(r.location+e,s/r.locationSize,c,n,l*f,(g+s/r.locationSize*e)*f,m)}else{if(o.isInstancedBufferAttribute){for(let e=0;e<r.locationSize;e++)d(r.location+e,o.meshPerAttribute);!0!==i.isInstancedMesh&&void 0===a._maxInstanceCount&&(a._maxInstanceCount=o.meshPerAttribute*o.count)}else for(let e=0;e<r.locationSize;e++)h(r.location+e);e.bindBuffer(e.ARRAY_BUFFER,u);for(let e=0;e<r.locationSize;e++)p(r.location+e,s/r.locationSize,c,n,s*f,s/r.locationSize*e*f,m)}}else if(void 0!==l){let t=l[n];if(void 0!==t)switch(t.length){case 2:e.vertexAttrib2fv(r.location,t);break;case 3:e.vertexAttrib3fv(r.location,t);break;case 4:e.vertexAttrib4fv(r.location,t);break;default:e.vertexAttrib1fv(r.location,t)}}}}f()}(i,r,l,m),null!==g&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t.get(g).buffer))},reset:m,resetDefaultState:g,dispose:function(){for(let e in m(),n){let t=n[e];for(let e in t){let i=t[e];for(let e in i)l(i[e].object),delete i[e];delete t[e]}delete n[e]}},releaseStatesOfGeometry:function(e){if(void 0===n[e.id])return;let t=n[e.id];for(let e in t){let i=t[e];for(let e in i)l(i[e].object),delete i[e];delete t[e]}delete n[e.id]},releaseStatesOfProgram:function(e){for(let t in n){let i=n[t];if(void 0===i[e.id])continue;let r=i[e.id];for(let e in r)l(r[e].object),delete r[e];delete i[e.id]}},initAttributes:c,enableAttribute:h,disableUnusedAttributes:f}}function oY(e,t,i){let n;function r(t,r,a){0!==a&&(e.drawArraysInstanced(n,t,r,a),i.update(r,n,a))}this.setMode=function(e){n=e},this.render=function(t,r){e.drawArrays(n,t,r),i.update(r,n,1)},this.renderInstances=r,this.renderMultiDraw=function(e,r,a){if(0===a)return;t.get("WEBGL_multi_draw").multiDrawArraysWEBGL(n,e,0,r,0,a);let s=0;for(let e=0;e<a;e++)s+=r[e];i.update(s,n,1)},this.renderMultiDrawInstances=function(e,a,s,o){if(0===s)return;let l=t.get("WEBGL_multi_draw");if(null===l)for(let t=0;t<e.length;t++)r(e[t],a[t],o[t]);else{l.multiDrawArraysInstancedWEBGL(n,e,0,a,0,o,0,s);let t=0;for(let e=0;e<s;e++)t+=a[e]*o[e];i.update(t,n,1)}}}function oQ(e,t,i,n){let r;function a(t){if("highp"===t){if(e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let s=void 0!==i.precision?i.precision:"highp",o=a(s);o!==s&&(console.warn("THREE.WebGLRenderer:",s,"not supported, using",o,"instead."),s=o);let l=!0===i.logarithmicDepthBuffer,u=!0===i.reverseDepthBuffer&&t.has("EXT_clip_control"),c=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),h=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS);return{isWebGL2:!0,getMaxAnisotropy:function(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){let i=t.get("EXT_texture_filter_anisotropic");r=e.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:a,textureFormatReadable:function(t){return 1023===t||n.convert(t)===e.getParameter(e.IMPLEMENTATION_COLOR_READ_FORMAT)},textureTypeReadable:function(i){let r=1016===i&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return 1009===i||n.convert(i)===e.getParameter(e.IMPLEMENTATION_COLOR_READ_TYPE)||1015===i||!!r},precision:s,logarithmicDepthBuffer:l,reverseDepthBuffer:u,maxTextures:c,maxVertexTextures:h,maxTextureSize:e.getParameter(e.MAX_TEXTURE_SIZE),maxCubemapSize:e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),maxAttributes:e.getParameter(e.MAX_VERTEX_ATTRIBS),maxVertexUniforms:e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),maxVaryings:e.getParameter(e.MAX_VARYING_VECTORS),maxFragmentUniforms:e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),vertexTextures:h>0,maxSamples:e.getParameter(e.MAX_SAMPLES)}}function oq(e){let t=this,i=null,n=0,r=!1,a=!1,s=new ny,o=new q,l={value:null,needsUpdate:!1};function u(e,i,n,r){let a=null!==e?e.length:0,u=null;if(0!==a){if(u=l.value,!0!==r||null===u){let t=n+4*a,r=i.matrixWorldInverse;o.getNormalMatrix(r),(null===u||u.length<t)&&(u=new Float32Array(t));for(let t=0,i=n;t!==a;++t,i+=4)s.copy(e[t]).applyMatrix4(r,o),s.normal.toArray(u,i),u[i+3]=s.constant}l.value=u,l.needsUpdate=!0}return t.numPlanes=a,t.numIntersection=0,u}this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t){let i=0!==e.length||t||0!==n||r;return r=t,n=e.length,i},this.beginShadows=function(){a=!0,u(null)},this.endShadows=function(){a=!1},this.setGlobalState=function(e,t){i=u(e,t,0)},this.setState=function(s,o,c){let h=s.clippingPlanes,d=s.clipIntersection,f=s.clipShadows,p=e.get(s);if(r&&null!==h&&0!==h.length&&(!a||f)){let e=a?0:n,t=4*e,r=p.clippingState||null;l.value=r,r=u(h,o,t,c);for(let e=0;e!==t;++e)r[e]=i[e];p.clippingState=r,this.numIntersection=d?this.numPlanes:0,this.numPlanes+=e}else a?u(null):(l.value!==i&&(l.value=i,l.needsUpdate=n>0),t.numPlanes=n,t.numIntersection=0)}}function oK(e){let t=new WeakMap;function i(e,t){return 303===t?e.mapping=301:304===t&&(e.mapping=302),e}function n(e){let i=e.target;i.removeEventListener("dispose",n);let r=t.get(i);void 0!==r&&(t.delete(i),r.dispose())}return{get:function(r){if(r&&r.isTexture){let a=r.mapping;if(303===a||304===a)if(t.has(r))return i(t.get(r).texture,r.mapping);else{let a=r.image;if(!a||!(a.height>0))return null;{let s=new iD(a.height);return s.fromEquirectangularTexture(e,r),t.set(r,s),r.addEventListener("dispose",n),i(s.texture,r.mapping)}}}return r},dispose:function(){t=new WeakMap}}}let oZ=[.125,.215,.35,.446,.526,.582],oJ=new si,o$=new tO,o0=null,o1=0,o2=0,o3=!1,o4=(1+Math.sqrt(5))/2,o5=1/o4,o6=[new eE(-o4,o5,0),new eE(o4,o5,0),new eE(-o5,0,o4),new eE(o5,0,o4),new eE(0,o4,-o5),new eE(0,o4,o5),new eE(-1,1,-1),new eE(1,1,-1),new eE(-1,1,1),new eE(1,1,1)];class o8{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,n=100){o0=this._renderer.getRenderTarget(),o1=this._renderer.getActiveCubeFace(),o2=this._renderer.getActiveMipmapLevel(),o3=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);let r=this._allocateTargets();return r.depthBuffer=!0,this._sceneToCubeUV(e,i,n,r),t>0&&this._blur(r,0,0,t),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=lt(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=le(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(o0,o1,o2),this._renderer.xr.enabled=o3,e.scissorTest=!1,o7(e,0,0,e.width,e.height)}_fromTexture(e,t){301===e.mapping||302===e.mapping?this._setSize(0===e.image.length?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),o0=this._renderer.getRenderTarget(),o1=this._renderer.getActiveCubeFace(),o2=this._renderer.getActiveMipmapLevel(),o3=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;let i=t||this._allocateTargets();return this._textureToCubeUV(e,i),this._applyPMREM(i),this._cleanup(i),i}_allocateTargets(){let e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,i={magFilter:1006,minFilter:1006,generateMipmaps:!1,type:1016,format:1023,colorSpace:I,depthBuffer:!1},n=o9(e,t,i);if(null===this._pingPongRenderTarget||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){var r;null!==this._pingPongRenderTarget&&this._dispose(),this._pingPongRenderTarget=o9(e,t,i);let{_lodMax:n}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=function(e){let t=[],i=[],n=[],r=e,a=e-4+1+oZ.length;for(let s=0;s<a;s++){let a=Math.pow(2,r);i.push(a);let o=1/a;s>e-4?o=oZ[s-e+4-1]:0===s&&(o=0),n.push(o);let l=1/(a-2),u=-l,c=1+l,h=[u,u,c,u,c,c,u,u,c,c,u,c],d=new Float32Array(108),f=new Float32Array(72),p=new Float32Array(36);for(let e=0;e<6;e++){let t=e%3*2/3-1,i=e>2?0:-1,n=[t,i,0,t+2/3,i,0,t+2/3,i+1,0,t,i,0,t+2/3,i+1,0,t,i+1,0];d.set(n,18*e),f.set(h,12*e);let r=[e,e,e,e,e,e];p.set(r,6*e)}let m=new ii;m.setAttribute("position",new tq(d,3)),m.setAttribute("uv",new tq(f,2)),m.setAttribute("faceIndex",new tq(p,1)),t.push(m),r>4&&r--}return{lodPlanes:t,sizeLods:i,sigmas:n}}(n)),this._blurMaterial=(r=n,new ib({name:"SphericalGaussianBlur",defines:{n:20,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${r}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:new Float32Array(20)},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:new eE(0,1,0)}},vertexShader:li(),fragmentShader:`
|
|
|
|
precision mediump float;
|
|
precision mediump int;
|
|
|
|
varying vec3 vOutputDirection;
|
|
|
|
uniform sampler2D envMap;
|
|
uniform int samples;
|
|
uniform float weights[ n ];
|
|
uniform bool latitudinal;
|
|
uniform float dTheta;
|
|
uniform float mipInt;
|
|
uniform vec3 poleAxis;
|
|
|
|
#define ENVMAP_TYPE_CUBE_UV
|
|
#include <cube_uv_reflection_fragment>
|
|
|
|
vec3 getSample( float theta, vec3 axis ) {
|
|
|
|
float cosTheta = cos( theta );
|
|
// Rodrigues' axis-angle rotation
|
|
vec3 sampleDirection = vOutputDirection * cosTheta
|
|
+ cross( axis, vOutputDirection ) * sin( theta )
|
|
+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );
|
|
|
|
return bilinearCubeUV( envMap, sampleDirection, mipInt );
|
|
|
|
}
|
|
|
|
void main() {
|
|
|
|
vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );
|
|
|
|
if ( all( equal( axis, vec3( 0.0 ) ) ) ) {
|
|
|
|
axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );
|
|
|
|
}
|
|
|
|
axis = normalize( axis );
|
|
|
|
gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );
|
|
gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );
|
|
|
|
for ( int i = 1; i < n; i++ ) {
|
|
|
|
if ( i >= samples ) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
float theta = dTheta * float( i );
|
|
gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );
|
|
gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );
|
|
|
|
}
|
|
|
|
}
|
|
`,blending:0,depthTest:!1,depthWrite:!1}))}return n}_compileMaterial(e){let t=new ig(this._lodPlanes[0],e);this._renderer.compile(t,oJ)}_sceneToCubeUV(e,t,i,n){let r=new iC(90,1,t,i),a=[1,-1,1,1,1,1],s=[1,1,1,-1,-1,-1],o=this._renderer,l=o.autoClear,u=o.toneMapping;o.getClearColor(o$),o.toneMapping=0,o.autoClear=!1;let c=new tG({name:"PMREM.Background",side:1,depthWrite:!1,depthTest:!1}),h=new ig(new ix,c),d=!1,f=e.background;f?f.isColor&&(c.color.copy(f),e.background=null,d=!0):(c.color.copy(o$),d=!0);for(let t=0;t<6;t++){let i=t%3;0===i?(r.up.set(0,a[t],0),r.lookAt(s[t],0,0)):1===i?(r.up.set(0,0,a[t]),r.lookAt(0,s[t],0)):(r.up.set(0,a[t],0),r.lookAt(0,0,s[t]));let l=this._cubeSize;o7(n,i*l,t>2?l:0,l,l),o.setRenderTarget(n),d&&o.render(h,r),o.render(e,r)}h.geometry.dispose(),h.material.dispose(),o.toneMapping=u,o.autoClear=l,e.background=f}_textureToCubeUV(e,t){let i=this._renderer,n=301===e.mapping||302===e.mapping;n?(null===this._cubemapMaterial&&(this._cubemapMaterial=lt()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=le());let r=n?this._cubemapMaterial:this._equirectMaterial,a=new ig(this._lodPlanes[0],r);r.uniforms.envMap.value=e;let s=this._cubeSize;o7(t,0,0,3*s,2*s),i.setRenderTarget(t),i.render(a,oJ)}_applyPMREM(e){let t=this._renderer,i=t.autoClear;t.autoClear=!1;let n=this._lodPlanes.length;for(let t=1;t<n;t++){let i=Math.sqrt(this._sigmas[t]*this._sigmas[t]-this._sigmas[t-1]*this._sigmas[t-1]),r=o6[(n-t-1)%o6.length];this._blur(e,t-1,t,i,r)}t.autoClear=i}_blur(e,t,i,n,r){let a=this._pingPongRenderTarget;this._halfBlur(e,a,t,i,n,"latitudinal",r),this._halfBlur(a,e,i,i,n,"longitudinal",r)}_halfBlur(e,t,i,n,r,a,s){let o=this._renderer,l=this._blurMaterial;"latitudinal"!==a&&"longitudinal"!==a&&console.error("blur direction must be either latitudinal or longitudinal!");let u=new ig(this._lodPlanes[n],l),c=l.uniforms,h=this._sizeLods[i]-1,d=isFinite(r)?Math.PI/(2*h):2*Math.PI/39,f=r/d,p=isFinite(r)?1+Math.floor(3*f):20;p>20&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${p} samples when the maximum is set to 20`);let m=[],g=0;for(let e=0;e<20;++e){let t=e/f,i=Math.exp(-t*t/2);m.push(i),0===e?g+=i:e<p&&(g+=2*i)}for(let e=0;e<m.length;e++)m[e]=m[e]/g;c.envMap.value=e.texture,c.samples.value=p,c.weights.value=m,c.latitudinal.value="latitudinal"===a,s&&(c.poleAxis.value=s);let{_lodMax:v}=this;c.dTheta.value=d,c.mipInt.value=v-i;let x=this._sizeLods[n],y=4*(this._cubeSize-x);o7(t,3*x*(n>v-4?n-v+4:0),y,3*x,2*x),o.setRenderTarget(t),o.render(u,oJ)}}function o9(e,t,i){let n=new eS(e,t,i);return n.texture.mapping=306,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function o7(e,t,i,n,r){e.viewport.set(t,i,n,r),e.scissor.set(t,i,n,r)}function le(){return new ib({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:li(),fragmentShader:`
|
|
|
|
precision mediump float;
|
|
precision mediump int;
|
|
|
|
varying vec3 vOutputDirection;
|
|
|
|
uniform sampler2D envMap;
|
|
|
|
#include <common>
|
|
|
|
void main() {
|
|
|
|
vec3 outputDirection = normalize( vOutputDirection );
|
|
vec2 uv = equirectUv( outputDirection );
|
|
|
|
gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );
|
|
|
|
}
|
|
`,blending:0,depthTest:!1,depthWrite:!1})}function lt(){return new ib({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:li(),fragmentShader:`
|
|
|
|
precision mediump float;
|
|
precision mediump int;
|
|
|
|
uniform float flipEnvMap;
|
|
|
|
varying vec3 vOutputDirection;
|
|
|
|
uniform samplerCube envMap;
|
|
|
|
void main() {
|
|
|
|
gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );
|
|
|
|
}
|
|
`,blending:0,depthTest:!1,depthWrite:!1})}function li(){return`
|
|
|
|
precision mediump float;
|
|
precision mediump int;
|
|
|
|
attribute float faceIndex;
|
|
|
|
varying vec3 vOutputDirection;
|
|
|
|
// RH coordinate system; PMREM face-indexing convention
|
|
vec3 getDirection( vec2 uv, float face ) {
|
|
|
|
uv = 2.0 * uv - 1.0;
|
|
|
|
vec3 direction = vec3( uv, 1.0 );
|
|
|
|
if ( face == 0.0 ) {
|
|
|
|
direction = direction.zyx; // ( 1, v, u ) pos x
|
|
|
|
} else if ( face == 1.0 ) {
|
|
|
|
direction = direction.xzy;
|
|
direction.xz *= -1.0; // ( -u, 1, -v ) pos y
|
|
|
|
} else if ( face == 2.0 ) {
|
|
|
|
direction.x *= -1.0; // ( -u, v, 1 ) pos z
|
|
|
|
} else if ( face == 3.0 ) {
|
|
|
|
direction = direction.zyx;
|
|
direction.xz *= -1.0; // ( -1, v, -u ) neg x
|
|
|
|
} else if ( face == 4.0 ) {
|
|
|
|
direction = direction.xzy;
|
|
direction.xy *= -1.0; // ( -u, -1, v ) neg y
|
|
|
|
} else if ( face == 5.0 ) {
|
|
|
|
direction.z *= -1.0; // ( u, v, -1 ) neg z
|
|
|
|
}
|
|
|
|
return direction;
|
|
|
|
}
|
|
|
|
void main() {
|
|
|
|
vOutputDirection = getDirection( uv, faceIndex );
|
|
gl_Position = vec4( position, 1.0 );
|
|
|
|
}
|
|
`}function ln(e){let t=new WeakMap,i=null;function n(e){let i=e.target;i.removeEventListener("dispose",n);let r=t.get(i);void 0!==r&&(t.delete(i),r.dispose())}return{get:function(r){if(r&&r.isTexture){let a=r.mapping,s=303===a||304===a,o=301===a||302===a;if(s||o){let a=t.get(r),l=void 0!==a?a.texture.pmremVersion:0;if(r.isRenderTargetTexture&&r.pmremVersion!==l)return null===i&&(i=new o8(e)),(a=s?i.fromEquirectangular(r,a):i.fromCubemap(r,a)).texture.pmremVersion=r.pmremVersion,t.set(r,a),a.texture;{if(void 0!==a)return a.texture;let l=r.image;return s&&l&&l.height>0||o&&l&&function(e){let t=0;for(let i=0;i<6;i++)void 0!==e[i]&&t++;return 6===t}(l)?(null===i&&(i=new o8(e)),(a=s?i.fromEquirectangular(r):i.fromCubemap(r)).texture.pmremVersion=r.pmremVersion,t.set(r,a),r.addEventListener("dispose",n),a.texture):null}}}return r},dispose:function(){t=new WeakMap,null!==i&&(i.dispose(),i=null)}}}function lr(e){let t={};function i(i){let n;if(void 0!==t[i])return t[i];switch(i){case"WEBGL_depth_texture":n=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":n=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":n=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":n=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:n=e.getExtension(i)}return t[i]=n,n}return{has:function(e){return null!==i(e)},init:function(){i("EXT_color_buffer_float"),i("WEBGL_clip_cull_distance"),i("OES_texture_float_linear"),i("EXT_color_buffer_half_float"),i("WEBGL_multisampled_render_to_texture"),i("WEBGL_render_shared_exponent")},get:function(e){let t=i(e);return null===t&&en("THREE.WebGLRenderer: "+e+" extension not supported."),t}}}function la(e,t,i,n){let r={},a=new WeakMap;function s(e){let o=e.target;for(let e in null!==o.index&&t.remove(o.index),o.attributes)t.remove(o.attributes[e]);o.removeEventListener("dispose",s),delete r[o.id];let l=a.get(o);l&&(t.remove(l),a.delete(o)),n.releaseStatesOfGeometry(o),!0===o.isInstancedBufferGeometry&&delete o._maxInstanceCount,i.memory.geometries--}function o(e){let i=[],n=e.index,r=e.attributes.position,s=0;if(null!==n){let e=n.array;s=n.version;for(let t=0,n=e.length;t<n;t+=3){let n=e[t+0],r=e[t+1],a=e[t+2];i.push(n,r,r,a,a,n)}}else{if(void 0===r)return;let e=r.array;s=r.version;for(let t=0,n=e.length/3-1;t<n;t+=3){let e=t+0,n=t+1,r=t+2;i.push(e,n,n,r,r,e)}}let o=new(Z(i)?t2:t0)(i,1);o.version=s;let l=a.get(e);l&&t.remove(l),a.set(e,o)}return{get:function(e,t){return!0===r[t.id]||(t.addEventListener("dispose",s),r[t.id]=!0,i.memory.geometries++),t},update:function(i){let n=i.attributes;for(let i in n)t.update(n[i],e.ARRAY_BUFFER)},getWireframeAttribute:function(e){let t=a.get(e);if(t){let i=e.index;null!==i&&t.version<i.version&&o(e)}else o(e);return a.get(e)}}}function ls(e,t,i){let n,r,a;function s(t,s,o){0!==o&&(e.drawElementsInstanced(n,s,r,t*a,o),i.update(s,n,o))}this.setMode=function(e){n=e},this.setIndex=function(e){r=e.type,a=e.bytesPerElement},this.render=function(t,s){e.drawElements(n,s,r,t*a),i.update(s,n,1)},this.renderInstances=s,this.renderMultiDraw=function(e,a,s){if(0===s)return;t.get("WEBGL_multi_draw").multiDrawElementsWEBGL(n,a,0,r,e,0,s);let o=0;for(let e=0;e<s;e++)o+=a[e];i.update(o,n,1)},this.renderMultiDrawInstances=function(e,o,l,u){if(0===l)return;let c=t.get("WEBGL_multi_draw");if(null===c)for(let t=0;t<e.length;t++)s(e[t]/a,o[t],u[t]);else{c.multiDrawElementsInstancedWEBGL(n,o,0,r,e,0,u,0,l);let t=0;for(let e=0;e<l;e++)t+=o[e]*u[e];i.update(t,n,1)}}}function lo(e){let t={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:t,programs:null,autoReset:!0,reset:function(){t.calls=0,t.triangles=0,t.points=0,t.lines=0},update:function(i,n,r){switch(t.calls++,n){case e.TRIANGLES:t.triangles+=i/3*r;break;case e.LINES:t.lines+=i/2*r;break;case e.LINE_STRIP:t.lines+=r*(i-1);break;case e.LINE_LOOP:t.lines+=r*i;break;case e.POINTS:t.points+=r*i;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}}}function ll(e,t,i){let n=new WeakMap,r=new ex;return{update:function(a,s,o){let l=a.morphTargetInfluences,u=s.morphAttributes.position||s.morphAttributes.normal||s.morphAttributes.color,c=void 0!==u?u.length:0,h=n.get(s);if(void 0===h||h.count!==c){void 0!==h&&h.texture.dispose();let e=void 0!==s.morphAttributes.position,i=void 0!==s.morphAttributes.normal,a=void 0!==s.morphAttributes.color,o=s.morphAttributes.position||[],l=s.morphAttributes.normal||[],u=s.morphAttributes.color||[],d=0;!0===e&&(d=1),!0===i&&(d=2),!0===a&&(d=3);let f=s.attributes.position.count*d,p=1;f>t.maxTextureSize&&(p=Math.ceil(f/t.maxTextureSize),f=t.maxTextureSize);let m=new Float32Array(f*p*4*c),g=new eA(m,f,p,c);g.type=1015,g.needsUpdate=!0;let v=4*d;for(let t=0;t<c;t++){let n=o[t],s=l[t],c=u[t],h=f*p*4*t;for(let t=0;t<n.count;t++){let o=t*v;!0===e&&(r.fromBufferAttribute(n,t),m[h+o+0]=r.x,m[h+o+1]=r.y,m[h+o+2]=r.z,m[h+o+3]=0),!0===i&&(r.fromBufferAttribute(s,t),m[h+o+4]=r.x,m[h+o+5]=r.y,m[h+o+6]=r.z,m[h+o+7]=0),!0===a&&(r.fromBufferAttribute(c,t),m[h+o+8]=r.x,m[h+o+9]=r.y,m[h+o+10]=r.z,m[h+o+11]=4===c.itemSize?r.w:1)}}h={count:c,texture:g,size:new Q(f,p)},n.set(s,h),s.addEventListener("dispose",function e(){g.dispose(),n.delete(s),s.removeEventListener("dispose",e)})}if(!0===a.isInstancedMesh&&null!==a.morphTexture)o.getUniforms().setValue(e,"morphTexture",a.morphTexture,i);else{let t=0;for(let e=0;e<l.length;e++)t+=l[e];let i=s.morphTargetsRelative?1:1-t;o.getUniforms().setValue(e,"morphTargetBaseInfluence",i),o.getUniforms().setValue(e,"morphTargetInfluences",l)}o.getUniforms().setValue(e,"morphTargetsTexture",h.texture,i),o.getUniforms().setValue(e,"morphTargetsTextureSize",h.size)}}}function lu(e,t,i,n){let r=new WeakMap;function a(e){let t=e.target;t.removeEventListener("dispose",a),i.remove(t.instanceMatrix),null!==t.instanceColor&&i.remove(t.instanceColor)}return{update:function(s){let o=n.render.frame,l=s.geometry,u=t.get(s,l);if(r.get(u)!==o&&(t.update(u),r.set(u,o)),s.isInstancedMesh&&(!1===s.hasEventListener("dispose",a)&&s.addEventListener("dispose",a),r.get(s)!==o&&(i.update(s.instanceMatrix,e.ARRAY_BUFFER),null!==s.instanceColor&&i.update(s.instanceColor,e.ARRAY_BUFFER),r.set(s,o))),s.isSkinnedMesh){let e=s.skeleton;r.get(e)!==o&&(e.update(),r.set(e,o))}return u},dispose:function(){r=new WeakMap}}}let lc=new ev,lh=new rn(1,1),ld=new eA,lf=new eb,lp=new iP,lm=[],lg=[],lv=new Float32Array(16),lx=new Float32Array(9),ly=new Float32Array(4);function lS(e,t,i){let n=e[0];if(n<=0||n>0)return e;let r=t*i,a=lm[r];if(void 0===a&&(a=new Float32Array(r),lm[r]=a),0!==t){n.toArray(a,0);for(let n=1,r=0;n!==t;++n)r+=i,e[n].toArray(a,r)}return a}function lA(e,t){if(e.length!==t.length)return!1;for(let i=0,n=e.length;i<n;i++)if(e[i]!==t[i])return!1;return!0}function lM(e,t){for(let i=0,n=t.length;i<n;i++)e[i]=t[i]}function lb(e,t){let i=lg[t];void 0===i&&(i=new Int32Array(t),lg[t]=i);for(let n=0;n!==t;++n)i[n]=e.allocateTextureUnit();return i}function lw(e,t){let i=this.cache;i[0]!==t&&(e.uniform1f(this.addr,t),i[0]=t)}function lT(e,t){let i=this.cache;if(void 0!==t.x)(i[0]!==t.x||i[1]!==t.y)&&(e.uniform2f(this.addr,t.x,t.y),i[0]=t.x,i[1]=t.y);else{if(lA(i,t))return;e.uniform2fv(this.addr,t),lM(i,t)}}function lE(e,t){let i=this.cache;if(void 0!==t.x)(i[0]!==t.x||i[1]!==t.y||i[2]!==t.z)&&(e.uniform3f(this.addr,t.x,t.y,t.z),i[0]=t.x,i[1]=t.y,i[2]=t.z);else if(void 0!==t.r)(i[0]!==t.r||i[1]!==t.g||i[2]!==t.b)&&(e.uniform3f(this.addr,t.r,t.g,t.b),i[0]=t.r,i[1]=t.g,i[2]=t.b);else{if(lA(i,t))return;e.uniform3fv(this.addr,t),lM(i,t)}}function l_(e,t){let i=this.cache;if(void 0!==t.x)(i[0]!==t.x||i[1]!==t.y||i[2]!==t.z||i[3]!==t.w)&&(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),i[0]=t.x,i[1]=t.y,i[2]=t.z,i[3]=t.w);else{if(lA(i,t))return;e.uniform4fv(this.addr,t),lM(i,t)}}function lC(e,t){let i=this.cache,n=t.elements;if(void 0===n){if(lA(i,t))return;e.uniformMatrix2fv(this.addr,!1,t),lM(i,t)}else{if(lA(i,n))return;ly.set(n),e.uniformMatrix2fv(this.addr,!1,ly),lM(i,n)}}function lR(e,t){let i=this.cache,n=t.elements;if(void 0===n){if(lA(i,t))return;e.uniformMatrix3fv(this.addr,!1,t),lM(i,t)}else{if(lA(i,n))return;lx.set(n),e.uniformMatrix3fv(this.addr,!1,lx),lM(i,n)}}function lP(e,t){let i=this.cache,n=t.elements;if(void 0===n){if(lA(i,t))return;e.uniformMatrix4fv(this.addr,!1,t),lM(i,t)}else{if(lA(i,n))return;lv.set(n),e.uniformMatrix4fv(this.addr,!1,lv),lM(i,n)}}function lD(e,t){let i=this.cache;i[0]!==t&&(e.uniform1i(this.addr,t),i[0]=t)}function lI(e,t){let i=this.cache;if(void 0!==t.x)(i[0]!==t.x||i[1]!==t.y)&&(e.uniform2i(this.addr,t.x,t.y),i[0]=t.x,i[1]=t.y);else{if(lA(i,t))return;e.uniform2iv(this.addr,t),lM(i,t)}}function lL(e,t){let i=this.cache;if(void 0!==t.x)(i[0]!==t.x||i[1]!==t.y||i[2]!==t.z)&&(e.uniform3i(this.addr,t.x,t.y,t.z),i[0]=t.x,i[1]=t.y,i[2]=t.z);else{if(lA(i,t))return;e.uniform3iv(this.addr,t),lM(i,t)}}function lB(e,t){let i=this.cache;if(void 0!==t.x)(i[0]!==t.x||i[1]!==t.y||i[2]!==t.z||i[3]!==t.w)&&(e.uniform4i(this.addr,t.x,t.y,t.z,t.w),i[0]=t.x,i[1]=t.y,i[2]=t.z,i[3]=t.w);else{if(lA(i,t))return;e.uniform4iv(this.addr,t),lM(i,t)}}function lU(e,t){let i=this.cache;i[0]!==t&&(e.uniform1ui(this.addr,t),i[0]=t)}function lN(e,t){let i=this.cache;if(void 0!==t.x)(i[0]!==t.x||i[1]!==t.y)&&(e.uniform2ui(this.addr,t.x,t.y),i[0]=t.x,i[1]=t.y);else{if(lA(i,t))return;e.uniform2uiv(this.addr,t),lM(i,t)}}function lF(e,t){let i=this.cache;if(void 0!==t.x)(i[0]!==t.x||i[1]!==t.y||i[2]!==t.z)&&(e.uniform3ui(this.addr,t.x,t.y,t.z),i[0]=t.x,i[1]=t.y,i[2]=t.z);else{if(lA(i,t))return;e.uniform3uiv(this.addr,t),lM(i,t)}}function lO(e,t){let i=this.cache;if(void 0!==t.x)(i[0]!==t.x||i[1]!==t.y||i[2]!==t.z||i[3]!==t.w)&&(e.uniform4ui(this.addr,t.x,t.y,t.z,t.w),i[0]=t.x,i[1]=t.y,i[2]=t.z,i[3]=t.w);else{if(lA(i,t))return;e.uniform4uiv(this.addr,t),lM(i,t)}}function lz(e,t,i){let n,r=this.cache,a=i.allocateTextureUnit();r[0]!==a&&(e.uniform1i(this.addr,a),r[0]=a),this.type===e.SAMPLER_2D_SHADOW?(lh.compareFunction=515,n=lh):n=lc,i.setTexture2D(t||n,a)}function lk(e,t,i){let n=this.cache,r=i.allocateTextureUnit();n[0]!==r&&(e.uniform1i(this.addr,r),n[0]=r),i.setTexture3D(t||lf,r)}function lH(e,t,i){let n=this.cache,r=i.allocateTextureUnit();n[0]!==r&&(e.uniform1i(this.addr,r),n[0]=r),i.setTextureCube(t||lp,r)}function lG(e,t,i){let n=this.cache,r=i.allocateTextureUnit();n[0]!==r&&(e.uniform1i(this.addr,r),n[0]=r),i.setTexture2DArray(t||ld,r)}function lV(e,t){e.uniform1fv(this.addr,t)}function lW(e,t){let i=lS(t,this.size,2);e.uniform2fv(this.addr,i)}function lj(e,t){let i=lS(t,this.size,3);e.uniform3fv(this.addr,i)}function lX(e,t){let i=lS(t,this.size,4);e.uniform4fv(this.addr,i)}function lY(e,t){let i=lS(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,i)}function lQ(e,t){let i=lS(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,i)}function lq(e,t){let i=lS(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,i)}function lK(e,t){e.uniform1iv(this.addr,t)}function lZ(e,t){e.uniform2iv(this.addr,t)}function lJ(e,t){e.uniform3iv(this.addr,t)}function l$(e,t){e.uniform4iv(this.addr,t)}function l0(e,t){e.uniform1uiv(this.addr,t)}function l1(e,t){e.uniform2uiv(this.addr,t)}function l2(e,t){e.uniform3uiv(this.addr,t)}function l3(e,t){e.uniform4uiv(this.addr,t)}function l4(e,t,i){let n=this.cache,r=t.length,a=lb(i,r);lA(n,a)||(e.uniform1iv(this.addr,a),lM(n,a));for(let e=0;e!==r;++e)i.setTexture2D(t[e]||lc,a[e])}function l5(e,t,i){let n=this.cache,r=t.length,a=lb(i,r);lA(n,a)||(e.uniform1iv(this.addr,a),lM(n,a));for(let e=0;e!==r;++e)i.setTexture3D(t[e]||lf,a[e])}function l6(e,t,i){let n=this.cache,r=t.length,a=lb(i,r);lA(n,a)||(e.uniform1iv(this.addr,a),lM(n,a));for(let e=0;e!==r;++e)i.setTextureCube(t[e]||lp,a[e])}function l8(e,t,i){let n=this.cache,r=t.length,a=lb(i,r);lA(n,a)||(e.uniform1iv(this.addr,a),lM(n,a));for(let e=0;e!==r;++e)i.setTexture2DArray(t[e]||ld,a[e])}class l9{constructor(e,t,i){this.id=e,this.addr=i,this.cache=[],this.type=t.type,this.setValue=function(e){switch(e){case 5126:return lw;case 35664:return lT;case 35665:return lE;case 35666:return l_;case 35674:return lC;case 35675:return lR;case 35676:return lP;case 5124:case 35670:return lD;case 35667:case 35671:return lI;case 35668:case 35672:return lL;case 35669:case 35673:return lB;case 5125:return lU;case 36294:return lN;case 36295:return lF;case 36296:return lO;case 35678:case 36198:case 36298:case 36306:case 35682:return lz;case 35679:case 36299:case 36307:return lk;case 35680:case 36300:case 36308:case 36293:return lH;case 36289:case 36303:case 36311:case 36292:return lG}}(t.type)}}class l7{constructor(e,t,i){this.id=e,this.addr=i,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=function(e){switch(e){case 5126:return lV;case 35664:return lW;case 35665:return lj;case 35666:return lX;case 35674:return lY;case 35675:return lQ;case 35676:return lq;case 5124:case 35670:return lK;case 35667:case 35671:return lZ;case 35668:case 35672:return lJ;case 35669:case 35673:return l$;case 5125:return l0;case 36294:return l1;case 36295:return l2;case 36296:return l3;case 35678:case 36198:case 36298:case 36306:case 35682:return l4;case 35679:case 36299:case 36307:return l5;case 35680:case 36300:case 36308:case 36293:return l6;case 36289:case 36303:case 36311:case 36292:return l8}}(t.type)}}class ue{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,i){let n=this.seq;for(let r=0,a=n.length;r!==a;++r){let a=n[r];a.setValue(e,t[a.id],i)}}}let ut=/(\w+)(\])?(\[|\.)?/g;function ui(e,t){e.seq.push(t),e.map[t.id]=t}class un{constructor(e,t){this.seq=[],this.map={};const i=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let n=0;n<i;++n){const i=e.getActiveUniform(t,n),r=e.getUniformLocation(t,i.name);!function(e,t,i){let n=e.name,r=n.length;for(ut.lastIndex=0;;){let a=ut.exec(n),s=ut.lastIndex,o=a[1],l="]"===a[2],u=a[3];if(l&&(o|=0),void 0===u||"["===u&&s+2===r){ui(i,void 0===u?new l9(o,e,t):new l7(o,e,t));break}{let e=i.map[o];void 0===e&&ui(i,e=new ue(o)),i=e}}}(i,r,this)}}setValue(e,t,i,n){let r=this.map[t];void 0!==r&&r.setValue(e,i,n)}setOptional(e,t,i){let n=t[i];void 0!==n&&this.setValue(e,i,n)}static upload(e,t,i,n){for(let r=0,a=t.length;r!==a;++r){let a=t[r],s=i[a.id];!1!==s.needsUpdate&&a.setValue(e,s.value,n)}}static seqWithValue(e,t){let i=[];for(let n=0,r=e.length;n!==r;++n){let r=e[n];r.id in t&&i.push(r)}return i}}function ur(e,t,i){let n=e.createShader(t);return e.shaderSource(n,i),e.compileShader(n),n}let ua=0,us=new q;function uo(e,t,i){let n=e.getShaderParameter(t,e.COMPILE_STATUS),r=e.getShaderInfoLog(t).trim();if(n&&""===r)return"";let a=/ERROR: 0:(\d+)/.exec(r);if(!a)return r;{let n=parseInt(a[1]);return i.toUpperCase()+"\n\n"+r+"\n\n"+function(e,t){let i=e.split("\n"),n=[],r=Math.max(t-6,0),a=Math.min(t+6,i.length);for(let e=r;e<a;e++){let r=e+1;n.push(`${r===t?">":" "} ${r}: ${i[e]}`)}return n.join("\n")}(e.getShaderSource(t),n)}}let ul=new eE;function uu(e){return""!==e}function uc(e,t){let i=t.numSpotLightShadows+t.numSpotLightMaps-t.numSpotLightShadowsWithMaps;return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,t.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,i).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,t.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function uh(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}let ud=/^[ \t]*#include +<([\w\d./]+)>/gm;function uf(e){return e.replace(ud,um)}let up=new Map;function um(e,t){let i=oz[t];if(void 0===i){let e=up.get(t);if(void 0!==e)i=oz[e],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,e);else throw Error("Can not resolve #include <"+t+">")}return uf(i)}let ug=/#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 uv(e){return e.replace(ug,ux)}function ux(e,t,i,n){let r="";for(let e=parseInt(t);e<parseInt(i);e++)r+=n.replace(/\[\s*i\s*\]/g,"[ "+e+" ]").replace(/UNROLLED_LOOP_INDEX/g,e);return r}function uy(e){let t=`precision ${e.precision} float;
|
|
precision ${e.precision} int;
|
|
precision ${e.precision} sampler2D;
|
|
precision ${e.precision} samplerCube;
|
|
precision ${e.precision} sampler3D;
|
|
precision ${e.precision} sampler2DArray;
|
|
precision ${e.precision} sampler2DShadow;
|
|
precision ${e.precision} samplerCubeShadow;
|
|
precision ${e.precision} sampler2DArrayShadow;
|
|
precision ${e.precision} isampler2D;
|
|
precision ${e.precision} isampler3D;
|
|
precision ${e.precision} isamplerCube;
|
|
precision ${e.precision} isampler2DArray;
|
|
precision ${e.precision} usampler2D;
|
|
precision ${e.precision} usampler3D;
|
|
precision ${e.precision} usamplerCube;
|
|
precision ${e.precision} usampler2DArray;
|
|
`;return"highp"===e.precision?t+="\n#define HIGH_PRECISION":"mediump"===e.precision?t+="\n#define MEDIUM_PRECISION":"lowp"===e.precision&&(t+="\n#define LOW_PRECISION"),t}function uS(e,t,i,n){let r,a,s,o,l,u,c=e.getContext(),h=i.defines,d=i.vertexShader,f=i.fragmentShader,p=(l="SHADOWMAP_TYPE_BASIC",1===i.shadowMapType?l="SHADOWMAP_TYPE_PCF":2===i.shadowMapType?l="SHADOWMAP_TYPE_PCF_SOFT":3===i.shadowMapType&&(l="SHADOWMAP_TYPE_VSM"),l),m=function(e){let t="ENVMAP_TYPE_CUBE";if(e.envMap)switch(e.envMapMode){case 301:case 302:t="ENVMAP_TYPE_CUBE";break;case 306:t="ENVMAP_TYPE_CUBE_UV"}return t}(i),g=(u="ENVMAP_MODE_REFLECTION",i.envMap&&302===i.envMapMode&&(u="ENVMAP_MODE_REFRACTION"),u),v=function(e){let t="ENVMAP_BLENDING_NONE";if(e.envMap)switch(e.combine){case 0:t="ENVMAP_BLENDING_MULTIPLY";break;case 1:t="ENVMAP_BLENDING_MIX";break;case 2:t="ENVMAP_BLENDING_ADD"}return t}(i),x=function(e){let t=e.envMapCubeUVHeight;if(null===t)return null;let i=Math.log2(t)-2;return{texelWidth:1/(3*Math.max(Math.pow(2,i),112)),texelHeight:1/t,maxMip:i}}(i),y=[i.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",i.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(uu).join("\n"),S=function(e){let t=[];for(let i in e){let n=e[i];!1!==n&&t.push("#define "+i+" "+n)}return t.join("\n")}(h),A=c.createProgram(),M=i.glslVersion?"#version "+i.glslVersion+"\n":"";if(i.isRawShaderMaterial)(r=["#define SHADER_TYPE "+i.shaderType,"#define SHADER_NAME "+i.shaderName,S].filter(uu).join("\n")).length>0&&(r+="\n"),(a=["#define SHADER_TYPE "+i.shaderType,"#define SHADER_NAME "+i.shaderName,S].filter(uu).join("\n")).length>0&&(a+="\n");else{let e,t,n,s;r=[uy(i),"#define SHADER_TYPE "+i.shaderType,"#define SHADER_NAME "+i.shaderName,S,i.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",i.batching?"#define USE_BATCHING":"",i.batchingColor?"#define USE_BATCHING_COLOR":"",i.instancing?"#define USE_INSTANCING":"",i.instancingColor?"#define USE_INSTANCING_COLOR":"",i.instancingMorph?"#define USE_INSTANCING_MORPH":"",i.useFog&&i.fog?"#define USE_FOG":"",i.useFog&&i.fogExp2?"#define FOG_EXP2":"",i.map?"#define USE_MAP":"",i.envMap?"#define USE_ENVMAP":"",i.envMap?"#define "+g:"",i.lightMap?"#define USE_LIGHTMAP":"",i.aoMap?"#define USE_AOMAP":"",i.bumpMap?"#define USE_BUMPMAP":"",i.normalMap?"#define USE_NORMALMAP":"",i.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",i.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",i.displacementMap?"#define USE_DISPLACEMENTMAP":"",i.emissiveMap?"#define USE_EMISSIVEMAP":"",i.anisotropy?"#define USE_ANISOTROPY":"",i.anisotropyMap?"#define USE_ANISOTROPYMAP":"",i.clearcoatMap?"#define USE_CLEARCOATMAP":"",i.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",i.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",i.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",i.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",i.specularMap?"#define USE_SPECULARMAP":"",i.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",i.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",i.roughnessMap?"#define USE_ROUGHNESSMAP":"",i.metalnessMap?"#define USE_METALNESSMAP":"",i.alphaMap?"#define USE_ALPHAMAP":"",i.alphaHash?"#define USE_ALPHAHASH":"",i.transmission?"#define USE_TRANSMISSION":"",i.transmissionMap?"#define USE_TRANSMISSIONMAP":"",i.thicknessMap?"#define USE_THICKNESSMAP":"",i.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",i.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",i.mapUv?"#define MAP_UV "+i.mapUv:"",i.alphaMapUv?"#define ALPHAMAP_UV "+i.alphaMapUv:"",i.lightMapUv?"#define LIGHTMAP_UV "+i.lightMapUv:"",i.aoMapUv?"#define AOMAP_UV "+i.aoMapUv:"",i.emissiveMapUv?"#define EMISSIVEMAP_UV "+i.emissiveMapUv:"",i.bumpMapUv?"#define BUMPMAP_UV "+i.bumpMapUv:"",i.normalMapUv?"#define NORMALMAP_UV "+i.normalMapUv:"",i.displacementMapUv?"#define DISPLACEMENTMAP_UV "+i.displacementMapUv:"",i.metalnessMapUv?"#define METALNESSMAP_UV "+i.metalnessMapUv:"",i.roughnessMapUv?"#define ROUGHNESSMAP_UV "+i.roughnessMapUv:"",i.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+i.anisotropyMapUv:"",i.clearcoatMapUv?"#define CLEARCOATMAP_UV "+i.clearcoatMapUv:"",i.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+i.clearcoatNormalMapUv:"",i.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+i.clearcoatRoughnessMapUv:"",i.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+i.iridescenceMapUv:"",i.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+i.iridescenceThicknessMapUv:"",i.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+i.sheenColorMapUv:"",i.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+i.sheenRoughnessMapUv:"",i.specularMapUv?"#define SPECULARMAP_UV "+i.specularMapUv:"",i.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+i.specularColorMapUv:"",i.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+i.specularIntensityMapUv:"",i.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+i.transmissionMapUv:"",i.thicknessMapUv?"#define THICKNESSMAP_UV "+i.thicknessMapUv:"",i.vertexTangents&&!1===i.flatShading?"#define USE_TANGENT":"",i.vertexColors?"#define USE_COLOR":"",i.vertexAlphas?"#define USE_COLOR_ALPHA":"",i.vertexUv1s?"#define USE_UV1":"",i.vertexUv2s?"#define USE_UV2":"",i.vertexUv3s?"#define USE_UV3":"",i.pointsUvs?"#define USE_POINTS_UV":"",i.flatShading?"#define FLAT_SHADED":"",i.skinning?"#define USE_SKINNING":"",i.morphTargets?"#define USE_MORPHTARGETS":"",i.morphNormals&&!1===i.flatShading?"#define USE_MORPHNORMALS":"",i.morphColors?"#define USE_MORPHCOLORS":"",i.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+i.morphTextureStride:"",i.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+i.morphTargetsCount:"",i.doubleSided?"#define DOUBLE_SIDED":"",i.flipSided?"#define FLIP_SIDED":"",i.shadowMapEnabled?"#define USE_SHADOWMAP":"",i.shadowMapEnabled?"#define "+p:"",i.sizeAttenuation?"#define USE_SIZEATTENUATION":"",i.numLightProbes>0?"#define USE_LIGHT_PROBES":"",i.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",i.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","\n"].filter(uu).join("\n"),a=[uy(i),"#define SHADER_TYPE "+i.shaderType,"#define SHADER_NAME "+i.shaderName,S,i.useFog&&i.fog?"#define USE_FOG":"",i.useFog&&i.fogExp2?"#define FOG_EXP2":"",i.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",i.map?"#define USE_MAP":"",i.matcap?"#define USE_MATCAP":"",i.envMap?"#define USE_ENVMAP":"",i.envMap?"#define "+m:"",i.envMap?"#define "+g:"",i.envMap?"#define "+v:"",x?"#define CUBEUV_TEXEL_WIDTH "+x.texelWidth:"",x?"#define CUBEUV_TEXEL_HEIGHT "+x.texelHeight:"",x?"#define CUBEUV_MAX_MIP "+x.maxMip+".0":"",i.lightMap?"#define USE_LIGHTMAP":"",i.aoMap?"#define USE_AOMAP":"",i.bumpMap?"#define USE_BUMPMAP":"",i.normalMap?"#define USE_NORMALMAP":"",i.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",i.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",i.emissiveMap?"#define USE_EMISSIVEMAP":"",i.anisotropy?"#define USE_ANISOTROPY":"",i.anisotropyMap?"#define USE_ANISOTROPYMAP":"",i.clearcoat?"#define USE_CLEARCOAT":"",i.clearcoatMap?"#define USE_CLEARCOATMAP":"",i.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",i.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",i.dispersion?"#define USE_DISPERSION":"",i.iridescence?"#define USE_IRIDESCENCE":"",i.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",i.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",i.specularMap?"#define USE_SPECULARMAP":"",i.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",i.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",i.roughnessMap?"#define USE_ROUGHNESSMAP":"",i.metalnessMap?"#define USE_METALNESSMAP":"",i.alphaMap?"#define USE_ALPHAMAP":"",i.alphaTest?"#define USE_ALPHATEST":"",i.alphaHash?"#define USE_ALPHAHASH":"",i.sheen?"#define USE_SHEEN":"",i.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",i.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",i.transmission?"#define USE_TRANSMISSION":"",i.transmissionMap?"#define USE_TRANSMISSIONMAP":"",i.thicknessMap?"#define USE_THICKNESSMAP":"",i.vertexTangents&&!1===i.flatShading?"#define USE_TANGENT":"",i.vertexColors||i.instancingColor||i.batchingColor?"#define USE_COLOR":"",i.vertexAlphas?"#define USE_COLOR_ALPHA":"",i.vertexUv1s?"#define USE_UV1":"",i.vertexUv2s?"#define USE_UV2":"",i.vertexUv3s?"#define USE_UV3":"",i.pointsUvs?"#define USE_POINTS_UV":"",i.gradientMap?"#define USE_GRADIENTMAP":"",i.flatShading?"#define FLAT_SHADED":"",i.doubleSided?"#define DOUBLE_SIDED":"",i.flipSided?"#define FLIP_SIDED":"",i.shadowMapEnabled?"#define USE_SHADOWMAP":"",i.shadowMapEnabled?"#define "+p:"",i.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",i.numLightProbes>0?"#define USE_LIGHT_PROBES":"",i.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",i.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",i.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",i.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",0!==i.toneMapping?"#define TONE_MAPPING":"",0!==i.toneMapping?oz.tonemapping_pars_fragment:"",0!==i.toneMapping?function(e,t){let i;switch(t){case 1:i="Linear";break;case 2:i="Reinhard";break;case 3:i="Cineon";break;case 4:i="ACESFilmic";break;case 6:i="AgX";break;case 7:i="Neutral";break;case 5:i="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),i="Linear"}return"vec3 "+e+"( vec3 color ) { return "+i+"ToneMapping( color ); }"}("toneMapping",i.toneMapping):"",i.dithering?"#define DITHERING":"",i.opaque?"#define OPAQUE":"",oz.colorspace_pars_fragment,(e=function(e){eu._getMatrix(us,eu.workingColorSpace,e);let t=`mat3( ${us.elements.map(e=>e.toFixed(4))} )`;switch(eu.getTransfer(e)){case L:return[t,"LinearTransferOETF"];case B:return[t,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space: ",e),[t,"LinearTransferOETF"]}}(i.outputColorSpace),`vec4 linearToOutputTexel( vec4 value ) {
|
|
return ${e[1]}( vec4( value.rgb * ${e[0]}, value.a ) );
|
|
}`),(eu.getLuminanceCoefficients(ul),t=ul.x.toFixed(4),n=ul.y.toFixed(4),s=ul.z.toFixed(4),`float luminance( const in vec3 rgb ) {
|
|
const vec3 weights = vec3( ${t}, ${n}, ${s} );
|
|
return dot( weights, rgb );
|
|
}`),i.useDepthPacking?"#define DEPTH_PACKING "+i.depthPacking:"","\n"].filter(uu).join("\n")}d=uh(d=uc(d=uf(d),i),i),f=uh(f=uc(f=uf(f),i),i),d=uv(d),f=uv(f),!0!==i.isRawShaderMaterial&&(M="#version 300 es\n",r=[y,"#define attribute in\n#define varying out\n#define texture2D texture"].join("\n")+"\n"+r,a=["#define varying in",i.glslVersion===U?"":"layout(location = 0) out highp vec4 pc_fragColor;",i.glslVersion===U?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth\n#define texture2D texture\n#define textureCube texture\n#define texture2DProj textureProj\n#define texture2DLodEXT textureLod\n#define texture2DProjLodEXT textureProjLod\n#define textureCubeLodEXT textureLod\n#define texture2DGradEXT textureGrad\n#define texture2DProjGradEXT textureProjGrad\n#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+a);let b=M+r+d,w=M+a+f,T=ur(c,c.VERTEX_SHADER,b),E=ur(c,c.FRAGMENT_SHADER,w);function _(t){if(e.debug.checkShaderErrors){let i=c.getProgramInfoLog(A).trim(),n=c.getShaderInfoLog(T).trim(),s=c.getShaderInfoLog(E).trim(),o=!0,l=!0;if(!1===c.getProgramParameter(A,c.LINK_STATUS))if(o=!1,"function"==typeof e.debug.onShaderError)e.debug.onShaderError(c,A,T,E);else{let e=uo(c,T,"vertex"),n=uo(c,E,"fragment");console.error("THREE.WebGLProgram: Shader Error "+c.getError()+" - VALIDATE_STATUS "+c.getProgramParameter(A,c.VALIDATE_STATUS)+"\n\nMaterial Name: "+t.name+"\nMaterial Type: "+t.type+"\n\nProgram Info Log: "+i+"\n"+e+"\n"+n)}else""!==i?console.warn("THREE.WebGLProgram: Program Info Log:",i):(""===n||""===s)&&(l=!1);l&&(t.diagnostics={runnable:o,programLog:i,vertexShader:{log:n,prefix:r},fragmentShader:{log:s,prefix:a}})}c.deleteShader(T),c.deleteShader(E),s=new un(c,A),o=function(e,t){let i={},n=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let r=0;r<n;r++){let n=e.getActiveAttrib(t,r),a=n.name,s=1;n.type===e.FLOAT_MAT2&&(s=2),n.type===e.FLOAT_MAT3&&(s=3),n.type===e.FLOAT_MAT4&&(s=4),i[a]={type:n.type,location:e.getAttribLocation(t,a),locationSize:s}}return i}(c,A)}c.attachShader(A,T),c.attachShader(A,E),void 0!==i.index0AttributeName?c.bindAttribLocation(A,0,i.index0AttributeName):!0===i.morphTargets&&c.bindAttribLocation(A,0,"position"),c.linkProgram(A),this.getUniforms=function(){return void 0===s&&_(this),s},this.getAttributes=function(){return void 0===o&&_(this),o};let C=!1===i.rendererExtensionParallelShaderCompile;return this.isReady=function(){return!1===C&&(C=c.getProgramParameter(A,37297)),C},this.destroy=function(){n.releaseStatesOfProgram(this),c.deleteProgram(A),this.program=void 0},this.type=i.shaderType,this.name=i.shaderName,this.id=ua++,this.cacheKey=t,this.usedTimes=1,this.program=A,this.vertexShader=T,this.fragmentShader=E,this}let uA=0;class uM{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){let t=e.vertexShader,i=e.fragmentShader,n=this._getShaderStage(t),r=this._getShaderStage(i),a=this._getShaderCacheForMaterial(e);return!1===a.has(n)&&(a.add(n),n.usedTimes++),!1===a.has(r)&&(a.add(r),r.usedTimes++),this}remove(e){for(let t of this.materialCache.get(e))t.usedTimes--,0===t.usedTimes&&this.shaderCache.delete(t.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){let t=this.materialCache,i=t.get(e);return void 0===i&&(i=new Set,t.set(e,i)),i}_getShaderStage(e){let t=this.shaderCache,i=t.get(e);return void 0===i&&(i=new ub(e),t.set(e,i)),i}}class ub{constructor(e){this.id=uA++,this.code=e,this.usedTimes=0}}function uw(e,t,i,n,r,a,s){let o=new tn,l=new uM,u=new Set,c=[],h=r.logarithmicDepthBuffer,d=r.vertexTextures,f=r.precision,p={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function m(e){return(u.add(e),0===e)?"uv":`uv${e}`}return{getParameters:function(a,o,c,g,v){let x,y,S,A,M=g.fog,b=v.geometry,w=a.isMeshStandardMaterial?g.environment:null,T=(a.isMeshStandardMaterial?i:t).get(a.envMap||w),E=T&&306===T.mapping?T.image.height:null,_=p[a.type];null!==a.precision&&(f=r.getMaxPrecision(a.precision))!==a.precision&&console.warn("THREE.WebGLProgram.getParameters:",a.precision,"not supported, using",f,"instead.");let C=b.morphAttributes.position||b.morphAttributes.normal||b.morphAttributes.color,R=void 0!==C?C.length:0,P=0;if(void 0!==b.morphAttributes.position&&(P=1),void 0!==b.morphAttributes.normal&&(P=2),void 0!==b.morphAttributes.color&&(P=3),_){let e=oH[_];x=e.vertexShader,y=e.fragmentShader}else x=a.vertexShader,y=a.fragmentShader,l.update(a),S=l.getVertexShaderID(a),A=l.getFragmentShaderID(a);let D=e.getRenderTarget(),L=e.state.buffers.depth.getReversed(),U=!0===v.isInstancedMesh,N=!0===v.isBatchedMesh,F=!!a.map,O=!!a.matcap,z=!!T,k=!!a.aoMap,H=!!a.lightMap,G=!!a.bumpMap,V=!!a.normalMap,W=!!a.displacementMap,j=!!a.emissiveMap,X=!!a.metalnessMap,Y=!!a.roughnessMap,Q=a.anisotropy>0,q=a.clearcoat>0,K=a.dispersion>0,Z=a.iridescence>0,J=a.sheen>0,$=a.transmission>0,ee=Q&&!!a.anisotropyMap,et=q&&!!a.clearcoatMap,ei=q&&!!a.clearcoatNormalMap,en=q&&!!a.clearcoatRoughnessMap,er=Z&&!!a.iridescenceMap,ea=Z&&!!a.iridescenceThicknessMap,es=J&&!!a.sheenColorMap,eo=J&&!!a.sheenRoughnessMap,el=!!a.specularMap,ec=!!a.specularColorMap,eh=!!a.specularIntensityMap,ed=$&&!!a.transmissionMap,ef=$&&!!a.thicknessMap,ep=!!a.gradientMap,em=!!a.alphaMap,eg=a.alphaTest>0,ev=!!a.alphaHash,ex=!!a.extensions,ey=0;a.toneMapped&&(null===D||!0===D.isXRRenderTarget)&&(ey=e.toneMapping);let eS={shaderID:_,shaderType:a.type,shaderName:a.name,vertexShader:x,fragmentShader:y,defines:a.defines,customVertexShaderID:S,customFragmentShaderID:A,isRawShaderMaterial:!0===a.isRawShaderMaterial,glslVersion:a.glslVersion,precision:f,batching:N,batchingColor:N&&null!==v._colorsTexture,instancing:U,instancingColor:U&&null!==v.instanceColor,instancingMorph:U&&null!==v.morphTexture,supportsVertexTextures:d,outputColorSpace:null===D?e.outputColorSpace:!0===D.isXRRenderTarget?D.texture.colorSpace:I,alphaToCoverage:!!a.alphaToCoverage,map:F,matcap:O,envMap:z,envMapMode:z&&T.mapping,envMapCubeUVHeight:E,aoMap:k,lightMap:H,bumpMap:G,normalMap:V,displacementMap:d&&W,emissiveMap:j,normalMapObjectSpace:V&&1===a.normalMapType,normalMapTangentSpace:V&&0===a.normalMapType,metalnessMap:X,roughnessMap:Y,anisotropy:Q,anisotropyMap:ee,clearcoat:q,clearcoatMap:et,clearcoatNormalMap:ei,clearcoatRoughnessMap:en,dispersion:K,iridescence:Z,iridescenceMap:er,iridescenceThicknessMap:ea,sheen:J,sheenColorMap:es,sheenRoughnessMap:eo,specularMap:el,specularColorMap:ec,specularIntensityMap:eh,transmission:$,transmissionMap:ed,thicknessMap:ef,gradientMap:ep,opaque:!1===a.transparent&&1===a.blending&&!1===a.alphaToCoverage,alphaMap:em,alphaTest:eg,alphaHash:ev,combine:a.combine,mapUv:F&&m(a.map.channel),aoMapUv:k&&m(a.aoMap.channel),lightMapUv:H&&m(a.lightMap.channel),bumpMapUv:G&&m(a.bumpMap.channel),normalMapUv:V&&m(a.normalMap.channel),displacementMapUv:W&&m(a.displacementMap.channel),emissiveMapUv:j&&m(a.emissiveMap.channel),metalnessMapUv:X&&m(a.metalnessMap.channel),roughnessMapUv:Y&&m(a.roughnessMap.channel),anisotropyMapUv:ee&&m(a.anisotropyMap.channel),clearcoatMapUv:et&&m(a.clearcoatMap.channel),clearcoatNormalMapUv:ei&&m(a.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:en&&m(a.clearcoatRoughnessMap.channel),iridescenceMapUv:er&&m(a.iridescenceMap.channel),iridescenceThicknessMapUv:ea&&m(a.iridescenceThicknessMap.channel),sheenColorMapUv:es&&m(a.sheenColorMap.channel),sheenRoughnessMapUv:eo&&m(a.sheenRoughnessMap.channel),specularMapUv:el&&m(a.specularMap.channel),specularColorMapUv:ec&&m(a.specularColorMap.channel),specularIntensityMapUv:eh&&m(a.specularIntensityMap.channel),transmissionMapUv:ed&&m(a.transmissionMap.channel),thicknessMapUv:ef&&m(a.thicknessMap.channel),alphaMapUv:em&&m(a.alphaMap.channel),vertexTangents:!!b.attributes.tangent&&(V||Q),vertexColors:a.vertexColors,vertexAlphas:!0===a.vertexColors&&!!b.attributes.color&&4===b.attributes.color.itemSize,pointsUvs:!0===v.isPoints&&!!b.attributes.uv&&(F||em),fog:!!M,useFog:!0===a.fog,fogExp2:!!M&&M.isFogExp2,flatShading:!0===a.flatShading,sizeAttenuation:!0===a.sizeAttenuation,logarithmicDepthBuffer:h,reverseDepthBuffer:L,skinning:!0===v.isSkinnedMesh,morphTargets:void 0!==b.morphAttributes.position,morphNormals:void 0!==b.morphAttributes.normal,morphColors:void 0!==b.morphAttributes.color,morphTargetsCount:R,morphTextureStride:P,numDirLights:o.directional.length,numPointLights:o.point.length,numSpotLights:o.spot.length,numSpotLightMaps:o.spotLightMap.length,numRectAreaLights:o.rectArea.length,numHemiLights:o.hemi.length,numDirLightShadows:o.directionalShadowMap.length,numPointLightShadows:o.pointShadowMap.length,numSpotLightShadows:o.spotShadowMap.length,numSpotLightShadowsWithMaps:o.numSpotLightShadowsWithMaps,numLightProbes:o.numLightProbes,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:a.dithering,shadowMapEnabled:e.shadowMap.enabled&&c.length>0,shadowMapType:e.shadowMap.type,toneMapping:ey,decodeVideoTexture:F&&!0===a.map.isVideoTexture&&eu.getTransfer(a.map.colorSpace)===B,decodeVideoTextureEmissive:j&&!0===a.emissiveMap.isVideoTexture&&eu.getTransfer(a.emissiveMap.colorSpace)===B,premultipliedAlpha:a.premultipliedAlpha,doubleSided:2===a.side,flipSided:1===a.side,useDepthPacking:a.depthPacking>=0,depthPacking:a.depthPacking||0,index0AttributeName:a.index0AttributeName,extensionClipCullDistance:ex&&!0===a.extensions.clipCullDistance&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(ex&&!0===a.extensions.multiDraw||N)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:a.customProgramCacheKey()};return eS.vertexUv1s=u.has(1),eS.vertexUv2s=u.has(2),eS.vertexUv3s=u.has(3),u.clear(),eS},getProgramCacheKey:function(t){var i,n,r,a;let s=[];if(t.shaderID?s.push(t.shaderID):(s.push(t.customVertexShaderID),s.push(t.customFragmentShaderID)),void 0!==t.defines)for(let e in t.defines)s.push(e),s.push(t.defines[e]);return!1===t.isRawShaderMaterial&&(i=s,n=t,i.push(n.precision),i.push(n.outputColorSpace),i.push(n.envMapMode),i.push(n.envMapCubeUVHeight),i.push(n.mapUv),i.push(n.alphaMapUv),i.push(n.lightMapUv),i.push(n.aoMapUv),i.push(n.bumpMapUv),i.push(n.normalMapUv),i.push(n.displacementMapUv),i.push(n.emissiveMapUv),i.push(n.metalnessMapUv),i.push(n.roughnessMapUv),i.push(n.anisotropyMapUv),i.push(n.clearcoatMapUv),i.push(n.clearcoatNormalMapUv),i.push(n.clearcoatRoughnessMapUv),i.push(n.iridescenceMapUv),i.push(n.iridescenceThicknessMapUv),i.push(n.sheenColorMapUv),i.push(n.sheenRoughnessMapUv),i.push(n.specularMapUv),i.push(n.specularColorMapUv),i.push(n.specularIntensityMapUv),i.push(n.transmissionMapUv),i.push(n.thicknessMapUv),i.push(n.combine),i.push(n.fogExp2),i.push(n.sizeAttenuation),i.push(n.morphTargetsCount),i.push(n.morphAttributeCount),i.push(n.numDirLights),i.push(n.numPointLights),i.push(n.numSpotLights),i.push(n.numSpotLightMaps),i.push(n.numHemiLights),i.push(n.numRectAreaLights),i.push(n.numDirLightShadows),i.push(n.numPointLightShadows),i.push(n.numSpotLightShadows),i.push(n.numSpotLightShadowsWithMaps),i.push(n.numLightProbes),i.push(n.shadowMapType),i.push(n.toneMapping),i.push(n.numClippingPlanes),i.push(n.numClipIntersection),i.push(n.depthPacking),r=s,a=t,o.disableAll(),a.supportsVertexTextures&&o.enable(0),a.instancing&&o.enable(1),a.instancingColor&&o.enable(2),a.instancingMorph&&o.enable(3),a.matcap&&o.enable(4),a.envMap&&o.enable(5),a.normalMapObjectSpace&&o.enable(6),a.normalMapTangentSpace&&o.enable(7),a.clearcoat&&o.enable(8),a.iridescence&&o.enable(9),a.alphaTest&&o.enable(10),a.vertexColors&&o.enable(11),a.vertexAlphas&&o.enable(12),a.vertexUv1s&&o.enable(13),a.vertexUv2s&&o.enable(14),a.vertexUv3s&&o.enable(15),a.vertexTangents&&o.enable(16),a.anisotropy&&o.enable(17),a.alphaHash&&o.enable(18),a.batching&&o.enable(19),a.dispersion&&o.enable(20),a.batchingColor&&o.enable(21),r.push(o.mask),o.disableAll(),a.fog&&o.enable(0),a.useFog&&o.enable(1),a.flatShading&&o.enable(2),a.logarithmicDepthBuffer&&o.enable(3),a.reverseDepthBuffer&&o.enable(4),a.skinning&&o.enable(5),a.morphTargets&&o.enable(6),a.morphNormals&&o.enable(7),a.morphColors&&o.enable(8),a.premultipliedAlpha&&o.enable(9),a.shadowMapEnabled&&o.enable(10),a.doubleSided&&o.enable(11),a.flipSided&&o.enable(12),a.useDepthPacking&&o.enable(13),a.dithering&&o.enable(14),a.transmission&&o.enable(15),a.sheen&&o.enable(16),a.opaque&&o.enable(17),a.pointsUvs&&o.enable(18),a.decodeVideoTexture&&o.enable(19),a.decodeVideoTextureEmissive&&o.enable(20),a.alphaToCoverage&&o.enable(21),r.push(o.mask),s.push(e.outputColorSpace)),s.push(t.customProgramCacheKey),s.join()},getUniforms:function(e){let t,i=p[e.type];if(i){let e=oH[i];t=iM.clone(e.uniforms)}else t=e.uniforms;return t},acquireProgram:function(t,i){let n;for(let e=0,t=c.length;e<t;e++){let t=c[e];if(t.cacheKey===i){n=t,++n.usedTimes;break}}return void 0===n&&(n=new uS(e,i,t,a),c.push(n)),n},releaseProgram:function(e){if(0==--e.usedTimes){let t=c.indexOf(e);c[t]=c[c.length-1],c.pop(),e.destroy()}},releaseShaderCache:function(e){l.remove(e)},programs:c,dispose:function(){l.dispose()}}}function uT(){let e=new WeakMap;return{has:function(t){return e.has(t)},get:function(t){let i=e.get(t);return void 0===i&&(i={},e.set(t,i)),i},remove:function(t){e.delete(t)},update:function(t,i,n){e.get(t)[i]=n},dispose:function(){e=new WeakMap}}}function uE(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.material.id!==t.material.id?e.material.id-t.material.id:e.z!==t.z?e.z-t.z:e.id-t.id}function u_(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function uC(){let e=[],t=0,i=[],n=[],r=[];function a(i,n,r,a,s,o){let l=e[t];return void 0===l?(l={id:i.id,object:i,geometry:n,material:r,groupOrder:a,renderOrder:i.renderOrder,z:s,group:o},e[t]=l):(l.id=i.id,l.object=i,l.geometry=n,l.material=r,l.groupOrder=a,l.renderOrder=i.renderOrder,l.z=s,l.group=o),t++,l}return{opaque:i,transmissive:n,transparent:r,init:function(){t=0,i.length=0,n.length=0,r.length=0},push:function(e,t,s,o,l,u){let c=a(e,t,s,o,l,u);s.transmission>0?n.push(c):!0===s.transparent?r.push(c):i.push(c)},unshift:function(e,t,s,o,l,u){let c=a(e,t,s,o,l,u);s.transmission>0?n.unshift(c):!0===s.transparent?r.unshift(c):i.unshift(c)},finish:function(){for(let i=t,n=e.length;i<n;i++){let t=e[i];if(null===t.id)break;t.id=null,t.object=null,t.geometry=null,t.material=null,t.group=null}},sort:function(e,t){i.length>1&&i.sort(e||uE),n.length>1&&n.sort(t||u_),r.length>1&&r.sort(t||u_)}}}function uR(){let e=new WeakMap;return{get:function(t,i){let n,r=e.get(t);return void 0===r?(n=new uC,e.set(t,[n])):i>=r.length?(n=new uC,r.push(n)):n=r[i],n},dispose:function(){e=new WeakMap}}}function uP(){let e={};return{get:function(t){let i;if(void 0!==e[t.id])return e[t.id];switch(t.type){case"DirectionalLight":i={direction:new eE,color:new tO};break;case"SpotLight":i={position:new eE,direction:new eE,color:new tO,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":i={position:new eE,color:new tO,distance:0,decay:0};break;case"HemisphereLight":i={direction:new eE,skyColor:new tO,groundColor:new tO};break;case"RectAreaLight":i={color:new tO,position:new eE,halfWidth:new eE,halfHeight:new eE}}return e[t.id]=i,i}}}let uD=0;function uI(e,t){return 2*!!t.castShadow-2*!!e.castShadow+ +!!t.map-!!e.map}function uL(e){let t,i=new uP,n=(t={},{get:function(e){let i;if(void 0!==t[e.id])return t[e.id];switch(e.type){case"DirectionalLight":case"SpotLight":i={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Q};break;case"PointLight":i={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Q,shadowCameraNear:1,shadowCameraFar:1e3}}return t[e.id]=i,i}}),r={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 e=0;e<9;e++)r.probe.push(new eE);let a=new eE,s=new e2,o=new e2;return{setup:function(t){let a=0,s=0,o=0;for(let e=0;e<9;e++)r.probe[e].set(0,0,0);let l=0,u=0,c=0,h=0,d=0,f=0,p=0,m=0,g=0,v=0,x=0;t.sort(uI);for(let e=0,y=t.length;e<y;e++){let y=t[e],S=y.color,A=y.intensity,M=y.distance,b=y.shadow&&y.shadow.map?y.shadow.map.texture:null;if(y.isAmbientLight)a+=S.r*A,s+=S.g*A,o+=S.b*A;else if(y.isLightProbe){for(let e=0;e<9;e++)r.probe[e].addScaledVector(y.sh.coefficients[e],A);x++}else if(y.isDirectionalLight){let e=i.get(y);if(e.color.copy(y.color).multiplyScalar(y.intensity),y.castShadow){let e=y.shadow,t=n.get(y);t.shadowIntensity=e.intensity,t.shadowBias=e.bias,t.shadowNormalBias=e.normalBias,t.shadowRadius=e.radius,t.shadowMapSize=e.mapSize,r.directionalShadow[l]=t,r.directionalShadowMap[l]=b,r.directionalShadowMatrix[l]=y.shadow.matrix,f++}r.directional[l]=e,l++}else if(y.isSpotLight){let e=i.get(y);e.position.setFromMatrixPosition(y.matrixWorld),e.color.copy(S).multiplyScalar(A),e.distance=M,e.coneCos=Math.cos(y.angle),e.penumbraCos=Math.cos(y.angle*(1-y.penumbra)),e.decay=y.decay,r.spot[c]=e;let t=y.shadow;if(y.map&&(r.spotLightMap[g]=y.map,g++,t.updateMatrices(y),y.castShadow&&v++),r.spotLightMatrix[c]=t.matrix,y.castShadow){let e=n.get(y);e.shadowIntensity=t.intensity,e.shadowBias=t.bias,e.shadowNormalBias=t.normalBias,e.shadowRadius=t.radius,e.shadowMapSize=t.mapSize,r.spotShadow[c]=e,r.spotShadowMap[c]=b,m++}c++}else if(y.isRectAreaLight){let e=i.get(y);e.color.copy(S).multiplyScalar(A),e.halfWidth.set(.5*y.width,0,0),e.halfHeight.set(0,.5*y.height,0),r.rectArea[h]=e,h++}else if(y.isPointLight){let e=i.get(y);if(e.color.copy(y.color).multiplyScalar(y.intensity),e.distance=y.distance,e.decay=y.decay,y.castShadow){let e=y.shadow,t=n.get(y);t.shadowIntensity=e.intensity,t.shadowBias=e.bias,t.shadowNormalBias=e.normalBias,t.shadowRadius=e.radius,t.shadowMapSize=e.mapSize,t.shadowCameraNear=e.camera.near,t.shadowCameraFar=e.camera.far,r.pointShadow[u]=t,r.pointShadowMap[u]=b,r.pointShadowMatrix[u]=y.shadow.matrix,p++}r.point[u]=e,u++}else if(y.isHemisphereLight){let e=i.get(y);e.skyColor.copy(y.color).multiplyScalar(A),e.groundColor.copy(y.groundColor).multiplyScalar(A),r.hemi[d]=e,d++}}h>0&&(!0===e.has("OES_texture_float_linear")?(r.rectAreaLTC1=ok.LTC_FLOAT_1,r.rectAreaLTC2=ok.LTC_FLOAT_2):(r.rectAreaLTC1=ok.LTC_HALF_1,r.rectAreaLTC2=ok.LTC_HALF_2)),r.ambient[0]=a,r.ambient[1]=s,r.ambient[2]=o;let y=r.hash;(y.directionalLength!==l||y.pointLength!==u||y.spotLength!==c||y.rectAreaLength!==h||y.hemiLength!==d||y.numDirectionalShadows!==f||y.numPointShadows!==p||y.numSpotShadows!==m||y.numSpotMaps!==g||y.numLightProbes!==x)&&(r.directional.length=l,r.spot.length=c,r.rectArea.length=h,r.point.length=u,r.hemi.length=d,r.directionalShadow.length=f,r.directionalShadowMap.length=f,r.pointShadow.length=p,r.pointShadowMap.length=p,r.spotShadow.length=m,r.spotShadowMap.length=m,r.directionalShadowMatrix.length=f,r.pointShadowMatrix.length=p,r.spotLightMatrix.length=m+g-v,r.spotLightMap.length=g,r.numSpotLightShadowsWithMaps=v,r.numLightProbes=x,y.directionalLength=l,y.pointLength=u,y.spotLength=c,y.rectAreaLength=h,y.hemiLength=d,y.numDirectionalShadows=f,y.numPointShadows=p,y.numSpotShadows=m,y.numSpotMaps=g,y.numLightProbes=x,r.version=uD++)},setupView:function(e,t){let i=0,n=0,l=0,u=0,c=0,h=t.matrixWorldInverse;for(let t=0,d=e.length;t<d;t++){let d=e[t];if(d.isDirectionalLight){let e=r.directional[i];e.direction.setFromMatrixPosition(d.matrixWorld),a.setFromMatrixPosition(d.target.matrixWorld),e.direction.sub(a),e.direction.transformDirection(h),i++}else if(d.isSpotLight){let e=r.spot[l];e.position.setFromMatrixPosition(d.matrixWorld),e.position.applyMatrix4(h),e.direction.setFromMatrixPosition(d.matrixWorld),a.setFromMatrixPosition(d.target.matrixWorld),e.direction.sub(a),e.direction.transformDirection(h),l++}else if(d.isRectAreaLight){let e=r.rectArea[u];e.position.setFromMatrixPosition(d.matrixWorld),e.position.applyMatrix4(h),o.identity(),s.copy(d.matrixWorld),s.premultiply(h),o.extractRotation(s),e.halfWidth.set(.5*d.width,0,0),e.halfHeight.set(0,.5*d.height,0),e.halfWidth.applyMatrix4(o),e.halfHeight.applyMatrix4(o),u++}else if(d.isPointLight){let e=r.point[n];e.position.setFromMatrixPosition(d.matrixWorld),e.position.applyMatrix4(h),n++}else if(d.isHemisphereLight){let e=r.hemi[c];e.direction.setFromMatrixPosition(d.matrixWorld),e.direction.transformDirection(h),c++}}},state:r}}function uB(e){let t=new uL(e),i=[],n=[],r={lightsArray:i,shadowsArray:n,camera:null,lights:t,transmissionRenderTarget:{}};return{init:function(e){r.camera=e,i.length=0,n.length=0},state:r,setupLights:function(){t.setup(i)},setupLightsView:function(e){t.setupView(i,e)},pushLight:function(e){i.push(e)},pushShadow:function(e){n.push(e)}}}function uU(e){let t=new WeakMap;return{get:function(i,n=0){let r,a=t.get(i);return void 0===a?(r=new uB(e),t.set(i,[r])):n>=a.length?(r=new uB(e),a.push(r)):r=a[n],r},dispose:function(){t=new WeakMap}}}function uN(e,t,i){let n=new nM,r=new Q,a=new Q,s=new ex,o=new av({depthPacking:3201}),l=new ax,u={},c=i.maxTextureSize,h={0:1,1:0,2:2},d=new ib({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Q},radius:{value:4}},vertexShader:"void main() {\n gl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n const float samples = float( VSM_SAMPLES );\n float mean = 0.0;\n float squared_mean = 0.0;\n float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n float uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n for ( float i = 0.0; i < samples; i ++ ) {\n float uvOffset = uvStart + i * uvStride;\n #ifdef HORIZONTAL_PASS\n vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n mean += distribution.x;\n squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n #else\n float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n mean += depth;\n squared_mean += depth * depth;\n #endif\n }\n mean = mean / samples;\n squared_mean = squared_mean / samples;\n float std_dev = sqrt( squared_mean - mean * mean );\n gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),f=d.clone();f.defines.HORIZONTAL_PASS=1;let p=new ii;p.setAttribute("position",new tq(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let m=new ig(p,d),g=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1;let v=this.type;function x(t,i,n,r){let a=null,s=!0===n.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(void 0!==s)a=s;else if(a=!0===n.isPointLight?l:o,e.localClippingEnabled&&!0===i.clipShadows&&Array.isArray(i.clippingPlanes)&&0!==i.clippingPlanes.length||i.displacementMap&&0!==i.displacementScale||i.alphaMap&&i.alphaTest>0||i.map&&i.alphaTest>0){let e=a.uuid,t=i.uuid,n=u[e];void 0===n&&(n={},u[e]=n);let r=n[t];void 0===r&&(r=a.clone(),n[t]=r,i.addEventListener("dispose",y)),a=r}return a.visible=i.visible,a.wireframe=i.wireframe,3===r?a.side=null!==i.shadowSide?i.shadowSide:i.side:a.side=null!==i.shadowSide?i.shadowSide:h[i.side],a.alphaMap=i.alphaMap,a.alphaTest=i.alphaTest,a.map=i.map,a.clipShadows=i.clipShadows,a.clippingPlanes=i.clippingPlanes,a.clipIntersection=i.clipIntersection,a.displacementMap=i.displacementMap,a.displacementScale=i.displacementScale,a.displacementBias=i.displacementBias,a.wireframeLinewidth=i.wireframeLinewidth,a.linewidth=i.linewidth,!0===n.isPointLight&&!0===a.isMeshDistanceMaterial&&(e.properties.get(a).light=n),a}function y(e){for(let t in e.target.removeEventListener("dispose",y),u){let i=u[t],n=e.target.uuid;n in i&&(i[n].dispose(),delete i[n])}}this.render=function(i,o,l){if(!1===g.enabled||!1===g.autoUpdate&&!1===g.needsUpdate||0===i.length)return;let u=e.getRenderTarget(),h=e.getActiveCubeFace(),p=e.getActiveMipmapLevel(),y=e.state;y.setBlending(0),y.buffers.color.setClear(1,1,1,1),y.buffers.depth.setTest(!0),y.setScissorTest(!1);let S=3!==v&&3===this.type,A=3===v&&3!==this.type;for(let u=0,h=i.length;u<h;u++){let h=i[u],p=h.shadow;if(void 0===p){console.warn("THREE.WebGLShadowMap:",h,"has no shadow.");continue}if(!1===p.autoUpdate&&!1===p.needsUpdate)continue;r.copy(p.mapSize);let g=p.getFrameExtents();if(r.multiply(g),a.copy(p.mapSize),(r.x>c||r.y>c)&&(r.x>c&&(a.x=Math.floor(c/g.x),r.x=a.x*g.x,p.mapSize.x=a.x),r.y>c&&(a.y=Math.floor(c/g.y),r.y=a.y*g.y,p.mapSize.y=a.y)),null===p.map||!0===S||!0===A){let e=3!==this.type?{minFilter:1003,magFilter:1003}:{};null!==p.map&&p.map.dispose(),p.map=new eS(r.x,r.y,e),p.map.texture.name=h.name+".shadowMap",p.camera.updateProjectionMatrix()}e.setRenderTarget(p.map),e.clear();let v=p.getViewportCount();for(let i=0;i<v;i++){let r=p.getViewport(i);s.set(a.x*r.x,a.y*r.y,a.x*r.z,a.y*r.w),y.viewport(s),p.updateMatrices(h,i),n=p.getFrustum(),function i(r,a,s,o,l){if(!1===r.visible)return;if(r.layers.test(a.layers)&&(r.isMesh||r.isLine||r.isPoints)&&(r.castShadow||r.receiveShadow&&3===l)&&(!r.frustumCulled||n.intersectsObject(r))){r.modelViewMatrix.multiplyMatrices(s.matrixWorldInverse,r.matrixWorld);let i=t.update(r),n=r.material;if(Array.isArray(n)){let t=i.groups;for(let u=0,c=t.length;u<c;u++){let c=t[u],h=n[c.materialIndex];if(h&&h.visible){let t=x(r,h,o,l);r.onBeforeShadow(e,r,a,s,i,t,c),e.renderBufferDirect(s,null,i,t,r,c),r.onAfterShadow(e,r,a,s,i,t,c)}}}else if(n.visible){let t=x(r,n,o,l);r.onBeforeShadow(e,r,a,s,i,t,null),e.renderBufferDirect(s,null,i,t,r,null),r.onAfterShadow(e,r,a,s,i,t,null)}}let u=r.children;for(let e=0,t=u.length;e<t;e++)i(u[e],a,s,o,l)}(o,l,p.camera,h,this.type)}!0!==p.isPointLightShadow&&3===this.type&&function(i,n){let a=t.update(m);d.defines.VSM_SAMPLES!==i.blurSamples&&(d.defines.VSM_SAMPLES=i.blurSamples,f.defines.VSM_SAMPLES=i.blurSamples,d.needsUpdate=!0,f.needsUpdate=!0),null===i.mapPass&&(i.mapPass=new eS(r.x,r.y)),d.uniforms.shadow_pass.value=i.map.texture,d.uniforms.resolution.value=i.mapSize,d.uniforms.radius.value=i.radius,e.setRenderTarget(i.mapPass),e.clear(),e.renderBufferDirect(n,null,a,d,m,null),f.uniforms.shadow_pass.value=i.mapPass.texture,f.uniforms.resolution.value=i.mapSize,f.uniforms.radius.value=i.radius,e.setRenderTarget(i.map),e.clear(),e.renderBufferDirect(n,null,a,f,m,null)}(p,l),p.needsUpdate=!1}v=this.type,g.needsUpdate=!1,e.setRenderTarget(u,h,p)}}let uF={0:1,2:6,4:7,3:5,1:0,6:2,7:4,5:3};function uO(e,t){let i=new function(){let t=!1,i=new ex,n=null,r=new ex(0,0,0,0);return{setMask:function(i){n===i||t||(e.colorMask(i,i,i,i),n=i)},setLocked:function(e){t=e},setClear:function(t,n,a,s,o){!0===o&&(t*=s,n*=s,a*=s),i.set(t,n,a,s),!1===r.equals(i)&&(e.clearColor(t,n,a,s),r.copy(i))},reset:function(){t=!1,n=null,r.set(-1,0,0,0)}}},n=new function(){let i=!1,n=!1,r=null,a=null,s=null;return{setReversed:function(e){if(n!==e){let e=t.get("EXT_clip_control");n?e.clipControlEXT(e.LOWER_LEFT_EXT,e.ZERO_TO_ONE_EXT):e.clipControlEXT(e.LOWER_LEFT_EXT,e.NEGATIVE_ONE_TO_ONE_EXT);let i=s;s=null,this.setClear(i)}n=e},getReversed:function(){return n},setTest:function(t){t?z(e.DEPTH_TEST):k(e.DEPTH_TEST)},setMask:function(t){r===t||i||(e.depthMask(t),r=t)},setFunc:function(t){if(n&&(t=uF[t]),a!==t){switch(t){case 0:e.depthFunc(e.NEVER);break;case 1:e.depthFunc(e.ALWAYS);break;case 2:e.depthFunc(e.LESS);break;case 3:default:e.depthFunc(e.LEQUAL);break;case 4:e.depthFunc(e.EQUAL);break;case 5:e.depthFunc(e.GEQUAL);break;case 6:e.depthFunc(e.GREATER);break;case 7:e.depthFunc(e.NOTEQUAL)}a=t}},setLocked:function(e){i=e},setClear:function(t){s!==t&&(n&&(t=1-t),e.clearDepth(t),s=t)},reset:function(){i=!1,r=null,a=null,s=null,n=!1}}},r=new function(){let t=!1,i=null,n=null,r=null,a=null,s=null,o=null,l=null,u=null;return{setTest:function(i){t||(i?z(e.STENCIL_TEST):k(e.STENCIL_TEST))},setMask:function(n){i===n||t||(e.stencilMask(n),i=n)},setFunc:function(t,i,s){(n!==t||r!==i||a!==s)&&(e.stencilFunc(t,i,s),n=t,r=i,a=s)},setOp:function(t,i,n){(s!==t||o!==i||l!==n)&&(e.stencilOp(t,i,n),s=t,o=i,l=n)},setLocked:function(e){t=e},setClear:function(t){u!==t&&(e.clearStencil(t),u=t)},reset:function(){t=!1,i=null,n=null,r=null,a=null,s=null,o=null,l=null,u=null}}},a=new WeakMap,s=new WeakMap,o={},l={},u=new WeakMap,c=[],h=null,d=!1,f=null,p=null,m=null,g=null,v=null,x=null,y=null,S=new tO(0,0,0),A=0,M=!1,b=null,w=null,T=null,E=null,_=null,C=e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS),R=!1,P=e.getParameter(e.VERSION);-1!==P.indexOf("WebGL")?R=parseFloat(/^WebGL (\d)/.exec(P)[1])>=1:-1!==P.indexOf("OpenGL ES")&&(R=parseFloat(/^OpenGL ES (\d)/.exec(P)[1])>=2);let D=null,I={},L=e.getParameter(e.SCISSOR_BOX),B=e.getParameter(e.VIEWPORT),U=new ex().fromArray(L),N=new ex().fromArray(B);function F(t,i,n,r){let a=new Uint8Array(4),s=e.createTexture();e.bindTexture(t,s),e.texParameteri(t,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(t,e.TEXTURE_MAG_FILTER,e.NEAREST);for(let s=0;s<n;s++)t===e.TEXTURE_3D||t===e.TEXTURE_2D_ARRAY?e.texImage3D(i,0,e.RGBA,1,1,r,0,e.RGBA,e.UNSIGNED_BYTE,a):e.texImage2D(i+s,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,a);return s}let O={};function z(t){!0!==o[t]&&(e.enable(t),o[t]=!0)}function k(t){!1!==o[t]&&(e.disable(t),o[t]=!1)}O[e.TEXTURE_2D]=F(e.TEXTURE_2D,e.TEXTURE_2D,1),O[e.TEXTURE_CUBE_MAP]=F(e.TEXTURE_CUBE_MAP,e.TEXTURE_CUBE_MAP_POSITIVE_X,6),O[e.TEXTURE_2D_ARRAY]=F(e.TEXTURE_2D_ARRAY,e.TEXTURE_2D_ARRAY,1,1),O[e.TEXTURE_3D]=F(e.TEXTURE_3D,e.TEXTURE_3D,1,1),i.setClear(0,0,0,1),n.setClear(1),r.setClear(0),z(e.DEPTH_TEST),n.setFunc(3),W(!1),j(1),z(e.CULL_FACE),V(0);let H={100:e.FUNC_ADD,101:e.FUNC_SUBTRACT,102:e.FUNC_REVERSE_SUBTRACT};H[103]=e.MIN,H[104]=e.MAX;let G={200:e.ZERO,201:e.ONE,202:e.SRC_COLOR,204:e.SRC_ALPHA,210:e.SRC_ALPHA_SATURATE,208:e.DST_COLOR,206:e.DST_ALPHA,203:e.ONE_MINUS_SRC_COLOR,205:e.ONE_MINUS_SRC_ALPHA,209:e.ONE_MINUS_DST_COLOR,207:e.ONE_MINUS_DST_ALPHA,211:e.CONSTANT_COLOR,212:e.ONE_MINUS_CONSTANT_COLOR,213:e.CONSTANT_ALPHA,214:e.ONE_MINUS_CONSTANT_ALPHA};function V(t,i,n,r,a,s,o,l,u,c){if(0===t){!0===d&&(k(e.BLEND),d=!1);return}if(!1===d&&(z(e.BLEND),d=!0),5!==t){if(t!==f||c!==M){if((100!==p||100!==v)&&(e.blendEquation(e.FUNC_ADD),p=100,v=100),c)switch(t){case 1:e.blendFuncSeparate(e.ONE,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA);break;case 2:e.blendFunc(e.ONE,e.ONE);break;case 3:e.blendFuncSeparate(e.ZERO,e.ONE_MINUS_SRC_COLOR,e.ZERO,e.ONE);break;case 4:e.blendFuncSeparate(e.ZERO,e.SRC_COLOR,e.ZERO,e.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}else switch(t){case 1:e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA);break;case 2:e.blendFunc(e.SRC_ALPHA,e.ONE);break;case 3:e.blendFuncSeparate(e.ZERO,e.ONE_MINUS_SRC_COLOR,e.ZERO,e.ONE);break;case 4:e.blendFunc(e.ZERO,e.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}m=null,g=null,x=null,y=null,S.set(0,0,0),A=0,f=t,M=c}return}a=a||i,s=s||n,o=o||r,(i!==p||a!==v)&&(e.blendEquationSeparate(H[i],H[a]),p=i,v=a),(n!==m||r!==g||s!==x||o!==y)&&(e.blendFuncSeparate(G[n],G[r],G[s],G[o]),m=n,g=r,x=s,y=o),(!1===l.equals(S)||u!==A)&&(e.blendColor(l.r,l.g,l.b,u),S.copy(l),A=u),f=t,M=!1}function W(t){b!==t&&(t?e.frontFace(e.CW):e.frontFace(e.CCW),b=t)}function j(t){0!==t?(z(e.CULL_FACE),t!==w&&(1===t?e.cullFace(e.BACK):2===t?e.cullFace(e.FRONT):e.cullFace(e.FRONT_AND_BACK))):k(e.CULL_FACE),w=t}function X(t,i,n){t?(z(e.POLYGON_OFFSET_FILL),(E!==i||_!==n)&&(e.polygonOffset(i,n),E=i,_=n)):k(e.POLYGON_OFFSET_FILL)}return{buffers:{color:i,depth:n,stencil:r},enable:z,disable:k,bindFramebuffer:function(t,i){return l[t]!==i&&(e.bindFramebuffer(t,i),l[t]=i,t===e.DRAW_FRAMEBUFFER&&(l[e.FRAMEBUFFER]=i),t===e.FRAMEBUFFER&&(l[e.DRAW_FRAMEBUFFER]=i),!0)},drawBuffers:function(t,i){let n=c,r=!1;if(t){void 0===(n=u.get(i))&&(n=[],u.set(i,n));let a=t.textures;if(n.length!==a.length||n[0]!==e.COLOR_ATTACHMENT0){for(let t=0,i=a.length;t<i;t++)n[t]=e.COLOR_ATTACHMENT0+t;n.length=a.length,r=!0}}else n[0]!==e.BACK&&(n[0]=e.BACK,r=!0);r&&e.drawBuffers(n)},useProgram:function(t){return h!==t&&(e.useProgram(t),h=t,!0)},setBlending:V,setMaterial:function(t,a){2===t.side?k(e.CULL_FACE):z(e.CULL_FACE);let s=1===t.side;a&&(s=!s),W(s),1===t.blending&&!1===t.transparent?V(0):V(t.blending,t.blendEquation,t.blendSrc,t.blendDst,t.blendEquationAlpha,t.blendSrcAlpha,t.blendDstAlpha,t.blendColor,t.blendAlpha,t.premultipliedAlpha),n.setFunc(t.depthFunc),n.setTest(t.depthTest),n.setMask(t.depthWrite),i.setMask(t.colorWrite);let o=t.stencilWrite;r.setTest(o),o&&(r.setMask(t.stencilWriteMask),r.setFunc(t.stencilFunc,t.stencilRef,t.stencilFuncMask),r.setOp(t.stencilFail,t.stencilZFail,t.stencilZPass)),X(t.polygonOffset,t.polygonOffsetFactor,t.polygonOffsetUnits),!0===t.alphaToCoverage?z(e.SAMPLE_ALPHA_TO_COVERAGE):k(e.SAMPLE_ALPHA_TO_COVERAGE)},setFlipSided:W,setCullFace:j,setLineWidth:function(t){t!==T&&(R&&e.lineWidth(t),T=t)},setPolygonOffset:X,setScissorTest:function(t){t?z(e.SCISSOR_TEST):k(e.SCISSOR_TEST)},activeTexture:function(t){void 0===t&&(t=e.TEXTURE0+C-1),D!==t&&(e.activeTexture(t),D=t)},bindTexture:function(t,i,n){void 0===n&&(n=null===D?e.TEXTURE0+C-1:D);let r=I[n];void 0===r&&(r={type:void 0,texture:void 0},I[n]=r),(r.type!==t||r.texture!==i)&&(D!==n&&(e.activeTexture(n),D=n),e.bindTexture(t,i||O[t]),r.type=t,r.texture=i)},unbindTexture:function(){let t=I[D];void 0!==t&&void 0!==t.type&&(e.bindTexture(t.type,null),t.type=void 0,t.texture=void 0)},compressedTexImage2D:function(){try{e.compressedTexImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},compressedTexImage3D:function(){try{e.compressedTexImage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texImage2D:function(){try{e.texImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texImage3D:function(){try{e.texImage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},updateUBOMapping:function(t,i){let n=s.get(i);void 0===n&&(n=new WeakMap,s.set(i,n));let r=n.get(t);void 0===r&&(r=e.getUniformBlockIndex(i,t.name),n.set(t,r))},uniformBlockBinding:function(t,i){let n=s.get(i).get(t);a.get(i)!==n&&(e.uniformBlockBinding(i,n,t.__bindingPointIndex),a.set(i,n))},texStorage2D:function(){try{e.texStorage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texStorage3D:function(){try{e.texStorage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texSubImage2D:function(){try{e.texSubImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texSubImage3D:function(){try{e.texSubImage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},compressedTexSubImage2D:function(){try{e.compressedTexSubImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},compressedTexSubImage3D:function(){try{e.compressedTexSubImage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},scissor:function(t){!1===U.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),U.copy(t))},viewport:function(t){!1===N.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),N.copy(t))},reset:function(){e.disable(e.BLEND),e.disable(e.CULL_FACE),e.disable(e.DEPTH_TEST),e.disable(e.POLYGON_OFFSET_FILL),e.disable(e.SCISSOR_TEST),e.disable(e.STENCIL_TEST),e.disable(e.SAMPLE_ALPHA_TO_COVERAGE),e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ONE,e.ZERO),e.blendFuncSeparate(e.ONE,e.ZERO,e.ONE,e.ZERO),e.blendColor(0,0,0,0),e.colorMask(!0,!0,!0,!0),e.clearColor(0,0,0,0),e.depthMask(!0),e.depthFunc(e.LESS),n.setReversed(!1),e.clearDepth(1),e.stencilMask(0xffffffff),e.stencilFunc(e.ALWAYS,0,0xffffffff),e.stencilOp(e.KEEP,e.KEEP,e.KEEP),e.clearStencil(0),e.cullFace(e.BACK),e.frontFace(e.CCW),e.polygonOffset(0,0),e.activeTexture(e.TEXTURE0),e.bindFramebuffer(e.FRAMEBUFFER,null),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),e.bindFramebuffer(e.READ_FRAMEBUFFER,null),e.useProgram(null),e.lineWidth(1),e.scissor(0,0,e.canvas.width,e.canvas.height),e.viewport(0,0,e.canvas.width,e.canvas.height),o={},D=null,I={},l={},u=new WeakMap,c=[],h=null,d=!1,f=null,p=null,m=null,g=null,v=null,x=null,y=null,S=new tO(0,0,0),A=0,M=!1,b=null,w=null,T=null,E=null,_=null,U.set(0,0,e.canvas.width,e.canvas.height),N.set(0,0,e.canvas.width,e.canvas.height),i.reset(),n.reset(),r.reset()}}}function uz(e,t,i,n,r,a,s){let o,l=t.has("WEBGL_multisampled_render_to_texture")?t.get("WEBGL_multisampled_render_to_texture"):null,u="u">typeof navigator&&/OculusBrowser/g.test(navigator.userAgent),c=new Q,h=new WeakMap,d=new WeakMap,f=!1;try{f="u">typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(e){}function p(e,t){return f?new OffscreenCanvas(e,t):ee("canvas")}function m(e,t,i){let n=1,r=V(e);if((r.width>i||r.height>i)&&(n=i/Math.max(r.width,r.height)),n<1)if("u">typeof HTMLImageElement&&e instanceof HTMLImageElement||"u">typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"u">typeof ImageBitmap&&e instanceof ImageBitmap||"u">typeof VideoFrame&&e instanceof VideoFrame){let i=Math.floor(n*r.width),a=Math.floor(n*r.height);void 0===o&&(o=p(i,a));let s=t?p(i,a):o;return s.width=i,s.height=a,s.getContext("2d").drawImage(e,0,0,i,a),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+r.width+"x"+r.height+") to ("+i+"x"+a+")."),s}else"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+r.width+"x"+r.height+").");return e}function g(e){return e.generateMipmaps}function v(t){e.generateMipmap(t)}function x(i,n,r,a,s=!1){if(null!==i){if(void 0!==e[i])return e[i];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+i+"'")}let o=n;if(n===e.RED&&(r===e.FLOAT&&(o=e.R32F),r===e.HALF_FLOAT&&(o=e.R16F),r===e.UNSIGNED_BYTE&&(o=e.R8)),n===e.RED_INTEGER&&(r===e.UNSIGNED_BYTE&&(o=e.R8UI),r===e.UNSIGNED_SHORT&&(o=e.R16UI),r===e.UNSIGNED_INT&&(o=e.R32UI),r===e.BYTE&&(o=e.R8I),r===e.SHORT&&(o=e.R16I),r===e.INT&&(o=e.R32I)),n===e.RG&&(r===e.FLOAT&&(o=e.RG32F),r===e.HALF_FLOAT&&(o=e.RG16F),r===e.UNSIGNED_BYTE&&(o=e.RG8)),n===e.RG_INTEGER&&(r===e.UNSIGNED_BYTE&&(o=e.RG8UI),r===e.UNSIGNED_SHORT&&(o=e.RG16UI),r===e.UNSIGNED_INT&&(o=e.RG32UI),r===e.BYTE&&(o=e.RG8I),r===e.SHORT&&(o=e.RG16I),r===e.INT&&(o=e.RG32I)),n===e.RGB_INTEGER&&(r===e.UNSIGNED_BYTE&&(o=e.RGB8UI),r===e.UNSIGNED_SHORT&&(o=e.RGB16UI),r===e.UNSIGNED_INT&&(o=e.RGB32UI),r===e.BYTE&&(o=e.RGB8I),r===e.SHORT&&(o=e.RGB16I),r===e.INT&&(o=e.RGB32I)),n===e.RGBA_INTEGER&&(r===e.UNSIGNED_BYTE&&(o=e.RGBA8UI),r===e.UNSIGNED_SHORT&&(o=e.RGBA16UI),r===e.UNSIGNED_INT&&(o=e.RGBA32UI),r===e.BYTE&&(o=e.RGBA8I),r===e.SHORT&&(o=e.RGBA16I),r===e.INT&&(o=e.RGBA32I)),n===e.RGB&&r===e.UNSIGNED_INT_5_9_9_9_REV&&(o=e.RGB9_E5),n===e.RGBA){let t=s?L:eu.getTransfer(a);r===e.FLOAT&&(o=e.RGBA32F),r===e.HALF_FLOAT&&(o=e.RGBA16F),r===e.UNSIGNED_BYTE&&(o=t===B?e.SRGB8_ALPHA8:e.RGBA8),r===e.UNSIGNED_SHORT_4_4_4_4&&(o=e.RGBA4),r===e.UNSIGNED_SHORT_5_5_5_1&&(o=e.RGB5_A1)}return(o===e.R16F||o===e.R32F||o===e.RG16F||o===e.RG32F||o===e.RGBA16F||o===e.RGBA32F)&&t.get("EXT_color_buffer_float"),o}function y(t,i){let n;return t?null===i||1014===i||1020===i?n=e.DEPTH24_STENCIL8:1015===i?n=e.DEPTH32F_STENCIL8:1012===i&&(n=e.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===i||1014===i||1020===i?n=e.DEPTH_COMPONENT24:1015===i?n=e.DEPTH_COMPONENT32F:1012===i&&(n=e.DEPTH_COMPONENT16),n}function S(e,t){return!0===g(e)||e.isFramebufferTexture&&1003!==e.minFilter&&1006!==e.minFilter?Math.log2(Math.max(t.width,t.height))+1:void 0!==e.mipmaps&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function A(e){let t=e.target;t.removeEventListener("dispose",A),function(e){let t=n.get(e);if(void 0===t.__webglInit)return;let i=e.source,r=d.get(i);if(r){let n=r[t.__cacheKey];n.usedTimes--,0===n.usedTimes&&b(e),0===Object.keys(r).length&&d.delete(i)}n.remove(e)}(t),t.isVideoTexture&&h.delete(t)}function M(t){let i=t.target;i.removeEventListener("dispose",M),function(t){let i=n.get(t);if(t.depthTexture&&(t.depthTexture.dispose(),n.remove(t.depthTexture)),t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++){if(Array.isArray(i.__webglFramebuffer[t]))for(let n=0;n<i.__webglFramebuffer[t].length;n++)e.deleteFramebuffer(i.__webglFramebuffer[t][n]);else e.deleteFramebuffer(i.__webglFramebuffer[t]);i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer[t])}else{if(Array.isArray(i.__webglFramebuffer))for(let t=0;t<i.__webglFramebuffer.length;t++)e.deleteFramebuffer(i.__webglFramebuffer[t]);else e.deleteFramebuffer(i.__webglFramebuffer);if(i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer),i.__webglMultisampledFramebuffer&&e.deleteFramebuffer(i.__webglMultisampledFramebuffer),i.__webglColorRenderbuffer)for(let t=0;t<i.__webglColorRenderbuffer.length;t++)i.__webglColorRenderbuffer[t]&&e.deleteRenderbuffer(i.__webglColorRenderbuffer[t]);i.__webglDepthRenderbuffer&&e.deleteRenderbuffer(i.__webglDepthRenderbuffer)}let r=t.textures;for(let t=0,i=r.length;t<i;t++){let i=n.get(r[t]);i.__webglTexture&&(e.deleteTexture(i.__webglTexture),s.memory.textures--),n.remove(r[t])}n.remove(t)}(i)}function b(t){let i=n.get(t);e.deleteTexture(i.__webglTexture);let r=t.source,a=d.get(r);delete a[i.__cacheKey],s.memory.textures--}let w=0;function T(t,r){var a;let o,l=n.get(t);if(t.isVideoTexture&&(a=t,o=s.render.frame,h.get(a)!==o&&(h.set(a,o),a.update())),!1===t.isRenderTargetTexture&&t.version>0&&l.__version!==t.version){let e=t.image;if(null===e)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==e.complete)return void D(l,t,r);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}i.bindTexture(e.TEXTURE_2D,l.__webglTexture,e.TEXTURE0+r)}let E={1e3:e.REPEAT,1001:e.CLAMP_TO_EDGE,1002:e.MIRRORED_REPEAT},_={1003:e.NEAREST,1004:e.NEAREST_MIPMAP_NEAREST,1005:e.NEAREST_MIPMAP_LINEAR,1006:e.LINEAR,1007:e.LINEAR_MIPMAP_NEAREST,1008:e.LINEAR_MIPMAP_LINEAR},C={512:e.NEVER,519:e.ALWAYS,513:e.LESS,515:e.LEQUAL,514:e.EQUAL,518:e.GEQUAL,516:e.GREATER,517:e.NOTEQUAL};function R(i,a){if((1015===a.type&&!1===t.has("OES_texture_float_linear")&&(1006===a.magFilter||1007===a.magFilter||1005===a.magFilter||1008===a.magFilter||1006===a.minFilter||1007===a.minFilter||1005===a.minFilter||1008===a.minFilter)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),e.texParameteri(i,e.TEXTURE_WRAP_S,E[a.wrapS]),e.texParameteri(i,e.TEXTURE_WRAP_T,E[a.wrapT]),(i===e.TEXTURE_3D||i===e.TEXTURE_2D_ARRAY)&&e.texParameteri(i,e.TEXTURE_WRAP_R,E[a.wrapR]),e.texParameteri(i,e.TEXTURE_MAG_FILTER,_[a.magFilter]),e.texParameteri(i,e.TEXTURE_MIN_FILTER,_[a.minFilter]),a.compareFunction&&(e.texParameteri(i,e.TEXTURE_COMPARE_MODE,e.COMPARE_REF_TO_TEXTURE),e.texParameteri(i,e.TEXTURE_COMPARE_FUNC,C[a.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic"))&&1003!==a.magFilter&&(1005===a.minFilter||1008===a.minFilter)&&(1015!==a.type||!1!==t.has("OES_texture_float_linear"))&&(a.anisotropy>1||n.get(a).__currentAnisotropy)){let s=t.get("EXT_texture_filter_anisotropic");e.texParameterf(i,s.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,r.getMaxAnisotropy())),n.get(a).__currentAnisotropy=a.anisotropy}}function P(t,i){let n,r=!1;void 0===t.__webglInit&&(t.__webglInit=!0,i.addEventListener("dispose",A));let a=i.source,o=d.get(a);void 0===o&&(o={},d.set(a,o));let l=((n=[]).push(i.wrapS),n.push(i.wrapT),n.push(i.wrapR||0),n.push(i.magFilter),n.push(i.minFilter),n.push(i.anisotropy),n.push(i.internalFormat),n.push(i.format),n.push(i.type),n.push(i.generateMipmaps),n.push(i.premultiplyAlpha),n.push(i.flipY),n.push(i.unpackAlignment),n.push(i.colorSpace),n.join());if(l!==t.__cacheKey){void 0===o[l]&&(o[l]={texture:e.createTexture(),usedTimes:0},s.memory.textures++,r=!0),o[l].usedTimes++;let n=o[t.__cacheKey];void 0!==n&&(o[t.__cacheKey].usedTimes--,0===n.usedTimes&&b(i)),t.__cacheKey=l,t.__webglTexture=o[l].texture}return r}function D(t,s,o){let l=e.TEXTURE_2D;(s.isDataArrayTexture||s.isCompressedArrayTexture)&&(l=e.TEXTURE_2D_ARRAY),s.isData3DTexture&&(l=e.TEXTURE_3D);let u=P(t,s),c=s.source;i.bindTexture(l,t.__webglTexture,e.TEXTURE0+o);let h=n.get(c);if(c.version!==h.__version||!0===u){let t;i.activeTexture(e.TEXTURE0+o);let n=eu.getPrimaries(eu.workingColorSpace),d=""===s.colorSpace?null:eu.getPrimaries(s.colorSpace),f=""===s.colorSpace||n===d?e.NONE:e.BROWSER_DEFAULT_WEBGL;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,s.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,s.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,s.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,f);let p=m(s.image,!1,r.maxTextureSize);p=G(s,p);let A=a.convert(s.format,s.colorSpace),M=a.convert(s.type),b=x(s.internalFormat,A,M,s.colorSpace,s.isVideoTexture);R(l,s);let w=s.mipmaps,T=!0!==s.isVideoTexture,E=void 0===h.__version||!0===u,_=c.dataReady,C=S(s,p);if(s.isDepthTexture)b=y(1027===s.format,s.type),E&&(T?i.texStorage2D(e.TEXTURE_2D,1,b,p.width,p.height):i.texImage2D(e.TEXTURE_2D,0,b,p.width,p.height,0,A,M,null));else if(s.isDataTexture)if(w.length>0){T&&E&&i.texStorage2D(e.TEXTURE_2D,C,b,w[0].width,w[0].height);for(let n=0,r=w.length;n<r;n++)t=w[n],T?_&&i.texSubImage2D(e.TEXTURE_2D,n,0,0,t.width,t.height,A,M,t.data):i.texImage2D(e.TEXTURE_2D,n,b,t.width,t.height,0,A,M,t.data);s.generateMipmaps=!1}else T?(E&&i.texStorage2D(e.TEXTURE_2D,C,b,p.width,p.height),_&&i.texSubImage2D(e.TEXTURE_2D,0,0,0,p.width,p.height,A,M,p.data)):i.texImage2D(e.TEXTURE_2D,0,b,p.width,p.height,0,A,M,p.data);else if(s.isCompressedTexture)if(s.isCompressedArrayTexture){T&&E&&i.texStorage3D(e.TEXTURE_2D_ARRAY,C,b,w[0].width,w[0].height,p.depth);for(let n=0,r=w.length;n<r;n++)if(t=w[n],1023!==s.format)if(null!==A)if(T){if(_)if(s.layerUpdates.size>0){let r=oB(t.width,t.height,s.format,s.type);for(let a of s.layerUpdates){let s=t.data.subarray(a*r/t.data.BYTES_PER_ELEMENT,(a+1)*r/t.data.BYTES_PER_ELEMENT);i.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,n,0,0,a,t.width,t.height,1,A,s)}s.clearLayerUpdates()}else i.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,n,0,0,0,t.width,t.height,p.depth,A,t.data)}else i.compressedTexImage3D(e.TEXTURE_2D_ARRAY,n,b,t.width,t.height,p.depth,0,t.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else T?_&&i.texSubImage3D(e.TEXTURE_2D_ARRAY,n,0,0,0,t.width,t.height,p.depth,A,M,t.data):i.texImage3D(e.TEXTURE_2D_ARRAY,n,b,t.width,t.height,p.depth,0,A,M,t.data)}else{T&&E&&i.texStorage2D(e.TEXTURE_2D,C,b,w[0].width,w[0].height);for(let n=0,r=w.length;n<r;n++)t=w[n],1023!==s.format?null!==A?T?_&&i.compressedTexSubImage2D(e.TEXTURE_2D,n,0,0,t.width,t.height,A,t.data):i.compressedTexImage2D(e.TEXTURE_2D,n,b,t.width,t.height,0,t.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):T?_&&i.texSubImage2D(e.TEXTURE_2D,n,0,0,t.width,t.height,A,M,t.data):i.texImage2D(e.TEXTURE_2D,n,b,t.width,t.height,0,A,M,t.data)}else if(s.isDataArrayTexture)if(T){if(E&&i.texStorage3D(e.TEXTURE_2D_ARRAY,C,b,p.width,p.height,p.depth),_)if(s.layerUpdates.size>0){let t=oB(p.width,p.height,s.format,s.type);for(let n of s.layerUpdates){let r=p.data.subarray(n*t/p.data.BYTES_PER_ELEMENT,(n+1)*t/p.data.BYTES_PER_ELEMENT);i.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,n,p.width,p.height,1,A,M,r)}s.clearLayerUpdates()}else i.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,0,p.width,p.height,p.depth,A,M,p.data)}else i.texImage3D(e.TEXTURE_2D_ARRAY,0,b,p.width,p.height,p.depth,0,A,M,p.data);else if(s.isData3DTexture)T?(E&&i.texStorage3D(e.TEXTURE_3D,C,b,p.width,p.height,p.depth),_&&i.texSubImage3D(e.TEXTURE_3D,0,0,0,0,p.width,p.height,p.depth,A,M,p.data)):i.texImage3D(e.TEXTURE_3D,0,b,p.width,p.height,p.depth,0,A,M,p.data);else if(s.isFramebufferTexture){if(E)if(T)i.texStorage2D(e.TEXTURE_2D,C,b,p.width,p.height);else{let t=p.width,n=p.height;for(let r=0;r<C;r++)i.texImage2D(e.TEXTURE_2D,r,b,t,n,0,A,M,null),t>>=1,n>>=1}}else if(w.length>0){if(T&&E){let t=V(w[0]);i.texStorage2D(e.TEXTURE_2D,C,b,t.width,t.height)}for(let n=0,r=w.length;n<r;n++)t=w[n],T?_&&i.texSubImage2D(e.TEXTURE_2D,n,0,0,A,M,t):i.texImage2D(e.TEXTURE_2D,n,b,A,M,t);s.generateMipmaps=!1}else if(T){if(E){let t=V(p);i.texStorage2D(e.TEXTURE_2D,C,b,t.width,t.height)}_&&i.texSubImage2D(e.TEXTURE_2D,0,0,0,A,M,p)}else i.texImage2D(e.TEXTURE_2D,0,b,A,M,p);g(s)&&v(l),h.__version=c.version,s.onUpdate&&s.onUpdate(s)}t.__version=s.version}function U(t,r,s,o,u,c){let h=a.convert(s.format,s.colorSpace),d=a.convert(s.type),f=x(s.internalFormat,h,d,s.colorSpace),p=n.get(r),m=n.get(s);if(m.__renderTarget=r,!p.__hasExternalTextures){let t=Math.max(1,r.width>>c),n=Math.max(1,r.height>>c);u===e.TEXTURE_3D||u===e.TEXTURE_2D_ARRAY?i.texImage3D(u,c,f,t,n,r.depth,0,h,d,null):i.texImage2D(u,c,f,t,n,0,h,d,null)}i.bindFramebuffer(e.FRAMEBUFFER,t),H(r)?l.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,o,u,m.__webglTexture,0,k(r)):(u===e.TEXTURE_2D||u>=e.TEXTURE_CUBE_MAP_POSITIVE_X&&u<=e.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&e.framebufferTexture2D(e.FRAMEBUFFER,o,u,m.__webglTexture,c),i.bindFramebuffer(e.FRAMEBUFFER,null)}function N(t,i,n){if(e.bindRenderbuffer(e.RENDERBUFFER,t),i.depthBuffer){let r=i.depthTexture,a=r&&r.isDepthTexture?r.type:null,s=y(i.stencilBuffer,a),o=i.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,u=k(i);H(i)?l.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,u,s,i.width,i.height):n?e.renderbufferStorageMultisample(e.RENDERBUFFER,u,s,i.width,i.height):e.renderbufferStorage(e.RENDERBUFFER,s,i.width,i.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,o,e.RENDERBUFFER,t)}else{let t=i.textures;for(let r=0;r<t.length;r++){let s=t[r],o=a.convert(s.format,s.colorSpace),u=a.convert(s.type),c=x(s.internalFormat,o,u,s.colorSpace),h=k(i);n&&!1===H(i)?e.renderbufferStorageMultisample(e.RENDERBUFFER,h,c,i.width,i.height):H(i)?l.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,h,c,i.width,i.height):e.renderbufferStorage(e.RENDERBUFFER,c,i.width,i.height)}}e.bindRenderbuffer(e.RENDERBUFFER,null)}function F(t){let r=n.get(t),a=!0===t.isWebGLCubeRenderTarget;if(r.__boundDepthTexture!==t.depthTexture){let e=t.depthTexture;if(r.__depthDisposeCallback&&r.__depthDisposeCallback(),e){let t=()=>{delete r.__boundDepthTexture,delete r.__depthDisposeCallback,e.removeEventListener("dispose",t)};e.addEventListener("dispose",t),r.__depthDisposeCallback=t}r.__boundDepthTexture=e}if(t.depthTexture&&!r.__autoAllocateDepthBuffer){if(a)throw Error("target.depthTexture not supported in Cube render targets");!function(t,r){if(r&&r.isWebGLCubeRenderTarget)throw Error("Depth Texture with cube render targets is not supported");if(i.bindFramebuffer(e.FRAMEBUFFER,t),!(r.depthTexture&&r.depthTexture.isDepthTexture))throw Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");let a=n.get(r.depthTexture);a.__renderTarget=r,a.__webglTexture&&r.depthTexture.image.width===r.width&&r.depthTexture.image.height===r.height||(r.depthTexture.image.width=r.width,r.depthTexture.image.height=r.height,r.depthTexture.needsUpdate=!0),T(r.depthTexture,0);let s=a.__webglTexture,o=k(r);if(1026===r.depthTexture.format)H(r)?l.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,s,0,o):e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,s,0);else if(1027===r.depthTexture.format)H(r)?l.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.TEXTURE_2D,s,0,o):e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.TEXTURE_2D,s,0);else throw Error("Unknown depthTexture format")}(r.__webglFramebuffer,t)}else if(a){r.__webglDepthbuffer=[];for(let n=0;n<6;n++)if(i.bindFramebuffer(e.FRAMEBUFFER,r.__webglFramebuffer[n]),void 0===r.__webglDepthbuffer[n])r.__webglDepthbuffer[n]=e.createRenderbuffer(),N(r.__webglDepthbuffer[n],t,!1);else{let i=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,a=r.__webglDepthbuffer[n];e.bindRenderbuffer(e.RENDERBUFFER,a),e.framebufferRenderbuffer(e.FRAMEBUFFER,i,e.RENDERBUFFER,a)}}else if(i.bindFramebuffer(e.FRAMEBUFFER,r.__webglFramebuffer),void 0===r.__webglDepthbuffer)r.__webglDepthbuffer=e.createRenderbuffer(),N(r.__webglDepthbuffer,t,!1);else{let i=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,n=r.__webglDepthbuffer;e.bindRenderbuffer(e.RENDERBUFFER,n),e.framebufferRenderbuffer(e.FRAMEBUFFER,i,e.RENDERBUFFER,n)}i.bindFramebuffer(e.FRAMEBUFFER,null)}let O=[],z=[];function k(e){return Math.min(r.maxSamples,e.samples)}function H(e){let i=n.get(e);return e.samples>0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==i.__useRenderToTexture}function G(e,t){let i=e.colorSpace,n=e.format,r=e.type;return!0===e.isCompressedTexture||!0===e.isVideoTexture||i!==I&&""!==i&&(eu.getTransfer(i)===B?(1023!==n||1009!==r)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",i)),t}function V(e){return"u">typeof HTMLImageElement&&e instanceof HTMLImageElement?(c.width=e.naturalWidth||e.width,c.height=e.naturalHeight||e.height):"u">typeof VideoFrame&&e instanceof VideoFrame?(c.width=e.displayWidth,c.height=e.displayHeight):(c.width=e.width,c.height=e.height),c}this.allocateTextureUnit=function(){let e=w;return e>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+r.maxTextures),w+=1,e},this.resetTextureUnits=function(){w=0},this.setTexture2D=T,this.setTexture2DArray=function(t,r){let a=n.get(t);t.version>0&&a.__version!==t.version?D(a,t,r):i.bindTexture(e.TEXTURE_2D_ARRAY,a.__webglTexture,e.TEXTURE0+r)},this.setTexture3D=function(t,r){let a=n.get(t);t.version>0&&a.__version!==t.version?D(a,t,r):i.bindTexture(e.TEXTURE_3D,a.__webglTexture,e.TEXTURE0+r)},this.setTextureCube=function(t,s){let o=n.get(t);t.version>0&&o.__version!==t.version?function(t,s,o){if(6!==s.image.length)return;let l=P(t,s),u=s.source;i.bindTexture(e.TEXTURE_CUBE_MAP,t.__webglTexture,e.TEXTURE0+o);let c=n.get(u);if(u.version!==c.__version||!0===l){let t;i.activeTexture(e.TEXTURE0+o);let n=eu.getPrimaries(eu.workingColorSpace),h=""===s.colorSpace?null:eu.getPrimaries(s.colorSpace),d=""===s.colorSpace||n===h?e.NONE:e.BROWSER_DEFAULT_WEBGL;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,s.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,s.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,s.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,d);let f=s.isCompressedTexture||s.image[0].isCompressedTexture,p=s.image[0]&&s.image[0].isDataTexture,y=[];for(let e=0;e<6;e++)f||p?y[e]=p?s.image[e].image:s.image[e]:y[e]=m(s.image[e],!0,r.maxCubemapSize),y[e]=G(s,y[e]);let A=y[0],M=a.convert(s.format,s.colorSpace),b=a.convert(s.type),w=x(s.internalFormat,M,b,s.colorSpace),T=!0!==s.isVideoTexture,E=void 0===c.__version||!0===l,_=u.dataReady,C=S(s,A);if(R(e.TEXTURE_CUBE_MAP,s),f){T&&E&&i.texStorage2D(e.TEXTURE_CUBE_MAP,C,w,A.width,A.height);for(let n=0;n<6;n++){t=y[n].mipmaps;for(let r=0;r<t.length;r++){let a=t[r];1023!==s.format?null!==M?T?_&&i.compressedTexSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+n,r,0,0,a.width,a.height,M,a.data):i.compressedTexImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+n,r,w,a.width,a.height,0,a.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):T?_&&i.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+n,r,0,0,a.width,a.height,M,b,a.data):i.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+n,r,w,a.width,a.height,0,M,b,a.data)}}}else{if(t=s.mipmaps,T&&E){t.length>0&&C++;let n=V(y[0]);i.texStorage2D(e.TEXTURE_CUBE_MAP,C,w,n.width,n.height)}for(let n=0;n<6;n++)if(p){T?_&&i.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+n,0,0,0,y[n].width,y[n].height,M,b,y[n].data):i.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+n,0,w,y[n].width,y[n].height,0,M,b,y[n].data);for(let r=0;r<t.length;r++){let a=t[r].image[n].image;T?_&&i.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+n,r+1,0,0,a.width,a.height,M,b,a.data):i.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+n,r+1,w,a.width,a.height,0,M,b,a.data)}}else{T?_&&i.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+n,0,0,0,M,b,y[n]):i.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+n,0,w,M,b,y[n]);for(let r=0;r<t.length;r++){let a=t[r];T?_&&i.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+n,r+1,0,0,M,b,a.image[n]):i.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+n,r+1,w,M,b,a.image[n])}}}g(s)&&v(e.TEXTURE_CUBE_MAP),c.__version=u.version,s.onUpdate&&s.onUpdate(s)}t.__version=s.version}(o,t,s):i.bindTexture(e.TEXTURE_CUBE_MAP,o.__webglTexture,e.TEXTURE0+s)},this.rebindTextures=function(t,i,r){let a=n.get(t);void 0!==i&&U(a.__webglFramebuffer,t,t.texture,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,0),void 0!==r&&F(t)},this.setupRenderTarget=function(t){let r=t.texture,o=n.get(t),l=n.get(r);t.addEventListener("dispose",M);let u=t.textures,c=!0===t.isWebGLCubeRenderTarget,h=u.length>1;if(!h&&(void 0===l.__webglTexture&&(l.__webglTexture=e.createTexture()),l.__version=r.version,s.memory.textures++),c){o.__webglFramebuffer=[];for(let t=0;t<6;t++)if(r.mipmaps&&r.mipmaps.length>0){o.__webglFramebuffer[t]=[];for(let i=0;i<r.mipmaps.length;i++)o.__webglFramebuffer[t][i]=e.createFramebuffer()}else o.__webglFramebuffer[t]=e.createFramebuffer()}else{if(r.mipmaps&&r.mipmaps.length>0){o.__webglFramebuffer=[];for(let t=0;t<r.mipmaps.length;t++)o.__webglFramebuffer[t]=e.createFramebuffer()}else o.__webglFramebuffer=e.createFramebuffer();if(h)for(let t=0,i=u.length;t<i;t++){let i=n.get(u[t]);void 0===i.__webglTexture&&(i.__webglTexture=e.createTexture(),s.memory.textures++)}if(t.samples>0&&!1===H(t)){o.__webglMultisampledFramebuffer=e.createFramebuffer(),o.__webglColorRenderbuffer=[],i.bindFramebuffer(e.FRAMEBUFFER,o.__webglMultisampledFramebuffer);for(let i=0;i<u.length;i++){let n=u[i];o.__webglColorRenderbuffer[i]=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,o.__webglColorRenderbuffer[i]);let r=a.convert(n.format,n.colorSpace),s=a.convert(n.type),l=x(n.internalFormat,r,s,n.colorSpace,!0===t.isXRRenderTarget),c=k(t);e.renderbufferStorageMultisample(e.RENDERBUFFER,c,l,t.width,t.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+i,e.RENDERBUFFER,o.__webglColorRenderbuffer[i])}e.bindRenderbuffer(e.RENDERBUFFER,null),t.depthBuffer&&(o.__webglDepthRenderbuffer=e.createRenderbuffer(),N(o.__webglDepthRenderbuffer,t,!0)),i.bindFramebuffer(e.FRAMEBUFFER,null)}}if(c){i.bindTexture(e.TEXTURE_CUBE_MAP,l.__webglTexture),R(e.TEXTURE_CUBE_MAP,r);for(let i=0;i<6;i++)if(r.mipmaps&&r.mipmaps.length>0)for(let n=0;n<r.mipmaps.length;n++)U(o.__webglFramebuffer[i][n],t,r,e.COLOR_ATTACHMENT0,e.TEXTURE_CUBE_MAP_POSITIVE_X+i,n);else U(o.__webglFramebuffer[i],t,r,e.COLOR_ATTACHMENT0,e.TEXTURE_CUBE_MAP_POSITIVE_X+i,0);g(r)&&v(e.TEXTURE_CUBE_MAP),i.unbindTexture()}else if(h){for(let r=0,a=u.length;r<a;r++){let a=u[r],s=n.get(a);i.bindTexture(e.TEXTURE_2D,s.__webglTexture),R(e.TEXTURE_2D,a),U(o.__webglFramebuffer,t,a,e.COLOR_ATTACHMENT0+r,e.TEXTURE_2D,0),g(a)&&v(e.TEXTURE_2D)}i.unbindTexture()}else{let n=e.TEXTURE_2D;if((t.isWebGL3DRenderTarget||t.isWebGLArrayRenderTarget)&&(n=t.isWebGL3DRenderTarget?e.TEXTURE_3D:e.TEXTURE_2D_ARRAY),i.bindTexture(n,l.__webglTexture),R(n,r),r.mipmaps&&r.mipmaps.length>0)for(let i=0;i<r.mipmaps.length;i++)U(o.__webglFramebuffer[i],t,r,e.COLOR_ATTACHMENT0,n,i);else U(o.__webglFramebuffer,t,r,e.COLOR_ATTACHMENT0,n,0);g(r)&&v(n),i.unbindTexture()}t.depthBuffer&&F(t)},this.updateRenderTargetMipmap=function(t){let r=t.textures;for(let a=0,s=r.length;a<s;a++){let s=r[a];if(g(s)){let r=t.isWebGLCubeRenderTarget?e.TEXTURE_CUBE_MAP:t.isWebGL3DRenderTarget?e.TEXTURE_3D:t.isWebGLArrayRenderTarget||t.isCompressedArrayTexture?e.TEXTURE_2D_ARRAY:e.TEXTURE_2D,a=n.get(s).__webglTexture;i.bindTexture(r,a),v(r),i.unbindTexture()}}},this.updateMultisampleRenderTarget=function(t){if(t.samples>0){if(!1===H(t)){let r=t.textures,a=t.width,s=t.height,o=e.COLOR_BUFFER_BIT,l=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,c=n.get(t),h=r.length>1;if(h)for(let t=0;t<r.length;t++)i.bindFramebuffer(e.FRAMEBUFFER,c.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.RENDERBUFFER,null),i.bindFramebuffer(e.FRAMEBUFFER,c.__webglFramebuffer),e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.TEXTURE_2D,null,0);i.bindFramebuffer(e.READ_FRAMEBUFFER,c.__webglMultisampledFramebuffer),i.bindFramebuffer(e.DRAW_FRAMEBUFFER,c.__webglFramebuffer);for(let i=0;i<r.length;i++){if(t.resolveDepthBuffer&&(t.depthBuffer&&(o|=e.DEPTH_BUFFER_BIT),t.stencilBuffer&&t.resolveStencilBuffer&&(o|=e.STENCIL_BUFFER_BIT)),h){e.framebufferRenderbuffer(e.READ_FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.RENDERBUFFER,c.__webglColorRenderbuffer[i]);let t=n.get(r[i]).__webglTexture;e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0)}e.blitFramebuffer(0,0,a,s,0,0,a,s,o,e.NEAREST),!0===u&&(O.length=0,z.length=0,O.push(e.COLOR_ATTACHMENT0+i),t.depthBuffer&&!1===t.resolveDepthBuffer&&(O.push(l),z.push(l),e.invalidateFramebuffer(e.DRAW_FRAMEBUFFER,z)),e.invalidateFramebuffer(e.READ_FRAMEBUFFER,O))}if(i.bindFramebuffer(e.READ_FRAMEBUFFER,null),i.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),h)for(let t=0;t<r.length;t++){i.bindFramebuffer(e.FRAMEBUFFER,c.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.RENDERBUFFER,c.__webglColorRenderbuffer[t]);let a=n.get(r[t]).__webglTexture;i.bindFramebuffer(e.FRAMEBUFFER,c.__webglFramebuffer),e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.TEXTURE_2D,a,0)}i.bindFramebuffer(e.DRAW_FRAMEBUFFER,c.__webglMultisampledFramebuffer)}else if(t.depthBuffer&&!1===t.resolveDepthBuffer&&u){let i=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT;e.invalidateFramebuffer(e.DRAW_FRAMEBUFFER,[i])}}},this.setupDepthRenderbuffer=F,this.setupFrameBufferTexture=U,this.useMultisampledRTT=H}function uk(e,t){return{convert:function(i,n=""){let r,a=eu.getTransfer(n);if(1009===i)return e.UNSIGNED_BYTE;if(1017===i)return e.UNSIGNED_SHORT_4_4_4_4;if(1018===i)return e.UNSIGNED_SHORT_5_5_5_1;if(35902===i)return e.UNSIGNED_INT_5_9_9_9_REV;if(1010===i)return e.BYTE;if(1011===i)return e.SHORT;if(1012===i)return e.UNSIGNED_SHORT;if(1013===i)return e.INT;if(1014===i)return e.UNSIGNED_INT;if(1015===i)return e.FLOAT;if(1016===i)return e.HALF_FLOAT;if(1021===i)return e.ALPHA;if(1022===i)return e.RGB;if(1023===i)return e.RGBA;if(1024===i)return e.LUMINANCE;if(1025===i)return e.LUMINANCE_ALPHA;if(1026===i)return e.DEPTH_COMPONENT;if(1027===i)return e.DEPTH_STENCIL;if(1028===i)return e.RED;if(1029===i)return e.RED_INTEGER;if(1030===i)return e.RG;if(1031===i)return e.RG_INTEGER;if(1033===i)return e.RGBA_INTEGER;if(33776===i||33777===i||33778===i||33779===i)if(a===B){if(null===(r=t.get("WEBGL_compressed_texture_s3tc_srgb")))return null;if(33776===i)return r.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(33777===i)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(33778===i)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(33779===i)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{if(null===(r=t.get("WEBGL_compressed_texture_s3tc")))return null;if(33776===i)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===i)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===i)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===i)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===i||35841===i||35842===i||35843===i){if(null===(r=t.get("WEBGL_compressed_texture_pvrtc")))return null;if(35840===i)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===i)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===i)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===i)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===i||37492===i||37496===i){if(null===(r=t.get("WEBGL_compressed_texture_etc")))return null;if(36196===i||37492===i)return a===B?r.COMPRESSED_SRGB8_ETC2:r.COMPRESSED_RGB8_ETC2;if(37496===i)return a===B?r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:r.COMPRESSED_RGBA8_ETC2_EAC}if(37808===i||37809===i||37810===i||37811===i||37812===i||37813===i||37814===i||37815===i||37816===i||37817===i||37818===i||37819===i||37820===i||37821===i){if(null===(r=t.get("WEBGL_compressed_texture_astc")))return null;if(37808===i)return a===B?r.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:r.COMPRESSED_RGBA_ASTC_4x4_KHR;if(37809===i)return a===B?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:r.COMPRESSED_RGBA_ASTC_5x4_KHR;if(37810===i)return a===B?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:r.COMPRESSED_RGBA_ASTC_5x5_KHR;if(37811===i)return a===B?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:r.COMPRESSED_RGBA_ASTC_6x5_KHR;if(37812===i)return a===B?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:r.COMPRESSED_RGBA_ASTC_6x6_KHR;if(37813===i)return a===B?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:r.COMPRESSED_RGBA_ASTC_8x5_KHR;if(37814===i)return a===B?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:r.COMPRESSED_RGBA_ASTC_8x6_KHR;if(37815===i)return a===B?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:r.COMPRESSED_RGBA_ASTC_8x8_KHR;if(37816===i)return a===B?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:r.COMPRESSED_RGBA_ASTC_10x5_KHR;if(37817===i)return a===B?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:r.COMPRESSED_RGBA_ASTC_10x6_KHR;if(37818===i)return a===B?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:r.COMPRESSED_RGBA_ASTC_10x8_KHR;if(37819===i)return a===B?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:r.COMPRESSED_RGBA_ASTC_10x10_KHR;if(37820===i)return a===B?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:r.COMPRESSED_RGBA_ASTC_12x10_KHR;if(37821===i)return a===B?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:r.COMPRESSED_RGBA_ASTC_12x12_KHR}if(36492===i||36494===i||36495===i){if(null===(r=t.get("EXT_texture_compression_bptc")))return null;if(36492===i)return a===B?r.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:r.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(36494===i)return r.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(36495===i)return r.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}if(36283===i||36284===i||36285===i||36286===i){if(null===(r=t.get("EXT_texture_compression_rgtc")))return null;if(36492===i)return r.COMPRESSED_RED_RGTC1_EXT;if(36284===i)return r.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(36285===i)return r.COMPRESSED_RED_GREEN_RGTC2_EXT;if(36286===i)return r.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}return 1020===i?e.UNSIGNED_INT_24_8:void 0!==e[i]?e[i]:null}}}let uH={type:"move"};class uG{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new n6,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new n6,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new eE,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new eE),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new n6,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new eE,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new eE),this._grip}dispatchEvent(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),null!==this._hand&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){let t=this._hand;if(t)for(let i of e.hand.values())this._getHandJoint(t,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(e,t,i){let n=null,r=null,a=null,s=this._targetRay,o=this._grip,l=this._hand;if(e&&"visible-blurred"!==t.session.visibilityState){if(l&&e.hand){for(let n of(a=!0,e.hand.values())){let e=t.getJointPose(n,i),r=this._getHandJoint(l,n);null!==e&&(r.matrix.fromArray(e.transform.matrix),r.matrix.decompose(r.position,r.rotation,r.scale),r.matrixWorldNeedsUpdate=!0,r.jointRadius=e.radius),r.visible=null!==e}let n=l.joints["index-finger-tip"],r=l.joints["thumb-tip"],s=n.position.distanceTo(r.position);l.inputState.pinching&&s>.025?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&s<=.015&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==o&&e.gripSpace&&null!==(r=t.getPose(e.gripSpace,i))&&(o.matrix.fromArray(r.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,r.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(r.linearVelocity)):o.hasLinearVelocity=!1,r.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(r.angularVelocity)):o.hasAngularVelocity=!1);null!==s&&(null===(n=t.getPose(e.targetRaySpace,i))&&null!==r&&(n=r),null!==n&&(s.matrix.fromArray(n.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,n.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(n.linearVelocity)):s.hasLinearVelocity=!1,n.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(n.angularVelocity)):s.hasAngularVelocity=!1,this.dispatchEvent(uH)))}return null!==s&&(s.visible=null!==n),null!==o&&(o.visible=null!==r),null!==l&&(l.visible=null!==a),this}_getHandJoint(e,t){if(void 0===e.joints[t.jointName]){let i=new n6;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}let uV=`
|
|
void main() {
|
|
|
|
gl_Position = vec4( position, 1.0 );
|
|
|
|
}`,uW=`
|
|
uniform sampler2DArray depthColor;
|
|
uniform float depthWidth;
|
|
uniform float depthHeight;
|
|
|
|
void main() {
|
|
|
|
vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight );
|
|
|
|
if ( coord.x >= 1.0 ) {
|
|
|
|
gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r;
|
|
|
|
} else {
|
|
|
|
gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r;
|
|
|
|
}
|
|
|
|
}`;class uj{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,i){if(null===this.texture){let n=new ev;e.properties.get(n).__webglTexture=t.texture,(t.depthNear!=i.depthNear||t.depthFar!=i.depthFar)&&(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=n}}getMesh(e){if(null!==this.texture&&null===this.mesh){let t=e.cameras[0].viewport,i=new ib({vertexShader:uV,fragmentShader:uW,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new ig(new r9(20,20),i)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class uX extends N{constructor(e,t){super();const i=this;let n=null,r=1,a=null,s="local-floor",o=1,l=null,u=null,c=null,h=null,d=null,f=null;const p=new uj,m=t.getContextAttributes();let g=null,v=null;const x=[],y=[],S=new Q;let A=null;const M=new iC;M.viewport=new ex;const b=new iC;b.viewport=new ex;const w=[M,b],T=new sw;let E=null,_=null;function C(e){let t=y.indexOf(e.inputSource);if(-1===t)return;let i=x[t];void 0!==i&&(i.update(e.inputSource,e.frame,l||a),i.dispatchEvent({type:e.type,data:e.inputSource}))}function R(){n.removeEventListener("select",C),n.removeEventListener("selectstart",C),n.removeEventListener("selectend",C),n.removeEventListener("squeeze",C),n.removeEventListener("squeezestart",C),n.removeEventListener("squeezeend",C),n.removeEventListener("end",R),n.removeEventListener("inputsourceschange",P);for(let e=0;e<x.length;e++){let t=y[e];null!==t&&(y[e]=null,x[e].disconnect(t))}E=null,_=null,p.reset(),e.setRenderTarget(g),d=null,h=null,c=null,n=null,v=null,U.stop(),i.isPresenting=!1,e.setPixelRatio(A),e.setSize(S.width,S.height,!1),i.dispatchEvent({type:"sessionend"})}function P(e){for(let t=0;t<e.removed.length;t++){let i=e.removed[t],n=y.indexOf(i);n>=0&&(y[n]=null,x[n].disconnect(i))}for(let t=0;t<e.added.length;t++){let i=e.added[t],n=y.indexOf(i);if(-1===n){for(let e=0;e<x.length;e++)if(e>=y.length){y.push(i),n=e;break}else if(null===y[e]){y[e]=i,n=e;break}if(-1===n)break}let r=x[n];r&&r.connect(i)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=x[e];return void 0===t&&(t=new uG,x[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=x[e];return void 0===t&&(t=new uG,x[e]=t),t.getGripSpace()},this.getHand=function(e){let t=x[e];return void 0===t&&(t=new uG,x[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){r=e,!0===i.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){s=e,!0===i.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return l||a},this.setReferenceSpace=function(e){l=e},this.getBaseLayer=function(){return null!==h?h:d},this.getBinding=function(){return c},this.getFrame=function(){return f},this.getSession=function(){return n},this.setSession=async function(u){if(null!==(n=u)){if(g=e.getRenderTarget(),n.addEventListener("select",C),n.addEventListener("selectstart",C),n.addEventListener("selectend",C),n.addEventListener("squeeze",C),n.addEventListener("squeezestart",C),n.addEventListener("squeezeend",C),n.addEventListener("end",R),n.addEventListener("inputsourceschange",P),!0!==m.xrCompatible&&await t.makeXRCompatible(),A=e.getPixelRatio(),e.getSize(S),void 0===n.renderState.layers){let i={antialias:m.antialias,alpha:!0,depth:m.depth,stencil:m.stencil,framebufferScaleFactor:r};d=new XRWebGLLayer(n,t,i),n.updateRenderState({baseLayer:d}),e.setPixelRatio(1),e.setSize(d.framebufferWidth,d.framebufferHeight,!1),v=new eS(d.framebufferWidth,d.framebufferHeight,{format:1023,type:1009,colorSpace:e.outputColorSpace,stencilBuffer:m.stencil})}else{let i=null,a=null,s=null;m.depth&&(s=m.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,i=m.stencil?1027:1026,a=m.stencil?1020:1014);let o={colorFormat:t.RGBA8,depthFormat:s,scaleFactor:r};h=(c=new XRWebGLBinding(n,t)).createProjectionLayer(o),n.updateRenderState({layers:[h]}),e.setPixelRatio(1),e.setSize(h.textureWidth,h.textureHeight,!1),v=new eS(h.textureWidth,h.textureHeight,{format:1023,type:1009,depthTexture:new rn(h.textureWidth,h.textureHeight,a,void 0,void 0,void 0,void 0,void 0,void 0,i),stencilBuffer:m.stencil,colorSpace:e.outputColorSpace,samples:4*!!m.antialias,resolveDepthBuffer:!1===h.ignoreDepthValues})}v.isXRRenderTarget=!0,this.setFoveation(o),l=null,a=await n.requestReferenceSpace(s),U.setContext(n),U.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(null!==n)return n.environmentBlendMode},this.getDepthTexture=function(){return p.getDepthTexture()};const D=new eE,I=new eE;function L(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){var t,i,r;if(null===n)return;let a=e.near,s=e.far;null!==p.texture&&(p.depthNear>0&&(a=p.depthNear),p.depthFar>0&&(s=p.depthFar)),T.near=b.near=M.near=a,T.far=b.far=M.far=s,(E!==T.near||_!==T.far)&&(n.updateRenderState({depthNear:T.near,depthFar:T.far}),E=T.near,_=T.far),M.layers.mask=2|e.layers.mask,b.layers.mask=4|e.layers.mask,T.layers.mask=M.layers.mask|b.layers.mask;let o=e.parent,l=T.cameras;L(T,o);for(let e=0;e<l.length;e++)L(l[e],o);2===l.length?function(e,t,i){D.setFromMatrixPosition(t.matrixWorld),I.setFromMatrixPosition(i.matrixWorld);let n=D.distanceTo(I),r=t.projectionMatrix.elements,a=i.projectionMatrix.elements,s=r[14]/(r[10]-1),o=r[14]/(r[10]+1),l=(r[9]+1)/r[5],u=(r[9]-1)/r[5],c=(r[8]-1)/r[0],h=(a[8]+1)/a[0],d=n/(-c+h),f=-(d*c);if(t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(f),e.translateZ(d),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert(),-1===r[10])e.projectionMatrix.copy(t.projectionMatrix),e.projectionMatrixInverse.copy(t.projectionMatrixInverse);else{let t=s+d,i=o+d;e.projectionMatrix.makePerspective(s*c-f,s*h+(n-f),l*o/i*t,u*o/i*t,t,i),e.projectionMatrixInverse.copy(e.projectionMatrix).invert()}}(T,M,b):T.projectionMatrix.copy(M.projectionMatrix),t=e,i=T,null===(r=o)?t.matrix.copy(i.matrixWorld):(t.matrix.copy(r.matrixWorld),t.matrix.invert(),t.matrix.multiply(i.matrixWorld)),t.matrix.decompose(t.position,t.quaternion,t.scale),t.updateMatrixWorld(!0),t.projectionMatrix.copy(i.projectionMatrix),t.projectionMatrixInverse.copy(i.projectionMatrixInverse),t.isPerspectiveCamera&&(t.fov=2*k*Math.atan(1/t.projectionMatrix.elements[5]),t.zoom=1)},this.getCamera=function(){return T},this.getFoveation=function(){if(null!==h||null!==d)return o},this.setFoveation=function(e){o=e,null!==h&&(h.fixedFoveation=e),null!==d&&void 0!==d.fixedFoveation&&(d.fixedFoveation=e)},this.hasDepthSensing=function(){return null!==p.texture},this.getDepthSensingMesh=function(){return p.getMesh(T)};let B=null;const U=new oF;U.setAnimationLoop(function(t,r){if(u=r.getViewerPose(l||a),f=r,null!==u){let t=u.views;null!==d&&(e.setRenderTargetFramebuffer(v,d.framebuffer),e.setRenderTarget(v));let i=!1;t.length!==T.cameras.length&&(T.cameras.length=0,i=!0);for(let n=0;n<t.length;n++){let r=t[n],a=null;if(null!==d)a=d.getViewport(r);else{let t=c.getViewSubImage(h,r);a=t.viewport,0===n&&(e.setRenderTargetTextures(v,t.colorTexture,h.ignoreDepthValues?void 0:t.depthStencilTexture),e.setRenderTarget(v))}let s=w[n];void 0===s&&((s=new iC).layers.enable(n),s.viewport=new ex,w[n]=s),s.matrix.fromArray(r.transform.matrix),s.matrix.decompose(s.position,s.quaternion,s.scale),s.projectionMatrix.fromArray(r.projectionMatrix),s.projectionMatrixInverse.copy(s.projectionMatrix).invert(),s.viewport.set(a.x,a.y,a.width,a.height),0===n&&(T.matrix.copy(s.matrix),T.matrix.decompose(T.position,T.quaternion,T.scale)),!0===i&&T.cameras.push(s)}let r=n.enabledFeatures;if(r&&r.includes("depth-sensing")){let i=c.getDepthInformation(t[0]);i&&i.isValid&&i.texture&&p.init(e,i,n.renderState)}}for(let e=0;e<x.length;e++){let t=y[e],i=x[e];null!==t&&void 0!==i&&i.update(t,r,l||a)}B&&B(t,r),r.detectedPlanes&&i.dispatchEvent({type:"planesdetected",data:r}),f=null}),this.setAnimationLoop=function(e){B=e},this.dispose=function(){}}}let uY=new ti,uQ=new e2;function uq(e,t){function i(e,t){!0===e.matrixAutoUpdate&&e.updateMatrix(),t.value.copy(e.matrix)}function n(e,n){e.opacity.value=n.opacity,n.color&&e.diffuse.value.copy(n.color),n.emissive&&e.emissive.value.copy(n.emissive).multiplyScalar(n.emissiveIntensity),n.map&&(e.map.value=n.map,i(n.map,e.mapTransform)),n.alphaMap&&(e.alphaMap.value=n.alphaMap,i(n.alphaMap,e.alphaMapTransform)),n.bumpMap&&(e.bumpMap.value=n.bumpMap,i(n.bumpMap,e.bumpMapTransform),e.bumpScale.value=n.bumpScale,1===n.side&&(e.bumpScale.value*=-1)),n.normalMap&&(e.normalMap.value=n.normalMap,i(n.normalMap,e.normalMapTransform),e.normalScale.value.copy(n.normalScale),1===n.side&&e.normalScale.value.negate()),n.displacementMap&&(e.displacementMap.value=n.displacementMap,i(n.displacementMap,e.displacementMapTransform),e.displacementScale.value=n.displacementScale,e.displacementBias.value=n.displacementBias),n.emissiveMap&&(e.emissiveMap.value=n.emissiveMap,i(n.emissiveMap,e.emissiveMapTransform)),n.specularMap&&(e.specularMap.value=n.specularMap,i(n.specularMap,e.specularMapTransform)),n.alphaTest>0&&(e.alphaTest.value=n.alphaTest);let r=t.get(n),a=r.envMap,s=r.envMapRotation;a&&(e.envMap.value=a,uY.copy(s),uY.x*=-1,uY.y*=-1,uY.z*=-1,a.isCubeTexture&&!1===a.isRenderTargetTexture&&(uY.y*=-1,uY.z*=-1),e.envMapRotation.value.setFromMatrix4(uQ.makeRotationFromEuler(uY)),e.flipEnvMap.value=a.isCubeTexture&&!1===a.isRenderTargetTexture?-1:1,e.reflectivity.value=n.reflectivity,e.ior.value=n.ior,e.refractionRatio.value=n.refractionRatio),n.lightMap&&(e.lightMap.value=n.lightMap,e.lightMapIntensity.value=n.lightMapIntensity,i(n.lightMap,e.lightMapTransform)),n.aoMap&&(e.aoMap.value=n.aoMap,e.aoMapIntensity.value=n.aoMapIntensity,i(n.aoMap,e.aoMapTransform))}return{refreshFogUniforms:function(t,i){i.color.getRGB(t.fogColor.value,iA(e)),i.isFog?(t.fogNear.value=i.near,t.fogFar.value=i.far):i.isFogExp2&&(t.fogDensity.value=i.density)},refreshMaterialUniforms:function(e,r,a,s,o){var l,u,c,h,d,f,p,m,g,v,x,y,S,A,M,b,w,T,E,_,C,R,P;let D;r.isMeshBasicMaterial||r.isMeshLambertMaterial?n(e,r):r.isMeshToonMaterial?(n(e,r),l=e,(u=r).gradientMap&&(l.gradientMap.value=u.gradientMap)):r.isMeshPhongMaterial?(n(e,r),c=e,h=r,c.specular.value.copy(h.specular),c.shininess.value=Math.max(h.shininess,1e-4)):r.isMeshStandardMaterial?(n(e,r),d=e,f=r,d.metalness.value=f.metalness,f.metalnessMap&&(d.metalnessMap.value=f.metalnessMap,i(f.metalnessMap,d.metalnessMapTransform)),d.roughness.value=f.roughness,f.roughnessMap&&(d.roughnessMap.value=f.roughnessMap,i(f.roughnessMap,d.roughnessMapTransform)),f.envMap&&(d.envMapIntensity.value=f.envMapIntensity),r.isMeshPhysicalMaterial&&(p=e,m=r,g=o,p.ior.value=m.ior,m.sheen>0&&(p.sheenColor.value.copy(m.sheenColor).multiplyScalar(m.sheen),p.sheenRoughness.value=m.sheenRoughness,m.sheenColorMap&&(p.sheenColorMap.value=m.sheenColorMap,i(m.sheenColorMap,p.sheenColorMapTransform)),m.sheenRoughnessMap&&(p.sheenRoughnessMap.value=m.sheenRoughnessMap,i(m.sheenRoughnessMap,p.sheenRoughnessMapTransform))),m.clearcoat>0&&(p.clearcoat.value=m.clearcoat,p.clearcoatRoughness.value=m.clearcoatRoughness,m.clearcoatMap&&(p.clearcoatMap.value=m.clearcoatMap,i(m.clearcoatMap,p.clearcoatMapTransform)),m.clearcoatRoughnessMap&&(p.clearcoatRoughnessMap.value=m.clearcoatRoughnessMap,i(m.clearcoatRoughnessMap,p.clearcoatRoughnessMapTransform)),m.clearcoatNormalMap&&(p.clearcoatNormalMap.value=m.clearcoatNormalMap,i(m.clearcoatNormalMap,p.clearcoatNormalMapTransform),p.clearcoatNormalScale.value.copy(m.clearcoatNormalScale),1===m.side&&p.clearcoatNormalScale.value.negate())),m.dispersion>0&&(p.dispersion.value=m.dispersion),m.iridescence>0&&(p.iridescence.value=m.iridescence,p.iridescenceIOR.value=m.iridescenceIOR,p.iridescenceThicknessMinimum.value=m.iridescenceThicknessRange[0],p.iridescenceThicknessMaximum.value=m.iridescenceThicknessRange[1],m.iridescenceMap&&(p.iridescenceMap.value=m.iridescenceMap,i(m.iridescenceMap,p.iridescenceMapTransform)),m.iridescenceThicknessMap&&(p.iridescenceThicknessMap.value=m.iridescenceThicknessMap,i(m.iridescenceThicknessMap,p.iridescenceThicknessMapTransform))),m.transmission>0&&(p.transmission.value=m.transmission,p.transmissionSamplerMap.value=g.texture,p.transmissionSamplerSize.value.set(g.width,g.height),m.transmissionMap&&(p.transmissionMap.value=m.transmissionMap,i(m.transmissionMap,p.transmissionMapTransform)),p.thickness.value=m.thickness,m.thicknessMap&&(p.thicknessMap.value=m.thicknessMap,i(m.thicknessMap,p.thicknessMapTransform)),p.attenuationDistance.value=m.attenuationDistance,p.attenuationColor.value.copy(m.attenuationColor)),m.anisotropy>0&&(p.anisotropyVector.value.set(m.anisotropy*Math.cos(m.anisotropyRotation),m.anisotropy*Math.sin(m.anisotropyRotation)),m.anisotropyMap&&(p.anisotropyMap.value=m.anisotropyMap,i(m.anisotropyMap,p.anisotropyMapTransform))),p.specularIntensity.value=m.specularIntensity,p.specularColor.value.copy(m.specularColor),m.specularColorMap&&(p.specularColorMap.value=m.specularColorMap,i(m.specularColorMap,p.specularColorMapTransform)),m.specularIntensityMap&&(p.specularIntensityMap.value=m.specularIntensityMap,i(m.specularIntensityMap,p.specularIntensityMapTransform)))):r.isMeshMatcapMaterial?(n(e,r),v=e,(x=r).matcap&&(v.matcap.value=x.matcap)):r.isMeshDepthMaterial?n(e,r):r.isMeshDistanceMaterial?(n(e,r),y=e,S=r,D=t.get(S).light,y.referencePosition.value.setFromMatrixPosition(D.matrixWorld),y.nearDistance.value=D.shadow.camera.near,y.farDistance.value=D.shadow.camera.far):r.isMeshNormalMaterial?n(e,r):r.isLineBasicMaterial?(A=e,M=r,A.diffuse.value.copy(M.color),A.opacity.value=M.opacity,M.map&&(A.map.value=M.map,i(M.map,A.mapTransform)),r.isLineDashedMaterial&&(b=e,w=r,b.dashSize.value=w.dashSize,b.totalSize.value=w.dashSize+w.gapSize,b.scale.value=w.scale)):r.isPointsMaterial?(T=e,E=r,_=a,C=s,T.diffuse.value.copy(E.color),T.opacity.value=E.opacity,T.size.value=E.size*_,T.scale.value=.5*C,E.map&&(T.map.value=E.map,i(E.map,T.uvTransform)),E.alphaMap&&(T.alphaMap.value=E.alphaMap,i(E.alphaMap,T.alphaMapTransform)),E.alphaTest>0&&(T.alphaTest.value=E.alphaTest)):r.isSpriteMaterial?(R=e,P=r,R.diffuse.value.copy(P.color),R.opacity.value=P.opacity,R.rotation.value=P.rotation,P.map&&(R.map.value=P.map,i(P.map,R.mapTransform)),P.alphaMap&&(R.alphaMap.value=P.alphaMap,i(P.alphaMap,R.alphaMapTransform)),P.alphaTest>0&&(R.alphaTest.value=P.alphaTest)):r.isShadowMaterial?(e.color.value.copy(r.color),e.opacity.value=r.opacity):r.isShaderMaterial&&(r.uniformsNeedUpdate=!1)}}}function uK(e,t,i,n){let r={},a={},s=[],o=e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS);function l(e){let t={boundary:0,storage:0};return"number"==typeof e||"boolean"==typeof e?(t.boundary=4,t.storage=4):e.isVector2?(t.boundary=8,t.storage=8):e.isVector3||e.isColor?(t.boundary=16,t.storage=12):e.isVector4?(t.boundary=16,t.storage=16):e.isMatrix3?(t.boundary=48,t.storage=48):e.isMatrix4?(t.boundary=64,t.storage=64):e.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",e),t}function u(t){let i=t.target;i.removeEventListener("dispose",u);let n=s.indexOf(i.__bindingPointIndex);s.splice(n,1),e.deleteBuffer(r[i.id]),delete r[i.id],delete a[i.id]}return{bind:function(e,t){let i=t.program;n.uniformBlockBinding(e,i)},update:function(i,c){var h;let d,f,p,m,g=r[i.id];void 0===g&&(function(e){let t=e.uniforms,i=0;for(let e=0,n=t.length;e<n;e++){let n=Array.isArray(t[e])?t[e]:[t[e]];for(let e=0,t=n.length;e<t;e++){let t=n[e],r=Array.isArray(t.value)?t.value:[t.value];for(let e=0,n=r.length;e<n;e++){let n=l(r[e]),a=i%16,s=a%n.boundary,o=a+s;i+=s,0!==o&&16-o<n.storage&&(i+=16-o),t.__data=new Float32Array(n.storage/Float32Array.BYTES_PER_ELEMENT),t.__offset=i,i+=n.storage}}}let n=i%16;n>0&&(i+=16-n),e.__size=i,e.__cache={}}(i),(h=i).__bindingPointIndex=d=function(){for(let e=0;e<o;e++)if(-1===s.indexOf(e))return s.push(e),e;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}(),f=e.createBuffer(),p=h.__size,m=h.usage,e.bindBuffer(e.UNIFORM_BUFFER,f),e.bufferData(e.UNIFORM_BUFFER,p,m),e.bindBuffer(e.UNIFORM_BUFFER,null),e.bindBufferBase(e.UNIFORM_BUFFER,d,f),g=f,r[i.id]=g,i.addEventListener("dispose",u));let v=c.program;n.updateUBOMapping(i,v);let x=t.render.frame;a[i.id]!==x&&(function(t){let i=r[t.id],n=t.uniforms,a=t.__cache;e.bindBuffer(e.UNIFORM_BUFFER,i);for(let t=0,i=n.length;t<i;t++){let i=Array.isArray(n[t])?n[t]:[n[t]];for(let n=0,r=i.length;n<r;n++){let r=i[n];if(!0===function(e,t,i,n){let r=e.value,a=t+"_"+i;if(void 0===n[a])return"number"==typeof r||"boolean"==typeof r?n[a]=r:n[a]=r.clone(),!0;{let e=n[a];if("number"==typeof r||"boolean"==typeof r){if(e!==r)return n[a]=r,!0}else if(!1===e.equals(r))return e.copy(r),!0}return!1}(r,t,n,a)){let t=r.__offset,i=Array.isArray(r.value)?r.value:[r.value],n=0;for(let a=0;a<i.length;a++){let s=i[a],o=l(s);"number"==typeof s||"boolean"==typeof s?(r.__data[0]=s,e.bufferSubData(e.UNIFORM_BUFFER,t+n,r.__data)):s.isMatrix3?(r.__data[0]=s.elements[0],r.__data[1]=s.elements[1],r.__data[2]=s.elements[2],r.__data[3]=0,r.__data[4]=s.elements[3],r.__data[5]=s.elements[4],r.__data[6]=s.elements[5],r.__data[7]=0,r.__data[8]=s.elements[6],r.__data[9]=s.elements[7],r.__data[10]=s.elements[8],r.__data[11]=0):(s.toArray(r.__data,n),n+=o.storage/Float32Array.BYTES_PER_ELEMENT)}e.bufferSubData(e.UNIFORM_BUFFER,t,r.__data)}}}e.bindBuffer(e.UNIFORM_BUFFER,null)}(i),a[i.id]=x)},dispose:function(){for(let t in r)e.deleteBuffer(r[t]);s=[],r={},a={}}}}class uZ{constructor(e={}){let t,i,n,r,a,s,o,l,u,c,h,d,f,p,m,g,v,x,y,S,A,M,b,w,T;const{canvas:E=et(),context:_=null,depth:C=!0,stencil:R=!1,alpha:P=!1,antialias:L=!1,premultipliedAlpha:B=!0,preserveDrawingBuffer:U=!1,powerPreference:N="default",failIfMajorPerformanceCaveat:F=!1,reverseDepthBuffer:O=!1}=e;if(this.isWebGLRenderer=!0,null!==_){if("u">typeof WebGLRenderingContext&&_ instanceof WebGLRenderingContext)throw Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");t=_.getContextAttributes().alpha}else t=P;const z=new Uint32Array(4),k=new Int32Array(4);let H=null,G=null;const V=[],W=[];this.domElement=E,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=D,this.toneMapping=0,this.toneMappingExposure=1;const j=this;let X=!1,Y=0,Q=0,q=null,K=-1,Z=null;const J=new ex,$=new ex;let ee=null;const ei=new tO(0);let eo=0,el=E.width,ec=E.height,eh=1,ed=null,ef=null;const ep=new ex(0,0,el,ec),em=new ex(0,0,el,ec);let eg=!1;const ev=new nM;let ey=!1,eA=!1;const eM=new e2,eb=new e2,ew=new eE,eT=new ex,e_={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let eC=!1;function eR(){return null===q?eh:1}let eP=_;function eD(e,t){return E.getContext(e,t)}try{if("setAttribute"in E&&E.setAttribute("data-engine","three.js r171"),E.addEventListener("webglcontextlost",eB,!1),E.addEventListener("webglcontextrestored",eU,!1),E.addEventListener("webglcontextcreationerror",eN,!1),null===eP){const e="webgl2";if(eP=eD(e,{alpha:!0,depth:C,stencil:R,antialias:L,premultipliedAlpha:B,preserveDrawingBuffer:U,powerPreference:N,failIfMajorPerformanceCaveat:F}),null===eP)if(eD(e))throw Error("Error creating WebGL context with your selected attributes.");else throw Error("Error creating WebGL context.")}}catch(e){throw console.error("THREE.WebGLRenderer: "+e.message),e}function eI(){(i=new lr(eP)).init(),b=new uk(eP,i),n=new oQ(eP,i,e,b),r=new uO(eP,i),n.reverseDepthBuffer&&O&&r.buffers.depth.setReversed(!0),a=new lo(eP),s=new uT,o=new uz(eP,i,r,s,n,b,a),l=new oK(j),u=new ln(j),c=new oO(eP),w=new oX(eP,c),h=new la(eP,c,a,w),d=new lu(eP,h,c,a),S=new ll(eP,n,o),v=new oq(s),f=new uw(j,l,u,i,n,w,v),p=new uq(j,s),m=new uR,g=new uU(i),y=new oj(j,l,u,r,d,t,B),x=new uN(j,d,n),T=new uK(eP,a,n,r),A=new oY(eP,i,a),M=new ls(eP,i,a),a.programs=f.programs,j.capabilities=n,j.extensions=i,j.properties=s,j.renderLists=m,j.shadowMap=x,j.state=r,j.info=a}eI();const eL=new uX(j,eP);function eB(e){e.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),X=!0}function eU(){console.log("THREE.WebGLRenderer: Context Restored."),X=!1;let e=a.autoReset,t=x.enabled,i=x.autoUpdate,n=x.needsUpdate,r=x.type;eI(),a.autoReset=e,x.enabled=t,x.autoUpdate=i,x.needsUpdate=n,x.type=r}function eN(e){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",e.statusMessage)}function eF(e){var t,i;let n,r=e.target;r.removeEventListener("dispose",eF),i=t=r,void 0!==(n=s.get(i).programs)&&(n.forEach(function(e){f.releaseProgram(e)}),i.isShaderMaterial&&f.releaseShaderCache(i)),s.remove(t)}function eO(e,t,i){!0===e.transparent&&2===e.side&&!1===e.forceSinglePass?(e.side=1,e.needsUpdate=!0,eQ(e,t,i),e.side=0,e.needsUpdate=!0,eQ(e,t,i),e.side=2):eQ(e,t,i)}this.xr=eL,this.getContext=function(){return eP},this.getContextAttributes=function(){return eP.getContextAttributes()},this.forceContextLoss=function(){let e=i.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){let e=i.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return eh},this.setPixelRatio=function(e){void 0!==e&&(eh=e,this.setSize(el,ec,!1))},this.getSize=function(e){return e.set(el,ec)},this.setSize=function(e,t,i=!0){eL.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(el=e,ec=t,E.width=Math.floor(e*eh),E.height=Math.floor(t*eh),!0===i&&(E.style.width=e+"px",E.style.height=t+"px"),this.setViewport(0,0,e,t))},this.getDrawingBufferSize=function(e){return e.set(el*eh,ec*eh).floor()},this.setDrawingBufferSize=function(e,t,i){el=e,ec=t,eh=i,E.width=Math.floor(e*i),E.height=Math.floor(t*i),this.setViewport(0,0,e,t)},this.getCurrentViewport=function(e){return e.copy(J)},this.getViewport=function(e){return e.copy(ep)},this.setViewport=function(e,t,i,n){e.isVector4?ep.set(e.x,e.y,e.z,e.w):ep.set(e,t,i,n),r.viewport(J.copy(ep).multiplyScalar(eh).round())},this.getScissor=function(e){return e.copy(em)},this.setScissor=function(e,t,i,n){e.isVector4?em.set(e.x,e.y,e.z,e.w):em.set(e,t,i,n),r.scissor($.copy(em).multiplyScalar(eh).round())},this.getScissorTest=function(){return eg},this.setScissorTest=function(e){r.setScissorTest(eg=e)},this.setOpaqueSort=function(e){ed=e},this.setTransparentSort=function(e){ef=e},this.getClearColor=function(e){return e.copy(y.getClearColor())},this.setClearColor=function(){y.setClearColor.apply(y,arguments)},this.getClearAlpha=function(){return y.getClearAlpha()},this.setClearAlpha=function(){y.setClearAlpha.apply(y,arguments)},this.clear=function(e=!0,t=!0,i=!0){let n=0;if(e){let e=!1;if(null!==q){let t=q.texture.format;e=1033===t||1031===t||1029===t}if(e){let e=q.texture.type,t=1009===e||1014===e||1012===e||1020===e||1017===e||1018===e,i=y.getClearColor(),n=y.getClearAlpha(),r=i.r,a=i.g,s=i.b;t?(z[0]=r,z[1]=a,z[2]=s,z[3]=n,eP.clearBufferuiv(eP.COLOR,0,z)):(k[0]=r,k[1]=a,k[2]=s,k[3]=n,eP.clearBufferiv(eP.COLOR,0,k))}else n|=eP.COLOR_BUFFER_BIT}t&&(n|=eP.DEPTH_BUFFER_BIT),i&&(n|=eP.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(0xffffffff)),eP.clear(n)},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(){E.removeEventListener("webglcontextlost",eB,!1),E.removeEventListener("webglcontextrestored",eU,!1),E.removeEventListener("webglcontextcreationerror",eN,!1),y.dispose(),m.dispose(),g.dispose(),s.dispose(),l.dispose(),u.dispose(),d.dispose(),w.dispose(),T.dispose(),f.dispose(),eL.dispose(),eL.removeEventListener("sessionstart",ek),eL.removeEventListener("sessionend",eH),eG.stop()},this.renderBufferDirect=function(e,t,a,d,f,m){let g;null===t&&(t=e_);let x=f.isMesh&&0>f.matrixWorld.determinant(),y=function(e,t,i,a,c){var h,d;!0!==t.isScene&&(t=e_),o.resetTextureUnits();let f=t.fog,m=a.isMeshStandardMaterial?t.environment:null,g=null===q?j.outputColorSpace:!0===q.isXRRenderTarget?q.texture.colorSpace:I,x=(a.isMeshStandardMaterial?u:l).get(a.envMap||m),y=!0===a.vertexColors&&!!i.attributes.color&&4===i.attributes.color.itemSize,A=!!i.attributes.tangent&&(!!a.normalMap||a.anisotropy>0),M=!!i.morphAttributes.position,b=!!i.morphAttributes.normal,w=!!i.morphAttributes.color,E=0;a.toneMapped&&(null===q||!0===q.isXRRenderTarget)&&(E=j.toneMapping);let _=i.morphAttributes.position||i.morphAttributes.normal||i.morphAttributes.color,C=void 0!==_?_.length:0,R=s.get(a),P=G.state.lights;if(!0===ey&&(!0===eA||e!==Z)){let t=e===Z&&a.id===K;v.setState(a,e,t)}let D=!1;a.version===R.__version?R.needsLights&&R.lightsStateVersion!==P.state.version||R.outputColorSpace!==g||c.isBatchedMesh&&!1===R.batching?D=!0:c.isBatchedMesh||!0!==R.batching?c.isBatchedMesh&&!0===R.batchingColor&&null===c.colorTexture||c.isBatchedMesh&&!1===R.batchingColor&&null!==c.colorTexture||c.isInstancedMesh&&!1===R.instancing?D=!0:c.isInstancedMesh||!0!==R.instancing?c.isSkinnedMesh&&!1===R.skinning?D=!0:c.isSkinnedMesh||!0!==R.skinning?c.isInstancedMesh&&!0===R.instancingColor&&null===c.instanceColor||c.isInstancedMesh&&!1===R.instancingColor&&null!==c.instanceColor||c.isInstancedMesh&&!0===R.instancingMorph&&null===c.morphTexture||c.isInstancedMesh&&!1===R.instancingMorph&&null!==c.morphTexture||R.envMap!==x||!0===a.fog&&R.fog!==f||void 0!==R.numClippingPlanes&&(R.numClippingPlanes!==v.numPlanes||R.numIntersection!==v.numIntersection)||R.vertexAlphas!==y||R.vertexTangents!==A||R.morphTargets!==M||R.morphNormals!==b||R.morphColors!==w||R.toneMapping!==E?D=!0:R.morphTargetsCount!==C&&(D=!0):D=!0:D=!0:D=!0:(D=!0,R.__version=a.version);let L=R.currentProgram;!0===D&&(L=eQ(a,t,c));let B=!1,U=!1,N=!1,F=L.getUniforms(),O=R.uniforms;if(r.useProgram(L.program)&&(B=!0,U=!0,N=!0),a.id!==K&&(K=a.id,U=!0),B||Z!==e){r.buffers.depth.getReversed()?(eM.copy(e.projectionMatrix),ea(eM),es(eM),F.setValue(eP,"projectionMatrix",eM)):F.setValue(eP,"projectionMatrix",e.projectionMatrix),F.setValue(eP,"viewMatrix",e.matrixWorldInverse);let t=F.map.cameraPosition;void 0!==t&&t.setValue(eP,ew.setFromMatrixPosition(e.matrixWorld)),n.logarithmicDepthBuffer&&F.setValue(eP,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),(a.isMeshPhongMaterial||a.isMeshToonMaterial||a.isMeshLambertMaterial||a.isMeshBasicMaterial||a.isMeshStandardMaterial||a.isShaderMaterial)&&F.setValue(eP,"isOrthographic",!0===e.isOrthographicCamera),Z!==e&&(Z=e,U=!0,N=!0)}if(c.isSkinnedMesh){F.setOptional(eP,c,"bindMatrix"),F.setOptional(eP,c,"bindMatrixInverse");let e=c.skeleton;e&&(null===e.boneTexture&&e.computeBoneTexture(),F.setValue(eP,"boneTexture",e.boneTexture,o))}c.isBatchedMesh&&(F.setOptional(eP,c,"batchingTexture"),F.setValue(eP,"batchingTexture",c._matricesTexture,o),F.setOptional(eP,c,"batchingIdTexture"),F.setValue(eP,"batchingIdTexture",c._indirectTexture,o),F.setOptional(eP,c,"batchingColorTexture"),null!==c._colorsTexture&&F.setValue(eP,"batchingColorTexture",c._colorsTexture,o));let z=i.morphAttributes;if((void 0!==z.position||void 0!==z.normal||void 0!==z.color)&&S.update(c,i,L),(U||R.receiveShadow!==c.receiveShadow)&&(R.receiveShadow=c.receiveShadow,F.setValue(eP,"receiveShadow",c.receiveShadow)),a.isMeshGouraudMaterial&&null!==a.envMap&&(O.envMap.value=x,O.flipEnvMap.value=x.isCubeTexture&&!1===x.isRenderTargetTexture?-1:1),a.isMeshStandardMaterial&&null===a.envMap&&null!==t.environment&&(O.envMapIntensity.value=t.environmentIntensity),U&&(F.setValue(eP,"toneMappingExposure",j.toneMappingExposure),R.needsLights&&(h=O,d=N,h.ambientLightColor.needsUpdate=d,h.lightProbe.needsUpdate=d,h.directionalLights.needsUpdate=d,h.directionalLightShadows.needsUpdate=d,h.pointLights.needsUpdate=d,h.pointLightShadows.needsUpdate=d,h.spotLights.needsUpdate=d,h.spotLightShadows.needsUpdate=d,h.rectAreaLights.needsUpdate=d,h.hemisphereLights.needsUpdate=d),f&&!0===a.fog&&p.refreshFogUniforms(O,f),p.refreshMaterialUniforms(O,a,eh,ec,G.state.transmissionRenderTarget[e.id]),un.upload(eP,eq(R),O,o)),a.isShaderMaterial&&!0===a.uniformsNeedUpdate&&(un.upload(eP,eq(R),O,o),a.uniformsNeedUpdate=!1),a.isSpriteMaterial&&F.setValue(eP,"center",c.center),F.setValue(eP,"modelViewMatrix",c.modelViewMatrix),F.setValue(eP,"normalMatrix",c.normalMatrix),F.setValue(eP,"modelMatrix",c.matrixWorld),a.isShaderMaterial||a.isRawShaderMaterial){let e=a.uniformsGroups;for(let t=0,i=e.length;t<i;t++){let i=e[t];T.update(i,L),T.bind(i,L)}}return L}(e,t,a,d,f);r.setMaterial(d,x);let b=a.index,E=1;if(!0===d.wireframe){if(void 0===(b=h.getWireframeAttribute(a)))return;E=2}let _=a.drawRange,C=a.attributes.position,R=_.start*E,P=(_.start+_.count)*E;null!==m&&(R=Math.max(R,m.start*E),P=Math.min(P,(m.start+m.count)*E)),null!==b?(R=Math.max(R,0),P=Math.min(P,b.count)):null!=C&&(R=Math.max(R,0),P=Math.min(P,C.count));let D=P-R;if(D<0||D===1/0)return;w.setup(f,d,y,a,b);let L=A;if(null!==b&&(g=c.get(b),(L=M).setIndex(g)),f.isMesh)!0===d.wireframe?(r.setLineWidth(d.wireframeLinewidth*eR()),L.setMode(eP.LINES)):L.setMode(eP.TRIANGLES);else if(f.isLine){let e=d.linewidth;void 0===e&&(e=1),r.setLineWidth(e*eR()),f.isLineSegments?L.setMode(eP.LINES):f.isLineLoop?L.setMode(eP.LINE_LOOP):L.setMode(eP.LINE_STRIP)}else f.isPoints?L.setMode(eP.POINTS):f.isSprite&&L.setMode(eP.TRIANGLES);if(f.isBatchedMesh)if(null!==f._multiDrawInstances)L.renderMultiDrawInstances(f._multiDrawStarts,f._multiDrawCounts,f._multiDrawCount,f._multiDrawInstances);else if(i.get("WEBGL_multi_draw"))L.renderMultiDraw(f._multiDrawStarts,f._multiDrawCounts,f._multiDrawCount);else{let e=f._multiDrawStarts,t=f._multiDrawCounts,i=f._multiDrawCount,n=b?c.get(b).bytesPerElement:1,r=s.get(d).currentProgram.getUniforms();for(let a=0;a<i;a++)r.setValue(eP,"_gl_DrawID",a),L.render(e[a]/n,t[a])}else if(f.isInstancedMesh)L.renderInstances(R,D,f.count);else if(a.isInstancedBufferGeometry){let e=void 0!==a._maxInstanceCount?a._maxInstanceCount:1/0,t=Math.min(a.instanceCount,e);L.renderInstances(R,D,t)}else L.render(R,D)},this.compile=function(e,t,i=null){null===i&&(i=e),(G=g.get(i)).init(t),W.push(G),i.traverseVisible(function(e){e.isLight&&e.layers.test(t.layers)&&(G.pushLight(e),e.castShadow&&G.pushShadow(e))}),e!==i&&e.traverseVisible(function(e){e.isLight&&e.layers.test(t.layers)&&(G.pushLight(e),e.castShadow&&G.pushShadow(e))}),G.setupLights();let n=new Set;return e.traverse(function(e){if(!(e.isMesh||e.isPoints||e.isLine||e.isSprite))return;let t=e.material;if(t)if(Array.isArray(t))for(let r=0;r<t.length;r++){let a=t[r];eO(a,i,e),n.add(a)}else eO(t,i,e),n.add(t)}),W.pop(),G=null,n},this.compileAsync=function(e,t,n=null){let r=this.compile(e,t,n);return new Promise(t=>{function n(){(r.forEach(function(e){s.get(e).currentProgram.isReady()&&r.delete(e)}),0===r.size)?t(e):setTimeout(n,10)}null!==i.get("KHR_parallel_shader_compile")?n():setTimeout(n,10)})};let ez=null;function ek(){eG.stop()}function eH(){eG.start()}const eG=new oF;function eV(e,t,i,n){if(!1===e.visible)return;if(e.layers.test(t.layers)){if(e.isGroup)i=e.renderOrder;else if(e.isLOD)!0===e.autoUpdate&&e.update(t);else if(e.isLight)G.pushLight(e),e.castShadow&&G.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||ev.intersectsSprite(e)){n&&eT.setFromMatrixPosition(e.matrixWorld).applyMatrix4(eb);let t=d.update(e),r=e.material;r.visible&&H.push(e,t,r,i,eT.z,null)}}else if((e.isMesh||e.isLine||e.isPoints)&&(!e.frustumCulled||ev.intersectsObject(e))){let t=d.update(e),r=e.material;if(n&&(void 0!==e.boundingSphere?(null===e.boundingSphere&&e.computeBoundingSphere(),eT.copy(e.boundingSphere.center)):(null===t.boundingSphere&&t.computeBoundingSphere(),eT.copy(t.boundingSphere.center)),eT.applyMatrix4(e.matrixWorld).applyMatrix4(eb)),Array.isArray(r)){let n=t.groups;for(let a=0,s=n.length;a<s;a++){let s=n[a],o=r[s.materialIndex];o&&o.visible&&H.push(e,t,o,i,eT.z,s)}}else r.visible&&H.push(e,t,r,i,eT.z,null)}}let r=e.children;for(let e=0,a=r.length;e<a;e++)eV(r[e],t,i,n)}function eW(e,t,i,n){let a=e.opaque,s=e.transmissive,o=e.transparent;G.setupLightsView(i),!0===ey&&v.setGlobalState(j.clippingPlanes,i),n&&r.viewport(J.copy(n)),a.length>0&&eX(a,t,i),s.length>0&&eX(s,t,i),o.length>0&&eX(o,t,i),r.buffers.depth.setTest(!0),r.buffers.depth.setMask(!0),r.buffers.color.setMask(!0),r.setPolygonOffset(!1)}function ej(e,t,n,r){if(null!==(!0===n.isScene?n.overrideMaterial:null))return;void 0===G.state.transmissionRenderTarget[r.id]&&(G.state.transmissionRenderTarget[r.id]=new eS(1,1,{generateMipmaps:!0,type:i.has("EXT_color_buffer_half_float")||i.has("EXT_color_buffer_float")?1016:1009,minFilter:1008,samples:4,stencilBuffer:R,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:eu.workingColorSpace}));let a=G.state.transmissionRenderTarget[r.id],s=r.viewport||J;a.setSize(s.z,s.w);let l=j.getRenderTarget();j.setRenderTarget(a),j.getClearColor(ei),(eo=j.getClearAlpha())<1&&j.setClearColor(0xffffff,.5),j.clear(),eC&&y.render(n);let u=j.toneMapping;j.toneMapping=0;let c=r.viewport;if(void 0!==r.viewport&&(r.viewport=void 0),G.setupLightsView(r),!0===ey&&v.setGlobalState(j.clippingPlanes,r),eX(e,n,r),o.updateMultisampleRenderTarget(a),o.updateRenderTargetMipmap(a),!1===i.has("WEBGL_multisampled_render_to_texture")){let e=!1;for(let i=0,a=t.length;i<a;i++){let a=t[i],s=a.object,o=a.geometry,l=a.material,u=a.group;if(2===l.side&&s.layers.test(r.layers)){let t=l.side;l.side=1,l.needsUpdate=!0,eY(s,n,r,o,l,u),l.side=t,l.needsUpdate=!0,e=!0}}!0===e&&(o.updateMultisampleRenderTarget(a),o.updateRenderTargetMipmap(a))}j.setRenderTarget(l),j.setClearColor(ei,eo),void 0!==c&&(r.viewport=c),j.toneMapping=u}function eX(e,t,i){let n=!0===t.isScene?t.overrideMaterial:null;for(let r=0,a=e.length;r<a;r++){let a=e[r],s=a.object,o=a.geometry,l=null===n?a.material:n,u=a.group;s.layers.test(i.layers)&&eY(s,t,i,o,l,u)}}function eY(e,t,i,n,r,a){e.onBeforeRender(j,t,i,n,r,a),e.modelViewMatrix.multiplyMatrices(i.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),r.onBeforeRender(j,t,i,n,e,a),!0===r.transparent&&2===r.side&&!1===r.forceSinglePass?(r.side=1,r.needsUpdate=!0,j.renderBufferDirect(i,t,n,r,e,a),r.side=0,r.needsUpdate=!0,j.renderBufferDirect(i,t,n,r,e,a),r.side=2):j.renderBufferDirect(i,t,n,r,e,a),e.onAfterRender(j,t,i,n,r,a)}function eQ(e,t,i){var n;!0!==t.isScene&&(t=e_);let r=s.get(e),a=G.state.lights,o=G.state.shadowsArray,c=a.state.version,h=f.getParameters(e,a.state,o,t,i),d=f.getProgramCacheKey(h),p=r.programs;r.environment=e.isMeshStandardMaterial?t.environment:null,r.fog=t.fog,r.envMap=(e.isMeshStandardMaterial?u:l).get(e.envMap||r.environment),r.envMapRotation=null!==r.environment&&null===e.envMap?t.environmentRotation:e.envMapRotation,void 0===p&&(e.addEventListener("dispose",eF),r.programs=p=new Map);let m=p.get(d);if(void 0!==m){if(r.currentProgram===m&&r.lightsStateVersion===c)return eK(e,h),m}else h.uniforms=f.getUniforms(e),e.onBeforeCompile(h,j),m=f.acquireProgram(h,d),p.set(d,m),r.uniforms=h.uniforms;let g=r.uniforms;return(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(g.clippingPlanes=v.uniform),eK(e,h),r.needsLights=(n=e).isMeshLambertMaterial||n.isMeshToonMaterial||n.isMeshPhongMaterial||n.isMeshStandardMaterial||n.isShadowMaterial||n.isShaderMaterial&&!0===n.lights,r.lightsStateVersion=c,r.needsLights&&(g.ambientLightColor.value=a.state.ambient,g.lightProbe.value=a.state.probe,g.directionalLights.value=a.state.directional,g.directionalLightShadows.value=a.state.directionalShadow,g.spotLights.value=a.state.spot,g.spotLightShadows.value=a.state.spotShadow,g.rectAreaLights.value=a.state.rectArea,g.ltc_1.value=a.state.rectAreaLTC1,g.ltc_2.value=a.state.rectAreaLTC2,g.pointLights.value=a.state.point,g.pointLightShadows.value=a.state.pointShadow,g.hemisphereLights.value=a.state.hemi,g.directionalShadowMap.value=a.state.directionalShadowMap,g.directionalShadowMatrix.value=a.state.directionalShadowMatrix,g.spotShadowMap.value=a.state.spotShadowMap,g.spotLightMatrix.value=a.state.spotLightMatrix,g.spotLightMap.value=a.state.spotLightMap,g.pointShadowMap.value=a.state.pointShadowMap,g.pointShadowMatrix.value=a.state.pointShadowMatrix),r.currentProgram=m,r.uniformsList=null,m}function eq(e){if(null===e.uniformsList){let t=e.currentProgram.getUniforms();e.uniformsList=un.seqWithValue(t.seq,e.uniforms)}return e.uniformsList}function eK(e,t){let i=s.get(e);i.outputColorSpace=t.outputColorSpace,i.batching=t.batching,i.batchingColor=t.batchingColor,i.instancing=t.instancing,i.instancingColor=t.instancingColor,i.instancingMorph=t.instancingMorph,i.skinning=t.skinning,i.morphTargets=t.morphTargets,i.morphNormals=t.morphNormals,i.morphColors=t.morphColors,i.morphTargetsCount=t.morphTargetsCount,i.numClippingPlanes=t.numClippingPlanes,i.numIntersection=t.numClipIntersection,i.vertexAlphas=t.vertexAlphas,i.vertexTangents=t.vertexTangents,i.toneMapping=t.toneMapping}eG.setAnimationLoop(function(e){ez&&ez(e)}),"u">typeof self&&eG.setContext(self),this.setAnimationLoop=function(e){ez=e,eL.setAnimationLoop(e),null===e?eG.stop():eG.start()},eL.addEventListener("sessionstart",ek),eL.addEventListener("sessionend",eH),this.render=function(e,t){if(void 0!==t&&!0!==t.isCamera)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");if(!0===X)return;if(!0===e.matrixWorldAutoUpdate&&e.updateMatrixWorld(),null===t.parent&&!0===t.matrixWorldAutoUpdate&&t.updateMatrixWorld(),!0===eL.enabled&&!0===eL.isPresenting&&(!0===eL.cameraAutoUpdate&&eL.updateCamera(t),t=eL.getCamera()),!0===e.isScene&&e.onBeforeRender(j,e,t,q),(G=g.get(e,W.length)).init(t),W.push(G),eb.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),ev.setFromProjectionMatrix(eb),eA=this.localClippingEnabled,ey=v.init(this.clippingPlanes,eA),(H=m.get(e,V.length)).init(),V.push(H),!0===eL.enabled&&!0===eL.isPresenting){let e=j.xr.getDepthSensingMesh();null!==e&&eV(e,t,-1/0,j.sortObjects)}eV(e,t,0,j.sortObjects),H.finish(),!0===j.sortObjects&&H.sort(ed,ef),(eC=!1===eL.enabled||!1===eL.isPresenting||!1===eL.hasDepthSensing())&&y.addToRenderList(H,e),this.info.render.frame++,!0===ey&&v.beginShadows();let i=G.state.shadowsArray;x.render(i,e,t),!0===ey&&v.endShadows(),!0===this.info.autoReset&&this.info.reset();let n=H.opaque,r=H.transmissive;if(G.setupLights(),t.isArrayCamera){let i=t.cameras;if(r.length>0)for(let t=0,a=i.length;t<a;t++)ej(n,r,e,i[t]);eC&&y.render(e);for(let t=0,n=i.length;t<n;t++){let n=i[t];eW(H,e,n,n.viewport)}}else r.length>0&&ej(n,r,e,t),eC&&y.render(e),eW(H,e,t);null!==q&&(o.updateMultisampleRenderTarget(q),o.updateRenderTargetMipmap(q)),!0===e.isScene&&e.onAfterRender(j,e,t),w.resetDefaultState(),K=-1,Z=null,W.pop(),W.length>0?(G=W[W.length-1],!0===ey&&v.setGlobalState(j.clippingPlanes,G.state.camera)):G=null,V.pop(),H=V.length>0?V[V.length-1]:null},this.getActiveCubeFace=function(){return Y},this.getActiveMipmapLevel=function(){return Q},this.getRenderTarget=function(){return q},this.setRenderTargetTextures=function(e,t,n){s.get(e.texture).__webglTexture=t,s.get(e.depthTexture).__webglTexture=n;let r=s.get(e);r.__hasExternalTextures=!0,r.__autoAllocateDepthBuffer=void 0===n,r.__autoAllocateDepthBuffer||!0!==i.has("WEBGL_multisampled_render_to_texture")||(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),r.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(e,t){let i=s.get(e);i.__webglFramebuffer=t,i.__useDefaultFramebuffer=void 0===t},this.setRenderTarget=function(e,t=0,i=0){q=e,Y=t,Q=i;let n=!0,a=null,l=!1,u=!1;if(e){let c=s.get(e);if(void 0!==c.__useDefaultFramebuffer)r.bindFramebuffer(eP.FRAMEBUFFER,null),n=!1;else if(void 0===c.__webglFramebuffer)o.setupRenderTarget(e);else if(c.__hasExternalTextures)o.rebindTextures(e,s.get(e.texture).__webglTexture,s.get(e.depthTexture).__webglTexture);else if(e.depthBuffer){let t=e.depthTexture;if(c.__boundDepthTexture!==t){if(null!==t&&s.has(t)&&(e.width!==t.image.width||e.height!==t.image.height))throw Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");o.setupDepthRenderbuffer(e)}}let h=e.texture;(h.isData3DTexture||h.isDataArrayTexture||h.isCompressedArrayTexture)&&(u=!0);let d=s.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(a=Array.isArray(d[t])?d[t][i]:d[t],l=!0):a=e.samples>0&&!1===o.useMultisampledRTT(e)?s.get(e).__webglMultisampledFramebuffer:Array.isArray(d)?d[i]:d,J.copy(e.viewport),$.copy(e.scissor),ee=e.scissorTest}else J.copy(ep).multiplyScalar(eh).floor(),$.copy(em).multiplyScalar(eh).floor(),ee=eg;if(r.bindFramebuffer(eP.FRAMEBUFFER,a)&&n&&r.drawBuffers(e,a),r.viewport(J),r.scissor($),r.setScissorTest(ee),l){let n=s.get(e.texture);eP.framebufferTexture2D(eP.FRAMEBUFFER,eP.COLOR_ATTACHMENT0,eP.TEXTURE_CUBE_MAP_POSITIVE_X+t,n.__webglTexture,i)}else if(u){let n=s.get(e.texture);eP.framebufferTextureLayer(eP.FRAMEBUFFER,eP.COLOR_ATTACHMENT0,n.__webglTexture,i||0,t||0)}K=-1},this.readRenderTargetPixels=function(e,t,i,a,o,l,u){if(!(e&&e.isWebGLRenderTarget))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let c=s.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==u&&(c=c[u]),c){r.bindFramebuffer(eP.FRAMEBUFFER,c);try{let r=e.texture,s=r.format,u=r.type;if(!n.textureFormatReadable(s))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!n.textureTypeReadable(u))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");t>=0&&t<=e.width-a&&i>=0&&i<=e.height-o&&eP.readPixels(t,i,a,o,b.convert(s),b.convert(u),l)}finally{let e=null!==q?s.get(q).__webglFramebuffer:null;r.bindFramebuffer(eP.FRAMEBUFFER,e)}}},this.readRenderTargetPixelsAsync=async function(e,t,i,a,o,l,u){if(!(e&&e.isWebGLRenderTarget))throw Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let c=s.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==u&&(c=c[u]),c){let u=e.texture,h=u.format,d=u.type;if(!n.textureFormatReadable(h))throw Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!n.textureTypeReadable(d))throw Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(t>=0&&t<=e.width-a&&i>=0&&i<=e.height-o){r.bindFramebuffer(eP.FRAMEBUFFER,c);let e=eP.createBuffer();eP.bindBuffer(eP.PIXEL_PACK_BUFFER,e),eP.bufferData(eP.PIXEL_PACK_BUFFER,l.byteLength,eP.STREAM_READ),eP.readPixels(t,i,a,o,b.convert(h),b.convert(d),0);let n=null!==q?s.get(q).__webglFramebuffer:null;r.bindFramebuffer(eP.FRAMEBUFFER,n);let u=eP.fenceSync(eP.SYNC_GPU_COMMANDS_COMPLETE,0);return eP.flush(),await er(eP,u,4),eP.bindBuffer(eP.PIXEL_PACK_BUFFER,e),eP.getBufferSubData(eP.PIXEL_PACK_BUFFER,0,l),eP.deleteBuffer(e),eP.deleteSync(u),l}throw Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")}},this.copyFramebufferToTexture=function(e,t=null,i=0){!0!==e.isTexture&&(en("WebGLRenderer: copyFramebufferToTexture function signature has changed."),t=arguments[0]||null,e=arguments[1]);let n=Math.pow(2,-i),a=Math.floor(e.image.width*n),s=Math.floor(e.image.height*n),l=null!==t?t.x:0,u=null!==t?t.y:0;o.setTexture2D(e,0),eP.copyTexSubImage2D(eP.TEXTURE_2D,i,0,0,l,u,a,s),r.unbindTexture()};const eZ=eP.createFramebuffer(),eJ=eP.createFramebuffer();this.copyTextureToTexture=function(e,t,i=null,n=null,a=0,l=null){let u,c,h,d,f,p,m,g,v,x;!0!==e.isTexture&&(en("WebGLRenderer: copyTextureToTexture function signature has changed."),n=arguments[0]||null,e=arguments[1],t=arguments[2],l=arguments[3]||0,i=null),null===l&&(0!==a?(en("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),l=a,a=0):l=0);let y=e.isCompressedTexture?e.mipmaps[l]:e.image;if(null!==i)u=i.max.x-i.min.x,c=i.max.y-i.min.y,h=i.isBox3?i.max.z-i.min.z:1,d=i.min.x,f=i.min.y,p=i.isBox3?i.min.z:0;else{let t=Math.pow(2,-a);u=Math.floor(y.width*t),c=Math.floor(y.height*t),h=e.isDataArrayTexture?y.depth:e.isData3DTexture?Math.floor(y.depth*t):1,d=0,f=0,p=0}null!==n?(m=n.x,g=n.y,v=n.z):(m=0,g=0,v=0);let S=b.convert(t.format),A=b.convert(t.type);t.isData3DTexture?(o.setTexture3D(t,0),x=eP.TEXTURE_3D):t.isDataArrayTexture||t.isCompressedArrayTexture?(o.setTexture2DArray(t,0),x=eP.TEXTURE_2D_ARRAY):(o.setTexture2D(t,0),x=eP.TEXTURE_2D),eP.pixelStorei(eP.UNPACK_FLIP_Y_WEBGL,t.flipY),eP.pixelStorei(eP.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.premultiplyAlpha),eP.pixelStorei(eP.UNPACK_ALIGNMENT,t.unpackAlignment);let M=eP.getParameter(eP.UNPACK_ROW_LENGTH),w=eP.getParameter(eP.UNPACK_IMAGE_HEIGHT),T=eP.getParameter(eP.UNPACK_SKIP_PIXELS),E=eP.getParameter(eP.UNPACK_SKIP_ROWS),_=eP.getParameter(eP.UNPACK_SKIP_IMAGES);eP.pixelStorei(eP.UNPACK_ROW_LENGTH,y.width),eP.pixelStorei(eP.UNPACK_IMAGE_HEIGHT,y.height),eP.pixelStorei(eP.UNPACK_SKIP_PIXELS,d),eP.pixelStorei(eP.UNPACK_SKIP_ROWS,f),eP.pixelStorei(eP.UNPACK_SKIP_IMAGES,p);let C=e.isDataArrayTexture||e.isData3DTexture,R=t.isDataArrayTexture||t.isData3DTexture;if(e.isDepthTexture){let i=s.get(e),n=s.get(t),o=s.get(i.__renderTarget),x=s.get(n.__renderTarget);r.bindFramebuffer(eP.READ_FRAMEBUFFER,o.__webglFramebuffer),r.bindFramebuffer(eP.DRAW_FRAMEBUFFER,x.__webglFramebuffer);for(let i=0;i<h;i++)C&&(eP.framebufferTextureLayer(eP.READ_FRAMEBUFFER,eP.COLOR_ATTACHMENT0,s.get(e).__webglTexture,a,p+i),eP.framebufferTextureLayer(eP.DRAW_FRAMEBUFFER,eP.COLOR_ATTACHMENT0,s.get(t).__webglTexture,l,v+i)),eP.blitFramebuffer(d,f,u,c,m,g,u,c,eP.DEPTH_BUFFER_BIT,eP.NEAREST);r.bindFramebuffer(eP.READ_FRAMEBUFFER,null),r.bindFramebuffer(eP.DRAW_FRAMEBUFFER,null)}else if(0!==a||e.isRenderTargetTexture||s.has(e)){let i=s.get(e),n=s.get(t);r.bindFramebuffer(eP.READ_FRAMEBUFFER,eZ),r.bindFramebuffer(eP.DRAW_FRAMEBUFFER,eJ);for(let e=0;e<h;e++)C?eP.framebufferTextureLayer(eP.READ_FRAMEBUFFER,eP.COLOR_ATTACHMENT0,i.__webglTexture,a,p+e):eP.framebufferTexture2D(eP.READ_FRAMEBUFFER,eP.COLOR_ATTACHMENT0,eP.TEXTURE_2D,i.__webglTexture,a),R?eP.framebufferTextureLayer(eP.DRAW_FRAMEBUFFER,eP.COLOR_ATTACHMENT0,n.__webglTexture,l,v+e):eP.framebufferTexture2D(eP.DRAW_FRAMEBUFFER,eP.COLOR_ATTACHMENT0,eP.TEXTURE_2D,n.__webglTexture,l),0!==a?eP.blitFramebuffer(d,f,u,c,m,g,u,c,eP.COLOR_BUFFER_BIT,eP.NEAREST):R?eP.copyTexSubImage3D(x,l,m,g,v+e,d,f,u,c):eP.copyTexSubImage2D(x,l,m,g,d,f,u,c);r.bindFramebuffer(eP.READ_FRAMEBUFFER,null),r.bindFramebuffer(eP.DRAW_FRAMEBUFFER,null)}else R?e.isDataTexture||e.isData3DTexture?eP.texSubImage3D(x,l,m,g,v,u,c,h,S,A,y.data):t.isCompressedArrayTexture?eP.compressedTexSubImage3D(x,l,m,g,v,u,c,h,S,y.data):eP.texSubImage3D(x,l,m,g,v,u,c,h,S,A,y):e.isDataTexture?eP.texSubImage2D(eP.TEXTURE_2D,l,m,g,u,c,S,A,y.data):e.isCompressedTexture?eP.compressedTexSubImage2D(eP.TEXTURE_2D,l,m,g,y.width,y.height,S,y.data):eP.texSubImage2D(eP.TEXTURE_2D,l,m,g,u,c,S,A,y);eP.pixelStorei(eP.UNPACK_ROW_LENGTH,M),eP.pixelStorei(eP.UNPACK_IMAGE_HEIGHT,w),eP.pixelStorei(eP.UNPACK_SKIP_PIXELS,T),eP.pixelStorei(eP.UNPACK_SKIP_ROWS,E),eP.pixelStorei(eP.UNPACK_SKIP_IMAGES,_),0===l&&t.generateMipmaps&&eP.generateMipmap(x),r.unbindTexture()},this.copyTextureToTexture3D=function(e,t,i=null,n=null,r=0){return!0!==e.isTexture&&(en("WebGLRenderer: copyTextureToTexture3D function signature has changed."),i=arguments[0]||null,n=arguments[1]||null,e=arguments[2],t=arguments[3],r=arguments[4]||0),en('WebGLRenderer: copyTextureToTexture3D function has been deprecated. Use "copyTextureToTexture" instead.'),this.copyTextureToTexture(e,t,i,n,r)},this.initRenderTarget=function(e){void 0===s.get(e).__webglFramebuffer&&o.setupRenderTarget(e)},this.initTexture=function(e){e.isCubeTexture?o.setTextureCube(e,0):e.isData3DTexture?o.setTexture3D(e,0):e.isDataArrayTexture||e.isCompressedArrayTexture?o.setTexture2DArray(e,0):o.setTexture2D(e,0),r.unbindTexture()},this.resetState=function(){Y=0,Q=0,q=null,r.reset(),w.reset()},"u">typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return 2e3}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;let t=this.getContext();t.drawingBufferColorspace=eu._getDrawingBufferColorSpace(e),t.unpackColorSpace=eu._getUnpackColorSpace()}}e.s(["PMREMGenerator",0,o8,"ShaderChunk",0,oz,"ShaderLib",0,oH,"UniformsLib",0,ok,"WebGLRenderer",0,uZ,"WebGLUtils",0,uk],8560);var uJ=e.i(30224);let u$=e=>{let t,i=new Set,n=(e,n)=>{let r="function"==typeof e?e(t):e;if(!Object.is(r,t)){let e=t;t=(null!=n?n:"object"!=typeof r||null===r)?r:Object.assign({},t,r),i.forEach(i=>i(t,e))}},r=()=>t,a={setState:n,getState:r,getInitialState:()=>s,subscribe:e=>(i.add(e),()=>i.delete(e))},s=t=e(n,r,a);return a},{useSyncExternalStoreWithSelector:u0}=uJ.default,u1=(e,t)=>{let i=e?u$(e):u$,n=(e,n=t)=>(function(e,t=e=>e,i){let n=u0(e.subscribe,e.getState,e.getInitialState,t,i);return E.default.useDebugValue(n),n})(i,e,n);return Object.assign(n,i),n},u2=(e,t)=>e?u1(e,t):u1,u3=[];function u4(e,t,i=(e,t)=>e===t){if(e===t)return!0;if(!e||!t)return!1;let n=e.length;if(t.length!==n)return!1;for(let r=0;r<n;r++)if(!i(e[r],t[r]))return!1;return!0}function u5(e,t=null,i=!1,n={}){for(let r of(null===t&&(t=[e]),u3))if(u4(t,r.keys,r.equal)){if(i)return;if(Object.prototype.hasOwnProperty.call(r,"error"))throw r.error;if(Object.prototype.hasOwnProperty.call(r,"response"))return n.lifespan&&n.lifespan>0&&(r.timeout&&clearTimeout(r.timeout),r.timeout=setTimeout(r.remove,n.lifespan)),r.response;if(!i)throw r.promise}let r={keys:t,equal:n.equal,remove:()=>{let e=u3.indexOf(r);-1!==e&&u3.splice(e,1)},promise:("object"==typeof e&&"function"==typeof e.then?e:e(...t)).then(e=>{r.response=e,n.lifespan&&n.lifespan>0&&(r.timeout=setTimeout(r.remove,n.lifespan))}).catch(e=>r.error=e)};if(u3.push(r),!i)throw r.promise}var u6=e.i(89499),u8=e.i(43476),u9=E;function u7(e,t,i){if(!e)return;if(!0===i(e))return e;let n=t?e.return:e.child;for(;n;){let e=u7(n,t,i);if(e)return e;n=t?null:n.sibling}}function ce(e){try{return Object.defineProperties(e,{_currentRenderer:{get:()=>null,set(){}},_currentRenderer2:{get:()=>null,set(){}}})}catch(t){return e}}"u">typeof window&&((null==(y=window.document)?void 0:y.createElement)||(null==(S=window.navigator)?void 0:S.product)==="ReactNative")?u9.useLayoutEffect:u9.useEffect;let ct=ce(u9.createContext(null));class ci extends u9.Component{render(){return u9.createElement(ct.Provider,{value:this._reactInternals},this.props.children)}}function cn(){let e=u9.useContext(ct);if(null===e)throw Error("its-fine: useFiber must be called within a <FiberProvider />!");let t=u9.useId();return u9.useMemo(()=>{for(let i of[e,null==e?void 0:e.alternate]){if(!i)continue;let e=u7(i,!1,e=>{let i=e.memoizedState;for(;i;){if(i.memoizedState===t)return!0;i=i.next}});if(e)return e}},[e,t])}let cr=Symbol.for("react.context"),ca=e=>null!==e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===cr;function cs(e){let t=e.root;for(;t.getState().previousRoot;)t=t.getState().previousRoot;return t}E.act;let co=e=>e&&e.hasOwnProperty("current"),cl=e=>null!=e&&("string"==typeof e||"number"==typeof e||e.isColor),cu="u">typeof window&&((null==(m=window.document)?void 0:m.createElement)||(null==(g=window.navigator)?void 0:g.product)==="ReactNative")?E.useLayoutEffect:E.useEffect;function cc(e){let t=E.useRef(e);return cu(()=>void(t.current=e),[e]),t}function ch(){let e,t=cn(),i=(e=function(){let e=cn(),[t]=u9.useState(()=>new Map);t.clear();let i=e;for(;i;){let e=i.type;ca(e)&&e!==ct&&!t.has(e)&&t.set(e,u9.use(ce(e))),i=i.return}return t}(),u9.useMemo(()=>Array.from(e.keys()).reduce((t,i)=>n=>u9.createElement(t,null,u9.createElement(i.Provider,{...n,value:e.get(i)})),e=>u9.createElement(ci,{...e})),[e]));return E.useMemo(()=>({children:e})=>{let n=u7(t,!0,e=>e.type===E.StrictMode)?E.StrictMode:E.Fragment;return(0,u8.jsx)(n,{children:(0,u8.jsx)(i,{children:e})})},[t,i])}function cd({set:e}){return cu(()=>(e(new Promise(()=>null)),()=>e(!1)),[e]),null}let cf=((v=class extends E.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}).getDerivedStateFromError=()=>({error:!0}),v);function cp(e){var t;let i="u">typeof window?null!=(t=window.devicePixelRatio)?t:2:1;return Array.isArray(e)?Math.min(Math.max(e[0],i),e[1]):e}function cm(e){var t;return null==(t=e.__r3f)?void 0:t.root.getState()}let cg={obj:e=>e===Object(e)&&!cg.arr(e)&&"function"!=typeof e,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,boo:e=>"boolean"==typeof e,und:e=>void 0===e,nul:e=>null===e,arr:e=>Array.isArray(e),equ(e,t,{arrays:i="shallow",objects:n="reference",strict:r=!0}={}){let a;if(typeof e!=typeof t||!!e!=!!t)return!1;if(cg.str(e)||cg.num(e)||cg.boo(e))return e===t;let s=cg.obj(e);if(s&&"reference"===n)return e===t;let o=cg.arr(e);if(o&&"reference"===i)return e===t;if((o||s)&&e===t)return!0;for(a in e)if(!(a in t))return!1;if(s&&"shallow"===i&&"shallow"===n){for(a in r?t:e)if(!cg.equ(e[a],t[a],{strict:r,objects:"reference"}))return!1}else for(a in r?t:e)if(e[a]!==t[a])return!1;if(cg.und(a)){if(o&&0===e.length&&0===t.length||s&&0===Object.keys(e).length&&0===Object.keys(t).length)return!0;if(e!==t)return!1}return!0}},cv=["children","key","ref"];function cx(e,t,i,n){let r=null==e?void 0:e.__r3f;return!r&&(r={root:t,type:i,parent:null,children:[],props:function(e){let t={};for(let i in e)cv.includes(i)||(t[i]=e[i]);return t}(n),object:e,eventCount:0,handlers:{},isHidden:!1},e&&(e.__r3f=r)),r}function cy(e,t){if(!t.includes("-")||t in e)return{root:e,key:t,target:e[t]};let i=e,n=t.split("-");for(let r of n){if("object"!=typeof i||null===i){if(void 0!==i)return{root:i,key:n.slice(n.indexOf(r)).join("-"),target:void 0};return{root:e,key:t,target:void 0}}t=r,e=i,i=i[t]}return{root:e,key:t,target:i}}let cS=/-\d+$/;function cA(e,t){if(cg.str(t.props.attach)){if(cS.test(t.props.attach)){let i=t.props.attach.replace(cS,""),{root:n,key:r}=cy(e.object,i);Array.isArray(n[r])||(n[r]=[])}let{root:i,key:n}=cy(e.object,t.props.attach);t.previousAttach=i[n],i[n]=t.object}else cg.fun(t.props.attach)&&(t.previousAttach=t.props.attach(e.object,t.object))}function cM(e,t){if(cg.str(t.props.attach)){let{root:i,key:n}=cy(e.object,t.props.attach),r=t.previousAttach;void 0===r?delete i[n]:i[n]=r}else null==t.previousAttach||t.previousAttach(e.object,t.object);delete t.previousAttach}let cb=[...cv,"args","dispose","attach","object","onUpdate","dispose"],cw=new Map,cT=["map","emissiveMap","sheenColorMap","specularColorMap","envMap"],cE=/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/;function c_(e,t){var i,n;let r=e.__r3f,a=r&&cs(r).getState(),s=null==r?void 0:r.eventCount;for(let i in t){let s=t[i];if(cb.includes(i))continue;if(r&&cE.test(i)){"function"==typeof s?r.handlers[i]=s:delete r.handlers[i],r.eventCount=Object.keys(r.handlers).length;continue}if(void 0===s)continue;let{root:o,key:l,target:u}=cy(e,i);if(void 0===u&&("object"!=typeof o||null===o))throw Error(`R3F: Cannot set "${i}". Ensure it is an object before setting "${l}".`);if(u instanceof tn&&s instanceof tn)u.mask=s.mask;else if(u instanceof tO&&cl(s))u.set(s);else if(null!==u&&"object"==typeof u&&"function"==typeof u.set&&"function"==typeof u.copy&&null!=s&&s.constructor&&u.constructor===s.constructor)u.copy(s);else if(null!==u&&"object"==typeof u&&"function"==typeof u.set&&Array.isArray(s))"function"==typeof u.fromArray?u.fromArray(s):u.set(...s);else if(null!==u&&"object"==typeof u&&"function"==typeof u.set&&"number"==typeof s)"function"==typeof u.setScalar?u.setScalar(s):u.set(s);else if(o instanceof ib&&"uniforms"===l&&cg.obj(s)){cg.obj(o.uniforms)||(o.uniforms={});let e=o.uniforms;for(let t in s){let i=s[t],n=e[t];n?Object.assign(n,i):e[t]={...i}}}else o[l]=s,a&&!a.linear&&cT.includes(l)&&null!=(n=o[l])&&n.isTexture&&1023===o[l].format&&1009===o[l].type&&(o[l].colorSpace=D)}if(null!=r&&r.parent&&null!=a&&a.internal&&null!=(i=r.object)&&i.isObject3D&&s!==r.eventCount){let e=r.object,t=a.internal.interaction.indexOf(e);t>-1&&a.internal.interaction.splice(t,1),r.eventCount&&null!==e.raycast&&a.internal.interaction.push(e)}return r&&void 0===r.props.attach&&(r.object.isBufferGeometry?r.props.attach="geometry":r.object.isMaterial&&(r.props.attach="material")),r&&cC(r),e}function cC(e){var t;if(!e.parent)return;null==e.props.onUpdate||e.props.onUpdate(e.object);let i=null==(t=e.root)||null==t.getState?void 0:t.getState();i&&0===i.internal.frames&&i.invalidate()}function cR(e,t){!e.manual&&(e&&e.isOrthographicCamera?(e.left=-(t.width/2),e.right=t.width/2,e.top=t.height/2,e.bottom=-(t.height/2)):e.aspect=t.width/t.height,e.updateProjectionMatrix())}let cP=e=>null==e?void 0:e.isObject3D;function cD(e){return(e.eventObject||e.object).uuid+"/"+e.index+e.instanceId}function cI(e,t,i,n){let r=i.get(t);r&&(i.delete(t),0===i.size&&(e.delete(n),r.target.releasePointerCapture(n)))}let cL=e=>!!(null!=e&&e.render),cB=E.createContext(null);function cU(){let e=E.useContext(cB);if(!e)throw Error("R3F: Hooks can only be used within the Canvas component!");return e}function cN(e=e=>e,t){return cU()(e,t)}function cF(e,t=0){let i=cU(),n=i.getState().internal.subscribe,r=cc(e);return cu(()=>n(r,t,i),[t,n,i]),null}let cO=new WeakMap;function cz(e,t){return function(i,...n){var r;let a;return"function"==typeof i&&(null==i||null==(r=i.prototype)?void 0:r.constructor)===i?(a=cO.get(i))||(a=new i,cO.set(i,a)):a=i,e&&e(a),Promise.all(n.map(e=>new Promise((i,n)=>a.load(e,e=>{var t;let n;cP(null==e?void 0:e.scene)&&Object.assign(e,(t=e.scene,n={nodes:{},materials:{},meshes:{}},t&&t.traverse(e=>{e.name&&(n.nodes[e.name]=e),e.material&&!n.materials[e.material.name]&&(n.materials[e.material.name]=e.material),e.isMesh&&!n.meshes[e.name]&&(n.meshes[e.name]=e)}),n)),i(e)},t,t=>n(Error(`Could not load ${e}: ${null==t?void 0:t.message}`))))))}}function ck(e,t,i,n){let r=Array.isArray(t)?t:[t],a=u5(cz(i,n),[e,...r],!1,{equal:cg.equ});return Array.isArray(t)?a:a[0]}ck.preload=function(e,t,i){let n,r=Array.isArray(t)?t:[t];u5(cz(i),[e,...r],!0,n)},ck.clear=function(e,t){var i=[e,...Array.isArray(t)?t:[t]];if(void 0===i||0===i.length)u3.splice(0,u3.length);else{let e=u3.find(e=>u4(i,e.keys,e.equal));e&&e.remove()}};var cH={exports:{}},cG={exports:{}};cG.exports;let cV=(w||(w=1,b||(b=1,cG.exports=function(e){function t(e,t,i,n){return new nK(e,t,i,n)}function i(){}function n(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do(4098&(t=e).flags)!=0&&(i=t.return),e=t.return;while(e)}return 3===t.tag?i:null}function a(e){if(r(e)!==e)throw Error(n(188))}function s(e){var t=e.alternate;if(!t){if(null===(t=r(e)))throw Error(n(188));return t!==e?null:e}for(var i=e,s=t;;){var o=i.return;if(null===o)break;var l=o.alternate;if(null===l){if(null!==(s=o.return)){i=s;continue}break}if(o.child===l.child){for(l=o.child;l;){if(l===i)return a(o),e;if(l===s)return a(o),t;l=l.sibling}throw Error(n(188))}if(i.return!==s.return)i=o,s=l;else{for(var u=!1,c=o.child;c;){if(c===i){u=!0,i=o,s=l;break}if(c===s){u=!0,s=o,i=l;break}c=c.sibling}if(!u){for(c=l.child;c;){if(c===i){u=!0,i=l,s=o;break}if(c===s){u=!0,s=l,i=o;break}c=c.sibling}if(!u)throw Error(n(189))}}if(i.alternate!==s)throw Error(n(190))}if(3!==i.tag)throw Error(n(188));return i.stateNode.current===i?e:t}function o(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=rS&&e[rS]||e["@@iterator"])?e:null}function l(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===rA?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case rl:return"Fragment";case rc:return"Profiler";case ru:return"StrictMode";case rp:return"Suspense";case rm:return"SuspenseList";case rx:return"Activity"}if("object"==typeof e)switch(e.$$typeof){case ro:return"Portal";case rd:return e.displayName||"Context";case rh:return(e._context.displayName||"Context")+".Consumer";case rf:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case rg:return null!==(t=e.displayName||null)?t:l(e.type)||"Memo";case rv:t=e._payload,e=e._init;try{return l(e(t))}catch{}}return null}function u(e){return{current:e}}function c(e){0>sw||(e.current=sb[sw],sb[sw]=null,sw--)}function h(e,t){sb[++sw]=e.current,e.current=t}function d(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 0x1000000:case 0x2000000:return 0x3c00000&e;case 0x4000000:return 0x4000000;case 0x8000000:return 0x8000000;case 0x10000000:return 0x10000000;case 0x20000000:return 0x20000000;case 0x40000000:return 0;default:return e}}function f(e,t,i){var n=e.pendingLanes;if(0===n)return 0;var r=0,a=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var o=0x7ffffff&n;return 0!==o?0!=(n=o&~a)?r=d(n):0!=(s&=o)?r=d(s):i||0!=(i=o&~e)&&(r=d(i)):0!=(o=n&~a)?r=d(o):0!==s?r=d(s):i||0!=(i=n&~e)&&(r=d(i)),0===r?0:0!==t&&t!==r&&(t&a)==0&&((a=r&-r)>=(i=t&-t)||32===a&&(4194048&i)!=0)?t:r}function p(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)==0}function m(){var e=sD;return(0x3c00000&(sD<<=1))==0&&(sD=4194304),e}function g(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function v(e,t){e.pendingLanes|=t,0x10000000!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function x(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-sE(t);e.entangledLanes|=t,e.entanglements[n]=0x40000000|e.entanglements[n]|261930&i}function y(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var n=31-sE(i),r=1<<n;r&t|e[n]&t&&(e[n]|=t),i&=~r}}function S(e,t){var i=t&-t;return((i=(42&i)!=0?1:A(i))&(e.suspendedLanes|t))!=0?0:i}function A(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 0x1000000:case 0x2000000:e=128;break;case 0x10000000:e=0x8000000;break;default:e=0}return e}function M(e){return 2<(e&=-e)?8<e?(0x7ffffff&e)!=0?32:0x10000000:8:2}function b(e){if("function"==typeof sH&&sG(e),sW&&"function"==typeof sW.setStrictMode)try{sW.setStrictMode(sV,e)}catch{}}function w(e){if(void 0===a7)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);a7=t&&t[1]||"",se=-1<e.stack.indexOf(`
|
|
at`)?" (<anonymous>)":-1<e.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
`+a7+e+se}function _(e,t){if(!e||sQ)return"";sQ=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(i,[])}catch(e){var n=e}Reflect.construct(e,[],i)}else{try{i.call()}catch(e){n=e}e.call(i.prototype)}}else{try{throw Error()}catch(e){n=e}(i=e())&&"function"==typeof i.catch&&i.catch(function(){})}}catch(e){if(e&&n&&"string"==typeof e.stack)return[e.stack,n.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=n.DetermineComponentFrameRoot(),s=a[0],o=a[1];if(s&&o){var l=s.split(`
|
|
`),u=o.split(`
|
|
`);for(r=n=0;n<l.length&&!l[n].includes("DetermineComponentFrameRoot");)n++;for(;r<u.length&&!u[r].includes("DetermineComponentFrameRoot");)r++;if(n===l.length||r===u.length)for(n=l.length-1,r=u.length-1;1<=n&&0<=r&&l[n]!==u[r];)r--;for(;1<=n&&0<=r;n--,r--)if(l[n]!==u[r]){if(1!==n||1!==r)do if(n--,r--,0>r||l[n]!==u[r]){var c=`
|
|
`+l[n].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=n&&0<=r)break}}}finally{sQ=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?w(i):""}function C(e){try{var t="",i=null;do t+=function(e,t){switch(e.tag){case 26:case 27:case 5:return w(e.type);case 16:return w("Lazy");case 13:return e.child!==t&&null!==t?w("Suspense Fallback"):w("Suspense");case 19:return w("SuspenseList");case 0:case 15:return _(e.type,!1);case 11:return _(e.type.render,!1);case 1:return _(e.type,!0);case 31:return w("Activity");default:return""}}(e,i),i=e,e=e.return;while(e)return t}catch(e){return`
|
|
Error generating stack: `+e.message+`
|
|
`+e.stack}}function R(e,t){if("object"==typeof e&&null!==e){var i=sq.get(e);return void 0!==i?i:(t={value:e,source:t,stack:C(t)},sq.set(e,t),t)}return{value:e,source:t,stack:C(t)}}function P(e,t){sK[sZ++]=s$,sK[sZ++]=sJ,sJ=e,s$=t}function D(e,t,i){s0[s1++]=s3,s0[s1++]=s4,s0[s1++]=s2,s2=e;var n=s3;e=s4;var r=32-sE(n)-1;n&=~(1<<r),i+=1;var a=32-sE(t)+r;if(30<a){var s=r-r%5;a=(n&(1<<s)-1).toString(32),n>>=s,r-=s,s3=1<<32-sE(t)+r|i<<r|n,s4=a+e}else s3=1<<a|i<<r|n,s4=e}function I(e){null!==e.return&&(P(e,1),D(e,1,0))}function L(e){for(;e===sJ;)sJ=sK[--sZ],sK[sZ]=null,s$=sK[--sZ],sK[sZ]=null;for(;e===s2;)s2=s0[--s1],s0[s1]=null,s4=s0[--s1],s0[s1]=null,s3=s0[--s1],s0[s1]=null}function B(e,t){s0[s1++]=s3,s0[s1++]=s4,s0[s1++]=s2,s3=t.id,s4=t.overflow,s2=e}function U(e,t){h(s8,t),h(s6,e),h(s5,null),e=rC(t),c(s5),h(s5,e)}function N(){c(s5),c(s6),c(s8)}function F(e){null!==e.memoizedState&&h(s9,e);var t=s5.current,i=rR(t,e.type);t!==i&&(h(s6,e),h(s5,i))}function O(e){s6.current===e&&(c(s5),c(s6)),s9.current===e&&(c(s9),rk?r5._currentValue=r4:r5._currentValue2=r4)}function z(e){var t=Error(n(418,1<arguments.length&&void 0!==arguments[1]&&arguments[1]?"text":"HTML",""));throw j(R(t,e)),or}function k(e,t){if(!rV)throw Error(n(175));aX(e.stateNode,e.type,e.memoizedProps,t,e)||z(e,!0)}function H(e){for(s7=e.return;s7;)switch(s7.tag){case 5:case 31:case 13:on=!1;return;case 27:case 3:on=!0;return;default:s7=s7.return}}function G(e){if(!rV||e!==s7)return!1;if(!ot)return H(e),ot=!0,!1;var t=e.tag;if(sv?3!==t&&27!==t&&(5!==t||a9(e.type)&&!rU(e.type,e.memoizedProps))&&oe&&z(e):3!==t&&(5!==t||a9(e.type)&&!rU(e.type,e.memoizedProps))&&oe&&z(e),H(e),13===t){if(!rV)throw Error(n(316));if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(n(317));oe=aZ(e)}else if(31===t){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(n(317));oe=aK(e)}else oe=sv&&27===t?aN(e.type,oe):s7?aU(e.stateNode):null;return!0}function V(){rV&&(oe=s7=null,ot=!1)}function W(){var e=oi;return null!==e&&(null===lI?lI=e:lI.push.apply(lI,e),oi=null),e}function j(e){null===oi?oi=[e]:oi.push(e)}function X(e,t,i){rk?(h(oa,t._currentValue),t._currentValue=i):(h(oa,t._currentValue2),t._currentValue2=i)}function Y(e){var t=oa.current;rk?e._currentValue=t:e._currentValue2=t,c(oa)}function Q(e,t,i){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==n&&(n.childLanes|=t)):null!==n&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===i)break;e=e.return}}function q(e,t,i,r){var a=e.child;for(null!==a&&(a.return=e);null!==a;){var s=a.dependencies;if(null!==s){var o=a.child;s=s.firstContext;o:for(;null!==s;){var l=s;s=a;for(var u=0;u<t.length;u++)if(l.context===t[u]){s.lanes|=i,null!==(l=s.alternate)&&(l.lanes|=i),Q(s.return,i,e),r||(o=null);break o}s=l.next}}else if(18===a.tag){if(null===(o=a.return))throw Error(n(341));o.lanes|=i,null!==(s=o.alternate)&&(s.lanes|=i),Q(o,i,e),o=null}else o=a.child;if(null!==o)o.return=a;else for(o=a;null!==o;){if(o===e){o=null;break}if(null!==(a=o.sibling)){a.return=o.return,o=a;break}o=o.return}a=o}}function K(e,t,i,r){e=null;for(var a=t,s=!1;null!==a;){if(!s){if((524288&a.flags)!=0)s=!0;else if((262144&a.flags)!=0)break}if(10===a.tag){var o=a.alternate;if(null===o)throw Error(n(387));if(null!==(o=o.memoizedProps)){var l=a.type;sj(a.pendingProps.value,o.value)||(null!==e?e.push(l):e=[l])}}else if(a===s9.current){if(null===(o=a.alternate))throw Error(n(387));o.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(null!==e?e.push(r5):e=[r5])}a=a.return}null!==e&&q(t,e,i,r),t.flags|=262144}function Z(e){for(e=e.firstContext;null!==e;){var t=e.context;if(!sj(rk?t._currentValue:t._currentValue2,e.memoizedValue))return!0;e=e.next}return!1}function J(e){os=e,oo=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function $(e){return et(os,e)}function ee(e,t){return null===os&&J(e),et(e,t)}function et(e,t){var i=rk?t._currentValue:t._currentValue2;if(t={context:t,memoizedValue:i,next:null},null===oo){if(null===e)throw Error(n(308));oo=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else oo=oo.next=t;return i}function ei(){return{controller:new ol,data:new Map,refCount:0}}function en(e){e.refCount--,0===e.refCount&&ou(oc,function(){e.controller.abort()})}function er(){}function ea(e){e!==of&&null===e.next&&(null===of?od=of=e:of=of.next=e),om=!0,op||(op=!0,r8?r9(function(){(6&lm)!=0?sI(sF,eo):el()}):sI(sF,eo))}function es(e,t){if(!og&&om){og=!0;do for(var i=!1,n=od;null!==n;){if(!t)if(0!==e){var r=n.pendingLanes;if(0===r)var a=0;else{var s=n.suspendedLanes,o=n.pingedLanes;a=0xc000095&(a=(1<<31-sE(42|e)+1)-1&(r&~(s&~o)))?0xc000095&a|1:a?2|a:0}0!==a&&(i=!0,eh(n,a))}else a=lx,(3&(a=f(n,n===lg?a:0,null!==n.cancelPendingCommit||n.timeoutHandle!==rz)))==0||p(n,a)||(i=!0,eh(n,a));n=n.next}while(i)og=!1}}function eo(){el()}function el(){om=op=!1;var e=0;0!==ov&&rq()&&(e=ov);for(var t=sN(),i=null,n=od;null!==n;){var r=n.next,a=eu(n,t);0===a?(n.next=null,null===i?od=r:i.next=r,null===r&&(of=i)):(i=n,(0!==e||(3&a)!=0)&&(om=!0)),n=r}0!==lz&&5!==lz||es(e,!1),0!==ov&&(ov=0)}function eu(e,t){for(var i=e.suspendedLanes,n=e.pingedLanes,r=e.expirationTimes,a=-0x3c00001&e.pendingLanes;0<a;){var s=31-sE(a),o=1<<s,l=r[s];-1===l?((o&i)==0||(o&n)!=0)&&(r[s]=function(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return -1}}(o,t)):l<=t&&(e.expiredLanes|=o),a&=~o}if(t=lg,i=lx,i=f(e,e===t?i:0,null!==e.cancelPendingCommit||e.timeoutHandle!==rz),n=e.callbackNode,0===i||e===t&&(2===ly||9===ly)||null!==e.cancelPendingCommit)return null!==n&&null!==n&&sL(n),e.callbackNode=null,e.callbackPriority=0;if((3&i)==0||p(e,i)){if((t=i&-i)===e.callbackPriority)return t;switch(null!==n&&sL(n),M(i)){case 2:case 8:i=sO;break;case 32:default:i=sz;break;case 0x10000000:i=sk}return i=sI(i,n=ec.bind(null,e)),e.callbackPriority=t,e.callbackNode=i,t}return null!==n&&null!==n&&sL(n),e.callbackPriority=2,e.callbackNode=null,2}function ec(e,t){if(0!==lz&&5!==lz)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(nH()&&e.callbackNode!==i)return null;var n=lx;return 0===(n=f(e,e===lg?n:0,null!==e.cancelPendingCommit||e.timeoutHandle!==rz))?null:(ny(e,n,t),eu(e,sN()),null!=e.callbackNode&&e.callbackNode===i?ec.bind(null,e):null)}function eh(e,t){if(nH())return null;ny(e,t,!0)}function ed(){if(0===ov){var e=oS;0===e&&(e=sR,(261888&(sR<<=1))==0&&(sR=256)),ov=e}return ov}function ef(){if(0==--oy&&null!==ox){null!==oA&&(oA.status="fulfilled");var e=ox;ox=null,oS=0,oA=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ep(){var e=ob.current;return null!==e?e:lg.pooledCache}function em(e,t){null===t?h(ob,ob.current):h(ob,t.pool)}function eg(){var e=ep();return null===e?null:{parent:rk?oh._currentValue:oh._currentValue2,pool:e}}function ev(e,t){if(sj(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var i=Object.keys(e),n=Object.keys(t);if(i.length!==n.length)return!1;for(n=0;n<i.length;n++){var r=i[n];if(!sY.call(t,r)||!sj(e[r],t[r]))return!1}return!0}function ex(e){return"fulfilled"===(e=e.status)||"rejected"===e}function ey(e,t,i){switch(void 0===(i=e[i])?e.push(t):i!==t&&(t.then(er,er),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw eM(e=t.reason),e;default:if("string"==typeof t.status)t.then(er,er);else{if(null!==(e=lg)&&100<e.shellSuspendCounter)throw Error(n(482));(e=t).status="pending",e.then(function(e){if("pending"===t.status){var i=t;i.status="fulfilled",i.value=e}},function(e){if("pending"===t.status){var i=t;i.status="rejected",i.reason=e}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw eM(e=t.reason),e}throw oC=t,ow}}function eS(e){try{return(0,e._init)(e._payload)}catch(e){throw null!==e&&"object"==typeof e&&"function"==typeof e.then?(oC=e,ow):e}}function eA(){if(null===oC)throw Error(n(459));var e=oC;return oC=null,e}function eM(e){if(e===ow||e===oE)throw Error(n(483))}function eb(e){var t=oP;return oP+=1,null===oR&&(oR=[]),ey(oR,e,t)}function ew(e,t){e.ref=void 0!==(t=t.props.ref)?t:null}function eT(e,t){throw t.$$typeof===ra?Error(n(525)):Error(n(31,"[object Object]"===(e=Object.prototype.toString.call(t))?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function eE(e){function i(t,i){if(e){var n=t.deletions;null===n?(t.deletions=[i],t.flags|=16):n.push(i)}}function r(t,n){if(!e)return null;for(;null!==n;)i(t,n),n=n.sibling;return null}function a(e){for(var t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function s(e,t){return(e=nJ(e,t)).index=0,e.sibling=null,e}function l(t,i,n){return t.index=n,e?null!==(n=t.alternate)?(n=n.index)<i?(t.flags|=0x4000002,i):n:(t.flags|=0x4000002,i):(t.flags|=1048576,i)}function u(t){return e&&null===t.alternate&&(t.flags|=0x4000002),t}function c(e,t,i,n){return null===t||6!==t.tag?(t=n2(i,e.mode,n)).return=e:(t=s(t,i)).return=e,t}function h(e,t,i,n){var r=i.type;return r===rl?f(e,t,i.props.children,n,i.key):(null!==t&&(t.elementType===r||"object"==typeof r&&null!==r&&r.$$typeof===rv&&eS(r)===t.type)?ew(t=s(t,i.props),i):ew(t=n0(i.type,i.key,i.props,null,e.mode,n),i),t.return=e,t)}function d(e,t,i,n){return null===t||4!==t.tag||t.stateNode.containerInfo!==i.containerInfo||t.stateNode.implementation!==i.implementation?(t=n4(i,e.mode,n)).return=e:(t=s(t,i.children||[])).return=e,t}function f(e,t,i,n,r){return null===t||7!==t.tag?(t=n1(i,e.mode,n,r)).return=e:(t=s(t,i)).return=e,t}function p(e,t,i){if("string"==typeof t&&""!==t||"number"==typeof t||"bigint"==typeof t)return(t=n2(""+t,e.mode,i)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case rs:return ew(i=n0(t.type,t.key,t.props,null,e.mode,i),t),i.return=e,i;case ro:return(t=n4(t,e.mode,i)).return=e,t;case rv:return p(e,t=eS(t),i)}if(rM(t)||o(t))return(t=n1(t,e.mode,i,null)).return=e,t;if("function"==typeof t.then)return p(e,eb(t),i);if(t.$$typeof===rd)return p(e,ee(e,t),i);eT(e,t)}return null}function m(e,t,i,n){var r=null!==t?t.key:null;if("string"==typeof i&&""!==i||"number"==typeof i||"bigint"==typeof i)return null!==r?null:c(e,t,""+i,n);if("object"==typeof i&&null!==i){switch(i.$$typeof){case rs:return i.key===r?h(e,t,i,n):null;case ro:return i.key===r?d(e,t,i,n):null;case rv:return m(e,t,i=eS(i),n)}if(rM(i)||o(i))return null!==r?null:f(e,t,i,n,null);if("function"==typeof i.then)return m(e,t,eb(i),n);if(i.$$typeof===rd)return m(e,t,ee(e,i),n);eT(e,i)}return null}function g(e,t,i,n,r){if("string"==typeof n&&""!==n||"number"==typeof n||"bigint"==typeof n)return c(t,e=e.get(i)||null,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case rs:return h(t,e=e.get(null===n.key?i:n.key)||null,n,r);case ro:return d(t,e=e.get(null===n.key?i:n.key)||null,n,r);case rv:return g(e,t,i,n=eS(n),r)}if(rM(n)||o(n))return f(t,e=e.get(i)||null,n,r,null);if("function"==typeof n.then)return g(e,t,i,eb(n),r);if(n.$$typeof===rd)return g(e,t,i,ee(t,n),r);eT(t,n)}return null}return function(c,h,d,f){try{oP=0;var v=function t(c,h,d,f){if("object"==typeof d&&null!==d&&d.type===rl&&null===d.key&&(d=d.props.children),"object"==typeof d&&null!==d){switch(d.$$typeof){case rs:o:{for(var v=d.key;null!==h;){if(h.key===v){if((v=d.type)===rl){if(7===h.tag){r(c,h.sibling),(f=s(h,d.props.children)).return=c,c=f;break o}}else if(h.elementType===v||"object"==typeof v&&null!==v&&v.$$typeof===rv&&eS(v)===h.type){r(c,h.sibling),ew(f=s(h,d.props),d),f.return=c,c=f;break o}r(c,h);break}i(c,h),h=h.sibling}d.type===rl?(f=n1(d.props.children,c.mode,f,d.key)).return=c:(ew(f=n0(d.type,d.key,d.props,null,c.mode,f),d),f.return=c),c=f}return u(c);case ro:o:{for(v=d.key;null!==h;){if(h.key===v)if(4===h.tag&&h.stateNode.containerInfo===d.containerInfo&&h.stateNode.implementation===d.implementation){r(c,h.sibling),(f=s(h,d.children||[])).return=c,c=f;break o}else{r(c,h);break}i(c,h),h=h.sibling}(f=n4(d,c.mode,f)).return=c,c=f}return u(c);case rv:return t(c,h,d=eS(d),f)}if(rM(d))return function(t,n,s,o){for(var u=null,c=null,h=n,d=n=0,f=null;null!==h&&d<s.length;d++){h.index>d?(f=h,h=null):f=h.sibling;var v=m(t,h,s[d],o);if(null===v){null===h&&(h=f);break}e&&h&&null===v.alternate&&i(t,h),n=l(v,n,d),null===c?u=v:c.sibling=v,c=v,h=f}if(d===s.length)return r(t,h),ot&&P(t,d),u;if(null===h){for(;d<s.length;d++)null!==(h=p(t,s[d],o))&&(n=l(h,n,d),null===c?u=h:c.sibling=h,c=h);return ot&&P(t,d),u}for(h=a(h);d<s.length;d++)null!==(f=g(h,t,d,s[d],o))&&(e&&null!==f.alternate&&h.delete(null===f.key?d:f.key),n=l(f,n,d),null===c?u=f:c.sibling=f,c=f);return e&&h.forEach(function(e){return i(t,e)}),ot&&P(t,d),u}(c,h,d,f);if(o(d)){if("function"!=typeof(v=o(d)))throw Error(n(150));return function(t,s,o,u){if(null==o)throw Error(n(151));for(var c=null,h=null,d=s,f=s=0,v=null,x=o.next();null!==d&&!x.done;f++,x=o.next()){d.index>f?(v=d,d=null):v=d.sibling;var y=m(t,d,x.value,u);if(null===y){null===d&&(d=v);break}e&&d&&null===y.alternate&&i(t,d),s=l(y,s,f),null===h?c=y:h.sibling=y,h=y,d=v}if(x.done)return r(t,d),ot&&P(t,f),c;if(null===d){for(;!x.done;f++,x=o.next())null!==(x=p(t,x.value,u))&&(s=l(x,s,f),null===h?c=x:h.sibling=x,h=x);return ot&&P(t,f),c}for(d=a(d);!x.done;f++,x=o.next())null!==(x=g(d,t,f,x.value,u))&&(e&&null!==x.alternate&&d.delete(null===x.key?f:x.key),s=l(x,s,f),null===h?c=x:h.sibling=x,h=x);return e&&d.forEach(function(e){return i(t,e)}),ot&&P(t,f),c}(c,h,d=v.call(d),f)}if("function"==typeof d.then)return t(c,h,eb(d),f);if(d.$$typeof===rd)return t(c,h,ee(c,d),f);eT(c,d)}return"string"==typeof d&&""!==d||"number"==typeof d||"bigint"==typeof d?(d=""+d,null!==h&&6===h.tag?(r(c,h.sibling),(f=s(h,d)).return=c):(r(c,h),(f=n2(d,c.mode,f)).return=c),u(c=f)):r(c,h)}(c,h,d,f);return oR=null,v}catch(e){if(e===ow||e===oE)throw e;var x=t(29,e,null,c.mode);return x.lanes=f,x.return=c,x}finally{}}}function e_(){for(var e=oB,t=oU=oB=0;t<e;){var i=oL[t];oL[t++]=null;var n=oL[t];oL[t++]=null;var r=oL[t];oL[t++]=null;var a=oL[t];if(oL[t++]=null,null!==n&&null!==r){var s=n.pending;null===s?r.next=r:(r.next=s.next,s.next=r),n.pending=r}0!==a&&eD(i,r,a)}}function eC(e,t,i,n){oL[oB++]=e,oL[oB++]=t,oL[oB++]=i,oL[oB++]=n,oU|=n,e.lanes|=n,null!==(e=e.alternate)&&(e.lanes|=n)}function eR(e,t,i,n){return eC(e,t,i,n),eI(e)}function eP(e,t){return eC(e,null,null,t),eI(e)}function eD(e,t,i){e.lanes|=i;var n=e.alternate;null!==n&&(n.lanes|=i);for(var r=!1,a=e.return;null!==a;)a.childLanes|=i,null!==(n=a.alternate)&&(n.childLanes|=i),22===a.tag&&(null===(e=a.stateNode)||1&e._visibility||(r=!0)),e=a,a=a.return;return 3===e.tag?(a=e.stateNode,r&&null!==t&&(r=31-sE(i),null===(n=(e=a.hiddenUpdates)[r])?e[r]=[t]:n.push(t),t.lane=0x20000000|i),a):null}function eI(e){if(50<lX)throw lX=0,lY=null,Error(n(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}function eL(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function eB(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function eU(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function eN(e,t,i){var n=e.updateQueue;if(null===n)return null;if(n=n.shared,(2&lm)!=0){var r=n.pending;return null===r?t.next=t:(t.next=r.next,r.next=t),n.pending=t,t=eI(e),eD(e,null,i),t}return eC(e,n,t,i),eI(e)}function eF(e,t,i){if(null!==(t=t.updateQueue)&&(t=t.shared,(4194048&i)!=0)){var n=t.lanes;n&=e.pendingLanes,i|=n,t.lanes=i,y(e,i)}}function eO(e,t){var i=e.updateQueue,n=e.alternate;if(null!==n&&i===(n=n.updateQueue)){var r=null,a=null;if(null!==(i=i.firstBaseUpdate)){do{var s={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};null===a?r=a=s:a=a.next=s,i=i.next}while(null!==i)null===a?r=a=t:a=a.next=t}else r=a=t;i={baseState:n.baseState,firstBaseUpdate:r,lastBaseUpdate:a,shared:n.shared,callbacks:n.callbacks},e.updateQueue=i;return}null===(e=i.lastBaseUpdate)?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}function ez(){if(oF){var e=oA;if(null!==e)throw e}}function ek(e,t,i,n){oF=!1;var r=e.updateQueue;oN=!1;var a=r.firstBaseUpdate,s=r.lastBaseUpdate,o=r.shared.pending;if(null!==o){r.shared.pending=null;var l=o,u=l.next;l.next=null,null===s?a=u:s.next=u,s=l;var c=e.alternate;null!==c&&(o=(c=c.updateQueue).lastBaseUpdate)!==s&&(null===o?c.firstBaseUpdate=u:o.next=u,c.lastBaseUpdate=l)}if(null!==a){var h=r.baseState;for(s=0,c=u=l=null,o=a;;){var d=-0x20000001&o.lane,f=d!==o.lane;if(f?(lx&d)===d:(n&d)===d){0!==d&&d===oS&&(oF=!0),null!==c&&(c=c.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});o:{var p=e,m=o;switch(d=t,m.tag){case 1:if("function"==typeof(p=m.payload)){h=p.call(i,h,d);break o}h=p;break o;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(d="function"==typeof(p=m.payload)?p.call(i,h,d):p))break o;h=rr({},h,d);break o;case 2:oN=!0}}null!==(d=o.callback)&&(e.flags|=64,f&&(e.flags|=8192),null===(f=r.callbacks)?r.callbacks=[d]:f.push(d))}else f={lane:d,tag:o.tag,payload:o.payload,callback:o.callback,next:null},null===c?(u=c=f,l=h):c=c.next=f,s|=d;if(null===(o=o.next)){if(null===(o=r.shared.pending))break;o=(f=o).next,f.next=null,r.lastBaseUpdate=f,r.shared.pending=null}}null===c&&(l=h),r.baseState=l,r.firstBaseUpdate=u,r.lastBaseUpdate=c,null===a&&(r.shared.lanes=0),lE|=s,e.lanes=s,e.memoizedState=h}}function eH(e,t){if("function"!=typeof e)throw Error(n(191,e));e.call(t)}function eG(e,t){var i=e.callbacks;if(null!==i)for(e.callbacks=null,e=0;e<i.length;e++)eH(i[e],t)}function eV(e,t){h(oz,e=lw),h(oO,t),lw=e|t.baseLanes}function eW(){h(oz,lw),h(oO,oO.current)}function ej(){lw=oz.current,c(oO),c(oz)}function eX(e){var t=e.alternate;h(oG,1&oG.current),h(ok,e),null===oH&&(null===t||null!==oO.current||null!==t.memoizedState)&&(oH=e)}function eY(e){h(oG,oG.current),h(ok,e),null===oH&&(oH=e)}function eQ(e){22===e.tag?(h(oG,oG.current),h(ok,e),null===oH&&(oH=e)):eq()}function eq(){h(oG,oG.current),h(ok,ok.current)}function eK(e){c(ok),oH===e&&(oH=null),c(oG)}function eZ(e){for(var t=e;null!==t;){if(13===t.tag){var i=t.memoizedState;if(null!==i&&(null===(i=i.dehydrated)||aR(i)||aP(i)))return t}else if(19===t.tag&&("forwards"===t.memoizedProps.revealOrder||"backwards"===t.memoizedProps.revealOrder||"unstable_legacy-backwards"===t.memoizedProps.revealOrder||"together"===t.memoizedProps.revealOrder)){if((128&t.flags)!=0)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function eJ(){throw Error(n(321))}function e$(e,t){if(null===t)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!sj(e[i],t[i]))return!1;return!0}function e0(e,t,i,n,r,a){return oV=a,oW=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,rb.H=null===e||null===e.memoizedState?o1:o2,oq=!1,a=i(n,r),oq=!1,oQ&&(a=e2(t,i,n,r)),e1(e),a}function e1(e){rb.H=o0;var t=null!==oj&&null!==oj.next;if(oV=0,oX=oj=oW=null,oY=!1,oZ=0,oJ=null,t)throw Error(n(300));null===e||o6||null!==(e=e.dependencies)&&Z(e)&&(o6=!0)}function e2(e,t,i,r){oW=e;var a=0;do{if(oQ&&(oJ=null),oZ=0,oQ=!1,25<=a)throw Error(n(301));if(a+=1,oX=oj=null,null!=e.updateQueue){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,null!=s.memoCache&&(s.memoCache.index=0)}rb.H=o3,s=t(i,r)}while(oQ)return s}function e3(){var e=rb.H,t=e.useState()[0];return t="function"==typeof t.then?te(t):t,e=e.useState()[0],(null!==oj?oj.memoizedState:null)!==e&&(oW.flags|=1024),t}function e4(){var e=0!==oK;return oK=0,e}function e5(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function e6(e){if(oY){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}oY=!1}oV=0,oX=oj=oW=null,oQ=!1,oZ=oK=0,oJ=null}function e8(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===oX?oW.memoizedState=oX=e:oX=oX.next=e,oX}function e9(){if(null===oj){var e=oW.alternate;e=null!==e?e.memoizedState:null}else e=oj.next;var t=null===oX?oW.memoizedState:oX.next;if(null!==t)oX=t,oj=e;else{if(null===e)throw null===oW.alternate?Error(n(467)):Error(n(310));e={memoizedState:(oj=e).memoizedState,baseState:oj.baseState,baseQueue:oj.baseQueue,queue:oj.queue,next:null},null===oX?oW.memoizedState=oX=e:oX=oX.next=e}return oX}function e7(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function te(e){var t=oZ;return oZ+=1,null===oJ&&(oJ=[]),e=ey(oJ,e,t),t=oW,(null===oX?t.memoizedState:oX.next)===null&&(rb.H=null===(t=t.alternate)||null===t.memoizedState?o1:o2),e}function tt(e){if(null!==e&&"object"==typeof e){if("function"==typeof e.then)return te(e);if(e.$$typeof===rd)return $(e)}throw Error(n(438,String(e)))}function ti(e){var t=null,i=oW.updateQueue;if(null!==i&&(t=i.memoCache),null==t){var n=oW.alternate;null!==n&&null!==(n=n.updateQueue)&&null!=(n=n.memoCache)&&(t={data:n.data.map(function(e){return e.slice()}),index:0})}if(null==t&&(t={data:[],index:0}),null===i&&(i=e7(),oW.updateQueue=i),i.memoCache=t,void 0===(i=t.data[t.index]))for(i=t.data[t.index]=Array(e),n=0;n<e;n++)i[n]=ry;return t.index++,i}function tn(e,t){return"function"==typeof t?t(e):t}function tr(e){return ta(e9(),oj,e)}function ta(e,t,i){var r=e.queue;if(null===r)throw Error(n(311));r.lastRenderedReducer=i;var a=e.baseQueue,s=r.pending;if(null!==s){if(null!==a){var o=a.next;a.next=s.next,s.next=o}t.baseQueue=a=s,r.pending=null}if(s=e.baseState,null===a)e.memoizedState=s;else{t=a.next;var l=o=null,u=null,c=t,h=!1;do{var d=-0x20000001&c.lane;if(d!==c.lane?(lx&d)===d:(oV&d)===d){var f=c.revertLane;if(0===f)null!==u&&(u=u.next={lane:0,revertLane:0,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),d===oS&&(h=!0);else if((oV&f)===f){c=c.next,f===oS&&(h=!0);continue}else d={lane:0,revertLane:c.revertLane,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},null===u?(l=u=d,o=s):u=u.next=d,oW.lanes|=f,lE|=f;d=c.action,oq&&i(s,d),s=c.hasEagerState?c.eagerState:i(s,d)}else f={lane:d,revertLane:c.revertLane,gesture:c.gesture,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},null===u?(l=u=f,o=s):u=u.next=f,oW.lanes|=d,lE|=d;c=c.next}while(null!==c&&c!==t)if(null===u?o=s:u.next=l,!sj(s,e.memoizedState)&&(o6=!0,h&&null!==(i=oA)))throw i;e.memoizedState=s,e.baseState=o,e.baseQueue=u,r.lastRenderedState=s}return null===a&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ts(e){var t=e9(),i=t.queue;if(null===i)throw Error(n(311));i.lastRenderedReducer=e;var r=i.dispatch,a=i.pending,s=t.memoizedState;if(null!==a){i.pending=null;var o=a=a.next;do s=e(s,o.action),o=o.next;while(o!==a)sj(s,t.memoizedState)||(o6=!0),t.memoizedState=s,null===t.baseQueue&&(t.baseState=s),i.lastRenderedState=s}return[s,r]}function to(e,t,i){var r=oW,a=e9(),s=ot;if(s){if(void 0===i)throw Error(n(407));i=i()}else i=t();var o=!sj((oj||a).memoizedState,i);if(o&&(a.memoizedState=i,o6=!0),a=a.queue,tI(tc.bind(null,r,a,e),[e]),a.getSnapshot!==t||o||null!==oX&&1&oX.memoizedState.tag){if(r.flags|=2048,t_(9,{destroy:void 0},tu.bind(null,r,a,i,t),null),null===lg)throw Error(n(349));s||(127&oV)!=0||tl(r,t,i)}return i}function tl(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},null===(t=oW.updateQueue)?(t=e7(),oW.updateQueue=t,t.stores=[e]):null===(i=t.stores)?t.stores=[e]:i.push(e)}function tu(e,t,i,n){t.value=i,t.getSnapshot=n,th(t)&&td(e)}function tc(e,t,i){return i(function(){th(t)&&td(e)})}function th(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!sj(e,i)}catch{return!0}}function td(e){var t=eP(e,2);null!==t&&nx(t,e,2)}function tf(e){var t=e8();if("function"==typeof e){var i=e;if(e=i(),oq){b(!0);try{i()}finally{b(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:tn,lastRenderedState:e},t}function tp(e,t,i,n){return e.baseState=i,ta(e,oj,"function"==typeof n?n:tn)}function tm(e,t,i,r,a){if(t$(e))throw Error(n(485));if(null!==(e=t.action)){var s={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){s.listeners.push(e)}};null!==rb.T?i(!0):s.isTransition=!1,r(s),null===(i=t.pending)?(s.next=t.pending=s,tg(t,s)):(s.next=i.next,t.pending=i.next=s)}}function tg(e,t){var i=t.action,n=t.payload,r=e.state;if(t.isTransition){var a=rb.T,s={};rb.T=s;try{var o=i(r,n),l=rb.S;null!==l&&l(s,o),tv(e,t,o)}catch(i){ty(e,t,i)}finally{null!==a&&null!==s.types&&(a.types=s.types),rb.T=a}}else try{a=i(r,n),tv(e,t,a)}catch(i){ty(e,t,i)}}function tv(e,t,i){null!==i&&"object"==typeof i&&"function"==typeof i.then?i.then(function(i){tx(e,t,i)},function(i){return ty(e,t,i)}):tx(e,t,i)}function tx(e,t,i){t.status="fulfilled",t.value=i,tS(t),e.state=i,null!==(t=e.pending)&&((i=t.next)===t?e.pending=null:(i=i.next,t.next=i,tg(e,i)))}function ty(e,t,i){var n=e.pending;if(e.pending=null,null!==n){n=n.next;do t.status="rejected",t.reason=i,tS(t),t=t.next;while(t!==n)}e.action=null}function tS(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function tA(e,t){return t}function tM(e,t){if(ot){var i=lg.formState;if(null!==i){o:{var n=oW;if(ot){if(oe){var r=aL(oe,on);if(r){oe=aU(r),n=aB(r);break o}}z(n)}n=!1}n&&(t=i[0])}}(i=e8()).memoizedState=i.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:tA,lastRenderedState:t},i.queue=n,i=tK.bind(null,oW,n),n.dispatch=i,n=tf(!1);var a=tJ.bind(null,oW,!1,n.queue);return n=e8(),r={state:t,dispatch:null,action:e,pending:null},n.queue=r,i=tm.bind(null,oW,r,a,i),r.dispatch=i,n.memoizedState=e,[t,i,!1]}function tb(e){return tw(e9(),oj,e)}function tw(e,t,i){if(t=ta(e,t,tA)[0],e=tr(tn)[0],"object"==typeof t&&null!==t&&"function"==typeof t.then)try{var n=te(t)}catch(e){throw e===ow?oE:e}else n=t;var r=(t=e9()).queue,a=r.dispatch;return i!==t.memoizedState&&(oW.flags|=2048,t_(9,{destroy:void 0},tT.bind(null,r,i),null)),[n,a,e]}function tT(e,t){e.action=t}function tE(e){var t=e9(),i=oj;if(null!==i)return tw(t,i,e);e9(),t=t.memoizedState;var n=(i=e9()).queue.dispatch;return i.memoizedState=e,[t,n,!1]}function t_(e,t,i,n){return e={tag:e,create:i,deps:n,inst:t,next:null},null===(t=oW.updateQueue)&&(t=e7(),oW.updateQueue=t),null===(i=t.lastEffect)?t.lastEffect=e.next=e:(n=i.next,i.next=e,e.next=n,t.lastEffect=e),e}function tC(){return e9().memoizedState}function tR(e,t,i,n){var r=e8();oW.flags|=e,r.memoizedState=t_(1|t,{destroy:void 0},i,void 0===n?null:n)}function tP(e,t,i,n){var r=e9();n=void 0===n?null:n;var a=r.memoizedState.inst;null!==oj&&null!==n&&e$(n,oj.memoizedState.deps)?r.memoizedState=t_(t,a,i,n):(oW.flags|=e,r.memoizedState=t_(1|t,a,i,n))}function tD(e,t){tR(8390656,8,e,t)}function tI(e,t){tP(2048,8,e,t)}function tL(e){var t=e9().memoizedState;return function(e){oW.flags|=4;var t=oW.updateQueue;if(null===t)t=e7(),oW.updateQueue=t,t.events=[e];else{var i=t.events;null===i?t.events=[e]:i.push(e)}}({ref:t,nextImpl:e}),function(){if((2&lm)!=0)throw Error(n(440));return t.impl.apply(void 0,arguments)}}function tB(e,t){return tP(4,2,e,t)}function tU(e,t){return tP(4,4,e,t)}function tN(e,t){if("function"==typeof t){var i=t(e=e());return function(){"function"==typeof i?i():t(null)}}if(null!=t)return t.current=e=e(),function(){t.current=null}}function tF(e,t,i){i=null!=i?i.concat([e]):null,tP(4,4,tN.bind(null,t,e),i)}function tO(){}function tz(e,t){var i=e9();t=void 0===t?null:t;var n=i.memoizedState;return null!==t&&e$(t,n[1])?n[0]:(i.memoizedState=[e,t],e)}function tk(e,t){var i=e9();t=void 0===t?null:t;var n=i.memoizedState;if(null!==t&&e$(t,n[1]))return n[0];if(n=e(),oq){b(!0);try{e()}finally{b(!1)}}return i.memoizedState=[n,t],n}function tH(e,t,i){return void 0===i||(0x40000000&oV)!=0&&(261930&lx)==0?e.memoizedState=t:(e.memoizedState=i,e=nv(),oW.lanes|=e,lE|=e,i)}function tG(e,t,i,n){return sj(i,t)?i:null!==oO.current?(sj(e=tH(e,i,n),t)||(o6=!0),e):(42&oV)==0||(0x40000000&oV)!=0&&(261930&lx)==0?(o6=!0,e.memoizedState=i):(e=nv(),oW.lanes|=e,lE|=e,t)}function tV(e,t,i,n,r){var a=rY();rX(0!==a&&8>a?a:8);var s=rb.T,o={};rb.T=o,tJ(e,!1,t,i);try{var l=r(),u=rb.S;if(null!==u&&u(o,l),null!==l&&"object"==typeof l&&"function"==typeof l.then){var c,h,d=(c=[],h={status:"pending",value:null,reason:null,then:function(e){c.push(e)}},l.then(function(){h.status="fulfilled",h.value=n;for(var e=0;e<c.length;e++)(0,c[e])(n)},function(e){for(h.status="rejected",h.reason=e,e=0;e<c.length;e++)(0,c[e])(void 0)}),h);tZ(e,t,d,ng(e))}else tZ(e,t,n,ng(e))}catch(i){tZ(e,t,{then:function(){},status:"rejected",reason:i},ng())}finally{rX(a),null!==s&&null!==o.types&&(s.types=o.types),rb.T=s}}function tW(e){var t=e.memoizedState;if(null!==t)return t;var i={};return(t={memoizedState:r4,baseState:r4,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:tn,lastRenderedState:r4},next:null}).next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:tn,lastRenderedState:i},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function tj(){return $(r5)}function tX(){return e9().memoizedState}function tY(){return e9().memoizedState}function tQ(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var i=ng(),n=eN(t,e=eU(i),i);null!==n&&(nx(n,t,i),eF(n,t,i)),t={cache:ei()},e.payload=t;return}t=t.return}}function tq(e,t,i){var n=ng();i={lane:n,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},t$(e)?t0(t,i):null!==(i=eR(e,t,i,n))&&(nx(i,e,n),t1(i,t,n))}function tK(e,t,i){tZ(e,t,i,ng())}function tZ(e,t,i,n){var r={lane:n,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(t$(e))t0(t,r);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,o=a(s,i);if(r.hasEagerState=!0,r.eagerState=o,sj(o,s))return eC(e,t,r,0),null===lg&&e_(),!1}catch{}finally{}if(null!==(i=eR(e,t,r,n)))return nx(i,e,n),t1(i,t,n),!0}return!1}function tJ(e,t,i,r){if(r={lane:2,revertLane:ed(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},t$(e)){if(t)throw Error(n(479))}else null!==(t=eR(e,i,r,2))&&nx(t,e,2)}function t$(e){var t=e.alternate;return e===oW||null!==t&&t===oW}function t0(e,t){oQ=oY=!0;var i=e.pending;null===i?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function t1(e,t,i){if((4194048&i)!=0){var n=t.lanes;n&=e.pendingLanes,t.lanes=i|=n,y(e,i)}}function t2(e,t,i,n){i=null==(i=i(n,t=e.memoizedState))?t:rr({},t,i),e.memoizedState=i,0===e.lanes&&(e.updateQueue.baseState=i)}function t3(e,t,i,n,r,a,s){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(n,a,s):!t.prototype||!t.prototype.isPureReactComponent||!ev(i,n)||!ev(r,a)}function t4(e,t,i,n){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(i,n),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(i,n),t.state!==e&&o4.enqueueReplaceState(t,t.state,null)}function t5(e,t){var i=t;if("ref"in t)for(var n in i={},t)"ref"!==n&&(i[n]=t[n]);if(e=e.defaultProps)for(var r in i===t&&(i=rr({},i)),e)void 0===i[r]&&(i[r]=e[r]);return i}function t6(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function t8(e,t,i){try{(0,e.onCaughtError)(i.value,{componentStack:i.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function t9(e,t,i){return(i=eU(i)).tag=3,i.payload={element:null},i.callback=function(){t6(e,t)},i}function t7(e){return(e=eU(e)).tag=3,e}function ie(e,t,i,n){var r=i.type.getDerivedStateFromError;if("function"==typeof r){var a=n.value;e.payload=function(){return r(a)},e.callback=function(){t8(t,i,n)}}var s=i.stateNode;null!==s&&"function"==typeof s.componentDidCatch&&(e.callback=function(){t8(t,i,n),"function"!=typeof r&&(null===lO?lO=new Set([this]):lO.add(this));var e=n.stack;this.componentDidCatch(n.value,{componentStack:null!==e?e:""})})}function it(e,t,i,n){t.child=null===e?oI(t,null,i,n):oD(t,e.child,i,n)}function ii(e,t,i,n,r){i=i.render;var a=t.ref;if("ref"in n){var s={};for(var o in n)"ref"!==o&&(s[o]=n[o])}else s=n;return J(t),n=e0(e,t,i,s,a,r),o=e4(),null===e||o6?(ot&&o&&I(t),t.flags|=1,it(e,t,n,r),t.child):(e5(e,t,r),iE(e,t,r))}function ir(e,t,i,n,r){if(null===e){var a=i.type;return"function"!=typeof a||nZ(a)||void 0!==a.defaultProps||null!==i.compare?((e=n0(i.type,null,n,t,t.mode,r)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,ia(e,t,a,n,r))}if(a=e.child,!i_(e,r)){var s=a.memoizedProps;if((i=null!==(i=i.compare)?i:ev)(s,n)&&e.ref===t.ref)return iE(e,t,r)}return t.flags|=1,(e=nJ(a,n)).ref=t.ref,e.return=t,t.child=e}function ia(e,t,i,n,r){if(null!==e){var a=e.memoizedProps;if(ev(a,n)&&e.ref===t.ref)if(o6=!1,t.pendingProps=n=a,!i_(e,r))return t.lanes=e.lanes,iE(e,t,r);else(131072&e.flags)!=0&&(o6=!0)}return id(e,t,i,n,r)}function is(e,t,i,n){var r=n.children,a=null!==e?e.memoizedState:null;if(null===e&&null===t.stateNode&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),"hidden"===n.mode){if((128&t.flags)!=0){if(a=null!==a?a.baseLanes|i:i,null!==e){for(n=t.child=e.child,r=0;null!==n;)r=r|n.lanes|n.childLanes,n=n.sibling;n=r&~a}else n=0,t.child=null;return il(e,t,a,i,n)}if((0x20000000&i)==0)return n=t.lanes=0x20000000,il(e,t,null!==a?a.baseLanes|i:i,i,n);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&em(t,null!==a?a.cachePool:null),null!==a?eV(t,a):eW(),eQ(t)}else null!==a?(em(t,a.cachePool),eV(t,a),eq(),t.memoizedState=null):(null!==e&&em(t,null),eW(),eq());return it(e,t,r,i),t.child}function io(e,t){return null!==e&&22===e.tag||null!==t.stateNode||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function il(e,t,i,n,r){var a=ep();return t.memoizedState={baseLanes:i,cachePool:a=null===a?null:{parent:rk?oh._currentValue:oh._currentValue2,pool:a}},null!==e&&em(t,null),eW(),eQ(t),null!==e&&K(e,t,n,!0),t.childLanes=r,null}function iu(e,t){return(t=iA({mode:t.mode,children:t.children},e.mode)).ref=e.ref,e.child=t,t.return=e,t}function ic(e,t,i){return oD(t,e.child,null,i),e=iu(t,t.pendingProps),e.flags|=2,eK(t),t.memoizedState=null,e}function ih(e,t){var i=t.ref;if(null===i)null!==e&&null!==e.ref&&(t.flags|=4194816);else{if("function"!=typeof i&&"object"!=typeof i)throw Error(n(284));(null===e||e.ref!==i)&&(t.flags|=4194816)}}function id(e,t,i,n,r){return J(t),i=e0(e,t,i,n,void 0,r),n=e4(),null===e||o6?(ot&&n&&I(t),t.flags|=1,it(e,t,i,r),t.child):(e5(e,t,r),iE(e,t,r))}function ip(e,t,i,n,r,a){return J(t),t.updateQueue=null,i=e2(t,n,i,r),e1(e),n=e4(),null===e||o6?(ot&&n&&I(t),t.flags|=1,it(e,t,i,a),t.child):(e5(e,t,a),iE(e,t,a))}function im(e,t,i,n,r){if(J(t),null===t.stateNode){var a=sT,s=i.contextType;"object"==typeof s&&null!==s&&(a=$(s)),t.memoizedState=null!==(a=new i(n,a)).state&&void 0!==a.state?a.state:null,a.updater=o4,t.stateNode=a,a._reactInternals=t,(a=t.stateNode).props=n,a.state=t.memoizedState,a.refs={},eL(t),s=i.contextType,a.context="object"==typeof s&&null!==s?$(s):sT,a.state=t.memoizedState,"function"==typeof(s=i.getDerivedStateFromProps)&&(t2(t,i,s,n),a.state=t.memoizedState),"function"==typeof i.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(s=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),s!==a.state&&o4.enqueueReplaceState(a,a.state,null),ek(t,n,a,r),ez(),a.state=t.memoizedState),"function"==typeof a.componentDidMount&&(t.flags|=4194308),n=!0}else if(null===e){a=t.stateNode;var o=t.memoizedProps,l=t5(i,o);a.props=l;var u=a.context,c=i.contextType;s=sT,"object"==typeof c&&null!==c&&(s=$(c));var h=i.getDerivedStateFromProps;c="function"==typeof h||"function"==typeof a.getSnapshotBeforeUpdate,o=t.pendingProps!==o,c||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(o||u!==s)&&t4(t,a,n,s),oN=!1;var d=t.memoizedState;a.state=d,ek(t,n,a,r),ez(),u=t.memoizedState,o||d!==u||oN?("function"==typeof h&&(t2(t,i,h,n),u=t.memoizedState),(l=oN||t3(t,i,l,n,d,u,s))?(c||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=u),a.props=n,a.state=u,a.context=s,n=l):("function"==typeof a.componentDidMount&&(t.flags|=4194308),n=!1)}else{a=t.stateNode,eB(e,t),c=t5(i,s=t.memoizedProps),a.props=c,h=t.pendingProps,d=a.context,u=i.contextType,l=sT,"object"==typeof u&&null!==u&&(l=$(u)),(u="function"==typeof(o=i.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==h||d!==l)&&t4(t,a,n,l),oN=!1,d=t.memoizedState,a.state=d,ek(t,n,a,r),ez();var f=t.memoizedState;s!==h||d!==f||oN||null!==e&&null!==e.dependencies&&Z(e.dependencies)?("function"==typeof o&&(t2(t,i,o,n),f=t.memoizedState),(c=oN||t3(t,i,c,n,d,f,l)||null!==e&&null!==e.dependencies&&Z(e.dependencies))?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(n,f,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(n,f,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=f),a.props=n,a.state=f,a.context=l,n=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),n=!1)}return a=n,ih(e,t),n=(128&t.flags)!=0,a||n?(a=t.stateNode,i=n&&"function"!=typeof i.getDerivedStateFromError?null:a.render(),t.flags|=1,null!==e&&n?(t.child=oD(t,e.child,null,r),t.child=oD(t,null,i,r)):it(e,t,i,r),t.memoizedState=a.state,e=t.child):e=iE(e,t,r),e}function ig(e,t,i,n){return V(),t.flags|=256,it(e,t,i,n),t.child}function iv(e){return{baseLanes:e,cachePool:eg()}}function ix(e,t,i){return e=null!==e?e.childLanes&~i:0,t&&(e|=lR),e}function iy(e,t,i){var r,a=t.pendingProps,s=!1,o=(128&t.flags)!=0;if((r=o)||(r=(null===e||null!==e.memoizedState)&&(2&oG.current)!=0),r&&(s=!0,t.flags&=-129),r=(32&t.flags)!=0,t.flags&=-33,null===e){if(ot){if(s?eX(t):eq(),(e=oe)?null!==(e=aj(e,on))&&(t.memoizedState={dehydrated:e,treeContext:null!==s2?{id:s3,overflow:s4}:null,retryLane:0x20000000,hydrationErrors:null},(i=n3(e)).return=t,t.child=i,s7=t,oe=null):e=null,null===e)throw z(t);return aP(e)?t.lanes=32:t.lanes=0x20000000,null}var l=a.children;return a=a.fallback,s?(eq(),l=iA({mode:"hidden",children:l},s=t.mode),a=n1(a,s,i,null),l.return=t,a.return=t,l.sibling=a,t.child=l,(a=t.child).memoizedState=iv(i),a.childLanes=ix(e,r,i),t.memoizedState=o8,io(null,a)):(eX(t),iS(t,l))}var u=e.memoizedState;if(null!==u&&null!==(l=u.dehydrated)){if(o)256&t.flags?(eX(t),t.flags&=-257,t=iM(e,t,i)):null!==t.memoizedState?(eq(),t.child=e.child,t.flags|=128,t=null):(eq(),l=a.fallback,s=t.mode,a=iA({mode:"visible",children:a.children},s),l=n1(l,s,i,null),l.flags|=2,a.return=t,l.return=t,a.sibling=l,t.child=a,oD(t,e.child,null,i),(a=t.child).memoizedState=iv(i),a.childLanes=ix(e,r,i),t.memoizedState=o8,t=io(null,a));else if(eX(t),aP(l))r=aD(l).digest,(a=Error(n(419))).stack="",a.digest=r,j({value:a,source:null,stack:null}),t=iM(e,t,i);else if(o6||K(e,t,i,!1),r=(i&e.childLanes)!=0,o6||r){if(null!==(r=lg)&&0!==(a=S(r,i))&&a!==u.retryLane)throw u.retryLane=a,eP(e,a),nx(r,e,a),o5;aR(l)||nR(),t=iM(e,t,i)}else aR(l)?(t.flags|=192,t.child=e.child,t=null):(e=u.treeContext,rV&&(oe=ak(l),s7=t,ot=!0,oi=null,on=!1,null!==e&&B(t,e)),t=iS(t,a.children),t.flags|=4096);return t}return s?(eq(),l=a.fallback,s=t.mode,o=(u=e.child).sibling,(a=nJ(u,{mode:"hidden",children:a.children})).subtreeFlags=0x3e00000&u.subtreeFlags,null!==o?l=nJ(o,l):(l=n1(l,s,i,null),l.flags|=2),l.return=t,a.return=t,a.sibling=l,t.child=a,io(null,a),a=t.child,null===(l=e.child.memoizedState)?l=iv(i):(null!==(s=l.cachePool)?(u=rk?oh._currentValue:oh._currentValue2,s=s.parent!==u?{parent:u,pool:u}:s):s=eg(),l={baseLanes:l.baseLanes|i,cachePool:s}),a.memoizedState=l,a.childLanes=ix(e,r,i),t.memoizedState=o8,io(e.child,a)):(eX(t),e=(i=e.child).sibling,(i=nJ(i,{mode:"visible",children:a.children})).return=t,i.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=i,t.memoizedState=null,i)}function iS(e,t){return(t=iA({mode:"visible",children:t},e.mode)).return=e,e.child=t}function iA(e,i){return(e=t(22,e,null,i)).lanes=0,e}function iM(e,t,i){return oD(t,e.child,null,i),e=iS(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ib(e,t,i){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),Q(e.return,t,i)}function iw(e,t,i,n,r,a){var s=e.memoizedState;null===s?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:i,tailMode:r,treeForkCount:a}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=n,s.tail=i,s.tailMode=r,s.treeForkCount=a)}function iT(e,t,i){var n=t.pendingProps,r=n.revealOrder,a=n.tail;n=n.children;var s=oG.current,o=(2&s)!=0;if(o?(s=1&s|2,t.flags|=128):s&=1,h(oG,s),it(e,t,n,i),n=ot?s$:0,!o&&null!==e&&(128&e.flags)!=0)o:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&ib(e,i,t);else if(19===e.tag)ib(e,i,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)break o;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"forwards":for(i=t.child,r=null;null!==i;)null!==(e=i.alternate)&&null===eZ(e)&&(r=i),i=i.sibling;null===(i=r)?(r=t.child,t.child=null):(r=i.sibling,i.sibling=null),iw(t,!1,r,i,a,n);break;case"backwards":case"unstable_legacy-backwards":for(i=null,r=t.child,t.child=null;null!==r;){if(null!==(e=r.alternate)&&null===eZ(e)){t.child=r;break}e=r.sibling,r.sibling=i,i=r,r=e}iw(t,!0,i,null,a,n);break;case"together":iw(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function iE(e,t,i){if(null!==e&&(t.dependencies=e.dependencies),lE|=t.lanes,(i&t.childLanes)==0){if(null===e)return null;else if(K(e,t,i,!1),(i&t.childLanes)==0)return null}if(null!==e&&t.child!==e.child)throw Error(n(153));if(null!==t.child){for(i=nJ(e=t.child,e.pendingProps),t.child=i,i.return=t;null!==e.sibling;)e=e.sibling,(i=i.sibling=nJ(e,e.pendingProps)).return=t;i.sibling=null}return t.child}function i_(e,t){return(e.lanes&t)!=0||!!(null!==(e=e.dependencies)&&Z(e))}function iC(e,t,i){if(null!==e)if(e.memoizedProps!==t.pendingProps)o6=!0;else{if(!i_(e,i)&&(128&t.flags)==0)return o6=!1,function(e,t,i){switch(t.tag){case 3:U(t,t.stateNode.containerInfo),X(t,oh,e.memoizedState.cache),V();break;case 27:case 5:F(t);break;case 4:U(t,t.stateNode.containerInfo);break;case 10:X(t,t.type,t.memoizedProps.value);break;case 31:if(null!==t.memoizedState)return t.flags|=128,eY(t),null;break;case 13:var n=t.memoizedState;if(null!==n)return null!==n.dehydrated?(eX(t),t.flags|=128,null):(i&t.child.childLanes)!=0?iy(e,t,i):(eX(t),null!==(e=iE(e,t,i))?e.sibling:null);eX(t);break;case 19:var r=(128&e.flags)!=0;if((n=(i&t.childLanes)!=0)||(K(e,t,i,!1),n=(i&t.childLanes)!=0),r){if(n)return iT(e,t,i);t.flags|=128}if(null!==(r=t.memoizedState)&&(r.rendering=null,r.tail=null,r.lastEffect=null),h(oG,oG.current),n)break;return null;case 22:return t.lanes=0,is(e,t,i,t.pendingProps);case 24:X(t,oh,e.memoizedState.cache)}return iE(e,t,i)}(e,t,i);o6=(131072&e.flags)!=0}else o6=!1,ot&&(1048576&t.flags)!=0&&D(t,s$,t.index);switch(t.lanes=0,t.tag){case 16:o:{var r=t.pendingProps;if(e=eS(t.elementType),t.type=e,"function"==typeof e)nZ(e)?(r=t5(e,r),t.tag=1,t=im(null,t,e,r,i)):(t.tag=0,t=id(null,t,e,r,i));else{if(null!=e){var a=e.$$typeof;if(a===rf){t.tag=11,t=ii(null,t,e,r,i);break o}if(a===rg){t.tag=14,t=ir(null,t,e,r,i);break o}}throw Error(n(306,t=l(e)||e,""))}}return t;case 0:return id(e,t,t.type,t.pendingProps,i);case 1:return a=t5(r=t.type,t.pendingProps),im(e,t,r,a,i);case 3:o:{if(U(t,t.stateNode.containerInfo),null===e)throw Error(n(387));var s=t.pendingProps;r=(a=t.memoizedState).element,eB(e,t),ek(t,s,null,i);var o=t.memoizedState;if(X(t,oh,s=o.cache),s!==a.cache&&q(t,[oh],i,!0),ez(),s=o.element,rV&&a.isDehydrated)if(a={element:s,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=ig(e,t,s,i);break o}else if(s!==r){j(r=R(Error(n(424)),t)),t=ig(e,t,s,i);break o}else for(rV&&(oe=aO(t.stateNode.containerInfo),s7=t,ot=!0,oi=null,on=!0),i=oI(t,null,s,i),t.child=i;i;)i.flags=-3&i.flags|4096,i=i.sibling;else{if(V(),s===r){t=iE(e,t,i);break o}it(e,t,s,i)}t=t.child}return t;case 26:if(sn)return ih(e,t),null===e?(i=ss(t.type,null,t.pendingProps,null))?t.memoizedState=i:ot||(t.stateNode=sd(t.type,t.pendingProps,s8.current,t)):t.memoizedState=ss(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:if(sv)return F(t),null===e&&sv&&ot&&(r=t.stateNode=sx(t.type,t.pendingProps,s8.current,s5.current,!1),s7=t,on=!0,oe=aH(t.type,r,oe)),it(e,t,t.pendingProps.children,i),ih(e,t),null===e&&(t.flags|=4194304),t.child;case 5:return null===e&&ot&&(st(t.type,t.pendingProps,s5.current),(a=r=oe)&&(null!==(r=aG(r,t.type,t.pendingProps,on))?(t.stateNode=r,s7=t,oe=aF(r),on=!1,a=!0):a=!1),a||z(t)),F(t),a=t.type,s=t.pendingProps,o=null!==e?e.memoizedProps:null,r=s.children,rU(a,s)?r=null:null!==o&&rU(a,o)&&(t.flags|=32),null!==t.memoizedState&&(a=e0(e,t,e3,null,null,i),rk?r5._currentValue=a:r5._currentValue2=a),ih(e,t),it(e,t,r,i),t.child;case 6:return null===e&&ot&&(si(t.pendingProps,s5.current),(e=i=oe)&&(null!==(i=aV(i,t.pendingProps,on))?(t.stateNode=i,s7=t,oe=null,e=!0):e=!1),e||z(t)),null;case 13:return iy(e,t,i);case 4:return U(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=oD(t,null,r,i):it(e,t,r,i),t.child;case 11:return ii(e,t,t.type,t.pendingProps,i);case 7:return it(e,t,t.pendingProps,i),t.child;case 8:case 12:return it(e,t,t.pendingProps.children,i),t.child;case 10:return r=t.pendingProps,X(t,t.type,r.value),it(e,t,r.children,i),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,J(t),r=r(a=$(a)),t.flags|=1,it(e,t,r,i),t.child;case 14:return ir(e,t,t.type,t.pendingProps,i);case 15:return ia(e,t,t.type,t.pendingProps,i);case 19:return iT(e,t,i);case 31:var u=e,c=t,d=i,f=c.pendingProps,p=(128&c.flags)!=0;if(c.flags&=-129,null===u){if(ot){if("hidden"===f.mode)return u=iu(c,f),c.lanes=0x20000000,io(null,u);if(eY(c),(u=oe)?null!==(u=aW(u,on))&&(c.memoizedState={dehydrated:u,treeContext:null!==s2?{id:s3,overflow:s4}:null,retryLane:0x20000000,hydrationErrors:null},(d=n3(u)).return=c,c.child=d,s7=c,oe=null):u=null,null===u)throw z(c);return c.lanes=0x20000000,null}return iu(c,f)}var m=u.memoizedState;if(null!==m){var g=m.dehydrated;if(eY(c),p)if(256&c.flags)c.flags&=-257,c=ic(u,c,d);else if(null!==c.memoizedState)c.child=u.child,c.flags|=128,c=null;else throw Error(n(558));else if(o6||K(u,c,d,!1),p=(d&u.childLanes)!=0,o6||p){if(null!==(f=lg)&&0!==(g=S(f,d))&&g!==m.retryLane)throw m.retryLane=g,eP(u,g),nx(f,u,g),o5;nR(),c=ic(u,c,d)}else u=m.treeContext,rV&&(oe=az(g),s7=c,ot=!0,oi=null,on=!1,null!==u&&B(c,u)),c=iu(c,f),c.flags|=4096;return c}return(u=nJ(u.child,{mode:f.mode,children:f.children})).ref=c.ref,c.child=u,u.return=c,u;case 22:return is(e,t,i,t.pendingProps);case 24:return J(t),r=$(oh),null===e?(null===(a=ep())&&(a=lg,s=ei(),a.pooledCache=s,s.refCount++,null!==s&&(a.pooledCacheLanes|=i),a=s),t.memoizedState={parent:r,cache:a},eL(t),X(t,oh,a)):((e.lanes&i)!=0&&(eB(e,t),ek(t,null,null,i),ez()),a=e.memoizedState,s=t.memoizedState,a.parent!==r?(a={parent:r,cache:r},t.memoizedState=a,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=a),X(t,oh,r)):(X(t,oh,r=s.cache),r!==a.cache&&q(t,[oh],i,!0))),it(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(n(156,t.tag))}function iR(e){e.flags|=4}function iP(e){rG&&(e.flags|=8)}function iD(e,t){if(null!==e&&e.child===t.child)return!1;if((16&t.flags)!=0)return!0;for(e=t.child;null!==e;){if((8218&e.flags)!=0||(8218&e.subtreeFlags)!=0)return!0;e=e.sibling}return!1}function iI(e,t,i,n){if(rH)for(i=t.child;null!==i;){if(5===i.tag||6===i.tag)rL(e,i.stateNode);else if(!(4===i.tag||sv&&27===i.tag)&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}else if(rG)for(var r=t.child;null!==r;){if(5===r.tag){var a=r.stateNode;i&&n&&(a=a_(a,r.type,r.memoizedProps)),rL(e,a)}else if(6===r.tag)a=r.stateNode,i&&n&&(a=aC(a,r.memoizedProps)),rL(e,a);else if(4!==r.tag){if(22===r.tag&&null!==r.memoizedState)null!==(a=r.child)&&(a.return=r),iI(e,r,!0,!0);else if(null!==r.child){r.child.return=r,r=r.child;continue}}if(r===t)break;for(;null===r.sibling;){if(null===r.return||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}}function iL(e,t){if(rG&&iD(e,t)){var i=(e=t.stateNode).containerInfo,n=ab();(function e(t,i,n,r){var a=!1;if(rG)for(var s=i.child;null!==s;){if(5===s.tag){var o=s.stateNode;n&&r&&(o=a_(o,s.type,s.memoizedProps)),aw(t,o)}else if(6===s.tag)o=s.stateNode,n&&r&&(o=aC(o,s.memoizedProps)),aw(t,o);else if(4!==s.tag){if(22===s.tag&&null!==s.memoizedState)null!==(a=s.child)&&(a.return=s),e(t,s,!0,!0),a=!0;else if(null!==s.child){s.child.return=s,s=s.child;continue}}if(s===i)break;for(;null===s.sibling;){if(null===s.return||s.return===i)return a;s=s.return}s.sibling.return=s.return,s=s.sibling}return a})(n,t,!1,!1),e.pendingChildren=n,iR(t),aT(i,n)}}function iB(e,t,i,n){if(rH)e.memoizedProps!==n&&iR(t);else if(rG){var r=e.stateNode,a=e.memoizedProps;if((e=iD(e,t))||a!==n){var s=s5.current;(a=aM(r,i,a,n,!e,null))===r?t.stateNode=r:(iP(t),rB(a,i,n,s)&&iR(t),t.stateNode=a,e&&iI(a,t,!1,!1))}else t.stateNode=r}}function iU(e,t,i,n,r){if((32&e.mode)!=0&&(null===i?rZ(t,n):rJ(t,i,n))){if(e.flags|=0x1000000,(0x13ffff40&r)===r||r$(t,n))if(r0(e.stateNode,t,n))e.flags|=8192;else if(nE())e.flags|=8192;else throw oC=o_,oT}else e.flags&=-0x1000001}function iN(e,t){if(sp(t)){if(e.flags|=0x1000000,!sm(t))if(nE())e.flags|=8192;else throw oC=o_,oT}else e.flags&=-0x1000001}function iF(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?m():0x20000000,e.lanes|=t,lP|=t)}function iO(e,t){if(!ot)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;null!==t;)null!==t.alternate&&(i=t),t=t.sibling;null===i?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var n=null;null!==i;)null!==i.alternate&&(n=i),i=i.sibling;null===n?t||null===e.tail?e.tail=null:e.tail.sibling=null:n.sibling=null}}function iz(e){var t=null!==e.alternate&&e.alternate.child===e.child,i=0,n=0;if(t)for(var r=e.child;null!==r;)i|=r.lanes|r.childLanes,n|=0x3e00000&r.subtreeFlags,n|=0x3e00000&r.flags,r.return=e,r=r.sibling;else for(r=e.child;null!==r;)i|=r.lanes|r.childLanes,n|=r.subtreeFlags,n|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=n,e.childLanes=i,t}function ik(e,t){switch(L(t),t.tag){case 3:Y(oh),N();break;case 26:case 27:case 5:O(t);break;case 4:N();break;case 31:null!==t.memoizedState&&eK(t);break;case 13:eK(t);break;case 19:c(oG);break;case 10:Y(t.type);break;case 22:case 23:eK(t),ej(),null!==e&&c(ob);break;case 24:Y(oh)}}function iH(e,t){try{var i=t.updateQueue,n=null!==i?i.lastEffect:null;if(null!==n){var r=n.next;i=r;do{if((i.tag&e)===e){n=void 0;var a=i.create;i.inst.destroy=n=a()}i=i.next}while(i!==r)}}catch(e){nW(t,t.return,e)}}function iG(e,t,i){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var a=r.next;n=a;do{if((n.tag&e)===e){var s=n.inst,o=s.destroy;if(void 0!==o){s.destroy=void 0,r=t;try{o()}catch(e){nW(r,i,e)}}}n=n.next}while(n!==a)}}catch(e){nW(t,t.return,e)}}function iV(e){var t=e.updateQueue;if(null!==t){var i=e.stateNode;try{eG(t,i)}catch(t){nW(e,e.return,t)}}}function iW(e,t,i){i.props=t5(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(i){nW(e,t,i)}}function ij(e,t){try{var i=e.ref;if(null!==i){switch(e.tag){case 26:case 27:case 5:var n=r_(e.stateNode);break;default:n=e.stateNode}"function"==typeof i?e.refCleanup=i(n):i.current=n}}catch(i){nW(e,t,i)}}function iX(e,t){var i=e.ref,n=e.refCleanup;if(null!==i)if("function"==typeof n)try{n()}catch(i){nW(e,t,i)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof i)try{i(null)}catch(i){nW(e,t,i)}else i.current=null}function iY(e){var t=e.type,i=e.memoizedProps,n=e.stateNode;try{ac(n,t,i,e)}catch(t){nW(e,e.return,t)}}function iQ(e,t,i){try{ah(e.stateNode,e.type,i,t,e)}catch(t){nW(e,e.return,t)}}function iq(e){return 5===e.tag||3===e.tag||!!sn&&26===e.tag||!!sv&&27===e.tag&&sM(e.type)||4===e.tag}function iK(e){o:for(;;){for(;null===e.sibling;){if(null===e.return||iq(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(sv&&27===e.tag&&sM(e.type)||2&e.flags||null===e.child||4===e.tag)continue o;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function iZ(e,t,i){var n=e.tag;if(5===n||6===n)e=e.stateNode,t?ad(i,e,t):ao(i,e);else if(4!==n&&(sv&&27===n&&sM(e.type)&&(i=e.stateNode),null!==(e=e.child)))for(iZ(e,t,i),e=e.sibling;null!==e;)iZ(e,t,i),e=e.sibling}function iJ(e,t,i){e=e.containerInfo;try{aE(e,i)}catch(e){nW(t,t.return,e)}}function i$(e){var t=e.stateNode,i=e.memoizedProps;try{sy(e.type,i,t,e)}catch(t){nW(e,e.return,t)}}function i0(e,t,i){var n=i.flags;switch(i.tag){case 0:case 11:case 15:i7(e,i),4&n&&iH(5,i);break;case 1:if(i7(e,i),4&n)if(e=i.stateNode,null===t)try{e.componentDidMount()}catch(e){nW(i,i.return,e)}else{var r=t5(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){nW(i,i.return,e)}}64&n&&iV(i),512&n&&ij(i,i.return);break;case 3:if(i7(e,i),64&n&&null!==(n=i.updateQueue)){if(e=null,null!==i.child)switch(i.child.tag){case 27:case 5:e=r_(i.child.stateNode);break;case 1:e=i.child.stateNode}try{eG(n,e)}catch(e){nW(i,i.return,e)}}break;case 27:sv&&null===t&&4&n&&i$(i);case 26:case 5:if(i7(e,i),null===t){if(4&n)iY(i);else if(64&n){e=i.type,t=i.memoizedProps,r=i.stateNode;try{aJ(r,e,t,i)}catch(e){nW(i,i.return,e)}}}512&n&&ij(i,i.return);break;case 12:default:i7(e,i);break;case 31:i7(e,i),4&n&&i3(e,i);break;case 13:i7(e,i),4&n&&i4(e,i),64&n&&null!==(n=i.memoizedState)&&null!==(n=n.dehydrated)&&aI(n,i=nQ.bind(null,i));break;case 22:if(!(n=null!==i.memoizedState||o9)){t=null!==t&&null!==t.memoizedState||o7,r=o9;var a=o7;o9=n,(o7=t)&&!a?function e(t,i,n){for(n=n&&(8772&i.subtreeFlags)!=0,i=i.child;null!==i;){var r=i.alternate,a=t,s=i,o=s.flags;switch(s.tag){case 0:case 11:case 15:e(a,s,n),iH(4,s);break;case 1:if(e(a,s,n),"function"==typeof(a=(r=s).stateNode).componentDidMount)try{a.componentDidMount()}catch(e){nW(r,r.return,e)}if(null!==(a=(r=s).updateQueue)){var l=r.stateNode;try{var u=a.shared.hiddenCallbacks;if(null!==u)for(a.shared.hiddenCallbacks=null,a=0;a<u.length;a++)eH(u[a],l)}catch(e){nW(r,r.return,e)}}n&&64&o&&iV(s),ij(s,s.return);break;case 27:sv&&i$(s);case 26:case 5:e(a,s,n),n&&null===r&&4&o&&iY(s),ij(s,s.return);break;case 12:default:e(a,s,n);break;case 31:e(a,s,n),n&&4&o&&i3(a,s);break;case 13:e(a,s,n),n&&4&o&&i4(a,s);break;case 22:null===s.memoizedState&&e(a,s,n),ij(s,s.return);case 30:}i=i.sibling}}(e,i,(8772&i.subtreeFlags)!=0):i7(e,i),o9=r,o7=a}case 30:}}function i1(e,t,i){for(i=i.child;null!==i;)i2(e,t,i),i=i.sibling}function i2(e,t,i){if(sW&&"function"==typeof sW.onCommitFiberUnmount)try{sW.onCommitFiberUnmount(sV,i)}catch{}switch(i.tag){case 26:if(sn){o7||iX(i,t),i1(e,t,i),i.memoizedState?sl(i.memoizedState):i.stateNode&&sh(i.stateNode);break}case 27:if(sv){o7||iX(i,t);var n=ln,r=lr;sM(i.type)&&(ln=i.stateNode,lr=!1),i1(e,t,i),sS(i.stateNode),ln=n,lr=r;break}case 5:o7||iX(i,t);case 6:if(rH){if(n=ln,r=lr,ln=null,i1(e,t,i),ln=n,lr=r,null!==ln)if(lr)try{am(ln,i.stateNode)}catch(e){nW(i,t,e)}else try{ap(ln,i.stateNode)}catch(e){nW(i,t,e)}}else i1(e,t,i);break;case 18:rH&&null!==ln&&(lr?a5(ln,i.stateNode):a4(ln,i.stateNode));break;case 4:rH?(n=ln,r=lr,ln=i.stateNode.containerInfo,lr=!0,i1(e,t,i),ln=n,lr=r):(rG&&iJ(i.stateNode,i,ab()),i1(e,t,i));break;case 0:case 11:case 14:case 15:iG(2,i,t),o7||iG(4,i,t),i1(e,t,i);break;case 1:o7||(iX(i,t),"function"==typeof(n=i.stateNode).componentWillUnmount&&iW(i,t,n)),i1(e,t,i);break;case 21:default:i1(e,t,i);break;case 22:o7=(n=o7)||null!==i.memoizedState,i1(e,t,i),o7=n}}function i3(e,t){if(rV&&null===t.memoizedState&&null!==(e=t.alternate)&&null!==(e=e.memoizedState)){e=e.dehydrated;try{a0(e)}catch(e){nW(t,t.return,e)}}}function i4(e,t){if(rV&&null===t.memoizedState&&null!==(e=t.alternate)&&null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))try{a1(e)}catch(e){nW(t,t.return,e)}}function i5(e,t){var i=function(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new lt),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new lt),t;default:throw Error(n(435,e.tag))}}(e);t.forEach(function(t){if(!i.has(t)){i.add(t);var n=nq.bind(null,e,t);t.then(n,n)}})}function i6(e,t){var i=t.deletions;if(null!==i)for(var r=0;r<i.length;r++){var a=i[r],s=e,o=t;if(rH){var l=o;o:for(;null!==l;){switch(l.tag){case 27:if(sv){if(sM(l.type)){ln=l.stateNode,lr=!1;break o}break}case 5:ln=l.stateNode,lr=!1;break o;case 3:case 4:ln=l.stateNode.containerInfo,lr=!0;break o}l=l.return}if(null===ln)throw Error(n(160));i2(s,o,a),ln=null,lr=!1}else i2(s,o,a);null!==(s=a.alternate)&&(s.return=null),a.return=null}if(13886&t.subtreeFlags)for(t=t.child;null!==t;)i8(t,e),t=t.sibling}function i8(e,t){var i=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:i6(t,e),i9(e),4&r&&(iG(3,e,e.return),iH(3,e),iG(5,e,e.return));break;case 1:i6(t,e),i9(e),512&r&&(o7||null===i||iX(i,i.return)),64&r&&o9&&null!==(e=e.updateQueue)&&null!==(r=e.callbacks)&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===i?r:i.concat(r));break;case 26:if(sn){var a=la;if(i6(t,e),i9(e),512&r&&(o7||null===i||iX(i,i.return)),4&r){r=null!==i?i.memoizedState:null;var s=e.memoizedState;null===i?null===s?null===e.stateNode?e.stateNode=su(a,e.type,e.memoizedProps,e):sc(a,e.type,e.stateNode):e.stateNode=so(a,s,e.memoizedProps):r!==s?(null===r?null!==i.stateNode&&sh(i.stateNode):sl(r),null===s?sc(a,e.type,e.stateNode):so(a,s,e.memoizedProps)):null===s&&null!==e.stateNode&&iQ(e,e.memoizedProps,i.memoizedProps)}break}case 27:if(sv){i6(t,e),i9(e),512&r&&(o7||null===i||iX(i,i.return)),null!==i&&4&r&&iQ(e,e.memoizedProps,i.memoizedProps);break}case 5:if(i6(t,e),i9(e),512&r&&(o7||null===i||iX(i,i.return)),rH){if(32&e.flags){a=e.stateNode;try{ag(a)}catch(t){nW(e,e.return,t)}}4&r&&null!=e.stateNode&&(a=e.memoizedProps,iQ(e,a,null!==i?i.memoizedProps:a)),1024&r&&(le=!0)}else rG&&null!==e.alternate&&(e.alternate.stateNode=e.stateNode);break;case 6:if(i6(t,e),i9(e),4&r&&rH){if(null===e.stateNode)throw Error(n(162));r=e.memoizedProps,i=null!==i?i.memoizedProps:r,a=e.stateNode;try{au(a,i,r)}catch(t){nW(e,e.return,t)}}break;case 3:if(sn?(sf(),a=la,la=sa(t.containerInfo),i6(t,e),la=a):i6(t,e),i9(e),4&r){if(rH&&rV&&null!==i&&i.memoizedState.isDehydrated)try{a$(t.containerInfo)}catch(t){nW(e,e.return,t)}if(rG){r=t.containerInfo,i=t.pendingChildren;try{aE(r,i)}catch(t){nW(e,e.return,t)}}}le&&(le=!1,function e(t){if(1024&t.subtreeFlags)for(t=t.child;null!==t;){var i=t;e(i),5===i.tag&&1024&i.flags&&r6(i.stateNode),t=t.sibling}}(e));break;case 4:sn?(i=la,la=sa(e.stateNode.containerInfo),i6(t,e),i9(e),la=i):(i6(t,e),i9(e)),4&r&&rG&&iJ(e.stateNode,e,e.stateNode.pendingChildren);break;case 12:default:i6(t,e),i9(e);break;case 31:case 19:i6(t,e),i9(e),4&r&&null!==(r=e.updateQueue)&&(e.updateQueue=null,i5(e,r));break;case 13:i6(t,e),i9(e),8192&e.child.flags&&null!==e.memoizedState!=(null!==i&&null!==i.memoizedState)&&(lB=sN()),4&r&&null!==(r=e.updateQueue)&&(e.updateQueue=null,i5(e,r));break;case 22:a=null!==e.memoizedState;var o=null!==i&&null!==i.memoizedState,l=o9,u=o7;if(o9=l||a,o7=u||o,i6(t,e),o7=u,o9=l,i9(e),8192&r&&((t=e.stateNode)._visibility=a?-2&t._visibility:1|t._visibility,a&&(null===i||o||o9||o7||function e(t){for(t=t.child;null!==t;){var i=t;switch(i.tag){case 0:case 11:case 14:case 15:iG(4,i,i.return),e(i);break;case 1:iX(i,i.return);var n=i.stateNode;"function"==typeof n.componentWillUnmount&&iW(i,i.return,n),e(i);break;case 27:sv&&sS(i.stateNode);case 26:case 5:iX(i,i.return),e(i);break;case 22:null===i.memoizedState&&e(i);break;default:e(i)}t=t.sibling}}(e)),rH)){o:if(i=null,rH)for(t=e;;){if(5===t.tag||sn&&26===t.tag){if(null===i){o=i=t;try{s=o.stateNode,a?av(s):ay(o.stateNode,o.memoizedProps)}catch(e){nW(o,o.return,e)}}}else if(6===t.tag){if(null===i){o=t;try{var c=o.stateNode;a?ax(c):aS(c,o.memoizedProps)}catch(e){nW(o,o.return,e)}}}else if(18===t.tag){if(null===i){o=t;try{var h=o.stateNode;a?a6(h):a8(o.stateNode)}catch(e){nW(o,o.return,e)}}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break o;for(;null===t.sibling;){if(null===t.return||t.return===e)break o;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}}4&r&&null!==(r=e.updateQueue)&&null!==(i=r.retryQueue)&&(r.retryQueue=null,i5(e,i));case 30:case 21:}}function i9(e){var t=e.flags;if(2&t){try{for(var i,r=e.return;null!==r;){if(iq(r)){i=r;break}r=r.return}if(rH){if(null==i)throw Error(n(160));switch(i.tag){case 27:if(sv){var a=i.stateNode,s=iK(e);iZ(e,s,a);break}case 5:var o=i.stateNode;32&i.flags&&(ag(o),i.flags&=-33);var l=iK(e);iZ(e,l,o);break;case 3:case 4:var u=i.stateNode.containerInfo,c=iK(e);!function e(t,i,n){var r=t.tag;if(5===r||6===r)t=t.stateNode,i?af(n,t,i):al(n,t);else if(4!==r&&(sv&&27===r&&sM(t.type)&&(n=t.stateNode,i=null),null!==(t=t.child)))for(e(t,i,n),t=t.sibling;null!==t;)e(t,i,n),t=t.sibling}(e,c,u);break;default:throw Error(n(161))}}}catch(t){nW(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function i7(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)i0(e,t.alternate,t),t=t.sibling}function ne(e,t){var i=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(i=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==i&&(null!=e&&e.refCount++,null!=i&&en(i))}function nt(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&en(e))}function ni(e,t,i,n){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)nn(e,t,i,n),t=t.sibling}function nn(e,t,i,n){var r=t.flags;switch(t.tag){case 0:case 11:case 15:ni(e,t,i,n),2048&r&&iH(9,t);break;case 1:case 31:case 13:default:ni(e,t,i,n);break;case 3:ni(e,t,i,n),2048&r&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&en(e)));break;case 12:if(2048&r){ni(e,t,i,n),e=t.stateNode;try{var a=t.memoizedProps,s=a.id,o=a.onPostCommit;"function"==typeof o&&o(s,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(e){nW(t,t.return,e)}}else ni(e,t,i,n);break;case 23:break;case 22:a=t.stateNode,s=t.alternate,null!==t.memoizedState?2&a._visibility?ni(e,t,i,n):nr(e,t):2&a._visibility?ni(e,t,i,n):(a._visibility|=2,function e(t,i,n,r,a){for(a=a&&(10256&i.subtreeFlags)!=0,i=i.child;null!==i;){var s=i,o=s.flags;switch(s.tag){case 0:case 11:case 15:e(t,s,n,r,a),iH(8,s);break;case 23:break;case 22:var l=s.stateNode;null!==s.memoizedState?2&l._visibility?e(t,s,n,r,a):nr(t,s):(l._visibility|=2,e(t,s,n,r,a)),a&&2048&o&&ne(s.alternate,s);break;case 24:e(t,s,n,r,a),a&&2048&o&&nt(s.alternate,s);break;default:e(t,s,n,r,a)}i=i.sibling}}(e,t,i,n,(10256&t.subtreeFlags)!=0)),2048&r&&ne(s,t);break;case 24:ni(e,t,i,n),2048&r&&nt(t.alternate,t)}}function nr(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var i=t,n=i.flags;switch(i.tag){case 22:nr(e,i),2048&n&&ne(i.alternate,i);break;case 24:nr(e,i),2048&n&&nt(i.alternate,i);break;default:nr(e,i)}t=t.sibling}}function na(e,t,i){if(e.subtreeFlags&ls)for(e=e.child;null!==e;)ns(e,t,i),e=e.sibling}function ns(e,t,i){switch(e.tag){case 26:if(na(e,t,i),e.flags&ls)if(null!==e.memoizedState)sg(i,la,e.memoizedState,e.memoizedProps);else{var n=e.stateNode,r=e.type;e=e.memoizedProps,((0x13ffff40&t)===t||r$(r,e))&&r2(i,n,r,e)}break;case 5:na(e,t,i),e.flags&ls&&(n=e.stateNode,r=e.type,e=e.memoizedProps,((0x13ffff40&t)===t||r$(r,e))&&r2(i,n,r,e));break;case 3:case 4:sn?(n=la,la=sa(e.stateNode.containerInfo),na(e,t,i),la=n):na(e,t,i);break;case 22:null===e.memoizedState&&(null!==(n=e.alternate)&&null!==n.memoizedState?(n=ls,ls=0x1000000,na(e,t,i),ls=n):na(e,t,i));break;default:na(e,t,i)}}function no(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(null!==e)}}function nl(e){var t=e.deletions;if((16&e.flags)!=0){if(null!==t)for(var i=0;i<t.length;i++){var n=t[i];li=n,nc(n,e)}no(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)nu(e),e=e.sibling}function nu(e){switch(e.tag){case 0:case 11:case 15:nl(e),2048&e.flags&&iG(9,e,e.return);break;case 3:case 12:default:nl(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&2&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-3,function e(t){var i=t.deletions;if((16&t.flags)!=0){if(null!==i)for(var n=0;n<i.length;n++){var r=i[n];li=r,nc(r,t)}no(t)}for(t=t.child;null!==t;){switch((i=t).tag){case 0:case 11:case 15:iG(8,i,i.return),e(i);break;case 22:2&(n=i.stateNode)._visibility&&(n._visibility&=-3,e(i));break;default:e(i)}t=t.sibling}}(e)):nl(e)}}function nc(e,t){for(;null!==li;){var i=li;switch(i.tag){case 0:case 11:case 15:iG(8,i,t);break;case 23:case 22:if(null!==i.memoizedState&&null!==i.memoizedState.cachePool){var n=i.memoizedState.cachePool.pool;null!=n&&n.refCount++}break;case 24:en(i.memoizedState.cache)}if(null!==(n=i.child))n.return=i,li=n;else for(i=e;null!==li;){var r=(n=li).sibling,a=n.return;if(function e(t){var i=t.alternate;null!==i&&(t.alternate=null,e(i)),t.child=null,t.deletions=null,t.sibling=null,5===t.tag&&null!==(i=t.stateNode)&&rK(i),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}(n),n===i){li=null;break}if(null!==r){r.return=a,li=r;break}li=a}}}function nh(e){var t=rW(e);if(null!=t){if("string"!=typeof t.memoizedProps["data-testname"])throw Error(n(364));return t}if(null===(e=ae(e)))throw Error(n(362));return e.stateNode.current}function nd(e,t){var i=e.tag;switch(t.$$typeof){case ll:if(e.type===t.value)return!0;break;case lu:o:{for(t=t.value,e=[e,0],i=0;i<e.length;){var r=e[i++],a=r.tag,s=e[i++],o=t[s];if(5!==a&&26!==a&&27!==a||!an(r)){for(;null!=o&&nd(r,o);)o=t[++s];if(s===t.length){t=!0;break o}for(r=r.child;null!==r;)e.push(r,s),r=r.sibling}}t=!1}return t;case lc:if((5===i||26===i||27===i)&&ar(e.stateNode,t.value))return!0;break;case ld:if((5===i||6===i||26===i||27===i)&&null!==(e=ai(e))&&0<=e.indexOf(t.value))return!0;break;case lh:if((5===i||26===i||27===i)&&"string"==typeof(e=e.memoizedProps["data-testname"])&&e.toLowerCase()===t.value.toLowerCase())return!0;break;default:throw Error(n(365))}return!1}function nf(e){switch(e.$$typeof){case ll:return"<"+(l(e.value)||"Unknown")+">";case lu:return":has("+(nf(e)||"")+")";case lc:return'[role="'+e.value+'"]';case ld:return'"'+e.value+'"';case lh:return'[data-testname="'+e.value+'"]';default:throw Error(n(365))}}function np(e,t){var i=[];e=[e,0];for(var n=0;n<e.length;){var r=e[n++],a=r.tag,s=e[n++],o=t[s];if(5!==a&&26!==a&&27!==a||!an(r)){for(;null!=o&&nd(r,o);)o=t[++s];if(s===t.length)i.push(r);else for(r=r.child;null!==r;)e.push(r,s),r=r.sibling}}return i}function nm(e,t){if(!r7)throw Error(n(363));e=np(e=nh(e),t),t=[],e=Array.from(e);for(var i=0;i<e.length;){var r=e[i++],a=r.tag;if(5===a||26===a||27===a)an(r)||t.push(r.stateNode);else for(r=r.child;null!==r;)e.push(r),r=r.sibling}return t}function ng(){return(2&lm)!=0&&0!==lx?lx&-lx:null!==rb.T?ed():rQ()}function nv(){if(0===lR)if((0x20000000&lx)==0||ot){var e=sP;(3932160&(sP<<=1))==0&&(sP=262144),lR=e}else lR=0x20000000;return null!==(e=ok.current)&&(e.flags|=32),lR}function nx(e,t,i){(e===lg&&(2===ly||9===ly)||null!==e.cancelPendingCommit)&&(nw(e,0),nA(e,lx,lR,!1)),v(e,i),((2&lm)==0||e!==lg)&&(e===lg&&((2&lm)==0&&(l_|=i),4===lT&&nA(e,lx,lR,!1)),ea(e))}function ny(e,t,i){if((6&lm)!=0)throw Error(n(327));for(var r=!i&&(127&t)==0&&(t&e.expiredLanes)==0||p(e,t),a=r?function(e,t){var i=lm;lm|=2;var r=n_(),a=nC();lg!==e||lx!==t?(lF=null,lN=sN()+500,nw(e,t)):lM=p(e,t);o:for(;;)try{if(0!==ly&&null!==lv){t=lv;var s=lS;l:switch(ly){case 1:ly=0,lS=null,nL(e,t,s,1);break;case 2:case 9:if(ex(s)){ly=0,lS=null,nI(t);break}t=function(){2!==ly&&9!==ly||lg!==e||(ly=7),ea(e)},s.then(t,t);break o;case 3:ly=7;break o;case 4:ly=5;break o;case 7:ex(s)?(ly=0,lS=null,nI(t)):(ly=0,lS=null,nL(e,t,s,7));break;case 5:var o=null;switch(lv.tag){case 26:o=lv.memoizedState;case 5:case 27:var l=lv,u=l.type,c=l.pendingProps;if(o?sm(o):r0(l.stateNode,u,c)){ly=0,lS=null;var h=l.sibling;if(null!==h)lv=h;else{var d=l.return;null!==d?(lv=d,nB(d)):lv=null}break l}}ly=0,lS=null,nL(e,t,s,5);break;case 6:ly=0,lS=null,nL(e,t,s,6);break;case 8:nb(),lT=6;break o;default:throw Error(n(462))}}for(;null!==lv&&!sB();)nD(lv);break}catch(t){nT(e,t)}return oo=os=null,rb.H=r,rb.A=a,lm=i,null!==lv?0:(lg=null,lx=0,e_(),lT)}(e,t):nP(e,t,!0),s=r;;){if(0===a)lM&&!r&&nA(e,t,0,!1);else{if(i=e.current.alternate,s&&!function(e){for(var t=e;;){var i=t.tag;if((0===i||11===i||15===i)&&16384&t.flags&&null!==(i=t.updateQueue)&&null!==(i=i.stores))for(var n=0;n<i.length;n++){var r=i[n],a=r.getSnapshot;r=r.value;try{if(!sj(a(),r))return!1}catch{return!1}}if(i=t.child,16384&t.subtreeFlags&&null!==i)i.return=t,t=i;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)){a=nP(e,t,!1),s=!1;continue}if(2===a){if(s=t,e.errorRecoveryDisabledLanes&s)var o=0;else o=0!=(o=-0x20000001&e.pendingLanes)?o:0x20000000&o?0x20000000:0;if(0!==o){t=o;o:{a=lD;var l=rV&&e.current.memoizedState.isDehydrated;if(l&&(nw(e,o).flags|=256),2!==(o=nP(e,o,!1))){if(lb&&!l){e.errorRecoveryDisabledLanes|=s,l_|=s,a=4;break o}s=lI,lI=a,null!==s&&(null===lI?lI=s:lI.push.apply(lI,s))}a=o}if(s=!1,2!==a)continue}}if(1===a){nw(e,0),nA(e,t,0,!0);break}o:{switch(r=e,s=a){case 0:case 1:throw Error(n(345));case 4:if((4194048&t)!==t)break;case 6:nA(r,t,lR,!lA);break o;case 2:lI=null;break;case 3:case 5:break;default:throw Error(n(329))}if((0x3c00000&t)===t&&10<(a=lB+300-sN())){if(nA(r,t,lR,!lA),0!==f(r,0,!0))break o;lG=t,r.timeoutHandle=rF(nS.bind(null,r,i,lI,lF,lL,t,lR,l_,lP,lA,s,"Throttled",-0,0),a);break o}nS(r,i,lI,lF,lL,t,lR,l_,lP,lA,s,null,-0,0)}}break}ea(e)}function nS(e,t,i,n,r,a,s,o,l,u,c,h,d,f){if(e.timeoutHandle=rz,8192&(h=t.subtreeFlags)||(0x1002000&h)==0x1002000){ns(t,a,h=r1());var p=(0x3c00000&a)===a?lB-sN():(4194048&a)===a?lU-sN():0;if(null!==(p=r3(h,p))){lG=a,e.cancelPendingCommit=p(nN.bind(null,e,t,a,i,n,r,s,o,l,c,h,null,d,f)),nA(e,a,s,!u);return}}nN(e,t,a,i,n,r,s,o,l)}function nA(e,t,i,n){t&=~lC,t&=~l_,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var r=t;0<r;){var a=31-sE(r),s=1<<a;n[a]=-1,r&=~s}0!==i&&x(e,i,t)}function nM(){return(6&lm)!=0||(es(0,!1),!1)}function nb(){if(null!==lv){if(0===ly)var e=lv.return;else e=lv,oo=os=null,e6(e),oR=null,oP=0,e=lv;for(;null!==e;)ik(e.alternate,e),e=e.return;lv=null}}function nw(e,t){var i=e.timeoutHandle;i!==rz&&(e.timeoutHandle=rz,rO(i)),null!==(i=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,i()),lG=0,nb(),lg=e,lv=i=nJ(e.current,null),lx=t,ly=0,lS=null,lA=!1,lM=p(e,t),lb=!1,lP=lR=lC=l_=lE=lT=0,lI=lD=null,lL=!1,(8&t)!=0&&(t|=32&t);var n=e.entangledLanes;if(0!==n)for(e=e.entanglements,n&=t;0<n;){var r=31-sE(n),a=1<<r;t|=e[r],n&=~a}return lw=t,e_(),i}function nT(e,t){oW=null,rb.H=o0,t===ow||t===oE?(t=eA(),ly=3):t===oT?(t=eA(),ly=4):ly=t===o5?8:null!==t&&"object"==typeof t&&"function"==typeof t.then?6:1,lS=t,null===lv&&(lT=1,t6(e,R(t,e.current)))}function nE(){var e=ok.current;return null===e||((4194048&lx)===lx?null===oH:((0x3c00000&lx)===lx||(0x20000000&lx)!=0)&&e===oH)}function n_(){var e=rb.H;return rb.H=o0,null===e?o0:e}function nC(){var e=rb.A;return rb.A=lo,e}function nR(){lT=4,lA||(4194048&lx)!==lx&&null!==ok.current||(lM=!0),(0x7ffffff&lE)==0&&(0x7ffffff&l_)==0||null===lg||nA(lg,lx,lR,!1)}function nP(e,t,i){var n=lm;lm|=2;var r=n_(),a=nC();(lg!==e||lx!==t)&&(lF=null,nw(e,t)),t=!1;var s=lT;o:for(;;)try{if(0!==ly&&null!==lv){var o=lv,l=lS;switch(ly){case 8:nb(),s=6;break o;case 3:case 2:case 9:case 6:null===ok.current&&(t=!0);var u=ly;if(ly=0,lS=null,nL(e,o,l,u),i&&lM){s=0;break o}break;default:u=ly,ly=0,lS=null,nL(e,o,l,u)}}(function(){for(;null!==lv;)nD(lv)})(),s=lT;break}catch(t){nT(e,t)}return t&&e.shellSuspendCounter++,oo=os=null,lm=n,rb.H=r,rb.A=a,null===lv&&(lg=null,lx=0,e_()),s}function nD(e){var t=iC(e.alternate,e,lw);e.memoizedProps=e.pendingProps,null===t?nB(e):lv=t}function nI(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=ip(i,t,t.pendingProps,t.type,void 0,lx);break;case 11:t=ip(i,t,t.pendingProps,t.type.render,t.ref,lx);break;case 5:e6(t);default:ik(i,t),t=iC(i,t=lv=n$(t,lw),lw)}e.memoizedProps=e.pendingProps,null===t?nB(e):lv=t}function nL(e,t,i,r){oo=os=null,e6(t),oR=null,oP=0;var a=t.return;try{if(function(e,t,i,r,a){if(i.flags|=32768,null!==r&&"object"==typeof r&&"function"==typeof r.then){if(null!==(t=i.alternate)&&K(t,i,a,!0),null!==(i=ok.current)){switch(i.tag){case 31:case 13:return null===oH?nR():null===i.alternate&&0===lT&&(lT=3),i.flags&=-257,i.flags|=65536,i.lanes=a,r===o_?i.flags|=16384:(null===(t=i.updateQueue)?i.updateQueue=new Set([r]):t.add(r),nj(e,r,a)),!1;case 22:return i.flags|=65536,r===o_?i.flags|=16384:(null===(t=i.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},i.updateQueue=t):null===(i=t.retryQueue)?t.retryQueue=new Set([r]):i.add(r),nj(e,r,a)),!1}throw Error(n(435,i.tag))}return nj(e,r,a),nR(),!1}if(ot)return null!==(t=ok.current)?((65536&t.flags)==0&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==or&&j(R(e=Error(n(422),{cause:r}),i))):(r!==or&&j(R(t=Error(n(423),{cause:r}),i)),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=R(r,i),a=t9(e.stateNode,r,a),eO(e,a),4!==lT&&(lT=2)),!1;var s=Error(n(520),{cause:r});if(s=R(s,i),null===lD?lD=[s]:lD.push(s),4!==lT&&(lT=2),null===t)return!0;r=R(r,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=a&-a,i.lanes|=e,e=t9(i.stateNode,r,e),eO(i,e),!1;case 1:if(t=i.type,s=i.stateNode,(128&i.flags)==0&&("function"==typeof t.getDerivedStateFromError||null!==s&&"function"==typeof s.componentDidCatch&&(null===lO||!lO.has(s))))return i.flags|=65536,a&=-a,i.lanes|=a,ie(a=t7(a),e,i,r),eO(i,a),!1}i=i.return}while(null!==i)return!1}(e,a,t,i,lx)){lT=1,t6(e,R(i,e.current)),lv=null;return}}catch(t){if(null!==a)throw lv=a,t;lT=1,t6(e,R(i,e.current)),lv=null;return}32768&t.flags?(ot||1===r?e=!0:lM||(0x20000000&lx)!=0?e=!1:(lA=e=!0,(2===r||9===r||3===r||6===r)&&null!==(r=ok.current)&&13===r.tag&&(r.flags|=16384)),nU(t,e)):nB(t)}function nB(e){var t=e;do{if((32768&t.flags)!=0)return void nU(t,lA);e=t.return;var i=function(e,t,i){var r=t.pendingProps;switch(L(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return iz(t),null;case 3:return i=t.stateNode,r=null,null!==e&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Y(oh),N(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(null===e||null===e.child)&&(G(t)?iR(t):null===e||e.memoizedState.isDehydrated&&(256&t.flags)==0||(t.flags|=1024,W())),iL(e,t),iz(t),null;case 26:if(sn){var a=t.type,s=t.memoizedState;return null===e?(iR(t),null!==s?(iz(t),iN(t,s)):(iz(t),iU(t,a,null,r,i))):s?s!==e.memoizedState?(iR(t),iz(t),iN(t,s)):(iz(t),t.flags&=-0x1000001):(s=e.memoizedProps,rH?s!==r&&iR(t):iB(e,t,a,r),iz(t),iU(t,a,s,r,i)),null}case 27:if(sv){if(O(t),i=s8.current,a=t.type,null!==e&&null!=t.stateNode)rH?e.memoizedProps!==r&&iR(t):iB(e,t,a,r);else{if(!r){if(null===t.stateNode)throw Error(n(166));return iz(t),null}e=s5.current,G(t)?k(t,e):(t.stateNode=e=sx(a,r,i,e,!0),iR(t))}return iz(t),null}case 5:if(O(t),a=t.type,null!==e&&null!=t.stateNode)iB(e,t,a,r);else{if(!r){if(null===t.stateNode)throw Error(n(166));return iz(t),null}if(s=s5.current,G(t))k(t,s),a2(t.stateNode,a,r,s)&&(t.flags|=64);else{var o=rI(a,r,s8.current,s,t);iP(t),iI(o,t,!1,!1),t.stateNode=o,rB(o,a,r,s)&&iR(t)}}return iz(t),iU(t,t.type,null===e?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&null!=t.stateNode)i=e.memoizedProps,rH?i!==r&&iR(t):rG&&(i!==r?(e=s8.current,i=s5.current,iP(t),t.stateNode=rN(r,e,i,t)):t.stateNode=e.stateNode);else{if("string"!=typeof r&&null===t.stateNode)throw Error(n(166));if(e=s8.current,i=s5.current,G(t)){if(!rV)throw Error(n(176));if(e=t.stateNode,i=t.memoizedProps,r=null,null!==(a=s7))switch(a.tag){case 27:case 5:r=a.memoizedProps}aY(e,i,t,r)||z(t,!0)}else iP(t),t.stateNode=rN(r,e,i,t)}return iz(t),null;case 31:if(i=t.memoizedState,null===e||null!==e.memoizedState){if(r=G(t),null!==i){if(null===e){if(!r)throw Error(n(318));if(!rV)throw Error(n(556));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(n(557));aQ(e,t)}else V(),(128&t.flags)==0&&(t.memoizedState=null),t.flags|=4;iz(t),e=!1}else i=W(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return 256&t.flags?(eK(t),t):(eK(t),null);if((128&t.flags)!=0)throw Error(n(558))}return iz(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(a=G(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(n(318));if(!rV)throw Error(n(344));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(n(317));aq(a,t)}else V(),(128&t.flags)==0&&(t.memoizedState=null),t.flags|=4;iz(t),a=!1}else a=W(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return 256&t.flags?(eK(t),t):(eK(t),null)}return eK(t),(128&t.flags)!=0?(t.lanes=i,t):(i=null!==r,e=null!==e&&null!==e.memoizedState,i&&(r=t.child,a=null,null!==r.alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(a=r.alternate.memoizedState.cachePool.pool),s=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(s=r.memoizedState.cachePool.pool),s!==a&&(r.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),iF(t,t.updateQueue),iz(t),null);case 4:return N(),iL(e,t),null===e&&rj(t.stateNode.containerInfo),iz(t),null;case 10:return Y(t.type),iz(t),null;case 19:if(c(oG),null===(r=t.memoizedState))return iz(t),null;if(a=(128&t.flags)!=0,null===(s=r.rendering))if(a)iO(r,!1);else{if(0!==lT||null!==e&&(128&e.flags)!=0)for(e=t.child;null!==e;){if(null!==(s=eZ(e))){for(t.flags|=128,iO(r,!1),t.updateQueue=e=s.updateQueue,iF(t,e),t.subtreeFlags=0,e=i,i=t.child;null!==i;)n$(i,e),i=i.sibling;return h(oG,1&oG.current|2),ot&&P(t,r.treeForkCount),t.child}e=e.sibling}null!==r.tail&&sN()>lN&&(t.flags|=128,a=!0,iO(r,!1),t.lanes=4194304)}else{if(!a)if(null!==(e=eZ(s))){if(t.flags|=128,a=!0,t.updateQueue=e=e.updateQueue,iF(t,e),iO(r,!0),null===r.tail&&"hidden"===r.tailMode&&!s.alternate&&!ot)return iz(t),null}else 2*sN()-r.renderingStartTime>lN&&0x20000000!==i&&(t.flags|=128,a=!0,iO(r,!1),t.lanes=4194304);r.isBackwards?(s.sibling=t.child,t.child=s):(null!==(e=r.last)?e.sibling=s:t.child=s,r.last=s)}return null!==r.tail?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=sN(),e.sibling=null,i=oG.current,h(oG,a?1&i|2:1&i),ot&&P(t,r.treeForkCount),e):(iz(t),null);case 22:case 23:return eK(t),ej(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(0x20000000&i)!=0&&(128&t.flags)==0&&(iz(t),6&t.subtreeFlags&&(t.flags|=8192)):iz(t),null!==(i=t.updateQueue)&&iF(t,i.retryQueue),i=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(i=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==i&&(t.flags|=2048),null!==e&&c(ob),null;case 24:return i=null,null!==e&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Y(oh),iz(t),null;case 25:case 30:return null}throw Error(n(156,t.tag))}(t.alternate,t,lw);if(null!==i){lv=i;return}if(null!==(t=t.sibling)){lv=t;return}lv=t=e}while(null!==t)0===lT&&(lT=5)}function nU(e,t){do{var i=function(e,t){switch(L(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Y(oh),N(),(65536&(e=t.flags))!=0&&(128&e)==0?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return O(t),null;case 31:if(null!==t.memoizedState){if(eK(t),null===t.alternate)throw Error(n(340));V()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if(eK(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(n(340));V()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return c(oG),null;case 4:return N(),null;case 10:return Y(t.type),null;case 22:case 23:return eK(t),ej(),null!==e&&c(ob),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return Y(oh),null;default:return null}}(e.alternate,e);if(null!==i){i.flags&=32767,lv=i;return}if(null!==(i=e.return)&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&null!==(e=e.sibling)){lv=e;return}lv=e=i}while(null!==e)lT=6,lv=null}function nN(e,t,i,r,a,s,o,l,u){e.cancelPendingCommit=null;do nH();while(0!==lz)if((6&lm)!=0)throw Error(n(327));if(null!==t){if(t===e.current)throw Error(n(177));if(function(e,t,i,n,r,a){var s=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var o=e.entanglements,l=e.expirationTimes,u=e.hiddenUpdates;for(i=s&~i;0<i;){var c=31-sE(i),h=1<<c;o[c]=0,l[c]=-1;var d=u[c];if(null!==d)for(u[c]=null,c=0;c<d.length;c++){var f=d[c];null!==f&&(f.lane&=-0x20000001)}i&=~h}0!==n&&x(e,n,0),0!==a&&0===r&&0!==e.tag&&(e.suspendedLanes|=a&~(s&~t))}(e,i,s=t.lanes|t.childLanes|oU,o,l,u),e===lg&&(lv=lg=null,lx=0),lH=t,lk=e,lG=i,lV=s,lW=a,lj=r,(10256&t.subtreeFlags)!=0||(10256&t.flags)!=0?(e.callbackNode=null,e.callbackPriority=0,sI(sz,function(){return nG(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(13878&t.flags)!=0,(13878&t.subtreeFlags)!=0||r){r=rb.T,rb.T=null,a=rY(),rX(2),o=lm,lm|=4;try{!function(e,t){for(rP(e.containerInfo),li=t;null!==li;)if(t=(e=li).child,(1028&e.subtreeFlags)!=0&&null!==t)t.return=e,li=t;else for(;null!==li;){var i=(e=li).alternate;switch(t=e.flags,e.tag){case 0:if((4&t)!=0&&null!==(t=null!==(t=e.updateQueue)?t.events:null))for(var r=0;r<t.length;r++){var a=t[r];a.ref.impl=a.nextImpl}break;case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if((1024&t)!=0&&null!==i){t=void 0,r=e,a=i.memoizedProps,i=i.memoizedState;var s=r.stateNode;try{var o=t5(r.type,a);t=s.getSnapshotBeforeUpdate(o,i),s.__reactInternalSnapshotBeforeUpdate=t}catch(e){nW(r,r.return,e)}}break;case 3:(1024&t)!=0&&rH&&aA(e.stateNode.containerInfo);break;default:if((1024&t)!=0)throw Error(n(163))}if(null!==(t=e.sibling)){t.return=e.return,li=t;break}li=e.return}}(e,t)}finally{lm=o,rX(a),rb.T=r}}lz=1,nF(),nO(),nz()}}function nF(){if(1===lz){lz=0;var e=lk,t=lH,i=(13878&t.flags)!=0;if((13878&t.subtreeFlags)!=0||i){i=rb.T,rb.T=null;var n=rY();rX(2);var r=lm;lm|=4;try{i8(t,e),rD(e.containerInfo)}finally{lm=r,rX(n),rb.T=i}}e.current=t,lz=2}}function nO(){if(2===lz){lz=0;var e=lk,t=lH,i=(8772&t.flags)!=0;if((8772&t.subtreeFlags)!=0||i){i=rb.T,rb.T=null;var n=rY();rX(2);var r=lm;lm|=4;try{i0(e,t.alternate,t)}finally{lm=r,rX(n),rb.T=i}}lz=3}}function nz(){if(4===lz||3===lz){lz=0,sU();var e=lk,t=lH,i=lG,n=lj;(10256&t.subtreeFlags)!=0||(10256&t.flags)!=0?lz=5:(lz=0,lH=lk=null,nk(e,e.pendingLanes));var r=e.pendingLanes;if(0===r&&(lO=null),M(i),t=t.stateNode,sW&&"function"==typeof sW.onCommitFiberRoot)try{sW.onCommitFiberRoot(sV,t,void 0,(128&t.current.flags)==128)}catch{}if(null!==n){t=rb.T,r=rY(),rX(2),rb.T=null;try{for(var a=e.onRecoverableError,s=0;s<n.length;s++){var o=n[s];a(o.value,{componentStack:o.stack})}}finally{rb.T=t,rX(r)}}(3&lG)!=0&&nH(),ea(e),r=e.pendingLanes,(261930&i)!=0&&(42&r)!=0?e===lY?lX++:(lX=0,lY=e):lX=0,rV&&a3(),es(0,!1)}}function nk(e,t){0==(e.pooledCacheLanes&=t)&&null!=(t=e.pooledCache)&&(e.pooledCache=null,en(t))}function nH(){return nF(),nO(),nz(),nG()}function nG(){if(5!==lz)return!1;var e=lk,t=lV;lV=0;var i=M(lG),r=32>i?32:i;i=rb.T;var a=rY();try{rX(r),rb.T=null,r=lW,lW=null;var s=lk,o=lG;if(lz=0,lH=lk=null,lG=0,(6&lm)!=0)throw Error(n(331));var l=lm;if(lm|=4,nu(s.current),nn(s,s.current,o,r),lm=l,es(0,!1),sW&&"function"==typeof sW.onPostCommitFiberRoot)try{sW.onPostCommitFiberRoot(sV,s)}catch{}return!0}finally{rX(a),rb.T=i,nk(e,t)}}function nV(e,t,i){t=R(i,t),t=t9(e.stateNode,t,2),null!==(e=eN(e,t,2))&&(v(e,2),ea(e))}function nW(e,t,i){if(3===e.tag)nV(e,e,i);else for(;null!==t;){if(3===t.tag){nV(t,e,i);break}if(1===t.tag){var n=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof n.componentDidCatch&&(null===lO||!lO.has(n))){e=R(i,e),null!==(n=eN(t,i=t7(2),2))&&(ie(i,n,t,e),v(n,2),ea(n));break}}t=t.return}}function nj(e,t,i){var n=e.pingCache;if(null===n){n=e.pingCache=new lp;var r=new Set;n.set(t,r)}else void 0===(r=n.get(t))&&(r=new Set,n.set(t,r));r.has(i)||(lb=!0,r.add(i),e=nX.bind(null,e,t,i),t.then(e,e))}function nX(e,t,i){var n=e.pingCache;null!==n&&n.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,lg===e&&(lx&i)===i&&(4===lT||3===lT&&(0x3c00000&lx)===lx&&300>sN()-lB?(2&lm)==0&&nw(e,0):lC|=i,lP===lx&&(lP=0)),ea(e)}function nY(e,t){0===t&&(t=m()),null!==(e=eP(e,t))&&(v(e,t),ea(e))}function nQ(e){var t=e.memoizedState,i=0;null!==t&&(i=t.retryLane),nY(e,i)}function nq(e,t){var i=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;null!==a&&(i=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(n(314))}null!==r&&r.delete(t),nY(e,i)}function nK(e,t,i,n){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nZ(e){return!(!(e=e.prototype)||!e.isReactComponent)}function nJ(e,i){var n=e.alternate;return null===n?((n=t(e.tag,i,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=i,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=0x3e00000&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,i=e.dependencies,n.dependencies=null===i?null:{lanes:i.lanes,firstContext:i.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function n$(e,t){e.flags&=0x3e00002;var i=e.alternate;return null===i?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,e.dependencies=null===(t=i.dependencies)?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function n0(e,i,r,a,s,o){var l=0;if(a=e,"function"==typeof e)nZ(e)&&(l=1);else if("string"==typeof e)l=sn&&sv?sr(e,r,s5.current)?26:sA(e)?27:5:sn?sr(e,r,s5.current)?26:5:sv&&sA(e)?27:5;else o:switch(e){case rx:return(e=t(31,r,i,s)).elementType=rx,e.lanes=o,e;case rl:return n1(r.children,s,o,i);case ru:l=8,s|=24;break;case rc:return(e=t(12,r,i,2|s)).elementType=rc,e.lanes=o,e;case rp:return(e=t(13,r,i,s)).elementType=rp,e.lanes=o,e;case rm:return(e=t(19,r,i,s)).elementType=rm,e.lanes=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case rd:l=10;break o;case rh:l=9;break o;case rf:l=11;break o;case rg:l=14;break o;case rv:l=16,a=null;break o}l=29,r=Error(n(130,null===e?"null":typeof e,"")),a=null}return(i=t(l,r,i,s)).elementType=e,i.type=a,i.lanes=o,i}function n1(e,i,n,r){return(e=t(7,e,r,i)).lanes=n,e}function n2(e,i,n){return(e=t(6,e,null,i)).lanes=n,e}function n3(e){var i=t(18,null,null,0);return i.stateNode=e,i}function n4(e,i,n){return(i=t(4,null!==e.children?e.children:[],e.key,i)).lanes=n,i.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},i}function n5(e,t,i,n,r,a,s,o,l){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=rz,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=g(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=g(0),this.hiddenUpdates=g(null),this.identifierPrefix=n,this.onUncaughtError=r,this.onCaughtError=a,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function n6(e,i,n,r,a,s,o,l,u,c,h,d){return e=new n5(e,i,n,o,u,c,h,d,l),i=1,!0===s&&(i|=24),s=t(3,null,null,i),e.current=s,s.stateNode=e,i=ei(),i.refCount++,e.pooledCache=i,i.refCount++,s.memoizedState={element:r,isDehydrated:n,cache:i},eL(s),e}function n8(e){var t=e._reactInternals;if(void 0===t)throw"function"==typeof e.render?Error(n(188)):Error(n(268,e=Object.keys(e).join(",")));return null===(e=null!==(e=s(t))?function e(t){var i=t.tag;if(5===i||26===i||27===i||6===i)return t;for(t=t.child;null!==t;){if(null!==(i=e(t)))return i;t=t.sibling}return null}(e):null)?null:r_(e.stateNode)}function n9(e,t,i,n,r,a){r=sT,null===n.context?n.context=r:n.pendingContext=r,(n=eU(t)).payload={element:i},null!==(a=void 0===a?null:a)&&(n.callback=a),null!==(i=eN(e,n,t))&&(nx(i,e,t),eF(i,e,t))}function n7(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var i=e.retryLane;e.retryLane=0!==i&&i<t?i:t}}function re(e,t){n7(e,t),(e=e.alternate)&&n7(e,t)}var rt={},ri=E.default,rn=u6.default,rr=Object.assign,ra=Symbol.for("react.element"),rs=Symbol.for("react.transitional.element"),ro=Symbol.for("react.portal"),rl=Symbol.for("react.fragment"),ru=Symbol.for("react.strict_mode"),rc=Symbol.for("react.profiler"),rh=Symbol.for("react.consumer"),rd=Symbol.for("react.context"),rf=Symbol.for("react.forward_ref"),rp=Symbol.for("react.suspense"),rm=Symbol.for("react.suspense_list"),rg=Symbol.for("react.memo"),rv=Symbol.for("react.lazy"),rx=Symbol.for("react.activity"),ry=Symbol.for("react.memo_cache_sentinel"),rS=Symbol.iterator,rA=Symbol.for("react.client.reference"),rM=Array.isArray,rb=ri.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,rw=e.rendererVersion,rT=e.rendererPackageName,rE=e.extraDevToolsConfig,r_=e.getPublicInstance,rC=e.getRootHostContext,rR=e.getChildHostContext,rP=e.prepareForCommit,rD=e.resetAfterCommit,rI=e.createInstance;e.cloneMutableInstance;var rL=e.appendInitialChild,rB=e.finalizeInitialChildren,rU=e.shouldSetTextContent,rN=e.createTextInstance;e.cloneMutableTextInstance;var rF=e.scheduleTimeout,rO=e.cancelTimeout,rz=e.noTimeout,rk=e.isPrimaryRenderer;e.warnsIfNotActing;var rH=e.supportsMutation,rG=e.supportsPersistence,rV=e.supportsHydration,rW=e.getInstanceFromNode;e.beforeActiveInstanceBlur;var rj=e.preparePortalMount;e.prepareScopeUpdate,e.getInstanceFromScope;var rX=e.setCurrentUpdatePriority,rY=e.getCurrentUpdatePriority,rQ=e.resolveUpdatePriority;e.trackSchedulerEvent,e.resolveEventType,e.resolveEventTimeStamp;var rq=e.shouldAttemptEagerTransition,rK=e.detachDeletedInstance;e.requestPostPaintCallback;var rZ=e.maySuspendCommit,rJ=e.maySuspendCommitOnUpdate,r$=e.maySuspendCommitInSyncRender,r0=e.preloadInstance,r1=e.startSuspendingCommit,r2=e.suspendInstance;e.suspendOnActiveViewTransition;var r3=e.waitForCommitToBeReady;e.getSuspendedCommitReason;var r4=e.NotPendingTransition,r5=e.HostTransitionContext,r6=e.resetFormInstance;e.bindToConsole;var r8=e.supportsMicrotasks,r9=e.scheduleMicrotask,r7=e.supportsTestSelectors,ae=e.findFiberRoot,at=e.getBoundingRect,ai=e.getTextContent,an=e.isHiddenSubtree,ar=e.matchAccessibilityRole,aa=e.setFocusIfFocusable,as=e.setupIntersectionObserver,ao=e.appendChild,al=e.appendChildToContainer,au=e.commitTextUpdate,ac=e.commitMount,ah=e.commitUpdate,ad=e.insertBefore,af=e.insertInContainerBefore,ap=e.removeChild,am=e.removeChildFromContainer,ag=e.resetTextContent,av=e.hideInstance,ax=e.hideTextInstance,ay=e.unhideInstance,aS=e.unhideTextInstance;e.cancelViewTransitionName,e.cancelRootViewTransitionName,e.restoreRootViewTransitionName,e.cloneRootViewTransitionContainer,e.removeRootViewTransitionClone,e.measureClonedInstance,e.hasInstanceChanged,e.hasInstanceAffectedParent,e.startViewTransition,e.startGestureTransition,e.stopViewTransition,e.getCurrentGestureOffset,e.createViewTransitionInstance;var aA=e.clearContainer;e.createFragmentInstance,e.updateFragmentInstanceFiber,e.commitNewChildToFragmentInstance,e.deleteChildFromFragmentInstance;var aM=e.cloneInstance,ab=e.createContainerChildSet,aw=e.appendChildToContainerChildSet,aT=e.finalizeContainerChildren,aE=e.replaceContainerChildren,a_=e.cloneHiddenInstance,aC=e.cloneHiddenTextInstance,aR=e.isSuspenseInstancePending,aP=e.isSuspenseInstanceFallback,aD=e.getSuspenseInstanceFallbackErrorDetails,aI=e.registerSuspenseInstanceRetry,aL=e.canHydrateFormStateMarker,aB=e.isFormStateMarkerMatching,aU=e.getNextHydratableSibling,aN=e.getNextHydratableSiblingAfterSingleton,aF=e.getFirstHydratableChild,aO=e.getFirstHydratableChildWithinContainer,az=e.getFirstHydratableChildWithinActivityInstance,ak=e.getFirstHydratableChildWithinSuspenseInstance,aH=e.getFirstHydratableChildWithinSingleton,aG=e.canHydrateInstance,aV=e.canHydrateTextInstance,aW=e.canHydrateActivityInstance,aj=e.canHydrateSuspenseInstance,aX=e.hydrateInstance,aY=e.hydrateTextInstance,aQ=e.hydrateActivityInstance,aq=e.hydrateSuspenseInstance,aK=e.getNextHydratableInstanceAfterActivityInstance,aZ=e.getNextHydratableInstanceAfterSuspenseInstance,aJ=e.commitHydratedInstance,a$=e.commitHydratedContainer,a0=e.commitHydratedActivityInstance,a1=e.commitHydratedSuspenseInstance,a2=e.finalizeHydratedChildren,a3=e.flushHydrationEvents;e.clearActivityBoundary;var a4=e.clearSuspenseBoundary;e.clearActivityBoundaryFromContainer;var a5=e.clearSuspenseBoundaryFromContainer,a6=e.hideDehydratedBoundary,a8=e.unhideDehydratedBoundary,a9=e.shouldDeleteUnhydratedTailInstances;e.diffHydratedPropsForDevWarnings,e.diffHydratedTextForDevWarnings,e.describeHydratableInstanceForDevWarnings;var a7,se,st=e.validateHydratableInstance,si=e.validateHydratableTextInstance,sn=e.supportsResources,sr=e.isHostHoistableType,sa=e.getHoistableRoot,ss=e.getResource,so=e.acquireResource,sl=e.releaseResource,su=e.hydrateHoistable,sc=e.mountHoistable,sh=e.unmountHoistable,sd=e.createHoistableInstance,sf=e.prepareToCommitHoistables,sp=e.mayResourceSuspendCommit,sm=e.preloadResource,sg=e.suspendResource,sv=e.supportsSingletons,sx=e.resolveSingletonInstance,sy=e.acquireSingletonInstance,sS=e.releaseSingletonInstance,sA=e.isHostSingletonType,sM=e.isSingletonScope,sb=[],sw=-1,sT={},sE=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(s_(e)/sC|0)|0},s_=Math.log,sC=Math.LN2,sR=256,sP=262144,sD=4194304,sI=rn.unstable_scheduleCallback,sL=rn.unstable_cancelCallback,sB=rn.unstable_shouldYield,sU=rn.unstable_requestPaint,sN=rn.unstable_now,sF=rn.unstable_ImmediatePriority,sO=rn.unstable_UserBlockingPriority,sz=rn.unstable_NormalPriority,sk=rn.unstable_IdlePriority,sH=rn.log,sG=rn.unstable_setDisableYieldValue,sV=null,sW=null,sj="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},sX="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof T.default&&"function"==typeof T.default.emit)return void T.default.emit("uncaughtException",e);console.error(e)},sY=Object.prototype.hasOwnProperty,sQ=!1,sq=new WeakMap,sK=[],sZ=0,sJ=null,s$=0,s0=[],s1=0,s2=null,s3=1,s4="",s5=u(null),s6=u(null),s8=u(null),s9=u(null),s7=null,oe=null,ot=!1,oi=null,on=!1,or=Error(n(519)),oa=u(null),os=null,oo=null,ol="u">typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ou=rn.unstable_scheduleCallback,oc=rn.unstable_NormalPriority,oh={$$typeof:rd,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0},od=null,of=null,op=!1,om=!1,og=!1,ov=0,ox=null,oy=0,oS=0,oA=null,oM=rb.S;rb.S=function(e,t){lU=sN(),"object"==typeof t&&null!==t&&"function"==typeof t.then&&function(e){if(null===ox){var t=ox=[];oy=0,oS=ed(),oA={status:"pending",value:void 0,then:function(e){t.push(e)}}}oy++,e.then(ef,ef)}(t),null!==oM&&oM(e,t)};var ob=u(null),ow=Error(n(460)),oT=Error(n(474)),oE=Error(n(542)),o_={then:function(){}},oC=null,oR=null,oP=0,oD=eE(!0),oI=eE(!1),oL=[],oB=0,oU=0,oN=!1,oF=!1,oO=u(null),oz=u(0),ok=u(null),oH=null,oG=u(0),oV=0,oW=null,oj=null,oX=null,oY=!1,oQ=!1,oq=!1,oK=0,oZ=0,oJ=null,o$=0,o0={readContext:$,use:tt,useCallback:eJ,useContext:eJ,useEffect:eJ,useImperativeHandle:eJ,useLayoutEffect:eJ,useInsertionEffect:eJ,useMemo:eJ,useReducer:eJ,useRef:eJ,useState:eJ,useDebugValue:eJ,useDeferredValue:eJ,useTransition:eJ,useSyncExternalStore:eJ,useId:eJ,useHostTransitionStatus:eJ,useFormState:eJ,useActionState:eJ,useOptimistic:eJ,useMemoCache:eJ,useCacheRefresh:eJ};o0.useEffectEvent=eJ;var o1={readContext:$,use:tt,useCallback:function(e,t){return e8().memoizedState=[e,void 0===t?null:t],e},useContext:$,useEffect:tD,useImperativeHandle:function(e,t,i){i=null!=i?i.concat([e]):null,tR(4194308,4,tN.bind(null,t,e),i)},useLayoutEffect:function(e,t){return tR(4194308,4,e,t)},useInsertionEffect:function(e,t){tR(4,2,e,t)},useMemo:function(e,t){var i=e8();t=void 0===t?null:t;var n=e();return i.memoizedState=[n,t],n},useReducer:function(e,t,i){var n=e8();if(void 0!==i)var r=i(t);else r=t;return n.memoizedState=n.baseState=r,n.queue=e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},e=e.dispatch=tq.bind(null,oW,e),[n.memoizedState,e]},useRef:function(e){return e8().memoizedState={current:e}},useState:function(e){var t=(e=tf(e)).queue,i=tK.bind(null,oW,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:tO,useDeferredValue:function(e,t){return tH(e8(),e,t)},useTransition:function(){var e=tf(!1);return e=tV.bind(null,oW,e.queue,!0,!1),e8().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var r=oW,a=e8();if(ot){if(void 0===i)throw Error(n(407));i=i()}else{if(i=t(),null===lg)throw Error(n(349));(127&lx)!=0||tl(r,t,i)}a.memoizedState=i;var s={value:i,getSnapshot:t};return a.queue=s,tD(tc.bind(null,r,s,e),[e]),r.flags|=2048,t_(9,{destroy:void 0},tu.bind(null,r,s,i,t),null),i},useId:function(){var e=e8(),t=lg.identifierPrefix;if(ot){var i=s4,n=s3;t="_"+t+"R_"+(i=(n&~(1<<32-sE(n)-1)).toString(32)+i),0<(i=oK++)&&(t+="H"+i.toString(32)),t+="_"}else t="_"+t+"r_"+(i=o$++).toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:tj,useFormState:tM,useActionState:tM,useOptimistic:function(e){var t=e8();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=tJ.bind(null,oW,!0,i),i.dispatch=t,[e,t]},useMemoCache:ti,useCacheRefresh:function(){return e8().memoizedState=tQ.bind(null,oW)},useEffectEvent:function(e){var t=e8(),i={impl:e};return t.memoizedState=i,function(){if((2&lm)!=0)throw Error(n(440));return i.impl.apply(void 0,arguments)}}},o2={readContext:$,use:tt,useCallback:tz,useContext:$,useEffect:tI,useImperativeHandle:tF,useInsertionEffect:tB,useLayoutEffect:tU,useMemo:tk,useReducer:tr,useRef:tC,useState:function(){return tr(tn)},useDebugValue:tO,useDeferredValue:function(e,t){return tG(e9(),oj.memoizedState,e,t)},useTransition:function(){var e=tr(tn)[0],t=e9().memoizedState;return["boolean"==typeof e?e:te(e),t]},useSyncExternalStore:to,useId:tX,useHostTransitionStatus:tj,useFormState:tb,useActionState:tb,useOptimistic:function(e,t){return tp(e9(),oj,e,t)},useMemoCache:ti,useCacheRefresh:tY};o2.useEffectEvent=tL;var o3={readContext:$,use:tt,useCallback:tz,useContext:$,useEffect:tI,useImperativeHandle:tF,useInsertionEffect:tB,useLayoutEffect:tU,useMemo:tk,useReducer:ts,useRef:tC,useState:function(){return ts(tn)},useDebugValue:tO,useDeferredValue:function(e,t){var i=e9();return null===oj?tH(i,e,t):tG(i,oj.memoizedState,e,t)},useTransition:function(){var e=ts(tn)[0],t=e9().memoizedState;return["boolean"==typeof e?e:te(e),t]},useSyncExternalStore:to,useId:tX,useHostTransitionStatus:tj,useFormState:tE,useActionState:tE,useOptimistic:function(e,t){var i=e9();return null!==oj?tp(i,oj,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:ti,useCacheRefresh:tY};o3.useEffectEvent=tL;var o4={enqueueSetState:function(e,t,i){e=e._reactInternals;var n=ng(),r=eU(n);r.payload=t,null!=i&&(r.callback=i),null!==(t=eN(e,r,n))&&(nx(t,e,n),eF(t,e,n))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var n=ng(),r=eU(n);r.tag=1,r.payload=t,null!=i&&(r.callback=i),null!==(t=eN(e,r,n))&&(nx(t,e,n),eF(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=ng(),n=eU(i);n.tag=2,null!=t&&(n.callback=t),null!==(t=eN(e,n,i))&&(nx(t,e,i),eF(t,e,i))}},o5=Error(n(461)),o6=!1,o8={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},o9=!1,o7=!1,le=!1,lt="function"==typeof WeakSet?WeakSet:Set,li=null,ln=null,lr=!1,la=null,ls=8192,lo={getCacheForType:function(e){var t=$(oh),i=t.data.get(e);return void 0===i&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return $(oh).controller.signal}},ll=0,lu=1,lc=2,lh=3,ld=4;if("function"==typeof Symbol&&Symbol.for){var lf=Symbol.for;ll=lf("selector.component"),lu=lf("selector.has_pseudo_class"),lc=lf("selector.role"),lh=lf("selector.test_id"),ld=lf("selector.text")}var lp="function"==typeof WeakMap?WeakMap:Map,lm=0,lg=null,lv=null,lx=0,ly=0,lS=null,lA=!1,lM=!1,lb=!1,lw=0,lT=0,lE=0,l_=0,lC=0,lR=0,lP=0,lD=null,lI=null,lL=!1,lB=0,lU=0,lN=1/0,lF=null,lO=null,lz=0,lk=null,lH=null,lG=0,lV=0,lW=null,lj=null,lX=0,lY=null;return rt.attemptContinuousHydration=function(e){if(13===e.tag||31===e.tag){var t=eP(e,0x4000000);null!==t&&nx(t,e,0x4000000),re(e,0x4000000)}},rt.attemptHydrationAtCurrentPriority=function(e){if(13===e.tag||31===e.tag){var t=ng(),i=eP(e,t=A(t));null!==i&&nx(i,e,t),re(e,t)}},rt.attemptSynchronousHydration=function(e){switch(e.tag){case 3:if((e=e.stateNode).current.memoizedState.isDehydrated){var t=d(e.pendingLanes);if(0!==t){for(e.pendingLanes|=2,e.entangledLanes|=2;t;){var i=1<<31-sE(t);e.entanglements[1]|=i,t&=~i}ea(e),(6&lm)==0&&(lN=sN()+500,es(0,!1))}}break;case 31:case 13:null!==(t=eP(e,2))&&nx(t,e,2),nM(),re(e,2)}},rt.batchedUpdates=function(e,t){return e(t)},rt.createComponentSelector=function(e){return{$$typeof:ll,value:e}},rt.createContainer=function(e,t,i,n,r,a,s,o,l,u){return n6(e,t,!1,null,i,n,a,null,s,o,l,u)},rt.createHasPseudoClassSelector=function(e){return{$$typeof:lu,value:e}},rt.createHydrationContainer=function(e,t,i,n,r,a,s,o,l,u,c,h,d,f){var p;return(e=n6(i,n,!0,e,r,a,o,f,l,u,c,h)).context=sT,i=e.current,(r=eU(n=A(n=ng()))).callback=null!=(p=t)?p:null,eN(i,r,n),t=n,e.current.lanes=t,v(e,t),ea(e),e},rt.createPortal=function(e,t,i){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:ro,key:null==n?null:""+n,children:e,containerInfo:t,implementation:i}},rt.createRoleSelector=function(e){return{$$typeof:lc,value:e}},rt.createTestNameSelector=function(e){return{$$typeof:lh,value:e}},rt.createTextSelector=function(e){return{$$typeof:ld,value:e}},rt.defaultOnCaughtError=function(e){console.error(e)},rt.defaultOnRecoverableError=function(e){sX(e)},rt.defaultOnUncaughtError=function(e){sX(e)},rt.deferredUpdates=function(e){var t=rb.T,i=rY();try{return rX(32),rb.T=null,e()}finally{rX(i),rb.T=t}},rt.discreteUpdates=function(e,t,i,n,r){var a=rb.T,s=rY();try{return rX(2),rb.T=null,e(t,i,n,r)}finally{rX(s),rb.T=a,0===lm&&(lN=sN()+500)}},rt.findAllNodes=nm,rt.findBoundingRects=function(e,t){if(!r7)throw Error(n(363));t=nm(e,t),e=[];for(var i=0;i<t.length;i++)e.push(at(t[i]));for(t=e.length-1;0<t;t--){i=e[t];for(var r=i.x,a=r+i.width,s=i.y,o=s+i.height,l=t-1;0<=l;l--)if(t!==l){var u=e[l],c=u.x,h=c+u.width,d=u.y,f=d+u.height;if(r>=c&&s>=d&&a<=h&&o<=f){e.splice(t,1);break}if(r!==c||i.width!==u.width||f<s||d>o){if(!(s!==d||i.height!==u.height||h<r||c>a)){c>r&&(u.width+=c-r,u.x=r),h<a&&(u.width=a-c),e.splice(t,1);break}}else{d>s&&(u.height+=d-s,u.y=s),f<o&&(u.height=o-d),e.splice(t,1);break}}}return e},rt.findHostInstance=n8,rt.findHostInstanceWithNoPortals=function(e){return null===(e=null!==(e=s(e))?function e(t){var i=t.tag;if(5===i||26===i||27===i||6===i)return t;for(t=t.child;null!==t;){if(4!==t.tag&&null!==(i=e(t)))return i;t=t.sibling}return null}(e):null)?null:r_(e.stateNode)},rt.findHostInstanceWithWarning=function(e){return n8(e)},rt.flushPassiveEffects=nH,rt.flushSyncFromReconciler=function(e){var t=lm;lm|=1;var i=rb.T,n=rY();try{if(rX(2),rb.T=null,e)return e()}finally{rX(n),rb.T=i,(6&(lm=t))==0&&es(0,!1)}},rt.flushSyncWork=nM,rt.focusWithin=function(e,t){if(!r7)throw Error(n(363));for(t=Array.from(t=np(e=nh(e),t)),e=0;e<t.length;){var i=t[e++],r=i.tag;if(!an(i)){if((5===r||26===r||27===r)&&aa(i.stateNode))return!0;for(i=i.child;null!==i;)t.push(i),i=i.sibling}}return!1},rt.getFindAllNodesFailureDescription=function(e,t){if(!r7)throw Error(n(363));var i=0,r=[];e=[nh(e),0];for(var a=0;a<e.length;){var s=e[a++],o=s.tag,l=e[a++],u=t[l];if((5!==o&&26!==o&&27!==o||!an(s))&&(nd(s,u)&&(r.push(nf(u)),++l>i&&(i=l)),l<t.length))for(s=s.child;null!==s;)e.push(s,l),s=s.sibling}if(i<t.length){for(e=[];i<t.length;i++)e.push(nf(t[i]));return`findAllNodes was able to match part of the selector:
|
|
`+r.join(" > ")+`
|
|
|
|
No matching component was found for:
|
|
`+e.join(" > ")}return null},rt.getPublicRootInstance=function(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 27:case 5:return r_(e.child.stateNode);default:return e.child.stateNode}},rt.injectIntoDevTools=function(){var e={bundleType:0,version:rw,rendererPackageName:rT,currentDispatcherRef:rb,reconcilerVersion:"19.2.0"};if(null!==rE&&(e.rendererConfig=rE),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")e=!1;else{var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)e=!0;else{try{sV=t.inject(e),sW=t}catch{}e=!!t.checkDCE}}return e},rt.isAlreadyRendering=function(){return(6&lm)!=0},rt.observeVisibleRects=function(e,t,i,r){if(!r7)throw Error(n(363));var a=as(e=nm(e,t),i,r).disconnect;return{disconnect:function(){a()}}},rt.shouldError=function(){return null},rt.shouldSuspend=function(){return!1},rt.startHostTransition=function(e,t,r,a){if(5!==e.tag)throw Error(n(476));var s=tW(e).queue;tV(e,s,t,r4,null===r?i:function(){var t=tW(e);return null===t.next&&(t=e.alternate.memoizedState),tZ(e,t.next.queue,{},ng()),r(a)})},rt.updateContainer=function(e,t,i,n){var r=t.current,a=ng();return n9(r,a,e,t,i,n),a},rt.updateContainerSync=function(e,t,i,n){return n9(t.current,2,e,t,i,n),2},rt},cG.exports.default=cG.exports,Object.defineProperty(cG.exports,"__esModule",{value:!0})),cH.exports=cG.exports),(A=cH.exports)&&A.__esModule&&Object.prototype.hasOwnProperty.call(A,"default"))?A.default:A,cW={},cj=/^three(?=[A-Z])/,cX=e=>`${e[0].toUpperCase()}${e.slice(1)}`,cY=0;function cQ(e){if("function"==typeof e){let t=`${cY++}`;return cW[t]=e,t}Object.assign(cW,e)}function cq(e,t){let i=cX(e),n=cW[i];if("primitive"!==e&&!n)throw Error(`R3F: ${i} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if("primitive"===e&&!t.object)throw Error("R3F: Primitives without 'object' are invalid!");if(void 0!==t.args&&!Array.isArray(t.args))throw Error("R3F: The args prop must be an array!")}function cK(e){if(e.isHidden){var t;e.props.attach&&null!=(t=e.parent)&&t.object?cA(e.parent,e):cP(e.object)&&!1!==e.props.visible&&(e.object.visible=!0),e.isHidden=!1,cC(e)}}function cZ(e,t,i){let n=t.root.getState();if(e.parent||e.object===n.scene){if(!t.object){var r,a;let e=cW[cX(t.type)];t.object=null!=(r=t.props.object)?r:new e(...null!=(a=t.props.args)?a:[]),t.object.__r3f=t}if(c_(t.object,t.props),t.props.attach)cA(e,t);else if(cP(t.object)&&cP(e.object)){let n=e.object.children.indexOf(null==i?void 0:i.object);if(i&&-1!==n){let i=e.object.children.indexOf(t.object);-1!==i?(e.object.children.splice(i,1),e.object.children.splice(i<n?n-1:n,0,t.object)):(t.object.parent=e.object,e.object.children.splice(n,0,t.object),t.object.dispatchEvent({type:"added"}),e.object.dispatchEvent({type:"childadded",child:t.object}))}else e.object.add(t.object)}for(let e of t.children)cZ(t,e);cC(t)}}function cJ(e,t){t&&(t.parent=e,e.children.push(t),cZ(e,t))}function c$(e,t,i){if(!t||!i)return;t.parent=e;let n=e.children.indexOf(i);-1!==n?e.children.splice(n,0,t):e.children.push(t),cZ(e,t,i)}function c0(e){if("function"==typeof e.dispose){let t=()=>{try{e.dispose()}catch{}};"u">typeof IS_REACT_ACT_ENVIRONMENT?t():(0,u6.unstable_scheduleCallback)(u6.unstable_IdlePriority,t)}}function c1(e,t,i){if(!t)return;t.parent=null;let n=e.children.indexOf(t);-1!==n&&e.children.splice(n,1),t.props.attach?cM(e,t):cP(t.object)&&cP(e.object)&&(e.object.remove(t.object),function(e,t){let{internal:i}=e.getState();i.interaction=i.interaction.filter(e=>e!==t),i.initialHits=i.initialHits.filter(e=>e!==t),i.hovered.forEach((e,n)=>{(e.eventObject===t||e.object===t)&&i.hovered.delete(n)}),i.capturedMap.forEach((e,n)=>{cI(i.capturedMap,t,e,n)})}(cs(t),t.object));let r=null!==t.props.dispose&&!1!==i;for(let e=t.children.length-1;e>=0;e--){let i=t.children[e];c1(t,i,r)}t.children.length=0,delete t.object.__r3f,r&&"primitive"!==t.type&&"Scene"!==t.object.type&&c0(t.object),void 0===i&&cC(t)}let c2=[],c3=()=>{},c4={},c5=0,c6=(M={isPrimaryRenderer:!1,warnsIfNotActing:!1,supportsMutation:!0,supportsPersistence:!1,supportsHydration:!1,createInstance:function(e,t,i){var n;return cq(e=cX(e)in cW?e:e.replace(cj,""),t),"primitive"===e&&null!=(n=t.object)&&n.__r3f&&delete t.object.__r3f,cx(t.object,i,e,t)},removeChild:c1,appendChild:cJ,appendInitialChild:cJ,insertBefore:c$,appendChildToContainer(e,t){let i=e.getState().scene.__r3f;t&&i&&cJ(i,t)},removeChildFromContainer(e,t){let i=e.getState().scene.__r3f;t&&i&&c1(i,t)},insertInContainerBefore(e,t,i){let n=e.getState().scene.__r3f;t&&i&&n&&c$(n,t,i)},getRootHostContext:()=>c4,getChildHostContext:()=>c4,commitUpdate(e,t,i,n,r){var a,s,o;cq(t,n);let l=!1;if("primitive"===e.type&&i.object!==n.object||(null==(a=n.args)?void 0:a.length)!==(null==(s=i.args)?void 0:s.length)?l=!0:null!=(o=n.args)&&o.some((e,t)=>{var n;return e!==(null==(n=i.args)?void 0:n[t])})&&(l=!0),l)c2.push([e,{...n},r]);else{let t=function(e,t){let i={};for(let n in t)if(!cb.includes(n)&&!cg.equ(t[n],e.props[n]))for(let e in i[n]=t[n],t)e.startsWith(`${n}-`)&&(i[e]=t[e]);for(let n in e.props){if(cb.includes(n)||t.hasOwnProperty(n))continue;let{root:r,key:a}=cy(e.object,n);if(r.constructor&&0===r.constructor.length){let e=function(e){let t=cw.get(e.constructor);try{t||(t=new e.constructor,cw.set(e.constructor,t))}catch(e){}return t}(r);cg.und(e)||(i[a]=e[a])}else i[a]=0}return i}(e,n);Object.keys(t).length&&(Object.assign(e.props,t),c_(e.object,t))}(null===r.sibling||(4&r.flags)==0)&&function(){for(let[e]of c2){let t=e.parent;if(t)for(let i of(e.props.attach?cM(t,e):cP(e.object)&&cP(t.object)&&t.object.remove(e.object),e.children))i.props.attach?cM(e,i):cP(i.object)&&cP(e.object)&&e.object.remove(i.object);e.isHidden&&cK(e),e.object.__r3f&&delete e.object.__r3f,"primitive"!==e.type&&c0(e.object)}for(let[n,r,a]of c2){n.props=r;let s=n.parent;if(s){let r=cW[cX(n.type)],o=n.object;n.object=null!=(e=n.props.object)?e:new r(...null!=(t=n.props.args)?t:[]),n.object.__r3f=n;var e,t,i=n.object;for(let e of[a,a.alternate])if(null!==e)if("function"==typeof e.ref){null==e.refCleanup||e.refCleanup();let t=e.ref(i);"function"==typeof t&&(e.refCleanup=t)}else e.ref&&(e.ref.current=i);for(let e of(!function(e,t,i){let{internal:n}=e.getState();for(let e=0;e<n.interaction.length;e++)n.interaction[e]===t&&(n.interaction[e]=i);for(let e=0;e<n.initialHits.length;e++)n.initialHits[e]===t&&(n.initialHits[e]=i);n.hovered.forEach((e,r)=>{if(e.eventObject===t||e.object===t){n.hovered.delete(r);let a={...e,eventObject:e.eventObject===t?i:e.eventObject,object:e.object===t?i:e.object};n.hovered.set(cD(a),a)}}),n.capturedMap.forEach(e=>{let n=e.get(t);n&&(e.delete(t),e.set(i,n))})}(cs(n),o,n.object),c_(n.object,n.props),n.props.attach?cA(s,n):cP(n.object)&&cP(s.object)&&s.object.add(n.object),n.children))e.props.attach?cA(n,e):cP(e.object)&&cP(n.object)&&n.object.add(e.object);cC(n)}}c2.length=0}()},finalizeInitialChildren:()=>!1,commitMount(){},getPublicInstance:e=>null==e?void 0:e.object,prepareForCommit:()=>null,preparePortalMount:e=>cx(e.getState().scene,e,"",{}),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance:function(e){if(!e.isHidden){var t;e.props.attach&&null!=(t=e.parent)&&t.object?cM(e.parent,e):cP(e.object)&&(e.object.visible=!1),e.isHidden=!0,cC(e)}},unhideInstance:cK,createTextInstance:c3,hideTextInstance:c3,unhideTextInstance:c3,scheduleTimeout:"function"==typeof setTimeout?setTimeout:void 0,cancelTimeout:"function"==typeof clearTimeout?clearTimeout:void 0,noTimeout:-1,getInstanceFromNode:()=>null,beforeActiveInstanceBlur(){},afterActiveInstanceBlur(){},detachDeletedInstance(){},prepareScopeUpdate(){},getInstanceFromScope:()=>null,shouldAttemptEagerTransition:()=>!1,trackSchedulerEvent:()=>{},resolveEventType:()=>null,resolveEventTimeStamp:()=>-1.1,requestPostPaintCallback(){},maySuspendCommit:()=>!1,preloadInstance:()=>!0,suspendInstance(){},waitForCommitToBeReady:()=>null,NotPendingTransition:null,HostTransitionContext:E.createContext(null),setCurrentUpdatePriority(e){c5=e},getCurrentUpdatePriority:()=>c5,resolveUpdatePriority(){var e;if(0!==c5)return c5;switch("u">typeof window&&(null==(e=window.event)?void 0:e.type)){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return 2;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return 8;default:return 32}},resetFormInstance(){},rendererPackageName:"@react-three/fiber",rendererVersion:"9.6.1",applyViewTransitionName(e,t,i){},restoreViewTransitionName(e,t){},cancelViewTransitionName(e,t,i){},cancelRootViewTransitionName(e){},restoreRootViewTransitionName(e){},InstanceMeasurement:null,measureInstance:e=>null,wasInstanceInViewport:e=>!0,hasInstanceChanged:(e,t)=>!1,hasInstanceAffectedParent:(e,t)=>!1,suspendOnActiveViewTransition(e,t){},startGestureTransition:()=>null,startViewTransition:()=>null,stopViewTransition(e){},createViewTransitionInstance:e=>null,getCurrentGestureOffset(e){throw Error("startGestureTransition is not yet supported in react-three-fiber.")},cloneMutableInstance:(e,t)=>e,cloneMutableTextInstance:e=>e,cloneRootViewTransitionContainer(e){throw Error("Not implemented.")},removeRootViewTransitionClone(e,t){throw Error("Not implemented.")},createFragmentInstance:e=>null,updateFragmentInstanceFiber(e,t){},commitNewChildToFragmentInstance(e,t){},deleteChildFromFragmentInstance(e,t){},measureClonedInstance:e=>null,maySuspendCommitOnUpdate:(e,t,i)=>!1,maySuspendCommitInSyncRender:(e,t)=>!1,startSuspendingCommit:()=>null,getSuspendedCommitReason:(e,t)=>null},(x=cV(M)).injectIntoDevTools(),x),c8=new Map,c9={objects:"shallow",strict:!1};function c7(e){var t,i;let n,r,a,s,o,l,u,c=c8.get(e),h=null==c?void 0:c.fiber,d=null==c?void 0:c.store;c&&console.warn("R3F.createRoot should only be called once!");let f="function"==typeof reportError?reportError:console.error,p=d||(t=hd,i=hf,o=(s=(a=u2((e,n)=>{let r,a=new eE,s=new eE,o=new eE;function l(e=n().camera,t=s,i=n().size){let{width:r,height:u,top:c,left:h}=i,d=r/u;t.isVector3?o.copy(t):o.set(...t);let f=e.getWorldPosition(a).distanceTo(o);if(e&&e.isOrthographicCamera)return{width:r/e.zoom,height:u/e.zoom,top:c,left:h,factor:1,distance:f,aspect:d};{let t=2*Math.tan(e.fov*Math.PI/180/2)*f,i=r/u*t;return{width:i,height:t,top:c,left:h,factor:r/i,distance:f,aspect:d}}}let u=t=>e(e=>({performance:{...e.performance,current:t}})),c=new Q;return{set:e,get:n,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},scene:null,xr:null,invalidate:(e=1)=>t(n(),e),advance:(e,t)=>i(e,t,n()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new sT,pointer:c,mouse:c,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{let e=n();r&&clearTimeout(r),e.performance.current!==e.performance.min&&u(e.performance.min),r=setTimeout(()=>u(n().performance.max),e.performance.debounce)}},size:{width:0,height:0,top:0,left:0},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:l},setEvents:t=>e(e=>({...e,events:{...e.events,...t}})),setSize:(t,i,r=0,a=0)=>{let o=n().camera,u={width:t,height:i,top:r,left:a};e(e=>({size:u,viewport:{...e.viewport,...l(o,s,u)}}))},setDpr:t=>e(e=>{let i=cp(t);return{viewport:{...e.viewport,dpr:i,initialDpr:e.viewport.initialDpr||i}}}),setFrameloop:(t="always")=>{let i=n().clock;i.stop(),i.elapsedTime=0,"never"!==t&&(i.start(),i.elapsedTime=0),e(()=>({frameloop:t}))},previousRoot:void 0,internal:{interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,lastEvent:E.createRef(),active:!1,frames:0,priority:0,subscribe:(e,t,i)=>{let r=n().internal;return r.priority=r.priority+ +(t>0),r.subscribers.push({ref:e,priority:t,store:i}),r.subscribers=r.subscribers.sort((e,t)=>e.priority-t.priority),()=>{let i=n().internal;null!=i&&i.subscribers&&(i.priority=i.priority-(t>0),i.subscribers=i.subscribers.filter(t=>t.ref!==e))}}}}})).getState()).size,l=s.viewport.dpr,u=s.camera,a.subscribe(()=>{let{camera:e,size:t,viewport:i,gl:n,set:r}=a.getState();if(t.width!==o.width||t.height!==o.height||i.dpr!==l){o=t,l=i.dpr,cR(e,t),i.dpr>0&&n.setPixelRatio(i.dpr);let r="u">typeof HTMLCanvasElement&&n.domElement instanceof HTMLCanvasElement;n.setSize(t.width,t.height,r)}e!==u&&(u=e,r(t=>({viewport:{...t.viewport,...t.viewport.getCurrentViewport(e)}})))}),a.subscribe(e=>t(e)),a),m=h||c6.createContainer(p,1,null,!1,null,"",f,f,f,null);c||c8.set(e,{fiber:m,store:p});let g=!1,v=null;return{async configure(t={}){var i,a;let s;v=new Promise(e=>s=e);let{gl:o,size:l,scene:u,events:c,onCreated:h,shadows:d=!1,linear:f=!1,flat:m=!1,legacy:x=!1,orthographic:y=!1,frameloop:S="always",dpr:A=[1,2],performance:M,raycaster:b,camera:w,onPointerMissed:T}=t,E=p.getState(),_=E.gl;if(!E.gl){let t={canvas:e,powerPreference:"high-performance",antialias:!0,alpha:!0},i="function"==typeof o?await o(t):o;_=cL(i)?i:new uZ({...t,...o}),E.set({gl:_})}let C=E.raycaster;C||E.set({raycaster:C=new s3});let{params:R,...P}=b||{};if(cg.equ(P,C,c9)||c_(C,{...P}),cg.equ(R,C.params,c9)||c_(C,{params:{...C.params,...R}}),!E.camera||E.camera===r&&!cg.equ(r,w,c9)){r=w;let e=null==w?void 0:w.isCamera,t=e?w:y?new si(0,0,0,0,.1,1e3):new iC(75,0,.1,1e3);!e&&(t.position.z=5,w&&(c_(t,w),!t.manual&&("aspect"in w||"left"in w||"right"in w||"bottom"in w||"top"in w)&&(t.manual=!0,t.updateProjectionMatrix())),E.camera||null!=w&&w.rotation||t.lookAt(0,0,0)),E.set({camera:t}),C.camera=t}if(!E.scene){let e;null!=u&&u.isScene?cx(e=u,p,"",{}):(cx(e=new iB,p,"",{}),u&&c_(e,u)),E.set({scene:e})}c&&!E.events.handlers&&E.set({events:c(p)});let L=function(e,t){if(!t&&"u">typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement&&e.parentElement){let{width:t,height:i,top:n,left:r}=e.parentElement.getBoundingClientRect();return{width:t,height:i,top:n,left:r}}return!t&&"u">typeof OffscreenCanvas&&e instanceof OffscreenCanvas?{width:e.width,height:e.height,top:0,left:0}:{width:0,height:0,top:0,left:0,...t}}(e,l);if(cg.equ(L,E.size,c9)||E.setSize(L.width,L.height,L.top,L.left),A&&E.viewport.dpr!==cp(A)&&E.setDpr(A),E.frameloop!==S&&E.setFrameloop(S),E.onPointerMissed||E.set({onPointerMissed:T}),M&&!cg.equ(M,E.performance,c9)&&E.set(e=>({performance:{...e.performance,...M}})),!E.xr){let e=(e,t)=>{let i=p.getState();"never"!==i.frameloop&&hf(e,!0,i,t)},t=()=>{let t=p.getState();t.gl.xr.enabled=t.gl.xr.isPresenting,t.gl.xr.setAnimationLoop(t.gl.xr.isPresenting?e:null),t.gl.xr.isPresenting||hd(t)},n={connect(){let e=p.getState().gl;e.xr.addEventListener("sessionstart",t),e.xr.addEventListener("sessionend",t)},disconnect(){let e=p.getState().gl;e.xr.removeEventListener("sessionstart",t),e.xr.removeEventListener("sessionend",t)}};"function"==typeof(null==(i=_.xr)?void 0:i.addEventListener)&&n.connect(),E.set({xr:n})}if(_.shadowMap){let e=_.shadowMap.enabled,t=_.shadowMap.type;_.shadowMap.enabled=!!d,cg.boo(d)?_.shadowMap.type=2:cg.str(d)?_.shadowMap.type=null!=(a=({basic:0,percentage:1,soft:2,variance:3})[d])?a:2:cg.obj(d)&&Object.assign(_.shadowMap,d),(e!==_.shadowMap.enabled||t!==_.shadowMap.type)&&(_.shadowMap.needsUpdate=!0)}return eu.enabled=!x,g||(_.outputColorSpace=f?I:D,_.toneMapping=4*!m),E.legacy!==x&&E.set(()=>({legacy:x})),E.linear!==f&&E.set(()=>({linear:f})),E.flat!==m&&E.set(()=>({flat:m})),!o||cg.fun(o)||cL(o)||cg.equ(o,_,c9)||c_(_,o),n=h,g=!0,s(),this},render(t){return g||v||this.configure(),v.then(()=>{c6.updateContainer((0,u8.jsx)(he,{store:p,children:t,onCreated:n,rootElement:e}),m,null,()=>void 0)}),p},unmount(){ht(e)}}}function he({store:e,children:t,onCreated:i,rootElement:n}){return cu(()=>{let t=e.getState();t.set(e=>({internal:{...e.internal,active:!0}})),i&&i(t),e.getState().events.connected||null==t.events.connect||t.events.connect(n)},[]),(0,u8.jsx)(cB.Provider,{value:e,children:t})}function ht(e,t){let i=c8.get(e),n=null==i?void 0:i.fiber;if(n){let r=null==i?void 0:i.store.getState();r&&(r.internal.active=!1),c6.updateContainer(null,n,null,()=>{r&&setTimeout(()=>{try{null==r.events.disconnect||r.events.disconnect(),null==(i=r.gl)||null==(n=i.renderLists)||null==n.dispose||n.dispose(),null==(a=r.gl)||null==a.forceContextLoss||a.forceContextLoss(),null!=(s=r.gl)&&s.xr&&r.xr.disconnect();var i,n,a,s,o=r.scene;for(let e in"Scene"!==o.type&&(null==o.dispose||o.dispose()),o){let t=o[e];(null==t?void 0:t.type)!=="Scene"&&(null==t||null==t.dispose||t.dispose())}c8.delete(e),t&&t(e)}catch(e){}},500)})}}function hi({state:e={},children:t,container:i}){let{events:n,size:r,...a}=e,s=cU(),[o]=E.useState(()=>new s3),[l]=E.useState(()=>new Q),u=cc((e,t)=>{let a;if(t.camera&&r){let i=t.camera;a=e.viewport.getCurrentViewport(i,new eE,r),i!==e.camera&&cR(i,r)}return{...e,...t,scene:i,raycaster:o,pointer:l,mouse:l,previousRoot:s,events:{...e.events,...t.events,...n},size:{...e.size,...r},viewport:{...e.viewport,...a},setEvents:e=>t.set(t=>({...t,events:{...t.events,...e}}))}}),c=E.useMemo(()=>{let e=u2((e,t)=>({...a,set:e,get:t})),t=t=>e.setState(e=>u.current(t,e));return t(s.getState()),s.subscribe(t),e},[s,i]);return(0,u8.jsx)(u8.Fragment,{children:c6.createPortal((0,u8.jsx)(cB.Provider,{value:c,children:t}),c,null)})}let hn=new Set,hr=new Set,ha=new Set;function hs(e,t){if(e.size)for(let{callback:i}of e.values())i(t)}function ho(e,t){switch(e){case"before":return hs(hn,t);case"after":return hs(hr,t);case"tail":return hs(ha,t)}}function hl(e,t,i){let n=t.clock.getDelta();"never"===t.frameloop&&"number"==typeof e&&(n=e-t.clock.elapsedTime,t.clock.oldTime=t.clock.elapsedTime,t.clock.elapsedTime=e),s=t.internal.subscribers;for(let e=0;e<s.length;e++)(o=s[e]).ref.current(o.store.getState(),n,i);return!t.internal.priority&&t.gl.render&&t.gl.render(t.scene,t.camera),t.internal.frames=Math.max(0,t.internal.frames-1),"always"===t.frameloop?1:t.internal.frames}let hu=!1,hc=!1;function hh(e){for(let i of(u=requestAnimationFrame(hh),hu=!0,l=0,ho("before",e),hc=!0,c8.values())){var t;(c=i.store.getState()).internal.active&&("always"===c.frameloop||c.internal.frames>0)&&!(null!=(t=c.gl.xr)&&t.isPresenting)&&(l+=hl(e,c))}if(hc=!1,ho("after",e),0===l)return ho("tail",e),hu=!1,cancelAnimationFrame(u)}function hd(e,t=1){var i;if(!e)return c8.forEach(e=>hd(e.store.getState(),t));(null==(i=e.gl.xr)||!i.isPresenting)&&e.internal.active&&"never"!==e.frameloop&&(t>1?e.internal.frames=Math.min(60,e.internal.frames+t):hc?e.internal.frames=2:e.internal.frames=1,hu||(hu=!0,requestAnimationFrame(hh)))}function hf(e,t=!0,i,n){if(t&&ho("before",e),i)hl(e,i,n);else for(let t of c8.values())hl(e,t.store.getState());t&&ho("after",e)}let hp={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function hm(e){let{handlePointer:t}=function(e){function t(e){return e.filter(e=>["Move","Over","Enter","Out","Leave"].some(t=>{var i;return null==(i=e.__r3f)?void 0:i.handlers["onPointer"+t]}))}function i(t){let{internal:i}=e.getState();for(let e of i.hovered.values())if(!t.length||!t.find(t=>t.object===e.object&&t.index===e.index&&t.instanceId===e.instanceId)){let n=e.eventObject.__r3f;if(i.hovered.delete(cD(e)),null!=n&&n.eventCount){let i=n.handlers,r={...e,intersections:t};null==i.onPointerOut||i.onPointerOut(r),null==i.onPointerLeave||i.onPointerLeave(r)}}}function n(e,t){for(let i=0;i<t.length;i++){let n=t[i].__r3f;null==n||null==n.handlers.onPointerMissed||n.handlers.onPointerMissed(e)}}return{handlePointer:function(r){switch(r){case"onPointerLeave":case"onPointerCancel":return()=>i([]);case"onLostPointerCapture":return t=>{let{internal:n}=e.getState();"pointerId"in t&&n.capturedMap.has(t.pointerId)&&requestAnimationFrame(()=>{n.capturedMap.has(t.pointerId)&&(n.capturedMap.delete(t.pointerId),i([]))})}}return function(a){let{onPointerMissed:s,internal:o}=e.getState();o.lastEvent.current=a;let l="onPointerMove"===r,u="onClick"===r||"onContextMenu"===r||"onDoubleClick"===r,c=function(t,i){let n=e.getState(),r=new Set,a=[],s=i?i(n.internal.interaction):n.internal.interaction;for(let e=0;e<s.length;e++){let t=cm(s[e]);t&&(t.raycaster.camera=void 0)}n.previousRoot||null==n.events.compute||n.events.compute(t,n);let o=s.flatMap(function(e){let i=cm(e);if(!i||!i.events.enabled||null===i.raycaster.camera)return[];if(void 0===i.raycaster.camera){var n;null==i.events.compute||i.events.compute(t,i,null==(n=i.previousRoot)?void 0:n.getState()),void 0===i.raycaster.camera&&(i.raycaster.camera=null)}return i.raycaster.camera?i.raycaster.intersectObject(e,!0):[]}).sort((e,t)=>{let i=cm(e.object),n=cm(t.object);return i&&n&&n.events.priority-i.events.priority||e.distance-t.distance}).filter(e=>{let t=cD(e);return!r.has(t)&&(r.add(t),!0)});for(let e of(n.events.filter&&(o=n.events.filter(o,n)),o)){let t=e.object;for(;t;){var l;null!=(l=t.__r3f)&&l.eventCount&&a.push({...e,eventObject:t}),t=t.parent}}if("pointerId"in t&&n.internal.capturedMap.has(t.pointerId))for(let e of n.internal.capturedMap.get(t.pointerId).values())r.has(cD(e.intersection))||a.push(e.intersection);return a}(a,l?t:void 0),h=u?function(t){let{internal:i}=e.getState(),n=t.offsetX-i.initialClick[0],r=t.offsetY-i.initialClick[1];return Math.round(Math.sqrt(n*n+r*r))}(a):0;"onPointerDown"===r&&(o.initialClick=[a.offsetX,a.offsetY],o.initialHits=c.map(e=>e.eventObject)),u&&!c.length&&h<=2&&(n(a,o.interaction),s&&s(a)),l&&i(c),!function(e,t,n,r){if(e.length){let a={stopped:!1};for(let s of e){let o=cm(s.object);if(o||s.object.traverseAncestors(e=>{let t=cm(e);if(t)return o=t,!1}),o){let{raycaster:l,pointer:u,camera:c,internal:h}=o,d=new eE(u.x,u.y,0).unproject(c),f=e=>{var t,i;return null!=(t=null==(i=h.capturedMap.get(e))?void 0:i.has(s.eventObject))&&t},p=e=>{let i={intersection:s,target:t.target};h.capturedMap.has(e)?h.capturedMap.get(e).set(s.eventObject,i):h.capturedMap.set(e,new Map([[s.eventObject,i]])),t.target.setPointerCapture(e)},m=e=>{let t=h.capturedMap.get(e);t&&cI(h.capturedMap,s.eventObject,t,e)},g={};for(let e in t){let i=t[e];"function"!=typeof i&&(g[e]=i)}let v={...s,...g,pointer:u,intersections:e,stopped:a.stopped,delta:n,unprojectedPoint:d,ray:l.ray,camera:c,stopPropagation(){let n="pointerId"in t&&h.capturedMap.get(t.pointerId);(!n||n.has(s.eventObject))&&(v.stopped=a.stopped=!0,h.hovered.size&&Array.from(h.hovered.values()).find(e=>e.eventObject===s.eventObject)&&i([...e.slice(0,e.indexOf(s)),s]))},target:{hasPointerCapture:f,setPointerCapture:p,releasePointerCapture:m},currentTarget:{hasPointerCapture:f,setPointerCapture:p,releasePointerCapture:m},nativeEvent:t};if(r(v),!0===a.stopped)break}}}}(c,a,h,function(e){let t=e.eventObject,i=t.__r3f;if(!(null!=i&&i.eventCount))return;let s=i.handlers;if(l){if(s.onPointerOver||s.onPointerEnter||s.onPointerOut||s.onPointerLeave){let t=cD(e),i=o.hovered.get(t);i?i.stopped&&e.stopPropagation():(o.hovered.set(t,e),null==s.onPointerOver||s.onPointerOver(e),null==s.onPointerEnter||s.onPointerEnter(e))}null==s.onPointerMove||s.onPointerMove(e)}else{let i=s[r];i?(!u||o.initialHits.includes(t))&&(n(a,o.interaction.filter(e=>!o.initialHits.includes(e))),i(e)):u&&o.initialHits.includes(t)&&n(a,o.interaction.filter(e=>!o.initialHits.includes(e)))}})}}}}(e);return{priority:1,enabled:!0,compute(e,t,i){t.pointer.set(e.offsetX/t.size.width*2-1,-(2*(e.offsetY/t.size.height))+1),t.raycaster.setFromCamera(t.pointer,t.camera)},connected:void 0,handlers:Object.keys(hp).reduce((e,i)=>({...e,[i]:t(i)}),{}),update:()=>{var t;let{events:i,internal:n}=e.getState();null!=(t=n.lastEvent)&&t.current&&i.handlers&&i.handlers.onPointerMove(n.lastEvent.current)},connect:t=>{let{set:i,events:n}=e.getState();if(null==n.disconnect||n.disconnect(),i(e=>({events:{...e.events,connected:t}})),n.handlers)for(let e in n.handlers){let i=n.handlers[e],[r,a]=hp[e];t.addEventListener(r,i,{passive:a})}},disconnect:()=>{let{set:t,events:i}=e.getState();if(i.connected){if(i.handlers)for(let e in i.handlers){let t=i.handlers[e],[n]=hp[e];i.connected.removeEventListener(n,t)}t(e=>({events:{...e.events,connected:void 0}}))}}}}e.s(["B",0,cd,"C",0,cN,"D",0,cF,"E",0,cf,"G",0,ck,"a",0,cc,"b",0,cu,"c",0,c7,"d",0,ht,"e",0,cQ,"f",0,hm,"i",0,co,"o",0,function(e,t,i){return(0,u8.jsx)(hi,{children:e,container:t,state:i})},"s",0,c_,"u",0,ch],1950),e.i(8560),e.s(["ACESFilmicToneMapping",0,4,"AddEquation",0,100,"AddOperation",0,2,"AdditiveAnimationBlendMode",0,2501,"AdditiveBlending",0,2,"AgXToneMapping",0,6,"AlphaFormat",0,1021,"AlwaysCompare",0,519,"AlwaysDepth",0,1,"AlwaysStencilFunc",0,519,"AmbientLight",0,sa,"AnimationAction",0,sQ,"AnimationClip",0,az,"AnimationLoader",0,aY,"AnimationMixer",0,sK,"AnimationObjectGroup",0,sY,"AnimationUtils",0,aE,"ArcCurve",0,rs,"ArrayCamera",0,sw,"ArrowHelper",0,oP,"AttachedBindMode",0,R,"Audio",0,sI,"AudioAnalyser",0,sO,"AudioContext",0,sx,"AudioListener",0,sD,"AudioLoader",0,sy,"AxesHelper",0,oD,"BackSide",0,1,"BasicDepthPacking",0,3200,"BasicShadowMap",0,0,"BatchedMesh",0,nO,"Bone",0,ni,"BooleanKeyframeTrack",0,aI,"Box2",0,oe,"Box3",0,eR,"Box3Helper",0,o_,"BoxGeometry",0,ix,"BoxHelper",0,oE,"BufferAttribute",0,tq,"BufferGeometry",0,ii,"BufferGeometryLoader",0,sd,"ByteType",0,1010,"Cache",0,ak,"Camera",0,iw,"CameraHelper",0,ob,"CanvasTexture",0,ri,"CapsuleGeometry",0,r_,"CatmullRomCurve3",0,rd,"CineonToneMapping",0,3,"CircleGeometry",0,rC,"ClampToEdgeWrapping",0,1001,"Clock",0,sT,"Color",0,tO,"ColorKeyframeTrack",0,aL,"ColorManagement",0,eu,"CompressedArrayTexture",0,re,"CompressedCubeTexture",0,rt,"CompressedTexture",0,n7,"CompressedTextureLoader",0,aQ,"ConeGeometry",0,rP,"ConstantAlphaFactor",0,213,"ConstantColorFactor",0,211,"Controls",0,oL,"CubeCamera",0,iR,"CubeReflectionMapping",0,301,"CubeRefractionMapping",0,302,"CubeTexture",0,iP,"CubeTextureLoader",0,aK,"CubeUVReflectionMapping",0,306,"CubicBezierCurve",0,rg,"CubicBezierCurve3",0,rv,"CubicInterpolant",0,aC,"CullFaceBack",0,1,"CullFaceFront",0,2,"CullFaceFrontBack",0,3,"CullFaceNone",0,0,"Curve",0,rr,"CurvePath",0,rw,"CustomBlending",0,5,"CustomToneMapping",0,5,"CylinderGeometry",0,rR,"Cylindrical",0,s8,"Data3DTexture",0,eb,"DataArrayTexture",0,eA,"DataTexture",0,nn,"DataTextureLoader",0,aZ,"DataUtils",0,tX,"DecrementStencilOp",0,7683,"DecrementWrapStencilOp",0,34056,"DefaultLoadingManager",0,aG,"DepthFormat",0,1026,"DepthStencilFormat",0,1027,"DepthTexture",0,rn,"DetachedBindMode",0,P,"DirectionalLight",0,sr,"DirectionalLightHelper",0,oS,"DiscreteInterpolant",0,aP,"DodecahedronGeometry",0,rI,"DoubleSide",0,2,"DstAlphaFactor",0,206,"DstColorFactor",0,208,"DynamicCopyUsage",0,35050,"DynamicDrawUsage",0,35048,"DynamicReadUsage",0,35049,"EdgesGeometry",0,rF,"EllipseCurve",0,ra,"EqualCompare",0,514,"EqualDepth",0,4,"EqualStencilFunc",0,514,"EquirectangularReflectionMapping",0,303,"EquirectangularRefractionMapping",0,304,"Euler",0,ti,"EventDispatcher",0,N,"ExtrudeGeometry",0,r4,"FileLoader",0,aX,"Float16BufferAttribute",0,t3,"Float32BufferAttribute",0,t4,"FloatType",0,1015,"Fog",0,iL,"FogExp2",0,iI,"FramebufferTexture",0,n9,"FrontSide",0,0,"Frustum",0,nM,"GLBufferAttribute",0,s1,"GLSL1",0,"100","GLSL3",0,U,"GreaterCompare",0,516,"GreaterDepth",0,6,"GreaterEqualCompare",0,518,"GreaterEqualDepth",0,5,"GreaterEqualStencilFunc",0,518,"GreaterStencilFunc",0,516,"GridHelper",0,om,"Group",0,n6,"HalfFloatType",0,1016,"HemisphereLight",0,a0,"HemisphereLightHelper",0,op,"IcosahedronGeometry",0,r6,"ImageBitmapLoader",0,sv,"ImageLoader",0,aq,"ImageUtils",0,ed,"IncrementStencilOp",0,7682,"IncrementWrapStencilOp",0,34055,"InstancedBufferAttribute",0,no,"InstancedBufferGeometry",0,sh,"InstancedInterleavedBuffer",0,s0,"InstancedMesh",0,nm,"Int16BufferAttribute",0,t$,"Int32BufferAttribute",0,t1,"Int8BufferAttribute",0,tK,"IntType",0,1013,"InterleavedBuffer",0,iU,"InterleavedBufferAttribute",0,iF,"Interpolant",0,a_,"InterpolateDiscrete",0,2300,"InterpolateLinear",0,2301,"InterpolateSmooth",0,2302,"InvertStencilOp",0,5386,"KeepStencilOp",0,7680,"KeyframeTrack",0,aD,"LOD",0,i1,"LatheGeometry",0,rE,"Layers",0,tn,"LessCompare",0,513,"LessDepth",0,2,"LessEqualCompare",0,515,"LessEqualDepth",0,3,"LessEqualStencilFunc",0,515,"LessStencilFunc",0,513,"Light",0,a$,"LightProbe",0,sl,"Line",0,nY,"Line3",0,on,"LineBasicMaterial",0,nz,"LineCurve",0,rx,"LineCurve3",0,ry,"LineDashedMaterial",0,aS,"LineLoop",0,nJ,"LineSegments",0,nZ,"LinearFilter",0,1006,"LinearInterpolant",0,aR,"LinearMipMapLinearFilter",0,1008,"LinearMipMapNearestFilter",0,1007,"LinearMipmapLinearFilter",0,1008,"LinearMipmapNearestFilter",0,1007,"LinearSRGBColorSpace",0,I,"LinearToneMapping",0,1,"LinearTransfer",0,L,"Loader",0,aV,"LoaderUtils",0,sc,"LoadingManager",0,aH,"LoopOnce",0,2200,"LoopPingPong",0,2202,"LoopRepeat",0,2201,"LuminanceAlphaFormat",0,1025,"LuminanceFormat",0,1024,"MOUSE",0,_,"Material",0,tH,"MaterialLoader",0,su,"MathUtils",0,Y,"Matrix2",0,s9,"Matrix3",0,q,"Matrix4",0,e2,"MaxEquation",0,104,"Mesh",0,ig,"MeshBasicMaterial",0,tG,"MeshDepthMaterial",0,av,"MeshDistanceMaterial",0,ax,"MeshLambertMaterial",0,ag,"MeshMatcapMaterial",0,ay,"MeshNormalMaterial",0,am,"MeshPhongMaterial",0,af,"MeshPhysicalMaterial",0,ad,"MeshStandardMaterial",0,ah,"MeshToonMaterial",0,ap,"MinEquation",0,103,"MirroredRepeatWrapping",0,1002,"MixOperation",0,1,"MultiplyBlending",0,4,"MultiplyOperation",0,0,"NearestFilter",0,1003,"NearestMipMapLinearFilter",0,1005,"NearestMipMapNearestFilter",0,1004,"NearestMipmapLinearFilter",0,1005,"NearestMipmapNearestFilter",0,1004,"NeutralToneMapping",0,7,"NeverCompare",0,512,"NeverDepth",0,0,"NeverStencilFunc",0,512,"NoBlending",0,0,"NoColorSpace",0,"","NoToneMapping",0,0,"NormalAnimationBlendMode",0,2500,"NormalBlending",0,1,"NotEqualCompare",0,517,"NotEqualDepth",0,7,"NotEqualStencilFunc",0,517,"NumberKeyframeTrack",0,aB,"Object3D",0,ty,"ObjectLoader",0,sf,"ObjectSpaceNormalMap",0,1,"OctahedronGeometry",0,r8,"OneFactor",0,201,"OneMinusConstantAlphaFactor",0,214,"OneMinusConstantColorFactor",0,212,"OneMinusDstAlphaFactor",0,207,"OneMinusDstColorFactor",0,209,"OneMinusSrcAlphaFactor",0,205,"OneMinusSrcColorFactor",0,203,"OrthographicCamera",0,si,"PCFShadowMap",0,1,"PCFSoftShadowMap",0,2,"PMREMGenerator",0,o8,"Path",0,rT,"PerspectiveCamera",0,iC,"Plane",0,ny,"PlaneGeometry",0,r9,"PlaneHelper",0,oC,"PointLight",0,st,"PointLightHelper",0,oc,"Points",0,n4,"PointsMaterial",0,n$,"PolarGridHelper",0,og,"PolyhedronGeometry",0,rD,"PositionalAudio",0,sF,"PropertyBinding",0,sX,"PropertyMixer",0,sz,"QuadraticBezierCurve",0,rS,"QuadraticBezierCurve3",0,rA,"Quaternion",0,eT,"QuaternionKeyframeTrack",0,aN,"QuaternionLinearInterpolant",0,aU,"RED_GREEN_RGTC2_Format",0,36285,"RED_RGTC1_Format",0,36283,"REVISION",0,"171","RGBADepthPacking",0,3201,"RGBAFormat",0,1023,"RGBAIntegerFormat",0,1033,"RGBA_ASTC_10x10_Format",0,37819,"RGBA_ASTC_10x5_Format",0,37816,"RGBA_ASTC_10x6_Format",0,37817,"RGBA_ASTC_10x8_Format",0,37818,"RGBA_ASTC_12x10_Format",0,37820,"RGBA_ASTC_12x12_Format",0,37821,"RGBA_ASTC_4x4_Format",0,37808,"RGBA_ASTC_5x4_Format",0,37809,"RGBA_ASTC_5x5_Format",0,37810,"RGBA_ASTC_6x5_Format",0,37811,"RGBA_ASTC_6x6_Format",0,37812,"RGBA_ASTC_8x5_Format",0,37813,"RGBA_ASTC_8x6_Format",0,37814,"RGBA_ASTC_8x8_Format",0,37815,"RGBA_BPTC_Format",0,36492,"RGBA_ETC2_EAC_Format",0,37496,"RGBA_PVRTC_2BPPV1_Format",0,35843,"RGBA_PVRTC_4BPPV1_Format",0,35842,"RGBA_S3TC_DXT1_Format",0,33777,"RGBA_S3TC_DXT3_Format",0,33778,"RGBA_S3TC_DXT5_Format",0,33779,"RGBDepthPacking",0,3202,"RGBFormat",0,1022,"RGBIntegerFormat",0,1032,"RGB_BPTC_SIGNED_Format",0,36494,"RGB_BPTC_UNSIGNED_Format",0,36495,"RGB_ETC1_Format",0,36196,"RGB_ETC2_Format",0,37492,"RGB_PVRTC_2BPPV1_Format",0,35841,"RGB_PVRTC_4BPPV1_Format",0,35840,"RGB_S3TC_DXT1_Format",0,33776,"RGDepthPacking",0,3203,"RGFormat",0,1030,"RGIntegerFormat",0,1031,"RawShaderMaterial",0,ac,"Ray",0,e1,"Raycaster",0,s3,"RectAreaLight",0,ss,"RedFormat",0,1028,"RedIntegerFormat",0,1029,"ReinhardToneMapping",0,2,"RenderTarget",0,ey,"RepeatWrapping",0,1e3,"ReplaceStencilOp",0,7681,"ReverseSubtractEquation",0,102,"RingGeometry",0,r7,"SIGNED_RED_GREEN_RGTC2_Format",0,36286,"SIGNED_RED_RGTC1_Format",0,36284,"SRGBColorSpace",0,D,"SRGBTransfer",0,B,"Scene",0,iB,"ShaderChunk",0,oz,"ShaderLib",0,oH,"ShaderMaterial",0,ib,"ShadowMaterial",0,au,"Shape",0,rO,"ShapeGeometry",0,ae,"ShapePath",0,oI,"ShapeUtils",0,r1,"ShortType",0,1011,"Skeleton",0,ns,"SkeletonHelper",0,ou,"SkinnedMesh",0,nt,"Source",0,ep,"Sphere",0,eY,"SphereGeometry",0,at,"Spherical",0,s6,"SphericalHarmonics3",0,so,"SplineCurve",0,rM,"SpotLight",0,a6,"SpotLightHelper",0,oa,"Sprite",0,iZ,"SpriteMaterial",0,iO,"SrcAlphaFactor",0,204,"SrcAlphaSaturateFactor",0,210,"SrcColorFactor",0,202,"StaticCopyUsage",0,35046,"StaticDrawUsage",0,35044,"StaticReadUsage",0,35045,"StereoCamera",0,sb,"StreamCopyUsage",0,35042,"StreamDrawUsage",0,35040,"StreamReadUsage",0,35041,"StringKeyframeTrack",0,aF,"SubtractEquation",0,101,"SubtractiveBlending",0,3,"TOUCH",0,C,"TangentSpaceNormalMap",0,0,"TetrahedronGeometry",0,ai,"Texture",0,ev,"TextureLoader",0,aJ,"TextureUtils",0,oU,"TorusGeometry",0,an,"TorusKnotGeometry",0,ar,"Triangle",0,tL,"TriangleFanDrawMode",0,2,"TriangleStripDrawMode",0,1,"TrianglesDrawMode",0,0,"TubeGeometry",0,aa,"UVMapping",0,300,"Uint16BufferAttribute",0,t0,"Uint32BufferAttribute",0,t2,"Uint8BufferAttribute",0,tZ,"Uint8ClampedBufferAttribute",0,tJ,"Uniform",0,sZ,"UniformsGroup",0,s$,"UniformsLib",0,ok,"UniformsUtils",0,iM,"UnsignedByteType",0,1009,"UnsignedInt248Type",0,1020,"UnsignedInt5999Type",0,35902,"UnsignedIntType",0,1014,"UnsignedShort4444Type",0,1017,"UnsignedShort5551Type",0,1018,"UnsignedShortType",0,1012,"VSMShadowMap",0,3,"Vector2",0,Q,"Vector3",0,eE,"Vector4",0,ex,"VectorKeyframeTrack",0,aO,"VideoTexture",0,n8,"WebGL3DRenderTarget",0,ew,"WebGLArrayRenderTarget",0,eM,"WebGLCoordinateSystem",0,2e3,"WebGLCubeRenderTarget",0,iD,"WebGLMultipleRenderTargets",0,oN,"WebGLRenderTarget",0,eS,"WebGLRenderer",0,uZ,"WebGLUtils",0,uk,"WebGPUCoordinateSystem",0,2001,"WireframeGeometry",0,as,"WrapAroundEnding",0,2402,"ZeroCurvatureEnding",0,2400,"ZeroFactor",0,200,"ZeroSlopeEnding",0,2401,"ZeroStencilOp",0,0,"createCanvasElement",0,et],32009);var hg=e.i(32009);function hv(e,t){let i;return(...n)=>{window.clearTimeout(i),i=window.setTimeout(()=>e(...n),t)}}let hx=["x","y","top","bottom","left","right","width","height"];function hy({ref:e,children:t,fallback:i,resize:n,style:r,gl:a,events:s=hm,eventSource:o,eventPrefix:l,shadows:u,linear:c,flat:h,legacy:d,orthographic:f,frameloop:p,dpr:m,performance:g,raycaster:v,camera:x,scene:y,onPointerMissed:S,onCreated:A,...M}){E.useMemo(()=>cQ(hg),[]);let b=ch(),[w,T]=function({debounce:e,scroll:t,polyfill:i,offsetSize:n}={debounce:0,scroll:!1,offsetSize:!1}){var r,a,s;let o=i||("u"<typeof window?class{}:window.ResizeObserver);if(!o)throw Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");let[l,u]=(0,E.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),c=(0,E.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:l,orientationHandler:null}),h=e?"number"==typeof e?e:e.scroll:null,d=e?"number"==typeof e?e:e.resize:null,f=(0,E.useRef)(!1);(0,E.useEffect)(()=>(f.current=!0,()=>void(f.current=!1)));let[p,m,g]=(0,E.useMemo)(()=>{let e=()=>{let e,t;if(!c.current.element)return;let{left:i,top:r,width:a,height:s,bottom:o,right:l,x:h,y:d}=c.current.element.getBoundingClientRect(),p={left:i,top:r,width:a,height:s,bottom:o,right:l,x:h,y:d};c.current.element instanceof HTMLElement&&n&&(p.height=c.current.element.offsetHeight,p.width=c.current.element.offsetWidth),Object.freeze(p),f.current&&(e=c.current.lastBounds,t=p,!hx.every(i=>e[i]===t[i]))&&u(c.current.lastBounds=p)};return[e,d?hv(e,d):e,h?hv(e,h):e]},[u,n,h,d]);function v(){c.current.scrollContainers&&(c.current.scrollContainers.forEach(e=>e.removeEventListener("scroll",g,!0)),c.current.scrollContainers=null),c.current.resizeObserver&&(c.current.resizeObserver.disconnect(),c.current.resizeObserver=null),c.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",c.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",c.current.orientationHandler))}function x(){c.current.element&&(c.current.resizeObserver=new o(g),c.current.resizeObserver.observe(c.current.element),t&&c.current.scrollContainers&&c.current.scrollContainers.forEach(e=>e.addEventListener("scroll",g,{capture:!0,passive:!0})),c.current.orientationHandler=()=>{g()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",c.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",c.current.orientationHandler))}return r=g,a=!!t,(0,E.useEffect)(()=>{if(a)return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)},[r,a]),s=m,(0,E.useEffect)(()=>(window.addEventListener("resize",s),()=>void window.removeEventListener("resize",s)),[s]),(0,E.useEffect)(()=>{v(),x()},[t,g,m]),(0,E.useEffect)(()=>v,[]),[e=>{e&&e!==c.current.element&&(v(),c.current.element=e,c.current.scrollContainers=function e(t){let i=[];if(!t||t===document.body)return i;let{overflow:n,overflowX:r,overflowY:a}=window.getComputedStyle(t);return[n,r,a].some(e=>"auto"===e||"scroll"===e)&&i.push(t),[...i,...e(t.parentElement)]}(e),x())},l,p]}({scroll:!0,debounce:{scroll:50,resize:0},...n}),_=E.useRef(null),C=E.useRef(null);E.useImperativeHandle(e,()=>_.current);let R=cc(S),[P,D]=E.useState(!1),[I,L]=E.useState(!1);if(P)throw P;if(I)throw I;let B=E.useRef(null);cu(()=>{let e=_.current;T.width>0&&T.height>0&&e&&(B.current||(B.current=c7(e)),async function(){await B.current.configure({gl:a,scene:y,events:s,shadows:u,linear:c,flat:h,legacy:d,orthographic:f,frameloop:p,dpr:m,performance:g,raycaster:v,camera:x,size:T,onPointerMissed:(...e)=>null==R.current?void 0:R.current(...e),onCreated:e=>{null==e.events.connect||e.events.connect(o?co(o)?o.current:o:C.current),l&&e.setEvents({compute:(e,t)=>{let i=e[l+"X"],n=e[l+"Y"];t.pointer.set(i/t.size.width*2-1,-(2*(n/t.size.height))+1),t.raycaster.setFromCamera(t.pointer,t.camera)}}),null==A||A(e)}}),B.current.render((0,u8.jsx)(b,{children:(0,u8.jsx)(cf,{set:L,children:(0,u8.jsx)(E.Suspense,{fallback:(0,u8.jsx)(cd,{set:D}),children:null!=t?t:null})})}))}())}),E.useEffect(()=>{let e=_.current;if(e)return()=>ht(e)},[]);let U=o?"none":"auto";return(0,u8.jsx)("div",{ref:C,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:U,...r},...M,children:(0,u8.jsx)("div",{ref:w,style:{width:"100%",height:"100%"},children:(0,u8.jsx)("canvas",{ref:_,style:{display:"block"},children:i})})})}e.s(["Canvas",0,function(e){return(0,u8.jsx)(ci,{children:(0,u8.jsx)(hy,{...e})})}],75056),e.s(["useFrame",0,cF],25234),e.s(["useThree",0,cN],28600),e.s(["extend",0,cQ],67335)},44208,e=>{"use strict";var t=e.i(1950);e.s(["createPortal",()=>t.o])},60602,e=>{"use strict";var t=e.i(1950);e.s(["useLoader",()=>t.G])},79877,24205,33623,e=>{"use strict";let t,i,n,r,a,s;var o,l,u,c,h,d,f,p,m,g,v,x,y,S,A,M,b,w,T,E,_,C,R,P,D,I=e.i(43476),L=e.i(71645),B=e.i(90072),U=e.i(28600),N=e.i(25234),F=e.i(67335),O=e.i(44208),z=(e.i(60602),e.i(1950));e.s(["applyProps",()=>z.s],24205);var z=z,k=B,H=(t=new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),i=new Float32Array([0,0,2,0,0,2]),(n=new k.BufferGeometry).setAttribute("position",new k.BufferAttribute(t,3)),n.setAttribute("uv",new k.BufferAttribute(i,2)),n),G=class e{static get fullscreenGeometry(){return H}constructor(e="Pass",t=new k.Scene,i=new k.OrthographicCamera){this.name=e,this.renderer=null,this.scene=t,this.camera=i,this.screen=null,this.rtt=!0,this.needsSwap=!0,this.needsDepthBlit=!1,this.needsDepthTexture=!1,this.enabled=!0}get renderToScreen(){return!this.rtt}set renderToScreen(e){if(this.rtt===e){let t=this.fullscreenMaterial;null!==t&&(t.needsUpdate=!0),this.rtt=!e}}set mainScene(e){}set mainCamera(e){}setRenderer(e){this.renderer=e}isEnabled(){return this.enabled}setEnabled(e){this.enabled=e}get fullscreenMaterial(){return null!==this.screen?this.screen.material:null}set fullscreenMaterial(t){let i=this.screen;null!==i?i.material=t:((i=new k.Mesh(e.fullscreenGeometry,t)).frustumCulled=!1,null===this.scene&&(this.scene=new k.Scene),this.scene.add(i),this.screen=i)}getFullscreenMaterial(){return this.fullscreenMaterial}setFullscreenMaterial(e){this.fullscreenMaterial=e}getDepthTexture(){return null}setDepthTexture(e,t=k.BasicDepthPacking){}render(e,t,i,n,r){throw Error("Render method not implemented!")}setSize(e,t){}initialize(e,t,i){}dispose(){for(let t of Object.keys(this)){let i=this[t];(i instanceof k.WebGLRenderTarget||i instanceof k.Material||i instanceof k.Texture||i instanceof e)&&this[t].dispose()}null!==this.fullscreenMaterial&&this.fullscreenMaterial.dispose()}},V=class extends G{constructor(){super("ClearMaskPass",null,null),this.needsSwap=!1}render(e,t,i,n,r){let a=e.state.buffers.stencil;a.setLocked(!1),a.setTest(!1)}},W=`#ifdef COLOR_WRITE
|
|
#include <common>
|
|
#include <dithering_pars_fragment>
|
|
#ifdef FRAMEBUFFER_PRECISION_HIGH
|
|
uniform mediump sampler2D inputBuffer;
|
|
#else
|
|
uniform lowp sampler2D inputBuffer;
|
|
#endif
|
|
#endif
|
|
#ifdef DEPTH_WRITE
|
|
#include <packing>
|
|
#ifdef GL_FRAGMENT_PRECISION_HIGH
|
|
uniform highp sampler2D depthBuffer;
|
|
#else
|
|
uniform mediump sampler2D depthBuffer;
|
|
#endif
|
|
float readDepth(const in vec2 uv){
|
|
#if DEPTH_PACKING == 3201
|
|
return unpackRGBAToDepth(texture2D(depthBuffer,uv));
|
|
#else
|
|
return texture2D(depthBuffer,uv).r;
|
|
#endif
|
|
}
|
|
#endif
|
|
#ifdef USE_WEIGHTS
|
|
uniform vec4 channelWeights;
|
|
#endif
|
|
uniform float opacity;varying vec2 vUv;void main(){
|
|
#ifdef COLOR_WRITE
|
|
vec4 texel=texture2D(inputBuffer,vUv);
|
|
#ifdef USE_WEIGHTS
|
|
texel*=channelWeights;
|
|
#endif
|
|
gl_FragColor=opacity*texel;
|
|
#ifdef COLOR_SPACE_CONVERSION
|
|
#include <colorspace_fragment>
|
|
#endif
|
|
#include <dithering_fragment>
|
|
#else
|
|
gl_FragColor=vec4(0.0);
|
|
#endif
|
|
#ifdef DEPTH_WRITE
|
|
gl_FragDepth=readDepth(vUv);
|
|
#endif
|
|
}`,j="varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}",X=class extends k.ShaderMaterial{constructor(){super({name:"CopyMaterial",defines:{COLOR_SPACE_CONVERSION:"1",DEPTH_PACKING:"0",COLOR_WRITE:"1"},uniforms:{inputBuffer:new k.Uniform(null),depthBuffer:new k.Uniform(null),channelWeights:new k.Uniform(null),opacity:new k.Uniform(1)},blending:k.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:W,vertexShader:j}),this.depthFunc=k.AlwaysDepth}get inputBuffer(){return this.uniforms.inputBuffer.value}set inputBuffer(e){let t=null!==e;this.colorWrite!==t&&(t?this.defines.COLOR_WRITE=!0:delete this.defines.COLOR_WRITE,this.colorWrite=t,this.needsUpdate=!0),this.uniforms.inputBuffer.value=e}get depthBuffer(){return this.uniforms.depthBuffer.value}set depthBuffer(e){let t=null!==e;this.depthWrite!==t&&(t?this.defines.DEPTH_WRITE=!0:delete this.defines.DEPTH_WRITE,this.depthTest=t,this.depthWrite=t,this.needsUpdate=!0),this.uniforms.depthBuffer.value=e}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}get colorSpaceConversion(){return void 0!==this.defines.COLOR_SPACE_CONVERSION}set colorSpaceConversion(e){this.colorSpaceConversion!==e&&(e?this.defines.COLOR_SPACE_CONVERSION=!0:delete this.defines.COLOR_SPACE_CONVERSION,this.needsUpdate=!0)}get channelWeights(){return this.uniforms.channelWeights.value}set channelWeights(e){null!==e?(this.defines.USE_WEIGHTS="1",this.uniforms.channelWeights.value=e):delete this.defines.USE_WEIGHTS,this.needsUpdate=!0}setInputBuffer(e){this.uniforms.inputBuffer.value=e}getOpacity(e){return this.uniforms.opacity.value}setOpacity(e){this.uniforms.opacity.value=e}},Y=class extends G{constructor(e,t=!0){super("CopyPass"),this.fullscreenMaterial=new X,this.needsSwap=!1,this.renderTarget=e,void 0===e&&(this.renderTarget=new k.WebGLRenderTarget(1,1,{minFilter:k.LinearFilter,magFilter:k.LinearFilter,stencilBuffer:!1,depthBuffer:!1}),this.renderTarget.texture.name="CopyPass.Target"),this.autoResize=t}get resize(){return this.autoResize}set resize(e){this.autoResize=e}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}setAutoResizeEnabled(e){this.autoResize=e}render(e,t,i,n,r){this.fullscreenMaterial.inputBuffer=t.texture,e.setRenderTarget(this.renderToScreen?null:this.renderTarget),e.render(this.scene,this.camera)}setSize(e,t){this.autoResize&&this.renderTarget.setSize(e,t)}initialize(e,t,i){void 0!==i&&(this.renderTarget.texture.type=i,i!==k.UnsignedByteType?this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1":null!==e&&e.outputColorSpace===k.SRGBColorSpace&&(this.renderTarget.texture.colorSpace=k.SRGBColorSpace))}},Q=new k.Color,q=class extends G{constructor(e=!0,t=!0,i=!1){super("ClearPass",null,null),this.needsSwap=!1,this.color=e,this.depth=t,this.stencil=i,this.overrideClearColor=null,this.overrideClearAlpha=-1}setClearFlags(e,t,i){this.color=e,this.depth=t,this.stencil=i}getOverrideClearColor(){return this.overrideClearColor}setOverrideClearColor(e){this.overrideClearColor=e}getOverrideClearAlpha(){return this.overrideClearAlpha}setOverrideClearAlpha(e){this.overrideClearAlpha=e}render(e,t,i,n,r){let a=this.overrideClearColor,s=this.overrideClearAlpha,o=e.getClearAlpha(),l=null!==a,u=s>=0;l?(e.getClearColor(Q),e.setClearColor(a,u?s:o)):u&&e.setClearAlpha(s),e.setRenderTarget(this.renderToScreen?null:t),e.clear(this.color,this.depth,this.stencil),l?e.setClearColor(Q,o):u&&e.setClearAlpha(o)}},K=class extends G{constructor(e,t){super("MaskPass",e,t),this.needsSwap=!1,this.clearPass=new q(!1,!1,!0),this.inverse=!1}set mainScene(e){this.scene=e}set mainCamera(e){this.camera=e}get inverted(){return this.inverse}set inverted(e){this.inverse=e}get clear(){return this.clearPass.enabled}set clear(e){this.clearPass.enabled=e}getClearPass(){return this.clearPass}isInverted(){return this.inverted}setInverted(e){this.inverted=e}render(e,t,i,n,r){let a=e.getContext(),s=e.state.buffers,o=this.scene,l=this.camera,u=this.clearPass,c=+!this.inverted;s.color.setMask(!1),s.depth.setMask(!1),s.color.setLocked(!0),s.depth.setLocked(!0),s.stencil.setTest(!0),s.stencil.setOp(a.REPLACE,a.REPLACE,a.REPLACE),s.stencil.setFunc(a.ALWAYS,c,0xffffffff),s.stencil.setClear(1-c),s.stencil.setLocked(!0),this.clearPass.enabled&&(this.renderToScreen?u.render(e,null):(u.render(e,t),u.render(e,i))),this.renderToScreen?e.setRenderTarget(null):(e.setRenderTarget(t),e.render(o,l),e.setRenderTarget(i)),e.render(o,l),s.color.setLocked(!1),s.depth.setLocked(!1),s.stencil.setLocked(!1),s.stencil.setFunc(a.EQUAL,1,0xffffffff),s.stencil.setOp(a.KEEP,a.KEEP,a.KEEP),s.stencil.setLocked(!0)}},Z=class{constructor(){this.startTime=performance.now(),this.previousTime=0,this.currentTime=0,this._delta=0,this._elapsed=0,this._fixedDelta=1e3/60,this.timescale=1,this.useFixedDelta=!1,this._autoReset=!1}get autoReset(){return this._autoReset}set autoReset(e){"u">typeof document&&void 0!==document.hidden&&(e?document.addEventListener("visibilitychange",this):document.removeEventListener("visibilitychange",this),this._autoReset=e)}get delta(){return .001*this._delta}get fixedDelta(){return .001*this._fixedDelta}set fixedDelta(e){this._fixedDelta=1e3*e}get elapsed(){return .001*this._elapsed}update(e){this.useFixedDelta?this._delta=this.fixedDelta:(this.previousTime=this.currentTime,this.currentTime=(void 0!==e?e:performance.now())-this.startTime,this._delta=this.currentTime-this.previousTime),this._delta*=this.timescale,this._elapsed+=this._delta}reset(){this._delta=0,this._elapsed=0,this.currentTime=performance.now()-this.startTime}getDelta(){return this.delta}getElapsed(){return this.elapsed}handleEvent(e){document.hidden||(this.currentTime=performance.now()-this.startTime)}dispose(){this.autoReset=!1}},J=class{constructor(e=null,{depthBuffer:t=!0,stencilBuffer:i=!1,multisampling:n=0,frameBufferType:r}={}){this.renderer=null,this.inputBuffer=this.createBuffer(t,i,r,n),this.outputBuffer=this.inputBuffer.clone(),this.copyPass=new Y,this.depthTexture=null,this.depthRenderTarget=null,this.passes=[],this.timer=new Z,this.autoRenderToScreen=!0,this.setRenderer(e)}get multisampling(){return this.inputBuffer.samples}set multisampling(e){let t=this.inputBuffer,i=this.multisampling;i>0&&e>0?(this.inputBuffer.samples=e,this.outputBuffer.samples=e,this.inputBuffer.dispose(),this.outputBuffer.dispose()):i!==e&&(this.inputBuffer.dispose(),this.outputBuffer.dispose(),this.inputBuffer=this.createBuffer(t.depthBuffer,t.stencilBuffer,t.texture.type,e),this.outputBuffer=this.inputBuffer.clone())}getTimer(){return this.timer}getRenderer(){return this.renderer}setRenderer(e){if(this.renderer=e,null!==e){let t=e.getSize(new k.Vector2),i=e.getContext().getContextAttributes().alpha,n=this.inputBuffer.texture.type;for(let r of(n===k.UnsignedByteType&&e.outputColorSpace===k.SRGBColorSpace&&(this.inputBuffer.texture.colorSpace=k.SRGBColorSpace,this.outputBuffer.texture.colorSpace=k.SRGBColorSpace,this.inputBuffer.dispose(),this.outputBuffer.dispose()),e.autoClear=!1,this.setSize(t.width,t.height),this.passes))r.initialize(e,i,n)}}replaceRenderer(e,t=!0){let i=this.renderer,n=i.domElement.parentNode;return this.setRenderer(e),t&&null!==n&&(n.removeChild(i.domElement),n.appendChild(e.domElement)),i}createDepthTexture(){let e=this.inputBuffer,t=new k.DepthTexture;this.depthTexture=t,e.stencilBuffer?(t.format=k.DepthStencilFormat,t.type=k.UnsignedInt248Type):t.type=k.FloatType;let i=t.clone();return i.name="EffectComposer.StableDepth",this.depthRenderTarget=new k.WebGLRenderTarget(e.width,e.height,{depthBuffer:!0,stencilBuffer:e.stencilBuffer,depthTexture:i}),i}blitDepthBuffer(e){let t=this.renderer,i=this.depthRenderTarget,n=t.properties,r=t.getContext();t.setRenderTarget(i);let a=n.get(e).__webglFramebuffer,s=n.get(i).__webglFramebuffer,o=e.stencilBuffer?r.DEPTH_BUFFER_BIT|r.STENCIL_BUFFER_BIT:r.DEPTH_BUFFER_BIT;r.bindFramebuffer(r.READ_FRAMEBUFFER,a),r.bindFramebuffer(r.DRAW_FRAMEBUFFER,s),r.blitFramebuffer(0,0,e.width,e.height,0,0,i.width,i.height,o,r.NEAREST),r.bindFramebuffer(r.READ_FRAMEBUFFER,null),r.bindFramebuffer(r.DRAW_FRAMEBUFFER,null),t.setRenderTarget(null)}deleteDepthTexture(){if(null!==this.depthTexture)for(let e of(this.depthTexture.dispose(),this.depthTexture=null,this.depthRenderTarget.dispose(),this.depthRenderTarget=null,this.inputBuffer.depthTexture=null,this.outputBuffer.depthTexture=null,this.passes))e.setDepthTexture(null)}createBuffer(e,t,i,n){let r=this.renderer,a=null===r?new k.Vector2:r.getDrawingBufferSize(new k.Vector2),s={minFilter:k.LinearFilter,magFilter:k.LinearFilter,stencilBuffer:t,depthBuffer:e,type:i},o=new k.WebGLRenderTarget(a.width,a.height,s);return n>0&&(o.samples=n),i===k.UnsignedByteType&&null!==r&&r.outputColorSpace===k.SRGBColorSpace&&(o.texture.colorSpace=k.SRGBColorSpace),o.texture.name="EffectComposer.Buffer",o.texture.generateMipmaps=!1,o}setMainScene(e){for(let t of this.passes)t.mainScene=e}setMainCamera(e){for(let t of this.passes)t.mainCamera=e}addPass(e,t){let i=this.passes,n=this.renderer,r=n.getDrawingBufferSize(new k.Vector2),a=n.getContext().getContextAttributes().alpha,s=this.inputBuffer.texture.type;if(e.renderer=n,e.setSize(r.width,r.height),e.initialize(n,a,s),this.autoRenderToScreen&&(i.length>0&&(i[i.length-1].renderToScreen=!1),e.renderToScreen&&(this.autoRenderToScreen=!1)),void 0!==t?i.splice(t,0,e):i.push(e),this.autoRenderToScreen&&(i[i.length-1].renderToScreen=!0),e.needsDepthTexture||null!==this.depthTexture)if(null===this.depthTexture){let t=this.createDepthTexture();for(e of i)e.setDepthTexture(t)}else{let t=this.depthRenderTarget.depthTexture;e.setDepthTexture(t)}}removePass(e){let t=this.passes,i=t.indexOf(e);if(-1!==i&&t.splice(i,1).length>0){if(null!==this.depthTexture&&!t.reduce((e,t)=>e||t.needsDepthTexture,!1)){let t=this.depthRenderTarget.depthTexture;e.getDepthTexture()===t&&e.setDepthTexture(null),this.deleteDepthTexture()}this.autoRenderToScreen&&i===t.length&&(e.renderToScreen=!1,t.length>0&&(t[t.length-1].renderToScreen=!0))}}removeAllPasses(){let e=this.passes;this.deleteDepthTexture(),e.length>0&&(this.autoRenderToScreen&&(e[e.length-1].renderToScreen=!1),this.passes=[])}render(e){let t,i=this.renderer,n=this.copyPass,r=this.inputBuffer,a=this.outputBuffer,s=!1;for(let o of(void 0===e&&(this.timer.update(),e=this.timer.getDelta()),this.passes))if(o.enabled){if(r.depthTexture=this.depthTexture,a.depthTexture=null,o.render(i,r,a,e,s),o.needsDepthBlit&&null!==this.depthRenderTarget&&this.blitDepthBuffer(r),o.needsSwap){if(s){n.renderToScreen=o.renderToScreen;let t=i.getContext(),l=i.state.buffers.stencil;l.setFunc(t.NOTEQUAL,1,0xffffffff),n.render(i,r,a,e,s),l.setFunc(t.EQUAL,1,0xffffffff)}t=r,r=a,a=t}o instanceof K?s=!0:o instanceof V&&(s=!1)}}setSize(e,t,i){let n=this.renderer,r=n.getSize(new k.Vector2);(void 0===e||void 0===t)&&(e=r.width,t=r.height),(r.width!==e||r.height!==t)&&n.setSize(e,t,i);let a=n.getDrawingBufferSize(new k.Vector2);for(let e of(this.inputBuffer.setSize(a.width,a.height),this.outputBuffer.setSize(a.width,a.height),null!==this.depthRenderTarget&&this.depthRenderTarget.setSize(a.width,a.height),this.passes))e.setSize(a.width,a.height)}reset(){this.dispose(),this.autoRenderToScreen=!0}dispose(){for(let e of this.passes)e.dispose();this.passes=[],null!==this.inputBuffer&&this.inputBuffer.dispose(),null!==this.outputBuffer&&this.outputBuffer.dispose(),this.deleteDepthTexture(),this.copyPass.dispose(),this.timer.dispose(),G.fullscreenGeometry.dispose()}},$={FRAGMENT_HEAD:"FRAGMENT_HEAD",FRAGMENT_MAIN_UV:"FRAGMENT_MAIN_UV",FRAGMENT_MAIN_IMAGE:"FRAGMENT_MAIN_IMAGE",VERTEX_HEAD:"VERTEX_HEAD",VERTEX_MAIN_SUPPORT:"VERTEX_MAIN_SUPPORT"},ee=class{constructor(){this.shaderParts=new Map([[$.FRAGMENT_HEAD,null],[$.FRAGMENT_MAIN_UV,null],[$.FRAGMENT_MAIN_IMAGE,null],[$.VERTEX_HEAD,null],[$.VERTEX_MAIN_SUPPORT,null]]),this.defines=new Map,this.uniforms=new Map,this.blendModes=new Map,this.extensions=new Set,this.attributes=0,this.varyings=new Set,this.uvTransformation=!1,this.readDepth=!1,this.colorSpace=k.LinearSRGBColorSpace}},et=!1,ei=class{constructor(e=null){this.originalMaterials=new Map,this.material=null,this.materials=null,this.materialsBackSide=null,this.materialsDoubleSide=null,this.materialsFlatShaded=null,this.materialsFlatShadedBackSide=null,this.materialsFlatShadedDoubleSide=null,this.setMaterial(e),this.meshCount=0,this.replaceMaterial=e=>{if(e.isMesh){let t;if(e.material.flatShading)switch(e.material.side){case k.DoubleSide:t=this.materialsFlatShadedDoubleSide;break;case k.BackSide:t=this.materialsFlatShadedBackSide;break;default:t=this.materialsFlatShaded}else switch(e.material.side){case k.DoubleSide:t=this.materialsDoubleSide;break;case k.BackSide:t=this.materialsBackSide;break;default:t=this.materials}this.originalMaterials.set(e,e.material),e.isSkinnedMesh?e.material=t[2]:e.isInstancedMesh?e.material=t[1]:e.material=t[0],++this.meshCount}}}cloneMaterial(e){if(!(e instanceof k.ShaderMaterial))return e.clone();let t=e.uniforms,i=new Map;for(let e in t){let n=t[e].value;n.isRenderTargetTexture&&(t[e].value=null,i.set(e,n))}let n=e.clone();for(let e of i)t[e[0]].value=e[1],n.uniforms[e[0]].value=e[1];return n}setMaterial(e){if(this.disposeMaterials(),this.material=e,null!==e){let t=this.materials=[this.cloneMaterial(e),this.cloneMaterial(e),this.cloneMaterial(e)];for(let i of t)i.uniforms=Object.assign({},e.uniforms),i.side=k.FrontSide;t[2].skinning=!0,this.materialsBackSide=t.map(t=>{let i=this.cloneMaterial(t);return i.uniforms=Object.assign({},e.uniforms),i.side=k.BackSide,i}),this.materialsDoubleSide=t.map(t=>{let i=this.cloneMaterial(t);return i.uniforms=Object.assign({},e.uniforms),i.side=k.DoubleSide,i}),this.materialsFlatShaded=t.map(t=>{let i=this.cloneMaterial(t);return i.uniforms=Object.assign({},e.uniforms),i.flatShading=!0,i}),this.materialsFlatShadedBackSide=t.map(t=>{let i=this.cloneMaterial(t);return i.uniforms=Object.assign({},e.uniforms),i.flatShading=!0,i.side=k.BackSide,i}),this.materialsFlatShadedDoubleSide=t.map(t=>{let i=this.cloneMaterial(t);return i.uniforms=Object.assign({},e.uniforms),i.flatShading=!0,i.side=k.DoubleSide,i})}}render(e,t,i){let n=e.shadowMap.enabled;if(e.shadowMap.enabled=!1,et){let n=this.originalMaterials;for(let r of(this.meshCount=0,t.traverse(this.replaceMaterial),e.render(t,i),n))r[0].material=r[1];this.meshCount!==n.size&&n.clear()}else{let n=t.overrideMaterial;t.overrideMaterial=this.material,e.render(t,i),t.overrideMaterial=n}e.shadowMap.enabled=n}disposeMaterials(){if(null!==this.material)for(let e of this.materials.concat(this.materialsBackSide).concat(this.materialsDoubleSide).concat(this.materialsFlatShaded).concat(this.materialsFlatShadedBackSide).concat(this.materialsFlatShadedDoubleSide))e.dispose()}dispose(){this.originalMaterials.clear(),this.disposeMaterials()}static get workaroundEnabled(){return et}static set workaroundEnabled(e){et=e}},en=class extends k.EventDispatcher{constructor(e=null,t=-1,i=-1,n=1){super(),null!==e&&this.addEventListener("change",()=>e.setSize(this.baseSize.width,this.baseSize.height)),this.baseSize=new k.Vector2(1,1),this.preferredSize=new k.Vector2(t,i),this.target=this.preferredSize,this.s=n,this.effectiveSize=new k.Vector2,this.addEventListener("change",()=>this.updateEffectiveSize()),this.updateEffectiveSize()}updateEffectiveSize(){let e=this.baseSize,t=this.preferredSize,i=this.effectiveSize,n=this.scale;-1!==t.width?i.width=t.width:-1!==t.height?i.width=Math.round(t.height*(e.width/Math.max(e.height,1))):i.width=Math.round(e.width*n),-1!==t.height?i.height=t.height:-1!==t.width?i.height=Math.round(t.width/Math.max(e.width/Math.max(e.height,1),1)):i.height=Math.round(e.height*n)}get width(){return this.effectiveSize.width}set width(e){this.preferredWidth=e}get height(){return this.effectiveSize.height}set height(e){this.preferredHeight=e}getWidth(){return this.width}getHeight(){return this.height}get scale(){return this.s}set scale(e){this.s!==e&&(this.s=e,this.preferredSize.setScalar(-1),this.dispatchEvent({type:"change"}))}getScale(){return this.scale}setScale(e){this.scale=e}get baseWidth(){return this.baseSize.width}set baseWidth(e){this.baseSize.width!==e&&(this.baseSize.width=e,this.dispatchEvent({type:"change"}))}getBaseWidth(){return this.baseWidth}setBaseWidth(e){this.baseWidth=e}get baseHeight(){return this.baseSize.height}set baseHeight(e){this.baseSize.height!==e&&(this.baseSize.height=e,this.dispatchEvent({type:"change"}))}getBaseHeight(){return this.baseHeight}setBaseHeight(e){this.baseHeight=e}setBaseSize(e,t){(this.baseSize.width!==e||this.baseSize.height!==t)&&(this.baseSize.set(e,t),this.dispatchEvent({type:"change"}))}get preferredWidth(){return this.preferredSize.width}set preferredWidth(e){this.preferredSize.width!==e&&(this.preferredSize.width=e,this.dispatchEvent({type:"change"}))}getPreferredWidth(){return this.preferredWidth}setPreferredWidth(e){this.preferredWidth=e}get preferredHeight(){return this.preferredSize.height}set preferredHeight(e){this.preferredSize.height!==e&&(this.preferredSize.height=e,this.dispatchEvent({type:"change"}))}getPreferredHeight(){return this.preferredHeight}setPreferredHeight(e){this.preferredHeight=e}setPreferredSize(e,t){(this.preferredSize.width!==e||this.preferredSize.height!==t)&&(this.preferredSize.set(e,t),this.dispatchEvent({type:"change"}))}copy(e){this.s=e.scale,this.baseSize.set(e.baseWidth,e.baseHeight),this.preferredSize.set(e.preferredWidth,e.preferredHeight),this.dispatchEvent({type:"change"})}static get AUTO_SIZE(){return -1}},er=new class{constructor(e=0){this.nextId=e}getNextId(){return this.nextId++}reset(e=0){return this.nextId=e,this}}(2),ea=class extends Set{constructor(e,t=er.getNextId()){super(),this.exclusive=!1,this._layer=t,(this._layer<1||this._layer>31)&&(console.warn("Layer out of range, resetting to 2"),er.reset(2),this._layer=er.getNextId()),void 0!==e&&this.set(e)}get layer(){return this._layer}set layer(e){let t=this._layer;for(let i of this)i.layers.disable(t),i.layers.enable(e);this._layer=e}getLayer(){return this.layer}setLayer(e){this.layer=e}isExclusive(){return this.exclusive}setExclusive(e){this.exclusive=e}clear(){let e=this.layer;for(let t of this)t.layers.disable(e);return super.clear()}set(e){for(let t of(this.clear(),e))this.add(t);return this}indexOf(e){return this.has(e)?0:-1}add(e){return this.exclusive?e.layers.set(this.layer):e.layers.enable(this.layer),super.add(e)}delete(e){return this.has(e)&&e.layers.disable(this.layer),super.delete(e)}toggle(e){let t;return this.has(e)?(this.delete(e),t=!1):(this.add(e),t=!0),t}setVisible(e){for(let t of this)e?t.layers.enable(0):t.layers.disable(0);return this}},es=new Map([[0,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=dst.rgb+src.rgb;return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}"],[1,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){return mix(dst,src,src.a*opacity);}"],[2,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=(dst.rgb+src.rgb)*0.5;return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}"],[3,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=RGBToHSL(dst.rgb);vec3 b=RGBToHSL(src.rgb);vec3 c=HSLToRGB(vec3(b.xy,a.z));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}"],[4,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=dst.rgb,b=src.rgb;vec3 c=mix(step(0.0,b)*(1.0-min(vec3(1.0),(1.0-a)/max(b,1e-9))),vec3(1.0),step(1.0,a));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}"],[5,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=dst.rgb,b=src.rgb;vec3 c=step(0.0,a)*mix(min(vec3(1.0),a/max(1.0-b,1e-9)),vec3(1.0),step(1.0,b));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}"],[6,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=min(dst.rgb,src.rgb);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}"],[7,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=abs(dst.rgb-src.rgb);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}"],[8,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=dst.rgb/max(src.rgb,1e-9);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}"],[9,null],[10,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=dst.rgb+src.rgb-2.0*dst.rgb*src.rgb;return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}"],[11,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=min(dst.rgb,1.0);vec3 b=min(src.rgb,1.0);vec3 c=mix(2.0*a*b,1.0-2.0*(1.0-a)*(1.0-b),step(0.5,b));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}"],[12,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=step(1.0,dst.rgb+src.rgb);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}"],[13,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=RGBToHSL(dst.rgb);vec3 b=RGBToHSL(src.rgb);vec3 c=HSLToRGB(vec3(b.x,a.yz));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}"],[14,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=max(1.0-src.rgb,0.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}"],[15,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=src.rgb*max(1.0-dst.rgb,0.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}"],[16,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=max(dst.rgb,src.rgb);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}"],[17,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=clamp(src.rgb+dst.rgb-1.0,0.0,1.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}"],[18,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=min(dst.rgb+src.rgb,1.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}"],[19,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=clamp(2.0*src.rgb+dst.rgb-1.0,0.0,1.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}"],[20,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=RGBToHSL(dst.rgb);vec3 b=RGBToHSL(src.rgb);vec3 c=HSLToRGB(vec3(a.xy,b.z));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}"],[21,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=dst.rgb*src.rgb;return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}"],[22,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=max(1.0-abs(1.0-dst.rgb-src.rgb),0.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}"],[23,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){return mix(dst,src,opacity);}"],[24,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=2.0*src.rgb*dst.rgb;vec3 b=1.0-2.0*(1.0-src.rgb)*(1.0-dst.rgb);vec3 c=mix(a,b,step(0.5,dst.rgb));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}"],[25,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 src2=2.0*src.rgb;vec3 c=mix(mix(src2,dst.rgb,step(0.5*dst.rgb,src.rgb)),max(src2-1.0,vec3(0.0)),step(dst.rgb,src2-1.0));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}"],[26,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=min(dst.rgb*dst.rgb/max(1.0-src.rgb,1e-9),1.0);vec3 c=mix(a,src.rgb,step(1.0,src.rgb));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}"],[27,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 a=RGBToHSL(dst.rgb);vec3 b=RGBToHSL(src.rgb);vec3 c=HSLToRGB(vec3(a.x,b.y,a.z));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}"],[28,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=dst.rgb+src.rgb-min(dst.rgb*src.rgb,1.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}"],[29,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 src2=2.0*src.rgb;vec3 d=dst.rgb+(src2-1.0);vec3 w=step(0.5,src.rgb);vec3 a=dst.rgb-(1.0-src2)*dst.rgb*(1.0-dst.rgb);vec3 b=mix(d*(sqrt(dst.rgb)-dst.rgb),d*dst.rgb*((16.0*dst.rgb-12.0)*dst.rgb+3.0),w*(1.0-step(0.25,dst.rgb)));vec3 c=mix(a,b,w);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}"],[30,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){return src;}"],[31,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=max(dst.rgb-src.rgb,0.0);return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}"],[32,"vec4 blend(const in vec4 dst,const in vec4 src,const in float opacity){vec3 c=mix(max(1.0-min((1.0-dst.rgb)/(2.0*src.rgb),1.0),0.0),min(dst.rgb/(2.0*(1.0-src.rgb)),1.0),step(0.5,src.rgb));return mix(dst,vec4(c,max(dst.a,src.a)),opacity);}"]]),eo=class extends k.EventDispatcher{constructor(e,t=1){super(),this._blendFunction=e,this.opacity=new k.Uniform(t)}getOpacity(){return this.opacity.value}setOpacity(e){this.opacity.value=e}get blendFunction(){return this._blendFunction}set blendFunction(e){this._blendFunction=e,this.dispatchEvent({type:"change"})}getBlendFunction(){return this.blendFunction}setBlendFunction(e){this.blendFunction=e}getShaderCode(){return es.get(this.blendFunction)}};k.CanvasTexture;var el=class extends k.EventDispatcher{constructor(e,t,{attributes:i=0,blendFunction:n=23,defines:r=new Map,uniforms:a=new Map,extensions:s=null,vertexShader:o=null}={}){super(),this.name=e,this.renderer=null,this.attributes=i,this.fragmentShader=t,this.vertexShader=o,this.defines=r,this.uniforms=a,this.extensions=s,this.blendMode=new eo(n),this.blendMode.addEventListener("change",e=>this.setChanged()),this._inputColorSpace=k.LinearSRGBColorSpace,this._outputColorSpace=k.NoColorSpace}get inputColorSpace(){return this._inputColorSpace}set inputColorSpace(e){this._inputColorSpace=e,this.setChanged()}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e,this.setChanged()}set mainScene(e){}set mainCamera(e){}getName(){return this.name}setRenderer(e){this.renderer=e}getDefines(){return this.defines}getUniforms(){return this.uniforms}getExtensions(){return this.extensions}getBlendMode(){return this.blendMode}getAttributes(){return this.attributes}setAttributes(e){this.attributes=e,this.setChanged()}getFragmentShader(){return this.fragmentShader}setFragmentShader(e){this.fragmentShader=e,this.setChanged()}getVertexShader(){return this.vertexShader}setVertexShader(e){this.vertexShader=e,this.setChanged()}setChanged(){this.dispatchEvent({type:"change"})}setDepthTexture(e,t=k.BasicDepthPacking){}update(e,t,i){}setSize(e,t){}initialize(e,t,i){}dispose(){for(let e of Object.keys(this)){let t=this[e];(t instanceof k.WebGLRenderTarget||t instanceof k.Material||t instanceof k.Texture||t instanceof G)&&this[e].dispose()}}},eu={VERY_SMALL:0,SMALL:1,MEDIUM:2,LARGE:3,VERY_LARGE:4,HUGE:5},ec=`#ifdef FRAMEBUFFER_PRECISION_HIGH
|
|
uniform mediump sampler2D inputBuffer;
|
|
#else
|
|
uniform lowp sampler2D inputBuffer;
|
|
#endif
|
|
varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec4 sum=texture2D(inputBuffer,vUv0);sum+=texture2D(inputBuffer,vUv1);sum+=texture2D(inputBuffer,vUv2);sum+=texture2D(inputBuffer,vUv3);gl_FragColor=sum*0.25;
|
|
#include <colorspace_fragment>
|
|
}`,eh=[new Float32Array([0,0]),new Float32Array([0,1,1]),new Float32Array([0,1,1,2]),new Float32Array([0,1,2,2,3]),new Float32Array([0,1,2,3,4,4,5]),new Float32Array([0,1,2,3,4,5,7,8,9,10])],ed=class extends k.ShaderMaterial{constructor(e=new k.Vector4){super({name:"KawaseBlurMaterial",uniforms:{inputBuffer:new k.Uniform(null),texelSize:new k.Uniform(new k.Vector4),scale:new k.Uniform(1),kernel:new k.Uniform(0)},blending:k.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:ec,vertexShader:"uniform vec4 texelSize;uniform float kernel;uniform float scale;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vec2 dUv=(texelSize.xy*vec2(kernel)+texelSize.zw)*scale;vUv0=vec2(uv.x-dUv.x,uv.y+dUv.y);vUv1=vec2(uv.x+dUv.x,uv.y+dUv.y);vUv2=vec2(uv.x+dUv.x,uv.y-dUv.y);vUv3=vec2(uv.x-dUv.x,uv.y-dUv.y);gl_Position=vec4(position.xy,1.0,1.0);}"}),this.setTexelSize(e.x,e.y),this.kernelSize=eu.MEDIUM}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.inputBuffer=e}get kernelSequence(){return eh[this.kernelSize]}get scale(){return this.uniforms.scale.value}set scale(e){this.uniforms.scale.value=e}getScale(){return this.uniforms.scale.value}setScale(e){this.uniforms.scale.value=e}getKernel(){return null}get kernel(){return this.uniforms.kernel.value}set kernel(e){this.uniforms.kernel.value=e}setKernel(e){this.kernel=e}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t,.5*e,.5*t)}setSize(e,t){let i=1/e,n=1/t;this.uniforms.texelSize.value.set(i,n,.5*i,.5*n)}},ef=class extends G{constructor({kernelSize:e=eu.MEDIUM,resolutionScale:t=.5,width:i=en.AUTO_SIZE,height:n=en.AUTO_SIZE,resolutionX:r=i,resolutionY:a=n}={}){super("KawaseBlurPass"),this.renderTargetA=new k.WebGLRenderTarget(1,1,{depthBuffer:!1}),this.renderTargetA.texture.name="Blur.Target.A",this.renderTargetB=this.renderTargetA.clone(),this.renderTargetB.texture.name="Blur.Target.B";const s=this.resolution=new en(this,r,a,t);s.addEventListener("change",e=>this.setSize(s.baseWidth,s.baseHeight)),this._blurMaterial=new ed,this._blurMaterial.kernelSize=e,this.copyMaterial=new X}getResolution(){return this.resolution}get blurMaterial(){return this._blurMaterial}set blurMaterial(e){this._blurMaterial=e}get dithering(){return this.copyMaterial.dithering}set dithering(e){this.copyMaterial.dithering=e}get kernelSize(){return this.blurMaterial.kernelSize}set kernelSize(e){this.blurMaterial.kernelSize=e}get width(){return this.resolution.width}set width(e){this.resolution.preferredWidth=e}get height(){return this.resolution.height}set height(e){this.resolution.preferredHeight=e}get scale(){return this.blurMaterial.scale}set scale(e){this.blurMaterial.scale=e}getScale(){return this.blurMaterial.scale}setScale(e){this.blurMaterial.scale=e}getKernelSize(){return this.kernelSize}setKernelSize(e){this.kernelSize=e}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}render(e,t,i,n,r){let a=this.scene,s=this.camera,o=this.renderTargetA,l=this.renderTargetB,u=this.blurMaterial,c=u.kernelSequence,h=t;this.fullscreenMaterial=u;for(let t=0,i=c.length;t<i;++t){let i=(1&t)==0?o:l;u.kernel=c[t],u.inputBuffer=h.texture,e.setRenderTarget(i),e.render(a,s),h=i}this.fullscreenMaterial=this.copyMaterial,this.copyMaterial.inputBuffer=h.texture,e.setRenderTarget(this.renderToScreen?null:i),e.render(a,s)}setSize(e,t){let i=this.resolution;i.setBaseSize(e,t);let n=i.width,r=i.height;this.renderTargetA.setSize(n,r),this.renderTargetB.setSize(n,r),this.blurMaterial.setSize(e,t)}initialize(e,t,i){void 0!==i&&(this.renderTargetA.texture.type=i,this.renderTargetB.texture.type=i,i!==k.UnsignedByteType?(this.blurMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1",this.copyMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1"):null!==e&&e.outputColorSpace===k.SRGBColorSpace&&(this.renderTargetA.texture.colorSpace=k.SRGBColorSpace,this.renderTargetB.texture.colorSpace=k.SRGBColorSpace))}static get AUTO_SIZE(){return en.AUTO_SIZE}},ep=`#include <common>
|
|
#ifdef FRAMEBUFFER_PRECISION_HIGH
|
|
uniform mediump sampler2D inputBuffer;
|
|
#else
|
|
uniform lowp sampler2D inputBuffer;
|
|
#endif
|
|
#ifdef RANGE
|
|
uniform vec2 range;
|
|
#elif defined(THRESHOLD)
|
|
uniform float threshold;uniform float smoothing;
|
|
#endif
|
|
varying vec2 vUv;void main(){vec4 texel=texture2D(inputBuffer,vUv);float l=luminance(texel.rgb);float mask=1.0;
|
|
#ifdef RANGE
|
|
float low=step(range.x,l);float high=step(l,range.y);mask=low*high;
|
|
#elif defined(THRESHOLD)
|
|
mask=smoothstep(threshold,threshold+smoothing,l);
|
|
#endif
|
|
#ifdef COLOR
|
|
gl_FragColor=texel*mask;
|
|
#else
|
|
gl_FragColor=vec4(l*mask);
|
|
#endif
|
|
}`,em=class extends k.ShaderMaterial{constructor(e=!1,t=null){super({name:"LuminanceMaterial",defines:{THREE_REVISION:k.REVISION.replace(/\D+/g,"")},uniforms:{inputBuffer:new k.Uniform(null),threshold:new k.Uniform(0),smoothing:new k.Uniform(1),range:new k.Uniform(null)},blending:k.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:ep,vertexShader:j}),this.colorOutput=e,this.luminanceRange=t}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}get threshold(){return this.uniforms.threshold.value}set threshold(e){this.smoothing>0||e>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.threshold.value=e}getThreshold(){return this.threshold}setThreshold(e){this.threshold=e}get smoothing(){return this.uniforms.smoothing.value}set smoothing(e){this.threshold>0||e>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.smoothing.value=e}getSmoothingFactor(){return this.smoothing}setSmoothingFactor(e){this.smoothing=e}get useThreshold(){return this.threshold>0||this.smoothing>0}set useThreshold(e){}get colorOutput(){return void 0!==this.defines.COLOR}set colorOutput(e){e?this.defines.COLOR="1":delete this.defines.COLOR,this.needsUpdate=!0}isColorOutputEnabled(e){return this.colorOutput}setColorOutputEnabled(e){this.colorOutput=e}get useRange(){return null!==this.luminanceRange}set useRange(e){this.luminanceRange=null}get luminanceRange(){return this.uniforms.range.value}set luminanceRange(e){null!==e?this.defines.RANGE="1":delete this.defines.RANGE,this.uniforms.range.value=e,this.needsUpdate=!0}getLuminanceRange(){return this.luminanceRange}setLuminanceRange(e){this.luminanceRange=e}},eg=class extends G{constructor({renderTarget:e,luminanceRange:t,colorOutput:i,resolutionScale:n=1,width:r=en.AUTO_SIZE,height:a=en.AUTO_SIZE,resolutionX:s=r,resolutionY:o=a}={}){super("LuminancePass"),this.fullscreenMaterial=new em(i,t),this.needsSwap=!1,this.renderTarget=e,void 0===this.renderTarget&&(this.renderTarget=new k.WebGLRenderTarget(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="LuminancePass.Target");const l=this.resolution=new en(this,s,o,n);l.addEventListener("change",e=>this.setSize(l.baseWidth,l.baseHeight))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}render(e,t,i,n,r){this.fullscreenMaterial.inputBuffer=t.texture,e.setRenderTarget(this.renderToScreen?null:this.renderTarget),e.render(this.scene,this.camera)}setSize(e,t){let i=this.resolution;i.setBaseSize(e,t),this.renderTarget.setSize(i.width,i.height)}initialize(e,t,i){void 0!==i&&i!==k.UnsignedByteType&&(this.renderTarget.texture.type=i,this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}},ev=`#ifdef FRAMEBUFFER_PRECISION_HIGH
|
|
uniform mediump sampler2D inputBuffer;
|
|
#else
|
|
uniform lowp sampler2D inputBuffer;
|
|
#endif
|
|
#define WEIGHT_INNER 0.125
|
|
#define WEIGHT_OUTER 0.05556
|
|
varying vec2 vUv;varying vec2 vUv00;varying vec2 vUv01;varying vec2 vUv02;varying vec2 vUv03;varying vec2 vUv04;varying vec2 vUv05;varying vec2 vUv06;varying vec2 vUv07;varying vec2 vUv08;varying vec2 vUv09;varying vec2 vUv10;varying vec2 vUv11;float clampToBorder(const in vec2 uv){return float(uv.s>=0.0&&uv.s<=1.0&&uv.t>=0.0&&uv.t<=1.0);}void main(){vec4 c=vec4(0.0);vec4 w=WEIGHT_INNER*vec4(clampToBorder(vUv00),clampToBorder(vUv01),clampToBorder(vUv02),clampToBorder(vUv03));c+=w.x*texture2D(inputBuffer,vUv00);c+=w.y*texture2D(inputBuffer,vUv01);c+=w.z*texture2D(inputBuffer,vUv02);c+=w.w*texture2D(inputBuffer,vUv03);w=WEIGHT_OUTER*vec4(clampToBorder(vUv04),clampToBorder(vUv05),clampToBorder(vUv06),clampToBorder(vUv07));c+=w.x*texture2D(inputBuffer,vUv04);c+=w.y*texture2D(inputBuffer,vUv05);c+=w.z*texture2D(inputBuffer,vUv06);c+=w.w*texture2D(inputBuffer,vUv07);w=WEIGHT_OUTER*vec4(clampToBorder(vUv08),clampToBorder(vUv09),clampToBorder(vUv10),clampToBorder(vUv11));c+=w.x*texture2D(inputBuffer,vUv08);c+=w.y*texture2D(inputBuffer,vUv09);c+=w.z*texture2D(inputBuffer,vUv10);c+=w.w*texture2D(inputBuffer,vUv11);c+=WEIGHT_OUTER*texture2D(inputBuffer,vUv);gl_FragColor=c;
|
|
#include <colorspace_fragment>
|
|
}`,ex=class extends k.ShaderMaterial{constructor(){super({name:"DownsamplingMaterial",uniforms:{inputBuffer:new k.Uniform(null),texelSize:new k.Uniform(new k.Vector2)},blending:k.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:ev,vertexShader:"uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv00;varying vec2 vUv01;varying vec2 vUv02;varying vec2 vUv03;varying vec2 vUv04;varying vec2 vUv05;varying vec2 vUv06;varying vec2 vUv07;varying vec2 vUv08;varying vec2 vUv09;varying vec2 vUv10;varying vec2 vUv11;void main(){vUv=position.xy*0.5+0.5;vUv00=vUv+texelSize*vec2(-1.0,1.0);vUv01=vUv+texelSize*vec2(1.0,1.0);vUv02=vUv+texelSize*vec2(-1.0,-1.0);vUv03=vUv+texelSize*vec2(1.0,-1.0);vUv04=vUv+texelSize*vec2(-2.0,2.0);vUv05=vUv+texelSize*vec2(0.0,2.0);vUv06=vUv+texelSize*vec2(2.0,2.0);vUv07=vUv+texelSize*vec2(-2.0,0.0);vUv08=vUv+texelSize*vec2(2.0,0.0);vUv09=vUv+texelSize*vec2(-2.0,-2.0);vUv10=vUv+texelSize*vec2(0.0,-2.0);vUv11=vUv+texelSize*vec2(2.0,-2.0);gl_Position=vec4(position.xy,1.0,1.0);}"})}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}},ey=`#ifdef FRAMEBUFFER_PRECISION_HIGH
|
|
uniform mediump sampler2D inputBuffer;uniform mediump sampler2D supportBuffer;
|
|
#else
|
|
uniform lowp sampler2D inputBuffer;uniform lowp sampler2D supportBuffer;
|
|
#endif
|
|
uniform float radius;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;varying vec2 vUv6;varying vec2 vUv7;void main(){vec4 c=vec4(0.0);c+=texture2D(inputBuffer,vUv0)*0.0625;c+=texture2D(inputBuffer,vUv1)*0.125;c+=texture2D(inputBuffer,vUv2)*0.0625;c+=texture2D(inputBuffer,vUv3)*0.125;c+=texture2D(inputBuffer,vUv)*0.25;c+=texture2D(inputBuffer,vUv4)*0.125;c+=texture2D(inputBuffer,vUv5)*0.0625;c+=texture2D(inputBuffer,vUv6)*0.125;c+=texture2D(inputBuffer,vUv7)*0.0625;vec4 baseColor=texture2D(supportBuffer,vUv);gl_FragColor=mix(baseColor,c,radius);
|
|
#include <colorspace_fragment>
|
|
}`,eS=class extends k.ShaderMaterial{constructor(){super({name:"UpsamplingMaterial",uniforms:{inputBuffer:new k.Uniform(null),supportBuffer:new k.Uniform(null),texelSize:new k.Uniform(new k.Vector2),radius:new k.Uniform(.85)},blending:k.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:ey,vertexShader:"uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;varying vec2 vUv6;varying vec2 vUv7;void main(){vUv=position.xy*0.5+0.5;vUv0=vUv+texelSize*vec2(-1.0,1.0);vUv1=vUv+texelSize*vec2(0.0,1.0);vUv2=vUv+texelSize*vec2(1.0,1.0);vUv3=vUv+texelSize*vec2(-1.0,0.0);vUv4=vUv+texelSize*vec2(1.0,0.0);vUv5=vUv+texelSize*vec2(-1.0,-1.0);vUv6=vUv+texelSize*vec2(0.0,-1.0);vUv7=vUv+texelSize*vec2(1.0,-1.0);gl_Position=vec4(position.xy,1.0,1.0);}"})}set inputBuffer(e){this.uniforms.inputBuffer.value=e}set supportBuffer(e){this.uniforms.supportBuffer.value=e}get radius(){return this.uniforms.radius.value}set radius(e){this.uniforms.radius.value=e}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}},eA=class extends G{constructor(){super("MipmapBlurPass"),this.needsSwap=!1,this.renderTarget=new k.WebGLRenderTarget(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="Upsampling.Mipmap0",this.downsamplingMipmaps=[],this.upsamplingMipmaps=[],this.downsamplingMaterial=new ex,this.upsamplingMaterial=new eS,this.resolution=new k.Vector2}get texture(){return this.renderTarget.texture}get levels(){return this.downsamplingMipmaps.length}set levels(e){if(this.levels!==e){let t=this.renderTarget;this.dispose(),this.downsamplingMipmaps=[],this.upsamplingMipmaps=[];for(let i=0;i<e;++i){let e=t.clone();e.texture.name="Downsampling.Mipmap"+i,this.downsamplingMipmaps.push(e)}this.upsamplingMipmaps.push(t);for(let i=1,n=e-1;i<n;++i){let e=t.clone();e.texture.name="Upsampling.Mipmap"+i,this.upsamplingMipmaps.push(e)}this.setSize(this.resolution.x,this.resolution.y)}}get radius(){return this.upsamplingMaterial.radius}set radius(e){this.upsamplingMaterial.radius=e}render(e,t,i,n,r){let{scene:a,camera:s}=this,{downsamplingMaterial:o,upsamplingMaterial:l}=this,{downsamplingMipmaps:u,upsamplingMipmaps:c}=this,h=t;this.fullscreenMaterial=o;for(let t=0,i=u.length;t<i;++t){let i=u[t];o.setSize(h.width,h.height),o.inputBuffer=h.texture,e.setRenderTarget(i),e.render(a,s),h=i}this.fullscreenMaterial=l;for(let t=c.length-1;t>=0;--t){let i=c[t];l.setSize(h.width,h.height),l.inputBuffer=h.texture,l.supportBuffer=u[t].texture,e.setRenderTarget(i),e.render(a,s),h=i}}setSize(e,t){let i=this.resolution;i.set(e,t);let n=i.width,r=i.height;for(let e=0,t=this.downsamplingMipmaps.length;e<t;++e)n=Math.round(.5*n),r=Math.round(.5*r),this.downsamplingMipmaps[e].setSize(n,r),e<this.upsamplingMipmaps.length&&this.upsamplingMipmaps[e].setSize(n,r)}initialize(e,t,i){if(void 0!==i){let t=this.downsamplingMipmaps.concat(this.upsamplingMipmaps);for(let e of t)e.texture.type=i;if(i!==k.UnsignedByteType)this.downsamplingMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1",this.upsamplingMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1";else if(null!==e&&e.outputColorSpace===k.SRGBColorSpace)for(let e of t)e.texture.colorSpace=k.SRGBColorSpace}}dispose(){for(let e of(super.dispose(),this.downsamplingMipmaps.concat(this.upsamplingMipmaps)))e.dispose()}},eM=`#ifdef FRAMEBUFFER_PRECISION_HIGH
|
|
uniform mediump sampler2D map;
|
|
#else
|
|
uniform lowp sampler2D map;
|
|
#endif
|
|
uniform float intensity;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=texture2D(map,uv)*intensity;}`,eb=class extends el{constructor({blendFunction:e=28,luminanceThreshold:t=1,luminanceSmoothing:i=.03,mipmapBlur:n=!0,intensity:r=1,radius:a=.85,levels:s=8,kernelSize:o=eu.LARGE,resolutionScale:l=.5,width:u=en.AUTO_SIZE,height:c=en.AUTO_SIZE,resolutionX:h=u,resolutionY:d=c}={}){super("BloomEffect",eM,{blendFunction:e,uniforms:new Map([["map",new k.Uniform(null)],["intensity",new k.Uniform(r)]])}),this.renderTarget=new k.WebGLRenderTarget(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="Bloom.Target",this.blurPass=new ef({kernelSize:o}),this.luminancePass=new eg({colorOutput:!0}),this.luminanceMaterial.threshold=t,this.luminanceMaterial.smoothing=i,this.mipmapBlurPass=new eA,this.mipmapBlurPass.enabled=n,this.mipmapBlurPass.radius=a,this.mipmapBlurPass.levels=s,this.uniforms.get("map").value=n?this.mipmapBlurPass.texture:this.renderTarget.texture;const f=this.resolution=new en(this,h,d,l);f.addEventListener("change",e=>this.setSize(f.baseWidth,f.baseHeight))}get texture(){return this.mipmapBlurPass.enabled?this.mipmapBlurPass.texture:this.renderTarget.texture}getTexture(){return this.texture}getResolution(){return this.resolution}getBlurPass(){return this.blurPass}getLuminancePass(){return this.luminancePass}get luminanceMaterial(){return this.luminancePass.fullscreenMaterial}getLuminanceMaterial(){return this.luminancePass.fullscreenMaterial}get width(){return this.resolution.width}set width(e){this.resolution.preferredWidth=e}get height(){return this.resolution.height}set height(e){this.resolution.preferredHeight=e}get dithering(){return this.blurPass.dithering}set dithering(e){this.blurPass.dithering=e}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(e){this.blurPass.kernelSize=e}get distinction(){return console.warn(this.name,"distinction was removed"),1}set distinction(e){console.warn(this.name,"distinction was removed")}get intensity(){return this.uniforms.get("intensity").value}set intensity(e){this.uniforms.get("intensity").value=e}getIntensity(){return this.intensity}setIntensity(e){this.intensity=e}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}update(e,t,i){let n=this.renderTarget,r=this.luminancePass;r.enabled?(r.render(e,t),this.mipmapBlurPass.enabled?this.mipmapBlurPass.render(e,r.renderTarget):this.blurPass.render(e,r.renderTarget,n)):this.mipmapBlurPass.enabled?this.mipmapBlurPass.render(e,t):this.blurPass.render(e,t,n)}setSize(e,t){let i=this.resolution;i.setBaseSize(e,t),this.renderTarget.setSize(i.width,i.height),this.blurPass.resolution.copy(i),this.luminancePass.setSize(e,t),this.mipmapBlurPass.setSize(e,t)}initialize(e,t,i){this.blurPass.initialize(e,t,i),this.luminancePass.initialize(e,t,i),this.mipmapBlurPass.initialize(e,t,i),void 0!==i&&(this.renderTarget.texture.type=i,null!==e&&e.outputColorSpace===k.SRGBColorSpace&&(this.renderTarget.texture.colorSpace=k.SRGBColorSpace))}},ew=class extends el{constructor({blendFunction:e=30,brightness:t=0,contrast:i=0}={}){super("BrightnessContrastEffect","uniform float brightness;uniform float contrast;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec3 color=inputColor.rgb+vec3(brightness-0.5);if(contrast>0.0){color/=vec3(1.0-contrast);}else{color*=vec3(1.0+contrast);}outputColor=vec4(color+vec3(0.5),inputColor.a);}",{blendFunction:e,uniforms:new Map([["brightness",new k.Uniform(t)],["contrast",new k.Uniform(i)]])}),this.inputColorSpace=k.SRGBColorSpace}get brightness(){return this.uniforms.get("brightness").value}set brightness(e){this.uniforms.get("brightness").value=e}getBrightness(){return this.brightness}setBrightness(e){this.brightness=e}get contrast(){return this.uniforms.get("contrast").value}set contrast(e){this.uniforms.get("contrast").value=e}getContrast(){return this.contrast}setContrast(e){this.contrast=e}},eT=class extends el{constructor(e){super("ColorAverageEffect","void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=vec4(vec3(average(inputColor.rgb)),inputColor.a);}",{blendFunction:e})}},eE=class extends el{constructor({blendFunction:e,bits:t=16}={}){super("ColorDepthEffect","uniform float factor;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=vec4(floor(inputColor.rgb*factor+0.5)/factor,inputColor.a);}",{blendFunction:e,uniforms:new Map([["factor",new k.Uniform(1)]])}),this.bits=0,this.bitDepth=t}get bitDepth(){return this.bits}set bitDepth(e){this.bits=e,this.uniforms.get("factor").value=Math.pow(2,e/3)}getBitDepth(){return this.bitDepth}setBitDepth(e){this.bitDepth=e}},e_=`#ifdef RADIAL_MODULATION
|
|
uniform float modulationOffset;
|
|
#endif
|
|
varying float vActive;varying vec2 vUvR;varying vec2 vUvB;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec2 ra=inputColor.ra;vec2 ba=inputColor.ba;
|
|
#ifdef RADIAL_MODULATION
|
|
const vec2 center=vec2(0.5);float d=distance(uv,center)*2.0;d=max(d-modulationOffset,0.0);if(vActive>0.0&&d>0.0){ra=texture2D(inputBuffer,mix(uv,vUvR,d)).ra;ba=texture2D(inputBuffer,mix(uv,vUvB,d)).ba;}
|
|
#else
|
|
if(vActive>0.0){ra=texture2D(inputBuffer,vUvR).ra;ba=texture2D(inputBuffer,vUvB).ba;}
|
|
#endif
|
|
outputColor=vec4(ra.x,inputColor.g,ba.x,max(max(ra.y,ba.y),inputColor.a));}`,eC=class extends el{constructor({offset:e=new k.Vector2(.001,5e-4),radialModulation:t=!1,modulationOffset:i=.15}={}){super("ChromaticAberrationEffect",e_,{vertexShader:"uniform vec2 offset;varying float vActive;varying vec2 vUvR;varying vec2 vUvB;void mainSupport(const in vec2 uv){vec2 shift=offset*vec2(1.0,aspect);vActive=(shift.x!=0.0||shift.y!=0.0)?1.0:0.0;vUvR=uv+shift;vUvB=uv-shift;}",attributes:2,uniforms:new Map([["offset",new k.Uniform(e)],["modulationOffset",new k.Uniform(i)]])}),this.radialModulation=t}get offset(){return this.uniforms.get("offset").value}set offset(e){this.uniforms.get("offset").value=e}get radialModulation(){return this.defines.has("RADIAL_MODULATION")}set radialModulation(e){e?this.defines.set("RADIAL_MODULATION","1"):this.defines.delete("RADIAL_MODULATION"),this.setChanged()}get modulationOffset(){return this.uniforms.get("modulationOffset").value}set modulationOffset(e){this.uniforms.get("modulationOffset").value=e}getOffset(){return this.offset}setOffset(e){this.offset=e}},eR=`void mainImage(const in vec4 inputColor,const in vec2 uv,const in float depth,out vec4 outputColor){
|
|
#ifdef INVERTED
|
|
vec3 color=vec3(1.0-depth);
|
|
#else
|
|
vec3 color=vec3(depth);
|
|
#endif
|
|
outputColor=vec4(color,inputColor.a);}`,eP=class extends el{constructor({blendFunction:e=30,inverted:t=!1}={}){super("DepthEffect",eR,{blendFunction:e,attributes:1}),this.inverted=t}get inverted(){return this.defines.has("INVERTED")}set inverted(e){this.inverted!==e&&(e?this.defines.set("INVERTED","1"):this.defines.delete("INVERTED"),this.setChanged())}isInverted(){return this.inverted}setInverted(e){this.inverted=e}},eD={DISCARD:0,MULTIPLY:1,MULTIPLY_RGB_SET_ALPHA:2,MULTIPLY_RGB:3},eI=`#ifdef FRAMEBUFFER_PRECISION_HIGH
|
|
uniform mediump sampler2D inputBuffer;
|
|
#else
|
|
uniform lowp sampler2D inputBuffer;
|
|
#endif
|
|
#if PASS == 1
|
|
uniform vec4 kernel64[32];
|
|
#else
|
|
uniform vec4 kernel16[8];
|
|
#endif
|
|
uniform lowp sampler2D cocBuffer;uniform vec2 texelSize;uniform float scale;varying vec2 vUv;void main(){
|
|
#ifdef FOREGROUND
|
|
vec2 cocNearFar=texture2D(cocBuffer,vUv).rg*scale;float coc=cocNearFar.x;
|
|
#else
|
|
float coc=texture2D(cocBuffer,vUv).g*scale;
|
|
#endif
|
|
if(coc==0.0){gl_FragColor=texture2D(inputBuffer,vUv);}else{
|
|
#ifdef FOREGROUND
|
|
vec2 step=texelSize*max(cocNearFar.x,cocNearFar.y);
|
|
#else
|
|
vec2 step=texelSize*coc;
|
|
#endif
|
|
#if PASS == 1
|
|
vec4 acc=vec4(0.0);for(int i=0;i<32;++i){vec4 kernel=kernel64[i];vec2 uv=step*kernel.xy+vUv;acc+=texture2D(inputBuffer,uv);uv=step*kernel.zw+vUv;acc+=texture2D(inputBuffer,uv);}gl_FragColor=acc/64.0;
|
|
#else
|
|
vec4 maxValue=texture2D(inputBuffer,vUv);for(int i=0;i<8;++i){vec4 kernel=kernel16[i];vec2 uv=step*kernel.xy+vUv;maxValue=max(texture2D(inputBuffer,uv),maxValue);uv=step*kernel.zw+vUv;maxValue=max(texture2D(inputBuffer,uv),maxValue);}gl_FragColor=maxValue;
|
|
#endif
|
|
}}`,eL=class extends k.ShaderMaterial{constructor(e=!1,t=!1){super({name:"BokehMaterial",defines:{PASS:e?"2":"1"},uniforms:{inputBuffer:new k.Uniform(null),cocBuffer:new k.Uniform(null),texelSize:new k.Uniform(new k.Vector2),kernel64:new k.Uniform(null),kernel16:new k.Uniform(null),scale:new k.Uniform(1)},blending:k.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:eI,vertexShader:j}),t&&(this.defines.FOREGROUND="1"),this.generateKernel()}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}set cocBuffer(e){this.uniforms.cocBuffer.value=e}setCoCBuffer(e){this.uniforms.cocBuffer.value=e}get scale(){return this.uniforms.scale.value}set scale(e){this.uniforms.scale.value=e}getScale(e){return this.scale}setScale(e){this.scale=e}generateKernel(){let e=new Float64Array(128),t=new Float64Array(32),i=0,n=0;for(let r=0,a=Math.sqrt(80);r<80;++r){let s=2.39996323*r,o=Math.sqrt(r)/a,l=o*Math.cos(s),u=o*Math.sin(s);r%5==0?(t[n++]=l,t[n++]=u):(e[i++]=l,e[i++]=u)}this.uniforms.kernel64.value=e,this.uniforms.kernel16.value=t}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t)}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}},eB=`#include <common>
|
|
#include <packing>
|
|
#ifdef GL_FRAGMENT_PRECISION_HIGH
|
|
uniform highp sampler2D depthBuffer;
|
|
#else
|
|
uniform mediump sampler2D depthBuffer;
|
|
#endif
|
|
uniform mat4 projectionMatrix;uniform mat4 projectionMatrixInverse;uniform float cameraNear;uniform float cameraFar;uniform float focusDistance;uniform float focusRange;varying vec2 vUv;float readDepth(const in vec2 uv){
|
|
#if DEPTH_PACKING == 3201
|
|
float depth=unpackRGBAToDepth(texture2D(depthBuffer,uv));
|
|
#else
|
|
float depth=texture2D(depthBuffer,uv).r;
|
|
#endif
|
|
#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH)
|
|
float d=pow(2.0,depth*log2(cameraFar+1.0))-1.0;float a=cameraFar/(cameraFar-cameraNear);float b=cameraFar*cameraNear/(cameraNear-cameraFar);depth=a+b/d;
|
|
#elif defined(USE_REVERSED_DEPTH_BUFFER)
|
|
depth=1.0-depth;
|
|
#endif
|
|
return depth;}
|
|
#ifdef PERSPECTIVE_CAMERA
|
|
#define getViewZ(depth) perspectiveDepthToViewZ(depth, cameraNear, cameraFar)
|
|
#else
|
|
#define getViewZ(depth) orthographicDepthToViewZ(depth, cameraNear, cameraFar)
|
|
#endif
|
|
vec3 getViewPosition(const in vec2 screenPosition,const in float depth,const in float viewZ){vec4 clipPosition=vec4(vec3(screenPosition,depth)*2.0-1.0,1.0);float clipW=projectionMatrix[2][3]*viewZ+projectionMatrix[3][3];clipPosition*=clipW;return(projectionMatrixInverse*clipPosition).xyz;}vec3 getViewPosition(const in vec2 screenPosition,const in float depth){return getViewPosition(screenPosition,depth,getViewZ(depth));}
|
|
#define getDistance(viewPosition) length(viewPosition)
|
|
void main(){float depth=readDepth(vUv);vec3 viewPosition=getViewPosition(vUv,depth);float distance=getDistance(viewPosition);float signedDistance=distance-focusDistance;float magnitude=smoothstep(0.0,focusRange,abs(signedDistance));gl_FragColor.rg=magnitude*vec2(step(signedDistance,0.0),step(0.0,signedDistance));}`,eU=class extends k.ShaderMaterial{constructor(e=null){super({name:"CircleOfConfusionMaterial",defines:{DEPTH_PACKING:"0"},uniforms:{depthBuffer:new k.Uniform(null),projectionMatrix:new k.Uniform(null),projectionMatrixInverse:new k.Uniform(null),cameraNear:new k.Uniform(.3),cameraFar:new k.Uniform(1e3),focusDistance:new k.Uniform(0),focusRange:new k.Uniform(0)},blending:k.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:eB,vertexShader:j}),this.uniforms.focalLength=this.uniforms.focusRange,null!==e&&this.copyCameraSettings(e)}set depthBuffer(e){this.uniforms.depthBuffer.value=e}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e,t=k.BasicDepthPacking){this.depthBuffer=e,this.depthPacking=t}get focusDistance(){return this.uniforms.focusDistance.value}set focusDistance(e){this.uniforms.focusDistance.value=e}get worldFocusDistance(){return this.focusDistance}set worldFocusDistance(e){this.focusDistance=e}getFocusDistance(e){this.uniforms.focusDistance.value=e}setFocusDistance(e){this.uniforms.focusDistance.value=e}get focalLength(){return this.focusRange}set focalLength(e){this.focusRange=e}get focusRange(){return this.uniforms.focusRange.value}set focusRange(e){this.uniforms.focusRange.value=e}get worldFocusRange(){return this.focusRange}set worldFocusRange(e){this.focusRange=e}getFocalLength(e){return this.focusRange}setFocalLength(e){this.focusRange=e}adoptCameraSettings(e){this.copyCameraSettings(e)}copyCameraSettings(e){this.uniforms.projectionMatrix.value=e.projectionMatrix,this.uniforms.projectionMatrixInverse.value=e.projectionMatrixInverse,this.uniforms.cameraNear.value=e.near,this.uniforms.cameraFar.value=e.far;let t=void 0!==this.defines.PERSPECTIVE_CAMERA;e instanceof k.PerspectiveCamera?t||(this.defines.PERSPECTIVE_CAMERA=!0,this.needsUpdate=!0):t&&(delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}},eN=`#ifdef FRAMEBUFFER_PRECISION_HIGH
|
|
uniform mediump sampler2D inputBuffer;
|
|
#else
|
|
uniform lowp sampler2D inputBuffer;
|
|
#endif
|
|
#ifdef MASK_PRECISION_HIGH
|
|
uniform mediump sampler2D maskTexture;
|
|
#else
|
|
uniform lowp sampler2D maskTexture;
|
|
#endif
|
|
#if MASK_FUNCTION != 0
|
|
uniform float strength;
|
|
#endif
|
|
varying vec2 vUv;void main(){
|
|
#if COLOR_CHANNEL == 0
|
|
float mask=texture2D(maskTexture,vUv).r;
|
|
#elif COLOR_CHANNEL == 1
|
|
float mask=texture2D(maskTexture,vUv).g;
|
|
#elif COLOR_CHANNEL == 2
|
|
float mask=texture2D(maskTexture,vUv).b;
|
|
#else
|
|
float mask=texture2D(maskTexture,vUv).a;
|
|
#endif
|
|
#if MASK_FUNCTION == 0
|
|
#ifdef INVERTED
|
|
mask=(mask>0.0)?0.0:1.0;
|
|
#else
|
|
mask=(mask>0.0)?1.0:0.0;
|
|
#endif
|
|
#else
|
|
mask=clamp(mask*strength,0.0,1.0);
|
|
#ifdef INVERTED
|
|
mask=1.0-mask;
|
|
#endif
|
|
#endif
|
|
#if MASK_FUNCTION == 3
|
|
vec4 texel=texture2D(inputBuffer,vUv);gl_FragColor=vec4(mask*texel.rgb,texel.a);
|
|
#elif MASK_FUNCTION == 2
|
|
gl_FragColor=vec4(mask*texture2D(inputBuffer,vUv).rgb,mask);
|
|
#else
|
|
gl_FragColor=mask*texture2D(inputBuffer,vUv);
|
|
#endif
|
|
}`,eF=class extends k.ShaderMaterial{constructor(e=null){super({name:"MaskMaterial",uniforms:{maskTexture:new k.Uniform(e),inputBuffer:new k.Uniform(null),strength:new k.Uniform(1)},blending:k.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:eN,vertexShader:j}),this.colorChannel=0,this.maskFunction=eD.DISCARD}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}set maskTexture(e){this.uniforms.maskTexture.value=e,delete this.defines.MASK_PRECISION_HIGH,e.type!==k.UnsignedByteType&&(this.defines.MASK_PRECISION_HIGH="1"),this.needsUpdate=!0}setMaskTexture(e){this.maskTexture=e}set colorChannel(e){this.defines.COLOR_CHANNEL=e.toFixed(0),this.needsUpdate=!0}setColorChannel(e){this.colorChannel=e}set maskFunction(e){this.defines.MASK_FUNCTION=e.toFixed(0),this.needsUpdate=!0}setMaskFunction(e){this.maskFunction=e}get inverted(){return void 0!==this.defines.INVERTED}set inverted(e){this.inverted&&!e?delete this.defines.INVERTED:e&&(this.defines.INVERTED="1"),this.needsUpdate=!0}isInverted(){return this.inverted}setInverted(e){this.inverted=e}get strength(){return this.uniforms.strength.value}set strength(e){this.uniforms.strength.value=e}getStrength(){return this.strength}setStrength(e){this.strength=e}},eO=class extends G{constructor(e,t="inputBuffer"){super("ShaderPass"),this.fullscreenMaterial=e,this.input=t}setInput(e){this.input=e}render(e,t,i,n,r){let a=this.fullscreenMaterial.uniforms;null!==t&&void 0!==a&&void 0!==a[this.input]&&(a[this.input].value=t.texture),e.setRenderTarget(this.renderToScreen?null:i),e.render(this.scene,this.camera)}initialize(e,t,i){void 0!==i&&i!==k.UnsignedByteType&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}},ez=`#ifdef FRAMEBUFFER_PRECISION_HIGH
|
|
uniform mediump sampler2D nearColorBuffer;uniform mediump sampler2D farColorBuffer;
|
|
#else
|
|
uniform lowp sampler2D nearColorBuffer;uniform lowp sampler2D farColorBuffer;
|
|
#endif
|
|
#if MASK_FUNCTION != 1 && MASK_FUNCTION != 2
|
|
uniform lowp sampler2D farCoCBuffer;
|
|
#endif
|
|
uniform lowp sampler2D nearCoCBuffer;uniform float scale;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec4 colorNear=texture2D(nearColorBuffer,uv);vec4 colorFar=texture2D(farColorBuffer,uv);
|
|
#if MASK_FUNCTION == 1 || MASK_FUNCTION == 2
|
|
vec2 cocNearFar=vec2(texture2D(nearCoCBuffer,uv).r,colorFar.a);cocNearFar.x=min(cocNearFar.x*scale,1.0);
|
|
#else
|
|
vec2 cocNearFar=vec2(texture2D(nearCoCBuffer,uv).r,texture2D(farCoCBuffer,uv).g);cocNearFar=min(cocNearFar*scale,1.0);colorFar.a*=cocNearFar.y;
|
|
#endif
|
|
vec4 result=inputColor*(1.0-cocNearFar.y)+colorFar;result=mix(result,colorNear,cocNearFar.x);outputColor=result;}`,ek=new k.Vector3,eH=class extends el{constructor(e,{blendFunction:t,worldFocusDistance:i,worldFocusRange:n,focalLength:r,focusDistance:a=i||3,focusRange:s=n||r||2,bokehScale:o=1,resolutionScale:l=.5,width:u,height:c,resolutionX:h=u||en.AUTO_SIZE,resolutionY:d=c||en.AUTO_SIZE}={}){super("DepthOfFieldEffect",ez,{blendFunction:t,attributes:1,uniforms:new Map([["nearColorBuffer",new k.Uniform(null)],["farColorBuffer",new k.Uniform(null)],["nearCoCBuffer",new k.Uniform(null)],["farCoCBuffer",new k.Uniform(null)],["scale",new k.Uniform(1)]])}),this.camera=e,this.renderTarget=new k.WebGLRenderTarget(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="DoF.Intermediate",this.renderTargetMasked=this.renderTarget.clone(),this.renderTargetMasked.texture.name="DoF.Masked.Far",this.renderTargetNear=this.renderTarget.clone(),this.renderTargetNear.texture.name="DoF.Bokeh.Near",this.uniforms.get("nearColorBuffer").value=this.renderTargetNear.texture,this.renderTargetFar=this.renderTarget.clone(),this.renderTargetFar.texture.name="DoF.Bokeh.Far",this.uniforms.get("farColorBuffer").value=this.renderTargetFar.texture,this.renderTargetCoC=this.renderTarget.clone(),this.renderTargetCoC.texture.name="DoF.CoC",this.uniforms.get("farCoCBuffer").value=this.renderTargetCoC.texture,this.renderTargetCoCBlurred=this.renderTargetCoC.clone(),this.renderTargetCoCBlurred.texture.name="DoF.CoC.Blurred",this.uniforms.get("nearCoCBuffer").value=this.renderTargetCoCBlurred.texture,this.cocPass=new eO(new eU(e));const f=this.cocMaterial;f.focusDistance=a,f.focusRange=s,this.blurPass=new ef({resolutionScale:l,resolutionX:h,resolutionY:d,kernelSize:eu.MEDIUM}),this.maskPass=new eO(new eF(this.renderTargetCoC.texture)),this.maskPass.fullscreenMaterial.colorChannel=1,this.maskFunction=eD.MULTIPLY_RGB,this.bokehNearBasePass=new eO(new eL(!1,!0)),this.bokehNearBasePass.fullscreenMaterial.cocBuffer=this.renderTargetCoCBlurred.texture,this.bokehNearFillPass=new eO(new eL(!0,!0)),this.bokehNearFillPass.fullscreenMaterial.cocBuffer=this.renderTargetCoCBlurred.texture,this.bokehFarBasePass=new eO(new eL(!1,!1)),this.bokehFarBasePass.fullscreenMaterial.cocBuffer=this.renderTargetCoC.texture,this.bokehFarFillPass=new eO(new eL(!0,!1)),this.bokehFarFillPass.fullscreenMaterial.cocBuffer=this.renderTargetCoC.texture,this.target=null;const p=this.resolution=new en(this,h,d,l);p.addEventListener("change",e=>this.setSize(p.baseWidth,p.baseHeight)),this.bokehScale=o}set mainCamera(e){this.camera=e,this.cocMaterial.copyCameraSettings(e)}get cocTexture(){return this.renderTargetCoC.texture}get maskFunction(){return this.maskPass.fullscreenMaterial.maskFunction}set maskFunction(e){this.maskFunction!==e&&(this.defines.set("MASK_FUNCTION",e.toFixed(0)),this.maskPass.fullscreenMaterial.maskFunction=e,this.setChanged())}get cocMaterial(){return this.cocPass.fullscreenMaterial}get circleOfConfusionMaterial(){return this.cocMaterial}getCircleOfConfusionMaterial(){return this.cocMaterial}getBlurPass(){return this.blurPass}getResolution(){return this.resolution}get bokehScale(){return this.uniforms.get("scale").value}set bokehScale(e){this.bokehNearBasePass.fullscreenMaterial.scale=e,this.bokehNearFillPass.fullscreenMaterial.scale=e,this.bokehFarBasePass.fullscreenMaterial.scale=e,this.bokehFarFillPass.fullscreenMaterial.scale=e,this.maskPass.fullscreenMaterial.strength=e,this.uniforms.get("scale").value=e}getBokehScale(){return this.bokehScale}setBokehScale(e){this.bokehScale=e}getTarget(){return this.target}setTarget(e){this.target=e}calculateFocusDistance(e){return this.camera.getWorldPosition(ek).distanceTo(e)}setDepthTexture(e,t=k.BasicDepthPacking){this.cocMaterial.depthBuffer=e,this.cocMaterial.depthPacking=t}update(e,t,i){let n=this.renderTarget,r=this.renderTargetCoC,a=this.renderTargetCoCBlurred,s=this.renderTargetMasked;if(null!==this.target){let e=this.calculateFocusDistance(this.target);this.cocMaterial.focusDistance=e}this.cocPass.render(e,null,r),this.blurPass.render(e,r,a),this.maskPass.render(e,t,s),this.bokehFarBasePass.render(e,s,n),this.bokehFarFillPass.render(e,n,this.renderTargetFar),this.bokehNearBasePass.render(e,t,n),this.bokehNearFillPass.render(e,n,this.renderTargetNear)}setSize(e,t){let i=this.resolution;i.setBaseSize(e,t);let n=i.width,r=i.height;this.cocPass.setSize(e,t),this.blurPass.setSize(e,t),this.maskPass.setSize(e,t),this.renderTargetFar.setSize(e,t),this.renderTargetCoC.setSize(e,t),this.renderTargetMasked.setSize(e,t),this.renderTarget.setSize(n,r),this.renderTargetNear.setSize(n,r),this.renderTargetCoCBlurred.setSize(n,r),this.bokehNearBasePass.fullscreenMaterial.setSize(e,t),this.bokehNearFillPass.fullscreenMaterial.setSize(e,t),this.bokehFarBasePass.fullscreenMaterial.setSize(e,t),this.bokehFarFillPass.fullscreenMaterial.setSize(e,t)}initialize(e,t,i){this.cocPass.initialize(e,t,i),this.maskPass.initialize(e,t,i),this.bokehNearBasePass.initialize(e,t,i),this.bokehNearFillPass.initialize(e,t,i),this.bokehFarBasePass.initialize(e,t,i),this.bokehFarFillPass.initialize(e,t,i),this.blurPass.initialize(e,t,k.UnsignedByteType),e.capabilities.logarithmicDepthBuffer&&(this.cocPass.fullscreenMaterial.defines.LOG_DEPTH="1"),void 0!==i&&(this.renderTarget.texture.type=i,this.renderTargetNear.texture.type=i,this.renderTargetFar.texture.type=i,this.renderTargetMasked.texture.type=i,null!==e&&e.outputColorSpace===k.SRGBColorSpace&&(this.renderTarget.texture.colorSpace=k.SRGBColorSpace,this.renderTargetNear.texture.colorSpace=k.SRGBColorSpace,this.renderTargetFar.texture.colorSpace=k.SRGBColorSpace,this.renderTargetMasked.texture.colorSpace=k.SRGBColorSpace))}},eG=class extends el{constructor({blendFunction:e,angle:t=.5*Math.PI,scale:i=1}={}){super("DotScreenEffect","uniform vec2 angle;uniform float scale;float pattern(const in vec2 uv){vec2 point=scale*vec2(dot(angle.yx,vec2(uv.x,-uv.y)),dot(angle,uv));return(sin(point.x)*sin(point.y))*4.0;}void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec3 color=vec3(inputColor.rgb*10.0-5.0+pattern(uv*resolution));outputColor=vec4(color,inputColor.a);}",{blendFunction:e,uniforms:new Map([["angle",new k.Uniform(new k.Vector2)],["scale",new k.Uniform(i)]])}),this.angle=t}get angle(){return Math.acos(this.uniforms.get("angle").value.y)}set angle(e){this.uniforms.get("angle").value.set(Math.sin(e),Math.cos(e))}getAngle(){return this.angle}setAngle(e){this.angle=e}get scale(){return this.uniforms.get("scale").value}set scale(e){this.uniforms.get("scale").value=e}},eV=`#define QUALITY(q) ((q) < 5 ? 1.0 : ((q) > 5 ? ((q) < 10 ? 2.0 : ((q) < 11 ? 4.0 : 8.0)) : 1.5))
|
|
#define ONE_OVER_TWELVE 0.08333333333333333
|
|
varying vec2 vUvDown;varying vec2 vUvUp;varying vec2 vUvLeft;varying vec2 vUvRight;varying vec2 vUvDownLeft;varying vec2 vUvUpRight;varying vec2 vUvUpLeft;varying vec2 vUvDownRight;vec4 fxaa(const in vec4 inputColor,const in vec2 uv){float lumaCenter=luminance(inputColor.rgb);float lumaDown=luminance(texture2D(inputBuffer,vUvDown).rgb);float lumaUp=luminance(texture2D(inputBuffer,vUvUp).rgb);float lumaLeft=luminance(texture2D(inputBuffer,vUvLeft).rgb);float lumaRight=luminance(texture2D(inputBuffer,vUvRight).rgb);float lumaMin=min(lumaCenter,min(min(lumaDown,lumaUp),min(lumaLeft,lumaRight)));float lumaMax=max(lumaCenter,max(max(lumaDown,lumaUp),max(lumaLeft,lumaRight)));float lumaRange=lumaMax-lumaMin;if(lumaRange<max(EDGE_THRESHOLD_MIN,lumaMax*EDGE_THRESHOLD_MAX)){return inputColor;}float lumaDownLeft=luminance(texture2D(inputBuffer,vUvDownLeft).rgb);float lumaUpRight=luminance(texture2D(inputBuffer,vUvUpRight).rgb);float lumaUpLeft=luminance(texture2D(inputBuffer,vUvUpLeft).rgb);float lumaDownRight=luminance(texture2D(inputBuffer,vUvDownRight).rgb);float lumaDownUp=lumaDown+lumaUp;float lumaLeftRight=lumaLeft+lumaRight;float lumaLeftCorners=lumaDownLeft+lumaUpLeft;float lumaDownCorners=lumaDownLeft+lumaDownRight;float lumaRightCorners=lumaDownRight+lumaUpRight;float lumaUpCorners=lumaUpRight+lumaUpLeft;float edgeHorizontal=(abs(-2.0*lumaLeft+lumaLeftCorners)+abs(-2.0*lumaCenter+lumaDownUp)*2.0+abs(-2.0*lumaRight+lumaRightCorners));float edgeVertical=(abs(-2.0*lumaUp+lumaUpCorners)+abs(-2.0*lumaCenter+lumaLeftRight)*2.0+abs(-2.0*lumaDown+lumaDownCorners));bool isHorizontal=(edgeHorizontal>=edgeVertical);float stepLength=isHorizontal?texelSize.y:texelSize.x;float luma1=isHorizontal?lumaDown:lumaLeft;float luma2=isHorizontal?lumaUp:lumaRight;float gradient1=abs(luma1-lumaCenter);float gradient2=abs(luma2-lumaCenter);bool is1Steepest=gradient1>=gradient2;float gradientScaled=0.25*max(gradient1,gradient2);float lumaLocalAverage=0.0;if(is1Steepest){stepLength=-stepLength;lumaLocalAverage=0.5*(luma1+lumaCenter);}else{lumaLocalAverage=0.5*(luma2+lumaCenter);}vec2 currentUv=uv;if(isHorizontal){currentUv.y+=stepLength*0.5;}else{currentUv.x+=stepLength*0.5;}vec2 offset=isHorizontal?vec2(texelSize.x,0.0):vec2(0.0,texelSize.y);vec2 uv1=currentUv-offset*QUALITY(0);vec2 uv2=currentUv+offset*QUALITY(0);float lumaEnd1=luminance(texture2D(inputBuffer,uv1).rgb);float lumaEnd2=luminance(texture2D(inputBuffer,uv2).rgb);lumaEnd1-=lumaLocalAverage;lumaEnd2-=lumaLocalAverage;bool reached1=abs(lumaEnd1)>=gradientScaled;bool reached2=abs(lumaEnd2)>=gradientScaled;bool reachedBoth=reached1&&reached2;if(!reached1){uv1-=offset*QUALITY(1);}if(!reached2){uv2+=offset*QUALITY(1);}if(!reachedBoth){for(int i=2;i<SAMPLES;++i){if(!reached1){lumaEnd1=luminance(texture2D(inputBuffer,uv1).rgb);lumaEnd1=lumaEnd1-lumaLocalAverage;}if(!reached2){lumaEnd2=luminance(texture2D(inputBuffer,uv2).rgb);lumaEnd2=lumaEnd2-lumaLocalAverage;}reached1=abs(lumaEnd1)>=gradientScaled;reached2=abs(lumaEnd2)>=gradientScaled;reachedBoth=reached1&&reached2;if(!reached1){uv1-=offset*QUALITY(i);}if(!reached2){uv2+=offset*QUALITY(i);}if(reachedBoth){break;}}}float distance1=isHorizontal?(uv.x-uv1.x):(uv.y-uv1.y);float distance2=isHorizontal?(uv2.x-uv.x):(uv2.y-uv.y);bool isDirection1=distance1<distance2;float distanceFinal=min(distance1,distance2);float edgeThickness=(distance1+distance2);bool isLumaCenterSmaller=lumaCenter<lumaLocalAverage;bool correctVariation1=(lumaEnd1<0.0)!=isLumaCenterSmaller;bool correctVariation2=(lumaEnd2<0.0)!=isLumaCenterSmaller;bool correctVariation=isDirection1?correctVariation1:correctVariation2;float pixelOffset=-distanceFinal/edgeThickness+0.5;float finalOffset=correctVariation?pixelOffset:0.0;float lumaAverage=ONE_OVER_TWELVE*(2.0*(lumaDownUp+lumaLeftRight)+lumaLeftCorners+lumaRightCorners);float subPixelOffset1=clamp(abs(lumaAverage-lumaCenter)/lumaRange,0.0,1.0);float subPixelOffset2=(-2.0*subPixelOffset1+3.0)*subPixelOffset1*subPixelOffset1;float subPixelOffsetFinal=subPixelOffset2*subPixelOffset2*SUBPIXEL_QUALITY;finalOffset=max(finalOffset,subPixelOffsetFinal);vec2 finalUv=uv;if(isHorizontal){finalUv.y+=finalOffset*stepLength;}else{finalUv.x+=finalOffset*stepLength;}return texture2D(inputBuffer,finalUv);}void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=fxaa(inputColor,uv);}`,eW=class extends el{constructor({blendFunction:e=30}={}){super("FXAAEffect",eV,{vertexShader:"varying vec2 vUvDown;varying vec2 vUvUp;varying vec2 vUvLeft;varying vec2 vUvRight;varying vec2 vUvDownLeft;varying vec2 vUvUpRight;varying vec2 vUvUpLeft;varying vec2 vUvDownRight;void mainSupport(const in vec2 uv){vUvDown=uv+vec2(0.0,-1.0)*texelSize;vUvUp=uv+vec2(0.0,1.0)*texelSize;vUvRight=uv+vec2(1.0,0.0)*texelSize;vUvLeft=uv+vec2(-1.0,0.0)*texelSize;vUvDownLeft=uv+vec2(-1.0,-1.0)*texelSize;vUvUpRight=uv+vec2(1.0,1.0)*texelSize;vUvUpLeft=uv+vec2(-1.0,1.0)*texelSize;vUvDownRight=uv+vec2(1.0,-1.0)*texelSize;}",blendFunction:e,defines:new Map([["EDGE_THRESHOLD_MIN","0.0312"],["EDGE_THRESHOLD_MAX","0.125"],["SUBPIXEL_QUALITY","0.75"],["SAMPLES","12"]])})}get minEdgeThreshold(){return Number(this.defines.get("EDGE_THRESHOLD_MIN"))}set minEdgeThreshold(e){this.defines.set("EDGE_THRESHOLD_MIN",e.toFixed(12)),this.setChanged()}get maxEdgeThreshold(){return Number(this.defines.get("EDGE_THRESHOLD_MAX"))}set maxEdgeThreshold(e){this.defines.set("EDGE_THRESHOLD_MAX",e.toFixed(12)),this.setChanged()}get subpixelQuality(){return Number(this.defines.get("SUBPIXEL_QUALITY"))}set subpixelQuality(e){this.defines.set("SUBPIXEL_QUALITY",e.toFixed(12)),this.setChanged()}get samples(){return Number(this.defines.get("SAMPLES"))}set samples(e){this.defines.set("SAMPLES",e.toFixed(0)),this.setChanged()}},ej={DISABLED:0,SPORADIC:1,CONSTANT_MILD:2,CONSTANT_WILD:3},eX=class extends k.DataTexture{constructor(e,t,i=k.RedFormat,n=k.UnsignedByteType){super(function(e,t,i){let n,r=new Map([[k.RedFormat,1],[k.RGFormat,2],[k.RGBAFormat,4]]);if(r.has(t)||console.error("Invalid noise texture format"),i===k.UnsignedByteType){n=new Uint8Array(e*r.get(t));for(let e=0,t=n.length;e<t;++e)n[e]=255*Math.random()+.5}else{n=new Float32Array(e*r.get(t));for(let e=0,t=n.length;e<t;++e)n[e]=Math.random()}return n}(e*t,i,n),e,t,i,n),this.needsUpdate=!0}},eY="Glitch.Generated";function eQ(e,t){return e+Math.random()*(t-e)}var eq=class extends el{constructor({chromaticAberrationOffset:e=null,delay:t=new k.Vector2(1.5,3.5),duration:i=new k.Vector2(.6,1),strength:n=new k.Vector2(.3,1),columns:r=.05,ratio:a=.85,perturbationMap:s=null,dtSize:o=64}={}){if(super("GlitchEffect","uniform lowp sampler2D perturbationMap;uniform bool active;uniform float columns;uniform float random;uniform vec2 seeds;uniform vec2 distortion;void mainUv(inout vec2 uv){if(active){if(uv.y<distortion.x+columns&&uv.y>distortion.x-columns*random){float sx=clamp(ceil(seeds.x),0.0,1.0);uv.y=sx*(1.0-(uv.y+distortion.y))+(1.0-sx)*distortion.y;}if(uv.x<distortion.y+columns&&uv.x>distortion.y-columns*random){float sy=clamp(ceil(seeds.y),0.0,1.0);uv.x=sy*distortion.x+(1.0-sy)*(1.0-(uv.x+distortion.x));}vec2 normal=texture2D(perturbationMap,uv*random*random).rg;uv+=normal*seeds*(random*0.2);}}",{uniforms:new Map([["perturbationMap",new k.Uniform(null)],["columns",new k.Uniform(r)],["active",new k.Uniform(!1)],["random",new k.Uniform(1)],["seeds",new k.Uniform(new k.Vector2)],["distortion",new k.Uniform(new k.Vector2)]])}),null===s){const e=new eX(o,o,k.RGBAFormat);e.name=eY,this.perturbationMap=e}else this.perturbationMap=s;this.time=0,this.distortion=this.uniforms.get("distortion").value,this.delay=t,this.duration=i,this.breakPoint=new k.Vector2(eQ(this.delay.x,this.delay.y),eQ(this.duration.x,this.duration.y)),this.strength=n,this.mode=ej.SPORADIC,this.ratio=a,this.chromaticAberrationOffset=e}get seeds(){return this.uniforms.get("seeds").value}get active(){return this.uniforms.get("active").value}isActive(){return this.active}get minDelay(){return this.delay.x}set minDelay(e){this.delay.x=e}getMinDelay(){return this.delay.x}setMinDelay(e){this.delay.x=e}get maxDelay(){return this.delay.y}set maxDelay(e){this.delay.y=e}getMaxDelay(){return this.delay.y}setMaxDelay(e){this.delay.y=e}get minDuration(){return this.duration.x}set minDuration(e){this.duration.x=e}getMinDuration(){return this.duration.x}setMinDuration(e){this.duration.x=e}get maxDuration(){return this.duration.y}set maxDuration(e){this.duration.y=e}getMaxDuration(){return this.duration.y}setMaxDuration(e){this.duration.y=e}get minStrength(){return this.strength.x}set minStrength(e){this.strength.x=e}getMinStrength(){return this.strength.x}setMinStrength(e){this.strength.x=e}get maxStrength(){return this.strength.y}set maxStrength(e){this.strength.y=e}getMaxStrength(){return this.strength.y}setMaxStrength(e){this.strength.y=e}getMode(){return this.mode}setMode(e){this.mode=e}getGlitchRatio(){return 1-this.ratio}setGlitchRatio(e){this.ratio=Math.min(Math.max(1-e,0),1)}get columns(){return this.uniforms.get("columns").value}set columns(e){this.uniforms.get("columns").value=e}getGlitchColumns(){return this.columns}setGlitchColumns(e){this.columns=e}getChromaticAberrationOffset(){return this.chromaticAberrationOffset}setChromaticAberrationOffset(e){this.chromaticAberrationOffset=e}get perturbationMap(){return this.uniforms.get("perturbationMap").value}set perturbationMap(e){let t=this.perturbationMap;null!==t&&t.name===eY&&t.dispose(),e.minFilter=e.magFilter=k.NearestFilter,e.wrapS=e.wrapT=k.RepeatWrapping,e.generateMipmaps=!1,this.uniforms.get("perturbationMap").value=e}getPerturbationMap(){return this.perturbationMap}setPerturbationMap(e){this.perturbationMap=e}generatePerturbationMap(e=64){let t=new eX(e,e,k.RGBAFormat);return t.name=eY,t}update(e,t,i){let n,r=this.mode,a=this.breakPoint,s=this.chromaticAberrationOffset,o=this.strength,l=this.time,u=!1,c=0,h=0;r!==ej.DISABLED&&(r===ej.SPORADIC&&(l+=i,n=l>a.x,l>=a.x+a.y&&(a.set(eQ(this.delay.x,this.delay.y),eQ(this.duration.x,this.duration.y)),l=0)),c=Math.random(),this.uniforms.get("random").value=c,n&&c>this.ratio||r===ej.CONSTANT_WILD?(u=!0,c*=.03*o.y,h=eQ(-Math.PI,Math.PI),this.seeds.set(eQ(-o.y,o.y),eQ(-o.y,o.y)),this.distortion.set(eQ(0,1),eQ(0,1))):(n||r===ej.CONSTANT_MILD)&&(u=!0,c*=.03*o.x,h=eQ(-Math.PI,Math.PI),this.seeds.set(eQ(-o.x,o.x),eQ(-o.x,o.x)),this.distortion.set(eQ(0,1),eQ(0,1))),this.time=l),null!==s&&(u?s.set(Math.cos(h),Math.sin(h)).multiplyScalar(c):s.set(0,0)),this.uniforms.get("active").value=u}dispose(){let e=this.perturbationMap;null!==e&&e.name===eY&&e.dispose()}},eK=`#include <common>
|
|
#include <dithering_pars_fragment>
|
|
#ifdef FRAMEBUFFER_PRECISION_HIGH
|
|
uniform mediump sampler2D inputBuffer;
|
|
#else
|
|
uniform lowp sampler2D inputBuffer;
|
|
#endif
|
|
uniform vec2 lightPosition;uniform float exposure;uniform float decay;uniform float density;uniform float weight;uniform float clampMax;varying vec2 vUv;void main(){vec2 coord=vUv;vec2 delta=lightPosition-coord;delta*=1.0/SAMPLES_FLOAT*density;float illuminationDecay=1.0;vec4 color=vec4(0.0);for(int i=0;i<SAMPLES_INT;++i){coord+=delta;vec4 texel=texture2D(inputBuffer,coord);texel*=illuminationDecay*weight;color+=texel;illuminationDecay*=decay;}gl_FragColor=clamp(color*exposure,0.0,clampMax);
|
|
#include <dithering_fragment>
|
|
}`,eZ=class extends k.ShaderMaterial{constructor(e){super({name:"GodRaysMaterial",defines:{SAMPLES_INT:"60",SAMPLES_FLOAT:"60.0"},uniforms:{inputBuffer:new k.Uniform(null),lightPosition:new k.Uniform(e),density:new k.Uniform(1),decay:new k.Uniform(1),weight:new k.Uniform(1),exposure:new k.Uniform(1),clampMax:new k.Uniform(1)},blending:k.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:eK,vertexShader:j})}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}get lightPosition(){return this.uniforms.lightPosition.value}getLightPosition(){return this.uniforms.lightPosition.value}setLightPosition(e){this.uniforms.lightPosition.value=e}get density(){return this.uniforms.density.value}set density(e){this.uniforms.density.value=e}getDensity(){return this.uniforms.density.value}setDensity(e){this.uniforms.density.value=e}get decay(){return this.uniforms.decay.value}set decay(e){this.uniforms.decay.value=e}getDecay(){return this.uniforms.decay.value}setDecay(e){this.uniforms.decay.value=e}get weight(){return this.uniforms.weight.value}set weight(e){this.uniforms.weight.value=e}getWeight(){return this.uniforms.weight.value}setWeight(e){this.uniforms.weight.value=e}get exposure(){return this.uniforms.exposure.value}set exposure(e){this.uniforms.exposure.value=e}getExposure(){return this.uniforms.exposure.value}setExposure(e){this.uniforms.exposure.value=e}get maxIntensity(){return this.uniforms.clampMax.value}set maxIntensity(e){this.uniforms.clampMax.value=e}getMaxIntensity(){return this.uniforms.clampMax.value}setMaxIntensity(e){this.uniforms.clampMax.value=e}get samples(){return Number(this.defines.SAMPLES_INT)}set samples(e){let t=Math.floor(e);this.defines.SAMPLES_INT=t.toFixed(0),this.defines.SAMPLES_FLOAT=t.toFixed(1),this.needsUpdate=!0}getSamples(){return this.samples}setSamples(e){this.samples=e}},eJ=class extends G{constructor(e,t,i=null){super("RenderPass",e,t),this.needsSwap=!1,this.needsDepthBlit=!0,this.clearPass=new q,this.overrideMaterialManager=null===i?null:new ei(i),this.ignoreBackground=!1,this.skipShadowMapUpdate=!1,this.selection=null}set mainScene(e){this.scene=e}set mainCamera(e){this.camera=e}get renderToScreen(){return super.renderToScreen}set renderToScreen(e){super.renderToScreen=e,this.clearPass.renderToScreen=e}get overrideMaterial(){let e=this.overrideMaterialManager;return null!==e?e.material:null}set overrideMaterial(e){let t=this.overrideMaterialManager;null!==e?null!==t?t.setMaterial(e):this.overrideMaterialManager=new ei(e):null!==t&&(t.dispose(),this.overrideMaterialManager=null)}getOverrideMaterial(){return this.overrideMaterial}setOverrideMaterial(e){this.overrideMaterial=e}get clear(){return this.clearPass.enabled}set clear(e){this.clearPass.enabled=e}getSelection(){return this.selection}setSelection(e){this.selection=e}isBackgroundDisabled(){return this.ignoreBackground}setBackgroundDisabled(e){this.ignoreBackground=e}isShadowMapDisabled(){return this.skipShadowMapUpdate}setShadowMapDisabled(e){this.skipShadowMapUpdate=e}getClearPass(){return this.clearPass}render(e,t,i,n,r){let a=this.scene,s=this.camera,o=this.selection,l=s.layers.mask,u=a.background,c=e.shadowMap.autoUpdate,h=this.renderToScreen?null:t;null!==o&&s.layers.set(o.getLayer()),this.skipShadowMapUpdate&&(e.shadowMap.autoUpdate=!1),(this.ignoreBackground||null!==this.clearPass.overrideClearColor)&&(a.background=null),this.clearPass.enabled&&this.clearPass.render(e,t),e.setRenderTarget(h),null!==this.overrideMaterialManager?this.overrideMaterialManager.render(e,a,s):e.render(a,s),s.layers.mask=l,a.background=u,e.shadowMap.autoUpdate=c}},e$=`#ifdef FRAMEBUFFER_PRECISION_HIGH
|
|
uniform mediump sampler2D map;
|
|
#else
|
|
uniform lowp sampler2D map;
|
|
#endif
|
|
void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=texture2D(map,uv);}`,e0=new k.Vector3,e1=new k.Matrix4,e2=class extends el{constructor(e,t,{blendFunction:i=28,samples:n=60,density:r=.96,decay:a=.9,weight:s=.4,exposure:o=.6,clampMax:l=1,blur:u=!0,kernelSize:c=eu.SMALL,resolutionScale:h=.5,width:d=en.AUTO_SIZE,height:f=en.AUTO_SIZE,resolutionX:p=d,resolutionY:m=f}={}){super("GodRaysEffect",e$,{blendFunction:i,attributes:1,uniforms:new Map([["map",new k.Uniform(null)]])}),this.camera=e,this._lightSource=t,this.lightSource=t,this.lightScene=new k.Scene,this.screenPosition=new k.Vector2,this.renderTargetA=new k.WebGLRenderTarget(1,1,{depthBuffer:!1}),this.renderTargetA.texture.name="GodRays.Target.A",this.renderTargetB=this.renderTargetA.clone(),this.renderTargetB.texture.name="GodRays.Target.B",this.uniforms.get("map").value=this.renderTargetB.texture,this.renderTargetLight=new k.WebGLRenderTarget(1,1),this.renderTargetLight.texture.name="GodRays.Light",this.renderTargetLight.depthTexture=new k.DepthTexture,this.renderPassLight=new eJ(this.lightScene,e),this.renderPassLight.clearPass.enabled=!1,this.blurPass=new ef({kernelSize:c}),this.blurPass.enabled=u,this.copyPass=new Y(this.renderTargetLight),this.copyPass.fullscreenMaterial.channelWeights=new k.Vector4(0,0,0,1),this.godRaysPass=new eO(new eZ(this.screenPosition));const g=this.godRaysMaterial;g.density=r,g.decay=a,g.weight=s,g.exposure=o,g.maxIntensity=l,g.samples=n;const v=this.resolution=new en(this,p,m,h);v.addEventListener("change",e=>this.setSize(v.baseWidth,v.baseHeight))}set mainCamera(e){this.camera=e,this.renderPassLight.mainCamera=e}get lightSource(){return this._lightSource}set lightSource(e){this._lightSource=e,null!==e&&(e.material.depthWrite=!1,e.material.transparent=!0)}getBlurPass(){return this.blurPass}get texture(){return this.renderTargetB.texture}getTexture(){return this.texture}get godRaysMaterial(){return this.godRaysPass.fullscreenMaterial}getGodRaysMaterial(){return this.godRaysMaterial}getResolution(){return this.resolution}get width(){return this.resolution.width}set width(e){this.resolution.preferredWidth=e}get height(){return this.resolution.height}set height(e){this.resolution.preferredHeight=e}get dithering(){return this.godRaysMaterial.dithering}set dithering(e){let t=this.godRaysMaterial;t.dithering=e,t.needsUpdate=!0}get blur(){return this.blurPass.enabled}set blur(e){this.blurPass.enabled=e}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(e){this.blurPass.kernelSize=e}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}get samples(){return this.godRaysMaterial.samples}set samples(e){this.godRaysMaterial.samples=e}setDepthTexture(e,t=k.BasicDepthPacking){this.copyPass.fullscreenMaterial.depthBuffer=e,this.copyPass.fullscreenMaterial.depthPacking=t}update(e,t,i){let n=this.lightSource,r=n.parent,a=n.matrixAutoUpdate,s=this.renderTargetA,o=this.renderTargetLight;n.material.depthWrite=!0,n.matrixAutoUpdate=!1,n.updateWorldMatrix(!0,!1),null!==r&&(a||e1.copy(n.matrix),n.matrix.copy(n.matrixWorld)),this.lightScene.add(n),this.copyPass.render(e,t),this.renderPassLight.render(e,o),n.material.depthWrite=!1,n.matrixAutoUpdate=a,null!==r&&(a||n.matrix.copy(e1),r.add(n)),e0.setFromMatrixPosition(n.matrixWorld).project(this.camera),this.screenPosition.set(Math.min(Math.max((e0.x+1)*.5,-1),2),Math.min(Math.max((e0.y+1)*.5,-1),2));let l=o;this.blurPass.enabled&&(this.blurPass.render(e,l,s),l=s),this.godRaysPass.render(e,l,this.renderTargetB)}setSize(e,t){let i=this.resolution;i.setBaseSize(e,t);let n=i.width,r=i.height;this.renderTargetLight.setSize(e,t),this.renderTargetA.setSize(n,r),this.renderTargetB.setSize(n,r),this.blurPass.resolution.copy(i)}initialize(e,t,i){this.blurPass.initialize(e,t,i),this.renderPassLight.initialize(e,t,i),this.copyPass.initialize(e,t,i),this.godRaysPass.initialize(e,t,i),void 0!==i&&(this.renderTargetA.texture.type=i,this.renderTargetB.texture.type=i,this.renderTargetLight.texture.type=i,null!==e&&e.outputColorSpace===k.SRGBColorSpace&&(this.renderTargetA.texture.colorSpace=k.SRGBColorSpace,this.renderTargetB.texture.colorSpace=k.SRGBColorSpace,this.renderTargetLight.texture.colorSpace=k.SRGBColorSpace))}},e3=class extends el{constructor({blendFunction:e=24,scale:t=1,lineWidth:i=0}={}){super("GridEffect","uniform vec2 scale;uniform float lineWidth;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){float grid=0.5-max(abs(mod(uv.x*scale.x,1.0)-0.5),abs(mod(uv.y*scale.y,1.0)-0.5));outputColor=vec4(vec3(smoothstep(0.0,lineWidth,grid)),inputColor.a);}",{blendFunction:e,uniforms:new Map([["scale",new k.Uniform(new k.Vector2)],["lineWidth",new k.Uniform(i)]])}),this.resolution=new k.Vector2,this.s=0,this.scale=t,this.l=0,this.lineWidth=i}get scale(){return this.s}set scale(e){this.s=Math.max(e,1e-6),this.setSize(this.resolution.width,this.resolution.height)}getScale(){return this.scale}setScale(e){this.scale=e}get lineWidth(){return this.l}set lineWidth(e){this.l=e,this.setSize(this.resolution.width,this.resolution.height)}getLineWidth(){return this.lineWidth}setLineWidth(e){this.lineWidth=e}setSize(e,t){this.resolution.set(e,t);let i=e/t,n=this.scale*(.125*t);this.uniforms.get("scale").value.set(i*n,n),this.uniforms.get("lineWidth").value=n/t+this.lineWidth}},e4=class extends el{constructor({blendFunction:e=30,hue:t=0,saturation:i=0}={}){super("HueSaturationEffect","uniform vec3 hue;uniform float saturation;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec3 color=vec3(dot(inputColor.rgb,hue.xyz),dot(inputColor.rgb,hue.zxy),dot(inputColor.rgb,hue.yzx));float average=(color.r+color.g+color.b)/3.0;vec3 diff=average-color;if(saturation>0.0){color+=diff*(1.0-1.0/(1.001-saturation));}else{color+=diff*-saturation;}outputColor=vec4(min(color,1.0),inputColor.a);}",{blendFunction:e,uniforms:new Map([["hue",new k.Uniform(new k.Vector3)],["saturation",new k.Uniform(i)]])}),this.hue=t}get saturation(){return this.uniforms.get("saturation").value}set saturation(e){this.uniforms.get("saturation").value=e}getSaturation(){return this.saturation}setSaturation(e){this.saturation=e}get hue(){return Math.acos((3*this.uniforms.get("hue").value.x-1)/2)}set hue(e){let t=Math.sin(e),i=Math.cos(e);this.uniforms.get("hue").value.set((2*i+1)/3,(-Math.sqrt(3)*t-i+1)/3,(Math.sqrt(3)*t-i+1)/3)}getHue(){return this.hue}setHue(e){this.hue=e}};function e5(e,t,i){let n=document.createElement("canvas"),r=n.getContext("2d");if(n.width=e,n.height=t,i instanceof Image)r.drawImage(i,0,0);else{let n=r.createImageData(e,t);n.data.set(i),r.putImageData(n,0,0)}return n}var e6=class e{constructor(e=0,t=0,i=null){this.width=e,this.height=t,this.data=i}toCanvas(){return"u"<typeof document?null:e5(this.width,this.height,this.data)}static from(t){let i,{width:n,height:r}=t;if(t instanceof Image){let e=e5(n,r,t);null!==e&&(i=e.getContext("2d").getImageData(0,0,n,r).data)}else i=t.data;return new e(n,r,i)}},e8=new k.Color,e9=class e extends k.Data3DTexture{constructor(e,t){super(e,t,t,t),this.type=k.FloatType,this.format=k.RGBAFormat,this.minFilter=k.LinearFilter,this.magFilter=k.LinearFilter,this.wrapS=k.ClampToEdgeWrapping,this.wrapT=k.ClampToEdgeWrapping,this.wrapR=k.ClampToEdgeWrapping,this.unpackAlignment=1,this.needsUpdate=!0,this.colorSpace=k.LinearSRGBColorSpace,this.domainMin=new k.Vector3(0,0,0),this.domainMax=new k.Vector3(1,1,1)}get isLookupTexture3D(){return!0}scaleUp(t,i=!0){let n=this.image;return t<=n.width?Promise.reject(Error("The target size must be greater than the current size")):new Promise((r,a)=>{let s=URL.createObjectURL(new Blob(['(()=>{var O={SCALE_UP:"lut.scaleup"};var _=[new Float32Array(3),new Float32Array(3)],n=[new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3)],Z=[[new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,0,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([1,0,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([0,1,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([0,1,1]),new Float32Array([1,1,1])]];function d(a,t,r,m){let i=r[0]-t[0],e=r[1]-t[1],y=r[2]-t[2],h=a[0]-t[0],A=a[1]-t[1],w=a[2]-t[2],c=e*w-y*A,l=y*h-i*w,x=i*A-e*h,u=Math.sqrt(c*c+l*l+x*x),b=u*.5,s=c/u,F=l/u,f=x/u,p=-(a[0]*s+a[1]*F+a[2]*f),M=m[0]*s+m[1]*F+m[2]*f;return Math.abs(M+p)*b/3}function V(a,t,r,m,i,e){let y=(r+m*t+i*t*t)*4;e[0]=a[y+0],e[1]=a[y+1],e[2]=a[y+2]}function k(a,t,r,m,i,e){let y=r*(t-1),h=m*(t-1),A=i*(t-1),w=Math.floor(y),c=Math.floor(h),l=Math.floor(A),x=Math.ceil(y),u=Math.ceil(h),b=Math.ceil(A),s=y-w,F=h-c,f=A-l;if(w===y&&c===h&&l===A)V(a,t,y,h,A,e);else{let p;s>=F&&F>=f?p=Z[0]:s>=f&&f>=F?p=Z[1]:f>=s&&s>=F?p=Z[2]:F>=s&&s>=f?p=Z[3]:F>=f&&f>=s?p=Z[4]:f>=F&&F>=s&&(p=Z[5]);let[M,g,X,Y]=p,P=_[0];P[0]=s,P[1]=F,P[2]=f;let o=_[1],L=x-w,S=u-c,U=b-l;o[0]=L*M[0]+w,o[1]=S*M[1]+c,o[2]=U*M[2]+l,V(a,t,o[0],o[1],o[2],n[0]),o[0]=L*g[0]+w,o[1]=S*g[1]+c,o[2]=U*g[2]+l,V(a,t,o[0],o[1],o[2],n[1]),o[0]=L*X[0]+w,o[1]=S*X[1]+c,o[2]=U*X[2]+l,V(a,t,o[0],o[1],o[2],n[2]),o[0]=L*Y[0]+w,o[1]=S*Y[1]+c,o[2]=U*Y[2]+l,V(a,t,o[0],o[1],o[2],n[3]);let T=d(g,X,Y,P)*6,q=d(M,X,Y,P)*6,C=d(M,g,Y,P)*6,E=d(M,g,X,P)*6;n[0][0]*=T,n[0][1]*=T,n[0][2]*=T,n[1][0]*=q,n[1][1]*=q,n[1][2]*=q,n[2][0]*=C,n[2][1]*=C,n[2][2]*=C,n[3][0]*=E,n[3][1]*=E,n[3][2]*=E,e[0]=n[0][0]+n[1][0]+n[2][0]+n[3][0],e[1]=n[0][1]+n[1][1]+n[2][1]+n[3][1],e[2]=n[0][2]+n[1][2]+n[2][2]+n[3][2]}}var v=class{static expand(t,r){let m=Math.cbrt(t.length/4),i=new Float32Array(3),e=new t.constructor(r**3*4),y=t instanceof Uint8Array?255:1,h=r**2,A=1/(r-1);for(let w=0;w<r;++w)for(let c=0;c<r;++c)for(let l=0;l<r;++l){let x=l*A,u=c*A,b=w*A,s=Math.round(l+c*r+w*h)*4;k(t,m,x,u,b,i),e[s+0]=i[0],e[s+1]=i[1],e[s+2]=i[2],e[s+3]=y}return e}};self.addEventListener("message",a=>{let t=a.data,r=t.data;t.operation===O.SCALE_UP&&(r=v.expand(r,t.size)),postMessage(r,[r.buffer]),close()});})();\n'],{type:"text/javascript"})),o=new Worker(s);o.addEventListener("error",e=>a(e.error)),o.addEventListener("message",i=>{let n=new e(i.data,t);this.colorSpace=n.colorSpace,n.type=this.type,n.name=this.name,URL.revokeObjectURL(s),r(n)});let l=i?[n.data.buffer]:[];o.postMessage({operation:"lut.scaleup",data:n.data,size:t},l)})}applyLUT(e){let t=this.image,i=e.image,n=Math.min(t.width,t.height,t.depth);if(n!==Math.min(i.width,i.height,i.depth))console.error("Size mismatch");else if(e.type!==k.FloatType||this.type!==k.FloatType)console.error("Both LUTs must be FloatType textures");else if(e.format!==k.RGBAFormat||this.format!==k.RGBAFormat)console.error("Both LUTs must be RGBA textures");else{let e=t.data,r=i.data,a=n**2,s=n-1;for(let t=0,i=n**3;t<i;++t){let i=4*t,o=4*Math.round(e[i+0]*s+e[i+1]*s*n+e[i+2]*s*a);e[i+0]=r[o+0],e[i+1]=r[o+1],e[i+2]=r[o+2]}this.needsUpdate=!0}return this}convertToUint8(){if(this.type===k.FloatType){let e=this.image.data,t=new Uint8Array(e.length);for(let i=0,n=e.length;i<n;++i)t[i]=255*e[i]+.5;this.image.data=t,this.type=k.UnsignedByteType,this.needsUpdate=!0}return this}convertToFloat(){if(this.type===k.UnsignedByteType){let e=this.image.data,t=new Float32Array(e.length);for(let i=0,n=e.length;i<n;++i)t[i]=e[i]/255;this.image.data=t,this.type=k.FloatType,this.needsUpdate=!0}return this}convertToRGBA(){return console.warn("LookupTexture","convertToRGBA() is deprecated, LUTs are now RGBA by default"),this}convertLinearToSRGB(){let e=this.image.data;if(this.type===k.FloatType){for(let t=0,i=e.length;t<i;t+=4)e8.fromArray(e,t).convertLinearToSRGB().toArray(e,t);this.colorSpace=k.SRGBColorSpace,this.needsUpdate=!0}else console.error("Color space conversion requires FloatType data");return this}convertSRGBToLinear(){let e=this.image.data;if(this.type===k.FloatType){for(let t=0,i=e.length;t<i;t+=4)e8.fromArray(e,t).convertSRGBToLinear().toArray(e,t);this.colorSpace=k.LinearSRGBColorSpace,this.needsUpdate=!0}else console.error("Color space conversion requires FloatType data");return this}toDataTexture(){let e=this.image.width,t=this.image.height*this.image.depth,i=new k.DataTexture(this.image.data,e,t);return i.name=this.name,i.type=this.type,i.format=this.format,i.minFilter=k.LinearFilter,i.magFilter=k.LinearFilter,i.wrapS=this.wrapS,i.wrapT=this.wrapT,i.generateMipmaps=!1,i.needsUpdate=!0,this.colorSpace=i.colorSpace,i}static from(t){let i,n=t.image,{width:r,height:a}=n,s=Math.min(r,a);if(n instanceof Image){let e=e6.from(n).data;if(r>a){i=new Uint8Array(e.length);for(let t=0;t<s;++t)for(let n=0;n<s;++n)for(let r=0;r<s;++r){let a=(r+t*s+n*s*s)*4,o=(r+n*s+t*s*s)*4;i[o+0]=e[a+0],i[o+1]=e[a+1],i[o+2]=e[a+2],i[o+3]=e[a+3]}}else i=new Uint8Array(e.buffer)}else i=n.data.slice();let o=new e(i,s);return o.type=t.type,o.name=t.name,t.colorSpace=o.colorSpace,o}static createNeutral(t){let i=new Float32Array(t**3*4),n=t**2,r=1/(t-1);for(let e=0;e<t;++e)for(let a=0;a<t;++a)for(let s=0;s<t;++s){let o=(e+a*t+s*n)*4;i[o+0]=e*r,i[o+1]=a*r,i[o+2]=s*r,i[o+3]=1}let a=new e(i,t);return a.name="neutral",a}},e7=`uniform vec3 scale;uniform vec3 offset;
|
|
#ifdef CUSTOM_INPUT_DOMAIN
|
|
uniform vec3 domainMin;uniform vec3 domainMax;
|
|
#endif
|
|
#ifdef LUT_3D
|
|
#ifdef LUT_PRECISION_HIGH
|
|
#ifdef GL_FRAGMENT_PRECISION_HIGH
|
|
uniform highp sampler3D lut;
|
|
#else
|
|
uniform mediump sampler3D lut;
|
|
#endif
|
|
#else
|
|
uniform lowp sampler3D lut;
|
|
#endif
|
|
vec4 applyLUT(const in vec3 rgb){
|
|
#ifdef TETRAHEDRAL_INTERPOLATION
|
|
vec3 p=floor(rgb);vec3 f=rgb-p;vec3 v1=(p+0.5)*LUT_TEXEL_WIDTH;vec3 v4=(p+1.5)*LUT_TEXEL_WIDTH;vec3 v2,v3;vec3 frac;if(f.r>=f.g){if(f.g>f.b){frac=f.rgb;v2=vec3(v4.x,v1.y,v1.z);v3=vec3(v4.x,v4.y,v1.z);}else if(f.r>=f.b){frac=f.rbg;v2=vec3(v4.x,v1.y,v1.z);v3=vec3(v4.x,v1.y,v4.z);}else{frac=f.brg;v2=vec3(v1.x,v1.y,v4.z);v3=vec3(v4.x,v1.y,v4.z);}}else{if(f.b>f.g){frac=f.bgr;v2=vec3(v1.x,v1.y,v4.z);v3=vec3(v1.x,v4.y,v4.z);}else if(f.r>=f.b){frac=f.grb;v2=vec3(v1.x,v4.y,v1.z);v3=vec3(v4.x,v4.y,v1.z);}else{frac=f.gbr;v2=vec3(v1.x,v4.y,v1.z);v3=vec3(v1.x,v4.y,v4.z);}}vec4 n1=texture(lut,v1);vec4 n2=texture(lut,v2);vec4 n3=texture(lut,v3);vec4 n4=texture(lut,v4);vec4 weights=vec4(1.0-frac.x,frac.x-frac.y,frac.y-frac.z,frac.z);vec4 result=weights*mat4(vec4(n1.r,n2.r,n3.r,n4.r),vec4(n1.g,n2.g,n3.g,n4.g),vec4(n1.b,n2.b,n3.b,n4.b),vec4(1.0));return vec4(result.rgb,1.0);
|
|
#else
|
|
return texture(lut,rgb);
|
|
#endif
|
|
}
|
|
#else
|
|
#ifdef LUT_PRECISION_HIGH
|
|
#ifdef GL_FRAGMENT_PRECISION_HIGH
|
|
uniform highp sampler2D lut;
|
|
#else
|
|
uniform mediump sampler2D lut;
|
|
#endif
|
|
#else
|
|
uniform lowp sampler2D lut;
|
|
#endif
|
|
vec4 applyLUT(const in vec3 rgb){float slice=rgb.b*LUT_SIZE;float slice0=floor(slice);float interp=slice-slice0;float centeredInterp=interp-0.5;float slice1=slice0+sign(centeredInterp);
|
|
#ifdef LUT_STRIP_HORIZONTAL
|
|
float xOffset=clamp(rgb.r*LUT_TEXEL_HEIGHT,LUT_TEXEL_WIDTH*0.5,LUT_TEXEL_HEIGHT-LUT_TEXEL_WIDTH*0.5);vec2 uv0=vec2(slice0*LUT_TEXEL_HEIGHT+xOffset,rgb.g);vec2 uv1=vec2(slice1*LUT_TEXEL_HEIGHT+xOffset,rgb.g);
|
|
#else
|
|
float yOffset=clamp(rgb.g*LUT_TEXEL_WIDTH,LUT_TEXEL_HEIGHT*0.5,LUT_TEXEL_WIDTH-LUT_TEXEL_HEIGHT*0.5);vec2 uv0=vec2(rgb.r,slice0*LUT_TEXEL_WIDTH+yOffset);vec2 uv1=vec2(rgb.r,slice1*LUT_TEXEL_WIDTH+yOffset);
|
|
#endif
|
|
vec4 sample0=texture2D(lut,uv0);vec4 sample1=texture2D(lut,uv1);return mix(sample0,sample1,abs(centeredInterp));}
|
|
#endif
|
|
void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec3 c=inputColor.rgb;
|
|
#ifdef CUSTOM_INPUT_DOMAIN
|
|
if(c.r>=domainMin.r&&c.g>=domainMin.g&&c.b>=domainMin.b&&c.r<=domainMax.r&&c.g<=domainMax.g&&c.b<=domainMax.b){c=applyLUT(scale*c+offset).rgb;}else{c=inputColor.rgb;}
|
|
#else
|
|
#if !defined(LUT_3D) || defined(TETRAHEDRAL_INTERPOLATION)
|
|
c=clamp(c,0.0,1.0);
|
|
#endif
|
|
c=applyLUT(scale*c+offset).rgb;
|
|
#endif
|
|
outputColor=vec4(c,inputColor.a);}`,te=class extends el{constructor(e,{blendFunction:t=30,tetrahedralInterpolation:i=!1,inputColorSpace:n=k.SRGBColorSpace}={}){super("LUT3DEffect",e7,{blendFunction:t,uniforms:new Map([["lut",new k.Uniform(null)],["scale",new k.Uniform(new k.Vector3)],["offset",new k.Uniform(new k.Vector3)],["domainMin",new k.Uniform(null)],["domainMax",new k.Uniform(null)]])}),this.tetrahedralInterpolation=i,this.inputColorSpace=n,this.lut=e}get lut(){return this.uniforms.get("lut").value}set lut(e){let t=this.defines,i=this.uniforms;if(this.lut!==e&&(i.get("lut").value=e,null!==e)){let n=e.image,r=this.tetrahedralInterpolation;if(t.clear(),t.set("LUT_SIZE",Math.min(n.width,n.height).toFixed(16)),t.set("LUT_TEXEL_WIDTH",(1/n.width).toFixed(16)),t.set("LUT_TEXEL_HEIGHT",(1/n.height).toFixed(16)),i.get("domainMin").value=null,i.get("domainMax").value=null,(e.type===k.FloatType||e.type===k.HalfFloatType)&&t.set("LUT_PRECISION_HIGH","1"),n.width>n.height?t.set("LUT_STRIP_HORIZONTAL","1"):e instanceof k.Data3DTexture&&t.set("LUT_3D","1"),e instanceof e9){let n=e.domainMin,r=e.domainMax;(0!==n.x||0!==n.y||0!==n.z||1!==r.x||1!==r.y||1!==r.z)&&(t.set("CUSTOM_INPUT_DOMAIN","1"),i.get("domainMin").value=n.clone(),i.get("domainMax").value=r.clone())}this.tetrahedralInterpolation=r}}getLUT(){return this.lut}setLUT(e){this.lut=e}updateScaleOffset(){let e=this.lut;if(null!==e){let t=Math.min(e.image.width,e.image.height),i=this.uniforms.get("scale").value,n=this.uniforms.get("offset").value;if(this.tetrahedralInterpolation&&e instanceof k.Data3DTexture)if(this.defines.has("CUSTOM_INPUT_DOMAIN")){let r=e.domainMax.clone().sub(e.domainMin);i.setScalar(t-1).divide(r),n.copy(e.domainMin).negate().multiply(i)}else i.setScalar(t-1),n.setScalar(0);else if(this.defines.has("CUSTOM_INPUT_DOMAIN")){let r=e.domainMax.clone().sub(e.domainMin).multiplyScalar(t);i.setScalar(t-1).divide(r),n.copy(e.domainMin).negate().multiply(i).addScalar(1/(2*t))}else i.setScalar((t-1)/t),n.setScalar(1/(2*t))}}configureTetrahedralInterpolation(){let e=this.lut;null!==e&&(e.minFilter=k.LinearFilter,e.magFilter=k.LinearFilter,this.tetrahedralInterpolation&&(e instanceof k.Data3DTexture?(e.minFilter=k.NearestFilter,e.magFilter=k.NearestFilter):console.warn("Tetrahedral interpolation requires a 3D texture")),e.needsUpdate=!0)}get tetrahedralInterpolation(){return this.defines.has("TETRAHEDRAL_INTERPOLATION")}set tetrahedralInterpolation(e){e?this.defines.set("TETRAHEDRAL_INTERPOLATION","1"):this.defines.delete("TETRAHEDRAL_INTERPOLATION"),this.configureTetrahedralInterpolation(),this.updateScaleOffset(),this.setChanged()}setTetrahedralInterpolationEnabled(e){this.tetrahedralInterpolation=e}},tt=`void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec3 noise=vec3(rand(uv*(1.0+time)));
|
|
#ifdef PREMULTIPLY
|
|
outputColor=vec4(min(inputColor.rgb*noise,vec3(1.0)),inputColor.a);
|
|
#else
|
|
outputColor=vec4(noise,inputColor.a);
|
|
#endif
|
|
}`,ti=class extends el{constructor({blendFunction:e=28,premultiply:t=!1}={}){super("NoiseEffect",tt,{blendFunction:e}),this.premultiply=t}get premultiply(){return this.defines.has("PREMULTIPLY")}set premultiply(e){this.premultiply!==e&&(e?this.defines.set("PREMULTIPLY","1"):this.defines.delete("PREMULTIPLY"),this.setChanged())}isPremultiplied(){return this.premultiply}setPremultiplied(e){this.premultiply=e}},tn=`#include <packing>
|
|
#include <clipping_planes_pars_fragment>
|
|
#ifdef GL_FRAGMENT_PRECISION_HIGH
|
|
uniform highp sampler2D depthBuffer;
|
|
#else
|
|
uniform mediump sampler2D depthBuffer;
|
|
#endif
|
|
uniform float cameraNear;uniform float cameraFar;centroid varying float vViewZ;centroid varying vec4 vProjTexCoord;void main(){
|
|
#include <clipping_planes_fragment>
|
|
vec2 projTexCoord=(vProjTexCoord.xy/vProjTexCoord.w)*0.5+0.5;
|
|
#if DEPTH_PACKING == 3201
|
|
float depth=unpackRGBAToDepth(texture2D(depthBuffer,projTexCoord));
|
|
#else
|
|
float depth=texture2D(depthBuffer,projTexCoord).r;
|
|
#endif
|
|
#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH)
|
|
float d=pow(2.0,depth*log2(cameraFar+1.0))-1.0;float a=cameraFar/(cameraFar-cameraNear);float b=cameraFar*cameraNear/(cameraNear-cameraFar);depth=a+b/d;
|
|
#elif defined(USE_REVERSED_DEPTH_BUFFER)
|
|
depth=1.0-depth;
|
|
#endif
|
|
#ifdef PERSPECTIVE_CAMERA
|
|
float viewZ=perspectiveDepthToViewZ(depth,cameraNear,cameraFar);
|
|
#else
|
|
float viewZ=orthographicDepthToViewZ(depth,cameraNear,cameraFar);
|
|
#endif
|
|
float depthTest=(-vViewZ>-viewZ)?1.0:0.0;gl_FragColor.rg=vec2(0.0,depthTest);}`,tr=`#include <common>
|
|
#include <morphtarget_pars_vertex>
|
|
#include <skinning_pars_vertex>
|
|
#include <clipping_planes_pars_vertex>
|
|
varying float vViewZ;varying vec4 vProjTexCoord;void main(){
|
|
#include <skinbase_vertex>
|
|
#include <begin_vertex>
|
|
#include <morphtarget_vertex>
|
|
#include <skinning_vertex>
|
|
#include <project_vertex>
|
|
vViewZ=mvPosition.z;vProjTexCoord=gl_Position;
|
|
#include <clipping_planes_vertex>
|
|
}`,ta=class extends k.ShaderMaterial{constructor(e=null,t){super({name:"DepthComparisonMaterial",defines:{DEPTH_PACKING:"0"},uniforms:{depthBuffer:new k.Uniform(null),cameraNear:new k.Uniform(.3),cameraFar:new k.Uniform(1e3)},blending:k.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:tn,vertexShader:tr}),this.depthBuffer=e,this.depthPacking=k.RGBADepthPacking,this.copyCameraSettings(t)}set depthBuffer(e){this.uniforms.depthBuffer.value=e}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e,t=k.RGBADepthPacking){this.depthBuffer=e,this.depthPacking=t}adoptCameraSettings(e){this.copyCameraSettings(e)}copyCameraSettings(e){e&&(this.uniforms.cameraNear.value=e.near,this.uniforms.cameraFar.value=e.far,e instanceof k.PerspectiveCamera?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}},ts=class extends k.ShaderMaterial{constructor(e=new k.Vector2){super({name:"OutlineMaterial",uniforms:{inputBuffer:new k.Uniform(null),texelSize:new k.Uniform(new k.Vector2)},blending:k.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"uniform lowp sampler2D inputBuffer;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 c0=texture2D(inputBuffer,vUv0).rg;vec2 c1=texture2D(inputBuffer,vUv1).rg;vec2 c2=texture2D(inputBuffer,vUv2).rg;vec2 c3=texture2D(inputBuffer,vUv3).rg;float d0=(c0.x-c1.x)*0.5;float d1=(c2.x-c3.x)*0.5;float d=length(vec2(d0,d1));float a0=min(c0.y,c1.y);float a1=min(c2.y,c3.y);float visibilityFactor=min(a0,a1);gl_FragColor.rg=(1.0-visibilityFactor>0.001)?vec2(d,0.0):vec2(0.0,d);}",vertexShader:"uniform vec2 texelSize;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vUv0=vec2(uv.x+texelSize.x,uv.y);vUv1=vec2(uv.x-texelSize.x,uv.y);vUv2=vec2(uv.x,uv.y+texelSize.y);vUv3=vec2(uv.x,uv.y-texelSize.y);gl_Position=vec4(position.xy,1.0,1.0);}"}),this.uniforms.texelSize.value.set(e.x,e.y),this.uniforms.maskTexture=this.uniforms.inputBuffer}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t)}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}},to=class extends G{constructor(e,t,{renderTarget:i,resolutionScale:n=1,width:r=en.AUTO_SIZE,height:a=en.AUTO_SIZE,resolutionX:s=r,resolutionY:o=a}={}){super("DepthPass"),this.needsSwap=!1,this.renderPass=new eJ(e,t,new k.MeshDepthMaterial({depthPacking:k.RGBADepthPacking}));const l=this.renderPass;l.skipShadowMapUpdate=!0,l.ignoreBackground=!0,this.renderTarget=i,void 0===this.renderTarget&&(this.renderTarget=new k.WebGLRenderTarget(1,1,{minFilter:k.NearestFilter,magFilter:k.NearestFilter}),this.renderTarget.texture.name="DepthPass.Target");const u=this.resolution=new en(this,s,o,n);u.addEventListener("change",e=>this.setSize(u.baseWidth,u.baseHeight))}set mainScene(e){this.renderPass.mainScene=e}set mainCamera(e){this.renderPass.mainCamera=e}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}render(e,t,i,n,r){let a=this.renderToScreen?null:this.renderTarget;this.renderPass.render(e,a)}setSize(e,t){let i=this.resolution;i.setBaseSize(e,t),this.renderTarget.setSize(i.width,i.height)}initialize(e,t,i){let n=0xffffff*!e.capabilities.reversedDepthBuffer,r=this.renderPass.clearPass;r.overrideClearColor=new k.Color(n),r.overrideClearAlpha=1}},tl=`uniform lowp sampler2D edgeTexture;uniform lowp sampler2D maskTexture;uniform vec3 visibleEdgeColor;uniform vec3 hiddenEdgeColor;uniform float pulse;uniform float edgeStrength;
|
|
#ifdef USE_PATTERN
|
|
uniform lowp sampler2D patternTexture;varying vec2 vUvPattern;
|
|
#endif
|
|
void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec2 edge=texture2D(edgeTexture,uv).rg;vec2 mask=texture2D(maskTexture,uv).rg;
|
|
#ifndef X_RAY
|
|
edge.y=0.0;
|
|
#endif
|
|
edge*=(edgeStrength*mask.x*pulse);vec3 color=edge.x*visibleEdgeColor+edge.y*hiddenEdgeColor;float visibilityFactor=0.0;
|
|
#ifdef USE_PATTERN
|
|
vec4 patternColor=texture2D(patternTexture,vUvPattern);
|
|
#ifdef X_RAY
|
|
float hiddenFactor=0.5;
|
|
#else
|
|
float hiddenFactor=0.0;
|
|
#endif
|
|
visibilityFactor=(1.0-mask.y>0.0)?1.0:hiddenFactor;visibilityFactor*=(1.0-mask.x)*patternColor.a;color+=visibilityFactor*patternColor.rgb;
|
|
#endif
|
|
float alpha=max(max(edge.x,edge.y),visibilityFactor);
|
|
#ifdef ALPHA
|
|
outputColor=vec4(color,alpha);
|
|
#else
|
|
outputColor=vec4(color,max(alpha,inputColor.a));
|
|
#endif
|
|
}`,tu=class extends el{constructor(e,t,{blendFunction:i=28,patternTexture:n=null,patternScale:r=1,edgeStrength:a=1,pulseSpeed:s=0,visibleEdgeColor:o=0xffffff,hiddenEdgeColor:l=2230538,kernelSize:u=eu.VERY_SMALL,blur:c=!1,xRay:h=!0,multisampling:d=0,resolutionScale:f=.5,width:p=en.AUTO_SIZE,height:m=en.AUTO_SIZE,resolutionX:g=p,resolutionY:v=m}={}){super("OutlineEffect",tl,{uniforms:new Map([["maskTexture",new k.Uniform(null)],["edgeTexture",new k.Uniform(null)],["edgeStrength",new k.Uniform(a)],["visibleEdgeColor",new k.Uniform(new k.Color(o))],["hiddenEdgeColor",new k.Uniform(new k.Color(l))],["pulse",new k.Uniform(1)],["patternScale",new k.Uniform(r)],["patternTexture",new k.Uniform(null)]])}),this.blendMode.addEventListener("change",e=>{1===this.blendMode.blendFunction?this.defines.set("ALPHA","1"):this.defines.delete("ALPHA"),this.setChanged()}),this.blendMode.blendFunction=i,this.patternTexture=n,this.xRay=h,this.scene=e,this.camera=t,this.renderTargetMask=new k.WebGLRenderTarget(1,1),this.renderTargetMask.samples=d,this.renderTargetMask.texture.name="Outline.Mask",this.uniforms.get("maskTexture").value=this.renderTargetMask.texture,this.renderTargetOutline=new k.WebGLRenderTarget(1,1,{depthBuffer:!1}),this.renderTargetOutline.texture.name="Outline.Edges",this.uniforms.get("edgeTexture").value=this.renderTargetOutline.texture,this.clearPass=new q,this.clearPass.overrideClearColor=new k.Color(0),this.clearPass.overrideClearAlpha=1,this.depthPass=new to(e,t),this.maskPass=new eJ(e,t,new ta(this.depthPass.texture,t));const x=this.maskPass.clearPass;x.overrideClearColor=new k.Color(0xffffff),x.overrideClearAlpha=1,this.blurPass=new ef({resolutionScale:f,resolutionX:g,resolutionY:v,kernelSize:u}),this.blurPass.enabled=c;const y=this.blurPass.resolution;y.addEventListener("change",e=>this.setSize(y.baseWidth,y.baseHeight)),this.outlinePass=new eO(new ts),this.outlinePass.fullscreenMaterial.inputBuffer=this.renderTargetMask.texture,this.time=0,this.forceUpdate=!0,this.selection=new ea,this.pulseSpeed=s}set mainScene(e){this.scene=e,this.depthPass.mainScene=e,this.maskPass.mainScene=e}set mainCamera(e){this.camera=e,this.depthPass.mainCamera=e,this.maskPass.mainCamera=e,this.maskPass.overrideMaterial.copyCameraSettings(e)}get resolution(){return this.blurPass.resolution}getResolution(){return this.blurPass.getResolution()}get multisampling(){return this.renderTargetMask.samples}set multisampling(e){this.renderTargetMask.samples=e,this.renderTargetMask.dispose()}get patternScale(){return this.uniforms.get("patternScale").value}set patternScale(e){this.uniforms.get("patternScale").value=e}get edgeStrength(){return this.uniforms.get("edgeStrength").value}set edgeStrength(e){this.uniforms.get("edgeStrength").value=e}get visibleEdgeColor(){return this.uniforms.get("visibleEdgeColor").value}set visibleEdgeColor(e){this.uniforms.get("visibleEdgeColor").value=e}get hiddenEdgeColor(){return this.uniforms.get("hiddenEdgeColor").value}set hiddenEdgeColor(e){this.uniforms.get("hiddenEdgeColor").value=e}getBlurPass(){return this.blurPass}getSelection(){return this.selection}getPulseSpeed(){return this.pulseSpeed}setPulseSpeed(e){this.pulseSpeed=e}get width(){return this.resolution.width}set width(e){this.resolution.preferredWidth=e}get height(){return this.resolution.height}set height(e){this.resolution.preferredHeight=e}get selectionLayer(){return this.selection.layer}set selectionLayer(e){this.selection.layer=e}get dithering(){return this.blurPass.dithering}set dithering(e){this.blurPass.dithering=e}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(e){this.blurPass.kernelSize=e}get blur(){return this.blurPass.enabled}set blur(e){this.blurPass.enabled=e}get xRay(){return this.defines.has("X_RAY")}set xRay(e){this.xRay!==e&&(e?this.defines.set("X_RAY","1"):this.defines.delete("X_RAY"),this.setChanged())}isXRayEnabled(){return this.xRay}setXRayEnabled(e){this.xRay=e}get patternTexture(){return this.uniforms.get("patternTexture").value}set patternTexture(e){null!==e?(e.wrapS=e.wrapT=k.RepeatWrapping,this.defines.set("USE_PATTERN","1"),this.setVertexShader("uniform float patternScale;varying vec2 vUvPattern;void mainSupport(const in vec2 uv){vUvPattern=uv*vec2(aspect,1.0)*patternScale;}")):(this.defines.delete("USE_PATTERN"),this.setVertexShader(null)),this.uniforms.get("patternTexture").value=e,this.setChanged()}setPatternTexture(e){this.patternTexture=e}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}setSelection(e){return this.selection.set(e),this}clearSelection(){return this.selection.clear(),this}selectObject(e){return this.selection.add(e),this}deselectObject(e){return this.selection.delete(e),this}update(e,t,i){let n=this.scene,r=this.camera,a=this.selection,s=this.uniforms.get("pulse"),o=n.background,l=r.layers.mask;(this.forceUpdate||a.size>0)&&(n.background=null,s.value=1,this.pulseSpeed>0&&(s.value=.375*Math.cos(this.time*this.pulseSpeed*10)+.625),this.time+=i,a.setVisible(!1),this.depthPass.render(e),a.setVisible(!0),r.layers.set(a.layer),this.maskPass.render(e,this.renderTargetMask),r.layers.mask=l,n.background=o,this.outlinePass.render(e,null,this.renderTargetOutline),this.blurPass.enabled&&this.blurPass.render(e,this.renderTargetOutline,this.renderTargetOutline)),this.forceUpdate=a.size>0}setSize(e,t){this.blurPass.setSize(e,t),this.renderTargetMask.setSize(e,t);let i=this.resolution;i.setBaseSize(e,t);let n=i.width,r=i.height;this.depthPass.setSize(n,r),this.renderTargetOutline.setSize(n,r),this.outlinePass.fullscreenMaterial.setSize(n,r)}initialize(e,t,i){this.blurPass.initialize(e,t,k.UnsignedByteType),void 0!==i&&(this.depthPass.initialize(e,t,i),this.maskPass.initialize(e,t,i),this.outlinePass.initialize(e,t,i))}},tc=class extends el{constructor(e=30){super("PixelationEffect","uniform bool active;uniform vec4 d;void mainUv(inout vec2 uv){if(active){uv=d.xy*(floor(uv*d.zw)+0.5);}}",{uniforms:new Map([["active",new k.Uniform(!1)],["d",new k.Uniform(new k.Vector4)]])}),this.resolution=new k.Vector2,this._granularity=0,this.granularity=e}get granularity(){return this._granularity}set granularity(e){let t=Math.floor(e);t%2>0&&(t+=1),this._granularity=t,this.uniforms.get("active").value=t>0,this.setSize(this.resolution.width,this.resolution.height)}getGranularity(){return this.granularity}setGranularity(e){this.granularity=e}setSize(e,t){let i=this.resolution;i.set(e,t);let n=this.granularity,r=n/i.x,a=n/i.y;this.uniforms.get("d").value.set(r,a,1/r,1/a)}},th=`uniform float count;
|
|
#ifdef SCROLL
|
|
uniform float scrollSpeed;
|
|
#endif
|
|
void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){float y=uv.y;
|
|
#ifdef SCROLL
|
|
y+=time*scrollSpeed;
|
|
#endif
|
|
vec2 sl=vec2(sin(y*count),cos(y*count));outputColor=vec4(sl.xyx,inputColor.a);}`,td=class extends el{constructor({blendFunction:e=24,density:t=1.25,scrollSpeed:i=0}={}){super("ScanlineEffect",th,{blendFunction:e,uniforms:new Map([["count",new k.Uniform(0)],["scrollSpeed",new k.Uniform(0)]])}),this.resolution=new k.Vector2,this.d=t,this.scrollSpeed=i}get density(){return this.d}set density(e){this.d=e,this.setSize(this.resolution.width,this.resolution.height)}getDensity(){return this.density}setDensity(e){this.density=e}get scrollSpeed(){return this.uniforms.get("scrollSpeed").value}set scrollSpeed(e){this.uniforms.get("scrollSpeed").value=e,0===e?this.defines.delete("SCROLL")&&this.setChanged():this.defines.has("SCROLL")||(this.defines.set("SCROLL","1"),this.setChanged())}setSize(e,t){this.resolution.set(e,t),this.uniforms.get("count").value=Math.round(t*this.density)}},tf=.5*Math.PI,tp=new k.Vector3,tm=new k.Vector3,tg=class extends el{constructor(e,t=new k.Vector3,{speed:i=2,maxRadius:n=1,waveSize:r=.2,amplitude:a=.05}={}){super("ShockWaveEffect","uniform bool active;uniform vec2 center;uniform float waveSize;uniform float radius;uniform float maxRadius;uniform float amplitude;varying float vSize;void mainUv(inout vec2 uv){if(active){vec2 aspectCorrection=vec2(aspect,1.0);vec2 difference=uv*aspectCorrection-center*aspectCorrection;float distance=sqrt(dot(difference,difference))*vSize;if(distance>radius){if(distance<radius+waveSize){float angle=(distance-radius)*PI2/waveSize;float cosSin=(1.0-cos(angle))*0.5;float extent=maxRadius+waveSize;float decay=max(extent-distance*distance,0.0)/extent;uv-=((cosSin*amplitude*difference)/distance)*decay;}}}}",{vertexShader:"uniform float size;uniform float cameraDistance;varying float vSize;void mainSupport(){vSize=(0.1*cameraDistance)/size;}",uniforms:new Map([["active",new k.Uniform(!1)],["center",new k.Uniform(new k.Vector2(.5,.5))],["cameraDistance",new k.Uniform(1)],["size",new k.Uniform(1)],["radius",new k.Uniform(-r)],["maxRadius",new k.Uniform(n)],["waveSize",new k.Uniform(r)],["amplitude",new k.Uniform(a)]])}),this.position=t,this.speed=i,this.camera=e,this.screenPosition=this.uniforms.get("center").value,this.time=0,this.active=!1}set mainCamera(e){this.camera=e}get amplitude(){return this.uniforms.get("amplitude").value}set amplitude(e){this.uniforms.get("amplitude").value=e}get waveSize(){return this.uniforms.get("waveSize").value}set waveSize(e){this.uniforms.get("waveSize").value=e}get maxRadius(){return this.uniforms.get("maxRadius").value}set maxRadius(e){this.uniforms.get("maxRadius").value=e}get epicenter(){return this.position}set epicenter(e){this.position=e}getPosition(){return this.position}setPosition(e){this.position=e}getSpeed(){return this.speed}setSpeed(e){this.speed=e}explode(){this.time=0,this.active=!0,this.uniforms.get("active").value=!0}update(e,t,i){let n=this.position,r=this.camera,a=this.uniforms,s=a.get("active");if(this.active){let e=a.get("waveSize").value;r.getWorldDirection(tp),tm.copy(r.position).sub(n),s.value=tp.angleTo(tm)>tf,s.value&&(a.get("cameraDistance").value=r.position.distanceTo(n),tp.copy(n).project(r),this.screenPosition.set((tp.x+1)*.5,(tp.y+1)*.5)),this.time+=i*this.speed;let t=this.time-e;a.get("radius").value=t,t>=(a.get("maxRadius").value+e)*2&&(this.active=!1,s.value=!1)}}},tv=`#include <common>
|
|
#include <packing>
|
|
#ifdef GL_FRAGMENT_PRECISION_HIGH
|
|
uniform highp sampler2D depthBuffer0;uniform highp sampler2D depthBuffer1;
|
|
#else
|
|
uniform mediump sampler2D depthBuffer0;uniform mediump sampler2D depthBuffer1;
|
|
#endif
|
|
uniform sampler2D inputBuffer;uniform vec2 cameraNearFar;float getViewZ(const in float depth){
|
|
#ifdef PERSPECTIVE_CAMERA
|
|
return perspectiveDepthToViewZ(depth,cameraNearFar.x,cameraNearFar.y);
|
|
#else
|
|
return orthographicDepthToViewZ(depth,cameraNearFar.x,cameraNearFar.y);
|
|
#endif
|
|
}varying vec2 vUv;void main(){vec2 depth;
|
|
#if DEPTH_PACKING_0 == 3201
|
|
depth.x=unpackRGBAToDepth(texture2D(depthBuffer0,vUv));
|
|
#else
|
|
depth.x=texture2D(depthBuffer0,vUv).r;
|
|
#endif
|
|
#if DEPTH_PACKING_1 == 3201
|
|
depth.y=unpackRGBAToDepth(texture2D(depthBuffer1,vUv));
|
|
#else
|
|
depth.y=texture2D(depthBuffer1,vUv).r;
|
|
#endif
|
|
#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH)
|
|
float a=cameraNearFar.y/(cameraNearFar.y-cameraNearFar.x);float b=cameraNearFar.y*cameraNearFar.x/(cameraNearFar.x-cameraNearFar.y);float c=log2(cameraNearFar.y+1.0);float d=pow(2.0,depth.x*c)-1.0;depth.x=a+b/d;d=pow(2.0,depth.y*c)-1.0;depth.y=a+b/d;
|
|
#elif defined(USE_REVERSED_DEPTH_BUFFER)
|
|
depth.x=1.0-depth.x;depth.y=1.0-depth.y;
|
|
#endif
|
|
bool isMaxDepth=(depth.x==1.0);
|
|
#ifdef PERSPECTIVE_CAMERA
|
|
depth.x=viewZToOrthographicDepth(getViewZ(depth.x),cameraNearFar.x,cameraNearFar.y);depth.y=viewZToOrthographicDepth(getViewZ(depth.y),cameraNearFar.x,cameraNearFar.y);
|
|
#endif
|
|
#if DEPTH_TEST_STRATEGY == 0
|
|
bool keep=depthTest(depth.x,depth.y);
|
|
#elif DEPTH_TEST_STRATEGY == 1
|
|
bool keep=isMaxDepth||depthTest(depth.x,depth.y);
|
|
#else
|
|
bool keep=!isMaxDepth&&depthTest(depth.x,depth.y);
|
|
#endif
|
|
if(keep){gl_FragColor=texture2D(inputBuffer,vUv);}else{discard;}}`,tx=class extends k.ShaderMaterial{constructor(){super({name:"DepthMaskMaterial",defines:{DEPTH_EPSILON:"0.0001",DEPTH_PACKING_0:"0",DEPTH_PACKING_1:"0",DEPTH_TEST_STRATEGY:1},uniforms:{inputBuffer:new k.Uniform(null),depthBuffer0:new k.Uniform(null),depthBuffer1:new k.Uniform(null),cameraNearFar:new k.Uniform(new k.Vector2(1,1))},blending:k.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:tv,vertexShader:j}),this.depthMode=k.LessDepth}set depthBuffer0(e){this.uniforms.depthBuffer0.value=e}set depthPacking0(e){this.defines.DEPTH_PACKING_0=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer0(e,t=k.BasicDepthPacking){this.depthBuffer0=e,this.depthPacking0=t}set depthBuffer1(e){this.uniforms.depthBuffer1.value=e}set depthPacking1(e){this.defines.DEPTH_PACKING_1=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer1(e,t=k.BasicDepthPacking){this.depthBuffer1=e,this.depthPacking1=t}get maxDepthStrategy(){return Number(this.defines.DEPTH_TEST_STRATEGY)}set maxDepthStrategy(e){this.defines.DEPTH_TEST_STRATEGY=e.toFixed(0),this.needsUpdate=!0}get keepFar(){return this.maxDepthStrategy}set keepFar(e){this.maxDepthStrategy=e?1:2}getMaxDepthStrategy(){return this.maxDepthStrategy}setMaxDepthStrategy(e){this.maxDepthStrategy=e}get epsilon(){return Number(this.defines.DEPTH_EPSILON)}set epsilon(e){this.defines.DEPTH_EPSILON=e.toFixed(16),this.needsUpdate=!0}getEpsilon(){return this.epsilon}setEpsilon(e){this.epsilon=e}get depthMode(){return Number(this.defines.DEPTH_MODE)}set depthMode(e){let t;switch(e){case k.NeverDepth:t="false";break;case k.AlwaysDepth:t="true";break;case k.EqualDepth:t="abs(d1 - d0) <= DEPTH_EPSILON";break;case k.NotEqualDepth:t="abs(d1 - d0) > DEPTH_EPSILON";break;case k.LessDepth:t="d0 > d1";break;case k.LessEqualDepth:t="d0 >= d1";break;case k.GreaterEqualDepth:t="d0 <= d1";break;case k.GreaterDepth:default:t="d0 < d1"}this.defines.DEPTH_MODE=e.toFixed(0),this.defines["depthTest(d0, d1)"]=t,this.needsUpdate=!0}getDepthMode(){return this.depthMode}setDepthMode(e){this.depthMode=e}adoptCameraSettings(e){this.copyCameraSettings(e)}copyCameraSettings(e){e&&(this.uniforms.cameraNearFar.value.set(e.near,e.far),e instanceof k.PerspectiveCamera?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}},ty=class extends eb{constructor(e,t,i){super(i),this.setAttributes(1|this.getAttributes()),this.camera=t,this.depthPass=new to(e,t),this.clearPass=new q(!0,!1,!1),this.clearPass.overrideClearColor=new k.Color(0),this.depthMaskPass=new eO(new tx);const n=this.depthMaskMaterial;n.copyCameraSettings(t),n.depthBuffer1=this.depthPass.texture,n.depthPacking1=k.RGBADepthPacking,n.depthMode=k.EqualDepth,this.renderTargetMasked=new k.WebGLRenderTarget(1,1,{depthBuffer:!1}),this.renderTargetMasked.texture.name="Bloom.Masked",this.selection=new ea,this._inverted=!1,this._ignoreBackground=!1}set mainScene(e){this.depthPass.mainScene=e}set mainCamera(e){this.camera=e,this.depthPass.mainCamera=e,this.depthMaskMaterial.copyCameraSettings(e)}getSelection(){return this.selection}get depthMaskMaterial(){return this.depthMaskPass.fullscreenMaterial}get inverted(){return this._inverted}set inverted(e){this._inverted=e,this.depthMaskMaterial.depthMode=e?k.NotEqualDepth:k.EqualDepth}isInverted(){return this.inverted}setInverted(e){this.inverted=e}get ignoreBackground(){return this._ignoreBackground}set ignoreBackground(e){this._ignoreBackground=e,this.depthMaskMaterial.maxDepthStrategy=e?2:1}isBackgroundDisabled(){return this.ignoreBackground}setBackgroundDisabled(e){this.ignoreBackground=e}setDepthTexture(e,t=k.BasicDepthPacking){this.depthMaskMaterial.depthBuffer0=e,this.depthMaskMaterial.depthPacking0=t}update(e,t,i){let n=this.camera,r=this.selection,a=this.inverted,s=t;if(this.ignoreBackground||!a||r.size>0){let i=n.layers.mask;n.layers.set(r.layer),this.depthPass.render(e),n.layers.mask=i,s=this.renderTargetMasked,this.clearPass.render(e,s),this.depthMaskPass.render(e,t,s)}super.update(e,s,i)}setSize(e,t){super.setSize(e,t),this.renderTargetMasked.setSize(e,t),this.depthPass.setSize(e,t)}initialize(e,t,i){super.initialize(e,t,i),this.clearPass.initialize(e,t,i),this.depthPass.initialize(e,t,i),this.depthMaskPass.initialize(e,t,i),null!==e&&e.capabilities.logarithmicDepthBuffer&&(this.depthMaskPass.fullscreenMaterial.defines.LOG_DEPTH="1"),void 0!==i&&(this.renderTargetMasked.texture.type=i,null!==e&&e.outputColorSpace===k.SRGBColorSpace&&(this.renderTargetMasked.texture.colorSpace=k.SRGBColorSpace))}},tS=class extends el{constructor({blendFunction:e,intensity:t=1}={}){super("SepiaEffect","uniform vec3 weightsR;uniform vec3 weightsG;uniform vec3 weightsB;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec3 color=vec3(dot(inputColor.rgb,weightsR),dot(inputColor.rgb,weightsG),dot(inputColor.rgb,weightsB));outputColor=vec4(color,inputColor.a);}",{blendFunction:e,uniforms:new Map([["weightsR",new k.Uniform(new k.Vector3(.393,.769,.189))],["weightsG",new k.Uniform(new k.Vector3(.349,.686,.168))],["weightsB",new k.Uniform(new k.Vector3(.272,.534,.131))]])})}get intensity(){return this.blendMode.opacity.value}set intensity(e){this.blendMode.opacity.value=e}getIntensity(){return this.intensity}setIntensity(e){this.intensity=e}get weightsR(){return this.uniforms.get("weightsR").value}get weightsG(){return this.uniforms.get("weightsG").value}get weightsB(){return this.uniforms.get("weightsB").value}},tA=`varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;
|
|
#if EDGE_DETECTION_MODE != 0
|
|
varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;
|
|
#endif
|
|
#if EDGE_DETECTION_MODE == 1
|
|
#include <common>
|
|
#endif
|
|
#if EDGE_DETECTION_MODE == 0 || PREDICATION_MODE == 1
|
|
#ifdef GL_FRAGMENT_PRECISION_HIGH
|
|
uniform highp sampler2D depthBuffer;
|
|
#else
|
|
uniform mediump sampler2D depthBuffer;
|
|
#endif
|
|
float readDepth(const in vec2 uv){
|
|
#if DEPTH_PACKING == 3201
|
|
return unpackRGBAToDepth(texture2D(depthBuffer,uv));
|
|
#else
|
|
return texture2D(depthBuffer,uv).r;
|
|
#endif
|
|
}vec3 gatherNeighbors(){float p=readDepth(vUv);float pLeft=readDepth(vUv0);float pTop=readDepth(vUv1);return vec3(p,pLeft,pTop);}
|
|
#elif PREDICATION_MODE == 2
|
|
uniform sampler2D predicationBuffer;vec3 gatherNeighbors(){float p=texture2D(predicationBuffer,vUv).r;float pLeft=texture2D(predicationBuffer,vUv0).r;float pTop=texture2D(predicationBuffer,vUv1).r;return vec3(p,pLeft,pTop);}
|
|
#endif
|
|
#if PREDICATION_MODE != 0
|
|
vec2 calculatePredicatedThreshold(){vec3 neighbours=gatherNeighbors();vec2 delta=abs(neighbours.xx-neighbours.yz);vec2 edges=step(PREDICATION_THRESHOLD,delta);return PREDICATION_SCALE*EDGE_THRESHOLD*(1.0-PREDICATION_STRENGTH*edges);}
|
|
#endif
|
|
#if EDGE_DETECTION_MODE != 0
|
|
uniform sampler2D inputBuffer;
|
|
#endif
|
|
void main(){
|
|
#if EDGE_DETECTION_MODE == 0
|
|
const vec2 threshold=vec2(DEPTH_THRESHOLD);
|
|
#elif PREDICATION_MODE != 0
|
|
vec2 threshold=calculatePredicatedThreshold();
|
|
#else
|
|
const vec2 threshold=vec2(EDGE_THRESHOLD);
|
|
#endif
|
|
#if EDGE_DETECTION_MODE == 0
|
|
vec3 neighbors=gatherNeighbors();vec2 delta=abs(neighbors.xx-vec2(neighbors.y,neighbors.z));vec2 edges=step(threshold,delta);if(dot(edges,vec2(1.0))==0.0){discard;}gl_FragColor=vec4(edges,0.0,1.0);
|
|
#elif EDGE_DETECTION_MODE == 1
|
|
float l=luminance(texture2D(inputBuffer,vUv).rgb);float lLeft=luminance(texture2D(inputBuffer,vUv0).rgb);float lTop=luminance(texture2D(inputBuffer,vUv1).rgb);vec4 delta;delta.xy=abs(l-vec2(lLeft,lTop));vec2 edges=step(threshold,delta.xy);if(dot(edges,vec2(1.0))==0.0){discard;}float lRight=luminance(texture2D(inputBuffer,vUv2).rgb);float lBottom=luminance(texture2D(inputBuffer,vUv3).rgb);delta.zw=abs(l-vec2(lRight,lBottom));vec2 maxDelta=max(delta.xy,delta.zw);float lLeftLeft=luminance(texture2D(inputBuffer,vUv4).rgb);float lTopTop=luminance(texture2D(inputBuffer,vUv5).rgb);delta.zw=abs(vec2(lLeft,lTop)-vec2(lLeftLeft,lTopTop));maxDelta=max(maxDelta.xy,delta.zw);float finalDelta=max(maxDelta.x,maxDelta.y);edges.xy*=step(finalDelta,LOCAL_CONTRAST_ADAPTATION_FACTOR*delta.xy);gl_FragColor=vec4(edges,0.0,1.0);
|
|
#elif EDGE_DETECTION_MODE == 2
|
|
vec4 delta;vec3 c=texture2D(inputBuffer,vUv).rgb;vec3 cLeft=texture2D(inputBuffer,vUv0).rgb;vec3 t=abs(c-cLeft);delta.x=max(max(t.r,t.g),t.b);vec3 cTop=texture2D(inputBuffer,vUv1).rgb;t=abs(c-cTop);delta.y=max(max(t.r,t.g),t.b);vec2 edges=step(threshold,delta.xy);if(dot(edges,vec2(1.0))==0.0){discard;}vec3 cRight=texture2D(inputBuffer,vUv2).rgb;t=abs(c-cRight);delta.z=max(max(t.r,t.g),t.b);vec3 cBottom=texture2D(inputBuffer,vUv3).rgb;t=abs(c-cBottom);delta.w=max(max(t.r,t.g),t.b);vec2 maxDelta=max(delta.xy,delta.zw);vec3 cLeftLeft=texture2D(inputBuffer,vUv4).rgb;t=abs(c-cLeftLeft);delta.z=max(max(t.r,t.g),t.b);vec3 cTopTop=texture2D(inputBuffer,vUv5).rgb;t=abs(c-cTopTop);delta.w=max(max(t.r,t.g),t.b);maxDelta=max(maxDelta.xy,delta.zw);float finalDelta=max(maxDelta.x,maxDelta.y);edges*=step(finalDelta,LOCAL_CONTRAST_ADAPTATION_FACTOR*delta.xy);gl_FragColor=vec4(edges,0.0,1.0);
|
|
#endif
|
|
}`,tM=`uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;
|
|
#if EDGE_DETECTION_MODE != 0
|
|
varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;
|
|
#endif
|
|
void main(){vUv=position.xy*0.5+0.5;vUv0=vUv+texelSize*vec2(-1.0,0.0);vUv1=vUv+texelSize*vec2(0.0,-1.0);
|
|
#if EDGE_DETECTION_MODE != 0
|
|
vUv2=vUv+texelSize*vec2(1.0,0.0);vUv3=vUv+texelSize*vec2(0.0,1.0);vUv4=vUv+texelSize*vec2(-2.0,0.0);vUv5=vUv+texelSize*vec2(0.0,-2.0);
|
|
#endif
|
|
gl_Position=vec4(position.xy,1.0,1.0);}`,tb=class extends k.ShaderMaterial{constructor(e=new k.Vector2,t=2){super({name:"EdgeDetectionMaterial",defines:{THREE_REVISION:k.REVISION.replace(/\D+/g,""),LOCAL_CONTRAST_ADAPTATION_FACTOR:"2.0",EDGE_THRESHOLD:"0.1",DEPTH_THRESHOLD:"0.01",PREDICATION_MODE:"0",PREDICATION_THRESHOLD:"0.01",PREDICATION_SCALE:"2.0",PREDICATION_STRENGTH:"1.0",DEPTH_PACKING:"0"},uniforms:{inputBuffer:new k.Uniform(null),depthBuffer:new k.Uniform(null),predicationBuffer:new k.Uniform(null),texelSize:new k.Uniform(e)},blending:k.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:tA,vertexShader:tM}),this.edgeDetectionMode=t}set depthBuffer(e){this.uniforms.depthBuffer.value=e}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e,t=k.BasicDepthPacking){this.depthBuffer=e,this.depthPacking=t}get edgeDetectionMode(){return Number(this.defines.EDGE_DETECTION_MODE)}set edgeDetectionMode(e){this.defines.EDGE_DETECTION_MODE=e.toFixed(0),this.needsUpdate=!0}getEdgeDetectionMode(){return this.edgeDetectionMode}setEdgeDetectionMode(e){this.edgeDetectionMode=e}get localContrastAdaptationFactor(){return Number(this.defines.LOCAL_CONTRAST_ADAPTATION_FACTOR)}set localContrastAdaptationFactor(e){this.defines.LOCAL_CONTRAST_ADAPTATION_FACTOR=e.toFixed("6"),this.needsUpdate=!0}getLocalContrastAdaptationFactor(){return this.localContrastAdaptationFactor}setLocalContrastAdaptationFactor(e){this.localContrastAdaptationFactor=e}get edgeDetectionThreshold(){return Number(this.defines.EDGE_THRESHOLD)}set edgeDetectionThreshold(e){this.defines.EDGE_THRESHOLD=e.toFixed("6"),this.defines.DEPTH_THRESHOLD=(.1*e).toFixed("6"),this.needsUpdate=!0}getEdgeDetectionThreshold(){return this.edgeDetectionThreshold}setEdgeDetectionThreshold(e){this.edgeDetectionThreshold=e}get predicationMode(){return Number(this.defines.PREDICATION_MODE)}set predicationMode(e){this.defines.PREDICATION_MODE=e.toFixed(0),this.needsUpdate=!0}getPredicationMode(){return this.predicationMode}setPredicationMode(e){this.predicationMode=e}set predicationBuffer(e){this.uniforms.predicationBuffer.value=e}setPredicationBuffer(e){this.uniforms.predicationBuffer.value=e}get predicationThreshold(){return Number(this.defines.PREDICATION_THRESHOLD)}set predicationThreshold(e){this.defines.PREDICATION_THRESHOLD=e.toFixed("6"),this.needsUpdate=!0}getPredicationThreshold(){return this.predicationThreshold}setPredicationThreshold(e){this.predicationThreshold=e}get predicationScale(){return Number(this.defines.PREDICATION_SCALE)}set predicationScale(e){this.defines.PREDICATION_SCALE=e.toFixed("6"),this.needsUpdate=!0}getPredicationScale(){return this.predicationScale}setPredicationScale(e){this.predicationScale=e}get predicationStrength(){return Number(this.defines.PREDICATION_STRENGTH)}set predicationStrength(e){this.defines.PREDICATION_STRENGTH=e.toFixed("6"),this.needsUpdate=!0}getPredicationStrength(){return this.predicationStrength}setPredicationStrength(e){this.predicationStrength=e}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}},tw=`#define sampleLevelZeroOffset(t, coord, offset) texture2D(t, coord + offset * texelSize)
|
|
#if __VERSION__ < 300
|
|
#define round(v) floor(v + 0.5)
|
|
#endif
|
|
#ifdef FRAMEBUFFER_PRECISION_HIGH
|
|
uniform mediump sampler2D inputBuffer;
|
|
#else
|
|
uniform lowp sampler2D inputBuffer;
|
|
#endif
|
|
uniform lowp sampler2D areaTexture;uniform lowp sampler2D searchTexture;uniform vec2 texelSize;uniform vec2 resolution;varying vec2 vUv;varying vec4 vOffset[3];varying vec2 vPixCoord;void movec(const in bvec2 c,inout vec2 variable,const in vec2 value){if(c.x){variable.x=value.x;}if(c.y){variable.y=value.y;}}void movec(const in bvec4 c,inout vec4 variable,const in vec4 value){movec(c.xy,variable.xy,value.xy);movec(c.zw,variable.zw,value.zw);}vec2 decodeDiagBilinearAccess(in vec2 e){e.r=e.r*abs(5.0*e.r-5.0*0.75);return round(e);}vec4 decodeDiagBilinearAccess(in vec4 e){e.rb=e.rb*abs(5.0*e.rb-5.0*0.75);return round(e);}vec2 searchDiag1(const in vec2 texCoord,const in vec2 dir,out vec2 e){vec4 coord=vec4(texCoord,-1.0,1.0);vec3 t=vec3(texelSize,1.0);for(int i=0;i<MAX_SEARCH_STEPS_INT;++i){if(!(coord.z<float(MAX_SEARCH_STEPS_DIAG_INT-1)&&coord.w>0.9)){break;}coord.xyz=t*vec3(dir,1.0)+coord.xyz;e=texture2D(inputBuffer,coord.xy).rg;coord.w=dot(e,vec2(0.5));}return coord.zw;}vec2 searchDiag2(const in vec2 texCoord,const in vec2 dir,out vec2 e){vec4 coord=vec4(texCoord,-1.0,1.0);coord.x+=0.25*texelSize.x;vec3 t=vec3(texelSize,1.0);for(int i=0;i<MAX_SEARCH_STEPS_INT;++i){if(!(coord.z<float(MAX_SEARCH_STEPS_DIAG_INT-1)&&coord.w>0.9)){break;}coord.xyz=t*vec3(dir,1.0)+coord.xyz;e=texture2D(inputBuffer,coord.xy).rg;e=decodeDiagBilinearAccess(e);coord.w=dot(e,vec2(0.5));}return coord.zw;}vec2 areaDiag(const in vec2 dist,const in vec2 e,const in float offset){vec2 texCoord=vec2(AREATEX_MAX_DISTANCE_DIAG,AREATEX_MAX_DISTANCE_DIAG)*e+dist;texCoord=AREATEX_PIXEL_SIZE*texCoord+0.5*AREATEX_PIXEL_SIZE;texCoord.x+=0.5;texCoord.y+=AREATEX_SUBTEX_SIZE*offset;return texture2D(areaTexture,texCoord).rg;}vec2 calculateDiagWeights(const in vec2 texCoord,const in vec2 e,const in vec4 subsampleIndices){vec2 weights=vec2(0.0);vec4 d;vec2 end;if(e.r>0.0){d.xz=searchDiag1(texCoord,vec2(-1.0,1.0),end);d.x+=float(end.y>0.9);}else{d.xz=vec2(0.0);}d.yw=searchDiag1(texCoord,vec2(1.0,-1.0),end);if(d.x+d.y>2.0){vec4 coords=vec4(-d.x+0.25,d.x,d.y,-d.y-0.25)*texelSize.xyxy+texCoord.xyxy;vec4 c;c.xy=sampleLevelZeroOffset(inputBuffer,coords.xy,vec2(-1,0)).rg;c.zw=sampleLevelZeroOffset(inputBuffer,coords.zw,vec2(1,0)).rg;c.yxwz=decodeDiagBilinearAccess(c.xyzw);vec2 cc=vec2(2.0)*c.xz+c.yw;movec(bvec2(step(0.9,d.zw)),cc,vec2(0.0));weights+=areaDiag(d.xy,cc,subsampleIndices.z);}d.xz=searchDiag2(texCoord,vec2(-1.0,-1.0),end);if(sampleLevelZeroOffset(inputBuffer,texCoord,vec2(1,0)).r>0.0){d.yw=searchDiag2(texCoord,vec2(1.0),end);d.y+=float(end.y>0.9);}else{d.yw=vec2(0.0);}if(d.x+d.y>2.0){vec4 coords=vec4(-d.x,-d.x,d.y,d.y)*texelSize.xyxy+texCoord.xyxy;vec4 c;c.x=sampleLevelZeroOffset(inputBuffer,coords.xy,vec2(-1,0)).g;c.y=sampleLevelZeroOffset(inputBuffer,coords.xy,vec2(0,-1)).r;c.zw=sampleLevelZeroOffset(inputBuffer,coords.zw,vec2(1,0)).gr;vec2 cc=vec2(2.0)*c.xz+c.yw;movec(bvec2(step(0.9,d.zw)),cc,vec2(0.0));weights+=areaDiag(d.xy,cc,subsampleIndices.w).gr;}return weights;}float searchLength(const in vec2 e,const in float offset){vec2 scale=SEARCHTEX_SIZE*vec2(0.5,-1.0);vec2 bias=SEARCHTEX_SIZE*vec2(offset,1.0);scale+=vec2(-1.0,1.0);bias+=vec2(0.5,-0.5);scale*=1.0/SEARCHTEX_PACKED_SIZE;bias*=1.0/SEARCHTEX_PACKED_SIZE;return texture2D(searchTexture,scale*e+bias).r;}float searchXLeft(in vec2 texCoord,const in float end){vec2 e=vec2(0.0,1.0);for(int i=0;i<MAX_SEARCH_STEPS_INT;++i){if(!(texCoord.x>end&&e.g>0.8281&&e.r==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=vec2(-2.0,0.0)*texelSize+texCoord;}float offset=-(255.0/127.0)*searchLength(e,0.0)+3.25;return texelSize.x*offset+texCoord.x;}float searchXRight(vec2 texCoord,const in float end){vec2 e=vec2(0.0,1.0);for(int i=0;i<MAX_SEARCH_STEPS_INT;++i){if(!(texCoord.x<end&&e.g>0.8281&&e.r==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=vec2(2.0,0.0)*texelSize.xy+texCoord;}float offset=-(255.0/127.0)*searchLength(e,0.5)+3.25;return-texelSize.x*offset+texCoord.x;}float searchYUp(vec2 texCoord,const in float end){vec2 e=vec2(1.0,0.0);for(int i=0;i<MAX_SEARCH_STEPS_INT;++i){if(!(texCoord.y>end&&e.r>0.8281&&e.g==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=-vec2(0.0,2.0)*texelSize.xy+texCoord;}float offset=-(255.0/127.0)*searchLength(e.gr,0.0)+3.25;return texelSize.y*offset+texCoord.y;}float searchYDown(vec2 texCoord,const in float end){vec2 e=vec2(1.0,0.0);for(int i=0;i<MAX_SEARCH_STEPS_INT;i++){if(!(texCoord.y<end&&e.r>0.8281&&e.g==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=vec2(0.0,2.0)*texelSize.xy+texCoord;}float offset=-(255.0/127.0)*searchLength(e.gr,0.5)+3.25;return-texelSize.y*offset+texCoord.y;}vec2 area(const in vec2 dist,const in float e1,const in float e2,const in float offset){vec2 texCoord=vec2(AREATEX_MAX_DISTANCE)*round(4.0*vec2(e1,e2))+dist;texCoord=AREATEX_PIXEL_SIZE*texCoord+0.5*AREATEX_PIXEL_SIZE;texCoord.y=AREATEX_SUBTEX_SIZE*offset+texCoord.y;return texture2D(areaTexture,texCoord).rg;}void detectHorizontalCornerPattern(inout vec2 weights,const in vec4 texCoord,const in vec2 d){
|
|
#if !defined(DISABLE_CORNER_DETECTION)
|
|
vec2 leftRight=step(d.xy,d.yx);vec2 rounding=(1.0-CORNER_ROUNDING_NORM)*leftRight;rounding/=leftRight.x+leftRight.y;vec2 factor=vec2(1.0);factor.x-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(0,1)).r;factor.x-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(1,1)).r;factor.y-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(0,-2)).r;factor.y-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(1,-2)).r;weights*=clamp(factor,0.0,1.0);
|
|
#endif
|
|
}void detectVerticalCornerPattern(inout vec2 weights,const in vec4 texCoord,const in vec2 d){
|
|
#if !defined(DISABLE_CORNER_DETECTION)
|
|
vec2 leftRight=step(d.xy,d.yx);vec2 rounding=(1.0-CORNER_ROUNDING_NORM)*leftRight;rounding/=leftRight.x+leftRight.y;vec2 factor=vec2(1.0);factor.x-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(1,0)).g;factor.x-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(1,1)).g;factor.y-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(-2,0)).g;factor.y-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(-2,1)).g;weights*=clamp(factor,0.0,1.0);
|
|
#endif
|
|
}void main(){vec4 weights=vec4(0.0);vec4 subsampleIndices=vec4(0.0);vec2 e=texture2D(inputBuffer,vUv).rg;if(e.g>0.0){
|
|
#if !defined(DISABLE_DIAG_DETECTION)
|
|
weights.rg=calculateDiagWeights(vUv,e,subsampleIndices);if(weights.r==-weights.g){
|
|
#endif
|
|
vec2 d;vec3 coords;coords.x=searchXLeft(vOffset[0].xy,vOffset[2].x);coords.y=vOffset[1].y;d.x=coords.x;float e1=texture2D(inputBuffer,coords.xy).r;coords.z=searchXRight(vOffset[0].zw,vOffset[2].y);d.y=coords.z;d=round(resolution.xx*d+-vPixCoord.xx);vec2 sqrtD=sqrt(abs(d));float e2=sampleLevelZeroOffset(inputBuffer,coords.zy,vec2(1,0)).r;weights.rg=area(sqrtD,e1,e2,subsampleIndices.y);coords.y=vUv.y;detectHorizontalCornerPattern(weights.rg,coords.xyzy,d);
|
|
#if !defined(DISABLE_DIAG_DETECTION)
|
|
}else{e.r=0.0;}
|
|
#endif
|
|
}if(e.r>0.0){vec2 d;vec3 coords;coords.y=searchYUp(vOffset[1].xy,vOffset[2].z);coords.x=vOffset[0].x;d.x=coords.y;float e1=texture2D(inputBuffer,coords.xy).g;coords.z=searchYDown(vOffset[1].zw,vOffset[2].w);d.y=coords.z;d=round(resolution.yy*d-vPixCoord.yy);vec2 sqrtD=sqrt(abs(d));float e2=sampleLevelZeroOffset(inputBuffer,coords.xz,vec2(0,1)).g;weights.ba=area(sqrtD,e1,e2,subsampleIndices.x);coords.x=vUv.x;detectVerticalCornerPattern(weights.ba,coords.xyxz,d);}gl_FragColor=weights;}`,tT=class extends k.ShaderMaterial{constructor(e=new k.Vector2,t=new k.Vector2){super({name:"SMAAWeightsMaterial",defines:{MAX_SEARCH_STEPS_INT:"16",MAX_SEARCH_STEPS_FLOAT:"16.0",MAX_SEARCH_STEPS_DIAG_INT:"8",MAX_SEARCH_STEPS_DIAG_FLOAT:"8.0",CORNER_ROUNDING:"25",CORNER_ROUNDING_NORM:"0.25",AREATEX_MAX_DISTANCE:"16.0",AREATEX_MAX_DISTANCE_DIAG:"20.0",AREATEX_PIXEL_SIZE:"(1.0 / vec2(160.0, 560.0))",AREATEX_SUBTEX_SIZE:"(1.0 / 7.0)",SEARCHTEX_SIZE:"vec2(66.0, 33.0)",SEARCHTEX_PACKED_SIZE:"vec2(64.0, 16.0)"},uniforms:{inputBuffer:new k.Uniform(null),searchTexture:new k.Uniform(null),areaTexture:new k.Uniform(null),resolution:new k.Uniform(t),texelSize:new k.Uniform(e)},blending:k.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:tw,vertexShader:"uniform vec2 texelSize;uniform vec2 resolution;varying vec2 vUv;varying vec4 vOffset[3];varying vec2 vPixCoord;void main(){vUv=position.xy*0.5+0.5;vPixCoord=vUv*resolution;vOffset[0]=vUv.xyxy+texelSize.xyxy*vec4(-0.25,-0.125,1.25,-0.125);vOffset[1]=vUv.xyxy+texelSize.xyxy*vec4(-0.125,-0.25,-0.125,1.25);vOffset[2]=vec4(vOffset[0].xz,vOffset[1].yw)+vec4(-2.0,2.0,-2.0,2.0)*texelSize.xxyy*MAX_SEARCH_STEPS_FLOAT;gl_Position=vec4(position.xy,1.0,1.0);}"})}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}get searchTexture(){return this.uniforms.searchTexture.value}set searchTexture(e){this.uniforms.searchTexture.value=e}get areaTexture(){return this.uniforms.areaTexture.value}set areaTexture(e){this.uniforms.areaTexture.value=e}setLookupTextures(e,t){this.searchTexture=e,this.areaTexture=t}get orthogonalSearchSteps(){return Number(this.defines.MAX_SEARCH_STEPS_INT)}set orthogonalSearchSteps(e){let t=Math.min(Math.max(e,0),112);this.defines.MAX_SEARCH_STEPS_INT=t.toFixed("0"),this.defines.MAX_SEARCH_STEPS_FLOAT=t.toFixed("1"),this.needsUpdate=!0}setOrthogonalSearchSteps(e){this.orthogonalSearchSteps=e}get diagonalSearchSteps(){return Number(this.defines.MAX_SEARCH_STEPS_DIAG_INT)}set diagonalSearchSteps(e){let t=Math.min(Math.max(e,0),20);this.defines.MAX_SEARCH_STEPS_DIAG_INT=t.toFixed("0"),this.defines.MAX_SEARCH_STEPS_DIAG_FLOAT=t.toFixed("1"),this.needsUpdate=!0}setDiagonalSearchSteps(e){this.diagonalSearchSteps=e}get diagonalDetection(){return void 0===this.defines.DISABLE_DIAG_DETECTION}set diagonalDetection(e){e?delete this.defines.DISABLE_DIAG_DETECTION:this.defines.DISABLE_DIAG_DETECTION="1",this.needsUpdate=!0}isDiagonalDetectionEnabled(){return this.diagonalDetection}setDiagonalDetectionEnabled(e){this.diagonalDetection=e}get cornerRounding(){return Number(this.defines.CORNER_ROUNDING)}set cornerRounding(e){let t=Math.min(Math.max(e,0),100);this.defines.CORNER_ROUNDING=t.toFixed("4"),this.defines.CORNER_ROUNDING_NORM=(t/100).toFixed("4"),this.needsUpdate=!0}setCornerRounding(e){this.cornerRounding=e}get cornerDetection(){return void 0===this.defines.DISABLE_CORNER_DETECTION}set cornerDetection(e){e?delete this.defines.DISABLE_CORNER_DETECTION:this.defines.DISABLE_CORNER_DETECTION="1",this.needsUpdate=!0}isCornerRoundingEnabled(){return this.cornerDetection}setCornerRoundingEnabled(e){this.cornerDetection=e}setSize(e,t){let i=this.uniforms;i.texelSize.value.set(1/e,1/t),i.resolution.value.set(e,t)}},tE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAAQCAYAAACm53kpAAAAeElEQVRYR+2XSwqAMAxEJ168ePEqwRSKhIIiuHjJqiU0gWE+1CQdApcVAMUAuARaMGCX1MIL/Ow13++9lW2s3mW9MWvsnWc/2fvGygwPAN4E8QzAA4CXAB6AHjG4JTHYI1ey3pcx6FHnEfhLDOIBKAmUBK6/ANUDTlROXAHd9EC1AAAAAElFTkSuQmCC",t_="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAIwCAYAAAABNmBHAAAgAElEQVR4Xuy9CbhlV1ktOvbpq09DkiIkUBI6kxASIH0DlAQiIK1wRfSJTx+i4JX7vKIigs8HXpXvqVcvrcC9agQ7IDTSSWgqCQQliDRBJKkkhDSkqVPNqVOnP+8b//rH3P+eZ+199tlznVTlvVrft7+1T7OaueZY42/m37QALKNk2wHg1pITlB17mC+Pp11W3X/LHyT32vhg48/5SOv+PnwpsHA70JoGlueB1iKApeqzvOzn44GatTB76Xzhd7suBR7+WWADgDEAwwCG/L54b/poDLrHuvvm70Z2Avhsc+PVcxscBU8F8C8ADg5+ipIjD/PlGwfgju8B924E5seARUfLsiNmqQW0IjL8+7L2NYD/7COBzfcCm+aB8SVgdAkYIRCXKyDax4EdAanL5PuNPllNvXDlAHwFgP8AcC2AhRIoDXbsYb48dl5WkVFTE3LGDcC9m4CZCWBuFFgeAZ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tAXUlWcDm1IOIIJAjlT/Fd05lbFQFwjdtgGcewesFt7Rc/Gx8iWjUCjGCT1YvWT1MwgUqrf3NG45tTbcu0aximWx9xENcEQHGbcYAEwtSXSqY0gnCdgeuMI0cvuGx/FUGgFhwEYrR80QckWN+X0fjm1DwAWv8RgJFilJZBznz0pQg+AZAAlVWh1GvGka0XzB0cCQi30aSGVa9AF62fLOB7MhrfnJoPwPER59Px+o3e76mL5Kwp2G57xPl0kxc3er+nLvyKtLmhfUC78RHn081ONnq/pzcAR5xPR9mRRu/31IVgvgUccT4dNaobvd/TGYAjzqejumqj93s6A3DE+XRUg2VSCjdaGr3fUw+I+VPwiPPpqJjO8J1Nw43e7ymHwHoAKMFd7QErAeEE5NNJMb3R+z3lsGcNzgfgiPPpomJ6o/d76oGwPgCOKJ8uKqY3er+nKwBHmE+noqRG7/fUA199U/AI8+kEwEbv93QHoEhZTnA+nYqSGr3fBoAtaiqBUImdm5hPJwA2er+nKwBHnE+X1gUzSbnR+z11wPj/AeCpPDD3t7rvAAAAAElFTkSuQmCC",tC=class extends el{constructor({blendFunction:e=30,preset:t=1,edgeDetectionMode:i=2,predicationMode:n=0}={}){let r,a;super("SMAAEffect","uniform sampler2D weightMap;varying vec2 vOffset0;varying vec2 vOffset1;void movec(const in bvec2 c,inout vec2 variable,const in vec2 value){if(c.x){variable.x=value.x;}if(c.y){variable.y=value.y;}}void movec(const in bvec4 c,inout vec4 variable,const in vec4 value){movec(c.xy,variable.xy,value.xy);movec(c.zw,variable.zw,value.zw);}void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec4 a;a.x=texture2D(weightMap,vOffset0).a;a.y=texture2D(weightMap,vOffset1).g;a.wz=texture2D(weightMap,uv).rb;vec4 color=inputColor;if(dot(a,vec4(1.0))>=1e-5){bool h=max(a.x,a.z)>max(a.y,a.w);vec4 blendingOffset=vec4(0.0,a.y,0.0,a.w);vec2 blendingWeight=a.yw;movec(bvec4(h),blendingOffset,vec4(a.x,0.0,a.z,0.0));movec(bvec2(h),blendingWeight,a.xz);blendingWeight/=dot(blendingWeight,vec2(1.0));vec4 blendingCoord=blendingOffset*vec4(texelSize,-texelSize)+uv.xyxy;color=blendingWeight.x*texture2D(inputBuffer,blendingCoord.xy);color+=blendingWeight.y*texture2D(inputBuffer,blendingCoord.zw);}outputColor=color;}",{vertexShader:"varying vec2 vOffset0;varying vec2 vOffset1;void mainSupport(const in vec2 uv){vOffset0=uv+texelSize*vec2(1.0,0.0);vOffset1=uv+texelSize*vec2(0.0,1.0);}",blendFunction:e,attributes:3,uniforms:new Map([["weightMap",new k.Uniform(null)]])}),arguments.length>1&&(r=arguments[0],a=arguments[1],arguments.length>2&&(t=arguments[2]),arguments.length>3&&(i=arguments[3])),this.renderTargetEdges=new k.WebGLRenderTarget(1,1,{depthBuffer:!1}),this.renderTargetEdges.texture.name="SMAA.Edges",this.renderTargetWeights=this.renderTargetEdges.clone(),this.renderTargetWeights.texture.name="SMAA.Weights",this.uniforms.get("weightMap").value=this.renderTargetWeights.texture,this.clearPass=new q(!0,!1,!1),this.clearPass.overrideClearColor=new k.Color(0),this.clearPass.overrideClearAlpha=1,this.edgeDetectionPass=new eO(new tb),this.edgeDetectionMaterial.edgeDetectionMode=i,this.edgeDetectionMaterial.predicationMode=n,this.weightsPass=new eO(new tT);const s=new k.LoadingManager;s.onLoad=()=>{let e=new k.Texture(r);e.name="SMAA.Search",e.magFilter=k.NearestFilter,e.minFilter=k.NearestFilter,e.generateMipmaps=!1,e.needsUpdate=!0,e.flipY=!0,this.weightsMaterial.searchTexture=e;let t=new k.Texture(a);t.name="SMAA.Area",t.magFilter=k.LinearFilter,t.minFilter=k.LinearFilter,t.generateMipmaps=!1,t.needsUpdate=!0,t.flipY=!1,this.weightsMaterial.areaTexture=t,this.dispatchEvent({type:"load"})},s.itemStart("search"),s.itemStart("area"),void 0!==r&&void 0!==a?(s.itemEnd("search"),s.itemEnd("area")):"u">typeof Image&&(r=new Image,a=new Image,r.addEventListener("load",()=>s.itemEnd("search")),a.addEventListener("load",()=>s.itemEnd("area")),r.src=tE,a.src=t_),this.applyPreset(t)}get edgesTexture(){return this.renderTargetEdges.texture}getEdgesTexture(){return this.edgesTexture}get weightsTexture(){return this.renderTargetWeights.texture}getWeightsTexture(){return this.weightsTexture}get edgeDetectionMaterial(){return this.edgeDetectionPass.fullscreenMaterial}get colorEdgesMaterial(){return this.edgeDetectionMaterial}getEdgeDetectionMaterial(){return this.edgeDetectionMaterial}get weightsMaterial(){return this.weightsPass.fullscreenMaterial}getWeightsMaterial(){return this.weightsMaterial}setEdgeDetectionThreshold(e){this.edgeDetectionMaterial.edgeDetectionThreshold=e}setOrthogonalSearchSteps(e){this.weightsMaterial.orthogonalSearchSteps=e}applyPreset(e){let t=this.edgeDetectionMaterial,i=this.weightsMaterial;switch(e){case 0:t.edgeDetectionThreshold=.15,i.orthogonalSearchSteps=4,i.diagonalDetection=!1,i.cornerDetection=!1;break;case 1:t.edgeDetectionThreshold=.1,i.orthogonalSearchSteps=8,i.diagonalDetection=!1,i.cornerDetection=!1;break;case 2:t.edgeDetectionThreshold=.1,i.orthogonalSearchSteps=16,i.diagonalSearchSteps=8,i.cornerRounding=25,i.diagonalDetection=!0,i.cornerDetection=!0;break;case 3:t.edgeDetectionThreshold=.05,i.orthogonalSearchSteps=32,i.diagonalSearchSteps=16,i.cornerRounding=25,i.diagonalDetection=!0,i.cornerDetection=!0}}setDepthTexture(e,t=k.BasicDepthPacking){this.edgeDetectionMaterial.depthBuffer=e,this.edgeDetectionMaterial.depthPacking=t}update(e,t,i){this.clearPass.render(e,this.renderTargetEdges),this.edgeDetectionPass.render(e,t,this.renderTargetEdges),this.weightsPass.render(e,this.renderTargetEdges,this.renderTargetWeights)}setSize(e,t){this.edgeDetectionMaterial.setSize(e,t),this.weightsMaterial.setSize(e,t),this.renderTargetEdges.setSize(e,t),this.renderTargetWeights.setSize(e,t)}dispose(){let{searchTexture:e,areaTexture:t}=this.weightsMaterial;null!==e&&null!==t&&(e.dispose(),t.dispose()),super.dispose()}static get searchImageDataURL(){return tE}static get areaImageDataURL(){return t_}};function tR(e,t,i){return Math.min(Math.max((e+t)/(t-i),0),1)}var tP=`#include <common>
|
|
#include <packing>
|
|
uniform vec2 cameraNearFar;
|
|
#define cameraNear cameraNearFar.x
|
|
#define cameraFar cameraNearFar.y
|
|
#ifdef NORMAL_DEPTH
|
|
#ifdef GL_FRAGMENT_PRECISION_HIGH
|
|
uniform highp sampler2D normalDepthBuffer;
|
|
#else
|
|
uniform mediump sampler2D normalDepthBuffer;
|
|
#endif
|
|
float readDepth(const in vec2 uv){float depth=texture2D(normalDepthBuffer,uv).a;
|
|
#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH)
|
|
float d=pow(2.0,depth*log2(cameraFar+1.0))-1.0;float a=cameraFar/(cameraFar-cameraNear);float b=cameraFar*cameraNear/(cameraNear-cameraFar);depth=a+b/d;
|
|
#endif
|
|
return depth;}
|
|
#else
|
|
uniform lowp sampler2D normalBuffer;
|
|
#if DEPTH_PACKING == 3201
|
|
uniform lowp sampler2D depthBuffer;
|
|
#elif defined(GL_FRAGMENT_PRECISION_HIGH)
|
|
uniform highp sampler2D depthBuffer;
|
|
#else
|
|
uniform mediump sampler2D depthBuffer;
|
|
#endif
|
|
float readDepth(const in vec2 uv){
|
|
#if DEPTH_PACKING == 3201
|
|
float depth=unpackRGBAToDepth(texture2D(depthBuffer,uv));
|
|
#else
|
|
float depth=texture2D(depthBuffer,uv).r;
|
|
#endif
|
|
#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH)
|
|
float d=pow(2.0,depth*log2(cameraFar+1.0))-1.0;float a=cameraFar/(cameraFar-cameraNear);float b=cameraFar*cameraNear/(cameraNear-cameraFar);depth=a+b/d;
|
|
#endif
|
|
return depth;}
|
|
#endif
|
|
uniform lowp sampler2D noiseTexture;uniform mat4 inverseProjectionMatrix;uniform mat4 projectionMatrix;uniform vec2 texelSize;uniform float intensity;uniform float minRadiusScale;uniform float fade;uniform float bias;uniform vec2 distanceCutoff;uniform vec2 proximityCutoff;varying vec2 vUv;varying vec2 vUv2;float getViewZ(const in float depth){
|
|
#ifdef PERSPECTIVE_CAMERA
|
|
return perspectiveDepthToViewZ(depth,cameraNear,cameraFar);
|
|
#else
|
|
return orthographicDepthToViewZ(depth,cameraNear,cameraFar);
|
|
#endif
|
|
}vec3 getViewPosition(const in vec2 screenPosition,const in float depth,const in float viewZ){vec4 clipPosition=vec4(vec3(screenPosition,depth)*2.0-1.0,1.0);float clipW=projectionMatrix[2][3]*viewZ+projectionMatrix[3][3];clipPosition*=clipW;return(inverseProjectionMatrix*clipPosition).xyz;}float getAmbientOcclusion(const in vec3 p,const in vec3 n,const in float depth,const in vec2 uv){float radiusScale=1.0-smoothstep(0.0,distanceCutoff.y,depth);radiusScale=radiusScale*(1.0-minRadiusScale)+minRadiusScale;float radius=RADIUS*radiusScale;float noise=texture2D(noiseTexture,vUv2).r;float baseAngle=noise*PI2;float rings=SPIRAL_TURNS*PI2;float occlusion=0.0;int taps=0;for(int i=0;i<SAMPLES_INT;++i){float alpha=(float(i)+0.5)*INV_SAMPLES_FLOAT;float angle=alpha*rings+baseAngle;vec2 rotation=vec2(cos(angle),sin(angle));vec2 coords=alpha*radius*rotation*texelSize+uv;if(coords.s<0.0||coords.s>1.0||coords.t<0.0||coords.t>1.0){continue;}float sampleDepth=readDepth(coords);float viewZ=getViewZ(sampleDepth);
|
|
#ifdef PERSPECTIVE_CAMERA
|
|
float linearSampleDepth=viewZToOrthographicDepth(viewZ,cameraNear,cameraFar);
|
|
#else
|
|
float linearSampleDepth=sampleDepth;
|
|
#endif
|
|
float proximity=abs(depth-linearSampleDepth);if(proximity<proximityCutoff.y){float falloff=1.0-smoothstep(proximityCutoff.x,proximityCutoff.y,proximity);vec3 Q=getViewPosition(coords,sampleDepth,viewZ);vec3 v=Q-p;float vv=dot(v,v);float vn=dot(v,n)-bias;float f=max(RADIUS_SQ-vv,0.0)/RADIUS_SQ;occlusion+=(f*f*f*max(vn/(fade+vv),0.0))*falloff;}++taps;}return occlusion/(4.0*max(float(taps),1.0));}void main(){
|
|
#ifdef NORMAL_DEPTH
|
|
vec4 normalDepth=texture2D(normalDepthBuffer,vUv);
|
|
#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH)
|
|
float d=pow(2.0,normalDepth.a*log2(cameraFar+1.0))-1.0;float a=cameraFar/(cameraFar-cameraNear);float b=cameraFar*cameraNear/(cameraNear-cameraFar);normalDepth.a=a+b/d;
|
|
#endif
|
|
#else
|
|
vec4 normalDepth=vec4(texture2D(normalBuffer,vUv).xyz,readDepth(vUv));
|
|
#endif
|
|
float ao=0.0;float depth=normalDepth.a;float viewZ=getViewZ(depth);
|
|
#ifdef PERSPECTIVE_CAMERA
|
|
float linearDepth=viewZToOrthographicDepth(viewZ,cameraNear,cameraFar);
|
|
#else
|
|
float linearDepth=depth;
|
|
#endif
|
|
if(linearDepth<distanceCutoff.y){vec3 viewPosition=getViewPosition(vUv,depth,viewZ);vec3 viewNormal=unpackRGBToNormal(normalDepth.rgb);ao+=getAmbientOcclusion(viewPosition,viewNormal,linearDepth,vUv);float d=smoothstep(distanceCutoff.x,distanceCutoff.y,linearDepth);ao=mix(ao,0.0,d);
|
|
#ifdef LEGACY_INTENSITY
|
|
ao=clamp(1.0-pow(1.0-ao,abs(intensity)),0.0,1.0);
|
|
#endif
|
|
}gl_FragColor.r=ao;}`,tD=class extends k.ShaderMaterial{constructor(e){super({name:"SSAOMaterial",defines:{SAMPLES_INT:"0",INV_SAMPLES_FLOAT:"0.0",SPIRAL_TURNS:"0.0",RADIUS:"1.0",RADIUS_SQ:"1.0",DISTANCE_SCALING:"1",DEPTH_PACKING:"0"},uniforms:{depthBuffer:new k.Uniform(null),normalBuffer:new k.Uniform(null),normalDepthBuffer:new k.Uniform(null),noiseTexture:new k.Uniform(null),inverseProjectionMatrix:new k.Uniform(new k.Matrix4),projectionMatrix:new k.Uniform(new k.Matrix4),texelSize:new k.Uniform(new k.Vector2),cameraNearFar:new k.Uniform(new k.Vector2),distanceCutoff:new k.Uniform(new k.Vector2),proximityCutoff:new k.Uniform(new k.Vector2),noiseScale:new k.Uniform(new k.Vector2),minRadiusScale:new k.Uniform(.33),intensity:new k.Uniform(1),fade:new k.Uniform(.01),bias:new k.Uniform(0)},blending:k.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:tP,vertexShader:"uniform vec2 noiseScale;varying vec2 vUv;varying vec2 vUv2;void main(){vUv=position.xy*0.5+0.5;vUv2=vUv*noiseScale;gl_Position=vec4(position.xy,1.0,1.0);}"}),this.copyCameraSettings(e),this.resolution=new k.Vector2,this.r=1}get near(){return this.uniforms.cameraNearFar.value.x}get far(){return this.uniforms.cameraNearFar.value.y}set normalDepthBuffer(e){this.uniforms.normalDepthBuffer.value=e,null!==e?this.defines.NORMAL_DEPTH="1":delete this.defines.NORMAL_DEPTH,this.needsUpdate=!0}setNormalDepthBuffer(e){this.normalDepthBuffer=e}set normalBuffer(e){this.uniforms.normalBuffer.value=e}setNormalBuffer(e){this.uniforms.normalBuffer.value=e}set depthBuffer(e){this.uniforms.depthBuffer.value=e}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e,t=k.BasicDepthPacking){this.depthBuffer=e,this.depthPacking=t}set noiseTexture(e){this.uniforms.noiseTexture.value=e}setNoiseTexture(e){this.uniforms.noiseTexture.value=e}get samples(){return Number(this.defines.SAMPLES_INT)}set samples(e){this.defines.SAMPLES_INT=e.toFixed(0),this.defines.INV_SAMPLES_FLOAT=(1/e).toFixed(9),this.needsUpdate=!0}getSamples(){return this.samples}setSamples(e){this.samples=e}get rings(){return Number(this.defines.SPIRAL_TURNS)}set rings(e){this.defines.SPIRAL_TURNS=e.toFixed(1),this.needsUpdate=!0}getRings(){return this.rings}setRings(e){this.rings=e}get intensity(){return this.uniforms.intensity.value}set intensity(e){this.uniforms.intensity.value=e,void 0===this.defines.LEGACY_INTENSITY&&(this.defines.LEGACY_INTENSITY="1",this.needsUpdate=!0)}getIntensity(){return this.uniforms.intensity.value}setIntensity(e){this.uniforms.intensity.value=e}get fade(){return this.uniforms.fade.value}set fade(e){this.uniforms.fade.value=e}getFade(){return this.uniforms.fade.value}setFade(e){this.uniforms.fade.value=e}get bias(){return this.uniforms.bias.value}set bias(e){this.uniforms.bias.value=e}getBias(){return this.uniforms.bias.value}setBias(e){this.uniforms.bias.value=e}get minRadiusScale(){return this.uniforms.minRadiusScale.value}set minRadiusScale(e){this.uniforms.minRadiusScale.value=e}getMinRadiusScale(){return this.uniforms.minRadiusScale.value}setMinRadiusScale(e){this.uniforms.minRadiusScale.value=e}updateRadius(){let e=this.r*this.resolution.height;this.defines.RADIUS=e.toFixed(11),this.defines.RADIUS_SQ=(e*e).toFixed(11),this.needsUpdate=!0}get radius(){return this.r}set radius(e){this.r=Math.min(Math.max(e,1e-6),1),this.updateRadius()}getRadius(){return this.radius}setRadius(e){this.radius=e}get distanceScaling(){return!0}set distanceScaling(e){}isDistanceScalingEnabled(){return this.distanceScaling}setDistanceScalingEnabled(e){this.distanceScaling=e}get distanceThreshold(){return this.uniforms.distanceCutoff.value.x}set distanceThreshold(e){this.uniforms.distanceCutoff.value.set(Math.min(Math.max(e,0),1),Math.min(Math.max(e+this.distanceFalloff,0),1))}get worldDistanceThreshold(){var e,t;return-(e=this.distanceThreshold,e*((t=this.near)-this.far)-t)}set worldDistanceThreshold(e){this.distanceThreshold=tR(-e,this.near,this.far)}get distanceFalloff(){return this.uniforms.distanceCutoff.value.y-this.distanceThreshold}set distanceFalloff(e){this.uniforms.distanceCutoff.value.y=Math.min(Math.max(this.distanceThreshold+e,0),1)}get worldDistanceFalloff(){var e,t;return-(e=this.distanceFalloff,e*((t=this.near)-this.far)-t)}set worldDistanceFalloff(e){this.distanceFalloff=tR(-e,this.near,this.far)}setDistanceCutoff(e,t){this.uniforms.distanceCutoff.value.set(Math.min(Math.max(e,0),1),Math.min(Math.max(e+t,0),1))}get proximityThreshold(){return this.uniforms.proximityCutoff.value.x}set proximityThreshold(e){this.uniforms.proximityCutoff.value.set(Math.min(Math.max(e,0),1),Math.min(Math.max(e+this.proximityFalloff,0),1))}get worldProximityThreshold(){var e,t;return-(e=this.proximityThreshold,e*((t=this.near)-this.far)-t)}set worldProximityThreshold(e){this.proximityThreshold=tR(-e,this.near,this.far)}get proximityFalloff(){return this.uniforms.proximityCutoff.value.y-this.proximityThreshold}set proximityFalloff(e){this.uniforms.proximityCutoff.value.y=Math.min(Math.max(this.proximityThreshold+e,0),1)}get worldProximityFalloff(){var e,t;return-(e=this.proximityFalloff,e*((t=this.near)-this.far)-t)}set worldProximityFalloff(e){this.proximityFalloff=tR(-e,this.near,this.far)}setProximityCutoff(e,t){this.uniforms.proximityCutoff.value.set(Math.min(Math.max(e,0),1),Math.min(Math.max(e+t,0),1))}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t)}adoptCameraSettings(e){this.copyCameraSettings(e)}copyCameraSettings(e){e&&(this.uniforms.cameraNearFar.value.set(e.near,e.far),this.uniforms.projectionMatrix.value.copy(e.projectionMatrix),this.uniforms.inverseProjectionMatrix.value.copy(e.projectionMatrix).invert(),e instanceof k.PerspectiveCamera?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}setSize(e,t){let i=this.uniforms,n=i.noiseTexture.value;null!==n&&i.noiseScale.value.set(e/n.image.width,t/n.image.height),i.texelSize.value.set(1/e,1/t),this.resolution.set(e,t),this.updateRadius()}},tI=`#include <packing>
|
|
#ifdef GL_FRAGMENT_PRECISION_HIGH
|
|
uniform highp sampler2D depthBuffer;
|
|
#else
|
|
uniform mediump sampler2D depthBuffer;
|
|
#endif
|
|
#ifdef DOWNSAMPLE_NORMALS
|
|
uniform lowp sampler2D normalBuffer;
|
|
#endif
|
|
varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;float readDepth(const in vec2 uv){
|
|
#if DEPTH_PACKING == 3201
|
|
return unpackRGBAToDepth(texture2D(depthBuffer,uv));
|
|
#else
|
|
return texture2D(depthBuffer,uv).r;
|
|
#endif
|
|
}int findBestDepth(const in float samples[4]){float c=(samples[0]+samples[1]+samples[2]+samples[3])*0.25;float distances[4];distances[0]=abs(c-samples[0]);distances[1]=abs(c-samples[1]);distances[2]=abs(c-samples[2]);distances[3]=abs(c-samples[3]);float maxDistance=max(max(distances[0],distances[1]),max(distances[2],distances[3]));int remaining[3];int rejected[3];int i,j,k;for(i=0,j=0,k=0;i<4;++i){if(distances[i]<maxDistance){remaining[j++]=i;}else{rejected[k++]=i;}}for(;j<3;++j){remaining[j]=rejected[--k];}vec3 s=vec3(samples[remaining[0]],samples[remaining[1]],samples[remaining[2]]);c=(s.x+s.y+s.z)/3.0;distances[0]=abs(c-s.x);distances[1]=abs(c-s.y);distances[2]=abs(c-s.z);float minDistance=min(distances[0],min(distances[1],distances[2]));for(i=0;i<3;++i){if(distances[i]==minDistance){break;}}return remaining[i];}void main(){float d[4];d[0]=readDepth(vUv0);d[1]=readDepth(vUv1);d[2]=readDepth(vUv2);d[3]=readDepth(vUv3);int index=findBestDepth(d);
|
|
#ifdef DOWNSAMPLE_NORMALS
|
|
vec3 n[4];n[0]=texture2D(normalBuffer,vUv0).rgb;n[1]=texture2D(normalBuffer,vUv1).rgb;n[2]=texture2D(normalBuffer,vUv2).rgb;n[3]=texture2D(normalBuffer,vUv3).rgb;
|
|
#else
|
|
vec3 n[4];n[0]=vec3(0.0);n[1]=vec3(0.0);n[2]=vec3(0.0);n[3]=vec3(0.0);
|
|
#endif
|
|
gl_FragColor=vec4(n[index],d[index]);}`,tL=class extends k.ShaderMaterial{constructor(){super({name:"DepthDownsamplingMaterial",defines:{DEPTH_PACKING:"0"},uniforms:{depthBuffer:new k.Uniform(null),normalBuffer:new k.Uniform(null),texelSize:new k.Uniform(new k.Vector2)},blending:k.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:tI,vertexShader:"uniform vec2 texelSize;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vUv0=uv;vUv1=vec2(uv.x,uv.y+texelSize.y);vUv2=vec2(uv.x+texelSize.x,uv.y);vUv3=uv+texelSize;gl_Position=vec4(position.xy,1.0,1.0);}"})}set depthBuffer(e){this.uniforms.depthBuffer.value=e}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e,t=k.BasicDepthPacking){this.depthBuffer=e,this.depthPacking=t}set normalBuffer(e){this.uniforms.normalBuffer.value=e,null!==e?this.defines.DOWNSAMPLE_NORMALS="1":delete this.defines.DOWNSAMPLE_NORMALS,this.needsUpdate=!0}setNormalBuffer(e){this.normalBuffer=e}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t)}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}},tB=class extends G{constructor({normalBuffer:e=null,resolutionScale:t=.5,width:i=en.AUTO_SIZE,height:n=en.AUTO_SIZE,resolutionX:r=i,resolutionY:a=n}={}){super("DepthDownsamplingPass");const s=new tL;s.normalBuffer=e,this.fullscreenMaterial=s,this.needsDepthTexture=!0,this.needsSwap=!1,this.renderTarget=new k.WebGLRenderTarget(1,1,{minFilter:k.NearestFilter,magFilter:k.NearestFilter,depthBuffer:!1,type:k.FloatType}),this.renderTarget.texture.name="DepthDownsamplingPass.Target",this.renderTarget.texture.generateMipmaps=!1;const o=this.resolution=new en(this,r,a,t);o.addEventListener("change",e=>this.setSize(o.baseWidth,o.baseHeight))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}setDepthTexture(e,t=k.BasicDepthPacking){this.fullscreenMaterial.depthBuffer=e,this.fullscreenMaterial.depthPacking=t}render(e,t,i,n,r){e.setRenderTarget(this.renderToScreen?null:this.renderTarget),e.render(this.scene,this.camera)}setSize(e,t){let i=this.resolution;i.setBaseSize(e,t),this.renderTarget.setSize(i.width,i.height),this.fullscreenMaterial.setSize(e,t)}initialize(e,t,i){let n=e.getContext();if(!(n.getExtension("EXT_color_buffer_float")||n.getExtension("EXT_color_buffer_half_float")))throw Error("Rendering to float texture is not supported.")}},tU=`uniform lowp sampler2D aoBuffer;uniform float luminanceInfluence;uniform float intensity;
|
|
#if defined(DEPTH_AWARE_UPSAMPLING) && defined(NORMAL_DEPTH)
|
|
#ifdef GL_FRAGMENT_PRECISION_HIGH
|
|
uniform highp sampler2D normalDepthBuffer;
|
|
#else
|
|
uniform mediump sampler2D normalDepthBuffer;
|
|
#endif
|
|
#endif
|
|
#ifdef COLORIZE
|
|
uniform vec3 color;
|
|
#endif
|
|
void mainImage(const in vec4 inputColor,const in vec2 uv,const in float depth,out vec4 outputColor){float aoLinear=texture2D(aoBuffer,uv).r;
|
|
#if defined(DEPTH_AWARE_UPSAMPLING) && defined(NORMAL_DEPTH) && __VERSION__ == 300
|
|
vec4 normalDepth[4];normalDepth[0]=textureOffset(normalDepthBuffer,uv,ivec2(0,0));normalDepth[1]=textureOffset(normalDepthBuffer,uv,ivec2(0,1));normalDepth[2]=textureOffset(normalDepthBuffer,uv,ivec2(1,0));normalDepth[3]=textureOffset(normalDepthBuffer,uv,ivec2(1,1));float dot01=dot(normalDepth[0].rgb,normalDepth[1].rgb);float dot02=dot(normalDepth[0].rgb,normalDepth[2].rgb);float dot03=dot(normalDepth[0].rgb,normalDepth[3].rgb);float minDot=min(dot01,min(dot02,dot03));float s=step(THRESHOLD,minDot);float smallestDistance=1.0;int index;for(int i=0;i<4;++i){float distance=abs(depth-normalDepth[i].a);if(distance<smallestDistance){smallestDistance=distance;index=i;}}ivec2 offsets[4];offsets[0]=ivec2(0,0);offsets[1]=ivec2(0,1);offsets[2]=ivec2(1,0);offsets[3]=ivec2(1,1);ivec2 coord=ivec2(uv*vec2(textureSize(aoBuffer,0)))+offsets[index];float aoNearest=texelFetch(aoBuffer,coord,0).r;float ao=mix(aoNearest,aoLinear,s);
|
|
#else
|
|
float ao=aoLinear;
|
|
#endif
|
|
float l=luminance(inputColor.rgb);ao=mix(ao,0.0,l*luminanceInfluence);ao=clamp(ao*intensity,0.0,1.0);
|
|
#ifdef COLORIZE
|
|
outputColor=vec4(1.0-ao*(1.0-color),inputColor.a);
|
|
#else
|
|
outputColor=vec4(vec3(1.0-ao),inputColor.a);
|
|
#endif
|
|
}`,tN=class extends el{constructor(e,t,{blendFunction:i=21,samples:n=9,rings:r=7,normalDepthBuffer:a=null,depthAwareUpsampling:s=!0,worldDistanceThreshold:o,worldDistanceFalloff:l,worldProximityThreshold:u,worldProximityFalloff:c,distanceThreshold:h=.97,distanceFalloff:d=.03,rangeThreshold:f=5e-4,rangeFalloff:p=.001,minRadiusScale:m=.1,luminanceInfluence:g=.7,radius:v=.1825,intensity:x=1,bias:y=.025,fade:S=.01,color:A=null,resolutionScale:M=1,width:b=en.AUTO_SIZE,height:w=en.AUTO_SIZE,resolutionX:T=b,resolutionY:E=w}={}){super("SSAOEffect",tU,{blendFunction:i,attributes:1,defines:new Map([["THRESHOLD","0.997"]]),uniforms:new Map([["aoBuffer",new k.Uniform(null)],["normalDepthBuffer",new k.Uniform(a)],["luminanceInfluence",new k.Uniform(g)],["color",new k.Uniform(null)],["intensity",new k.Uniform(x)],["scale",new k.Uniform(0)]])}),this.renderTarget=new k.WebGLRenderTarget(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="AO.Target",this.uniforms.get("aoBuffer").value=this.renderTarget.texture;const _=this.resolution=new en(this,T,E,M);_.addEventListener("change",e=>this.setSize(_.baseWidth,_.baseHeight)),this.camera=e,this.depthDownsamplingPass=new tB({normalBuffer:t,resolutionScale:M}),this.depthDownsamplingPass.enabled=null===a,this.ssaoPass=new eO(new tD(e));const C=new eX(64,64,k.RGBAFormat);C.wrapS=C.wrapT=k.RepeatWrapping;const R=this.ssaoMaterial;R.normalBuffer=t,R.noiseTexture=C,R.minRadiusScale=m,R.samples=n,R.radius=v,R.rings=r,R.fade=S,R.bias=y,R.distanceThreshold=h,R.distanceFalloff=d,R.proximityThreshold=f,R.proximityFalloff=p,void 0!==o&&(R.worldDistanceThreshold=o),void 0!==l&&(R.worldDistanceFalloff=l),void 0!==u&&(R.worldProximityThreshold=u),void 0!==c&&(R.worldProximityFalloff=c),null!==a&&(this.ssaoMaterial.normalDepthBuffer=a,this.defines.set("NORMAL_DEPTH","1")),this.depthAwareUpsampling=s,this.color=A}set mainCamera(e){this.camera=e,this.ssaoMaterial.copyCameraSettings(e)}get normalBuffer(){return this.ssaoMaterial.normalBuffer}set normalBuffer(e){this.ssaoMaterial.normalBuffer=e,this.depthDownsamplingPass.fullscreenMaterial.normalBuffer=e}getResolution(){return this.resolution}get ssaoMaterial(){return this.ssaoPass.fullscreenMaterial}getSSAOMaterial(){return this.ssaoMaterial}get samples(){return this.ssaoMaterial.samples}set samples(e){this.ssaoMaterial.samples=e}get rings(){return this.ssaoMaterial.rings}set rings(e){this.ssaoMaterial.rings=e}get radius(){return this.ssaoMaterial.radius}set radius(e){this.ssaoMaterial.radius=e}get depthAwareUpsampling(){return this.defines.has("DEPTH_AWARE_UPSAMPLING")}set depthAwareUpsampling(e){this.depthAwareUpsampling!==e&&(e?this.defines.set("DEPTH_AWARE_UPSAMPLING","1"):this.defines.delete("DEPTH_AWARE_UPSAMPLING"),this.setChanged())}isDepthAwareUpsamplingEnabled(){return this.depthAwareUpsampling}setDepthAwareUpsamplingEnabled(e){this.depthAwareUpsampling=e}get distanceScaling(){return!0}set distanceScaling(e){}get color(){return this.uniforms.get("color").value}set color(e){let t=this.uniforms,i=this.defines;null!==e?i.has("COLORIZE")?t.get("color").value.set(e):(i.set("COLORIZE","1"),t.get("color").value=new k.Color(e),this.setChanged()):i.has("COLORIZE")&&(i.delete("COLORIZE"),t.get("color").value=null,this.setChanged())}get luminanceInfluence(){return this.uniforms.get("luminanceInfluence").value}set luminanceInfluence(e){this.uniforms.get("luminanceInfluence").value=e}get intensity(){return this.uniforms.get("intensity").value}set intensity(e){this.uniforms.get("intensity").value=e}getColor(){return this.color}setColor(e){this.color=e}setDistanceCutoff(e,t){this.ssaoMaterial.distanceThreshold=e,this.ssaoMaterial.distanceFalloff=t}setProximityCutoff(e,t){this.ssaoMaterial.proximityThreshold=e,this.ssaoMaterial.proximityFalloff=t}setDepthTexture(e,t=k.BasicDepthPacking){this.depthDownsamplingPass.setDepthTexture(e,t),this.ssaoMaterial.depthBuffer=e,this.ssaoMaterial.depthPacking=t}update(e,t,i){let n=this.renderTarget;this.depthDownsamplingPass.enabled&&this.depthDownsamplingPass.render(e),this.ssaoPass.render(e,null,n)}setSize(e,t){let i=this.resolution;i.setBaseSize(e,t);let n=i.width,r=i.height;this.ssaoMaterial.copyCameraSettings(this.camera),this.ssaoMaterial.setSize(n,r),this.renderTarget.setSize(n,r),this.depthDownsamplingPass.resolution.scale=i.scale,this.depthDownsamplingPass.setSize(e,t)}initialize(e,t,i){try{let n=this.uniforms.get("normalDepthBuffer").value;null===n&&(this.depthDownsamplingPass.initialize(e,t,i),n=this.depthDownsamplingPass.texture,this.uniforms.get("normalDepthBuffer").value=n,this.ssaoMaterial.normalDepthBuffer=n,this.defines.set("NORMAL_DEPTH","1"))}catch(e){this.depthDownsamplingPass.enabled=!1}}},tF=`#ifdef TEXTURE_PRECISION_HIGH
|
|
uniform mediump sampler2D map;
|
|
#else
|
|
uniform lowp sampler2D map;
|
|
#endif
|
|
varying vec2 vUv2;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){
|
|
#ifdef UV_TRANSFORM
|
|
vec4 texel=texture2D(map,vUv2);
|
|
#else
|
|
vec4 texel=texture2D(map,uv);
|
|
#endif
|
|
outputColor=TEXEL;outputColor.a=max(inputColor.a,outputColor.a);}`,tO=`#ifdef ASPECT_CORRECTION
|
|
uniform float scale;
|
|
#else
|
|
uniform mat3 uvTransform;
|
|
#endif
|
|
varying vec2 vUv2;void mainSupport(const in vec2 uv){
|
|
#ifdef ASPECT_CORRECTION
|
|
vUv2=uv*vec2(aspect,1.0)*scale;
|
|
#else
|
|
vUv2=(uvTransform*vec3(uv,1.0)).xy;
|
|
#endif
|
|
}`,tz=class extends el{constructor({blendFunction:e,texture:t=null,aspectCorrection:i=!1}={}){super("TextureEffect",tF,{blendFunction:e,defines:new Map([["TEXEL","texel"]]),uniforms:new Map([["map",new k.Uniform(null)],["scale",new k.Uniform(1)],["uvTransform",new k.Uniform(null)]])}),this.texture=t,this.aspectCorrection=i}get texture(){return this.uniforms.get("map").value}set texture(e){let t=this.texture,i=this.uniforms,n=this.defines;t!==e&&(i.get("map").value=e,i.get("uvTransform").value=e.matrix,n.delete("TEXTURE_PRECISION_HIGH"),null!==e&&(e.matrixAutoUpdate?(n.set("UV_TRANSFORM","1"),this.setVertexShader(tO)):(n.delete("UV_TRANSFORM"),this.setVertexShader(null)),e.type!==k.UnsignedByteType&&n.set("TEXTURE_PRECISION_HIGH","1"),(null===t||t.type!==e.type||t.encoding!==e.encoding)&&this.setChanged()))}getTexture(){return this.texture}setTexture(e){this.texture=e}get aspectCorrection(){return this.defines.has("ASPECT_CORRECTION")}set aspectCorrection(e){this.aspectCorrection!==e&&(e?this.defines.set("ASPECT_CORRECTION","1"):this.defines.delete("ASPECT_CORRECTION"),this.setChanged())}get uvTransform(){let e=this.texture;return null!==e&&e.matrixAutoUpdate}set uvTransform(e){let t=this.texture;null!==t&&(t.matrixAutoUpdate=e)}setTextureSwizzleRGBA(e,t=e,i=e,n=e){let r="rgba",a="";(0!==e||1!==t||2!==i||3!==n)&&(a="."+r[e]+r[t]+r[i]+r[n]),this.defines.set("TEXEL","texel"+a),this.setChanged()}update(e,t,i){this.texture.matrixAutoUpdate&&this.texture.updateMatrix()}},tk=`#ifdef FRAMEBUFFER_PRECISION_HIGH
|
|
uniform mediump sampler2D inputBuffer;
|
|
#else
|
|
uniform lowp sampler2D inputBuffer;
|
|
#endif
|
|
uniform vec4 maskParams;varying vec2 vUv;varying vec2 vUv2;varying vec2 vOffset;float linearGradientMask(const in float x){return smoothstep(maskParams.x,maskParams.y,x)-smoothstep(maskParams.w,maskParams.z,x);}void main(){vec2 dUv=vOffset*(1.0-linearGradientMask(vUv2.y));vec4 sum=texture2D(inputBuffer,vec2(vUv.x-dUv.x,vUv.y+dUv.y));sum+=texture2D(inputBuffer,vec2(vUv.x+dUv.x,vUv.y+dUv.y));sum+=texture2D(inputBuffer,vec2(vUv.x+dUv.x,vUv.y-dUv.y));sum+=texture2D(inputBuffer,vec2(vUv.x-dUv.x,vUv.y-dUv.y));gl_FragColor=sum*0.25;
|
|
#include <colorspace_fragment>
|
|
}`,tH=class extends ed{constructor({kernelSize:e=eu.MEDIUM,offset:t=0,rotation:i=0,focusArea:n=.4,feather:r=.3}={}){super(),this.fragmentShader=tk,this.vertexShader="uniform vec4 texelSize;uniform float kernel;uniform float scale;uniform float aspect;uniform vec2 rotation;varying vec2 vUv;varying vec2 vUv2;varying vec2 vOffset;void main(){vec2 uv=position.xy*0.5+0.5;vUv=uv;vUv2=(uv-0.5)*2.0*vec2(aspect,1.0);vUv2=vec2(dot(rotation,vUv2),dot(rotation,vec2(vUv2.y,-vUv2.x)));vOffset=(texelSize.xy*vec2(kernel)+texelSize.zw)*scale;gl_Position=vec4(position.xy,1.0,1.0);}",this.kernelSize=e,this.uniforms.aspect=new k.Uniform(1),this.uniforms.rotation=new k.Uniform(new k.Vector2),this.uniforms.maskParams=new k.Uniform(new k.Vector4),this._offset=t,this._focusArea=n,this._feather=r,this.rotation=i,this.updateParams()}updateParams(){let e=this.uniforms.maskParams.value,t=Math.max(this.focusArea,0),i=Math.max(t-this.feather,0);e.set(this.offset-t,this.offset-i,this.offset+t,this.offset+i)}get rotation(){return Math.acos(this.uniforms.rotation.value.x)}set rotation(e){this.uniforms.rotation.value.set(Math.cos(e),Math.sin(e))}get offset(){return this._offset}set offset(e){this._offset=e,this.updateParams()}get focusArea(){return this._focusArea}set focusArea(e){this._focusArea=e,this.updateParams()}get feather(){return this._feather}set feather(e){this._feather=e,this.updateParams()}setSize(e,t){super.setSize(e,t),this.uniforms.aspect.value=e/t}},tG=class extends ef{constructor({offset:e=0,rotation:t=0,focusArea:i=.4,feather:n=.3,kernelSize:r=eu.MEDIUM,resolutionScale:a=.5,resolutionX:s=en.AUTO_SIZE,resolutionY:o=en.AUTO_SIZE}={}){super({kernelSize:r,resolutionScale:a,resolutionX:s,resolutionY:o}),this.blurMaterial=new tH({kernelSize:r,offset:e,rotation:t,focusArea:i,feather:n})}},tV=`#ifdef FRAMEBUFFER_PRECISION_HIGH
|
|
uniform mediump sampler2D map;
|
|
#else
|
|
uniform lowp sampler2D map;
|
|
#endif
|
|
uniform vec2 maskParams;varying vec2 vUv2;float linearGradientMask(const in float x){return step(maskParams.x,x)-step(maskParams.y,x);}void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){float mask=linearGradientMask(vUv2.y);vec4 texel=texture2D(map,uv);outputColor=mix(texel,inputColor,mask);}`,tW=class extends el{constructor({blendFunction:e,offset:t=0,rotation:i=0,focusArea:n=.4,feather:r=.3,kernelSize:a=eu.MEDIUM,resolutionScale:s=.5,resolutionX:o=en.AUTO_SIZE,resolutionY:l=en.AUTO_SIZE}={}){super("TiltShiftEffect",tV,{vertexShader:"uniform vec2 rotation;varying vec2 vUv2;void mainSupport(const in vec2 uv){vUv2=(uv-0.5)*2.0*vec2(aspect,1.0);vUv2=vec2(dot(rotation,vUv2),dot(rotation,vec2(vUv2.y,-vUv2.x)));}",blendFunction:e,uniforms:new Map([["rotation",new k.Uniform(new k.Vector2)],["maskParams",new k.Uniform(new k.Vector2)],["map",new k.Uniform(null)]])}),this._offset=t,this._focusArea=n,this._feather=r,this.renderTarget=new k.WebGLRenderTarget(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="TiltShift.Target",this.uniforms.get("map").value=this.renderTarget.texture,this.blurPass=new tG({kernelSize:a,resolutionScale:s,resolutionX:o,resolutionY:l,offset:t,rotation:i,focusArea:n,feather:r});const u=this.resolution=new en(this,o,l,s);u.addEventListener("change",e=>this.setSize(u.baseWidth,u.baseHeight)),this.rotation=i,this.updateParams()}updateParams(){let e=this.uniforms.get("maskParams").value,t=Math.max(this.focusArea-this.feather,0);e.set(this.offset-t,this.offset+t)}get rotation(){return Math.acos(this.uniforms.get("rotation").value.x)}set rotation(e){this.uniforms.get("rotation").value.set(Math.cos(e),Math.sin(e)),this.blurPass.blurMaterial.rotation=e}get offset(){return this._offset}set offset(e){this._offset=e,this.blurPass.blurMaterial.offset=e,this.updateParams()}get focusArea(){return this._focusArea}set focusArea(e){this._focusArea=e,this.blurPass.blurMaterial.focusArea=e,this.updateParams()}get feather(){return this._feather}set feather(e){this._feather=e,this.blurPass.blurMaterial.feather=e,this.updateParams()}get bias(){return 0}set bias(e){}update(e,t,i){this.blurPass.render(e,t,this.renderTarget)}setSize(e,t){let i=this.resolution;i.setBaseSize(e,t),this.renderTarget.setSize(i.width,i.height),this.blurPass.resolution.copy(i)}initialize(e,t,i){this.blurPass.initialize(e,t,i),void 0!==i&&(this.renderTarget.texture.type=i,null!==e&&e.outputColorSpace===k.SRGBColorSpace&&(this.renderTarget.texture.colorSpace=k.SRGBColorSpace))}},tj=`#include <packing>
|
|
#define packFloatToRGBA(v) packDepthToRGBA(v)
|
|
#define unpackRGBAToFloat(v) unpackRGBAToDepth(v)
|
|
uniform lowp sampler2D luminanceBuffer0;uniform lowp sampler2D luminanceBuffer1;uniform float minLuminance;uniform float deltaTime;uniform float tau;varying vec2 vUv;void main(){float l0=unpackRGBAToFloat(texture2D(luminanceBuffer0,vUv));
|
|
#if __VERSION__ < 300
|
|
float l1=texture2DLodEXT(luminanceBuffer1,vUv,MIP_LEVEL_1X1).r;
|
|
#else
|
|
float l1=textureLod(luminanceBuffer1,vUv,MIP_LEVEL_1X1).r;
|
|
#endif
|
|
l0=max(minLuminance,l0);l1=max(minLuminance,l1);float adaptedLum=l0+(l1-l0)*(1.0-exp(-deltaTime*tau));gl_FragColor=(adaptedLum==1.0)?vec4(1.0):packFloatToRGBA(adaptedLum);}`,tX=class extends k.ShaderMaterial{constructor(){super({name:"AdaptiveLuminanceMaterial",defines:{MIP_LEVEL_1X1:"0.0"},uniforms:{luminanceBuffer0:new k.Uniform(null),luminanceBuffer1:new k.Uniform(null),minLuminance:new k.Uniform(.01),deltaTime:new k.Uniform(0),tau:new k.Uniform(1)},extensions:{shaderTextureLOD:!0},blending:k.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:tj,vertexShader:j})}set luminanceBuffer0(e){this.uniforms.luminanceBuffer0.value=e}setLuminanceBuffer0(e){this.uniforms.luminanceBuffer0.value=e}set luminanceBuffer1(e){this.uniforms.luminanceBuffer1.value=e}setLuminanceBuffer1(e){this.uniforms.luminanceBuffer1.value=e}set mipLevel1x1(e){this.defines.MIP_LEVEL_1X1=e.toFixed(1),this.needsUpdate=!0}setMipLevel1x1(e){this.mipLevel1x1=e}set deltaTime(e){this.uniforms.deltaTime.value=e}setDeltaTime(e){this.uniforms.deltaTime.value=e}get minLuminance(){return this.uniforms.minLuminance.value}set minLuminance(e){this.uniforms.minLuminance.value=e}getMinLuminance(){return this.uniforms.minLuminance.value}setMinLuminance(e){this.uniforms.minLuminance.value=e}get adaptationRate(){return this.uniforms.tau.value}set adaptationRate(e){this.uniforms.tau.value=e}getAdaptationRate(){return this.uniforms.tau.value}setAdaptationRate(e){this.uniforms.tau.value=e}},tY=class extends G{constructor(e,{minLuminance:t=.01,adaptationRate:i=1}={}){super("AdaptiveLuminancePass"),this.fullscreenMaterial=new tX,this.needsSwap=!1,this.renderTargetPrevious=new k.WebGLRenderTarget(1,1,{minFilter:k.NearestFilter,magFilter:k.NearestFilter,depthBuffer:!1}),this.renderTargetPrevious.texture.name="Luminance.Previous";const n=this.fullscreenMaterial;n.luminanceBuffer0=this.renderTargetPrevious.texture,n.luminanceBuffer1=e,n.minLuminance=t,n.adaptationRate=i,this.renderTargetAdapted=this.renderTargetPrevious.clone(),this.renderTargetAdapted.texture.name="Luminance.Adapted",this.copyPass=new Y(this.renderTargetPrevious,!1)}get texture(){return this.renderTargetAdapted.texture}getTexture(){return this.renderTargetAdapted.texture}set mipLevel1x1(e){this.fullscreenMaterial.mipLevel1x1=e}get adaptationRate(){return this.fullscreenMaterial.adaptationRate}set adaptationRate(e){this.fullscreenMaterial.adaptationRate=e}render(e,t,i,n,r){this.fullscreenMaterial.deltaTime=n,e.setRenderTarget(this.renderToScreen?null:this.renderTargetAdapted),e.render(this.scene,this.camera),this.copyPass.render(e,this.renderTargetAdapted)}},tQ=`#include <tonemapping_pars_fragment>
|
|
uniform float whitePoint;
|
|
#if TONE_MAPPING_MODE == 2 || TONE_MAPPING_MODE == 3
|
|
uniform float middleGrey;
|
|
#if TONE_MAPPING_MODE == 3
|
|
uniform lowp sampler2D luminanceBuffer;
|
|
#else
|
|
uniform float averageLuminance;
|
|
#endif
|
|
vec3 Reinhard2ToneMapping(vec3 color){color*=toneMappingExposure;float l=luminance(color);
|
|
#if TONE_MAPPING_MODE == 3
|
|
float lumAvg=unpackRGBAToFloat(texture2D(luminanceBuffer,vec2(0.5)));
|
|
#else
|
|
float lumAvg=averageLuminance;
|
|
#endif
|
|
float lumScaled=(l*middleGrey)/max(lumAvg,1e-6);float lumCompressed=lumScaled*(1.0+lumScaled/(whitePoint*whitePoint));lumCompressed/=(1.0+lumScaled);return clamp(lumCompressed*color,0.0,1.0);}
|
|
#elif TONE_MAPPING_MODE == 4
|
|
#define A 0.15
|
|
#define B 0.50
|
|
#define C 0.10
|
|
#define D 0.20
|
|
#define E 0.02
|
|
#define F 0.30
|
|
vec3 Uncharted2Helper(const in vec3 x){return((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F;}vec3 Uncharted2ToneMapping(vec3 color){color*=toneMappingExposure;return clamp(Uncharted2Helper(color)/Uncharted2Helper(vec3(whitePoint)),0.0,1.0);}
|
|
#endif
|
|
void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){
|
|
#if TONE_MAPPING_MODE == 2 || TONE_MAPPING_MODE == 3
|
|
outputColor=vec4(Reinhard2ToneMapping(inputColor.rgb),inputColor.a);
|
|
#elif TONE_MAPPING_MODE == 4
|
|
outputColor=vec4(Uncharted2ToneMapping(inputColor.rgb),inputColor.a);
|
|
#else
|
|
outputColor=vec4(toneMapping(inputColor.rgb),inputColor.a);
|
|
#endif
|
|
}`,tq=class extends el{constructor({blendFunction:e=30,adaptive:t=!1,mode:i=t?3:7,resolution:n=256,maxLuminance:r=4,whitePoint:a=r,middleGrey:s=.6,minLuminance:o=.01,averageLuminance:l=1,adaptationRate:u=1}={}){super("ToneMappingEffect",tQ,{blendFunction:e,uniforms:new Map([["luminanceBuffer",new k.Uniform(null)],["maxLuminance",new k.Uniform(r)],["whitePoint",new k.Uniform(a)],["middleGrey",new k.Uniform(s)],["averageLuminance",new k.Uniform(l)]])}),this.renderTargetLuminance=new k.WebGLRenderTarget(1,1,{minFilter:k.LinearMipmapLinearFilter,depthBuffer:!1}),this.renderTargetLuminance.texture.generateMipmaps=!0,this.renderTargetLuminance.texture.name="Luminance",this.luminancePass=new eg({renderTarget:this.renderTargetLuminance}),this.adaptiveLuminancePass=new tY(this.luminancePass.texture,{minLuminance:o,adaptationRate:u}),this.uniforms.get("luminanceBuffer").value=this.adaptiveLuminancePass.texture,this.resolution=n,this.mode=i}get mode(){return Number(this.defines.get("TONE_MAPPING_MODE"))}set mode(e){if(this.mode===e)return;let t=k.REVISION.replace(/\D+/g,"");switch(this.defines.clear(),this.defines.set("TONE_MAPPING_MODE",e.toFixed(0)),e){case 0:this.defines.set("toneMapping(texel)","LinearToneMapping(texel)");break;case 1:this.defines.set("toneMapping(texel)","ReinhardToneMapping(texel)");break;case 5:case 5:this.defines.set("toneMapping(texel)",t>=168?"CineonToneMapping(texel)":"OptimizedCineonToneMapping(texel)");break;case 6:this.defines.set("toneMapping(texel)","ACESFilmicToneMapping(texel)");break;case 7:this.defines.set("toneMapping(texel)","AgXToneMapping(texel)");break;case 8:this.defines.set("toneMapping(texel)","NeutralToneMapping(texel)");break;default:this.defines.set("toneMapping(texel)","texel")}this.adaptiveLuminancePass.enabled=3===e,this.setChanged()}getMode(){return this.mode}setMode(e){this.mode=e}get whitePoint(){return this.uniforms.get("whitePoint").value}set whitePoint(e){this.uniforms.get("whitePoint").value=e}get middleGrey(){return this.uniforms.get("middleGrey").value}set middleGrey(e){this.uniforms.get("middleGrey").value=e}get averageLuminance(){return this.uniforms.get("averageLuminance").value}set averageLuminance(e){this.uniforms.get("averageLuminance").value=e}get adaptiveLuminanceMaterial(){return this.adaptiveLuminancePass.fullscreenMaterial}getAdaptiveLuminanceMaterial(){return this.adaptiveLuminanceMaterial}get resolution(){return this.luminancePass.resolution.width}set resolution(e){let t=Math.max(0,Math.ceil(Math.log2(e))),i=Math.pow(2,t);this.luminancePass.resolution.setPreferredSize(i,i),this.adaptiveLuminanceMaterial.mipLevel1x1=t}getResolution(){return this.resolution}setResolution(e){this.resolution=e}get adaptive(){return 3===this.mode}set adaptive(e){this.mode=e?3:2}get adaptationRate(){return this.adaptiveLuminanceMaterial.adaptationRate}set adaptationRate(e){this.adaptiveLuminanceMaterial.adaptationRate=e}get distinction(){return console.warn(this.name,"distinction was removed."),1}set distinction(e){console.warn(this.name,"distinction was removed.")}update(e,t,i){this.adaptiveLuminancePass.enabled&&(this.luminancePass.render(e,t),this.adaptiveLuminancePass.render(e,null,null,i))}initialize(e,t,i){this.adaptiveLuminancePass.initialize(e,t,i)}},tK=`uniform float offset;uniform float darkness;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){const vec2 center=vec2(0.5);vec3 color=inputColor.rgb;
|
|
#if VIGNETTE_TECHNIQUE == 0
|
|
float d=distance(uv,center);color*=smoothstep(0.8,offset*0.799,d*(darkness+offset));
|
|
#else
|
|
vec2 coord=(uv-center)*vec2(offset);color=mix(color,vec3(1.0-darkness),dot(coord,coord));
|
|
#endif
|
|
outputColor=vec4(color,inputColor.a);}`,tZ=class extends el{constructor({blendFunction:e,eskil:t=!1,technique:i=1*!!t,offset:n=.5,darkness:r=.5}={}){super("VignetteEffect",tK,{blendFunction:e,defines:new Map([["VIGNETTE_TECHNIQUE",i.toFixed(0)]]),uniforms:new Map([["offset",new k.Uniform(n)],["darkness",new k.Uniform(r)]])})}get technique(){return Number(this.defines.get("VIGNETTE_TECHNIQUE"))}set technique(e){this.technique!==e&&(this.defines.set("VIGNETTE_TECHNIQUE",e.toFixed(0)),this.setChanged())}get eskil(){return 1===this.technique}set eskil(e){this.technique=1*!!e}getTechnique(){return this.technique}setTechnique(e){this.technique=e}get offset(){return this.uniforms.get("offset").value}set offset(e){this.uniforms.get("offset").value=e}getOffset(){return this.offset}setOffset(e){this.offset=e}get darkness(){return this.uniforms.get("darkness").value}set darkness(e){this.uniforms.get("darkness").value=e}getDarkness(){return this.darkness}setDarkness(e){this.darkness=e}};k.Loader,k.Loader,k.Loader;k.ShaderMaterial;var tJ=`#include <packing>
|
|
varying vec2 vUv;
|
|
#ifdef NORMAL_DEPTH
|
|
#ifdef GL_FRAGMENT_PRECISION_HIGH
|
|
uniform highp sampler2D normalDepthBuffer;
|
|
#else
|
|
uniform mediump sampler2D normalDepthBuffer;
|
|
#endif
|
|
float readDepth(const in vec2 uv){return texture2D(normalDepthBuffer,uv).a;}
|
|
#else
|
|
#if INPUT_DEPTH_PACKING == 3201
|
|
uniform lowp sampler2D depthBuffer;
|
|
#elif defined(GL_FRAGMENT_PRECISION_HIGH)
|
|
uniform highp sampler2D depthBuffer;
|
|
#else
|
|
uniform mediump sampler2D depthBuffer;
|
|
#endif
|
|
float readDepth(const in vec2 uv){
|
|
#if INPUT_DEPTH_PACKING == 3201
|
|
return unpackRGBAToDepth(texture2D(depthBuffer,uv));
|
|
#else
|
|
return texture2D(depthBuffer,uv).r;
|
|
#endif
|
|
}
|
|
#endif
|
|
void main(){
|
|
#if INPUT_DEPTH_PACKING == OUTPUT_DEPTH_PACKING
|
|
gl_FragColor=texture2D(depthBuffer,vUv);
|
|
#else
|
|
float depth=readDepth(vUv);
|
|
#if OUTPUT_DEPTH_PACKING == 3201
|
|
gl_FragColor=(depth==1.0)?vec4(1.0):packDepthToRGBA(depth);
|
|
#else
|
|
gl_FragColor=vec4(vec3(depth),1.0);
|
|
#endif
|
|
#endif
|
|
}`,t$=`varying vec2 vUv;
|
|
#if DEPTH_COPY_MODE == 1
|
|
uniform vec2 texelPosition;
|
|
#endif
|
|
void main(){
|
|
#if DEPTH_COPY_MODE == 1
|
|
vUv=texelPosition;
|
|
#else
|
|
vUv=position.xy*0.5+0.5;
|
|
#endif
|
|
gl_Position=vec4(position.xy,1.0,1.0);}`,t0=class extends k.ShaderMaterial{constructor(){super({name:"DepthCopyMaterial",defines:{INPUT_DEPTH_PACKING:"0",OUTPUT_DEPTH_PACKING:"0",DEPTH_COPY_MODE:"0"},uniforms:{depthBuffer:new k.Uniform(null),texelPosition:new k.Uniform(new k.Vector2)},blending:k.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:tJ,vertexShader:t$}),this.depthCopyMode=0}get depthBuffer(){return this.uniforms.depthBuffer.value}set depthBuffer(e){this.uniforms.depthBuffer.value=e}set inputDepthPacking(e){this.defines.INPUT_DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}get outputDepthPacking(){return Number(this.defines.OUTPUT_DEPTH_PACKING)}set outputDepthPacking(e){this.defines.OUTPUT_DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e,t=k.BasicDepthPacking){this.depthBuffer=e,this.inputDepthPacking=t}getInputDepthPacking(){return Number(this.defines.INPUT_DEPTH_PACKING)}setInputDepthPacking(e){this.defines.INPUT_DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}getOutputDepthPacking(){return Number(this.defines.OUTPUT_DEPTH_PACKING)}setOutputDepthPacking(e){this.defines.OUTPUT_DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}get texelPosition(){return this.uniforms.texelPosition.value}getTexelPosition(){return this.uniforms.texelPosition.value}setTexelPosition(e){this.uniforms.texelPosition.value=e}get mode(){return this.depthCopyMode}set mode(e){this.depthCopyMode=e,this.defines.DEPTH_COPY_MODE=e.toFixed(0),this.needsUpdate=!0}getMode(){return this.mode}setMode(e){this.mode=e}},t1=`#include <common>
|
|
#include <packing>
|
|
#include <dithering_pars_fragment>
|
|
#define packFloatToRGBA(v) packDepthToRGBA(v)
|
|
#define unpackRGBAToFloat(v) unpackRGBAToDepth(v)
|
|
#ifdef FRAMEBUFFER_PRECISION_HIGH
|
|
uniform mediump sampler2D inputBuffer;
|
|
#else
|
|
uniform lowp sampler2D inputBuffer;
|
|
#endif
|
|
#if DEPTH_PACKING == 3201
|
|
uniform lowp sampler2D depthBuffer;
|
|
#elif defined(GL_FRAGMENT_PRECISION_HIGH)
|
|
uniform highp sampler2D depthBuffer;
|
|
#else
|
|
uniform mediump sampler2D depthBuffer;
|
|
#endif
|
|
uniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv;vec4 sRGBToLinear(const in vec4 value){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);}float readDepth(const in vec2 uv){
|
|
#if DEPTH_PACKING == 3201
|
|
float depth=unpackRGBAToDepth(texture2D(depthBuffer,uv));
|
|
#else
|
|
float depth=texture2D(depthBuffer,uv).r;
|
|
#endif
|
|
#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH)
|
|
float d=pow(2.0,depth*log2(cameraFar+1.0))-1.0;float a=cameraFar/(cameraFar-cameraNear);float b=cameraFar*cameraNear/(cameraNear-cameraFar);depth=a+b/d;
|
|
#elif defined(USE_REVERSED_DEPTH_BUFFER)
|
|
depth=1.0-depth;
|
|
#endif
|
|
return depth;}float getViewZ(const in float depth){
|
|
#ifdef PERSPECTIVE_CAMERA
|
|
return perspectiveDepthToViewZ(depth,cameraNear,cameraFar);
|
|
#else
|
|
return orthographicDepthToViewZ(depth,cameraNear,cameraFar);
|
|
#endif
|
|
}vec3 RGBToHCV(const in vec3 RGB){vec4 P=mix(vec4(RGB.bg,-1.0,2.0/3.0),vec4(RGB.gb,0.0,-1.0/3.0),step(RGB.b,RGB.g));vec4 Q=mix(vec4(P.xyw,RGB.r),vec4(RGB.r,P.yzx),step(P.x,RGB.r));float C=Q.x-min(Q.w,Q.y);float H=abs((Q.w-Q.y)/(6.0*C+EPSILON)+Q.z);return vec3(H,C,Q.x);}vec3 RGBToHSL(const in vec3 RGB){vec3 HCV=RGBToHCV(RGB);float L=HCV.z-HCV.y*0.5;float S=HCV.y/(1.0-abs(L*2.0-1.0)+EPSILON);return vec3(HCV.x,S,L);}vec3 HueToRGB(const in float H){float R=abs(H*6.0-3.0)-1.0;float G=2.0-abs(H*6.0-2.0);float B=2.0-abs(H*6.0-4.0);return clamp(vec3(R,G,B),0.0,1.0);}vec3 HSLToRGB(const in vec3 HSL){vec3 RGB=HueToRGB(HSL.x);float C=(1.0-abs(2.0*HSL.z-1.0))*HSL.y;return(RGB-0.5)*C+HSL.z;}FRAGMENT_HEAD void main(){FRAGMENT_MAIN_UV vec4 color0=texture2D(inputBuffer,UV);vec4 color1=vec4(0.0);FRAGMENT_MAIN_IMAGE color0.a=clamp(color0.a,0.0,1.0);gl_FragColor=color0;
|
|
#ifdef ENCODE_OUTPUT
|
|
#include <colorspace_fragment>
|
|
#endif
|
|
#include <dithering_fragment>
|
|
}`,t2=class extends k.ShaderMaterial{constructor(e,t,i,n,r=!1){super({name:"EffectMaterial",defines:{THREE_REVISION:k.REVISION.replace(/\D+/g,""),DEPTH_PACKING:"0",ENCODE_OUTPUT:"1"},uniforms:{inputBuffer:new k.Uniform(null),depthBuffer:new k.Uniform(null),resolution:new k.Uniform(new k.Vector2),texelSize:new k.Uniform(new k.Vector2),cameraNear:new k.Uniform(.3),cameraFar:new k.Uniform(1e3),aspect:new k.Uniform(1),time:new k.Uniform(0)},blending:k.NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,dithering:r}),e&&this.setShaderParts(e),t&&this.setDefines(t),i&&this.setUniforms(i),this.copyCameraSettings(n)}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}get depthBuffer(){return this.uniforms.depthBuffer.value}set depthBuffer(e){this.uniforms.depthBuffer.value=e}get depthPacking(){return Number(this.defines.DEPTH_PACKING)}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e,t=k.BasicDepthPacking){this.depthBuffer=e,this.depthPacking=t}setShaderData(e){this.setShaderParts(e.shaderParts),this.setDefines(e.defines),this.setUniforms(e.uniforms),this.setExtensions(e.extensions)}setShaderParts(e){return this.fragmentShader=t1.replace($.FRAGMENT_HEAD,e.get($.FRAGMENT_HEAD)||"").replace($.FRAGMENT_MAIN_UV,e.get($.FRAGMENT_MAIN_UV)||"").replace($.FRAGMENT_MAIN_IMAGE,e.get($.FRAGMENT_MAIN_IMAGE)||""),this.vertexShader="uniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv;VERTEX_HEAD void main(){vUv=position.xy*0.5+0.5;VERTEX_MAIN_SUPPORT gl_Position=vec4(position.xy,1.0,1.0);}".replace($.VERTEX_HEAD,e.get($.VERTEX_HEAD)||"").replace($.VERTEX_MAIN_SUPPORT,e.get($.VERTEX_MAIN_SUPPORT)||""),this.needsUpdate=!0,this}setDefines(e){for(let t of e.entries())this.defines[t[0]]=t[1];return this.needsUpdate=!0,this}setUniforms(e){for(let t of e.entries())this.uniforms[t[0]]=t[1];return this}setExtensions(e){for(let t of(this.extensions={},e))this.extensions[t]=!0;return this}get encodeOutput(){return void 0!==this.defines.ENCODE_OUTPUT}set encodeOutput(e){this.encodeOutput!==e&&(e?this.defines.ENCODE_OUTPUT="1":delete this.defines.ENCODE_OUTPUT,this.needsUpdate=!0)}isOutputEncodingEnabled(e){return this.encodeOutput}setOutputEncodingEnabled(e){this.encodeOutput=e}get time(){return this.uniforms.time.value}set time(e){this.uniforms.time.value=e}setDeltaTime(e){this.uniforms.time.value+=e}adoptCameraSettings(e){this.copyCameraSettings(e)}copyCameraSettings(e){e&&(this.uniforms.cameraNear.value=e.near,this.uniforms.cameraFar.value=e.far,e instanceof k.PerspectiveCamera?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}setSize(e,t){let i=this.uniforms;i.resolution.value.set(e,t),i.texelSize.value.set(1/e,1/t),i.aspect.value=e/t}static get Section(){return $}};k.ShaderMaterial;var t3=class extends G{constructor({depthPacking:e=k.RGBADepthPacking}={}){super("DepthCopyPass");const t=new t0;t.outputDepthPacking=e,this.fullscreenMaterial=t,this.needsDepthTexture=!0,this.needsSwap=!1,this.renderTarget=new k.WebGLRenderTarget(1,1,{type:e===k.RGBADepthPacking?k.UnsignedByteType:k.FloatType,minFilter:k.NearestFilter,magFilter:k.NearestFilter,depthBuffer:!1}),this.renderTarget.texture.name="DepthCopyPass.Target"}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}get depthPacking(){return this.fullscreenMaterial.outputDepthPacking}getDepthPacking(){return this.fullscreenMaterial.outputDepthPacking}setDepthTexture(e,t=k.BasicDepthPacking){this.fullscreenMaterial.depthBuffer=e,this.fullscreenMaterial.inputDepthPacking=t}render(e,t,i,n,r){e.setRenderTarget(this.renderToScreen?null:this.renderTarget),e.render(this.scene,this.camera)}setSize(e,t){this.renderTarget.setSize(e,t)}},t4=Number(k.REVISION.replace(/\D+/g,"")),t5=255/256,t6=new Float32Array([255/256/0x1000000,255/256/65536,255/256/256,255/256]),t8=new Float32Array([t5,t5/256,t5/65536,1/0x1000000]),t9=class extends t3{constructor({depthPacking:e=k.RGBADepthPacking,mode:t=1}={}){if(e!==k.RGBADepthPacking&&e!==k.BasicDepthPacking)throw Error(`Unsupported depth packing: ${e}`);super({depthPacking:e}),this.name="DepthPickingPass",this.fullscreenMaterial.mode=t,this.pixelBuffer=e===k.RGBADepthPacking?new Uint8Array(4):new Float32Array(4),this.callback=null}readDepth(e){return this.fullscreenMaterial.texelPosition.set(.5*e.x+.5,.5*e.y+.5),new Promise(e=>{this.callback=e})}render(e,t,i,n,r){let a=this.fullscreenMaterial,s=a.mode;if(0===s&&super.render(e),null!==this.callback){let t,i=this.renderTarget,n=this.pixelBuffer,r=i.texture.type!==k.FloatType,o=0,l=0;if(1===s)super.render(e);else{let e=a.texelPosition;o=Math.round(e.x*i.width),l=Math.round(e.y*i.height)}e.readRenderTargetPixels(i,o,l,1,1,n),this.callback(r?(t=t4>=167?t8:t6,(n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3])/255):n[0]),this.callback=null}}setSize(e,t){0===this.fullscreenMaterial.mode&&super.setSize(e,t)}};function t7(e,t,i){for(let n of t){let t="$1"+e+n.charAt(0).toUpperCase()+n.slice(1),r=RegExp("([^\\.])(\\b"+n+"\\b)","g");for(let e of i.entries())null!==e[1]&&i.set(e[0],e[1].replace(r,t))}}var ie=class extends G{constructor(e,...t){super("EffectPass"),this.fullscreenMaterial=new t2(null,null,null,e),this.listener=e=>this.handleEvent(e),this.effects=[],this.setEffects(t),this.skipRendering=!1,this.minTime=1,this.maxTime=1/0,this.timeScale=1}set mainScene(e){for(let t of this.effects)t.mainScene=e}set mainCamera(e){for(let t of(this.fullscreenMaterial.copyCameraSettings(e),this.effects))t.mainCamera=e}get encodeOutput(){return this.fullscreenMaterial.encodeOutput}set encodeOutput(e){this.fullscreenMaterial.encodeOutput=e}get dithering(){return this.fullscreenMaterial.dithering}set dithering(e){let t=this.fullscreenMaterial;t.dithering=e,t.needsUpdate=!0}setEffects(e){for(let e of this.effects)e.removeEventListener("change",this.listener);for(let t of(this.effects=e.sort((e,t)=>t.attributes-e.attributes),this.effects))t.addEventListener("change",this.listener)}updateMaterial(){let e=new ee,t=0;for(let i of this.effects)if(9===i.blendMode.blendFunction)e.attributes|=1&i.getAttributes();else if((e.attributes&i.getAttributes()&2)!=0)throw Error(`Convolution effects cannot be merged (${i.name})`);else!function(e,t,i){let n=t.getFragmentShader(),r=t.getVertexShader(),a=void 0!==n&&/mainImage/.test(n),s=void 0!==n&&/mainUv/.test(n);if(i.attributes|=t.getAttributes(),void 0===n)throw Error(`Missing fragment shader (${t.name})`);if(s&&(2&i.attributes)!=0)throw Error(`Effects that transform UVs are incompatible with convolution effects (${t.name})`);if(a||s){let o=/\w+\s+(\w+)\([\w\s,]*\)\s*{/g,l=i.shaderParts,u=l.get($.FRAGMENT_HEAD)||"",c=l.get($.FRAGMENT_MAIN_UV)||"",h=l.get($.FRAGMENT_MAIN_IMAGE)||"",d=l.get($.VERTEX_HEAD)||"",f=l.get($.VERTEX_MAIN_SUPPORT)||"",p=new Set,m=new Set;if(s&&(c+=` ${e}MainUv(UV);
|
|
`,i.uvTransformation=!0),null!==r&&/mainSupport/.test(r)){let t=/mainSupport *\([\w\s]*?uv\s*?\)/.test(r);for(let n of(f+=` ${e}MainSupport(`,f+=t?"vUv);\n":");\n",r.matchAll(/(?:varying\s+\w+\s+([\S\s]*?);)/g)))for(let e of n[1].split(/\s*,\s*/))i.varyings.add(e),p.add(e),m.add(e);for(let e of r.matchAll(o))m.add(e[1])}for(let e of n.matchAll(o))m.add(e[1]);for(let e of t.defines.keys())m.add(e.replace(/\([\w\s,]*\)/g,""));for(let e of t.uniforms.keys())m.add(e);m.delete("while"),m.delete("for"),m.delete("if"),t.uniforms.forEach((t,n)=>i.uniforms.set(e+n.charAt(0).toUpperCase()+n.slice(1),t)),t.defines.forEach((t,n)=>i.defines.set(e+n.charAt(0).toUpperCase()+n.slice(1),t));let g=new Map([["fragment",n],["vertex",r]]);t7(e,m,i.defines),t7(e,m,g),n=g.get("fragment"),r=g.get("vertex");let v=t.blendMode;if(i.blendModes.set(v.blendFunction,v),a){null!==t.inputColorSpace&&t.inputColorSpace!==i.colorSpace&&(h+=t.inputColorSpace===k.SRGBColorSpace?"color0 = sRGBTransferOETF(color0);\n ":"color0 = sRGBToLinear(color0);\n "),t.outputColorSpace!==k.NoColorSpace?i.colorSpace=t.outputColorSpace:null!==t.inputColorSpace&&(i.colorSpace=t.inputColorSpace),h+=`${e}MainImage(color0, UV, `,(1&i.attributes)!=0&&/MainImage *\([\w\s,]*?depth[\w\s,]*?\)/.test(n)&&(h+="depth, ",i.readDepth=!0),h+="color1);\n ";let r=e+"BlendOpacity";i.uniforms.set(r,v.opacity),h+=`color0 = blend${v.blendFunction}(color0, color1, ${r});
|
|
|
|
`,u+=`uniform float ${r};
|
|
|
|
`}if(u+=n+"\n",null!==r&&(d+=r+"\n"),l.set($.FRAGMENT_HEAD,u),l.set($.FRAGMENT_MAIN_UV,c),l.set($.FRAGMENT_MAIN_IMAGE,h),l.set($.VERTEX_HEAD,d),l.set($.VERTEX_MAIN_SUPPORT,f),null!==t.extensions)for(let e of t.extensions)i.extensions.add(e)}else throw Error(`Could not find mainImage or mainUv function (${t.name})`)}("e"+t++,i,e);let i=e.shaderParts.get($.FRAGMENT_HEAD),n=e.shaderParts.get($.FRAGMENT_MAIN_IMAGE),r=e.shaderParts.get($.FRAGMENT_MAIN_UV),a=/\bblend\b/g;for(let t of e.blendModes.values())i+=t.getShaderCode().replace(a,`blend${t.blendFunction}`)+"\n";for(let[t,a]of((1&e.attributes)!=0?(e.readDepth&&(n="float depth = readDepth(UV);\n\n "+n),this.needsDepthTexture=null===this.getDepthTexture()):this.needsDepthTexture=!1,e.colorSpace===k.SRGBColorSpace&&(n+="color0 = sRGBToLinear(color0);\n "),e.uvTransformation?(r="vec2 transformedUv = vUv;\n"+r,e.defines.set("UV","transformedUv")):e.defines.set("UV","vUv"),e.shaderParts.set($.FRAGMENT_HEAD,i),e.shaderParts.set($.FRAGMENT_MAIN_IMAGE,n),e.shaderParts.set($.FRAGMENT_MAIN_UV,r),e.shaderParts))null!==a&&e.shaderParts.set(t,a.trim().replace(/^#/,"\n#"));this.skipRendering=0===t,this.needsSwap=!this.skipRendering,this.fullscreenMaterial.setShaderData(e)}recompile(){this.updateMaterial()}getDepthTexture(){return this.fullscreenMaterial.depthBuffer}setDepthTexture(e,t=k.BasicDepthPacking){for(let i of(this.fullscreenMaterial.depthBuffer=e,this.fullscreenMaterial.depthPacking=t,this.effects))i.setDepthTexture(e,t)}render(e,t,i,n,r){for(let i of this.effects)i.update(e,t,n);if(!this.skipRendering||this.renderToScreen){let r=this.fullscreenMaterial;r.inputBuffer=t.texture,r.time+=n*this.timeScale,e.setRenderTarget(this.renderToScreen?null:i),e.render(this.scene,this.camera)}}setSize(e,t){for(let i of(this.fullscreenMaterial.setSize(e,t),this.effects))i.setSize(e,t)}initialize(e,t,i){for(let n of(this.renderer=e,this.effects))n.initialize(e,t,i);this.updateMaterial(),void 0!==i&&i!==k.UnsignedByteType&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}dispose(){for(let e of(super.dispose(),this.effects))e.removeEventListener("change",this.listener),e.dispose()}handleEvent(e){"change"===e.type&&this.recompile()}},it=class extends G{constructor(e,t,{renderTarget:i,resolutionScale:n=1,width:r=en.AUTO_SIZE,height:a=en.AUTO_SIZE,resolutionX:s=r,resolutionY:o=a}={}){super("NormalPass"),this.needsSwap=!1,this.renderPass=new eJ(e,t,new k.MeshNormalMaterial);const l=this.renderPass;l.ignoreBackground=!0,l.skipShadowMapUpdate=!0;const u=l.getClearPass();u.overrideClearColor=new k.Color(7829503),u.overrideClearAlpha=1,this.renderTarget=i,void 0===this.renderTarget&&(this.renderTarget=new k.WebGLRenderTarget(1,1,{minFilter:k.NearestFilter,magFilter:k.NearestFilter}),this.renderTarget.texture.name="NormalPass.Target");const c=this.resolution=new en(this,s,o,n);c.addEventListener("change",e=>this.setSize(c.baseWidth,c.baseHeight))}set mainScene(e){this.renderPass.mainScene=e}set mainCamera(e){this.renderPass.mainCamera=e}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}render(e,t,i,n,r){let a=this.renderToScreen?null:this.renderTarget;this.renderPass.render(e,a,a)}setSize(e,t){let i=this.resolution;i.setBaseSize(e,t),this.renderTarget.setSize(i.width,i.height)}};function ii(e,t,i,n){var r;return(r=e+(t-e)*.75)+(i+(n-i)*.75-r)*.875}function ir(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,0,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([1,0,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([0,1,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([0,1,1]),new Float32Array([1,1,1]),new Float32Array(2),new Float32Array(2),new Float32Array([0,-.25,.25,-.125,.125,-.375,.375]),new Float32Array([0,0]),new Float32Array([.25,-.25]),new Float32Array([-.25,.25]),new Float32Array([.125,-.125]),new Float32Array([-.125,.125]),new Uint8Array([0,0]),new Uint8Array([3,0]),new Uint8Array([0,3]),new Uint8Array([3,3]),new Uint8Array([1,0]),new Uint8Array([4,0]),new Uint8Array([1,3]),new Uint8Array([4,3]),new Uint8Array([0,1]),new Uint8Array([3,1]),new Uint8Array([0,4]),new Uint8Array([3,4]),new Uint8Array([1,1]),new Uint8Array([4,1]),new Uint8Array([1,4]),new Uint8Array([4,4]),new Uint8Array([0,0]),new Uint8Array([1,0]),new Uint8Array([0,2]),new Uint8Array([1,2]),new Uint8Array([2,0]),new Uint8Array([3,0]),new Uint8Array([2,2]),new Uint8Array([3,2]),new Uint8Array([0,1]),new Uint8Array([1,1]),new Uint8Array([0,3]),new Uint8Array([1,3]),new Uint8Array([2,1]),new Uint8Array([3,1]),new Uint8Array([2,3]),new Uint8Array([3,3]),ii(0,0,0,0),new Float32Array([0,0,0,0]),ii(0,0,0,1),new Float32Array([0,0,0,1]),ii(0,0,1,0),new Float32Array([0,0,1,0]),ii(0,0,1,1),new Float32Array([0,0,1,1]),ii(0,1,0,0),new Float32Array([0,1,0,0]),ii(0,1,0,1),new Float32Array([0,1,0,1]),ii(0,1,1,0),new Float32Array([0,1,1,0]),ii(0,1,1,1),new Float32Array([0,1,1,1]),ii(1,0,0,0),new Float32Array([1,0,0,0]),ii(1,0,0,1),new Float32Array([1,0,0,1]),ii(1,0,1,0),new Float32Array([1,0,1,0]),ii(1,0,1,1),new Float32Array([1,0,1,1]),ii(1,1,0,0),new Float32Array([1,1,0,0]),ii(1,1,0,1),new Float32Array([1,1,0,1]),ii(1,1,1,0),new Float32Array([1,1,1,0]),ii(1,1,1,1),new Float32Array([1,1,1,1]),e.s(["BloomEffect",0,eb,"BrightnessContrastEffect",0,ew,"ChromaticAberrationEffect",0,eC,"ColorAverageEffect",0,eT,"ColorDepthEffect",0,eE,"CopyPass",0,Y,"DepthDownsamplingPass",0,tB,"DepthEffect",0,eP,"DepthOfFieldEffect",0,eH,"DepthPickingPass",0,t9,"DotScreenEffect",0,eG,"Effect",0,el,"EffectComposer",0,J,"EffectPass",0,ie,"FXAAEffect",0,eW,"GlitchEffect",0,eq,"GlitchMode",0,ej,"GodRaysEffect",0,e2,"GridEffect",0,e3,"HueSaturationEffect",0,e4,"KernelSize",0,eu,"LUT3DEffect",0,te,"MaskFunction",0,eD,"NoiseEffect",0,ti,"NormalPass",0,it,"OutlineEffect",0,tu,"Pass",0,G,"PixelationEffect",0,tc,"RenderPass",0,eJ,"SMAAEffect",0,tC,"SSAOEffect",0,tN,"ScanlineEffect",0,td,"SelectiveBloomEffect",0,ty,"SepiaEffect",0,tS,"ShockWaveEffect",0,tg,"TextureEffect",0,tz,"TiltShiftEffect",0,tW,"ToneMappingEffect",0,tq,"VignetteEffect",0,tZ],33623);function ia(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function is(e,t){if(e){if("string"==typeof e)return ia(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);if("Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return ia(e,t)}}function io(e){return function(e){if(Array.isArray(e))return ia(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||is(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}new B.Vector2,new B.Vector2;function il(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}var iu=function e(t,i,n){var r=this;il(this,e),ir(this,"dot2",function(e,t){return r.x*e+r.y*t}),ir(this,"dot3",function(e,t,i){return r.x*e+r.y*t+r.z*i}),this.x=t,this.y=i,this.z=n},ic=[new iu(1,1,0),new iu(-1,1,0),new iu(1,-1,0),new iu(-1,-1,0),new iu(1,0,1),new iu(-1,0,1),new iu(1,0,-1),new iu(-1,0,-1),new iu(0,1,1),new iu(0,-1,1),new iu(0,1,-1),new iu(0,-1,-1)],ih=[151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180],id=Array(512),ip=Array(512),im=0;(im=Math.floor(im))<256&&(im|=im<<8);for(var ig,iv=0;iv<256;iv++)ig=1&iv?ih[iv]^255&im:ih[iv]^im>>8&255,id[iv]=id[iv+256]=ig,ip[iv]=ip[iv+256]=ic[ig%12];function ix(e){var t=function(e){if("number"==typeof e)e=Math.abs(e);else if("string"==typeof e){var t=e;e=0;for(var i=0;i<t.length;i++)e=(e+(i+1)*(t.charCodeAt(i)%96))%0x7fffffff}return 0===e&&(e=311),e}(e);return function(){var e=48271*t%0x7fffffff;return t=e,e/0x7fffffff}}new function e(t){var i=this;il(this,e),ir(this,"seed",0),ir(this,"init",function(e){i.seed=e,i.value=ix(e)}),ir(this,"value",ix(this.seed)),this.init(t)}(Math.random());var iy=function(e){return 1/(1+e+.48*e*e+.235*e*e*e)};function iS(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.25,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.01,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1/0,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:iy,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:.001,l="velocity_"+t;if(void 0===e.__damp&&(e.__damp={}),void 0===e.__damp[l]&&(e.__damp[l]=0),Math.abs(e[t]-i)<=o)return e[t]=i,!1;var u=2/(n=Math.max(1e-4,n)),c=s(u*r),h=e[t]-i,d=i,f=a*n;h=Math.min(Math.max(h,-f),f),i=e[t]-h;var p=(e.__damp[l]+u*h)*r;e.__damp[l]=(e.__damp[l]-u*p)*c;var m=i+(h+p)*c;return d-e[t]>0==m>d&&(m=d,e.__damp[l]=(m-d)/r),e[t]=m,!0}function iA(e,t,i,n,r,a,s,o){var l,u,c,h;return iS(e,t,e[t]+(c=(l=i-e[t])-Math.floor(l/(u=2*Math.PI))*u,(h=Math.max(0,Math.min(u,c)))>Math.PI&&(h-=2*Math.PI),h),n,r,a,s,o)}var iM=new B.Vector2,ib=new B.Vector3;function iw(e,t,i,n,r,a,s){return"number"==typeof t?ib.setScalar(t):Array.isArray(t)?ib.set(t[0],t[1],t[2]):ib.copy(t),u=iS(e,"x",ib.x,i,n,r,a,s),c=iS(e,"y",ib.y,i,n,r,a,s),h=iS(e,"z",ib.z,i,n,r,a,s),u||c||h}var iT=new B.Vector4,iE=new B.Euler,i_=new B.Color,iC=new B.Quaternion,iR=new B.Vector4,iP=new B.Vector4,iD=new B.Vector4;function iI(e,t,i,n,r,a,s){Array.isArray(t)?iC.set(t[0],t[1],t[2],t[3]):iC.copy(t);var o=e.dot(iC)>0?1:-1;return iC.x*=o,iC.y*=o,iC.z*=o,iC.w*=o,M=iS(e,"x",iC.x,i,n,r,a,s),b=iS(e,"y",iC.y,i,n,r,a,s),w=iS(e,"z",iC.z,i,n,r,a,s),T=iS(e,"w",iC.w,i,n,r,a,s),iR.set(e.x,e.y,e.z,e.w).normalize(),iP.set(e.__damp.velocity_x,e.__damp.velocity_y,e.__damp.velocity_z,e.__damp.velocity_w),iD.copy(iR).multiplyScalar(iP.dot(iR)/iR.dot(iR)),e.__damp.velocity_x-=iD.x,e.__damp.velocity_y-=iD.y,e.__damp.velocity_z-=iD.z,e.__damp.velocity_w-=iD.w,e.set(iR.x,iR.y,iR.z,iR.w),M||b||w||T}var iL=new B.Spherical,iB=new B.Matrix4,iU=new B.Vector3,iN=new B.Quaternion,iF=new B.Vector3,iO=Object.freeze({__proto__:null,rsqw:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.01,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/(2*Math.PI);return i/Math.atan(1/t)*Math.atan(Math.sin(2*Math.PI*e*n)/t)},exp:iy,damp:iS,dampAngle:iA,damp2:function(e,t,i,n,r,a,s){return"number"==typeof t?iM.setScalar(t):Array.isArray(t)?iM.set(t[0],t[1]):iM.copy(t),o=iS(e,"x",iM.x,i,n,r,a,s),l=iS(e,"y",iM.y,i,n,r,a,s),o||l},damp3:iw,damp4:function(e,t,i,n,r,a,s){return"number"==typeof t?iT.setScalar(t):Array.isArray(t)?iT.set(t[0],t[1],t[2],t[3]):iT.copy(t),d=iS(e,"x",iT.x,i,n,r,a,s),f=iS(e,"y",iT.y,i,n,r,a,s),p=iS(e,"z",iT.z,i,n,r,a,s),m=iS(e,"w",iT.w,i,n,r,a,s),d||f||p||m},dampE:function(e,t,i,n,r,a,s){return Array.isArray(t)?iE.set(t[0],t[1],t[2],t[3]):iE.copy(t),g=iA(e,"x",iE.x,i,n,r,a,s),v=iA(e,"y",iE.y,i,n,r,a,s),x=iA(e,"z",iE.z,i,n,r,a,s),g||v||x},dampC:function(e,t,i,n,r,a,s){return t instanceof B.Color?i_.copy(t):Array.isArray(t)?i_.setRGB(t[0],t[1],t[2]):i_.set(t),y=iS(e,"r",i_.r,i,n,r,a,s),S=iS(e,"g",i_.g,i,n,r,a,s),A=iS(e,"b",i_.b,i,n,r,a,s),y||S||A},dampQ:iI,dampS:function(e,t,i,n,r,a,s){return Array.isArray(t)?iL.set(t[0],t[1],t[2]):iL.copy(t),E=iS(e,"radius",iL.radius,i,n,r,a,s),_=iA(e,"phi",iL.phi,i,n,r,a,s),C=iA(e,"theta",iL.theta,i,n,r,a,s),E||_||C},dampM:function(e,t,i,n,r,a,s){return void 0===e.__damp&&(e.__damp={position:new B.Vector3,rotation:new B.Quaternion,scale:new B.Vector3},e.decompose(e.__damp.position,e.__damp.rotation,e.__damp.scale)),Array.isArray(t)?iB.set.apply(iB,io(t)):iB.copy(t),iB.decompose(iU,iN,iF),R=iw(e.__damp.position,iU,i,n,r,a,s),P=iI(e.__damp.rotation,iN,i,n,r,a,s),D=iw(e.__damp.scale,iF,i,n,r,a,s),e.compose(e.__damp.position,e.__damp.rotation,e.__damp.scale),R||P||D}}),iz=B,ik=B;new ik.OrthographicCamera(-1,1,1,-1,0,1);class iH extends ik.BufferGeometry{constructor(){super(),this.setAttribute("position",new ik.Float32BufferAttribute([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new ik.Float32BufferAttribute([0,2,0,0,2,0],2))}}new iH;class iG extends iz.BufferGeometry{boundingSphere=new iz.Sphere;constructor(){super(),this.setAttribute("position",new iz.BufferAttribute(new Float32Array([-1,-1,3,-1,-1,3]),2)),this.setAttribute("uv",new iz.BufferAttribute(new Float32Array([0,0,2,0,0,2]),2))}computeBoundingSphere(){}}Uint8Array.from(atob("5L7pP4UXrOIr/VZ1G3f6p89FIWU7lqc7J3DPxKjJUXODJoHQzf/aNVM+ABlvhXeBGN7iC0WkmTjEaAqOItBfBdaK5KSGV1ET5SOKl3x9JOX5w2sAl6+6KjDhVUHgbqq7DZ5EeYzbdSNxtrQLW/KkPJoOTG4u5CBUZkCKHniY9l7DUgjuz708zG1HIC8qfohi1vPjPH9Lq47ksjRrjwXD4MlVCjdAqYFGodQ8tRmHkOfq4wVRIAHvoavPHvN1lpk3X4Y1yzAPGe8S9KBs3crc4GwlU1dEOXiWol/mgQqxkNqB1xd04+0Bmpwj0GcCc4NUi+c731FUxjvaexCkCJ0qhrJJ++htWqetNC4NewClu8aFRSwrqiJEGe+qtTg4CYCHaF1wJI0sy/ZBQAI0qAMy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D0R6ApnhG/2Wa0A0AY2NtWTjmabdKU+KgIRDP9RQYVjXiF1qC+xyNVG03I9vpmEpY/G/zC4nLOKgXAZ/uTikHI9Afbkhfgfgo9arWbix5eH7WUo9RQygDzwCnVSjbXc7MihEufVj6WGbK963pw8VjY3RS8IH1cy2yZbIcKLO5CgAUcXJfF2+McnDLKtXxyZaf7SPA6KJq+zF2NHyfoeTOwHhGqNcnHVr1hT73pcoyXyfvCYBnG1Bp/aR9t8hoI7CXM3UZOisWGA1SHZ2jf7k9GlRnp3mF/c1AV+JjvUsnZrsybEOQJg/dn/9eJkyykQHjbF56zgcPX6DdMG03WKUMlYz+uOZ+5DZy9E9MZOZ9GMoLFdrIPPQQLjv+GlCMpoyHPXkzIODjHAID2PrnaRpqWVHh0rnieDILKq+Emrd5RnjgE9pDUXWTmHaKuqqYlcgEz4zbi46dbWrAAFBjsQq1rLHIiPJEcwFLCOY4JNlXRXQJqCUKXk2d1RSBGzDP6HDSpo863BhVRFFF6uIpjQV7j5ebFe3UkkO/+coIo2BTAcgBqOtQ134s9a4QJvofuqBYMGOBMsWZ+sn/2AOxDx6SfAnDFGw=="),e=>e.charCodeAt(0)),parseInt(iz.REVISION.replace(/\D+/g,""))>=162?class extends iz.WebGLRenderTarget{constructor(e=1,t=1,i=1,n={}){super(e,t,{...n,count:i}),this.isWebGLMultipleRenderTargets=!0}get texture(){return this.textures}}:class extends iz.WebGLRenderTarget{constructor(e=1,t=1,i=1,n={}){super(e,t,n),this.isWebGLMultipleRenderTargets=!0;const r=this.texture;this.texture=[];for(let e=0;e<i;e++)this.texture[e]=r.clone(),this.texture[e].isRenderTargetTexture=!0}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 n=0,r=this.texture.length;n<r;n++)this.texture[n].image.width=e,this.texture[n].image.height=t,this.texture[n].image.depth=i;this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}copy(e){this.dispose(),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.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone()),this.texture.length=0;for(let t=0,i=e.texture.length;t<i;t++)this.texture[t]=e.texture[t].clone(),this.texture[t].isRenderTargetTexture=!0;return this}};let iV=(0,L.createContext)(null),iW=e=>(2&e.getAttributes())==2,ij=(0,L.memo)((0,L.forwardRef)(({children:e,camera:t,scene:i,resolutionScale:n,enabled:r=!0,renderPriority:a=1,autoClear:s=!0,depthBuffer:o,enableNormalPass:l,stencilBuffer:u,multisampling:c=8,frameBufferType:h=B.HalfFloatType},d)=>{let{gl:f,scene:p,camera:m,size:g}=(0,U.useThree)(),v=i||p,x=t||m,[y,S,A]=(0,L.useMemo)(()=>{let e=new J(f,{depthBuffer:o,stencilBuffer:u,multisampling:c,frameBufferType:h});e.addPass(new eJ(v,x));let t=null,i=null;return l&&((i=new it(v,x)).enabled=!1,e.addPass(i),void 0!==n&&((t=new tB({normalBuffer:i.texture,resolutionScale:n})).enabled=!1,e.addPass(t))),[e,i,t]},[x,f,o,u,c,h,v,l,n]);(0,L.useEffect)(()=>y?.setSize(g.width,g.height),[y,g]),(0,N.useFrame)((e,t)=>{if(r){let e=f.autoClear;f.autoClear=s,u&&!s&&f.clearStencil(),y.render(t),f.autoClear=e}},r?a:0);let M=(0,L.useRef)(null);(0,L.useLayoutEffect)(()=>{let e=[],t=M.current.__r3f;if(t&&y){let i=t.children;for(let t=0;t<i.length;t++){let n=i[t].object;if(n instanceof el){let r=[n];if(!iW(n)){let e=null;for(;(e=i[t+1]?.object)instanceof el&&!iW(e);)r.push(e),t++}let a=new ie(x,...r);e.push(a)}else n instanceof G&&e.push(n)}for(let t of e)y?.addPass(t);S&&(S.enabled=!0),A&&(A.enabled=!0)}return()=>{for(let t of e)y?.removePass(t);S&&(S.enabled=!1),A&&(A.enabled=!1)}},[y,e,x,S,A]),(0,L.useEffect)(()=>{let e=f.toneMapping;return f.toneMapping=B.NoToneMapping,()=>{f.toneMapping=e}},[f]);let b=(0,L.useMemo)(()=>({composer:y,normalPass:S,downSamplingPass:A,resolutionScale:n,camera:x,scene:v}),[y,S,A,n,x,v]);return(0,L.useImperativeHandle)(d,()=>y,[y]),(0,I.jsx)(iV.Provider,{value:b,children:(0,I.jsx)("group",{ref:M,children:e})})})),iX=0,iY=new WeakMap,iQ=(0,L.forwardRef)(function({blendFunction:e,worldFocusDistance:t,worldFocusRange:i,focusDistance:n,focusRange:r,focalLength:a,bokehScale:s,resolutionScale:o,resolutionX:l,resolutionY:u,width:c,height:h,target:d,depthTexture:f,...p},m){let{camera:g}=(0,L.useContext)(iV),v=null!=d,x=(0,L.useMemo)(()=>{let d=new eH(g,{blendFunction:e,worldFocusDistance:t,worldFocusRange:i,focusDistance:n,focusRange:r,focalLength:a,bokehScale:s,resolutionScale:o,resolutionX:l,resolutionY:u,width:c,height:h});return v&&(d.target=new B.Vector3),f&&d.setDepthTexture(f.texture,f.packing),d.maskPass.maskFunction=eD.MULTIPLY_RGB_SET_ALPHA,d},[g,e,t,i,n,r,a,s,o,l,u,c,h,v,f]);return(0,L.useEffect)(()=>()=>{x.dispose()},[x]),(0,I.jsx)("primitive",{...p,ref:m,object:x,target:d})}),iq=(a=eb,s={blendFunction:0},function({blendFunction:e=s?.blendFunction,opacity:t=s?.opacity,...i}){let n=iY.get(a);if(!n){let e=`@react-three/postprocessing/${a.name}-${iX++}`;(0,F.extend)({[e]:a}),iY.set(a,n=e)}let r=(0,U.useThree)(e=>e.camera),o=L.default.useMemo(()=>[...s?.args??[],...i.args??[{...s,...i}]],[JSON.stringify(i)]);return(0,I.jsx)(n,{camera:r,"blendMode-blendFunction":e,"blendMode-opacity-value":t,...i,args:o})});var iK=((r=iK||{})[r.Linear=0]="Linear",r[r.Radial=1]="Radial",r[r.MirroredLinear=2]="MirroredLinear",r);e.s(["Bloom",0,iq,"EffectComposer",0,ij],79877)}]); |