PageSourceSearch

https://vof-shopify-2.vercel.app/_next/static/chunks/e6108f9e71171441.js?dpl=dpl_Cm9vnuJcnL6kduFSCurPWxJgAKyv

js vof-shopify-2.vercel.app collected 2026-10-03 08:00:25 UTC 1,445,832 bytes, 1,908 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,55838,(e,t,n)=>{"use strict";var i=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=i.useState,s=i.useEffect,o=i.useLayoutEffect,l=i.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),i=a({inst:{value:n,getSnapshot:t}}),r=i[0].inst,c=i[1];return o(function(){r.value=n,r.getSnapshot=t,u(r)&&c({inst:r})},[e,n,t]),s(function(){return u(r)&&c({inst:r}),e(function(){u(r)&&c({inst:r})})},[e]),l(n),n};n.useSyncExternalStore=void 0!==i.useSyncExternalStore?i.useSyncExternalStore:c},2239,(e,t,n)=>{"use strict";t.exports=e.r(55838)},52822,(e,t,n)=>{"use strict";var i=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=i.useRef,l=i.useEffect,u=i.useMemo,c=i.useDebugValue;n.useSyncExternalStoreWithSelector=function(e,t,n,i,r){var d=o(null);if(null===d.current){var h={hasValue:!1,value:null};d.current=h}else h=d.current;var p=s(e,(d=u(function(){function e(e){if(!l){if(l=!0,s=e,e=i(e),void 0!==r&&h.hasValue){var t=h.value;if(r(t,e))return o=t}return o=e}if(t=o,a(s,e))return t;var n=i(e);return void 0!==r&&r(t,n)?(s=e,t):(s=e,o=n)}var s,o,l=!1,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]},[t,n,i,r]))[0],d[1]);return l(function(){h.hasValue=!0,h.value=p},[p]),c(p),p}},30224,(e,t,n)=>{"use strict";t.exports=e.r(52822)},66936,(e,t,n)=>{"use strict";function i(e,t){var n=e.length;for(e.push(t);0<n;){var i=n-1>>>1,r=e[i];if(0<s(r,t))e[i]=t,e[n]=r,n=i;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],n=e.pop();if(n!==t){e[0]=n;for(var i=0,r=e.length,a=r>>>1;i<a;){var o=2*(i+1)-1,l=e[o],u=o+1,c=e[u];if(0>s(l,n))u<r&&0>s(c,l)?(e[i]=c,e[u]=n,i=u):(e[i]=l,e[o]=n,i=o);else if(u<r&&0>s(c,n))e[i]=c,e[u]=n,i=u;else break}}return t}function s(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(n.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var o,l=performance;n.unstable_now=function(){return l.now()}}else{var u=Date,c=u.now();n.unstable_now=function(){return u.now()-c}}var d=[],h=[],p=1,f=null,m=3,g=!1,v=!1,y=!1,x=!1,b="function"==typeof setTimeout?setTimeout:null,S="function"==typeof clearTimeout?clearTimeout:null,_="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=r(h);null!==t;){if(null===t.callback)a(h);else if(t.startTime<=e)a(h),t.sortIndex=t.expirationTime,i(d,t);else break;t=r(h)}}function M(e){if(y=!1,w(e),!v)if(null!==r(d))v=!0,T||(T=!0,o());else{var t=r(h);null!==t&&L(M,t.startTime-e)}}var T=!1,E=-1,A=5,C=-1;function P(){return!!x||!(n.unstable_now()-C<A)}function R(){if(x=!1,T){var e=n.unstable_now();C=e;var t=!0;try{e:{v=!1,y&&(y=!1,S(E),E=-1),g=!0;var i=m;try{t:{for(w(e),f=r(d);null!==f&&!(f.expirationTime>e&&P());){var s=f.callback;if("function"==typeof s){f.callback=null,m=f.priorityLevel;var l=s(f.expirationTime<=e);if(e=n.unstable_now(),"function"==typeof l){f.callback=l,w(e),t=!0;break t}f===r(d)&&a(d),w(e)}else a(d);f=r(d)}if(null!==f)t=!0;else{var u=r(h);null!==u&&L(M,u.startTime-e),t=!1}}break e}finally{f=null,m=i,g=!1}}}finally{t?o():T=!1}}}if("function"==typeof _)o=function(){_(R)};else if("undefined"!=typeof MessageChannel){var I=new MessageChannel,D=I.port2;I.port1.onmessage=R,o=function(){D.postMessage(null)}}else o=function(){b(R,0)};function L(e,t){E=b(function(){e(n.unstable_now())},t)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(e){e.callback=null},n.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"):A=0<e?Math.floor(1e3/e):5},n.unstable_getCurrentPriorityLevel=function(){return m},n.unstable_next=function(e){switch(m){case 1:case 2:case 3:var t=3;break;default:t=m}var n=m;m=t;try{return e()}finally{m=n}},n.unstable_requestPaint=function(){x=!0},n.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=m;m=e;try{return t()}finally{m=n}},n.unstable_scheduleCallback=function(e,t,a){var s=n.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:p++,callback:t,priorityLevel:e,startTime:a,expirationTime:l,sortIndex:-1},a>s?(e.sortIndex=a,i(h,e),null===r(d)&&e===r(h)&&(y?(S(E),E=-1):y=!0,L(M,a-s))):(e.sortIndex=l,i(d,e),v||g||(v=!0,T||(T=!0,o()))),e},n.unstable_shouldYield=P,n.unstable_wrapCallback=function(e){var t=m;return function(){var n=m;m=t;try{return e.apply(this,arguments)}finally{m=n}}}},89499,(e,t,n)=>{"use strict";
1t.exports=e.r(66936)},9385,(e,t,n)=>{!function(){"use strict";var t=function(){this.init()};t.prototype={init:function(){var e=this||i;return e._counter=1e3,e._html5AudioPool=[],e.html5PoolSize=10,e._codecs={},e._howls=[],e._muted=!1,e._volume=1,e._canPlayEvent="canplaythrough",e._navigator="undefined"!=typeof window&&window.navigator?window.navigator:null,e.masterGain=null,e.noAudio=!1,e.usingWebAudio=!0,e.autoSuspend=!0,e.ctx=null,e.autoUnlock=!0,e._setup(),e},volume:function(e){var t=this||i;if(e=parseFloat(e),t.ctx||d(),void 0!==e&&e>=0&&e<=1){if(t._volume=e,t._muted)return t;t.usingWebAudio&&t.masterGain.gain.setValueAtTime(e,i.ctx.currentTime);for(var n=0;n<t._howls.length;n++)if(!t._howls[n]._webAudio)for(var r=t._howls[n]._getSoundIds(),a=0;a<r.length;a++){var s=t._howls[n]._soundById(r[a]);s&&s._node&&(s._node.volume=s._volume*e)}return t}return t._volume},mute:function(e){var t=this||i;t.ctx||d(),t._muted=e,t.usingWebAudio&&t.masterGain.gain.setValueAtTime(e?0:t._volume,i.ctx.currentTime);for(var n=0;n<t._howls.length;n++)if(!t._howls[n]._webAudio)for(var r=t._howls[n]._getSoundIds(),a=0;a<r.length;a++){var s=t._howls[n]._soundById(r[a]);s&&s._node&&(s._node.muted=!!e||s._muted)}return t},stop:function(){for(var e=this||i,t=0;t<e._howls.length;t++)e._howls[t].stop();return e},unload:function(){for(var e=this||i,t=e._howls.length-1;t>=0;t--)e._howls[t].unload();return e.usingWebAudio&&e.ctx&&void 0!==e.ctx.close&&(e.ctx.close(),e.ctx=null,d()),e},codecs:function(e){return(this||i)._codecs[e.replace(/^x-/,"")]},_setup:function(){var e=this||i;if(e.state=e.ctx&&e.ctx.state||"suspended",e._autoSuspend(),!e.usingWebAudio)if("undefined"!=typeof Audio)try{var t=new Audio;void 0===t.oncanplaythrough&&(e._canPlayEvent="canplay")}catch(t){e.noAudio=!0}else e.noAudio=!0;try{var t=new Audio;t.muted&&(e.noAudio=!0)}catch(e){}return e.noAudio||e._setupCodecs(),e},_setupCodecs:function(){var e=this||i,t=null;try{t="undefined"!=typeof Audio?new Audio:null}catch(t){return e}if(!t||"function"!=typeof t.canPlayType)return e;var n=t.canPlayType("audio/mpeg;").replace(/^no$/,""),r=e._navigator?e._navigator.userAgent:"",a=r.match(/OPR\/(\d+)/g),s=a&&33>parseInt(a[0].split("/")[1],10),o=-1!==r.indexOf("Safari")&&-1===r.indexOf("Chrome"),l=r.match(/Version\/(.*?) /),u=o&&l&&15>parseInt(l[1],10);return e._codecs={mp3:!!(!s&&(n||t.canPlayType("audio/mp3;").replace(/^no$/,""))),mpeg:!!n,opus:!!t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(t.canPlayType('audio/wav; codecs="1"')||t.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!t.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!t.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/m4a;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(t.canPlayType("audio/x-m4b;")||t.canPlayType("audio/m4b;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(t.canPlayType("audio/x-mp4;")||t.canPlayType("audio/mp4;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!(!u&&t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!!(!u&&t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!t.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(t.canPlayType("audio/x-flac;")||t.canPlayType("audio/flac;")).replace(/^no$/,"")},e},_unlockAudio:function(){var e=this||i;if(!e._audioUnlocked&&e.ctx){e._audioUnlocked=!1,e.autoUnlock=!1,e._mobileUnloaded||44100===e.ctx.sampleRate||(e._mobileUnloaded=!0,e.unload()),e._scratchBuffer=e.ctx.createBuffer(1,1,22050);var t=function(n){for(;e._html5AudioPool.length<e.html5PoolSize;)try{var i=new Audio;i._unlocked=!0,e._releaseHtml5Audio(i)}catch(t){e.noAudio=!0;break}for(var r=0;r<e._howls.length;r++)if(!e._howls[r]._webAudio)for(var a=e._howls[r]._getSoundIds(),s=0;s<a.length;s++){var o=e._howls[r]._soundById(a[s]);o&&o._node&&!o._node._unlocked&&(o._node._unlocked=!0,o._node.load())}e._autoResume();var l=e.ctx.createBufferSource();l.buffer=e._scratchBuffer,l.connect(e.ctx.destination),void 0===l.start?l.noteOn(0):l.start(0),"function"==typeof e.ctx.resume&&e.ctx.resume(),l.onended=function(){l.disconnect(0),e._audioUnlocked=!0,document.removeEventListener("touchstart",t,!0),document.removeEventListener("touchend",t,!0),document.removeEventListener("click",t,!0),document.removeEventListener("keydown",t,!0);for(var n=0;n<e._howls.length;n++)e._howls[n]._emit("unlock")}};return document.addEventListener("touchstart",t,!0),document.addEventListener("touchend",t,!0),document.addEventListener("click",t,!0),document.addEventListener("keydown",t,!0),e}},_obtainHtml5Audio:function(){var e=this||i;if(e._html5AudioPool.length)return e._html5AudioPool.pop();var t=new Audio().play();return t&&"undefined"!=typeof Promise&&(t instanceof Promise||"function"==typeof t.then)&&t.catch(function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.")}),new Audio},_releaseHtml5Audio:function(e){var t=this||i;
vendor: 9,213 bytes, line 1
1return e._unlocked&&t._html5AudioPool.push(e),t},_autoSuspend:function(){var e=this;if(e.autoSuspend&&e.ctx&&void 0!==e.ctx.suspend&&i.usingWebAudio){for(var t=0;t<e._howls.length;t++)if(e._howls[t]._webAudio){for(var n=0;n<e._howls[t]._sounds.length;n++)if(!e._howls[t]._sounds[n]._paused)return e}return e._suspendTimer&&clearTimeout(e._suspendTimer),e._suspendTimer=setTimeout(function(){if(e.autoSuspend){e._suspendTimer=null,e.state="suspending";var t=function(){e.state="suspended",e._resumeAfterSuspend&&(delete e._resumeAfterSuspend,e._autoResume())};e.ctx.suspend().then(t,t)}},3e4),e}},_autoResume:function(){var e=this;if(e.ctx&&void 0!==e.ctx.resume&&i.usingWebAudio)return"running"===e.state&&"interrupted"!==e.ctx.state&&e._suspendTimer?(clearTimeout(e._suspendTimer),e._suspendTimer=null):"suspended"===e.state||"running"===e.state&&"interrupted"===e.ctx.state?(e.ctx.resume().then(function(){e.state="running";for(var t=0;t<e._howls.length;t++)e._howls[t]._emit("resume")}),e._suspendTimer&&(clearTimeout(e._suspendTimer),e._suspendTimer=null)):"suspending"===e.state&&(e._resumeAfterSuspend=!0),e}};var i=new t,r=function(e){e.src&&0!==e.src.length?this.init(e):console.error("An array of source files must be passed with any new Howl.")};r.prototype={init:function(e){var t=this;return i.ctx||d(),t._autoplay=e.autoplay||!1,t._format="string"!=typeof e.format?e.format:[e.format],t._html5=e.html5||!1,t._muted=e.mute||!1,t._loop=e.loop||!1,t._pool=e.pool||5,t._preload="boolean"!=typeof e.preload&&"metadata"!==e.preload||e.preload,t._rate=e.rate||1,t._sprite=e.sprite||{},t._src="string"!=typeof e.src?e.src:[e.src],t._volume=void 0!==e.volume?e.volume:1,t._xhr={method:e.xhr&&e.xhr.method?e.xhr.method:"GET",headers:e.xhr&&e.xhr.headers?e.xhr.headers:null,withCredentials:!!e.xhr&&!!e.xhr.withCredentials&&e.xhr.withCredentials},t._duration=0,t._state="unloaded",t._sounds=[],t._endTimers={},t._queue=[],t._playLock=!1,t._onend=e.onend?[{fn:e.onend}]:[],t._onfade=e.onfade?[{fn:e.onfade}]:[],t._onload=e.onload?[{fn:e.onload}]:[],t._onloaderror=e.onloaderror?[{fn:e.onloaderror}]:[],t._onplayerror=e.onplayerror?[{fn:e.onplayerror}]:[],t._onpause=e.onpause?[{fn:e.onpause}]:[],t._onplay=e.onplay?[{fn:e.onplay}]:[],t._onstop=e.onstop?[{fn:e.onstop}]:[],t._onmute=e.onmute?[{fn:e.onmute}]:[],t._onvolume=e.onvolume?[{fn:e.onvolume}]:[],t._onrate=e.onrate?[{fn:e.onrate}]:[],t._onseek=e.onseek?[{fn:e.onseek}]:[],t._onunlock=e.onunlock?[{fn:e.onunlock}]:[],t._onresume=[],t._webAudio=i.usingWebAudio&&!t._html5,void 0!==i.ctx&&i.ctx&&i.autoUnlock&&i._unlockAudio(),i._howls.push(t),t._autoplay&&t._queue.push({event:"play",action:function(){t.play()}}),t._preload&&"none"!==t._preload&&t.load(),t},load:function(){var e,t,n=null;if(i.noAudio)return void this._emit("loaderror",null,"No audio support.");"string"==typeof this._src&&(this._src=[this._src]);for(var r=0;r<this._src.length;r++){if(this._format&&this._format[r])e=this._format[r];else{if("string"!=typeof(t=this._src[r])){this._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}(e=/^data:audio\/([^;,]+);/i.exec(t))||(e=/\.([^.]+)$/.exec(t.split("?",1)[0])),e&&(e=e[1].toLowerCase())}if(e||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),e&&i.codecs(e)){n=this._src[r];break}}return n?(this._src=n,this._state="loading","https:"===window.location.protocol&&"http:"===n.slice(0,5)&&(this._html5=!0,this._webAudio=!1),new a(this),this._webAudio&&o(this),this):void this._emit("loaderror",null,"No codec support for selected audio sources.")},play:function(e,t){var n=this,r=null;if("number"==typeof e)r=e,e=null;else if("string"==typeof e&&"loaded"===n._state&&!n._sprite[e])return null;else if(void 0===e&&(e="__default",!n._playLock)){for(var a=0,s=0;s<n._sounds.length;s++)n._sounds[s]._paused&&!n._sounds[s]._ended&&(a++,r=n._sounds[s]._id);1===a?e=null:r=null}var o=r?n._soundById(r):n._inactiveSound();if(!o)return null;if(r&&!e&&(e=o._sprite||"__default"),"loaded"!==n._state){o._sprite=e,o._ended=!1;var l=o._id;return n._queue.push({event:"play",action:function(){n.play(l)}}),l}if(r&&!o._paused)return t||n._loadQueue("play"),o._id;n._webAudio&&i._autoResume();var u=Math.max(0,o._seek>0?o._seek:n._sprite[e][0]/1e3),c=Math.max(0,(n._sprite[e][0]+n._sprite[e][1])/1e3-u),d=1e3*c/Math.abs(o._rate),h=n._sprite[e][0]/1e3,p=(n._sprite[e][0]+n._sprite[e][1])/1e3;o._sprite=e,o._ended=!1;var f=function(){o._paused=!1,o._seek=u,o._start=h,o._stop=p,o._loop=!!(o._loop||n._sprite[e][2])};if(u>=p)return void n._ended(o);var m=o._node;if(n._webAudio){var g=function(){n._playLock=!1,f(),n._refreshBuffer(o);var e=o._muted||n._muted?0:o._volume;m.gain.setValueAtTime(e,i.ctx.currentTime),o._playStart=i.ctx.currentTime,void 0===m.bufferSource.start?o._loop?m.bufferSource.noteGrainOn(0,u,86400):m.bufferSource.noteGrainOn(0,u,c):o._loop?m.bufferSource.start(0,u,86400):m.bufferSource.start(0,u,c),d!==1/0&&(n._endTimers[o._id]=setTimeout(n._ended.bind(n,o),d)),t||setTimeout(function(){n._emit("play",o._id),n._loadQueue()},0)};"running"===i.state&&"interrupted"!==i.ctx.state?g():(n._playLock=!0,n.once("resume",g),n._clearTimer(o._id))}else{var v=function(){m.currentTime=u,m.muted=o._muted||n._muted||i._muted||m.muted,m.volume=o._volume*i.volume(),m.playbackRate=o._rate;try{var r=m.play();if(r&&"undefined"!=typeof Promise&&(r instanceof Promise||"function"==typeof r.then)?(n._playLock=!0,f(),r.then(function(){n._playLock=!1,m._unlocked=!0,t?n._loadQueue():n._emit("play",o._id)}).catch(function(){n._playLock=!1,n._emit("playerror",o._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),o._ended=!0,o._paused=!0})):t||(n._playLock=!1,f(),n._emit("play",o._id)),m.playbackRate=o._rate,m.paused)return void n._emit("playerror",o._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");"__default"!==e||o._loop?n._endTimers[o._id]=setTimeout(n._ended.bind(n,o),d):(n._endTimers[o._id]=function(){n._ended(o),m.removeEventListener("ended",n._endTimers[o._id],!1)},m.addEventListener("ended",n._endTimers[o._id],!1))}catch(e){n._emit("playerror",o._id,e)}};"data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"===m.src&&(m.src=n._src,m.load());var y=window&&window.ejecta||!m.readyState&&i._navigator.isCocoonJS;if(m.readyState>=3||y)v();else{n._playLock=!0,n._state="loading";var x=function(){n._state="loaded",v(),m.removeEventListener(i._canPlayEvent,x,!1)};m.addEventListener(i._canPlayEvent,x,!1),n._clearTimer(o._id)}}return o._id},pause:function(e){var t=this;if("loaded"!==t._state||t._playLock)return t._queue.push({event:"pause",action:function(){t.pause(e)}}),t;for(var n=t._getSoundIds(e),i=0;i<n.length;i++){t._clearTimer(n[i]);var r=t._soundById(n[i]);if(r&&!r._paused&&(r._seek=t.seek(n[i]),r._rateSeek=0,r._paused=!0,t._stopFade(n[i]),r._node))if(t._webAudio){if(!r._node.bufferSource)continue;void 0===r._node.bufferSource.stop?r._node.bufferSource.noteOff(0):r._node.bufferSource.stop(0),t._cleanBuffer(r._node)}else isNaN(r._node.duration)&&r._node.duration!==1/0||r._node.pause();arguments[1]||t._emit("pause",r?r._id:null)}return t},stop:function(e,t){var n=this;if("loaded"!==n._state||n._playLock)return n._queue.push({event:"stop",action:function(){n.stop(e)}}),n;for(var i=n._getSoundIds(e),r=0;r<i.length;r++){n._clearTimer(i[r]);var a=n._soundById(i[r]);a&&(a._seek=a._start||0,a._rateSeek=0,a._paused=!0,a._ended=!0,n._stopFade(i[r]),a._node&&(n._webAudio?a._node.bufferSource&&(void 0===a._node.bufferSource.stop?a._node.bufferSource.noteOff(0):a._node.bufferSource.stop(0),n._cleanBuffer(a._node)):isNaN(a._node.duration)&&a._node.duration!==1/0||(a._node.currentTime=a._start||0,a._node.pause(),a._node.duration===1/0&&n._clearSound(a._node))),t||n._emit("stop",a._id))}return n},mute:function(e,t){var n=this;if("loaded"!==n._state||n._playLock)return n._queue.push({event:"mute",action:function(){n.mute(e,t)}}),n;if(void 0===t)if("boolean"!=typeof e)return n._muted;else n._muted=e;for(var r=n._getSoundIds(t),a=0;a<r.length;a++){var s=n._soundById(r[a]);s&&(s._muted=e,s._interval&&n._stopFade(s._id),n._webAudio&&s._node?s._node.gain.setValueAtTime(e?0:s._volume,i.ctx.currentTime):s._node&&(s._node.muted=!!i._muted||e),n._emit("mute",s._id))}return n},volume:function(){var e,t,n,r=this,a=arguments;if(0===a.length)return r._volume;if(1===a.length||2===a.length&&void 0===a[1]?r._getSoundIds().indexOf(a[0])>=0?t=parseInt(a[0],10):e=parseFloat(a[0]):a.length>=2&&(e=parseFloat(a[0]),t=parseInt(a[1],10)),void 0===e||!(e>=0)||!(e<=1))return(n=t?r._soundById(t):r._sounds[0])?n._volume:0;if("loaded"!==r._state||r._playLock)return r._queue.push({event:"volume",action:function(){r.volume.apply(r,a)}}),r;void 0===t&&(r._volume=e),t=r._getSoundIds(t);for(var s=0;s<t.length;s++)(n=r._soundById(t[s]))&&(n._volume=e,a[2]||r._stopFade(t[s]),r._webAudio&&n._node&&!n._muted?n._node.gain.setValueAtTime(e,i.ctx.currentTime):n._node&&!n._muted&&(n._node.volume=e*i.volume()),r._emit
1("volume",n._id));return r},fade:function(e,t,n,r){var a=this;if("loaded"!==a._state||a._playLock)return a._queue.push({event:"fade",action:function(){a.fade(e,t,n,r)}}),a;e=Math.min(Math.max(0,parseFloat(e)),1),t=Math.min(Math.max(0,parseFloat(t)),1),n=parseFloat(n),a.volume(e,r);for(var s=a._getSoundIds(r),o=0;o<s.length;o++){var l=a._soundById(s[o]);if(l){if(r||a._stopFade(s[o]),a._webAudio&&!l._muted){var u=i.ctx.currentTime,c=u+n/1e3;l._volume=e,l._node.gain.setValueAtTime(e,u),l._node.gain.linearRampToValueAtTime(t,c)}a._startFadeInterval(l,e,t,n,s[o],void 0===r)}}return a},_startFadeInterval:function(e,t,n,i,r,a){var s=this,o=t,l=n-t,u=Math.abs(l/.01),c=Math.max(4,u>0?i/u:i),d=Date.now();e._fadeTo=n,e._interval=setInterval(function(){var r=(Date.now()-d)/i;d=Date.now(),o+=l*r,o=Math.round(100*o)/100,o=l<0?Math.max(n,o):Math.min(n,o),s._webAudio?e._volume=o:s.volume(o,e._id,!0),a&&(s._volume=o),(n<t&&o<=n||n>t&&o>=n)&&(clearInterval(e._interval),e._interval=null,e._fadeTo=null,s.volume(n,e._id),s._emit("fade",e._id))},c)},_stopFade:function(e){var t=this._soundById(e);return t&&t._interval&&(this._webAudio&&t._node.gain.cancelScheduledValues(i.ctx.currentTime),clearInterval(t._interval),t._interval=null,this.volume(t._fadeTo,e),t._fadeTo=null,this._emit("fade",e)),this},loop:function(){var e,t,n,i=arguments;if(0===i.length)return this._loop;if(1===i.length)if("boolean"!=typeof i[0])return!!(n=this._soundById(parseInt(i[0],10)))&&n._loop;else e=i[0],this._loop=e;else 2===i.length&&(e=i[0],t=parseInt(i[1],10));for(var r=this._getSoundIds(t),a=0;a<r.length;a++)(n=this._soundById(r[a]))&&(n._loop=e,this._webAudio&&n._node&&n._node.bufferSource&&(n._node.bufferSource.loop=e,e&&(n._node.bufferSource.loopStart=n._start||0,n._node.bufferSource.loopEnd=n._stop,this.playing(r[a])&&(this.pause(r[a],!0),this.play(r[a],!0)))));return this},rate:function(){var e,t,n,r=this,a=arguments;if(0===a.length?t=r._sounds[0]._id:1===a.length?r._getSoundIds().indexOf(a[0])>=0?t=parseInt(a[0],10):e=parseFloat(a[0]):2===a.length&&(e=parseFloat(a[0]),t=parseInt(a[1],10)),"number"!=typeof e)return(n=r._soundById(t))?n._rate:r._rate;if("loaded"!==r._state||r._playLock)return r._queue.push({event:"rate",action:function(){r.rate.apply(r,a)}}),r;void 0===t&&(r._rate=e),t=r._getSoundIds(t);for(var s=0;s<t.length;s++)if(n=r._soundById(t[s])){r.playing(t[s])&&(n._rateSeek=r.seek(t[s]),n._playStart=r._webAudio?i.ctx.currentTime:n._playStart),n._rate=e,r._webAudio&&n._node&&n._node.bufferSource?n._node.bufferSource.playbackRate.setValueAtTime(e,i.ctx.currentTime):n._node&&(n._node.playbackRate=e);var o=r.seek(t[s]),l=1e3*((r._sprite[n._sprite][0]+r._sprite[n._sprite][1])/1e3-o)/Math.abs(n._rate);(r._endTimers[t[s]]||!n._paused)&&(r._clearTimer(t[s]),r._endTimers[t[s]]=setTimeout(r._ended.bind(r,n),l)),r._emit("rate",n._id)}return r},seek:function(){var e,t,n=this,r=arguments;if(0===r.length?n._sounds.length&&(t=n._sounds[0]._id):1===r.length?n._getSoundIds().indexOf(r[0])>=0?t=parseInt(r[0],10):n._sounds.length&&(t=n._sounds[0]._id,e=parseFloat(r[0])):2===r.length&&(e=parseFloat(r[0]),t=parseInt(r[1],10)),void 0===t)return 0;if("number"==typeof e&&("loaded"!==n._state||n._playLock))return n._queue.push({event:"seek",action:function(){n.seek.apply(n,r)}}),n;var a=n._soundById(t);if(a)if("number"==typeof e&&e>=0){var s=n.playing(t);s&&n.pause(t,!0),a._seek=e,a._ended=!1,n._clearTimer(t),n._webAudio||!a._node||isNaN(a._node.duration)||(a._node.currentTime=e);var o=function(){s&&n.play(t,!0),n._emit("seek",t)};if(s&&!n._webAudio){var l=function(){n._playLock?setTimeout(l,0):o()};setTimeout(l,0)}else o()}else{if(!n._webAudio)return a._node.currentTime;var u=n.playing(t)?i.ctx.currentTime-a._playStart:0,c=a._rateSeek?a._rateSeek-a._seek:0;return a._seek+(c+u*Math.abs(a._rate))}return n},playing:function(e){if("number"==typeof e){var t=this._soundById(e);return!!t&&!t._paused}for(var n=0;n<this._sounds.length;n++)if(!this._sounds[n]._paused)return!0;return!1},duration:function(e){var t=this._duration,n=this._soundById(e);return n&&(t=this._sprite[n._sprite][1]/1e3),t},state:function(){return this._state},unload:function(){for(var e=this,t=e._sounds,n=0;n<t.length;n++)t[n]._paused||e.stop(t[n]._id),e._webAudio||(e._clearSound(t[n]._node),t[n]._node.removeEventListener("error",t[n]._errorFn,!1),t[n]._node.removeEventListener(i._canPlayEvent,t[n]._loadFn,!1),t[n]._node.removeEventListener("ended",t[n]._endFn,!1),i._releaseHtml5Audio(t[n]._node)),delete t[n]._node,e._clearTimer(t[n]._id);var r=i._howls.indexOf(e);r>=0&&i._howls.splice(r,1);var a=!0;for(n=0;n<i._howls.length;n++)if(i._howls[n]._src===e._src||e._src.indexOf(i._howls[n]._src)>=0){a=!1;break}return s&&a&&delete s[e._src],i.noAudio=!1,e._state="unloaded",e._sounds=[],e=null,null},on:function(e,t,n,i){var r=this["_on"+e];return"function"==typeof t&&r.push(i?{id:n,fn:t,once:i}:{id:n,fn:t}),this},off:function(e,t,n){var i=this["_on"+e],r=0;if("number"==typeof t&&(n=t,t=null),t||n)for(r=0;r<i.length;r++){var a=n===i[r].id;if(t===i[r].fn&&a||!t&&a){i.splice(r,1);break}}else if(e)this["_on"+e]=[];else{var s=Object.keys(this);for(r=0;r<s.length;r++)0===s[r].indexOf("_on")&&Array.isArray(this[s[r]])&&(this[s[r]]=[])}return this},once:function(e,t,n){return this.on(e,t,n,1),this},_emit:function(e,t,n){for(var i=this["_on"+e],r=i.length-1;r>=0;r--)(!i[r].id||i[r].id===t||"load"===e)&&(setTimeout((function(e){e.call(this,t,n)}).bind(this,i[r].fn),0),i[r].once&&this.off(e,i[r].fn,i[r].id));return this._loadQueue(e),this},_loadQueue:function(e){if(this._queue.length>0){var t=this._queue[0];t.event===e&&(this._queue.shift(),this._loadQueue()),e||t.action()}return this},_ended:function(e){var t=e._sprite;if(!this._webAudio&&e._node&&!e._node.paused&&!e._node.ended&&e._node.currentTime<e._stop)return setTimeout(this._ended.bind(this,e),100),this;var n=!!(e._loop||this._sprite[t][2]);if(this._emit("end",e._id),!this._webAudio&&n&&this.stop(e._id,!0).play(e._id),this._webAudio&&n){this._emit("play",e._id),e._seek=e._start||0,e._rateSeek=0,e._playStart=i.ctx.currentTime;var r=(e._stop-e._start)*1e3/Math.abs(e._rate);this._endTimers[e._id]=setTimeout(this._ended.bind(this,e),r)}return this._webAudio&&!n&&(e._paused=!0,e._ended=!0,e._seek=e._start||0,e._rateSeek=0,this._clearTimer(e._id),this._cleanBuffer(e._node),i._autoSuspend()),this._webAudio||n||this.stop(e._id,!0),this}
1,_clearTimer:function(e){if(this._endTimers[e]){if("function"!=typeof this._endTimers[e])clearTimeout(this._endTimers[e]);else{var t=this._soundById(e);t&&t._node&&t._node.removeEventListener("ended",this._endTimers[e],!1)}delete this._endTimers[e]}return this},_soundById:function(e){for(var t=0;t<this._sounds.length;t++)if(e===this._sounds[t]._id)return this._sounds[t];return null},_inactiveSound:function(){this._drain();for(var e=0;e<this._sounds.length;e++)if(this._sounds[e]._ended)return this._sounds[e].reset();return new a(this)},_drain:function(){var e=this._pool,t=0,n=0;if(!(this._sounds.length<e)){for(n=0;n<this._sounds.length;n++)this._sounds[n]._ended&&t++;for(n=this._sounds.length-1;n>=0;n--){if(t<=e)return;this._sounds[n]._ended&&(this._webAudio&&this._sounds[n]._node&&this._sounds[n]._node.disconnect(0),this._sounds.splice(n,1),t--)}}},_getSoundIds:function(e){if(void 0!==e)return[e];for(var t=[],n=0;n<this._sounds.length;n++)t.push(this._sounds[n]._id);return t},_refreshBuffer:function(e){return e._node.bufferSource=i.ctx.createBufferSource(),e._node.bufferSource.buffer=s[this._src],e._panner?e._node.bufferSource.connect(e._panner):e._node.bufferSource.connect(e._node),e._node.bufferSource.loop=e._loop,e._loop&&(e._node.bufferSource.loopStart=e._start||0,e._node.bufferSource.loopEnd=e._stop||0),e._node.bufferSource.playbackRate.setValueAtTime(e._rate,i.ctx.currentTime),this},_cleanBuffer:function(e){var t=i._navigator&&i._navigator.vendor.indexOf("Apple")>=0;if(!e.bufferSource)return this;if(i._scratchBuffer&&e.bufferSource&&(e.bufferSource.onended=null,e.bufferSource.disconnect(0),t))try{e.bufferSource.buffer=i._scratchBuffer}catch(e){}return e.bufferSource=null,this},_clearSound:function(e){/MSIE |Trident\//.test(i._navigator&&i._navigator.userAgent)||(e.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var a=function(e){this._parent=e,this.init()};a.prototype={init:function(){var e=this._parent;return this._muted=e._muted,this._loop=e._loop,this._volume=e._volume,this._rate=e._rate,this._seek=0,this._paused=!0,this._ended=!0,this._sprite="__default",this._id=++i._counter,e._sounds.push(this),this.create(),this},create:function(){var e=this._parent,t=i._muted||this._muted||this._parent._muted?0:this._volume;return e._webAudio?(this._node=void 0===i.ctx.createGain?i.ctx.createGainNode():i.ctx.createGain(),this._node.gain.setValueAtTime(t,i.ctx.currentTime),this._node.paused=!0,this._node.connect(i.masterGain)):i.noAudio||(this._node=i._obtainHtml5Audio(),this._errorFn=this._errorListener.bind(this),this._node.addEventListener("error",this._errorFn,!1),this._loadFn=this._loadListener.bind(this),this._node.addEventListener(i._canPlayEvent,this._loadFn,!1),this._endFn=this._endListener.bind(this),this._node.addEventListener("ended",this._endFn,!1),this._node.src=e._src,this._node.preload=!0===e._preload?"auto":e._preload,this._node.volume=t*i.volume(),this._node.load()),this},reset:function(){var e=this._parent;return this._muted=e._muted,this._loop=e._loop,this._volume=e._volume,this._rate=e._rate,this._seek=0,this._rateSeek=0,this._paused=!0,this._ended=!0,this._sprite="__default",this._id=++i._counter,this},_errorListener:function(){this._parent._emit("loaderror",this._id,this._node.error?this._node.error.code:0),this._node.removeEventListener("error",this._errorFn,!1)},_loadListener:function(){var e=this._parent;e._duration=Math.ceil(10*this._node.duration)/10,0===Object.keys(e._sprite).length&&(e._sprite={__default:[0,1e3*e._duration]}),"loaded"!==e._state&&(e._state="loaded",e._emit("load"),e._loadQueue()),this._node.removeEventListener(i._canPlayEvent,this._loadFn,!1)},_endListener:function(){var e=this._parent;e._duration===1/0&&(e._duration=Math.ceil(10*this._node.duration)/10,e._sprite.__default[1]===1/0&&(e._sprite.__default[1]=1e3*e._duration),e._ended(this)),this._node.removeEventListener("ended",this._endFn,!1)}};var s={},o=function(e){var t=e._src;if(s[t]){e._duration=s[t].duration,c(e);return}if(/^data:[^;]+;base64,/.test(t)){for(var n=atob(t.split(",")[1]),i=new Uint8Array(n.length),r=0;r<n.length;++r)i[r]=n.charCodeAt(r);u(i.buffer,e)}else{var a=new XMLHttpRequest;a.open(e._xhr.method,t,!0),a.withCredentials=e._xhr.withCredentials,a.responseType="arraybuffer",e._xhr.headers&&Object.keys(e._xhr.headers).forEac
1h(function(t){a.setRequestHeader(t,e._xhr.headers[t])}),a.onload=function(){var t=(a.status+"")[0];"0"!==t&&"2"!==t&&"3"!==t?e._emit("loaderror",null,"Failed loading audio file with status: "+a.status+"."):u(a.response,e)},a.onerror=function(){e._webAudio&&(e._html5=!0,e._webAudio=!1,e._sounds=[],delete s[t],e.load())},l(a)}},l=function(e){try{e.send()}catch(t){e.onerror()}},u=function(e,t){var n=function(){t._emit("loaderror",null,"Decoding audio data failed.")},r=function(e){e&&t._sounds.length>0?(s[t._src]=e,c(t,e)):n()};"undefined"!=typeof Promise&&1===i.ctx.decodeAudioData.length?i.ctx.decodeAudioData(e).then(r).catch(n):i.ctx.decodeAudioData(e,r,n)},c=function(e,t){t&&!e._duration&&(e._duration=t.duration),0===Object.keys(e._sprite).length&&(e._sprite={__default:[0,1e3*e._duration]}),"loaded"!==e._state&&(e._state="loaded",e._emit("load"),e._loadQueue())},d=function(){if(i.usingWebAudio){try{"undefined"!=typeof AudioContext?i.ctx=new AudioContext:"undefined"!=typeof webkitAudioContext?i.ctx=new webkitAudioContext:i.usingWebAudio=!1}catch(e){i.usingWebAudio=!1}i.ctx||(i.usingWebAudio=!1);var e=/iP(hone|od|ad)/.test(i._navigator&&i._navigator.platform),t=i._navigator&&i._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),n=t?parseInt(t[1],10):null;if(e&&n&&n<9){var r=/safari/.test(i._navigator&&i._navigator.userAgent.toLowerCase());i._navigator&&!r&&(i.usingWebAudio=!1)}i.usingWebAudio&&(i.masterGain=void 0===i.ctx.createGain?i.ctx.createGainNode():i.ctx.createGain(),i.masterGain.gain.setValueAtTime(i._muted?0:i._volume,i.ctx.currentTime),i.masterGain.connect(i.ctx.destination)),i._setup()}};"function"==typeof define&&define.amd&&e.v({Howler:i,Howl:r}),n.Howler=i,n.Howl=r,e.g.HowlerGlobal=t,e.g.Howler=i,e.g.Howl=r,e.g.Sound=a}(),function(){"use strict";HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(e){if(!this.ctx||!this.ctx.listener)return this;for(var t=this._howls.length-1;t>=0;t--)this._howls[t].stereo(e);return this},HowlerGlobal.prototype.pos=function(e,t,n){return this.ctx&&this.ctx.listener?(t="number"!=typeof t?this._pos[1]:t,n="number"!=typeof n?this._pos[2]:n,"number"!=typeof e)?this._pos:(this._pos=[e,t,n],void 0!==this.ctx.listener.positionX?(this.ctx.listener.positionX.setTargetAtTime(this._pos[0],Howler.ctx.currentTime,.1),this.ctx.listener.positionY.setTargetAtTime(this._pos[1],Howler.ctx.currentTime,.1),this.ctx.listener.positionZ.setTargetAtTime(this._pos[2],Howler.ctx.currentTime,.1)):this.ctx.listener.setPosition(this._pos[0],this._pos[1],this._pos[2]),this):this},HowlerGlobal.prototype.orientation=function(e,t,n,i,r,a){if(!this.ctx||!this.ctx.listener)return this;var s=this._orientation;return(t="number"!=typeof t?s[1]:t,n="number"!=typeof n?s[2]:n,i="number"!=typeof i?s[3]:i,r="number"!=typeof r?s[4]:r,a="number"!=typeof a?s[5]:a,"number"!=typeof e)?s:(this._orientation=[e,t,n,i,r,a],void 0!==this.ctx.listener.forwardX?(this.ctx.listener.forwardX.setTargetAtTime(e,Howler.ctx.currentTime,.1),this.ctx.listener.forwardY.setTargetAtTime(t,Howler.ctx.currentTime,.1),this.ctx.listener.forwardZ.setTargetAtTime(n,Howler.ctx.currentTime,.1),this.ctx.listener.upX.setTargetAtTime(i,Howler.ctx.currentTime,.1),this.ctx.listener.upY.setTargetAtTime(r,Howler.ctx.currentTime,.1),this.ctx.listener.upZ.setTargetAtTime(a,Howler.ctx.currentTime,.1)):this.ctx.listener.setOrientation(e,t,n,i,r,a),this)},Howl.prototype.init=(e=Howl.prototype.init,function(t){return this._orientation=t.orientation||[1,0,0],this._stereo=t.stereo||null,this._pos=t.pos||null,this._pannerAttr={coneInnerAngle:void 0!==t.coneInnerAngle?t.coneInnerAngle:360,coneOuterAngle:void 0!==t.coneOuterAngle?t.coneOuterAngle:360,coneOuterGain:void 0!==t.coneOuterGain?t.coneOuterGain:0,distanceModel:void 0!==t.distanceModel?t.distanceModel:"inverse",maxDistance:void 0!==t.maxDistance?t.maxDistance:1e4,panningModel:void 0!==t.panningModel?t.panningModel:"HRTF",refDistance:void 0!==t.refDistance?t.refDistance:1,rolloffFactor:void 0!==t.rolloffFactor?t.rolloffFactor:1},this._onstereo=t.onstereo?[{fn:t.onstereo}]:[],this._onpos=t.onpos?[{fn:t.onpos}]:[],this._onorientation=t.onorientation?[{fn:t.onorientation}]:[],e.call(this,t)}),Howl.prototype.stereo=function(e,t){var n=this;if(!n._webAudio)return n;if("loaded"!==n._state)return n._queue.push({event:"stereo",action:function(){n.stereo(e,t)}}),n;var r=void 0===Howler.ctx.createStereoPanner?"spatial":"stereo";if(void 0===t)if("number"!=typeof e)return n._stereo;else n._stereo=e,n._pos=[e,0,0];for(var a=n._getSoundIds(t),s=0;s<a.length;s++){var o=n._soundById(a[s]);if(o)if("number"!=typeof e)return o._stereo;else o._stereo=e,o._pos=[e,0,0],o._node&&(o._pannerAttr.panningModel="equalpower",o._panner&&o._panner.pan||i(o,r),"spatial"===r?void 0!==o._panner.positionX?(o._panner.positionX.setValueAtTime(e,Howler.ctx.currentTime),o._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),o._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):o._panner.setPosition(e,0,0):o._panner.pan.setValueAtTime(e,Howler.ctx.currentTime)),n._emit("stereo",o._id)}return n},Howl.prototype.pos=function(e,t,n,r){var a=this;if(!a._webAudio)return a;
1if("loaded"!==a._state)return a._queue.push({event:"pos",action:function(){a.pos(e,t,n,r)}}),a;if(t="number"!=typeof t?0:t,n="number"!=typeof n?-.5:n,void 0===r)if("number"!=typeof e)return a._pos;else a._pos=[e,t,n];for(var s=a._getSoundIds(r),o=0;o<s.length;o++){var l=a._soundById(s[o]);if(l)if("number"!=typeof e)return l._pos;else l._pos=[e,t,n],l._node&&((!l._panner||l._panner.pan)&&i(l,"spatial"),void 0!==l._panner.positionX?(l._panner.positionX.setValueAtTime(e,Howler.ctx.currentTime),l._panner.positionY.setValueAtTime(t,Howler.ctx.currentTime),l._panner.positionZ.setValueAtTime(n,Howler.ctx.currentTime)):l._panner.setPosition(e,t,n)),a._emit("pos",l._id)}return a},Howl.prototype.orientation=function(e,t,n,r){var a=this;if(!a._webAudio)return a;if("loaded"!==a._state)return a._queue.push({event:"orientation",action:function(){a.orientation(e,t,n,r)}}),a;if(t="number"!=typeof t?a._orientation[1]:t,n="number"!=typeof n?a._orientation[2]:n,void 0===r)if("number"!=typeof e)return a._orientation;else a._orientation=[e,t,n];for(var s=a._getSoundIds(r),o=0;o<s.length;o++){var l=a._soundById(s[o]);if(l)if("number"!=typeof e)return l._orientation;else l._orientation=[e,t,n],l._node&&(l._panner||(l._pos||(l._pos=a._pos||[0,0,-.5]),i(l,"spatial")),void 0!==l._panner.orientationX?(l._panner.orientationX.setValueAtTime(e,Howler.ctx.currentTime),l._panner.orientationY.setValueAtTime(t,Howler.ctx.currentTime),l._panner.orientationZ.setValueAtTime(n,Howler.ctx.currentTime)):l._panner.setOrientation(e,t,n)),a._emit("orientation",l._id)}return a},Howl.prototype.pannerAttr=function(){var e,t,n,r=arguments;if(!this._webAudio)return this;if(0===r.length)return this._pannerAttr;if(1===r.length)if("object"!=typeof r[0])return(n=this._soundById(parseInt(r[0],10)))?n._pannerAttr:this._pannerAttr;else e=r[0],void 0===t&&(e.pannerAttr||(e.pannerAttr={coneInnerAngle:e.coneInnerAngle,coneOuterAngle:e.coneOuterAngle,coneOuterGain:e.coneOuterGain,distanceModel:e.distanceModel,maxDistance:e.maxDistance,refDistance:e.refDistance,rolloffFactor:e.rolloffFactor,panningModel:e.panningModel}),this._pannerAttr={coneInnerAngle:void 0!==e.pannerAttr.coneInnerAngle?e.pannerAttr.coneInnerAngle:this._coneInnerAngle,coneOuterAngle:void 0!==e.pannerAttr.coneOuterAngle?e.pannerAttr.coneOuterAngle:this._coneOuterAngle,coneOuterGain:void 0!==e.pannerAttr.coneOuterGain?e.pannerAttr.coneOuterGain:this._coneOuterGain,distanceModel:void 0!==e.pannerAttr.distanceModel?e.pannerAttr.distanceModel:this._distanceModel,maxDistance:void 0!==e.pannerAttr.maxDistance?e.pannerAttr.maxDistance:this._maxDistance,refDistance:void 0!==e.pannerAttr.refDistance?e.pannerAttr.refDistance:this._refDistance,rolloffFactor:void 0!==e.pannerAttr.rolloffFactor?e.pannerAttr.rolloffFactor:this._rolloffFactor,panningModel:void 0!==e.pannerAttr.panningModel?e.pannerAttr.panningModel:this._panningModel});else 2===r.length&&(e=r[0],t=parseInt(r[1],10));for(var a=this._getSoundIds(t),s=0;s<a.length;s++)if(n=this._soundById(a[s])){var o=n._pannerAttr;o={coneInnerAngle:void 0!==e.coneInnerAngle?e.coneInnerAngle:o.coneInnerAngle,coneOuterAngle:void 0!==e.coneOuterAngle?e.coneOuterAngle:o.coneOuterAngle,coneOuterGain:void 0!==e.coneOuterGain?e.coneOuterGain:o.coneOuterGain,distanceModel:void 0!==e.distanceModel?e.distanceModel:o.distanceModel,maxDistance:void 0!==e.maxDistance?e.maxDistance:o.maxDistance,refDistance:void 0!==e.refDistance?e.refDistance:o.refDistance,rolloffFactor:void 0!==e.rolloffFactor?e.rolloffFactor:o.rolloffFactor,panningModel:void 0!==e.panningModel?e.panningModel:o.panningModel};var l=n._panner;l||(n._pos||(n._pos=this._pos||[0,0,-.5]),i(n,"spatial"),l=n._panner),l.coneInnerAngle=o.coneInnerAngle,l.coneOuterAngle=o.coneOuterAngle,l.coneOuterGain=o.coneOuterGain,l.distanceModel=o.distanceModel,l.maxDistance=o.maxDistance,l.refDistance=o.refDistance,l.rolloffFactor=o.rolloffFactor,l.panningModel=o.panningModel}return this},Sound.prototype.init=(t=Sound.prototype.init,function(){var e=this._parent;this._orientation=e._orientation,this._stereo=e._stereo,this._pos=e._pos,this._pannerAttr=e._pannerAttr,t.call(this),this._stereo?e.stereo(this._stereo):this._pos&&e.pos(this._pos[0],this._pos[1],this._pos[2],this._id)}),Sound.prototype.reset=(n=Sound.prototype.reset,function(){var e=this._parent;return this._orientation=e._orientation,this._stereo=e._stereo,this._pos=e._pos,this._pannerAttr=e._pannerAttr,this._stereo?e.stereo(this._stereo):this._pos?e.pos(this._pos[0],this._pos[1],this._pos[2],this._id):this._panner&&(this._panner.disconnect(0),this._panner=void 0,e._refreshBuffer(this)),n.call(this)});var e,t,n,i=function(e,t){"spatial"===(t=t||"spatial")?(e._panner=Howler.ctx.createPanner(),e._panner.coneInnerAngle=e._pannerAttr.coneInnerAngle,e._panner.coneOuterAngle=e._pannerAttr.coneOuterAngle,e._panner.coneOuterGain=e._pannerAttr.coneOuterGain,e._panner.distanceModel=e._pannerAttr.distanceModel,e._panner.maxDistance=e._pannerAttr.maxDistance,e._panner.refDistance=e._pannerAttr.refDistance,e._panner.rolloffFactor=e._pannerAttr.rolloffFactor,e._panner.panningModel=e._pannerAttr.panningModel,void 0!==e._panner.positionX?(e._panner.positionX.setValueAtTime(e._pos[0],Howler.ctx.currentTime),e._panner.positionY.setValueAtTime(e._pos[1],Howler.ctx.currentTime),e._panner.positionZ.setValueAtTime(e._pos[2],Howler.ctx.currentTime)):e._panner.setPosition(e._pos[0],e._pos[1],e._pos[2]),void 0!==e._panner.orientationX?(e._panner.orientationX.setValueAtTime(e._orientation[0],Howler.ctx.currentTime),e._panner.orientationY.setValueAtTime(e._orientation[1],Howler.ctx.currentTime),e._panner.orientationZ.setValueAtTime(e._orientation[2],Howler.ctx.currentTime)):e._panner.setOrientation(e._orientation[0],e._orientation[1],e._orientation[2])):(e._panner=Howler.ctx.createStereoPanner(),e._panner.pan.setValueAtTime(e._stereo,Howler.ctx.currentTime)),e._panner.connect(e._node),e._paused||e._parent.pause(e._id,!0).play(e._id,!0)}}()},88143,(e,t,n)=>{"use strict";function i({widthInt:e,heightInt:t,blurWidth:n,blurHeight:i,blurDataURL:r,objectFit:a}){let s=n?40*n:e,o=i?40*i:t,l=s&&o?`viewBox='0 0 ${s} ${o}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${l}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3Cfe
1ColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${l?"none":"contain"===a?"xMidYMid":"cover"===a?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${r}'/%3E%3C/svg%3E`}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"getImageBlurSvg",{enumerable:!0,get:function(){return i}})},87690,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i={VALID_LOADERS:function(){return a},imageConfigDefault:function(){return s}};for(var r in i)Object.defineProperty(n,r,{enumerable:!0,get:i[r]});let a=["default","imgix","cloudinary","akamai","custom"],s={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumRedirects:3,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1}},8927,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"getImgProps",{enumerable:!0,get:function(){return l}}),e.r(33525);let i=e.r(88143),r=e.r(87690),a=["-moz-initial","fill","none","scale-down",void 0];function s(e){return void 0!==e.default}function o(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function l({src:e,sizes:t,unoptimized:n=!1,priority:l=!1,preload:u=!1,loading:c,className:d,quality:h,width:p,height:f,fill:m=!1,style:g,overrideSrc:v,onLoad:y,onLoadingComplete:x,placeholder:b="empty",blurDataURL:S,fetchPriority:_,decoding:w="async",layout:M,objectFit:T,objectPosition:E,lazyBoundary:A,lazyRoot:C,...P},R){var I;let D,L,F,{imgConf:N,showAltText:U,blurComplete:k,defaultLoader:B}=R,O=N||r.imageConfigDefault;if("allSizes"in O)D=O;else{let e=[...O.deviceSizes,...O.imageSizes].sort((e,t)=>e-t),t=O.deviceSizes.sort((e,t)=>e-t),n=O.qualities?.sort((e,t)=>e-t);D={...O,allSizes:e,deviceSizes:t,qualities:n}}if(void 0===B)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let z=P.loader||B;delete P.loader,delete P.srcSet;let H="__next_img_default"in z;if(H){if("custom"===D.loader)throw Object.defineProperty(Error(`Image with src "${e}" is missing "loader" prop.
2Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=z;z=t=>{let{config:n,...i}=t;return e(i)}}if(M){"fill"===M&&(m=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[M];e&&(g={...g,...e});let n={responsive:"100vw",fill:"100vw"}[M];n&&!t&&(t=n)}let V="",G=o(p),j=o(f);if((I=e)&&"object"==typeof I&&(s(I)||void 0!==I.src)){let t=s(e)?e.default:e;if(!t.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!t.height||!t.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(L=t.blurWidth,F=t.blurHeight,S=S||t.blurDataURL,V=t.src,!m)if(G||j){if(G&&!j){let e=G/t.width;j=Math.round(t.height*e)}else if(!G&&j){let e=j/t.height;G=Math.round(t.width*e)}}else G=t.width,j=t.height}let W=!l&&!u&&("lazy"===c||void 0===c);(!(e="string"==typeof e?e:V)||e.startsWith("data:")||e.startsWith("blob:"))&&(n=!0,W=!1),D.unoptimized&&(n=!0),H&&!D.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(n=!0);let X=o(h),q=Object.assign(m?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:T,objectPosition:E}:{},U?{}:{color:"transparent"},g),Y=k||"empty"===b?null:"blur"===b?`url("data:image/svg+xml;charset=utf-8,${(0,i.getImageBlurSvg)({widthInt:G,heightInt:j,blurWidth:L,blurHeight:F,blurDataURL:S||"",objectFit:q.objectFit})}")`:`url("${b}")`,Z=a.includes(q.objectFit)?"fill"===q.objectFit?"100% 100%":"cover":q.objectFit,K=Y?{backgroundSize:Z,backgroundPosition:q.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:Y}:{},J=function({config:e,src:t,unoptimized:n,width:i,quality:r,sizes:a,loader:s}){if(n)return{src:t,srcSet:void 0,sizes:void 0};let{widths:o,kind:l}=function({deviceSizes:e,allSizes:t},n,i){if(i){let n=/(^|\s)(1?\d?\d)vw/g,r=[];for(let e;e=n.exec(i);)r.push(parseInt(e[2]));if(r.length){let n=.01*Math.min(...r);return{widths:t.filter(t=>t>=e[0]*n),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof n?{widths:e,kind:"w"}:{widths:[...new Set([n,2*n].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,i,a),u=o.length-1;return{sizes:a||"w"!==l?a:"100vw",srcSet:o.map((n,i)=>`${s({config:e,src:t,quality:r,width:n})} ${"w"===l?n:i+1}${l}`).join(", "),src:s({config:e,src:t,quality:r,width:o[u]})}}({config:D,src:e,unoptimized:n,width:G,quality:X,sizes:t,loader:z}),Q=W?"lazy":c;return{props:{...P,loading:Q,fetchPriority:_,width:G,height:j,decoding:w,className:d,style:{...q,...K},sizes:J.sizes,srcSet:J.srcSet,src:v||J.src},meta:{unoptimized:n,preload:u||l,placeholder:b,fill:m}}}},98879,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return o}});let i=e.r(71645),r="undefined"==typeof window,a=r?()=>{}
2:i.useLayoutEffect,s=r?()=>{}:i.useEffect;function o(e){let{headManager:t,reduceComponentsToState:n}=e;function o(){if(t&&t.mountedInstances){let e=i.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(n(e))}}return r&&(t?.mountedInstances?.add(e.children),o()),a(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),a(()=>(t&&(t._pendingUpdate=o),()=>{t&&(t._pendingUpdate=o)})),s(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},25633,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i={default:function(){return m},defaultHead:function(){return d}};for(var r in i)Object.defineProperty(n,r,{enumerable:!0,get:i[r]});let a=e.r(55682),s=e.r(90809),o=e.r(43476),l=s._(e.r(71645)),u=a._(e.r(98879)),c=e.r(42732);function d(){return[(0,o.jsx)("meta",{charSet:"utf-8"},"charset"),(0,o.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function h(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===l.default.Fragment?e.concat(l.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}e.r(33525);let p=["name","httpEquiv","charSet","itemProp"];function f(e){let t,n,i,r;return e.reduce(h,[]).reverse().concat(d().reverse()).filter((t=new Set,n=new Set,i=new Set,r={},e=>{let a=!0,s=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){s=!0;let n=e.key.slice(e.key.indexOf("$")+1);t.has(n)?a=!1:t.add(n)}switch(e.type){case"title":case"base":n.has(e.type)?a=!1:n.add(e.type);break;case"meta":for(let t=0,n=p.length;t<n;t++){let n=p[t];if(e.props.hasOwnProperty(n))if("charSet"===n)i.has(n)?a=!1:i.add(n);else{let t=e.props[n],i=r[n]||new Set;("name"!==n||!s)&&i.has(t)?a=!1:(i.add(t),r[n]=i)}}}return a})).reverse().map((e,t)=>{let n=e.key||t;return l.default.cloneElement(e,{key:n})})}let m=function({children:e}){let t=(0,l.useContext)(c.HeadManagerContext);return(0,o.jsx)(u.default,{reduceComponentsToState:f,headManager:t,children:e})};("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},18556,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ImageConfigContext",{enumerable:!0,get:function(){return a}});let i=e.r(55682)._(e.r(71645)),r=e.r(87690),a=i.default.createContext(r.imageConfigDefault)},65856,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"RouterContext",{enumerable:!0,get:function(){return i}});let i=e.r(55682)._(e.r(71645)).default.createContext(null)},70965,(e,t,n)=>{"use strict";function i(e,t){let n=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-n)<Math.abs(e-n)?t:e,0):n}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"findClosestQuality",{enumerable:!0,get:function(){return i}})},1948,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return a}});let i=e.r(70965);function r({config:e,src:t,width:n,quality:r}){if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns.
3Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let a=(0,i.findClosestQuality)(r,e);return`${e.path}?url=${encodeURIComponent(t)}&w=${n}&q=${a}${t.startsWith("/_next/static/media/")&&1?"&dpl=dpl_Cm9vnuJcnL6kduFSCurPWxJgAKyv":""}`}r.__next_img_default=!0;let a=r},18581,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"useMergedRef",{enumerable:!0,get:function(){return r}});let i=e.r(71645);function r(e,t){let n=(0,i.useRef)(null),r=(0,i.useRef)(null);return(0,i.useCallback)(i=>{if(null===i){let e=n.current;e&&(n.current=null,e());let t=r.current;t&&(r.current=null,t())}else e&&(n.current=a(e,i)),t&&(r.current=a(t,i))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let n=e(t);return"function"==typeof n?n:()=>e(null)}}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esMo
3dule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},85437,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Image",{enumerable:!0,get:function(){return b}});let i=e.r(55682),r=e.r(90809),a=e.r(43476),s=r._(e.r(71645)),o=i._(e.r(74080)),l=i._(e.r(25633)),u=e.r(8927),c=e.r(87690),d=e.r(18556);e.r(33525);let h=e.r(65856),p=i._(e.r(1948)),f=e.r(18581),m={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function g(e,t,n,i,r,a,s){let o=e?.src;e&&e["data-loaded-src"]!==o&&(e["data-loaded-src"]=o,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&r(!0),n?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let i=!1,r=!1;n.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>i,isPropagationStopped:()=>r,persist:()=>{},preventDefault:()=>{i=!0,t.preventDefault()},stopPropagation:()=>{r=!0,t.stopPropagation()}})}i?.current&&i.current(e)}}))}function v(e){return s.use?{fetchPriority:e}:{fetchpriority:e}}"undefined"==typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let y=(0,s.forwardRef)(({src:e,srcSet:t,sizes:n,height:i,width:r,decoding:o,className:l,style:u,fetchPriority:c,placeholder:d,loading:h,unoptimized:p,fill:m,onLoadRef:y,onLoadingCompleteRef:x,setBlurComplete:b,setShowAltText:S,sizesInput:_,onLoad:w,onError:M,...T},E)=>{let A=(0,s.useCallback)(e=>{e&&(M&&(e.src=e.src),e.complete&&g(e,d,y,x,b,p,_))},[e,d,y,x,b,M,p,_]),C=(0,f.useMergedRef)(E,A);return(0,a.jsx)("img",{...T,...v(c),loading:h,width:r,height:i,decoding:o,"data-nimg":m?"fill":"1",className:l,style:u,sizes:n,srcSet:t,src:e,ref:C,onLoad:e=>{g(e.currentTarget,d,y,x,b,p,_)},onError:e=>{S(!0),"empty"!==d&&b(!0),M&&M(e)}})});function x({isAppRouter:e,imgAttributes:t}){let n={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...v(t.fetchPriority)};return e&&o.default.preload?(o.default.preload(t.src,n),null):(0,a.jsx)(l.default,{children:(0,a.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...n},"__nimg-"+t.src+t.srcSet+t.sizes)})}let b=(0,s.forwardRef)((e,t)=>{let n=(0,s.useContext)(h.RouterContext),i=(0,s.useContext)(d.ImageConfigContext),r=(0,s.useMemo)(()=>{let e=m||i||c.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),n=e.deviceSizes.sort((e,t)=>e-t),r=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:n,qualities:r,localPatterns:"undefined"==typeof window?i?.localPatterns:e.localPatterns}},[i]),{onLoad:o,onLoadingComplete:l}=e,f=(0,s.useRef)(o);(0,s.useEffect)(()=>{f.current=o},[o]);let g=(0,s.useRef)(l);(0,s.useEffect)(()=>{g.current=l},[l]);let[v,b]=(0,s.useState)(!1),[S,_]=(0,s.useState)(!1),{props:w,meta:M}=(0,u.getImgProps)(e,{defaultLoader:p.default,imgConf:r,blurComplete:v,showAltText:S});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(y,{...w,unoptimized:M.unoptimized,placeholder:M.placeholder,fill:M.fill,onLoadRef:f,onLoadingCompleteRef:g,setBlurComplete:b,setShowAltText:_,sizesInput:e.sizes,ref:t}),M.preload?(0,a.jsx)(x,{isAppRouter:!n,imgAttributes:w}):null]})});("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},94909,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i={default:function(){return c},getImageProps:function(){return u}};for(var r in i)Object.defineProperty(n,r,{enumerable:!0,get:i[r]});let a=e.r(55682),s=e.r(8927),o=e.r(85437),l=a._(e.r(1948));function u(e){let{props:t}=(0,s.getImgProps)(e,{defaultLoader:l.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,n]of Object.entries(t))void 0===n&&delete t[e];return{props:t}}let c=o.Image},57688,(e,t,n)=>{t.exports=e.r(94909)},52683,e=>{"use strict";let t,n,i,r,a,s,o,l,u,c,d,h,p,f,m,g,v,y,x,b,S,_,w,M,T,E,A,C,P;var R,I,D,L,F,N,U,k,B,O,z,H,V,G,j,W,X,q,Y,Z,K,J,Q,$,ee,et,en,ei,er,ea,es,eo,el=e.i(47167),eu=e.i(43476),ec=e.i(71645),ed=ec,eh=ec;let ep={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},ef={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},em="attached",eg="detached",ev=1016,ey="srgb",ex="srgb-linear",eb="linear",eS="srgb",e_="300 es",ew={COMPUTE:"compute",RENDER:"render"},eM={PERSPECTIVE:"perspective",LINEAR:"linear",FLAT:"flat"},eT={NORMAL:"normal",CENTROID:"centroid",SAMPLE:"sample",FIRST:"first",EITHER:"either"};function eE(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}let eA={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function eC(e,t){return new eA[e](t)}function eP(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function eR(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}function eI(){let e=eR("canvas");return e.style.display="block",e}let eD={},eL=null;function eF(e){eL=e}function eN(){return eL}function eU(...e){let t="THREE."+e.shift();eL?eL("log",t,...e):console.log(t,...e)}function ek(...e){let t="THREE."+e.shift();eL?eL("warn",t,...e):console.warn(t,...e)}function eB(...e){let t="THREE."+e.shift();eL?eL("error",t,...e):console.error(t,...e)}function eO(...e){let t=e.join(" ");t in eD||(eD[t]=!0,ek(...e))}class ez{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});let n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){let n=this._listeners;return void 0!==n&&void 0!==n[e]&&-1!==n[e].indexOf(t)}removeEventListener(e,t){let n=this._listeners;if(void 0===n)return;let i=n[e];if(void 0!==i){let e=i.indexOf(t);-1!==e&&i.splice(e,1)}}dispatchEvent(e){let t=this._listeners;if(void 0===t)return;let n=t[e.type];if(void 0!==n){e.target=this;let t=n.slice(0);for(let n=0,i=t.length;n<i;n++)t[n].call(this,e);e.target=null}}}let eH=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","5
35","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"],eV=1234567,eG=Math.PI/180,ej=180/Math.PI;function eW(){let e=0xffffffff*Math.random()|0,t=0xffffffff*Math.random()|0,n=0xffffffff*Math.random()|0,i=0xffffffff*Math.random()|0;return(eH[255&e]+eH[e>>8&255]+eH[e>>16&255]+eH[e>>24&255]+"-"+eH[255&t]+eH[t>>8&255]+"-"+eH[t>>16&15|64]+eH[t>>24&255]+"-"+eH[63&n|128]+eH[n>>8&255]+"-"+eH[n>>16&255]+eH[n>>24&255]+eH[255&i]+eH[i>>8&255]+eH[i>>16&255]+eH[i>>24&255]).toLowerCase()}function eX(e,t,n){return Math.max(t,Math.min(n,e))}function eq(e,t){return(e%t+t)%t}function eY(e,t,n){return(1-n)*e+n*t}function eZ(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 eK(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 eJ={DEG2RAD:eG,RAD2DEG:ej,generateUUID:eW,clamp:eX,euclideanModulo:eq,mapLinear:function(e,t,n,i,r){return i+(e-t)*(r-i)/(n-t)},inverseLerp:function(e,t,n){return e!==t?(n-e)/(t-e):0},lerp:eY,damp:function(e,t,n,i){return eY(e,t,1-Math.exp(-n*i))},pingpong:function(e,t=1){return t-Math.abs(eq(e,2*t)-t)},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-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&&(eV=e);let t=eV+=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*eG},radToDeg:function(e){return e*ej},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,n,i,r){let a=Math.cos,s=Math.sin,o=a(n/2),l=s(n/2),u=a((t+i)/2),c=s((t+i)/2),d=a((t-i)/2),h=s((t-i)/2),p=a((i-t)/2),f=s((i-t)/2);switch(r){case"XYX":e.set(o*c,l*d,l*h,o*u);break;case"YZY":e.set(l*h,o*c,l*d,o*u);break;case"ZXZ":e.set(l*d,l*h,o*c,o*u);break;case"XZX":e.set(o*c,l*f,l*p,o*u);break;case"YXY":e.set(l*p,o*c,l*f,o*u);break;case"ZYZ":e.set(l*f,l*p,o*c,o*u);break;default:ek("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}},normalize:eK,denormalize:eZ};class eQ{constructor(e=0,t=0){eQ.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}
vendor: 5,499 bytes, line 3
3sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,n=this.y,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6],this.y=i[1]*t+i[4]*n+i[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=eX(this.x,e.x,t.x),this.y=eX(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=eX(this.x,e,t),this.y=eX(this.y,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(eX(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());return 0===t?Math.PI/2:Math.acos(eX(this.dot(e)/t,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let n=Math.cos(t),i=Math.sin(t),r=this.x-e.x,a=this.y-e.y;return this.x=r*n-a*i+e.x,this.y=r*i+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class e${constructor(e=0,t=0,n=0,i=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=i}static slerpFlat(e,t,n,i,r,a,s){let o=n[i+0],l=n[i+1],u=n[i+2],c=n[i+3],d=r[a+0],h=r[a+1],p=r[a+2],f=r[a+3];if(s<=0){e[t+0]=o,e[t+1]=l,e[t+2]=u,e[t+3]=c;return}if(s>=1){e[t+0]=d,e[t+1]=h,e[t+2]=p,e[t+3]=f;return}if(c!==f||o!==d||l!==h||u!==p){let e=o*d+l*h+u*p+c*f;e<0&&(d=-d,h=-h,p=-p,f=-f,e=-e);let t=1-s;if(e<.9995){let n=Math.acos(e),i=Math.sin(n);o=o*(t=Math.sin(t*n)/i)+d*(s=Math.sin(s*n)/i),l=l*t+h*s,u=u*t+p*s,c=c*t+f*s}else{let e=1/Math.sqrt((o=o*t+d*s)*o+(l=l*t+h*s)*l+(u=u*t+p*s)*u+(c=c*t+f*s)*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,n,i,r,a){let s=n[i],o=n[i+1],l=n[i+2],u=n[i+3],c=r[a],d=r[a+1],h=r[a+2],p=r[a+3];return e[t]=s*p+u*c+o*h-l*d,e[t+1]=o*p+u*d+l*c-s*h,e[t+2]=l*p+u*h+s*d-o*c,e[t+3]=u*p-s*c-o*d-l*h,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,i){return this._x=e,this._y=t,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){let n=e._x,i=e._y,r=e._z,a=e._order,s=Math.cos,o=Math.sin,l=s(n/2),u=s(i/2),c=s(r/2),d=o(n/2),h=o(i/2),p=o(r/2);switch(a){case"XYZ":this._x=d*u*c+l*h*p,this._y=l*h*c-d*u*p,this._z=l*u*p+d*h*c,this._w=l*u*c-d*h*p;break;case"YXZ":this._x=d*u*c+l*h*p,this._y=l*h*c-d*u*p,this._z=l*u*p-d*h*c,this._w=l*u*c+d*h*p;break;case"ZXY":this._x=d*u*c-l*h*p,this._y=l*h*c+d*u*p,this._z=l*u*p+d*h*c,this._w=l*u*c-d*h*p;break;case"ZYX":this._x=d*u*c-l*h*p,this._y=l*h*c+d*u*p,this._z=l*u*p-d*h*c,this._w=l*u*c+d*h*p;break;case"YZX":this._x=d*u*c+l*h*p,this._y=l*h*c+d*u*p,this._z=l*u*p-d*h*c,this._w=l*u*c-d*h*p;break;case"XZY":this._x=d*u*c-l*h*p,this._y=l*h*c-d*u*p,this._z=l*u*p+d*h*c,this._w=l*u*c+d*h*p;break;default:ek("Quaternion: .setFromEuler() encountered an unknown order: "+a)}return!0===t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let n=t/2,i=Math.sin(n);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,n=t[0],i=t[4],r=t[8],a=t[1],s=t[5],o=t[9],l=t[2],u=t[6],c=t[10],d=n+s+c;if(d>0){let e=.5/Math.sqrt(d+1);this._w=.25/e,this._x=(u-o)*e,this._y=(r-l)*e,this._z=(a-i)*e}else if(n>s&&n>c){let e=2*Math.sqrt(1+n-s-c);this._w=(u-o)/e,this._x=.25*e,this._y=(i+a)/e,this._z=(r+l)/e}else if(s>c){let e=2*Math.sqrt(1+s-n-c);this._w=(r-l)/e,this._x=(i+a)/e,this._y=.25*e,this._z=(o+u)/e}else{let e=2*Math.sqrt(1+c-n-s);this._w=(a-i)/e,this._x=(r+l)/e,this._y=(o+u)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<1e-8?(n=0,Math.abs(e.x)>
vendor: 4,491 bytes, line 3
3Math.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=n,this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(eX(this.dot(e),-1,1)))}rotateTowards(e,t){let n=this.angleTo(e);if(0===n)return this;let i=Math.min(1,t/n);return this.slerp(e,i),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 n=e._x,i=e._y,r=e._z,a=e._w,s=t._x,o=t._y,l=t._z,u=t._w;return this._x=n*u+a*s+i*l-r*o,this._y=i*u+a*o+r*s-n*l,this._z=r*u+a*l+n*o-i*s,this._w=a*u-n*s-i*o-r*l,this._onChangeCallback(),this}slerp(e,t){if(t<=0)return this;if(t>=1)return this.copy(e);let n=e._x,i=e._y,r=e._z,a=e._w,s=this.dot(e);s<0&&(n=-n,i=-i,r=-r,a=-a,s=-s);let o=1-t;if(s<.9995){let e=Math.acos(s),l=Math.sin(e);o=Math.sin(o*e)/l,t=Math.sin(t*e)/l,this._x=this._x*o+n*t,this._y=this._y*o+i*t,this._z=this._z*o+r*t,this._w=this._w*o+a*t,this._onChangeCallback()}else this._x=this._x*o+n*t,this._y=this._y*o+i*t,this._z=this._z*o+r*t,this._w=this._w*o+a*t,this.normalize();return this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),i=Math.sqrt(1-n),r=Math.sqrt(n);return this.set(i*Math.sin(e),i*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 e0{constructor(e=0,t=0,n=0){e0.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw 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(e2.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(e2.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,n=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6]*i,this.y=r[1]*t+r[4]*n+r[7]*i,this.z=r[2]*t+r[5]*n+r[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,n=this.y,i=this.z,r=e.elements,a=1/(r[3]*t+r[7]*n+r[11]*i+r[15]);return this.x=(r[0]*t+r[4]*n+r[8]*i+r[12])*a,this.y=(r[1]*t+r[5]*n+r[9]*i+r[13])*a,this.z=(r[2]*t+r[6]*n+r[10]*i+r[14])*a,this}
vendor: 7,685 bytes, line 3
3applyQuaternion(e){let t=this.x,n=this.y,i=this.z,r=e.x,a=e.y,s=e.z,o=e.w,l=2*(a*i-s*n),u=2*(s*t-r*i),c=2*(r*n-a*t);return this.x=t+o*l+a*c-s*u,this.y=n+o*u+s*l-r*c,this.z=i+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,n=this.y,i=this.z,r=e.elements;return this.x=r[0]*t+r[4]*n+r[8]*i,this.y=r[1]*t+r[5]*n+r[9]*i,this.z=r[2]*t+r[6]*n+r[10]*i,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=eX(this.x,e.x,t.x),this.y=eX(this.y,e.y,t.y),this.z=eX(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=eX(this.x,e,t),this.y=eX(this.y,e,t),this.z=eX(this.z,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(eX(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let n=e.x,i=e.y,r=e.z,a=t.x,s=t.y,o=t.z;return this.x=i*o-r*s,this.y=r*a-n*o,this.z=n*s-i*a,this}projectOnVector(e){let t=e.lengthSq();if(0===t)return this.set(0,0,0);let n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return e1.copy(this).projectOnVector(e),this.sub(e1)}reflect(e){return this.sub(e1.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(eX(this.dot(e)/t,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y,i=this.z-e.z;return t*t+n*n+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){let i=Math.sin(t)*e;return this.x=i*Math.sin(n),this.y=Math.cos(t)*e,this.z=i*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=i,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,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}let e1=new e0,e2=new e$;class e3{constructor(e,t,n,i,r,a,s,o,l){e3.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==e&&this.set(e,t,n,i,r,a,s,o,l)}set(e,t,n,i,r,a,s,o,l){let u=this.elements;return u[0]=e,u[1]=i,u[2]=s,u[3]=t,u[4]=r,u[5]=o,u[6]=n,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,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,i=t.elements,r=this.elements,a=n[0],s=n[3],o=n[6],l=n[1],u=n[4],c=n[7],d=n[2],h=n[5],p=n[8],f=i[0],m=i[3],g=i[6],v=i[1],y=i[4],x=i[7],b=i[2],S=i[5],_=i[8];return r[0]=a*f+s*v+o*b,r[3]=a*m+s*y+o*S,r[6]=a*g+s*x+o*_,r[1]=l*f+u*v+c*b,r[4]=l*m+u*y+c*S,r[7]=l*g+u*x+c*_,r[2]=d*f+h*v+p*b,r[5]=d*m+h*y+p*S,r[8]=d*g+h*x+p*_,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[1],i=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-n*r*u+n*s*o+i*r*l-i*a*o}invert(){let e=this.elements,t=e[0],n=e[1],i=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,d=s*o-u*r,h=l*r-a*o,p=t*c+n*d+i*h;if(0===p)return this.set(0,0,0,0,0,0,0,0,0);let f=1/p;return e[0]=c*f,e[1]=(i*l-u*n)*f,e[2]=(s*n-i*a)*f,e[3]=d*f,e[4]=(u*t-i*o)*f,e[5]=(i*r-s*t)*f,e[6]=h*f,e[7]=(n*o-l*t)*f,e[8]=(a*t-n*r)*f,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,i,r,a,s){let o=Math.cos(r),l=Math.sin(r);return this.set(n*o,n*l,-n*(o*a+l*s)+a+e,-i*l,i*o,-i*(-l*a+o*s)+s+t,0,0,1),this}scale(e,t){return this.premultiply(e4.makeScale(e,t)),this}rotate(e){return this.premultiply(e4.makeRotation(-e)),this}translate(e,t){return this.premultiply(e4.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){let t=this.elements,n=e.elements;for(let e=0;e<9;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}}let e4=new e3,e5=new e3().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),e6=new e3().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.20397
37,1.0569715),e8=(m=[.64,.33,.3,.6,.15,.06],g=[.2126,.7152,.0722],v=[.3127,.329],(f={enabled:!0,workingColorSpace:ex,spaces:{},convert:function(e,t,n){return!1!==this.enabled&&t!==n&&t&&n&&(this.spaces[t].transfer===eS&&(e.r=e9(e.r),e.g=e9(e.g),e.b=e9(e.b)),this.spaces[t].primaries!==this.spaces[n].primaries&&(e.applyMatrix3(this.spaces[t].toXYZ),e.applyMatrix3(this.spaces[n].fromXYZ)),this.spaces[n].transfer===eS&&(e.r=e7(e.r),e.g=e7(e.g),e.b=e7(e.b))),e},workingToColorSpace:function(e,t){return this.convert(e,this.workingColorSpace,t)},colorSpaceToWorking:function(e,t){return this.convert(e,t,this.workingColorSpace)},getPrimaries:function(e){return this.spaces[e].primaries},getTransfer:function(e){return""===e?eb:this.spaces[e].transfer},getToneMappingMode:function(e){return this.spaces[e].outputColorSpaceConfig.toneMappingMode||"standard"},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,n){return e.copy(this.spaces[t].toXYZ).multiply(this.spaces[n].fromXYZ)},_getDrawingBufferColorSpace:function(e){return this.spaces[e].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(e=this.workingColorSpace){return this.spaces[e].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(e,t){return eO("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),f.workingToColorSpace(e,t)},toWorkingColorSpace:function(e,t){return eO("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),f.colorSpaceToWorking(e,t)}}).define({[ex]:{primaries:m,whitePoint:v,transfer:eb,toXYZ:e5,fromXYZ:e6,luminanceCoefficients:g,workingColorSpaceConfig:{unpackColorSpace:ey},outputColorSpaceConfig:{drawingBufferColorSpace:ey}},[ey]:{primaries:m,whitePoint:v,transfer:eS,toXYZ:e5,fromXYZ:e6,luminanceCoefficients:g,outputColorSpaceConfig:{drawingBufferColorSpace:ey}}}),f);function e9(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function e7(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}class te{static getDataURL(e,n="image/png"){let i;if(/^data:/i.test(e.src)||"undefined"==typeof HTMLCanvasElement)return e.src;if(e instanceof HTMLCanvasElement)i=e;else{void 0===t&&(t=eR("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.toDataURL(n)}static sRGBToLinear(e){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){let t=eR("canvas");t.width=e.width,t.height=e.height;let n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);let i=n.getImageData(0,0,e.width,e.height),r=i.data;for(let e=0;e<r.length;e++)r[e]=255*e9(r[e]/255);return n.putImageData(i,0,0),t}if(!e.data)return ek("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*e9(t[e]/255)):t[e]=e9(t[e]);return{data:t,width:e.width,height:e.height}}}}let tt=0;class tn{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:tt++}),this.uuid=eW(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){let t=this.data;return"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight,0):"undefined"!=typeof VideoFrame&&t instanceof VideoFrame?e.set(t.displayHeight,t.displayWidth,0):null!==t?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}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 n={uuid:this.uuid,url:""},i=this.data;if(null!==i){let e;if(Array.isArray(i)){e=[];for(let t=0,n=i.length;t<n;t++)i[t].isDataTexture?e.push(ti(i[t].image)):e.push(ti(i[t]))}else e=ti(i);n.url=e}return t||(e.images[this.uuid]=n),n}}function ti(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap?te.getDataURL(e):e.data?{data:Array.from(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(ek("Texture: Unable to serialize Texture."),{})}let tr=0,ta=new e0;class ts extends ez{constructor(e=ts.DEFAULT_IMAGE,t=ts.DEFAULT_MAPPING,n=1001,i=1001,r=1006,a=1008,s=1023,o=1009,l=ts.DEFAULT_ANISOTROPY,u=""){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:tr++}),this.uuid=eW(),this.name="",this.source=new tn(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=n,this.wrapT=i,this.magFilter=r,this.minFilter=a,this.anisotropy=l,this.format=s,this.internalFormat=null,this.type=o,this.offset=new eQ(0,0),this.repeat=new eQ(1,1),this.center=new eQ(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new e3,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace
3=u,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!e&&!!e.depth&&e.depth>1,this.pmremVersion=0}get width(){return this.source.getSize(ta).x}get height(){return this.source.getSize(ta).y}get depth(){return this.source.getSize(ta).z}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)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}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.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(let t in e){let n=e[t];if(void 0===n){ek(`Texture.setValues(): parameter '${t}' has value of undefined.`);continue}let i=this[t];if(void 0===i){ek(`Texture.setValues(): property '${t}' does not exist.`);continue}i&&n&&i.isVector2&&n.isVector2||i&&n&&i.isVector3&&n.isVector3||i&&n&&i.isMatrix3&&n.isMatrix3?i.copy(n):this[t]=n}}toJSON(e){let t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];let n={metadata:{version:4.7,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&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}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++}}ts.DEFAULT_IMAGE=null,ts.DEFAULT_MAPPING=300,ts.DEFAULT_ANISOTROPY=1;class to{constructor(e=0,t=0,n=0,i=1){to.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,i){return this.x=e,this.y=t,this.z=n,this.w=i,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}
3sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,n=this.y,i=this.z,r=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*i+a[12]*r,this.y=a[1]*t+a[5]*n+a[9]*i+a[13]*r,this.z=a[2]*t+a[6]*n+a[10]*i+a[14]*r,this.w=a[3]*t+a[7]*n+a[11]*i+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,n,i,r,a=e.elements,s=a[0],o=a[4],l=a[8],u=a[1],c=a[5],d=a[9],h=a[2],p=a[6],f=a[10];if(.01>Math.abs(o-u)&&.01>Math.abs(l-h)&&.01>Math.abs(d-p)){if(.1>Math.abs(o+u)&&.1>Math.abs(l+h)&&.1>Math.abs(d+p)&&.1>Math.abs(s+c+f-3))return this.set(1,0,0,0),this;t=Math.PI;let e=(s+1)/2,a=(c+1)/2,m=(f+1)/2,g=(o+u)/4,v=(l+h)/4,y=(d+p)/4;return e>a&&e>m?e<.01?(n=0,i=.707106781,r=.707106781):(i=g/(n=Math.sqrt(e)),r=v/n):a>m?a<.01?(n=.707106781,i=0,r=.707106781):(n=g/(i=Math.sqrt(a)),r=y/i):m<.01?(n=.707106781,i=.707106781,r=0):(n=v/(r=Math.sqrt(m)),i=y/r),this.set(n,i,r,t),this}let m=Math.sqrt((p-d)*(p-d)+(l-h)*(l-h)+(u-o)*(u-o));return .001>Math.abs(m)&&(m=1),this.x=(p-d)/m,this.y=(l-h)/m,this.z=(u-o)/m,this.w=Math.acos((s+c+f-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=eX(this.x,e.x,t.x),this.y=eX(this.y,e.y,t.y),this.z=eX(this.z,e.z,t.z),this.w=eX(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=eX(this.x,e,t),this.y=eX(this.y,e,t),this.z=eX(this.z,e,t),this.w=eX(this.w,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(eX(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class tl extends ez{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:1006,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},n),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=n.depth,this.scissor=new to(0,0,e,t),this.scissorTest=!1,this.viewport=new to(0,0,e,t);const i=new ts({width:e,height:t,depth:n.depth});this.textures=[];const r=n.count;for(let e=0;e<r;e++)this.textures[e]=i.clone(),this.textures[e].isRenderTargetTexture=!0,this.textures[e].renderTarget=this;this._setTextureOptions(n),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=n.depthTexture,this.samples=n.samples,this.multiview=n.multiview}_setTextureOptions(e={}){let t={minFilter:1006,generateMipmaps:!1,flipY:!1,internalFormat:null};void 0!==e.mapping&&(t.mapping=e.mapping),void 0!==e.wrapS&&(t.wrapS=e.wrapS),void 0!==e.wrapT&&(t.wrapT=e.wrapT),void 0!==e.wrapR&&(t.wrapR=e.wrapR),void 0!==e.magFilter&&(t.magFilter=e.magFilter),void 0!==e.minFilter&&(t.minFilter=e.minFilter),void 0!==e.format&&(t.format=e.format),void 0!==e.type&&(t.type=e.type),void 0!==e.anisotropy&&(t.anisotropy=e.anisotropy),void 0!==e.colorSpace&&(t.colorSpace
vendor: 4,478 bytes, line 3
3=e.colorSpace),void 0!==e.flipY&&(t.flipY=e.flipY),void 0!==e.generateMipmaps&&(t.generateMipmaps=e.generateMipmaps),void 0!==e.internalFormat&&(t.internalFormat=e.internalFormat);for(let e=0;e<this.textures.length;e++)this.textures[e].setValues(t)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){null!==this._depthTexture&&(this._depthTexture.renderTarget=null),null!==e&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let i=0,r=this.textures.length;i<r;i++)this.textures[i].image.width=e,this.textures[i].image.height=t,this.textures[i].image.depth=n,!0!==this.textures[i].isData3DTexture&&(this.textures[i].isArrayTexture=this.textures[i].image.depth>1);this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t<n;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;let n=Object.assign({},e.textures[t].image);this.textures[t].source=new tn(n)}return 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 tu extends tl{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}}class tc extends ts{constructor(e=null,t=1,n=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:i},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 td extends tu{constructor(e=1,t=1,n=1,i={}){super(e,t,i),this.isWebGLArrayRenderTarget=!0,this.depth=n,this.texture=new tc(null,e,t,n),this._setTextureOptions(i),this.texture.isRenderTargetTexture=!0}}class th extends ts{constructor(e=null,t=1,n=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:i},this.magFilter=1003,this.minFilter=1003,this.wrapR=1001,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class tp extends tu{constructor(e=1,t=1,n=1,i={}){super(e,t,i),this.isWebGL3DRenderTarget=!0,this.depth=n,this.texture=new th(null,e,t,n),this._setTextureOptions(i),this.texture.isRenderTargetTexture=!0}}class tf{constructor(e=new e0(Infinity,Infinity,Infinity),t=new e0(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(tg.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(tg.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){let n=tg.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=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 n=e.geometry;if(void 0!==n){let i=n.getAttribute("position");if(!0===t&&void 0!==i&&!0!==e.isInstancedMesh)for(let t=0,n=i.count;t<n;t++)!0===e.isMesh?e.getVertexPosition(t,tg):tg.fromBufferAttribute(i,t),tg.applyM
vendor: 4,770 bytes, line 3
3atrix4(e.matrixWorld),this.expandByPoint(tg);else void 0!==e.boundingBox?(null===e.boundingBox&&e.computeBoundingBox(),tv.copy(e.boundingBox)):(null===n.boundingBox&&n.computeBoundingBox(),tv.copy(n.boundingBox)),tv.applyMatrix4(e.matrixWorld),this.union(tv)}let i=e.children;for(let e=0,n=i.length;e<n;e++)this.expandByObject(i[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,tg),tg.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(tM),tT.subVectors(this.max,tM),ty.subVectors(e.a,tM),tx.subVectors(e.b,tM),tb.subVectors(e.c,tM),tS.subVectors(tx,ty),t_.subVectors(tb,tx),tw.subVectors(ty,tb);let t=[0,-tS.z,tS.y,0,-t_.z,t_.y,0,-tw.z,tw.y,tS.z,0,-tS.x,t_.z,0,-t_.x,tw.z,0,-tw.x,-tS.y,tS.x,0,-t_.y,t_.x,0,-tw.y,tw.x,0];return!!tC(t,ty,tx,tb,tT)&&!!tC(t=[1,0,0,0,1,0,0,0,1],ty,tx,tb,tT)&&(tE.crossVectors(tS,t_),tC(t=[tE.x,tE.y,tE.z],ty,tx,tb,tT))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,tg).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=.5*this.getSize(tg).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()||(tm[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),tm[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),tm[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),tm[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),tm[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),tm[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),tm[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),tm[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(tm)),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}}let tm=[new e0,new e0,new e0,new e0,new e0,new e0,new e0,new e0],tg=new e0,tv=new tf,ty=new e0,tx=new e0,tb=new e0,tS=new e0,t_=new e0,tw=new e0,tM=new e0,tT=new e0,tE=new e0,tA=new e0;function tC(e,t,n,i,r){for(let a=0,s=e.length-3;a<=s;a+=3){tA.fromArray(e,a);let s=r.x*Math.abs(tA.x)+r.y*Math.abs(tA.y)+r.z*Math.abs(tA.z),o=t.dot(tA),l=n.dot(tA),u=i.dot(tA);if(Math.max(-Math.max(o,l,u),Math.min(o,l,u))>s)return!1}return!0}let tP=new tf,tR=new e0,tI=new e0;class tD{constructor(e=new e0,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){let n=this.center;void 0!==t?n.copy(t):tP.setFromPoints(e).getCenter(n);let i=0;for(let t=0,r=e.length;t<r;t++)i=Math.max(i,n.distanceToSquared(e[t]));return this.radius=Math.sqrt(i),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){let t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){let n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?e.makeEmpty():(e.set(this.center,this.center),e.expandByScalar(this.radius)),e}
3applyMatrix4(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;tR.subVectors(e,this.center);let t=tR.lengthSq();if(t>this.radius*this.radius){let e=Math.sqrt(t),n=(e-this.radius)*.5;this.center.addScaledVector(tR,n/e),this.radius+=n}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):(tI.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(tR.copy(e.center).add(tI)),this.expandByPoint(tR.copy(e.center).sub(tI)))),this}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}}let tL=new e0,tF=new e0,tN=new e0,tU=new e0,tk=new e0,tB=new e0,tO=new e0;class tz{constructor(e=new e0,t=new e0(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,tL)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=tL.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(tL.copy(this.origin).addScaledVector(this.direction,t),tL.distanceToSquared(e))}distanceSqToSegment(e,t,n,i){let r,a,s,o;tF.copy(e).add(t).multiplyScalar(.5),tN.copy(t).sub(e).normalize(),tU.copy(this.origin).sub(tF);let l=.5*e.distanceTo(t),u=-this.direction.dot(tN),c=tU.dot(this.direction),d=-tU.dot(tN),h=tU.lengthSq(),p=Math.abs(1-u*u);if(p>0)if(r=u*d-c,a=u*c-d,o=l*p,r>=0)if(a>=-o)if(a<=o){let e=1/p;r*=e,a*=e,s=r*(r+u*a+2*c)+a*(u*r+a+2*d)+h}else s=-(r=Math.max(0,-(u*(a=l)+c)))*r+a*(a+2*d)+h;else s=-(r=Math.max(0,-(u*(a=-l)+c)))*r+a*(a+2*d)+h;else a<=-o?(a=(r=Math.max(0,-(-u*l+c)))>0?-l:Math.min(Math.max(-l,-d),l),s=-r*r+a*(a+2*d)+h):a<=o?(r=0,s=(a=Math.min(Math.max(-l,-d),l))*(a+2*d)+h):(a=(r=Math.max(0,-(u*l+c)))>0?l:Math.min(Math.max(-l,-d),l),s=-r*r+a*(a+2*d)+h);else a=u>0?-l:l,s=-(r=Math.max(0,-(u*a+c)))*r+a*(a+2*d)+h;return n&&n.copy(this.origin).addScaledVector(this.direction,r),i&&i.copy(tF).addScaledVector(tN,a),s}intersectSphere(e,t){tL.subVectors(e.center,this.origin);let n=tL.dot(this.direction),i=tL.dot(tL)-n*n,r=e.radius*e.radius;if(i>r)return null;let a=Math.sqrt(r-i),s=n-a,o=n+a;return o<0?null:s<0?this.at(o,t):this.at(s,t)}intersectsSphere(e){return!(e.radius<0)&&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 n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){let n=this.distanceToPlane(e);return null===n?null:this.at(n,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return!!(0===t||e.normal.dot(this.direction)*t<0)}intersectBox(e,t){let n,i,r,a,s,o,l=1/this.direction.x,u=1/this.direction.y,c=1/this.direction.z,d=this.origin;return(l>=0?(n=(e.min.x-d.x)*l,i=(e.max.x-d.x)*l):(n=(e.max.x-d.x)*l,i=(e.min.x-d.x)*l),u>=0?(r=(e.min.y-d.y)*u,a=(e.max.y-d.y)*u):(r=(e.max.y-d.y)*u,a=(e.min.y-d.y)*u),n>a||r>i||((r>n||isNaN(n))&&(n=r),(a<i||isNaN(i))&&(i=a),c>=0?(s=(e.min.z-d.z)*c,o=(e.max.z-d.z)*c):(s=(e.max.z-d.z)*c,o=(e.min.z-d.z)*c),n>o||s>i||((s>n||n!=n)&&(n=s),(o<i||i!=i)&&(i=o),i<0)))?null:this.at(n>=0?n:i,t)}intersectsBox(e){return null!==this.intersectBox(e,tL)}intersectTriangle(e,t,n,i,r){let a;tk.subVectors(t,e),tB.subVectors(n,e),tO.crossVectors(tk,tB);let s=this.direction.dot(tO);if(s>0){if(i)return null;a=1}else{if(!(s<0))return null;a=-1,s=-s}tU.subVectors(this.origin,e);let o=a*this.direction.dot(tB.crossVectors(tU,tB));if(o<0)return null;let l=a*this.direction.dot(tk.cross(tU));if(l<0||o+l>s)return null;let u=-a*tU.dot(tO);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 tH{constructor(e,t,n,i,r,a,s,o,l,u,c,d,h,p,f,m){tH.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,n,i,r,a,s,o,l,u,c,d,h,p,f,m)}set(e,t,n,i,r,a,s,o,l,u,c,d,h,p,f,m){let g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=i,g[1]=r,g[5]=a,g[9]=s,g[13]=o,g[2]=l,g[6]=u,g[10]=c,g[14]=d,g[3]=h,g[7]=p,g[11]=f,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 tH().fromArray(this.elements)}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){let t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return 0===this.determinant()?(e.set(1,0,0),t.set(0,1,0),n.set(0,0,1)):(e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2)),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){if(0===e.determinant())return this.identity();let t=this.elements,n=e.elements,i=1/tV.setFromMatrixColumn(e,0).length(),r=1/tV.setFromMatrixColumn(e,1).length(),a=1/tV.setFromMatrixColumn(e,2).length();return t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i,t[3]=0,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){let t=this.elements,n=e.x,i=e.y,r=e.z,a=Math.cos(n),s=Math.sin(n),o=Math.cos(i),l=Math.sin(i),u=Math.cos(r),c=Math.sin(r);if("XYZ"===e.order){let e=a*u,n=a*c,i=s*u,r=s*c;t[0]=o*u,t[4]=-o*c,t[8]=l,t[1]=n+i*l,t[5]=e-r*l,t[9]=-s*o,t[2]=r-e*l,t[6]=i+n*l,t[10]=a*o}
vendor: 5,966 bytes, line 3
3else if("YXZ"===e.order){let e=o*u,n=o*c,i=l*u,r=l*c;t[0]=e+r*s,t[4]=i*s-n,t[8]=a*l,t[1]=a*c,t[5]=a*u,t[9]=-s,t[2]=n*s-i,t[6]=r+e*s,t[10]=a*o}else if("ZXY"===e.order){let e=o*u,n=o*c,i=l*u,r=l*c;t[0]=e-r*s,t[4]=-a*c,t[8]=i+n*s,t[1]=n+i*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,n=a*c,i=s*u,r=s*c;t[0]=o*u,t[4]=i*l-n,t[8]=e*l+r,t[1]=o*c,t[5]=r*l+e,t[9]=n*l-i,t[2]=-l,t[6]=s*o,t[10]=a*o}else if("YZX"===e.order){let e=a*o,n=a*l,i=s*o,r=s*l;t[0]=o*u,t[4]=r-e*c,t[8]=i*c+n,t[1]=c,t[5]=a*u,t[9]=-s*u,t[2]=-l*u,t[6]=n*c+i,t[10]=e-r*c}else if("XZY"===e.order){let e=a*o,n=a*l,i=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]=n*c-i,t[2]=i*c-n,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(tj,e,tW)}lookAt(e,t,n){let i=this.elements;return tY.subVectors(e,t),0===tY.lengthSq()&&(tY.z=1),tY.normalize(),tX.crossVectors(n,tY),0===tX.lengthSq()&&(1===Math.abs(n.z)?tY.x+=1e-4:tY.z+=1e-4,tY.normalize(),tX.crossVectors(n,tY)),tX.normalize(),tq.crossVectors(tY,tX),i[0]=tX.x,i[4]=tq.x,i[8]=tY.x,i[1]=tX.y,i[5]=tq.y,i[9]=tY.y,i[2]=tX.z,i[6]=tq.z,i[10]=tY.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,i=t.elements,r=this.elements,a=n[0],s=n[4],o=n[8],l=n[12],u=n[1],c=n[5],d=n[9],h=n[13],p=n[2],f=n[6],m=n[10],g=n[14],v=n[3],y=n[7],x=n[11],b=n[15],S=i[0],_=i[4],w=i[8],M=i[12],T=i[1],E=i[5],A=i[9],C=i[13],P=i[2],R=i[6],I=i[10],D=i[14],L=i[3],F=i[7],N=i[11],U=i[15];return r[0]=a*S+s*T+o*P+l*L,r[4]=a*_+s*E+o*R+l*F,r[8]=a*w+s*A+o*I+l*N,r[12]=a*M+s*C+o*D+l*U,r[1]=u*S+c*T+d*P+h*L,r[5]=u*_+c*E+d*R+h*F,r[9]=u*w+c*A+d*I+h*N,r[13]=u*M+c*C+d*D+h*U,r[2]=p*S+f*T+m*P+g*L,r[6]=p*_+f*E+m*R+g*F,r[10]=p*w+f*A+m*I+g*N,r[14]=p*M+f*C+m*D+g*U,r[3]=v*S+y*T+x*P+b*L,r[7]=v*_+y*E+x*R+b*F,r[11]=v*w+y*A+x*I+b*N,r[15]=v*M+y*C+x*D+b*U,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[4],i=e[8],r=e[12],a=e[1],s=e[5],o=e[9],l=e[13],u=e[2],c=e[6],d=e[10],h=e[14],p=e[3],f=e[7],m=e[11],g=e[15],v=o*h-l*d,y=s*h-l*c,x=s*d-o*c,b=a*h-l*u,S=a*d-o*u,_=a*c-s*u;return t*(f*v-m*y+g*x)-n*(p*v-m*b+g*S)+i*(p*y-f*b+g*_)-r*(p*x-f*S+m*_)}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,n){let i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=t,i[14]=n),this}invert(){let e=this.elements,t=e[0],n=e[1],i=e[2],r=e[3],a=e[4],s=e[5],o=e[6],l=e[7],u=e[8],c=e[9],d=e[10],h=e[11],p=e[12],f=e[13],m=e[14],g=e[15],v=c*m*l-f*d*l+f*o*h-s*m*h-c*o*g+s*d*g,y=p*d*l-u*m*l-p*o*h+a*m*h+u*o*g-a*d*g,x=u*f*l-p*c*l+p*s*h-a*f*h-u*s*g+a*c*g,b=p*c*o-u*f*o-p*s*d+a*f*d+u*s*m-a*c*m,S=t*v+n*y+i*x+r*b;if(0===S)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let _=1/S;return e[0]=v*_,e[1]=(f*d*r-c*m*r-f*i*h+n*m*h+c*i*g-n*d*g)*_,e[2]=(s*m*r-f*o*r+f*i*l-n*m*l-s*i*g+n*o*g)*_,e[3]=(c*o*r-s*d*r-c*i*l+n*d*l+s*i*h-n*o*h)*_,e[4]=y*_,e[5]=(u*m*r-p*d*r+p*i*h-t*m*h-u*i*g+t*d*g)*_,e[6]=(p*o*r-a*m*r-p*i*l+t*m*l+a*i*g-t*o*g)*_,e[7]=(a*d*r-u*o*r+u*i*l-t*d*l-a*i*h+t*o*h)*_,e[8]=x*_,e[9]=(p*c*r-u*f*r-p*n*h+t*f*h+u*n*g-t*c*g)*_,e[10]=(a*f*r-p*s*r+p*n*l-t*f*l-a*n*g+t*s*g)*_,e[11]=(u*s*r-a*c*r-u*n*l+t*c*l+a*n*h-t*s*h)*_,e[12]=b*_,e[13]=(u*f*i-p*c*i+p*n*d-t*f*d-u*n*m+t*c*m)*_,e[14]=(p*s*i-a*f*i-p*n*o+t*f*o+a*n*m-t*s*m)*_,e[15]=(a*c*i-u*s*i+u*n*o-t*c*o-a*n*d+t*s*d)*_,this}scale(e){let t=this.elements,n=e.x,i=e.y,r=e.z;return t[0]*=n,t[4]*=i,t[8]*=r,t[1]*=n,t[5]*=i,t[9]*=r,t[2]*=n,t[6]*=i,t[10]*=r,t[3]*=n,t[7]*=i,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,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let n=Math.cos(t),i=Math.sin(t),r=1-n,a=e.x,s=e.y,o=e.z,l=r*a,u=r*s;return this.set(l*a+n,l*s-i*o,l*o+i*s,0,l*s+i*o,u*s+n,u*o-i*a,0,l*o-i*s,u*o+i*a,r*o*o+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,i,r,a){return this.set(1,n,r,0,e,1,a,0,t,i,1,0,0,0,0,1),this}compose(e,t,n){let i=this.elements,r=t._x,a=t._y,s=t._z,o=t._w,l=r+r,u=a+a,c=s+s,d=r*l,h=r*u,p=r*c,f=a*u,m=a*c,g=s*c,v=o*l,y=o*u,x=o*c,b=n.x,S=n.y,_=n.z;return i[0]=(1-(f+g))*b,i[1]=(h+x)*b,i[2]=(p-y)*b,i[3]=0,i[4]=(h-x)*S,i[5]=(1-(d+g))*S,i[6]=(m+v)*S,i[7]=0,i[8]=(p+y)*_,i[9]=(m-v)*_,i[10]=(1-(d+f))*_,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,t,n){let i=this.elements;if(e.x=i[12],e.y=i[13],e.z=i[14],0===this.determinant())return n.set(1,1,1),t.identity(),this;let r=tV.set(i[0],i[1],i[2]).length(),a=tV.set(i[4],i[5],i[6]).length(),s=tV.set(i[8],i[9],i[10]).length();0>this.determinant()&&(r=-r),tG.copy(this);let o=1/r,l=1/a,u=1/s;return tG.elements[0]*=o,tG.elements[1]*=o,tG.elements[2]*=o,tG.elements[4]*=l,tG.elements[5]*=l,tG.elements[6]*=l,tG.elements[8]*=u,tG.elements[9]*=u,tG.elements[10]*=u,t.setFromRotationMatrix(tG),n.x=r,n.y=a,n.z=s,this}makePerspective(e,t,n,i,r,a,s=2e3,o=!1){let l,u,c=this.elements;if(o)l=r/(a-r),u=a*r/(a-r);else if(2e3===s)l=-(a+r)/(a-r),u=-2*a*r/(a-r);else if(2001===s)l=-a/(a-r),u=-a*r/(a-r);else throw Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+s);
3return c[0]=2*r/(t-e),c[4]=0,c[8]=(t+e)/(t-e),c[12]=0,c[1]=0,c[5]=2*r/(n-i),c[9]=(n+i)/(n-i),c[13]=0,c[2]=0,c[6]=0,c[10]=l,c[14]=u,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,t,n,i,r,a,s=2e3,o=!1){let l,u,c=this.elements;if(o)l=1/(a-r),u=a/(a-r);else if(2e3===s)l=-2/(a-r),u=-(a+r)/(a-r);else if(2001===s)l=-1/(a-r),u=-r/(a-r);else throw Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+s);return c[0]=2/(t-e),c[4]=0,c[8]=0,c[12]=-(t+e)/(t-e),c[1]=0,c[5]=2/(n-i),c[9]=0,c[13]=-(n+i)/(n-i),c[2]=0,c[6]=0,c[10]=l,c[14]=u,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}equals(e){let t=this.elements,n=e.elements;for(let e=0;e<16;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}let tV=new e0,tG=new tH,tj=new e0(0,0,0),tW=new e0(1,1,1),tX=new e0,tq=new e0,tY=new e0,tZ=new tH,tK=new e$;class tJ{constructor(e=0,t=0,n=0,i=tJ.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=i}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,n,i=this._order){return this._x=e,this._y=t,this._z=n,this._order=i,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,n=!0){let i=e.elements,r=i[0],a=i[4],s=i[8],o=i[1],l=i[5],u=i[9],c=i[2],d=i[6],h=i[10];switch(t){case"XYZ":this._y=Math.asin(eX(s,-1,1)),.9999999>Math.abs(s)?(this._x=Math.atan2(-u,h),this._z=Math.atan2(-a,r)):(this._x=Math.atan2(d,l),this._z=0);break;case"YXZ":this._x=Math.asin(-eX(u,-1,1)),.9999999>Math.abs(u)?(this._y=Math.atan2(s,h),this._z=Math.atan2(o,l)):(this._y=Math.atan2(-c,r),this._z=0);break;case"ZXY":this._x=Math.asin(eX(d,-1,1)),.9999999>Math.abs(d)?(this._y=Math.atan2(-c,h),this._z=Math.atan2(-a,l)):(this._y=0,this._z=Math.atan2(o,r));break;case"ZYX":this._y=Math.asin(-eX(c,-1,1)),.9999999>Math.abs(c)?(this._x=Math.atan2(d,h),this._z=Math.atan2(o,r)):(this._x=0,this._z=Math.atan2(-a,l));break;case"YZX":this._z=Math.asin(eX(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,h));break;case"XZY":this._z=Math.asin(-eX(a,-1,1)),.9999999>Math.abs(a)?(this._x=Math.atan2(d,l),this._y=Math.atan2(s,r)):(this._x=Math.atan2(-u,h),this._y=0);break;default:ek("Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===n&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return tZ.makeRotationFromQuaternion(e),this.setFromRotationMatrix(tZ,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return tK.setFromEuler(this),this.setFromQuaternion(tK,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}}tJ.DEFAULT_ORDER="XYZ";class tQ{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 t$=0,t0=new e0,t1=new e$,t2=new tH,t3=new e0,t4=new e0,t5=new e0,t6=new e$,t8=new e0(1,0,0),t9=new e0(0,1,0),t7=new e0(0,0,1),ne={type:"added"},nt={type:"removed"},nn={type:"childadded",child:null},ni={type:"childremoved",child:null};class nr extends ez{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:t$++}),this.uuid=eW(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=nr.DEFAULT_UP.clone();const e=new e0,t=new tJ,n=new e$,i=new e0(1,1,1);t._onChange(function(){n.setFromEuler(t,!1)}),n._onChange(function(){t.setFromQuaternion(n,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:n},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new tH},normalMatrix:{value:new e3}}),this.matrix=new tH,this.matrixWorld=new tH,this.matrixAutoUpdate=nr.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=nr.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new tQ,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}
vendor: 19,152 bytes, line 3
3setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return t1.setFromAxisAngle(e,t),this.quaternion.multiply(t1),this}rotateOnWorldAxis(e,t){return t1.setFromAxisAngle(e,t),this.quaternion.premultiply(t1),this}rotateX(e){return this.rotateOnAxis(t8,e)}rotateY(e){return this.rotateOnAxis(t9,e)}rotateZ(e){return this.rotateOnAxis(t7,e)}translateOnAxis(e,t){return t0.copy(e).applyQuaternion(this.quaternion),this.position.add(t0.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(t8,e)}translateY(e){return this.translateOnAxis(t9,e)}translateZ(e){return this.translateOnAxis(t7,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(t2.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?t3.copy(e):t3.set(e,t,n);let i=this.parent;this.updateWorldMatrix(!0,!1),t4.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?t2.lookAt(t4,t3,this.up):t2.lookAt(t3,t4,this.up),this.quaternion.setFromRotationMatrix(t2),i&&(t2.extractRotation(i.matrixWorld),t1.setFromRotationMatrix(t2),this.quaternion.premultiply(t1.invert()))}add(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return e===this?eB("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(ne),nn.child=e,this.dispatchEvent(nn),nn.child=null):eB("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(nt),ni.child=e,this.dispatchEvent(ni),ni.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),t2.copy(this.matrixWorld).invert(),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),t2.multiply(e.parent.matrixWorld)),e.applyMatrix4(t2),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(ne),nn.child=e,this.dispatchEvent(nn),nn.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 n=0,i=this.children.length;n<i;n++){let i=this.children[n].getObjectByProperty(e,t);if(void 0!==i)return i}}getObjectsByProperty(e,t,n=[]){this[e]===t&&n.push(this);let i=this.children;for(let r=0,a=i.length;r<a;r++)i[r].getObjectsByProperty(e,t,n);return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(t4,e,t5),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(t4,t6,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 n=0,i=t.length;n<i;n++)t[n].traverse(e)}traverseVisible(e){if(!1===this.visible)return;e(this);let t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].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 n=0,i=t.length;n<i;n++)t[n].updateMatrixWorld(e)}updateWorldMatrix(e,t){let n=this.parent;if(!0===e&&null!==n&&n.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,n=e.length;t<n;t++)e[t].updateWorldMatrix(!1,!0)}}toJSON(e){let t=void 0===e||"string"==typeof e,n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});let i={};function r(t,n){return void 0===t[n.uuid]&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),!0===this.castShadow&&(i.castShadow=!0),!0===this.receiveShadow&&(i.receiveShadow=!0),!1===this.visible&&(i.visible=!1),!1===this.frustumCulled&&(i.frustumCulled=!1),0!==this.renderOrder&&(i.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.geometryInfo=this._geometryInfo.map(e=>({...e,boundingBox:e.boundingBox?e.boundingBox.toJSON():void 0,boundingSphere:e.boundingSphere?e.boundingSphere.toJSON():void 0})),i.instanceInfo=this._instanceInfo.map(e=>({...e})),i.availableInstanceIds=this._availableInstanceIds.slice(),i.availableGeometryIds=this._availableGeometryIds.slice(),i.nextIndexStart=this._nextIndexStart,i.nextVertexStart=this._nextVertexStart,i.geometryCount=this._geometryCount,i.maxInstanceCount=this._maxInstanceCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.matricesTexture=this._matricesTexture.toJSON(e),i.indirectTexture=this._indirectTexture.toJSON(e),null!==this._colorsTexture&&(i.colorsTexture=this._colorsTexture.toJSON(e)),null!==this.boundingSphere&&(i.boundingSphere=this.boundingSphere.toJSON()),null!==this.boundingBox&&(i.boundingBox=this.boundingBox.toJSON())),this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=r(e.geometries,this.geometry);let t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){let n=t.shapes;if(Array.isArray(n))for(let t=0,i=n.length;t<i;t++){let i=n[t];r(e.shapes,i)}else r(e.shapes,n)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(r(e.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){let t=[];for(let n=0,i=this.material.length;n<i;n++)t.push(r(e.materials,this.material[n]));i.material=t}else i.material=r(e.materials,this.material);if(this.children.length>0){i.children=[];for(let t=0;t<this.children.length;t++)i.children.push(this.children[t].toJSON(e).object)}if(this.animations.length>0){i.animations=[];for(let t=0;t<this.animations.length;t++){let n=this.animations[t];i.animations.push(r(e.animations,n))}}if(t){let t=a(e.geometries),i=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&&(n.geometries=t),i.length>0&&(n.materials=i),r.length>0&&(n.textures=r),s.length>0&&(n.images=s),o.length>0&&(n.shapes=o),l.length>0&&(n.skeletons=l),u.length>0&&(n.animations=u),c.length>0&&(n.nodes=c)}return n.object=i,n;function a(e){let t=[];for(let n in e){let i=e[n];delete i.metadata,t.push(i)}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 n=e.children[t];this.add(n.clone())}return this}}nr.DEFAULT_UP=new e0(0,1,0),nr.DEFAULT_MATRIX_AUTO_UPDATE=!0,nr.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;let na=new e0,ns=new e0,no=new e0,nl=new e0,nu=new e0,nc=new e0,nd=new e0,nh=new e0,np=new e0,nf=new e0,nm=new to,ng=new to,nv=new to;class ny{constructor(e=new e0,t=new e0,n=new e0){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,i){i.subVectors(n,t),na.subVectors(e,t),i.cross(na);let r=i.lengthSq();return r>0?i.multiplyScalar(1/Math.sqrt(r)):i.set(0,0,0)}static getBarycoord(e,t,n,i,r){na.subVectors(i,t),ns.subVectors(n,t),no.subVectors(e,t);let a=na.dot(na),s=na.dot(ns),o=na.dot(no),l=ns.dot(ns),u=ns.dot(no),c=a*l-s*s;if(0===c)return r.set(0,0,0),null;let d=1/c,h=(l*o-s*u)*d,p=(a*u-s*o)*d;return r.set(1-h-p,p,h)}static containsPoint(e,t,n,i){return null!==this.getBarycoord(e,t,n,i,nl)&&nl.x>=0&&nl.y>=0&&nl.x+nl.y<=1}static getInterpolation(e,t,n,i,r,a,s,o){return null===this.getBarycoord(e,t,n,i,nl)?(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,nl.x),o.addScaledVector(a,nl.y),o.addScaledVector(s,nl.z),o)}static getInterpolatedAttribute(e,t,n,i,r,a){return nm.setScalar(0),ng.setScalar(0),nv.setScalar(0),nm.fromBufferAttribute(e,t),ng.fromBufferAttribute(e,n),nv.fromBufferAttribute(e,i),a.setScalar(0),a.addScaledVector(nm,r.x),a.addScaledVector(ng,r.y),a.addScaledVector(nv,r.z),a}static isFrontFacing(e,t,n,i){return na.subVectors(n,t),ns.subVectors(e,t),0>na.cross(ns).dot(i)}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,i){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,t,n,i){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,i),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 na.subVectors(this.c,this.b),ns.subVectors(this.a,this.b),.5*na.cross(ns).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return ny.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return ny.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,i,r){return ny.getInterpolation(e,this.a,this.b,this.c,t,n,i,r)}containsPoint(e){return ny.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return ny.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let n,i,r=this.a,a=this.b,s=this.c;nu.subVectors(a,r),nc.subVectors(s,r),nh.subVectors(e,r);let o=nu.dot(nh),l=nc.dot(nh);if(o<=0&&l<=0)return t.copy(r);np.subVectors(e,a);let u=nu.dot(np),c=nc.dot(np);if(u>=0&&c<=u)return t.copy(a);let d=o*c-u*l;if(d<=0&&o>=0&&u<=0)return n=o/(o-u),t.copy(r).addScaledVector(nu,n);nf.subVectors(e,s);let h=nu.dot(nf),p=nc.dot(nf);if(p>=0&&h<=p)return t.copy(s);let f=h*l-o*p;if(f<=0&&l>=0&&p<=0)return i=l/(l-p),t.copy(r).addScaledVector(nc,i);let m=u*p-h*c;if(m<=0&&c-u>=0&&h-p>=0)return nd.subVectors(s,a),i=(c-u)/(c-u+(h-p)),t.copy(a).addScaledVector(nd,i);let g=1/(m+f+d);return n=f*g,i=d*g,t.copy(r).addScaledVector(nu,n).addScaledVector(nc,i)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let nx={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},nb={h:0,s:0,l:0},nS={h:0,s:0,l:0};function n_(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*6*(2/3-n):e}class nw{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){return void 0===t&&void 0===n?e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e):this.setRGB(e,t,n),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=ey){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,e8.colorSpaceToWorking(this,t),this}setRGB(e,t,n,i=e8.workingColorSpace){return this.r=e,this.g=t,this.b=n,e8.colorSpaceToWorking(this,i),this}setHSL(e,t,n,i=e8.workingColorSpace){if(e=eq(e,1),t=eX(t,0,1),n=eX(n,0,1),0===t)this.r=this.g=this.b=n;else{let i=n<=.5?n*(1+t):n+t-n*t,r=2*n-i;this.r=n_(r,i,e+1/3),this.g=n_(r,i,e),this.b=n_(r,i,e-1/3)}return e8.colorSpaceToWorking(this,i),this}setStyle(e,t=ey){let n;function i(t){void 0!==t&&1>parseFloat(t)&&ek("Color: Alpha component of "+e+" will be ignored.")}if(n=/^(\w+)\(([^\)]*)\)/.exec(e)){let r,a=n[1],s=n[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 i(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 i(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 i(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,t);break;default:ek("Color: Unknown color model "+e)}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(e)){let i=n[1],r=i.length;if(3===r)return this.setRGB(parseInt(i.charAt(0),16)/15,parseInt(i.charAt(1),16)/15,parseInt(i.charAt(2),16)/15,t);if(6===r)return this.setHex(parseInt(i,16),t);ek("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=ey){let n=nx[e.toLowerCase()];return void 0!==n?this.setHex(n,t):ek("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=e9(e.r),this.g=e9(e.g),this.b=e9(e.b),this}copyLinearToSRGB(e){return this.r=e7(e.r),this.g=e7(e.g),this.b=e7(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=ey){return e8.workingToColorSpace(nM.copy(this),e),65536*Math.round(eX(255*nM.r,0,255))+256*Math.round(eX(255*nM.g,0,255))+Math.round(eX(255*nM.b,0,255))}getHexString(e=ey){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=e8.workingColorSpace){let n,i;e8.workingToColorSpace(nM.copy(this),t);let r=nM.r,a=nM.g,s=nM.b,o=Math.max(r,a,s),l=Math.min(r,a,s),u=(l+o)/2;if(l===o)n=0,i=0;else{let e=o-l;switch(i=u<=.5?e/(o+l):e/(2-o-l),o){case r:n=(a-s)/e+6*(a<s);break;case a:n=(s-r)/e+2;break;case s:n=(r-a)/e+4}n/=6}return e.h=n,e.s=i,e.l=u,e}getRGB(e,t=e8.workingColorSpace){return e8.workingToColorSpace(nM.copy(this),t),e.r=nM.r,e.g=nM.g,e.b=nM.b,e}getStyle(e=ey){e8.workingToColorSpace(nM.copy(this),e);let t=nM.r,n=nM.g,i=nM.b;return e!==ey?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${i.toFixed(3)})`:`rgb(${Math.round(255*t)},${Math.round(255*n)},${Math.round(255*i)})`}offsetHSL(e,t,n){return this.getHSL(nb),this.setHSL(nb.h+e,nb.s+t,nb.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}
3lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(nb),e.getHSL(nS);let n=eY(nb.h,nS.h,t),i=eY(nb.s,nS.s,t),r=eY(nb.l,nS.l,t);return this.setHSL(n,i,r),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){let t=this.r,n=this.g,i=this.b,r=e.elements;return this.r=r[0]*t+r[3]*n+r[6]*i,this.g=r[1]*t+r[4]*n+r[7]*i,this.b=r[2]*t+r[5]*n+r[8]*i,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 nM=new nw;nw.NAMES=nx;let nT=0;class nE extends ez{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:nT++}),this.uuid=eW(),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 nw(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.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(let t in e){let n=e[t];if(void 0===n){ek(`Material: parameter '${t}' has value of undefined.`);continue}let i=this[t];if(void 0===i){ek(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[t]=n}}toJSON(e){let t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});let n={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};function i(e){let t=[];for(let n in e){let i=e[n];delete i.metadata,t.push(i)}return t}
vendor: 11,753 bytes, line 3
3if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),void 0!==this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(n.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(n.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),void 0!==this.dispersion&&(n.dispersion=this.dispersion),void 0!==this.iridescence&&(n.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(n.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),void 0!==this.anisotropy&&(n.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapRotation&&(n.envMapRotation=this.envMapRotation.toArray()),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(n.blending=this.blending),0!==this.side&&(n.side=this.side),!0===this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=!0),204!==this.blendSrc&&(n.blendSrc=this.blendSrc),205!==this.blendDst&&(n.blendDst=this.blendDst),100!==this.blendEquation&&(n.blendEquation=this.blendEquation),null!==this.blendSrcAlpha&&(n.blendSrcAlpha=this.blendSrcAlpha),null!==this.blendDstAlpha&&(n.blendDstAlpha=this.blendDstAlpha),null!==this.blendEquationAlpha&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),0!==this.blendAlpha&&(n.blendAlpha=this.blendAlpha),3!==this.depthFunc&&(n.depthFunc=this.depthFunc),!1===this.depthTest&&(n.depthTest=this.depthTest),!1===this.depthWrite&&(n.depthWrite=this.depthWrite),!1===this.colorWrite&&(n.colorWrite=this.colorWrite),255!==this.stencilWriteMask&&(n.stencilWriteMask=this.stencilWriteMask),519!==this.stencilFunc&&(n.stencilFunc=this.stencilFunc),0!==this.stencilRef&&(n.stencilRef=this.stencilRef),255!==this.stencilFuncMask&&(n.stencilFuncMask=this.stencilFuncMask),7680!==this.stencilFail&&(n.stencilFail=this.stencilFail),7680!==this.stencilZFail&&(n.stencilZFail=this.stencilZFail),7680!==this.stencilZPass&&(n.stencilZPass=this.stencilZPass),!0===this.stencilWrite&&(n.stencilWrite=this.stencilWrite),void 0!==this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaHash&&(n.alphaHash=!0),!0===this.alphaToCoverage&&(n.alphaToCoverage=!0),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=!0),!0===this.forceSinglePass&&(n.forceSinglePass=!0),!1===this.allowOverride&&(n.allowOverride=!1),!0===this.wireframe&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=!0),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),!1===this.fog&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData),t){let t=i(e.textures),r=i(e.images);t.length>0&&(n.textures=t),r.length>0&&(n.images=r)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;let t=e.clippingPlanes,n=null;if(null!==t){let e=t.length;n=Array(e);for(let i=0;i!==e;++i)n[i]=t[i].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){!0===e&&this.version++}}class nA extends nE{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new nw(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 tJ,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 nC=function(){let e=new ArrayBuffer(4),t=new Float32Array(e),n=new Uint32Array(e),i=new Uint32Array(512),r=new Uint32Array(512);for(let e=0;e<256;++e){let t=e-127;t<-27?(i[e]=0,i[256|e]=32768,r[e]=24,r[256|e]=24):t<-14?(i[e]=1024>>-t-14,i[256|e]=1024>>-t-14|32768,r[e]=-t-1,r[256|e]=-t-1):t<=15?(i[e]=t+15<<10,i[256|e]=t+15<<10|32768,r[e]=13,r[256|e]=13):t<128?(i[e]=31744,i[256|e]=64512,r[e]=24,r[256|e]=24):(i[e]=31744,i[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,n=0;for(;(8388608&t)==0;)t<<=1,n-=8388608;t&=-8388609,n+=0x38800000,a[e]=t|n}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:n,baseTable:i,shiftTable:r,mantissaTable:a,exponentTable:s,offsetTable:o}}();function nP(e){Math.abs(e)>
vendor: 5,990 bytes, line 3
365504&&ek("DataUtils.toHalfFloat(): Value out of range."),e=eX(e,-65504,65504),nC.floatView[0]=e;let t=nC.uint32View[0],n=t>>23&511;return nC.baseTable[n]+((8388607&t)>>nC.shiftTable[n])}function nR(e){let t=e>>10;return nC.uint32View[0]=nC.mantissaTable[nC.offsetTable[t]+(1023&e)]+nC.exponentTable[t],nC.floatView[0]}class nI{static toHalfFloat(e){return nP(e)}static fromHalfFloat(e){return nR(e)}}let nD=new e0,nL=new eQ,nF=0;class nN{constructor(e,t,n=!1){if(Array.isArray(e))throw TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:nF++}),this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=n,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,n){e*=this.itemSize,n*=t.itemSize;for(let i=0,r=this.itemSize;i<r;i++)this.array[e+i]=t.array[n+i];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(2===this.itemSize)for(let t=0,n=this.count;t<n;t++)nL.fromBufferAttribute(this,t),nL.applyMatrix3(e),this.setXY(t,nL.x,nL.y);else if(3===this.itemSize)for(let t=0,n=this.count;t<n;t++)nD.fromBufferAttribute(this,t),nD.applyMatrix3(e),this.setXYZ(t,nD.x,nD.y,nD.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)nD.fromBufferAttribute(this,t),nD.applyMatrix4(e),this.setXYZ(t,nD.x,nD.y,nD.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)nD.fromBufferAttribute(this,t),nD.applyNormalMatrix(e),this.setXYZ(t,nD.x,nD.y,nD.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)nD.fromBufferAttribute(this,t),nD.transformDirection(e),this.setXYZ(t,nD.x,nD.y,nD.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=eZ(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=eK(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=eZ(t,this.array)),t}setX(e,t){return this.normalized&&(t=eK(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=eZ(t,this.array)),t}setY(e,t){return this.normalized&&(t=eK(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=eZ(t,this.array)),t}setZ(e,t){return this.normalized&&(t=eK(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=eZ(t,this.array)),t}setW(e,t){return this.normalized&&(t=eK(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=eK(t,this.array),n=eK(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,i){return e*=this.itemSize,this.normalized&&(t=eK(t,this.array),n=eK(n,this.array),i=eK(i,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this}setXYZW(e,t,n,i,r){return e*=this.itemSize,this.normalized&&(t=eK(t,this.array),n=eK(n,this.array),i=eK(i,this.array),r=eK(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,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 nU extends nN{constructor(e,t,n){super(new Int8Array(e),t,n)}}class nk extends nN{constructor(e,t,n){super(new Uint8Array(e),t,n)}}class nB extends nN{constructor(e,t,n){super(new Uint8ClampedArray(e),t,n)}}class nO extends nN{constructor(e,t,n){super(new Int16Array(e),t,n)}}class nz extends nN{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class nH extends nN{constructor(e,t,n){super(new Int32Array(e),t,n)}}class nV extends nN{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class nG extends nN{constructor(e,t,n){super(new Uint16Array(e),t,n),this.isFloat16BufferAttribute=!0}getX(e){let t=nR(this.array[e*this.itemSize]);return this.normalized&&(t=eZ(t,this.array)),t}setX(e,t){return this.normalized&&(t=eK(t,this.array)),this.array[e*this.itemSize]=nP(t),this}getY(e){let t=nR(this.array[e*this.itemSize+1]);return this.normalized&&(t=eZ(t,this.array)),t}setY(e,t){return this.normalized&&(t=eK(t,this.array)),this.array[e*this.itemSize+1]=nP(t),this}getZ(e){let t=nR(this.array[e*this.itemSize+2]);return this.normalized&&(t=eZ(t,this.array)),t}setZ(e,t){return this.normalized&&(t=eK(t,this.array)),this.array[e*this.itemSize+2]=nP(t),this}getW(e){let t=nR(this.array[e*this.itemSize+3]);return this.normalized&&(t=eZ(t,this.array)),t}setW(e,t){return this.normalized&&(t=eK(t,this.array)),this.array[e*this.itemSize+3]=nP(t),this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=eK(t,this.array),n=eK(n,this.array)),this.array[e+0]=nP(t),this.array[e+1]=nP(n),this}setXYZ(e,t,n,i){return e*=this.itemSize,this.normalized&&(t=eK(t,this.array),n=eK(n,this.array),i=eK(i,this.array)),this.array[e+0]=nP(t),this.array[e+1]=nP(n),this.array[e+2]=nP(i),this}setXYZW(e,t,n,i,r){return e*=this.itemSize,this.normalized&&(t=eK(t,this.array),n=eK(n,this.array),i=eK(i,this.array),r=eK(r,this.array)),this.array[e+0]=nP(t),this.array[e+1]=nP(n),this.array[e+2]=nP(i),this.array[e+3]=nP(r),this}}class nj extends nN{constructor(e,t,n){super(new Float32Array(e),t,n)}}let nW=0,nX=new tH,nq=new nr,nY=new e0,nZ=new tf,nK=new tf,nJ=new e0;
3class nQ extends ez{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:nW++}),this.uuid=eW(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(eE(e)?nV:nz)(e,1):this.index=e,this}setIndirect(e,t=0){return this.indirect=e,this.indirectOffset=t,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return void 0!==this.attributes[e]}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){let t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);let n=this.attributes.normal;if(void 0!==n){let t=new e3().getNormalMatrix(e);n.applyNormalMatrix(t),n.needsUpdate=!0}let i=this.attributes.tangent;return void 0!==i&&(i.transformDirection(e),i.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(e){return nX.makeRotationFromQuaternion(e),this.applyMatrix4(nX),this}rotateX(e){return nX.makeRotationX(e),this.applyMatrix4(nX),this}rotateY(e){return nX.makeRotationY(e),this.applyMatrix4(nX),this}rotateZ(e){return nX.makeRotationZ(e),this.applyMatrix4(nX),this}translate(e,t,n){return nX.makeTranslation(e,t,n),this.applyMatrix4(nX),this}scale(e,t,n){return nX.makeScale(e,t,n),this.applyMatrix4(nX),this}lookAt(e){return nq.lookAt(e),nq.updateMatrix(),this.applyMatrix4(nq.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(nY).negate(),this.translate(nY.x,nY.y,nY.z),this}setFromPoints(e){let t=this.getAttribute("position");if(void 0===t){let t=[];for(let n=0,i=e.length;n<i;n++){let i=e[n];t.push(i.x,i.y,i.z||0)}this.setAttribute("position",new nj(t,3))}else{let n=Math.min(e.length,t.count);for(let i=0;i<n;i++){let n=e[i];t.setXYZ(i,n.x,n.y,n.z||0)}e.length>t.count&&ek("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 tf);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){eB("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new e0(-1/0,-1/0,-1/0),new e0(Infinity,Infinity,Infinity));return}if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e<n;e++){let n=t[e];nZ.setFromBufferAttribute(n),this.morphTargetsRelative?(nJ.addVectors(this.boundingBox.min,nZ.min),this.boundingBox.expandByPoint(nJ),nJ.addVectors(this.boundingBox.max,nZ.max),this.boundingBox.expandByPoint(nJ)):(this.boundingBox.expandByPoint(nZ.min),this.boundingBox.expandByPoint(nZ.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&eB('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 tD);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){eB("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new e0,1/0);return}if(e){let n=this.boundingSphere.center;if(nZ.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e<n;e++){let n=t[e];nK.setFromBufferAttribute(n),this.morphTargetsRelative?(nJ.addVectors(nZ.min,nK.min),nZ.expandByPoint(nJ),nJ.addVectors(nZ.max,nK.max),nZ.expandByPoint(nJ)):(nZ.expandByPoint(nK.min),nZ.expandByPoint(nK.max))}nZ.getCenter(n);let i=0;for(let t=0,r=e.count;t<r;t++)nJ.fromBufferAttribute(e,t),i=Math.max(i,n.distanceToSquared(nJ));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++)nJ.fromBufferAttribute(a,t),s&&(nY.fromBufferAttribute(e,t),nJ.add(nY)),i=Math.max(i,n.distanceToSquared(nJ))}this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&eB('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 eB("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");let n=t.position,i=t.normal,r=t.uv;!1===this.hasAttribute("tangent")&&this.setAttribute("tangent",new nN(new Float32Array(4*n.count),4));let a=this.getAttribute("tangent"),s=[],o=[];for(let e=0;e<n.count;e++)s[e]=new e0,o[e]=new e0;let l=new e0,u=new e0,c=new e0,d=new eQ,h=new eQ,p=new eQ,f=new e0,m=new e0,g=this.groups;0===g.length&&(g=[{start:0,count:e.count}]);for(let t=0,i=g.length;t<i;++t){let i=g[t],a=i.start,v=i.count;for(let t=a,i=a+v;t<i;t+=3)!function(e,t,i){l.fromBufferAttribute(n,e),u.fromBufferAttribute(n,t),c.fromBufferAttribute(n,i),d.fromBufferAttribute(r,e),h.fromBufferAttribute(r,t),p.fromBufferAttribute(r,i),u.sub(l),c.sub(l),h.sub(d),p.sub(d);let a=1/(h.x*p.y-p.x*h.y);isFinite(a)&&(f.copy(u).multiplyScalar(p.y).addScaledVector(c,-h.y).multiplyScalar(a),m.copy(c).multiplyScalar(h.x).addScaledVector(u,-p.x).multiplyScalar(a),s[e].add(f),s[t].add(f),s[i].add(f),o[e].add(m),o[t].add(m),o[i].add(m))}(e.getX(t+0),e.getX(t+1),e.getX(t+2))}let v=new e0,y=new e0,x=new e0,b=new e0;function S(e){x.fromBufferAttribute(i,e),b.copy(x);let t=s[e];v.copy(t),v.sub(x.multiplyScalar(x.dot(t))).normalize(),y.crossVectors(b,t);let n=y.dot(o[e]);a.setXYZW(e,v.x,v.y,v.z,n<0?-1:1)}for(let t=0,n=g.length;t<n;++t){let n=g[t],i=n.start,r=n.count;for(let t=i,n=i+r;t<n;t+=3)S(e.getX(t+0)),S(e.getX(t+1)),S(e.getX(t+2))}}computeVertexNormals(){let e=this.index,t=this.getAttribute("position");if(void 0!==t){let n=this.getAttribute("normal");if(void 0===n)n=new nN(new Float32Array(3*t.count),3),this.setAttribute("normal",n
vendor: 6,167 bytes, line 3
3);else for(let e=0,t=n.count;e<t;e++)n.setXYZ(e,0,0,0);let i=new e0,r=new e0,a=new e0,s=new e0,o=new e0,l=new e0,u=new e0,c=new e0;if(e)for(let d=0,h=e.count;d<h;d+=3){let h=e.getX(d+0),p=e.getX(d+1),f=e.getX(d+2);i.fromBufferAttribute(t,h),r.fromBufferAttribute(t,p),a.fromBufferAttribute(t,f),u.subVectors(a,r),c.subVectors(i,r),u.cross(c),s.fromBufferAttribute(n,h),o.fromBufferAttribute(n,p),l.fromBufferAttribute(n,f),s.add(u),o.add(u),l.add(u),n.setXYZ(h,s.x,s.y,s.z),n.setXYZ(p,o.x,o.y,o.z),n.setXYZ(f,l.x,l.y,l.z)}else for(let e=0,s=t.count;e<s;e+=3)i.fromBufferAttribute(t,e+0),r.fromBufferAttribute(t,e+1),a.fromBufferAttribute(t,e+2),u.subVectors(a,r),c.subVectors(i,r),u.cross(c),n.setXYZ(e+0,u.x,u.y,u.z),n.setXYZ(e+1,u.x,u.y,u.z),n.setXYZ(e+2,u.x,u.y,u.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){let e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)nJ.fromBufferAttribute(e,t),nJ.normalize(),e.setXYZ(t,nJ.x,nJ.y,nJ.z)}toNonIndexed(){function e(e,t){let n=e.array,i=e.itemSize,r=e.normalized,a=new n.constructor(t.length*i),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]*i;for(let e=0;e<i;e++)a[o++]=n[s++]}return new nN(a,i,r)}if(null===this.index)return ek("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;let t=new nQ,n=this.index.array,i=this.attributes;for(let r in i){let a=e(i[r],n);t.setAttribute(r,a)}let r=this.morphAttributes;for(let i in r){let a=[],s=r[i];for(let t=0,i=s.length;t<i;t++){let i=e(s[t],n);a.push(i)}t.morphAttributes[i]=a}t.morphTargetsRelative=this.morphTargetsRelative;let a=this.groups;for(let e=0,n=a.length;e<n;e++){let n=a[e];t.addGroup(n.start,n.count,n.materialIndex)}return t}toJSON(){let e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),void 0!==this.parameters){let t=this.parameters;for(let n in t)void 0!==t[n]&&(e[n]=t[n]);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 n=this.attributes;for(let t in n){let i=n[t];e.data.attributes[t]=i.toJSON(e.data)}let i={},r=!1;for(let t in this.morphAttributes){let n=this.morphAttributes[t],a=[];for(let t=0,i=n.length;t<i;t++){let i=n[t];a.push(i.toJSON(e.data))}a.length>0&&(i[t]=a,r=!0)}r&&(e.data.morphAttributes=i,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=s.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let n=e.index;null!==n&&this.setIndex(n.clone());let i=e.attributes;for(let e in i){let n=i[e];this.setAttribute(e,n.clone(t))}let r=e.morphAttributes;for(let e in r){let n=[],i=r[e];for(let e=0,r=i.length;e<r;e++)n.push(i[e].clone(t));this.morphAttributes[e]=n}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 n$=new tH,n0=new tz,n1=new tD,n2=new e0,n3=new e0,n4=new e0,n5=new e0,n6=new e0,n8=new e0,n9=new e0,n7=new e0;class ie extends nr{constructor(e=new nQ,t=new nA){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),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 n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e<t;e++){let t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}getVertexPosition(e,t){let n=this.geometry,i=n.attributes.position,r=n.morphAttributes.position,a=n.morphTargetsRelative;t.fromBufferAttribute(i,e);let s=this.morphTargetInfluences;if(r&&s){n8.set(0,0,0);for(let n=0,i=r.length;n<i;n++){let i=s[n],o=r[n];0!==i&&(n6.fromBufferAttribute(o,e),a?n8.addScaledVector(n6,i):n8.addScaledVector(n6.sub(t),i))}t.add(n8)}return t}raycast(e,t){let n=this.geometry,i=this.material,r=this.matrixWorld;void 0===i||(null===n.boundingSphere&&n.computeBoundingSphere(),n1.copy(n.boundingSphere),n1.applyMatrix4(r),n0.copy(e.ray).recast(e.near),!1===n1.containsPoint(n0.origin)&&(null===n0.intersectSphere(n1,n2)||n0.origin.distanceToSquared(n2)>(e.far-e.near)**2)||(n$.copy(r).invert(),n0.copy(e.ray).applyMatrix4(n$),(null===n.boundingBox||!1!==n0.intersectsBox(n.boundingBox))&&this._computeIntersections(e,t,n0)))}_computeIntersections(e,t,n){let i,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,d=r.groups,h=r.drawRange;if(null!==s)if(Array.isArray(a))for(let r=0,o=d.length;r<o;r++){let o=d[r],p=a[o.materialIndex],f=Math.max(o.start,h.start),m=Math.min(s.count,Math.min(o.start+o.count,h.start+h.count));for(let r=f;r<m;r+=3)(i=it(this,p,e,n,l,u,c,s.getX(r),s.getX(r+1),s.getX(r+2)))&&(i.faceIndex=Math.floor(r/3),i.face.materialIndex=o.materialIndex,t.push(i))}else{let r=Math.max(0,h.start),o=Math.min(s.count,h.start+h.count);for(let d=r;d<o;d+=3)(i=it(this,a,e,n,l,u,c,s.getX(d),s.getX(d+1),s.getX(d+2)))&&(i.faceIndex=Math.floor(d/3),t.pu
3sh(i))}else if(void 0!==o)if(Array.isArray(a))for(let r=0,s=d.length;r<s;r++){let s=d[r],p=a[s.materialIndex],f=Math.max(s.start,h.start),m=Math.min(o.count,Math.min(s.start+s.count,h.start+h.count));for(let r=f;r<m;r+=3)(i=it(this,p,e,n,l,u,c,r,r+1,r+2))&&(i.faceIndex=Math.floor(r/3),i.face.materialIndex=s.materialIndex,t.push(i))}else{let r=Math.max(0,h.start),s=Math.min(o.count,h.start+h.count);for(let o=r;o<s;o+=3)(i=it(this,a,e,n,l,u,c,o,o+1,o+2))&&(i.faceIndex=Math.floor(o/3),t.push(i))}}}function it(e,t,n,i,r,a,s,o,l,u){e.getVertexPosition(o,n3),e.getVertexPosition(l,n4),e.getVertexPosition(u,n5);let c=function(e,t,n,i,r,a,s,o){if(null===(1===t.side?i.intersectTriangle(s,a,r,!0,o):i.intersectTriangle(r,a,s,0===t.side,o)))return null;n7.copy(o),n7.applyMatrix4(e.matrixWorld);let l=n.ray.origin.distanceTo(n7);return l<n.near||l>n.far?null:{distance:l,point:n7.clone(),object:e}}(e,t,n,i,n3,n4,n5,n9);if(c){let e=new e0;ny.getBarycoord(n9,n3,n4,n5,e),r&&(c.uv=ny.getInterpolatedAttribute(r,o,l,u,e,new eQ)),a&&(c.uv1=ny.getInterpolatedAttribute(a,o,l,u,e,new eQ)),s&&(c.normal=ny.getInterpolatedAttribute(s,o,l,u,e,new e0),c.normal.dot(i.direction)>0&&c.normal.multiplyScalar(-1));let t={a:o,b:l,c:u,normal:new e0,materialIndex:0};ny.getNormal(n3,n4,n5,t.normal),c.face=t,c.barycoord=e}return c}class ii extends nQ{constructor(e=1,t=1,n=1,i=1,r=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:i,heightSegments:r,depthSegments:a};const s=this;i=Math.floor(i),r=Math.floor(r);const o=[],l=[],u=[],c=[];let d=0,h=0;function p(e,t,n,i,r,a,p,f,m,g,v){let y=a/m,x=p/g,b=a/2,S=p/2,_=f/2,w=m+1,M=g+1,T=0,E=0,A=new e0;for(let a=0;a<M;a++){let s=a*x-S;for(let o=0;o<w;o++){let d=o*y-b;A[e]=d*i,A[t]=s*r,A[n]=_,l.push(A.x,A.y,A.z),A[e]=0,A[t]=0,A[n]=f>0?1:-1,u.push(A.x,A.y,A.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 n=d+t+w*e,i=d+t+w*(e+1),r=d+(t+1)+w*(e+1),a=d+(t+1)+w*e;o.push(n,i,a),o.push(i,r,a),E+=6}s.addGroup(h,E,v),h+=E,d+=T}p("z","y","x",-1,-1,n,t,e,a=Math.floor(a),r,0),p("z","y","x",1,-1,n,t,-e,a,r,1),p("x","z","y",1,1,e,n,t,i,a,2),p("x","z","y",1,-1,e,n,-t,i,a,3),p("x","y","z",1,-1,e,t,n,i,r,4),p("x","y","z",-1,-1,e,t,-n,i,r,5),this.setIndex(o),this.setAttribute("position",new nj(l,3)),this.setAttribute("normal",new nj(u,3)),this.setAttribute("uv",new nj(c,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new ii(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function ir(e){let t={};for(let n in e)for(let i in t[n]={},e[n]){let r=e[n][i];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?r.isRenderTargetTexture?(ek("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),t[n][i]=null):t[n][i]=r.clone():Array.isArray(r)?t[n][i]=r.slice():t[n][i]=r}return t}function ia(e){let t={};for(let n=0;n<e.length;n++){let i=ir(e[n]);for(let e in i)t[e]=i[e]}return t}function is(e){let t=e.getRenderTarget();return null===t?e.outputColorSpace:!0===t.isXRRenderTarget?t.texture.colorSpace:e8.workingColorSpace}let io={clone:ir,merge:ia};class il extends nE{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=ir(e.uniforms),this.uniformsGroups=function(e){let t=[];for(let n=0;n<e.length;n++)t.push(e[n].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.defaultAttributeValues=Object.assign({},e.defaultAttributeValues),this.index0AttributeName=e.index0AttributeName,this.uniformsNeedUpdate=e.uniformsNeedUpdate,this}toJSON(e){let t=super.toJSON(e);for(let n in t.glslVersion=this.glslVersion,t.uniforms={},this.uniforms){let i=this.uniforms[n].value;i&&i.isTexture?t.uniforms[n]={type:"t",value:i.toJSON(e).uuid}:i&&i.isColor?t.uniforms[n]={type:"c",value:i.getHex()}:i&&i.isVector2?t.uniforms[n]={type:"v2",value:i.toArray()}:i&&i.isVector3?t.uniforms[n]={type:"v3",value:i.toArray()}:i&&i.isVector4?t.uniforms[n]={type:"v4",value:i.toArray()}:i&&i.isMatrix3?t.uniforms[n]={type:"m3",value:i.toArray()}:i&&i.isMatrix4?t.uniforms[n]={type:"m4",value:i.toArray()}:t.uniforms[n]={value:i}}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 n={};for(let e in this.extensions)!0===this.extensions[e]&&(n[e]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}class iu extends nr{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new tH,this.projectionMatrix=new tH,this.projectionMatrixInverse=new tH,this.coordinateSystem=2e3,this._reversedDepth=!1}get reversedDepth(){return this._reversedDepth}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 ic=new e0,id=new eQ,ih=new eQ;class ip extends iu{constructor(e=50,t=1,n=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=i,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*ej*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){let e=Math.tan(.5*eG*this.fov);return .5*this.getFilmHeight()/e}
3getEffectiveFOV(){return 2*ej*Math.atan(Math.tan(.5*eG*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,n){ic.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(ic.x,ic.y).multiplyScalar(-e/ic.z),ic.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(ic.x,ic.y).multiplyScalar(-e/ic.z)}getViewSize(e,t){return this.getViewBounds(e,id,ih),t.subVectors(ih,id)}setViewOffset(e,t,n,i,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=n,this.view.offsetY=i,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*eG*this.fov)/this.zoom,n=2*t,i=this.aspect*n,r=-.5*i,a=this.view;if(null!==this.view&&this.view.enabled){let e=a.fullWidth,s=a.fullHeight;r+=a.offsetX*i/e,t-=a.offsetY*n/s,i*=a.width/e,n*=a.height/s}let s=this.filmOffset;0!==s&&(r+=e*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+i,t,t-n,e,this.far,this.coordinateSystem,this.reversedDepth),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 im extends nr{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new ip(-90,1,e,t);i.layers=this.layers,this.add(i);const r=new ip(-90,1,e,t);r.layers=this.layers,this.add(r);const a=new ip(-90,1,e,t);a.layers=this.layers,this.add(a);const s=new ip(-90,1,e,t);s.layers=this.layers,this.add(s);const o=new ip(-90,1,e,t);o.layers=this.layers,this.add(o);const l=new ip(-90,1,e,t);l.layers=this.layers,this.add(l)}updateCoordinateSystem(){let e=this.coordinateSystem,t=this.children.concat(),[n,i,r,a,s,o]=t;for(let e of t)this.remove(e);if(2e3===e)n.up.set(0,1,0),n.lookAt(1,0,0),i.up.set(0,1,0),i.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)n.up.set(0,-1,0),n.lookAt(-1,0,0),i.up.set(0,-1,0),i.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:n,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());let[r,a,s,o,l,u]=this.children,c=e.getRenderTarget(),d=e.getActiveCubeFace(),h=e.getActiveMipmapLevel(),p=e.xr.enabled;e.xr.enabled=!1;let f=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0,i),e.render(t,r),e.setRenderTarget(n,1,i),e.render(t,a),e.setRenderTarget(n,2,i),e.render(t,s),e.setRenderTarget(n,3,i),e.render(t,o),e.setRenderTarget(n,4,i),e.render(t,l),n.texture.generateMipmaps=f,e.setRenderTarget(n,5,i),e.render(t,u),e.setRenderTarget(c,d,h),e.xr.enabled=p,n.texture.needsPMREMUpdate=!0}}class ig extends ts{constructor(e=[],t=301,n,i,r,a,s,o,l,u){super(e,t,n,i,r,a,s,o,l,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class iv extends tu{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const n={width:e,height:e,depth:1};this.texture=new ig([n,n,n,n,n,n]),this._setTextureOptions(t),this.texture.isRenderTargetTexture=!0}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace
3=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;let n={uniforms:{tEquirect:{value:null}},vertexShader:`
4
5				varying vec3 vWorldDirection;
6
7				vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
8
9					return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
10
11				}
12
13				void main() {
14
15					vWorldDirection = transformDirection( position, modelMatrix );
16
17					#include <begin_vertex>
18					#include <project_vertex>
19
20				}
21			`,fragmentShader:`
22
23				uniform sampler2D tEquirect;
24
25				varying vec3 vWorldDirection;
26
27				#include <common>
28
29				void main() {
30
31					vec3 direction = normalize( vWorldDirection );
32
33					vec2 sampleUV = equirectUv( direction );
34
35					gl_FragColor = texture2D( tEquirect, sampleUV );
36
37				}
38			`},i=new ii(5,5,5),r=new il({name:"CubemapFromEquirect",uniforms:ir(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:1,blending:0});r.uniforms.tEquirect.value=t;let a=new ie(i,r),s=t.minFilter;return 1008===t.minFilter&&(t.minFilter=1006),new im(1,10,this).update(e,a),t.minFilter=s,a.geometry.dispose(),a.material.dispose(),this}clear(e,t=!0,n=!0,i=!0){let r=e.getRenderTarget();for(let r=0;r<6;r++)e.setRenderTarget(this,r),e.clear(t,n,i);e.setRenderTarget(r)}}class iy extends nr{constructor(){super(),this.isGroup=!0,this.type="Group"}}let ix={type:"move"};class ib{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new iy,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 iy,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new e0,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new e0),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new iy,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new e0,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new e0),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 n of e.hand.values())this._getHandJoint(t,n)}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,n){let i=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 i of(a=!0,e.hand.values())){let e=t.getJointPose(i,n),r=this._getHandJoint(l,i);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 i=l.joints["index-finger-tip"],r=l.joints["thumb-tip"],s=i.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,n))&&(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===(i=t.getPose(e.targetRaySpace,n))&&null!==r&&(i=r),null!==i&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,i.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(i.linearVelocity)):s.hasLinearVelocity=!1,i.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(i.angularVelocity)):s.hasAngularVelocity=!1,this.dispatchEvent(ix)))}return null!==s&&(s.visible=null!==i),null!==o&&(o.visible=null!==r),null!==l&&(l.visible=null!==a),this}_getHandJoint(e,t){if(void 0===e.joints[t.jointName]){let n=new iy;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}class iS{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new nw(e),this.density=t}clone(){return new iS(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class i_{constructor(e,t=1,n=1e3){this.isFog=!0,this.name="",this.color=new nw(e),this.near=t,this.far=n}clone(){return new i_(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class iw extends nr{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 tJ,this.environmentIntensity=1,this.environmentRotation=new tJ,this.overrideMaterial=null,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){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 iM{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=eW()}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,n){e*=this.stride,n*=t.stride;for(let i=0,r=this.stride;i<r;i++)this.array[e+i]=t.array[n+i];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=eW()),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]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}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=eW()),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 iT=new e0;class iE{constructor(e,t,n,i=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=i}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,n=this.data.count;t<n;
38t++)iT.fromBufferAttribute(this,t),iT.applyMatrix4(e),this.setXYZ(t,iT.x,iT.y,iT.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)iT.fromBufferAttribute(this,t),iT.applyNormalMatrix(e),this.setXYZ(t,iT.x,iT.y,iT.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)iT.fromBufferAttribute(this,t),iT.transformDirection(e),this.setXYZ(t,iT.x,iT.y,iT.z);return this}getComponent(e,t){let n=this.array[e*this.data.stride+this.offset+t];return this.normalized&&(n=eZ(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=eK(n,this.array)),this.data.array[e*this.data.stride+this.offset+t]=n,this}setX(e,t){return this.normalized&&(t=eK(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=eK(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=eK(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=eK(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=eZ(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=eZ(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=eZ(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=eZ(t,this.array)),t}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=eK(t,this.array),n=eK(n,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,i){return e=e*this.data.stride+this.offset,this.normalized&&(t=eK(t,this.array),n=eK(n,this.array),i=eK(i,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this}setXYZW(e,t,n,i,r){return e=e*this.data.stride+this.offset,this.normalized&&(t=eK(t,this.array),n=eK(n,this.array),i=eK(i,this.array),r=eK(r,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,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 iE(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized);{eU("InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");let e=[];for(let t=0;t<this.count;t++){let n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return new nN(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};{eU("InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");let e=[];for(let t=0;t<this.count;t++){let n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:e,normalized:this.normalized}}}}class iA extends nE{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new nw(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 iC=new e0,iP=new e0,iR=new e0,iI=new eQ,iD=new eQ,iL=new tH,iF=new e0,iN=new e0,iU=new e0,ik=new eQ,iB=new eQ,iO=new eQ;class iz extends nr{constructor(e=new iA){if(super(),this.isSprite=!0,this.type="Sprite",void 0===n){n=new nQ;const e=new iM(new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),5);n.setIndex([0,1,2,0,2,3]),n.setAttribute("position",new iE(e,3,0,!1)),n.setAttribute("uv",new iE(e,2,3,!1))}this.geometry=n,this.material=e,this.center=new eQ(.5,.5),this.count=1}raycast(e,t){let n,i;null===e.camera&&eB('Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),iP.setFromMatrixScale(this.matrixWorld),iL.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),iR.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&iP.multiplyScalar(-iR.z);let r=this.material.rotation;0!==r&&(i=Math.cos(r),n=Math.sin(r));let a=this.center;iH(iF.set(-.5,-.5,0),iR,a,iP,n,i),iH(iN.set(.5,-.5,0),iR,a,iP,n,i),iH(iU.set(.5,.5,0),iR,a,iP,n,i),ik.set(0,0),iB.set(1,0),iO.set(1,1);let s=e.ray.intersectTriangle(iF,iN,iU,!1,iC);if(null===s&&(iH(iN.set(-.5,.5,0),iR,a,iP,n,i),iB.set(0,1),null===(s=e.ray.intersectTriangle(iF,iU,iN,!1,iC))))return;let o=e.ray.origin.distanceTo(iC);o<e.near||o>e.far||t.push({distance:o,point:iC.clone(),uv:ny.getInterpolation(iC,iF,iN,iU,ik,iB,iO,new eQ),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 iH(e,t,n,i,r,a){iI.subVectors(e,n).addScalar(.5).multiply(i),void 0!==r?(iD.x=a*iI.x-r*iI.y,iD.y=r*iI.x+a*iI.y):iD.copy(iI),e.copy(t),e.x+=iD.x,e.y+=iD.y,e.applyMatrix4(iL)}let iV=new e0,iG=new e0;class ij extends nr{constructor(){super(),this.isLOD=!0,this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);let t=e.levels;for(let e=0,n=t.length;e<n;e++){let n=t[e];this.addLevel(n.object.clone(),n.distance,n.hysteresis)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,t=0,n=0){let i;t=Math.abs(t);let r=this.levels;for(i=0;i<r.length&&!(t<r[i].distance);i++);return r.splice(i,0,{distance:t,hysteresis:n,object:e}),this.add(e),this}removeLevel(e){let t=this.levels;for(let n=0;n<t.length;n++)if(t[n].distance===e){let e=t.splice(n,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 n,i;for(n=1,i=t.length;n<i;n++){let i=t[n].distance;if(t[n].object.visible&&(i-=i*t[n].hysteresis),e<i)break}return t[n-1].object}return null}raycast(e,t){if(this.levels.length>0){iV.setFromMatrixPosition(this.matrixWorld);let n=e.ray.origin.distanceTo(iV);this.getObjectForDistance(n).raycast(e,t)}}update(e){let t=this.levels;if(t.length>1){let n,i;iV.setFromMatrixPosition(e.matrixWorld),iG.setFromMatrixPosition(this.matrixWorld);let r=iV.distanceTo(iG)/e.zoom;for(n=1,t[0].object.visible=!0,i=t.length;n<i;n++){let e=t[n].distance;if(t[n].object.visible&&(e-=e*t[n].hysteresis),r>=e)t[n-1].object.visible=!1,t[n].object.visible=!0;else break}for(this._currentLevel=n-1;n<i;n++)t[n].object.visible=!1}}toJSON(e){let t=super.toJSON(e);!1===this.autoUpdate&&(t.object.autoUpdate=!1),t.object.levels=[];let n=this.levels;for(let e=0,i=n.length;e<i;e++){let i=n[e];t.object.levels.push({object:i.object.uuid,distance:i.distance,hysteresis:i.hysteresis})}return t}}let iW=new e0,iX=new to,iq=new to,iY=new e0,iZ=new tH,iK=new e0,iJ=new tD,iQ=new tH,i$=new tz;class i0 extends ie{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=em,this.bindMatrix=new tH,this.bindMatrixInverse=new tH,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){let e=this.geometry;
38null===this.boundingBox&&(this.boundingBox=new tf),this.boundingBox.makeEmpty();let t=e.getAttribute("position");for(let e=0;e<t.count;e++)this.getVertexPosition(e,iK),this.boundingBox.expandByPoint(iK)}computeBoundingSphere(){let e=this.geometry;null===this.boundingSphere&&(this.boundingSphere=new tD),this.boundingSphere.makeEmpty();let t=e.getAttribute("position");for(let e=0;e<t.count;e++)this.getVertexPosition(e,iK),this.boundingSphere.expandByPoint(iK)}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 n=this.material,i=this.matrixWorld;void 0===n||(null===this.boundingSphere&&this.computeBoundingSphere(),iJ.copy(this.boundingSphere),iJ.applyMatrix4(i),!1===e.ray.intersectsSphere(iJ)||(iQ.copy(i).invert(),i$.copy(e.ray).applyMatrix4(iQ),(null===this.boundingBox||!1!==i$.intersectsBox(this.boundingBox))&&this._computeIntersections(e,t,i$)))}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 to,t=this.geometry.attributes.skinWeight;for(let n=0,i=t.count;n<i;n++){e.fromBufferAttribute(t,n);let i=1/e.manhattanLength();i!==1/0?e.multiplyScalar(i):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===em?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===eg?this.bindMatrixInverse.copy(this.bindMatrix).invert():ek("SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,t){let n=this.skeleton,i=this.geometry;iX.fromBufferAttribute(i.attributes.skinIndex,e),iq.fromBufferAttribute(i.attributes.skinWeight,e),iW.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let e=0;e<4;e++){let i=iq.getComponent(e);if(0!==i){let r=iX.getComponent(e);iZ.multiplyMatrices(n.bones[r].matrixWorld,n.boneInverses[r]),t.addScaledVector(iY.copy(iW).applyMatrix4(iZ),i)}}return t.applyMatrix4(this.bindMatrixInverse)}}class i1 extends nr{constructor(){super(),this.isBone=!0,this.type="Bone"}}class i2 extends ts{constructor(e=null,t=1,n=1,i,r,a,s,o,l=1003,u=1003,c,d){super(null,a,s,o,l,u,i,r,c,d),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}let i3=new tH,i4=new tH;class i5{constructor(e=[],t=[]){this.uuid=eW(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.previousBoneMatrices=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){ek("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 tH)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){let t=new tH;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,n=this.boneMatrices,i=this.boneTexture;for(let i=0,r=e.length;i<r;i++){let r=e[i]?e[i].matrixWorld:i4;i3.multiplyMatrices(r,t[i]),i3.toArray(n,16*i)}null!==i&&(i.needsUpdate=!0)}clone(){return new i5(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 n=new i2(t,e,e,1023,1015);return n.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=n,this}getBoneByName(e){for(let t=0,n=this.bones.length;t<n;t++){let n=this.bones[t];if(n.name===e)return n}}dispose(){null!==this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let n=0,i=e.bones.length;n<i;n++){let i=e.bones[n],r=t[i];void 0===r&&(ek("Skeleton: No bone found with UUID:",i),r=new i1),this.bones.push(r),this.boneInverses.push(new tH().fromArray(e.boneInverses[n]))}return this.init(),this}toJSON(){let e={metadata:{version:4.7,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;let t=this.bones,n=this.boneInverses;for(let i=0,r=t.length;i<r;i++){let r=t[i];e.bones.push(r.uuid);let a=n[i];e.boneInverses.push(a.toArray())}return e}}class i6 extends nN{constructor(e,t,n,i=1){super(e,t,n),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=i}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}}
38let i8=new tH,i9=new tH,i7=[],re=new tf,rt=new tH,rn=new ie,ri=new tD;class rr extends ie{constructor(e,t,n){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new i6(new Float32Array(16*n),16),this.instanceColor=null,this.morphTexture=null,this.count=n,this.boundingBox=null,this.boundingSphere=null;for(let e=0;e<n;e++)this.setMatrixAt(e,rt)}computeBoundingBox(){let e=this.geometry,t=this.count;null===this.boundingBox&&(this.boundingBox=new tf),null===e.boundingBox&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,i8),re.copy(e.boundingBox).applyMatrix4(i8),this.boundingBox.union(re)}computeBoundingSphere(){let e=this.geometry,t=this.count;null===this.boundingSphere&&(this.boundingSphere=new tD),null===e.boundingSphere&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,i8),ri.copy(e.boundingSphere).applyMatrix4(i8),this.boundingSphere.union(ri)}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 n=t.morphTargetInfluences,i=this.morphTexture.source.data.data,r=e*(n.length+1)+1;for(let e=0;e<n.length;e++)n[e]=i[r+e]}raycast(e,t){let n=this.matrixWorld,i=this.count;if((rn.geometry=this.geometry,rn.material=this.material,void 0!==rn.material)&&(null===this.boundingSphere&&this.computeBoundingSphere(),ri.copy(this.boundingSphere),ri.applyMatrix4(n),!1!==e.ray.intersectsSphere(ri)))for(let r=0;r<i;r++){this.getMatrixAt(r,i8),i9.multiplyMatrices(n,i8),rn.matrixWorld=i9,rn.raycast(e,i7);for(let e=0,n=i7.length;e<n;e++){let n=i7[e];n.instanceId=r,n.object=this,t.push(n)}i7.length=0}}setColorAt(e,t){null===this.instanceColor&&(this.instanceColor=new i6(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 n=t.morphTargetInfluences,i=n.length+1;null===this.morphTexture&&(this.morphTexture=new i2(new Float32Array(i*this.count),i,this.count,1028,1015));let r=this.morphTexture.source.data.data,a=0;for(let e=0;e<n.length;e++)a+=n[e];let s=this.geometry.morphTargetsRelative?1:1-a,o=i*e;r[o]=s,r.set(n,o+1)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"}),null!==this.morphTexture&&(this.morphTexture.dispose(),this.morphTexture=null)}}let ra=new e0,rs=new e0,ro=new e3;class rl{constructor(e=new e0(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,n,i){return this.normal.set(e,t,n),this.constant=i,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){let i=ra.subVectors(n,t).cross(rs.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(i,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 n=e.delta(ra),i=this.normal.dot(n);if(0===i)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;let r=-(e.start.dot(this.normal)+this.constant)/i;return r<0||r>1?null:t.copy(e.start).addScaledVector(n,r)}intersectsLine(e){let t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<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 n=t||ro.getNormalMatrix(e),i=this.coplanarPoint(ra).applyMatrix4(e),r=this.normal.applyM
38atrix3(n).normalize();return this.constant=-i.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 ru=new tD,rc=new eQ(.5,.5),rd=new e0;class rh{constructor(e=new rl,t=new rl,n=new rl,i=new rl,r=new rl,a=new rl){this.planes=[e,t,n,i,r,a]}set(e,t,n,i,r,a){let s=this.planes;return s[0].copy(e),s[1].copy(t),s[2].copy(n),s[3].copy(i),s[4].copy(r),s[5].copy(a),this}copy(e){let t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,t=2e3,n=!1){let i=this.planes,r=e.elements,a=r[0],s=r[1],o=r[2],l=r[3],u=r[4],c=r[5],d=r[6],h=r[7],p=r[8],f=r[9],m=r[10],g=r[11],v=r[12],y=r[13],x=r[14],b=r[15];if(i[0].setComponents(l-a,h-u,g-p,b-v).normalize(),i[1].setComponents(l+a,h+u,g+p,b+v).normalize(),i[2].setComponents(l+s,h+c,g+f,b+y).normalize(),i[3].setComponents(l-s,h-c,g-f,b-y).normalize(),n)i[4].setComponents(o,d,m,x).normalize(),i[5].setComponents(l-o,h-d,g-m,b-x).normalize();else if(i[4].setComponents(l-o,h-d,g-m,b-x).normalize(),2e3===t)i[5].setComponents(l+o,h+d,g+m,b+x).normalize();else if(2001===t)i[5].setComponents(o,d,m,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(),ru.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{let t=e.geometry;null===t.boundingSphere&&t.computeBoundingSphere(),ru.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(ru)}intersectsSprite(e){return ru.center.set(0,0,0),ru.radius=.7071067811865476+rc.distanceTo(e.center),ru.applyMatrix4(e.matrixWorld),this.intersectsSphere(ru)}intersectsSphere(e){let t=this.planes,n=e.center,i=-e.radius;for(let e=0;e<6;e++)if(t[e].distanceToPoint(n)<i)return!1;return!0}intersectsBox(e){let t=this.planes;for(let n=0;n<6;n++){let i=t[n];if(rd.x=i.normal.x>0?e.max.x:e.min.x,rd.y=i.normal.y>0?e.max.y:e.min.y,rd.z=i.normal.z>0?e.max.z:e.min.z,0>i.distanceToPoint(rd))return!1}return!0}containsPoint(e){let t=this.planes;for(let n=0;n<6;n++)if(0>t[n].distanceToPoint(e))return!1;return!0}clone(){return new this.constructor().copy(this)}}let rp=new tH,rf=new rh;class rm{constructor(){this.coordinateSystem=2e3}intersectsObject(e,t){if(!t.isArrayCamera||0===t.cameras.length)return!1;for(let n=0;n<t.cameras.length;n++){let i=t.cameras[n];if(rp.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),rf.setFromProjectionMatrix(rp,i.coordinateSystem,i.reversedDepth),rf.intersectsObject(e))return!0}return!1}intersectsSprite(e,t){if(!t||!t.cameras||0===t.cameras.length)return!1;for(let n=0;n<t.cameras.length;n++){let i=t.cameras[n];if(rp.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),rf.setFromProjectionMatrix(rp,i.coordinateSystem,i.reversedDepth),rf.intersectsSprite(e))return!0}return!1}intersectsSphere(e,t){if(!t||!t.cameras||0===t.cameras.length)return!1;for(let n=0;n<t.cameras.length;n++){let i=t.cameras[n];if(rp.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),rf.setFromProjectionMatrix(rp,i.coordinateSystem,i.reversedDepth),rf.intersectsSphere(e))return!0}return!1}intersectsBox(e,t){if(!t||!t.cameras||0===t.cameras.length)return!1;for(let n=0;n<t.cameras.length;n++){let i=t.cameras[n];if(rp.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),rf.setFromProjectionMatrix(rp,i.coordinateSystem,i.reversedDepth),rf.intersectsBox(e))return!0}return!1}containsPoint(e,t){if(!t||!t.cameras||0===t.cameras.length)return!1;for(let n=0;n<t.cameras.length;n++){let i=t.cameras[n];if(rp.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),rf.setFromProjectionMatrix(rp,i.coordinateSystem,i.reversedDepth),rf.containsPoint(e))return!0}return!1}clone(){return new rm}}function rg(e,t){return e-t}function rv(e,t){return e.z-t.z}function ry(e,t){return t.z-e.z}let rx=new tH,rb=new nw(1,1,1),rS=new rh,r_=new rm,rw=new tf,rM=new tD,rT=new e0,rE=new e0,rA=new e0,rC=new class{constructor(){this.index=0,this.pool=[],this.list=[]}push(e,t,n,i){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=n,s.index=i}reset(){this.list.length=0,this.index=0}},rP=new ie,rR=[];function rI(e,t){if(e.constructor!==t.constructor){let n=Math.min(e.length,t.length);for(let i=0;i<n;i++)t[i]=e[i]}else{let n=Math.min(e.length,t.length);t.set(new e.constructor(e.buffer,0,n))}}class rD extends ie{constructor(e,t,n=2*t,i){super(new nQ,i),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=n,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()}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}_initMatricesTexture(){let e=Math.sqrt(4*this._maxInstanceCount),t=new i2(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 i2(new Uint32Array((e=Math.ceil(e))*e),e,e,1029,1014);this._indirectTexture=t}_initColorsTexture(){let e=Math.sqrt(this._maxInstanceCount),t=new i2(new Float32Array((e=Math.ceil(e))*e*4).fill(1),e,e,1023,1015);
38t.colorSpace=e8.workingColorSpace,this._colorsTexture=t}_initializeGeometry(e){let t=this.geometry,n=this._maxVertexCount,i=this._maxIndexCount;if(!1===this._geometryInitialized){for(let i in e.attributes){let{array:r,itemSize:a,normalized:s}=e.getAttribute(i),o=new nN(new r.constructor(n*a),a,s);t.setAttribute(i,o)}if(null!==e.getIndex()){let e=n>65535?new Uint32Array(i):new Uint16Array(i);t.setIndex(new nN(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 n in t.attributes){if(!e.hasAttribute(n))throw Error(`THREE.BatchedMesh: Added geometry missing "${n}". All geometries must have consistent attributes.`);let i=e.getAttribute(n),r=t.getAttribute(n);if(i.itemSize!==r.itemSize||i.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 tf);let e=this.boundingBox,t=this._instanceInfo;e.makeEmpty();for(let n=0,i=t.length;n<i;n++){if(!1===t[n].active)continue;let i=t[n].geometryIndex;this.getMatrixAt(n,rx),this.getBoundingBoxAt(i,rw).applyMatrix4(rx),e.union(rw)}}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new tD);let e=this.boundingSphere,t=this._instanceInfo;e.makeEmpty();for(let n=0,i=t.length;n<i;n++){if(!1===t[n].active)continue;let i=t[n].geometryIndex;this.getMatrixAt(n,rx),this.getBoundingSphereAt(i,rM).applyMatrix4(rx),e.union(rM)}}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},n=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(rg),n=this._availableInstanceIds.shift(),this._instanceInfo[n]=t):(n=this._instanceInfo.length,this._instanceInfo.push(t));let i=this._matricesTexture;rx.identity().toArray(i.image.data,16*n),i.needsUpdate=!0;let r=this._colorsTexture;return r&&(rb.toArray(r.image.data,4*n),r.needsUpdate=!0),this._visibilityChanged=!0,n}addGeometry(e,t=-1,n=-1){let i;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===n?s.count:n),-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(rg),a[i=this._availableGeometryIds.shift()]=r):(i=this._geometryCount,this._geometryCount++,a.push(r)),this.setGeometryAt(i,e),this._nextIndexStart=r.indexStart+r.reservedIndexCount,this._nextVertexStart=r.vertexStart+r.reservedVertexCount,i}setGeometryAt(e,t){if(e>=this._geometryCount)throw Error("THREE.BatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);let n=this.geometry,i=null!==n.getIndex(),r=n.getIndex(),a=t.getIndex(),s=this._geometryInfo[e];if(i&&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,n.attributes){let i=t.getAttribute(e),r=n.getAttribute(e);!function(e,t,n=0){let i=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<i;r++)t.setComponent(a+n,r,e.getComponent(a,r))}else t.array.set(e.array,n*i);t.needsUpdate=!0}(i,r,o);let a=i.itemSize;
38for(let e=i.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(i){let e=s.indexStart,n=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<n;t++)r.setX(e+t,o);r.needsUpdate=!0,r.addUpdateRange(e,s.reservedIndexCount)}return s.start=i?s.indexStart:s.vertexStart,s.count=i?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 n=this._instanceInfo;for(let t=0,i=n.length;t<i;t++)n[t].active&&n[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,n=this._geometryInfo,i=n.map((e,t)=>t).sort((e,t)=>n[e].vertexStart-n[t].vertexStart),r=this.geometry;for(let a=0,s=n.length;a<s;a++){let s=n[i[a]];if(!1!==s.active){if(null!==r.index){if(s.indexStart!==t){let{indexStart:n,vertexStart:i,reservedIndexCount:a}=s,o=r.index,l=o.array,u=e-i;for(let e=n;e<n+a;e++)l[e]=l[e]+u;o.array.copyWithin(t,n,n+a),o.addUpdateRange(t,a),o.needsUpdate=!0,s.indexStart=t}t+=s.reservedIndexCount}if(s.vertexStart!==e){let{vertexStart:t,reservedVertexCount:n}=s,i=r.attributes;for(let r in i){let a=i[r],{array:s,itemSize:o}=a;s.copyWithin(e*o,t*o,(t+n)*o),a.addUpdateRange(e*o,n*o),a.needsUpdate=!0}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._visibilityChanged=!0,this}getBoundingBoxAt(e,t){if(e>=this._geometryCount)return null;let n=this.geometry,i=this._geometryInfo[e];if(null===i.boundingBox){let e=new tf,t=n.index,r=n.attributes.position;for(let n=i.start,a=i.start+i.count;n<a;n++){let i=n;t&&(i=t.getX(i)),e.expandByPoint(rT.fromBufferAttribute(r,i))}i.boundingBox=e}return t.copy(i.boundingBox),t}getBoundingSphereAt(e,t){if(e>=this._geometryCount)return null;let n=this.geometry,i=this._geometryInfo[e];if(null===i.boundingSphere){let t=new tD;this.getBoundingBoxAt(e,rw),rw.getCenter(t.center);let r=n.index,a=n.attributes.position,s=0;for(let e=i.start,n=i.start+i.count;e<n;e++){let n=e;r&&(n=r.getX(n)),rT.fromBufferAttribute(a,n),s=Math.max(s,t.center.distanceToSquared(rT))}t.radius=Math.sqrt(s),i.boundingSphere=t}return t.copy(i.boundingSphere),t}setMatrixAt(e,t){this.validateInstanceId(e);let n=this._matricesTexture,i=this._matricesTexture.image.data;return t.toArray(i,16*e),n.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 n=this._geometryInfo[e];return t.vertexStart=n.vertexStart,t.vertexCount=n.vertexCount,t.reservedVertexCount=n.reservedVertexCount,t.indexStart=n.indexStart,t.indexCount=n.indexCount,t.reservedIndexCount=n.reservedIndexCount,t.start=n.start,t.count=n.count,t}setInstanceCount(e){let t=this._availableInstanceIds,n=this._instanceInfo;for(t.sort(rg);t[t.length-1]===n.length-1;)n.pop(),t.pop();if(e<n.length)throw Error(`BatchedMesh: Instance ids outside the range ${e} are being used. Cannot shrink instance count.`);let i=new Int32Array(e),r=new Int32Array(e);rI(this._multiDrawCounts,i),rI(this._multiDrawStarts,r),this._multiDrawCounts=i,this._multiDrawStarts=r,this._maxInstanceCount=e;let a=this._indirectTexture,s=this._matricesTexture,o=this._colorsTexture;a.dispose(),this._initIndirectTexture(),rI(a.image.data,this._indirectTexture.image.data),s.dispose(),this._initMatricesTexture(),rI(s.image.data,this._matricesTexture.image.data),o&&(o.dispose(),this._initColorsTexture(),rI(o.image.data,this._colorsTexture.image.data))}setGeometrySize(e,t){let n=[...this._geometryInfo].filter(e=>e.active);if(Math.max(...n.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(...n.map(e=>e.indexStart+e.reservedIndexCount))>t)throw Error(`BatchedMesh: Geometry index values are being used outside the range ${t}. Cannot shrink further.`);let i=this.geometry;i.dispose(),this._maxVertexCount=e,this._maxIndexCount=t,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new nQ,this._initializeGeometry(i));let r=this.geometry;for(let e in i.index&&rI(i.index.array,r.index.array),i.attributes)rI(i.attributes[e].array,r.attributes[e].array)}raycast(e,t){let n=this._instanceInfo,i=this._geometryInfo,r=this.matrixWorld,a=this.geometry;rP.material=this.material,rP.geometry.index=a.index,rP.geometry.attributes=a.attributes,null===rP.geometry.boundingBox&&
38(rP.geometry.boundingBox=new tf),null===rP.geometry.boundingSphere&&(rP.geometry.boundingSphere=new tD);for(let a=0,s=n.length;a<s;a++){if(!n[a].visible||!n[a].active)continue;let s=n[a].geometryIndex,o=i[s];rP.geometry.setDrawRange(o.start,o.count),this.getMatrixAt(a,rP.matrixWorld).premultiply(r),this.getBoundingBoxAt(s,rP.geometry.boundingBox),this.getBoundingSphereAt(s,rP.geometry.boundingSphere),rP.raycast(e,rR);for(let e=0,n=rR.length;e<n;e++){let n=rR[e];n.object=this,n.batchId=a,t.push(n)}rR.length=0}rP.material=null,rP.geometry.index=null,rP.geometry.attributes={},rP.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._availableInstanceIds=e._availableInstanceIds.slice(),this._availableGeometryIds=e._availableGeometryIds.slice(),this._nextIndexStart=e._nextIndexStart,this._nextVertexStart=e._nextVertexStart,this._geometryCount=e._geometryCount,this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._indirectTexture=e._indirectTexture.clone(),this._indirectTexture.image.data=this._indirectTexture.image.data.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(){this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,null!==this._colorsTexture&&(this._colorsTexture.dispose(),this._colorsTexture=null)}onBeforeRender(e,t,n,i,r){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;let a=i.getIndex(),s=null===a?1:a.array.BYTES_PER_ELEMENT,o=this._instanceInfo,l=this._multiDrawStarts,u=this._multiDrawCounts,c=this._geometryInfo,d=this.perObjectFrustumCulled,h=this._indirectTexture,p=h.image.data,f=n.isArrayCamera?r_:rS;d&&!n.isArrayCamera&&(rx.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse).multiply(this.matrixWorld),rS.setFromProjectionMatrix(rx,n.coordinateSystem,n.reversedDepth));let m=0;if(this.sortObjects){rx.copy(this.matrixWorld).invert(),rT.setFromMatrixPosition(n.matrixWorld).applyMatrix4(rx),rE.set(0,0,-1).transformDirection(n.matrixWorld).transformDirection(rx);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,rx),this.getBoundingSphereAt(t,rM).applyMatrix4(rx);let i=!1;if(d&&(i=!f.intersectsSphere(rM,n)),!i){let n=c[t],i=rA.subVectors(rM.center,rT).dot(rE);rC.push(n.start,n.count,i,e)}}let e=rC.list,t=this.customSort;null===t?e.sort(r.transparent?ry:rv):t.call(this,e,n);for(let t=0,n=e.length;t<n;t++){let n=e[t];l[m]=n.start*s,u[m]=n.count,p[m]=n.index,m++}rC.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(d&&(this.getMatrixAt(e,rx),this.getBoundingSphereAt(t,rM).applyMatrix4(rx),i=!f.intersectsSphere(rM,n)),!i){let n=c[t];l[m]=n.start*s,u[m]=n.count,p[m]=e,m++}}h.needsUpdate=!0,this._multiDrawCount=m,this._visibilityChanged=!1}onBeforeShadow(e,t,n,i,r,a){this.onBeforeRender(e,null,i,r,a)}}class rL extends nE{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new nw(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 rF=new e0,rN=new e0,rU=new tH,rk=new tz,rB=new tD,rO=new e0,rz=new e0;class rH extends nr{constructor(e=new nQ,t=new rL){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,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,n=[0];for(let e=1,i=t.count;e<i;e++)rF.fromBufferAttribute(t,e-1),rN.fromBufferAttribute(t,e),n[e]=n[e-1],n[e]+=rF.distanceTo(rN);e.setAttribute("lineDistance",new nj(n,1))}else ek("Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){let n=this.geometry,i=this.matrixWorld,r=e.params.Line.threshold,a=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),rB.copy(n.boundingSphere),rB.applyMatrix4(i),rB.radius+=r,!1===e.ray.intersectsSphere(rB))return;rU.copy(i).invert(),rk.copy(e.ray).applyMatrix4(rU);let s=r/((this.scale.x+this.scale.y+this.scale.z)/3),o=s*s,l=this.isLineSegments?2:1,u=n.index,c=n.attributes.position;if(null!==u){let n=Math.max(0,a.start),i=Math.min(u.count,a.start+a.count);for(let r=n,a=i-1;r<a;r+=l){let n=rV(this,e,rk,o,u.getX(r),u.getX(r+1),r);
38n&&t.push(n)}if(this.isLineLoop){let r=rV(this,e,rk,o,u.getX(i-1),u.getX(n),i-1);r&&t.push(r)}}else{let n=Math.max(0,a.start),i=Math.min(c.count,a.start+a.count);for(let r=n,a=i-1;r<a;r+=l){let n=rV(this,e,rk,o,r,r+1,r);n&&t.push(n)}if(this.isLineLoop){let r=rV(this,e,rk,o,i-1,n,i-1);r&&t.push(r)}}}updateMorphTargets(){let e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){let n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e<t;e++){let t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}}function rV(e,t,n,i,r,a,s){let o=e.geometry.attributes.position;if(rF.fromBufferAttribute(o,r),rN.fromBufferAttribute(o,a),n.distanceSqToSegment(rF,rN,rO,rz)>i)return;rO.applyMatrix4(e.matrixWorld);let l=t.ray.origin.distanceTo(rO);if(!(l<t.near)&&!(l>t.far))return{distance:l,point:rz.clone().applyMatrix4(e.matrixWorld),index:s,face:null,faceIndex:null,barycoord:null,object:e}}let rG=new e0,rj=new e0;class rW extends rH{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,n=[];for(let e=0,i=t.count;e<i;e+=2)rG.fromBufferAttribute(t,e),rj.fromBufferAttribute(t,e+1),n[e]=0===e?0:n[e-1],n[e+1]=n[e]+rG.distanceTo(rj);e.setAttribute("lineDistance",new nj(n,1))}else ek("LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class rX extends rH{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}}class rq extends nE{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new nw(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 rY=new tH,rZ=new tz,rK=new tD,rJ=new e0;class rQ extends nr{constructor(e=new nQ,t=new rq){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,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 n=this.geometry,i=this.matrixWorld,r=e.params.Points.threshold,a=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),rK.copy(n.boundingSphere),rK.applyMatrix4(i),rK.radius+=r,!1===e.ray.intersectsSphere(rK))return;rY.copy(i).invert(),rZ.copy(e.ray).applyMatrix4(rY);let s=r/((this.scale.x+this.scale.y+this.scale.z)/3),o=s*s,l=n.index,u=n.attributes.position;if(null!==l){let n=Math.max(0,a.start),r=Math.min(l.count,a.start+a.count);for(let a=n;a<r;a++){let n=l.getX(a);rJ.fromBufferAttribute(u,n),r$(rJ,n,o,i,e,t,this)}}else{let n=Math.max(0,a.start),r=Math.min(u.count,a.start+a.count);for(let a=n;a<r;a++)rJ.fromBufferAttribute(u,a),r$(rJ,a,o,i,e,t,this)}}updateMorphTargets(){let e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){let n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e<t;e++){let t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}}function r$(e,t,n,i,r,a,s){let o=rZ.distanceSqToPoint(e);if(o<n){let n=new e0;rZ.closestPointToPoint(e,n),n.applyMatrix4(i);let l=r.ray.origin.distanceTo(n);if(l<r.near||l>r.far)return;a.push({distance:l,distanceToRay:Math.sqrt(o),point:n,index:t,face:null,faceIndex:null,barycoord:null,object:s})}}class r0 extends ts{constructor(e,t,n,i,r=1006,a=1006,s,o,l){super(e,t,n,i,r,a,s,o,l),this.isVideoTexture=!0,this.generateMipmaps=!1,this._requestVideoFrameCallbackId=0;const u=this;"requestVideoFrameCallback"in e&&(this._requestVideoFrameCallbackId=e.requestVideoFrameCallback(function t(){u.needsUpdate=!0,u._requestVideoFrameCallbackId=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)}dispose(){0!==this._requestVideoFrameCallbackId&&(this.source.data.cancelVideoFrameCallback(this._requestVideoFrameCallbackId),this._requestVideoFrameCallbackId=0),super.dispose()}}class r1 extends r0{constructor(e,t,n,i,r,a,s,o){super({},e,t,n,i,r,a,s,o),this.isVideoFrameTexture=!0}update(){}clone(){return new this.constructor().copy(this)}setFrame(e){this.image=e,this.needsUpdate=!0}}class r2 extends ts{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=1003,this.minFilter=1003,this.generateMipmaps=!1,this.needsUpdate=!0}}class r3 extends ts{constructor(e,t,n,i,r,a,s,o,l,u,c,d){super(null,a,s,o,l,u,i,r,c,d),this.isCompressedTexture=!0,this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class r4 extends r3{constructor(e,t,n,i,r,a){super(e,t,n,r,a),this.isCompressedArrayTexture=!0,this.image.depth=i,this.wrapR=1001,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class r5 extends r3{constructor(e,t,n){super(void 0,e[0].width,e[0].height,t,n,301),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class r6 extends ts{constructor(e,t,n,i,r,a,s,o,l){super(e,t,n,i,r,a,s,o,l),this.isCanvasTexture=!0,this.needsUpdate=!0}}class r8 extends ts{constructor(e,t,n=1014,i,r,a,s=1003,o=1003,l,u=1026,c=1){if(1026!==u&&1027!==u)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");super({width:e,height:t,depth:c},i,r,a,s,o,u,n,l),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new tn(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){let t=super.toJSON(e);return null!==this.compareFunction&&(t.compareFunction=this.compareFunction),t}}class r9 extends r8{constructor(e,t=1014,n=301,i,r,a=1003,s=1003,o,l=1026){const u={width:e,height:e,depth:1};super(e,e,t,n,i,r,a,s,o,l),this.image=[u,u,u,u,u,u],this.isCubeDepthTexture=!0,this.isCubeTexture=!0}get images(){return this.image}set images(e){this.image=e}}class r7 extends ts{constructor(e=null){super(),this.sourceTexture=e,this.isExternalTexture=!0}copy(e){return super.copy(e),this.sourceTexture=e.sourceTexture,this}}class ae extends nQ{constructor(e=1,t=1,n=4,i=8,r=1){super(),this.type="CapsuleGeometry",this.parameters={radiu
38s:e,height:t,capSegments:n,radialSegments:i,heightSegments:r},t=Math.max(0,t),n=Math.max(1,Math.floor(n)),i=Math.max(3,Math.floor(i));const a=[],s=[],o=[],l=[],u=t/2,c=Math.PI/2*e,d=t,h=2*c+d,p=2*n+(r=Math.max(1,Math.floor(r))),f=i+1,m=new e0,g=new e0;for(let v=0;v<=p;v++){let y=0,x=0,b=0,S=0;if(v<=n){const t=v/n,i=t*Math.PI/2;x=-u-e*Math.cos(i),b=e*Math.sin(i),S=-e*Math.cos(i),y=t*c}else if(v<=n+r){const i=(v-n)/r;x=-u+i*t,b=e,S=0,y=c+i*d}else{const t=(v-n-r)/n,i=t*Math.PI/2;x=u+e*Math.sin(i),b=e*Math.cos(i),S=e*Math.sin(i),y=c+d+t*c}const _=Math.max(0,Math.min(1,y/h));let w=0;0===v?w=.5/i:v===p&&(w=-.5/i);for(let e=0;e<=i;e++){const t=e/i,n=t*Math.PI*2,r=Math.sin(n),a=Math.cos(n);g.x=-b*a,g.y=x,g.z=b*r,s.push(g.x,g.y,g.z),m.set(-b*a,S,b*r),m.normalize(),o.push(m.x,m.y,m.z),l.push(t+w,_)}if(v>0){const e=(v-1)*f;for(let t=0;t<i;t++){const n=e+t,i=e+t+1,r=v*f+t,s=v*f+t+1;a.push(n,i,r),a.push(i,s,r)}}}this.setIndex(a),this.setAttribute("position",new nj(s,3)),this.setAttribute("normal",new nj(o,3)),this.setAttribute("uv",new nj(l,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new ae(e.radius,e.height,e.capSegments,e.radialSegments,e.heightSegments)}}class at extends nQ{constructor(e=1,t=32,n=0,i=2*Math.PI){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:i},t=Math.max(3,t);const r=[],a=[],s=[],o=[],l=new e0,u=new eQ;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 d=n+r/t*i;l.x=e*Math.cos(d),l.y=e*Math.sin(d),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 nj(a,3)),this.setAttribute("normal",new nj(s,3)),this.setAttribute("uv",new nj(o,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new at(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class an extends nQ{constructor(e=1,t=1,n=1,i=32,r=1,a=!1,s=0,o=2*Math.PI){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:i,heightSegments:r,openEnded:a,thetaStart:s,thetaLength:o};const l=this;i=Math.floor(i),r=Math.floor(r);const u=[],c=[],d=[],h=[];let p=0;const f=[],m=n/2;let g=0;function v(n){let r=p,a=new eQ,f=new e0,v=0,y=!0===n?e:t,x=!0===n?1:-1;for(let e=1;e<=i;e++)c.push(0,m*x,0),d.push(0,x,0),h.push(.5,.5),p++;let b=p;for(let e=0;e<=i;e++){let t=e/i*o+s,n=Math.cos(t),r=Math.sin(t);f.x=y*r,f.y=m*x,f.z=y*n,c.push(f.x,f.y,f.z),d.push(0,x,0),a.x=.5*n+.5,a.y=.5*r*x+.5,h.push(a.x,a.y),p++}for(let e=0;e<i;e++){let t=r+e,i=b+e;!0===n?u.push(i,i+1,t):u.push(i+1,i,t),v+=3}l.addGroup(g,v,!0===n?1:2),g+=v}(function(){let a=new e0,v=new e0,y=0,x=(t-e)/n;for(let l=0;l<=r;l++){let u=[],g=l/r,y=g*(t-e)+e;for(let e=0;e<=i;e++){let t=e/i,r=t*o+s,l=Math.sin(r),f=Math.cos(r);v.x=y*l,v.y=-g*n+m,v.z=y*f,c.push(v.x,v.y,v.z),a.set(l,x,f).normalize(),d.push(a.x,a.y,a.z),h.push(t,1-g),u.push(p++)}f.push(u)}for(let n=0;n<i;n++)for(let i=0;i<r;i++){let a=f[i][n],s=f[i+1][n],o=f[i+1][n+1],l=f[i][n+1];(e>0||0!==i)&&(u.push(a,s,l),y+=3),(t>0||i!==r-1)&&(u.push(s,o,l),y+=3)}l.addGroup(g,y,0),g+=y})(),!1===a&&(e>0&&v(!0),t>0&&v(!1)),this.setIndex(u),this.setAttribute("position",new nj(c,3)),this.setAttribute("normal",new nj(d,3)),this.setAttribute("uv",new nj(h,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new an(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class ai extends an{constructor(e=1,t=1,n=32,i=1,r=!1,a=0,s=2*Math.PI){super(0,e,t,n,i,r,a,s),this.type="C
38oneGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:i,openEnded:r,thetaStart:a,thetaLength:s}}static fromJSON(e){return new ai(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class ar extends nQ{constructor(e=[],t=[],n=1,i=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:i};const r=[],a=[];function s(e){r.push(e.x,e.y,e.z)}function o(t,n){let i=3*t;n.x=e[i+0],n.y=e[i+1],n.z=e[i+2]}function l(e,t,n,i){i<0&&1===e.x&&(a[t]=e.x-1),0===n.x&&0===n.z&&(a[t]=i/2/Math.PI+.5)}function u(e){return Math.atan2(e.z,-e.x)}(function(e){let n=new e0,i=new e0,r=new e0;for(let a=0;a<t.length;a+=3)o(t[a+0],n),o(t[a+1],i),o(t[a+2],r),function(e,t,n,i){let r=i+1,a=[];for(let i=0;i<=r;i++){a[i]=[];let s=e.clone().lerp(n,i/r),o=t.clone().lerp(n,i/r),l=r-i;for(let e=0;e<=l;e++)0===e&&i===r?a[i][e]=s:a[i][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 n=Math.floor(t/2);t%2==0?(s(a[e][n+1]),s(a[e+1][n]),s(a[e][n])):(s(a[e][n+1]),s(a[e+1][n+1]),s(a[e+1][n]))}}(n,i,r,e)})(i),function(e){let t=new e0;for(let n=0;n<r.length;n+=3)t.x=r[n+0],t.y=r[n+1],t.z=r[n+2],t.normalize().multiplyScalar(e),r[n+0]=t.x,r[n+1]=t.y,r[n+2]=t.z}(n),function(){let e=new e0;for(let n=0;n<r.length;n+=3){var t;e.x=r[n+0],e.y=r[n+1],e.z=r[n+2];let i=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(i,1-s)}(function(){let e=new e0,t=new e0,n=new e0,i=new e0,s=new eQ,o=new eQ,c=new eQ;for(let d=0,h=0;d<r.length;d+=9,h+=6){e.set(r[d+0],r[d+1],r[d+2]),t.set(r[d+3],r[d+4],r[d+5]),n.set(r[d+6],r[d+7],r[d+8]),s.set(a[h+0],a[h+1]),o.set(a[h+2],a[h+3]),c.set(a[h+4],a[h+5]),i.copy(e).add(t).add(n).divideScalar(3);let p=u(i);l(s,h+0,e,p),l(o,h+2,t,p),l(c,h+4,n,p)}})(),function(){for(let e=0;e<a.length;e+=6){let t=a[e+0],n=a[e+2],i=a[e+4],r=Math.max(t,n,i),s=Math.min(t,n,i);r>.9&&s<.1&&(t<.2&&(a[e+0]+=1),n<.2&&(a[e+2]+=1),i<.2&&(a[e+4]+=1))}}()}(),this.setAttribute("position",new nj(r,3)),this.setAttribute("normal",new nj(r.slice(),3)),this.setAttribute("uv",new nj(a,2)),0===i?this.computeVertexNormals():this.normalizeNormals()}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new ar(e.vertices,e.indices,e.radius,e.detail)}}class aa extends ar{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2,i=1/n;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,-i,-n,0,-i,n,0,i,-n,0,i,n,-i,-n,0,-i,n,0,i,-n,0,i,n,0,-n,0,-i,n,0,-i,-n,0,i,n,0,i],[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,
3819,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 aa(e.radius,e.detail)}}let as=new e0,ao=new e0,al=new e0,au=new ny;class ac extends nQ{constructor(e=null,t=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:t},null!==e){const n=Math.cos(eG*t),i=e.getIndex(),r=e.getAttribute("position"),a=i?i.count:r.count,s=[0,0,0],o=["a","b","c"],l=[,,,],u={},c=[];for(let e=0;e<a;e+=3){i?(s[0]=i.getX(e),s[1]=i.getX(e+1),s[2]=i.getX(e+2)):(s[0]=e,s[1]=e+1,s[2]=e+2);const{a:t,b:a,c:d}=au;if(t.fromBufferAttribute(r,s[0]),a.fromBufferAttribute(r,s[1]),d.fromBufferAttribute(r,s[2]),au.getNormal(al),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*d.x)},${Math.round(1e4*d.y)},${Math.round(1e4*d.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,i=l[e],r=l[t],a=au[o[e]],d=au[o[t]],h=`${i}_${r}`,p=`${r}_${i}`;p in u&&u[p]?(al.dot(u[p].normal)<=n&&(c.push(a.x,a.y,a.z),c.push(d.x,d.y,d.z)),u[p]=null):h in u||(u[h]={index0:s[e],index1:s[t],normal:al.clone()})}}for(const e in u)if(u[e]){const{index0:t,index1:n}=u[e];as.fromBufferAttribute(r,t),ao.fromBufferAttribute(r,n),c.push(as.x,as.y,as.z),c.push(ao.x,ao.y,ao.z)}this.setAttribute("position",new nj(c,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}class ad{constructor(){this.type="Curve",this.arcLengthDivisions=200,this.needsUpdate=!1,this.cacheArcLengths=null}getPoint(){ek("Curve: .getPoint() not implemented.")}getPointAt(e,t){let n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){let t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){let t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/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=[],n,i=this.getPoint(0),r=0;t.push(0);for(let a=1;a<=e;a++)t.push(r+=(n=this.getPoint(a/e)).distanceTo(i)),i=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t=null){let n,i=this.getLengths(),r=0,a=i.length;n=t||e*i[a-1];let s=0,o=a-1,l;for(;s<=o;)if((l=i[r=Math.floor(s+(o-s)/2)]-n)<0)s=r+1;else if(l>0)o=r-1;else{o=r;break}if(i[r=o]===n)return r/(a-1);let u=i[r],c=i[r+1];return(r+(n-u)/(c-u))/(a-1)}getTangent(e,t){let n=e-1e-4,i=e+1e-4;n<0&&(n=0),i>1&&(i=1);let r=this.getPoint(n),a=this.getPoint(i),s=t||(r.isVector2?new eQ:new e0);return s.copy(a).sub(r).normalize(),s}getTangentAt(e,t){let n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t=!1){let n=new e0,i=[],r=[],a=[],s=new e0,o=new tH;for(let t=0;t<=e;t++){let n=t/e;i[t]=this.getTangentAt(n,new e0)}r[0]=new e0,a[0]=new e0;let l=Number.MAX_VALUE,u=Math.abs(i[0].x),c=Math.abs(i[0].y),d=Math.abs(i[0].z);u<=l&&(l=u,n.set(1,0,0)),c<=l&&(l=c,n.set(0,1,0)),d<=l&&n.set(0,0,1),s.crossVectors(i[0],n).normalize(),r[0].crossVectors(i[0],s),a[0].crossVectors(i[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(i[t-1],i[t]),s.length()>Number.EPSILON){s.normalize();let e=Math.acos(eX(i[t-1].dot(i[t]),-1,1));r[t].applyMatrix4(o.makeRotationAxis(s,e))}a[t].crossVectors(i[t],r[t])}if(!0===t){let t=Math.acos(eX(r[0].dot(r[e]),-1,1));t/=e,i[0].dot(s.crossVectors(r[0],r[e]))>0&&(t=-t);for(let n=1;n<=e;n++)r[n].applyMatrix4(o.makeRotationAxis(i[n],t*n)),a[n].crossVectors(i[n],r[n])}return{tangents:i,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.7,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class ah extends ad{constructor(e=0,t=0,n=1,i=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=n,this.yRadius=i,this.aStartAngle=r,this.aEndAngle=a,this.aClockwise=s,this.aRotation=o}getPoint(e,t=new eQ){let n=2*Math.PI,i=this.aEndAngle-this.aStartAngle,r=Math.abs(i)<Number.EPSILON;for(;i<0;)i+=n;for(;i>n;)i-=n;i<Number.EPSILON&&(i=r?0:n),!0!==this.aClockwise||r||(i===n?i=-n:i-=n);let a=this.aStartAngle+e*i,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),n=s-this.aX,i=o-this.aY;s=n*e-i*t+this.aX,o=n*t+i*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 ap extends ah{constructor(e,t,n,i,r,a){super(e,t,n,n,i,r,a),this.isArcCurve=!0,this.type="ArcCurve"}}function af(){let e=0,t=0,n=0,i=0;function r(r,a,s,o){e=r,t=s,n=-3*r+3*a-2*s-o,i=2*r-2*a+s+o}return{initCatmullRom:function(e,t,n,i,a){r(t,n,a*(n-e),a*(i-t))},initNonuniformCatmullRom:function(e,t,n,i,a,s,o){let l=(t-e)/a-(n-e)/(a+s)+(n-t)/s,u=(n-t)/s-(i-t)/(s+o)+(i-n)/o;r(t,n,l*=s,u*=s)},calc:function(r){let a=r*r;return e+t*r+n*a+a*r*i}}}let am=new e0,ag=new af,av=new af,ay=new af;class ax extends ad{constructor(e=[],t=!1,n="centripetal",i=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=i}getPoint(e,t=new e0){let n,i,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?n=r[(o-1)%a]:(am.subVectors(r[0],r[1]).add(r[0]),n=am);let u=r[o%a],c=r[(o+1)%a];if(this.closed||o+2<a?i=r[(o+2)%a]:(am.subVectors(r[a-1],r[a-2]).add(r[a-1]),i=am),"centripetal"===this.curveType||"chordal"===this.curveType){let e="chordal"===this.curveType?.5:.25,t=Math.pow(n.distanceToSquared(u),e),r=Math.pow(u.distanceToSquared(c),e),a=Math.pow(c.distanceToSquared(i),e);r<1e-4&&(r=1),t<1e-4&&(t=r),a<1e-4&&(a=r),ag.initNonuniformCatmullRom(n.x,u.x,c.x,i.x,t,r,a),av.initNonuniformCatmullRom(n.y,u.y,c.y,i.y,t,r,a),ay.initNonuniformCatmullRom(n.z,u.z,c.z,i.z,t,r,a)}else"catmullrom"===this.curveType&&(ag.initCatmullRom(n.x,u.x,c.x,i.x,this.tension),av.initCatmullRom(n.y,u.y,c.y,i.y,this.tension),ay.initCatmullRom(n.z,u.z,c.z,i.z,this.tension));return t.set(ag.calc(l),av.calc(l),ay.calc(l)),t}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){let n=e.points[t];this.points.push(n.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,n=this.points.length;t<n;t++){let n=this.points[t];e.points.push(n.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,n=e.points.length;t<n;t++){let n=e.points[t];this.points.push(new e0().fromArray(n))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function ab(e,t,n,i,r){let a=(i-t)*.5,s=(r-n)*.5,o=e*e;return e*o*(2*n-2*i+a+s)+(-3*n+3*i-2*a-s)*o+a*e+n}function aS(e,t,n,i){let r;return(r=1-e)*r*t+2*(1-e)*e*n+e*e*i}function a_(e,t,n,i,r){let a,s;return(a=1-e)*a*a*t+3*(s=1-e)*s*e*n+3*(1-e)*e*e*i+e*e*e*r}class aw extends ad{constructor(e=new eQ,t=new eQ,n=new eQ,i=new eQ){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=i}getPoint(e,t=new eQ){let n=this.v0,i=this.v1,r=this.v2,a=this.v3;return t.set(a_(e,n.x,i.x,r.x,a.x),a_(e,n.y,i.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 aM extends ad{constructor(e=new e0,t=new e0,n=new e0,i=new e0){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=i}getPoint(e,t=new e0){let n=this.v0,i=this.v1,r=this.v2,a=this.v3;return t.set(a_(e,n.x,i.x,r.x,a.x),a_(e,n.y,i.y,r.y,a.y),a_(e,n.z,i.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 aT extends ad{constructor(e=new eQ,t=new eQ){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new eQ){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)}
38getTangent(e,t=new eQ){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 aE extends ad{constructor(e=new e0,t=new e0){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}getPoint(e,t=new e0){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 e0){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 aA extends ad{constructor(e=new eQ,t=new eQ,n=new eQ){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new eQ){let n=this.v0,i=this.v1,r=this.v2;return t.set(aS(e,n.x,i.x,r.x),aS(e,n.y,i.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 aC extends ad{constructor(e=new e0,t=new e0,n=new e0){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new e0){let n=this.v0,i=this.v1,r=this.v2;return t.set(aS(e,n.x,i.x,r.x),aS(e,n.y,i.y,r.y),aS(e,n.z,i.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 aP extends ad{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,t=new eQ){let n=this.points,i=(n.length-1)*e,r=Math.floor(i),a=i-r,s=n[0===r?r:r-1],o=n[r],l=n[r>n.length-2?n.length-1:r+1],u=n[r>n.length-3?n.length-1:r+2];return t.set(ab(a,s.x,o.x,l.x,u.x),ab(a,s.y,o.y,l.y,u.y)),t}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){let n=e.points[t];this.points.push(n.clone())}return this}toJSON(){let e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){let n=this.points[t];e.points.push(n.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){let n=e.points[t];this.points.push(new eQ().fromArray(n))}return this}}var aR=Object.freeze({__proto__:null,ArcCurve:ap,CatmullRomCurve3:ax,CubicBezierCurve:aw,CubicBezierCurve3:aM,EllipseCurve:ah,LineCurve:aT,LineCurve3:aE,QuadraticBezierCurve:aA,QuadraticBezierCurve3:aC,SplineCurve:aP});class aI extends ad{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 n=!0===e.isVector2?"LineCurve":"LineCurve3";this.curves.push(new aR[n](t,e))}return this}getPoint(e,t){let n=e*this.getLength(),i=this.getCurveLengths(),r=0;for(;r<i.length;){if(i[r]>=n){let e=i[r]-n,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 n=0,i=this.curves.length;n<i;n++)e.push(t+=this.curves[n].getLength());return this.cacheLengths=e,e}getSpacedPoints(e=40){let t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){let t,n=[];for(let i=0,r=this.curves;i<r.length;i++){let a=r[i],s=a.isEllipseCurve?2*e:a.isLineCurve||a.isLineCurve3?1:a.isS
38plineCurve?e*a.points.length:e,o=a.getPoints(s);for(let e=0;e<o.length;e++){let i=o[e];t&&t.equals(i)||(n.push(i),t=i)}}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){let n=e.curves[t];this.curves.push(n.clone())}return this.autoClose=e.autoClose,this}toJSON(){let e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,n=this.curves.length;t<n;t++){let n=this.curves[t];e.curves.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){let n=e.curves[t];this.curves.push(new aR[n.type]().fromJSON(n))}return this}}class aD extends aI{constructor(e){super(),this.type="Path",this.currentPoint=new eQ,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,n=e.length;t<n;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 n=new aT(this.currentPoint.clone(),new eQ(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,n,i){let r=new aA(this.currentPoint.clone(),new eQ(e,t),new eQ(n,i));return this.curves.push(r),this.currentPoint.set(n,i),this}bezierCurveTo(e,t,n,i,r,a){let s=new aw(this.currentPoint.clone(),new eQ(e,t),new eQ(n,i),new eQ(r,a));return this.curves.push(s),this.currentPoint.set(r,a),this}splineThru(e){let t=new aP([this.currentPoint.clone()].concat(e));return this.curves.push(t),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,n,i,r,a){let s=this.currentPoint.x,o=this.currentPoint.y;return this.absarc(e+s,t+o,n,i,r,a),this}absarc(e,t,n,i,r,a){return this.absellipse(e,t,n,n,i,r,a),this}ellipse(e,t,n,i,r,a,s,o){let l=this.currentPoint.x,u=this.currentPoint.y;return this.absellipse(e+l,t+u,n,i,r,a,s,o),this}absellipse(e,t,n,i,r,a,s,o){let l=new ah(e,t,n,i,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 aL extends aD{constructor(e){super(e),this.uuid=eW(),this.type="Shape",this.holes=[]}getPointsHoles(e){let t=[];for(let n=0,i=this.holes.length;n<i;n++)t[n]=this.holes[n].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,n=e.holes.length;t<n;t++){let n=e.holes[t];this.holes.push(n.clone())}return this}toJSON(){let e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,n=this.holes.length;t<n;t++){let n=this.holes[t];e.holes.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){let n=e.holes[t];this.holes.push(new aD().fromJSON(n))}return this}}function aF(e,t,n,i,r){let a;if(r===function(e,t,n,i){let r=0;for(let a=t,s=n-i;a<n;a+=i)r+=(e[s]-e[a])*(e[a+1]+e[s+1]),s=a;return r}(e,t,n,i)>0)for(let r=t;r<n;r+=i)a=aq(r/i|0,e[r],e[r+1],a);else for(let r=n-i;r>=t;r-=i)a=aq(r/i|0,e[r],e[r+1],a);return a&&aH(a,a.next)&&(aY(a),a=a.next),a}function aN(e,t){if(!e)return e;t||(t=e);let n=e,i;do if(i=!1,!n.steiner&&(aH(n,n.next)||0===az(n.prev,n,n.next))){if(aY(n),(n=t=n.prev)===n.next)break;i=!0}else n=n.next;while(i||n!==t)return t}function aU(e,t){let n=e.x-t.x;return 0===n&&0==(n=e.y-t.y)&&(n=(e.next.y-e.y)/(e.next.x-e.x)-(t.next.y-t.y)/(t.next.x-t.x)),n}function ak(e,t,n,i,r){return(e=((e=((e=((e=((e=(e-n)*r|0)|e<<8)&0xff00ff)|e<<4)&0xf0f0f0f)|e<<2)&0x33333333)|e<<1)&0x55555555)|(t=((t=((t=((t=((t=(t-i)*r|0)|t<<8)&0xff00ff)|t<<4)&0xf0f0f0f)|t<<2)&0x33333333)|t<<1)&0x55555555)<<1}function aB(e,t,n,i,r,a,s,o){return(r-s)*(t-o)>=(e-s)*(a-o)&&(e-s)*(i-o)>=(n-s)*(t-o)&&(n-s)*(a-o)>=(r-s)*(i-o)}function aO(e,t,n,i,r,a,s,o){return(e!==s||t!==o)&&aB(e,t,n,i,r,a,s,o)}function az(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function aH(e,t){return e.x===t.x&&e.y===t.y}function aV(e,t,n,i){let r=aj(az(e,t,n)),a=aj(az(e,t,i)),s=aj(az(n,i,e)),o=aj(az(n,i,t));return!!(r!==a&&s!==o||0===r&&aG(e,n,t)||0===a&&aG(e,i,t)||0===s&&aG(n,e,i)||0===o&&aG(n,t,i))}function aG(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function aj(e){return e>0?1:e<0?-1:0}function aW(e,t){return 0>az(e.prev,e,e.next)?az(e,t,e.next)>=0&&az(e,e.prev,t)>=0:0>az(e,t,e.prev)||0>az(e,e.next,t)}function aX(e,t){let n=aZ(e.i,e.x,e.y),i=aZ(t.i,t.x,t.y),r=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=r,r.prev=n,i.next=n,n.prev=i,a.next=i,i.prev=a,i}
38function aq(e,t,n,i){let r=aZ(e,t,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function aY(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 aZ(e,t,n){return{i:e,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class aK{static triangulate(e,t,n=2){return function(e,t,n=2){let i,r,a,s=t&&t.length,o=s?t[0]*n:e.length,l=aF(e,0,o,n,!0),u=[];if(!l||l.next===l.prev)return u;if(s&&(l=function(e,t,n,i){let r=[];for(let n=0,a=t.length;n<a;n++){let s=t[n]*i,o=n<a-1?t[n+1]*i:e.length,l=aF(e,s,o,i,!1);l===l.next&&(l.steiner=!0),r.push(function(e){let t=e,n=e;do(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next;while(t!==e)return n}(l))}r.sort(aU);for(let e=0;e<r.length;e++)n=function(e,t){let n=function(e,t){let n,i=t,r=e.x,a=e.y,s=-1/0;if(aH(e,i))return i;do{if(aH(e,i.next))return i.next;if(a<=i.y&&a>=i.next.y&&i.next.y!==i.y){let e=i.x+(a-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(e<=r&&e>s&&(s=e,n=i.x<i.next.x?i:i.next,e===r))return n}i=i.next}while(i!==t)if(!n)return null;let o=n,l=n.x,u=n.y,c=1/0;i=n;do{if(r>=i.x&&i.x>=l&&r!==i.x&&aB(a<u?r:s,a,l,u,a<u?s:r,a,i.x,i.y)){var d,h;let t=Math.abs(a-i.y)/(r-i.x);aW(i,e)&&(t<c||t===c&&(i.x>n.x||i.x===n.x&&(d=n,h=i,0>az(d.prev,d,h.prev)&&0>az(h.next,d,d.next))))&&(n=i,c=t)}i=i.next}while(i!==o)return n}(e,t);if(!n)return t;let i=aX(n,e);return aN(i,i.next),aN(n,n.next)}(r[e],n);return n}(e,t,l,n)),e.length>80*n){i=e[0],r=e[1];let t=i,s=r;for(let a=n;a<o;a+=n){let n=e[a],o=e[a+1];n<i&&(i=n),o<r&&(r=o),n>t&&(t=n),o>s&&(s=o)}a=0!==(a=Math.max(t-i,s-r))?32767/a:0}return function e(t,n,i,r,a,s,o){if(!t)return;!o&&s&&function(e,t,n,i){let r=e;do 0===r.z&&(r.z=ak(r.x,r.y,t,n,i)),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,n=1;do{let i,r=e;e=null;let a=null;for(t=0;r;){t++;let s=r,o=0;for(let e=0;e<n&&(o++,s=s.nextZ);e++);let l=n;for(;o>0||l>0&&s;)0!==o&&(0===l||!s||r.z<=s.z)?(i=r,r=r.nextZ,o--):(i=s,s=s.nextZ,l--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;r=s}a.nextZ=null,n*=2}while(t>1)}(r)}(t,r,a,s);let l=t;for(;t.prev!==t.next;){let u=t.prev,c=t.next;if(s?function(e,t,n,i){let r=e.prev,a=e.next;if(az(r,e,a)>=0)return!1;let s=r.x,o=e.x,l=a.x,u=r.y,c=e.y,d=a.y,h=Math.min(s,o,l),p=Math.min(u,c,d),f=Math.max(s,o,l),m=Math.max(u,c,d),g=ak(h,p,t,n,i),v=ak(f,m,t,n,i),y=e.prevZ,x=e.nextZ;for(;y&&y.z>=g&&x&&x.z<=v;){if(y.x>=h&&y.x<=f&&y.y>=p&&y.y<=m&&y!==r&&y!==a&&aO(s,u,o,c,l,d,y.x,y.y)&&az(y.prev,y,y.next)>=0||(y=y.prevZ,x.x>=h&&x.x<=f&&x.y>=p&&x.y<=m&&x!==r&&x!==a&&aO(s,u,o,c,l,d,x.x,x.y)&&az(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;y&&y.z>=g;){if(y.x>=h&&y.x<=f&&y.y>=p&&y.y<=m&&y!==r&&y!==a&&aO(s,u,o,c,l,d,y.x,y.y)&&az(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;x&&x.z<=v;){if(x.x>=h&&x.x<=f&&x.y>=p&&x.y<=m&&x!==r&&x!==a&&aO(s,u,o,c,l,d,x.x,x.y)&&az(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}(t,r,a,s):function(e){let t=e.prev,n=e.next;if(az(t,e,n)>=0)return!1;let i=t.x,r=e.x,a=n.x,s=t.y,o=e.y,l=n.y,u=Math.min(i,r,a),c=Math.min(s,o,l),d=Math.max(i,r,a),h=Math.max(s,o,l),p=n.next;for(;p!==t;){if(p.x>=u&&p.x<=d&&p.y>=c&&p.y<=h&&aO(i,s,r,o,a,l,p.x,p.y)&&az(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}(t)){n.push(u.i,t.i,c.i),aY(t),t=c.next,l=c.next;continue}if((t=c)===l){o?1===o?e(t=function(e,t){let n=e;do{let i=n.prev,r=n.next.next;!aH(i,r)&&aV(i,n,n.next,r)&&aW(i,r)&&aW(r,i)&&(t.push(i.i,n.i,r.i),aY(n),aY(n.next),n=e=r),n=n.next}while(n!==e)return aN(n)}(aN(t),n),n,i,r,a,s,2):2===o&&function(t,n,i,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 n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&aV(n,n.next,e,t))return!0;n=n.next}while(n!==e)return!1}(l,u)&&(aW(l,u)&&aW(u,l)&&function(e,t){let n=e,i=!1,r=(e.x+t.x)/2,a=(e.y+t.y)/2;do n.y>a!=n.next.y>a&&n.next.y!==n.y&&r<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next;while(n!==e)return i}(l,u)&&(az(l.prev,l,u.prev)||az(l,u.prev,u))||aH(l,u)&&az(l.prev,l,l.next)>0&&az(u.prev,u,u.next)>0))){let l=aX(o,t);o=aN(o,o.next),l=aN(l,l.next),e(o,n,i,r,a,s,0),e(l,n,i,r,a,s,0);return}t=t.next}o=o.next}while(o!==t)}(t,n,i,r,a,s):e(aN(t),n,i,r,a,s,1);break}}}(l,u,n,i,r,a,0),u}(e,t,n)}}class aJ{static area(e){let t=e.length,n=0;for(let i=t-1,r=0;r<t;i=r++)n+=e[i].x*e[r].y-e[r].x*e[i].y;return .5*n}static isClockWise(e){return 0>aJ.area(e)}static triangulateShape(e,t){let n=[],i=[],r=[];aQ(e),a$(n,e);let a=e.length;t.forEach(aQ);for(let e=0;e<t.length;e++)i.push(a),a+=t[e].length,a$(n,t[e]);let s=aK.triangulate(n,i);for(let e=0;e<s.length;e+=3)r.push(s.slice(e,e+3));return r}}function aQ(e){let t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function a$(e,t){for(let n=0;n<t.length;n++)e.push(t[n].x),e.push(t[n].y)}class a0 extends nQ{constructor(e=new aL([new eQ(.5,.5),new eQ(-.5,.5),new eQ(-.5,-.5),new eQ(.5,-.5)]),t={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const n=this,i=[],r=[];for(let a=0,s=e.length;a<s;a++)!function(e){let a,s,o,l,u,c=[],d=void 0!==t.curveSegments?t.curveSegments:12,h=void 0!==t.steps?t.steps:1,p=void 0!==t.depth?t.depth:1,f=void 0===t.bevelEnabled||t.bevelEnabled,m=void 0!==t.bevelThickness?t.bevelThickness:.2,g=void 0!==t.bevelSize?t.bevelSize:m-.1,v=void 0!==t.bevelOffset?t.bevelOffset:0,y=void 0!==t.bevelSegments?t.bevelSegments:3,x=t.extrudePath,b=void 0!==t.UVGenerator?t.UVGenerator:a1,S,_=!1;if(x){S=x.getSpacedPoints(h),_=!0,f=!1;let e=!!x.isCatmullRomCurve3&&x.closed;a=x.computeFrenetFrames(h,e),s=new e0,o=new e0,l=new e0}f||(y=0,m=0,g=0,v=0);let w=e.extractPoints(d),M=w.shape,T=w.holes;if(!aJ.isClockWise(M)){M=M.reverse();for(let e=0,t=T.length;e<t;e++){let t=T[e];aJ.isClockWise(t)&&(T[e]=t.reverse())}}function E(e){let t=1e-10*1e-10,n=e[0];for(let i=1;i<=e.length;i++){let r=i%e.length,a=e[r],s=a.x-n.x,o=a.y-n.y,l=s*s+o*o,u=Math.max(Math.abs(a.x),Math.abs(a.y),Math.abs(n.x),Math.abs(n.y));if(l<=t*u*u){e.splice(r,1),i--;continue}n=a}}E(M),T.forEach(E);let A=T.length,C=M;for(let e=0;e<A;e++){let t=T[e];M=M.concat(t)}function P(e,t,n){return t||eB("ExtrudeGeometry: vec does not exist"),e.clone().addScaledVector(t,n)}let R=M.length;
38function I(e,t,n){let i,r,a,s=e.x-t.x,o=e.y-t.y,l=n.x-e.x,u=n.y-e.y,c=s*s+o*o;if(Math.abs(s*u-o*l)>Number.EPSILON){let d=Math.sqrt(c),h=Math.sqrt(l*l+u*u),p=t.x-o/d,f=t.y+s/d,m=((n.x-u/h-p)*u-(n.y+l/h-f)*l)/(s*u-o*l),g=(i=p+s*m-e.x)*i+(r=f+o*m-e.y)*r;if(g<=2)return new eQ(i,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?(i=-o,r=s,a=Math.sqrt(c)):(i=s,r=o,a=Math.sqrt(c/2))}return new eQ(i/a,r/a)}let D=[];for(let e=0,t=C.length,n=t-1,i=e+1;e<t;e++,n++,i++)n===t&&(n=0),i===t&&(i=0),D[e]=I(C[e],C[n],C[i]);let L=[],F,N=D.concat();for(let e=0;e<A;e++){let t=T[e];F=[];for(let e=0,n=t.length,i=n-1,r=e+1;e<n;e++,i++,r++)i===n&&(i=0),r===n&&(r=0),F[e]=I(t[e],t[i],t[r]);L.push(F),N=N.concat(F)}if(0===y)u=aJ.triangulateShape(C,T);else{let e=[],t=[];for(let n=0;n<y;n++){let i=n/y,r=m*Math.cos(i*Math.PI/2),a=g*Math.sin(i*Math.PI/2)+v;for(let t=0,n=C.length;t<n;t++){let n=P(C[t],D[t],a);O(n.x,n.y,-r),0===i&&e.push(n)}for(let e=0;e<A;e++){let n=T[e];F=L[e];let s=[];for(let e=0,t=n.length;e<t;e++){let t=P(n[e],F[e],a);O(t.x,t.y,-r),0===i&&s.push(t)}0===i&&t.push(s)}}u=aJ.triangulateShape(e,t)}let U=u.length,k=g+v;for(let e=0;e<R;e++){let t=f?P(M[e],N[e],k):M[e];_?(o.copy(a.normals[0]).multiplyScalar(t.x),s.copy(a.binormals[0]).multiplyScalar(t.y),l.copy(S[0]).add(o).add(s),O(l.x,l.y,l.z)):O(t.x,t.y,0)}for(let e=1;e<=h;e++)for(let t=0;t<R;t++){let n=f?P(M[t],N[t],k):M[t];_?(o.copy(a.normals[e]).multiplyScalar(n.x),s.copy(a.binormals[e]).multiplyScalar(n.y),l.copy(S[e]).add(o).add(s),O(l.x,l.y,l.z)):O(n.x,n.y,p/h*e)}for(let e=y-1;e>=0;e--){let t=e/y,n=m*Math.cos(t*Math.PI/2),i=g*Math.sin(t*Math.PI/2)+v;for(let e=0,t=C.length;e<t;e++){let t=P(C[e],D[e],i);O(t.x,t.y,p+n)}for(let e=0,t=T.length;e<t;e++){let t=T[e];F=L[e];for(let e=0,r=t.length;e<r;e++){let r=P(t[e],F[e],i);_?O(r.x,r.y+S[h-1].y,S[h-1].x+n):O(r.x,r.y,p+n)}}}function B(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*y;e<r;e++){let r=R*e,o=R*(e+1);!function(e,t,r,a){H(e),H(t),H(a),H(t),H(r),H(a);let s=i.length/3,o=b.generateSideWallUV(n,i,s-6,s-3,s-2,s-1);V(o[0]),V(o[1]),V(o[3]),V(o[1]),V(o[2]),V(o[3])}(t+a+r,t+s+r,t+s+o,t+a+o)}}}function O(e,t,n){c.push(e),c.push(t),c.push(n)}function z(e,t,r){H(e),H(t),H(r);let a=i.length/3,s=b.generateTopUV(n,i,a-3,a-2,a-1);V(s[0]),V(s[1]),V(s[2])}function H(e){i.push(c[3*e+0]),i.push(c[3*e+1]),i.push(c[3*e+2])}function V(e){r.push(e.x),r.push(e.y)}(function(){let e=i.length/3;if(f){let e=0*R;for(let t=0;t<U;t++){let n=u[t];z(n[2]+e,n[1]+e,n[0]+e)}e=R*(h+2*y);for(let t=0;t<U;t++){let n=u[t];z(n[0]+e,n[1]+e,n[2]+e)}}else{for(let e=0;e<U;e++){let t=u[e];z(t[2],t[1],t[0])}for(let e=0;e<U;e++){let t=u[e];z(t[0]+R*h,t[1]+R*h,t[2]+R*h)}}n.addGroup(e,i.length/3-e,0)})(),function(){let e=i.length/3,t=0;B(C,0),t+=C.length;for(let e=0,n=T.length;e<n;e++){let n=T[e];B(n,t),t+=n.length}n.addGroup(e,i.length/3-e,1)}()}(e[a]);this.setAttribute("position",new nj(i,3)),this.setAttribute("uv",new nj(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,n){if(n.shapes=[],Array.isArray(e))for(let t=0,i=e.length;t<i;t++){let i=e[t];n.shapes.push(i.uuid)}else n.shapes.push(e.uuid);return n.options=Object.assign({},t),void 0!==t.extrudePath&&(n.options.extrudePath=t.extrudePath.toJSON()),n}(this.parameters.shapes,this.parameters.options,e)}static fromJSON(e,t){let n=[];for(let i=0,r=e.shapes.length;i<r;i++){let r=t[e.shapes[i]];n.push(r)}let i=e.options.extrudePath;return void 0!==i&&(e.options.extrudePath=new aR[i.type]().fromJSON(i)),new a0(n,e.options)}}let a1={generateTopUV:function(e,t,n,i,r){let a=t[3*n],s=t[3*n+1],o=t[3*i],l=t[3*i+1],u=t[3*r],c=t[3*r+1];return[new eQ(a,s),new eQ(o,l),new eQ(u,c)]},generateSideWallUV:function(e,t,n,i,r,a){let s=t[3*n],o=t[3*n+1],l=t[3*n+2],u=t[3*i],c=t[3*i+1],d=t[3*i+2],h=t[3*r],p=t[3*r+1],f=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 eQ(s,1-l),new eQ(u,1-d),new eQ(h,1-f),new eQ(m,1-v)]:[new eQ(o,1-l),new eQ(c,1-d),new eQ(p,1-f),new eQ(g,1-v)]}};class a2 extends ar{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2;super([-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,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={radiu
vendor: 23,623 bytes, line 38
38s:e,detail:t}}static fromJSON(e){return new a2(e.radius,e.detail)}}class a3 extends nQ{constructor(e=[new eQ(0,-.5),new eQ(.5,0),new eQ(0,.5)],t=12,n=0,i=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:i},t=Math.floor(t),i=eX(i,0,2*Math.PI);const r=[],a=[],s=[],o=[],l=[],u=1/t,c=new e0,d=new eQ,h=new e0,p=new e0,f=new e0;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,h.x=+(g=e[t+1].y-e[t].y),h.y=-m,h.z=0*g,f.copy(h),h.normalize(),o.push(h.x,h.y,h.z);break;case e.length-1:o.push(f.x,f.y,f.z);break;default:m=e[t+1].x-e[t].x,h.x=+(g=e[t+1].y-e[t].y),h.y=-m,h.z=0*g,p.copy(h),h.x+=f.x,h.y+=f.y,h.z+=f.z,h.normalize(),o.push(h.x,h.y,h.z),f.copy(p)}for(let r=0;r<=t;r++){const h=n+r*u*i,p=Math.sin(h),f=Math.cos(h);for(let n=0;n<=e.length-1;n++){c.x=e[n].x*p,c.y=e[n].y,c.z=e[n].x*f,a.push(c.x,c.y,c.z),d.x=r/t,d.y=n/(e.length-1),s.push(d.x,d.y);const i=o[3*n+0]*p,u=o[3*n+1],h=o[3*n+0]*f;l.push(i,u,h)}}for(let n=0;n<t;n++)for(let t=0;t<e.length-1;t++){const i=t+n*e.length,a=i+e.length,s=i+e.length+1,o=i+1;r.push(i,a,o),r.push(s,o,a)}this.setIndex(r),this.setAttribute("position",new nj(a,3)),this.setAttribute("uv",new nj(s,2)),this.setAttribute("normal",new nj(l,3))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new a3(e.points,e.segments,e.phiStart,e.phiLength)}}class a4 extends ar{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 a4(e.radius,e.detail)}}class a5 extends nQ{constructor(e=1,t=1,n=1,i=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:i};const r=e/2,a=t/2,s=Math.floor(n),o=Math.floor(i),l=s+1,u=o+1,c=e/s,d=t/o,h=[],p=[],f=[],m=[];for(let e=0;e<u;e++){const t=e*d-a;for(let n=0;n<l;n++){const i=n*c-r;p.push(i,-t,0),f.push(0,0,1),m.push(n/s),m.push(1-e/o)}}for(let e=0;e<o;e++)for(let t=0;t<s;t++){const n=t+l*e,i=t+l*(e+1),r=t+1+l*(e+1),a=t+1+l*e;h.push(n,i,a),h.push(i,r,a)}this.setIndex(h),this.setAttribute("position",new nj(p,3)),this.setAttribute("normal",new nj(f,3)),this.setAttribute("uv",new nj(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new a5(e.width,e.height,e.widthSegments,e.heightSegments)}}class a6 extends nQ{constructor(e=.5,t=1,n=32,i=1,r=0,a=2*Math.PI){super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:n,phiSegments:i,thetaStart:r,thetaLength:a},n=Math.max(3,n);const s=[],o=[],l=[],u=[];let c=e;const d=(t-e)/(i=Math.max(1,i)),h=new e0,p=new eQ;for(let e=0;e<=i;e++){for(let e=0;e<=n;e++){const i=r+e/n*a;h.x=c*Math.cos(i),h.y=c*Math.sin(i),o.push(h.x,h.y,h.z),l.push(0,0,1),p.x=(h.x/t+1)/2,p.y=(h.y/t+1)/2,u.push(p.x,p.y)}c+=d}for(let e=0;e<i;e++){const t=e*(n+1);for(let e=0;e<n;e++){const i=e+t,r=i+n+1,a=i+n+2,o=i+1;s.push(i,r,o),s.push(r,a,o)}}this.setIndex(s),this.setAttribute("position",new nj(o,3)),this.setAttribute("normal",new nj(l,3)),this.setAttribute("uv",new nj(u,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new a6(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class a8 extends nQ{constructor(e=new aL([new eQ(0,.5),new eQ(-.5,-.5),new eQ(.5,-.5)]),t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const n=[],i=[],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=i.length/3,l=e.extractPoints(t),u=l.shape,c=l.holes;!1===aJ.isClockWise(u)&&(u=u.reverse());for(let e=0,t=c.length;e<t;e++){let t=c[e];!0===aJ.isClockWise(t)&&(c[e]=t.reverse())}let d=aJ.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];i.push(t.x,t.y,0),r.push(0,0,1),a.push(t.x,t.y)}for(let e=0,t=d.length;e<t;e++){let t=d[e],i=t[0]+s,r=t[1]+s,a=t[2]+s;n.push(i,r,a),o+=3}}this.setIndex(n),this.setAttribute("position",new nj(i,3)),this.setAttribute("normal",new nj(r,3)),this.setAttribute("uv",new nj(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 n=0,i=e.length;n<i;n++){let i=e[n];t.shapes.push(i.uuid)}else t.shapes.push(e.uuid);return t}(this.parameters.shapes,e)}static fromJSON(e,t){let n=[];for(let i=0,r=e.shapes.length;i<r;i++){let r=t[e.shapes[i]];n.push(r)}return new a8(n,e.curveSegments)}}class a9 extends nQ{constructor(e=1,t=32,n=16,i=0,r=2*Math.PI,a=0,s=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:i,phiLength:r,thetaStart:a,thetaLength:s},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const o=Math.min(a+s,Math.PI);let l=0;const u=[],c=new e0,d=new e0,h=[],p=[],f=[],m=[];for(let h=0;h<=n;h++){const g=[],v=h/n;let y=0;0===h&&0===a?y=.5/t:h===n&&o===Math.PI&&(y=-.5/t);for(let n=0;n<=t;n++){const o=n/t;c.x=-e*Math.cos(i+o*r)*Math.sin(a+v*s),c.y=e*Math.cos(a+v*s),c.z=e*Math.sin(i+o*r)*Math.sin(a+v*s),p.push(c.x,c.y,c.z),d.copy(c).normalize(),f.push(d.x,d.y,d.z),m.push(o+y,1-v),g.push(l++)}u.push(g)}for(let e=0;e<n;e++)for(let i=0;i<t;i++){const t=u[e][i+1],r=u[e][i],s=u[e+1][i],l=u[e+1][i+1];(0!==e||a>0)&&h.push(t,r,l),(e!==n-1||o<Math.PI)&&h.push(r,s,l)}this.setIndex(h),this.setAttribute("position",new nj(p,3)),this.setAttribute("normal",new nj(f,3)),this.setAttribute("uv",new nj(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new a9(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class a7 extends ar{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 a7(e.radius,e.detail)}}class se extends nQ{constructor(e=1,t=.4,n=12,i=48,r=2*Math.PI){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:n,tubularSegments:i,arc:r},n=Math.floor(n),i=Math.floor(i);const a=[],s=[],o=[],l=[],u=new e0,c=new e0,d=new e0;for(let a=0;a<=n;a++)for(let h=0;h<=i;h++){const p=h/i*r,f=a/n*Math.PI*2;c.x=(e+t*Math.cos(f))*Math.cos(p),c.y=(e+t*Math.cos(f))*Math.sin(p),c.z=t*Math.sin(f),s.push(c.x,c.y,c.z),u.x=e*Math.cos(p),u.y=e*Math.sin(p),d.subVectors(c,u).normalize(),o.push(d.x,d.y,d.z),l.push(h/i),l.push(a/n)}for(let e=1;e<=n;e++)for(let t=1;t<=i;t++){const n=(i+1)*e+t-1,r=(i+1)*(e-1)+t-1,s=(i+1)*(e-1)+t,o=(i+1)*e+t;a.push(n,r,o),a.push(r,s,o)}this.setIndex(a),this.setAttribute("position",new nj(s,3)),this.setAttribute("normal",new nj(o,3)),this.setAttribute("uv",new nj(l,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new se(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class st extends nQ{constructor(e=1,t=.4,n=64,i=8,r=2,a=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:n,radialSegments:i,p:r,q:a},n=Math.floor(n),i=Math.floor(i);const s=[],o=[],l=[],u=[],c=new e0,d=new e0,h=new e0,p=new e0,f=new e0,m=new e0,g=new e0;for(let s=0;s<=n;++s){const y=s/n*r*Math.PI*2;v(y,r,a,e,h),v(y+.01,r,a,e,p),m.subVectors(p,h),g.addVectors(p,h),f.crossVectors(m,g),g.crossVectors(f,m),f.normalize(),g.normalize();for(let e=0;e<=i;++e){const r=e/i*Math.PI*2,a=-t*Math.cos(r),p=t*Math.sin(r);c.x=h.x+(a*g.x+p*f.x),c.y=h.y+(a*g.y+p*f.y),c.z=h.z+(a*g.z+p*f.z),o.push(c.x,c.y,c.z),d.subVectors(c,h).normalize(),l.push(d.x,d.y,d.z),u.push(s/n),u.push(e/i)}}for(let e=1;e<=n;e++)for(let t=1;t<=i;t++){const n=(i+1)*(e-1)+(t-1),r=(i+1)*e+(t-1),a=(i+1)*e+t,o=(i+1)*(e-1)+t;s.push(n,r,o),s.push(r,a,o)}function v(e,t,n,i,r){let a=Math.cos(e),s=Math.sin(e),o=n/t*e,l=Math.cos(o);r.x=i*(2+l)*.5*a,r.y=i*(2+l)*s*.5,r.z=i*Math.sin(o)*.5}this.setIndex(s),this.setAttribute("position",new nj(o,3)),this.setAttribute("normal",new nj(l,3)),this.setAttribute("uv",new nj(u,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new st(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}class sn extends nQ{constructor(e=new aC(new e0(-1,-1,0),new e0(-1,1,0),new e0(1,1,0)),t=64,n=1,i=8,r=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:i,closed:r};const a=e.computeFrenetFrames(t,r);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals;const s=new e0,o=new e0,l=new eQ;let u=new e0;const c=[],d=[],h=[],p=[];function f(r){u=e.getPointAt(r/t,u);let l=a.normals[r],h=a.binormals[r];for(let e=0;e<=i;e++){let t=e/i*Math.PI*2,r=Math.sin(t),a=-Math.cos(t);o.x=a*l.x+r*h.x,o.y=a*l.y+r*h.y,o.z=a*l.z+r*h.z,o.normalize(),d.push(o.x,o.y,o.z),s.x=u.x+n*o.x,s.y=u.y+n*o.y,s.z=u.z+n*o.z,c.push(s.x,s.y,s.z)}}(function(){for(let e=0;e<t;e++)f(e);f(!1===r?t:0),function(){for(let e=0;e<=t;e++)for(let n=0;n<=i;n++)l.x=e/t,l.y=n/i,h.push(l.x,l.y)}(),function(){for(let e=1;e<=t;e++)for(let t=1;t<=i;t++){let n=(i+1)*(e-1)+(t-1),r=(i+1)*e+(t-1),a=(i+1)*e+t,s=(i+1)*(e-1)+t;p.push(n,r,s),p.push(r,a,s)}}()})(),this.setIndex(p),this.setAttribute("position",new nj(c,3)),this.setAttribute("normal",new nj(d,3)),this.setAttribute("uv",new nj(h,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 sn(new aR[e.path.type]().fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class si extends nQ{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},null!==e){const t=[],n=new Set,i=new e0,r=new e0;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);i.fromBufferAttribute(a,l),r.fromBufferAttribute(a,u),!0===sr(i,r,n)&&(t.push(i.x,i.y,i.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;i.fromBufferAttribute(a,o),r.fromBufferAttribute(a,l),!0===sr(i,r,n)&&(t.push(i.x,i.y,i.z),t.push(r.x,r.y,r.z))}}this.setAttribute("position",new nj(t,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}function sr(e,t,n){let i=`${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!==n.has(i)&&!0!==n.has(r)&&(n.add(i),n.add(r),!0)}var sa=Object.freeze({__proto__:null,BoxGeometry:ii,CapsuleGeometry:ae,CircleGeometry:at,ConeGeometry:ai,CylinderGeometry:an,DodecahedronGeometry:aa,EdgesGeometry:ac,ExtrudeGeometry:a0,IcosahedronGeometry:a2,LatheGeometry:a3,OctahedronGeometry:a4,PlaneGeometry:a5,PolyhedronGeometry:ar,RingGeometry:a6,ShapeGeometry:a8,SphereGeometry:a9,TetrahedronGeometry:a7,TorusGeometry:se,TorusKnotGeometry:st,TubeGeometry:sn,WireframeGeometry:si});class ss extends nE{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new nw(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 so extends il{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class sl extends nE{constructor(e){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new nw(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 nw(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new eQ(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 tJ,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 su extends sl{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 eQ(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return eX(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 nw(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 nw(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new nw(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 sc extends nE{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new nw(0xffffff),this.specular=new nw(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new nw(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new eQ(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new tJ,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 sd extends nE{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new nw(0xffffff),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new nw(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new eQ(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 sh extends nE{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new eQ(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 sp extends nE{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new nw(0xffffff),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new nw(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new eQ(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new tJ,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 sf extends nE{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 sm extends nE{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}}
38class sg extends nE{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new nw(0xffffff),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new eQ(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,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.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this.fog=e.fog,this}}class sv extends rL{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 sy(e,t){return e&&e.constructor!==t?"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e):e}function sx(e){let t=e.length,n=Array(t);for(let e=0;e!==t;++e)n[e]=e;return n.sort(function(t,n){return e[t]-e[n]}),n}function sb(e,t,n){let i=e.length,r=new e.constructor(i);for(let a=0,s=0;s!==i;++a){let i=n[a]*t;for(let n=0;n!==t;++n)r[s++]=e[i+n]}return r}function sS(e,t,n,i){let r=1,a=e[0];for(;void 0!==a&&void 0===a[i];)a=e[r++];if(void 0===a)return;let s=a[i];if(void 0!==s)if(Array.isArray(s))do void 0!==(s=a[i])&&(t.push(a.time),n.push(...s)),a=e[r++];while(void 0!==a)else if(void 0!==s.toArray)do void 0!==(s=a[i])&&(t.push(a.time),s.toArray(n,n.length)),a=e[r++];while(void 0!==a)else do void 0!==(s=a[i])&&(t.push(a.time),n.push(s)),a=e[r++];while(void 0!==a)}class s_{static convertArray(e,t){return sy(e,t)}static isTypedArray(e){return eP(e)}static getKeyframeOrder(e){return sx(e)}static sortedArray(e,t,n){return sb(e,t,n)}static flattenJSON(e,t,n,i){sS(e,t,n,i)}static subclip(e,t,n,i,r=30){return function(e,t,n,i,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<n)&&!(a>=i)){l.push(t.times[e]);for(let n=0;n<o;++n)u.push(t.values[e*o+n])}}0!==l.length&&(t.times=sy(l,t.times.constructor),t.values=sy(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}(e,t,n,i,r)}static makeClipAdditive(e,t=0,n=e,i=30){return function(e,t=0,n=e,i=30){i<=0&&(i=30);let r=n.tracks.length,a=t/i;for(let t=0;t<r;++t){let i,r=n.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,d=o.getValueSize();o.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(c=d/3);let h=r.times.length-1;if(a<=r.times[0]){let e=l,t=u-l;i=r.values.slice(e,t)}else if(a>=r.times[h]){let e=h*u+l,t=e+u-l;i=r.values.slice(e,t)}else{let e=r.createInterpolant(),t=l,n=u-l;e.evaluate(a),i=e.resultBuffer.slice(t,n)}"quaternion"===s&&new e$().fromArray(i).normalize().conjugate().toArray(i);let p=o.times.length;for(let e=0;e<p;++e){let t=e*d+c;if("quaternion"===s)e$.multiplyQuaternionsFlat(o.values,t,i,0,o.values,t);else{let e=d-2*c;for(let n=0;n<e;++n)o.values[t+n]-=i[n]}}}return e.blendMode=2501,e}(e,t,n,i)}}class sw{constructor(e,t,n,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==i?i:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){let t=this.parameterPositions,n=this._cachedIndex,i=t[n],r=t[n-1];n:{i:{let a;r:{a:if(!(e<i)){for(let a=n+2;;){if(void 0===i){if(e<r)break a;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===a)break;
38if(r=i,e<(i=t[++n]))break i}a=t.length;break r}if(!(e>=r)){let s=t[1];e<s&&(n=2,r=s);for(let a=n-2;;){if(void 0===r)return this._cachedIndex=0,this.copySampleValue_(0);if(n===a)break;if(i=r,e>=(r=t[--n-1]))break i}a=n,n=0;break r}break n}for(;n<a;){let i=n+a>>>1;e<t[i]?a=i:n=i+1}if(i=t[n],void 0===(r=t[n-1]))return this._cachedIndex=0,this.copySampleValue_(0);if(void 0===i)return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,r,i)}return this.interpolate_(n,r,e,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){let t=this.resultBuffer,n=this.sampleValues,i=this.valueSize,r=e*i;for(let e=0;e!==i;++e)t[e]=n[r+e];return t}interpolate_(){throw Error("call to abstract method")}intervalChanged_(){}}class sM extends sw{constructor(e,t,n,i){super(e,t,n,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:2400,endingEnd:2400}}intervalChanged_(e,t,n){let i=this.parameterPositions,r=e-2,a=e+1,s=i[r],o=i[a];if(void 0===s)switch(this.getSettings_().endingStart){case 2401:r=e,s=2*t-n;break;case 2402:r=i.length-2,s=t+i[r]-i[r+1];break;default:r=e,s=n}if(void 0===o)switch(this.getSettings_().endingEnd){case 2401:a=e,o=2*n-t;break;case 2402:a=1,o=n+i[1]-i[0];break;default:a=e-1,o=t}let l=(n-t)*.5,u=this.valueSize;this._weightPrev=l/(t-s),this._weightNext=l/(o-n),this._offsetPrev=r*u,this._offsetNext=a*u}interpolate_(e,t,n,i){let r=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=e*s,l=o-s,u=this._offsetPrev,c=this._offsetNext,d=this._weightPrev,h=this._weightNext,p=(n-t)/(i-t),f=p*p,m=f*p,g=-d*m+2*d*f-d*p,v=(1+d)*m+(-1.5-2*d)*f+(-.5+d)*p+1,y=(-1-h)*m+(1.5+h)*f+.5*p,x=h*m-h*f;for(let e=0;e!==s;++e)r[e]=g*a[u+e]+v*a[l+e]+y*a[o+e]+x*a[c+e];return r}}class sT extends sw{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){let r=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=e*s,l=o-s,u=(n-t)/(i-t),c=1-u;for(let e=0;e!==s;++e)r[e]=a[l+e]*c+a[o+e]*u;return r}}class sE extends sw{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e){return this.copySampleValue_(e-1)}}class sA{constructor(e,t,n,i){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=sy(t,this.TimeBufferType),this.values=sy(n,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}static toJSON(e){let t,n=e.constructor;if(n.toJSON!==this.toJSON)t=n.toJSON(e);else{t={name:e.name,times:sy(e.times,Array),values:sy(e.values,Array)};let n=e.getInterpolation();n!==e.DefaultInterpolation&&(t.interpolation=n)}return t.type=e.ValueTypeName,t}InterpolantFactoryMethodDiscrete(e){return new sE(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new sT(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new sM(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 ek("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 n=0,i=t.length;n!==i;++n)t[n]+=e}return this}scale(e){if(1!==e){let t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]*=e}return this}trim(e,t){let n=this.times,i=n.length,r=0,a=i-1;for(;r!==i&&n[r]<e;)++r;for(;-1!==a&&n[a]>t;)--a;if(++a,0!==r||a!==i){r>=a&&(r=(a=Math.max(a,1))-1);let e=this.getValueSize();this.times=n.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&&(eB("KeyframeTrack: Invalid value size in track.",this),e=!1);let n=this.times,i=this.values,r=n.length;0===r&&(eB("KeyframeTrack: Track is empty.",this),e=!1);let a=null;for(let t=0;t!==r;t++){let i=n[t];if("number"==typeof i&&isNaN(i)){eB("KeyframeTrack: Time is not a valid number.",this,t,i),e=!1;break}if(null!==a&&a>i){eB("KeyframeTrack: Out of order keys.",this,t,i,a),e=!1;break}a=i}if(void 0!==i&&eP(i))for(let t=0,n=i.length;t!==n;++t){let n=i[t];if(isNaN(n)){eB("KeyframeTrack: Value is not a valid number.",this,t,n),e=!1;break}}return e}optimize(){let e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),i=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(i)r=!0;else{let e=s*n,i=e-n,a=e+n;for(let s=0;s!==n;++s){let n=t[e+s];if(n!==t[i+s]||n!==t[a+s]){r=!0;break}}}if(r){if(s!==a){e[a]=e[s];let i=s*n,r=a*n;for(let e=0;e!==n;++e)t[r+e]=t[i+e]}++a}}if(r>0){e[a]=e[r];for(let e=r*n,i=a*n,s=0;s!==n;++s)t[i+s]=t[e+s];++a}return a!==e.length?(this.times=e.slice(0,a),this.values=t.slice(0,a*n)):(this.times=e,this.values=t),this}clone(){let e=this.times.slice(),t=this.values.slice(),n=new this.constructor(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}sA.prototype.ValueTypeName="",sA.prototype.TimeBufferType=Float32Array,sA.prototype.ValueBufferType=Float32Array,sA.prototype.DefaultInterpolation=2301;class sC extends sA{constructor(e,t,n){super(e,t,n)}}sC.prototype.ValueTypeName="bool",sC.prototype.ValueBufferType=Array,sC.prototype.DefaultInterpolation=2300,sC.prototype.InterpolantFactoryMethodLinear=void 0,sC.prototype.InterpolantFactoryMethodSmooth=void 0;class sP extends sA{constructor(e,t,n,i){super(e,t,n,i)}}sP.prototype.ValueTypeName="color";class sR extends sA{constructor(e,t,n,i){super(e,t,n,i)}}sR.prototype.ValueTypeName="number";class sI extends sw{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){let r=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=(n-t)/(i-t),l=e*s;for(let e=l+s;
38l!==e;l+=4)e$.slerpFlat(r,0,a,l-s,a,l,o);return r}}class sD extends sA{constructor(e,t,n,i){super(e,t,n,i)}InterpolantFactoryMethodLinear(e){return new sI(this.times,this.values,this.getValueSize(),e)}}sD.prototype.ValueTypeName="quaternion",sD.prototype.InterpolantFactoryMethodSmooth=void 0;class sL extends sA{constructor(e,t,n){super(e,t,n)}}sL.prototype.ValueTypeName="string",sL.prototype.ValueBufferType=Array,sL.prototype.DefaultInterpolation=2300,sL.prototype.InterpolantFactoryMethodLinear=void 0,sL.prototype.InterpolantFactoryMethodSmooth=void 0;class sF extends sA{constructor(e,t,n,i){super(e,t,n,i)}}sF.prototype.ValueTypeName="vector";class sN{constructor(e="",t=-1,n=[],i=2500){this.name=e,this.tracks=n,this.duration=t,this.blendMode=i,this.uuid=eW(),this.userData={},this.duration<0&&this.resetDuration()}static parse(e){let t=[],n=e.tracks,i=1/(e.fps||1);for(let e=0,r=n.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 sR;case"vector":case"vector2":case"vector3":case"vector4":return sF;case"color":return sP;case"quaternion":return sD;case"bool":case"boolean":return sC;case"string":return sL}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}(e.type);if(void 0===e.times){let t=[],n=[];sS(e.keys,t,n,"value"),e.times=t,e.values=n}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)})(n[e]).scale(i));let r=new this(e.name,e.duration,t,e.blendMode);return r.uuid=e.uuid,r.userData=JSON.parse(e.userData||"{}"),r}static toJSON(e){let t=[],n=e.tracks,i={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode,userData:JSON.stringify(e.userData)};for(let e=0,i=n.length;e!==i;++e)t.push(sA.toJSON(n[e]));return i}static CreateFromMorphTargetSequence(e,t,n,i){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=sx(s);s=sb(s,1,l),o=sb(o,1,l),i||0!==s[0]||(s.push(r),o.push(o[0])),a.push(new sR(".morphTargetInfluences["+t[e].name+"]",s,o).scale(1/n))}return new this(e,-1,a)}static findByName(e,t){let n=e;Array.isArray(e)||(n=e.geometry&&e.geometry.animations||e.animations);for(let e=0;e<n.length;e++)if(n[e].name===t)return n[e];return null}static CreateClipsFromMorphTargetSequences(e,t,n){let i={},r=/^([\w-]*?)([\d]+)$/;for(let t=0,n=e.length;t<n;t++){let n=e[t],a=n.name.match(r);if(a&&a.length>1){let e=a[1],t=i[e];t||(i[e]=t=[]),t.push(n)}}let a=[];for(let e in i)a.push(this.CreateFromMorphTargetSequence(e,i[e],t,n));return a}static parseAnimation(e,t){if(ek("AnimationClip: parseAnimation() is deprecated and will be removed with r185"),!e)return eB("AnimationClip: No animation in JSONLoader data."),null;let n=function(e,t,n,i,r){if(0!==n.length){let a=[],s=[];sS(n,a,s,i),0!==a.length&&r.push(new e(t,a,s))}},i=[],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 n=0;n<r[e].morphTargets.length;n++)t[r[e].morphTargets[n]]=-1;for(let n in t){let t=[],a=[];for(let i=0;i!==r[e].morphTargets.length;++i){let i=r[e];t.push(i.time),a.push(+(i.morphTarget===n))}i.push(new sR(".morphTargetInfluence["+n+"]",t,a))}o=t.length*a}else{let a=".bones["+t[e].name+"]";n(sF,a+".position",r,"pos",i),n(sD,a+".quaternion",r,"rot",i),n(sF,a+".scale",r,"scl",i)}}return 0===i.length?null:new this(r,o,i,s)}resetDuration(){let e=this.tracks,t=0;for(let n=0,i=e.length;n!==i;++n){let e=this.tracks[n];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());let t=new this.constructor(this.name,this.duration,e,this.blendMode);return t.userData=JSON.parse(JSON.stringify(this.userData)),t}toJSON(){return this.constructor.toJSON(this)}}let sU={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 sk{constructor(e,t,n){let i;const r=this;let a=!1,s=0,o=0;const l=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this._abortController=null,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 i?i(e):e},this.setURLModifier=function(e){return i=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,n=l.length;t<n;t+=2){let n=l[t],i=l[t+1];if(n.global&&(n.lastIndex=0),n.test(e))return i}return null},this.abort=function(){return this.abortController.abort(),this._abortController=null,this}}get abortController(){return this._abortController||(this._abortController=new AbortController),this._abortController}}let sB=new sk;class sO{constructor(e){this.manager=void 0!==e?e:sB,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){let n=this;return new Promise(function(i,r){n.load(e,i,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}abort(){return this}}sO.DEFAULT_MATERIAL_NAME="__DEFAULT";let sz={};
38class sH extends Error{constructor(e,t){super(e),this.response=t}}class sV extends sO{constructor(e){super(e),this.mimeType="",this.responseType="",this._abortController=new AbortController}load(e,t,n,i){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);let r=sU.get(`file:${e}`);if(void 0!==r)return this.manager.itemStart(e),setTimeout(()=>{t&&t(r),this.manager.itemEnd(e)},0),r;if(void 0!==sz[e])return void sz[e].push({onLoad:t,onProgress:n,onError:i});sz[e]=[],sz[e].push({onLoad:t,onProgress:n,onError:i});let a=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin",signal:"function"==typeof AbortSignal.any?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal}),s=this.mimeType,o=this.responseType;fetch(a).then(t=>{if(200===t.status||0===t.status){if(0===t.status&&ek("FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===t.body||void 0===t.body.getReader)return t;let n=sz[e],i=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(){i.read().then(({done:i,value:r})=>{if(i)e.close();else{let i=new ProgressEvent("progress",{lengthComputable:s,loaded:o+=r.byteLength,total:a});for(let e=0,t=n.length;e<t;e++){let t=n[e];t.onProgress&&t.onProgress(i)}e.enqueue(r),t()}},t=>{e.error(t)})}()}}))}throw new sH(`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(""===s)return e.text();{let t=/charset="?([^;"\s]*)"?/i.exec(s),n=new TextDecoder(t&&t[1]?t[1].toLowerCase():void 0);return e.arrayBuffer().then(e=>n.decode(e))}}}).then(t=>{sU.add(`file:${e}`,t);let n=sz[e];delete sz[e];for(let e=0,i=n.length;e<i;e++){let i=n[e];i.onLoad&&i.onLoad(t)}}).catch(t=>{let n=sz[e];if(void 0===n)throw this.manager.itemError(e),t;delete sz[e];for(let e=0,i=n.length;e<i;e++){let i=n[e];i.onError&&i.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}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}class sG extends sO{constructor(e){super(e)}load(e,t,n,i){let r=this,a=new sV(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(n){try{t(r.parse(JSON.parse(n)))}catch(t){i?i(t):eB(t),r.manager.itemError(e)}},n,i)}parse(e){let t=[];for(let n=0;n<e.length;n++){let i=sN.parse(e[n]);t.push(i)}return t}}class sj extends sO{constructor(e){super(e)}load(e,t,n,i){let r=this,a=[],s=new r3,o=new sV(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 n=r.parse(e,!0);a[u]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},6===(l+=1)&&(1===n.mipmapCount&&(s.minFilter=1006),s.image=a,s.format=n.format,s.needsUpdate=!0,t&&t(s))},n,i)}(u);else o.load(e,function(e){let n=r.parse(e,!0);if(n.isCubemap){let e=n.mipmaps.length/n.mipmapCount;for(let t=0;t<e;t++){a[t]={mipmaps:[]};for(let e=0;e<n.mipmapCount;e++)a[t].mipmaps.push(n.mipmaps[t*n.mipmapCount+e]),a[t].format=n.format,a[t].width=n.width,a[t].height=n.height}s.image=a}else s.image.width=n.width,s.image.height=n.height,s.mipmaps=n.mipmaps;1===n.mipmapCount&&(s.minFilter=1006),s.format=n.format,s.needsUpdate=!0,t&&t(s)},n,i);return s}}let sW=new WeakMap;class sX extends sO{constructor(e){super(e)}load(e,t,n,i){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);let r=this,a=sU.get(`image:${e}`);if(void 0!==a){if(!0===a.complete)r.manager.itemStart(e),setTimeout(function(){t&&t(a),r.manager.itemEnd(e)},0);else{let e=sW.get(a);void 0===e&&(e=[],sW.set(a,e)),e.push({onLoad:t,onError:i})}return a}let s=eR("img");function o(){u(),t&&t(this);let n=sW.get(this)||[];for(let e=0;e<n.length;e++){let t=n[e];t.onLoad&&t.onLoad(this)}sW.delete(this),r.manager.itemEnd(e)}function l(t){u(),i&&i(t),sU.remove(`image:${e}`);let n=sW.get(this)||[];for(let e=0;e<n.length;e++){let i=n[e];i.onError&&i.onError(t)}sW.delete(this),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),sU.add(`image:${e}`,s),r.manager.itemStart(e),s.src=e,s}}class sq extends sO{constructor(e){super(e)}load(e,t,n,i){let r=new ig;
38r.colorSpace=ey;let a=new sX(this.manager);a.setCrossOrigin(this.crossOrigin),a.setPath(this.path);let s=0;for(let n=0;n<e.length;++n)!function(n){a.load(e[n],function(e){r.images[n]=e,6==++s&&(r.needsUpdate=!0,t&&t(r))},void 0,i)}(n);return r}}class sY extends sO{constructor(e){super(e)}load(e,t,n,i){let r=this,a=new i2,s=new sV(this.manager);return s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setPath(this.path),s.setWithCredentials(r.withCredentials),s.load(e,function(e){let n;try{n=r.parse(e)}catch(e){if(void 0===i)return void e(e);i(e)}void 0!==n.image?a.image=n.image:void 0!==n.data&&(a.image.width=n.width,a.image.height=n.height,a.image.data=n.data),a.wrapS=void 0!==n.wrapS?n.wrapS:1001,a.wrapT=void 0!==n.wrapT?n.wrapT:1001,a.magFilter=void 0!==n.magFilter?n.magFilter:1006,a.minFilter=void 0!==n.minFilter?n.minFilter:1006,a.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.colorSpace&&(a.colorSpace=n.colorSpace),void 0!==n.flipY&&(a.flipY=n.flipY),void 0!==n.format&&(a.format=n.format),void 0!==n.type&&(a.type=n.type),void 0!==n.mipmaps&&(a.mipmaps=n.mipmaps,a.minFilter=1008),1===n.mipmapCount&&(a.minFilter=1006),void 0!==n.generateMipmaps&&(a.generateMipmaps=n.generateMipmaps),a.needsUpdate=!0,t&&t(a,n)},n,i),a}}class sZ extends sO{constructor(e){super(e)}load(e,t,n,i){let r=new ts,a=new sX(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)},n,i),r}}class sK extends nr{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new nw(e),this.intensity=t}dispose(){this.dispatchEvent({type:"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,t}}class sJ extends sK{constructor(e,t,n){super(e,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(nr.DEFAULT_UP),this.updateMatrix(),this.groundColor=new nw(t)}copy(e,t){return super.copy(e,t),this.groundColor.copy(e.groundColor),this}toJSON(e){let t=super.toJSON(e);return t.object.groundColor=this.groundColor.getHex(),t}}let sQ=new tH,s$=new e0,s0=new e0;class s1{constructor(e){this.camera=e,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new eQ(512,512),this.mapType=1009,this.map=null,this.mapPass=null,this.matrix=new tH,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new rh,this._frameExtents=new eQ(1,1),this._viewportCount=1,this._viewports=[new to(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){let t=this.camera,n=this.matrix;s$.setFromMatrixPosition(e.matrixWorld),t.position.copy(s$),s0.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(s0),t.updateMatrixWorld(),sQ.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(sQ,t.coordinateSystem,t.reversedDepth),t.reversedDepth?n.set(.5,0,0,.5,0,.5,0,.5,0,0,1,0,0,0,0,1):n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(sQ)}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.autoUpdate=e.autoUpdate,this.needsUpdate=e.needsUpdate,this.normalBias=e.normalBias,this.blurSamples=e.blurSamples,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 s2 extends s1{constructor(){super(new ip(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1,this.aspect=1}updateMatrices(e){let t=this.camera,n=2*ej*e.angle*this.focus,i=this.mapSize.width/this.mapSize.height*this.aspect,r=e.distance||t.far;(n!==t.fov||i!==t.aspect||r!==t.far)&&(t.fov=n,t.aspect=i,t.far=r,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class s3 extends sK{constructor(e,t,n=0,i=Math.PI/3,r=0,a=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(nr.DEFAULT_UP),this.updateMatrix(),this.target=new nr,this.distance=n,this.angle=i,this.penumbra=r,this.decay=a,this.map=null,this.shadow=new s2}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){super.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.map=e.map,this.shadow=e.shadow.clone(),this}toJSON(e){let t=super.toJSON(e);return t.object.distance=this.distance,t.object.angle=this.angle,t.object.decay=this.decay,t.object.penumbra=this.penumbra,t.object.target=this.target.uuid,this.map&&this.map.isTexture&&(t.object.map=this.map.toJSON(e).uuid),t.object.shadow=this.shadow.toJSON(),t}}class s4 extends s1{constructor(){super(new ip(90,1,.5,500)),this.isPointLightShadow=!0}
vendor: 8,471 bytes, line 38
38}class s5 extends sK{constructor(e,t,n=0,i=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=i,this.shadow=new s4}get power(){return 4*this.intensity*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){super.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}toJSON(e){let t=super.toJSON(e);return t.object.distance=this.distance,t.object.decay=this.decay,t.object.shadow=this.shadow.toJSON(),t}}class s6 extends iu{constructor(e=-1,t=1,n=1,i=-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=n,this.bottom=i,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,n,i,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=n,this.view.offsetY=i,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),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2,r=n-e,a=n+e,s=i+t,o=i-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.reversedDepth),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 s8 extends s1{constructor(){super(new s6(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class s9 extends sK{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(nr.DEFAULT_UP),this.updateMatrix(),this.target=new nr,this.shadow=new s8}dispose(){super.dispose(),this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}toJSON(e){let t=super.toJSON(e);return t.object.shadow=this.shadow.toJSON(),t.object.target=this.target.uuid,t}}class s7 extends sK{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class oe extends sK{constructor(e,t,n=10,i=10){super(e,t),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=n,this.height=i}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 ot{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new e0)}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 n=e.x,i=e.y,r=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.282095),t.addScaledVector(a[1],.488603*i),t.addScaledVector(a[2],.488603*r),t.addScaledVector(a[3],.488603*n),t.addScaledVector(a[4],n*i*1.092548),t.addScaledVector(a[5],i*r*1.092548),t.addScaledVector(a[6],.315392*(3*r*r-1)),t.addScaledVector(a[7],n*r*1.092548),t.addScaledVector(a[8],.546274*(n*n-i*i)),t}getIrradianceAt(e,t){let n=e.x,i=e.y,r=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.886227),t.addScaledVector(a[1],1.023328*i),t.addScaledVector(a[2],1.023328*r),t.addScaledVector(a[3],1.023328*n),t.addScaledVector(a[4],.858086*n*i),t.addScaledVector(a[5],.858086*i*r),t.addScaledVector(a[6],.743125*r*r-.247708),t.addScaledVector(a[7],.858086*n*r),t.addScaledVector(a[8],.429043*(n*n-i*i)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],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 n=this.coefficients;for(let i=0;i<9;i++)n[i].fromArray(e,t+3*i);return this}toArray(e=[],t=0){let n=this.coefficients;for(let i=0;i<9;i++)n[i].toArray(e,t+3*i);return e}static getBasisAt(e,t){let n=e.x,i=e.y,r=e.z;t[0]=.282095,t[1]=.488603*i,t[2]=.488603*r,t[3]=.488603*n,t[4]=1.092548*n*i,t[5]=1.092548*i*r,t[6]=.315392*(3*r*r-1),t[7]=1.092548*n*r,t[8]=.546274*(n*n-i*i)}}class on extends sK{constructor(e=new ot,t=1){super(void 0,t),this.isLightProbe=!0,this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}toJSON(e){let t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}}class oi extends sO{constructor(e){super(e),this.textures={}}load(e,t,n,i){let r=this,a=new sV(r.manager);a.setPath(r.path),a.setRequestHeader(r.requestHeader),a.setWithCredentials(r.withCredentials),a.load(e,function(n){try{t(r.parse(JSON.parse(n)))}catch(t){i?i(t):eB(t),r.manager.itemError(e)}},n,i)}parse(e){let t=this.textures;function n(e){return void 0===t[e]&&ek("MaterialLoader: Undefined texture",e),t[e]}let i=this.createMaterialFromType(e.type);if(void 0!==e.uuid&&(i.uuid=e.uuid),void 0!==e.name&&(i.name=e.name),void 0!==e.color&&void 0!==i.color&&i.color.setHex(e.color),void 0!==e.roughness&&(i.roughness=e.roughness),void 0!==e.metalness&&(i.metalness=e.metalness),void 0!==e.sheen&&(i.sheen=e.sheen),void 0!==e.sheenColor&&(i.sheenColor=new nw().setHex(e.sheenColor)),void 0!==e.sheenRoughness&&(i.sheenRoughness=e.sheenRoughness),void 0!==e.emissive&&void 0!==i.emissive&&i.emissive.setHex(e.emissive),void 0!==e.specular&&void 0!==i.specular&&i.specular.setHex(e.specular),void 0!==e.specularIntensity&&(i.specularIntensity=e.specularIntensity),void 0!==e.specularColor&&void 0!==i.specularColor&&i.specularColor.setHex(e.specularColor),void 0!==e.shininess&&(i.shininess=e.shininess),void 0!==e.clearcoat&&(i.clearcoat=e.clearcoat),void 0!==e.clearcoatRoughness&&(i.clearcoatRoughness=e.clearcoatRoughness),void 0!==e.dispersion&&(i.dispersion=e.dispersion),void 0!==e.iridescence&&(i.iridescence=e.iridescence),void 0!==e.iridescenceIOR&&(i.iridescenceIOR=e.iridescenceIOR),void 0!==e.iridescenceThicknessRange&&(i.iridescenceThicknessRange=e.iridescenceThicknessRange),void 0!==e.transmission&&(i.transmission=e.transmission),void 0!==e.thickness&&(i.thickness=e.thickness),void 0!==e.attenuationDistance&&(i.attenuationDistance=e.attenuationDistance),void 0!==e.attenuationColor&&void 0!==i.attenuationColor&&i.attenuationColor.setHex(e.attenuationColor),void 0!==e.anisotropy&&(i.anisotropy=e.anisotropy),void 0!==e.anisotropyRotation&&(i.anisotropyRotation=e.anisotropyRotation),void 0!==e.fog&&(i.fog=e.fog),void 0!==e.flatShading&&(i.flatShading=e.flatShading),void 0!==e.blending&&(i.blending=e.blending),void 0!==e.combine&&(i.combine=e.combine),void 0!==e.side&&(i.side=e.side),void 0!==e.shadowSide&&(i.shadowSide=e.shadowSide),void 0!==e.opacity&&(i.opacity=e.opacity),void 0!==e.transparent&&(i.transparent=e.transparent),void 0!==e.alphaTest&&(i.alphaTest=e.alphaTest),void 0!==e.alphaHash&&(i.alphaHash=e.alphaHash),void 0!==e.depthFunc&&(i.depthFunc=e.depthFunc),void 0!==e.depthTest&&(i.depthTest=e.depthTest),void 0!==e.depthWrite&&(i.depthWrite=e.depthWrite),void 0!==e.colorWrite&&(i.colorWrite=e.colorWrite),void 0!==e.blendSrc&&(i.blendSrc=e.blendSrc),void 0!==e.blendDst&&(i.blendDst=e.blendDst),void 0!==e.blendEquation&&(i.blendEquation=e.blendEquation),void 0!==e.blendSrcAlpha&&(i.blendSrcAlpha=e.blendSrcAlpha),void 0!==e.blendDstAlpha&&
38(i.blendDstAlpha=e.blendDstAlpha),void 0!==e.blendEquationAlpha&&(i.blendEquationAlpha=e.blendEquationAlpha),void 0!==e.blendColor&&void 0!==i.blendColor&&i.blendColor.setHex(e.blendColor),void 0!==e.blendAlpha&&(i.blendAlpha=e.blendAlpha),void 0!==e.stencilWriteMask&&(i.stencilWriteMask=e.stencilWriteMask),void 0!==e.stencilFunc&&(i.stencilFunc=e.stencilFunc),void 0!==e.stencilRef&&(i.stencilRef=e.stencilRef),void 0!==e.stencilFuncMask&&(i.stencilFuncMask=e.stencilFuncMask),void 0!==e.stencilFail&&(i.stencilFail=e.stencilFail),void 0!==e.stencilZFail&&(i.stencilZFail=e.stencilZFail),void 0!==e.stencilZPass&&(i.stencilZPass=e.stencilZPass),void 0!==e.stencilWrite&&(i.stencilWrite=e.stencilWrite),void 0!==e.wireframe&&(i.wireframe=e.wireframe),void 0!==e.wireframeLinewidth&&(i.wireframeLinewidth=e.wireframeLinewidth),void 0!==e.wireframeLinecap&&(i.wireframeLinecap=e.wireframeLinecap),void 0!==e.wireframeLinejoin&&(i.wireframeLinejoin=e.wireframeLinejoin),void 0!==e.rotation&&(i.rotation=e.rotation),void 0!==e.linewidth&&(i.linewidth=e.linewidth),void 0!==e.dashSize&&(i.dashSize=e.dashSize),void 0!==e.gapSize&&(i.gapSize=e.gapSize),void 0!==e.scale&&(i.scale=e.scale),void 0!==e.polygonOffset&&(i.polygonOffset=e.polygonOffset),void 0!==e.polygonOffsetFactor&&(i.polygonOffsetFactor=e.polygonOffsetFactor),void 0!==e.polygonOffsetUnits&&(i.polygonOffsetUnits=e.polygonOffsetUnits),void 0!==e.dithering&&(i.dithering=e.dithering),void 0!==e.alphaToCoverage&&(i.alphaToCoverage=e.alphaToCoverage),void 0!==e.premultipliedAlpha&&(i.premultipliedAlpha=e.premultipliedAlpha),void 0!==e.forceSinglePass&&(i.forceSinglePass=e.forceSinglePass),void 0!==e.allowOverride&&(i.allowOverride=e.allowOverride),void 0!==e.visible&&(i.visible=e.visible),void 0!==e.toneMapped&&(i.toneMapped=e.toneMapped),void 0!==e.userData&&(i.userData=e.userData),void 0!==e.vertexColors&&("number"==typeof e.vertexColors?i.vertexColors=e.vertexColors>0:i.vertexColors=e.vertexColors),void 0!==e.uniforms)for(let t in e.uniforms){let r=e.uniforms[t];switch(i.uniforms[t]={},r.type){case"t":i.uniforms[t].value=n(r.value);break;case"c":i.uniforms[t].value=new nw().setHex(r.value);break;case"v2":i.uniforms[t].value=new eQ().fromArray(r.value);break;case"v3":i.uniforms[t].value=new e0().fromArray(r.value);break;case"v4":i.uniforms[t].value=new to().fromArray(r.value);break;case"m3":i.uniforms[t].value=new e3().fromArray(r.value);break;
38case"m4":i.uniforms[t].value=new tH().fromArray(r.value);break;default:i.uniforms[t].value=r.value}}if(void 0!==e.defines&&(i.defines=e.defines),void 0!==e.vertexShader&&(i.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(i.fragmentShader=e.fragmentShader),void 0!==e.glslVersion&&(i.glslVersion=e.glslVersion),void 0!==e.extensions)for(let t in e.extensions)i.extensions[t]=e.extensions[t];if(void 0!==e.lights&&(i.lights=e.lights),void 0!==e.clipping&&(i.clipping=e.clipping),void 0!==e.size&&(i.size=e.size),void 0!==e.sizeAttenuation&&(i.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(i.map=n(e.map)),void 0!==e.matcap&&(i.matcap=n(e.matcap)),void 0!==e.alphaMap&&(i.alphaMap=n(e.alphaMap)),void 0!==e.bumpMap&&(i.bumpMap=n(e.bumpMap)),void 0!==e.bumpScale&&(i.bumpScale=e.bumpScale),void 0!==e.normalMap&&(i.normalMap=n(e.normalMap)),void 0!==e.normalMapType&&(i.normalMapType=e.normalMapType),void 0!==e.normalScale){let t=e.normalScale;!1===Array.isArray(t)&&(t=[t,t]),i.normalScale=new eQ().fromArray(t)}return void 0!==e.displacementMap&&(i.displacementMap=n(e.displacementMap)),void 0!==e.displacementScale&&(i.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(i.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(i.roughnessMap=n(e.roughnessMap)),void 0!==e.metalnessMap&&(i.metalnessMap=n(e.metalnessMap)),void 0!==e.emissiveMap&&(i.emissiveMap=n(e.emissiveMap)),void 0!==e.emissiveIntensity&&(i.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(i.specularMap=n(e.specularMap)),void 0!==e.specularIntensityMap&&(i.specularIntensityMap=n(e.specularIntensityMap)),void 0!==e.specularColorMap&&(i.specularColorMap=n(e.specularColorMap)),void 0!==e.envMap&&(i.envMap=n(e.envMap)),void 0!==e.envMapRotation&&i.envMapRotation.fromArray(e.envMapRotation),void 0!==e.envMapIntensity&&(i.envMapIntensity=e.envMapIntensity),void 0!==e.reflectivity&&(i.reflectivity=e.reflectivity),void 0!==e.refractionRatio&&(i.refractionRatio=e.refractionRatio),void 0!==e.lightMap&&(i.lightMap=n(e.lightMap)),void 0!==e.lightMapIntensity&&(i.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(i.aoMap=n(e.aoMap)),void 0!==e.aoMapIntensity&&(i.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(i.gradientMap=n(e.gradientMap)),void 0!==e.clearcoatMap&&(i.clearcoatMap=n(e.clearcoatMap)),void 0!==e.clearcoatRoughnessMap&&(i.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),void 0!==e.clearcoatNormalMap&&(i.clearcoatNormalMap=n(e.clearcoatNormalMap)),void 0!==e.clearcoatNormalScale&&(i.clearcoatNormalScale=new eQ().fromArray(e.clearcoatNormalScale)),void 0!==e.iridescenceMap&&(i.iridescenceMap=n(e.iridescenceMap)),void 0!==e.iridescenceThicknessMap&&(i.iridescenceThicknessMap=n(e.iridescenceThicknessMap)),void 0!==e.transmissionMap&&(i.transmissionMap=n(e.transmissionMap)),void 0!==e.thicknessMap&&(i.thicknessMap=n(e.thicknessMap)),void 0!==e.anisotropyMap&&(i.anisotropyMap=n(e.anisotropyMap)),void 0!==e.sheenColorMap&&(i.sheenColorMap=n(e.sheenColorMap)),void 0!==e.sheenRoughnessMap&&(i.sheenRoughnessMap=n(e.sheenRoughnessMap)),i}setTextures(e){return this.textures=e,this}createMaterialFromType(e){return oi.createMaterialFromType(e)}static createMaterialFromType(e){return new({ShadowMaterial:ss,SpriteMaterial:iA,RawShaderMaterial:so,ShaderMaterial:il,PointsMaterial:rq,MeshPhysicalMaterial:su,MeshStandardMaterial:sl,MeshPhongMaterial:sc,MeshToonMaterial:sd,MeshNormalMaterial:sh,MeshLambertMaterial:sp,MeshDepthMaterial:sf,MeshDistanceMaterial:sm,MeshBasicMaterial:nA,MeshMatcapMaterial:sg,LineDashedMaterial:sv,LineBasicMaterial:rL,Material:nE})[e]}}class or{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 oa extends nQ{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 os extends sO{constructor(e){super(e)}load(e,t,n,i){let r=this,a=new sV(r.manager);a.setPath(r.path),a.setRequestHeader(r.requestHeader),a.setWithCredentials(r.withCredentials),a.load(e,function(n){try{t(r.parse(JSON.parse(n)))}catch(t){i?i(t):eB(t),r.manager.itemError(e)}},n,i)}parse(e){let t={},n={};function i(e,i){if(void 0!==t[i])return t[i];let r=e.interleavedBuffers[i],a=function(e,t){if(void 0!==n[t])return n[t];let i=new Uint32Array(e.arrayBuffers[t]).buffer;return n[t]=i,i}(e,r.buffer),s=new iM(eC(r.type,a),r.stride);return s.uuid=r.uuid,t[i]=s,s}let r=e.isInstancedBufferGeometry?new oa:new nQ,a=e.data.index;if(void 0!==a){let e=eC(a.type,a.array);r.setIndex(new nN(e,1))}let s=e.data.attributes;for(let t in s){let n,a=s[t];if(a.isInterleavedBufferAttribute)n=new iE(i(e.data,a.data),a.itemSize,a.offset,a.normalized);else{let e=eC(a.type,a.array);n=new(a.isInstancedBufferAttribute?i6:nN)(e,a.itemSize,a.normalized)}void 0!==a.name&&(n.name=a.name),void 0!==a.usage&&n.setUsage(a.usage),r.setAttribute(t,n)}let o=e.data.morphAttributes;if(o)for(let t in o){let n=o[t],a=[];for(let t=0,r=n.length;t<r;t++){let r,s=n[t];r=s.isInterleavedBufferAttribute?new iE(i(e.data,s.data),s.itemSize,s.offset,s.normalized):new nN(eC(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;return void 0!==u&&(r.boundingSphere=new tD().fromJSON(u)),e.name&&(r.name=e.name),e.userData&&(r.userData=e.userData),r}}class oo extends sO{constructor(e){super(e)}load(e,t,n,i){let r=this,a=""===this.path?or.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||a;let s=new sV(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,function(n){let a=null;try{a=JSON.parse(n)}catch(t){void 0!==i&&i(t),t("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!==i&&i(Error("THREE.ObjectLoader: Can't load "+e)),eB("ObjectLoader: Can't load "+e);return}r.parse(a,t)},n,i)}async loadAsync(e,t){let n=""===this.path?or.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||n;let i=new sV(this.manager);i.setPath(this.path),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials);let r=JSON.parse(await i.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 n=this.parseAnimations(e.animations),i=this.parseShapes(e.shapes),r=this.parseGeometries(e.geometries,i),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,n),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),n=this.parseShapes(e.shapes),i=this.parseGeometries(e.geometries,n),r=await this.parseImagesAsync(e.images),a=this.parseTextures(e.textures,r),s=this.parseMaterials(e.materials,a),o=this.parseObject(e.object,i,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 n=0,i=e.length;n<i;n++){let i=new aL().fromJSON(e[n]);t[i.uuid]=i}return t}parseSkeletons(e,t){let n={},i={};if(t.traverse(function(e){e.isBone&&(i[e.uuid]=e)}),void 0!==e)for(let t=0,r=e.length;t<r;t++){let r=new i5().fromJSON(e[t],i);n[r.uuid]=r}return n}parseGeometries(e,t){let n={};if(void 0!==e){let i=new os;for(let r=0,a=e.length;r<a;r++){let a,s=e[r];switch(s.type){case"BufferGeometry":case"InstancedBufferGeometry":a=i.parse(s);break;default:s.type in sa?a=sa[s.type].fromJSON(s,t):ek(`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),n[s.uuid]=a}}return n}parseMaterials(e,t){let n={},i={};if(void 0!==e){let r=new oi;r.setTextures(t);for(let t=0,a=e.length;t<a;t++){let a=e[t];void 0===n[a.uuid]&&(n[a.uuid]=r.parse(a)),i[a.uuid]=n[a.uuid]}}return i}parseAnimations(e){let t={};if(void 0!==e)for(let n=0;n<e.length;n++){let i=e[n],r=sN.parse(i);t[r.uuid]=r}return t}parseImages(e,t){let n,i=this,r={};function a(e){if("string"==typeof e){var t;return t=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(e)?e:i.resourcePath+e,i.manager.itemStart(t),n.load(t,function(){i.manager.itemEnd(t)},void 0,function(){i.manager.itemError(t),i.manager.itemEnd(t)})}return e.data?{data:eC(e.type,e.data),width:e.width,height:e.height}:null}if(void 0!==e&&e.length>0){(n=new sX(new sk(t))).setCrossOrigin(this.crossOrigin);for(let t=0,n=e.length;t<n;t++){let n=e[t],i=n.url;if(Array.isArray(i)){let e=[];for(let t=0,n=i.length;t<n;t++){let n=a(i[t]);null!==n&&(n instanceof HTMLImageElement?e.push(n):e.push(new i2(n.data,n.width,n.height)))}r[n.uuid]=new tn(e)}else{let e=a(n.url);r[n.uuid]=new tn(e)}}}return r}async parseImagesAsync(e){let t,n=this,i={};async function r(e){if("string"==typeof e){let i=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(e)?e:n.resourcePath+e;return await t.loadAsync(i)}return e.data?{data:eC(e.type,e.data),width:e.width,height:e.height}:null}if(void 0!==e&&e.length>0){(t=new sX(this.manager)).setCrossOrigin(this.crossOrigin);for(let t=0,n=e.length;t<n;t++){let n=e[t],a=n.url;if(Array.isArray(a)){let e=[];for(let t=0,n=a.length;t<n;t++){let n=a[t],i=await r(n);null!==i&&(i instanceof HTMLImageElement?e.push(i):e.push(new i2(i.data,i.width,i.height)))}i[n.uuid]=new tn(e)}else{let e=await r(n.url);i[n.uuid]=new tn(e)}}}return i}parseTextures(e,t){function n(e,t){return"number"==typeof e?e:(ek("ObjectLoader.parseTexture: Constant should be in numeric form.",e),t[e])}let i={};if(void 0!==e)for(let r=0,a=e.length;r<a;r++){let a,s=e[r];void 0===s.image&&ek('ObjectLoader: No "image" specified for',s.uuid),void 0===t[s.image]&&ek("ObjectLoader: Undefined image",s.image);let o=t[s.image],l=o.data;Array.isArray(l)?(a=new ig,6===l.length&&(a.needsUpdate=!0)):(a=l&&l.data?new i2:new ts,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=n(s.mapping,ol)),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=n(s.wrap[0],ou),a.wrapT=n(s.wrap[1],ou)),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
38=s.colorSpace),void 0!==s.minFilter&&(a.minFilter=n(s.minFilter,oc)),void 0!==s.magFilter&&(a.magFilter=n(s.magFilter,oc)),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),i[s.uuid]=a}return i}parseObject(e,t,n,i,r){let a,s,o;function l(e){return void 0===t[e]&&ek("ObjectLoader: Undefined geometry",e),t[e]}function u(e){if(void 0!==e){if(Array.isArray(e)){let t=[];for(let i=0,r=e.length;i<r;i++){let r=e[i];void 0===n[r]&&ek("ObjectLoader: Undefined material",r),t.push(n[r])}return t}return void 0===n[e]&&ek("ObjectLoader: Undefined material",e),n[e]}}function c(e){return void 0===i[e]&&ek("ObjectLoader: Undefined texture",e),i[e]}switch(e.type){case"Scene":a=new iw,void 0!==e.background&&(Number.isInteger(e.background)?a.background=new nw(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 i_(e.fog.color,e.fog.near,e.fog.far):"FogExp2"===e.fog.type&&(a.fog=new iS(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 ip(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 s6(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 s7(e.color,e.intensity);break;case"DirectionalLight":(a=new s9(e.color,e.intensity)).target=e.target||"";break;case"PointLight":a=new s5(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":a=new oe(e.color,e.intensity,e.width,e.height);break;case"SpotLight":(a=new s3(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay)).target=e.target||"";break;case"HemisphereLight":a=new sJ(e.color,e.groundColor,e.intensity);break;case"LightProbe":a=new on(new ot().fromArray(e.sh),e.intensity);break;case"SkinnedMesh":a=new i0(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 ie(s=l(e.geometry),o=u(e.material));break;case"InstancedMesh":s=l(e.geometry),o=u(e.material);let d=e.count,h=e.instanceMatrix,p=e.instanceColor;(a=new rr(s,o,d)).instanceMatrix=new i6(new Float32Array(h.array),16),void 0!==p&&(a.instanceColor=new i6(new Float32Array(p.array),p.itemSize));break;case"BatchedMesh":s=l(e.geometry),o=u(e.material),(a=new rD(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._geometryInfo=e.geometryInfo.map(e=>{let t=null,n=null;return void 0!==e.boundingBox&&(t=new tf().fromJSON(e.boundingBox)),void 0!==e.boundingSphere&&(n=new tD().fromJSON(e.boundingSphere)),{...e,boundingBox:t,boundingSphere:n}}),a._instanceInfo=e.instanceInfo,a._availableInstanceIds=e._availableInstanceIds,a._availableGeometryIds=e._availableGeometryIds,a._nextIndexStart=e.nextIndexStart,a._nextVertexStart=e.nextVertexStart,a._geometryCount=e.geometryCount,a._maxInstanceCount=e.maxInstanceCount,a._maxVertexCount=e.maxVertexCount,a._maxIndexCount=e.maxIndexCount,a._geometryInitialized=e.geometryInitialized,a._matricesTexture=c(e.matricesTexture.uuid),a._indirectTexture=c(e.indirectTexture.uuid),void 0!==e.colorsTexture&&(a._colorsTexture=c(e.colorsTexture.uuid)),void 0!==e.boundingSphere&&(a.boundingSphere=new tD().fromJSON(e.boundingSphere)),void 0!==e.boundingBox&&
38(a.boundingBox=new tf().fromJSON(e.boundingBox));break;case"LOD":a=new ij;break;case"Line":a=new rH(l(e.geometry),u(e.material));break;case"LineLoop":a=new rX(l(e.geometry),u(e.material));break;case"LineSegments":a=new rW(l(e.geometry),u(e.material));break;case"PointCloud":case"Points":a=new rQ(l(e.geometry),u(e.material));break;case"Sprite":a=new iz(u(e.material));break;case"Group":a=new iy;break;case"Bone":a=new i1;break;default:a=new nr}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,n,i,r))}if(void 0!==e.animations){let t=e.animations;for(let e=0;e<t.length;e++){let n=t[e];a.animations.push(r[n])}}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 n=t[e],i=a.getObjectByProperty("uuid",n.object);void 0!==i&&a.addLevel(i,n.distance,n.hysteresis)}}return a}bindSkeletons(e,t){0!==Object.keys(t).length&&e.traverse(function(e){if(!0===e.isSkinnedMesh&&void 0!==e.skeleton){let n=t[e.skeleton];void 0===n?ek("ObjectLoader: No skeleton found with UUID:",e.skeleton):e.bind(n,e.bindMatrix)}})}bindLightTargets(e){e.traverse(function(t){if(t.isDirectionalLight||t.isSpotLight){let n=t.target,i=e.getObjectByProperty("uuid",n);void 0!==i?t.target=i:t.target=new nr}})}}let ol={UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,CubeUVReflectionMapping:306},ou={RepeatWrapping:1e3,ClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002},oc={NearestFilter:1003,NearestMipmapNearestFilter:1004,NearestMipmapLinearFilter:1005,LinearFilter:1006,LinearMipmapNearestFilter:1007,LinearMipmapLinearFilter:1008},od=new WeakMap;class oh extends sO{constructor(e){super(e),this.isImageBitmapLoader=!0,"undefined"==typeof createImageBitmap&&ek("ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&ek("ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"},this._abortController=new AbortController}setOptions(e){return this.options=e,this}load(e,t,n,i){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);let r=this,a=sU.get(`image-bitmap:${e}`);if(void 0!==a)return(r.manager.itemStart(e),a.then)?void a.then(n=>{if(!0!==od.has(a))return t&&t(n),r.manager.itemEnd(e),n;i&&i(od.get(a)),r.manager.itemError(e),r.manager.itemEnd(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,s.signal="function"==typeof AbortSignal.any?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal;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(n){return sU.add(`image-bitmap:${e}`,n),t&&t(n),r.manager.itemEnd(e),n}).catch(function(t){i&&i(t),od.set(o,t),sU.remove(`image-bitmap:${e}`),r.manager.itemError(e),r.manager.itemEnd(e)});sU.add(`image-bitmap:${e}`,o),r.manager.itemStart(e)}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}class op{static getContext(){return void 0===i&&(i=new(window.AudioContext||window.webkitAudioContext)),i}static setContext(e){i=e}}class of extends sO{constructor(e){super(e)}load(e,t,n,i){let r=this,a=new sV(this.manager);function s(t){i?i(t):eB(t),r.manager.itemError(e)}
38a.setResponseType("arraybuffer"),a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(e){try{let n=e.slice(0);op.getContext().decodeAudioData(n,function(e){t(e)}).catch(s)}catch(e){s(e)}},n,i)}}let om=new tH,og=new tH,ov=new tH;class oy{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new ip,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new ip,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 n,i;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,ov.copy(e.projectionMatrix);let r=t.eyeSep/2,a=r*t.near/t.focus,s=t.near*Math.tan(eG*t.fov*.5)/t.zoom;og.elements[12]=-r,om.elements[12]=r,n=-s*t.aspect+a,i=s*t.aspect+a,ov.elements[0]=2*t.near/(i-n),ov.elements[8]=(i+n)/(i-n),this.cameraL.projectionMatrix.copy(ov),n=-s*t.aspect-a,i=s*t.aspect-a,ov.elements[0]=2*t.near/(i-n),ov.elements[8]=(i+n)/(i-n),this.cameraR.projectionMatrix.copy(ov)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(og),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(om)}}class ox extends ip{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}}class ob{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=performance.now(),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=performance.now();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}let oS=new e0,o_=new e$,ow=new e0,oM=new e0,oT=new e0;class oE extends nr{constructor(){super(),this.type="AudioListener",this.context=op.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new ob}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;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(oS,o_,ow),oM.set(0,0,-1).applyQuaternion(o_),oT.set(0,1,0).applyQuaternion(o_),t.positionX){let e=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(oS.x,e),t.positionY.linearRampToValueAtTime(oS.y,e),t.positionZ.linearRampToValueAtTime(oS.z,e),t.forwardX.linearRampToValueAtTime(oM.x,e),t.forwardY.linearRampToValueAtTime(oM.y,e),t.forwardZ.linearRampToValueAtTime(oM.z,e),t.upX.linearRampToValueAtTime(oT.x,e),t.upY.linearRampToValueAtTime(oT.y,e),t.upZ.linearRampToValueAtTime(oT.z,e)}else t.setPosition(oS.x,oS.y,oS.z),t.setOrientation(oM.x,oM.y,oM.z,oT.x,oT.y,oT.z)}}class oA extends nr{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
38=!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 ek("Audio: Audio is already playing.");if(!1===this.hasPlaybackControl)return void ek("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 ek("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 ek("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 ek("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?(ek("Audio: this Audio has no playback control."),!1):this.loop}setLoop(e){return!1===this.hasPlaybackControl?void ek("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)?ek("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 oC=new e0,oP=new e$,oR=new e0,oI=new e0;class oD extends oA{constructor(e){super(e),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}connect(){return super.connect(),this.panner.connect(this.gain),this}disconnect(){return super.disconnect(),this.panner.disconnect(this.gain),this}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,n){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=t,this.panner.coneOuterGain=n,this}updateMatrixWorld(e){if(super.updateMatrixWorld(e),!0===this.hasPlaybackControl&&!1===this.isPlaying)return;this.matrixWorld.decompose(oC,oP,oR),oI.set(0,0,1).applyQuaternion(oP);let t=this.panner;if(t.positionX){let e=this.context.currentTime+this.listener.timeDelta;t.positionX.linearRampToValueAtTime(oC.x,e),t.positionY.linearRampToValueAtTime(oC.y,e),t.positionZ.linearRampToValueAtTime(oC.z,e),t.orientationX.linearRampToValueAtTime(oI.x,e),t.orientationY.linearRampToValueAtTime(oI.y,e),t.orientationZ.linearRampToValueAtTime(oI.z,e)}else t.setPosition(oC.x,oC.y,oC.z),t.setOrientation(oI.x,oI.y,oI.z)}}
38class oL{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 n=0;n<t.length;n++)e+=t[n];return e/t.length}}class oF{constructor(e,t,n){let i,r,a;switch(this.binding=e,this.valueSize=n,t){case"quaternion":i=this._slerp,r=this._slerpAdditive,a=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*n),this._workIndex=5;break;case"string":case"bool":i=this._select,r=this._select,a=this._setAdditiveIdentityOther,this.buffer=Array(5*n);break;default:i=this._lerp,r=this._lerpAdditive,a=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*n)}this._mixBufferRegion=i,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 n=this.buffer,i=this.valueSize,r=e*i+i,a=this.cumulativeWeight;if(0===a){for(let e=0;e!==i;++e)n[r+e]=n[e];a=t}else{a+=t;let e=t/a;this._mixBufferRegion(n,r,0,e,i)}this.cumulativeWeight=a}accumulateAdditive(e){let t=this.buffer,n=this.valueSize,i=n*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(t,i,0,e,n),this.cumulativeWeightAdditive+=e}apply(e){let t=this.valueSize,n=this.buffer,i=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(n,i,e,1-r,t)}a>0&&this._mixBufferRegionAdditive(n,i,this._addIndex*t,1,t);for(let e=t,r=t+t;e!==r;++e)if(n[e]!==n[e+t]){s.setValue(n,i);break}}saveOriginalState(){let e=this.binding,t=this.buffer,n=this.valueSize,i=n*this._origIndex;e.getValue(t,i);for(let e=n;e!==i;++e)t[e]=t[i+e%n];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 n=e;n<t;n++)this.buffer[n]=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 n=0;n<this.valueSize;n++)this.buffer[t+n]=this.buffer[e+n]}_select(e,t,n,i,r){if(i>=.5)for(let i=0;i!==r;++i)e[t+i]=e[n+i]}_slerp(e,t,n,i){e$.slerpFlat(e,t,e,t,e,n,i)}_slerpAdditive(e,t,n,i,r){let a=this._workIndex*r;e$.multiplyQuaternionsFlat(e,a,e,t,e,n),e$.slerpFlat(e,t,e,t,e,a,i)}_lerp(e,t,n,i,r){let a=1-i;for(let s=0;s!==r;++s){let r=t+s;e[r]=e[r]*a+e[n+s]*i}}_lerpAdditive(e,t,n,i,r){for(let a=0;a!==r;++a){let r=t+a;e[r]=e[r]+e[n+a]*i}}}let oN="\\[\\]\\.:\\/",oU=RegExp("["+oN+"]","g"),ok="[^"+oN+"]",oB="[^"+oN.replace("\\.","")+"]",oO=RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",ok)+/(WCOD+)?/.source.replace("WCOD",oB)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",ok)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",ok)+"$"),oz=["material","materials","bones","map"];class oH{constructor(e,t,n){this.path=t,this.parsedPath=n||oH.parseTrackName(t),this.node=oH.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new oH.Composite(e,t,n):new oH(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(oU,"")}static parseTrackName(e){let t=oO.exec(e);if(null===t)throw Error("PropertyBinding: Cannot parse trackName: "+e);let n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==i&&-1!==i){let e=n.nodeName.substring(i+1);-1!==oz.indexOf(e)&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=e)}if(null===n.propertyName||0===n.propertyName.length)throw Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(void 0===t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){let n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){let n=function(e){for(let i=0;i<e.length;i++){let r=e[i];if(r.name===t||r.uuid===t)return r;let a=n(r.children);if(a)return a}return null},i=n(e.children);if(i)return i}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){let n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)e[t++]=n[i]}_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 n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=e[t++]}_setValue_array_setNeedsUpdate(e,t){let n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=e[t++];this.targetObject.needsUpdate=!0}
vendor: 4,741 bytes, line 38
38_setValue_array_setMatrixWorldNeedsUpdate(e,t){let n=this.resolvedProperty;for(let i=0,r=n.length;i!==r;++i)n[i]=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,n=t.objectName,i=t.propertyName,r=t.propertyIndex;if(e||(e=oH.findNode(this.rootNode,t.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e)return void ek("PropertyBinding: No target node found for track: "+this.path+".");if(n){let i=t.objectIndex;switch(n){case"materials":if(!e.material)return void eB("PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.materials)return void eB("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 eB("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===i){i=t;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material)return void eB("PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.map)return void eB("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[n])return void eB("PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[n]}if(void 0!==i){if(void 0===e[i])return void eB("PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[i]}}let a=e[i];if(void 0===a)return void eB("PropertyBinding: Trying to update property for track: "+t.nodeName+"."+i+" but it wasn't found.",e);let s=this.Versioning.None;this.targetObject=e,!0===e.isMaterial?s=this.Versioning.NeedsUpdate:!0===e.isObject3D&&(s=this.Versioning.MatrixWorldNeedsUpdate);let o=this.BindingType.Direct;if(void 0!==r){if("morphTargetInfluences"===i){if(!e.geometry)return void eB("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!e.geometry.morphAttributes)return void eB("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=i;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}}oH.Composite=class{constructor(e,t,n){const i=n||oH.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,i)}getValue(e,t){this.bind();let n=this._targetGroup.nCachedObjects_,i=this._bindings[n];void 0!==i&&i.getValue(e,t)}setValue(e,t){let n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,r=n.length;i!==r;++i)n[i].setValue(e,t)}bind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},oH.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},oH.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},oH.prototype.GetterByBindingType=[oH.prototype._getValue_direct,oH.prototype._getValue_array,oH.prototype._getValue_arrayElement,oH.prototype._getValue_toArray],oH.prototype.SetterByBindingTypeAndVersioning=[[oH.prototype._setValue_direct,oH.prototype._setValue_direct_setNeedsUpdate,oH.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[oH.prototype._setValue_array,oH.prototype._setValue_array_setNeedsUpdate,oH.prototype._setValue_array_setMatr
38ixWorldNeedsUpdate],[oH.prototype._setValue_arrayElement,oH.prototype._setValue_arrayElement_setNeedsUpdate,oH.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[oH.prototype._setValue_fromArray,oH.prototype._setValue_fromArray_setNeedsUpdate,oH.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class oV{constructor(){this.isAnimationObjectGroup=!0,this.uuid=eW(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const e={};this._indicesByUUID=e;for(let t=0,n=arguments.length;t!==n;++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,n=this._paths,i=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],d=c.uuid,h=t[d];if(void 0===h){h=o++,t[d]=h,e.push(c);for(let e=0;e!==a;++e)r[e].push(new oH(c,n[e],i[e]))}else if(h<l){s=e[h];let o=--l,u=e[o];t[u.uuid]=h,e[h]=u,t[d]=o,e[o]=c;for(let e=0;e!==a;++e){let t=r[e],a=t[o],s=t[h];t[h]=a,void 0===s&&(s=new oH(c,n[e],i[e])),t[o]=s}}else e[h]!==s&&eB("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,n=this._bindings,i=n.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!==i;++e){let t=n[e],i=t[a],r=t[l];t[l]=i,t[a]=r}}}this.nCachedObjects_=r}uncache(){let e=this._objects,t=this._indicesByUUID,n=this._bindings,i=n.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!==i;++e){let t=n[e],i=t[s],r=t[l];t[u]=i,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!==i;++e){let t=n[e];t[u]=t[r],t.pop()}}}this.nCachedObjects_=r}subscribe_(e,t){let n=this._bindingsIndicesByPath,i=n[e],r=this._bindings;if(void 0!==i)return r[i];let a=this._paths,s=this._parsedPaths,o=this._objects,l=o.length,u=this.nCachedObjects_,c=Array(l);i=r.length,n[e]=i,a.push(e),s.push(t),r.push(c);for(let n=u,i=o.length;n!==i;++n){let i=o[n];c[n]=new oH(i,e,t)}return c}unsubscribe_(e){let t=this._bindingsIndicesByPath,n=t[e];if(void 0!==n){let i=this._paths,r=this._parsedPaths,a=this._bindings,s=a.length-1,o=a[s];t[e[s]]=n,a[n]=o,a.pop(),r[n]=r[s],r.pop(),i[n]=i[s],i.pop()}}}class oG{constructor(e,t,n=null,i=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=i;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}
38fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n=!1){if(e.fadeOut(t),this.fadeIn(t),!0===n){let n=this._clip.duration,i=e._clip.duration;e.warp(1,i/n,t),this.warp(n/i,1,t)}return this}crossFadeTo(e,t,n=!1){return e.crossFadeFrom(this,t,n)}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,n){let i=this._mixer,r=i.time,a=this.timeScale,s=this._timeScaleInterpolant;null===s&&(s=i._lendControlInterpolant(),this._timeScaleInterpolant=s);let o=s.parameterPositions,l=s.sampleValues;return o[0]=r,o[1]=r+n,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,n,i){if(!this.enabled)return void this._updateWeight(e);let r=this._startTime;if(null!==r){let i=(e-r)*n;i<0||0===n?t=0:(this._startTime=null,t=n*i)}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 n=0,i=e.length;n!==i;++n)e[n].evaluate(a),t[n].accumulateAdditive(s);else for(let n=0,r=e.length;n!==r;++n)e[n].evaluate(a),t[n].accumulate(i,s)}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;let n=this._weightInterpolant;if(null!==n){let i=n.evaluate(e)[0];t*=i,e>n.parameterPositions[1]&&(this.stopFading(),0===i&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;let n=this._timeScaleInterpolant;null!==n&&(t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t))}return this._effectiveTimeScale=t,t}_updateTime(e){let t=this._clip.duration,n=this.loop,i=this.time+e,r=this._loopCount,a=2202===n;if(0===e)return -1===r?i:a&&(1&r)==1?t-i:i;if(2200===n){-1===r&&(this._loopCount=0,this._setEndings(!0,!0,!1));s:{if(i>=t)i=t;else if(i<0)i=0;else{this.time=i;break s}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,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)),i>=t||i<0){let n=Math.floor(i/t);i-=t*n,r+=Math.abs(n);let s=this.repetitions-r;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=e>0?t:0,this.time=i,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=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n})}}else this.time=i;if(a&&(1&r)==1)return t-i}return i}_setEndings(e,t,n){let i=this._interpolantSettings;n?(i.endingStart=2401,i.endingEnd=2401):(e?i.endingStart=this.zeroSlopeAtStart?2401:2400:i.endingStart=2402,t?i.endingEnd=this.zeroSlopeAtEnd?2401:2400:i.endingEnd=2402)}_scheduleFading(e,t,n){let i=this._mixer,r=i.time,a=this._weightInterpolant;null===a&&(a=i._lendControlInterpolant(),this._weightInterpolant=a);let s=a.parameterPositions,o=a.sampleValues;return s[0]=r,o[0]=t,s[1]=r+e,o[1]=n,this}}let oj=new Float32Array(1);class oW extends ez{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){let n=e._localRoot||this._root,i=e._clip.tracks,r=i.length,a=e._propertyBindings,s=e._interpolants,o=n.uuid,l=this._bindingsByRootAndName,u=l[o];void 0===u&&(u={},l[o]=u);for(let e=0;e!==r;++e){let r=i[e],l=r.name,c=u[l];
38if(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 i=t&&t._propertyBindings[e].binding.parsedPath;c=new oF(oH.create(n,l,i),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,n=e._clip.uuid,i=this._actionsByClip[n];this._bindAction(e,i&&i.knownActions[0]),this._addInactiveAction(e,n,t)}let t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){let n=t[e];0==n.useCount++&&(this._lendBinding(n),n.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){let t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){let n=t[e];0==--n.useCount&&(n.restoreOriginalState(),this._takeBackBinding(n))}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,n){let i=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=i.length,i.push(e),a.actionByRoot[n]=e}_removeInactiveAction(e){let t=this._actions,n=t[t.length-1],i=e._cacheIndex;n._cacheIndex=i,t[i]=n,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,d=(e._localRoot||this._root).uuid;delete c[d],0===o.length&&delete a[r],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){let t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){let n=t[e];0==--n.referenceCount&&this._removeInactiveBinding(n)}}_lendAction(e){let t=this._actions,n=e._cacheIndex,i=this._nActiveActions++,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r}_takeBackAction(e){let t=this._actions,n=e._cacheIndex,i=--this._nActiveActions,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r}_addInactiveBinding(e,t,n){let i=this._bindingsByRootAndName,r=this._bindings,a=i[t];void 0===a&&(a={},i[t]=a),a[n]=e,e._cacheIndex=r.length,r.push(e)}_removeInactiveBinding(e){let t=this._bindings,n=e.binding,i=n.rootNode.uuid,r=n.path,a=this._bindingsByRootAndName,s=a[i],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[i]}_lendBinding(e){let t=this._bindings,n=e._cacheIndex,i=this._nActiveBindings++,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r}_takeBackBinding(e){let t=this._bindings,n=e._cacheIndex,i=--this._nActiveBindings,r=t[i];e._cacheIndex=i,t[i]=e,r._cacheIndex=n,t[n]=r}_lendControlInterpolant(){let e=this._controlInterpolants,t=this._nActiveControlInterpolants++,n=e[t];return void 0===n&&((n=new sT(new Float32Array(2),new Float32Array(2),1,oj)).__cacheIndex=t,e[t]=n),n}_takeBackControlInterpolant(e){let t=this._controlInterpolants,n=e.__cacheIndex,i=--this._nActiveControlInterpolants,r=t[i];e.__cacheIndex=i,t[i]=e,r.__cacheIndex=n,t[n]=r}clipAction(e,t,n){let i=t||this._root,r=i.uuid,a="string"==typeof e?sN.findByName(i,e):e,s=null!==a?a.uuid:e,o=this._actionsByClip[s],l=null;if(void 0===n&&(n=null!==a?a.blendMode:2500),void 0!==o){let e=o.actionByRoot[r];if(void 0!==e&&e.blendMode===n)return e;l=o.knownActions[0],null===a&&(a=l._clip)}if(null===a)return null;let u=new oG(this,a,t,n);return this._bindAction(u,l),this._addInactiveAction(u,s,r),u}existingAction(e,t){let n=t||this._root,i=n.uuid,r="string"==typeof e?sN.findByName(n,e):e,a=r?r.uuid:e,s=this._actionsByClip[a];return void 0!==s&&s.actionByRoot[i]||null}stopAllAction(){let e=this._actions,t=this._nActiveActions;for(let n=t-1;n>=0;--n)e[n].stop();return this}update(e){e*=this.timeScale;let t=this._actions,n=this._nActiveActions,i=this.time+=e,r=Math.sign(e),a=this._accuIndex^=1;for(let s=0;s!==n;++s)t[s]._update(i,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,n=e.uuid,i=this._actionsByClip,r=i[n];if(void 0!==r){let e=r.knownActions;for(let n=0,i=e.length;n!==i;++n){let i=e[n];this._deactivateAction(i);let r=i._cacheIndex,a=t[t.length-1];i._cacheIndex=null,i._byClipCacheIndex=null,a._cacheIndex=r,t[r]=a,t.pop(),this._removeInactiveBindingsForAction(i)}delete i[n]}}uncacheRoot(e){let t=e.uuid,n=this._actionsByClip;for(let e in n){let i=n[e].actionByRoot[t];void 0!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}let i=this._bindingsByRootAndName[t];if(void 0!==i)for(let e in i){let t=i[e];t.restoreOriginalState(),this._removeInactiveBinding(t)}}uncacheAction(e,t){let n=this.existingAction(e,t);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}class oX extends tl{constructor(e=1,t=1,n=1,i={}){super(e,t,i),this.isRenderTarget3D=!0,this.depth=n,this.texture=new th(null,e,t,n),this._setTextureOptions(i),this.texture.isRenderTargetTexture=!0}}class oq{constructor(e){this.value=e}clone(){return new oq(void 0===this.value.clone?this.value:this.value.clone())}}let oY=0;class oZ extends ez{constructor(){super(),this.isUniformsGroup=!0,Object.defineProperty(this,"id",{value:oY++}),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(){this.dispatchEvent({type:"dispose"})}copy(e){this.name=e.name,this.usage=e.usage;let t=e.uniforms;this.uniforms.length=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;e<n.length;e++)this.uniforms.push(n[e].clone())}return this}clone(){return new this.constructor().copy(this)}}class oK extends iM{constructor(e,t,n=1){super(e,t),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=n}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 oJ{constructor(e,t,n,i,r,a=!1){this.isGLBufferAttribute=!0,this.name="",this.buffer=e,this.type=t,this.itemSize=n,this.elementSize=i,this.count=r,this.normalized=a,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 oQ=new tH;class o${constructor(e,t,n=0,i=1/0){this.ray=new tz(e,t),this.near=n,this.far=i,this.camera=null,this.layers=new tQ,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):eB("Raycaster: 
38Unsupported camera type: "+t.type)}setFromXRController(e){return oQ.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(oQ),this}intersectObject(e,t=!0,n=[]){return o1(e,this,n,t),n.sort(o0),n}intersectObjects(e,t=!0,n=[]){for(let i=0,r=e.length;i<r;i++)o1(e[i],this,n,t);return n.sort(o0),n}}function o0(e,t){return e.distance-t.distance}function o1(e,t,n,i){let r=!0;if(e.layers.test(t.layers)&&!1===e.raycast(t,n)&&(r=!1),!0===r&&!0===i){let i=e.children;for(let e=0,r=i.length;e<r;e++)o1(i[e],t,n,!0)}}class o2{constructor(){this._previousTime=0,this._currentTime=0,this._startTime=performance.now(),this._delta=0,this._elapsed=0,this._timescale=1,this._document=null,this._pageVisibilityHandler=null}connect(e){this._document=e,void 0!==e.hidden&&(this._pageVisibilityHandler=o3.bind(this),e.addEventListener("visibilitychange",this._pageVisibilityHandler,!1))}disconnect(){null!==this._pageVisibilityHandler&&(this._document.removeEventListener("visibilitychange",this._pageVisibilityHandler),this._pageVisibilityHandler=null),this._document=null}getDelta(){return this._delta/1e3}getElapsed(){return this._elapsed/1e3}getTimescale(){return this._timescale}setTimescale(e){return this._timescale=e,this}reset(){return this._currentTime=performance.now()-this._startTime,this}dispose(){this.disconnect()}update(e){return null!==this._pageVisibilityHandler&&!0===this._document.hidden?this._delta=0:(this._previousTime=this._currentTime,this._currentTime=(void 0!==e?e:performance.now())-this._startTime,this._delta=(this._currentTime-this._previousTime)*this._timescale,this._elapsed+=this._delta),this}}function o3(){!1===this._document.hidden&&this.reset()}class o4{constructor(e=1,t=0,n=0){this.radius=e,this.phi=t,this.theta=n}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=eX(this.phi,1e-6,Math.PI-1e-6),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(eX(t/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}class o5{constructor(e=1,t=0,n=0){this.radius=e,this.theta=t,this.y=n}set(e,t,n){return this.radius=e,this.theta=t,this.y=n,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,n){return this.radius=Math.sqrt(e*e+n*n),this.theta=Math.atan2(e,n),this.y=t,this}clone(){return new this.constructor().copy(this)}}class o6{constructor(e,t,n,i){o6.prototype.isMatrix2=!0,this.elements=[1,0,0,1],void 0!==e&&this.set(e,t,n,i)}identity(){return this.set(1,0,0,1),this}fromArray(e,t=0){for(let n=0;n<4;n++)this.elements[n]=e[n+t];return this}set(e,t,n,i){let r=this.elements;return r[0]=e,r[2]=t,r[1]=n,r[3]=i,this}}let o8=new eQ;class o9{constructor(e=new eQ(Infinity,Infinity),t=new eQ(-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,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){let n=o8.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),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,o8).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 o7=new e0,le=new e0,lt=new e0,ln=new e0,li=new e0,lr=new e0,la=new e0;class ls{constructor(e=new e0,t=new e0){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){o7.subVectors(e,this.start),le.subVectors(this.end,this.start);let n=le.dot(le),i=le.dot(o7)/n;return t&&(i=eX(i,0,1)),i}closestPointToPoint(e,t,n){let i=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(i).add(this.start)}
38distanceSqToLine3(e,t=lr,n=la){let i,r,a=1e-8*1e-8,s=this.start,o=e.start,l=this.end,u=e.end;lt.subVectors(l,s),ln.subVectors(u,o),li.subVectors(s,o);let c=lt.dot(lt),d=ln.dot(ln),h=ln.dot(li);if(c<=a&&d<=a)return t.copy(s),n.copy(o),t.sub(n),t.dot(t);if(c<=a)i=0,r=eX(r=h/d,0,1);else{let e=lt.dot(li);if(d<=a)r=0,i=eX(-e/c,0,1);else{let t=lt.dot(ln),n=c*d-t*t;i=0!==n?eX((t*h-e*d)/n,0,1):0,(r=(t*i+h)/d)<0?(r=0,i=eX(-e/c,0,1)):r>1&&(r=1,i=eX((t-e)/c,0,1))}}return t.copy(s).add(lt.multiplyScalar(i)),n.copy(o).add(ln.multiplyScalar(r)),t.sub(n),t.dot(t)}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 lo=new e0;class ll extends nr{constructor(e,t){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const n=new nQ,i=[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 n=e/32*Math.PI*2,r=t/32*Math.PI*2;i.push(Math.cos(n),Math.sin(n),1,Math.cos(r),Math.sin(r),1)}n.setAttribute("position",new nj(i,3));const r=new rL({fog:!1,toneMapped:!1});this.cone=new rW(n,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),lo.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(lo),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}let lu=new e0,lc=new tH,ld=new tH;class lh extends rW{constructor(e){const t=function e(t){let n=[];!0===t.isBone&&n.push(t);for(let i=0;i<t.children.length;i++)n.push(...e(t.children[i]));return n}(e),n=new nQ,i=[],r=[];for(let e=0;e<t.length;e++){const n=t[e];n.parent&&n.parent.isBone&&(i.push(0,0,0),i.push(0,0,0),r.push(0,0,0),r.push(0,0,0))}n.setAttribute("position",new nj(i,3)),n.setAttribute("color",new nj(r,3)),super(n,new rL({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;const a=new nw(255),s=new nw(65280);this.setColors(a,s)}updateMatrixWorld(e){let t=this.bones,n=this.geometry,i=n.getAttribute("position");ld.copy(this.root.matrixWorld).invert();for(let e=0,n=0;e<t.length;e++){let r=t[e];r.parent&&r.parent.isBone&&(lc.multiplyMatrices(ld,r.matrixWorld),lu.setFromMatrixPosition(lc),i.setXYZ(n,lu.x,lu.y,lu.z),lc.multiplyMatrices(ld,r.parent.matrixWorld),lu.setFromMatrixPosition(lc),i.setXYZ(n+1,lu.x,lu.y,lu.z),n+=2)}n.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}setColors(e,t){let n=this.geometry.getAttribute("color");for(let i=0;i<n.count;i+=2)n.setXYZ(i,e.r,e.g,e.b),n.setXYZ(i+1,t.r,t.g,t.b);return n.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class lp extends ie{constructor(e,t,n){super(new a9(t,4,2),new nA({wireframe:!0,fog:!1,toneMapped:!1})),this.light=e,this.color=n,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 lf=new e0,lm=new nw,lg=new nw;class lv extends nr{constructor(e,t,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="HemisphereLightHelper";const i=new a4(t);i.rotateY(.5*Math.PI),this.material=new nA({wireframe:!0,fog:!1,toneMapped:!1}),void 0===this.color&&(this.material.vertexColors=!0);const r=new Float32Array(3*i.getAttribute("position").count);i.setAttribute("color",new nN(r,3)),this.add(new ie(i,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");lm.copy(this.light.color),lg.copy(this.light.groundColor);for(let e=0,n=t.count;e<n;e++){let i=e<n/2?lm:lg;t.setXYZ(e,i.r,i.g,i.b)}t.needsUpdate=!0}this.light.updateWorldMatrix(!0,!1),e.lookAt(lf.setFromMatrixPosition(this.light.matrixWorld).negate())}}class ly extends rW{constructor(e=10,t=10,n=4473924,i=8947848){n=new nw(n),i=new nw(i);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?n:i;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 nQ;u.setAttribute("position",new nj(o,3)),u.setAttribute("color",new nj(l,3)),super(u,new rL({vertexColors:!0,toneMapped:!1})),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}class lx extends rW{constructor(e=10,t=16,n=8,i=64,r=4473924,a=8947848){r=new nw(r),a=new nw(a);const s=[],o=[];if(t>1)for(let n=0;n<t;n++){const i=n/t*(2*Math.PI),l=Math.sin(i)*e,u=Math.cos(i)*e;s.push(0,0,0),s.push(l,0,u);const c=1&n?r:a;o.push(c.r,c.g,c.b),o.push(c.r,c.g,c.b)}for(let t=0;t<n;t++){const l=1&t?r:a,u=e-e/n*t;for(let e=0;e<i;e++){let t=e/i*(2*Math.PI),n=Math.sin(t)*u,r=Math.cos(t)*u;s.push(n,0,r),o.push(l.r,l.g,l.b),n=Math.sin(t=(e+1)/i*(2*Math.PI))*u,r=Math.cos(t)*u,s.push(n,0,r),o.push(l.r,l.g,l.b)}}const l=new nQ;l.setAttribute("position",new nj(s,3)),l.setAttribute("color",new nj(o,3)),super(l,new rL({vertexColors:!0,toneMapped:!1})),this.type="PolarGridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}let lb=new e0,lS=new e0,l_=new e0;class lw extends nr{constructor(e,t,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="DirectionalLightHelper",void 0===t&&(t=1);let i=new nQ;i.setAttribute("position",new nj([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3));const r=new rL({fog:!1,toneMapped:!1});this.lightPlane=new rH(i,r),this.add(this.lightPlane),(i=new nQ).setAttribute("position",new nj([0,0,0,0,0,1],3)),this.targetLine=new rH(i,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),lb.setFromMatrixPosition(this.light.matrixWorld),lS.setFromMatrixPosition(this.light.target.matrixWorld),l_.subVectors(lS,lb),this.lightPlane.lookAt(lS),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(lS),this.targetLine.scale.z
38=l_.length()}}let lM=new e0,lT=new iu;class lE extends rW{constructor(e){const t=new nQ,n=new rL({color:0xffffff,vertexColors:!0,toneMapped:!1}),i=[],r=[],a={};function s(e,t){o(e),o(t)}function o(e){i.push(0,0,0),r.push(0,0,0),void 0===a[e]&&(a[e]=[]),a[e].push(i.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 nj(i,3)),t.setAttribute("color",new nj(r,3)),super(t,n),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 nw(0xffaa00),u=new nw(0xff0000),c=new nw(43775),d=new nw(0xffffff),h=new nw(3355443);this.setColors(l,u,c,d,h)}setColors(e,t,n,i,r){let a=this.geometry.getAttribute("color");return 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,n.r,n.g,n.b),a.setXYZ(33,n.r,n.g,n.b),a.setXYZ(34,n.r,n.g,n.b),a.setXYZ(35,n.r,n.g,n.b),a.setXYZ(36,n.r,n.g,n.b),a.setXYZ(37,n.r,n.g,n.b),a.setXYZ(38,i.r,i.g,i.b),a.setXYZ(39,i.r,i.g,i.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,this}update(){let e,t,n=this.geometry,i=this.pointMap;if(lT.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),!0===this.camera.reversedDepth)e=1,t=0;else if(2e3===this.camera.coordinateSystem)e=-1,t=1;else if(2001===this.camera.coordinateSystem)e=0,t=1;else throw Error("THREE.CameraHelper.update(): Invalid coordinate system: "+this.camera.coordinateSystem);lA("c",i,n,lT,0,0,e),lA("t",i,n,lT,0,0,t),lA("n1",i,n,lT,-1,-1,e),lA("n2",i,n,lT,1,-1,e),lA("n3",i,n,lT,-1,1,e),lA("n4",i,n,lT,1,1,e),lA("f1",i,n,lT,-1,-1,t),lA("f2",i,n,lT,1,-1,t),lA("f3",i,n,lT,-1,1,t),lA("f4",i,n,lT,1,1,t),lA("u1",i,n,lT,.7,1.1,e),lA("u2",i,n,lT,-.7,1.1,e),lA("u3",i,n,lT,0,2,e),lA("cf1",i,n,lT,-1,0,t),lA("cf2",i,n,lT,1,0,t),lA("cf3",i,n,lT,0,-1,t),lA("cf4",i,n,lT,0,1,t),lA("cn1",i,n,lT,-1,0,e),lA("cn2",i,n,lT,1,0,e),lA("cn3",i,n,lT,0,-1,e),lA("cn4",i,n,lT,0,1,e),n.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}}function lA(e,t,n,i,r,a,s){lM.set(r,a,s).unproject(i);let o=t[e];if(void 0!==o){let e=n.getAttribute("position");for(let t=0,n=o.length;t<n;t++)e.setXYZ(o[t],lM.x,lM.y,lM.z)}}let lC=new tf;class lP extends rW{constructor(e,t=0xffff00){const n=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]),i=new Float32Array(24),r=new nQ;r.setIndex(new nN(n,1)),r.setAttribute("position",new nN(i,3)),super(r,new rL({color:t,toneMapped:!1})),this.object=e,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(){if(void 0!==this.object&&lC.setFromObject(this.object),lC.isEmpty())return;let e=lC.min,t=lC.max,n=this.geometry.attributes.position,i=n.array;i[0]=t.x,i[1]=t.y,i[2]=t.z,i[3]=e.x,i[4]=t.y,i[5]=t.z,i[6]=e.x,i[7]=e.y,i[8]=t.z,i[9]=t.x,i[10]=e.y,i[11]=t.z,i[12]=t.x,i[13]=t.y,i[14]=e.z,i[15]=e.x,i[16]=t.y,i[17]=e.z,i[18]=e.x,i[19]=e.y,i[20]=e.z,i[21]=t.x,i[22]=e.y,i[23]=e.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 lR extends rW{constructor(e,t=0xffff00){const n=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]),i=new nQ;i.setIndex(new nN(n,1)),i.setAttribute("position",new nj([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(i,new rL({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 lI extends rH{constructor(e,t=1,n=0xffff00){const i=new nQ;i.setAttribute("position",new nj([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)),i.computeBoundingSphere(),super(i,new rL({color:n,toneMapped:!1})),this.type="PlaneHelper",this.plane=e,this.size=t;const r=new nQ;r.setAttribute("position",new nj([1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],3)),r.computeBoundingSphere(),this.add(new ie(r,new nA({color:n,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 lD=new e0;class lL extends nr{constructor(e=new e0(0,0,1),t=new e0(0,0,0),n=1,i=0xffff00,s=.2*n,o=.2*s){super(),this.type="ArrowHelper",void 0===r&&((r=new nQ).setAttribute("position",new nj([0,0,0,0,1,0],3)),(a=new ai(.5,1,5,1)).translate(0,-.5,0)),this.position.copy(t),this.line=new rH(r,new rL({color:i,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new ie(a,new nA({color:i,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(n,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{lD.set(e.z,0,-e.x).normalize();let t=Math.acos(e.y);this.quaternion.setFromAxisAngle(lD,t)}}setLength(e,t=.2*e,n=.2*t){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),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 lF extends rW{constructor(e=1){const t=new nQ;t.setAttribute("position",new nj([0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],3)),t.setAttribute("color",new nj([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3)),super(t,new rL({vertexColors:!0,toneMapped:!1})),this.type="AxesHelper"}
38setColors(e,t,n){let i=new nw,r=this.geometry.attributes.color.array;return i.set(e),i.toArray(r,0),i.toArray(r,3),i.set(t),i.toArray(r,6),i.toArray(r,9),i.set(n),i.toArray(r,12),i.toArray(r,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class lN{constructor(){this.type="ShapePath",this.color=new nw,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new aD,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,i){return this.currentPath.quadraticCurveTo(e,t,n,i),this}bezierCurveTo(e,t,n,i,r,a){return this.currentPath.bezierCurveTo(e,t,n,i,r,a),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){let t,n,i,r,a,s=aJ.isClockWise,o=this.subPaths;if(0===o.length)return[];let l=[];if(1===o.length)return n=o[0],(i=new aL).curves=n.curves,l.push(i),l;let u=!s(o[0].getPoints());u=e?!u:u;let c=[],d=[],h=[],p=0;d[0]=void 0,h[p]=[];for(let i=0,a=o.length;i<a;i++)t=s(r=(n=o[i]).getPoints()),(t=e?!t:t)?(!u&&d[p]&&p++,d[p]={s:new aL,p:r},d[p].s.curves=n.curves,u&&p++,h[p]=[]):h[p].push({h:n,p:r[0]});if(!d[0])return function(e){let t=[];for(let n=0,i=e.length;n<i;n++){let i=e[n],r=new aL;r.curves=i.curves,t.push(r)}return t}(o);if(d.length>1){let e=!1,t=0;for(let e=0,t=d.length;e<t;e++)c[e]=[];for(let n=0,i=d.length;n<i;n++){let i=h[n];for(let r=0;r<i.length;r++){let a=i[r],s=!0;for(let i=0;i<d.length;i++)(function(e,t){let n=t.length,i=!1;for(let r=n-1,a=0;a<n;r=a++){let n=t[r],s=t[a],o=s.x-n.x,l=s.y-n.y;if(Math.abs(l)>Number.EPSILON){if(l<0&&(n=t[a],o=-o,s=t[r],l=-l),e.y<n.y||e.y>s.y)continue;if(e.y===n.y){if(e.x===n.x)return!0}else{let t=l*(e.x-n.x)-o*(e.y-n.y);if(0===t)return!0;if(t<0)continue;i=!i}}else{if(e.y!==n.y)continue;if(s.x<=e.x&&e.x<=n.x||n.x<=e.x&&e.x<=s.x)return!0}}return i})(a.p,d[i].p)&&(n!==i&&t++,s?(s=!1,c[i].push(a)):e=!0);s&&c[n].push(a)}}t>0&&!1===e&&(h=c)}for(let e=0,t=d.length;e<t;e++){i=d[e].s,l.push(i),a=h[e];for(let e=0,t=a.length;e<t;e++)i.holes.push(a[e].h)}return l}}class lU extends ez{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(e){void 0===e?ek("Controls: connect() now requires an element."):(null!==this.domElement&&this.disconnect(),this.domElement=e)}disconnect(){}dispose(){}update(){}}function lk(e,t,n,i){let r=function(e){switch(e){case 1009:case 1010:return{byteLength:1,components:1};case 1012:case 1011:case ev: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:case 35899:return{byteLength:4,components:3}}throw Error(`Unknown texture type ${e}.`)}(i);switch(n){case 1021:return e*t;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:case 37488:case 37489:return Math.floor((e+3)/4)*Math.floor((t+3)/4)*8;case 33778:case 33779:case 37496:case 37490:case 37491: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 ${n} format.`)}class lB{static contain(e,t){let n;return(n=e.image&&e.image.width?e.image.width/e.image.height:1)>t?(e.repeat.x=1,e.repeat.y=n/t,e.offset.x=0,e.offset.y=(1-e.repeat.y)/2):(e.repeat.x=t/n,e.repeat.y=1,e.offset.x=(1-e.repeat.x)/2,e.offset.y=0),e}static cover(e,t){let n;return(n=e.image&&e.image.width?e.image.width/e.image.height:1)>t?(e.repeat.x=t/n,e.repeat.y=1,e.offset.x=(1-e.repeat.x)/2,e.offset.y=0):(e.repeat.x=1,e.repeat.y=n/t,e.offset.x=0,e.offset.y=(1-e.repeat.y)/2),e}static fill(e){return e.repeat.x=1,e.repeat.y=1,e.offset.x=0,e.offset.y=0,e}static getByteLength(e,t,n,i){return lk(e,t,n,i)}}function lO(){let e=null,t=!1,n=null,i=null;function r(t,a){n(t,a),i=e.requestAnimationFrame(r)}return{start:function(){!0===t||null!==n&&(i=e.requestAnimationFrame(r),t=!0)},stop:function(){e.cancelAnimationFrame(i),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function lz(e){let t=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),t.get(e)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);let i=t.get(n);i&&(e.deleteBuffer(i.buffer),t.delete(n))}
38,update:function(n,i){if(n.isInterleavedBufferAttribute&&(n=n.data),n.isGLBufferAttribute){let e=t.get(n);(!e||e.version<n.version)&&t.set(n,{buffer:n.buffer,type:n.type,bytesPerElement:n.elementSize,version:n.version});return}let r=t.get(n);if(void 0===r)t.set(n,function(t,n){let i,r=t.array,a=t.usage,s=r.byteLength,o=e.createBuffer();if(e.bindBuffer(n,o),e.bufferData(n,r,a),t.onUploadCallback(),r instanceof Float32Array)i=e.FLOAT;else if("undefined"!=typeof Float16Array&&r instanceof Float16Array)i=e.HALF_FLOAT;else if(r instanceof Uint16Array)i=t.isFloat16BufferAttribute?e.HALF_FLOAT:e.UNSIGNED_SHORT;else if(r instanceof Int16Array)i=e.SHORT;else if(r instanceof Uint32Array)i=e.UNSIGNED_INT;else if(r instanceof Int32Array)i=e.INT;else if(r instanceof Int8Array)i=e.BYTE;else if(r instanceof Uint8Array)i=e.UNSIGNED_BYTE;else if(r instanceof Uint8ClampedArray)i=e.UNSIGNED_BYTE;else throw Error("THREE.WebGLAttributes: Unsupported buffer data format: "+r);return{buffer:o,type:i,bytesPerElement:r.BYTES_PER_ELEMENT,version:t.version,size:s}}(n,i));else if(r.version<n.version){if(r.size!==n.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,n,i){let r=n.array,a=n.updateRanges;if(e.bindBuffer(i,t),0===a.length)e.bufferSubData(i,0,r);else{a.sort((e,t)=>e.start-t.start);let t=0;for(let e=1;e<a.length;e++){let n=a[t],i=a[e];i.start<=n.start+n.count+1?n.count=Math.max(n.count,i.start+i.count-n.start):a[++t]=i}a.length=t+1;for(let t=0,n=a.length;t<n;t++){let n=a[t];e.bufferSubData(i,n.start*r.BYTES_PER_ELEMENT,r,n.start,n.count)}n.clearUpdateRanges()}n.onUploadCallback()}(r.buffer,n,i),r.version=n.version}}}}"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:"182"}})),"undefined"!=typeof window&&(window.__THREE__?ek("WARNING: Multiple instances of Three.js being imported."):window.__THREE__="182");let lH={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
38( 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 );
38\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}\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 );
38\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#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 );
38\n			reflectVec = normalize( mix( reflectVec, normal, pow4( 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		}
38 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	}
38\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;\nmaterial.diffuseContribution = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.metalness = 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 = min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor;\n	material.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor );\n#else\n	material.specularColor = vec3( 0.04 );\n	material.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor );\n	material.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n	material.clearcoat = clearcoat;
38\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.0001, 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:"uniform sampler2D dfgLUT;\nstruct PhysicalMaterial {\n	vec3 diffuseColor;\n	vec3 diffuseContribution;\n	vec3 specularColor;\n	vec3 specularColorBlended;\n	float roughness;\n	float metalness;\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		vec3 iridescenceFresnelDielectric;\n		vec3 iridescenceFresnelMetallic;\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, alph
38aB * dotBV, dotNV ) );\n		float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n		float v = 0.5 / ( gv + gl );\n		return 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.specularColorBlended;\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 >
38 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 * transpose( 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 rInv = 1.0 / ( roughness + 0.1 );\n	float a = -1.9362 + 1.0678 * roughness + 0.4573 * r2 - 0.8469 * rInv;\n	float b = -0.6014 + 0.5538 * roughness - 0.4670 * r2 - 0.1255 * rInv;\n	float DG = exp( a * dotNV + b );\n	return saturate( DG );\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n	float dotNV = saturate( dot( normal, viewDir ) );\n	vec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg;\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	float dotNV = saturate( dot( normal, viewDir ) );\n	vec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg;\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}\nvec3 BRDF_GGX_Multiscatter( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n	vec3 singleScatter = BRDF_GGX( lightDir, viewDir, normal, material );
38\n	float dotNL = saturate( dot( normal, lightDir ) );\n	float dotNV = saturate( dot( normal, viewDir ) );\n	vec2 dfgV = texture2D( dfgLUT, vec2( material.roughness, dotNV ) ).rg;\n	vec2 dfgL = texture2D( dfgLUT, vec2( material.roughness, dotNL ) ).rg;\n	vec3 FssEss_V = material.specularColorBlended * dfgV.x + material.specularF90 * dfgV.y;\n	vec3 FssEss_L = material.specularColorBlended * dfgL.x + material.specularF90 * dfgL.y;\n	float Ess_V = dfgV.x + dfgV.y;\n	float Ess_L = dfgL.x + dfgL.y;\n	float Ems_V = 1.0 - Ess_V;\n	float Ems_L = 1.0 - Ess_L;\n	vec3 Favg = material.specularColorBlended + ( 1.0 - material.specularColorBlended ) * 0.047619;\n	vec3 Fms = FssEss_V * FssEss_L * Favg / ( 1.0 - Ems_V * Ems_L * Favg + EPSILON );\n	float compensationFactor = Ems_V * Ems_L;\n	vec3 multiScatter = Fms * compensationFactor;\n	return singleScatter + multiScatter;\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.specularColorBlended * t2.x + ( vec3( 1.0 ) - material.specularColorBlended ) * t2.y );\n		reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n		reflectedLight.directDiffuse += lightColor * material.diffuseContribution * 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 \n 		sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n \n 		float sheenAlbedoV = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n 		float sheenAlbedoL = IBLSheenBRDF( geometryNormal, directLight.direction, material.sheenRoughness );\n \n 		float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * max( sheenAlbedoV, sheenAlbedoL );\n \n 		irradiance *= sheenEnergyComp;\n \n 	#endif\n	reflectedLight.directSpecular += irradiance * BRDF_GGX_Multiscatter( directLight.direction, geometryViewDir, geometryNormal, material );\n	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseContribution );\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	vec3 diffuse = irradiance * BRDF_Lambert( material.diffuseContribution );\n	#ifdef USE_SHEEN\n		float sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n		float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo;\n		diffuse *= sheenEnergyComp;\n	#endif\n	reflectedLight.indirectDiffuse += diffuse;\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 ) * RECIPROCAL_PI;\n 	#endif\n	vec3 singleScatteringDielectric = vec3( 0.0 );\n	vec3 multiScatteringDielectric = vec3( 0.0 );\n	vec3 singleScatteringMetallic = vec3( 0.0 );\n	vec3 multiScatteringMetallic = vec3( 0.0 );
38\n	#ifdef USE_IRIDESCENCE\n		computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnelDielectric, material.roughness, singleScatteringDielectric, multiScatteringDielectric );\n		computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.iridescence, material.iridescenceFresnelMetallic, material.roughness, singleScatteringMetallic, multiScatteringMetallic );\n	#else\n		computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScatteringDielectric, multiScatteringDielectric );\n		computeMultiscattering( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.roughness, singleScatteringMetallic, multiScatteringMetallic );\n	#endif\n	vec3 singleScattering = mix( singleScatteringDielectric, singleScatteringMetallic, material.metalness );\n	vec3 multiScattering = mix( multiScatteringDielectric, multiScatteringMetallic, material.metalness );\n	vec3 totalScatteringDielectric = singleScatteringDielectric + multiScatteringDielectric;\n	vec3 diffuse = material.diffuseContribution * ( 1.0 - totalScatteringDielectric );\n	vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n	vec3 indirectSpecular = radiance * singleScattering;\n	indirectSpecular += multiScattering * cosineWeightedIrradiance;\n	vec3 indirectDiffuse = diffuse * cosineWeightedIrradiance;\n	#ifdef USE_SHEEN\n		float sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n		float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo;\n		indirectSpecular *= sheenEnergyComp;\n		indirectDiffuse *= sheenEnergyComp;\n	#endif\n	reflectedLight.indirectSpecular += indirectSpecular;\n	reflectedLight.indirectDiffuse += indirectDiffuse;\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.iridescenceFresnelDielectric = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n		material.iridescenceFresnelMetallic = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.diffuseColor );\n		material.iridescenceFresnel = mix( material.iridescenceFresnelDielectric, material.iridescenceFresnelMetallic, material.metalness );\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 ) && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) )\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	}
38\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_LOGARITHMIC_DEPTH_BUFFER )\n	gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )\n	uniform float logDepthBufFC;\n	varying float vFragDepth;\n	varying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGARITHMIC_DEPTH_BUFFER\n	varying float vFragDepth;\n	varying float vIsPerspective;\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGARITHMIC_DEPTH_BUFFER\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 );
38\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 * 25
385.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		#if defined( SHADOWMAP_TYPE_PCF )\n			uniform sampler2DShadow directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n		#else\n			uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n		#endif\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		#if defined( SHADOWMAP_TYPE_PCF )\n			uniform sampler2DShadow spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n		#else\n			uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n		#endif\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		#if defined( SHADOWMAP_TYPE_PCF )\n			uniform samplerCubeShadow pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n		#elif defined( SHADOWMAP_TYPE_BASIC )\n			uniform samplerCube pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n		#endif\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	#if defined( SHADOWMAP_TYPE_PCF )\n		float interleavedGradientNoise( vec2 position ) {\n			return fract( 52.9829189 * fract( dot( position, vec2( 0.06711056, 0.00583715 ) ) ) );\n		}\n		vec2 vogelDiskSample( int sampleIndex, int samplesCount, float phi ) {\n			const float goldenAngle = 2.399963229728653;\n			float r = sqrt( ( float( sampleIndex ) + 0.5 ) / float( samplesCount ) );\n			float theta = float( sampleIndex ) * goldenAngle + phi;\n			return vec2( cos( theta ), sin( theta ) ) * r;\n		}\n	#endif\n	#if defined( SHADOWMAP_TYPE_PCF )\n		float getShadow( sampler2DShadow 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				vec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n				float radius = shadowRadius * texelSize.x;\n				float phi = interleavedGradientNoise( gl_FragCoord.xy ) * 6.28318530718;\n				shadow = (\n					texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 0, 5, phi ) * radius, shadowCoord.z ) ) +\n					texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 1, 5, phi ) * radius, shadowCoord.z ) ) +\n					texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 2, 5, phi ) * radius, shadowCoord.z ) ) +\n					texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 3, 5, phi ) * radius, shadowCoord.z ) ) +\n					texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 4, 5, phi ) * radius, shadowCoord.z ) )\n				) * 0.2;\n			}\n			return mix( 1.0, shadow, shadowIntensity );\n		}\n	#elif defined( SHADOWMAP_TYPE_VSM )\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				vec2 distribution = texture2D( shadowMap, shadowCoord.xy ).rg;\n				float mean = distribution.x;\n				float variance = distribution.y * distribution.y;\n				#ifdef USE_REVERSED_DEPTH_BUFFER\n					float hard_shadow = step( mean, shadowCoord.z );\n				#else\n					float hard_shadow = step( shadowCoord.z, mean );\n				#endif\n				if ( hard_shadow == 1.0 ) {\n					shadow = 1.0;\n				} else {\n					variance = max( variance, 0.0000001 );\n					float d = shadowCoord.z - mean;\n					float p_max = variance / ( variance + d * d );\n					p_max = clamp( ( p_max - 0.3 ) / 0.65, 0.0, 1.0 );\n					shadow = max( hard_shadow, p_max );\n				}\n			}\n			return mix( 1.0, shadow, shadowIntensity );\n		}\n	#else\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				float depth = texture2D( shadowMap, shadowCoord.xy ).r;\n				#ifdef USE_REVERSED_DEPTH_BUFFER\n					shadow = step( depth, shadowCoord.z );\n				#else\n					shadow = step( shadowCoord.z, depth );\n				#endif\n			}\n			return mix( 1.0, shadow, shadowIntensity );\n		}\n	#endif\n	#if NUM_POINT_LIGHT_SHADOWS > 0\n	#if defined( SHADOWMAP_TYPE_PCF )\n	float getPointShadow( samplerCubeShadow 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		vec3 bd3D = normalize( lightToPosition );\n		vec3 absVec = abs( lightToPosition );\n		float viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z );\n		if ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) {\n			float dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) );\n			dp += shadowBias;\n			float texelSize = shadowRadius / shadowMapSize.x;\n			vec3 absDir = abs( bd3D );\n			vec3 tangent = absDir.x > absDir.z ? vec3( 0.0, 1.0, 0.0 ) : vec3( 1.0, 0.0, 0.0 );\n			tangent = normalize( cross( bd3D, tangent ) );\n			vec3 bitangent = cross( bd3D, tangent );\n			float phi = interleavedGradientNoise( gl_FragCoord.xy ) * 6.28318530718;\n			shadow = (\n				texture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 0, 5, phi ).x + bitangent * vogelDiskSample( 0, 5, phi ).y ) * texelSize, dp ) ) +\n				texture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 1, 5, phi ).x + bitangent * vogelDiskSample( 1, 5, phi ).y ) * texelSize, dp ) ) +\n				texture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 2, 5, phi ).x + bitangent * vogelDiskSample( 2, 5, phi ).y ) * texelSize, dp ) ) +\n				texture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 3, 5, phi ).x + bitangent * vogelDiskSample( 3, 5, phi ).y ) * texelSize, dp ) ) +\n				texture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 4, 5, phi ).x + bitangent * vogelDiskSample( 4, 5, phi ).y ) * texelSize, dp ) )\n			) * 0.2;\n		}\n		return mix( 1.0, shadow, shadowIntensity );\n	}\n	#elif defined( SHADOWMAP_TYPE_BASIC )\n	float getPointShadow( samplerCube 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		vec3 bd3D = normalize( lightToPosition );\n		vec3 absVec = abs( lightToPosition );\n		float viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z );\n		if ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) {\n			float dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) );\n			dp += shadowBias;\n			float depth = textureCube( shadowMap, bd3D ).r;\n			#ifdef USE_REVERSED_DEPTH_BUFFER\n				shadow = step( depth, dp );\n			#else\n				shadow = step( dp, depth );\n			#endif\n		}\n		return mix( 1.0, shadow, shadowIntensity );\n	}\n	#endif\n	#endif\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_L
38IGHT_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 && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) )\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;
38\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	);
38\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.diffuseContribution, material.specularColorBlended, 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				vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n				vec2 refractionCoords = ndcPos.xy / ndcPos.w;\n				refractionCoords += 1.0;\n				refractionCoords /= 2.0;\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		#else\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		#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;
38\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;
38\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	#ifdef USE_REVERSED_DEPTH_BUFFER\n		float fragCoordZ = vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ];\n	#else\n		float fragCoordZ = 0.5 * vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ] + 0.5;\n	#endif\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}",distance_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}",distance_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\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 <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 = vec4( dist, 0.0, 0.0, 1.0 );\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 <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_ve
38rtex>\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 <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( normalize( normal ) * 0.5 + 0.5, 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 <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;
38\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 <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 \n		outgoingLight = outgoingLight + sheenSpecularDirect + sheenSpecularIndirect;\n \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;
38\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 <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 <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}"},lV={common:{diffuse:{value:new nw(0xffffff)},opacity:{value:1},map:{value:null},mapTransform:{value:new e3},alphaMap:{value:null},alphaMapTransform:{value:new e3},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new e3}},envmap:{envMap:{value:null},envMapRotation:{value:new e3},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98},dfgLUT:{value:null}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new e3}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new e3}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new e3},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new e3},normalScale:{value:new eQ(1,1)}}
vendor: 7,635 bytes, line 38
38,displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new e3},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new e3}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new e3}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new e3}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new nw(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 nw(0xffffff)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new e3},alphaTest:{value:0},uvTransform:{value:new e3}},sprite:{diffuse:{value:new nw(0xffffff)},opacity:{value:1},center:{value:new eQ(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new e3},alphaMap:{value:null},alphaMapTransform:{value:new e3},alphaTest:{value:0}}},lG={basic:{uniforms:ia([lV.common,lV.specularmap,lV.envmap,lV.aomap,lV.lightmap,lV.fog]),vertexShader:lH.meshbasic_vert,fragmentShader:lH.meshbasic_frag},lambert:{uniforms:ia([lV.common,lV.specularmap,lV.envmap,lV.aomap,lV.lightmap,lV.emissivemap,lV.bumpmap,lV.normalmap,lV.displacementmap,lV.fog,lV.lights,{emissive:{value:new nw(0)}}]),vertexShader:lH.meshlambert_vert,fragmentShader:lH.meshlambert_frag},phong:{uniforms:ia([lV.common,lV.specularmap,lV.envmap,lV.aomap,lV.lightmap,lV.emissivemap,lV.bumpmap,lV.normalmap,lV.displacementmap,lV.fog,lV.lights,{emissive:{value:new nw(0)},specular:{value:new nw(1118481)},shininess:{value:30}}]),vertexShader:lH.meshphong_vert,fragmentShader:lH.meshphong_frag},standard:{uniforms:ia([lV.common,lV.envmap,lV.aomap,lV.lightmap,lV.emissivemap,lV.bumpmap,lV.normalmap,lV.displacementmap,lV.roughnessmap,lV.metalnessmap,lV.fog,lV.lights,{emissive:{value:new nw(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:lH.meshphysical_vert,fragmentShader:lH.meshphysical_frag},toon:{uniforms:ia([lV.common,lV.aomap,lV.lightmap,lV.emissivemap,lV.bumpmap,lV.normalmap,lV.displacementmap,lV.gradientmap,lV.fog,lV.lights,{emissive:{value:new nw(0)}}]),vertexShader:lH.meshtoon_vert,fragmentShader:lH.meshtoon_frag},matcap:{uniforms:ia([lV.common,lV.bumpmap,lV.normalmap,lV.displacementmap,lV.fog,{matcap:{value:null}}]),vertexShader:lH.meshmatcap_vert,fragmentShader:lH.meshmatcap_frag},points:{uniforms:ia([lV.points,lV.fog]),vertexShader:lH.points_vert,fragmentShader:lH.points_frag},dashed:{uniforms:ia([lV.common,lV.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:lH.linedashed_vert,fragmentShader:lH.linedashed_frag},depth:{uniforms:ia([lV.common,lV.displacementmap]),vertexShader:lH.depth_vert,fragmentShader:lH.depth_frag},normal:{uniforms:ia([lV.common,lV.bumpmap,lV.normalmap,lV.displacementmap,{opacity:{value:1}}]),vertexShader:lH.meshnormal_vert,fragmentShader:lH.meshnormal_frag},sprite:{uniforms:ia([lV.sprite,lV.fog]),vertexShader:lH.sprite_vert,fragmentShader:lH.sprite_frag},background:{uniforms:{uvTransform:{value:new e3},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:lH.background_vert,fragmentShader:lH.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new e3}},vertexShader:lH.backgroundCube_vert,fragmentShader:lH.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:lH.cube_vert,fragmentShader:lH.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:lH.equirect_vert,fragmentShader:lH.equirect_frag},distance:{uniforms:ia([lV.common,lV.displacementmap,{referencePosition:{value:new e0},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:lH.distance_vert,fragmentShader:lH.distance_frag},shadow:{uniforms:ia([lV.lights,lV.fog,{color:{value:new nw(0)},opacity:{value:1}}]),vertexShader:lH.shadow_vert,fragmentShader:lH.shadow_frag}};lG.physical={uniforms:ia([lG.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new e3},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new e3},clearcoatNormalScale:{value:new eQ(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new e3},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new e3},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new e3},sheen:{value:0},sheenColor:{value:new nw(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new e3},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new e3},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new e3},transmissionSamplerSize:{value:new eQ},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new e3},attenuationDistance:{value:0},attenuationColor:{value:new nw(0)},specularColor:{value:new nw(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new e3},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new e3},anisotropyVector:{value:new eQ},anisotropyMap:{value:null},anisotropyMapTransform:{value:new e3}}]),vertexShader:lH.meshphysical_vert,fragmentShader:lH.meshphysical_frag};let lj={r:0,b:0,g:0},lW=new tJ,lX=new tH;function lq(e,t,n,i,r,a,s){let o,l,u=new nw(0),c=+(!0!==a),d=null,h=0,p=null;function f(e){let i=!0===e.isScene?e.background:null;return i&&i.isTexture&&(i=(e.backgroundBlurriness>0?n:t).get(i)),i}function m(t,n){t.getRGB(lj,is(e)),i.buffers.color.setClear(lj.r,lj.g,lj.b,n,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 n=!1,r=f(t);null===r?m(u,c):r&&r.isColor&&(m(r,1),n=!0);let a=e.xr.getEnvironmentBlendMode();"additive"===a?i.buffers.color.setClear(0,0,0,1,s):"alpha-blend"===a&&i.buffers.color.setClear(0,0,0,0,s),(e.autoClear||n)&&(i.buffers.depth.setTest(!0),i.buffers.depth.setMask(!0),i.buffers.color.setMask(!0),e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil))},addToRenderList:function(t,n){let i=f(n);
38i&&(i.isCubeTexture||306===i.mapping)?(void 0===l&&((l=new ie(new ii(1,1,1),new il({name:"BackgroundCubeMaterial",uniforms:ir(lG.backgroundCube.uniforms),vertexShader:lG.backgroundCube.vertexShader,fragmentShader:lG.backgroundCube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1}))).geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(l)),lW.copy(n.backgroundRotation),lW.x*=-1,lW.y*=-1,lW.z*=-1,i.isCubeTexture&&!1===i.isRenderTargetTexture&&(lW.y*=-1,lW.z*=-1),l.material.uniforms.envMap.value=i,l.material.uniforms.flipEnvMap.value=i.isCubeTexture&&!1===i.isRenderTargetTexture?-1:1,l.material.uniforms.backgroundBlurriness.value=n.backgroundBlurriness,l.material.uniforms.backgroundIntensity.value=n.backgroundIntensity,l.material.uniforms.backgroundRotation.value.setFromMatrix4(lX.makeRotationFromEuler(lW)),l.material.toneMapped=e8.getTransfer(i.colorSpace)!==eS,(d!==i||h!==i.version||p!==e.toneMapping)&&(l.material.needsUpdate=!0,d=i,h=i.version,p=e.toneMapping),l.layers.enableAll(),t.unshift(l,l.geometry,l.material,0,0,null)):i&&i.isTexture&&(void 0===o&&((o=new ie(new a5(2,2),new il({name:"BackgroundMaterial",uniforms:ir(lG.background.uniforms),vertexShader:lG.background.vertexShader,fragmentShader:lG.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1}))).geometry.deleteAttribute("normal"),Object.defineProperty(o.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(o)),o.material.uniforms.t2D.value=i,o.material.uniforms.backgroundIntensity.value=n.backgroundIntensity,o.material.toneMapped=e8.getTransfer(i.colorSpace)!==eS,!0===i.matrixAutoUpdate&&i.updateMatrix(),o.material.uniforms.uvTransform.value.copy(i.matrix),(d!==i||h!==i.version||p!==e.toneMapping)&&(o.material.needsUpdate=!0,d=i,h=i.version,p=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(),l=void 0),void 0!==o&&(o.geometry.dispose(),o.material.dispose(),o=void 0)}}}function lY(e,t){let n=e.getParameter(e.MAX_VERTEX_ATTRIBS),i={},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=[],i=[],r=[];for(let e=0;e<n;e++)t[e]=0,i[e]=0,r[e]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:t,enabledAttributes:i,attributeDivisors:r,object:e,attributes:{},index:null}}function c(){let e=a.newAttributes;for(let t=0,n=e.length;t<n;t++)e[t]=0}function d(e){h(e,0)}function h(t,n){let i=a.newAttributes,r=a.enabledAttributes,s=a.attributeDivisors;i[t]=1,0===r[t]&&(e.enableVertexAttribArray(t),r[t]=1),s[t]!==n&&(e.vertexAttribDivisor(t,n),s[t]=n)}function p(){let t=a.newAttributes,n=a.enabledAttributes;for(let i=0,r=n.length;i<r;i++)n[i]!==t[i]&&(e.disableVertexAttribArray(i),n[i]=0)}function f(t,n,i,r,a,s,o){!0===o?e.vertexAttribIPointer(t,n,i,a,s):e.vertexAttribPointer(t,n,i,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(n,r,l,m,g){var v,y;let x,b,S,_,w=!1,M=(v=m,y=l,x=!0===r.wireframe,void 0===(b=i[v.id])&&(b={},i[v.id]=b),void 0===(S=b[y.id])&&(S={},b[y.id]=S),void 0===(_=S[x])&&(_=u(e.createVertexArray()),S[x]=_),_);a!==M&&o((a=M).object),(w=function(e,t,n,i){let r=a.attributes,s=t.attributes,o=0,l=n.getAttributes();for(let t in l)if(l[t].location>=0){let n=r[t],i=s[t];if(void 0===i&&("instanceMatrix"===t&&e.instanceMatrix&&(i=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(i=e.instanceColor)),void 0===n||n.attribute!==i||i&&n.data!==i.data)return!0;o++}return a.attributesNum!==o||a.index!==i}(n,m,l,g))&&function(e,t,n,i){let r={},s=t.attributes,o=0,l=n.getAttributes();for(let t in l)if(l[t].location>=0){let n=s[t];void 0===n&&("instanceMatrix"===t&&e.instanceMatrix&&(n=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(n=e.instanceColor));let i={};i.attribute=n,n&&n.data&&(i.data=n.data),r[t]=i,o++}a.attributes=r,a.attributesNum=o,a.index=i}(n,m,l,g),null!==g&&t.update(g,e.ELEMENT_ARRAY_BUFFER),(w||s)&&(s=!1,function(n,i,r,a){c();let s=a.attributes,o=r.getAttributes(),l=i.defaultAttributeValues;for(let i in o){let r=o[i];if(r.location>=0){let o=s[i];if(void 0===o&&("instanceMatrix"===i&&n.instanceMatrix&&(o=n.instanceMatrix),"instanceColor"===i&&n.instanceColor&&(o=n.instanceColor)),void 0!==o){let i=o.normalized,s=o.itemSize,l=t.get(o);if(void 0===l)continue;let u=l.buffer,c=l.type,p=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++)h(r.location+e,t.meshPerAttribute);!0!==n.isInstancedMesh&&void 0===a._maxInstanceCount&&(a._maxInstanceCount=t.meshPerAttribute*t.count)}else for(let e=0;e<r.locationSize;e++)d(r.location+e);e.bindBuffer(e.ARRAY_BUFFER,u);for(let e=0;e<r.locationSize;e++)f(r.location+e,s/r.locationSize,c,i,l*p,(g+s/r.locationSize*e)*p,m)}else{if(o.isInstancedBufferAttribute){for(let e=0;e<r.locationSize;e++)h(r.location+e,o.meshPerAttribute);!0!==n.isInstancedMesh&&void 0===a._maxInstanceCount&&(a._maxInstanceCount=o.meshPerAttribute*o.count)}
38else for(let e=0;e<r.locationSize;e++)d(r.location+e);e.bindBuffer(e.ARRAY_BUFFER,u);for(let e=0;e<r.locationSize;e++)f(r.location+e,s/r.locationSize,c,i,s*p,s/r.locationSize*e*p,m)}}else if(void 0!==l){let t=l[i];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)}}}}p()}(n,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(),i){let t=i[e];for(let e in t){let n=t[e];for(let e in n)l(n[e].object),delete n[e];delete t[e]}delete i[e]}},releaseStatesOfGeometry:function(e){if(void 0===i[e.id])return;let t=i[e.id];for(let e in t){let n=t[e];for(let e in n)l(n[e].object),delete n[e];delete t[e]}delete i[e.id]},releaseStatesOfProgram:function(e){for(let t in i){let n=i[t];if(void 0===n[e.id])continue;let r=n[e.id];for(let e in r)l(r[e].object),delete r[e];delete n[e.id]}},initAttributes:c,enableAttribute:d,disableUnusedAttributes:p}}function lZ(e,t,n){let i;function r(t,r,a){0!==a&&(e.drawArraysInstanced(i,t,r,a),n.update(r,i,a))}this.setMode=function(e){i=e},this.render=function(t,r){e.drawArrays(i,t,r),n.update(r,i,1)},this.renderInstances=r,this.renderMultiDraw=function(e,r,a){if(0===a)return;t.get("WEBGL_multi_draw").multiDrawArraysWEBGL(i,e,0,r,0,a);let s=0;for(let e=0;e<a;e++)s+=r[e];n.update(s,i,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]);
38else{l.multiDrawArraysInstancedWEBGL(i,e,0,a,0,o,0,s);let t=0;for(let e=0;e<s;e++)t+=a[e]*o[e];n.update(t,i,1)}}}function lK(e,t,n,i){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!==n.precision?n.precision:"highp",o=a(s);return o!==s&&(ek("WebGLRenderer:",s,"not supported, using",o,"instead."),s=o),{isWebGL2:!0,getMaxAnisotropy:function(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){let n=t.get("EXT_texture_filter_anisotropic");r=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:a,textureFormatReadable:function(t){return 1023===t||i.convert(t)===e.getParameter(e.IMPLEMENTATION_COLOR_READ_FORMAT)},textureTypeReadable:function(n){let r=n===ev&&(t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float"));return 1009===n||i.convert(n)===e.getParameter(e.IMPLEMENTATION_COLOR_READ_TYPE)||1015===n||!!r},precision:s,logarithmicDepthBuffer:!0===n.logarithmicDepthBuffer,reversedDepthBuffer:!0===n.reversedDepthBuffer&&t.has("EXT_clip_control"),maxTextures:e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),maxVertexTextures:e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),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),maxSamples:e.getParameter(e.MAX_SAMPLES),samples:e.getParameter(e.SAMPLES)}}function lJ(e){let t=this,n=null,i=0,r=!1,a=!1,s=new rl,o=new e3,l={value:null,needsUpdate:!1};function u(e,n,i,r){let a=null!==e?e.length:0,u=null;if(0!==a){if(u=l.value,!0!==r||null===u){let t=i+4*a,r=n.matrixWorldInverse;o.getNormalMatrix(r),(null===u||u.length<t)&&(u=new Float32Array(t));for(let t=0,n=i;t!==a;++t,n+=4)s.copy(e[t]).applyMatrix4(r,o),s.normal.toArray(u,n),u[n+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 n=0!==e.length||t||0!==i||r;return r=t,i=e.length,n},this.beginShadows=function(){a=!0,u(null)},this.endShadows=function(){a=!1},this.setGlobalState=function(e,t){n=u(e,t,0)},this.setState=function(s,o,c){let d=s.clippingPlanes,h=s.clipIntersection,p=s.clipShadows,f=e.get(s);if(r&&null!==d&&0!==d.length&&(!a||p)){let e=a?0:i,t=4*e,r=f.clippingState||null;l.value=r,r=u(d,o,t,c);for(let e=0;e!==t;++e)r[e]=n[e];f.clippingState=r,this.numIntersection=h?this.numPlanes:0,this.numPlanes+=e}else a?u(null):(l.value!==n&&(l.value=n,l.needsUpdate=i>0),t.numPlanes=i,t.numIntersection=0)}}function lQ(e){let t=new WeakMap;function n(e,t){return 303===t?e.mapping=301:304===t&&(e.mapping=302),e}function i(e){let n=e.target;n.removeEventListener("dispose",i);let r=t.get(n);void 0!==r&&(t.delete(n),r.dispose())}return{get:function(r){if(r&&r.isTexture){let a=r.mapping;if(303===a||304===a)if(t.has(r))return n(t.get(r).texture,r.mapping);else{let a=r.image;if(!a||!(a.height>0))return null;{let s=new iv(a.height);return s.fromEquirectangularTexture(e,r),t.set(r,s),r.addEventListener("dispose",i),n(s.texture,r.mapping)}}}return r},dispose:function(){t=new WeakMap}}}let l$=[.125,.215,.35,.446,.526,.582],l0=new s6,l1=new nw,l2=null,l3=0,l4=0,l5=!1,l6=new e0;class l8{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._sizeLods=[],this._sigmas=[],this._lodMeshes=[],this._backgroundBox=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._blurMaterial=null,this._ggxMaterial=null}fromScene(e,t=0,n=.1,i=100,r={}){let{size:a=256,position:s=l6}=r;l2=this._renderer.getRenderTarget(),l3=this._renderer.getActiveCubeFace(),l4=this._renderer.getActiveMipmapLevel(),l5=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(a);let o=this._allocateTargets();return o.depthBuffer=!0,this._sceneToCubeUV(e,n,i,o,s),t>0&&this._blur(o,0,0,t),this._applyPMREM(o),this._cleanup(o),o}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=ut(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=ue(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose(),null!==this._backgroundBox&&(this._backgroundBox.geometry.dispose(),this._backgroundBox.material.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._ggxMaterial&&this._ggxMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodMeshes.length;e++)this._lodMeshes[e].geometry.dispose()}_cleanup(e){this._renderer.setRenderTarget(l2,l3,l4),this._renderer.xr.enabled=l5,e.scissorTest=!1,l7(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),l2=this._renderer.getRenderTarget(),l3=this._renderer.getActiveCubeFace(),l4=this._renderer.getActiveMipmapLevel(),l5=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;let n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){let e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,n={magFilter:1006,minFilter:1006,generateMipmaps:!1,type:ev,format:1023,colorSpace:ex,depthBuffer:!1},i=l9(e,t,n);if(null===this._pingPongRenderTarget||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){var r,a;null!==this._pingPongRenderTarget&&this._dispose(),this._pingPongRenderTarget=l9(e,t,n);let{_lodMax:i}=this;({lodMeshes:this._lodMeshes,sizeLods:this._sizeLods,sigmas:this._sigmas}=function(e){let t=[],n=[],i=[],r=e,a=e-4+1+l$.length;for(let s=0;s<a;s++){let a=Math.pow(2,r);t.push(a);let o=1/a;s>e-4?o=l$[s-e+4-1]:0===s&&(o=0),n.push(o);let l=1/(a-2),u=-l,c=1+l,d=[u,u,c,u,c,c,u,u,c,c,u,c],h=new Float32Array(108),p=new Float32Array(72),f=new Float32Array(36);for(let e=0;e<6;e++){let t=e%3*2/3-1,n=e>2?0:-1,i=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];
38h.set(i,18*e),p.set(d,12*e);let r=[e,e,e,e,e,e];f.set(r,6*e)}let m=new nQ;m.setAttribute("position",new nN(h,3)),m.setAttribute("uv",new nN(p,2)),m.setAttribute("faceIndex",new nN(f,1)),i.push(new ie(m,null)),r>4&&r--}return{lodMeshes:i,sizeLods:t,sigmas:n}}(i)),this._blurMaterial=(r=i,new il({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 e0(0,1,0)}},vertexShader:un(),fragmentShader:`
39
40			precision mediump float;
41			precision mediump int;
42
43			varying vec3 vOutputDirection;
44
45			uniform sampler2D envMap;
46			uniform int samples;
47			uniform float weights[ n ];
48			uniform bool latitudinal;
49			uniform float dTheta;
50			uniform float mipInt;
51			uniform vec3 poleAxis;
52
53			#define ENVMAP_TYPE_CUBE_UV
54			#include <cube_uv_reflection_fragment>
55
56			vec3 getSample( float theta, vec3 axis ) {
57
58				float cosTheta = cos( theta );
59				// Rodrigues' axis-angle rotation
60				vec3 sampleDirection = vOutputDirection * cosTheta
61					+ cross( axis, vOutputDirection ) * sin( theta )
62					+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );
63
64				return bilinearCubeUV( envMap, sampleDirection, mipInt );
65
66			}
67
68			void main() {
69
70				vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );
71
72				if ( all( equal( axis, vec3( 0.0 ) ) ) ) {
73
74					axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );
75
76				}
77
78				axis = normalize( axis );
79
80				gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );
81				gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );
82
83				for ( int i = 1; i < n; i++ ) {
84
85					if ( i >= samples ) {
86
87						break;
88
89					}
90
91					float theta = dTheta * float( i );
92					gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );
93					gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );
94
95				}
96
97			}
98		`,blending:0,depthTest:!1,depthWrite:!1})),this._ggxMaterial=(a=i,new il({name:"PMREMGGXConvolution",defines:{GGX_SAMPLES:256,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${a}.0`},uniforms:{envMap:{value:null},roughness:{value:0},mipInt:{value:0}},vertexShader:un(),fragmentShader:`
99
100			precision highp float;
101			precision highp int;
102
103			varying vec3 vOutputDirection;
104
105			uniform sampler2D envMap;
106			uniform float roughness;
107			uniform float mipInt;
108
109			#define ENVMAP_TYPE_CUBE_UV
110			#include <cube_uv_reflection_fragment>
111
112			#define PI 3.14159265359
113
114			// Van der Corput radical inverse
115			float radicalInverse_VdC(uint bits) {
116				bits = (bits << 16u) | (bits >> 16u);
117				bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u);
118				bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u);
119				bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u);
120				bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u);
121				return float(bits) * 2.3283064365386963e-10; // / 0x100000000
122			}
123
124			// Hammersley sequence
125			vec2 hammersley(uint i, uint N) {
126				return vec2(float(i) / float(N), radicalInverse_VdC(i));
127			}
128
129			// GGX VNDF importance sampling (Eric Heitz 2018)
130			// "Sampling the GGX Distribution of Visible Normals"
131			// https://jcgt.org/published/0007/04/01/
132			vec3 importanceSampleGGX_VNDF(vec2 Xi, vec3 V, float roughness) {
133				float alpha = roughness * roughness;
134
135				// Section 3.2: Transform view direction to hemisphere configuration
136				vec3 Vh = normalize(vec3(alpha * V.x, alpha * V.y, V.z));
137
138				// Section 4.1: Orthonormal basis
139				float lensq = Vh.x * Vh.x + Vh.y * Vh.y;
140				vec3 T1 = lensq > 0.0 ? vec3(-Vh.y, Vh.x, 0.0) / sqrt(lensq) : vec3(1.0, 0.0, 0.0);
141				vec3 T2 = cross(Vh, T1);
142
143				// Section 4.2: Parameterization of projected area
144				float r = sqrt(Xi.x);
145				float phi = 2.0 * PI * Xi.y;
146				float t1 = r * cos(phi);
147				float t2 = r * sin(phi);
148				float s = 0.5 * (1.0 + Vh.z);
149				t2 = (1.0 - s) * sqrt(1.0 - t1 * t1) + s * t2;
150
151				// Section 4.3: Reprojection onto hemisphere
152				vec3 Nh = t1 * T1 + t2 * T2 + sqrt(max(0.0, 1.0 - t1 * t1 - t2 * t2)) * Vh;
153
154				// Section 3.4: Transform back to ellipsoid configuration
155				return normalize(vec3(alpha * Nh.x, alpha * Nh.y, max(0.0, Nh.z)));
156			}
157
158			void main() {
159				vec3 N = normalize(vOutputDirection);
160				vec3 V = N; // Assume view direction equals normal for pre-filtering
161
162				vec3 prefilteredColor = vec3(0.0);
163				float totalWeight = 0.0;
164
165				// For very low roughness, just sample the environment directly
166				if (roughness < 0.001) {
167					gl_FragColor = vec4(bilinearCubeUV(envMap, N, mipInt), 1.0);
168					return;
169				}
170
171				// Tangent space basis for VNDF sampling
172				vec3 up = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);
173				vec3 tangent = normalize(cross(up, N));
174				vec3 bitangent = cross(N, tangent);
175
176				for(uint i = 0u; i < uint(GGX_SAMPLES); i++) {
177					vec2 Xi = hammersley(i, uint(GGX_SAMPLES));
178
179					// For PMREM, V = N, so in tangent space V is always (0, 0, 1)
180					vec3 H_tangent = importanceSampleGGX_VNDF(Xi, vec3(0.0, 0.0, 1.0), roughness);
181
182					// Transform H back to world space
183					vec3 H = normalize(tangent * H_tangent.x + bitangent * H_tangent.y + N * H_tangent.z);
184					vec3 L = normalize(2.0 * dot(V, H) * H - V);
185
186					float NdotL = max(dot(N, L), 0.0);
187
188					if(NdotL > 0.0) {
189						// Sample environment at fixed mip level
190						// VNDF importance sampling handles the distribution filtering
191						vec3 sampleColor = bilinearCubeUV(envMap, L, mipInt);
192
193						// Weight by NdotL for the split-sum approximation
194						// VNDF PDF naturally accounts for the visible microfacet distribution
195						prefilteredColor += sampleColor * NdotL;
196						totalWeight += NdotL;
197					}
198				}
199
200				if (totalWeight > 0.0) {
201					prefilteredColor = prefilteredColor / totalWeight;
202				}
203
204				gl_FragColor = vec4(prefilteredColor, 1.0);
205			}
206		`,blending:0,depthTest:!1,depthWrite:!1}))}return i}_compileMaterial(e){let t=new ie(new nQ,e);this._renderer.compile(t,l0)}_sceneToCubeUV(e,t,n,i,r){let a=new ip(90,1,t,n),s=[1,-1,1,1,1,1],o=[1,1,1,-1,-1,-1],l=this._renderer,u=l.autoClear,c=l.toneMapping;l.getClearColor(l1),l.toneMapping=0,l.autoClear=!1,l.state.buffers.depth.getReversed()&&(l.setRenderTarget(i),l.clearDepth(),l.setRenderTarget(null)),null===this._backgroundBox&&(this._backgroundBox=new ie(new ii,new nA({name:"PMREM.Backgroun
206d",side:1,depthWrite:!1,depthTest:!1})));let d=this._backgroundBox,h=d.material,p=!1,f=e.background;f?f.isColor&&(h.color.copy(f),e.background=null,p=!0):(h.color.copy(l1),p=!0);for(let t=0;t<6;t++){let n=t%3;0===n?(a.up.set(0,s[t],0),a.position.set(r.x,r.y,r.z),a.lookAt(r.x+o[t],r.y,r.z)):1===n?(a.up.set(0,0,s[t]),a.position.set(r.x,r.y,r.z),a.lookAt(r.x,r.y+o[t],r.z)):(a.up.set(0,s[t],0),a.position.set(r.x,r.y,r.z),a.lookAt(r.x,r.y,r.z+o[t]));let u=this._cubeSize;l7(i,n*u,t>2?u:0,u,u),l.setRenderTarget(i),p&&l.render(d,a),l.render(e,a)}l.toneMapping=c,l.autoClear=u,e.background=f}_textureToCubeUV(e,t){let n=this._renderer,i=301===e.mapping||302===e.mapping;i?(null===this._cubemapMaterial&&(this._cubemapMaterial=ut()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=ue());let r=i?this._cubemapMaterial:this._equirectMaterial,a=this._lodMeshes[0];a.material=r,r.uniforms.envMap.value=e;let s=this._cubeSize;l7(t,0,0,3*s,2*s),n.setRenderTarget(t),n.render(a,l0)}_applyPMREM(e){let t=this._renderer,n=t.autoClear;t.autoClear=!1;let i=this._lodMeshes.length;for(let t=1;t<i;t++)this._applyGGXFilter(e,t-1,t);t.autoClear=n}_applyGGXFilter(e,t,n){let i=this._renderer,r=this._pingPongRenderTarget,a=this._ggxMaterial,s=this._lodMeshes[n];s.material=a;let o=a.uniforms,l=n/(this._lodMeshes.length-1),u=t/(this._lodMeshes.length-1),c=Math.sqrt(l*l-u*u),{_lodMax:d}=this,h=this._sizeLods[n],p=3*h*(n>d-4?n-d+4:0),f=4*(this._cubeSize-h);o.envMap.value=e.texture,o.roughness.value=c*(0+1.25*l),o.mipInt.value=d-t,l7(r,p,f,3*h,2*h),i.setRenderTarget(r),i.render(s,l0),o.envMap.value=r.texture,o.roughness.value=0,o.mipInt.value=d-n,l7(e,p,f,3*h,2*h),i.setRenderTarget(e),i.render(s,l0)}_blur(e,t,n,i,r){let a=this._pingPongRenderTarget;this._halfBlur(e,a,t,n,i,"latitudinal",r),this._halfBlur(a,e,n,n,i,"longitudinal",r)}_halfBlur(e,t,n,i,r,a,s){let o=this._renderer,l=this._blurMaterial;"latitudinal"!==a&&"longitudinal"!==a&&eB("blur direction must be either latitudinal or longitudinal!");let u=this._lodMeshes[i];u.material=l;let c=l.uniforms,d=this._sizeLods[n]-1,h=isFinite(r)?Math.PI/(2*d):2*Math.PI/39,p=r/h,f=isFinite(r)?1+Math.floor(3*p):20;f>20&&ek(`sigmaRadians, ${r}, is too large and will clip, as it requested ${f} samples when the maximum is set to 20`);let m=[],g=0;for(let e=0;e<20;++e){let t=e/p,n=Math.exp(-t*t/2);m.push(n),0===e?g+=n:e<f&&(g+=2*n)}for(let e=0;e<m.length;e++)m[e]=m[e]/g;c.envMap.value=e.texture,c.samples.value=f,c.weights.value=m,c.latitudinal.value="latitudinal"===a,s&&(c.poleAxis.value=s);let{_lodMax:v}=this;c.dTheta.value=h,c.mipInt.value=v-n;let y=this._sizeLods[i],x=4*(this._cubeSize-y);l7(t,3*y*(i>v-4?i-v+4:0),x,3*y,2*y),o.setRenderTarget(t),o.render(u,l0)}}function l9(e,t,n){let i=new tu(e,t,n);return i.texture.mapping=306,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function l7(e,t,n,i,r){e.viewport.set(t,n,i,r),e.scissor.set(t,n,i,r)}function ue(){return new il({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:un(),fragmentShader:`
207
208			precision mediump float;
209			precision mediump int;
210
211			varying vec3 vOutputDirection;
212
213			uniform sampler2D envMap;
214
215			#include <common>
216
217			void main() {
218
219				vec3 outputDirection = normalize( vOutputDirection );
220				vec2 uv = equirectUv( outputDirection );
221
222				gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );
223
224			}
225		`,blending:0,depthTest:!1,depthWrite:!1})}function ut(){return new il({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:un(),fragmentShader:`
226
227			precision mediump float;
228			precision mediump int;
229
230			uniform float flipEnvMap;
231
232			varying vec3 vOutputDirection;
233
234			uniform samplerCube envMap;
235
236			void main() {
237
238				gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );
239
240			}
241		`,blending:0,depthTest:!1,depthWrite:!1})}function un(){return`
242
243		precision mediump float;
244		precision mediump int;
245
246		attribute float faceIndex;
247
248		varying vec3 vOutputDirection;
249
250		// RH coordinate system; PMREM face-indexing convention
251		vec3 getDirection( vec2 uv, float face ) {
252
253			uv = 2.0 * uv - 1.0;
254
255			vec3 direction = vec3( uv, 1.0 );
256
257			if ( face == 0.0 ) {
258
259				direction = direction.zyx; // ( 1, v, u ) pos x
260
261			} else if ( face == 1.0 ) {
262
263				direction = direction.xzy;
264				direction.xz *= -1.0; // ( -u, 1, -v ) pos y
265
266			} else if ( face == 2.0 ) {
267
268				direction.x *= -1.0; // ( -u, v, 1 ) pos z
269
270			} else if ( face == 3.0 ) {
271
272				direction = direction.zyx;
273				direction.xz *= -1.0; // ( -1, v, -u ) neg x
274
275			} else if ( face == 4.0 ) {
276
277				direction = direction.xzy;
278				direction.xy *= -1.0; // ( -u, -1, v ) neg y
279
280			} else if ( face == 5.0 ) {
281
282				direction.z *= -1.0; // ( u, v, -1 ) neg z
283
284			}
285
286			return direction;
287
288		}
289
290		void main() {
291
292			vOutputDirection = getDirection( uv, faceIndex );
293			gl_Position = vec4( position, 1.0 );
294
295		}
296	`}function ui(e){let t=new WeakMap,n=null;function i(e){let n=e.target;n.removeEventListener("dispose",i);let r=t.get(n);void 0!==r&&(t.delete(n),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===n&&(n=new l8(e)),(a=s?n.fromEquirectangular(r,a):n.fromCubemap(r,a)).texture.pmremVersion=r.pmremVersion,t.set(r,a),a.texture;{if(void 0!==a)return a.texture;
296let l=r.image;return s&&l&&l.height>0||o&&l&&function(e){let t=0;for(let n=0;n<6;n++)void 0!==e[n]&&t++;return 6===t}(l)?(null===n&&(n=new l8(e)),(a=s?n.fromEquirectangular(r):n.fromCubemap(r)).texture.pmremVersion=r.pmremVersion,t.set(r,a),r.addEventListener("dispose",i),a.texture):null}}}return r},dispose:function(){t=new WeakMap,null!==n&&(n.dispose(),n=null)}}}function ur(e){let t={};function n(n){if(void 0!==t[n])return t[n];let i=e.getExtension(n);return t[n]=i,i}return{has:function(e){return null!==n(e)},init:function(){n("EXT_color_buffer_float"),n("WEBGL_clip_cull_distance"),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float"),n("WEBGL_multisampled_render_to_texture"),n("WEBGL_render_shared_exponent")},get:function(e){let t=n(e);return null===t&&eO("WebGLRenderer: "+e+" extension not supported."),t}}}function ua(e,t,n,i){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)),i.releaseStatesOfGeometry(o),!0===o.isInstancedBufferGeometry&&delete o._maxInstanceCount,n.memory.geometries--}function o(e){let n=[],i=e.index,r=e.attributes.position,s=0;if(null!==i){let e=i.array;s=i.version;for(let t=0,i=e.length;t<i;t+=3){let i=e[t+0],r=e[t+1],a=e[t+2];n.push(i,r,r,a,a,i)}}else{if(void 0===r)return;let e=r.array;s=r.version;for(let t=0,i=e.length/3-1;t<i;t+=3){let e=t+0,i=t+1,r=t+2;n.push(e,i,i,r,r,e)}}let o=new(eE(n)?nV:nz)(n,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,n.memory.geometries++),t},update:function(n){let i=n.attributes;for(let n in i)t.update(i[n],e.ARRAY_BUFFER)},getWireframeAttribute:function(e){let t=a.get(e);if(t){let n=e.index;null!==n&&t.version<n.version&&o(e)}else o(e);return a.get(e)}}}function us(e,t,n){let i,r,a;function s(t,s,o){0!==o&&(e.drawElementsInstanced(i,s,r,t*a,o),n.update(s,i,o))}this.setMode=function(e){i=e},this.setIndex=function(e){r=e.type,a=e.bytesPerElement},this.render=function(t,s){e.drawElements(i,s,r,t*a),n.update(s,i,1)},this.renderInstances=s,this.renderMultiDraw=function(e,a,s){if(0===s)return;t.get("WEBGL_multi_draw").multiDrawElementsWEBGL(i,a,0,r,e,0,s);let o=0;for(let e=0;e<s;e++)o+=a[e];n.update(o,i,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(i,o,0,r,e,0,u,0,l);let t=0;for(let e=0;e<l;e++)t+=o[e]*u[e];n.update(t,i,1)}}}function uo(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(n,i,r){switch(t.calls++,i){case e.TRIANGLES:t.triangles+=n/3*r;break;case e.LINES:t.lines+=n/2*r;break;case e.LINE_STRIP:t.lines+=r*(n-1);break;case e.LINE_LOOP:t.lines+=r*n;break;case e.POINTS:t.points+=r*n;break;default:eB("WebGLInfo: Unknown draw mode:",i)}}}}function ul(e,t,n){let i=new WeakMap,r=new to;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,d=i.get(s);if(void 0===d||d.count!==c){void 0!==d&&d.texture.dispose();let e=void 0!==s.morphAttributes.position,n=void 0!==s.morphAttributes.normal,a=void 0!==s.morphAttributes.color,o=s.morphAttributes.position||[],l=s.morphAttributes.normal||[],u=s.morphAttributes.color||[],h=0;!0===e&&(h=1),!0===n&&(h=2),!0===a&&(h=3);let p=s.attributes.position.count*h,f=1;p>t.maxTextureSize&&(f=Math.ceil(p/t.maxTextureSize),p=t.maxTextureSize);let m=new Float32Array(p*f*4*c),g=new tc(m,p,f,c);g.type=1015,g.needsUpdate=!0;let v=4*h;for(let t=0;t<c;t++){let i=o[t],s=l[t],c=u[t],d=p*f*4*t;for(let t=0;t<i.count;t++){let o=t*v;!0===e&&(r.fromBufferAttribute(i,t),m[d+o+0]=r.x,m[d+o+1]=r.y,m[d+o+2]=r.z,m[d+o+3]=0),!0===n&&(r.fromBufferAttribute(s,t),m[d+o+4]=r.x,m[d+o+5]=r.y,m[d+o+6]=r.z,m[d+o+7]=0),!0===a&&(r.fromBufferAttribute(c,t),m[d+o+8]=r.x,m[d+o+9]=r.y,m[d+o+10]=r.z,m[d+o+11]=4===c.itemSize?r.w:1)}}d={count:c,texture:g,size:new eQ(p,f)},i.set(s,d),s.addEventListener("dispose",function e(){g.dispose(),i.delete(s),s.removeEventListener("dispose",e)})}if(!0===a.isInstancedMesh&&null!==a.morphTexture)o.getUniforms().setValue(e,"morphTexture",a.morphTexture,n);else{let t=0;for(let e=0;e<l.length;e++)t+=l[e];let n=s.morphTargetsRelative?1:1-t;o.getUniforms().setValue(e,"morphTargetBaseInfluence",n),o.getUniforms().setValue(e,"morphTargetInfluences",l)}o.getUniforms().setValue(e,"morphTargetsTexture",d.texture,n),o.getUniforms().setValue(e,"morphTargetsTextureSize",d.size)}}}function uu(e,t,n,i){let r=new WeakMap;function a(e){let t=e.target;t.removeEventListener("dispose",a),n.remove(t.instanceMatrix),null!==t.instanceColor&&n.remove(t.instanceColor)}return{update:function(s){let o=i.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&&(n.update(s.instanceMatrix,e.ARRAY_BUFFER),null!==s.instanceColor&&n.update(s.instanceColor,e.ARRAY_BUFFER),r.set(s,o))),s.isSkinnedMesh){let e=s.skeleton;
vendor: 7,153 bytes, lines 296-342
296r.get(e)!==o&&(e.update(),r.set(e,o))}return u},dispose:function(){r=new WeakMap}}}let uc={1:"LINEAR_TONE_MAPPING",2:"REINHARD_TONE_MAPPING",3:"CINEON_TONE_MAPPING",4:"ACES_FILMIC_TONE_MAPPING",6:"AGX_TONE_MAPPING",7:"NEUTRAL_TONE_MAPPING",5:"CUSTOM_TONE_MAPPING"};function ud(e,t,n,i,r){let a,s=new tu(t,n,{type:e,depthBuffer:i,stencilBuffer:r}),o=new tu(t,n,{type:ev,depthBuffer:!1,stencilBuffer:!1}),l=new nQ;l.setAttribute("position",new nj([-1,3,0,-1,-1,0,3,-1,0],3)),l.setAttribute("uv",new nj([0,2,0,0,2,0],2));let u=new so({uniforms:{tDiffuse:{value:null}},vertexShader:`
297			precision highp float;
298
299			uniform mat4 modelViewMatrix;
300			uniform mat4 projectionMatrix;
301
302			attribute vec3 position;
303			attribute vec2 uv;
304
305			varying vec2 vUv;
306
307			void main() {
308				vUv = uv;
309				gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
310			}`,fragmentShader:`
311			precision highp float;
312
313			uniform sampler2D tDiffuse;
314
315			varying vec2 vUv;
316
317			#include <tonemapping_pars_fragment>
318			#include <colorspace_pars_fragment>
319
320			void main() {
321				gl_FragColor = texture2D( tDiffuse, vUv );
322
323				#ifdef LINEAR_TONE_MAPPING
324					gl_FragColor.rgb = LinearToneMapping( gl_FragColor.rgb );
325				#elif defined( REINHARD_TONE_MAPPING )
326					gl_FragColor.rgb = ReinhardToneMapping( gl_FragColor.rgb );
327				#elif defined( CINEON_TONE_MAPPING )
328					gl_FragColor.rgb = CineonToneMapping( gl_FragColor.rgb );
329				#elif defined( ACES_FILMIC_TONE_MAPPING )
330					gl_FragColor.rgb = ACESFilmicToneMapping( gl_FragColor.rgb );
331				#elif defined( AGX_TONE_MAPPING )
332					gl_FragColor.rgb = AgXToneMapping( gl_FragColor.rgb );
333				#elif defined( NEUTRAL_TONE_MAPPING )
334					gl_FragColor.rgb = NeutralToneMapping( gl_FragColor.rgb );
335				#elif defined( CUSTOM_TONE_MAPPING )
336					gl_FragColor.rgb = CustomToneMapping( gl_FragColor.rgb );
337				#endif
338
339				#ifdef SRGB_TRANSFER
340					gl_FragColor = sRGBTransferOETF( gl_FragColor );
341				#endif
342			}`,depthTest:!1,depthWrite:!1}),c=new ie(l,u),d=new s6(-1,1,1,-1,0,1),h=null,p=null,f=!1,m=null,g=[],v=!1;this.setSize=function(e,t){s.setSize(e,t),o.setSize(e,t);for(let n=0;n<g.length;n++){let i=g[n];i.setSize&&i.setSize(e,t)}},this.setEffects=function(e){v=(g=e).length>0&&!0===g[0].isRenderPass;let t=s.width,n=s.height;for(let e=0;e<g.length;e++){let i=g[e];i.setSize&&i.setSize(t,n)}},this.begin=function(e,t){if(f||0===e.toneMapping&&0===g.length)return!1;if(m=t,null!==t){let e=t.width,n=t.height;(s.width!==e||s.height!==n)&&this.setSize(e,n)}return!1===v&&e.setRenderTarget(s),a=e.toneMapping,e.toneMapping=0,!0},this.hasRenderPass=function(){return v},this.end=function(e,t){e.toneMapping=a,f=!0;let n=s,i=o;for(let r=0;r<g.length;r++){let a=g[r];if(!1!==a.enabled&&(a.render(e,i,n,t),!1!==a.needsSwap)){let e=n;n=i,i=e}}if(h!==e.outputColorSpace||p!==e.toneMapping){h=e.outputColorSpace,p=e.toneMapping,u.defines={},e8.getTransfer(h)===eS&&(u.defines.SRGB_TRANSFER="");let t=uc[p];t&&(u.defines[t]=""),u.needsUpdate=!0}u.uniforms.tDiffuse.value=n.texture,e.setRenderTarget(m),e.render(c,d),m=null,f=!1},this.isCompositing=function(){return f},this.dispose=function(){s.dispose(),o.dispose(),l.dispose(),u.dispose()}}let uh=new ts,up=new r8(1,1),uf=new tc,um=new th,ug=new ig,uv=[],uy=[],ux=new Float32Array(16),ub=new Float32Array(9),uS=new Float32Array(4);function u_(e,t,n){let i=e[0];if(i<=0||i>0)return e;let r=t*n,a=uv[r];if(void 0===a&&(a=new Float32Array(r),uv[r]=a),0!==t){i.toArray(a,0);for(let i=1,r=0;i!==t;++i)r+=n,e[i].toArray(a,r)}return a}function uw(e,t){if(e.length!==t.length)return!1;for(let n=0,i=e.length;n<i;n++)if(e[n]!==t[n])return!1;return!0}function uM(e,t){for(let n=0,i=t.length;n<i;n++)e[n]=t[n]}function uT(e,t){let n=uy[t];void 0===n&&(n=new Int32Array(t),uy[t]=n);for(let i=0;i!==t;++i)n[i]=e.allocateTextureUnit();return n}function uE(e,t){let n=this.cache;n[0]!==t&&(e.uniform1f(this.addr,t),n[0]=t)}function uA(e,t){let n=this.cache;if(void 0!==t.x)(n[0]!==t.x||n[1]!==t.y)&&(e.uniform2f(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(uw(n,t))return;e.uniform2fv(this.addr,t),uM(n,t)}}function uC(e,t){let n=this.cache;if(void 0!==t.x)(n[0]!==t.x||n[1]!==t.y||n[2]!==t.z)&&(e.uniform3f(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else if(void 0!==t.r)(n[0]!==t.r||n[1]!==t.g||n[2]!==t.b)&&(e.uniform3f(this.addr,t.r,t.g,t.b),n[0]=t.r,n[1]=t.g,n[2]=t.b);else{if(uw(n,t))return;e.uniform3fv(this.addr,t),uM(n,t)}}function uP(e,t){let n=this.cache;if(void 0!==t.x)(n[0]!==t.x||n[1]!==t.y||n[2]!==t.z||n[3]!==t.w)&&(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(uw(n,t))return;e.uniform4fv(this.addr,t),uM(n,t)}}function uR(e,t){let n=this.cache,i=t.elements;if(void 0===i){if(uw(n,t))return;e.uniformMatrix2fv(this.addr,!1,t),uM(n,t)}else{if(uw(n,i))return;uS.set(i),e.uniformMatrix2fv(this.addr,!1,uS),uM(n,i)}}function uI(e,t){let n=this.cache,i=t.elements;if(void 0===i){if(uw(n,t))return;e.uniformMatrix3fv(this.addr,!1,t),uM(n,t)}else{if(uw(n,i))return;ub.set(i),e.uniformMatrix3fv(this.addr,!1,ub),uM(n,i)}}function uD(e,t){let n=this.cache,i=t.elements;if(void 0===i){if(uw(n,t))return;e.uniformMatrix4fv(this.addr,!1,t),uM(n,t)}else{if(uw(n,i))return;ux.set(i),e.uniformMatrix4fv(this.addr,!1,ux),uM(n,i)}}function uL(e,t){let n=this.cache;n[0]!==t&&(e.uniform1i(this.addr,t),n[0]=t)}function uF(e,t){let n=this.cache;if(void 0!==t.x)(n[0]!==t.x||n[1]!==t.y)&&(e.uniform2i(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(uw(n,t))return;e.uniform2iv(this.addr,t),uM(n,t)}}function uN(e,t){let n=this.cache;if(void 0!==t.x)(n[0]!==t.x||n[1]!==t.y||n[2]!==t.z)&&(e.uniform3i(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else{if(uw(n,t))return;e.uniform3iv(this.addr,t),uM(n,t)}}function uU(e,t){let n=this.cache;if(void 0!==t.x)(n[0]!==t.x||n[1]!==t.y||n[2]!==t.z||n[3]!==t.w)&&(e.uniform4i(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(uw(n,t))return;e.uniform4iv(this.addr,t),uM(n,t)}}function uk(e,t){let n=this.cache;n[0]!==t&&(e.uniform1ui(this.addr,t),n[0]=t)}function uB(e,t){let n=this.cache;if(void 0!==t.x)(n[0]!==t.x||n[1]!==t.y)&&(e.uniform2ui(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(uw(n,t))return;e.uniform2uiv(this.addr,t),uM(n,t)}}function uO(e,t){let n=this.cache;if(void 0!==t.x)(n[0]!==t.x||n[1]!==t.y||n[2]!==t.z)&&(e.uniform3ui(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else{if(uw(n,t))return;e.uniform3uiv(this.addr,t),uM(n,t)}}function uz(e,t){let n=this.cache;if(void 0!==t.x)(n[0]!==t.x||n[1]!==t.y||n[2]!==t.z||n[3]!==t.w)&&(e.uniform4ui(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(uw(n,t))return;e.uniform4uiv(this.addr,t),uM(n,t)}}function uH(e,t,n){let i,r=this.cache,a=n.allocateTextureUnit();r[0]!==a&&(e.uniform1i(this.addr,a),r[0]=a),this.type===e.SAMPLER_2D_SHADOW?(up.compareFunction=n.isReversedDepthBuffer()?518:515,i=up):i=uh,n.setTexture2D(t||i,a)}function uV(e,t,n){let i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(e.uniform1i(this.addr,r),i[0]=r),n.setTexture3D(t||um,r)}function uG(e,t,n){let i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(e.uniform1i(this.addr,r),i[0]=r),n.setTextureCube(t||ug,r)}
342function uj(e,t,n){let i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(e.uniform1i(this.addr,r),i[0]=r),n.setTexture2DArray(t||uf,r)}function uW(e,t){e.uniform1fv(this.addr,t)}function uX(e,t){let n=u_(t,this.size,2);e.uniform2fv(this.addr,n)}function uq(e,t){let n=u_(t,this.size,3);e.uniform3fv(this.addr,n)}function uY(e,t){let n=u_(t,this.size,4);e.uniform4fv(this.addr,n)}function uZ(e,t){let n=u_(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,n)}function uK(e,t){let n=u_(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,n)}function uJ(e,t){let n=u_(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,n)}function uQ(e,t){e.uniform1iv(this.addr,t)}function u$(e,t){e.uniform2iv(this.addr,t)}function u0(e,t){e.uniform3iv(this.addr,t)}function u1(e,t){e.uniform4iv(this.addr,t)}function u2(e,t){e.uniform1uiv(this.addr,t)}function u3(e,t){e.uniform2uiv(this.addr,t)}function u4(e,t){e.uniform3uiv(this.addr,t)}function u5(e,t){e.uniform4uiv(this.addr,t)}function u6(e,t,n){let i,r=this.cache,a=t.length,s=uT(n,a);uw(r,s)||(e.uniform1iv(this.addr,s),uM(r,s)),i=this.type===e.SAMPLER_2D_SHADOW?up:uh;for(let e=0;e!==a;++e)n.setTexture2D(t[e]||i,s[e])}function u8(e,t,n){let i=this.cache,r=t.length,a=uT(n,r);uw(i,a)||(e.uniform1iv(this.addr,a),uM(i,a));for(let e=0;e!==r;++e)n.setTexture3D(t[e]||um,a[e])}function u9(e,t,n){let i=this.cache,r=t.length,a=uT(n,r);uw(i,a)||(e.uniform1iv(this.addr,a),uM(i,a));for(let e=0;e!==r;++e)n.setTextureCube(t[e]||ug,a[e])}function u7(e,t,n){let i=this.cache,r=t.length,a=uT(n,r);uw(i,a)||(e.uniform1iv(this.addr,a),uM(i,a));for(let e=0;e!==r;++e)n.setTexture2DArray(t[e]||uf,a[e])}class ce{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.setValue=function(e){switch(e){case 5126:return uE;case 35664:return uA;case 35665:return uC;case 35666:return uP;case 35674:return uR;case 35675:return uI;case 35676:return uD;case 5124:case 35670:return uL;case 35667:case 35671:return uF;case 35668:case 35672:return uN;case 35669:case 35673:return uU;case 5125:return uk;case 36294:return uB;case 36295:return uO;case 36296:return uz;case 35678:case 36198:case 36298:case 36306:case 35682:return uH;case 35679:case 36299:case 36307:return uV;case 35680:case 36300:case 36308:case 36293:return uG;case 36289:case 36303:case 36311:case 36292:return uj}}(t.type)}}class ct{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=function(e){switch(e){case 5126:return uW;case 35664:return uX;case 35665:return uq;case 35666:return uY;case 35674:return uZ;case 35675:return uK;case 35676:return uJ;case 5124:case 35670:return uQ;case 35667:case 35671:return u$;case 35668:case 35672:return u0;case 35669:case 35673:return u1;case 5125:return u2;case 36294:return u3;case 36295:return u4;case 36296:return u5;case 35678:case 36198:case 36298:case 36306:case 35682:return u6;case 35679:case 36299:case 36307:return u8;case 35680:case 36300:case 36308:case 36293:return u9;case 36289:case 36303:case 36311:case 36292:return u7}}(t.type)}}class cn{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,n){let i=this.seq;for(let r=0,a=i.length;r!==a;++r){let a=i[r];a.setValue(e,t[a.id],n)}}}let ci=/(\w+)(\])?(\[|\.)?/g;function cr(e,t){e.seq.push(t),e.map[t.id]=t}class ca{constructor(e,t){this.seq=[],this.map={};const n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let i=0;i<n;++i){const n=e.getActiveUniform(t,i),r=e.getUniformLocation(t,n.name);!function(e,t,n){let i=e.name,r=i.length;for(ci.lastIndex=0;;){let a=ci.exec(i),s=ci.lastIndex,o=a[1],l="]"===a[2],u=a[3];if(l&&(o|=0),void 0===u||"["===u&&s+2===r){cr(n,void 0===u?new ce(o,e,t):new ct(o,e,t));break}{let e=n.map[o];void 0===e&&cr(n,e=new cn(o)),n=e}}}(n,r,this)}const i=[],r=[];for(const t of this.seq)t.type===e.SAMPLER_2D_SHADOW||t.type===e.SAMPLER_CUBE_SHADOW||t.type===e.SAMPLER_2D_ARRAY_SHADOW?i.push(t):r.push(t);i.length>0&&(this.seq=i.concat(r))}setValue(e,t,n,i){let r=this.map[t];void 0!==r&&r.setValue(e,n,i)}setOptional(e,t,n){let i=t[n];void 0!==i&&this.setValue(e,n,i)}static upload(e,t,n,i){for(let r=0,a=t.length;r!==a;++r){let a=t[r],s=n[a.id];!1!==s.needsUpdate&&a.setValue(e,s.value,i)}}static seqWithValue(e,t){let n=[];for(let i=0,r=e.length;i!==r;++i){let r=e[i];r.id in t&&n.push(r)}return n}}function cs(e,t,n){let i=e.createShader(t);return e.shaderSource(i,n),e.compileShader(i),i}let co=0,cl=new e3;function cu(e,t,n){let i=e.getShaderParameter(t,e.COMPILE_STATUS),r=(e.getShaderInfoLog(t)||"").trim();if(i&&""===r)return"";let a=/ERROR: 0:(\d+)/.exec(r);if(!a)return r;{let i=parseInt(a[1]);return n.toUpperCase()+"\n\n"+r+"\n\n"+function(e,t){let n=e.split("\n"),i=[],r=Math.max(t-6,0),a=Math.min(t+6,n.length);for(let e=r;
342e<a;e++){let r=e+1;i.push(`${r===t?">":" "} ${r}: ${n[e]}`)}return i.join("\n")}(e.getShaderSource(t),i)}}let cc={1:"Linear",2:"Reinhard",3:"Cineon",4:"ACESFilmic",6:"AgX",7:"Neutral",5:"Custom"},cd=new e0;function ch(e){return""!==e}function cp(e,t){let n=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,n).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 cf(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}let cm=/^[ \t]*#include +<([\w\d./]+)>/gm;function cg(e){return e.replace(cm,cy)}let cv=new Map;function cy(e,t){let n=lH[t];if(void 0===n){let e=cv.get(t);if(void 0!==e)n=lH[e],ek('WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,e);else throw Error("Can not resolve #include <"+t+">")}return cg(n)}let cx=/#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 cb(e){return e.replace(cx,cS)}function cS(e,t,n,i){let r="";for(let e=parseInt(t);e<parseInt(n);e++)r+=i.replace(/\[\s*i\s*\]/g,"[ "+e+" ]").replace(/UNROLLED_LOOP_INDEX/g,e);return r}function c_(e){let t=`precision ${e.precision} float;
343	precision ${e.precision} int;
344	precision ${e.precision} sampler2D;
345	precision ${e.precision} samplerCube;
346	precision ${e.precision} sampler3D;
347	precision ${e.precision} sampler2DArray;
348	precision ${e.precision} sampler2DShadow;
349	precision ${e.precision} samplerCubeShadow;
350	precision ${e.precision} sampler2DArrayShadow;
351	precision ${e.precision} isampler2D;
352	precision ${e.precision} isampler3D;
353	precision ${e.precision} isamplerCube;
354	precision ${e.precision} isampler2DArray;
355	precision ${e.precision} usampler2D;
356	precision ${e.precision} usampler3D;
357	precision ${e.precision} usamplerCube;
358	precision ${e.precision} usampler2DArray;
359	`;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}let cw={1:"SHADOWMAP_TYPE_PCF",3:"SHADOWMAP_TYPE_VSM"},cM={301:"ENVMAP_TYPE_CUBE",302:"ENVMAP_TYPE_CUBE",306:"ENVMAP_TYPE_CUBE_UV"},cT={302:"ENVMAP_MODE_REFRACTION"},cE={0:"ENVMAP_BLENDING_MULTIPLY",1:"ENVMAP_BLENDING_MIX",2:"ENVMAP_BLENDING_ADD"};function cA(e,t,n,i){var r,a;let s,o,l,u,c=e.getContext(),d=n.defines,h=n.vertexShader,p=n.fragmentShader,f=cw[n.shadowMapType]||"SHADOWMAP_TYPE_BASIC",m=!1===n.envMap?"ENVMAP_TYPE_CUBE":cM[n.envMapMode]||"ENVMAP_TYPE_CUBE",g=!1===n.envMap?"ENVMAP_MODE_REFLECTION":cT[n.envMapMode]||"ENVMAP_MODE_REFLECTION",v=!1===n.envMap?"ENVMAP_BLENDING_NONE":cE[n.combine]||"ENVMAP_BLENDING_NONE",y=function(e){let t=e.envMapCubeUVHeight;if(null===t)return null;let n=Math.log2(t)-2;return{texelWidth:1/(3*Math.max(Math.pow(2,n),112)),texelHeight:1/t,maxMip:n}}(n),x=[n.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",n.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(ch).join("\n"),b=function(e){let t=[];for(let n in e){let i=e[n];!1!==i&&t.push("#define "+n+" "+i)}return t.join("\n")}(d),S=c.createProgram(),_=n.glslVersion?"#version "+n.glslVersion+"\n":"";if(n.isRawShaderMaterial)(s=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,b].filter(ch).join("\n")).length>0&&(s+="\n"),(o=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,b].filter(ch).join("\n")).length>0&&(o+="\n");else{let e,t,i,l,u;s=[c_(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,b,n.extensionCl
vendor: 5,447 bytes, line 359
359ipCullDistance?"#define USE_CLIP_DISTANCE":"",n.batching?"#define USE_BATCHING":"",n.batchingColor?"#define USE_BATCHING_COLOR":"",n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.instancingMorph?"#define USE_INSTANCING_MORPH":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+g:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&!1===n.flatShading?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.morphColors?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+f:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",n.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","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(ch).join("\n"),o=[c_(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,b,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.alph
359aToCoverage?"#define ALPHA_TO_COVERAGE":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+m:"",n.envMap?"#define "+g:"",n.envMap?"#define "+v:"",y?"#define CUBEUV_TEXEL_WIDTH "+y.texelWidth:"",y?"#define CUBEUV_TEXEL_HEIGHT "+y.texelHeight:"",y?"#define CUBEUV_MAX_MIP "+y.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.dispersion?"#define USE_DISPERSION":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&!1===n.flatShading?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor||n.batchingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+f:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",n.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",n.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",0!==n.toneMapping?"#define TONE_MAPPING":"",0!==n.toneMapping?lH.tonemapping_pars_fragment:"",0!==n.toneMapping?(r="toneMapping",void 0===(e=cc[a=n.toneMapping])?(ek("WebGLProgram: Unsupported toneMapping:",a),"vec3 "+r+"( vec3 color ) { return LinearToneMapping( color ); }"):"vec3 "+r+"( vec3 color ) { return "+e+"ToneMapping( color ); }"):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",lH.colorspace_pars_fragment,(t=function(e){e8._getMatrix(cl,e8.workingColorSpace,e);let t=`mat3( ${cl.elements.map(e=>e.toFixed(4))} )`;switch(e8.getTransfer(e)){case eb:return[t,"LinearTransferOETF"];case eS:return[t,"sRGBTransferOETF"];default:return ek("WebGLProgram: Unsupported color space: ",e),[t,"LinearTransferOETF"]}}(n.outputColorSpace),`vec4 linearToOutputTexel( vec4 value ) {
360	return ${t[1]}( vec4( value.rgb * ${t[0]}, value.a ) );
361}`),(e8.getLuminanceCoefficients(cd),i=cd.x.toFixed(4),l=cd.y.toFixed(4),u=cd.z.toFixed(4),`float luminance( const in vec3 rgb ) {
362	const vec3 weights = vec3( ${i}, ${l}, ${u} );
363	return dot( weights, rgb );
364}`),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(ch).join("\n")}h=cf(h=cp(h=cg(h),n),n),p=cf(p=cp(p=cg(p),n),n),h=cb(h),p=cb(p),!0!==n.isRawShaderMaterial&&(_="#version 300 es\n",s=[x,"#define attribute in\n#define varying out\n#define texture2D texture"].join("\n")+"\n"+s,o=["#define varying in",
364n.glslVersion===e_?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===e_?"":"#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"+o);let w=_+s+h,M=_+o+p,T=cs(c,c.VERTEX_SHADER,w),E=cs(c,c.FRAGMENT_SHADER,M);function A(t){if(e.debug.checkShaderErrors){let n=c.getProgramInfoLog(S)||"",i=c.getShaderInfoLog(T)||"",r=c.getShaderInfoLog(E)||"",a=n.trim(),l=i.trim(),u=r.trim(),d=!0,h=!0;if(!1===c.getProgramParameter(S,c.LINK_STATUS))if(d=!1,"function"==typeof e.debug.onShaderError)e.debug.onShaderError(c,S,T,E);else{let e=cu(c,T,"vertex"),n=cu(c,E,"fragment");eB("THREE.WebGLProgram: Shader Error "+c.getError()+" - VALIDATE_STATUS "+c.getProgramParameter(S,c.VALIDATE_STATUS)+"\n\nMaterial Name: "+t.name+"\nMaterial Type: "+t.type+"\n\nProgram Info Log: "+a+"\n"+e+"\n"+n)}else""!==a?ek("WebGLProgram: Program Info Log:",a):(""===l||""===u)&&(h=!1);h&&(t.diagnostics={runnable:d,programLog:a,vertexShader:{log:l,prefix:s},fragmentShader:{log:u,prefix:o}})}c.deleteShader(T),c.deleteShader(E),l=new ca(c,S),u=function(e,t){let n={},i=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let r=0;r<i;r++){let i=e.getActiveAttrib(t,r),a=i.name,s=1;i.type===e.FLOAT_MAT2&&(s=2),i.type===e.FLOAT_MAT3&&(s=3),i.type===e.FLOAT_MAT4&&(s=4),n[a]={type:i.type,location:e.getAttribLocation(t,a),locationSize:s}}return n}(c,S)}c.attachShader(S,T),c.attachShader(S,E),void 0!==n.index0AttributeName?c.bindAttribLocation(S,0,n.index0AttributeName):!0===n.morphTargets&&c.bindAttribLocation(S,0,"position"),c.linkProgram(S),this.getUniforms=function(){return void 0===l&&A(this),l},this.getAttributes=function(){return void 0===u&&A(this),u};let C=!1===n.rendererExtensionParallelShaderCompile;return this.isReady=function(){return!1===C&&(C=c.getProgramParameter(S,37297)),C},this.destroy=function(){i.releaseStatesOfProgram(this),c.deleteProgram(S),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=co++,this.cacheKey=t,this.usedTimes=1,this.program=S,this.vertexShader=T,this.fragmentShader=E,this}let cC=0;class cP{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){let t=e.vertexShader,n=e.fragmentShader,i=this._getShaderStage(t),r=this._getShaderStage(n),a=this._getShaderCacheForMaterial(e);return!1===a.has(i)&&(a.add(i),i.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,n=t.get(e);return void 0===n&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){let t=this.shaderCache,n=t.get(e);return void 0===n&&(n=new cR(e),t.set(e,n)),n}}class cR{constructor(e){this.id=cC++,this.code=e,this.usedTimes=0}}function cI(e,t,n,i,r,a,s){let o=new tQ,l=new cP,u=new Set,c=[],d=new Map,h=r.logarithmicDepthBuffer,p=r.precision,f={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distance",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,d,g){let v,y,x,b,S=d.fog,_=g.geometry,w=a.isMeshStandardMaterial?d.environment:null,M=(a.isMeshStandardMaterial?n:t).get(a.envMap||w),T=M&&306===M.mapping?M.image.height:null,E=f[a.type];null!==a.precision&&(p=r.getMaxPrecision(a.precision))!==a.precision&&ek("WebGLProgram.getParameters:",a.precision,"not supported, using",p,"instead.");let A=_.morphAttributes.position||_.morphAttributes.normal||_.morphAttributes.color,C=void 0!==A?A.length:0,P=0;if(void 0!==_.morphAttributes.position&&(P=1),void 0!==_.morphAttributes.normal&&(P=2),void 0!==_.morphAttributes.color&&(P=3),E){let e=lG[E];v=e.vertexShader,y=e.fragmentShader}else v=a.vertexShader,y=a.fragmentShader,l.update(a),x=l.getVertexShaderID(a),b=l.getFragmentShaderID(a);let R=e.getRenderTarget(),I=e.state.buffers.depth.getReversed(),D=!0===g.isInstancedMesh,L=!0===g.isBatchedMesh,F=!!a.map,N=!!a.matcap,U=!!M,k=!!a.aoMap,B=!!a.lightMap,O=!!a.bumpMap,z=!!a.normalMap,H=!!a.displacementMap,V=!!a.emissiveMap,G=!!a.metalnessMap,j=!!a.roughnessMap,W=a.anisotropy>0,X=a.clearcoat>0,q=a.dispersion>0,Y=a.iridescence>0,Z=a.sheen>0,K=a.transmission>0,J=W&&!!a.anisotropyMap,Q=X&&!!a.clearcoatMap,$=X&&!!a.clearcoatNormalMap,ee=X&&!!a.clearcoatRoughnessMap,et=Y&&!!a.iridescenceMap,en=Y&&!!a.iridescenceThicknessMap,ei=Z&&!!a.sheenColorMap,er=Z&&!!a.sheenRoughnessMap,ea=!!a.specularMap,es=!!a.specularColorMap,eo=!!a.specularIntensityMap,el=K&&!!a.transmissionMap,eu=K&&!!a.thicknessMap,ec=!!a.gradientMap,ed=!!a.alphaMap,eh=a.alphaTest>0,ep=!!a.alphaHash,ef=!!a.extensions,em=0;a.toneMapped&&(null===R||!0===R.isXRRenderTarget)&&(em=e.toneMapping);let eg={shaderID:E,shaderType:a.type,shaderName:a.name,vertexShader:v,fragmentShader:y,defines:a.defines,customVertexShaderID:x,customFragmentShaderID:b,isRawShaderMaterial:!0===a.isRawShaderMaterial,glslVersion:a.glslVersion,precision:p,batching:L,batchingColor:L&&null!==g._colorsTexture,instancing:D,instancingColor:D&&null!==g.instanceColor,
364instancingMorph:D&&null!==g.morphTexture,outputColorSpace:null===R?e.outputColorSpace:!0===R.isXRRenderTarget?R.texture.colorSpace:ex,alphaToCoverage:!!a.alphaToCoverage,map:F,matcap:N,envMap:U,envMapMode:U&&M.mapping,envMapCubeUVHeight:T,aoMap:k,lightMap:B,bumpMap:O,normalMap:z,displacementMap:H,emissiveMap:V,normalMapObjectSpace:z&&1===a.normalMapType,normalMapTangentSpace:z&&0===a.normalMapType,metalnessMap:G,roughnessMap:j,anisotropy:W,anisotropyMap:J,clearcoat:X,clearcoatMap:Q,clearcoatNormalMap:$,clearcoatRoughnessMap:ee,dispersion:q,iridescence:Y,iridescenceMap:et,iridescenceThicknessMap:en,sheen:Z,sheenColorMap:ei,sheenRoughnessMap:er,specularMap:ea,specularColorMap:es,specularIntensityMap:eo,transmission:K,transmissionMap:el,thicknessMap:eu,gradientMap:ec,opaque:!1===a.transparent&&1===a.blending&&!1===a.alphaToCoverage,alphaMap:ed,alphaTest:eh,alphaHash:ep,combine:a.combine,mapUv:F&&m(a.map.channel),aoMapUv:k&&m(a.aoMap.channel),lightMapUv:B&&m(a.lightMap.channel),bumpMapUv:O&&m(a.bumpMap.channel),normalMapUv:z&&m(a.normalMap.channel),displacementMapUv:H&&m(a.displacementMap.channel),emissiveMapUv:V&&m(a.emissiveMap.channel),metalnessMapUv:G&&m(a.metalnessMap.channel),roughnessMapUv:j&&m(a.roughnessMap.channel),anisotropyMapUv:J&&m(a.anisotropyMap.channel),clearcoatMapUv:Q&&m(a.clearcoatMap.channel),clearcoatNormalMapUv:$&&m(a.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ee&&m(a.clearcoatRoughnessMap.channel),iridescenceMapUv:et&&m(a.iridescenceMap.channel),iridescenceThicknessMapUv:en&&m(a.iridescenceThicknessMap.channel),sheenColorMapUv:ei&&m(a.sheenColorMap.channel),sheenRoughnessMapUv:er&&m(a.sheenRoughnessMap.channel),specularMapUv:ea&&m(a.specularMap.channel),specularColorMapUv:es&&m(a.specularColorMap.channel),specularIntensityMapUv:eo&&m(a.specularIntensityMap.channel),transmissionMapUv:el&&m(a.transmissionMap.channel),thicknessMapUv:eu&&m(a.thicknessMap.channel),alphaMapUv:ed&&m(a.alphaMap.channel),vertexTangents:!!_.attributes.tangent&&(z||W),vertexColors:a.vertexColors,vertexAlphas:!0===a.vertexColors&&!!_.attributes.color&&4===_.attributes.color.itemSize,pointsUvs:!0===g.isPoints&&!!_.attributes.uv&&(F||ed),fog:!!S,useFog:!0===a.fog,fogExp2:!!S&&S.isFogExp2,flatShading:!0===a.flatShading&&!1===a.wireframe,sizeAttenuation:!0===a.sizeAttenuation,logarithmicDepthBuffer:h,reversedDepthBuffer:I,skinning:!0===g.isSkinnedMesh,morphTargets:void 0!==_.morphAttributes.position,morphNormals:void 0!==_.morphAttributes.normal,morphColors:void 0!==_.morphAttributes.color,morphTargetsCount:C,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:em,decodeVideoTexture:F&&!0===a.map.isVideoTexture&&e8.getTransfer(a.map.colorSpace)===eS,decodeVideoTextureEmissive:V&&!0===a.emissiveMap.isVideoTexture&&e8.getTransfer(a.emissiveMap.colorSpace)===eS,premultipliedAlpha:a.premultipliedAlpha,doubleSided:2===a.side,flipSided:1===a.side,useDepthPacking:a.depthPacking>=0,depthPacking:a.depthPacking||0,index0AttributeName:a.index0AttributeName,extensionClipCullDistance:ef&&!0===a.extensions.clipCullDistance&&i.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(ef&&!0===a.extensions.multiDraw||L)&&i.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:a.customProgramCacheKey()};return eg.vertexUv1s=u.has(1),eg.vertexUv2s=u.has(2),eg.vertexUv3s=u.has(3),u.clear(),eg},getProgramCacheKey:function(t){var n,i,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&&(n=s,i=t,n.push(i.precision),n.push(i.outputColorSpace),n.push(i.envMapMode),n.push(i.envMapCubeUVHeight),n.push(i.mapUv),n.push(i.alphaMapUv),n.push(i.lightMapUv),n.push(i.aoMapUv),n.push(i.bumpMapUv),n.push(i.normalMapUv),n.push(i.displacementMapUv),n.push(i.emissiveMapUv),n.push(i.metalnessMapUv),n.push(i.roughnessMapUv),n.push(i.anisotropyMapUv),n.push(i.clearcoatMapUv),n.push(i.clearcoatNormalMapUv),n.push(i.clearcoatRoughnessMapUv),n.push(i.iridescenceMapUv),n.push(i.iridescenceThicknessMapUv),n.push(i.sheenColorMapUv),n.push(i.sheenRoughnessMapUv),n.push(i.specularMapUv),n.push(i.specularColorMapUv),n.push(i.specularIntensityMapUv),n.push(i.transmissionMapUv),n.push(i.thicknessMapUv),n.push(i.combine),n.push(i.fogExp2),n.push(i.sizeAttenuation),n.push(i.morphTargetsCount),n.push(i.morphAttributeCount),n.push(i.numDirLights),n.push(i.numPointLights),n.push(i.numSpotLights),n.push(i.numSpotLightMaps),n.push(i.numHemiLights),n.push(i.numRectAreaLights),n.push(i.numDirLightShadows),n.push(i.numPointLightShadows),n.push(i.numSpotLightShadows),n.push(i.numSpotLightShadowsWithMaps),n.push(i.numLightProbes),n.push(i.shadowMapType),n.push(i.toneMapping),n.push(i.numClippingPlanes),n.push(i.numClipIntersection),n.push(i.depthPacking),r=s,a=t,o.disableAll(),a.instancing&&o.enable(0),a.instancingColor&&o.enable(1),a.instancingMorph&&o.enable(2),a.matcap&&o.enable(3),a.envMap&&o.enable(4),a.normalMapObjectSpace&&o.enable(5),a.normalMapTangentSpace&&o.enable(6),a.clearcoat&&o.enable(7),a.iridescence&&o.enable(8),a.alphaTest&&o.enable(9),a.vertexColors&&o.enable(10),a.vertexAlphas&&o.enable(11),a.vertexUv1s&&o.enable(12),a.vertexUv2s&&o.enable(13),a.vertexUv3s&&o.enable(14),a.vertexTangents&&o.enable(15),a.anisotropy&&o.enable(16),a.alphaHash&&o.enable(17),a.batching&&o.enable(18),a.dispersion&&o.enable(19),a.batchingColor&&o.enable(20),a.gradientMap&&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.reversedDepthBuffer&&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,n=f[e.type];if(n){let e=lG[n];t=io.clone(e.uniforms)}else t=e.uniforms;return t},acquireProgram:function(t,n){let i=d.get(n);return void 0!==i?++i.usedTimes:(i=new cA(e,n,t,a),c.push(i),d.set(n,i)),i},releaseProgram:function(e){if(0==--e.usedTimes){let t=c.indexOf(e);
364c[t]=c[c.length-1],c.pop(),d.delete(e.cacheKey),e.destroy()}},releaseShaderCache:function(e){l.remove(e)},programs:c,dispose:function(){l.dispose()}}}function cD(){let e=new WeakMap;return{has:function(t){return e.has(t)},get:function(t){let n=e.get(t);return void 0===n&&(n={},e.set(t,n)),n},remove:function(t){e.delete(t)},update:function(t,n,i){e.get(t)[n]=i},dispose:function(){e=new WeakMap}}}function cL(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 cF(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 cN(){let e=[],t=0,n=[],i=[],r=[];function a(n,i,r,a,s,o){let l=e[t];return void 0===l?(l={id:n.id,object:n,geometry:i,material:r,groupOrder:a,renderOrder:n.renderOrder,z:s,group:o},e[t]=l):(l.id=n.id,l.object=n,l.geometry=i,l.material=r,l.groupOrder=a,l.renderOrder=n.renderOrder,l.z=s,l.group=o),t++,l}return{opaque:n,transmissive:i,transparent:r,init:function(){t=0,n.length=0,i.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?i.push(c):!0===s.transparent?r.push(c):n.push(c)},unshift:function(e,t,s,o,l,u){let c=a(e,t,s,o,l,u);s.transmission>0?i.unshift(c):!0===s.transparent?r.unshift(c):n.unshift(c)},finish:function(){for(let n=t,i=e.length;n<i;n++){let t=e[n];if(null===t.id)break;t.id=null,t.object=null,t.geometry=null,t.material=null,t.group=null}},sort:function(e,t){n.length>1&&n.sort(e||cL),i.length>1&&i.sort(t||cF),r.length>1&&r.sort(t||cF)}}}function cU(){let e=new WeakMap;return{get:function(t,n){let i,r=e.get(t);return void 0===r?(i=new cN,e.set(t,[i])):n>=r.length?(i=new cN,r.push(i)):i=r[n],i},dispose:function(){e=new WeakMap}}}function ck(){let e={};return{get:function(t){let n;if(void 0!==e[t.id])return e[t.id];switch(t.type){case"DirectionalLight":n={direction:new e0,color:new nw};break;case"SpotLight":n={position:new e0,direction:new e0,color:new nw,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new e0,color:new nw,distance:0,decay:0};break;case"HemisphereLight":n={direction:new e0,skyColor:new nw,groundColor:new nw};break;case"RectAreaLight":n={color:new nw,position:new e0,halfWidth:new e0,halfHeight:new e0}}return e[t.id]=n,n}}}let cB=0;function cO(e,t){return 2*!!t.castShadow-2*!!e.castShadow+ +!!t.map-!!e.map}function cz(e){let t,n=new ck,i=(t={},{get:function(e){let n;if(void 0!==t[e.id])return t[e.id];switch(e.type){case"DirectionalLight":case"SpotLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new eQ};break;case"PointLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new eQ,shadowCameraNear:1,shadowCameraFar:1e3}}return t[e.id]=n,n}}),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 e0);let a=new e0,s=new tH,o=new tH;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,d=0,h=0,p=0,f=0,m=0,g=0,v=0,y=0;t.sort(cO);for(let e=0,x=t.length;e<x;e++){let x=t[e],b=x.color,S=x.intensity,_=x.distance,w=null;if(x.shadow&&x.shadow.map&&(w=1030===x.shadow.map.texture.format?x.shadow.map.texture:x.shadow.map.depthTexture||x.shadow.map.texture),x.isAmbientLight)a+=b.r*S,s+=b.g*S,o+=b.b*S;else if(x.isLightProbe){for(let e=0;e<9;e++)r.probe[e].addScaledVector(x.sh.coefficients[e],S);y++}else if(x.isDirectionalLight){let e=n.get(x);if(e.color.copy(x.color).multiplyScalar(x.intensity),x.castShadow){let e=x.shadow,t=i.get(x);t.shadowIntensity=e.intensity,t.shadowBias=e.bias,t.shadowNormalBias=e.n
vendor: 4,508 bytes, line 364
364ormalBias,t.shadowRadius=e.radius,t.shadowMapSize=e.mapSize,r.directionalShadow[l]=t,r.directionalShadowMap[l]=w,r.directionalShadowMatrix[l]=x.shadow.matrix,p++}r.directional[l]=e,l++}else if(x.isSpotLight){let e=n.get(x);e.position.setFromMatrixPosition(x.matrixWorld),e.color.copy(b).multiplyScalar(S),e.distance=_,e.coneCos=Math.cos(x.angle),e.penumbraCos=Math.cos(x.angle*(1-x.penumbra)),e.decay=x.decay,r.spot[c]=e;let t=x.shadow;if(x.map&&(r.spotLightMap[g]=x.map,g++,t.updateMatrices(x),x.castShadow&&v++),r.spotLightMatrix[c]=t.matrix,x.castShadow){let e=i.get(x);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]=w,m++}c++}else if(x.isRectAreaLight){let e=n.get(x);e.color.copy(b).multiplyScalar(S),e.halfWidth.set(.5*x.width,0,0),e.halfHeight.set(0,.5*x.height,0),r.rectArea[d]=e,d++}else if(x.isPointLight){let e=n.get(x);if(e.color.copy(x.color).multiplyScalar(x.intensity),e.distance=x.distance,e.decay=x.decay,x.castShadow){let e=x.shadow,t=i.get(x);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]=w,r.pointShadowMatrix[u]=x.shadow.matrix,f++}r.point[u]=e,u++}else if(x.isHemisphereLight){let e=n.get(x);e.skyColor.copy(x.color).multiplyScalar(S),e.groundColor.copy(x.groundColor).multiplyScalar(S),r.hemi[h]=e,h++}}d>0&&(!0===e.has("OES_texture_float_linear")?(r.rectAreaLTC1=lV.LTC_FLOAT_1,r.rectAreaLTC2=lV.LTC_FLOAT_2):(r.rectAreaLTC1=lV.LTC_HALF_1,r.rectAreaLTC2=lV.LTC_HALF_2)),r.ambient[0]=a,r.ambient[1]=s,r.ambient[2]=o;let x=r.hash;(x.directionalLength!==l||x.pointLength!==u||x.spotLength!==c||x.rectAreaLength!==d||x.hemiLength!==h||x.numDirectionalShadows!==p||x.numPointShadows!==f||x.numSpotShadows!==m||x.numSpotMaps!==g||x.numLightProbes!==y)&&(r.directional.length=l,r.spot.length=c,r.rectArea.length=d,r.point.length=u,r.hemi.length=h,r.directionalShadow.length=p,r.directionalShadowMap.length=p,r.pointShadow.length=f,r.pointShadowMap.length=f,r.spotShadow.length=m,r.spotShadowMap.length=m,r.directionalShadowMatrix.length=p,r.pointShadowMatrix.length=f,r.spotLightMatrix.length=m+g-v,r.spotLightMap.length=g,r.numSpotLightShadowsWithMaps=v,r.numLightProbes=y,x.directionalLength=l,x.pointLength=u,x.spotLength=c,x.rectAreaLength=d,x.hemiLength=h,x.numDirectionalShadows=p,x.numPointShadows=f,x.numSpotShadows=m,x.numSpotMaps=g,x.numLightProbes=y,r.version=cB++)},setupView:function(e,t){let n=0,i=0,l=0,u=0,c=0,d=t.matrixWorldInverse;for(let t=0,h=e.length;t<h;t++){let h=e[t];if(h.isDirectionalLight){let e=r.directional[n];e.direction.setFromMatrixPosition(h.matrixWorld),a.setFromMatrixPosition(h.target.matrixWorld),e.direction.sub(a),e.direction.transformDirection(d),n++}else if(h.isSpotLight){let e=r.spot[l];e.position.setFromMatrixPosition(h.matrixWorld),e.position.applyMatrix4(d),e.direction.setFromMatrixPosition(h.matrixWorld),a.setFromMatrixPosition(h.target.matrixWorld),e.direction.sub(a),e.direction.transformDirection(d),l++}else if(h.isRectAreaLight){let e=r.rectArea[u];e.position.setFromMatrixPosition(h.matrixWorld),e.position.applyMatrix4(d),o.identity(),s.copy(h.matrixWorld),s.premultiply(d),o.extractRotation(s),e.halfWidth.set(.5*h.width,0,0),e.halfHeight.set(0,.5*h.height,0),e.halfWidth.applyMatrix4(o),e.halfHeight.applyMatrix4(o),u++}else if(h.isPointLight){let e=r.point[i];e.position.setFromMatrixPosition(h.matrixWorld),e.position.applyMatrix4(d),i++}else if(h.isHemisphereLight){let e=r.hemi[c];e.direction.setFromMatrixPosition(h.matrixWorld),e.direction.transformDirection(d),c++}}},state:r}}function cH(e){let t=new cz(e),n=[],i=[],r={lightsArray:n,shadowsArray:i,camera:null,lights:t,transmissionRenderTarget:{}};return{init:function(e){r.camera=e,n.length=0,i.length=0},state:r,setupLights:function(){t.setup(n)},setupLightsView:function(e){t.setupView(n,e)},pushLight:function(e){n.push(e)},pushShadow:function(e){i.push(e)}}}function cV(e){let t=new WeakMap;return{get:function(n,i=0){let r,a=t.get(n);return void 0===a?(r=new cH(e),t.set(n,[r])):i>=a.length?(r=new cH(e),a.push(r)):r=a[i],r},dispose:function(){t=new WeakMap}}}let cG=[new e0(1,0,0),new e0(-1,0,0),new e0(0,1,0),new e0(0,-1,0),new e0(0,0,1),new e0(0,0,-1)],cj=[new e0(0,-1,0),new e0(0,-1,0),new e0(0,0,1),new e0(0,0,-1),new e0(0,-1,0),new e0(0,-1,0)],cW=ne
364w tH,cX=new e0,cq=new e0;function cY(e,t,n){let i=new rh,r=new eQ,a=new eQ,s=new to,o=new sf,l=new sm,u={},c=n.maxTextureSize,d={0:1,1:0,2:2},h=new il({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new eQ},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;\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 = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ).rg;\n			mean += distribution.x;\n			squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n		#else\n			float depth = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ).r;\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( max( 0.0, squared_mean - mean * mean ) );\n	gl_FragColor = vec4( mean, std_dev, 0.0, 1.0 );\n}"}),p=h.clone();p.defines.HORIZONTAL_PASS=1;let f=new nQ;f.setAttribute("position",new nN(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let m=new ie(f,h),g=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1;let v=this.type;function y(t,n,i,r){let a=null,s=!0===i.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(void 0!==s)a=s;else if(a=!0===i.isPointLight?l:o,e.localClippingEnabled&&!0===n.clipShadows&&Array.isArray(n.clippingPlanes)&&0!==n.clippingPlanes.length||n.displacementMap&&0!==n.displacementScale||n.alphaMap&&n.alphaTest>0||n.map&&n.alphaTest>0||!0===n.alphaToCoverage){let e=a.uuid,t=n.uuid,i=u[e];void 0===i&&(i={},u[e]=i);let r=i[t];void 0===r&&(r=a.clone(),i[t]=r,n.addEventListener("dispose",x)),a=r}return a.visible=n.visible,a.wireframe=n.wireframe,3===r?a.side=null!==n.shadowSide?n.shadowSide:n.side:a.side=null!==n.shadowSide?n.shadowSide:d[n.side],a.alphaMap=n.alphaMap,a.alphaTest=!0===n.alphaToCoverage?.5:n.alphaTest,a.map=n.map,a.clipShadows=n.clipShadows,a.clippingPlanes=n.clippingPlanes,a.clipIntersection=n.clipIntersection,a.displacementMap=n.displacementMap,a.displacementScale=n.displacementScale,a.displacementBias=n.displacementBias,a.wireframeLinewidth=n.wireframeLinewidth,a.linewidth=n.linewidth,!0===i.isPointLight&&!0===a.isMeshDistanceMaterial&&(e.properties.get(a).light=i),a}function x(e){for(let t in e.target.removeEventListener("dispose",x),u){let n=u[t],i=e.target.uuid;i in n&&(n[i].dispose(),delete n[i])}}this.render=function(n,o,l){if(!1===g.enabled||!1===g.autoUpdate&&!1===g.needsUpdate||0===n.length)return;2===n.type&&(ek("WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead."),n.type=1);let u=e.getRenderTarget(),d=e.getActiveCubeFace(),f=e.getActiveMipmapLevel(),x=e.state;x.setBlending(0),!0===x.buffers.depth.getReversed()?x.buffers.color.setClear(0,0,0,0):x.buffers.color.setClear(1,1,1,1),x.buffers.depth.setTest(!0),x.setScissorTest(!1);let b=v!==this.type;b&&o.traverse(function(e){e.material&&(Array.isArray(e.material)?e.material.forEach(e=>e.needsUpdate=!0):e.material.needsUpdate=!0)});for(let u=0,d=n.length;u<d;u++){let d=n[u],f=d.shadow;if(void 0===f){ek("WebGLShadowMap:",d,"has no shadow.");continue}if(!1===f.autoUpdate&&!1===f.needsUpdate)continue;r.copy(f.mapSize);let g=f.getFrameExtents();if(r.multiply(g),a.copy(f.mapSize),(r.x>c||r.y>c)&&(r.x>c&&(a.x=Math.floor(c/g.x),r.x=a.x*g.x,f.mapSize.x=a.x),r.y>c&&(a.y=Math.floor(c/g.y),r.y=a.y*g.y,f.mapSize.y=a.y)),null===f.map||!0===b){if(null!==f.map&&(null!==f.map.depthTexture&&(f.map.depthTexture.dispose(),f.map.depthTexture=null),f.map.dispose()),3===this.type){if(d.isPointLight){ek("WebGLShadowMap: VSM shadow maps are not supported for PointLights. Use PCF or BasicShadowMap instead.");continue}f.map=new tu(r.x,r.y,{format:1030,type:ev,minFilter:1006,magFilter:1006,generateMipmaps:!1}),f.map.texture.name=d.name+".shadowMap",f.map.depthTexture=new r8(r.x,r.y,1015),f.map.depthTexture.name=d.name+".shadowMapDepth",f.map.depthTexture.format=1026,f.map.depthTexture.compareFunction=null,f.map.depthTexture.minFilter=1003,f.map.depthTexture.magFilter=1003}else{d.isPointLight?(f.map=new iv(r.x),f.map.depthTexture=new r9(r.x,1014)):(f.map=new tu(r.x,r.y),f.map.depthTexture=new r8(r.x,r.y,1014)),f.map.depthTexture.name=d.name+".shadowMap",f.map.depthTexture.format=1026;let t=e.state.buffers.depth.getReversed();1===this.type?(f.map.depthTexture.compareFunction=t?518:515,f.map.depthTexture.minFilter=1006,f.map.depthTexture.magFilter=1006):(f.map.depthTexture.compareFunction=null,f.map.depthTexture.minFilter=1003,f.map.depthTexture.magFilter=1003)}f.camera.updateProjectionMatrix()}
364let v=f.map.isWebGLCubeRenderTarget?6:1;for(let n=0;n<v;n++){if(f.map.isWebGLCubeRenderTarget)e.setRenderTarget(f.map,n),e.clear();else{0===n&&(e.setRenderTarget(f.map),e.clear());let t=f.getViewport(n);s.set(a.x*t.x,a.y*t.y,a.x*t.z,a.y*t.w),x.viewport(s)}if(d.isPointLight){let e=f.camera,t=f.matrix,i=d.distance||e.far;i!==e.far&&(e.far=i,e.updateProjectionMatrix()),cX.setFromMatrixPosition(d.matrixWorld),e.position.copy(cX),cq.copy(e.position),cq.add(cG[n]),e.up.copy(cj[n]),e.lookAt(cq),e.updateMatrixWorld(),t.makeTranslation(-cX.x,-cX.y,-cX.z),cW.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),f._frustum.setFromProjectionMatrix(cW,e.coordinateSystem,e.reversedDepth)}else f.updateMatrices(d);i=f.getFrustum(),function n(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||i.intersectsObject(r))){r.modelViewMatrix.multiplyMatrices(s.matrixWorldInverse,r.matrixWorld);let n=t.update(r),i=r.material;if(Array.isArray(i)){let t=n.groups;for(let u=0,c=t.length;u<c;u++){let c=t[u],d=i[c.materialIndex];if(d&&d.visible){let t=y(r,d,o,l);r.onBeforeShadow(e,r,a,s,n,t,c),e.renderBufferDirect(s,null,n,t,r,c),r.onAfterShadow(e,r,a,s,n,t,c)}}}else if(i.visible){let t=y(r,i,o,l);r.onBeforeShadow(e,r,a,s,n,t,null),e.renderBufferDirect(s,null,n,t,r,null),r.onAfterShadow(e,r,a,s,n,t,null)}}let u=r.children;for(let e=0,t=u.length;e<t;e++)n(u[e],a,s,o,l)}(o,l,f.camera,d,this.type)}!0!==f.isPointLightShadow&&3===this.type&&function(n,i){let a=t.update(m);h.defines.VSM_SAMPLES!==n.blurSamples&&(h.defines.VSM_SAMPLES=n.blurSamples,p.defines.VSM_SAMPLES=n.blurSamples,h.needsUpdate=!0,p.needsUpdate=!0),null===n.mapPass&&(n.mapPass=new tu(r.x,r.y,{format:1030,type:ev})),h.uniforms.shadow_pass.value=n.map.depthTexture,h.uniforms.resolution.value=n.mapSize,h.uniforms.radius.value=n.radius,e.setRenderTarget(n.mapPass),e.clear(),e.renderBufferDirect(i,null,a,h,m,null),p.uniforms.shadow_pass.value=n.mapPass.texture,p.uniforms.resolution.value=n.mapSize,p.uniforms.radius.value=n.radius,e.setRenderTarget(n.map),e.clear(),e.renderBufferDirect(i,null,a,p,m,null)}(f,l),f.needsUpdate=!1}v=this.type,g.needsUpdate=!1,e.setRenderTarget(u,d,f)}}let cZ={0:1,2:6,4:7,3:5,1:0,6:2,7:4,5:3};function cK(e,t){let n=new function(){let t=!1,n=new to,i=null,r=new to(0,0,0,0);return{setMask:function(n){i===n||t||(e.colorMask(n,n,n,n),i=n)},setLocked:function(e){t=e},setClear:function(t,i,a,s,o){!0===o&&(t*=s,i*=s,a*=s),n.set(t,i,a,s),!1===r.equals(n)&&(e.clearColor(t,i,a,s),r.copy(n))},reset:function(){t=!1,i=null,r.set(-1,0,0,0)}}},i=new function(){let n=!1,i=!1,r=null,a=null,s=null;return{setReversed:function(e){if(i!==e){let n=t.get("EXT_clip_control");e?n.clipControlEXT(n.LOWER_LEFT_EXT,n.ZERO_TO_ONE_EXT):n.clipControlEXT(n.LOWER_LEFT_EXT,n.NEGATIVE_ONE_TO_ONE_EXT),i=e;let r=s;s=null,this.setClear(r)}},getReversed:function(){return i},setTest:function(t){t?O(e.DEPTH_TEST):z(e.DEPTH_TEST)},setMask:function(t){r===t||n||(e.depthMask(t),r=t)},setFunc:function(t){if(i&&(t=cZ[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){n=e},setClear:function(t){s!==t&&(i&&(t=1-t),e.clearDepth(t),s=t)},reset:function(){n=!1,r=null,a=null,s=null,i=!1}}},r=new function(){let t=!1,n=null,i=null,r=null,a=null,s=null,o=null,l=null,u=null;return{setTest:function(n){t||(n?O(e.STENCIL_TEST):z(e.STENCIL_TEST))},setMask:function(i){n===i||t||(e.stencilMask(i),n=i)},setFunc:function(t,n,s){(i!==t||r!==n||a!==s)&&(e.stencilFunc(t,n,s),i=t,r=n,a=s)},setOp:function(t,n,i){(s!==t||o!==n||l!==i)&&(e.stencilOp(t,n,i),s=t,o=n,l=i)},setLocked:function(e){t=e},setClear:function(t){u!==t&&(e.clearStencil(t),u=t)},reset:function(){t=!1,n=null,i=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=[],d=null,h=!1,p=null,f=null,m=null,g=null,v=null,y=null,x=null,b=new nw(0,0,0),S=0,_=!1,w=null,M=null,T=null,E=null,A=null,C=e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS),P=!1,R=e.getParameter(e.VERSION);-1!==R.indexOf("WebGL")?P=parseFloat(/^WebGL (\d)/.exec(R)[1])>=1:-1!==R.indexOf("OpenGL ES")&&(P=parseFloat(/^OpenGL ES (\d)/.exec(R)[1])>=2);let I=null,D={},L=e.getParameter(e.SCISSOR_BOX),F=e.getParameter(e.VIEWPORT),N=new to().fromArray(L),U=new to().fromArray(F);function k(t,n,i,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<i;s++)t===e.TEXTURE_3D||t===e.TEXTURE_2D_ARRAY?e.texImage3D(n,0,e.RGBA,1,1,r,0,e.RGBA,e.UNSIGNED_BYTE,a):e.texImage2D(n+s,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,a);return s}let B={};function O(t){!0!==o[t]&&(e.enable(t),o[t]=!0)}function z(t){!1!==o[t]&&(e.disable(t),o[t]=!1)}B[e.TEXTURE_2D]=k(e.TEXTURE_2D,e.TEXTURE_2D,1),B[e.TEXTURE_CUBE_MAP]=k(e.TEXTURE_CUBE_MAP,e.TEXTURE_CUBE_MAP_POSITIVE_X,6),B[e.TEXTURE_2D_ARRAY]=k(e.TEXTURE_2D_ARRAY,e.TEXTURE_2D_ARRAY,1,1),B[e.TEXTURE_3D]=k(e.TEXTURE_3D,e.TEXTURE_3D,1,1),n.setClear(0,0,0,1),i.setClear(1),r.setClear(0),O(e.DEPTH_TEST),i.setFunc(3),j(!1),W(1),O(e.CULL_FACE),G(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 V={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 G(t,n,i,r,a,s,o,l,u,c){if(0===t){!0===h&&(z(e.BLEND),h=!1);return}if(!1===h&&(O(e.BLEND),h=!0),5!==t){if(t!==p||c!==_){if((100!==f||100!==v)&&(e.blendEquation(e.FUNC_ADD),f=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.DST_COLOR,e.ONE_MINUS_SRC_ALPHA,e.ZERO,e.ONE);break;default:eB("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.blendFuncSeparate(e.SRC_ALPHA,e.ONE,e.ONE,e.ONE);break;case 3:eB("WebGLState: SubtractiveBlending requires material.premultipliedAlpha = true");break;case 4:eB("WebGLState: MultiplyBlending requires material.premultipliedAlpha = true");break;default:eB("WebGLState: Invalid blending: ",t)}m=null,g=null,y=null,x=null,b.set(0,0,0),S=0,p=t,_=c}return}a=a||n,s=s||i,o=o||r,(n!==f||a!==v)&&(e.blendEquationSeparate(H[n],H[a]),f=n,v=a),(i!==m||r!==g||s!==y||o!==x)&&(e.blendFuncSeparate(V[i],V[r],V[s],V[o]),m=i,g=r,y=s,x=o),(!1===l.equals(b)||u!==S)&&(e.blendColor
364(l.r,l.g,l.b,u),b.copy(l),S=u),p=t,_=!1}function j(t){w!==t&&(t?e.frontFace(e.CW):e.frontFace(e.CCW),w=t)}function W(t){0!==t?(O(e.CULL_FACE),t!==M&&(1===t?e.cullFace(e.BACK):2===t?e.cullFace(e.FRONT):e.cullFace(e.FRONT_AND_BACK))):z(e.CULL_FACE),M=t}function X(t,n,i){t?(O(e.POLYGON_OFFSET_FILL),(E!==n||A!==i)&&(e.polygonOffset(n,i),E=n,A=i)):z(e.POLYGON_OFFSET_FILL)}return{buffers:{color:n,depth:i,stencil:r},enable:O,disable:z,bindFramebuffer:function(t,n){return l[t]!==n&&(e.bindFramebuffer(t,n),l[t]=n,t===e.DRAW_FRAMEBUFFER&&(l[e.FRAMEBUFFER]=n),t===e.FRAMEBUFFER&&(l[e.DRAW_FRAMEBUFFER]=n),!0)},drawBuffers:function(t,n){let i=c,r=!1;if(t){void 0===(i=u.get(n))&&(i=[],u.set(n,i));let a=t.textures;if(i.length!==a.length||i[0]!==e.COLOR_ATTACHMENT0){for(let t=0,n=a.length;t<n;t++)i[t]=e.COLOR_ATTACHMENT0+t;i.length=a.length,r=!0}}else i[0]!==e.BACK&&(i[0]=e.BACK,r=!0);r&&e.drawBuffers(i)},useProgram:function(t){return d!==t&&(e.useProgram(t),d=t,!0)},setBlending:G,setMaterial:function(t,a){2===t.side?z(e.CULL_FACE):O(e.CULL_FACE);let s=1===t.side;a&&(s=!s),j(s),1===t.blending&&!1===t.transparent?G(0):G(t.blending,t.blendEquation,t.blendSrc,t.blendDst,t.blendEquationAlpha,t.blendSrcAlpha,t.blendDstAlpha,t.blendColor,t.blendAlpha,t.premultipliedAlpha),i.setFunc(t.depthFunc),i.setTest(t.depthTest),i.setMask(t.depthWrite),n.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?O(e.SAMPLE_ALPHA_TO_COVERAGE):z(e.SAMPLE_ALPHA_TO_COVERAGE)},setFlipSided:j,setCullFace:W,setLineWidth:function(t){t!==T&&(P&&e.lineWidth(t),T=t)},setPolygonOffset:X,setScissorTest:function(t){t?O(e.SCISSOR_TEST):z(e.SCISSOR_TEST)},activeTexture:function(t){void 0===t&&(t=e.TEXTURE0+C-1),I!==t&&(e.activeTexture(t),I=t)},bindTexture:function(t,n,i){void 0===i&&(i=null===I?e.TEXTURE0+C-1:I);let r=D[i];void 0===r&&(r={type:void 0,texture:void 0},D[i]=r),(r.type!==t||r.texture!==n)&&(I!==i&&(e.activeTexture(i),I=i),e.bindTexture(t,n||B[t]),r.type=t,r.texture=n)},unbindTexture:function(){let t=D[I];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(...arguments)}catch(e){eB("WebGLState:",e)}},compressedTexImage3D:function(){try{e.compressedTexImage3D(...arguments)}catch(e){eB("WebGLState:",e)}},texImage2D:function(){try{e.texImage2D(...arguments)}catch(e){eB("WebGLState:",e)}},texImage3D:function(){try{e.texImage3D(...arguments)}catch(e){eB("WebGLState:",e)}},updateUBOMapping:function(t,n){let i=s.get(n);void 0===i&&(i=new WeakMap,s.set(n,i));let r=i.get(t);void 0===r&&(r=e.getUniformBlockIndex(n,t.name),i.set(t,r))},uniformBlockBinding:function(t,n){let i=s.get(n).get(t);a.get(n)!==i&&(e.uniformBlockBinding(n,i,t.__bindingPointIndex),a.set(n,i))},texStorage2D:function(){try{e.texStorage2D(...arguments)}catch(e){eB("WebGLState:",e)}},texStorage3D:function(){try{e.texStorage3D(...arguments)}catch(e){eB("WebGLState:",e)}},texSubImage2D:function(){try{e.texSubImage2D(...arguments)}catch(e){eB("WebGLState:",e)}},texSubImage3D:function(){try{e.texSubImage3D(...arguments)}catch(e){eB("WebGLState:",e)}},compressedTexSubImage2D:function(){try{e.compressedTexSubImage2D(...arguments)}catch(e){eB("WebGLState:",e)}},compressedTexSubImage3D:function(){try{e.compressedTexSubImage3D(...arguments)}catch(e){eB("WebGLState:",e)}},scissor:function(t){!1===N.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),N.copy(t))},viewport:function(t){!1===U.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),U.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),i.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={},I=null,D={},l={},u=new WeakMap,c=[],d=null,h=!1,p=null,f=null,m=null,g=null,v=null,y=null,x=null,b=new nw(0,0,0),S=0,_=!1,w=null,M=null,T=null,E=null,A=null,N.set(0,0,e.canvas.width,e.canvas.height),U.set(0,0,e.canvas.width,e.canvas.height),n.reset(),i.reset(),r.reset()}}}function cJ(e,t,n,i,r,a,s){let o,l=t.has("WEBGL_multisampled_render_to_texture")?t.get("WEBGL_multisampled_render_to_texture"):null,u="undefined"!=typeof navigator&&/OculusBrowser/g.test(navigator.userAgent),c=new eQ,d=new WeakMap,h=new WeakMap,p=!1;try{p="undefined"!=typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(e){}function f(e,t){return p?new OffscreenCanvas(e,t):eR("canvas")}function m(e,t,n){let i=1,r=V(e);if((r.width>n||r.height>n)&&(i=n/Math.max(r.width,r.height)),i<1)if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap||"undefined"!=typeof VideoFrame&&e instanceof VideoFrame){let n=Math.floor(i*r.width),a=Math.floor(i*r.height);void 0===o&&(o=f(n,a));let s=t?f(n,a):o;return s.width=n,s.height=a,s.getContext("2d").drawImage(e,0,0,n,a),ek("WebGLRenderer: Texture has been resized from ("+r.width+"x"+r.height+") to ("+n+"x"+a+")."),s}else"data"in e&&ek("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 y(n,i,r,a,s=!1){if(null!==n){if(void 0!==e[n])return e[n];ek("WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let o=i;if(i===e.RED&&(r===e.FLOAT&&(o=e.R32F),r===e.HALF_FLOAT&&(o=e.R16F),r===e.UNSIGNED_BYTE&&(o=e.R8)),i===e.RED_INTEGER&&(r===e.UNSIGNED_BYTE&&(o=e.R8UI),r===e.UNSIGNED_SHORT&&(o=e.R16UI),r===e.UNSIGNED_INT&&(
364o=e.R32UI),r===e.BYTE&&(o=e.R8I),r===e.SHORT&&(o=e.R16I),r===e.INT&&(o=e.R32I)),i===e.RG&&(r===e.FLOAT&&(o=e.RG32F),r===e.HALF_FLOAT&&(o=e.RG16F),r===e.UNSIGNED_BYTE&&(o=e.RG8)),i===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)),i===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)),i===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)),i===e.RGB&&(r===e.UNSIGNED_INT_5_9_9_9_REV&&(o=e.RGB9_E5),r===e.UNSIGNED_INT_10F_11F_11F_REV&&(o=e.R11F_G11F_B10F)),i===e.RGBA){let t=s?eb:e8.getTransfer(a);r===e.FLOAT&&(o=e.RGBA32F),r===e.HALF_FLOAT&&(o=e.RGBA16F),r===e.UNSIGNED_BYTE&&(o=t===eS?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 x(t,n){let i;return t?null===n||1014===n||1020===n?i=e.DEPTH24_STENCIL8:1015===n?i=e.DEPTH32F_STENCIL8:1012===n&&(i=e.DEPTH24_STENCIL8,ek("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===n||1014===n||1020===n?i=e.DEPTH_COMPONENT24:1015===n?i=e.DEPTH_COMPONENT32F:1012===n&&(i=e.DEPTH_COMPONENT16),i}function b(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 S(e){let t=e.target;t.removeEventListener("dispose",S),function(e){let t=i.get(e);if(void 0===t.__webglInit)return;let n=e.source,r=h.get(n);if(r){let i=r[t.__cacheKey];i.usedTimes--,0===i.usedTimes&&w(e),0===Object.keys(r).length&&h.delete(n)}i.remove(e)}(t),t.isVideoTexture&&d.delete(t)}function _(t){let n=t.target;n.removeEventListener("dispose",_),function(t){let n=i.get(t);if(t.depthTexture&&(t.depthTexture.dispose(),i.remove(t.depthTexture)),t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++){if(Array.isArray(n.__webglFramebuffer[t]))for(let i=0;i<n.__webglFramebuffer[t].length;i++)e.deleteFramebuffer(n.__webglFramebuffer[t][i]);else e.deleteFramebuffer(n.__webglFramebuffer[t]);n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer[t])}else{if(Array.isArray(n.__webglFramebuffer))for(let t=0;t<n.__webglFramebuffer.length;t++)e.deleteFramebuffer(n.__webglFramebuffer[t]);else e.deleteFramebuffer(n.__webglFramebuffer);if(n.__webglDepthbuffer&&e.deleteRenderbuffer(n.__webglDepthbuffer),n.__webglMultisampledFramebuffer&&e.deleteFramebuffer(n.__webglMultisampledFramebuffer),n.__webglColorRenderbuffer)for(let t=0;t<n.__webglColorRenderbuffer.length;t++)n.__webglColorRenderbuffer[t]&&e.deleteRenderbuffer(n.__webglColorRenderbuffer[t]);n.__webglDepthRenderbuffer&&e.deleteRenderbuffer(n.__webglDepthRenderbuffer)}let r=t.textures;for(let t=0,n=r.length;t<n;t++){let n=i.get(r[t]);n.__webglTexture&&(e.deleteTexture(n.__webglTexture),s.memory.textures--),i.remove(r[t])}i.remove(t)}(n)}function w(t){let n=i.get(t);e.deleteTexture(n.__webglTexture);let r=t.source,a=h.get(r);delete a[n.__cacheKey],s.memory.textures--}let M=0;function T(t,r){var a;let o,l=i.get(t);if(t.isVideoTexture&&(a=t,o=s.render.frame,d.get(a)!==o&&(d.set(a,o),a.update())),!1===t.isRenderTargetTexture&&!0!==t.isExternalTexture&&t.version>0&&l.__version!==t.version){let e=t.image;if(null===e)ek("WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==e.complete)return void D(l,t,r);ek("WebGLRenderer: Texture marked for update but image is incomplete")}}else t.isExternalTexture&&(l.__webglTexture=t.sourceTexture?t.sourceTexture:null);n.bindTexture(e.TEXTURE_2D,l.__webglTexture,e.TEXTURE0+r)}let E={1e3:e.REPEAT,1001:e.CLAMP_TO_EDGE,1002:e.MIRRORED_REPEAT},A={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 P(n,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)&&ek("WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),e.texParameteri(n,e.TEXTURE_WRAP_S,E[a.wrapS]),e.texParameteri(n,e.TEXTURE_WRAP_T,E[a.wrapT]),(n===e.TEXTURE_3D||n===e.TEXTURE_2D_ARRAY)&&e.texParameteri(n,e.TEXTURE_WRAP_R,E[a.wrapR]),e.texParameteri(n,e.TEXTURE_MAG_FILTER,A[a.magFilter]),e.texParameteri(n,e.TEXTURE_MIN_FILTER,A[a.minFilter]),a.compareFunction&&(e.texParameteri(n,e.TEXTURE_COMPARE_MODE,e.COMPARE_REF_TO_TEXTURE),e.texParameteri(n,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||i.get(a).__currentAnisotropy)){let s=t.get("EXT_texture_filter_anisotropic");e.texParameterf(n,s.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,r.getMaxAnisotropy())),i.get(a).__currentAnisotropy=a.anisotropy}}function R(t,n){let i,r=!1;void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",S));let a=n.source,o=h.get(a);void 0===o&&(o={},h.set(a,o));let l=((i=[]).push(n.wrapS),i.push(n.wrapT),i.push(n.wrapR||0),i.push(n.magFilter),i.push(n.minFilter),i.push(n.anisotropy),i.push(n.internalFormat),i.push(n.format),i.push(n.type),i.push(n.generateMipmaps),i.push(n.premultiplyAlpha),i.push(n.flipY),i.push(n.unpackAlignment),i.push(n.colorSpace),i.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 i=o[t.__cacheKey];void 0!==i&&(o[t.__cacheKey].usedTimes--,0===i.usedTimes&&w(n)),t.__cacheKey=l,t.__webglTexture=o[l].texture}return r}function I(e,t,n){return Math.floor(Math.floor(e/n)/t)}
364function 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=R(t,s),c=s.source;n.bindTexture(l,t.__webglTexture,e.TEXTURE0+o);let d=i.get(c);if(c.version!==d.__version||!0===u){let t;n.activeTexture(e.TEXTURE0+o);let i=e8.getPrimaries(e8.workingColorSpace),h=""===s.colorSpace?null:e8.getPrimaries(s.colorSpace),p=""===s.colorSpace||i===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,p);let f=m(s.image,!1,r.maxTextureSize);f=H(s,f);let S=a.convert(s.format,s.colorSpace),_=a.convert(s.type),w=y(s.internalFormat,S,_,s.colorSpace,s.isVideoTexture);P(l,s);let M=s.mipmaps,T=!0!==s.isVideoTexture,E=void 0===d.__version||!0===u,A=c.dataReady,C=b(s,f);if(s.isDepthTexture)w=x(1027===s.format,s.type),E&&(T?n.texStorage2D(e.TEXTURE_2D,1,w,f.width,f.height):n.texImage2D(e.TEXTURE_2D,0,w,f.width,f.height,0,S,_,null));else if(s.isDataTexture)if(M.length>0){T&&E&&n.texStorage2D(e.TEXTURE_2D,C,w,M[0].width,M[0].height);for(let i=0,r=M.length;i<r;i++)t=M[i],T?A&&n.texSubImage2D(e.TEXTURE_2D,i,0,0,t.width,t.height,S,_,t.data):n.texImage2D(e.TEXTURE_2D,i,w,t.width,t.height,0,S,_,t.data);s.generateMipmaps=!1}else T?(E&&n.texStorage2D(e.TEXTURE_2D,C,w,f.width,f.height),A&&function(t,i,r,a){let s=t.updateRanges;if(0===s.length)n.texSubImage2D(e.TEXTURE_2D,0,0,0,i.width,i.height,r,a,i.data);else{s.sort((e,t)=>e.start-t.start);let o=0;for(let e=1;e<s.length;e++){let t=s[o],n=s[e],r=t.start+t.count,a=I(n.start,i.width,4),l=I(t.start,i.width,4);n.start<=r+1&&a===l&&I(n.start+n.count-1,i.width,4)===a?t.count=Math.max(t.count,n.start+n.count-t.start):s[++o]=n}s.length=o+1;let l=e.getParameter(e.UNPACK_ROW_LENGTH),u=e.getParameter(e.UNPACK_SKIP_PIXELS),c=e.getParameter(e.UNPACK_SKIP_ROWS);e.pixelStorei(e.UNPACK_ROW_LENGTH,i.width);for(let t=0,o=s.length;t<o;t++){let o=s[t],l=Math.floor(o.start/4),u=Math.ceil(o.count/4),c=l%i.width,d=Math.floor(l/i.width);e.pixelStorei(e.UNPACK_SKIP_PIXELS,c),e.pixelStorei(e.UNPACK_SKIP_ROWS,d),n.texSubImage2D(e.TEXTURE_2D,0,c,d,u,1,r,a,i.data)}t.clearUpdateRanges(),e.pixelStorei(e.UNPACK_ROW_LENGTH,l),e.pixelStorei(e.UNPACK_SKIP_PIXELS,u),e.pixelStorei(e.UNPACK_SKIP_ROWS,c)}}(s,f,S,_)):n.texImage2D(e.TEXTURE_2D,0,w,f.width,f.height,0,S,_,f.data);else if(s.isCompressedTexture)if(s.isCompressedArrayTexture){T&&E&&n.texStorage3D(e.TEXTURE_2D_ARRAY,C,w,M[0].width,M[0].height,f.depth);for(let i=0,r=M.length;i<r;i++)if(t=M[i],1023!==s.format)if(null!==S)if(T){if(A)if(s.layerUpdates.size>0){let r=lk(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);n.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,i,0,0,a,t.width,t.height,1,S,s)}s.clearLayerUpdates()}else n.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,i,0,0,0,t.width,t.height,f.depth,S,t.data)}else n.compressedTexImage3D(e.TEXTURE_2D_ARRAY,i,w,t.width,t.height,f.depth,0,t.data,0,0);else ek("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else T?A&&n.texSubImage3D(e.TEXTURE_2D_ARRAY,i,0,0,0,t.width,t.height,f.depth,S,_,t.data):n.texImage3D(e.TEXTURE_2D_ARRAY,i,w,t.width,t.height,f.depth,0,S,_,t.data)}else{T&&E&&n.texStorage2D(e.TEXTURE_2D,C,w,M[0].width,M[0].height);for(let i=0,r=M.length;i<r;i++)t=M[i],1023!==s.format?null!==S?T?A&&n.compressedTexSubImage2D(e.TEXTURE_2D,i,0,0,t.width,t.height,S,t.data):n.compressedTexImage2D(e.TEXTURE_2D,i,w,t.width,t.height,0,t.data):ek("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):T?A&&n.texSubImage2D(e.TEXTURE_2D,i,0,0,t.width,t.height,S,_,t.data):n.texImage2D(e.TEXTURE_2D,i,w,t.width,t.height,0,S,_,t.data)}else if(s.isDataArrayTexture)if(T){if(E&&n.texStorage3D(e.TEXTURE_2D_ARRAY,C,w,f.width,f.height,f.depth),A)if(s.layerUpdates.size>0){let t=lk(f.width,f.height,s.format,s.type);for(let i of s.layerUpdates){let r=f.data.subarray(i*t/f.data.BYTES_PER_ELEMENT,(i+1)
364*t/f.data.BYTES_PER_ELEMENT);n.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,i,f.width,f.height,1,S,_,r)}s.clearLayerUpdates()}else n.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,0,f.width,f.height,f.depth,S,_,f.data)}else n.texImage3D(e.TEXTURE_2D_ARRAY,0,w,f.width,f.height,f.depth,0,S,_,f.data);else if(s.isData3DTexture)T?(E&&n.texStorage3D(e.TEXTURE_3D,C,w,f.width,f.height,f.depth),A&&n.texSubImage3D(e.TEXTURE_3D,0,0,0,0,f.width,f.height,f.depth,S,_,f.data)):n.texImage3D(e.TEXTURE_3D,0,w,f.width,f.height,f.depth,0,S,_,f.data);else if(s.isFramebufferTexture){if(E)if(T)n.texStorage2D(e.TEXTURE_2D,C,w,f.width,f.height);else{let t=f.width,i=f.height;for(let r=0;r<C;r++)n.texImage2D(e.TEXTURE_2D,r,w,t,i,0,S,_,null),t>>=1,i>>=1}}else if(M.length>0){if(T&&E){let t=V(M[0]);n.texStorage2D(e.TEXTURE_2D,C,w,t.width,t.height)}for(let i=0,r=M.length;i<r;i++)t=M[i],T?A&&n.texSubImage2D(e.TEXTURE_2D,i,0,0,S,_,t):n.texImage2D(e.TEXTURE_2D,i,w,S,_,t);s.generateMipmaps=!1}else if(T){if(E){let t=V(f);n.texStorage2D(e.TEXTURE_2D,C,w,t.width,t.height)}A&&n.texSubImage2D(e.TEXTURE_2D,0,0,0,S,_,f)}else n.texImage2D(e.TEXTURE_2D,0,w,S,_,f);g(s)&&v(l),d.__version=c.version,s.onUpdate&&s.onUpdate(s)}t.__version=s.version}function L(t,r,s,o,u,c){let d=a.convert(s.format,s.colorSpace),h=a.convert(s.type),p=y(s.internalFormat,d,h,s.colorSpace),f=i.get(r),m=i.get(s);if(m.__renderTarget=r,!f.__hasExternalTextures){let t=Math.max(1,r.width>>c),i=Math.max(1,r.height>>c);u===e.TEXTURE_3D||u===e.TEXTURE_2D_ARRAY?n.texImage3D(u,c,p,t,i,r.depth,0,d,h,null):n.texImage2D(u,c,p,t,i,0,d,h,null)}n.bindFramebuffer(e.FRAMEBUFFER,t),z(r)?l.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,o,u,m.__webglTexture,0,O(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),n.bindFramebuffer(e.FRAMEBUFFER,null)}function F(t,n,i){if(e.bindRenderbuffer(e.RENDERBUFFER,t),n.depthBuffer){let r=n.depthTexture,a=r&&r.isDepthTexture?r.type:null,s=x(n.stencilBuffer,a),o=n.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT;z(n)?l.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,O(n),s,n.width,n.height):i?e.renderbufferStorageMultisample(e.RENDERBUFFER,O(n),s,n.width,n.height):e.renderbufferStorage(e.RENDERBUFFER,s,n.width,n.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,o,e.RENDERBUFFER,t)}else{let t=n.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=y(s.internalFormat,o,u,s.colorSpace);z(n)?l.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,O(n),c,n.width,n.height):i?e.renderbufferStorageMultisample(e.RENDERBUFFER,O(n),c,n.width,n.height):e.renderbufferStorage(e.RENDERBUFFER,c,n.width,n.height)}}e.bindRenderbuffer(e.RENDERBUFFER,null)}function N(t,r,s){let o=!0===r.isWebGLCubeRenderTarget;if(n.bindFramebuffer(e.FRAMEBUFFER,t),!(r.depthTexture&&r.depthTexture.isDepthTexture))throw Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");let u=i.get(r.depthTexture);if(u.__renderTarget=r,u.__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),o){if(void 0===u.__webglInit&&(u.__webglInit=!0,r.depthTexture.addEventListener("dispose",S)),void 0===u.__webglTexture){let t;u.__webglTexture=e.createTexture(),n.bindTexture(e.TEXTURE_CUBE_MAP,u.__webglTexture),P(e.TEXTURE_CUBE_MAP,r.depthTexture);let i=a.convert(r.depthTexture.format),s=a.convert(r.depthTexture.type);1026===r.depthTexture.format?t=e.DEPTH_COMPONENT24:1027===r.depthTexture.format&&(t=e.DEPTH24_STENCIL8);for(let n=0;n<6;n++)e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+n,0,t,r.width,r.height,0,i,s,null)}}else T(r.depthTexture,0);let c=u.__webglTexture,d=O(r),h=o?e.TEXTURE_CUBE_MAP_POSITIVE_X+s:e.TEXTURE_2D,p=1027===r.depthTexture.format?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT;if(1026===r.depthTexture.format)z(r)?l.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,p,h,c,0,d):e.framebufferTexture2D(e.FRAMEBUFFER,p,h,c,0);else if(1027===r.depthTexture.format)z(r)?l.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,p,h,c,0,d):e.framebufferTexture2D(e.FRAMEBUFFER,p,h,c,0);else throw Error("Unknown depthTexture format")}
364function U(t){let r=i.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)for(let e=0;e<6;e++)N(r.__webglFramebuffer[e],t,e);else{let e=t.texture.mipmaps;e&&e.length>0?N(r.__webglFramebuffer[0],t,0):N(r.__webglFramebuffer,t,0)}else if(a){r.__webglDepthbuffer=[];for(let i=0;i<6;i++)if(n.bindFramebuffer(e.FRAMEBUFFER,r.__webglFramebuffer[i]),void 0===r.__webglDepthbuffer[i])r.__webglDepthbuffer[i]=e.createRenderbuffer(),F(r.__webglDepthbuffer[i],t,!1);else{let n=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,a=r.__webglDepthbuffer[i];e.bindRenderbuffer(e.RENDERBUFFER,a),e.framebufferRenderbuffer(e.FRAMEBUFFER,n,e.RENDERBUFFER,a)}}else{let i=t.texture.mipmaps;if(i&&i.length>0?n.bindFramebuffer(e.FRAMEBUFFER,r.__webglFramebuffer[0]):n.bindFramebuffer(e.FRAMEBUFFER,r.__webglFramebuffer),void 0===r.__webglDepthbuffer)r.__webglDepthbuffer=e.createRenderbuffer(),F(r.__webglDepthbuffer,t,!1);else{let n=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,i=r.__webglDepthbuffer;e.bindRenderbuffer(e.RENDERBUFFER,i),e.framebufferRenderbuffer(e.FRAMEBUFFER,n,e.RENDERBUFFER,i)}}n.bindFramebuffer(e.FRAMEBUFFER,null)}let k=[],B=[];function O(e){return Math.min(r.maxSamples,e.samples)}function z(e){let n=i.get(e);return e.samples>0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==n.__useRenderToTexture}function H(e,t){let n=e.colorSpace,i=e.format,r=e.type;return!0===e.isCompressedTexture||!0===e.isVideoTexture||n!==ex&&""!==n&&(e8.getTransfer(n)===eS?(1023!==i||1009!==r)&&ek("WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):eB("WebGLTextures: Unsupported texture color space:",n)),t}function V(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement?(c.width=e.naturalWidth||e.width,c.height=e.naturalHeight||e.height):"undefined"!=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=M;return e>=r.maxTextures&&ek("WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+r.maxTextures),M+=1,e},this.resetTextureUnits=function(){M=0},this.setTexture2D=T,this.setTexture2DArray=function(t,r){let a=i.get(t);!1===t.isRenderTargetTexture&&t.version>0&&a.__version!==t.version?D(a,t,r):(t.isExternalTexture&&(a.__webglTexture=t.sourceTexture?t.sourceTexture:null),n.bindTexture(e.TEXTURE_2D_ARRAY,a.__webglTexture,e.TEXTURE0+r))},this.setTexture3D=function(t,r){let a=i.get(t);!1===t.isRenderTargetTexture&&t.version>0&&a.__version!==t.version?D(a,t,r):n.bindTexture(e.TEXTURE_3D,a.__webglTexture,e.TEXTURE0+r)},this.setTextureCube=function(t,s){let o=i.get(t);!0!==t.isCubeDepthTexture&&t.version>0&&o.__version!==t.version?function(t,s,o){if(6!==s.image.length)return;let l=R(t,s),u=s.source;n.bindTexture(e.TEXTURE_CUBE_MAP,t.__webglTexture,e.TEXTURE0+o);let c=i.get(u);if(u.version!==c.__version||!0===l){let t;n.activeTexture(e.TEXTURE0+o);let i=e8.getPrimaries(e8.workingColorSpace),d=""===s.colorSpace?null:e8.getPrimaries(s.colorSpace),h=""===s.colorSpace||i===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,h);let p=s.isCompressedTexture||s.image[0].isCompressedTexture,f=s.image[0]&&s.image[0].isDataTexture,x=[];for(let e=0;e<6;e++)p||f?x[e]=f?s.image[e].image:s.image[e]:x[e]=m(s.image[e],!0,r.maxCubemapSize),x[e]=H(s,x[e]);let S=x[0],_=a.convert(s.format,s.colorSpace),w=a.convert(s.type),M=y(s.internalFormat,_,w,s.colorSpace),T=!0!==s.isVideoTexture,E=void 0===c.__version||!0===l,A=u.dataReady,C=b(s,S);if(P(e.TEXTURE_CUBE_MAP,s),p){T&&E&&n.texStorage2D(e.TEXTURE_CUBE_MAP,C,M,S.width,S.height);for(let i=0;i<6;i++){t=x[i].mipmaps;for(let r=0;r<t.length;r++){let a=t[r];1023!==s.format?null!==_?T?A&&n.compressedTexSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+i,r,0,0,a.width,a.height,_,a.data):n.compressedTexImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+i,r,M,a.width,a.height,0,a.data):ek("WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):T?A&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+i,r,0,0,a.width,a.height,_,w,a.data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+i,r,M,a.width,a.height,0,_,w,a.data)}}}else{if(t=s.mipmaps,T&&E){t.length>0&&C++;let i=V(x[0]);n.texStorage2D(e.TEXTURE_CUBE_MAP,C,M,i.width,i.height)}for(let i=0;i<6;i++)if(f){T?A&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,0,0,x[i].width,x[i].height,_,w,x[i].data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,M,x[i].width,x[i].height,0,_,w,x[i].data);for(let r=0;r<t.length;r++){let a=t[r].image[i].image;T?A&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+i,r+1,0,0,a.width,a.height,_,w,a.data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+i,r+1,M,a.width,a.height,0,_,w,a.data)}}else{T?A&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,0,0,_,w,x[i]):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,M,_,w,x[i]);for(let r=0;r<t.length;r++){let a=t[r];T?A&&n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+i,r+1,0,0,_,w,a.image[i]):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+i,r+1,M,_,w,a.image[i])}}}
vendor: 4,517 bytes, line 364
364g(s)&&v(e.TEXTURE_CUBE_MAP),c.__version=u.version,s.onUpdate&&s.onUpdate(s)}t.__version=s.version}(o,t,s):n.bindTexture(e.TEXTURE_CUBE_MAP,o.__webglTexture,e.TEXTURE0+s)},this.rebindTextures=function(t,n,r){let a=i.get(t);void 0!==n&&L(a.__webglFramebuffer,t,t.texture,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,0),void 0!==r&&U(t)},this.setupRenderTarget=function(t){let r=t.texture,o=i.get(t),l=i.get(r);t.addEventListener("dispose",_);let u=t.textures,c=!0===t.isWebGLCubeRenderTarget,d=u.length>1;if(!d&&(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 n=0;n<r.mipmaps.length;n++)o.__webglFramebuffer[t][n]=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(d)for(let t=0,n=u.length;t<n;t++){let n=i.get(u[t]);void 0===n.__webglTexture&&(n.__webglTexture=e.createTexture(),s.memory.textures++)}if(t.samples>0&&!1===z(t)){o.__webglMultisampledFramebuffer=e.createFramebuffer(),o.__webglColorRenderbuffer=[],n.bindFramebuffer(e.FRAMEBUFFER,o.__webglMultisampledFramebuffer);for(let n=0;n<u.length;n++){let i=u[n];o.__webglColorRenderbuffer[n]=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,o.__webglColorRenderbuffer[n]);let r=a.convert(i.format,i.colorSpace),s=a.convert(i.type),l=y(i.internalFormat,r,s,i.colorSpace,!0===t.isXRRenderTarget),c=O(t);e.renderbufferStorageMultisample(e.RENDERBUFFER,c,l,t.width,t.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+n,e.RENDERBUFFER,o.__webglColorRenderbuffer[n])}e.bindRenderbuffer(e.RENDERBUFFER,null),t.depthBuffer&&(o.__webglDepthRenderbuffer=e.createRenderbuffer(),F(o.__webglDepthRenderbuffer,t,!0)),n.bindFramebuffer(e.FRAMEBUFFER,null)}}if(c){n.bindTexture(e.TEXTURE_CUBE_MAP,l.__webglTexture),P(e.TEXTURE_CUBE_MAP,r);for(let n=0;n<6;n++)if(r.mipmaps&&r.mipmaps.length>0)for(let i=0;i<r.mipmaps.length;i++)L(o.__webglFramebuffer[n][i],t,r,e.COLOR_ATTACHMENT0,e.TEXTURE_CUBE_MAP_POSITIVE_X+n,i);else L(o.__webglFramebuffer[n],t,r,e.COLOR_ATTACHMENT0,e.TEXTURE_CUBE_MAP_POSITIVE_X+n,0);g(r)&&v(e.TEXTURE_CUBE_MAP),n.unbindTexture()}else if(d){for(let r=0,a=u.length;r<a;r++){let a=u[r],s=i.get(a),l=e.TEXTURE_2D;(t.isWebGL3DRenderTarget||t.isWebGLArrayRenderTarget)&&(l=t.isWebGL3DRenderTarget?e.TEXTURE_3D:e.TEXTURE_2D_ARRAY),n.bindTexture(l,s.__webglTexture),P(l,a),L(o.__webglFramebuffer,t,a,e.COLOR_ATTACHMENT0+r,l,0),g(a)&&v(l)}n.unbindTexture()}else{let i=e.TEXTURE_2D;if((t.isWebGL3DRenderTarget||t.isWebGLArrayRenderTarget)&&(i=t.isWebGL3DRenderTarget?e.TEXTURE_3D:e.TEXTURE_2D_ARRAY),n.bindTexture(i,l.__webglTexture),P(i,r),r.mipmaps&&r.mipmaps.length>0)for(let n=0;n<r.mipmaps.length;n++)L(o.__webglFramebuffer[n],t,r,e.COLOR_ATTACHMENT0,i,n);else L(o.__webglFramebuffer,t,r,e.COLOR_ATTACHMENT0,i,0);g(r)&&v(i),n.unbindTexture()}t.depthBuffer&&U(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=i.get(s).__webglTexture;n.bindTexture(r,a),v(r),n.unbindTexture()}}},this.updateMultisampleRenderTarget=function(t){if(t.samples>0){if(!1===z(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=i.get(t),d=r.length>1;if(d)for(let t=0;t<r.length;t++)n.bindFramebuffer(e.FRAMEBUFFER,c.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.RENDERBUFFER,null),n.bindFramebuffer(e.FRAMEBUFFER,c.__webglFramebuffer),e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.TEXTURE_2D,null,0);n.bindFramebuffer(e.READ_FRAMEBUFFER,c.__webglMultisampledFramebuffer);let h=t.texture.mipmaps;h&&h.length>0?n.bindFramebuffer(e.DRAW_FRAMEBUFFER,c.__webglFramebuffer[0]):n.bindFramebuffer(e.DRAW_FRAMEBUFFER,c.__webglFramebuffer);for(let n=0;n<r.length;n++){if(t.resolveDepthBuffer&&(t.depthBuffer&&(o|=e.DEPTH_BUFFER_BIT),t.stencilBuffer&&t.resolveStencilBuffer&&(o|=e.STENCIL_BUFFER_BIT)),d){e.framebufferRenderbuffer(e.READ_FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.RENDERBUFFER,c.__webglColorRen
364derbuffer[n]);let t=i.get(r[n]).__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&&(k.length=0,B.length=0,k.push(e.COLOR_ATTACHMENT0+n),t.depthBuffer&&!1===t.resolveDepthBuffer&&(k.push(l),B.push(l),e.invalidateFramebuffer(e.DRAW_FRAMEBUFFER,B)),e.invalidateFramebuffer(e.READ_FRAMEBUFFER,k))}if(n.bindFramebuffer(e.READ_FRAMEBUFFER,null),n.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),d)for(let t=0;t<r.length;t++){n.bindFramebuffer(e.FRAMEBUFFER,c.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.RENDERBUFFER,c.__webglColorRenderbuffer[t]);let a=i.get(r[t]).__webglTexture;n.bindFramebuffer(e.FRAMEBUFFER,c.__webglFramebuffer),e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.TEXTURE_2D,a,0)}n.bindFramebuffer(e.DRAW_FRAMEBUFFER,c.__webglMultisampledFramebuffer)}else if(t.depthBuffer&&!1===t.resolveDepthBuffer&&u){let n=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT;e.invalidateFramebuffer(e.DRAW_FRAMEBUFFER,[n])}}},this.setupDepthRenderbuffer=U,this.setupFrameBufferTexture=L,this.useMultisampledRTT=z,this.isReversedDepthBuffer=function(){return n.buffers.depth.getReversed()}}function cQ(e,t){return{convert:function(n,i=""){let r,a=e8.getTransfer(i);if(1009===n)return e.UNSIGNED_BYTE;if(1017===n)return e.UNSIGNED_SHORT_4_4_4_4;if(1018===n)return e.UNSIGNED_SHORT_5_5_5_1;if(35902===n)return e.UNSIGNED_INT_5_9_9_9_REV;if(35899===n)return e.UNSIGNED_INT_10F_11F_11F_REV;if(1010===n)return e.BYTE;if(1011===n)return e.SHORT;if(1012===n)return e.UNSIGNED_SHORT;if(1013===n)return e.INT;if(1014===n)return e.UNSIGNED_INT;if(1015===n)return e.FLOAT;if(n===ev)return e.HALF_FLOAT;if(1021===n)return e.ALPHA;if(1022===n)return e.RGB;if(1023===n)return e.RGBA;if(1026===n)return e.DEPTH_COMPONENT;if(1027===n)return e.DEPTH_STENCIL;if(1028===n)return e.RED;if(1029===n)return e.RED_INTEGER;if(1030===n)return e.RG;if(1031===n)return e.RG_INTEGER;if(1033===n)return e.RGBA_INTEGER;if(33776===n||33777===n||33778===n||33779===n)if(a===eS){if(null===(r=t.get("WEBGL_compressed_texture_s3tc_srgb")))return null;if(33776===n)return r.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(33777===n)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(33778===n)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(33779===n)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{if(null===(r=t.get("WEBGL_compressed_texture_s3tc")))return null;if(33776===n)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===n)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===n)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===n)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===n||35841===n||35842===n||35843===n){if(null===(r=t.get("WEBGL_compressed_texture_pvrtc")))return null;if(35840===n)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===n)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===n)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===n)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===n||37492===n||37496===n||37488===n||37489===n||37490===n||37491===n){if(null===(r=t.get("WEBGL_compressed_texture_etc")))return null;if(36196===n||37492===n)return a===eS?r.COMPRESSED_SRGB8_ETC2:r.COMPRESSED_RGB8_ETC2;if(37496===n)return a===eS?r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:r.COMPRESSED_RGBA8_ETC2_EAC;if(37488===n)return r.COMPRESSED_R11_EAC;if(37489===n)return r.COMPRESSED_SIGNED_R11_EAC;if(37490===n)return r.COMPRESSED_RG11_EAC;if(37491===n)return r.COMPRESSED_SIGNED_RG11_EAC}if(37808===n||37809===n||37810===n||37811===n||37812===n||37813===n||37814===n||37815===n||37816===n||37817===n||37818===n||37819===n||37820===n||37821===n){if(null===(r=t.get("WEBGL_compressed_texture_astc")))return null;if(37808===n)return a===eS?r.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:r.COMPRESSED_RGBA_ASTC_4x4_KHR;if(37809===n)return a===eS?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:r.COMPRESSED_RGBA_ASTC_5x4_KHR;if(37810===n)return a===eS?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:r.COMPRESSED_RGBA_ASTC_5x5_KHR;if(37811===n)return a===eS?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:r.COMPRESSED_RGBA_ASTC_6x5_KHR;if(37812===n)return a===eS?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:r.COMPRESSED_RGBA_ASTC_6x6_KHR;if(37813===n)return a===eS?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:r.COMPRESSED_RGBA_ASTC_8x5_KHR;if(37814===n)return a===eS?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:r.COMPRESSED_RGBA_ASTC_8x6_KHR;if(37815===n)return a===eS?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:r.COMPRESSED_RGBA_ASTC_8x8_KHR;if(37816===n)return a===eS?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:r.COMPRESSED_RGBA_ASTC_10x5_KHR;if(37817===n)return a===eS?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:r.COMPRESSED_RGBA_ASTC_10x6_KHR;if(37818===n)return a===eS?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:r.COMPRESSED_RGBA_ASTC_10x8_KHR;if(37819===n)return a===eS?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:r.COMPRESSED_RGBA_ASTC_10x10_KHR;if(37820===n)return a===eS?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:r.COMPRESSED_RGBA_ASTC_12x10_KHR;if(37821===n)return a===eS?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:r.COMPRESSED_RGBA_ASTC_12x12_KHR}if(36492===n||36494===n||36495===n){if(null===(r=t.get("EXT_texture_compression_bptc")))return null;if(36492===n)return a===eS?r.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:r.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(36494===n)return r.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(36495===n)return r.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}if(36283===n||36284===n||36285===n||36286===n){if(null===(r=t.get("EXT_texture_compression_rgtc")))return null;
364if(36283===n)return r.COMPRESSED_RED_RGTC1_EXT;if(36284===n)return r.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(36285===n)return r.COMPRESSED_RED_GREEN_RGTC2_EXT;if(36286===n)return r.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}return 1020===n?e.UNSIGNED_INT_24_8:void 0!==e[n]?e[n]:null}}}let c$=`
365void main() {
366
367	gl_Position = vec4( position, 1.0 );
368
369}`,c0=`
370uniform sampler2DArray depthColor;
371uniform float depthWidth;
372uniform float depthHeight;
373
374void main() {
375
376	vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight );
377
378	if ( coord.x >= 1.0 ) {
379
380		gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r;
381
382	} else {
383
384		gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r;
385
386	}
387
388}`;class c1{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t){if(null===this.texture){let n=new r7(e.texture);(e.depthNear!==t.depthNear||e.depthFar!==t.depthFar)&&(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=n}}getMesh(e){if(null!==this.texture&&null===this.mesh){let t=e.cameras[0].viewport,n=new il({vertexShader:c$,fragmentShader:c0,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new ie(new a5(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class c2 extends ez{constructor(e,t){super();const n=this;let i=null,r=1,a=null,s="local-floor",o=1,l=null,u=null,c=null,d=null,h=null,p=null;const f="undefined"!=typeof XRWebGLBinding,m=new c1,g={},v=t.getContextAttributes();let y=null,x=null;const b=[],S=[],_=new eQ;let w=null;const M=new ip;M.viewport=new to;const T=new ip;T.viewport=new to;const E=[M,T],A=new ox;let C=null,P=null;function R(e){let t=S.indexOf(e.inputSource);if(-1===t)return;let n=b[t];void 0!==n&&(n.update(e.inputSource,e.frame,l||a),n.dispatchEvent({type:e.type,data:e.inputSource}))}function I(){i.removeEventListener("select",R),i.removeEventListener("selectstart",R),i.removeEventListener("selectend",R),i.removeEventListener("squeeze",R),i.removeEventListener("squeezestart",R),i.removeEventListener("squeezeend",R),i.removeEventListener("end",I),i.removeEventListener("inputsourceschange",D);for(let e=0;e<b.length;e++){let t=S[e];null!==t&&(S[e]=null,b[e].disconnect(t))}for(let e in C=null,P=null,m.reset(),g)delete g[e];e.setRenderTarget(y),h=null,d=null,c=null,i=null,x=null,k.stop(),n.isPresenting=!1,e.setPixelRatio(w),e.setSize(_.width,_.height,!1),n.dispatchEvent({type:"sessionend"})}function D(e){for(let t=0;t<e.removed.length;t++){let n=e.removed[t],i=S.indexOf(n);i>=0&&(S[i]=null,b[i].disconnect(n))}for(let t=0;t<e.added.length;t++){let n=e.added[t],i=S.indexOf(n);if(-1===i){for(let e=0;e<b.length;e++)if(e>=S.length){S.push(n),i=e;break}else if(null===S[e]){S[e]=n,i=e;break}if(-1===i)break}let r=b[i];r&&r.connect(n)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=b[e];return void 0===t&&(t=new ib,b[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=b[e];return void 0===t&&(t=new ib,b[e]=t),t.getGripSpace()},this.getHand=function(e){let t=b[e];return void 0===t&&(t=new ib,b[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){r=e,!0===n.isPresenting&&ek("WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){s=e,!0===n.isPresenting&&ek("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!==d?d:h},this.getBinding=function(){return null===c&&f&&(c=new XRWebGLBinding(i,t)),c},this.getFrame=function(){return p},this.getSession=function(){return i},this.setSession=async function(u){if(null!==(i=u)){if(y=e.getRenderTarget(),i.addEventListener("select",R),i.addEventListener("selectstart",R),i.addEventListener("selectend",R),i.addEventListener("squeeze",R),i.addEventListener("squeezestart",R),i.addEventListener("squeezeend",R),i.addEventListener("end",I),i.addEventListener("inputsourceschange",D),!0!==v.xrC
388ompatible&&await t.makeXRCompatible(),w=e.getPixelRatio(),e.getSize(_),f&&"createProjectionLayer"in XRWebGLBinding.prototype){let n=null,a=null,s=null;v.depth&&(s=v.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,n=v.stencil?1027:1026,a=v.stencil?1020:1014);let o={colorFormat:t.RGBA8,depthFormat:s,scaleFactor:r};d=(c=this.getBinding()).createProjectionLayer(o),i.updateRenderState({layers:[d]}),e.setPixelRatio(1),e.setSize(d.textureWidth,d.textureHeight,!1),x=new tu(d.textureWidth,d.textureHeight,{format:1023,type:1009,depthTexture:new r8(d.textureWidth,d.textureHeight,a,void 0,void 0,void 0,void 0,void 0,void 0,n),stencilBuffer:v.stencil,colorSpace:e.outputColorSpace,samples:4*!!v.antialias,resolveDepthBuffer:!1===d.ignoreDepthValues,resolveStencilBuffer:!1===d.ignoreDepthValues})}else{let n={antialias:v.antialias,alpha:!0,depth:v.depth,stencil:v.stencil,framebufferScaleFactor:r};h=new XRWebGLLayer(i,t,n),i.updateRenderState({baseLayer:h}),e.setPixelRatio(1),e.setSize(h.framebufferWidth,h.framebufferHeight,!1),x=new tu(h.framebufferWidth,h.framebufferHeight,{format:1023,type:1009,colorSpace:e.outputColorSpace,stencilBuffer:v.stencil,resolveDepthBuffer:!1===h.ignoreDepthValues,resolveStencilBuffer:!1===h.ignoreDepthValues})}x.isXRRenderTarget=!0,this.setFoveation(o),l=null,a=await i.requestReferenceSpace(s),k.setContext(i),k.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(null!==i)return i.environmentBlendMode},this.getDepthTexture=function(){return m.getDepthTexture()};const L=new e0,F=new e0;function N(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,n,r;if(null===i)return;let a=e.near,s=e.far;null!==m.texture&&(m.depthNear>0&&(a=m.depthNear),m.depthFar>0&&(s=m.depthFar)),A.near=T.near=M.near=a,A.far=T.far=M.far=s,(C!==A.near||P!==A.far)&&(i.updateRenderState({depthNear:A.near,depthFar:A.far}),C=A.near,P=A.far),A.layers.mask=6|e.layers.mask,M.layers.mask=3&A.layers.mask,T.layers.mask=5&A.layers.mask;let o=e.parent,l=A.cameras;N(A,o);for(let e=0;e<l.length;e++)N(l[e],o);2===l.length?function(e,t,n){L.setFromMatrixPosition(t.matrixWorld),F.setFromMatrixPosition(n.matrixWorld);let i=L.distanceTo(F),r=t.projectionMatrix.elements,a=n.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],d=(a[8]+1)/a[0],h=i/(-c+d),p=-(h*c);if(t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(p),e.translateZ(h),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+h,n=o+h;e.projectionMatrix.makePerspective(s*c-p,s*d+(i-p),l*o/n*t,u*o/n*t,t,n),e.projectionMatrixInverse.copy(e.projectionMatrix).invert()}}(A,M,T):A.projectionMatrix.copy(M.projectionMatrix),t=e,n=A,null===(r=o)?t.matrix.copy(n.matrixWorld):(t.matrix.copy(r.matrixWorld),t.matrix.invert(),t.matrix.multiply(n.matrixWorld)),t.matrix.decompose(t.position,t.quaternion,t.scale),t.updateMatrixWorld(!0),t.projectionMatrix.copy(n.projectionMatrix),t.projectionMatrixInverse.copy(n.projectionMatrixInverse),t.isPerspectiveCamera&&(t.fov=2*ej*Math.atan(1/t.projectionMatrix.elements[5]),t.zoom=1)},this.getCamera=function(){return A},this.getFoveation=function(){if(null!==d||null!==h)return o},this.setFoveation=function(e){o=e,null!==d&&(d.fixedFoveation=e),null!==h&&void 0!==h.fixedFoveation&&(h.fixedFoveation=e)},this.hasDepthSensing=function(){return null!==m.texture},this.getDepthSensingMesh=function(){return m.getMesh(A)},this.getCameraTexture=function(e){return g[e]};let U=null;const k=new lO;k.setAnimationLoop(function(t,r){if(u=r.getViewerPose(l||a),p=r,null!==u){let t=u.views;null!==h&&(e.setRenderTargetFramebuffer(x,h.framebuffer),e.setRenderTarget(x));let r=!1;t.length!==A.cameras.length&&(A.cameras.length=0,r=!0);for(let n=0;n<t.length;n++){let i=t[n],a=null;if(null!==h)a=h.getViewport(i);else{let t=c.getViewSubImage(d,i);a=t.viewport,0===n&&(e.setRenderTargetTextures(x,t.colorTexture,t.depthStencilTexture),e.setRenderTarget(x))}let s=E[n];void 0===s&&((s=new ip).layers.enable(n),s.viewport=new to,E[n]=s),s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.quaternion,s.scale),s.projectionMatrix.fromArray(i.projectionMatrix),s.projectionMatrixInverse.copy(s.projectionMatrix).invert(),s.viewport.set(a.x,a.y,a.width,a.height),0===n&&(A.matrix.copy(s.matrix
388),A.matrix.decompose(A.position,A.quaternion,A.scale)),!0===r&&A.cameras.push(s)}let a=i.enabledFeatures;if(a&&a.includes("depth-sensing")&&"gpu-optimized"==i.depthUsage&&f){let e=(c=n.getBinding()).getDepthInformation(t[0]);e&&e.isValid&&e.texture&&m.init(e,i.renderState)}if(a&&a.includes("camera-access")&&f){e.state.unbindTexture(),c=n.getBinding();for(let e=0;e<t.length;e++){let n=t[e].camera;if(n){let e=g[n];e||(e=new r7,g[n]=e);let t=c.getCameraImage(n);e.sourceTexture=t}}}}for(let e=0;e<b.length;e++){let t=S[e],n=b[e];null!==t&&void 0!==n&&n.update(t,r,l||a)}U&&U(t,r),r.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:r}),p=null}),this.setAnimationLoop=function(e){U=e},this.dispose=function(){}}}let c3=new tJ,c4=new tH;function c5(e,t){function n(e,t){!0===e.matrixAutoUpdate&&e.updateMatrix(),t.value.copy(e.matrix)}function i(e,i){e.opacity.value=i.opacity,i.color&&e.diffuse.value.copy(i.color),i.emissive&&e.emissive.value.copy(i.emissive).multiplyScalar(i.emissiveIntensity),i.map&&(e.map.value=i.map,n(i.map,e.mapTransform)),i.alphaMap&&(e.alphaMap.value=i.alphaMap,n(i.alphaMap,e.alphaMapTransform)),i.bumpMap&&(e.bumpMap.value=i.bumpMap,n(i.bumpMap,e.bumpMapTransform),e.bumpScale.value=i.bumpScale,1===i.side&&(e.bumpScale.value*=-1)),i.normalMap&&(e.normalMap.value=i.normalMap,n(i.normalMap,e.normalMapTransform),e.normalScale.value.copy(i.normalScale),1===i.side&&e.normalScale.value.negate()),i.displacementMap&&(e.displacementMap.value=i.displacementMap,n(i.displacementMap,e.displacementMapTransform),e.displacementScale.value=i.displacementScale,e.displacementBias.value=i.displacementBias),i.emissiveMap&&(e.emissiveMap.value=i.emissiveMap,n(i.emissiveMap,e.emissiveMapTransform)),i.specularMap&&(e.specularMap.value=i.specularMap,n(i.specularMap,e.specularMapTransform)),i.alphaTest>0&&(e.alphaTest.value=i.alphaTest);let r=t.get(i),a=r.envMap,s=r.envMapRotation;a&&(e.envMap.value=a,c3.copy(s),c3.x*=-1,c3.y*=-1,c3.z*=-1,a.isCubeTexture&&!1===a.isRenderTargetTexture&&(c3.y*=-1,c3.z*=-1),e.envMapRotation.value.setFromMatrix4(c4.makeRotationFromEuler(c3)),e.flipEnvMap.value=a.isCubeTexture&&!1===a.isRenderTargetTexture?-1:1,e.reflectivity.value=i.reflectivity,e.ior.value=i.ior,e.refractionRatio.value=i.refractionRatio),i.lightMap&&(e.lightMap.value=i.lightMap,e.lightMapIntensity.value=i.lightMapIntensity,n(i.lightMap,e.lightMapTransform)),i.aoMap&&(e.aoMap.value=i.aoMap,e.aoMapIntensity.value=i.aoMapIntensity,n(i.aoMap,e.aoMapTransform))}return{refreshFogUniforms:function(t,n){n.color.getRGB(t.fogColor.value,is(e)),n.isFog?(t.fogNear.value=n.near,t.fogFar.value=n.far):n.isFogExp2&&(t.fogDensity.value=n.density)},refreshMaterialUniforms:function(e,r,a,s,o){var l,u,c,d,h,p,f,m,g,v,y,x,b,S,_,w,M,T,E,A,C,P,R;let I;r.isMeshBasicMaterial||r.isMeshLambertMaterial?i(e,r):r.isMeshToonMaterial?(i(e,r),l=e,(u=r).gradientMap&&(l.gradientMap.value=u.gradientMap)):r.isMeshPhongMaterial?(i(e,r),c=e,d=r,c.specular.value.copy(d.specular),c.shininess.value=Math.max(d.shininess,1e-4)):r.isMeshStandardMaterial?(i(e,r),h=e,p=r,h.metalness.value=p.metalness,p.metalnessMap&&(h.metalnessMap.value=p.metalnessMap,n(p.metalnessMap,h.metalnessMapTransform)),h.roughness.value=p.roughness,p.roughnessMap&&(h.roughnessMap.value=p.roughnessMap,n(p.roughnessMap,h.roughnessMapTransform)),p.envMap&&(h.envMapIntensity.value=p.envMapIntensity),r.isMeshPhysicalMaterial&&(f=e,m=r,g=o,f.ior.value=m.ior,m.sheen>0&&(f.sheenColor.value.copy(m.sheenColor).multiplyScalar(m.sheen),f.sheenRoughness.value=m.sheenRoughness,m.sheenColorMap&&(f.sheenColorMap.value=m.sheenColorMap,n(m.sheenColorMap,f.sheenColorMapTransform)),m.sheenRoughnessMap&&(f.sheenRoughnessMap.value=m.sheenRoughnessMap,n(m.sheenRoughnessMap,f.sheenRoughnessMapTransform))),m.clearcoat>0&&(f.clearcoat.value=m.clearcoat,f.clearcoatRoughness.value=m.clearcoatRoughness,m.clearcoatMap&&(f.clearcoatMap.value=m.clearcoatMap,n(m.clearcoatMap,f.clearcoatMapTransform)),m.clearcoatRoughnessMap&&(f.clearcoatRoughnessMap.value=m.clearcoatRoughnessMap,n(m.clearcoatRoughnessMap,f.clearcoatRoughnessMapTransform)),m.clearcoatNormalMap&&(f.clearcoatNormalMap.value=m.clearcoatNormalMap,n(m.clearcoatNormalMap,f.clearcoatNormalMapTransform),f.clearcoatNormalScale.value.copy(m.clearcoatNormalScale),1===m.side&&f.clearcoatNormalScale.value.negate())),m.dispersion>
3880&&(f.dispersion.value=m.dispersion),m.iridescence>0&&(f.iridescence.value=m.iridescence,f.iridescenceIOR.value=m.iridescenceIOR,f.iridescenceThicknessMinimum.value=m.iridescenceThicknessRange[0],f.iridescenceThicknessMaximum.value=m.iridescenceThicknessRange[1],m.iridescenceMap&&(f.iridescenceMap.value=m.iridescenceMap,n(m.iridescenceMap,f.iridescenceMapTransform)),m.iridescenceThicknessMap&&(f.iridescenceThicknessMap.value=m.iridescenceThicknessMap,n(m.iridescenceThicknessMap,f.iridescenceThicknessMapTransform))),m.transmission>0&&(f.transmission.value=m.transmission,f.transmissionSamplerMap.value=g.texture,f.transmissionSamplerSize.value.set(g.width,g.height),m.transmissionMap&&(f.transmissionMap.value=m.transmissionMap,n(m.transmissionMap,f.transmissionMapTransform)),f.thickness.value=m.thickness,m.thicknessMap&&(f.thicknessMap.value=m.thicknessMap,n(m.thicknessMap,f.thicknessMapTransform)),f.attenuationDistance.value=m.attenuationDistance,f.attenuationColor.value.copy(m.attenuationColor)),m.anisotropy>0&&(f.anisotropyVector.value.set(m.anisotropy*Math.cos(m.anisotropyRotation),m.anisotropy*Math.sin(m.anisotropyRotation)),m.anisotropyMap&&(f.anisotropyMap.value=m.anisotropyMap,n(m.anisotropyMap,f.anisotropyMapTransform))),f.specularIntensity.value=m.specularIntensity,f.specularColor.value.copy(m.specularColor),m.specularColorMap&&(f.specularColorMap.value=m.specularColorMap,n(m.specularColorMap,f.specularColorMapTransform)),m.specularIntensityMap&&(f.specularIntensityMap.value=m.specularIntensityMap,n(m.specularIntensityMap,f.specularIntensityMapTransform)))):r.isMeshMatcapMaterial?(i(e,r),v=e,(y=r).matcap&&(v.matcap.value=y.matcap)):r.isMeshDepthMaterial?i(e,r):r.isMeshDistanceMaterial?(i(e,r),x=e,b=r,I=t.get(b).light,x.referencePosition.value.setFromMatrixPosition(I.matrixWorld),x.nearDistance.value=I.shadow.camera.near,x.farDistance.value=I.shadow.camera.far):r.isMeshNormalMaterial?i(e,r):r.isLineBasicMaterial?(S=e,_=r,S.diffuse.value.copy(_.color),S.opacity.value=_.opacity,_.map&&(S.map.value=_.map,n(_.map,S.mapTransform)),r.isLineDashedMaterial&&(w=e,M=r,w.dashSize.value=M.dashSize,w.totalSize.value=M.dashSize+M.gapSize,w.scale.value=M.scale)):r.isPointsMaterial?(T=e,E=r,A=a,C=s,T.diffuse.value.copy(E.color),T.opacity.value=E.opacity,T.size.value=E.size*A,T.scale.value=.5*C,E.map&&(T.map.value=E.map,n(E.map,T.uvTransform)),E.alphaMap&&(T.alphaMap.value=E.alphaMap,n(E.alphaMap,T.alphaMapTransform)),E.alphaTest>0&&(T.alphaTest.value=E.alphaTest)):r.isSpriteMaterial?(P=e,R=r,P.diffuse.value.copy(R.color),P.opacity.value=R.opacity,P.rotation.value=R.rotation,R.map&&(P.map.value=R.map,n(R.map,P.mapTransform)),R.alphaMap&&(P.alphaMap.value=R.alphaMap,n(R.alphaMap,P.alphaMapTransform)),R.alphaTest>0&&(P.alphaTest.value=R.alphaTest)):r.isShadowMaterial?(e.color.value.copy(r.color),e.opacity.value=r.opacity):r.isShaderMaterial&&(r.uniformsNeedUpdate=!1)}}}function c6(e,t,n,i){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?ek("WebGLRenderer: Texture samplers can not be part of an uniforms group."):ek("WebGLRenderer: Unsupported uniform value type.",e),t}function u(t){let n=t.target;n.removeEventListener("dispose",u);let i=s.indexOf(n.__bindingPointIndex);s.splice(i,1),e.deleteBuffer(r[n.id]),delete r[n.id],delete a[n.id]}return{bind:function(e,t){let n=t.program;i.uniformBlockBinding(e,n)},update:function(n,c){var d;let h,p,f,m,g=r[n.id];void 0===g&&(function(e){let t=e.uniforms,n=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,t=i.length;e<t;e++){let t=i[e],r=Array.isArray(t.value)?t.value:[t.value];for(let e=0,i=r.length;e<i;e++){let i=l(r[e]),a=n%16,s=a%i.boundary,o=a+s;n+=s,0!==o&&16-o<i.storage&&(n+=16-o),t.__data=new Float32Array(i.storage/Float32Array.BYTES_PER_ELEMENT),t.__offset=n,n+=i.storage}}}let i=n%16;i>0&&(n+=16-i),e.__size=n,e.__cache={}}(n),(d=n).__bindingPointIndex=h=function(){for(let e=0;e<o;e++)if(-1===s.indexOf(e))return s.push(e),e;return eB("WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}(),p=e.createBuffer(),f=d.__size,m=d.usage,e.bindBuffer(e.UNIFORM_BUFFER,p),e.bufferData(e.UNIFORM_BUFFER,f,m),e.bindBuffer(e.UNIFORM_BUFFER,null),e.bindBufferBase(e.UNIFORM_BUFFER,h,p),g=p,r[n.id]=g,n.addEventListener("dispose",u));let v=c.program;i.updateUBOMapping(n,v);let y=t.render.frame;a[n.id]!==y&&(function(t){let n=r[t.id],i=t.uniforms,a=t.__cache;e.bindBuffer(e.UNIFORM_BUFFER,n);for(let t=0,n=i.length;t<n;t++){let n=Array.isArray(i[t])?i[t]:[i[t]];for(let i=0,r=n.length;i<r;i++){let r=n[i];if(!0===function(e,t,n,i){let r=e.value,a=t+"_"+n;if(void 0===i[a])return"number"==typeof r||"boolean"==typeof r?i[a]=r:i[a]=r.clone(),!0;{let e=i[a];if("number"==typeof r||"boolean"==typeof r){if(e!==r)return i[a]=r,!0}else if(!1===e.equals(r))return e.copy(r),!0}return!1}(r,t,i,a)){let t=r.__offset,n=Array.isArray(r.value)?r.value:[r.value],i=0;for(let a=0;a<n.length;a++){let s=n[a],o=l(s);"number"==typeof s||"boolean"==typeof s?(r.__data[0]=s,e.bufferSubData(e.UNIFORM_BUFFER,t+i,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,i),i+=o.storage/Float32Array.BYTES_PER_ELEMENT)}e.bufferSubData(e.UNIFORM_BUFFER,t,r.__data)}}}e.bindBuffer(e.UNIFORM_BUFFER,null)}(n),a[n.id]=y)},dispose:function(){for(let t in r)e.deleteBuffer(r[t]);s=[],r={},a={}}}}let c8=new Uint16Array([12469,15057,12620,14925,13266,14620,13807,14376,14323,13990,14545,13625,14713,13328,14840,12882,14931,12528,14996,12233,15039,11829,15066,11525,15080,11295,15085,10976,15082,10705,15073,10495,13880,14564,13898,14542,13977,14430,14158,14124,14393,13732,14556,13410,14702,12996,14814,12596,14891,12291,14937,11834,14957,11489,14958,11194,14943,10803,14921,10506,14893,10278,14858,9960,14484,14039,14487,14025,14499,13941,14524,13740,14574,13468,14654,13106,14743,12678,14818,12344,14867,11893,14889,11509,14893,11180,14881,10
388751,14852,10428,14812,10128,14765,9754,14712,9466,14764,13480,14764,13475,14766,13440,14766,13347,14769,13070,14786,12713,14816,12387,14844,11957,14860,11549,14868,11215,14855,10751,14825,10403,14782,10044,14729,9651,14666,9352,14599,9029,14967,12835,14966,12831,14963,12804,14954,12723,14936,12564,14917,12347,14900,11958,14886,11569,14878,11247,14859,10765,14828,10401,14784,10011,14727,9600,14660,9289,14586,8893,14508,8533,15111,12234,15110,12234,15104,12216,15092,12156,15067,12010,15028,11776,14981,11500,14942,11205,14902,10752,14861,10393,14812,9991,14752,9570,14682,9252,14603,8808,14519,8445,14431,8145,15209,11449,15208,11451,15202,11451,15190,11438,15163,11384,15117,11274,15055,10979,14994,10648,14932,10343,14871,9936,14803,9532,14729,9218,14645,8742,14556,8381,14461,8020,14365,7603,15273,10603,15272,10607,15267,10619,15256,10631,15231,10614,15182,10535,15118,10389,15042,10167,14963,9787,14883,9447,14800,9115,14710,8665,14615,8318,14514,7911,14411,7507,14279,7198,15314,9675,15313,9683,15309,9712,15298,9759,15277,9797,15229,9773,15166,9668,15084,9487,14995,9274,14898,8910,14800,8539,14697,8234,14590,7790,14479,7409,14367,7067,14178,6621,15337,8619,15337,8631,15333,8677,15325,8769,15305,8871,15264,8940,15202,8909,15119,8775,15022,8565,14916,8328,14804,8009,14688,7614,14569,7287,14448,6888,14321,6483,14088,6171,15350,7402,15350,7419,15347,7480,15340,7613,15322,7804,15287,7973,15229,8057,15148,8012,15046,7846,14933,7611,14810,7357,14682,7069,14552,6656,14421,6316,14251,5948,14007,5528,15356,5942,15356,5977,15353,6119,15348,6294,15332,6551,15302,6824,15249,7044,15171,7122,15070,7050,14949,6861,14818,6611,14679,6349,14538,6067,14398,5651,14189,5311,13935,4958,15359,4123,15359,4153,15356,4296,15353,4646,15338,5160,15311,5508,15263,5829,15188,6042,15088,6094,14966,6001,14826,5796,14678,5543,14527,5287,14377,4985,14133,4586,13869,4257,15360,1563,15360,1642,15358,2076,15354,2636,15341,3350,15317,4019,15273,4429,15203,4732,15105,4911,14981,4932,14836,4818,14679,4621,14517,4386,14359,4156,14083,3795,13808,3437,15360,122,15360,137,15358,285,15355,636,15344,1274,15322,2177,15281,2765,15215,3223,15120,3451,14995,3569,14846,3567,14681,3466,14511,3305,14344,3121,14037,2800,13753,2467,15360,0,15360,1,15359,21,15355,89,15346,253,15325,479,15287,796,15225,1148,15133,1492,15008,1749,14856,1882,14685,1886,14506,1783,14324,1608,13996,1398,13702,1183]),c9=null;class c7{constructor(e={}){let t,n,i,r,a,s,o,l,u,c,d,h,p,f,m,g,v,y,x,b,S,_,w,M,T;const{canvas:E=eI(),context:A=null,depth:C=!0,stencil:P=!1,alpha:R=!1,antialias:I=!1,premultipliedAlpha:D=!0,preserveDrawingBuffer:L=!1,powerPreference:F="default",failIfMajorPerformanceCaveat:N=!1,reversedDepthBuffer:U=!1,outputBufferType:k=1009}=e;if(this.isWebGLRenderer=!0,null!==A){if("undefined"!=typeof WebGLRenderingContext&&A instanceof WebGLRenderingContext)throw Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");t=A.getContextAttributes().alpha}else t=R;const B=new Set([1033,1031,1029]),O=new Set([1009,1014,1012,1020,1017,1018]),z=new Uint32Array(4),H=new Int32Array(4);let V=null,G=null;const j=[],W=[];let X=null;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.toneMapping=0,this.toneMappingExposure=1,this.transmissionResolutionScale=1;const q=this;let Y=!1;this._outputColorSpace=ey;let Z=0,K=0,J=null,Q=-1,$=null;const ee=new to,et=new to;let en=null;const ei=new nw(0);let er=0,ea=E.width,es=E.height,eo=1,el=null,eu=null;const ec=new to(0,0,ea,es),ed=new to(0,0,ea,es);let eh=!1;const ep=new rh;let ef=!1,em=!1;const eg=new tH,eb=new e0,eS=new to,e_={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let ew=!1;function eM(){return null===J?eo:1}let eT=A;function eE(e,t){return E.getContext(e,t)}try{if("setAttribute"in E&&E.setAttribute("data-engine","three.js r182"),E.addEventListener("webglcontextlost",eP,!1),E.addEventListener("webglcontextrestored",eR,!1),E.addEventListener("webglcontextcreationerror",eD,!1),null===eT){const e="webgl2";if(eT=eE(e,{alpha:!0,depth:C,stencil:P,antialias:I,premultipliedAlpha:D,preserveDrawingBuffer:L,powerPreference:F,failIfMajorPerformanceCaveat:N}),null===eT)if(eE(e))throw Error("Error creating WebGL context with your selected attributes.");else throw Error("Error creating WebGL context.")}}catch(e){throw eB("WebGLRenderer: "+e.message),e}function eA(){(n=new ur(eT)).init(),w=new cQ(eT,n),i=new lK(eT,n,e,w),r=new cK(eT,n),i.reversedDepthBuffer&&U&&r.buffers.depth.setReversed(!0),a=new uo(eT),s=new cD,o=new cJ(eT,n,r,s,i,w,a),l=new lQ(q),u=new ui(q),c=new lz(eT),M=new lY(eT,c),d=new ua(eT,c,a,M),h=new uu(eT,d,c,a),b=new ul(eT,i,o),v=new lJ(s),p=new cI(q,l,u,n,i,M,v),f=new c5(q,s),m=new cU,g=new cV(n),x=new lq(q,l,u,r,h,t,D),y=new cY(q,h,i),T=new c6(eT,a,i,r),S=new lZ(eT,n,a),_=new us(eT,n,a),a.programs=p.programs,q.capabilities=i,q.extensions=n,q.properties=s,q.renderLists=m,q.shadowMap=y,q.state=r,q.info=a}eA(),1009!==k&&(X=new ud(k,E.width,E.height,C,P));const eC=new c2(q,eT);function eP(e){e.preventDefault(),eU("WebGLRenderer: Context Lost."),Y=!0}function eR(){eU("WebGLRenderer: Context Restored."),Y=!1;let e=a.autoReset,t=y.enabled,n=y.autoUpdate,i=y.needsUpdate,r=y.type;eA(),a.autoReset=e,y.enabled=t,y.autoUpdate=n,y.needsUpdate=i,y.type=r}function eD(e){eB("WebGLRenderer: A WebGL context could not be created. Reason: ",e.statusMessage)}function eL(e){var t,n;let i,r=e.target;r.removeEventListener("dispose",eL),n=t=r,void 0!==(i=s.get(n).programs)&&(i.forEach(function(e){p.releaseProgram(e)}),n.isShaderMaterial&&p.releaseShaderCache(n)),s.remove(t)}function eF(e,t,n){!0===e.transparent&&2===e.side&&!1===e.forceSinglePass?(e.side=1,e.needsUpdate=!0,eY(e,t,n),e.side=0,e.needsUpdate=!0,eY(e,t,n),e.side=2):eY(e,t,n)}this.xr=eC,this.getContext=function(){return eT},this.getContextAttributes=function(){return eT.getContextAttributes()},this.forceContextLoss=function(){let e=n.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){let e=n.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return eo},this.setPixelRatio=function(e){void 0!==e&&(eo=e,this.setSize(ea,es,!1))}
388,this.getSize=function(e){return e.set(ea,es)},this.setSize=function(e,t,n=!0){eC.isPresenting?ek("WebGLRenderer: Can't change size while VR device is presenting."):(ea=e,es=t,E.width=Math.floor(e*eo),E.height=Math.floor(t*eo),!0===n&&(E.style.width=e+"px",E.style.height=t+"px"),null!==X&&X.setSize(E.width,E.height),this.setViewport(0,0,e,t))},this.getDrawingBufferSize=function(e){return e.set(ea*eo,es*eo).floor()},this.setDrawingBufferSize=function(e,t,n){ea=e,es=t,eo=n,E.width=Math.floor(e*n),E.height=Math.floor(t*n),this.setViewport(0,0,e,t)},this.setEffects=function(e){if(1009===k)return void console.error("THREE.WebGLRenderer: setEffects() requires outputBufferType set to HalfFloatType or FloatType.");if(e){for(let t=0;t<e.length;t++)if(!0===e[t].isOutputPass){console.warn("THREE.WebGLRenderer: OutputPass is not needed in setEffects(). Tone mapping and color space conversion are applied automatically.");break}}X.setEffects(e||[])},this.getCurrentViewport=function(e){return e.copy(ee)},this.getViewport=function(e){return e.copy(ec)},this.setViewport=function(e,t,n,i){e.isVector4?ec.set(e.x,e.y,e.z,e.w):ec.set(e,t,n,i),r.viewport(ee.copy(ec).multiplyScalar(eo).round())},this.getScissor=function(e){return e.copy(ed)},this.setScissor=function(e,t,n,i){e.isVector4?ed.set(e.x,e.y,e.z,e.w):ed.set(e,t,n,i),r.scissor(et.copy(ed).multiplyScalar(eo).round())},this.getScissorTest=function(){return eh},this.setScissorTest=function(e){r.setScissorTest(eh=e)},this.setOpaqueSort=function(e){el=e},this.setTransparentSort=function(e){eu=e},this.getClearColor=function(e){return e.copy(x.getClearColor())},this.setClearColor=function(){x.setClearColor(...arguments)},this.getClearAlpha=function(){return x.getClearAlpha()},this.setClearAlpha=function(){x.setClearAlpha(...arguments)},this.clear=function(e=!0,t=!0,n=!0){let i=0;if(e){let e=!1;if(null!==J){let t=J.texture.format;e=B.has(t)}if(e){let e=J.texture.type,t=O.has(e),n=x.getClearColor(),i=x.getClearAlpha(),r=n.r,a=n.g,s=n.b;t?(z[0]=r,z[1]=a,z[2]=s,z[3]=i,eT.clearBufferuiv(eT.COLOR,0,z)):(H[0]=r,H[1]=a,H[2]=s,H[3]=i,eT.clearBufferiv(eT.COLOR,0,H))}else i|=eT.COLOR_BUFFER_BIT}t&&(i|=eT.DEPTH_BUFFER_BIT),n&&(i|=eT.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(0xffffffff)),eT.clear(i)},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",eP,!1),E.removeEventListener("webglcontextrestored",eR,!1),E.removeEventListener("webglcontextcreationerror",eD,!1),x.dispose(),m.dispose(),g.dispose(),s.dispose(),l.dispose(),u.dispose(),h.dispose(),M.dispose(),T.dispose(),p.dispose(),eC.dispose(),eC.removeEventListener("sessionstart",ez),eC.removeEventListener("sessionend",eH),eV.stop()},this.renderBufferDirect=function(e,t,a,h,p,m){let g;null===t&&(t=e_);let y=p.isMesh&&0>p.matrixWorld.determinant(),x=function(e,t,n,a,c){var d,h;!0!==t.isScene&&(t=e_),o.resetTextureUnits();let p=t.fog,m=a.isMeshStandardMaterial?t.environment:null,g=null===J?q.outputColorSpace:!0===J.isXRRenderTarget?J.texture.colorSpace:ex,y=(a.isMeshStandardMaterial?u:l).get(a.envMap||m),x=!0===a.vertexColors&&!!n.attributes.color&&4===n.attributes.color.itemSize,S=!!n.attributes.tangent&&(!!a.normalMap||a.anisotropy>0),_=!!n.morphAttributes.position,w=!!n.morphAttributes.normal,M=!!n.morphAttributes.color,E=0;a.toneMapped&&(null===J||!0===J.isXRRenderTarget)&&(E=q.toneMapping);let A=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,C=void 0!==A?A.length:0,P=s.get(a),R=G.state.lights;if(!0===ef&&(!0===em||e!==$)){let t=e===$&&a.id===Q;v.setState(a,e,t)}let I=!1;a.version===P.__version?P.needsLights&&P.lightsStateVersion!==R.state.version||P.outputColorSpace!==g||c.isBatchedMesh&&!1===P.batching?I=!0:c.isBatchedMesh||!0!==P.batching?c.isBatchedMesh&&!0===P.batchingColor&&null===c.colorTexture||c.isBatchedMesh&&!1===P.batchingColor&&null!==c.colorTexture||c.isInstancedMesh&&!1===P.instancing?I=!0:c.isInstancedMesh||!0!==P.instancing?c.isSkinnedMesh&&
388!1===P.skinning?I=!0:c.isSkinnedMesh||!0!==P.skinning?c.isInstancedMesh&&!0===P.instancingColor&&null===c.instanceColor||c.isInstancedMesh&&!1===P.instancingColor&&null!==c.instanceColor||c.isInstancedMesh&&!0===P.instancingMorph&&null===c.morphTexture||c.isInstancedMesh&&!1===P.instancingMorph&&null!==c.morphTexture||P.envMap!==y||!0===a.fog&&P.fog!==p||void 0!==P.numClippingPlanes&&(P.numClippingPlanes!==v.numPlanes||P.numIntersection!==v.numIntersection)||P.vertexAlphas!==x||P.vertexTangents!==S||P.morphTargets!==_||P.morphNormals!==w||P.morphColors!==M||P.toneMapping!==E?I=!0:P.morphTargetsCount!==C&&(I=!0):I=!0:I=!0:I=!0:(I=!0,P.__version=a.version);let D=P.currentProgram;!0===I&&(D=eY(a,t,c));let L=!1,F=!1,N=!1,U=D.getUniforms(),k=P.uniforms;if(r.useProgram(D.program)&&(L=!0,F=!0,N=!0),a.id!==Q&&(Q=a.id,F=!0),L||$!==e){r.buffers.depth.getReversed()&&!0!==e.reversedDepth&&(e._reversedDepth=!0,e.updateProjectionMatrix()),U.setValue(eT,"projectionMatrix",e.projectionMatrix),U.setValue(eT,"viewMatrix",e.matrixWorldInverse);let t=U.map.cameraPosition;void 0!==t&&t.setValue(eT,eb.setFromMatrixPosition(e.matrixWorld)),i.logarithmicDepthBuffer&&U.setValue(eT,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),(a.isMeshPhongMaterial||a.isMeshToonMaterial||a.isMeshLambertMaterial||a.isMeshBasicMaterial||a.isMeshStandardMaterial||a.isShaderMaterial)&&U.setValue(eT,"isOrthographic",!0===e.isOrthographicCamera),$!==e&&($=e,F=!0,N=!0)}if(P.needsLights&&(R.state.directionalShadowMap.length>0&&U.setValue(eT,"directionalShadowMap",R.state.directionalShadowMap,o),R.state.spotShadowMap.length>0&&U.setValue(eT,"spotShadowMap",R.state.spotShadowMap,o),R.state.pointShadowMap.length>0&&U.setValue(eT,"pointShadowMap",R.state.pointShadowMap,o)),c.isSkinnedMesh){U.setOptional(eT,c,"bindMatrix"),U.setOptional(eT,c,"bindMatrixInverse");let e=c.skeleton;e&&(null===e.boneTexture&&e.computeBoneTexture(),U.setValue(eT,"boneTexture",e.boneTexture,o))}c.isBatchedMesh&&(U.setOptional(eT,c,"batchingTexture"),U.setValue(eT,"batchingTexture",c._matricesTexture,o),U.setOptional(eT,c,"batchingIdTexture"),U.setValue(eT,"batchingIdTexture",c._indirectTexture,o),U.setOptional(eT,c,"batchingColorTexture"),null!==c._colorsTexture&&U.setValue(eT,"batchingColorTexture",c._colorsTexture,o));let B=n.morphAttributes;if((void 0!==B.position||void 0!==B.normal||void 0!==B.color)&&b.update(c,n,D),(F||P.receiveShadow!==c.receiveShadow)&&(P.receiveShadow=c.receiveShadow,U.setValue(eT,"receiveShadow",c.receiveShadow)),a.isMeshGouraudMaterial&&null!==a.envMap&&(k.envMap.value=y,k.flipEnvMap.value=y.isCubeTexture&&!1===y.isRenderTargetTexture?-1:1),a.isMeshStandardMaterial&&null===a.envMap&&null!==t.environment&&(k.envMapIntensity.value=t.environmentIntensity),void 0!==k.dfgLUT&&(k.dfgLUT.value=(null===c9&&((c9=new i2(c8,16,16,1030,ev)).name="DFG_LUT",c9.minFilter=1006,c9.magFilter=1006,c9.wrapS=1001,c9.wrapT=1001,c9.generateMipmaps=!1,c9.needsUpdate=!0),c9)),F&&(U.setValue(eT,"toneMappingExposure",q.toneMappingExposure),P.needsLights&&(d=k,h=N,d.ambientLightColor.needsUpdate=h,d.lightProbe.needsUpdate=h,d.directionalLights.needsUpdate=h,d.directionalLightShadows.needsUpdate=h,d.pointLights.needsUpdate=h,d.pointLightShadows.needsUpdate=h,d.spotLights.needsUpdate=h,d.spotLightShadows.needsUpdate=h,d.rectAreaLights.needsUpdate=h,d.hemisphereLights.needsUpdate=h),p&&!0===a.fog&&f.refreshFogUniforms(k,p),f.refreshMaterialUniforms(k,a,eo,es,G.state.transmissionRenderTarget[e.id]),ca.upload(eT,eZ(P),k,o)),a.isShaderMaterial&&!0===a.uniformsNeedUpdate&&(ca.upload(eT,eZ(P),k,o),a.uniformsNeedUpdate=!1),a.isSpriteMaterial&&U.setValue(eT,"center",c.center),U.setValue(eT,"modelViewMatrix",c.modelViewMatrix),U.setValue(eT,"normalMatrix",c.normalMatrix),U.setValue(eT,"modelMatrix",c.matrixWorld),a.isShaderMaterial||a.isRawShaderMaterial){let e=a.uniformsGroups;for(let t=0,n=e.length;t<n;t++){let n=e[t];T.update(n,D),T.bind(n,D)}}return D}(e,t,a,h,p);r.setMaterial(h,y);let w=a.index,E=1;if(!0===h.wireframe){if(void 0===(w=d.getWireframeAttribute(a)))return;E=2}let A=a.drawRange,C=a.attributes.position,P=A.start*E,R=(A.start+A.count)*E;null!==m&&(P=Math.max(P,m.start*E),R=Math.min(R,(m.start+m.count)*E)),null!==w?(P=Math.max(P,0),R=Math.min(R,w.count)):null!=C&&(P=Math.max(P,0),R=Math.min(R,C.count));let I=R-P;if(I<0||I===1/0)return;M.setup(p,h,x,a,w);let D=S;
388if(null!==w&&(g=c.get(w),(D=_).setIndex(g)),p.isMesh)!0===h.wireframe?(r.setLineWidth(h.wireframeLinewidth*eM()),D.setMode(eT.LINES)):D.setMode(eT.TRIANGLES);else if(p.isLine){let e=h.linewidth;void 0===e&&(e=1),r.setLineWidth(e*eM()),p.isLineSegments?D.setMode(eT.LINES):p.isLineLoop?D.setMode(eT.LINE_LOOP):D.setMode(eT.LINE_STRIP)}else p.isPoints?D.setMode(eT.POINTS):p.isSprite&&D.setMode(eT.TRIANGLES);if(p.isBatchedMesh)if(null!==p._multiDrawInstances)eO("WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),D.renderMultiDrawInstances(p._multiDrawStarts,p._multiDrawCounts,p._multiDrawCount,p._multiDrawInstances);else if(n.get("WEBGL_multi_draw"))D.renderMultiDraw(p._multiDrawStarts,p._multiDrawCounts,p._multiDrawCount);else{let e=p._multiDrawStarts,t=p._multiDrawCounts,n=p._multiDrawCount,i=w?c.get(w).bytesPerElement:1,r=s.get(h).currentProgram.getUniforms();for(let a=0;a<n;a++)r.setValue(eT,"_gl_DrawID",a),D.render(e[a]/i,t[a])}else if(p.isInstancedMesh)D.renderInstances(P,I,p.count);else if(a.isInstancedBufferGeometry){let e=void 0!==a._maxInstanceCount?a._maxInstanceCount:1/0,t=Math.min(a.instanceCount,e);D.renderInstances(P,I,t)}else D.render(P,I)},this.compile=function(e,t,n=null){null===n&&(n=e),(G=g.get(n)).init(t),W.push(G),n.traverseVisible(function(e){e.isLight&&e.layers.test(t.layers)&&(G.pushLight(e),e.castShadow&&G.pushShadow(e))}),e!==n&&e.traverseVisible(function(e){e.isLight&&e.layers.test(t.layers)&&(G.pushLight(e),e.castShadow&&G.pushShadow(e))}),G.setupLights();let i=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];eF(a,n,e),i.add(a)}else eF(t,n,e),i.add(t)}),G=W.pop(),i},this.compileAsync=function(e,t,i=null){let r=this.compile(e,t,i);return new Promise(t=>{function i(){(r.forEach(function(e){s.get(e).currentProgram.isReady()&&r.delete(e)}),0===r.size)?t(e):setTimeout(i,10)}null!==n.get("KHR_parallel_shader_compile")?i():setTimeout(i,10)})};let eN=null;function ez(){eV.stop()}function eH(){eV.start()}const eV=new lO;function eG(e,t,n,i){if(!1===e.visible)return;if(e.layers.test(t.layers)){if(e.isGroup)n=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||ep.intersectsSprite(e)){i&&eS.setFromMatrixPosition(e.matrixWorld).applyMatrix4(eg);let t=h.update(e),r=e.material;r.visible&&V.push(e,t,r,n,eS.z,null)}}else if((e.isMesh||e.isLine||e.isPoints)&&(!e.frustumCulled||ep.intersectsObject(e))){let t=h.update(e),r=e.material;if(i&&(void 0!==e.boundingSphere?(null===e.boundingSphere&&e.computeBoundingSphere(),eS.copy(e.boundingSphere.center)):(null===t.boundingSphere&&t.computeBoundingSphere(),eS.copy(t.boundingSphere.center)),eS.applyMatrix4(e.matrixWorld).applyMatrix4(eg)),Array.isArray(r)){let i=t.groups;for(let a=0,s=i.length;a<s;a++){let s=i[a],o=r[s.materialIndex];o&&o.visible&&V.push(e,t,o,n,eS.z,s)}}else r.visible&&V.push(e,t,r,n,eS.z,null)}}let r=e.children;for(let e=0,a=r.length;e<a;e++)eG(r[e],t,n,i)}function ej(e,t,n,i){let{opaque:a,transmissive:s,transparent:o}=e;G.setupLightsView(n),!0===ef&&v.setGlobalState(q.clippingPlanes,n),i&&r.viewport(ee.copy(i)),a.length>0&&eX(a,t,n),s.length>0&&eX(s,t,n),o.length>0&&eX(o,t,n),r.buffers.depth.setTest(!0),r.buffers.depth.setMask(!0),r.buffers.color.setMask(!0),r.setPolygonOffset(!1)}function eW(e,t,r,a){if(null!==(!0===r.isScene?r.overrideMaterial:null))return;if(void 0===G.state.transmissionRenderTarget[a.id]){let e=n.has("EXT_color_buffer_half_float")||n.has("EXT_color_buffer_float");G.state.transmissionRenderTarget[a.id]=new tu(1,1,{generateMipmaps:!0,type:e?ev:1009,minFilter:1008,samples:i.samples,stencilBuffer:P,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:e8.workingColorSpace})}let s=G.state.transmissionRenderTarget[a.id],l=a.viewport||ee;s.setSize(l.z*q.transmissionResolutionScale,l.w*q.transmissionResolutionScale);let u=q.getRenderTarget(),c=q.getActiveCubeFace(),d=q.getActiveMipmapLevel();q.setRenderTarget(s),q.getClearColor(ei),(er=q.getClearAlpha())<1&&q.setClearColor(0xffffff,.5),q.clear(),ew&&x.render(r);let h=q.toneMapping;q.toneMapping=0;let p=a.viewport;if(void 0!==a.viewport&&(a.viewport=void 0),G.setupLightsView(a),!0===ef&&v.setGlobalState(q.clippingPlanes,a),eX(e,r,a),o.updateMultisampleRenderTarget(s),o.updateRenderTargetMipmap(s),!1===n.has("WEBGL_multisampled_render_to_texture")){let e=!1;for(let n=0,i=t.length;n<i;n++){let{object:i,geometry:s,material:o,group:l}=t[n];
388if(2===o.side&&i.layers.test(a.layers)){let t=o.side;o.side=1,o.needsUpdate=!0,eq(i,r,a,s,o,l),o.side=t,o.needsUpdate=!0,e=!0}}!0===e&&(o.updateMultisampleRenderTarget(s),o.updateRenderTargetMipmap(s))}q.setRenderTarget(u,c,d),q.setClearColor(ei,er),void 0!==p&&(a.viewport=p),q.toneMapping=h}function eX(e,t,n){let i=!0===t.isScene?t.overrideMaterial:null;for(let r=0,a=e.length;r<a;r++){let a=e[r],{object:s,geometry:o,group:l}=a,u=a.material;!0===u.allowOverride&&null!==i&&(u=i),s.layers.test(n.layers)&&eq(s,t,n,o,u,l)}}function eq(e,t,n,i,r,a){e.onBeforeRender(q,t,n,i,r,a),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),r.onBeforeRender(q,t,n,i,e,a),!0===r.transparent&&2===r.side&&!1===r.forceSinglePass?(r.side=1,r.needsUpdate=!0,q.renderBufferDirect(n,t,i,r,e,a),r.side=0,r.needsUpdate=!0,q.renderBufferDirect(n,t,i,r,e,a),r.side=2):q.renderBufferDirect(n,t,i,r,e,a),e.onAfterRender(q,t,n,i,r,a)}function eY(e,t,n){var i;!0!==t.isScene&&(t=e_);let r=s.get(e),a=G.state.lights,o=G.state.shadowsArray,c=a.state.version,d=p.getParameters(e,a.state,o,t,n),h=p.getProgramCacheKey(d),f=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===f&&(e.addEventListener("dispose",eL),r.programs=f=new Map);let m=f.get(h);if(void 0!==m){if(r.currentProgram===m&&r.lightsStateVersion===c)return eK(e,d),m}else d.uniforms=p.getUniforms(e),e.onBeforeCompile(d,q),m=p.acquireProgram(d,h),f.set(h,m),r.uniforms=d.uniforms;let g=r.uniforms;return(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(g.clippingPlanes=v.uniform),eK(e,d),r.needsLights=(i=e).isMeshLambertMaterial||i.isMeshToonMaterial||i.isMeshPhongMaterial||i.isMeshStandardMaterial||i.isShadowMaterial||i.isShaderMaterial&&!0===i.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 eZ(e){if(null===e.uniformsList){let t=e.currentProgram.getUniforms();e.uniformsList=ca.seqWithValue(t.seq,e.uniforms)}return e.uniformsList}function eK(e,t){let n=s.get(e);n.outputColorSpace=t.outputColorSpace,n.batching=t.batching,n.batchingColor=t.batchingColor,n.instancing=t.instancing,n.instancingColor=t.instancingColor,n.instancingMorph=t.instancingMorph,n.skinning=t.skinning,n.morphTargets=t.morphTargets,n.morphNormals=t.morphNormals,n.morphColors=t.morphColors,n.morphTargetsCount=t.morphTargetsCount,n.numClippingPlanes=t.numClippingPlanes,n.numIntersection=t.numClipIntersection,n.vertexAlphas=t.vertexAlphas,n.vertexTangents=t.vertexTangents,n.toneMapping=t.toneMapping}eV.setAnimationLoop(function(e){eN&&eN(e)}),"undefined"!=typeof self&&eV.setContext(self),this.setAnimationLoop=function(e){eN=e,eC.setAnimationLoop(e),null===e?eV.stop():eV.start()},eC.addEventListener("sessionstart",ez),eC.addEventListener("sessionend",eH),this.render=function(e,t){if(void 0!==t&&!0!==t.isCamera)return void eB("WebGLRenderer.render: camera is not an instance of THREE.Camera.");if(!0===Y)return;let n=!0===eC.enabled&&!0===eC.isPresenting,i=null!==X&&(null===J||n)&&X.begin(q,J);if(!0===e.matrixWorldAutoUpdate&&e.updateMatrixWorld(),null===t.parent&&!0===t.matrixWorldAutoUpdate&&t.updateMatrixWorld(),!0===eC.enabled&&!0===eC.isPresenting&&(null===X||!1===X.isCompositing(
388))&&(!0===eC.cameraAutoUpdate&&eC.updateCamera(t),t=eC.getCamera()),!0===e.isScene&&e.onBeforeRender(q,e,t,J),(G=g.get(e,W.length)).init(t),W.push(G),eg.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),ep.setFromProjectionMatrix(eg,2e3,t.reversedDepth),em=this.localClippingEnabled,ef=v.init(this.clippingPlanes,em),(V=m.get(e,j.length)).init(),j.push(V),!0===eC.enabled&&!0===eC.isPresenting){let e=q.xr.getDepthSensingMesh();null!==e&&eG(e,t,-1/0,q.sortObjects)}eG(e,t,0,q.sortObjects),V.finish(),!0===q.sortObjects&&V.sort(el,eu),(ew=!1===eC.enabled||!1===eC.isPresenting||!1===eC.hasDepthSensing())&&x.addToRenderList(V,e),this.info.render.frame++,!0===ef&&v.beginShadows();let r=G.state.shadowsArray;if(y.render(r,e,t),!0===ef&&v.endShadows(),!0===this.info.autoReset&&this.info.reset(),!1===(i&&X.hasRenderPass())){let n=V.opaque,i=V.transmissive;if(G.setupLights(),t.isArrayCamera){let r=t.cameras;if(i.length>0)for(let t=0,a=r.length;t<a;t++)eW(n,i,e,r[t]);ew&&x.render(e);for(let t=0,n=r.length;t<n;t++){let n=r[t];ej(V,e,n,n.viewport)}}else i.length>0&&eW(n,i,e,t),ew&&x.render(e),ej(V,e,t)}null!==J&&0===K&&(o.updateMultisampleRenderTarget(J),o.updateRenderTargetMipmap(J)),i&&X.end(q),!0===e.isScene&&e.onAfterRender(q,e,t),M.resetDefaultState(),Q=-1,$=null,W.pop(),W.length>0?(G=W[W.length-1],!0===ef&&v.setGlobalState(q.clippingPlanes,G.state.camera)):G=null,j.pop(),V=j.length>0?j[j.length-1]:null},this.getActiveCubeFace=function(){return Z},this.getActiveMipmapLevel=function(){return K},this.getRenderTarget=function(){return J},this.setRenderTargetTextures=function(e,t,n){let i=s.get(e);i.__autoAllocateDepthBuffer=!1===e.resolveDepthBuffer,!1===i.__autoAllocateDepthBuffer&&(i.__useRenderToTexture=!1),s.get(e.texture).__webglTexture=t,s.get(e.depthTexture).__webglTexture=i.__autoAllocateDepthBuffer?void 0:n,i.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(e,t){let n=s.get(e);n.__webglFramebuffer=t,n.__useDefaultFramebuffer=void 0===t};const eJ=eT.createFramebuffer();this.setRenderTarget=function(e,t=0,n=0){J=e,Z=t,K=n;let i=null,a=!1,l=!1;if(e){let u=s.get(e);if(void 0!==u.__useDefaultFramebuffer){r.bindFramebuffer(eT.FRAMEBUFFER,u.__webglFramebuffer),ee.copy(e.viewport),et.copy(e.scissor),en=e.scissorTest,r.viewport(ee),r.scissor(et),r.setScissorTest(en),Q=-1;return}if(void 0===u.__webglFramebuffer)o.setupRenderTarget(e);else if(u.__hasExternalTextures)o.rebindTextures(e,s.get(e.texture).__webglTexture,s.get(e.depthTexture).__webglTexture);else if(e.depthBuffer){let t=e.depthTexture;if(u.__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 c=e.texture;(c.isData3DTexture||c.isDataArrayTexture||c.isCompressedArrayTexture)&&(l=!0);let d=s.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(i=Array.isArray(d[t])?d[t][n]:d[t],a=!0):i=e.samples>0&&!1===o.useMultisampledRTT(e)?s.get(e).__webglMultisampledFramebuffer:Array.isArray(d)?d[n]:d,ee.copy(e.viewport),et.copy(e.scissor),en=e.scissorTest}else ee.copy(ec).multiplyScalar(eo).floor(),et.copy(ed).multiplyScalar(eo).floor(),en=eh;if(0!==n&&(i=eJ),r.bindFramebuffer(eT.FRAMEBUFFER,i)&&r.drawBuffers(e,i),r.viewport(ee),r.scissor(et),r.setScissorTest(en),a){let i=s.get(e.texture);eT.framebufferTexture2D(eT.FRAMEBUFFER,eT.COLOR_ATTACHMENT0,eT.TEXTURE_CUBE_MAP_POSITIVE_X+t,i.__webglTexture,n)}else if(l)for(let i=0;i<e.textures.length;i++){let r=s.get(e.textures[i]);eT.framebufferTextureLayer(eT.FRAMEBUFFER,eT.COLOR_ATTACHMENT0+i,r.__webglTexture,n,t)}else if(null!==e&&0!==n){let t=s.get(e.texture);eT.framebufferTexture2D(eT.FRAMEBUFFER,eT.COLOR_ATTACHMENT0,eT.TEXTURE_2D,t.__webglTexture,n)}Q=-1},this.readRenderTargetPixels=function(e,t,n,a,o,l,u,c=0){if(!(e&&e.isWebGLRenderTarget))return void eB("WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let d=s.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==u&&(d=d[u]),d){r.bindFramebuffer(eT.FRAMEBUFFER,d);try{let r=e.textures[c],s=r.format,u=r.type;if(!i.textureFormatReadable(s))return void eB("WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!i.textureTypeReadable(u))return void eB("WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");t>=0&&t<=e.width-a&&n>=0&&n<=e.height-o&&(e.textures.length>1&&eT.readBuffer(eT.COLOR_ATTACHMENT0+c),eT.readPixels(t,n,a,o,w.convert(s),w.convert(u),l))}finally{let e=null!==J?s.get(J).__webglFramebuffer:null;r.bindFramebuffer(eT.FRAMEBUFFER,e)}}},this.readRenderTargetPixelsAsync=async function(e,t,n,a,o,l,u,c=0){if(!(e&&e.isWebGLRenderTarget))throw Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let d=s.get(e).__webglFramebuffer;
388if(e.isWebGLCubeRenderTarget&&void 0!==u&&(d=d[u]),d)if(t>=0&&t<=e.width-a&&n>=0&&n<=e.height-o){var h;r.bindFramebuffer(eT.FRAMEBUFFER,d);let u=e.textures[c],p=u.format,f=u.type;if(!i.textureFormatReadable(p))throw Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!i.textureTypeReadable(f))throw Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");let m=eT.createBuffer();eT.bindBuffer(eT.PIXEL_PACK_BUFFER,m),eT.bufferData(eT.PIXEL_PACK_BUFFER,l.byteLength,eT.STREAM_READ),e.textures.length>1&&eT.readBuffer(eT.COLOR_ATTACHMENT0+c),eT.readPixels(t,n,a,o,w.convert(p),w.convert(f),0);let g=null!==J?s.get(J).__webglFramebuffer:null;r.bindFramebuffer(eT.FRAMEBUFFER,g);let v=eT.fenceSync(eT.SYNC_GPU_COMMANDS_COMPLETE,0);return eT.flush(),await (h=eT,new Promise(function(e,t){setTimeout(function n(){switch(h.clientWaitSync(v,h.SYNC_FLUSH_COMMANDS_BIT,0)){case h.WAIT_FAILED:t();break;case h.TIMEOUT_EXPIRED:setTimeout(n,4);break;default:e()}},4)})),eT.bindBuffer(eT.PIXEL_PACK_BUFFER,m),eT.getBufferSubData(eT.PIXEL_PACK_BUFFER,0,l),eT.deleteBuffer(m),eT.deleteSync(v),l}else throw Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(e,t=null,n=0){let i=Math.pow(2,-n),a=Math.floor(e.image.width*i),s=Math.floor(e.image.height*i),l=null!==t?t.x:0,u=null!==t?t.y:0;o.setTexture2D(e,0),eT.copyTexSubImage2D(eT.TEXTURE_2D,n,0,0,l,u,a,s),r.unbindTexture()};const eQ=eT.createFramebuffer(),e$=eT.createFramebuffer();this.copyTextureToTexture=function(e,t,n=null,i=null,a=0,l=null){let u,c,d,h,p,f,m,g,v,y;null===l&&(0!==a?(eO("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),l=a,a=0):l=0);let x=e.isCompressedTexture?e.mipmaps[l]:e.image;if(null!==n)u=n.max.x-n.min.x,c=n.max.y-n.min.y,d=n.isBox3?n.max.z-n.min.z:1,h=n.min.x,p=n.min.y,f=n.isBox3?n.min.z:0;else{let t=Math.pow(2,-a);u=Math.floor(x.width*t),c=Math.floor(x.height*t),d=e.isDataArrayTexture?x.depth:e.isData3DTexture?Math.floor(x.depth*t):1,h=0,p=0,f=0}null!==i?(m=i.x,g=i.y,v=i.z):(m=0,g=0,v=0);let b=w.convert(t.format),S=w.convert(t.type);t.isData3DTexture?(o.setTexture3D(t,0),y=eT.TEXTURE_3D):t.isDataArrayTexture||t.isCompressedArrayTexture?(o.setTexture2DArray(t,0),y=eT.TEXTURE_2D_ARRAY):(o.setTexture2D(t,0),y=eT.TEXTURE_2D),eT.pixelStorei(eT.UNPACK_FLIP_Y_WEBGL,t.flipY),eT.pixelStorei(eT.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.premultiplyAlpha),eT.pixelStorei(eT.UNPACK_ALIGNMENT,t.unpackAlignment);let _=eT.getParameter(eT.UNPACK_ROW_LENGTH),M=eT.getParameter(eT.UNPACK_IMAGE_HEIGHT),T=eT.getParameter(eT.UNPACK_SKIP_PIXELS),E=eT.getParameter(eT.UNPACK_SKIP_ROWS),A=eT.getParameter(eT.UNPACK_SKIP_IMAGES);eT.pixelStorei(eT.UNPACK_ROW_LENGTH,x.width),eT.pixelStorei(eT.UNPACK_IMAGE_HEIGHT,x.height),eT.pixelStorei(eT.UNPACK_SKIP_PIXELS,h),eT.pixelStorei(eT.UNPACK_SKIP_ROWS,p),eT.pixelStorei(eT.UNPACK_SKIP_IMAGES,f);let C=e.isDataArrayTexture||e.isData3DTexture,P=t.isDataArrayTexture||t.isData3DTexture;if(e.isDepthTexture){let n=s.get(e),i=s.get(t),o=s.get(n.__renderTarget),y=s.get(i.__renderTarget);r.bindFramebuffer(eT.READ_FRAMEBUFFER,o.__webglFramebuffer),r.bindFramebuffer(eT.DRAW_FRAMEBUFFER,y.__webglFramebuffer);for(let n=0;n<d;n++)C&&(eT.framebufferTextureLayer(eT.READ_FRAMEBUFFER,eT.COLOR_ATTACHMENT0,s.get(e).__webglTexture,a,f+n),eT.framebufferTextureLayer(eT.DRAW_FRAMEBUFFER,eT.COLOR_ATTACHMENT0,s.get(t).__webglTexture,l,v+n)),eT.blitFramebuffer(h,p,u,c,m,g,u,c,eT.DEPTH_BUFFER_BIT,eT.NEAREST);r.bindFramebuffer(eT.READ_FRAMEBUFFER,null),r.bindFramebuffer(eT.DRAW_FRAMEBUFFER,null)}else if(0!==a||e.isRenderTargetTexture||s.has(e)){let n=s.get(e),i=s.get(t);r.bindFramebuffer(eT.READ_FRAMEBUFFER,eQ),r.bindFramebuffer(eT.DRAW_FRAMEBUFFER,e$);for(let e=0;e<d;e++)C?eT.framebufferTextureLayer(eT.READ_FRAMEBUFFER,eT.COLOR_ATTACHMENT0,n.__webglTexture,a,f+e):eT.framebufferTexture2D(eT.READ_FRAMEBUFFER,eT.COLOR_ATTACHMENT0,eT.TEXTURE_2D,n.__webglTexture,a),P?eT.framebufferTextureLayer(eT.DRAW_FRAMEBUFFER,eT.COLOR_ATTACHMENT0,i.__webglTexture,l,v+e):eT.framebufferTexture2D(eT.DRAW_FRAMEBUFFER,eT.COLOR_ATTACHMENT0,eT.TEXTURE_2D,i.__webglTexture,l),0!==a?eT.blitFramebuffer(h,p,u,c,m,g,u,c,eT.COLOR_BUFFER_BIT,eT.NEAREST):P?eT.copyTexSubImage3D(y,l,m,g,v+e,h,p,u,c):eT.copyTexSubImage2D(y,l,m,g,h,p,u,c);r.bindFramebuffer(eT.READ_FRAMEBUFFER,null),r.bindFramebuffer(eT.DRAW_FRAMEBUFFER,null)}else P?e.isDataTexture||e.isData3DTexture?eT.texSubImage3D(y,l,m,g,v,u,c,d,b,S,x.data):t.isCompressedArrayTexture?eT.compressedTexSubImage3D(y,l,m,g,v,u,c,d,b,x.data):eT.texSubImage3D(y,l,m,g,v,u,c,d,b,S,x):e.isDataTexture?eT.texSubImage2D(eT.TEXTURE_2D,l,m,g,u,c,b,S,x.data):e.isCompressedTexture?eT.compressedTexSubImage2D(eT.TEXTURE_2D,l,m,g,x.width,x.height,b,x.data):eT.texSubImage2D(eT.TEXTURE_2D,l,m,g,u,c,b,S,x);eT.pixelStorei(eT.UNPACK_ROW_LENGTH,_),eT.pixelStorei(eT.UNPACK_IMAGE_HEIGHT,M),eT.pixelStorei(eT.UNPACK_SKIP_PIXELS,T),eT.pixelStorei(eT.UNPACK_SKIP_ROWS,E),eT.pixelStorei(eT.UNPACK_SKIP_IMAGES,A),0===l&&t.generateMipmaps&&eT.generateMipmap(y),r.unbindTexture()},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(){Z=0,K=0,J=null,r.reset(),M.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return 2e3}get outputColorSpace(){return this._outputColorSpace}
388set outputColorSpace(e){this._outputColorSpace=e;let t=this.getContext();t.drawingBufferColorSpace=e8._getDrawingBufferColorSpace(e),t.unpackColorSpace=e8._getUnpackColorSpace()}}e.s(["PMREMGenerator",()=>l8,"ShaderChunk",()=>lH,"ShaderLib",()=>lG,"UniformsLib",()=>lV,"WebGLRenderer",()=>c7,"WebGLUtils",()=>cQ],8560);var de=e.i(30224);let dt=e=>{let t,n=new Set,i=(e,i)=>{let r="function"==typeof e?e(t):e;if(!Object.is(r,t)){let e=t;t=(null!=i?i:"object"!=typeof r||null===r)?r:Object.assign({},t,r),n.forEach(n=>n(t,e))}},r=()=>t,a={setState:i,getState:r,getInitialState:()=>s,subscribe:e=>(n.add(e),()=>n.delete(e))},s=t=e(i,r,a);return a},{useSyncExternalStoreWithSelector:dn}=de.default,di=(e,t)=>{let n=e?dt(e):dt,i=(e,i=t)=>(function(e,t=e=>e,n){let i=dn(e.subscribe,e.getState,e.getInitialState,t,n);return ec.default.useDebugValue(i),i})(n,e,i);return Object.assign(i,n),i},dr=(e,t)=>e?di(e,t):di,da=[];function ds(e,t,n=(e,t)=>e===t){if(e===t)return!0;if(!e||!t)return!1;let i=e.length;if(t.length!==i)return!1;for(let r=0;r<i;r++)if(!n(e[r],t[r]))return!1;return!0}function dl(e,t=null,n=!1,i={}){for(let r of(null===t&&(t=[e]),da))if(ds(t,r.keys,r.equal)){if(n)return;if(Object.prototype.hasOwnProperty.call(r,"error"))throw r.error;if(Object.prototype.hasOwnProperty.call(r,"response"))return i.lifespan&&i.lifespan>0&&(r.timeout&&clearTimeout(r.timeout),r.timeout=setTimeout(r.remove,i.lifespan)),r.response;if(!n)throw r.promise}let r={keys:t,equal:i.equal,remove:()=>{let e=da.indexOf(r);-1!==e&&da.splice(e,1)},promise:("object"==typeof e&&"function"==typeof e.then?e:e(...t)).then(e=>{r.response=e,i.lifespan&&i.lifespan>0&&(r.timeout=setTimeout(r.remove,i.lifespan))}).catch(e=>r.error=e)};if(da.push(r),!n)throw r.promise}var du=e.i(89499),dc=ec;function dd(e,t,n){if(!e)return;if(!0===n(e))return e;let i=t?e.return:e.child;for(;i;){let e=dd(i,t,n);if(e)return e;i=t?null:i.sibling}}function dh(e){try{return Object.defineProperties(e,{_currentRenderer:{get:()=>null,set(){}},_currentRenderer2:{get:()=>null,set(){}}})}catch(t){return e}}"undefined"!=typeof window&&((null==(R=window.document)?void 0:R.createElement)||(null==(I=window.navigator)?void 0:I.product)==="ReactNative")?dc.useLayoutEffect:dc.useEffect;let dp=dh(dc.createContext(null));class df extends dc.Component{render(){return dc.createElement(dp.Provider,{value:this._reactInternals},this.props.children)}}function dm(){let e=dc.useContext(dp);if(null===e)throw Error("its-fine: useFiber must be called within a <FiberProvider />!");let t=dc.useId();return dc.useMemo(()=>{for(let n of[e,null==e?void 0:e.alternate]){if(!n)continue;let e=dd(n,!1,e=>{let n=e.memoizedState;for(;n;){if(n.memoizedState===t)return!0;n=n.next}});if(e)return e}},[e,t])}let dg=Symbol.for("react.context"),dv=e=>null!==e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===dg;function dy(e){let t=e.root;for(;t.getState().previousRoot;)t=t.getState().previousRoot;return t}eh.act;let dx=e=>null!=e&&("string"==typeof e||"number"==typeof e||e.isColor),db="undefined"!=typeof window&&((null==(y=window.document)?void 0:y.createElement)||(null==(x=window.navigator)?void 0:x.product)==="ReactNative")?eh.useLayoutEffect:eh.useEffect;function dS(e){let t=eh.useRef(e);return db(()=>void(t.current=e),[e]),t}function d_({set:e}){return db(()=>(e(new Promise(()=>null)),()=>e(!1)),[e]),null}let dw=((b=class extends eh.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}),b);function dM(e){var t;let n="undefined"!=typeof window?null!=(t=window.devicePixelRatio)?t:2:1;return Array.isArray(e)?Math.min(Math.max(e[0],n),e[1]):e}function dT(e){var t;return null==(t=e.__r3f)?void 0:t.root.getState()}let dE={obj:e=>e===Object(e)&&!dE.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:n="shallow",objects:i="reference",strict:r=!0}={}){let a;if(typeof e!=typeof t||!!e!=!!t)return!1;if(dE.str(e)||dE.num(e)||dE.boo(e))return e===t;let s=dE.obj(e);if(s&&"reference"===i)return e===t;let o=dE.arr(e);if(o&&"reference"===n)return e===t;if((o||s)&&e===t)return!0;for(a in e)if(!(a in t))return!1;if(s&&"shallow"===n&&"shallow"===i){for(a in r?t:e)if(!dE.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(dE.und(a)){if(o&&0===e.length&&0===t.length||s&&0===Object.keys(e).length&&0===Object.keys(t).length)return!0;
388if(e!==t)return!1}return!0}},dA=["children","key","ref"];function dC(e,t,n,i){let r=null==e?void 0:e.__r3f;return!r&&(r={root:t,type:n,parent:null,children:[],props:function(e){let t={};for(let n in e)dA.includes(n)||(t[n]=e[n]);return t}(i),object:e,eventCount:0,handlers:{},isHidden:!1},e&&(e.__r3f=r)),r}function dP(e,t){if(!t.includes("-")||t in e)return{root:e,key:t,target:e[t]};let n=e,i=t.split("-");for(let r of i){if("object"!=typeof n||null===n){if(void 0!==n)return{root:n,key:i.slice(i.indexOf(r)).join("-"),target:void 0};return{root:e,key:t,target:void 0}}t=r,e=n,n=n[t]}return{root:e,key:t,target:n}}let dR=/-\d+$/;function dI(e,t){if(dE.str(t.props.attach)){if(dR.test(t.props.attach)){let n=t.props.attach.replace(dR,""),{root:i,key:r}=dP(e.object,n);Array.isArray(i[r])||(i[r]=[])}let{root:n,key:i}=dP(e.object,t.props.attach);t.previousAttach=n[i],n[i]=t.object}else dE.fun(t.props.attach)&&(t.previousAttach=t.props.attach(e.object,t.object))}function dD(e,t){if(dE.str(t.props.attach)){let{root:n,key:i}=dP(e.object,t.props.attach),r=t.previousAttach;void 0===r?delete n[i]:n[i]=r}else null==t.previousAttach||t.previousAttach(e.object,t.object);delete t.previousAttach}let dL=[...dA,"args","dispose","attach","object","onUpdate","dispose"],dF=new Map,dN=["map","emissiveMap","sheenColorMap","specularColorMap","envMap"],dU=/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/;function dk(e,t){var n,i;let r=e.__r3f,a=r&&dy(r).getState(),s=null==r?void 0:r.eventCount;for(let n in t){let s=t[n];if(dL.includes(n))continue;if(r&&dU.test(n)){"function"==typeof s?r.handlers[n]=s:delete r.handlers[n],r.eventCount=Object.keys(r.handlers).length;continue}if(void 0===s)continue;let{root:o,key:l,target:u}=dP(e,n);if(void 0===u&&("object"!=typeof o||null===o))throw Error(`R3F: Cannot set "${n}". Ensure it is an object before setting "${l}".`);u instanceof tQ&&s instanceof tQ?u.mask=s.mask:u instanceof nw&&dx(s)?u.set(s):null!==u&&"object"==typeof u&&"function"==typeof u.set&&"function"==typeof u.copy&&null!=s&&s.constructor&&u.constructor===s.constructor?u.copy(s):null!==u&&"object"==typeof u&&"function"==typeof u.set&&Array.isArray(s)?"function"==typeof u.fromArray?u.fromArray(s):u.set(...s):null!==u&&"object"==typeof u&&"function"==typeof u.set&&"number"==typeof s?"function"==typeof u.setScalar?u.setScalar(s):u.set(s):(o[l]=s,a&&!a.linear&&dN.includes(l)&&null!=(i=o[l])&&i.isTexture&&1023===o[l].format&&1009===o[l].type&&(o[l].colorSpace=ey))}if(null!=r&&r.parent&&null!=a&&a.internal&&null!=(n=r.object)&&n.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&&dB(r),e}function dB(e){var t;if(!e.parent)return;null==e.props.onUpdate||e.props.onUpdate(e.object);let n=null==(t=e.root)||null==t.getState?void 0:t.getState();n&&0===n.internal.frames&&n.invalidate()}function dO(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 dz=e=>null==e?void 0:e.isObject3D;function dH(e){return(e.eventObject||e.object).uuid+"/"+e.index+e.instanceId}function dV(e,t,n,i){let r=n.get(t);r&&(n.delete(t),0===n.size&&(e.delete(i),r.target.releasePointerCapture(i)))}let dG=e=>!!(null!=e&&e.render),dj=eh.createContext(null);function dW(){let e=eh.useContext(dj);if(!e)throw Error("R3F: Hooks can only be used within the Canvas component!");return e}function dX(e=e=>e,t){return dW()(e,t)}function dq(e,t=0){let n=dW(),i=n.getState().internal.subscribe,r=dS(e);return db(()=>i(r,t,n),[t,i,n]),null}let dY=new WeakMap;function dZ(e,t){return function(n,...i){var r;let a;return"function"==typeof n&&(null==n||null==(r=n.prototype)?void 0:r.constructor)===n?(a=dY.get(n))||(a=new n,dY.set(n,a)):a=n,e&&e(a),Promise.all(i.map(e=>new Promise((n,i)=>a.load(e,e=>{var t;let i;dz(null==e?void 0:e.scene)&&Object.assign(e,(t=e.scene,i={nodes:{},materials:{},meshes:{}},t&&t.traverse(e=>{e.name&&(i.nodes[e.name]=e),e.material&&!i.materials[e.material.name]&&(i.materials[e.material.name]=e.material),e.isMesh&&!i.meshes[e.name]&&(i.meshes[e.name]=e)}),i)),n(e)},t,t=>i(Error(`Could not load ${e}: ${null==t?void 0:t.message}`))))))}}function dK(e,t,n,i){let r=Array.isArray(t)?t:[t],a=dl(dZ(n,i),[e,...r],!1,{equal:dE.equ});return Array.isArray(t)?a:a[0]}dK.preload=function(e,t,n){let i,r=Array.isArray(t)?t:[t];dl(dZ(n),[e,...r],!0,i)},dK.clear=function(e,t){var n=[e,...Array.isArray(t)?t:[t]];if(void 0===n||0===n.length)da.splice(0,da.length);else{let e=da.find(e=>ds(n,e.keys,e.equal));e&&e.remove()}};var dJ={exports:{}},dQ={exports:{}};dQ.exports;let d$=(U||(U=1,N||(N=1,dQ.exports=function(e){function t(e,t,n,i){return new iK(e,t,n,i)}function n(){}function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}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,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do(4098&(t=e).flags)!=0&&(n=t.return),e=t.return;while(e)}return 3===t.tag?n:null}function a(e){if(r(e)!==e)throw Error(i(188))}function s(e){var t=e.alternate;if(!t){if(null===(t=r(e)))throw Error(i(188));return t!==e?null:e}for(var n=e,s=t;;){var o=n.return;if(null===o)break;var l=o.alternate;if(null===l){if(null!==(s=o.return)){n=s;continue}break}if(o.child===l.child){for(l=o.child;l;){if(l===n)return a(o),e;if(l===s)return a(o),t;l=l.sibling}throw Error(i(188))}if(n.return!==s.return)n=o,s=l;else{for(var u=!1,c=o.child;c;){if(c===n){u=!0,n=o,s=l;break}if(c===s){u=!0,s=o,n=l;break}c=c.sibling}if(!u){for(c=l.child;c;){if(c===n){u=!0,n=l,s=o;break}if(c===s){u=!0,s=l,n=o;break}c=c.sibling}if(!u)throw Error(i(189))}}if(n.alternate!==s)throw Error(i(190))}if(3!==n.tag)throw Error(i(188));return n.stateNode.current===n?e:t}function o(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=rb&&e[rb]||e["@@iterator"])?e:null}function l(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===rS?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 rf:return"Suspense";case rm:return"SuspenseList";case ry:return"Activity"}if("object"==typeof e)switch(e.$$typeof){case ro:return"Portal";case rh:return e.displayName||"Context";case rd:return(e._context.displayName||"Context")+".Consumer";case rp: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>sM||(e.current=sw[sM],sw[sM]=null,sM--)}function d(e,t){sw[++sM]=e.current,e.current=t}function h(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 p(e,t,n){var i=e.pendingLanes;if(0===i)return 0;var r=0,a=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var o=0x7ffffff&i;return 0!==o?0!=(i=o&~a)?r=h(i):0!=(s&=o)?r=h(s):n||0!=(n=o&~e)&&(r=h(n)):0!=(o=i&~a)?r=h(o):0!==s?r=h(s):n||0!=(n=i&~e)&&(r=h(n)),0===r?0:0!==t&&t!==r&&(t&a)==0&&((a=r&-r)>=(n=t&-t)||32===a&&(4194048&n)!=0)?t:r}function f(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)==0}function m(){var e=sI;return(0x3c00000&(sI<<=1))==0&&(sI=4194304),e}function g(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}
388function v(e,t){e.pendingLanes|=t,0x10000000!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function y(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-sE(t);e.entangledLanes|=t,e.entanglements[i]=0x40000000|e.entanglements[i]|261930&n}function x(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var i=31-sE(n),r=1<<i;r&t|e[i]&t&&(e[i]|=t),n&=~r}}function b(e,t){var n=t&-t;return((n=(42&n)!=0?1:S(n))&(e.suspendedLanes|t))!=0?0:n}function S(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 _(e){return 2<(e&=-e)?8<e?(0x7ffffff&e)!=0?32:0x10000000:8:2}function w(e){if("function"==typeof sH&&sV(e),sj&&"function"==typeof sj.setStrictMode)try{sj.setStrictMode(sG,e)}catch{}}function M(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(`
389    at`)?" (<anonymous>)":-1<e.stack.indexOf("@")?"@unknown:0:0":""}return`
390`+a7+e+se}function T(e,t){if(!e||sY)return"";sY=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var i=e}Reflect.construct(e,[],n)}
390else{try{n.call()}catch(e){i=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){i=e}(n=e())&&"function"==typeof n.catch&&n.catch(function(){})}}catch(e){if(e&&i&&"string"==typeof e.stack)return[e.stack,i.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=i.DetermineComponentFrameRoot(),s=a[0],o=a[1];if(s&&o){var l=s.split(`
391`),u=o.split(`
392`);for(r=i=0;i<l.length&&!l[i].includes("DetermineComponentFrameRoot");)i++;for(;r<u.length&&!u[r].includes("DetermineComponentFrameRoot");)r++;if(i===l.length||r===u.length)for(i=l.length-1,r=u.length-1;1<=i&&0<=r&&l[i]!==u[r];)r--;for(;1<=i&&0<=r;i--,r--)if(l[i]!==u[r]){if(1!==i||1!==r)do if(i--,r--,0>r||l[i]!==u[r]){var c=`
393`+l[i].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=i&&0<=r)break}}}finally{sY=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?M(n):""}function E(e){try{var t="",n=null;do t+=function(e,t){switch(e.tag){case 26:case 27:case 5:return M(e.type);case 16:return M("Lazy");case 13:return e.child!==t&&null!==t?M("Suspense Fallback"):M("Suspense");case 19:return M("SuspenseList");case 0:case 15:return T(e.type,!1);case 11:return T(e.type.render,!1);case 1:return T(e.type,!0);case 31:return M("Activity");default:return""}}(e,n),n=e,e=e.return;while(e)return t}catch(e){return`
394Error generating stack: `+e.message+`
395`+e.stack}}function A(e,t){if("object"==typeof e&&null!==e){var n=sZ.get(e);return void 0!==n?n:(t={value:e,source:t,stack:E(t)},sZ.set(e,t),t)}return{value:e,source:t,stack:E(t)}}function C(e,t){sK[sJ++]=s$,sK[sJ++]=sQ,sQ=e,s$=t}function P(e,t,n){s0[s1++]=s3,s0[s1++]=s4,s0[s1++]=s2,s2=e;var i=s3;e=s4;var r=32-sE(i)-1;i&=~(1<<r),n+=1;var a=32-sE(t)+r;if(30<a){var s=r-r%5;a=(i&(1<<s)-1).toString(32),i>>=s,r-=s,s3=1<<32-sE(t)+r|n<<r|i,s4=a+e}else s3=1<<a|n<<r|i,s4=e}function R(e){null!==e.return&&(C(e,1),P(e,1,0))}function I(e){for(;e===sQ;)sQ=sK[--sJ],sK[sJ]=null,s$=sK[--sJ],sK[sJ]=null;for(;e===s2;)s2=s0[--s1],s0[s1]=null,s4=s0[--s1],s0[s1]=null,s3=s0[--s1],s0[s1]=null}function D(e,t){s0[s1++]=s3,s0[s1++]=s4,s0[s1++]=s2,s3=t.id,s4=t.overflow,s2=e}function L(e,t){d(s8,t),d(s6,e),d(s5,null),e=rC(t),c(s5),d(s5,e)}function F(){c(s5),c(s6),c(s8)}function N(e){null!==e.memoizedState&&d(s9,e);var t=s5.current,n=rP(t,e.type);t!==n&&(d(s6,e),d(s5,n))}function U(e){s6.current===e&&(c(s5),c(s6)),s9.current===e&&(c(s9),rz?r5._currentValue=r4:r5._currentValue2=r4)}function k(e){var t=Error(i(418,1<arguments.length&&void 0!==arguments[1]&&arguments[1]?"text":"HTML",""));throw G(A(t,e)),or}function B(e,t){if(!rG)throw Error(i(175));aX(e.stateNode,e.type,e.memoizedProps,t,e)||k(e,!0)}function O(e){for(s7=e.return;s7;)switch(s7.tag){case 5:case 31:case 13:oi=!1;return;case 27:case 3:oi=!0;return;default:s7=s7.return}}function z(e){if(!rG||e!==s7)return!1;if(!ot)return O(e),ot=!0,!1;var t=e.tag;if(sv?3!==t&&27!==t&&(5!==t||a9(e.type)&&!rN(e.type,e.memoizedProps))&&oe&&k(e):3!==t&&(5!==t||a9(e.type)&&!rN(e.type,e.memoizedProps))&&oe&&k(e),O(e),13===t){if(!rG)throw Error(i(316));if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(i(317));oe=aJ(e)}else if(31===t){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(i(317));oe=aK(e)}else oe=sv&&27===t?aU(e.type,oe):s7?aN(e.stateNode):null;return!0}function H(){rG&&(oe=s7=null,ot=!1)}function V(){var e=on;return null!==e&&(null===lD?lD=e:lD.push.apply(lD,e),on=null),e}function G(e){null===on?on=[e]:on.push(e)}function j(e,t,n){rz?(d(oa,t._currentValue),t._currentValue=n):(d(oa,t._currentValue2),t._currentValue2=n)}function W(e){var t=oa.current;rz?e._currentValue=t:e._currentValue2=t,c(oa)}function X(e,t,n){for(;null!==e;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==i&&(i.childLanes|=t)):null!==i&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===n)break;e=e.return}}function q(e,t,n,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|=n,null!==(l=s.alternate)&&(l.lanes|=n),X(s.return,n,e),r||(o=null);break o}s=l.next}}else if(18===a.tag){if(null===(o=a.return))throw Error(i(341));o.lanes|=n,null!==(s=o.alternate)&&(s.lanes|=n),X(o,n,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 Y(e,t,n,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(i(387));if(null!==(o=o.memoizedProps)){var l=a.type;sW(a.pendingProps.value,o.value)||(null!==e?e.push(l):e=[l])}}else if(a===s9.current){if(null===(o=a.alternate))throw Error(i(387));o.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(null!==e?e.push(r5):e=[r5])}a=a.return}null!==e&&q(t,e,n,r),t.flags|=262144}function Z(e){for(e=e.firstContext;null!==e;){var t=e.context;if(!sW(rz?t._currentValue:t._currentValue2,e.memoizedValue))return!0;e=e.next}return!1}
395function K(e){os=e,oo=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function J(e){return $(os,e)}function Q(e,t){return null===os&&K(e),$(e,t)}function $(e,t){var n=rz?t._currentValue:t._currentValue2;if(t={context:t,memoizedValue:n,next:null},null===oo){if(null===e)throw Error(i(308));oo=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else oo=oo.next=t;return n}function ee(){return{controller:new ol,data:new Map,refCount:0}}function et(e){e.refCount--,0===e.refCount&&ou(oc,function(){e.controller.abort()})}function en(){}function ei(e){e!==op&&null===e.next&&(null===op?oh=op=e:op=op.next=e),om=!0,of||(of=!0,r8?r9(function(){(6&lm)!=0?sD(sk,ea):es()}):sD(sk,ea))}function er(e,t){if(!og&&om){og=!0;do for(var n=!1,i=oh;null!==i;){if(!t)if(0!==e){var r=i.pendingLanes;if(0===r)var a=0;else{var s=i.suspendedLanes,o=i.pingedLanes;a=0xc000095&(a=(1<<31-sE(42|e)+1)-1&(r&~(s&~o)))?0xc000095&a|1:a?2|a:0}0!==a&&(n=!0,ec(i,a))}else a=ly,(3&(a=p(i,i===lg?a:0,null!==i.cancelPendingCommit||i.timeoutHandle!==rO)))==0||f(i,a)||(n=!0,ec(i,a));i=i.next}while(n)og=!1}}function ea(){es()}function es(){om=of=!1;var e=0;0!==ov&&rZ()&&(e=ov);for(var t=sU(),n=null,i=oh;null!==i;){var r=i.next,a=eo(i,t);0===a?(i.next=null,null===n?oh=r:n.next=r,null===r&&(op=n)):(n=i,(0!==e||(3&a)!=0)&&(om=!0)),i=r}0!==lO&&5!==lO||er(e,!1),0!==ov&&(ov=0)}function eo(e,t){for(var n=e.suspendedLanes,i=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&n)==0||(o&i)!=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,n=ly,n=p(e,e===t?n:0,null!==e.cancelPendingCommit||e.timeoutHandle!==rO),i=e.callbackNode,0===n||e===t&&(2===lx||9===lx)||null!==e.cancelPendingCommit)return null!==i&&null!==i&&sL(i),e.callbackNode=null,e.callbackPriority=0;if((3&n)==0||f(e,n)){if((t=n&-n)===e.callbackPriority)return t;switch(null!==i&&sL(i),_(n)){case 2:case 8:n=sB;break;case 32:default:n=sO;break;case 0x10000000:n=sz}return n=sD(n,i=eu.bind(null,e)),e.callbackPriority=t,e.callbackNode=n,t}return null!==i&&null!==i&&sL(i),e.callbackPriority=2,e.callbackNode=null,2}function eu(e,t){if(0!==lO&&5!==lO)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(iH()&&e.callbackNode!==n)return null;var i=ly;return 0===(i=p(e,e===lg?i:0,null!==e.cancelPendingCommit||e.timeoutHandle!==rO))?null:(ix(e,i,t),eo(e,sU()),null!=e.callbackNode&&e.callbackNode===n?eu.bind(null,e):null)}function ec(e,t){if(iH())return null;ix(e,t,!0)}function ed(){if(0===ov){var e=ob;0===e&&(e=sP,(261888&(sP<<=1))==0&&(sP=256)),ov=e}return ov}function ep(){if(0==--ox&&null!==oy){null!==oS&&(oS.status="fulfilled");var e=oy;oy=null,ob=0,oS=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ef(){var e=ow.current;return null!==e?e:lg.pooledCache}function em(e,t){null===t?d(ow,ow.current):d(ow,t.pool)}function eg(){var e=ef();return null===e?null:{parent:rz?od._currentValue:od._currentValue2,pool:e}}function ev(e,t){if(sW(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var r=n[i];if(!sq.call(t,r)||!sW(e[r],t[r]))return!1}return!0}function ey(e){return"fulfilled"===(e=e.status)||"rejected"===e}function ex(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(en,en),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e_(e=t.reason),e;default:if("string"==typeof t.status)t.then(en,en);else{if(null!==(e=lg)&&100<e.shellSuspendCounter)throw Error(i(482));(e=t).status="pending",e.then(function(e){if("pending"===t.status){var n=t;n.status="fulfilled",n.value=e}},function(e){if("pending"===t.status){var n=t;n.status="rejected",n.reason=e}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e_(e=t.reason),e}throw oC=t,oM}}function eb(e){try{return(0,e._init)(e._payload)}catch(e){throw null!==e&&"object"==typeof e&&"function"==typeof e.then?(oC=e,oM):e}}function eS(){if(null===oC)throw Error(i(459));var e=oC;return oC=null,e}function e_(e){if(e===oM||e===oE)throw Error(i(483))}function ew(e){var t=oR;return oR+=1,null===oP&&(oP=[]),ex(oP,e,t)}function eM(e,t){e.ref=void 0!==(t=t.props.ref)?t:null}function eT(e,t){throw t.$$typeof===ra?Error(i(525)):Error(i(31,"[object Object]"===(e=Object.prototype.toString.call(t))?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function eE(e){function n(t,n){if(e){var i=t.deletions;null===i?(t.deletions=[n],t.flags|=16):i.push(n)}}function r(t,i){if(!e)return null;for(;null!==i;)n(t,i),i=i.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=iQ(e,t)).index=0,e.sibling=null,e}function l(t,n,i){return t.index=i,e?null!==(i=t.alternate)?(i=i.index)<n?(t.flags|=0x4000002,n):i:(t.flags|=0x4000002,n):(t.flags|=1048576,n)}function u(t){return e&&null===t.alternate&&(t.flags|=0x4000002),t}function c(e,t,n,i){return null===t||6!==t.tag?(t=i2(n,e.mode,i)).return=e:(t=s(t,n)).return=e,t}function d(e,t,n,i){var r=n.type;return r===rl?p(e,t,n.props.children,i,n.key):(null!==t&&(t.elementType===r||"object"==typeof r&&null!==r&&r.$$typeof===rv&&eb(r)===t.type)?eM(t=s(t,n.props),n):eM(t=i0(n.type,n.key,n.props,null,e.mode,i),n),t.return=e,t)}function h(e,t,n,i){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=i4(n,e.mode,i)).return=e:(t=s(t,n.children||[])).return=e,t}function p(e,t,n,i,r){return null===t||7!==t.tag?(t=i1(n,e.mode,i,r)).return=e:(t=s(t,n)).return=e,t}function f(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t||"bigint"==typeof t)return(t=i2(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case rs:return eM(n=i0(t.type,t.key,t.props,null,e.mode,n),t),n.return=e,n;case ro:return(t=i4(t,e.mode,n)).return=e,t;case rv:return f(e,t=eb(t),n)}if(r_(t)||o(t))return(t=i1(t,e.mode,n,null)).return=e,t;if("function"==typeof t.then)return f(e,ew(t),n);if(t.$$typeof===rh)return f(e,Q(e,t),n);eT(e,t)}return null}function m(e,t,n,i){var r=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n||"bigint"==typeof n)return null!==r?null:c(e,t,""+n,i);if("object"==typeof n&&null!==n){switch(n.$$typeof){case rs:return n.key===r?d(e,t,n,i):null;case ro:return n.key===r?h(e,t,n,i):null;case rv:return m(e,t,n=eb(n),i)}if(r_(n)||o(n))return null!==r?null:p(e,t,n,i,null);if("function"==typeof n.then)return m(e,t,ew(n),i);if(n.$$typeof===rh)return m(e,t,Q(e,n),i);eT(e,n)}return null}function g(e,t,n,i,r){if("string"==typeof i&&""!==i||"number"==typeof i||"bigint"==typeof i)return c(t,e=e.get(n)||null,""+i,r);if("object"==typeof i&&null!==i){switch(i.$$typeof){case rs:return d(t,e=e.get(null===i.key?n:i.key)||null,i,r);case ro:return h(t,e=e.get(null===i.key?n:i.key)||null,i,r);case rv:return g(e,t,n,i=eb(i),r)}if(r_(i)||o(i))return p(t,e=e.get(n)||null,i,r,null);if("function"==typeof i.then)return g(e,t,n,ew(i),r);if(i.$$typeof===rh)return g(e,t,n,Q(t,i),r);eT(t,i)}return null}return function(c,d,h,p){try{oR=0;var v=function t(c,d,h,p){if("object"==typeof h&&null!==h&&h.type===rl&&null===h.key&&(h=h.props.children),"object"==typeof h&&null!==h){
vendor: 4,281 bytes, line 395
395switch(h.$$typeof){case rs:o:{for(var v=h.key;null!==d;){if(d.key===v){if((v=h.type)===rl){if(7===d.tag){r(c,d.sibling),(p=s(d,h.props.children)).return=c,c=p;break o}}else if(d.elementType===v||"object"==typeof v&&null!==v&&v.$$typeof===rv&&eb(v)===d.type){r(c,d.sibling),eM(p=s(d,h.props),h),p.return=c,c=p;break o}r(c,d);break}n(c,d),d=d.sibling}h.type===rl?(p=i1(h.props.children,c.mode,p,h.key)).return=c:(eM(p=i0(h.type,h.key,h.props,null,c.mode,p),h),p.return=c),c=p}return u(c);case ro:o:{for(v=h.key;null!==d;){if(d.key===v)if(4===d.tag&&d.stateNode.containerInfo===h.containerInfo&&d.stateNode.implementation===h.implementation){r(c,d.sibling),(p=s(d,h.children||[])).return=c,c=p;break o}else{r(c,d);break}n(c,d),d=d.sibling}(p=i4(h,c.mode,p)).return=c,c=p}return u(c);case rv:return t(c,d,h=eb(h),p)}if(r_(h))return function(t,i,s,o){for(var u=null,c=null,d=i,h=i=0,p=null;null!==d&&h<s.length;h++){d.index>h?(p=d,d=null):p=d.sibling;var v=m(t,d,s[h],o);if(null===v){null===d&&(d=p);break}e&&d&&null===v.alternate&&n(t,d),i=l(v,i,h),null===c?u=v:c.sibling=v,c=v,d=p}if(h===s.length)return r(t,d),ot&&C(t,h),u;if(null===d){for(;h<s.length;h++)null!==(d=f(t,s[h],o))&&(i=l(d,i,h),null===c?u=d:c.sibling=d,c=d);return ot&&C(t,h),u}for(d=a(d);h<s.length;h++)null!==(p=g(d,t,h,s[h],o))&&(e&&null!==p.alternate&&d.delete(null===p.key?h:p.key),i=l(p,i,h),null===c?u=p:c.sibling=p,c=p);return e&&d.forEach(function(e){return n(t,e)}),ot&&C(t,h),u}(c,d,h,p);if(o(h)){if("function"!=typeof(v=o(h)))throw Error(i(150));return function(t,s,o,u){if(null==o)throw Error(i(151));for(var c=null,d=null,h=s,p=s=0,v=null,y=o.next();null!==h&&!y.done;p++,y=o.next()){h.index>p?(v=h,h=null):v=h.sibling;var x=m(t,h,y.value,u);if(null===x){null===h&&(h=v);break}e&&h&&null===x.alternate&&n(t,h),s=l(x,s,p),null===d?c=x:d.sibling=x,d=x,h=v}if(y.done)return r(t,h),ot&&C(t,p),c;if(null===h){for(;!y.done;p++,y=o.next())null!==(y=f(t,y.value,u))&&(s=l(y,s,p),null===d?c=y:d.sibling=y,d=y);return ot&&C(t,p),c}for(h=a(h);!y.done;p++,y=o.next())null!==(y=g(h,t,p,y.value,u))&&(e&&null!==y.alternate&&h.delete(null===y.key?p:y.key),s=l(y,s,p),null===d?c=y:d.sibling=y,d=y);return e&&h.forEach(function(e){return n(t,e)}),ot&&C(t,p),c}(c,d,h=v.call(h),p)}if("function"==typeof h.then)return t(c,d,ew(h),p);if(h.$$typeof===rh)return t(c,d,Q(c,h),p);eT(c,h)}return"string"==typeof h&&""!==h||"number"==typeof h||"bigint"==typeof h?(h=""+h,null!==d&&6===d.tag?(r(c,d.sibling),(p=s(d,h)).return=c):(r(c,d),(p=i2(h,c.mode,p)).return=c),u(c=p)):r(c,d)}(c,d,h,p);return oP=null,v}catch(e){if(e===oM||e===oE)throw e;var y=t(29,e,null,c.mode);return y.lanes=p,y.return=c,y}finally{}}}function eA(){for(var e=oF,t=oN=oF=0;t<e;){var n=oL[t];oL[t++]=null;var i=oL[t];oL[t++]=null;var r=oL[t];oL[t++]=null;var a=oL[t];if(oL[t++]=null,null!==i&&null!==r){var s=i.pending;null===s?r.next=r:(r.next=s.next,s.next=r),i.pending=r}0!==a&&eI(n,r,a)}}function eC(e,t,n,i){oL[oF++]=e,oL[oF++]=t,oL[oF++]=n,oL[oF++]=i,oN|=i,e.lanes|=i,null!==(e=e.alternate)&&(e.lanes|=i)}function eP(e,t,n,i){return eC(e,t,n,i),eD(e)}function eR(e,t){return eC(e,null,null,t),eD(e)}function eI(e,t,n){e.lanes|=n;var i=e.alternate;null!==i&&(i.lanes|=n);for(var r=!1,a=e.return;null!==a;)a.childLanes|=n,null!==(i=a.alternate)&&(i.childLanes|=n),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(n),null===(i=(e=a.hiddenUpdates)[r])?e[r]=[t]:i.push(t),t.lane=0x20000000|n),a):null}function eD(e){if(50<lX)throw lX=0,lq=null,Error(i(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 eF(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 eN(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function eU(e,t,n){var i=e.updateQueue;if(null===i)return null;if(i=i.shared,(2&lm)!=0){var r=i.pending;return null===r?t.next=t:(t.next=r.next,r.next=t),i.pending=t,t=eD(e),eI(e,null,n),t}return eC(e,i,t,n),eD(e)}
395function ek(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,(4194048&n)!=0)){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,x(e,n)}}function eB(e,t){var n=e.updateQueue,i=e.alternate;if(null!==i&&n===(i=i.updateQueue)){var r=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var s={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===a?r=a=s:a=a.next=s,n=n.next}while(null!==n)null===a?r=a=t:a=a.next=t}else r=a=t;n={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:a,shared:i.shared,callbacks:i.callbacks},e.updateQueue=n;return}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function eO(){if(ok){var e=oS;if(null!==e)throw e}}function ez(e,t,n,i){ok=!1;var r=e.updateQueue;oU=!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 d=r.baseState;for(s=0,c=u=l=null,o=a;;){var h=-0x20000001&o.lane,p=h!==o.lane;if(p?(ly&h)===h:(i&h)===h){0!==h&&h===ob&&(ok=!0),null!==c&&(c=c.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});o:{var f=e,m=o;switch(h=t,m.tag){case 1:if("function"==typeof(f=m.payload)){d=f.call(n,d,h);break o}d=f;break o;case 3:f.flags=-65537&f.flags|128;case 0:if(null==(h="function"==typeof(f=m.payload)?f.call(n,d,h):f))break o;d=rr({},d,h);break o;case 2:oU=!0}}null!==(h=o.callback)&&(e.flags|=64,p&&(e.flags|=8192),null===(p=r.callbacks)?r.callbacks=[h]:p.push(h))}else p={lane:h,tag:o.tag,payload:o.payload,callback:o.callback,next:null},null===c?(u=c=p,l=d):c=c.next=p,s|=h;if(null===(o=o.next)){if(null===(o=r.shared.pending))break;o=(p=o).next,p.next=null,r.lastBaseUpdate=p,r.shared.pending=null}}null===c&&(l=d),r.baseState=l,r.firstBaseUpdate=u,r.lastBaseUpdate=c,null===a&&(r.shared.lanes=0),lE|=s,e.lanes=s,e.memoizedState=d}}function eH(e,t){if("function"!=typeof e)throw Error(i(191,e));e.call(t)}function eV(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)eH(n[e],t)}function eG(e,t){d(oO,e=lM),d(oB,t),lM=e|t.baseLanes}function ej(){d(oO,lM),d(oB,oB.current)}function eW(){lM=oO.current,c(oB),c(oO)}function eX(e){var t=e.alternate;d(oV,1&oV.current),d(oz,e),null===oH&&(null===t||null!==oB.current||null!==t.memoizedState)&&(oH=e)}function eq(e){d(oV,oV.current),d(oz,e),null===oH&&(oH=e)}function eY(e){22===e.tag?(d(oV,oV.current),d(oz,e),null===oH&&(oH=e)):eZ()}function eZ(){d(oV,oV.current),d(oz,oz.current)}function eK(e){c(oz),oH===e&&(oH=null),c(oV)}function eJ(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||aP(n)||aR(n)))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 eQ(){throw Error(i(321))}function e$(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sW(e[n],t[n]))return!1;return!0}function e0(e,t,n,i,r,a){return oG=a,oj=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,rw.H=null===e||null===e.memoizedState?o1:o2,oZ=!1,a=n(i,r),oZ=!1,oY&&(a=e2(t,n,i,r)),e1(e),a}function e1(e){rw.H=o0;var t=null!==oW&&null!==oW.next;if(oG=0,oX=oW=oj=null,oq=!1,oJ=0,oQ=null,t)throw Error(i(300));null===e||o6||null!==(e=e.dependencies)&&Z(e)&&(o6=!0)}function e2(e,t,n,r){oj=e;var a=0;do{if(oY&&(oQ=null),oJ=0,oY=!1,25<=a)throw Error(i(301));if(a+=1,oX=oW=null,null!=e.updateQueue){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,null!=s.memoCache&&(s.memoCache.index=0)}rw.H=o3,s=t(n,r)}while(oY)return s}function e3(){var e=rw.H,t=e.useState()[0];return t="function"==typeof t.then?te(t):t,e=e.useState()[0],(null!==oW?oW.memoizedState:null)!==e&&(oj.flags|=1024),t}function e4(){var e=0!==oK;return oK=0,e}function e5(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function e6(e){if(oq){for(e=e.memoizedState;null!==e;){var t=e.queue;
395null!==t&&(t.pending=null),e=e.next}oq=!1}oG=0,oX=oW=oj=null,oY=!1,oJ=oK=0,oQ=null}function e8(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===oX?oj.memoizedState=oX=e:oX=oX.next=e,oX}function e9(){if(null===oW){var e=oj.alternate;e=null!==e?e.memoizedState:null}else e=oW.next;var t=null===oX?oj.memoizedState:oX.next;if(null!==t)oX=t,oW=e;else{if(null===e)throw null===oj.alternate?Error(i(467)):Error(i(310));e={memoizedState:(oW=e).memoizedState,baseState:oW.baseState,baseQueue:oW.baseQueue,queue:oW.queue,next:null},null===oX?oj.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=oJ;return oJ+=1,null===oQ&&(oQ=[]),e=ex(oQ,e,t),t=oj,(null===oX?t.memoizedState:oX.next)===null&&(rw.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===rh)return J(e)}throw Error(i(438,String(e)))}function tn(e){var t=null,n=oj.updateQueue;if(null!==n&&(t=n.memoCache),null==t){var i=oj.alternate;null!==i&&null!==(i=i.updateQueue)&&null!=(i=i.memoCache)&&(t={data:i.data.map(function(e){return e.slice()}),index:0})}if(null==t&&(t={data:[],index:0}),null===n&&(n=e7(),oj.updateQueue=n),n.memoCache=t,void 0===(n=t.data[t.index]))for(n=t.data[t.index]=Array(e),i=0;i<e;i++)n[i]=rx;return t.index++,n}function ti(e,t){return"function"==typeof t?t(e):t}function tr(e){return ta(e9(),oW,e)}function ta(e,t,n){var r=e.queue;if(null===r)throw Error(i(311));r.lastRenderedReducer=n;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,d=!1;do{var h=-0x20000001&c.lane;if(h!==c.lane?(ly&h)===h:(oG&h)===h){var p=c.revertLane;if(0===p)null!==u&&(u=u.next={lane:0,revertLane:0,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),h===ob&&(d=!0);else if((oG&p)===p){c=c.next,p===ob&&(d=!0);continue}else h={lane:0,revertLane:c.revertLane,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},null===u?(l=u=h,o=s):u=u.next=h,oj.lanes|=p,lE|=p;h=c.action,oZ&&n(s,h),s=c.hasEagerState?c.eagerState:n(s,h)}else p={lane:h,revertLane:c.revertLane,gesture:c.gesture,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},null===u?(l=u=p,o=s):u=u.next=p,oj.lanes|=h,lE|=h;c=c.next}while(null!==c&&c!==t)if(null===u?o=s:u.next=l,!sW(s,e.memoizedState)&&(o6=!0,d&&null!==(n=oS)))throw n;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(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,s=t.memoizedState;if(null!==a){n.pending=null;var o=a=a.next;do s=e(s,o.action),o=o.next;while(o!==a)sW(s,t.memoizedState)||(o6=!0),t.memoizedState=s,null===t.baseQueue&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function to(e,t,n){var r=oj,a=e9(),s=ot;if(s){if(void 0===n)throw Error(i(407));n=n()}else n=t();var o=!sW((oW||a).memoizedState,n);if(o&&(a.memoizedState=n,o6=!0),a=a.queue,tD(tc.bind(null,r,a,e),[e]),a.getSnapshot!==t||o||null!==oX&&1&oX.memoizedState.tag){if(r.flags|=2048,tA(9,{destroy:void 0},tu.bind(null,r,a,n,t),null),null===lg)throw Error(i(349));s||(127&oG)!=0||tl(r,t,n)}return n}function tl(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=oj.updateQueue)?(t=e7(),oj.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function tu(e,t,n,i){t.value=n,t.getSnapshot=i,td(t)&&th(e)}function tc(e,t,n){return n(function(){td(t)&&th(e)})}function td(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!sW(e,n)}catch{return!0}}function th(e){var t=eR(e,2);null!==t&&iy(t,e,2)}function tp(e){var t=e8();if("function"==typeof e){var n=e;if(e=n(),oZ){w(!0);try{n()}finally{w(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ti,lastRenderedState:e},t}function tf(e,t,n,i){return e.baseState=n,ta(e,oW,"function"==typeof i?i:ti)}function tm(e,t,n,r,a){if(t$(e))throw Error(i(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!==rw.T?n(!0):s.isTransition=!1,r(s),null===(n=t.pending)?(s.next=t.pending=s,tg(t,s)):(s.next=n.next,t.pending=n.next=s)}}function tg(e,t){var n=t.action,i=t.payload,r=e.state;if(t.isTransition){var a=rw.T,s={};rw.T=s;try{var o=n(r,i),l=rw.S;null!==l&&l(s,o),tv(e,t,o)}catch(n){tx(e,t,n)}finally{null!==a&&null!==s.types&&(a.types=s.types),rw.T=a}}else try{a=n(r,i),tv(e,t,a)}catch(n){tx(e,t,n)}}function tv(e,t,n){null!==n&&"object"==typeof n&&"function"==typeof n.then?n.then(function(n){ty(e,t,n)},function(n){return tx(e,t,n)}
395):ty(e,t,n)}function ty(e,t,n){t.status="fulfilled",t.value=n,tb(t),e.state=n,null!==(t=e.pending)&&((n=t.next)===t?e.pending=null:(n=n.next,t.next=n,tg(e,n)))}function tx(e,t,n){var i=e.pending;if(e.pending=null,null!==i){i=i.next;do t.status="rejected",t.reason=n,tb(t),t=t.next;while(t!==i)}e.action=null}function tb(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function tS(e,t){return t}function t_(e,t){if(ot){var n=lg.formState;if(null!==n){o:{var i=oj;if(ot){if(oe){var r=aL(oe,oi);if(r){oe=aN(r),i=aF(r);break o}}k(i)}i=!1}i&&(t=n[0])}}(n=e8()).memoizedState=n.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:tS,lastRenderedState:t},n.queue=i,n=tK.bind(null,oj,i),i.dispatch=n,i=tp(!1);var a=tQ.bind(null,oj,!1,i.queue);return i=e8(),r={state:t,dispatch:null,action:e,pending:null},i.queue=r,n=tm.bind(null,oj,r,a,n),r.dispatch=n,i.memoizedState=e,[t,n,!1]}function tw(e){return tM(e9(),oW,e)}function tM(e,t,n){if(t=ta(e,t,tS)[0],e=tr(ti)[0],"object"==typeof t&&null!==t&&"function"==typeof t.then)try{var i=te(t)}catch(e){throw e===oM?oE:e}else i=t;var r=(t=e9()).queue,a=r.dispatch;return n!==t.memoizedState&&(oj.flags|=2048,tA(9,{destroy:void 0},tT.bind(null,r,n),null)),[i,a,e]}function tT(e,t){e.action=t}function tE(e){var t=e9(),n=oW;if(null!==n)return tM(t,n,e);e9(),t=t.memoizedState;var i=(n=e9()).queue.dispatch;return n.memoizedState=e,[t,i,!1]}function tA(e,t,n,i){return e={tag:e,create:n,deps:i,inst:t,next:null},null===(t=oj.updateQueue)&&(t=e7(),oj.updateQueue=t),null===(n=t.lastEffect)?t.lastEffect=e.next=e:(i=n.next,n.next=e,e.next=i,t.lastEffect=e),e}function tC(){return e9().memoizedState}function tP(e,t,n,i){var r=e8();oj.flags|=e,r.memoizedState=tA(1|t,{destroy:void 0},n,void 0===i?null:i)}function tR(e,t,n,i){var r=e9();i=void 0===i?null:i;var a=r.memoizedState.inst;null!==oW&&null!==i&&e$(i,oW.memoizedState.deps)?r.memoizedState=tA(t,a,n,i):(oj.flags|=e,r.memoizedState=tA(1|t,a,n,i))}function tI(e,t){tP(8390656,8,e,t)}function tD(e,t){tR(2048,8,e,t)}function tL(e){var t=e9().memoizedState;return function(e){oj.flags|=4;var t=oj.updateQueue;if(null===t)t=e7(),oj.updateQueue=t,t.events=[e];else{var n=t.events;null===n?t.events=[e]:n.push(e)}}({ref:t,nextImpl:e}),function(){if((2&lm)!=0)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function tF(e,t){return tR(4,2,e,t)}function tN(e,t){return tR(4,4,e,t)}function tU(e,t){if("function"==typeof t){var n=t(e=e());return function(){"function"==typeof n?n():t(null)}}if(null!=t)return t.current=e=e(),function(){t.current=null}}function tk(e,t,n){n=null!=n?n.concat([e]):null,tR(4,4,tU.bind(null,t,e),n)}function tB(){}function tO(e,t){var n=e9();t=void 0===t?null:t;var i=n.memoizedState;return null!==t&&e$(t,i[1])?i[0]:(n.memoizedState=[e,t],e)}function tz(e,t){var n=e9();t=void 0===t?null:t;var i=n.memoizedState;if(null!==t&&e$(t,i[1]))return i[0];if(i=e(),oZ){w(!0);try{e()}finally{w(!1)}}return n.memoizedState=[i,t],i}function tH(e,t,n){return void 0===n||(0x40000000&oG)!=0&&(261930&ly)==0?e.memoizedState=t:(e.memoizedState=n,e=iv(),oj.lanes|=e,lE|=e,n)}function tV(e,t,n,i){return sW(n,t)?n:null!==oB.current?(sW(e=tH(e,n,i),t)||(o6=!0),e):(42&oG)==0||(0x40000000&oG)!=0&&(261930&ly)==0?(o6=!0,e.memoizedState=n):(e=iv(),oj.lanes|=e,lE|=e,t)}function tG(e,t,n,i,r){var a=rq();rX(0!==a&&8>a?a:8);var s=rw.T,o={};rw.T=o,tQ(e,!1,t,n);try{var l=r(),u=rw.S;if(null!==u&&u(o,l),null!==l&&"object"==typeof l&&"function"==typeof l.then){var c,d,h=(c=[],d={status:"pending",value:null,reason:null,then:function(e){c.push(e)}},l.then(function(){d.status="fulfilled",d.value=i;for(var e=0;e<c.length;e++)(0,c[e])(i)},function(e){for(d.status="rejected",d.reason=e,e=0;e<c.length;e++)(0,c[e])(void 0)}),d);tJ(e,t,h,ig(e))}else tJ(e,t,i,ig(e))}catch(n){tJ(e,t,{then:function(){},status:"rejected",reason:n},ig())}finally{rX(a),null!==s&&null!==o.types&&(s.types=o.types),rw.T=s}}function tj(e){var t=e.memoizedState;if(null!==t)return t;var n={};return(t={memoizedState:r4,baseState:r4,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ti,lastRenderedState:r4},next:null}).next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ti,lastRenderedState:n},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function tW(){return J(r5)}function tX(){return e9().memoizedState}function tq(){return e9().memoizedState}function tY(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=ig(),i=eU(t,e=eN(n),n);null!==i&&(iy(i,t,n),ek(i,t,n)),t={cache:ee()},e.payload=t;return}t=t.return}}function tZ(e,t,n){var i=ig();n={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},t$(e)?t0(t,n):null!==(n=eP(e,t,n,i))&&(iy(n,e,i),t1(n,t,i))}function tK(e,t,n){tJ(e,t,n,ig())}function tJ(e,t,n,i){var r={lane:i,revertLane:0,gesture:null,action:n,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,n);if(r.hasEagerState=!0,r.eagerState=o,sW(o,s))return eC(e,t,r,0),null===lg&&eA(),!1}catch{}finally{}
395if(null!==(n=eP(e,t,r,i)))return iy(n,e,i),t1(n,t,i),!0}return!1}function tQ(e,t,n,r){if(r={lane:2,revertLane:ed(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},t$(e)){if(t)throw Error(i(479))}else null!==(t=eP(e,n,r,2))&&iy(t,e,2)}function t$(e){var t=e.alternate;return e===oj||null!==t&&t===oj}function t0(e,t){oY=oq=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function t1(e,t,n){if((4194048&n)!=0){var i=t.lanes;i&=e.pendingLanes,t.lanes=n|=i,x(e,n)}}function t2(e,t,n,i){n=null==(n=n(i,t=e.memoizedState))?t:rr({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}function t3(e,t,n,i,r,a,s){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(i,a,s):!t.prototype||!t.prototype.isPureReactComponent||!ev(n,i)||!ev(r,a)}function t4(e,t,n,i){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,i),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==e&&o4.enqueueReplaceState(t,t.state,null)}function t5(e,t){var n=t;if("ref"in t)for(var i in n={},t)"ref"!==i&&(n[i]=t[i]);if(e=e.defaultProps)for(var r in n===t&&(n=rr({},n)),e)void 0===n[r]&&(n[r]=e[r]);return n}function t6(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function t8(e,t,n){try{(0,e.onCaughtError)(n.value,{componentStack:n.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function t9(e,t,n){return(n=eN(n)).tag=3,n.payload={element:null},n.callback=function(){t6(e,t)},n}function t7(e){return(e=eN(e)).tag=3,e}function ne(e,t,n,i){var r=n.type.getDerivedStateFromError;if("function"==typeof r){var a=i.value;e.payload=function(){return r(a)},e.callback=function(){t8(t,n,i)}}var s=n.stateNode;null!==s&&"function"==typeof s.componentDidCatch&&(e.callback=function(){t8(t,n,i),"function"!=typeof r&&(null===lB?lB=new Set([this]):lB.add(this));var e=i.stack;this.componentDidCatch(i.value,{componentStack:null!==e?e:""})})}function nt(e,t,n,i){t.child=null===e?oD(t,null,n,i):oI(t,e.child,n,i)}function nn(e,t,n,i,r){n=n.render;var a=t.ref;if("ref"in i){var s={};for(var o in i)"ref"!==o&&(s[o]=i[o])}else s=i;return K(t),i=e0(e,t,n,s,a,r),o=e4(),null===e||o6?(ot&&o&&R(t),t.flags|=1,nt(e,t,i,r),t.child):(e5(e,t,r),nM(e,t,r))}function ni(e,t,n,i,r){if(null===e){var a=n.type;return"function"!=typeof a||iJ(a)||void 0!==a.defaultProps||null!==n.compare?((e=i0(n.type,null,i,t,t.mode,r)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,nr(e,t,a,i,r))}if(a=e.child,!nT(e,r)){var s=a.memoizedProps;if((n=null!==(n=n.compare)?n:ev)(s,i)&&e.ref===t.ref)return nM(e,t,r)}return t.flags|=1,(e=iQ(a,i)).ref=t.ref,e.return=t,t.child=e}function nr(e,t,n,i,r){if(null!==e){var a=e.memoizedProps;if(ev(a,i)&&e.ref===t.ref)if(o6=!1,t.pendingProps=i=a,!nT(e,r))return t.lanes=e.lanes,nM(e,t,r);else(131072&e.flags)!=0&&(o6=!0)}return nd(e,t,n,i,r)}function na(e,t,n,i){var r=i.children,a=null!==e?e.memoizedState:null;if(null===e&&null===t.stateNode&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),"hidden"===i.mode){if((128&t.flags)!=0){if(a=null!==a?a.baseLanes|n:n,null!==e){for(i=t.child=e.child,r=0;null!==i;)r=r|i.lanes|i.childLanes,i=i.sibling;i=r&~a}else i=0,t.child=null;return no(e,t,a,n,i)}if((0x20000000&n)==0)return i=t.lanes=0x20000000,no(e,t,null!==a?a.baseLanes|n:n,n,i);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&em(t,null!==a?a.cachePool:null),null!==a?eG(t,a):ej(),eY(t)}else null!==a?(em(t,a.cachePool),eG(t,a),eZ(),t.memoizedState=null):(null!==e&&em(t,null),ej(),eZ());return nt(e,t,r,n),t.child}function ns(e,t){return null!==e&&22===e.tag||null!==t.stateNode||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function no(e,t,n,i,r){var a=ef();return t.memoizedState={baseLanes:n,cachePool:a=null===a?null:{parent:rz?od._currentValue:od._currentValue2,pool:a}},null!==e&&em(t,null),ej(),eY(t),null!==e&&Y(e,t,i,!0),t.childLanes=r,null}function nl(e,t){return(t=nx({mode:t.mode,children:t.children},e.mode)).ref=e.ref,e.child=t,t.return=e,t}function nu(e,t,n){return oI(t,e.child,null,n),e=nl(t,t.pendingProps),e.flags|=2,eK(t),t.memoizedState=null,e}function nc(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=4194816);else{if("function"!=typeof n&&"object"!=typeof n)throw Error(i(284));(null===e||e.ref!==n)&&(t.flags|=4194816)}}
395function nd(e,t,n,i,r){return K(t),n=e0(e,t,n,i,void 0,r),i=e4(),null===e||o6?(ot&&i&&R(t),t.flags|=1,nt(e,t,n,r),t.child):(e5(e,t,r),nM(e,t,r))}function nh(e,t,n,i,r,a){return K(t),t.updateQueue=null,n=e2(t,i,n,r),e1(e),i=e4(),null===e||o6?(ot&&i&&R(t),t.flags|=1,nt(e,t,n,a),t.child):(e5(e,t,a),nM(e,t,a))}function np(e,t,n,i,r){if(K(t),null===t.stateNode){var a=sT,s=n.contextType;"object"==typeof s&&null!==s&&(a=J(s)),t.memoizedState=null!==(a=new n(i,a)).state&&void 0!==a.state?a.state:null,a.updater=o4,t.stateNode=a,a._reactInternals=t,(a=t.stateNode).props=i,a.state=t.memoizedState,a.refs={},eL(t),s=n.contextType,a.context="object"==typeof s&&null!==s?J(s):sT,a.state=t.memoizedState,"function"==typeof(s=n.getDerivedStateFromProps)&&(t2(t,n,s,i),a.state=t.memoizedState),"function"==typeof n.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),ez(t,i,a,r),eO(),a.state=t.memoizedState),"function"==typeof a.componentDidMount&&(t.flags|=4194308),i=!0}else if(null===e){a=t.stateNode;var o=t.memoizedProps,l=t5(n,o);a.props=l;var u=a.context,c=n.contextType;s=sT,"object"==typeof c&&null!==c&&(s=J(c));var d=n.getDerivedStateFromProps;c="function"==typeof d||"function"==typeof a.getSnapshotBeforeUpdate,o=t.pendingProps!==o,c||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(o||u!==s)&&t4(t,a,i,s),oU=!1;var h=t.memoizedState;a.state=h,ez(t,i,a,r),eO(),u=t.memoizedState,o||h!==u||oU?("function"==typeof d&&(t2(t,n,d,i),u=t.memoizedState),(l=oU||t3(t,n,l,i,h,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=i,t.memoizedState=u),a.props=i,a.state=u,a.context=s,i=l):("function"==typeof a.componentDidMount&&(t.flags|=4194308),i=!1)}else{a=t.stateNode,eF(e,t),c=t5(n,s=t.memoizedProps),a.props=c,d=t.pendingProps,h=a.context,u=n.contextType,l=sT,"object"==typeof u&&null!==u&&(l=J(u)),(u="function"==typeof(o=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||h!==l)&&t4(t,a,i,l),oU=!1,h=t.memoizedState,a.state=h,ez(t,i,a,r),eO();var p=t.memoizedState;s!==d||h!==p||oU||null!==e&&null!==e.dependencies&&Z(e.dependencies)?("function"==typeof o&&(t2(t,n,o,i),p=t.memoizedState),(c=oU||t3(t,n,c,i,h,p,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(i,p,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(i,p,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=p),a.props=i,a.state=p,a.context=l,i=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),i=!1)}return a=i,nc(e,t),i=(128&t.flags)!=0,a||i?(a=t.stateNode,n=i&&"function"!=typeof n.getDerivedStateFromError?null:a.render(),t.flags|=1,null!==e&&i?(t.child=oI(t,e.child,null,r),t.child=oI(t,null,n,r)):nt(e,t,n,r),t.memoizedState=a.state,e=t.child):e=nM(e,t,r),e}function nf(e,t,n,i){return H(),t.flags|=256,nt(e,t,n,i),t.child}function nm(e){return{baseLanes:e,cachePool:eg()}}function ng(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=lP),e}function nv(e,t,n){var r,a=t.pendingProps,s=!1,o=(128&t.flags)!=0;if((r=o)||(r=(null===e||null!==e.memoizedState)&&(2&oV.current)!=0),r&&(s=!0,t.flags&=-129),r=(32&t.flags)!=0,t.flags&=-33,null===e){if(ot){if(s?eX(t):eZ(),(e=oe)?null!==(e=aW(e,oi))&&(t.memoizedState={dehydrated:e,treeContext:null!==s2?{id:s3,overflow:s4}:null,retryLane:0x20000000,hydrationErrors:null},(n=i3(e)).return=t,t.child=n,s7=t,oe=null):e=null,null===e)throw k(t);return aR(e)?t.lanes=32:t.lanes=0x20000000,null}var l=a.children;return a=a.fallback,s?(eZ(),l=nx({mode:"hidden",children:l},s=t.mode),a=i1(a,s,n,null),l.return=t,a.return=t,l.sibling=a,t.child=l,(a=t.child).memoizedState=nm(n),a.childLanes=ng(e,r,n),t.memoizedState=o8,ns(null,a)):(eX(t),ny(t,l))}var u=e.memoizedState;if(null!==u&&null!==(l=u.dehydrated)){if(o)256&t.flags?(eX(t),t.flags&=-257,t=nb(e,t,n)):null!==t.memoizedState?(eZ(),t.child=e.child,t.flags|=128,t=null):(eZ(),l=a.fallback,s=t.mode,a=nx({mode:"visible",children:a.children},s),l=i1(l,s,n,null),l.flags|=2,a.return=t,l.return=t,a.sibling=l,t.child=a,oI(t,e.child,null,n),(a=t.child).memoizedState=nm(n),a.childLanes=ng(e,r,n),t.memoizedState=o8,t=ns(null,a));else if(eX(t),aR(l))r=aI(l).digest,(a=Error(i(419))).stack="",a.digest=r,G({value:a,source:null,stack:null}),t=nb(e,t,n);else if(o6||Y(e,t,n,!1),r=(n&e.childLanes)!=0,o6||r){if(null!==(r=lg)&&0!==(a=b(r,n))&&a!==u.retryLane)throw u.retryLane=a,eR(e,a),iy(r,e,a),o5;aP(l)||iP(),t=nb(e,t,n)}else aP(l)?(t.flags|=192,t.child=e.child,t=null):(e=u.treeContext,rG&&(oe=az(l),s7=t,ot=!0,on=null,oi=!1,null!==e&&D(t,e)),t=ny(t,a.children),t.flags|=4096);return t}return s?(eZ(),l=a.fallback,s=t.mode,o=(u=e.child).sibling,(a=iQ(u,{mode:"hidden",children:a.children})).subtreeFlags=0x3e00000&u.subtreeFlags,null!==o?l=iQ(o,l):(l=i1(l,s,n,null),l.flags|=2),l.return=t,a.return=t,a.sibling=l,t.child=a,ns(null,a),a=t.child,null===(l=e.child.memoizedState)?l=nm(n):(null!==(s=l.cachePool)?(u=rz?od._currentValue:od._currentValue2,s=s.parent!==u?{parent:u,pool:u}
395:s):s=eg(),l={baseLanes:l.baseLanes|n,cachePool:s}),a.memoizedState=l,a.childLanes=ng(e,r,n),t.memoizedState=o8,ns(e.child,a)):(eX(t),e=(n=e.child).sibling,(n=iQ(n,{mode:"visible",children:a.children})).return=t,n.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function ny(e,t){return(t=nx({mode:"visible",children:t},e.mode)).return=e,e.child=t}function nx(e,n){return(e=t(22,e,null,n)).lanes=0,e}function nb(e,t,n){return oI(t,e.child,null,n),e=ny(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function nS(e,t,n){e.lanes|=t;var i=e.alternate;null!==i&&(i.lanes|=t),X(e.return,t,n)}function n_(e,t,n,i,r,a){var s=e.memoizedState;null===s?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:r,treeForkCount:a}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=i,s.tail=n,s.tailMode=r,s.treeForkCount=a)}function nw(e,t,n){var i=t.pendingProps,r=i.revealOrder,a=i.tail;i=i.children;var s=oV.current,o=(2&s)!=0;if(o?(s=1&s|2,t.flags|=128):s&=1,d(oV,s),nt(e,t,i,n),i=ot?s$:0,!o&&null!==e&&(128&e.flags)!=0)o:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&nS(e,n,t);else if(19===e.tag)nS(e,n,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(n=t.child,r=null;null!==n;)null!==(e=n.alternate)&&null===eJ(e)&&(r=n),n=n.sibling;null===(n=r)?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),n_(t,!1,r,n,a,i);break;case"backwards":case"unstable_legacy-backwards":for(n=null,r=t.child,t.child=null;null!==r;){if(null!==(e=r.alternate)&&null===eJ(e)){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}n_(t,!0,n,null,a,i);break;case"together":n_(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function nM(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),lE|=t.lanes,(n&t.childLanes)==0){if(null===e)return null;else if(Y(e,t,n,!1),(n&t.childLanes)==0)return null}if(null!==e&&t.child!==e.child)throw Error(i(153));if(null!==t.child){for(n=iQ(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=iQ(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function nT(e,t){return(e.lanes&t)!=0||!!(null!==(e=e.dependencies)&&Z(e))}function nE(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)o6=!0;else{if(!nT(e,n)&&(128&t.flags)==0)return o6=!1,function(e,t,n){switch(t.tag){case 3:L(t,t.stateNode.containerInfo),j(t,od,e.memoizedState.cache),H();break;case 27:case 5:N(t);break;case 4:L(t,t.stateNode.containerInfo);break;case 10:j(t,t.type,t.memoizedProps.value);break;case 31:if(null!==t.memoizedState)return t.flags|=128,eq(t),null;break;case 13:var i=t.memoizedState;if(null!==i)return null!==i.dehydrated?(eX(t),t.flags|=128,null):(n&t.child.childLanes)!=0?nv(e,t,n):(eX(t),null!==(e=nM(e,t,n))?e.sibling:null);eX(t);break;case 19:var r=(128&e.flags)!=0;if((i=(n&t.childLanes)!=0)||(Y(e,t,n,!1),i=(n&t.childLanes)!=0),r){if(i)return nw(e,t,n);t.flags|=128}if(null!==(r=t.memoizedState)&&(r.rendering=null,r.tail=null,r.lastEffect=null),d(oV,oV.current),i)break;return null;case 22:return t.lanes=0,na(e,t,n,t.pendingProps);case 24:j(t,od,e.memoizedState.cache)}return nM(e,t,n)}(e,t,n);o6=(131072&e.flags)!=0}else o6=!1,ot&&(1048576&t.flags)!=0&&P(t,s$,t.index);switch(t.lanes=0,t.tag){case 16:o:{var r=t.pendingProps;if(e=eb(t.elementType),t.type=e,"function"==typeof e)iJ(e)?(r=t5(e,r),t.tag=1,t=np(null,t,e,r,n)):(t.tag=0,t=nd(null,t,e,r,n));else{if(null!=e){var a=e.$$typeof;if(a===rp){t.tag=11,t=nn(null,t,e,r,n);break o}if(a===rg){t.tag=14,t=ni(null,t,e,r,n);break o}}throw Error(i(306,t=l(e)||e,""))}}return t;case 0:return nd(e,t,t.type,t.pendingProps,n);case 1:return a=t5(r=t.type,t.pendingProps),np(e,t,r,a,n);case 3:o:{if(L(t,t.stateNode.containerInfo),null===e)throw Error(i(387));var s=t.pendingProps;r=(a=t.memoizedState).element,eF(e,t),ez(t,s,null,n);var o=t.memoizedState;if(j(t,od,s=o.cache),s!==a.cache&&q(t,[od],n,!0),eO(),s=o.element,rG&&a.isDehydrated)if(a={element:s,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=nf(e,t,s,n);break o}else if(s!==r){G(r=A(Error(i(424)),t)),t=nf(e,t,s,n);break o}else for(rG&&(oe=aB(t.stateNode.containerInfo),s7=t,ot=!0,on=null,oi=!0),n=oD(t,null,s,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling;
395else{if(H(),s===r){t=nM(e,t,n);break o}nt(e,t,s,n)}t=t.child}return t;case 26:if(si)return nc(e,t),null===e?(n=ss(t.type,null,t.pendingProps,null))?t.memoizedState=n:ot||(t.stateNode=sh(t.type,t.pendingProps,s8.current,t)):t.memoizedState=ss(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:if(sv)return N(t),null===e&&sv&&ot&&(r=t.stateNode=sy(t.type,t.pendingProps,s8.current,s5.current,!1),s7=t,oi=!0,oe=aH(t.type,r,oe)),nt(e,t,t.pendingProps.children,n),nc(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=aV(r,t.type,t.pendingProps,oi))?(t.stateNode=r,s7=t,oe=ak(r),oi=!1,a=!0):a=!1),a||k(t)),N(t),a=t.type,s=t.pendingProps,o=null!==e?e.memoizedProps:null,r=s.children,rN(a,s)?r=null:null!==o&&rN(a,o)&&(t.flags|=32),null!==t.memoizedState&&(a=e0(e,t,e3,null,null,n),rz?r5._currentValue=a:r5._currentValue2=a),nc(e,t),nt(e,t,r,n),t.child;case 6:return null===e&&ot&&(sn(t.pendingProps,s5.current),(e=n=oe)&&(null!==(n=aG(n,t.pendingProps,oi))?(t.stateNode=n,s7=t,oe=null,e=!0):e=!1),e||k(t)),null;case 13:return nv(e,t,n);case 4:return L(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=oI(t,null,r,n):nt(e,t,r,n),t.child;case 11:return nn(e,t,t.type,t.pendingProps,n);case 7:return nt(e,t,t.pendingProps,n),t.child;case 8:case 12:return nt(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,j(t,t.type,r.value),nt(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,K(t),r=r(a=J(a)),t.flags|=1,nt(e,t,r,n),t.child;case 14:return ni(e,t,t.type,t.pendingProps,n);case 15:return nr(e,t,t.type,t.pendingProps,n);case 19:return nw(e,t,n);case 31:var u=e,c=t,h=n,p=c.pendingProps,f=(128&c.flags)!=0;if(c.flags&=-129,null===u){if(ot){if("hidden"===p.mode)return u=nl(c,p),c.lanes=0x20000000,ns(null,u);if(eq(c),(u=oe)?null!==(u=aj(u,oi))&&(c.memoizedState={dehydrated:u,treeContext:null!==s2?{id:s3,overflow:s4}:null,retryLane:0x20000000,hydrationErrors:null},(h=i3(u)).return=c,c.child=h,s7=c,oe=null):u=null,null===u)throw k(c);return c.lanes=0x20000000,null}return nl(c,p)}var m=u.memoizedState;if(null!==m){var g=m.dehydrated;if(eq(c),f)if(256&c.flags)c.flags&=-257,c=nu(u,c,h);else if(null!==c.memoizedState)c.child=u.child,c.flags|=128,c=null;else throw Error(i(558));else if(o6||Y(u,c,h,!1),f=(h&u.childLanes)!=0,o6||f){if(null!==(p=lg)&&0!==(g=b(p,h))&&g!==m.retryLane)throw m.retryLane=g,eR(u,g),iy(p,u,g),o5;iP(),c=nu(u,c,h)}else u=m.treeContext,rG&&(oe=aO(g),s7=c,ot=!0,on=null,oi=!1,null!==u&&D(c,u)),c=nl(c,p),c.flags|=4096;return c}return(u=iQ(u.child,{mode:p.mode,children:p.children})).ref=c.ref,c.child=u,u.return=c,u;case 22:return na(e,t,n,t.pendingProps);case 24:return K(t),r=J(od),null===e?(null===(a=ef())&&(a=lg,s=ee(),a.pooledCache=s,s.refCount++,null!==s&&(a.pooledCacheLanes|=n),a=s),t.memoizedState={parent:r,cache:a},eL(t),j(t,od,a)):((e.lanes&n)!=0&&(eF(e,t),ez(t,null,null,n),eO()),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),j(t,od,r)):(j(t,od,r=s.cache),r!==a.cache&&q(t,[od],n,!0))),nt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function nA(e){e.flags|=4}function nC(e){rV&&(e.flags|=8)}function nP(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 nR(e,t,n,i){if(rH)for(n=t.child;null!==n;){if(5===n.tag||6===n.tag)rL(e,n.stateNode);else if(!(4===n.tag||sv&&27===n.tag)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}else if(rV)for(var r=t.child;null!==r;){if(5===r.tag){var a=r.stateNode;n&&i&&(a=aA(a,r.type,r.memoizedProps)),rL(e,a)}else if(6===r.tag)a=r.stateNode,n&&i&&(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),nR(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 nI(e,t){if(rV&&nP(e,t)){var n=(e=t.stateNode).containerInfo,i=aw();(function e(t,n,i,r){var a=!1;if(rV)for(var s=n.child;null!==s;){if(5===s.tag){var o=s.stateNode;
395i&&r&&(o=aA(o,s.type,s.memoizedProps)),aM(t,o)}else if(6===s.tag)o=s.stateNode,i&&r&&(o=aC(o,s.memoizedProps)),aM(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===n)break;for(;null===s.sibling;){if(null===s.return||s.return===n)return a;s=s.return}s.sibling.return=s.return,s=s.sibling}return a})(i,t,!1,!1),e.pendingChildren=i,nA(t),aT(n,i)}}function nD(e,t,n,i){if(rH)e.memoizedProps!==i&&nA(t);else if(rV){var r=e.stateNode,a=e.memoizedProps;if((e=nP(e,t))||a!==i){var s=s5.current;(a=a_(r,n,a,i,!e,null))===r?t.stateNode=r:(nC(t),rF(a,n,i,s)&&nA(t),t.stateNode=a,e&&nR(a,t,!1,!1))}else t.stateNode=r}}function nL(e,t,n,i,r){if((32&e.mode)!=0&&(null===n?rJ(t,i):rQ(t,n,i))){if(e.flags|=0x1000000,(0x13ffff40&r)===r||r$(t,i))if(r0(e.stateNode,t,i))e.flags|=8192;else if(iE())e.flags|=8192;else throw oC=oA,oT}else e.flags&=-0x1000001}function nF(e,t){if(sf(t)){if(e.flags|=0x1000000,!sm(t))if(iE())e.flags|=8192;else throw oC=oA,oT}else e.flags&=-0x1000001}function nN(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?m():0x20000000,e.lanes|=t,lR|=t)}function nU(e,t){if(!ot)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var i=null;null!==n;)null!==n.alternate&&(i=n),n=n.sibling;null===i?t||null===e.tail?e.tail=null:e.tail.sibling=null:i.sibling=null}}function nk(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,i=0;if(t)for(var r=e.child;null!==r;)n|=r.lanes|r.childLanes,i|=0x3e00000&r.subtreeFlags,i|=0x3e00000&r.flags,r.return=e,r=r.sibling;else for(r=e.child;null!==r;)n|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=i,e.childLanes=n,t}function nB(e,t){switch(I(t),t.tag){case 3:W(od),F();break;case 26:case 27:case 5:U(t);break;case 4:F();break;case 31:null!==t.memoizedState&&eK(t);break;case 13:eK(t);break;case 19:c(oV);break;case 10:W(t.type);break;case 22:case 23:eK(t),eW(),null!==e&&c(ow);break;case 24:W(od)}}function nO(e,t){try{var n=t.updateQueue,i=null!==n?n.lastEffect:null;if(null!==i){var r=i.next;n=r;do{if((n.tag&e)===e){i=void 0;var a=n.create;n.inst.destroy=i=a()}n=n.next}while(n!==r)}}catch(e){ij(t,t.return,e)}}function nz(e,t,n){try{var i=t.updateQueue,r=null!==i?i.lastEffect:null;if(null!==r){var a=r.next;i=a;do{if((i.tag&e)===e){var s=i.inst,o=s.destroy;if(void 0!==o){s.destroy=void 0,r=t;try{o()}catch(e){ij(r,n,e)}}}i=i.next}while(i!==a)}}catch(e){ij(t,t.return,e)}}function nH(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{eV(t,n)}catch(t){ij(e,e.return,t)}}}function nV(e,t,n){n.props=t5(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){ij(e,t,n)}}function nG(e,t){try{var n=e.ref;if(null!==n){switch(e.tag){case 26:case 27:case 5:var i=rA(e.stateNode);break;default:i=e.stateNode}"function"==typeof n?e.refCleanup=n(i):n.current=i}}catch(n){ij(e,t,n)}}function nj(e,t){var n=e.ref,i=e.refCleanup;if(null!==n)if("function"==typeof i)try{i()}catch(n){ij(e,t,n)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(n){ij(e,t,n)}else n.current=null}function nW(e){var t=e.type,n=e.memoizedProps,i=e.stateNode;try{ac(i,t,n,e)}catch(t){ij(e,e.return,t)}}function nX(e,t,n){try{ad(e.stateNode,e.type,n,t,e)}catch(t){ij(e,e.return,t)}}function nq(e){return 5===e.tag||3===e.tag||!!si&&26===e.tag||!!sv&&27===e.tag&&s_(e.type)||4===e.tag}function nY(e){o:for(;;){for(;null===e.sibling;){if(null===e.return||nq(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&&s_(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 nZ(e,t,n){var i=e.tag;if(5===i||6===i)e=e.stateNode,t?ah(n,e,t):ao(n,e);else if(4!==i&&(sv&&27===i&&s_(e.type)&&(n=e.stateNode),null!==(e=e.child)))for(nZ(e,t,n),e=e.sibling;null!==e;)nZ(e,t,n),e=e.sibling}function nK(e,t,n){e=e.containerInfo;try{aE(e,n)}catch(e){ij(t,t.return,e)}}function nJ(e){var t=e.stateNode,n=e.memoizedProps;
395try{sx(e.type,n,t,e)}catch(t){ij(e,e.return,t)}}function nQ(e,t,n){var i=n.flags;switch(n.tag){case 0:case 11:case 15:n8(e,n),4&i&&nO(5,n);break;case 1:if(n8(e,n),4&i)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(e){ij(n,n.return,e)}else{var r=t5(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){ij(n,n.return,e)}}64&i&&nH(n),512&i&&nG(n,n.return);break;case 3:if(n8(e,n),64&i&&null!==(i=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 27:case 5:e=rA(n.child.stateNode);break;case 1:e=n.child.stateNode}try{eV(i,e)}catch(e){ij(n,n.return,e)}}break;case 27:sv&&null===t&&4&i&&nJ(n);case 26:case 5:if(n8(e,n),null===t){if(4&i)nW(n);else if(64&i){e=n.type,t=n.memoizedProps,r=n.stateNode;try{aQ(r,e,t,n)}catch(e){ij(n,n.return,e)}}}512&i&&nG(n,n.return);break;case 12:default:n8(e,n);break;case 31:n8(e,n),4&i&&n1(e,n);break;case 13:n8(e,n),4&i&&n2(e,n),64&i&&null!==(i=n.memoizedState)&&null!==(i=i.dehydrated)&&aD(i,n=iY.bind(null,n));break;case 22:if(!(i=null!==n.memoizedState||o9)){t=null!==t&&null!==t.memoizedState||o7,r=o9;var a=o7;o9=i,(o7=t)&&!a?function e(t,n,i){for(i=i&&(8772&n.subtreeFlags)!=0,n=n.child;null!==n;){var r=n.alternate,a=t,s=n,o=s.flags;switch(s.tag){case 0:case 11:case 15:e(a,s,i),nO(4,s);break;case 1:if(e(a,s,i),"function"==typeof(a=(r=s).stateNode).componentDidMount)try{a.componentDidMount()}catch(e){ij(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){ij(r,r.return,e)}}i&&64&o&&nH(s),nG(s,s.return);break;case 27:sv&&nJ(s);case 26:case 5:e(a,s,i),i&&null===r&&4&o&&nW(s),nG(s,s.return);break;case 12:default:e(a,s,i);break;case 31:e(a,s,i),i&&4&o&&n1(a,s);break;case 13:e(a,s,i),i&&4&o&&n2(a,s);break;case 22:null===s.memoizedState&&e(a,s,i),nG(s,s.return);case 30:}n=n.sibling}}(e,n,(8772&n.subtreeFlags)!=0):n8(e,n),o9=r,o7=a}case 30:}}function n$(e,t,n){for(n=n.child;null!==n;)n0(e,t,n),n=n.sibling}function n0(e,t,n){if(sj&&"function"==typeof sj.onCommitFiberUnmount)try{sj.onCommitFiberUnmount(sG,n)}catch{}switch(n.tag){case 26:if(si){o7||nj(n,t),n$(e,t,n),n.memoizedState?sl(n.memoizedState):n.stateNode&&sd(n.stateNode);break}case 27:if(sv){o7||nj(n,t);var i=li,r=lr;s_(n.type)&&(li=n.stateNode,lr=!1),n$(e,t,n),sb(n.stateNode),li=i,lr=r;break}case 5:o7||nj(n,t);case 6:if(rH){if(i=li,r=lr,li=null,n$(e,t,n),li=i,lr=r,null!==li)if(lr)try{am(li,n.stateNode)}catch(e){ij(n,t,e)}else try{af(li,n.stateNode)}catch(e){ij(n,t,e)}}else n$(e,t,n);break;case 18:rH&&null!==li&&(lr?a5(li,n.stateNode):a4(li,n.stateNode));break;case 4:rH?(i=li,r=lr,li=n.stateNode.containerInfo,lr=!0,n$(e,t,n),li=i,lr=r):(rV&&nK(n.stateNode,n,aw()),n$(e,t,n));break;case 0:case 11:case 14:case 15:nz(2,n,t),o7||nz(4,n,t),n$(e,t,n);break;case 1:o7||(nj(n,t),"function"==typeof(i=n.stateNode).componentWillUnmount&&nV(n,t,i)),n$(e,t,n);break;case 21:default:n$(e,t,n);break;case 22:o7=(i=o7)||null!==n.memoizedState,n$(e,t,n),o7=i}}function n1(e,t){if(rG&&null===t.memoizedState&&null!==(e=t.alternate)&&null!==(e=e.memoizedState)){e=e.dehydrated;try{a0(e)}catch(e){ij(t,t.return,e)}}}function n2(e,t){if(rG&&null===t.memoizedState&&null!==(e=t.alternate)&&null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))try{a1(e)}catch(e){ij(t,t.return,e)}}function n3(e,t){var n=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(i(435,e.tag))}}(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var i=iZ.bind(null,e,t);t.then(i,i)}})}function n4(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var a=n[r],s=e,o=t;if(rH){var l=o;o:for(;null!==l;){switch(l.tag){case 27:if(sv){if(s_(l.type)){li=l.stateNode,lr=!1;break o}break}case 5:li=l.stateNode,lr=!1;break o;case 3:case 4:li=l.stateNode.containerInfo,lr=!0;break o}l=l.return}if(null===li)throw Error(i(160));n0(s,o,a),li=null,lr=!1}else n0(s,o,a);null!==(s=a.alternate)&&(s.return=null),a.return=null}if(13886&t.subtreeFlags)for(t=t.child;null!==t;)n5(t,e),t=t.sibling}function n5(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:n4(t,e),n6(e),4&r&&(nz(3,e,e.return),nO(3,e),nz(5,e,e.return));break;case 1:n4(t,e),n6(e),512&r&&(o7||null===n||nj(n,n.return)),64&r&&o9&&null!==(e=e.updateQueue)&&null!==(r=e.callbacks)&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===n?r:n.concat(r));break;case 26:if(si){var a=la;if(n4(t,e),n6(e),512&r&&(o7||null===n||nj(n,n.return)),4&r){r=null!==n?n.memoizedState:null;var s=e.memoizedState;null===n?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!==n.stateNode&&sd(n.stateNode):sl(r),null===s?sc(a,e.type,e.stateNode):so(a,s,e.memoizedProps)):null===s&&null!==e.stateNode&&nX(e,e.memoizedProps,n.memoizedProps)}break}case 27:if(sv){n4(t,e),n6(e),512&r&&(o7||null===n||nj(n,n.return)),null!==n&&4&r&&nX(e,e.memoizedProps,n.memoizedProps);break}case 5:if(n4(t,e),n6(e),512&r&&(o7||null===n||nj(n,n.return)),rH){if(32&e.flags){a=e.stateNode;try{ag(a)}catch(t){ij(e,e.return,t)}}4&r&&null!=e.stateNode&&(a=e.memoizedProps,nX(e,a,null!==n?n.memoizedProps:a)),1024&r&&(le=!0)}else rV&&null!==e.alternate&&(e.alternate.stateNode=e.stateNode);break;case 6:if(n4(t,e),n6(e),4&r&&rH){if(null===e.stateNode)throw Error(i(162));r=e.memoizedProps,n=null!==n?n.memoizedProps:r,a=e.stateNode;try{au(a,n,r)}catch(t){ij(e,e.return,t)}}break;case 3:if(si?(sp(),a=la,la=sa(t.containerInfo),n4(t,e),la=a):n4(t,e),n6(e),4&r){if(rH&&rG&&null!==n&&n.memoizedState.isDehydrated)try{a$(t.containerInfo)}catch(t){ij(e,e.return,t)}if(rV){r=t.containerInfo,n=t.pendingChildren;try{aE(r,n)}catch(t){ij(e,e.return,t)}}}le&&(le=!1,function e(t){if(1024&t.subtreeFlags)for(t=t.child;null!==t;){var n=t;e(n),5===n.tag&&1024&n.flags&&r6(n.stateNode),t=t.sibling}}(e));break;case 4:si?(n=la,la=sa(e.stateNode.containerInfo),n4(t,e),n6(e),la=n):(n4(t,e),n6(e)),4&r&&rV&&nK(e.stateNode,e,e.stateNode.pendingChildren);break;case 12:default:n4(t,e),n6(e);break;case 31:case 19:n4(t,e),n6(e),4&r&&null!==(r=e.updateQueue)&&(e.updateQueue=null,n3(e,r));break;case 13:n4(t,e),n6(e),8192&e.child.flags&&null!==e.memoizedState!=(null!==n&&null!==n.memoizedState)&&(lF=sU()),4&r&&null!==(r=e.updateQueue)&&(e.updateQueue=null,n3(e,r));break;case 22:a=null!==e.memoizedState;var o=null!==n&&null!==n.memoizedState,l=o9,u=o7;if(o9=l||a,o7=u||o,n4(t,e),o7=u,o9=l,n6(e),8192&r&&((t=e.stateNode)._visibility=a?-2&t._visibility:1|t._visibility,a&&(null===n||o||o9||o7||function e(t){for(t=t.child;null!==t;){var n=t;switch(n.tag){case 0:case 11:case 14:case 15:nz(4,n,n.return),e(n);break;case 1:nj(n,n.return);var i=n.stateNode;"function"==typeof i.componentWillUnmount&&nV(n,n.return,i),e(n);break;case 27:sv&&sb(n.stateNode);case 26:case 5:nj(n,n.return),e(n);break;case 22:null===n.memoizedState&&e(n);break;default:e(n)}t=t.sibling}}(e)),rH)){o:if(n=null,rH)for(t=e;;){if(5===t.tag||si&&26===t.tag){if(null===n){o=n=t;try{s=o.stateNode,a?av(s):ax(o.stateNode,o.memoizedProps)}catch(e){ij(o,o.return,e)}}}else if(6===t.tag){if(null===n){o=t;try{var c=o.stateNode;a?ay(c):ab(c,o.memoizedProps)}catch(e){ij(o,o.return,e)}}}else if(18===t.tag){if(null===n){o=t;try{var d=o.stateNode;a?a6(d):a8(o.stateNode)}catch(e){ij(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;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}}4&r&&null!==(r=e.updateQueue)&&null!==(n=r.retryQueue)&&(r.retryQueue=null,n3(e,n));case 30:case 21:}}function n6(e){var t=e.flags;if(2&t){try{for(var n,r=e.return;null!==r;){if(nq(r)){n=r;break}r=r.return}if(rH){if(null==n)throw Error(i(160));switch(n.tag){case 27:if(sv){var a=n.stateNode,s=nY(e);nZ(e,s,a);break}case 5:var o=n.stateNode;32&n.flags&&(ag(o),n.flags&=-33);var l=nY(e);nZ(e,l,o);break;case 3:case 4:var u=n.stateNode.containerInfo,c=nY(e);!function e(t,n,i){var r=t.tag;if(5===r||6===r)t=t.stateNode,n?ap(i,t,n):al(i,t);else if(4!==r&&(sv&&27===r&&s_(t.type)&&(i=t.stateNode,n=null),null!==(t=t.child)))for(e(t,n,i),t=t.sibling;null!==t;)e(t,n,i),t=t.sibling}(e,c,u);break;default:throw Error(i(161))}}}catch(t){ij(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function n8(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)nQ(e,t.alternate,t),t=t.sibling}function n9(e,t){var n=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==n&&(null!=e&&e.refCount++,null!=n&&et(n))}function n7(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&et(e))}function ie(e,t,n,i){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)it(e,t,n,i),t=t.sibling}function it(e,t,n,i){var r=t.flags;switch(t.tag){case 0:case 11:case 15:ie(e,t,n,i),2048&r&&nO(9,t);break;case 1:case 31:case 13:default:ie(e,t,n,i);break;case 3:ie(e,t,n,i),2048&r&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&et(e)));break;case 12:if(2048&r){ie(e,t,n,i),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){ij(t,t.return,e)}}else ie(e,t,n,i);break;case 23:break;case 22:a=t.stateNode,s=t.alternate,null!==t.memoizedState?2&a._visibility?ie(e,t,n,i):ii(e,t):2&a._visibility?ie(e,t,n,i):(a._visibility|=2,function e(t,n,i,r,a){for(a=a&&(10256&n.subtreeFlags)!=0,n=n.child;null!==n;){var s=n,o=s.flags;switch(s.tag){case 0:case 11:case 15:e(t,s,i,r,a),nO(8,s);break;case 23:break;case 22:var l=s.stateNode;null!==s.memoizedState?2&l._visibility?e(t,s,i,r,a):ii(t,s):(l._visibility|=2,e(t,s,i,r,a)),a&&2048&o&&n9(s.alternate,s);break;case 24:e(t,s,i,r,a),a&&2048&o&&n7(s.alternate,s);break;default:e(t,s,i,r,a)}n=n.sibling}}(e,t,n,i,(10256&t.subtreeFlags)!=0)),2048&r&&n9(s,t);break;case 24:ie(e,t,n,i),2048&r&&n7(t.alternate,t)}}function ii(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var n=t,i=n.flags;switch(n.tag){case 22:ii(e,n),2048&i&&n9(n.alternate,n);break;case 24:ii(e,n),2048&i&&n7(n.alternate,n);break;default:ii(e,n)}t=t.sibling}}function ir(e,t,n){if(e.subtreeFlags&ls)for(e=e.child;null!==e;
395)ia(e,t,n),e=e.sibling}function ia(e,t,n){switch(e.tag){case 26:if(ir(e,t,n),e.flags&ls)if(null!==e.memoizedState)sg(n,la,e.memoizedState,e.memoizedProps);else{var i=e.stateNode,r=e.type;e=e.memoizedProps,((0x13ffff40&t)===t||r$(r,e))&&r2(n,i,r,e)}break;case 5:ir(e,t,n),e.flags&ls&&(i=e.stateNode,r=e.type,e=e.memoizedProps,((0x13ffff40&t)===t||r$(r,e))&&r2(n,i,r,e));break;case 3:case 4:si?(i=la,la=sa(e.stateNode.containerInfo),ir(e,t,n),la=i):ir(e,t,n);break;case 22:null===e.memoizedState&&(null!==(i=e.alternate)&&null!==i.memoizedState?(i=ls,ls=0x1000000,ir(e,t,n),ls=i):ir(e,t,n));break;default:ir(e,t,n)}}function is(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 io(e){var t=e.deletions;if((16&e.flags)!=0){if(null!==t)for(var n=0;n<t.length;n++){var i=t[n];ln=i,iu(i,e)}is(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)il(e),e=e.sibling}function il(e){switch(e.tag){case 0:case 11:case 15:io(e),2048&e.flags&&nz(9,e,e.return);break;case 3:case 12:default:io(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 n=t.deletions;if((16&t.flags)!=0){if(null!==n)for(var i=0;i<n.length;i++){var r=n[i];ln=r,iu(r,t)}is(t)}for(t=t.child;null!==t;){switch((n=t).tag){case 0:case 11:case 15:nz(8,n,n.return),e(n);break;case 22:2&(i=n.stateNode)._visibility&&(i._visibility&=-3,e(n));break;default:e(n)}t=t.sibling}}(e)):io(e)}}function iu(e,t){for(;null!==ln;){var n=ln;switch(n.tag){case 0:case 11:case 15:nz(8,n,t);break;case 23:case 22:if(null!==n.memoizedState&&null!==n.memoizedState.cachePool){var i=n.memoizedState.cachePool.pool;null!=i&&i.refCount++}break;case 24:et(n.memoizedState.cache)}if(null!==(i=n.child))i.return=n,ln=i;else for(n=e;null!==ln;){var r=(i=ln).sibling,a=i.return;if(function e(t){var n=t.alternate;null!==n&&(t.alternate=null,e(n)),t.child=null,t.deletions=null,t.sibling=null,5===t.tag&&null!==(n=t.stateNode)&&rK(n),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}(i),i===n){ln=null;break}if(null!==r){r.return=a,ln=r;break}ln=a}}}function ic(e){var t=rj(e);if(null!=t){if("string"!=typeof t.memoizedProps["data-testname"])throw Error(i(364));return t}if(null===(e=ae(e)))throw Error(i(362));return e.stateNode.current}function id(e,t){var n=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],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||!ai(r)){for(;null!=o&&id(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===n||26===n||27===n)&&ar(e.stateNode,t.value))return!0;break;case lh:if((5===n||6===n||26===n||27===n)&&null!==(e=an(e))&&0<=e.indexOf(t.value))return!0;break;case ld:if((5===n||26===n||27===n)&&"string"==typeof(e=e.memoizedProps["data-testname"])&&e.toLowerCase()===t.value.toLowerCase())return!0;break;default:throw Error(i(365))}return!1}function ih(e){switch(e.$$typeof){case ll:return"<"+(l(e.value)||"Unknown")+">";case lu:return":has("+(ih(e)||"")+")";case lc:return'[role="'+e.value+'"]';case lh:return'"'+e.value+'"';case ld:return'[data-testname="'+e.value+'"]';default:throw Error(i(365))}}function ip(e,t){var n=[];e=[e,0];for(var 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||!ai(r)){for(;null!=o&&id(r,o);)o=t[++s];if(s===t.length)n.push(r);else for(r=r.child;null!==r;)e.push(r,s),r=r.sibling}}return n}function im(e,t){if(!r7)throw Error(i(363));e=ip(e=ic(e),t),t=[],e=Array.from(e);for(var n=0;n<e.length;){var r=e[n++],a=r.tag;if(5===a||26===a||27===a)ai(r)||t.push(r.stateNode);else for(r=r.child;null!==r;)e.push(r),r=r.sibling}return t}function ig(){return(2&lm)!=0&&0!==ly?ly&-ly:null!==rw.T?ed():rY()}function iv(){if(0===lP)if((0x20000000&ly)==0||ot){var e=sR;(3932160&(sR<<=1))==0&&(sR=262144),lP=e}else lP=0x20000000;return null!==(e=oz.current)&&(e.flags|=32),lP}function iy(e,t,n){(e===lg&&(2===lx||9===lx)||null!==e.cancelPendingCommit)&&(iM(e,0),iS(e,ly,lP,!1)),v(e,n),((2&lm)==0||e!==lg)&&(e===lg&&((2&lm)==0&&(lA|=n),4===lT&&iS(e,ly,lP,!1)),ei(e))}function ix(e,t,n){if((6&lm)!=0)throw Error(i(327));for(var r=!n&&(127&t)==0&&(t&e.expiredLanes)==0||f(e,t),a=r?function(e,t){var n=lm;lm|=2;var r=iA(),a=iC();lg!==e||ly!==t?(lk=null,lU=sU()+500,iM(e,t)):l_=f(e,t);o:for(;;)try{if(0!==lx&&null!==lv){t=lv;var s=lb;l:switch(lx){case 1:lx=0,lb=null,iL(e,t,s,1);break;case 2:case 9:if(ey(s)){lx=0,lb=null,iD(t);break}t=function(){2!==lx&&9!==lx||lg!==e||(lx=7),ei(e)},s.then(t,t);break o;case 3:lx=7;break o;case 4:lx=5;break o;case 7:ey(s)?(lx=0,lb=null,iD(t)):(lx=0,lb=null,iL(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)){lx=0,lb=null;var d=l.sibling;if(null!==d)lv=d;else{var h=l.return;null!==h?(lv=h,iF(h)):lv=null}break l}}lx=0,lb=null,iL(e,t,s,5);break;
395case 6:lx=0,lb=null,iL(e,t,s,6);break;case 8:iw(),lT=6;break o;default:throw Error(i(462))}}for(;null!==lv&&!sF();)iI(lv);break}catch(t){iT(e,t)}return oo=os=null,rw.H=r,rw.A=a,lm=n,null!==lv?0:(lg=null,ly=0,eA(),lT)}(e,t):iR(e,t,!0),s=r;;){if(0===a)l_&&!r&&iS(e,t,0,!1);else{if(n=e.current.alternate,s&&!function(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&null!==(n=t.updateQueue)&&null!==(n=n.stores))for(var i=0;i<n.length;i++){var r=n[i],a=r.getSnapshot;r=r.value;try{if(!sW(a(),r))return!1}catch{return!1}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;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}(n)){a=iR(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=lI;var l=rG&&e.current.memoizedState.isDehydrated;if(l&&(iM(e,o).flags|=256),2!==(o=iR(e,o,!1))){if(lw&&!l){e.errorRecoveryDisabledLanes|=s,lA|=s,a=4;break o}s=lD,lD=a,null!==s&&(null===lD?lD=s:lD.push.apply(lD,s))}a=o}if(s=!1,2!==a)continue}}if(1===a){iM(e,0),iS(e,t,0,!0);break}o:{switch(r=e,s=a){case 0:case 1:throw Error(i(345));case 4:if((4194048&t)!==t)break;case 6:iS(r,t,lP,!lS);break o;case 2:lD=null;break;case 3:case 5:break;default:throw Error(i(329))}if((0x3c00000&t)===t&&10<(a=lF+300-sU())){if(iS(r,t,lP,!lS),0!==p(r,0,!0))break o;lV=t,r.timeoutHandle=rk(ib.bind(null,r,n,lD,lk,lL,t,lP,lA,lR,lS,s,"Throttled",-0,0),a);break o}ib(r,n,lD,lk,lL,t,lP,lA,lR,lS,s,null,-0,0)}}break}ei(e)}function ib(e,t,n,i,r,a,s,o,l,u,c,d,h,p){if(e.timeoutHandle=rO,8192&(d=t.subtreeFlags)||(0x1002000&d)==0x1002000){ia(t,a,d=r1());var f=(0x3c00000&a)===a?lF-sU():(4194048&a)===a?lN-sU():0;if(null!==(f=r3(d,f))){lV=a,e.cancelPendingCommit=f(iU.bind(null,e,t,a,n,i,r,s,o,l,c,d,null,h,p)),iS(e,a,s,!u);return}}iU(e,t,a,n,i,r,s,o,l)}function iS(e,t,n,i){t&=~lC,t&=~lA,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var r=t;0<r;){var a=31-sE(r),s=1<<a;i[a]=-1,r&=~s}0!==n&&y(e,n,t)}function i_(){return(6&lm)!=0||(er(0,!1),!1)}function iw(){if(null!==lv){if(0===lx)var e=lv.return;else e=lv,oo=os=null,e6(e),oP=null,oR=0,e=lv;for(;null!==e;)nB(e.alternate,e),e=e.return;lv=null}}function iM(e,t){var n=e.timeoutHandle;n!==rO&&(e.timeoutHandle=rO,rB(n)),null!==(n=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,n()),lV=0,iw(),lg=e,lv=n=iQ(e.current,null),ly=t,lx=0,lb=null,lS=!1,l_=f(e,t),lw=!1,lR=lP=lC=lA=lE=lT=0,lD=lI=null,lL=!1,(8&t)!=0&&(t|=32&t);var i=e.entangledLanes;if(0!==i)for(e=e.entanglements,i&=t;0<i;){var r=31-sE(i),a=1<<r;t|=e[r],i&=~a}return lM=t,eA(),n}function iT(e,t){oj=null,rw.H=o0,t===oM||t===oE?(t=eS(),lx=3):t===oT?(t=eS(),lx=4):lx=t===o5?8:null!==t&&"object"==typeof t&&"function"==typeof t.then?6:1,lb=t,null===lv&&(lT=1,t6(e,A(t,e.current)))}function iE(){var e=oz.current;return null===e||((4194048&ly)===ly?null===oH:((0x3c00000&ly)===ly||(0x20000000&ly)!=0)&&e===oH)}function iA(){var e=rw.H;return rw.H=o0,null===e?o0:e}function iC(){var e=rw.A;return rw.A=lo,e}function iP(){lT=4,lS||(4194048&ly)!==ly&&null!==oz.current||(l_=!0),(0x7ffffff&lE)==0&&(0x7ffffff&lA)==0||null===lg||iS(lg,ly,lP,!1)}function iR(e,t,n){var i=lm;lm|=2;var r=iA(),a=iC();(lg!==e||ly!==t)&&(lk=null,iM(e,t)),t=!1;var s=lT;o:for(;;)try{if(0!==lx&&null!==lv){var o=lv,l=lb;switch(lx){case 8:iw(),s=6;break o;case 3:case 2:case 9:case 6:null===oz.current&&(t=!0);var u=lx;if(lx=0,lb=null,iL(e,o,l,u),n&&l_){s=0;break o}break;default:u=lx,lx=0,lb=null,iL(e,o,l,u)}}(function(){for(;null!==lv;)iI(lv)})(),s=lT;break}catch(t){iT(e,t)}return t&&e.shellSuspendCounter++,oo=os=null,lm=i,rw.H=r,rw.A=a,null===lv&&(lg=null,ly=0,eA()),s}function iI(e){var t=nE(e.alternate,e,lM);e.memoizedProps=e.pendingProps,null===t?iF(e):lv=t}function iD(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=nh(n,t,t.pendingProps,t.type,void 0,ly);break;case 11:t=nh(n,t,t.pendingProps,t.type.render,t.ref,ly);break;case 5:e6(t);default:nB(n,t),t=nE(n,t=lv=i$(t,lM),lM)}e.memoizedProps=e.pendingProps,null===t?iF(e):lv=t}function iL(e,t,n,r){oo=os=null,e6(t),oP=null,oR=0;var a=t.return;try{if(function(e,t,n,r,a){if(n.flags|=32768,null!==r&&"object"==typeof r&&"function"==typeof r.then){if(null!==(t=n.alternate)&&Y(t,n,a,!0),null!==(n=oz.current)){switch(n.tag){case 31:case 13:return null===oH?iP():null===n.alternate&&0===lT&&(lT=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===oA?n.flags|=16384:(null===(t=n.updateQueue)?n.updateQueue=new Set([r]):t.add(r),iW(e,r,a)),!1;case 22:return n.flags|=65536,r===oA?n.flags|=16384:(null===(t=n.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):null===(n=t.retryQueue)?t.retryQueue=new Set([r]):n.add(r),iW(e,r,a)),!1}throw Error(i(435,n.tag))}return iW(e,r,a),iP(),!1}if(ot)return null!==(t=oz.current)?((65536&t.flags)==0&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==or&&G(A(e=Error(i(422),{cause:r}),n))):(r!==or&&G(A(t=Error(i(423),{cause:r}),n)),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=A(r,n),a=t9(e.stateNode,r,a),eB(e,a),4!==lT&&(lT=2)),!1;var s=Error(i(520),{cause:r});if(s=A(s,n),null===lI?lI=[s]:lI.push(s),4!==lT&&(lT=2),null===t)return!0;r=A(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=t9(n.stateNode,r,e),eB(n,e),!1;case 1:if(t=n.type,s=n.stateNode,(128&n.flags)==0&&("function"==typeof t.getDerivedStateFromError||null!==s&&"function"==typeof s.componentDidCatch&&(null===lB||!lB.has(s))))return n.flags|=65536,a&=-a,n.lanes|=a,ne(a=t7(a),e,n,r),eB(n,a),!1}n=n.return}while(null!==n)return!1}(e,a,t,n,ly)){lT=1,t6(e,A(n,e.current)),lv=null;return}}catch(t){if(null!==a)throw lv=a,t;lT=1,t6(e,A(n,e.current)),lv=null;return}32768&t.flags?(ot||1===r?e=!0:l_||(0x20000000&ly)!=0?e=!1:(lS=e=!0,(2===r||9===r||3===r||6===r)&&null!==(r=oz.current)&&13===r.tag&&(r.flags|=16384)),iN(t,e)):iF(t)}function iF(e){var t=e;do{if((32768&t.flags)!=0)return void iN(t,lS);e=t.return;var n=function(e,t,n){var r=t.pendingProps;switch(I(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return nk(t),null;case 3:return n=t.stateNode,r=null,null!==e&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),W(od),F(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(null===e||null===e.child)&&(z(t)?nA(t):null===e||e.memoizedState.isDehydrated&&(256&t.flags)==0||(t.flags|=1024,V())),nI(e,t),nk(t),null;case 26:if(si){var a=t.type,s=t.memoizedState;return null===e?(nA(t),null!==s?(nk(t),nF(t,s)):(nk(t),nL(t,a,null,r,n))):s?s!==e.memoizedState?(nA(t),nk(t),nF(t,s)):(nk(t),t.flags&=-0x1000001):(s=e.memoizedProps,rH?s!==r&&nA(t):nD(e,t,a,r),nk(t),nL(t,a,s,r,n
395)),null}case 27:if(sv){if(U(t),n=s8.current,a=t.type,null!==e&&null!=t.stateNode)rH?e.memoizedProps!==r&&nA(t):nD(e,t,a,r);else{if(!r){if(null===t.stateNode)throw Error(i(166));return nk(t),null}e=s5.current,z(t)?B(t,e):(t.stateNode=e=sy(a,r,n,e,!0),nA(t))}return nk(t),null}case 5:if(U(t),a=t.type,null!==e&&null!=t.stateNode)nD(e,t,a,r);else{if(!r){if(null===t.stateNode)throw Error(i(166));return nk(t),null}if(s=s5.current,z(t))B(t,s),a2(t.stateNode,a,r,s)&&(t.flags|=64);else{var o=rD(a,r,s8.current,s,t);nC(t),nR(o,t,!1,!1),t.stateNode=o,rF(o,a,r,s)&&nA(t)}}return nk(t),nL(t,t.type,null===e?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&null!=t.stateNode)n=e.memoizedProps,rH?n!==r&&nA(t):rV&&(n!==r?(e=s8.current,n=s5.current,nC(t),t.stateNode=rU(r,e,n,t)):t.stateNode=e.stateNode);else{if("string"!=typeof r&&null===t.stateNode)throw Error(i(166));if(e=s8.current,n=s5.current,z(t)){if(!rG)throw Error(i(176));if(e=t.stateNode,n=t.memoizedProps,r=null,null!==(a=s7))switch(a.tag){case 27:case 5:r=a.memoizedProps}aq(e,n,t,r)||k(t,!0)}else nC(t),t.stateNode=rU(r,e,n,t)}return nk(t),null;case 31:if(n=t.memoizedState,null===e||null!==e.memoizedState){if(r=z(t),null!==n){if(null===e){if(!r)throw Error(i(318));if(!rG)throw Error(i(556));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(i(557));aY(e,t)}else H(),(128&t.flags)==0&&(t.memoizedState=null),t.flags|=4;nk(t),e=!1}else n=V(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return 256&t.flags?(eK(t),t):(eK(t),null);if((128&t.flags)!=0)throw Error(i(558))}return nk(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(a=z(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(i(318));if(!rG)throw Error(i(344));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(i(317));aZ(a,t)}else H(),(128&t.flags)==0&&(t.memoizedState=null),t.flags|=4;nk(t),a=!1}else a=V(),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=n,t):(n=null!==r,e=null!==e&&null!==e.memoizedState,n&&(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)),n!==e&&n&&(t.child.flags|=8192),nN(t,t.updateQueue),nk(t),null);case 4:return F(),nI(e,t),null===e&&rW(t.stateNode.containerInfo),nk(t),null;case 10:return W(t.type),nk(t),null;case 19:if(c(oV),null===(r=t.memoizedState))return nk(t),null;if(a=(128&t.flags)!=0,null===(s=r.rendering))if(a)nU(r,!1);else{if(0!==lT||null!==e&&(128&e.flags)!=0)for(e=t.child;null!==e;){if(null!==(s=eJ(e))){for(t.flags|=128,nU(r,!1),t.updateQueue=e=s.updateQueue,nN(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)i$(n,e),n=n.sibling;return d(oV,1&oV.current|2),ot&&C(t,r.treeForkCount),t.child}e=e.sibling}null!==r.tail&&sU()>lU&&(t.flags|=128,a=!0,nU(r,!1),t.lanes=4194304)}else{if(!a)if(null!==(e=eJ(s))){if(t.flags|=128,a=!0,t.updateQueue=e=e.updateQueue,nN(t,e),nU(r,!0),null===r.tail&&"hidden"===r.tailMode&&!s.alternate&&!ot)return nk(t),null}else 2*sU()-r.renderingStartTime>lU&&0x20000000!==n&&(t.flags|=128,a=!0,nU(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=sU(),e.sibling=null,n=oV.current,d(oV,a?1&n|2:1&n),ot&&C(t,r.treeForkCount),e):(nk(t),null);case 22:case 23:return eK(t),eW(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(0x20000000&n)!=0&&(128&t.flags)==0&&(nk(t),6&t.subtreeFlags&&(t.flags|=8192)):nk(t),null!==(n=t.updateQueue)&&nN(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&c(ow),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),W(od),nk(t),null;case 25:case 30:return null}throw Error(i(156,t.tag))}(t.alternate,t,lM);if(null!==n){lv=n;return}if(null!==(t=t.sibling)){lv=t;return}lv=t=e}while(null!==t)0===lT&&(lT=5)}function iN(e,t){do{var n=function(e,t){switch(I(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return W(od),F(),(65536&(e=t.flags))!=0&&(128&e)==0?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return U(t),null;case 31:if(null!==t.memoizedState){if(eK(t),null===t.alternate)throw Error(i(340));H()}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(i(340));H()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return c(oV),null;case 4:return F(),null;case 10:return W(t.type),null;case 22:case 23:return eK(t),eW(),null!==e&&c(ow),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return W(od),null;default:return null}}(e.alternate,e);if(null!==n){n.flags&=32767,lv=n;return}if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deleti
395ons=null),!t&&null!==(e=e.sibling)){lv=e;return}lv=e=n}while(null!==e)lT=6,lv=null}function iU(e,t,n,r,a,s,o,l,u){e.cancelPendingCommit=null;do iH();while(0!==lO)if((6&lm)!=0)throw Error(i(327));if(null!==t){if(t===e.current)throw Error(i(177));if(function(e,t,n,i,r,a){var s=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var o=e.entanglements,l=e.expirationTimes,u=e.hiddenUpdates;for(n=s&~n;0<n;){var c=31-sE(n),d=1<<c;o[c]=0,l[c]=-1;var h=u[c];if(null!==h)for(u[c]=null,c=0;c<h.length;c++){var p=h[c];null!==p&&(p.lane&=-0x20000001)}n&=~d}0!==i&&y(e,i,0),0!==a&&0===r&&0!==e.tag&&(e.suspendedLanes|=a&~(s&~t))}(e,n,s=t.lanes|t.childLanes|oN,o,l,u),e===lg&&(lv=lg=null,ly=0),lH=t,lz=e,lV=n,lG=s,lj=a,lW=r,(10256&t.subtreeFlags)!=0||(10256&t.flags)!=0?(e.callbackNode=null,e.callbackPriority=0,sD(sO,function(){return iV(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(13878&t.flags)!=0,(13878&t.subtreeFlags)!=0||r){r=rw.T,rw.T=null,a=rq(),rX(2),o=lm,lm|=4;try{!function(e,t){for(rR(e.containerInfo),ln=t;null!==ln;)if(t=(e=ln).child,(1028&e.subtreeFlags)!=0&&null!==t)t.return=e,ln=t;else for(;null!==ln;){var n=(e=ln).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!==n){t=void 0,r=e,a=n.memoizedProps,n=n.memoizedState;var s=r.stateNode;try{var o=t5(r.type,a);t=s.getSnapshotBeforeUpdate(o,n),s.__reactInternalSnapshotBeforeUpdate=t}catch(e){ij(r,r.return,e)}}break;case 3:(1024&t)!=0&&rH&&aS(e.stateNode.containerInfo);break;default:if((1024&t)!=0)throw Error(i(163))}if(null!==(t=e.sibling)){t.return=e.return,ln=t;break}ln=e.return}}(e,t,n)}finally{lm=o,rX(a),rw.T=r}}lO=1,ik(),iB(),iO()}}function ik(){if(1===lO){lO=0;var e=lz,t=lH,n=(13878&t.flags)!=0;if((13878&t.subtreeFlags)!=0||n){n=rw.T,rw.T=null;var i=rq();rX(2);var r=lm;lm|=4;try{n5(t,e),rI(e.containerInfo)}finally{lm=r,rX(i),rw.T=n}}e.current=t,lO=2}}function iB(){if(2===lO){lO=0;var e=lz,t=lH,n=(8772&t.flags)!=0;if((8772&t.subtreeFlags)!=0||n){n=rw.T,rw.T=null;var i=rq();rX(2);var r=lm;lm|=4;try{nQ(e,t.alternate,t)}finally{lm=r,rX(i),rw.T=n}}lO=3}}function iO(){if(4===lO||3===lO){lO=0,sN();var e=lz,t=lH,n=lV,i=lW;(10256&t.subtreeFlags)!=0||(10256&t.flags)!=0?lO=5:(lO=0,lH=lz=null,iz(e,e.pendingLanes));var r=e.pendingLanes;if(0===r&&(lB=null),_(n),t=t.stateNode,sj&&"function"==typeof sj.onCommitFiberRoot)try{sj.onCommitFiberRoot(sG,t,void 0,(128&t.current.flags)==128)}catch{}if(null!==i){t=rw.T,r=rq(),rX(2),rw.T=null;try{for(var a=e.onRecoverableError,s=0;s<i.length;s++){var o=i[s];a(o.value,{componentStack:o.stack})}}finally{rw.T=t,rX(r)}}(3&lV)!=0&&iH(),ei(e),r=e.pendingLanes,(261930&n)!=0&&(42&r)!=0?e===lq?lX++:(lX=0,lq=e):lX=0,rG&&a3(),er(0,!1)}}function iz(e,t){0==(e.pooledCacheLanes&=t)&&null!=(t=e.pooledCache)&&(e.pooledCache=null,et(t))}function iH(){return ik(),iB(),iO(),iV()}function iV(){if(5!==lO)return!1;var e=lz,t=lG;lG=0;var n=_(lV),r=32>n?32:n;n=rw.T;var a=rq();try{rX(r),rw.T=null,r=lj,lj=null;var s=lz,o=lV;if(lO=0,lH=lz=null,lV=0,(6&lm)!=0)throw Error(i(331));var l=lm;if(lm|=4,il(s.current),it(s,s.current,o,r),lm=l,er(0,!1),sj&&"function"==typeof sj.onPostCommitFiberRoot)try{sj.onPostCommitFiberRoot(sG,s)}catch{}return!0}finally{rX(a),rw.T=n,iz(e,t)}}function iG(e,t,n){t=A(n,t),t=t9(e.stateNode,t,2),null!==(e=eU(e,t,2))&&(v(e,2),ei(e))}function ij(e,t,n){if(3===e.tag)iG(e,e,n);else for(;null!==t;){if(3===t.tag){iG(t,e,n);break}if(1===t.tag){var i=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof i.componentDidCatch&&(null===lB||!lB.has(i))){e=A(n,e),null!==(i=eU(t,n=t7(2),2))&&(ne(n,i,t,e),v(i,2),ei(i));break}}t=t.return}}function iW(e,t,n){var i=e.pingCache;if(null===i){i=e.pingCache=new lf;var r=new Set;i.set(t,r)}else void 0===(r=i.get(t))&&(r=new Set,i.set(t,r));r.has(n)||(lw=!0,r.add(n),e=iX.bind(null,e,t,n),t.then(e,e))}function iX(e,t,n){var i=e.pingCache;null!==i&&i.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,lg===e&&(ly&n)===n&&(4===lT||3===lT&&(0x3c00000&ly)===ly&&300>sU()-lF?(2&lm)==0&&iM(e,0):lC|=n,lR===ly&&(lR=0)),ei(e)}function iq(e,t){0===t&&(t=m()),null!==(e=eR(e,t))&&(v(e,t),ei(e))}function iY(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),iq(e,n)}function iZ(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;null!==a&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}null!==r&&r.delete(t),iq(e,n)}function iK(e,t,n,i){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.t
395ype=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=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function iJ(e){return!(!(e=e.prototype)||!e.isReactComponent)}function iQ(e,n){var i=e.alternate;return null===i?((i=t(e.tag,n,e.key,e.mode)).elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=n,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=0x3e00000&e.flags,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,n=e.dependencies,i.dependencies=null===n?null:{lanes:n.lanes,firstContext:n.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function i$(e,t){e.flags&=0x3e00002;var n=e.alternate;return null===n?(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=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,e.dependencies=null===(t=n.dependencies)?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function i0(e,n,r,a,s,o){var l=0;if(a=e,"function"==typeof e)iJ(e)&&(l=1);else if("string"==typeof e)l=si&&sv?sr(e,r,s5.current)?26:sS(e)?27:5:si?sr(e,r,s5.current)?26:5:sv&&sS(e)?27:5;else o:switch(e){case ry:return(e=t(31,r,n,s)).elementType=ry,e.lanes=o,e;case rl:return i1(r.children,s,o,n);case ru:l=8,s|=24;break;case rc:return(e=t(12,r,n,2|s)).elementType=rc,e.lanes=o,e;case rf:return(e=t(13,r,n,s)).elementType=rf,e.lanes=o,e;case rm:return(e=t(19,r,n,s)).elementType=rm,e.lanes=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case rh:l=10;break o;case rd:l=9;break o;case rp:l=11;break o;case rg:l=14;break o;case rv:l=16,a=null;break o}l=29,r=Error(i(130,null===e?"null":typeof e,"")),a=null}return(n=t(l,r,n,s)).elementType=e,n.type=a,n.lanes=o,n}function i1(e,n,i,r){return(e=t(7,e,r,n)).lanes=i,e}function i2(e,n,i){return(e=t(6,e,null,n)).lanes=i,e}function i3(e){var n=t(18,null,null,0);return n.stateNode=e,n}function i4(e,n,i){return(n=t(4,null!==e.children?e.children:[],e.key,n)).lanes=i,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function i5(e,t,n,i,r,a,s,o,l){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=rO,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=i,this.onUncaughtError=r,this.onCaughtError=a,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function i6(e,n,i,r,a,s,o,l,u,c,d,h){return e=new i5(e,n,i,o,u,c,d,h,l),n=1,!0===s&&(n|=24),s=t(3,null,null,n),e.current=s,s.stateNode=e,n=ee(),n.refCount++,e.pooledCache=n,n.refCount++,s.memoizedState={element:r,isDehydrated:i,cache:n},eL(s),e}function i8(e){var t=e._reactInternals;if(void 0===t)throw"function"==typeof e.render?Error(i(188)):Error(i(268,e=Object.keys(e).join(",")));return null===(e=null!==(e=s(t))?function e(t){var n=t.tag;if(5===n||26===n||27===n||6===n)return t;for(t=t.child;null!==t;){if(null!==(n=e(t)))return n;t=t.sibling}return null}(e):null)?null:rA(e.stateNode)}function i9(e,t,n,i,r,a){r=sT,null===i.context?i.context=r:i.pendingContext=r,(i=eN(t)).payload={element:n},null!==(a=void 0===a?null:a)&&(i.callback=a),null!==(n=eU(e,i,t))&&(iy(n,e,t),ek(n,e,t))}function i7(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function re(e,t){i7(e,t),(e=e.alternate)&&i7(e,t)}var rt={},rn=eh.default,ri=du.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"),rd=Symbol.for("react.consumer"),rh=Symbol.for("react.context"),rp=Symbol.for("react.forward_ref"),rf=Symbol.for("react.suspense"),rm=Symbol.for("react.suspense_list"),rg=Symbol.for("react.memo"),rv=Symbol.for("react.lazy"),ry=Symbol.for("react.activity"),rx=Symbol.for("react.memo_cache_sentinel"),rb=Symbol.iterator,rS=Symbol.for("react.client.reference"),r_=Array.isArray,rw=rn.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,rM=e.rendererVersion,rT=e.rendererPackageName,rE=e.extraDevToolsConfig,rA=e.getPublicInstance,rC=e.getRootHostContext,rP=e.getChildHostContext,rR=e.prepareForCommit,rI=e.resetAfterCommit,rD=e.createInstance;e.cloneMutableInstance;var rL=e.appendInitialChild,rF=e.finalizeInitialChildren,rN=e.shouldSetTextContent,rU=e.createTextInstance;e.cloneMutableTextInstance;
395var rk=e.scheduleTimeout,rB=e.cancelTimeout,rO=e.noTimeout,rz=e.isPrimaryRenderer;e.warnsIfNotActing;var rH=e.supportsMutation,rV=e.supportsPersistence,rG=e.supportsHydration,rj=e.getInstanceFromNode;e.beforeActiveInstanceBlur;var rW=e.preparePortalMount;e.prepareScopeUpdate,e.getInstanceFromScope;var rX=e.setCurrentUpdatePriority,rq=e.getCurrentUpdatePriority,rY=e.resolveUpdatePriority;e.trackSchedulerEvent,e.resolveEventType,e.resolveEventTimeStamp;var rZ=e.shouldAttemptEagerTransition,rK=e.detachDeletedInstance;e.requestPostPaintCallback;var rJ=e.maySuspendCommit,rQ=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,an=e.getTextContent,ai=e.isHiddenSubtree,ar=e.matchAccessibilityRole,aa=e.setFocusIfFocusable,as=e.setupIntersectionObserver,ao=e.appendChild,al=e.appendChildToContainer,au=e.commitTextUpdate,ac=e.commitMount,ad=e.commitUpdate,ah=e.insertBefore,ap=e.insertInContainerBefore,af=e.removeChild,am=e.removeChildFromContainer,ag=e.resetTextContent,av=e.hideInstance,ay=e.hideTextInstance,ax=e.unhideInstance,ab=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 aS=e.clearContainer;e.createFragmentInstance,e.updateFragmentInstanceFiber,e.commitNewChildToFragmentInstance,e.deleteChildFromFragmentInstance;var a_=e.cloneInstance,aw=e.createContainerChildSet,aM=e.appendChildToContainerChildSet,aT=e.finalizeContainerChildren,aE=e.replaceContainerChildren,aA=e.cloneHiddenInstance,aC=e.cloneHiddenTextInstance,aP=e.isSuspenseInstancePending,aR=e.isSuspenseInstanceFallback,aI=e.getSuspenseInstanceFallbackErrorDetails,aD=e.registerSuspenseInstanceRetry,aL=e.canHydrateFormStateMarker,aF=e.isFormStateMarkerMatching,aN=e.getNextHydratableSibling,aU=e.getNextHydratableSiblingAfterSingleton,ak=e.getFirstHydratableChild,aB=e.getFirstHydratableChildWithinContainer,aO=e.getFirstHydratableChildWithinActivityInstance,az=e.getFirstHydratableChildWithinSuspenseInstance,aH=e.getFirstHydratableChildWithinSingleton,aV=e.canHydrateInstance,aG=e.canHydrateTextInstance,aj=e.canHydrateActivityInstance,aW=e.canHydrateSuspenseInstance,aX=e.hydrateInstance,aq=e.hydrateTextInstance,aY=e.hydrateActivityInstance,aZ=e.hydrateSuspenseInstance,aK=e.getNextHydratableInstanceAfterActivityInstance,aJ=e.getNextHydratableInstanceAfterSuspenseInstance,aQ=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,sn=e.validateHydratableTextInstance,si=e.supportsResources,sr=e.isHostHoistableType,sa=e.getHoistableRoot,ss=e.getResource,so=e.acquireResource,sl=e.releaseResource,su=e.hydrateHoistable,sc=e.mountHoistable,sd=e.unmountHoistable,sh=e.createHoistableInstance,sp=e.prepareToCommitHoistables,sf=e.mayResourceSuspendCommit,sm=e.preloadResource,sg=e.suspendResource,sv=e.supportsSingletons,sy=e.resolveSingletonInstance,sx=e.acquireSingletonInstance,sb=e.releaseSingletonInstance,sS=e.isHostSingletonType,s_=e.isSingletonScope,sw=[],sM=-1,sT={},sE=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(sA(e)/sC|0)|0}
395,sA=Math.log,sC=Math.LN2,sP=256,sR=262144,sI=4194304,sD=ri.unstable_scheduleCallback,sL=ri.unstable_cancelCallback,sF=ri.unstable_shouldYield,sN=ri.unstable_requestPaint,sU=ri.unstable_now,sk=ri.unstable_ImmediatePriority,sB=ri.unstable_UserBlockingPriority,sO=ri.unstable_NormalPriority,sz=ri.unstable_IdlePriority,sH=ri.log,sV=ri.unstable_setDisableYieldValue,sG=null,sj=null,sW="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 el.default&&"function"==typeof el.default.emit)return void el.default.emit("uncaughtException",e);console.error(e)},sq=Object.prototype.hasOwnProperty,sY=!1,sZ=new WeakMap,sK=[],sJ=0,sQ=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,on=null,oi=!1,or=Error(i(519)),oa=u(null),os=null,oo=null,ol="u">typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ou=ri.unstable_scheduleCallback,oc=ri.unstable_NormalPriority,od={$$typeof:rh,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0},oh=null,op=null,of=!1,om=!1,og=!1,ov=0,oy=null,ox=0,ob=0,oS=null,o_=rw.S;rw.S=function(e,t){lN=sU(),"object"==typeof t&&null!==t&&"function"==typeof t.then&&function(e,t){if(null===oy){var n=oy=[];ox=0,ob=ed(),oS={status:"pending",value:void 0,then:function(e){n.push(e)}}}ox++,t.then(ep,ep)}(0,t),null!==o_&&o_(e,t)};var ow=u(null),oM=Error(i(460)),oT=Error(i(474)),oE=Error(i(542)),oA={then:function(){}},oC=null,oP=null,oR=0,oI=eE(!0),oD=eE(!1),oL=[],oF=0,oN=0,oU=!1,ok=!1,oB=u(null),oO=u(0),oz=u(null),oH=null,oV=u(0),oG=0,oj=null,oW=null,oX=null,oq=!1,oY=!1,oZ=!1,oK=0,oJ=0,oQ=null,o$=0,o0={readContext:J,use:tt,useCallback:eQ,useContext:eQ,useEffect:eQ,useImperativeHandle:eQ,useLayoutEffect:eQ,useInsertionEffect:eQ,useMemo:eQ,useReducer:eQ,useRef:eQ,useState:eQ,useDebugValue:eQ,useDeferredValue:eQ,useTransition:eQ,useSyncExternalStore:eQ,useId:eQ,useHostTransitionStatus:eQ,useFormState:eQ,useActionState:eQ,useOptimistic:eQ,useMemoCache:eQ,useCacheRefresh:eQ};o0.useEffectEvent=eQ;var o1={readContext:J,use:tt,useCallback:function(e,t){return e8().memoizedState=[e,void 0===t?null:t],e},useContext:J,useEffect:tI,useImperativeHandle:function(e,t,n){n=null!=n?n.concat([e]):null,tP(4194308,4,tU.bind(null,t,e),n)},useLayoutEffect:function(e,t){return tP(4194308,4,e,t)},useInsertionEffect:function(e,t){tP(4,2,e,t)},useMemo:function(e,t){var n=e8();t=void 0===t?null:t;var i=e();return n.memoizedState=[i,t],i},useReducer:function(e,t,n){var i=e8();if(void 0!==n)var r=n(t);else r=t;return i.memoizedState=i.baseState=r,i.queue=e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},e=e.dispatch=tZ.bind(null,oj,e),[i.memoizedState,e]},useRef:function(e){return e8().memoizedState={current:e}},useState:function(e){var t=(e=tp(e)).queue,n=tK.bind(null,oj,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:tB,useDeferredValue:function(e,t){return tH(e8(),e,t)},useTransition:function(){var e=tp(!1);return e=tG.bind(null,oj,e.queue,!0,!1),e8().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=oj,a=e8();if(ot){if(void 0===n)throw Error(i(407));n=n()}else{if(n=t(),null===lg)throw Error(i(349));(127&ly)!=0||tl(r,t,n)}a.memoizedState=n;var s={value:n,getSnapshot:t};return a.queue=s,tI(tc.bind(null,r,s,e),[e]),r.flags|=2048,tA(9,{destroy:void 0},tu.bind(null,r,s,n,t),null),n},useId:function(){var e=e8(),t=lg.identifierPrefix;if(ot){var n=s4,i=s3;t="_"+t+"R_"+(n=(i&~(1<<32-sE(i)-1)).toString(32)+n),0<(n=oK++)&&(t+="H"+n.toString(32)),t+="_"}else t="_"+t+"r_"+(n=o$++).toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:tW,useFormState:t_,useActionState:t_,useOptimistic:function(e){var t=e8();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=tQ.bind(null,oj,!0,n),n.dispatch=t,[e,t]},useMemoCache:tn,useCacheRefresh:function(){return e8().memoizedState=tY.bind(null,oj)},useEffectEvent:function(e){var t=e8(),n={impl:e};return t.memoizedState=n,function(){if((2&lm)!=0)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},o2={readContext:J,use:tt,useCallback:tO,useContext:J,useEffect:tD,useImperativeHandle:tk,useInsertionEffect:tF,useLayoutEffect:tN,useMemo:tz,useReducer:tr,useRef:tC,use
395State:function(){return tr(ti)},useDebugValue:tB,useDeferredValue:function(e,t){return tV(e9(),oW.memoizedState,e,t)},useTransition:function(){var e=tr(ti)[0],t=e9().memoizedState;return["boolean"==typeof e?e:te(e),t]},useSyncExternalStore:to,useId:tX,useHostTransitionStatus:tW,useFormState:tw,useActionState:tw,useOptimistic:function(e,t){return tf(e9(),oW,e,t)},useMemoCache:tn,useCacheRefresh:tq};o2.useEffectEvent=tL;var o3={readContext:J,use:tt,useCallback:tO,useContext:J,useEffect:tD,useImperativeHandle:tk,useInsertionEffect:tF,useLayoutEffect:tN,useMemo:tz,useReducer:ts,useRef:tC,useState:function(){return ts(ti)},useDebugValue:tB,useDeferredValue:function(e,t){var n=e9();return null===oW?tH(n,e,t):tV(n,oW.memoizedState,e,t)},useTransition:function(){var e=ts(ti)[0],t=e9().memoizedState;return["boolean"==typeof e?e:te(e),t]},useSyncExternalStore:to,useId:tX,useHostTransitionStatus:tW,useFormState:tE,useActionState:tE,useOptimistic:function(e,t){var n=e9();return null!==oW?tf(n,oW,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:tn,useCacheRefresh:tq};o3.useEffectEvent=tL;var o4={enqueueSetState:function(e,t,n){e=e._reactInternals;var i=ig(),r=eN(i);r.payload=t,null!=n&&(r.callback=n),null!==(t=eU(e,r,i))&&(iy(t,e,i),ek(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var i=ig(),r=eN(i);r.tag=1,r.payload=t,null!=n&&(r.callback=n),null!==(t=eU(e,r,i))&&(iy(t,e,i),ek(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ig(),i=eN(n);i.tag=2,null!=t&&(i.callback=t),null!==(t=eU(e,i,n))&&(iy(t,e,n),ek(t,e,n))}},o5=Error(i(461)),o6=!1,o8={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},o9=!1,o7=!1,le=!1,lt="function"==typeof WeakSet?WeakSet:Set,ln=null,li=null,lr=!1,la=null,ls=8192,lo={getCacheForType:function(e){var t=J(od),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return J(od).controller.signal}},ll=0,lu=1,lc=2,ld=3,lh=4;if("function"==typeof Symbol&&Symbol.for){var lp=Symbol.for;ll=lp("selector.component"),lu=lp("selector.has_pseudo_class"),lc=lp("selector.role"),ld=lp("selector.test_id"),lh=lp("selector.text")}var lf="function"==typeof WeakMap?WeakMap:Map,lm=0,lg=null,lv=null,ly=0,lx=0,lb=null,lS=!1,l_=!1,lw=!1,lM=0,lT=0,lE=0,lA=0,lC=0,lP=0,lR=0,lI=null,lD=null,lL=!1,lF=0,lN=0,lU=1/0,lk=null,lB=null,lO=0,lz=null,lH=null,lV=0,lG=0,lj=null,lW=null,lX=0,lq=null;return rt.attemptContinuousHydration=function(e){if(13===e.tag||31===e.tag){var t=eR(e,0x4000000);null!==t&&iy(t,e,0x4000000),re(e,0x4000000)}},rt.attemptHydrationAtCurrentPriority=function(e){if(13===e.tag||31===e.tag){var t=ig(),n=eR(e,t=S(t));null!==n&&iy(n,e,t),re(e,t)}},rt.attemptSynchronousHydration=function(e){switch(e.tag){case 3:if((e=e.stateNode).current.memoizedState.isDehydrated){var t=h(e.pendingLanes);if(0!==t){for(e.pendingLanes|=2,e.entangledLanes|=2;t;){var n=1<<31-sE(t);e.entanglements[1]|=n,t&=~n}ei(e),(6&lm)==0&&(lU=sU()+500,er(0,!1))}}break;case 31:case 13:null!==(t=eR(e,2))&&iy(t,e,2),i_(),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,n,i,r,a,s,o,l,u){return i6(e,t,!1,null,n,i,a,null,s,o,l,u)},rt.createHasPseudoClassSelector=function(e){return{$$typeof:lu,value:e}},rt.createHydrationContainer=function(e,t,n,i,r,a,s,o,l,u,c,d,h,p){var f;return(e=i6(n,i,!0,e,r,a,o,p,l,u,c,d)).context=sT,n=e.current,(r=eN(i=S(i=ig()))).callback=null!=(f=t)?f:null,eU(n,r,i),t=i,e.current.lanes=t,v(e,t),ei(e),e},rt.createPortal=function(e,t,n){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:ro,key:null==i?null:""+i,children:e,containerInfo:t,implementation:n}},rt.createRoleSelector=function(e){return{$$typeof:lc,value:e}},rt.createTestNameSelector=function(e){return{$$typeof:ld,value:e}},rt.createTextSelector=function(e){return{$$typeof:lh,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=rw.T,n=rq();
395try{return rX(32),rw.T=null,e()}finally{rX(n),rw.T=t}},rt.discreteUpdates=function(e,t,n,i,r){var a=rw.T,s=rq();try{return rX(2),rw.T=null,e(t,n,i,r)}finally{rX(s),rw.T=a,0===lm&&(lU=sU()+500)}},rt.findAllNodes=im,rt.findBoundingRects=function(e,t){if(!r7)throw Error(i(363));t=im(e,t),e=[];for(var n=0;n<t.length;n++)e.push(at(t[n]));for(t=e.length-1;0<t;t--){n=e[t];for(var r=n.x,a=r+n.width,s=n.y,o=s+n.height,l=t-1;0<=l;l--)if(t!==l){var u=e[l],c=u.x,d=c+u.width,h=u.y,p=h+u.height;if(r>=c&&s>=h&&a<=d&&o<=p){e.splice(t,1);break}if(r!==c||n.width!==u.width||p<s||h>o){if(!(s!==h||n.height!==u.height||d<r||c>a)){c>r&&(u.width+=c-r,u.x=r),d<a&&(u.width=a-c),e.splice(t,1);break}}else{h>s&&(u.height+=h-s,u.y=s),p<o&&(u.height=o-h),e.splice(t,1);break}}}return e},rt.findHostInstance=i8,rt.findHostInstanceWithNoPortals=function(e){return null===(e=null!==(e=s(e))?function e(t){var n=t.tag;if(5===n||26===n||27===n||6===n)return t;for(t=t.child;null!==t;){if(4!==t.tag&&null!==(n=e(t)))return n;t=t.sibling}return null}(e):null)?null:rA(e.stateNode)},rt.findHostInstanceWithWarning=function(e){return i8(e)},rt.flushPassiveEffects=iH,rt.flushSyncFromReconciler=function(e){var t=lm;lm|=1;var n=rw.T,i=rq();try{if(rX(2),rw.T=null,e)return e()}finally{rX(i),rw.T=n,(6&(lm=t))==0&&er(0,!1)}},rt.flushSyncWork=i_,rt.focusWithin=function(e,t){if(!r7)throw Error(i(363));for(t=Array.from(t=ip(e=ic(e),t)),e=0;e<t.length;){var n=t[e++],r=n.tag;if(!ai(n)){if((5===r||26===r||27===r)&&aa(n.stateNode))return!0;for(n=n.child;null!==n;)t.push(n),n=n.sibling}}return!1},rt.getFindAllNodesFailureDescription=function(e,t){if(!r7)throw Error(i(363));var n=0,r=[];e=[ic(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||!ai(s))&&(id(s,u)&&(r.push(ih(u)),++l>n&&(n=l)),l<t.length))for(s=s.child;null!==s;)e.push(s,l),s=s.sibling}if(n<t.length){for(e=[];n<t.length;n++)e.push(ih(t[n]));return`findAllNodes was able to match part of the selector:
396  `+r.join(" > ")+`
397
398No matching component was found for:
399  `+e.join(" > ")}return null},rt.getPublicRootInstance=function(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 27:case 5:return rA(e.child.stateNode);default:return e.child.stateNode}},rt.injectIntoDevTools=function(){var e={bundleType:0,version:rM,rendererPackageName:rT,currentDispatcherRef:rw,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{sG=t.inject(e),sj=t}catch{}e=!!t.checkDCE}}return e},rt.isAlreadyRendering=function(){return(6&lm)!=0},rt.observeVisibleRects=function(e,t,n,r){if(!r7)throw Error(i(363));var a=as(e=im(e,t),n,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(i(476));var s=tj(e).queue;tG(e,s,t,r4,null===r?n:function(){var t=tj(e);return null===t.next&&(t=e.alternate.memoizedState),tJ(e,t.next.queue,{},ig()),r(a)})},rt.updateContainer=function(e,t,n,i){var r=t.current,a=ig();return i9(r,a,e,t,n,i),a},rt.updateContainerSync=function(e,t,n,i){return i9(t.current,2,e,t,n,i),2},rt},dQ.exports.default=dQ.exports,Object.defineProperty(dQ.exports,"__esModule",{value:!0})),dJ.exports=dQ.exports),(D=dJ.exports)&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default"))?D.default:D,d0={},d1=/^three(?=[A-Z])/,d2=e=>`${e[0].toUpperCase()}${e.slice(1)}`,d3=0;function d4(e){if("function"==typeof e){let t=`${d3++}`;return d0[t]=e,t}Object.assign(d0,e)}function d5(e,t){let n=d2(e),i=d0[n];if("primitive"!==e&&!i)throw Error(`R3F: ${n} 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 d6(e){if(e.isHidden){var t;e.props.attach&&null!=(t=e.parent)&&t.object?dI(e.parent,e):dz(e.object)&&!1!==e.props.visible&&(e.object.visible=!0),e.isHidden=!1,dB(e)}}function d8(e,t,n){let i=t.root.getState();if(e.parent||e.object===i.scene){if(!t.object){var r,a;let e=d0[d2(t.type)];t.object=null!=(r=t.props.object)?r:new e(...null!=(a=t.props.args
399)?a:[]),t.object.__r3f=t}if(dk(t.object,t.props),t.props.attach)dI(e,t);else if(dz(t.object)&&dz(e.object)){let i=e.object.children.indexOf(null==n?void 0:n.object);if(n&&-1!==i){let n=e.object.children.indexOf(t.object);-1!==n?(e.object.children.splice(n,1),e.object.children.splice(n<i?i-1:i,0,t.object)):(t.object.parent=e.object,e.object.children.splice(i,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)d8(t,e);dB(t)}}function d9(e,t){t&&(t.parent=e,e.children.push(t),d8(e,t))}function d7(e,t,n){if(!t||!n)return;t.parent=e;let i=e.children.indexOf(n);-1!==i?e.children.splice(i,0,t):e.children.push(t),d8(e,t,n)}function he(e){if("function"==typeof e.dispose){let t=()=>{try{e.dispose()}catch{}};"undefined"!=typeof IS_REACT_ACT_ENVIRONMENT?t():(0,du.unstable_scheduleCallback)(du.unstable_IdlePriority,t)}}function ht(e,t,n){if(!t)return;t.parent=null;let i=e.children.indexOf(t);-1!==i&&e.children.splice(i,1),t.props.attach?dD(e,t):dz(t.object)&&dz(e.object)&&(e.object.remove(t.object),function(e,t){let{internal:n}=e.getState();n.interaction=n.interaction.filter(e=>e!==t),n.initialHits=n.initialHits.filter(e=>e!==t),n.hovered.forEach((e,i)=>{(e.eventObject===t||e.object===t)&&n.hovered.delete(i)}),n.capturedMap.forEach((e,i)=>{dV(n.capturedMap,t,e,i)})}(dy(t),t.object));let r=null!==t.props.dispose&&!1!==n;for(let e=t.children.length-1;e>=0;e--){let n=t.children[e];ht(t,n,r)}t.children.length=0,delete t.object.__r3f,r&&"primitive"!==t.type&&"Scene"!==t.object.type&&he(t.object),void 0===n&&dB(t)}let hn=[],hi=()=>{},hr={},ha=0,hs=(L={isPrimaryRenderer:!1,warnsIfNotActing:!1,supportsMutation:!0,supportsPersistence:!1,supportsHydration:!1,createInstance:function(e,t,n){var i;return d5(e=d2(e)in d0?e:e.replace(d1,""),t),"primitive"===e&&null!=(i=t.object)&&i.__r3f&&delete t.object.__r3f,dC(t.object,n,e,t)},removeChild:ht,appendChild:d9,appendInitialChild:d9,insertBefore:d7,appendChildToContainer(e,t){let n=e.getState().scene.__r3f;t&&n&&d9(n,t)},removeChildFromContainer(e,t){let n=e.getState().scene.__r3f;t&&n&&ht(n,t)},insertInContainerBefore(e,t,n){let i=e.getState().scene.__r3f;t&&n&&i&&d7(i,t,n)},getRootHostContext:()=>hr,getChildHostContext:()=>hr,commitUpdate(e,t,n,i,r){var a,s,o;d5(t,i);let l=!1;if("primitive"===e.type&&n.object!==i.object||(null==(a=i.args)?void 0:a.length)!==(null==(s=n.args)?void 0:s.length)?l=!0:null!=(o=i.args)&&o.some((e,t)=>{var i;return e!==(null==(i=n.args)?void 0:i[t])})&&(l=!0),l)hn.push([e,{...i},r]);else{let t=function(e,t){let n={};for(let i in t)if(!dL.includes(i)&&!dE.equ(t[i],e.props[i]))for(let e in n[i]=t[i],t)e.startsWith(`${i}-`)&&(n[e]=t[e]);for(let i in e.props){if(dL.includes(i)||t.hasOwnProperty(i))continue;let{root:r,key:a}=dP(e.object,i);if(r.constructor&&0===r.constructor.length){let e=function(e){let t=dF.get(e.constructor);try{t||(t=new e.constructor,dF.set(e.constructor,t))}catch(e){}return t}(r);dE.und(e)||(n[a]=e[a])}else n[a]=0}return n}(e,i);Object.keys(t).length&&(Object.assign(e.props,t),dk(e.object,t))}(null===r.sibling||(4&r.flags)==0)&&function(){for(let[e]of hn){let t=e.parent;if(t)for(let n of(e.props.attach?dD(t,e):dz(e.object)&&dz(t.object)&&t.object.remove(e.object),e.children))n.props.attach?dD(e,n):dz(n.object)&&dz(e.object)&&e.object.remove(n.object);e.isHidden&&d6(e),e.object.__r3f&&delete e.object.__r3f,"primitive"!==e.type&&he(e.object)}for(let[i,r,a]of hn){i.props=r;let s=i.parent;if(s){let r=d0[d2(i.type)];i.object=null!=(e=i.props.object)?e:new r(...null!=(t=i.props.args)?t:[]),i.object.__r3f=i;var e,t,n=i.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(n);"function"==typeof t&&(e.refCleanup=t)}else e.ref&&(e.ref.current=n);for(let e of(dk(i.object,i.props),i.props.attach?dI(s,i):dz(i.object)&&dz(s.object)&&s.object.add(i.object),i.children))e.props.attach?dI(i,e):dz(e.object)&&dz(i.object)&&i.object.add(e.object);dB(i)}}hn.length=0}()},finalizeInitialChildren:()=>!1,commitMount(){},getPublicInstance:e=>null==e?void 0:e.object,prepareForCommit:()=>null,preparePortalMount:e=>dC(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?dD(e.parent,e):dz(e.object)&&(e.object.visible=!1),e.isHidden=!0,dB(e)}},unhideInstance:d6,createTextInstance:hi,hideTextInstance:hi,unhideTextInstance:hi,scheduleTimeout:"function"==typeof setTimeout?setTimeout:void 0,cancelTimeout:"function"==typeof clearTimeout?clearTimeout:void 0,noTimeout:-1,getInstanceFromNode:()=>null,beforeActiveInstanceBlur(){},afterActiveInstanceBlur(){},detachDeletedInstance(){}
399,prepareScopeUpdate(){},getInstanceFromScope:()=>null,shouldAttemptEagerTransition:()=>!1,trackSchedulerEvent:()=>{},resolveEventType:()=>null,resolveEventTimeStamp:()=>-1.1,requestPostPaintCallback(){},maySuspendCommit:()=>!1,preloadInstance:()=>!0,suspendInstance(){},waitForCommitToBeReady:()=>null,NotPendingTransition:null,HostTransitionContext:eh.createContext(null),setCurrentUpdatePriority(e){ha=e},getCurrentUpdatePriority:()=>ha,resolveUpdatePriority(){var e;if(0!==ha)return ha;switch("undefined"!=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.5.0",applyViewTransitionName(e,t,n){},restoreViewTransitionName(e,t){},cancelViewTransitionName(e,t,n){},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,n)=>!1,maySuspendCommitInSyncRender:(e,t)=>!1,startSuspendingCommit:()=>null,getSuspendedCommitReason:(e,t)=>null},(S=d$(L)).injectIntoDevTools(),S),ho=new Map,hl={objects:"shallow",strict:!1};function hu({store:e,children:t,onCreated:n,rootElement:i}){return db(()=>{let t=e.getState();t.set(e=>({internal:{...e.internal,active:!0}})),n&&n(t),e.getState().events.connected||null==t.events.connect||t.events.connect(i)},[]),(0,eu.jsx)(dj.Provider,{value:e,children:t})}function hc(e,t){let n=ho.get(e),i=null==n?void 0:n.fiber;if(i){let r=null==n?void 0:n.store.getState();r&&(r.internal.active=!1),hs.updateContainer(null,i,null,()=>{r&&setTimeout(()=>{try{null==r.events.disconnect||r.events.disconnect(),null==(n=r.gl)||null==(i=n.renderLists)||null==i.dispose||i.dispose(),null==(a=r.gl)||null==a.forceContextLoss||a.forceContextLoss(),null!=(s=r.gl)&&s.xr&&r.xr.disconnect();var n,i,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())}ho.delete(e),t&&t(e)}catch(e){}},500)})}}function hd({state:e={},children:t,container:n}){let{events:i,size:r,...a}=e,s=dW(),[o]=eh.useState(()=>new o$),[l]=eh.useState(()=>new eQ),u=dS((e,t)=>{let a;if(t.camera&&r){let n=t.camera;a=e.viewport.getCurrentViewport(n,new e0,r),n!==e.camera&&dO(n,r)}return{...e,...t,scene:n,raycaster:o,pointer:l,mouse:l,previousRoot:s,events:{...e.events,...t.events,...i},size:{...e.size,...r},viewport:{...e.viewport,...a},setEvents:e=>t.set(t=>({...t,events:{...t.events,...e}}))}}),c=eh.useMemo(()=>{let e=dr((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,n]);return(0,eu.jsx)(eu.Fragment,{children:hs.createPortal((0,eu.jsx)(dj.Provider,{value:c,children:t}),c,null)})}let hh=new Set,hp=new Set,hf=new Set;function hm(e,t){if(e.size)for(let{callback:n}of e.values())n(t)}function hg(e,t){switch(e){case"before":return hm(hh,t);case"after":return hm(hp,t);case"tail":return hm(hf,t)}}function hv(e,t,n){let i=t.clock.getDelta();"never"===t.frameloop&&"number"==typeof e&&(i=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(),i,n);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 hy=!1,hx=!1;function hb(e){for(let n of(u=requestAnimationFrame(hb),hy=!0,l=0,hg("before",e),hx=!0,ho.values())
399){var t;(c=n.store.getState()).internal.active&&("always"===c.frameloop||c.internal.frames>0)&&!(null!=(t=c.gl.xr)&&t.isPresenting)&&(l+=hv(e,c))}if(hx=!1,hg("after",e),0===l)return hg("tail",e),hy=!1,cancelAnimationFrame(u)}function hS(e,t=1){var n;if(!e)return ho.forEach(e=>hS(e.store.getState(),t));(null==(n=e.gl.xr)||!n.isPresenting)&&e.internal.active&&"never"!==e.frameloop&&(t>1?e.internal.frames=Math.min(60,e.internal.frames+t):hx?e.internal.frames=2:e.internal.frames=1,hy||(hy=!0,requestAnimationFrame(hb)))}function h_(e,t=!0,n,i){if(t&&hg("before",e),n)hv(e,n,i);else for(let t of ho.values())hv(e,t.store.getState());t&&hg("after",e)}let hw={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 n;return null==(n=e.__r3f)?void 0:n.handlers["onPointer"+t]}))}function n(t){let{internal:n}=e.getState();for(let e of n.hovered.values())if(!t.length||!t.find(t=>t.object===e.object&&t.index===e.index&&t.instanceId===e.instanceId)){let i=e.eventObject.__r3f;
399if(n.hovered.delete(dH(e)),null!=i&&i.eventCount){let n=i.handlers,r={...e,intersections:t};null==n.onPointerOut||n.onPointerOut(r),null==n.onPointerLeave||n.onPointerLeave(r)}}}function i(e,t){for(let n=0;n<t.length;n++){let i=t[n].__r3f;null==i||null==i.handlers.onPointerMissed||i.handlers.onPointerMissed(e)}}return{handlePointer:function(r){switch(r){case"onPointerLeave":case"onPointerCancel":return()=>n([]);case"onLostPointerCapture":return t=>{let{internal:i}=e.getState();"pointerId"in t&&i.capturedMap.has(t.pointerId)&&requestAnimationFrame(()=>{i.capturedMap.has(t.pointerId)&&(i.capturedMap.delete(t.pointerId),n([]))})}}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,n){let i=e.getState(),r=new Set,a=[],s=n?n(i.internal.interaction):i.internal.interaction;for(let e=0;e<s.length;e++){let t=dT(s[e]);t&&(t.raycaster.camera=void 0)}i.previousRoot||null==i.events.compute||i.events.compute(t,i);let o=s.flatMap(function(e){let n=dT(e);if(!n||!n.events.enabled||null===n.raycaster.camera)return[];if(void 0===n.raycaster.camera){var i;null==n.events.compute||n.events.compute(t,n,null==(i=n.previousRoot)?void 0:i.getState()),void 0===n.raycaster.camera&&(n.raycaster.camera=null)}return n.raycaster.camera?n.raycaster.intersectObject(e,!0):[]}).sort((e,t)=>{let n=dT(e.object),i=dT(t.object);return n&&i&&i.events.priority-n.events.priority||e.distance-t.distance}).filter(e=>{let t=dH(e);return!r.has(t)&&(r.add(t),!0)});for(let e of(i.events.filter&&(o=i.events.filter(o,i)),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&&i.internal.capturedMap.has(t.pointerId))for(let e of i.internal.capturedMap.get(t.pointerId).values())r.has(dH(e.intersection))||a.push(e.intersection);return a}(a,l?t:void 0),d=u?function(t){let{internal:n}=e.getState(),i=t.offsetX-n.initialClick[0],r=t.offsetY-n.initialClick[1];return Math.round(Math.sqrt(i*i+r*r))}(a):0;"onPointerDown"===r&&(o.initialClick=[a.offsetX,a.offsetY],o.initialHits=c.map(e=>e.eventObject)),u&&!c.length&&d<=2&&(i(a,o.interaction),s&&s(a)),l&&n(c),!function(e,t,i,r){if(e.length){let a={stopped:!1};for(let s of e){let o=dT(s.object);if(o||s.object.traverseAncestors(e=>{let t=dT(e);if(t)return o=t,!1}),o){let{raycaster:l,pointer:u,camera:c,internal:d}=o,h=new e0(u.x,u.y,0).unproject(c),p=e=>{var t,n;return null!=(t=null==(n=d.capturedMap.get(e))?void 0:n.has(s.eventObject))&&t},f=e=>{let n={intersection:s,target:t.target};d.capturedMap.has(e)?d.capturedMap.get(e).set(s.eventObject,n):d.capturedMap.set(e,new Map([[s.eventObject,n]])),t.target.setPointerCapture(e)},m=e=>{let t=d.capturedMap.get(e);t&&dV(d.capturedMap,s.eventObject,t,e)},g={};for(let e in t){let n=t[e];"function"!=typeof n&&(g[e]=n)}let v={...s,...g,pointer:u,intersections:e,stopped:a.stopped,delta:i,unprojectedPoint:h,ray:l.ray,camera:c,stopPropagation(){let i="pointerId"in t&&d.capturedMap.get(t.pointerId);(!i||i.has(s.eventObject))&&(v.stopped=a.stopped=!0,d.hovered.size&&Array.from(d.hovered.values()).find(e=>e.eventObject===s.eventObject)&&n([...e.slice(0,e.indexOf(s)),s]))},target:{hasPointerCapture:p,setPointerCapture:f,releasePointerCapture:m},currentTarget:{hasPointerCapture:p,setPointerCapture:f,releasePointerCapture:m},nativeEvent:t};if(r(v),!0===a.stopped)break}}}}(c,a,d,function(e){let t=e.eventObject,n=t.__r3f;if(!(null!=n&&n.eventCount))return;let s=n.handlers;if(l){if(s.onPointerOver||s.onPointerEnter||s.onPointerOut||s.onPointerLeave){let t=dH(e),n=o.hovered.get(t);n?n.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 n=s[r];n?(!u||o.initialHits.includes(t))&&(i(a,o.interaction.filter(e=>!o.initialHits.includes(e))),n(e)):u&&o.initialHits.includes(t)&&i(a,o.interaction.filter(e=>!o.initialHits.includes(e)))}})}}}}(e);return{priority:1,enabled:!0,compute(e,t,n){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(hw).reduce((e,n)=>({...e,[n]:t(n)}),{}),update:()=>{var t;let{events:n,internal:i}=e.getState();null!=(t=i.lastEvent)&&t.current&&n.handlers&&n.handlers.onPointerMove(i.lastEvent.current)},connect:t=>
399{let{set:n,events:i}=e.getState();if(null==i.disconnect||i.disconnect(),n(e=>({events:{...e.events,connected:t}})),i.handlers)for(let e in i.handlers){let n=i.handlers[e],[r,a]=hw[e];t.addEventListener(r,n,{passive:a})}},disconnect:()=>{let{set:t,events:n}=e.getState();if(n.connected){if(n.handlers)for(let e in n.handlers){let t=n.handlers[e],[i]=hw[e];n.connected.removeEventListener(i,t)}t(e=>({events:{...e.events,connected:void 0}}))}}}}e.i(8560),e.s(["ACESFilmicToneMapping",()=>4,"AddEquation",()=>100,"AddOperation",()=>2,"AdditiveAnimationBlendMode",()=>2501,"AdditiveBlending",()=>2,"AgXToneMapping",()=>6,"AlphaFormat",()=>1021,"AlwaysCompare",()=>519,"AlwaysDepth",()=>1,"AlwaysStencilFunc",()=>519,"AmbientLight",()=>s7,"AnimationAction",()=>oG,"AnimationClip",()=>sN,"AnimationLoader",()=>sG,"AnimationMixer",()=>oW,"AnimationObjectGroup",()=>oV,"AnimationUtils",()=>s_,"ArcCurve",()=>ap,"ArrayCamera",()=>ox,"ArrowHelper",()=>lL,"AttachedBindMode",()=>em,"Audio",()=>oA,"AudioAnalyser",()=>oL,"AudioContext",()=>op,"AudioListener",()=>oE,"AudioLoader",()=>of,"AxesHelper",()=>lF,"BackSide",()=>1,"BasicDepthPacking",()=>3200,"BasicShadowMap",()=>0,"BatchedMesh",()=>rD,"Bone",()=>i1,"BooleanKeyframeTrack",()=>sC,"Box2",()=>o9,"Box3",()=>tf,"Box3Helper",()=>lR,"BoxGeometry",()=>ii,"BoxHelper",()=>lP,"BufferAttribute",()=>nN,"BufferGeometry",()=>nQ,"BufferGeometryLoader",()=>os,"ByteType",()=>1010,"Cache",()=>sU,"Camera",()=>iu,"CameraHelper",()=>lE,"CanvasTexture",()=>r6,"CapsuleGeometry",()=>ae,"CatmullRomCurve3",()=>ax,"CineonToneMapping",()=>3,"CircleGeometry",()=>at,"ClampToEdgeWrapping",()=>1001,"Clock",()=>ob,"Color",()=>nw,"ColorKeyframeTrack",()=>sP,"ColorManagement",()=>e8,"CompressedArrayTexture",()=>r4,"CompressedCubeTexture",()=>r5,"CompressedTexture",()=>r3,"CompressedTextureLoader",()=>sj,"ConeGeometry",()=>ai,"ConstantAlphaFactor",()=>213,"ConstantColorFactor",()=>211,"Controls",()=>lU,"CubeCamera",()=>im,"CubeDepthTexture",()=>r9,"CubeReflectionMapping",()=>301,"CubeRefractionMapping",()=>302,"CubeTexture",()=>ig,"CubeTextureLoader",()=>sq,"CubeUVReflectionMapping",()=>306,"CubicBezierCurve",()=>aw,"CubicBezierCurve3",()=>aM,"CubicInterpolant",()=>sM,"CullFaceBack",()=>1,"CullFaceFront",()=>2,"CullFaceFrontBack",()=>3,"CullFaceNone",()=>0,"Curve",()=>ad,"CurvePath",()=>aI,"CustomBlending",()=>5,"CustomToneMapping",()=>5,"CylinderGeometry",()=>an,"Cylindrical",()=>o5,"Data3DTexture",()=>th,"DataArrayTexture",()=>tc,"DataTexture",()=>i2,"DataTextureLoader",()=>sY,"DataUtils",()=>nI,"DecrementStencilOp",()=>7683,"DecrementWrapStencilOp",()=>34056,"DefaultLoadingManager",()=>sB,"DepthFormat",()=>1026,"DepthStencilFormat",()=>1027,"DepthTexture",()=>r8,"DetachedBindMode",()=>eg,"DirectionalLight",()=>s9,"DirectionalLightHelper",()=>lw,"DiscreteInterpolant",()=>sE,"DodecahedronGeometry",()=>aa,"DoubleSide",()=>2,"DstAlphaFactor",()=>206,"DstColorFactor",()=>208,"DynamicCopyUsage",()=>35050,"DynamicDrawUsage",()=>35048,"DynamicReadUsage",()=>35049,"EdgesGeometry",()=>ac,"EllipseCurve",()=>ah,"EqualCompare",()=>514,"EqualDepth",()=>4,"EqualStencilFunc",()=>514,"EquirectangularReflectionMapping",()=>303,"EquirectangularRefractionMapping",()=>304,"Euler",()=>tJ,"EventDispatcher",()=>ez,"ExternalTexture",()=>r7,"ExtrudeGeometry",()=>a0,"FileLoader",()=>sV,"Float16BufferAttribute",()=>nG,"Float32BufferAttribute",()=>nj,"FloatType",()=>1015,"Fog",()=>i_,"FogExp2",()=>iS,"FramebufferTexture",()=>r2,"FrontSide",()=>0,"Frustum",()=>rh,"FrustumArray",()=>rm,"GLBufferAttribute",()=>oJ,"GLSL1",()=>"100","GLSL3",()=>e_,"GreaterCompare",()=>516,"GreaterDepth",()=>6,"GreaterEqualCompare",()=>518,"GreaterEqualDepth",()=>5,"GreaterEqualStencilFunc",()=>518,"GreaterStencilFunc",()=>516,"GridHelper",()=>ly,"Group",()=>iy,"HalfFloatType",()=>ev,"HemisphereLight",()=>sJ,"HemisphereLightHelper",()=>lv,"IcosahedronGeometry",()=>a2,"ImageBitmapLoader",()=>oh,"ImageLoader",()=>sX,"ImageUtils",()=>te,"IncrementStencilOp",()=>7682,"IncrementWrapStencilOp",()=>34055,"InstancedBufferAttribute",()=>i6,"InstancedBufferGeometry",()=>oa,"InstancedInterleavedBuffer",()=>oK,"InstancedMesh",()=>rr,"Int16BufferAttribute",()=>nO,"Int32BufferAttribute",()=>nH,"Int8BufferAttribute",()=>nU,"IntType",()=>1013,"InterleavedBuffer",()=>iM,"InterleavedBufferAttribute",()=>iE,"Interpolant",()=>sw,"InterpolateDiscrete",()=>2300,"InterpolateLinear",()=>2301,"InterpolateSmooth",()=>2302,"InterpolationSamplingMode",()=>eT,"InterpolationSamplingType",()=>eM,"InvertStencilOp",()=>5386,"KeepStencilOp",()=>7680,"KeyframeTrack",()=>sA,"LOD",()=>ij,"LatheGeometry",()=>a3,"Layers",()=>tQ,"LessCompare",()=>513,"LessDepth",()=>2,"LessEqualCompare",()=>515,"LessEqualDepth",()=>3,"LessEqualStencilFunc",()=>515,"LessStencilFunc",()=>513,"Light",()=>sK,"LightProbe",()=>on,"Line",()=>rH,"Line3",()=>ls,"LineBasicMaterial",()=>rL,"LineCurve",()=>aT,"LineCurve3",()=>aE,"LineDashedMaterial",()=>sv,"LineLoop",()=>rX,"LineSegments",()=>rW,"LinearFilter",()=>1006,"LinearInterpolant",()=>sT,"LinearMipMapLinearFilter",()=>1008,"LinearMipMapNearestFilter",()=>1007,"LinearMipmapLinearFilter",()=>1008,"LinearMipmapNearestFilter",()=>1007,"LinearSRGBColorSpace",()=>ex,"LinearToneMapping",()=>1,"LinearTransfer",()=>eb,"Loader",()=>sO,"LoaderUtils",()=>
399or,"LoadingManager",()=>sk,"LoopOnce",()=>2200,"LoopPingPong",()=>2202,"LoopRepeat",()=>2201,"MOUSE",()=>ep,"Material",()=>nE,"MaterialLoader",()=>oi,"MathUtils",()=>eJ,"Matrix2",()=>o6,"Matrix3",()=>e3,"Matrix4",()=>tH,"MaxEquation",()=>104,"Mesh",()=>ie,"MeshBasicMaterial",()=>nA,"MeshDepthMaterial",()=>sf,"MeshDistanceMaterial",()=>sm,"MeshLambertMaterial",()=>sp,"MeshMatcapMaterial",()=>sg,"MeshNormalMaterial",()=>sh,"MeshPhongMaterial",()=>sc,"MeshPhysicalMaterial",()=>su,"MeshStandardMaterial",()=>sl,"MeshToonMaterial",()=>sd,"MinEquation",()=>103,"MirroredRepeatWrapping",()=>1002,"MixOperation",()=>1,"MultiplyBlending",()=>4,"MultiplyOperation",()=>0,"NearestFilter",()=>1003,"NearestMipMapLinearFilter",()=>1005,"NearestMipMapNearestFilter",()=>1004,"NearestMipmapLinearFilter",()=>1005,"NearestMipmapNearestFilter",()=>1004,"NeutralToneMapping",()=>7,"NeverCompare",()=>512,"NeverDepth",()=>0,"NeverStencilFunc",()=>512,"NoBlending",()=>0,"NoColorSpace",()=>"","NoNormalPacking",()=>"","NoToneMapping",()=>0,"NormalAnimationBlendMode",()=>2500,"NormalBlending",()=>1,"NormalGAPacking",()=>"ga","NormalRGPacking",()=>"rg","NotEqualCompare",()=>517,"NotEqualDepth",()=>7,"NotEqualStencilFunc",()=>517,"NumberKeyframeTrack",()=>sR,"Object3D",()=>nr,"ObjectLoader",()=>oo,"ObjectSpaceNormalMap",()=>1,"OctahedronGeometry",()=>a4,"OneFactor",()=>201,"OneMinusConstantAlphaFactor",()=>214,"OneMinusConstantColorFactor",()=>212,"OneMinusDstAlphaFactor",()=>207,"OneMinusDstColorFactor",()=>209,"OneMinusSrcAlphaFactor",()=>205,"OneMinusSrcColorFactor",()=>203,"OrthographicCamera",()=>s6,"PCFShadowMap",()=>1,"PCFSoftShadowMap",()=>2,"PMREMGenerator",()=>l8,"Path",()=>aD,"PerspectiveCamera",()=>ip,"Plane",()=>rl,"PlaneGeometry",()=>a5,"PlaneHelper",()=>lI,"PointLight",()=>s5,"PointLightHelper",()=>lp,"Points",()=>rQ,"PointsMaterial",()=>rq,"PolarGridHelper",()=>lx,"PolyhedronGeometry",()=>ar,"PositionalAudio",()=>oD,"PropertyBinding",()=>oH,"PropertyMixer",()=>oF,"QuadraticBezierCurve",()=>aA,"QuadraticBezierCurve3",()=>aC,"Quaternion",()=>e$,"QuaternionKeyframeTrack",()=>sD,"QuaternionLinearInterpolant",()=>sI,"R11_EAC_Format",()=>37488,"RED_GREEN_RGTC2_Format",()=>36285,"RED_RGTC1_Format",()=>36283,"REVISION",()=>"182","RG11_EAC_Format",()=>37490,"RGBADepthPacking",()=>3201,"RGBAFormat",()=>1023,"RGBAIntegerFormat",()=>1033,"RGBA_ASTC_10x10_Format",()=>37819,"RGBA_ASTC_10x5_Format",()=>37816,"RGBA_ASTC_10x6_Format",()=>37817,"RGBA_ASTC_10x8_Format",()=>37818,"RGBA_ASTC_12x10_Format",()=>37820,"RGBA_ASTC_12x12_Format",()=>37821,"RGBA_ASTC_4x4_Format",()=>37808,"RGBA_ASTC_5x4_Format",()=>37809,"RGBA_ASTC_5x5_Format",()=>37810,"RGBA_ASTC_6x5_Format",()=>37811,"RGBA_ASTC_6x6_Format",()=>37812,"RGBA_ASTC_8x5_Format",()=>37813,"RGBA_ASTC_8x6_Format",()=>37814,"RGBA_ASTC_8x8_Format",()=>37815,"RGBA_BPTC_Format",()=>36492,"RGBA_ETC2_EAC_Format",()=>37496,"RGBA_PVRTC_2BPPV1_Format",()=>35843,"RGBA_PVRTC_4BPPV1_Format",()=>35842,"RGBA_S3TC_DXT1_Format",()=>33777,"RGBA_S3TC_DXT3_Format",()=>33778,"RGBA_S3TC_DXT5_Format",()=>33779,"RGBDepthPacking",()=>3202,"RGBFormat",()=>1022,"RGBIntegerFormat",()=>1032,"RGB_BPTC_SIGNED_Format",()=>36494,"RGB_BPTC_UNSIGNED_Format",()=>36495,"RGB_ETC1_Format",()=>36196,"RGB_ETC2_Format",()=>37492,"RGB_PVRTC_2BPPV1_Format",()=>35841,"RGB_PVRTC_4BPPV1_Format",()=>35840,"RGB_S3TC_DXT1_Format",()=>33776,"RGDepthPacking",()=>3203,"RGFormat",()=>1030,"RGIntegerFormat",()=>1031,"RawShaderMaterial",()=>so,"Ray",()=>tz,"Raycaster",()=>o$,"RectAreaLight",()=>oe,"RedFormat",()=>1028,"RedIntegerFormat",()=>1029,"ReinhardToneMapping",()=>2,"RenderTarget",()=>tl,"RenderTarget3D",()=>oX,"RepeatWrapping",()=>1e3,"ReplaceStencilOp",()=>7681,"ReverseSubtractEquation",()=>102,"RingGeometry",()=>a6,"SIGNED_R11_EAC_Format",()=>37489,"SIGNED_RED_GREEN_RGTC2_Format",()=>36286,"SIGNED_RED_RGTC1_Format",()=>36284,"SIGNED_RG11_EAC_Format",()=>37491,"SRGBColorSpace",()=>ey,"SRGBTransfer",()=>eS,"Scene",()=>iw,"ShaderChunk",()=>lH,"ShaderLib",()=>lG,"ShaderMaterial",()=>il,"ShadowMaterial",()=>ss,"Shape",()=>aL,"ShapeGeometry",()=>a8,"ShapePath",()=>lN,"ShapeUtils",()=>aJ,"ShortType",()=>1011,"Skeleton",()=>i5,"SkeletonHelper",()=>lh,"SkinnedMesh",()=>i0,"Source",()=>tn,"Sphere",()=>tD,"SphereGeometry",()=>a9,"Spherical",()=>o4,"SphericalHarmonics3",()=>ot,"SplineCurve",()=>aP,"SpotLight",()=>s3,"SpotLightHelper",()=>ll,"Sprite",()=>iz,"SpriteMaterial",()=>iA,"SrcAlphaFactor",()=>204,"SrcAlphaSaturateFactor",()=>210,"SrcColorFactor",()=>202,"StaticCopyUsage",()=>35046,"StaticDrawUsage",()=>35044,"StaticReadUsage",()=>35045,"StereoCamera",()=>oy,"StreamCopyUsage",()=>35042,"StreamDrawUsage",()=>35040,"StreamReadUsage",()=>35041,"StringKeyframeTrack",()=>sL,"SubtractEquation",()=>101,"SubtractiveBlending",()=>3,"TOUCH",()=>ef,"TangentSpaceNormalMap",()=>0,"TetrahedronGeometry",()=>a7,"Texture",()=>ts,"TextureLoader",()=>sZ,"TextureUtils",()=>lB,"Timer",()=>o2,"TimestampQuery",()=>ew,"TorusGeometry",()=>se,"TorusKnotGeometry",()=>st,"Triangle",()=>ny,"TriangleFanDrawMode",()=>2,"TriangleStripDrawMode",()=>1,"TrianglesDrawMode",()=>0,"TubeGeometry",()=>sn,"UVMapping",()=>300,"Uint16BufferAttribute",()=>nz,"Uint32BufferAttribute",()=>nV,"Uint8BufferAttribute",()=>nk,"Uint8ClampedBufferAttribute",()=>nB,"Uniform",()=>oq,"UniformsGroup",()=>oZ,"UniformsLib",()=>lV,"UniformsUtils",()=>io,"UnsignedByteType",()=>1009,"UnsignedInt101111Type",()=>35899,"UnsignedInt248Type",()=>1020,"UnsignedInt5999Type",()=>35902,"UnsignedIntType",()=>1014,"UnsignedShort4444Type",()=>1017,"UnsignedShort5551Type",()=>1018,"UnsignedShortType",()=>1012,"VSMShadowMap",()=>3,"Vector2",()=>eQ,"Vector3",()=>e0,"Vector4",()=>to,"VectorKeyframeTrack",()=>sF,"VideoFrameTexture",()=>r1,"VideoTexture",()=>r0,"WebGL3DRenderTarget",()=>tp,"WebGLArrayRenderTarget",()=>td,"WebGLCoordinateSystem",()=>
3992e3,"WebGLCubeRenderTarget",()=>iv,"WebGLRenderTarget",()=>tu,"WebGLRenderer",()=>c7,"WebGLUtils",()=>cQ,"WebGPUCoordinateSystem",()=>2001,"WebXRController",()=>ib,"WireframeGeometry",()=>si,"WrapAroundEnding",()=>2402,"ZeroCurvatureEnding",()=>2400,"ZeroFactor",()=>200,"ZeroSlopeEnding",()=>2401,"ZeroStencilOp",()=>0,"createCanvasElement",()=>eI,"error",()=>eB,"getConsoleFunction",()=>eN,"log",()=>eU,"setConsoleFunction",()=>eF,"warn",()=>ek,"warnOnce",()=>eO],32009);var hT=e.i(32009);function hE(e,t){let n;return(...i)=>{window.clearTimeout(n),n=window.setTimeout(()=>e(...i),t)}}let hA=["x","y","top","bottom","left","right","width","height"];function hC({ref:e,children:t,fallback:n,resize:i,style:r,gl:a,events:s=hM,eventSource:o,eventPrefix:l,shadows:u,linear:c,flat:d,legacy:h,orthographic:p,frameloop:f,dpr:m,performance:g,raycaster:v,camera:y,scene:x,onPointerMissed:b,onCreated:S,..._}){let w,M,T;ec.useMemo(()=>d4(hT),[]);let E=(w=dm(),M=function(){let e=dm(),[t]=dc.useState(()=>new Map);t.clear();let n=e;for(;n;){let e=n.type;dv(e)&&e!==dp&&!t.has(e)&&t.set(e,dc.use(dh(e))),n=n.return}return t}(),T=dc.useMemo(()=>Array.from(M.keys()).reduce((e,t)=>n=>dc.createElement(e,null,dc.createElement(t.Provider,{...n,value:M.get(t)})),e=>dc.createElement(df,{...e})),[M]),eh.useMemo(()=>({children:e})=>{let t=dd(w,!0,e=>e.type===eh.StrictMode)?eh.StrictMode:eh.Fragment;return(0,eu.jsx)(t,{children:(0,eu.jsx)(T,{children:e})})},[w,T])),[A,C]=function({debounce:e,scroll:t,polyfill:n,offsetSize:i}={debounce:0,scroll:!1,offsetSize:!1}){var r,a,s;let o=n||("undefined"==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,ec.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),c=(0,ec.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:l,orientationHandler:null}),d=e?"number"==typeof e?e:e.scroll:null,h=e?"number"==typeof e?e:e.resize:null,p=(0,ec.useRef)(!1);(0,ec.useEffect)(()=>(p.current=!0,()=>void(p.current=!1)));let[f,m,g]=(0,ec.useMemo)(()=>{let e=()=>{let e,t;if(!c.current.element)return;let{left:n,top:r,width:a,height:s,bottom:o,right:l,x:d,y:h}=c.current.element.getBoundingClientRect(),f={left:n,top:r,width:a,height:s,bottom:o,right:l,x:d,y:h};c.current.element instanceof HTMLElement&&i&&(f.height=c.current.element.offsetHeight,f.width=c.current.element.offsetWidth),Object.freeze(f),p.current&&(e=c.current.lastBounds,t=f,!hA.every(n=>e[n]===t[n]))&&u(c.current.lastBounds=f)};return[e,h?hE(e,h):e,d?hE(e,d):e]},[u,i,d,h]);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 y(){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,ec.useEffect)(()=>{if(a)return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)},[r,a]),s=m,(0,ec.useEffect)(()=>(window.addEventListener("resize",s),()=>void window.removeEventListener("resize",s)),[s]),(0,ec.useEffect)(()=>{v(),y()},[t,g,m]),(0,ec.useEffect)(()=>v,[]),[e=>{e&&e!==c.current.element&&(v(),c.current.element=e,c.current.scrollC
399ontainers=function e(t){let n=[];if(!t||t===document.body)return n;let{overflow:i,overflowX:r,overflowY:a}=window.getComputedStyle(t);return[i,r,a].some(e=>"auto"===e||"scroll"===e)&&n.push(t),[...n,...e(t.parentElement)]}(e),y())},l,f]}({scroll:!0,debounce:{scroll:50,resize:0},...i}),P=ec.useRef(null),R=ec.useRef(null);ec.useImperativeHandle(e,()=>P.current);let I=dS(b),[D,L]=ec.useState(!1),[F,N]=ec.useState(!1);if(D)throw D;if(F)throw F;let U=ec.useRef(null);db(()=>{let e=P.current;if(C.width>0&&C.height>0&&e){let n,i,r,b,_,w,M,T,A,P,D,F,k,B,O;U.current||(b=null==(r=ho.get(e))?void 0:r.fiber,_=null==r?void 0:r.store,r&&console.warn("R3F.createRoot should only be called once!"),w="function"==typeof reportError?reportError:console.error,F=_||(A=(T=(M=dr((e,t)=>{let n,i=new e0,r=new e0,a=new e0;function s(e=t().camera,n=r,o=t().size){let{width:l,height:u,top:c,left:d}=o,h=l/u;n.isVector3?a.copy(n):a.set(...n);let p=e.getWorldPosition(i).distanceTo(a);if(e&&e.isOrthographicCamera)return{width:l/e.zoom,height:u/e.zoom,top:c,left:d,factor:1,distance:p,aspect:h};{let t=2*Math.tan(e.fov*Math.PI/180/2)*p,n=l/u*t;return{width:n,height:t,top:c,left:d,factor:l/n,distance:p,aspect:h}}}let o=t=>e(e=>({performance:{...e.performance,current:t}})),l=new eQ;return{set:e,get:t,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},scene:null,xr:null,invalidate:(e=1)=>hS(t(),e),advance:(e,n)=>h_(e,n,t()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new ob,pointer:l,mouse:l,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{let e=t();n&&clearTimeout(n),e.performance.current!==e.performance.min&&o(e.performance.min),n=setTimeout(()=>o(t().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:s},setEvents:t=>e(e=>({...e,events:{...e.events,...t}})),setSize:(n,i,a=0,o=0)=>{let l=t().camera,u={width:n,height:i,top:a,left:o};e(e=>({size:u,viewport:{...e.viewport,...s(l,r,u)}}))},setDpr:t=>e(e=>{let n=dM(t);return{viewport:{...e.viewport,dpr:n,initialDpr:e.viewport.initialDpr||n}}}),setFrameloop:(n="always")=>{let i=t().clock;i.stop(),i.elapsedTime=0,"never"!==n&&(i.start(),i.elapsedTime=0),e(()=>({frameloop:n}))},previousRoot:void 0,internal:{interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,lastEvent:eh.createRef(),active:!1,frames:0,priority:0,subscribe:(e,n,i)=>{let r=t().internal;return r.priority=r.priority+ +(n>0),r.subscribers.push({ref:e,priority:n,store:i}),r.subscribers=r.subscribers.sort((e,t)=>e.priority-t.priority),()=>{let i=t().internal;null!=i&&i.subscribers&&(i.priority=i.priority-(n>0),i.subscribers=i.subscribers.filter(t=>t.ref!==e))}}}}})).getState()).size,P=T.viewport.dpr,D=T.camera,M.subscribe(()=>{let{camera:e,size:t,viewport:n,gl:i,set:r}=M.getState();if(t.width!==A.width||t.height!==A.height||n.dpr!==P){A=t,P=n.dpr,dO(e,t),n.dpr>0&&i.setPixelRatio(n.dpr);let r="undefined"!=typeof HTMLCanvasElement&&i.domElement instanceof HTMLCanvasElement;i.setSize(t.width,t.height,r)}e!==D&&(D=e,r(t=>({viewport:{...t.viewport,...t.viewport.getCurrentViewport(e)}})))}),M.subscribe(e=>hS(e)),M),k=b||hs.createContainer(F,1,null,!1,null,"",w,w,w,null),r||ho.set(e,{fiber:k,store:F}),B=!1,O=null,U.current={async configure(t={}){var r,a;let s;O=new Promise(e=>s=e);let{gl:o,size:l,scene:u,events:c,onCreated:d,shadows:h=!1,linear:p=!1,flat:f=!1,legacy:m=!1,orthographic:g=!1,frameloop:v="always",dpr:y=[1,2],performance:x,raycaster:b,camera:S,onPointerMissed:_}=t,w=F.getState(),M=w.gl;if(!w.gl){let t={canvas:e,powerPreference:"high-performance",antialias:!0,alpha:!0},n="function"==typeof o?await o(t):o;M=dG(n)?n:new c7({...t,...o}),w.set({gl:M})}let T=w.raycaster;T||w.set({raycaster:T=new o$});let{params:E,...A}=b||{};if(dE.equ(A,T,hl)||dk(T,{...A}),dE.equ(E,T.params,hl)||dk(T,{params:{...T.params,...E}}
399),!w.camera||w.camera===i&&!dE.equ(i,S,hl)){i=S;let e=null==S?void 0:S.isCamera,t=e?S:g?new s6(0,0,0,0,.1,1e3):new ip(75,0,.1,1e3);!e&&(t.position.z=5,S&&(dk(t,S),!t.manual&&("aspect"in S||"left"in S||"right"in S||"bottom"in S||"top"in S)&&(t.manual=!0,t.updateProjectionMatrix())),w.camera||null!=S&&S.rotation||t.lookAt(0,0,0)),w.set({camera:t}),T.camera=t}if(!w.scene){let e;null!=u&&u.isScene?dC(e=u,F,"",{}):(dC(e=new iw,F,"",{}),u&&dk(e,u)),w.set({scene:e})}c&&!w.events.handlers&&w.set({events:c(F)});let C=function(e,t){if(!t&&"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement&&e.parentElement){let{width:t,height:n,top:i,left:r}=e.parentElement.getBoundingClientRect();return{width:t,height:n,top:i,left:r}}return!t&&"undefined"!=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(dE.equ(C,w.size,hl)||w.setSize(C.width,C.height,C.top,C.left),y&&w.viewport.dpr!==dM(y)&&w.setDpr(y),w.frameloop!==v&&w.setFrameloop(v),w.onPointerMissed||w.set({onPointerMissed:_}),x&&!dE.equ(x,w.performance,hl)&&w.set(e=>({performance:{...e.performance,...x}})),!w.xr){let e=(e,t)=>{let n=F.getState();"never"!==n.frameloop&&h_(e,!0,n,t)},t=()=>{let t=F.getState();t.gl.xr.enabled=t.gl.xr.isPresenting,t.gl.xr.setAnimationLoop(t.gl.xr.isPresenting?e:null),t.gl.xr.isPresenting||hS(t)},n={connect(){let e=F.getState().gl;e.xr.addEventListener("sessionstart",t),e.xr.addEventListener("sessionend",t)},disconnect(){let e=F.getState().gl;e.xr.removeEventListener("sessionstart",t),e.xr.removeEventListener("sessionend",t)}};"function"==typeof(null==(r=M.xr)?void 0:r.addEventListener)&&n.connect(),w.set({xr:n})}if(M.shadowMap){let e=M.shadowMap.enabled,t=M.shadowMap.type;M.shadowMap.enabled=!!h,dE.boo(h)?M.shadowMap.type=2:dE.str(h)?M.shadowMap.type=null!=(a=({basic:0,percentage:1,soft:2,variance:3})[h])?a:2:dE.obj(h)&&Object.assign(M.shadowMap,h),(e!==M.shadowMap.enabled||t!==M.shadowMap.type)&&(M.shadowMap.needsUpdate=!0)}return e8.enabled=!m,B||(M.outputColorSpace=p?ex:ey,M.toneMapping=4*!f),w.legacy!==m&&w.set(()=>({legacy:m})),w.linear!==p&&w.set(()=>({linear:p})),w.flat!==f&&w.set(()=>({flat:f})),!o||dE.fun(o)||dG(o)||dE.equ(o,M,hl)||dk(M,o),n=d,B=!0,s(),this},render(t){return B||O||this.configure(),O.then(()=>{hs.updateContainer((0,eu.jsx)(hu,{store:F,children:t,onCreated:n,rootElement:e}),k,null,()=>void 0)}),F},unmount(){hc(e)}}),async function(){await U.current.configure({gl:a,scene:x,events:s,shadows:u,linear:c,flat:d,legacy:h,orthographic:p,frameloop:f,dpr:m,performance:g,raycaster:v,camera:y,size:C,onPointerMissed:(...e)=>null==I.current?void 0:I.current(...e),onCreated:e=>{null==e.events.connect||e.events.connect(o?o&&o.hasOwnProperty("current")?o.current:o:R.current),l&&e.setEvents({compute:(e,t)=>{let n=e[l+"X"],i=e[l+"Y"];t.pointer.set(n/t.size.width*2-1,-(2*(i/t.size.height))+1),t.raycaster.setFromCamera(t.pointer,t.camera)}}),null==S||S(e)}}),U.current.render((0,eu.jsx)(E,{children:(0,eu.jsx)(dw,{set:N,children:(0,eu.jsx)(ec.Suspense,{fallback:(0,eu.jsx)(d_,{set:L}),children:null!=t?t:null})})}))}()}}),ec.useEffect(()=>{let e=P.current;if(e)return()=>hc(e)},[]);let k=o?"none":"auto";return(0,eu.jsx)("div",{ref:R,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:k,...r},..._,children:(0,eu.jsx)("div",{ref:A,style:{width:"100%",height:"100%"},children:(0,eu.jsx)("canvas",{ref:P,style:{display:"block"},children:n})})})}function hP(e){return(0,eu.jsx)(df,{children:(0,eu.jsx)(hC,{...e})})}function hR(){return(hR=Object.assign.bind()).apply(null,arguments)}var hI=e.i(88014);let hD=new e0,hL=new e0,hF=new e0,hN=new eQ;function hU(e,t,n){let i=hD.setFromMatrixPosition(e.matrixWorld);i.project(t);let r=n.width/2,a=n.height/2;return[i.x*r+r,-(i.y*a)+a]}let hk=e=>1e-10>Math.abs(e)?0:e;function hB(e,t,n=""){let i="matrix3d(";for(let n=0;16!==n;n++)i+=hk(t[n]*e.elements[n])+(15!==n?",":")");return n+i}let hO=(_=[1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1],e=>hB(e,_)),hz=(w=e=>[1/e,1/e,1/e,1,-1/e,-1/e,-1/e,-1,1/e,1/e,1/e,1,1,1,1,1],(e,t)=>hB(e,w(t),"translate(-50%,-50%)")),hH=ec.forwardRef(({children:e,eps:t=.001,style:n,className:i,prepend:r,center:a,fullscreen:s,portal:o,distanceFactor:l,sprite:u=!1,transform:c=!1,occlude:
399d,onOcclude:h,castShadow:p,receiveShadow:f,material:m,geometry:g,zIndexRange:v=[0x1000037,0],calculatePosition:y=hU,as:x="div",wrapperClass:b,pointerEvents:S="auto",..._},w)=>{let{gl:M,camera:T,scene:E,size:A,raycaster:C,events:P,viewport:R}=dX(),[I]=ec.useState(()=>document.createElement(x)),D=ec.useRef(null),L=ec.useRef(null),F=ec.useRef(0),N=ec.useRef([0,0]),U=ec.useRef(null),k=ec.useRef(null),B=(null==o?void 0:o.current)||P.connected||M.domElement.parentNode,O=ec.useRef(null),z=ec.useRef(!1),H=ec.useMemo(()=>{var e;return d&&"blending"!==d||Array.isArray(d)&&d.length&&(e=d[0])&&"object"==typeof e&&"current"in e},[d]);ec.useLayoutEffect(()=>{let e=M.domElement;d&&"blending"===d?(e.style.zIndex=`${Math.floor(v[0]/2)}`,e.style.position="absolute",e.style.pointerEvents="none"):(e.style.zIndex=null,e.style.position=null,e.style.pointerEvents=null)},[d]),ec.useLayoutEffect(()=>{if(L.current){let e=D.current=hI.createRoot(I);if(E.updateMatrixWorld(),c)I.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{let e=y(L.current,T,A);I.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${e[0]}px,${e[1]}px,0);transform-origin:0 0;`}
399return B&&(r?B.prepend(I):B.appendChild(I)),()=>{B&&B.removeChild(I),e.unmount()}}},[B,c]),ec.useLayoutEffect(()=>{b&&(I.className=b)},[b]);let V=ec.useMemo(()=>c?{position:"absolute",top:0,left:0,width:A.width,height:A.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:a?"translate3d(-50%,-50%,0)":"none",...s&&{top:-A.height/2,left:-A.width/2,width:A.width,height:A.height},...n},[n,a,s,A,c]),G=ec.useMemo(()=>({position:"absolute",pointerEvents:S}),[S]);ec.useLayoutEffect(()=>{var t,r;z.current=!1,c?null==(t=D.current)||t.render(ec.createElement("div",{ref:U,style:V},ec.createElement("div",{ref:k,style:G},ec.createElement("div",{ref:w,className:i,style:n,children:e})))):null==(r=D.current)||r.render(ec.createElement("div",{ref:w,style:V,className:i,children:e}))});let j=ec.useRef(!0);dq(e=>{if(L.current){T.updateMatrixWorld(),L.current.updateWorldMatrix(!0,!1);let e=c?N.current:y(L.current,T,A);if(c||Math.abs(F.current-T.zoom)>t||Math.abs(N.current[0]-e[0])>t||Math.abs(N.current[1]-e[1])>t){var n;let t,i,r,a,s=(n=L.current,t=hD.setFromMatrixPosition(n.matrixWorld),i=hL.setFromMatrixPosition(T.matrixWorld),r=t.sub(i),a=T.getWorldDirection(hF),r.angleTo(a)>Math.PI/2),o=!1;H&&(Array.isArray(d)?o=d.map(e=>e.current):"blending"!==d&&(o=[E]));let p=j.current;o?j.current=function(e,t,n,i){let r=hD.setFromMatrixPosition(e.matrixWorld),a=r.clone();a.project(t),hN.set(a.x,a.y),n.setFromCamera(hN,t);let s=n.intersectObjects(i,!0);if(s.length){let e=s[0].distance;return r.distanceTo(n.ray.origin)<e}return!0}(L.current,T,C,o)&&!s:j.current=!s,p!==j.current&&(h?h(!j.current):I.style.display=j.current?"block":"none");let f=Math.floor(v[0]/2),m=d?H?[v[0],f]:[f-1,0]:v;if(I.style.zIndex=`${function(e,t,n){if(t instanceof ip||t instanceof s6){let i=hD.setFromMatrixPosition(e.matrixWorld),r=hL.setFromMatrixPosition(t.matrixWorld),a=i.distanceTo(r),s=(n[1]-n[0])/(t.far-t.near),o=n[1]-s*t.far;return Math.round(s*a+o)}}(L.current,T,m)}`,c){let[e,t]=[A.width/2,A.height/2],n=T.projectionMatrix.elements[5]*t,{isOrthographicCamera:i,top:r,left:a,bottom:s,right:o}=T,c=hO(T.matrixWorldInverse),d=i?`scale(${n})translate(${hk(-(o+a)/2)}px,${hk((r+s)/2)}px)`:`translateZ(${n}px)`,h=L.current.matrixWorld;u&&((h=T.matrixWorldInverse.clone().transpose().copyPosition(h).scale(L.current.scale)).elements[3]=h.elements[7]=h.elements[11]=0,h.elements[15]=1),I.style.width=A.width+"px",I.style.height=A.height+"px",I.style.perspective=i?"":`${n}px`,U.current&&k.current&&(U.current.style.transform=`${d}${c}translate(${e}px,${t}px)`,k.current.style.transform=hz(h,1/((l||10)/400)))}else{let t=void 0===l?1:function(e,t){if(t instanceof s6)return t.zoom;if(!(t instanceof ip))return 1;{let n=hD.setFromMatrixPosition(e.matrixWorld),i=hL.setFromMatrixPosition(t.matrixWorld);return 1/(2*Math.tan(t.fov*Math.PI/180/2)*n.distanceTo(i))}}(L.current,T)*l;I.style.transform=`translate3d(${e[0]}px,${e[1]}px,0) scale(${t})`}N.current=e,F.current=T.zoom}}if(!H&&O.current&&!z.current)if(c){if(U.current){let e=U.current.children[0];if(null!=e&&e.clientWidth&&null!=e&&e.clientHeight){let{isOrthographicCamera:t}=T;if(t||g)_.scale&&(Array.isArray(_.scale)?_.scale instanceof e0?O.current.scale.copy(_.scale.clone().divideScalar(1)):O.current.scale.set(1/_.scale[0],1/_.scale[1],1/_.scale[2]):O.current.scale.setScalar(1/_.scale));else{let t=(l||10)/400,n=e.clientWidth*t,i=e.clientHeight*t;O.current.scale.set(n,i,1)}z.current=!0}}}else{let t=I.children[0];if(null!=t&&t.clientWidth&&null!=t&&t.clientHeight){let e=1/R.factor,n=t.clientWidth*e,i=t.clientHeight*e;O.current.scale.set(n,i,1),z.current=!0}O.current.lookAt(e.camera.position)}});let W=ec.useMemo(()=>({vertexShader:c?void 0:`
400          /*
401            This shader is from the THREE's SpriteMaterial.
402            We need to turn the backing plane into a Sprite
403            (make it always face the camera) if "transfrom"
404            is false.
405          */
406          #include <common>
407
408          void main() {
409            vec2 center = vec2(0., 1.);
410            float rotation = 0.0;
411
412            // This is somewhat arbitrary, but it seems to work well
413            // Need to figure out how to derive this dynamically if it even matters
414            float size = 0.03;
415
416            vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );
417            vec2 scale;
418            scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );
419            scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );
420
421            bool isPerspective = isPerspectiveMatrix( projectionMatrix );
422            if ( isPerspective ) scale *= - mvPosition.z;
423
424            vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale * size;
425            vec2 rotatedPosition;
426            rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;
427            rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;
428            mvPosition.xy += rotatedPosition;
429
430            gl_Position = projectionMatrix * mvPosition;
431          }
432      `,fragmentShader:`
433        void main() {
434          gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
435        }
436      `}),[c]);return ec.createElement("group",hR({},_,{ref:L}),d&&!H&&ec.createElement("mesh",{castShadow:p,receiveShadow:f,ref:O},g||ec.createElement("planeGeometry",null),m||ec.createElement("shaderMaterial",{side:2,vertexShader:W.vertexShader,fragmentShader:W.fragmentShader})))});var hV=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){"undefined"!=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}},hG=(M=new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),T=new Float32Array([0,0,2,0,0,2]),(E=new nQ).setAttribute("position",new nN(M,3)),E.setAttribute("uv",new nN(T,2)),E),hj=class e{static get fullscreenGeometry(){return hG}constructor(e="Pass",t=new iw,n=new s6){this.name=e,this.renderer=null,this.scene=t,this.camera=n,this.screen=null,this.rtt=!0,this.needsSwap=!0,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 n=this.screen;null!==n?n.material=t:((n=new ie(e.fullscreenGeometry,t)).frustumCulled=!1,null===this.scene&&(this.scene=new iw),this.scene.add(n),this.screen=n)}getFullscreenMaterial(){return this.fullscreenMaterial}setFullscreenMaterial(e){this.fullscreenMaterial=e}getDepthTexture(){return null}
436setDepthTexture(e,t=3200){}render(e,t,n,i,r){throw Error("Render method not implemented!")}setSize(e,t){}initialize(e,t,n){}dispose(){for(let t of Object.keys(this)){let n=this[t];(n instanceof tu||n instanceof nE||n instanceof ts||n instanceof e)&&this[t].dispose()}null!==this.fullscreenMaterial&&this.fullscreenMaterial.dispose()}},hW=class extends hj{constructor(){super("ClearMaskPass",null,null),this.needsSwap=!1}render(e,t,n,i,r){let a=e.state.buffers.stencil;a.setLocked(!1),a.setTest(!1)}},hX=`#ifdef COLOR_WRITE
437#include <common>
438#include <dithering_pars_fragment>
439#ifdef FRAMEBUFFER_PRECISION_HIGH
440uniform mediump sampler2D inputBuffer;
441#else
442uniform lowp sampler2D inputBuffer;
443#endif
444#endif
445#ifdef DEPTH_WRITE
446#include <packing>
447#ifdef GL_FRAGMENT_PRECISION_HIGH
448uniform highp sampler2D depthBuffer;
449#else
450uniform mediump sampler2D depthBuffer;
451#endif
452float readDepth(const in vec2 uv){
453#if DEPTH_PACKING == 3201
454return unpackRGBAToDepth(texture2D(depthBuffer,uv));
455#else
456return texture2D(depthBuffer,uv).r;
457#endif
458}
459#endif
460#ifdef USE_WEIGHTS
461uniform vec4 channelWeights;
462#endif
463uniform float opacity;varying vec2 vUv;void main(){
464#ifdef COLOR_WRITE
465vec4 texel=texture2D(inputBuffer,vUv);
466#ifdef USE_WEIGHTS
467texel*=channelWeights;
468#endif
469gl_FragColor=opacity*texel;
470#ifdef COLOR_SPACE_CONVERSION
471#include <colorspace_fragment>
472#endif
473#include <dithering_fragment>
474#else
475gl_FragColor=vec4(0.0);
476#endif
477#ifdef DEPTH_WRITE
478gl_FragDepth=readDepth(vUv);
479#endif
480}`,hq="varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}",hY=class extends il{constructor(){super({name:"CopyMaterial",defines:{COLOR_SPACE_CONVERSION:"1",DEPTH_PACKING:"0",COLOR_WRITE:"1"},uniforms:{inputBuffer:new oq(null),depthBuffer:new oq(null),channelWeights:new oq(null),opacity:new oq(1)},blending:0,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:hX,vertexShader:hq}),this.depthFunc=1}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}},hZ=class extends hj{constructor(e,t=!0){super("CopyPass"),this.fullscreenMaterial=new hY,this.needsSwap=!1,this.renderTarget=e,void 0===e&&(this.renderTarget=new tu(1,1,{minFilter:1006,magFilter:1006,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,n,i,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,n){void 0!==n&&(this.renderTarget.texture.type=n,1009!==n?this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1":null!==e&&e.outputColorSpace===ey&&(this.renderTarget.texture.colorSpace=ey))}},hK=new nw,hJ=class extends hj{constructor(e=!0,t=!0,n=!1){super("ClearPass",null,null),this.needsSwap=!1,this.color=e,this.depth=t,this.stencil=n,this.overrideClearColor=null,this.overrideClearAlpha=-1}
480setClearFlags(e,t,n){this.color=e,this.depth=t,this.stencil=n}getOverrideClearColor(){return this.overrideClearColor}setOverrideClearColor(e){this.overrideClearColor=e}getOverrideClearAlpha(){return this.overrideClearAlpha}setOverrideClearAlpha(e){this.overrideClearAlpha=e}render(e,t,n,i,r){let a=this.overrideClearColor,s=this.overrideClearAlpha,o=e.getClearAlpha(),l=null!==a,u=s>=0;l?(e.getClearColor(hK),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(hK,o):u&&e.setClearAlpha(o)}},hQ=class extends hj{constructor(e,t){super("MaskPass",e,t),this.needsSwap=!1,this.clearPass=new hJ(!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,n,i,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,n))),this.renderToScreen?e.setRenderTarget(null):(e.setRenderTarget(t),e.render(o,l),e.setRenderTarget(n)),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)}},h$=class{constructor(e=null,{depthBuffer:t=!0,stencilBuffer:n=!1,multisampling:i=0,frameBufferType:r}={}){this.renderer=null,this.inputBuffer=this.createBuffer(t,n,r,i),this.outputBuffer=this.inputBuffer.clone(),this.copyPass=new hZ,this.depthTexture=null,this.passes=[],this.timer=new hV,this.autoRenderToScreen=!0,this.setRenderer(e)}get multisampling(){return this.inputBuffer.samples||0}set multisampling(e){let t=this.inputBuffer,n=this.multisampling;n>0&&e>0?(this.inputBuffer.samples=e,this.outputBuffer.samples=e,this.inputBuffer.dispose(),this.outputBuffer.dispose()):n!==e&&(this.inputBuffer.dispose(),this.outputBuffer.dispose(),this.inputBuffer=this.createBuffer(t.depthBuffer,t.stencilBuffer,t.texture.type,e),this.inputBuffer.depthTexture=this.depthTexture,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 eQ),n=e.getContext().getContextAttributes().alpha,i=this.inputBuffer.texture.type;for(let r of(1009===i&&e.outputColorSpace===ey&&(this.inputBuffer.texture.colorSpace=ey,this.outputBuffer.texture.colorSpace=ey,this.inputBuffer.dispose(),this.outputBuffer.dispose()),e.autoClear=!1,this.setSize(t.width,t.height),this.passes))r.initialize(e,n,i)}}replaceRenderer(e,t=!0){let n=this.renderer,i=n.domElement.parentNode;return this.setRenderer(e),t&&null!==i&&(i.removeChild(n.domElement),i.appendChild(e.domElement)),n}createDepthTexture(){let e=this.depthTexture=new r8;return this.inputBuffer.depthTexture=e,this.inputBuffer.dispose(),this.inputBuffer.stencilBuffer?(e.format=1027,e.type=1020):e.type=1014,e}deleteDepthTexture(){if(null!==this.depthTexture)for(let e of(this.depthTexture.dispose(),this.depthTexture=null,this.inputBuffer.depthTexture=null,this.inputBuffer.dispose(),this.passes))e.setDepthTexture(null)}createBuffer(e,t,n,i){let r=this.renderer,a=null===r?new eQ:r.getDrawingBufferSize(new eQ),s=new tu(a.width,a.height,{minFilter:1006,magFilter:1006,stencilBuffer:t,depthBuffer:e,type:n});return i>0&&(s.samples=i),1009===n&&null!==r&&r.outputColorSpace===ey&&(s.texture.colorSpace=ey),s.texture.name="EffectComposer.Buffer",s.texture.generateMipmaps=!1,s}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 n=this.passes,i=this.renderer,r=i.getDrawingBufferSize(new eQ),a=i.getContext().getContextAttributes().alpha,s=this.inputBuffer.texture.type;if(e.setRenderer(i),e.setSize(r.width,r.height),e.initialize(i,a,s),this.autoRenderToScreen&&(n.length>0&&(n[n.length-1].renderToScreen=!1),e.renderToScreen&&(this.autoRenderToScreen=!1)),void 0!==t?n.splice(t,0,e):n.push(e),this.autoRenderToScreen&&(n[n.length-1].renderToScreen=!0),e.needsDepthTexture||null!==this.depthTexture)if(null===this.depthTexture){let t=this.createDepthTexture();for(e of n)e.setDepthTexture(t)}else e.setDepthTexture(this.depthTexture)}removePass(e){let t=this.passes,n=t.indexOf(e);-1!==n&&t.splice(n,1).length>0&&(null!==this.depthTexture&&(t.reduce((e,t)=>
480e||t.needsDepthTexture,!1)||(e.getDepthTexture()===this.depthTexture&&e.setDepthTexture(null),this.deleteDepthTexture())),this.autoRenderToScreen&&n===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,n,i,r=this.renderer,a=this.copyPass,s=this.inputBuffer,o=this.outputBuffer,l=!1;for(let u of(void 0===e&&(this.timer.update(),e=this.timer.getDelta()),this.passes))u.enabled&&(u.render(r,s,o,e,l),u.needsSwap&&(l&&(a.renderToScreen=u.renderToScreen,t=r.getContext(),(n=r.state.buffers.stencil).setFunc(t.NOTEQUAL,1,0xffffffff),a.render(r,s,o,e,l),n.setFunc(t.EQUAL,1,0xffffffff)),i=s,s=o,o=i),u instanceof hQ?l=!0:u instanceof hW&&(l=!1))}setSize(e,t,n){let i=this.renderer,r=i.getSize(new eQ);(void 0===e||void 0===t)&&(e=r.width,t=r.height),(r.width!==e||r.height!==t)&&i.setSize(e,t,n);let a=i.getDrawingBufferSize(new eQ);for(let e of(this.inputBuffer.setSize(a.width,a.height),this.outputBuffer.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(),hj.fullscreenGeometry.dispose()}},h0={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"},h1=class{constructor(){this.shaderParts=new Map([[h0.FRAGMENT_HEAD,null],[h0.FRAGMENT_MAIN_UV,null],[h0.FRAGMENT_MAIN_IMAGE,null],[h0.VERTEX_HEAD,null],[h0.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=ex}},h2=!1,h3=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 2:t=this.materialsFlatShadedDoubleSide;break;case 1:t=this.materialsFlatShadedBackSide;break;default:t=this.materialsFlatShaded}else switch(e.material.side){case 2:t=this.materialsDoubleSide;break;case 1: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 il))return e.clone();let t=e.uniforms,n=new Map;for(let e in t){let i=t[e].value;i.isRenderTargetTexture&&(t[e].value=null,n.set(e,i))}let i=e.clone();for(let e of n)t[e[0]].value=e[1],i.uniforms[e[0]].value=e[1];return i}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 n of t)n.uniforms=Object.assign({},e.uniforms),n.side=0;t[2].skinning=!0,this.materialsBackSide=t.map(t=>{let n=this.cloneMaterial(t);return n.uniforms=Object.assign({},e.uniforms),n.side=1,n}),this.materialsDoubleSide=t.map(t=>{let n=this.cloneMaterial(t);return n.uniforms=Object.assign({},e.uniforms),n.side=2,n}),this.materialsFlatShaded=t.map(t=>{let n=this.cloneMaterial(t);return n.uniforms=Object.assign({},e.uniforms),n.flatShading=!0,n}),this.materialsFlatShadedBackSide=t.map(t=>{let n=this.cloneMaterial(t);return n.uniforms=Object.assign({},e.uniforms),n.flatShading=!0,n.side=1,n}),this.materialsFlatShadedDoubleSide=t.map(t=>{let n=this.cloneMaterial(t);return n.uniforms=Object.assign({},e.uniforms),n.flatShading=!0,n.side=2,n})}}render(e,t,n){let i=e.shadowMap.enabled;if(e.shadowMap.enabled=!1,h2){let i=this.originalMaterials;for(let r of(this.meshCount=0,t.traverse(this.replaceMaterial),e.render(t,n),i))r[0].material=r[1];this.meshCount!==i.size&&i.clear()}else{let i=t.overrideMaterial;t.overrideMaterial=this.material,e.render(t,n),t.overrideMaterial=i}e.shadowMap.enabled=i}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 h2}static set workaroundEnabled(e){h2=e}},h4=class extends ez{constructor(e,t=-1,n=-1,i=1){super(),this.resizable=e,this.baseSize=new eQ(1,1),this.preferredSize=new eQ(t,n),this.target=this.preferredSize,this.s=i,this.effectiveSize=new eQ,this.addEventListener("change",()=>this.updateEffectiveSize()),this.updateEffectiveSize()}updateEffectiveSize(){let e=this.baseSize,t=this.preferredSize,n=this.effectiveSize,i=this.scale;-1!==t.width?n.width=t.width:-1!==t.height?n.width=Math.round(t.height*(e.width/Math.max(e.height,1))):n.width=Math.round(e.width*i),-1!==t.height?n.height=t.height:-1!==t.width?n.height=Math.round(t.width/
480Math.max(e.width/Math.max(e.height,1),1)):n.height=Math.round(e.height*i)}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"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}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"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}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"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}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"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}get preferredWidth(){return this.preferredSize.width}set preferredWidth(e){this.preferredSize.width!==e&&(this.preferredSize.width=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}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"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}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"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}copy(e){this.s=e.scale,this.baseSize.set(e.baseWidth,e.baseHeight),this.preferredSize.set(e.preferredWidth,e.preferredHeight),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height)}static get AUTO_SIZE(){return -1}},h5=new class{constructor(e=0){this.nextId=e}getNextId(){return this.nextId++}reset(e=0){return this.nextId=e,this}}(2),h6=class extends Set{constructor(e,t=h5.getNextId()){super(),this.exclusive=!1,this._layer=t,(this._layer<1||this._layer>31)&&(console.warn("Layer out of range, resetting to 2"),h5.reset(2),this._layer=h5.getNextId()),void 0!==e&&this.set(e)}get layer(){return this._layer}set layer(e){let t=this._layer;for(let n of this)n.layers.disable(t),n.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}},h8=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);}"]]),h9=class extends ez{constructor(e,t=1){super(),this._blendFunction=e,this.opacity=new oq(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 h8.get(this.blendFunction)}},h7=class extends ez{constructor(e,t,{attributes:n=0,blendFunction:i=23,defines:r=new Map,uniforms:a=new Map,extensions:s=null,vertexShader:o=null}={}){super(),this.name=e,this.renderer=null,this.attributes=n,this.fragmentShader=t,this.vertexShader=o,this.defines=r,this.uniforms=a,this.extensions=s,this.blendMode=new h9(i),this.blendMode.addEventListener("change",e=>
480this.setChanged()),this._inputColorSpace=ex,this._outputColorSpace=""}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=3200){}update(e,t,n){}setSize(e,t){}initialize(e,t,n){}dispose(){for(let e of Object.keys(this)){let t=this[e];(t instanceof tu||t instanceof nE||t instanceof ts||t instanceof hj)&&this[e].dispose()}}},pe=`#ifdef FRAMEBUFFER_PRECISION_HIGH
481uniform mediump sampler2D inputBuffer;
482#else
483uniform lowp sampler2D inputBuffer;
484#endif
485varying 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;
486#include <colorspace_fragment>
487}`,pt=[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])],pn=class extends il{constructor(e=new to){super({name:"KawaseBlurMaterial",uniforms:{inputBuffer:new oq(null),texelSize:new oq(new to),scale:new oq(1),kernel:new oq(0)},blending:0,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:pe,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=2}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.inputBuffer=e}get kernelSequence(){return pt[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 n=1/e,i=1/t;this.uniforms.texelSize.value.set(n,i,.5*n,.5*i)}},pi=class extends hj{constructor({kernelSize:e=2,resolutionScale:t=.5,width:n=h4.AUTO_SIZE,height:i=h4.AUTO_SIZE,resolutionX:r=n,resolutionY:a=i}={}){super("KawaseBlurPass"),this.renderTargetA=new tu(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 h4(this,r,a,t);s.addEventListener("change",e=>this.setSize(s.baseWidth,s.baseHeight)),this._blurMaterial=new pn,this._blurMaterial.kernelSize=e,this.copyMaterial=new hY}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,n,i,r){let a=this.scene,s=this.camera,o=this.renderTargetA,l=this.renderTargetB,u=this.blurMaterial,c=u.kernelSequence,d=t;this.fullscreenMaterial=u;for(let t=0,n=c.length;t<n;++t){let n=(1&t)==0?o:l;u.kernel=c[t],u.inputBuffer=d.texture,e.setRenderTarget(n),e.render(a,s),d=n}this.fullscreenMaterial=this.copyMaterial,this.copyMaterial.inputBuffer=d.texture,e.setRenderTarget(this.renderToScreen?null:n),e.render(a,s)}setSize(e,t){let n=this.resolution;n.setBaseSize(e,t);let i=n.width,r=n.height;this.renderTargetA.setSize(i,r),this.renderTargetB.setSize(i,r),this.blurMaterial.setSize(e,t)}initialize(e,t,n){void 0!==n&&(this.renderTargetA.texture.type=n,this.renderTargetB.texture.type=n,1009!==n?(this.blurMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1",this.copyMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1"):null!==e&&e.outputColorSpace
487===ey&&(this.renderTargetA.texture.colorSpace=ey,this.renderTargetB.texture.colorSpace=ey))}static get AUTO_SIZE(){return h4.AUTO_SIZE}},pr=`#include <common>
488#ifdef FRAMEBUFFER_PRECISION_HIGH
489uniform mediump sampler2D inputBuffer;
490#else
491uniform lowp sampler2D inputBuffer;
492#endif
493#ifdef RANGE
494uniform vec2 range;
495#elif defined(THRESHOLD)
496uniform float threshold;uniform float smoothing;
497#endif
498varying vec2 vUv;void main(){vec4 texel=texture2D(inputBuffer,vUv);float l=luminance(texel.rgb);float mask=1.0;
499#ifdef RANGE
500float low=step(range.x,l);float high=step(l,range.y);mask=low*high;
501#elif defined(THRESHOLD)
502mask=smoothstep(threshold,threshold+smoothing,l);
503#endif
504#ifdef COLOR
505gl_FragColor=texel*mask;
506#else
507gl_FragColor=vec4(l*mask);
508#endif
509}`,pa=class extends il{constructor(e=!1,t=null){super({name:"LuminanceMaterial",defines:{THREE_REVISION:"182".replace(/\D+/g,"")},uniforms:{inputBuffer:new oq(null),threshold:new oq(0),smoothing:new oq(1),range:new oq(null)},blending:0,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:pr,vertexShader:hq}),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}},ps=class extends hj{constructor({renderTarget:e,luminanceRange:t,colorOutput:n,resolutionScale:i=1,width:r=h4.AUTO_SIZE,height:a=h4.AUTO_SIZE,resolutionX:s=r,resolutionY:o=a}={}){super("LuminancePass"),this.fullscreenMaterial=new pa(n,t),this.needsSwap=!1,this.renderTarget=e,void 0===this.renderTarget&&(this.renderTarget=new tu(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="LuminancePass.Target");const l=this.resolution=new h4(this,s,o,i);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,n,i,r){this.fullscreenMaterial.inputBuffer=t.texture,e.setRenderTarget(this.renderToScreen?null:this.renderTarget),e.render(this.scene,this.camera)}setSize(e,t){let n=this.resolution;n.setBaseSize(e,t),this.renderTarget.setSize(n.width,n.height)}initialize(e,t,n){void 0!==n&&1009!==n&&(this.renderTarget.texture.type=n,this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}},po=`#ifdef FRAMEBUFFER_PRECISION_HIGH
510uniform mediump sampler2D inputBuffer;
511#else
512uniform lowp sampler2D inputBuffer;
513#endif
514#define WEIGHT_INNER 0.125
515#define WEIGHT_OUTER 0.0555555
516varying 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;
517#include <colorspace_fragment>
518}`,pl=class extends il{constructor(){super({name:"DownsamplingMaterial",uniforms:{inputBuffer:new oq(null),texelSize:new oq(new eQ)},blending:0,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:po,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;
518vUv00=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)}},pu=`#ifdef FRAMEBUFFER_PRECISION_HIGH
519uniform mediump sampler2D inputBuffer;uniform mediump sampler2D supportBuffer;
520#else
521uniform lowp sampler2D inputBuffer;uniform lowp sampler2D supportBuffer;
522#endif
523uniform 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);
524#include <colorspace_fragment>
525}`,pc=class extends il{constructor(){super({name:"UpsamplingMaterial",uniforms:{inputBuffer:new oq(null),supportBuffer:new oq(null),texelSize:new oq(new eQ),radius:new oq(.85)},blending:0,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:pu,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)}},pd=class extends hj{constructor(){super("MipmapBlurPass"),this.needsSwap=!1,this.renderTarget=new tu(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="Upsampling.Mipmap0",this.downsamplingMipmaps=[],this.upsamplingMipmaps=[],this.downsamplingMaterial=new pl,this.upsamplingMaterial=new pc,this.resolution=new eQ}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 n=0;n<e;++n){let e=t.clone();e.texture.name="Downsampling.Mipmap"+n,this.downsamplingMipmaps.push(e)}this.upsamplingMipmaps.push(t);for(let n=1,i=e-1;n<i;++n){let e=t.clone();e.texture.name="Upsampling.Mipmap"+n,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,n,i,r){let{scene:a,camera:s}=this,{downsamplingMaterial:o,upsamplingMaterial:l}=this,{downsamplingMipmaps:u,upsamplingMipmaps:c}=this,d=t;this.fullscreenMaterial=o;for(let t=0,n=u.length;t<n;++t){let n=u[t];o.setSize(d.width,d.height),o.inputBuffer=d.texture,e.setRenderTarget(n),e.render(a,s),d=n}this.fullscreenMaterial=l;for(let t=c.length-1;t>=0;--t){let n=c[t];l.setSize(d.width,d.height),l.inputBuffer=d.texture,l.supportBuffer=u[t].texture,e.setRenderTarget(n),e.render(a,s),d=n}}setSize(e,t){let n=this.resolution;n.set(e,t);let i=n.width,r=n.height;for(let e=0,t=this.downsamplingMipmaps.length;e<t;++e)i=Math.round(.5*i),r=Math.round(.5*r),this.downsamplingMipmaps[e].setSize(i,r),e<this.upsamplingMipmaps.length&&this.upsamplingMipmaps[e].setSize(i,r)}initialize(e,t,n){if(void 0!==n){let t=this.downsamplingMipmaps.concat(this.upsamplingMipmaps);for(let e of t)e.texture.type=n;if(1009!==n)this.downsamplingMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1",this.upsamplingMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1";
525else if(null!==e&&e.outputColorSpace===ey)for(let e of t)e.texture.colorSpace=ey}}dispose(){for(let e of(super.dispose(),this.downsamplingMipmaps.concat(this.upsamplingMipmaps)))e.dispose()}},ph=`#ifdef FRAMEBUFFER_PRECISION_HIGH
526uniform mediump sampler2D map;
527#else
528uniform lowp sampler2D map;
529#endif
530uniform float intensity;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=texture2D(map,uv)*intensity;}`,pp=class extends h7{constructor({blendFunction:e=28,luminanceThreshold:t=1,luminanceSmoothing:n=.03,mipmapBlur:i=!0,intensity:r=1,radius:a=.85,levels:s=8,kernelSize:o=3,resolutionScale:l=.5,width:u=h4.AUTO_SIZE,height:c=h4.AUTO_SIZE,resolutionX:d=u,resolutionY:h=c}={}){super("BloomEffect",ph,{blendFunction:e,uniforms:new Map([["map",new oq(null)],["intensity",new oq(r)]])}),this.renderTarget=new tu(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="Bloom.Target",this.blurPass=new pi({kernelSize:o}),this.luminancePass=new ps({colorOutput:!0}),this.luminanceMaterial.threshold=t,this.luminanceMaterial.smoothing=n,this.mipmapBlurPass=new pd,this.mipmapBlurPass.enabled=i,this.mipmapBlurPass.radius=a,this.mipmapBlurPass.levels=s,this.uniforms.get("map").value=i?this.mipmapBlurPass.texture:this.renderTarget.texture;const p=this.resolution=new h4(this,d,h,l);p.addEventListener("change",e=>this.setSize(p.baseWidth,p.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,n){let i=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,i)):this.mipmapBlurPass.enabled?this.mipmapBlurPass.render(e,t):this.blurPass.render(e,t,i)}setSize(e,t){let n=this.resolution;n.setBaseSize(e,t),this.renderTarget.setSize(n.width,n.height),this.blurPass.resolution.copy(n),this.luminancePass.setSize(e,t),this.mipmapBlurPass.setSize(e,t)}initialize(e,t,n){this.blurPass.initialize(e,t,n),this.luminancePass.initialize(e,t,n),this.mipmapBlurPass.initialize(e,t,n),void 0!==n&&(this.renderTarget.texture.type=n,null!==e&&e.outputColorSpace===ey&&(this.renderTarget.texture.colorSpace=ey))}},pf=`#ifdef RADIAL_MODULATION
531uniform float modulationOffset;
532#endif
533varying 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;
534#ifdef RADIAL_MODULATION
535const 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;}
536#else
537if(vActive>0.0){ra=texture2D(inputBuffer,vUvR).ra;ba=texture2D(inputBuffer,vUvB).ba;}
538#endif
539outputColor=vec4(ra.x,inputColor.g,ba.x,max(max(ra.y,ba.y),inputColor.a));}`,pm=`void mainImage(const in vec4 inputColor,const in vec2 uv,const in float depth,out vec4 outputColor){
540#ifdef INVERTED
541vec3 color=vec3(1.0-depth);
542#else
543vec3 color=vec3(depth);
544#endif
545outputColor=vec4(color,inputColor.a);}`,pg=`#ifdef FRAMEBUFFER_PRECISION_HIGH
546uniform mediump sampler2D inputBuffer;
547#else
548uniform lowp sampler2D inputBuffer;
549#endif
550#if PASS == 1
551uniform vec4 kernel64[32];
552#else
553uniform vec4 kernel16[8];
554#endif
555uniform lowp sampler2D cocBuffer;uniform vec2 texelSize;uniform float scale;varying vec2 vUv;void main(){
556#ifdef FOREGROUND
557vec2 cocNearFar=texture2D(cocBuffer,vUv).rg*scale;float coc=cocNearFar.x;
558#else
559float coc=texture2D(cocBuffer,vUv).g*scale;
560#endif
561if(coc==0.0){gl_FragColor=texture2D(inputBuffer,vUv);}else{
562#ifdef FOREGROUND
563vec2 step=texelSize*max(cocNearFar.x,cocNearFar.y);
564#else
565vec2 step=texelSize*coc;
566#endif
567#if PASS == 1
568vec4 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;
569#else
570vec4 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;
571#endif
572}}`,pv=class extends il{constructor(e=!1,t=!1){super({name:"BokehMaterial",defines:{PASS:e?"2":"1"},uniforms:{inputBuffer:new oq(null),cocBuffer:new oq(null),texelSize:new oq(new eQ),kernel64:new oq(null),kernel16:new oq(null),scale:new oq(1)},blending:0,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:pg,vertexShader:hq}),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),n=0,i=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[i++]=l,t[i++]=u):(e[n++]=l,e[n++]=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)}},py=`#include <common>
573#include <packing>
574#ifdef GL_FRAGMENT_PRECISION_HIGH
575uniform highp sampler2D depthBuffer;
576#else
577uniform mediump sampler2D depthBuffer;
578#endif
579uniform 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){
580#if DEPTH_PACKING == 3201
581float depth=unpackRGBAToDepth(texture2D(depthBuffer,uv));
582#else
583float depth=texture2D(depthBuffer,uv).r;
584#endif
585#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH)
586float 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;
587#elif defined(USE_REVERSED_DEPTH_BUFFER)
588depth=1.0-depth;
589#endif
590return depth;}
591#ifdef PERSPECTIVE_CAMERA
592#define getViewZ(depth) perspectiveDepthToViewZ(depth, cameraNear, cameraFar)
593#else
594#define getViewZ(depth) orthographicDepthToViewZ(depth, cameraNear, cameraFar)
595#endif
596vec3 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));}
597#define getDistance(viewPosition) length(viewPosition)
598void 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));}`,px=class extends il{constructor(e=null){super({name:"CircleOfConfusionMaterial",defines:{DEPTH_PACKING:"0"},uniforms:{depthBuffer:new oq(null),projectionMatrix:new oq(null),projectionMatrixInverse:new oq(null),cameraNear:new oq(.3),cameraFar:new oq(1e3),focusDistance:new oq(0),focusRange:new oq(0)},blending:0,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:py,vertexShader:hq}),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=3200){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 ip?t||(this.defines.PERSPECTIVE_CAMERA=!0,this.needsUpdate=!0):t&&(delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}},pb=`#ifdef FRAMEBUFFER_PRECISION_HIGH
599uniform mediump sampler2D inputBuffer;
600#else
601uniform lowp sampler2D inputBuffer;
602#endif
603#ifdef MASK_PRECISION_HIGH
604uniform mediump sampler2D maskTexture;
605#else
606uniform lowp sampler2D maskTexture;
607#endif
608#if MASK_FUNCTION != 0
609uniform float strength;
610#endif
611varying vec2 vUv;void main(){
612#if COLOR_CHANNEL == 0
613float mask=texture2D(maskTexture,vUv).r;
614#elif COLOR_CHANNEL == 1
615float mask=texture2D(maskTexture,vUv).g;
616#elif COLOR_CHANNEL == 2
617float mask=texture2D(maskTexture,vUv).b;
618#else
619float mask=texture2D(maskTexture,vUv).a;
620#endif
621#if MASK_FUNCTION == 0
622#ifdef INVERTED
623mask=(mask>0.0)?0.0:1.0;
624#else
625mask=(mask>0.0)?1.0:0.0;
626#endif
627#else
628mask=clamp(mask*strength,0.0,1.0);
629#ifdef INVERTED
630mask=1.0-mask;
631#endif
632#endif
633#if MASK_FUNCTION == 3
634vec4 texel=texture2D(inputBuffer,vUv);gl_FragColor=vec4(mask*texel.rgb,texel.a);
635#elif MASK_FUNCTION == 2
636gl_FragColor=vec4(mask*texture2D(inputBuffer,vUv).rgb,mask);
637#else
638gl_FragColor=mask*texture2D(inputBuffer,vUv);
639#endif
640}`,pS=class extends il{constructor(e=null){super({name:"MaskMaterial",uniforms:{maskTexture:new oq(e),inputBuffer:new oq(null),strength:new oq(1)},blending:0,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:pb,vertexShader:hq}),this.colorChannel=0,this.maskFunction=0}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,1009!==e.type&&(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}},p_=class extends hj{constructor(e,t="inputBuffer"){super("ShaderPass"),this.fullscreenMaterial=e,this.input=t}setInput(e){this.input=e}render(e,t,n,i,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:n),e.render(this.scene,this.camera)}initialize(e,t,n){void 0!==n&&1009!==n&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}},pw=`#ifdef FRAMEBUFFER_PRECISION_HIGH
641uniform mediump sampler2D nearColorBuffer;uniform mediump sampler2D farColorBuffer;
642#else
643uniform lowp sampler2D nearColorBuffer;uniform lowp sampler2D farColorBuffer;
644#endif
645#if MASK_FUNCTION != 1 && MASK_FUNCTION != 2
646uniform lowp sampler2D farCoCBuffer;
647#endif
648uniform 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);
649#if MASK_FUNCTION == 1 || MASK_FUNCTION == 2
650vec2 cocNearFar=vec2(texture2D(nearCoCBuffer,uv).r,colorFar.a);cocNearFar.x=min(cocNearFar.x*scale,1.0);
651#else
652vec2 cocNearFar=vec2(texture2D(nearCoCBuffer,uv).r,texture2D(farCoCBuffer,uv).g);cocNearFar=min(cocNearFar*scale,1.0);colorFar.a*=cocNearFar.y;
653#endif
654vec4 result=inputColor*(1.0-cocNearFar.y)+colorFar;result=mix(result,colorNear,cocNearFar.x);outputColor=result;}`,pM=new e0,pT=class extends h7{constructor(e,{blendFunction:t,worldFocusDistance:n,worldFocusRange:i,focalLength:r,focusDistance:a=n||3,focusRange:s=i||r||2,bokehScale:o=1,resolutionScale:l=.5,width:u,height:c,resolutionX:d=u||h4.AUTO_SIZE,resolutionY:h=c||h4.AUTO_SIZE}={}){super("DepthOfFieldEffect",pw,{blendFunction:t,attributes:1,uniforms:new Map([["nearColorBuffer",new oq(null)],["farColorBuffer",new oq(null)],["nearCoCBuffer",new oq(null)],["farCoCBuffer",new oq(null)],["scale",new oq(1)]])}),this.camera=e,this.renderTarget=new tu(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 p_(new px(e));const p=this.cocMaterial;p.focusDistance=a,p.focusRange=s,this.blurPass=new pi({resolutionScale:l,resolutionX:d,resolutionY:h,kernelSize:2}),this.maskPass=new p_(new pS(this.renderTargetCoC.texture)),this.maskPass.fullscreenMaterial.colorChannel=1,this.maskFunction=3,this.bokehNearBasePass=new p_(new pv(!1,!0)),this.bokehNearBasePass.fullscreenMaterial.cocBuffer=this.renderTargetCoCBlurred.texture,this.bokehNearFillPass=new p_(new pv(!0,!0)),this.bokehNearFillPass.fullscreenMaterial.cocBuffer=this.renderTargetCoCBlurred.texture,this.bokehFarBasePass=new p_(new pv(!1,!1)),this.bokehFarBasePass.fullscreenMaterial.cocBuffer=this.renderTargetCoC.texture,this.bokehFarFillPass=new p_(new pv(!0,!1)),this.bokehFarFillPass.fullscreenMaterial.cocBuffer=this.renderTargetCoC.texture,this.target=null;const f=this.resolution=new h4(this,d,h,l);f.addEventListener("change",e=>
654this.setSize(f.baseWidth,f.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(pM).distanceTo(e)}setDepthTexture(e,t=3200){this.cocMaterial.depthBuffer=e,this.cocMaterial.depthPacking=t}update(e,t,n){let i=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,i),this.bokehFarFillPass.render(e,i,this.renderTargetFar),this.bokehNearBasePass.render(e,t,i),this.bokehNearFillPass.render(e,i,this.renderTargetNear)}setSize(e,t){let n=this.resolution;n.setBaseSize(e,t);let i=n.width,r=n.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(i,r),this.renderTargetNear.setSize(i,r),this.renderTargetCoCBlurred.setSize(i,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,n){this.cocPass.initialize(e,t,n),this.maskPass.initialize(e,t,n),this.bokehNearBasePass.initialize(e,t,n),this.bokehNearFillPass.initialize(e,t,n),this.bokehFarBasePass.initialize(e,t,n),this.bokehFarFillPass.initialize(e,t,n),this.blurPass.initialize(e,t,1009),e.capabilities.logarithmicDepthBuffer&&(this.cocPass.fullscreenMaterial.defines.LOG_DEPTH="1"),void 0!==n&&(this.renderTarget.texture.type=n,this.renderTargetNear.texture.type=n,this.renderTargetFar.texture.type=n,this.renderTargetMasked.texture.type=n,null!==e&&e.outputColorSpace===ey&&(this.renderTarget.texture.colorSpace=ey,this.renderTargetNear.texture.colorSpace=ey,this.renderTargetFar.texture.colorSpace=ey,this.renderTargetMasked.texture.colorSpace=ey))}},pE=`#define QUALITY(q) ((q) < 5 ? 1.0 : ((q) > 5 ? ((q) < 10 ? 2.0 : ((q) < 11 ? 4.0 : 8.0)) : 1.5))
655#define ONE_OVER_TWELVE 0.08333333333333333
656varying 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);
656float 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);}`,pA=`#include <common>
657#include <dithering_pars_fragment>
658#ifdef FRAMEBUFFER_PRECISION_HIGH
659uniform mediump sampler2D inputBuffer;
660#else
661uniform lowp sampler2D inputBuffer;
662#endif
663uniform 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);
664#include <dithering_fragment>
665}`,pC=class extends hj{constructor(e,t,n=null){super("RenderPass",e,t),this.needsSwap=!1,this.clearPass=new hJ,this.overrideMaterialManager=null===n?null:new h3(n),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 h3(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,n,i,r){let a=this.scene,s=this.camera,o=this.selection,l=s.layers.mask,u=a.background,c=e.shadowMap.autoUpdate,d=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(d),null!==this.overrideMaterialManager?this.overrideMaterialManager.render(e,a,s):e.render(a,s),s.layers.mask=l,a.background=u,e.shadowMap.autoUpdate=c}},pP=`#ifdef FRAMEBUFFER_PRECISION_HIGH
666uniform mediump sampler2D map;
667#else
668uniform lowp sampler2D map;
669#endif
670void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){outputColor=texture2D(map,uv);}`,pR=new e0,pI=new tH,pD=new nw,pL=`uniform vec3 scale;uniform vec3 offset;
671#ifdef CUSTOM_INPUT_DOMAIN
672uniform vec3 domainMin;uniform vec3 domainMax;
673#endif
674#ifdef LUT_3D
675#ifdef LUT_PRECISION_HIGH
676#ifdef GL_FRAGMENT_PRECISION_HIGH
677uniform highp sampler3D lut;
678#else
679uniform mediump sampler3D lut;
680#endif
681#else
682uniform lowp sampler3D lut;
683#endif
684vec4 applyLUT(const in vec3 rgb){
685#ifdef TETRAHEDRAL_INTERPOLATION
686vec3 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);
686vec4 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);
687#else
688return texture(lut,rgb);
689#endif
690}
691#else
692#ifdef LUT_PRECISION_HIGH
693#ifdef GL_FRAGMENT_PRECISION_HIGH
694uniform highp sampler2D lut;
695#else
696uniform mediump sampler2D lut;
697#endif
698#else
699uniform lowp sampler2D lut;
700#endif
701vec4 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);
702#ifdef LUT_STRIP_HORIZONTAL
703float 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);
704#else
705float 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);
706#endif
707vec4 sample0=texture2D(lut,uv0);vec4 sample1=texture2D(lut,uv1);return mix(sample0,sample1,abs(centeredInterp));}
708#endif
709void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec3 c=inputColor.rgb;
710#ifdef CUSTOM_INPUT_DOMAIN
711if(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;}
712#else
713#if !defined(LUT_3D) || defined(TETRAHEDRAL_INTERPOLATION)
714c=clamp(c,0.0,1.0);
715#endif
716c=applyLUT(scale*c+offset).rgb;
717#endif
718outputColor=vec4(c,inputColor.a);}`,pF=`void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec3 noise=vec3(rand(uv*(1.0+time)));
719#ifdef PREMULTIPLY
720outputColor=vec4(min(inputColor.rgb*noise,vec3(1.0)),inputColor.a);
721#else
722outputColor=vec4(noise,inputColor.a);
723#endif
724}`,pN=class extends h7{constructor({blendFunction:e=28,premultiply:t=!1}={}){super("NoiseEffect",pF,{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}},pU=`#include <packing>
725#include <clipping_planes_pars_fragment>
726#ifdef GL_FRAGMENT_PRECISION_HIGH
727uniform highp sampler2D depthBuffer;
728#else
729uniform mediump sampler2D depthBuffer;
730#endif
731uniform float cameraNear;uniform float cameraFar;centroid varying float vViewZ;centroid varying vec4 vProjTexCoord;void main(){
732#include <clipping_planes_fragment>
733vec2 projTexCoord=(vProjTexCoord.xy/vProjTexCoord.w)*0.5+0.5;
734#if DEPTH_PACKING == 3201
735float depth=unpackRGBAToDepth(texture2D(depthBuffer,projTexCoord));
736#else
737float depth=texture2D(depthBuffer,projTexCoord).r;
738#endif
739#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH)
740float 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;
741#elif defined(USE_REVERSED_DEPTH_BUFFER)
742depth=1.0-depth;
743#endif
744#ifdef PERSPECTIVE_CAMERA
745float viewZ=perspectiveDepthToViewZ(depth,cameraNear,cameraFar);
746#else
747float viewZ=orthographicDepthToViewZ(depth,cameraNear,cameraFar);
748#endif
749float depthTest=(-vViewZ>-viewZ)?1.0:0.0;gl_FragColor.rg=vec2(0.0,depthTest);}`,pk=`#include <common>
750#include <morphtarget_pars_vertex>
751#include <skinning_pars_vertex>
752#include <clipping_planes_pars_vertex>
753varying float vViewZ;varying vec4 vProjTexCoord;void main(){
754#include <skinbase_vertex>
755#include <begin_vertex>
756#include <morphtarget_vertex>
757#include <skinning_vertex>
758#include <project_vertex>
759vViewZ=mvPosition.z;vProjTexCoord=gl_Position;
760#include <clipping_planes_vertex>
761}`,pB=`uniform lowp sampler2D edgeTexture;uniform lowp sampler2D maskTexture;uniform vec3 visibleEdgeColor;uniform vec3 hiddenEdgeColor;uniform float pulse;uniform float edgeStrength;
762#ifdef USE_PATTERN
763uniform lowp sampler2D patternTexture;varying vec2 vUvPattern;
764#endif
765void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec2 edge=texture2D(edgeTexture,uv).rg;vec2 mask=texture2D(maskTexture,uv).rg;
766#ifndef X_RAY
767edge.y=0.0;
768#endif
769edge*=(edgeStrength*mask.x*pulse);vec3 color=edge.x*visibleEdgeColor+edge.y*hiddenEdgeColor;float visibilityFactor=0.0;
770#ifdef USE_PATTERN
771vec4 patternColor=texture2D(patternTexture,vUvPattern);
772#ifdef X_RAY
773float hiddenFactor=0.5;
774#else
775float hiddenFactor=0.0;
776#endif
777visibilityFactor=(1.0-mask.y>0.0)?1.0:hiddenFactor;visibilityFactor*=(1.0-mask.x)*patternColor.a;color+=visibilityFactor*patternColor.rgb;
778#endif
779float alpha=max(max(edge.x,edge.y),visibilityFactor);
780#ifdef ALPHA
781outputColor=vec4(color,alpha);
782#else
783outputColor=vec4(color,max(alpha,inputColor.a));
784#endif
785}`,pO=`uniform float count;
786#ifdef SCROLL
787uniform float scrollSpeed;
788#endif
789void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){float y=uv.y;
790#ifdef SCROLL
791y+=time*scrollSpeed;
792#endif
793vec2 sl=vec2(sin(y*count),cos(y*count));outputColor=vec4(sl.xyx,inputColor.a);}`,pz=new e0,pH=new e0,pV=`#include <common>
794#include <packing>
795#ifdef GL_FRAGMENT_PRECISION_HIGH
796uniform highp sampler2D depthBuffer0;uniform highp sampler2D depthBuffer1;
797#else
798uniform mediump sampler2D depthBuffer0;uniform mediump sampler2D depthBuffer1;
799#endif
800uniform sampler2D inputBuffer;uniform vec2 cameraNearFar;float getViewZ(const in float depth){
801#ifdef PERSPECTIVE_CAMERA
802return perspectiveDepthToViewZ(depth,cameraNearFar.x,cameraNearFar.y);
803#else
804return orthographicDepthToViewZ(depth,cameraNearFar.x,cameraNearFar.y);
805#endif
806}varying vec2 vUv;void main(){vec2 depth;
807#if DEPTH_PACKING_0 == 3201
808depth.x=unpackRGBAToDepth(texture2D(depthBuffer0,vUv));
809#else
810depth.x=texture2D(depthBuffer0,vUv).r;
811#endif
812#if DEPTH_PACKING_1 == 3201
813depth.y=unpackRGBAToDepth(texture2D(depthBuffer1,vUv));
814#else
815depth.y=texture2D(depthBuffer1,vUv).r;
816#endif
817#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH)
818float 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;
819#elif defined(USE_REVERSED_DEPTH_BUFFER)
820depth.x=1.0-depth.x;depth.y=1.0-depth.y;
821#endif
822bool isMaxDepth=(depth.x==1.0);
823#ifdef PERSPECTIVE_CAMERA
824depth.x=viewZToOrthographicDepth(getViewZ(depth.x),cameraNearFar.x,cameraNearFar.y);depth.y=viewZToOrthographicDepth(getViewZ(depth.y),cameraNearFar.x,cameraNearFar.y);
825#endif
826#if DEPTH_TEST_STRATEGY == 0
827bool keep=depthTest(depth.x,depth.y);
828#elif DEPTH_TEST_STRATEGY == 1
829bool keep=isMaxDepth||depthTest(depth.x,depth.y);
830#else
831bool keep=!isMaxDepth&&depthTest(depth.x,depth.y);
832#endif
833if(keep){gl_FragColor=texture2D(inputBuffer,vUv);}else{discard;}}`,pG=`varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;
834#if EDGE_DETECTION_MODE != 0
835varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;
836#endif
837#if EDGE_DETECTION_MODE == 1
838#include <common>
839#endif
840#if EDGE_DETECTION_MODE == 0 || PREDICATION_MODE == 1
841#ifdef GL_FRAGMENT_PRECISION_HIGH
842uniform highp sampler2D depthBuffer;
843#else
844uniform mediump sampler2D depthBuffer;
845#endif
846float readDepth(const in vec2 uv){
847#if DEPTH_PACKING == 3201
848return unpackRGBAToDepth(texture2D(depthBuffer,uv));
849#else
850return texture2D(depthBuffer,uv).r;
851#endif
852}vec3 gatherNeighbors(){float p=readDepth(vUv);float pLeft=readDepth(vUv0);float pTop=readDepth(vUv1);return vec3(p,pLeft,pTop);}
853#elif PREDICATION_MODE == 2
854uniform 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);}
855#endif
856#if PREDICATION_MODE != 0
857vec2 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);}
858#endif
859#if EDGE_DETECTION_MODE != 0
860uniform sampler2D inputBuffer;
861#endif
862void main(){
863#if EDGE_DETECTION_MODE == 0
864const vec2 threshold=vec2(DEPTH_THRESHOLD);
865#elif PREDICATION_MODE != 0
866vec2 threshold=calculatePredicatedThreshold();
867#else
868const vec2 threshold=vec2(EDGE_THRESHOLD);
869#endif
870#if EDGE_DETECTION_MODE == 0
871vec3 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);
872#elif EDGE_DETECTION_MODE == 1
873float 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);
874#elif EDGE_DETECTION_MODE == 2
875vec4 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);
876#endif
877}`,pj=`uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;
878#if EDGE_DETECTION_MODE != 0
879varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;
880#endif
881void main(){vUv=position.xy*0.5+0.5;vUv0=vUv+texelSize*vec2(-1.0,0.0);vUv1=vUv+texelSize*vec2(0.0,-1.0);
882#if EDGE_DETECTION_MODE != 0
883vUv2=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);
884#endif
885gl_Position=vec4(position.xy,1.0,1.0);}`,pW
vendor: 7,736 bytes, lines 885-910
885=`#define sampleLevelZeroOffset(t, coord, offset) texture2D(t, coord + offset * texelSize)
886#if __VERSION__ < 300
887#define round(v) floor(v + 0.5)
888#endif
889#ifdef FRAMEBUFFER_PRECISION_HIGH
890uniform mediump sampler2D inputBuffer;
891#else
892uniform lowp sampler2D inputBuffer;
893#endif
894uniform 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){
895#if !defined(DISABLE_CORNER_DETECTION)
896vec2 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);
897#endif
898}void detectVerticalCornerPattern(inout vec2 weights,const in vec4 texCoord,const in vec2 d){
899#if !defined(DISABLE_CORNER_DETECTION)
900vec2 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);
901#endif
902}void main(){vec4 weights=vec4(0.0);vec4 subsampleIndices=vec4(0.0);vec2 e=texture2D(inputBuffer,vUv).rg;if(e.g>0.0){
903#if !defined(DISABLE_DIAG_DETECTION)
904weights.rg=calculateDiagWeights(vUv,e,subsampleIndices);if(weights.r==-weights.g){
905#endif
906vec2 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);
907#if !defined(DISABLE_DIAG_DETECTION)
908}else{e.r=0.0;}
909#endif
910}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;}`,
910pX=`#include <common>
911#include <packing>
912uniform vec2 cameraNearFar;
913#define cameraNear cameraNearFar.x
914#define cameraFar cameraNearFar.y
915#ifdef NORMAL_DEPTH
916#ifdef GL_FRAGMENT_PRECISION_HIGH
917uniform highp sampler2D normalDepthBuffer;
918#else
919uniform mediump sampler2D normalDepthBuffer;
920#endif
921float readDepth(const in vec2 uv){float depth=texture2D(normalDepthBuffer,uv).a;
922#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH)
923float 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;
924#endif
925return depth;}
926#else
927uniform lowp sampler2D normalBuffer;
928#if DEPTH_PACKING == 3201
929uniform lowp sampler2D depthBuffer;
930#elif defined(GL_FRAGMENT_PRECISION_HIGH)
931uniform highp sampler2D depthBuffer;
932#else
933uniform mediump sampler2D depthBuffer;
934#endif
935float readDepth(const in vec2 uv){
936#if DEPTH_PACKING == 3201
937float depth=unpackRGBAToDepth(texture2D(depthBuffer,uv));
938#else
939float depth=texture2D(depthBuffer,uv).r;
940#endif
941#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH)
942float 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;
943#endif
944return depth;}
945#endif
946uniform 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){
947#ifdef PERSPECTIVE_CAMERA
948return perspectiveDepthToViewZ(depth,cameraNear,cameraFar);
949#else
950return orthographicDepthToViewZ(depth,cameraNear,cameraFar);
951#endif
952}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);
953#ifdef PERSPECTIVE_CAMERA
954float linearSampleDepth=viewZToOrthographicDepth(viewZ,cameraNear,cameraFar);
955#else
956float linearSampleDepth=sampleDepth;
957#endif
958float 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(){
959#ifdef NORMAL_DEPTH
960vec4 normalDepth=texture2D(normalDepthBuffer,vUv);
961#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH)
962float 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;
963#endif
964#else
965vec4 normalDepth=vec4(texture2D(normalBuffer,vUv).xyz,readDepth(vUv));
966#endif
967float ao=0.0;float depth=normalDepth.a;float viewZ=getViewZ(depth);
968#ifdef PERSPECTIVE_CAMERA
969float linearDepth=viewZToOrthographicDepth(viewZ,cameraNear,cameraFar);
970#else
971float linearDepth=depth;
972#endif
973if(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);
974#ifdef LEGACY_INTENSITY
975ao=clamp(1.0-pow(1.0-ao,abs(intensity)),0.0,1.0);
976#endif
977}gl_FragColor.r=ao;}`,pq=`#include <packing>
978#ifdef GL_FRAGMENT_PRECISION_HIGH
979uniform highp sampler2D depthBuffer;
980#else
981uniform mediump sampler2D depthBuffer;
982#endif
983#ifdef DOWNSAMPLE_NORMALS
984uniform lowp sampler2D normalBuffer;
985#endif
986varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;float readDepth(const in vec2 uv){
987#if DEPTH_PACKING == 3201
988return unpackRGBAToDepth(texture2D(depthBuffer,uv));
989#else
990return texture2D(depthBuffer,uv).r;
991#endif
992}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);
993#ifdef DOWNSAMPLE_NORMALS
994vec3 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;
995#else
996vec3 n[4];n[0]=vec3(0.0);n[1]=vec3(0.0);n[2]=vec3(0.0);n[3]=vec3(0.0);
997#endif
998gl_FragColor=vec4(n[index],d[index]);}`,pY=class extends il{constructor(){super({name:"DepthDownsamplingMaterial",defines:{DEPTH_PACKING:"0"},uniforms:{depthBuffer:new oq(null),normalBuffer:new oq(null),texelSize:new oq(new eQ)},blending:0,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:pq,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=3200){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)}}
998,pZ=class extends hj{constructor({normalBuffer:e=null,resolutionScale:t=.5,width:n=h4.AUTO_SIZE,height:i=h4.AUTO_SIZE,resolutionX:r=n,resolutionY:a=i}={}){super("DepthDownsamplingPass");const s=new pY;s.normalBuffer=e,this.fullscreenMaterial=s,this.needsDepthTexture=!0,this.needsSwap=!1,this.renderTarget=new tu(1,1,{minFilter:1003,magFilter:1003,depthBuffer:!1,type:1015}),this.renderTarget.texture.name="DepthDownsamplingPass.Target",this.renderTarget.texture.generateMipmaps=!1;const o=this.resolution=new h4(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=3200){this.fullscreenMaterial.depthBuffer=e,this.fullscreenMaterial.depthPacking=t}render(e,t,n,i,r){e.setRenderTarget(this.renderToScreen?null:this.renderTarget),e.render(this.scene,this.camera)}setSize(e,t){let n=this.resolution;n.setBaseSize(e,t),this.renderTarget.setSize(n.width,n.height),this.fullscreenMaterial.setSize(e,t)}initialize(e,t,n){let i=e.getContext();if(!(i.getExtension("EXT_color_buffer_float")||i.getExtension("EXT_color_buffer_half_float")))throw Error("Rendering to float texture is not supported.")}},pK=`uniform lowp sampler2D aoBuffer;uniform float luminanceInfluence;uniform float intensity;
999#if defined(DEPTH_AWARE_UPSAMPLING) && defined(NORMAL_DEPTH)
1000#ifdef GL_FRAGMENT_PRECISION_HIGH
1001uniform highp sampler2D normalDepthBuffer;
1002#else
1003uniform mediump sampler2D normalDepthBuffer;
1004#endif
1005#endif
1006#ifdef COLORIZE
1007uniform vec3 color;
1008#endif
1009void mainImage(const in vec4 inputColor,const in vec2 uv,const in float depth,out vec4 outputColor){float aoLinear=texture2D(aoBuffer,uv).r;
1010#if defined(DEPTH_AWARE_UPSAMPLING) && defined(NORMAL_DEPTH) && __VERSION__ == 300
1011vec4 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);
1012#else
1013float ao=aoLinear;
1014#endif
1015float l=luminance(inputColor.rgb);ao=mix(ao,0.0,l*luminanceInfluence);ao=clamp(ao*intensity,0.0,1.0);
1016#ifdef COLORIZE
1017outputColor=vec4(1.0-ao*(1.0-color),inputColor.a);
1018#else
1019outputColor=vec4(vec3(1.0-ao),inputColor.a);
1020#endif
1021}`,pJ=`#ifdef TEXTURE_PRECISION_HIGH
1022uniform mediump sampler2D map;
1023#else
1024uniform lowp sampler2D map;
1025#endif
1026varying vec2 vUv2;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){
1027#ifdef UV_TRANSFORM
1028vec4 texel=texture2D(map,vUv2);
1029#else
1030vec4 texel=texture2D(map,uv);
1031#endif
1032outputColor=TEXEL;outputColor.a=max(inputColor.a,outputColor.a);}`,pQ=`#ifdef ASPECT_CORRECTION
1033uniform float scale;
1034#else
1035uniform mat3 uvTransform;
1036#endif
1037varying vec2 vUv2;void mainSupport(const in vec2 uv){
1038#ifdef ASPECT_CORRECTION
1039vUv2=uv*vec2(aspect,1.0)*scale;
1040#else
1041vUv2=(uvTransform*vec3(uv,1.0)).xy;
1042#endif
1043}`,p$=`#ifdef FRAMEBUFFER_PRECISION_HIGH
1044uniform mediump sampler2D inputBuffer;
1045#else
1046uniform lowp sampler2D inputBuffer;
1047#endif
1048uniform 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;
1049#include <colorspace_fragment>
1050}`,p0=`#ifdef FRAMEBUFFER_PRECISION_HIGH
1051uniform mediump sampler2D map;
1052#else
1053uniform lowp sampler2D map;
1054#endif
1055uniform 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);}`,p1=`#include <packing>
1056#define packFloatToRGBA(v) packDepthToRGBA(v)
1057#define unpackRGBAToFloat(v) unpackRGBAToDepth(v)
1058uniform lowp sampler2D luminanceBuffer0;uniform lowp sampler2D luminanceBuffer1;uniform float minLuminance;
1058uniform float deltaTime;uniform float tau;varying vec2 vUv;void main(){float l0=unpackRGBAToFloat(texture2D(luminanceBuffer0,vUv));
1059#if __VERSION__ < 300
1060float l1=texture2DLodEXT(luminanceBuffer1,vUv,MIP_LEVEL_1X1).r;
1061#else
1062float l1=textureLod(luminanceBuffer1,vUv,MIP_LEVEL_1X1).r;
1063#endif
1064l0=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);}`,p2=`#include <tonemapping_pars_fragment>
1065uniform float whitePoint;
1066#if TONE_MAPPING_MODE == 2 || TONE_MAPPING_MODE == 3
1067uniform float middleGrey;
1068#if TONE_MAPPING_MODE == 3
1069uniform lowp sampler2D luminanceBuffer;
1070#else
1071uniform float averageLuminance;
1072#endif
1073vec3 Reinhard2ToneMapping(vec3 color){color*=toneMappingExposure;float l=luminance(color);
1074#if TONE_MAPPING_MODE == 3
1075float lumAvg=unpackRGBAToFloat(texture2D(luminanceBuffer,vec2(0.5)));
1076#else
1077float lumAvg=averageLuminance;
1078#endif
1079float 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);}
1080#elif TONE_MAPPING_MODE == 4
1081#define A 0.15
1082#define B 0.50
1083#define C 0.10
1084#define D 0.20
1085#define E 0.02
1086#define F 0.30
1087vec3 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);}
1088#endif
1089void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){
1090#if TONE_MAPPING_MODE == 2 || TONE_MAPPING_MODE == 3
1091outputColor=vec4(Reinhard2ToneMapping(inputColor.rgb),inputColor.a);
1092#elif TONE_MAPPING_MODE == 4
1093outputColor=vec4(Uncharted2ToneMapping(inputColor.rgb),inputColor.a);
1094#else
1095outputColor=vec4(toneMapping(inputColor.rgb),inputColor.a);
1096#endif
1097}`,p3=`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;
1098#if VIGNETTE_TECHNIQUE == 0
1099float d=distance(uv,center);color*=smoothstep(0.8,offset*0.799,d*(darkness+offset));
1100#else
1101vec2 coord=(uv-center)*vec2(offset);color=mix(color,vec3(1.0-darkness),dot(coord,coord));
1102#endif
1103outputColor=vec4(color,inputColor.a);}`,p4=`#include <packing>
1104varying vec2 vUv;
1105#ifdef NORMAL_DEPTH
1106#ifdef GL_FRAGMENT_PRECISION_HIGH
1107uniform highp sampler2D normalDepthBuffer;
1108#else
1109uniform mediump sampler2D normalDepthBuffer;
1110#endif
1111float readDepth(const in vec2 uv){return texture2D(normalDepthBuffer,uv).a;}
1112#else
1113#if INPUT_DEPTH_PACKING == 3201
1114uniform lowp sampler2D depthBuffer;
1115#elif defined(GL_FRAGMENT_PRECISION_HIGH)
1116uniform highp sampler2D depthBuffer;
1117#else
1118uniform mediump sampler2D depthBuffer;
1119#endif
1120float readDepth(const in vec2 uv){
1121#if INPUT_DEPTH_PACKING == 3201
1122return unpackRGBAToDepth(texture2D(depthBuffer,uv));
1123#else
1124return texture2D(depthBuffer,uv).r;
1125#endif
1126}
1127#endif
1128void main(){
1129#if INPUT_DEPTH_PACKING == OUTPUT_DEPTH_PACKING
1130gl_FragColor=texture2D(depthBuffer,vUv);
1131#else
1132float depth=readDepth(vUv);
1133#if OUTPUT_DEPTH_PACKING == 3201
1134gl_FragColor=(depth==1.0)?vec4(1.0):packDepthToRGBA(depth);
1135#else
1136gl_FragColor=vec4(vec3(depth),1.0);
1137#endif
1138#endif
1139}`,p5=`varying vec2 vUv;
1140#if DEPTH_COPY_MODE == 1
1141uniform vec2 texelPosition;
1142#endif
1143void main(){
1144#if DEPTH_COPY_MODE == 1
1145vUv=texelPosition;
1146#else
1147vUv=position.xy*0.5+0.5;
1148#endif
1149gl_Position=vec4(position.xy,1.0,1.0);}`,p6=class extends il{constructor(){super({name:"DepthCopyMaterial",defines:{INPUT_DEPTH_PACKING:"0",OUTPUT_DEPTH_PACKING:"0",DEPTH_COPY_MODE:"0"},uniforms:{depthBuffer:new oq(null),texelPosition:new oq(new eQ)},blending:0,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:p4,vertexShader:p5}),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=3200){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}},p8=`#include <common>
1150#include <packing>
1151#include <dithering_pars_fragment>
1152#define packFloatToRGBA(v) packDepthToRGBA(v)
1153#define unpackRGBAToFloat(v) unpackRGBAToDepth(v)
1154#ifdef FRAMEBUFFER_PRECISION_HIGH
1155uniform mediump sampler2D inputBuffer;
1156#else
1157uniform lowp sampler2D inputBuffer;
1158#endif
1159#if DEPTH_PACKING == 3201
1160uniform lowp sampler2D depthBuffer;
1161#elif defined(GL_FRAGMENT_PRECISION_HIGH)
1162uniform highp sampler2D depthBuffer;
1163#else
1164uniform mediump sampler2D depthBuffer;
1165#endif
1166uniform 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){
1167#if DEPTH_PACKING == 3201
1168float depth=unpackRGBAToDepth(texture2D(depthBuffer,uv));
1169#else
1170float depth=texture2D(depthBuffer,uv).r;
1171#endif
1172#if defined(USE_LOGARITHMIC_DEPTH_BUFFER) || defined(LOG_DEPTH)
1173float 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;
1174#elif defined(USE_REVERSED_DEPTH_BUFFER)
1175depth=1.0-depth;
1176#endif
1177return depth;}float getViewZ(const in float depth){
1178#ifdef PERSPECTIVE_CAMERA
1179return perspectiveDepthToViewZ(depth,cameraNear,cameraFar);
1180#else
1181return orthographicDepthToViewZ(depth,cameraNear,cameraFar);
1182#endif
1183}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;
1184#ifdef ENCODE_OUTPUT
1185#include <colorspace_fragment>
1186#endif
1187#include <dithering_fragment>
1188}`,p9=class extends il{constructor(e,t,n,i,r=!1){super({name:"EffectMaterial",defines:{THREE_REVISION:"182".replace(/\D+/g,""),DEPTH_PACKING:"0",ENCODE_OUTPUT:"1"},uniforms:{inputBuffer:new oq(null),depthBuffer:new oq(null),resolution:new oq(new eQ),texelSize:new oq(new eQ),cameraNear:new oq(.3),cameraFar:new oq(1e3),aspect:ne
1188w oq(1),time:new oq(0)},blending:0,toneMapped:!1,depthWrite:!1,depthTest:!1,dithering:r}),e&&this.setShaderParts(e),t&&this.setDefines(t),n&&this.setUniforms(n),this.copyCameraSettings(i)}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=3200){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=p8.replace(h0.FRAGMENT_HEAD,e.get(h0.FRAGMENT_HEAD)||"").replace(h0.FRAGMENT_MAIN_UV,e.get(h0.FRAGMENT_MAIN_UV)||"").replace(h0.FRAGMENT_MAIN_IMAGE,e.get(h0.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(h0.VERTEX_HEAD,e.get(h0.VERTEX_HEAD)||"").replace(h0.VERTEX_MAIN_SUPPORT,e.get(h0.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 ip?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}setSize(e,t){let n=this.uniforms;n.resolution.value.set(e,t),n.texelSize.value.set(1/e,1/t),n.aspect.value=e/t}static get Section(){return h0}},p7=class extends hj{constructor({depthPacking:e=3201}={}){super("DepthCopyPass");const t=new p6;t.outputDepthPacking=e,this.fullscreenMaterial=t,this.needsDepthTexture=!0,this.needsSwap=!1,this.renderTarget=new tu(1,1,{type:3201===e?1009:1015,minFilter:1003,magFilter:1003,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=3200){this.fullscreenMaterial.depthBuffer=e,this.fullscreenMaterial.inputDepthPacking=t}render(e,t,n,i,r){e.setRenderTarget(this.renderToScreen?null:this.renderTarget),e.render(this.scene,this.camera)}setSize(e,t){this.renderTarget.setSize(e,t)}},fe=Number("182".replace(/\D+/g,"")),ft=255/256,fn=new Float32Array([255/256/0x1000000,255/256/65536,255/256/256,255/256]),fi=new Float32Array([ft,ft/256,ft/65536,1/0x1000000]),fr=class extends p7{constructor({depthPacking:e=3201,mode:t=1}={}){if(3201!==e&&3200!==e)throw Error(`Unsupported depth packing: ${e}`);super({depthPacking:e}),this.name="DepthPickingPass",this.fullscreenMaterial.mode=t,this.pixelBuffer=3201===e?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,n,i,r){let a=this.fullscreenMaterial,s=a.mode;if(0===s&&super.render(e),null!==this.callback){let t,n=this.renderTarget,i=this.pixelBuffer,r=1015!==n.texture.type,o=0,l=0;if(1===s)super.render(e);else{let e=a.texelPosition;o=Math.round(e.x*n.width),l=Math.round(e.y*n.height)}e.readRenderTargetPixels(n,o,l,1,1,i),this.callback(r?(t=fe>=167?fi:fn,(i[0]*t[0]+i[1]*t[1]+i[2]*t[2]+i[3]*t[3])/255):i[0]),this.callback=null}}setSize(e,t){0===this.fullscreenMaterial.mode&&super.setSize(e,t)}};function fa(e,t,n){for(let i of t){let t="$1"+e+i.charAt(0).toUpperCase()+i.slice(1),r=RegExp("([^\\.])(\\b"+i+"\\b)","g");for(let e of n.entries())null!==e[1]&&n.set(e[0],e[1].replace(r,t))}}var fs=class extends hj{constructor(e,...t){super("EffectPass"),this.fullscreenMaterial=new p9(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)=>
1188t.attributes-e.attributes),this.effects))t.addEventListener("change",this.listener)}updateMaterial(){let e=new h1,t=0;for(let n of this.effects)if(9===n.blendMode.blendFunction)e.attributes|=1&n.getAttributes();else if((e.attributes&n.getAttributes()&2)!=0)throw Error(`Convolution effects cannot be merged (${n.name})`);else!function(e,t,n){let i=t.getFragmentShader(),r=t.getVertexShader(),a=void 0!==i&&/mainImage/.test(i),s=void 0!==i&&/mainUv/.test(i);if(n.attributes|=t.getAttributes(),void 0===i)throw Error(`Missing fragment shader (${t.name})`);if(s&&(2&n.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=n.shaderParts,u=l.get(h0.FRAGMENT_HEAD)||"",c=l.get(h0.FRAGMENT_MAIN_UV)||"",d=l.get(h0.FRAGMENT_MAIN_IMAGE)||"",h=l.get(h0.VERTEX_HEAD)||"",p=l.get(h0.VERTEX_MAIN_SUPPORT)||"",f=new Set,m=new Set;if(s&&(c+=`	${e}MainUv(UV);
1189`,n.uvTransformation=!0),null!==r&&/mainSupport/.test(r)){let t=/mainSupport *\([\w\s]*?uv\s*?\)/.test(r);for(let i of(p+=`	${e}MainSupport(`,p+=t?"vUv);\n":");\n",r.matchAll(/(?:varying\s+\w+\s+([\S\s]*?);)/g)))for(let e of i[1].split(/\s*,\s*/))n.varyings.add(e),f.add(e),m.add(e);for(let e of r.matchAll(o))m.add(e[1])}for(let e of i.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.forEac
1189h((t,i)=>n.uniforms.set(e+i.charAt(0).toUpperCase()+i.slice(1),t)),t.defines.forEach((t,i)=>n.defines.set(e+i.charAt(0).toUpperCase()+i.slice(1),t));let g=new Map([["fragment",i],["vertex",r]]);fa(e,m,n.defines),fa(e,m,g),i=g.get("fragment"),r=g.get("vertex");let v=t.blendMode;if(n.blendModes.set(v.blendFunction,v),a){null!==t.inputColorSpace&&t.inputColorSpace!==n.colorSpace&&(d+=t.inputColorSpace===ey?"color0 = sRGBTransferOETF(color0);\n	":"color0 = sRGBToLinear(color0);\n	"),""!==t.outputColorSpace?n.colorSpace=t.outputColorSpace:null!==t.inputColorSpace&&(n.colorSpace=t.inputColorSpace),d+=`${e}MainImage(color0, UV, `,(1&n.attributes)!=0&&/MainImage *\([\w\s,]*?depth[\w\s,]*?\)/.test(i)&&(d+="depth, ",n.readDepth=!0),d+="color1);\n	";let r=e+"BlendOpacity";n.uniforms.set(r,v.opacity),d+=`color0 = blend${v.blendFunction}(color0, color1, ${r});
1190
1191	`,u+=`uniform float ${r};
1192
1193`}if(u+=i+"\n",null!==r&&(h+=r+"\n"),l.set(h0.FRAGMENT_HEAD,u),l.set(h0.FRAGMENT_MAIN_UV,c),l.set(h0.FRAGMENT_MAIN_IMAGE,d),l.set(h0.VERTEX_HEAD,h),l.set(h0.VERTEX_MAIN_SUPPORT,p),null!==t.extensions)for(let e of t.extensions)n.extensions.add(e)}else throw Error(`Could not find mainImage or mainUv function (${t.name})`)}("e"+t++,n,e);let n=e.shaderParts.get(h0.FRAGMENT_HEAD),i=e.shaderParts.get(h0.FRAGMENT_MAIN_IMAGE),r=e.shaderParts.get(h0.FRAGMENT_MAIN_UV),a=/\bblend\b/g;for(let t of e.blendModes.values())n+=t.getShaderCode().replace(a,`blend${t.blendFunction}`)+"\n";for(let[t,a]of((1&e.attributes)!=0?(e.readDepth&&(i="float depth = readDepth(UV);\n\n	"+i),this.needsDepthTexture=null===this.getDepthTexture()):this.needsDepthTexture=!1,e.colorSpace===ey&&(i+="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(h0.FRAGMENT_HEAD,n),e.shaderParts.set(h0.FRAGMENT_MAIN_IMAGE,i),e.shaderParts.set(h0.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=3200){for(let n of(this.fullscreenMaterial.depthBuffer=e,this.fullscreenMaterial.depthPacking=t,this.effects))n.setDepthTexture(e,t)}render(e,t,n,i,r){for(let n of this.effects)n.update(e,t,i);if(!this.skipRendering||this.renderToScreen){let r=this.fullscreenMaterial;r.inputBuffer=t.texture,r.time+=i*this.timeScale,e.setRenderTarget(this.renderToScreen?null:n),e.render(this.scene,this.camera)}}setSize(e,t){for(let n of(this.fullscreenMaterial.setSize(e,t),this.effects))n.setSize(e,t)}initialize(e,t,n){for(let i of(this.renderer=e,this.effects))i.initialize(e,t,n);this.updateMaterial(),void 0!==n&&1009!==n&&(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()}},fo=class extends hj{constructor(e,t,{renderTarget:n,resolutionScale:i=1,width:r=h4.AUTO_SIZE,height:a=h4.AUTO_SIZE,resolutionX:s=r,resolutionY:o=a}={}){super("NormalPass"),this.needsSwap=!1,this.renderPass=new pC(e,t,new sh);const l=this.renderPass;l.ignoreBackground=!0,l.skipShadowMapUpdate=!0;const u=l.getClearPass();u.overrideClearColor=new nw(7829503),u.overrideClearAlpha=1,this.renderTarget=n,void 0===this.renderTarget&&(this.renderTarget=new tu(1,1,{minFilter:1003,magFilter:1003}),this.renderTarget.texture.name="NormalPass.Target");const c=this.resolution=new h4(this,s,o,i);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,n,i,r){let a=this.renderToScreen?null:this.renderTarget;this.renderPass.render(e,a,a)}setSize(e,t){let n=this.resolution;n.setBaseSize(e,t),this.renderTarget.setSize(n.width,n.height)}};function fl(e,t,n,i){var r;return(r=e+(t-e)*.75)+(n+(i-n)*.75-r)*.875}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]),fl(0,0,0,0),new Float32Array([0,0,0,0]),fl(0,0,0,1),new Float32Array([0,0,0,1]),fl(0,0,1,0),new Float32Array([0,0,1,0]),fl(0,0,1,1),new Float32Array([0,0,1,1]),fl(0,1,0,0),new Float32Array([0,1,0,0]),fl(0,1,0,1),new Float32Array([0,1,0,1]),fl(0,1,1,0),new Float32Array([0,1,1,0]),fl(0,1,1,1),new Float32Array([0,1,1,1]),fl(1,0,0,0),new Float32Array([1,0,0,0]),fl(1,0,0,1),new Float32Array([1,0,0,1]),fl(1,0,1,0),new Float32Array([1,0,1,0]),fl(1,0,1,1),new Float32Array([1,0,1,1]),fl(1,1,0,0),new Float32Array([1,1,0,0]),fl(1,1,0,1),new Float32Array([1,1,0,1]),fl(1,1,1,0),new Float32Array([1,1,1,0]),fl(1,1,1,1),new Float32Array([1,1,1,1]);function fu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function fc(e,t){if(e){if("string"==typeof e)return fu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fu(e,t)}}function fd(e){return function(e){if(Array.isArray(e))return fu(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||fc(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 eQ,new eQ;var fh=function(e){return 1/(1+e+.48*e*e+.235*e*e*e)};function fp(e,t,n){var i=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]:fh,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]-n)<=o)return e[t]=n,!1;var u=2/(i=Math.max(1e-4,i)),c=s(u*r),d=e[t]-n,h=n,p=a*i;d=Math.min(Math.max(d,-p),p),n=e[t]-d;var f=(e.__damp[l]+u*d)*r;e.__damp[l]=(e.__damp[l]-u*f)*c;var m=n+(d+f)*c;return h-e[t]>0==m>h&&(m=h,e.__damp[l]=(m-h)/r),e[t]=m,!0}function ff(e,t,n,i,r,a,s,o){var l,u,c,d;return fp(e,t,e[t]+(c=(l=n-e[t])-Math.floor(l/(u=2*Math.PI))*u,(d=Math.max(0,Math.min(u,c)))>Math.PI&&(d-=2*Math.PI),d),i,r,a,s,o)}
1193var fm=new eQ,fg=new e0;function fv(e,t,n,i,r,a,s){return"number"==typeof t?fg.setScalar(t):Array.isArray(t)?fg.set(t[0],t[1],t[2]):fg.copy(t),O=fp(e,"x",fg.x,n,i,r,a,s),z=fp(e,"y",fg.y,n,i,r,a,s),H=fp(e,"z",fg.z,n,i,r,a,s),O||z||H}var fy=new to,fx=new tJ,fb=new nw,fS=new e$,f_=new to,fw=new to,fM=new to;function fT(e,t,n,i,r,a,s){Array.isArray(t)?fS.set(t[0],t[1],t[2],t[3]):fS.copy(t);var o=e.dot(fS)>0?1:-1;return fS.x*=o,fS.y*=o,fS.z*=o,fS.w*=o,Q=fp(e,"x",fS.x,n,i,r,a,s),$=fp(e,"y",fS.y,n,i,r,a,s),ee=fp(e,"z",fS.z,n,i,r,a,s),et=fp(e,"w",fS.w,n,i,r,a,s),f_.set(e.x,e.y,e.z,e.w).normalize(),fw.set(e.__damp.velocity_x,e.__damp.velocity_y,e.__damp.velocity_z,e.__damp.velocity_w),fM.copy(f_).multiplyScalar(fw.dot(f_)/f_.dot(f_)),e.__damp.velocity_x-=fM.x,e.__damp.velocity_y-=fM.y,e.__damp.velocity_z-=fM.z,e.__damp.velocity_w-=fM.w,e.set(f_.x,f_.y,f_.z,f_.w),Q||$||ee||et}var fE=new o4,fA=new tH,fC=new e0,fP=new e$,fR=new e0,fI=Object.freeze({__proto__:null,rsqw:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.01,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/(2*Math.PI);return n/Math.atan(1/t)*Math.atan(Math.sin(2*Math.PI*e*i)/t)},exp:fh,damp:fp,dampAngle:ff,damp2:function(e,t,n,i,r,a,s){return"number"==typeof t?fm.setScalar(t):Array.isArray(t)?fm.set(t[0],t[1]):fm.copy(t),k=fp(e,"x",fm.x,n,i,r,a,s),B=fp(e,"y",fm.y,n,i,r,a,s),k||B},damp3:fv,damp4:function(e,t,n,i,r,a,s){return"number"==typeof t?fy.setScalar(t):Array.isArray(t)?fy.set(t[0],t[1],t[2],t[3]):fy.copy(t),V=fp(e,"x",fy.x,n,i,r,a,s),G=fp(e,"y",fy.y,n,i,r,a,s),j=fp(e,"z",fy.z,n,i,r,a,s),W=fp(e,"w",fy.w,n,i,r,a,s),V||G||j||W},dampE:function(e,t,n,i,r,a,s){return Array.isArray(t)?fx.set(t[0],t[1],t[2],t[3]):fx.copy(t),X=ff(e,"x",fx.x,n,i,r,a,s),q=ff(e,"y",fx.y,n,i,r,a,s),Y=ff(e,"z",fx.z,n,i,r,a,s),X||q||Y},dampC:function(e,t,n,i,r,a,s){return t instanceof nw?fb.copy(t):Array.isArray(t)?fb.setRGB(t[0],t[1],t[2]):fb.set(t),Z=fp(e,"r",fb.r,n,i,r,a,s),K=fp(e,"g",fb.g,n,i,r,a,s),J=fp(e,"b",fb.b,n,i,r,a,s),Z||K||J},dampQ:fT,dampS:function(e,t,n,i,r,a,s){return Array.isArray(t)?fE.set(t[0],t[1],t[2]):fE.copy(t),en=fp(e,"radius",fE.radius,n,i,r,a,s),ei=ff(e,"phi",fE.phi,n,i,r,a,s),er=ff(e,"theta",fE.theta,n,i,r,a,s),en||ei||er},dampM:function(e,t,n,i,r,a,s){return void 0===e.__damp&&(e.__damp={position:new e0,rotation:new e$,scale:new e0},e.decompose(e.__damp.position,e.__damp.rotation,e.__damp.scale)),Array.isArray(t)?fA.set.apply(fA,fd(t)):fA.copy(t),fA.decompose(fC,fP,fR),ea=fv(e.__damp.position,fC,n,i,r,a,s),es=fT(e.__damp.rotation,fP,n,i,r,a,s),eo=fv(e.__damp.scale,fR,n,i,r,a,s),e.compose(e.__damp.position,e.__damp.rotation,e.__damp.scale),ea||es||eo}});new s6(-1,1,1,-1,0,1),new class extends nQ{constructor(){super(),this.setAttribute("position",new nj([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new nj([0,2,0,0,2,0],2))}};class fD extends nQ{boundingSphere=new tD;constructor(){super(),this.setAttribute("position",new nN(new Float32Array([-1,-1,3,-1,-1,3]),2)),this.setAttribute("uv",new nN(new Float32Array([0,0,2,0,0,2]),2))}computeBoundingSphere(){}}Uint8Array.from(atob("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"),e=>e.charCodeAt(0)),parseInt("182".replace(/\D+/g,""));let fL=(0,ec.createContext)(null),fF=e=>(2&e.getAttributes())==2,fN=(0,ec.memo)((0,ec.forwardRef)(({children:e,camera:t,scene:n,resolutionScale:i,enabled:r=!0,renderPri
1193ority:a=1,autoClear:s=!0,depthBuffer:o,enableNormalPass:l,stencilBuffer:u,multisampling:c=8,frameBufferType:d=ev},h)=>{let{gl:p,scene:f,camera:m,size:g}=dX(),v=n||f,y=t||m,[x,b,S]=(0,ec.useMemo)(()=>{let e=new h$(p,{depthBuffer:o,stencilBuffer:u,multisampling:c,frameBufferType:d});e.addPass(new pC(v,y));let t=null,n=null;return l&&((n=new fo(v,y)).enabled=!1,e.addPass(n),void 0!==i&&((t=new pZ({normalBuffer:n.texture,resolutionScale:i})).enabled=!1,e.addPass(t))),[e,n,t]},[y,p,o,u,c,d,v,l,i]);(0,ec.useEffect)(()=>x?.setSize(g.width,g.height),[x,g]),dq((e,t)=>{if(r){let e=p.autoClear;p.autoClear=s,u&&!s&&p.clearStencil(),x.render(t),p.autoClear=e}},r?a:0);let _=(0,ec.useRef)(null);(0,ec.useLayoutEffect)(()=>{let e=[],t=_.current.__r3f;if(t&&x){let n=t.children;for(let t=0;t<n.length;t++){let i=n[t].object;if(i instanceof h7){let r=[i];if(!fF(i)){let e=null;for(;(e=n[t+1]?.object)instanceof h7&&!fF(e);)r.push(e),t++}let a=new fs(y,...r);e.push(a)}else i instanceof hj&&e.push(i)}for(let t of e)x?.addPass(t);b&&(b.enabled=!0),S&&(S.enabled=!0)}return()=>{for(let t of e)x?.removePass(t);b&&(b.enabled=!1),S&&(S.enabled=!1)}},[x,e,y,b,S]),(0,ec.useEffect)(()=>{let e=p.toneMapping;return p.toneMapping=0,()=>{p.toneMapping=e}},[p]);let w=(0,ec.useMemo)(()=>({composer:x,normalPass:b,downSamplingPass:S,resolutionScale:i,camera:y,scene:v}),[x,b,S,i,y,v]);return(0,ec.useImperativeHandle)(h,()=>x,[x]),(0,eu.jsx)(fL.Provider,{value:w,children:(0,eu.jsx)("group",{ref:_,children:e})})})),fU=0,fk=new WeakMap,fB=(e,t)=>function({blendFunction:n=t?.blendFunction,opacity:i=t?.opacity,...r}){let a=fk.get(e);if(!a){let t=`@react-three/postprocessing/${e.name}-${fU++}`;d4({[t]:e}),fk.set(e,a=t)}let s=dX(e=>e.camera),o=ec.default.useMemo(()=>[...t?.args??[],...r.args??[{...t,...r}]],[JSON.stringify(r)]);return(0,eu.jsx)(a,{camera:s,"blendMode-blendFunction":n,"blendMode-opacity-value":i,...r,args:o})},fO=(0,ec.forwardRef)(function({blendFunction:e,worldFocusDistance:t,worldFocusRange:n,focusDistance:i,focusRange:r,focalLength:a,bokehScale:s,resolutionScale:o,resolutionX:l,resolutionY:u,width:c,height:d,target:h,depthTexture:p,...f},m){let{camera:g}=(0,ec.useContext)(fL),v=null!=h,y=(0,ec.useMemo)(()=>{let h=new pT(g,{blendFunction:e,worldFocusDistance:t,worldFocusRange:n,focusDistance:i,focusRange:r,focalLength:a,bokehScale:s,resolutionScale:o,resolutionX:l,resolutionY:u,width:c,height:d});return v&&(h.target=new e0),p&&h.setDepthTexture(p.texture,p.packing),h.maskPass.maskFunction=2,h},[g,e,t,n,i,r,a,s,o,l,u,c,d,v,p]);return(0,ec.useEffect)(()=>()=>{y.dispose()},[y]),(0,eu.jsx)("primitive",{...f,ref:m,object:y,target:h})}),fz=(({target:e,mouse:t=!1,debug:n,manual:i=!1,smoothTime:r=.25,...a},s)=>{var o;let l=(0,ec.useRef)(null),u=(0,ec.useRef)(null),c=(0,ec.useRef)(null),d=dX(({scene:e})=>e),h=dX(({pointer:e})=>e),{composer:p,camera:f}=(0,ec.useContext)(fL),[m]=(0,ec.useState)(()=>new fr),[g]=(0,ec.useState)(()=>new hZ);(0,ec.useEffect)(()=>(p.addPass(m),p.addPass(g),()=>{p.removePass(m),p.removePass(g)}),[p,m,g]),(0,ec.useEffect)(()=>()=>{m.dispose(),g.dispose()},[m,g]);let[v]=(0,ec.useState)(()=>new e0(0,0,0)),[y]=(0,ec.useState)(()=>new e0(0,0,0)),x=(0,ec.useCallback)(async(e,t)=>(y.x=e,y.y=t,y.z=await m.readDepth(y),y.z=2*y.z-1,1-y.z>1e-7&&y.unproject(f)),[y,m,f]),b=(0,ec.useCallback)(async(n,i=!0)=>{if(e)v.set(...e);else{let{x:e,y:n}=t?h:{x:0,y:0},i=await x(e,n);i&&v.copy(i)}i&&l.current?.target&&(r>0&&n>0?fI.damp3(l.current.target,v,r,n):l.current.target.copy(v))},[e,v,t,x,r,h]);dq(async(e,t)=>{i||b(t),u.current&&u.current.position.copy(v),c.current&&l.current?.target&&c.current.position.copy(l.current.target)});let S=(0,ec.useMemo)(()=>({dofRef:l,hitpoint:v,update:b}),[v,b]);return(0,ec.useImperativeHandle)(s,()=>S,[S]),(0,eu.jsxs)(eu.Fragment,{children:[n?(o=(0,eu.jsxs)(eu.Fragment,{children:[(0,eu.jsxs)("mesh",{ref:u,children:[(0,eu.jsx)("sphereGeometry",{args:[n,16,16]}),(0,eu.jsx)("meshBasicMaterial",{color:"#00ff00",opacity:1,transparent:!0,depthWrite:!1})]}),(0,eu.jsxs)("mesh",{ref:c,children:[(0,eu.jsx)("sphereGeometry",{args:[n/2,16,16]}),(0,eu.jsx)("meshBasicMaterial",{color:"#00ff00",opacity:.5,transparent:!0,depthWrite:!1})]})]}),(0,eu.jsx)(hd,{children:o,container:d,state:void 0})):null,(0,eu.jsx)(fO,{ref:l,...a,target:v})]})},fB(pp,{blendFunction:0})),fH=fB(pN,{blendFunction:5});var fV=((A=fV||{})[A.Linear=0]="Linear",A[A.Radial=1]="Radial",A[A.MirroredLinear=2]="MirroredLinear",A);
1193let fG=[{id:"orion",name:"Orion",stars:[{x:.12,y:.78,magnitude:.5},{x:-.18,y:.75,magnitude:1.6},{x:-.04,y:.52,magnitude:1.7},{x:0,y:.47,magnitude:1.7},{x:.04,y:.42,magnitude:2.2},{x:-.12,y:.15,magnitude:.1},{x:.14,y:.12,magnitude:2.1},{x:.22,y:.92,magnitude:3.4},{x:0,y:.45,magnitude:3.6},{x:.02,y:.32,magnitude:4}],lines:[[7,0],[0,1],[0,2],[1,2],[2,3],[3,4],[4,6],[2,5],[0,4],[1,5],[8,9]]},{id:"ursa_major",name:"Ursa Major",stars:[{x:-.65,y:.15,magnitude:1.8},{x:-.5,y:.2,magnitude:2.4},{x:-.3,y:.25,magnitude:2.4},{x:-.15,y:.3,magnitude:3.3},{x:.05,y:.35,magnitude:1.8},{x:.25,y:.32,magnitude:2.3},{x:.45,y:.25,magnitude:1.9},{x:-.72,y:-.05,magnitude:3.1},{x:-.8,y:-.2,magnitude:3.5},{x:-.4,y:-.15,magnitude:3.4},{x:-.15,y:-.1,magnitude:3.3},{x:-.05,y:-.3,magnitude:3.5},{x:-.5,y:-.3,magnitude:3.6}],lines:[[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],[0,7],[7,8],[1,9],[9,10],[10,11],[2,12]]},{id:"cassiopeia",name:"Cassiopeia",stars:[{x:-.6,y:.15,magnitude:2.2},{x:-.3,y:-.1,magnitude:2.3},{x:0,y:.2,magnitude:2.5},{x:.28,y:-.05,magnitude:2.7},{x:.55,y:.1,magnitude:3.4}],lines:[[0,1],[1,2],[2,3],[3,4]]},{id:"leo",name:"Leo",stars:[{x:-.55,y:.55,magnitude:1.4},{x:-.4,y:.7,magnitude:2.6},{x:-.2,y:.8,magnitude:2},{x:-.05,y:.85,magnitude:3},{x:.05,y:.75,magnitude:3.4},{x:.2,y:.6,magnitude:3.3},{x:.5,y:.4,magnitude:2.1},{x:-.3,y:.55,magnitude:2.6},{x:.25,y:.5,magnitude:3.5}],lines:[[0,1],[1,2],[2,3],[3,4],[4,5],[0,7],[7,8],[8,6],[5,6]]},{id:"scorpius",name:"Scorpius",stars:[{x:-.1,y:.8,magnitude:2.6},{x:-.05,y:.72,magnitude:2.3},{x:.05,y:.68,magnitude:2.9},{x:0,y:.5,magnitude:1},{x:.08,y:.35,magnitude:2.9},{x:.18,y:.15,magnitude:2.7},{x:.3,y:-.05,magnitude:3},{x:.38,y:-.2,magnitude:2.4},{x:.35,y:-.35,magnitude:3},{x:.25,y:-.5,magnitude:2.7},{x:.1,y:-.55,magnitude:3.3},{x:.15,y:-.65,magnitude:1.6},{x:.22,y:-.68,magnitude:2.7}],lines:[[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10],[10,11],[11,12]]},{id:"cygnus",name:"Cygnus",stars:[{x:0,y:.8,magnitude:1.3},{x:0,y:.5,magnitude:2.5},{x:0,y:.15,magnitude:3.1},{x:0,y:-.15,magnitude:3},{x:-.3,y:.55,magnitude:2.5},{x:.3,y:.55,magnitude:2.2},{x:-.55,y:.6,magnitude:3.8},{x:.55,y:.6,magnitude:3.5}],lines:[[0,1],[1,2],[2,3],[4,1],[1,5],[6,4],[5,7]]},{id:"lyra",name:"Lyra",stars:[{x:0,y:.7,magnitude:0},{x:.15,y:.4,magnitude:3.3},{x:-.1,y:.35,magnitude:3.5},{x:.2,y:.1,magnitude:4.3},{x:-.15,y:.05,magnitude:4.2}],lines:[[0,1],[0,2],[1,3],[2,4],[3,4],[1,2]]},{id:"gemini",name:"Gemini",stars:[{x:-.15,y:.85,magnitude:1.6},{x:.1,y:.75,magnitude:1.1},{x:-.2,y:.55,magnitude:2.9},{x:.05,y:.5,magnitude:3.1},{x:-.3,y:.3,magnitude:3.4},{x:.15,y:.25,magnitude:3.5},{x:-.35,y:.05,magnitude:3.2},{x:.2,y:0,magnitude:3.6},{x:-.4,y:-.15,magnitude:3},{x:.25,y:-.2,magnitude:3.1}],lines:[[0,2],[2,4],[4,6],[6,8],[1,3],[3,5],[5,7],[7,9],[2,3],[4,5]]},{id:"taurus",name:"Taurus",stars:[{x:.1,y:.4,magnitude:.9},{x:-.05,y:.55,magnitude:3.4},{x:.08,y:.6,magnitude:3.5},{x:-.12,y:.65,magnitude:3.6},{x:.15,y:.7,magnitude:3.3},{x:.5,y:.85,magnitude:1.7},{x:-.3,y:.8,magnitude:2.9},{x:-.4,y:.5,magnitude:2.9}],lines:[[0,1],[1,3],[3,6],[0,2],[2,4],[4,5],[1,2],[1,7]]},{id:"aquila",name:"Aquila",stars:[{x:0,y:.55,magnitude:.8},{x:-.15,y:.65,magnitude:2.7},{x:.15,y:.65,magnitude:3.4},{x:-.1,y:.35,magnitude:3.2},{x:.05,y:.15,magnitude:3.4},{x:-.2,y:.85,magnitude:3},{x:.25,y:.8,magnitude:3.5}],lines:[[5,1],[1,0],[0,2],[2,6],[1,3],[3,4],[0,3]]},{id:"canis_major",name:"Canis Major",stars:[{x:0,y:.7,magnitude:-1.5},{x:-.15,y:.5,magnitude:1.5},{x:.2,y:.45,magnitude:1.8},{x:.1,y:.2,magnitude:1.8},{x:-.05,y:.1,magnitude:2},{x:.25,y:.05,magnitude:3},{x:-.2,y:-.05,magnitude:3.5}],lines:[[0,1],[0,2],[2,3],[3,4],[3,5],[4,6],[1,4]]},{id:"virgo",name:"Virgo",stars:[{x:-.05,y:.3,magnitude:1},{x:.05,y:.55,magnitude:2.7},{x:-.1,y:.65,magnitude:3.4},{x:.15,y:.75,magnitude:2.8},{x:-.2,y:.8,magnitude:3.6},{x:.25,y:.45,magnitude:3.9},{x:-.3,y:.5,magnitude:3.4},{x:.35,y:.35,magnitude:4}],lines:[[0,1],[1,2],[2,4],[1,3],[1,5],[5,7],[2,6],[0,6]]},{id:"perseus",name:"Perseus",stars:[{x:0,y:.7,magnitude:1.8},{x:.15,y:.45,magnitude:2.1},{x:-.1,y:.85,magnitude:2.9},{x:-.25,y:.95,magnitude:3},{x:.1,y:.6,magnitude:2.8},{x:-.05,y:.3,magnitude:3.5},{x:.2,y:.25,magnitude:3.8},{x:-.2,y:.55,magnitude:3.1}],lines:[[3,2],[2,0],[0,4],[4,1],[1,5],[1,6],[0,7]]},{id:"sagittarius",name:"Sagittarius",stars:[{x:-.15,y:.5,magnitude:1.8},{x:-.05,y:.55,magnitude:2.7}
1193,{x:.1,y:.6,magnitude:2},{x:-.2,y:.4,magnitude:2.6},{x:0,y:.35,magnitude:2.9},{x:.15,y:.45,magnitude:2},{x:.25,y:.55,magnitude:3.1},{x:-.1,y:.7,magnitude:2.8},{x:.2,y:.7,magnitude:3.5}],lines:[[0,1],[1,2],[0,3],[3,4],[4,5],[5,6],[2,8],[1,7],[5,2]]},{id:"pegasus",name:"Pegasus",stars:[{x:-.45,y:.45,magnitude:2.5},{x:.45,y:.45,magnitude:2.4},{x:.45,y:-.45,magnitude:2.8},{x:-.45,y:-.45,magnitude:2.1},{x:-.65,y:.7,magnitude:2.4},{x:-.55,y:.55,magnitude:3.5},{x:.3,y:.65,magnitude:3.5}],lines:[[0,1],[1,2],[2,3],[3,0],[0,5],[5,4],[1,6]]},{id:"andromeda",name:"Andromeda",stars:[{x:-.6,y:0,magnitude:2.1},{x:-.3,y:.1,magnitude:2.1},{x:.05,y:.2,magnitude:2.3},{x:-.2,y:.35,magnitude:3.4},{x:.1,y:.5,magnitude:3.6},{x:-.4,y:-.15,magnitude:3.3}],lines:[[0,1],[1,2],[1,3],[3,4],[0,5]]},{id:"aries",name:"Aries",stars:[{x:-.2,y:0,magnitude:2},{x:.1,y:.05,magnitude:2.6},{x:.3,y:.1,magnitude:3.9},{x:-.45,y:-.15,magnitude:3.6}],lines:[[0,1],[1,2],[0,3]]},{id:"libra",name:"Libra",stars:[{x:-.2,y:.3,magnitude:2.6},{x:.2,y:.35,magnitude:2.6},{x:-.1,y:-.05,magnitude:3.3},{x:.15,y:-.1,magnitude:3.9},{x:-.05,y:.6,magnitude:3.7}],lines:[[0,1],[0,2],[1,3],[2,3],[0,4]]},{id:"corona_borealis",name:"Corona Borealis",stars:[{x:-.4,y:.1,magnitude:3.8},{x:-.25,y:.25,magnitude:3.7},{x:0,y:.3,magnitude:2.2},{x:.25,y:.25,magnitude:3.8},{x:.4,y:.1,magnitude:3.8},{x:.45,y:-.1,magnitude:4.1},{x:-.45,y:-.1,magnitude:4.1}],lines:[[6,0],[0,1],[1,2],[2,3],[3,4],[4,5]]},{id:"crux",name:"Crux",stars:[{x:0,y:.5,magnitude:.8},{x:0,y:-.3,magnitude:1.3},{x:-.3,y:.1,magnitude:1.6},{x:.25,y:.1,magnitude:2.8},{x:.05,y:.18,magnitude:3.6}],lines:[[0,1],[2,3]]},{id:"draco",name:"Draco",stars:[{x:-.6,y:-.5,magnitude:2.2},{x:-.5,y:-.55,magnitude:2.7},{x:-.4,y:-.4,magnitude:3.1},{x:-.55,y:-.35,magnitude:3.7},{x:-.25,y:-.2,magnitude:3.3},{x:-.05,y:-.05,magnitude:3.1},{x:.15,y:.1,magnitude:3.8},{x:.3,y:.3,magnitude:3.6},{x:.45,y:.5,magnitude:3.3},{x:.55,y:.4,magnitude:2.7},{x:.65,y:.55,magnitude:3.6}],lines:[[0,1],[1,3],[3,2],[2,4],[4,5],[5,6],[6,7],[7,8],[8,9],[9,10]]},{id:"aquarius",name:"Aquarius",stars:[{x:-.2,y:.6,magnitude:2.9},{x:-.1,y:.5,magnitude:2.9},{x:.05,y:.35,magnitude:3.3},{x:.15,y:.4,magnitude:3.8},{x:.1,y:.15,magnitude:3.7},{x:.2,y:-.05,magnitude:3.6},{x:.3,y:-.2,magnitude:3.3},{x:-.1,y:.1,magnitude:3.8}],lines:[[0,1],[1,2],[2,3],[2,4],[4,7],[4,5],[5,6]]},{id:"pisces",name:"Pisces",stars:[{x:-.3,y:.05,magnitude:3.6},{x:-.15,y:.15,magnitude:4},{x:0,y:.25,magnitude:3.8},{x:.15,y:.15,magnitude:4.1},{x:.3,y:.2,magnitude:4.3},{x:.4,y:.4,magnitude:3.6},{x:.25,y:.55,magnitude:4},{x:.05,y:.6,magnitude:3.7},{x:-.2,y:.5,magnitude:4.4}],lines:[[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,8]]},{id:"auriga",name:"Auriga",stars:[{x:0,y:.7,magnitude:.1},{x:.3,y:.4,magnitude:1.9},{x:.25,y:.05,magnitude:2.7},{x:-.15,y:-.1,magnitude:2.6},{x:-.3,y:.3,magnitude:2.7},{x:-.1,y:.5,magnitude:3.2}],lines:[[0,1],[1,2],[2,3],[3,4],[4,5],[5,0]]},{id:"bootes",name:"Boötes",stars:[{x:0,y:.15,magnitude:-.05},{x:-.1,y:.4,magnitude:2.7},{x:.1,y:.5,magnitude:3.5},{x:-.05,y:.65,magnitude:3},{x:.15,y:.75,magnitude:2.4},{x:-.15,y:.8,magnitude:3.5},{x:.2,y:.35,magnitude:3},{x:-.25,y:.2,magnitude:3.8}],lines:[[0,1],[0,6],[1,3],[6,2],[2,4],[3,5],[5,4],[0,7]]},{id:"hercules",name:"Hercules",stars:[{x:-.15,y:.4,magnitude:2.8},{x:.1,y:.45,magnitude:2.8},{x:-.2,y:.15,magnitude:3.1},{x:.15,y:.1,magnitude:3.5},{x:-.25,y:.65,magnitude:3.5},{x:.2,y:.7,magnitude:3.4},{x:-.1,y:-.1,magnitude:3.1},{x:.05,y:-.2,magnitude:3.8},{x:.3,y:.9,magnitude:3}],lines:[[4,0],[0,2],[2,6],[6,7],[5,1],[1,3],[0,1],[2,3],[5,8]]},{id:"capricornus",name:"Capricornus",stars:[{x:-.5,y:.15,magnitude:3.6},{x:-.35,y:.25,magnitude:3.1},{x:-.1,y:.2,magnitude:3.7},{x:.15,y:.05,magnitude:2.9},{x:.3,y:-.1,magnitude:3.7},{x:.05,y:-.15,magnitude:3.6},{x:-.2,y:-.1,magnitude:3.8},{x:-.4,y:0,magnitude:4.1}],lines:[[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],[6,7],[7,0]]},{id:"cancer",name:"Cancer",stars:[{x:-.2,y:.2,magnitude:3.5},{x:.1,y:.25,magnitude:3.5},{x:-.05,y:.55,magnitude:4},{x:.05,y:.45,magnitude:3.9},{x:-.15,y:.7,magnitude:4.7}],lines:[[0,3],[1,3],[3,2],[2,4]]},{id:"corvus",name:"Corvus",stars:[{x:-.2,y:.25,magnitude:2.6},{x:.15,y:.3,magnitude:2.7}
1193,{x:-.15,y:-.15,magnitude:2.9},{x:.2,y:-.1,magnitude:3},{x:.35,y:-.3,magnitude:4}],lines:[[0,1],[1,3],[3,2],[2,0],[3,4]]},{id:"delphinus",name:"Delphinus",stars:[{x:-.1,y:.2,magnitude:3.6},{x:.1,y:.25,magnitude:3.6},{x:-.15,y:.45,magnitude:4},{x:.15,y:.45,magnitude:4.3},{x:-.05,y:-.1,magnitude:4.4}],lines:[[0,1],[1,3],[3,2],[2,0],[0,4]]},{id:"triangulum",name:"Triangulum",stars:[{x:0,y:.5,magnitude:3},{x:-.25,y:-.1,magnitude:3},{x:.25,y:0,magnitude:4}],lines:[[0,1],[1,2],[2,0]]},{id:"sagitta",name:"Sagitta",stars:[{x:-.4,y:0,magnitude:3.5},{x:-.1,y:.05,magnitude:3.7},{x:.2,y:0,magnitude:4.4},{x:.45,y:-.05,magnitude:3.5}],lines:[[0,1],[1,2],[2,3]]},{id:"columba",name:"Columba",stars:[{x:-.1,y:.4,magnitude:2.6},{x:.15,y:.2,magnitude:3.1},{x:-.25,y:.1,magnitude:3.9},{x:.3,y:.05,magnitude:3.9},{x:-.05,y:-.1,magnitude:3.9}],lines:[[0,1],[0,2],[1,3],[2,4],[1,4]]}],fj={speedMultiplier:3.1,motionBlurEnabled:!1,motionBlurStrength:0,motionBlurPersistence:0,starDensity:3,starSize:.2,starHue:30,plasmaFlicker:.15,plasmaFlowScale:2.29,plasmaBlobWarp:0,plasmaProngStrength:.87,plasmaProngWidth:1.86,plasmaColorMix:.92,plasmaCoreIntensity:1.28,plasmaHaloIntensity:3,plasmaSpeed:1,galaxyColorIntensity:0,galaxyColorSpeed:4,galaxyColorScale:.5,galaxyColorWarm:"#ff2f00",galaxyColorCool:"#030514",galaxyColorMid:"#0a0310",bloomIntensity:.85,bloomThreshold:.27,bloomRadius:.75,grainAmount:.21,imageRippleEnabled:!0,imageRippleIntensity:.23,imageRippleSpread:.26,imageRippleSpeed:1.4,imageRipplePulse:.65,imageRippleFrequency:1.8,imageGlowIntensity:1.5,imageGlowFalloff:2.2,imageGlowHaloIntensity:.35,imageGlowPlasmaEnabled:!0,imageGlowPlasmaFlicker:.3,imageGlowPlasmaFlowScale:.66,imageGlowPlasmaBlobWarp:1.65,imageGlowPlasmaProngStrength:.77,imageGlowPlasmaProngWidth:.88,imageGlowPlasmaColorMix:1,imageGlowPlasmaCoreIntensity:.53,imageGlowPlasmaHaloIntensity:.61,imageGlowColorPrimary:"#3d50db",imageGlowColorSecondary:"#1f739e",galleryDistance:50,photoDensity:1,chatLineHeight:1.35,backdropBreathAmount:.042,backdropBreathSpeed:1.04,backdropWarpAmount:.072,backdropWarpSpeed:.23,backdropWarpScale:5.9,backdropWarpAlways:!1,constellationMorphDuration:3.5,constellationArcIntensity:.2,constellationRotationAngle:.22,constellationRotationTilt:.15,constellationScale:22,constellationLineFadeOutEnd:.2,constellationLineFadeInStart:.7,constellationStarNudge:1.2,lensWarpStrength:.45},fW={motionBlurStrength:.24,motionBlurPersistence:.26,starSize:.3,backdropBreathAmount:.044,backdropBreathSpeed:1.05,backdropWarpAmount:.128,backdropWarpSpeed:.36,backdropWarpScale:5.2,backdropWarpAlways:!0,lensWarpStrength:0},fX={speedMultiplier:3.1,motionBlurEnabled:!1,motionBlurStrength:0,motionBlurPersistence:0,starDensity:3,starSize:.2,starHue:30,plasmaFlicker:.15,plasmaFlowScale:2.29,plasmaBlobWarp:0,plasmaProngStrength:.87,plasmaProngWidth:1.86,plasmaColorMix:.92,plasmaCoreIntensity:1.28,plasmaHaloIntensity:3,plasmaSpeed:1,galaxyColorIntensity:0,galaxyColorSpeed:4,galaxyColorScale:.5,galaxyColorWarm:"#ff2f00",galaxyColorCool:"#030514",galaxyColorMid:"#0a0310",bloomIntensity:.85,bloomThreshold:.27,bloomRadius:.75,grainAmount:.21,imageRippleEnabled:!0,imageRippleIntensity:.23,imageRippleSpread:.26,imageRippleSpeed:1.4,imageRipplePulse:.65,imageRippleFrequency:1.8,imageGlowIntensity:1.5,imageGlowFalloff:2.2,imageGlowHaloIntensity:.35,imageGlowPlasmaEnabled:!0,imageGlowPlasmaFlicker:.3,imageGlowPlasmaFlowScale:.66,imageGlowPlasmaBlobWarp:1.65,imageGlowPlasmaProngStrength:.77,imageGlowPlasmaProngWidth:.88,imageGlowPlasmaColorMix:1,imageGlowPlasmaCoreIntensity:.53,imageGlowPlasmaHaloIntensity:.61,imageGlowColorPrimary:"#3d50db",imageGlowColorSecondary:"#1f739e",galleryDistance:50,photoDensity:1,chatLineHeight:1.35,backdropBreathAmount:.042,backdropBreathSpeed:1.04,backdropWarpAmount:.072,backdropWarpSpeed:.23,backdropWarpScale:5.9,backdropWarpAlways:!1,constellationMorphDuration:3.5,constellationArcIntensity:.2,constellationRotationAngle:.22,constellationRotationTilt:.15,constellationScale:22,constellationLineFadeOutEnd:.2,constellationLineFadeInStart:.7,constellationStarNudge:1.2,lensWarpStrength:.45};function fq(e){let t=43758.5453*Math.sin(12.9898*e+78.233);return t-Math.floor(t)}function fY(e){let t=0;for(let n=0;n<e.length;n+=1)t=(t<<5)-t+e.charCodeAt(n)|0;return Math.abs(t)}class fZ extends ed.default.Component{state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){this.props.onError(e,t)}render(){return this.state.hasError?null:this.props.children}}function fK({imageUrl:e,opacity:t=1}){return(0,eu.jsx)("div",{className:"absolute inset-0",style:{background:`#000 url(${e}) center / cover no-repeat`,opacity:t,pointerEvents:"none"},"aria-hidden":"true"})}let fJ=`
1194  attribute float aSize;
1195  attribute float aSeed;
1196  attribute float aAlpha;
1197  uniform float uTime;
1198  uniform float uStarSize;
1199  uniform float uTwinkleSpeed;
1200  uniform float uTwinkleAmount;
1201  uniform float uPlasmaEnabled;
1202  uniform float uPlasmaFlicker;
1203  uniform float uPlasmaFlowScale;
1204  uniform float uPlasmaSpeed;
1205  uniform float uHaloSize;
1206  varying float vSeed;
1207  varying float vBrightness;
1208  varying float vPlasmaBreath;
1209  varying float vFadeAlpha;
1210  varying float vSizeFade;
1211
1212  float hash(float n) { return fract(sin(n) * 43758.5453); }
1213
1214  void main() {
1215    vSeed = aSeed;
1216    vFadeAlpha = aAlpha;
1217
1218    // Twinkle
1219    float phase1 = hash(aSeed * 12.9898) * 6.2831;
1220    float phase2 = hash(aSeed * 78.233) * 6.2831;
1221    float freq1 = 0.8 + hash(aSeed * 45.164) * 1.5;
1222    float freq2 = 1.2 + hash(aSeed * 93.989) * 2.0;
1223    float twinkle = 0.5 + 0.5 * sin(uTime * uTwinkleSpeed * freq1 + phase1);
1224    twinkle *= 0.5 + 0.5 * cos(uTime * uTwinkleSpeed * freq2 * 0.7 + phase2);
1225    float plasmaMode = clamp(uPlasmaEnabled, 0.0, 1.0);
1226    float plasmaAmt = plasmaMode * uPlasmaFlicker;
1227    float plasmaTime = uTime * (0.28 + plasmaAmt * (1.1 + uPlasmaFlowScale * 0.3)) * uPlasmaSpeed;
1228    float swirlA = sin(plasmaTime * 1.05 + phase1) + 0.35 * sin(plasmaTime * 1.8 + phase2 * 1.1);
1229    float swirlB = cos(plasmaTime * 0.95 + phase2) + 0.35 * cos(plasmaTime * 1.7 + phase1 * 1.05);
1230    float swirlC = sin(plasmaTime * 0.72 + phase1 * 0.6 + phase2 * 0.35);
1231    float displacementAmp = (0.01 + 0.06 * hash(aSeed * 57.31)) * plasmaAmt;
1232    vec3 displacedPosition = position + vec3(swirlA, swirlB, swirlC * 0.5) * displacementAmp;
1233
1234    float plasmaBreath = 0.5 + 0.5 * sin(plasmaTime * 0.9 + phase1 * 0.6);
1235    vPlasmaBreath = plasmaBreath;
1236
1237    vBrightness = mix(1.0, twinkle, uTwinkleAmount * (1.0 - plasmaMode));
1238    vBrightness = mix(vBrightness, vBrightness * (0.9 + plasmaBreath * 0.18), plasmaAmt);
1239    vBrightness = max(vBrightness, 0.0);
1240
1241    vec4 mvPosition = modelViewMatrix * vec4(displacedPosition, 1.0
1241);
1242    float flickerSize = max(0.6, 1.0 + plasmaAmt * (plasmaBreath - 0.5) * 0.32);
1243    float sizeModeScale = mix(uHaloSize, 1.7, plasmaMode);
1244    float basePx = uStarSize * sizeModeScale * (300.0 / -mvPosition.z);
1245
1246    // Stable base size (without animation modulation) for flicker dampening
1247    float stableBasePx = basePx * aSize;
1248    // For small stars, dampen twinkle/flicker to prevent sub-pixel flicker
1249    float smallDampen = smoothstep(0.5, 3.0, stableBasePx);
1250    float modScale = mix(1.0, (0.6 + 0.4 * vBrightness) * flickerSize, smallDampen);
1251    float naturalSize = stableBasePx * modScale;
1252    // Clamp minimum point size to prevent sub-pixel aliasing; fade alpha to compensate
1253    float minStarPx = 1.5;
1254    vSizeFade = clamp(naturalSize / minStarPx, 0.0, 1.0);
1255    gl_PointSize = max(naturalSize, minStarPx);
1256
1257    gl_Position = projectionMatrix * mvPosition;
1258  }
1259`,fQ=`
1260  uniform float uTime;
1261  uniform float uGlowIntensity;
1262  uniform float uGlowFalloff;
1263  uniform float uHaloIntensity;
1264  uniform float uColorTemperature;
1265  uniform float uStarHue;
1266  uniform float uAlphaMultiplier;
1267  varying float vFadeAlpha;
1268  uniform float uPlasmaEnabled;
1269  uniform float uPlasmaFlicker;
1270  uniform float uPlasmaFlowScale;
1271  uniform float uPlasmaBlobWarp;
1272  uniform float uPlasmaProngStrength;
1273  uniform float uPlasmaProngWidth;
1274  uniform float uPlasmaColorMix;
1275  uniform float uPlasmaCoreIntensity;
1276  uniform float uPlasmaHaloIntensity;
1277  uniform float uPlasmaSpeed;
1278  varying float vSeed;
1279  varying float vBrightness;
1280  varying float vPlasmaBreath;
1281  varying float vSizeFade;
1282
1283  float hash(float n) { return fract(sin(n) * 43758.5453); }
1284  float hash21(vec2 p) {
1285    p = fract(p * vec2(123.34, 345.45));
1286    p += dot(p, p + 34.345);
1287    return fract(p.x * p.y);
1288  }
1289  float noise(vec2 p) {
1290    vec2 i = floor(p);
1291    vec2 f = fract(p);
1292    float a = hash21(i);
1293    float b = hash21(i + vec2(1.0, 0.0));
1294    float c = hash21(i + vec2(0.0, 1.0));
1295    float d = hash21(i + vec2(1.0, 1.0));
1296    vec2 u = f * f * (3.0 - 2.0 * f);
1297    return mix(a, b, u.x) + (c - a) * u.y * (1.0 - u.x) + (d - b) * u.x * u.y;
1298  }
1299  float fbm(vec2 p) {
1300    float v = 0.0;
1301    float a = 0.5;
1302    mat2 m = mat2(1.6, 1.2, -1.2, 1.6);
1303    for (int i = 0; i < 3; i++) {
1304      v += a * noise(p);
1305      p = m * p + 0.17;
1306      a *= 0.5;
1307    }
1308    return v;
1309  }
1310  // --- Simplex 3D noise (for plasma domain warping) ---
1311  vec3 mod289v3(vec3 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; }
1312  vec4 mod289v4(vec4 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; }
1313  vec4 permute4(vec4 x) { return mod289v4(((x * 34.0) + 10.0) * x); }
1314  vec4 taylorInvSqrt4(vec4 r) { return 1.79284291400159 - 0.85373472095314 * r; }
1315
1316  // Hue rotation via Rodrigues' rotation around the (1,1,1) luma axis
1317  vec3 hueRotate(vec3 col, float angleDeg) {
1318    float a = angleDeg * 3.14159265 / 180.0;
1319    float cosA = cos(a);
1320    float sinA = sin(a);
1321    float k = (1.0 - cosA) / 3.0;
1322    float s = sinA * 0.57735026; // 1/sqrt(3)
1323    mat3 m = mat3(
1324      k + cosA,     k - s,        k + s,
1325      k + s,        k + cosA,     k - s,
1326      k - s,        k + s,        k + cosA
1327    );
1328    return m * col;
1329  }
1330
1331  float snoise3(vec3 v) {
1332    const vec2 C = vec2(1.0 / 6.0, 1.0 / 3.0);
1333    const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);
1334    vec3 i = floor(v + dot(v, C.yyy));
1335    vec3 x0 = v - i + dot(i, C.xxx);
1336    vec3 g = step(x0.yzx, x0.xyz);
1337    vec3 l = 1.0 - g;
1338    vec3 i1 = min(g.xyz, l.zxy);
1339    vec3 i2 = max(g.xyz, l.zxy);
1340    vec3 x1 = x0 - i1 + C.xxx;
1341    vec3 x2 = x0 - i2 + C.yyy;
1342    vec3 x3 = x0 - D.yyy;
1343    i = mod289v3(i);
1344    vec4 p = permute4(permute4(permute4(
1345      i.z + vec4(0.0, i1.z, i2.z, 1.0))
1346      + i.y + vec4(0.0, i1.y, i2.y, 1.0))
1347      + i.x + vec4(0.0, i1.x, i2.x, 1.0));
1348    float n_ = 0.142857142857;
1349    vec3 ns = n_ * D.wyz - D.xzx;
1350    vec4 j = p - 49.0 * floor(p * ns.z * ns.z);
1351    vec4 x_ = floor(j * ns.z);
1352    vec4 y_ = floor(j - 7.0 * x_);
1353    vec4 x = x_ * ns.x + ns.yyyy;
1354    vec4 y = y_ * ns.x + ns.yyyy;
1355    vec4 h = 1.0 - abs(x) - abs(y);
1356    vec4 b0 = vec4(x.xy, y.xy);
1357    vec4 b1 = vec4(x.zw, y.zw);
1358    vec4 s0 = floor(b0) * 2.0 + 1.0;
1359    vec4 s1 = floor(b1) * 2.0 + 1.0;
1360    vec4 sh = -step(h, vec4(0.0));
1361    vec4 a0 = b0.xzyw + s0.xzyw * sh.xxyy;
1362    vec4 a1 = b1.xzyw + s1.xzyw * sh.zzww;
1363    vec3 p0 = vec3(a0.xy, h.x);
1364    vec3 p1 = vec3(a0.zw, h.y);
1365    vec3 p2 = vec3(a1.xy, h.z);
1366    vec3 p3 = vec3(a1.zw, h.w);
1367    vec4 norm = taylorInvSqrt4(vec4(dot(p0,p0), dot(p1,p1), dot(p2,p2), dot(p3,p3)));
1368    p0 *= norm.x; p1 *= norm.y; p2 *= norm.z; p3 *= norm.w;
1369    vec4 m = max(0.5 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);
1370    m = m * m;
1371    return 105.0 * dot(m*m, vec4(dot(p0,x0), dot(p1,x1), dot(p2,x2), dot(p3,x3)));
1372  }
1373
1374  void main() {
1375    vec2 uv = gl_PointCoord - 0.5;
1376    float dist = length(uv) * 2.0;
1377    if (dist > 1.0) discard;
1378
1379    float plasmaMode = clamp(uPlasmaEnabled, 0.0, 1.0);
1380    float plasmaAmt = plasmaMode * uPlasmaFlicker;
1381
1382    float alphaMul = max(uAlphaMultiplier, 0.0);
1383    float radial = 1.0 - smoothstep(0.0, 1.0, dist);
1384
1385    // Classic star path (independent from plasma controls).
1386    float classicCore = exp(-pow(dist * uGlowFalloff, 2.0)) * uGlowIntensity;
1387    float classicHalo = exp(-dist * 1.8) * uHaloIntensity;
1388    float classicIntensity = (classicCore + classicHalo) * vBrightness;
1389
1390    float starTemp = uColorTemperature + (hash(vSeed * 331.7) - 0.5) * 0.3;
1391    starTemp = clamp(starTemp, 0.0, 1.0);
1392    vec3 coolColor = hueRotate(vec3(0.85, 0.9, 1.0), uStarHue);
1393    vec3 warmColor = hueRotate(vec3(1.0, 0.85, 0.5), uStarHue);
1394    vec3 hotColor  = hueRotate(vec3(1.0, 0.5, 0.2), uStarHue);
1395    vec3 classicColor = mix(coolColor, warmColor, smoothstep(0.0, 0.5, starTemp));
1396    classicColor = mix(classicColor, hotColor, smoothstep(0.5, 1.0, starTemp));
1397    classicColor = mix(classicColor, vec3(1.0), classicCore * 0.6);
1398
1399    // Plasma path: domain-warped animated noise field (ghostly flickering flame).
1400    float seedPhase = hash(vSeed * 19.17) * 6.2831;
1401    float plasmaTime = uTime * (0.3 + plasmaAmt * 1.2) * uPlasmaSpeed;
1402    float flowScale = max(0.25, uPlasmaFlowScale);
1403    float warpStr = uPlasmaBlobWarp * plasmaAmt;
1404
1405    // --- Domain warping: warp UV coords with layered simplex noise ---
1406    // First warp layer (large-scale shape mutation)
1407    vec3 wp1 = vec3(uv * 2.8 * flowScale + seedPhase * 0.1, plasmaTime * 0.25);
1408    float wx1 = snoise3(wp1);
1409    float wy1 = snoise3(wp1 + vec3(5.2, 1.3, 2.7));
1410    vec2 warped = uv + vec2(wx1, wy1) * 0.22 * warpStr;
1411
1412    // Second warp layer (finer turbulence)
1413    vec3 wp2 = vec3(warped * 3.8 * flowScale + seedPhase * 0.2, plasmaTime * 0.18);
1414    float wx2 = snoise3(wp2 + vec3(1.7, 9.2, 0.0));
1415    float wy2 = snoise3(wp2 + vec3(8.3, 2.8, 0.0));
1416    warped += vec2(wx2, wy2) * 0.11 * warpStr * uPlasmaProngStrength;
1417
1418    float warpedDist = length(warped) * 2.0;
1419
1420    // --- Noise-driven intensity field ---
1421    float nI = snoise3(vec3(uv * 4.2 * flowScale * uPlasmaProngWidth,
1422                            plasmaTime * 0.32 + seedPhase * 0.15));
1423    float intensityNoise = nI * 0.5 + 0.5; // [0,1]
1424    float breath = 0.5 + 0.5 * sin(plasmaTime * 0.38 + seedPhase * 0.6);
1425
1426    // --- Soft Gaussian envelope from warped distance ---
1427    float coreWidth = 0.14 + 0.04 * uPlasmaCoreIntensity;
1428    float coreEnvelope = exp(-warpedDist * warpedDist / coreWidth);
1429    float haloEnvelope = exp(-warpedDist * 1.3);
1430    float flicker = 0.82 + 0.18 * intensityNoise + 0.08 * breath;
1431
1432    float plasmaCore = coreEnvelope * uPlasmaCoreIntensity * 1.3 * flicker;
1433    float plasmaHalo = haloEnvelope * uPlasmaHaloIntensity * (0.55 + intensityNoise * 0.45) * flicker;
1434    float plasmaIntensity = (plasmaCore + plasmaHalo) * vBrightness;
1435    plasmaIntensity *= mix(1.0, 0.88 + vPlasmaBreath * 0.24, plasmaAmt);
1436
1437    float plasmaMask = clamp(coreEnvelope + haloEnvelope * 0.5 + exp(-dist * 1.6) * 0.3, 0.0, 1.0);
1438
1439    // --- Color: spatial envelope-driven (decoupled from brightness) ---
1440    float colorPos = coreEnvelope * 0.65 + haloEnvelope * 0.35;
1441    vec3 lightBlueCore = hueRotate(vec3(0.38, 0.68, 1.0), uStarHue);
1442    vec3 brightBlue    = hueRotate(vec3(0.10, 0.52, 0.95), uStarHue);
1443    vec3 midBlue       = hueRotate(vec3(0.05, 0.38, 0.80), uStarHue);
1444    vec3 deepBlue      = hueRotate(vec3(0.04, 0.28, 0.65), uStarHue);
1445
1446    vec3 plasmaColor = mix(midBlue, brightBlue, smoothstep(0.05, 0.3, colorPos));
1447    plasmaColor = mix(plasmaColor, lightBlueCore, smoothstep(0.35, 0.85, colorPos));
1448    plasmaColor = mix(classicColor, plasmaColor, uPlasmaColorMix);
1449
1450    // Asymmetric deep-blue tint on one hemisphere
1451    float angle = atan(uv.y, uv.x);
1452    float accentBias = smoothstep(-0.1, 0.55, sin(angle - 2.2 + seedPhase * 0.25));
1453    float accentZone = accentBias * smoothstep(0.1, 0.4, colorPos) * (1.0 - smoothstep(0.6, 0.9, colorPos));
1454    plasmaColor = mix(plasmaColor, mix(plasmaColor, deepBlue, 0.38), accentZone * plasmaAmt);
1455
1456    // Additive light-blue boost at core
1457    plasmaColor += lightBlueCore * coreEnvelope * coreEnvelope * plasmaAmt * 0.2;
1458
1459    float renderIntensity = mix(classicIntensity, plasmaIntensity, plasmaMode);
1460    vec3 renderColor = mix(classicColor, plasmaColor, plasmaMode);
1461    float renderMask = mix(1.0, plasmaMask, plasmaMode);
1462
1463    float alpha = clamp(renderIntensity * alphaMul * mix(1.0, 1.2, plasmaAmt) * renderMask, 0.0, 1.0);
1464    // Apply per-star fade-in alpha and sub-pixel size compensation
1465    alpha *= vFadeAlpha * vSizeFade;
1466    // Cap color multiply for plasma so hue survives overbright (bloom uses alpha)
1467    float colorMul = mix(renderIntensity, min(renderIntensity, 1.1), plasmaMode);
1468    gl_FragColor = vec4(renderColor * colorMul * alphaMul * vFadeAlpha * vSizeFade, alpha);
1469  }
1470`,f$=`
1471  varying vec2 vUv;
1472  void main() {
1473    // Flip X for BackSide rendering so the texture isn't mirrored
1474    vUv = vec2(1.0 - uv.x, uv.y);
1475    gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
1476  }
1477`,f0=`
1478  uniform float uTime;
1479  uniform sampler2D uMap;
1480  uniform float uOpacity;
1481  uniform float uBreathAmount;
1482  uniform float uBreathSpeed;
1483  uniform float uWarpIntensity;
1484  uniform float uWarpSpeed;
1485  uniform float uWarpScale;
1486  uniform vec2 uRepeat;
1487  uniform vec2 uOffset;
1488  varying vec2 vUv;
1489
1490  // --- Simplex 3D noise (same implementation as star shader) ---
1491  vec3 mod289v3(vec3 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; }
1492  vec4 mod289v4(vec4 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; }
1493  vec4 permute4(vec4 x) { return mod289v4(((x * 34.0) + 10.0) * x); }
1494  vec4 taylorInvSqrt4(vec4 r) { return 1.79284291400159 - 0.85373472095314 * r; }
1495
1496  float snoise3(vec3 v) {
1497    const vec2 C = vec2(1.0 / 6.0, 1.0 / 3.0);
1498    const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);
1499    vec3 i = floor(v + dot(v, C.yyy));
1500    vec3 x0 = v - i + dot(i, C.xxx);
1501    vec3 g = step(x0.yzx, x0.xyz);
1502    vec3 l = 1.0 - g;
1503    vec3 i1 = min(g.xyz, l.zxy);
1504    vec3 i2 = max(g.xyz, l.zxy);
1505    vec3 x1 = x0 - i1 + C.xxx;
1506    vec3 x2 = x0 - i2 + C.yyy;
1507    vec3 x3 = x0 - D.yyy;
1508    i = mod289v3(i);
1509    vec4 p = permute4(permute4(permute4(
1510      i.z + vec4(0.0, i1.z, i2.z, 1.0))
1511      + i.y + vec4(0.0, i1.y, i2.y, 1.0))
1512      + i.x + vec4(0.0, i1.x, i2.x, 1.0));
1513    float n_ = 0.142857142857;
1514    vec3 ns = n_ * D.wyz - D.xzx;
1515    vec4 j = p - 49.0 * floor(p * ns.z * ns.z);
1516    vec4 x_ = floor(j * ns.z);
1517    vec4 y_ = floor(j - 7.0 * x_);
1518    vec4 x = x_ * ns.x + ns.yyyy;
1519    vec4 y = y_ * ns.x + ns.yyyy;
1520    vec4 h = 1.0 - abs(x) - abs(y);
1521    vec4 b0 = vec4(x.xy, y.xy);
1522    vec4 b1 = vec4(x.zw, y.zw);
1523    vec4 s0 = floor(b0) * 2.0 + 1.0;
1524    vec4 s1 = floor(b1) * 2.0 + 1.0;
1525    vec4 sh = -step(h, vec4(0.0));
1526    vec4 a0 = b0.xzyw + s0.xzyw * sh.xxyy;
1527    vec4 a1 = b1.xzyw + s1.xzyw * sh.zzww;
1528    vec3 p0 = vec3(a0.xy, h.x);
1529    vec3 p1 = vec3(a0.zw, h.y);
1530    vec3 p2 = vec3(a1.xy, h.z);
1531    vec3 p3 = vec3(a1.zw, h.w);
1532    vec4 norm = taylorInvSqrt4(vec4(dot(p0,p0), dot(p1,p1), dot(p2,p2), dot(p3,p3)));
1533    p0 *= norm.x; p1 *= norm.y; p2 *= norm.z; p3 *= norm.w;
1534    vec4 m = max(0.5 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);
1535    m = m * m;
1536    return 105.0 * dot(m*m, vec4(dot(p0,x0), dot(p1,x1), dot(p2,x2), dot(p3,x3)));
1537  }
1538
1539  void main() {
1540    // Apply repeat/offset for user scale
1541    vec2 uv = vUv * uRepeat + uOffset;
1542
1543    // Breathing: gentle zoom oscillation
1544    float breath = sin(uTime * uBreathSpeed) * uBreathAmount;
1545    vec2 center = vec2(0.5);
1546    uv = center + (uv - center) * (1.0 + breath);
1547
1548    // Ripple: simplex noise domain warp
1549    float t = uTime * uWarpSpeed;
1550    vec3 noiseCoordX = vec3(uv * uWarpScale, t);
1551    vec3 noiseCoordY = vec3(uv * uWarpScale + vec2(5.2, 1.3), t + 3.7);
1552    uv += vec2(snoise3(noiseCoordX), snoise3(noiseCoordY)) * uWarpIntensity;
1553
1554    vec4 texColor = texture2D(uMap, uv);
1555    // Dither to reduce banding in dark gradients (triangular-PDF noise, ~\xb10.5/255)
1556    vec3 dither = vec3(
1557      fract(sin(dot(gl_FragCoord.xy, vec2(12.9898, 78.233))) * 43758.5453),
1558      fract(sin(dot(gl_FragCoord.xy, vec2(93.9898, 67.345))) * 24634.6345),
1559      fract(sin(dot(gl_FragCoord.xy, vec2(45.4637, 34.987))) * 57493.2938)
1560    );
1561    texColor.rgb += (dither - 0.5) / 255.0;
1562    gl_FragColor = vec4(texColor.rgb, texColor.a * uOpacity);
1563  }
1564`,f1=`
1565  varying vec2 vUv;
1566  void main() {
1567    vUv = uv;
1568    gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
1569  }
1570`,f2=`
1571  uniform float uTime;
1572  uniform float uOpacity;
1573  uniform float uSeed;
1574  uniform vec3 uColor;
1575  uniform float uAspect;
1576  uniform float uGlowIntensity;
1577  uniform float uGlowFalloff;
1578  uniform float uHaloIntensity;
1579  uniform float uPlasmaEnabled;
1580  uniform float uPlasmaFlicker;
1581  uniform float uPlasmaFlowScale;
1582  uniform float uPlasmaBlobWarp;
1583  uniform float uPlasmaProngStrength;
1584  uniform float uPlasmaProngWidth;
1585  uniform float uPlasmaColorMix;
1586  uniform float uPlasmaCoreIntensity;
1587  uniform float uPlasmaHaloIntensity;
1588  uniform float uPlasmaSpeed;
1589  uniform sampler2D uImageMap;
1590  uniform float uHasImageMap;
1591  uniform float uGlowPad;
1592  varying vec2 vUv;
1593
1594  float hash(float n) { return fract(sin(n) * 43758.5453); }
1595  float hash21(vec2 p) {
1596    p = fract(p * vec2(123.34, 345.45));
1597    p += dot(p, p + 34.345);
1598    return fract(p.x * p.y);
1599  }
1600  float noise(vec2 p) {
1601    vec2 i = floor(p);
1602    vec2 f = fract(p);
1603    float a = hash21(i);
1604    float b = hash21(i + vec2(1.0, 0.0));
1605    float c = hash21(i + vec2(0.0, 1.0));
1606    float d = hash21(i + vec2(1.0, 1.0));
1607    vec2 u = f * f * (3.0 - 2.0 * f);
1608    return mix(a, b, u.x) + (c - a) * u.y * (1.0 - u.x) + (d - b) * u.x * u.y;
1609  }
1610
1611  vec3 mod289v3(vec3 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; }
1612  vec4 mod289v4(vec4 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; }
1613  vec4 permute4(vec4 x) { return mod289v4(((x * 34.0) + 10.0) * x); }
1614  vec4 taylorInvSqrt4(vec4 r) { return 1.79284291400159 - 0.85373472095314 * r; }
1615
1616  float snoise3(vec3 v) {
1617    const vec2 C = vec2(1.0 / 6.0, 1.0 / 3.0);
1618    const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);
1619    vec3 i = floor(v + dot(v, C.yyy));
1620    vec3 x0 = v - i + dot(i, C.xxx);
1621    vec3 g = step(x0.yzx, x0.xyz);
1622    vec3 l = 1.0 - g;
1623    vec3 i1 = min(g.xyz, l.zxy);
1624    vec3 i2 = max(g.xyz, l.zxy);
1625    vec3 x1 = x0 - i1 + C.xxx;
1626    vec3 x2 = x0 - i2 + C.yyy;
1627    vec3 x3 = x0 - D.yyy;
1628    i = mod289v3(i);
1629    vec4 p = permute4(permute4(permute4(
1630      i.z + vec4(0.0, i1.z, i2.z, 1.0))
1631      + i.y + vec4(0.0, i1.y, i2.y, 1.0))
1632      + i.x + vec4(0.0, i1.x, i2.x, 1.0));
1633    float n_ = 0.142857142857;
1634    vec3 ns = n_ * D.wyz - D.xzx;
1635    vec4 j = p - 49.0 * floor(p * ns.z * ns.z);
1636    vec4 x_ = floor(j * ns.z);
1637    vec4 y_ = floor(j - 7.0 * x_);
1638    vec4 x = x_ * ns.x + ns.yyyy;
1639    vec4 y = y_ * ns.x + ns.yyyy;
1640    vec4 h = 1.0 - abs(x) - abs(y);
1641    vec4 b0 = vec4(x.xy, y.xy);
1642    vec4 b1 = vec4(x.zw, y.zw);
1643    vec4 s0 = floor(b0) * 2.0 + 1.0;
1644    vec4 s1 = floor(b1) * 2.0 + 1.0;
1645    vec4 sh = -step(h, vec4(0.0));
1646    vec4 a0 = b0.xzyw + s0.xzyw * sh.xxyy;
1647    vec4 a1 = b1.xzyw + s1.xzyw * sh.zzww;
1648    vec3 p0 = vec3(a0.xy, h.x);
1649    vec3 p1 = vec3(a0.zw, h.y);
1650    vec3 p2 = vec3(a1.xy, h.z);
1651    vec3 p3 = vec3(a1.zw, h.w);
1652    vec4 norm = taylorInvSqrt4(vec4(dot(p0,p0), dot(p1,p1), dot(p2,p2), dot(p3,p3)));
1653    p0 *= norm.x; p1 *= norm.y; p2 *= norm.z; p3 *= norm.w;
1654    vec4 m = max(0.5 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);
1655    m = m * m;
1656    return 105.0 * dot(m*m, vec4(dot(p0,x0), dot(p1,x1), dot(p2,x2), dot(p3,x3)));
1657  }
1658
1659  void main() {
1660    vec2 uv = vUv - 0.5;
1661    // Aspect-corrected distance: normalise so the glow follows the image shape.
1662    // uAspect = width / height. When aspect > 1 (landscape), shrink x; when < 1 (portrait), shrink y.
1663    vec2 scaled = uv;
1664    if (uAspect > 1.0) {
1665      scaled.y *= uAspect;
1666    } else {
1667      scaled.x /= uAspect;
1668    }
1669    float dist = length(scaled) * 2.0;
1670    if (dist > 1.0) discard;
1671
1672    float plasmaMode = clamp(uPlasmaEnabled, 0.0, 1.0);
1673    float plasmaAmt = plasmaMode * uPlasmaFlicker;
1674
1675    // Classic radial glow (same math as star core + halo)
1676    float classicCore = exp(-pow(dist * uGlowFalloff, 2.0)) * uGlowIntensity;
1677    float classicHalo = exp(-dist * 1.8) * uHaloIntensity;
1678    float classicIntensity = classicCore + classicHalo;
1679
1680    // Classic color: use uColor as base, blend toward white at core
1681    vec3 classicColor = mix(uColor, vec3(1.0), classicCore * 0.6);
1682
1683    // Plasma path: domain-warped animated noise (same as star shader)
1684    float seedPhase = hash(uSeed * 19.17) * 6.2831;
1685    float plasmaTime = uTime * (0.3 + plasmaAmt * 1.2) * uPlasmaSpeed;
1686    float flowScale = max(0.25, uPlasmaFlowScale);
1687    float warpStr = uPlasmaBlobWarp * plasmaAmt;
1688
1689    vec3 wp1 = vec3(uv * 2.8 * flowScale + seedPhase * 0.1, plasmaTime * 0.25);
1690    float wx1 = snoise3(wp1);
1691    float wy1 = snoise3(wp1 + vec3(5.2, 1.3, 2.7));
1692    vec2 warped = uv + vec2(wx1, wy1) * 0.22 * warpStr;
1693
1694    vec3 wp2 = vec3(warped * 3.8 * flowScale + seedPhase * 0.2, plasmaTime * 0.18);
1695    float wx2 = snoise3(wp2 + vec3(1.7, 9.2, 0.0));
1696    float wy2 = snoise3(wp2 + vec3(8.3, 2.8, 0.0));
1697    warped += vec2(wx2, wy2) * 0.11 * warpStr * uPlasmaProngStrength;
1698
1699    float warpedDist = length(warped) * 2.0;
1700
1701    float nI = snoise3(vec3(uv * 4.2 * flowScale * uPlasmaProngWidth,
1702                            plasmaTime * 0.32 + seedPhase * 0.15));
1703    float intensityNoise = nI * 0.5 + 0.5;
1704    float breath = 0.5 + 0.5 * sin(plasmaTime * 0.38 + seedPhase * 0.6);
1705
1706    float coreWidth = 0.14 + 0.04 * uPlasmaCoreIntensity;
1707    float coreEnvelope = exp(-warpedDist * warpedDist / coreWidth);
1708    float haloEnvelope = exp(-warpedDist * 1.3);
1709    float flicker = 0.82 + 0.18 * intensityNoise + 0.08 * breath;
1710
1711    float plasmaCore = coreEnvelope * uPlasmaCoreIntensity * 1.3 * flicker;
1712    float plasmaHalo = haloEnvelope * uPlasmaHaloIntensity * (0.55 + intensityNoise * 0.45) * flicker;
1713    float plasmaIntensity = plasmaCore + plasmaHalo;
1714
1715    float plasmaMask = clamp(coreEnvelope + haloEnvelope * 0.5 + exp(-dist * 1.6) * 0.3, 0.0, 1.0);
1716
1717    // Plasma color: derive palette from uColor so it respects the chosen halo color.
1718    // Bright core, darker outer, and a warm-shifted accent — same structure, no hardcoded hues.
1719    float colorPos = coreEnvelope * 0.65 + haloEnvelope * 0.35;
1720    vec3 coreLight = uColor + vec3(0.25);                       // brighter version for core
1721    vec3 midDark = uColor * 0.45;                               // darker version for outer regions
1722    vec3 accent = uColor.gbr * vec3(0.7, 0.5, 0.9);            // channel-shifted warm accent
1723
1724    vec3 plasmaColor = mix(midDark, uColor, smoothstep(0.05, 0.3, colorPos));
1725    plasmaColor = mix(plasmaColor, coreLight, smoothstep(0.35, 0.85, colorPos));
1726
1727    float angle = atan(uv.y, uv.x);
1728    float accentBias = smoothstep(-0.1, 0.55, sin(angle - 2.2 + seedPhase * 0.25));
1729    float accentZone = accentBias * smoothstep(0.1, 0.4, colorPos) * (1.0 - smoothstep(0.6, 0.9, colorPos));
1730    plasmaColor = mix(plasmaColor, mix(plasmaColor, accent, 0.38), accentZone * plasmaAmt);
1731
1732    plasmaColor += coreLight * coreEnvelope * coreEnvelope * plasmaAmt * 0.2;
1733
1734    // Final blend between classic and plasma paths
1735    float renderIntensity = mix(classicIntensity, plasmaIntensity, plasmaMode);
1736    vec3 renderColor = mix(classicColor, plasmaColor, plasmaMode);
1737    float renderMask = mix(1.0, plasmaMask, plasmaMode);
1738
1739    float alpha = clamp(renderIntensity * renderMask, 0.0, 1.0) * uOpacity;
1740
1741    // For images with transparency (e.g. Shopify product images), mask the glow
1742    // to the silhouette of the opaque content so it doesn't fill transparent areas.
1743    if (uHasImageMap > 0.5) {
1744      // Remap glow UVs to image-texture space (glow plane is uGlowPad\xd7 larger)
1745      vec2 imgUv = (vUv - 0.5) * uGlowPad + 0.5;
1746      // Sample alpha at several offsets to dilate the silhouette edge outward
1747      float step = 0.025;
1748      float maxA = 0.0;
1749      for (float dx = -2.0; dx <= 2.0; dx += 1.0) {
1750        for (float dy = -2.0; dy <= 2.0; dy += 1.0) {
1751          vec2 sampleUv = imgUv + vec2(dx, dy) * step;
1752          if (sampleUv.x >= 0.0 && sampleUv.x <= 1.0 && sampleUv.y >= 0.0 && sampleUv.y <= 1.0) {
1753            maxA = max(maxA, texture2D(uImageMap, sampleUv).a);
1754          }
1755        }
1756      }
1757      alpha *= maxA;
1758    }
1759
1760    float colorMul = mix(renderIntensity, min(renderIntensity, 1.1), plasmaMode);
1761    gl_FragColor = vec4(renderColor * colorMul, alpha);
1762  }
1763`,f3=`
1764  uniform float uIntensity;
1765  uniform float uSpeed;
1766  uniform float uScale;
1767  uniform float uTime;
1768  uniform vec3 uColorWarm;
1769  uniform vec3 uColorCool;
1770  uniform vec3 uColorMid;
1771
1772  // --- Simplex 3D noise ---
1773  vec3 mod289(vec3 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; }
1774  vec4 mod289(vec4 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; }
1775  vec4 permute(vec4 x) { return mod289(((x * 34.0) + 10.0) * x); }
1776  vec4 taylorInvSqrt(vec4 r) { return 1.79284291400159 - 0.85373472095314 * r; }
1777
1778  float snoise(vec3 v) {
1779    const vec2 C = vec2(1.0 / 6.0, 1.0 / 3.0);
1780    const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);
1781    vec3 i = floor(v + dot(v, C.yyy));
1782    vec3 x0 = v - i + dot(i, C.xxx);
1783    vec3 g = step(x0.yzx, x0.xyz);
1784    vec3 l = 1.0 - g;
1785    vec3 i1 = min(g.xyz, l.zxy);
1786    vec3 i2 = max(g.xyz, l.zxy);
1787    vec3 x1 = x0 - i1 + C.xxx;
1788    vec3 x2 = x0 - i2 + C.yyy;
1789    vec3 x3 = x0 - D.yyy;
1790    i = mod289(i);
1791    vec4 p = permute(permute(permute(
1792      i.z + vec4(0.0, i1.z, i2.z, 1.0))
1793      + i.y + vec4(0.0, i1.y, i2.y, 1.0))
1794      + i.x + vec4(0.0, i1.x, i2.x, 1.0));
1795    float n_ = 0.142857142857;
1796    vec3 ns = n_ * D.wyz - D.xzx;
1797    vec4 j = p - 49.0 * floor(p * ns.z * ns.z);
1798    vec4 x_ = floor(j * ns.z);
1799    vec4 y_ = floor(j - 7.0 * x_);
1800    vec4 x = x_ * ns.x + ns.yyyy;
1801    vec4 y = y_ * ns.x + ns.yyyy;
1802    vec4 h = 1.0 - abs(x) - abs(y);
1803    vec4 b0 = vec4(x.xy, y.xy);
1804    vec4 b1 = vec4(x.zw, y.zw);
1805    vec4 s0 = floor(b0) * 2.0 + 1.0;
1806    vec4 s1 = floor(b1) * 2.0 + 1.0;
1807    vec4 sh = -step(h, vec4(0.0));
1808    vec4 a0 = b0.xzyw + s0.xzyw * sh.xxyy;
1809    vec4 a1 = b1.xzyw + s1.xzyw * sh.zzww;
1810    vec3 p0 = vec3(a0.xy, h.x);
1811    vec3 p1 = vec3(a0.zw, h.y);
1812    vec3 p2 = vec3(a1.xy, h.z);
1813    vec3 p3 = vec3(a1.zw, h.w);
1814    vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2,p2), dot(p3,p3)));
1815    p0 *= norm.x; p1 *= norm.y; p2 *= norm.z; p3 *= norm.w;
1816    vec4 m = max(0.5 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);
1817    m = m * m;
1818    return 105.0 * dot(m*m, vec4(dot(p0,x0), dot(p1,x1), dot(p2,x2), dot(p3,x3)));
1819  }
1820
1821  void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) {
1822    if (uIntensity < 0.0001) {
1823      outputColor = inputColor;
1824      return;
1825    }
1826
1827    float t = uTime * uSpeed;
1828    float freq = 1.5 * sqrt(uScale);
1829    vec3 pos = vec3(uv * freq, 0.0);
1830
1831    // Two layers of noise at different frequencies for organic complexity
1832    float n1 = snoise(pos + vec3(t * 0.25, t * 0.18, t * 0.12));
1833    float n2 = snoise(pos * 2.1 - vec3(t * 0.15, t * 0.22, t * 0.1));
1834    float n3 = snoise(pos * 3.5 + vec3(t * 0.35, -t * 0.28, t * 0.15));
1835    float warpMask = (n1 * 0.6 + n2 * 0.3 + n3 * 0.1) * 0.5 + 0.5;
1836
1837    // Flowing dark surface: warm and cool tones create a visible heatmap
1838    vec3 surfaceColor = mix(uColorCool, uColorMid, smoothstep(0.2, 0.5, warpMask));
1839    surfaceColor = mix(surfaceColor, uColorWarm, smoothstep(0.5, 0.85, warpMask));
1840
1841    // Additive: paint the flowing surface onto the dark background
1842    vec3 added = surfaceColor * uIntensity;
1843
1844    // Also modulate existing bright content (stars) by the warp pattern
1845    float brightMod = 0.7 + 0.6 * warpMask;
1846    vec3 modulated = inputColor.rgb * mix(1.0, brightMod, uIntensity * 0.4);
1847
1848    outputColor = vec4(modulated + added, inputColor.a);
1849  }
1850`;class f4 extends h7{constructor(e=.35,t=.4,n=3,i,r,a){super("HeatWarpEffect",f3,{uniforms:new Map([["uIntensity",new oq(e)],["uSpeed",new oq(t)],["uScale",new oq(n)],["uTime",new oq(0)],["uColorWarm",new oq(i??new nw(.12,.03,.01))],["uColorCool",new oq(r??new nw(.01,.02,.08))],["uColorMid",new oq(a??new nw(.04,.01,.06))]])})}}function f5({intensity:e,speed:t,scale:n,colorWarm:i,colorCool:r,colorMid:a}){let s=(0,ed.useMemo)(()=>new nw(i),[i]),o=(0,ed.useMemo)(()=>new nw(r),[r]),l=(0,ed.useMemo)(()=>
1850new nw(a),[a]),u=(0,ed.useMemo)(()=>new f4(e,t,n,s,o,l),[e,t,n,s,o,l]);return dq(e=>{u.uniforms.get("uTime").value=e.clock.elapsedTime}),(0,eu.jsx)("primitive",{object:u,dispose:null})}let f6=`
1851  uniform sampler2D uHistoryTexture;
1852
1853  void mainImage(const in vec4 inputColor, const in vec2 uv, out vec4 outputColor) {
1854    outputColor = texture2D(uHistoryTexture, uv);
1855  }
1856`,f8=`
1857  varying vec2 vUv;
1858  void main() {
1859    vUv = uv;
1860    gl_Position = vec4(position.xy, 0.0, 1.0);
1861  }
1862`,f9=`
1863  uniform sampler2D uInputTexture;
1864  uniform sampler2D uHistoryTexture;
1865  uniform float uAmount;
1866  varying vec2 vUv;
1867
1868  void main() {
1869    vec4 current = texture2D(uInputTexture, vUv);
1870    vec4 history = texture2D(uHistoryTexture, vUv);
1871    float amount = clamp(uAmount, 0.0, 0.985);
1872    gl_FragColor = mix(current, history, amount);
1873  }
1874`;class f7 extends h7{targetA;targetB;historyMaterial;historyScene;historyCamera;historyQuad;readFromA;mixAmount;hasHistory;constructor(e=0){const t=new tu(1,1,{minFilter:1006,magFilter:1006,depthBuffer:!1,stencilBuffer:!1});t.texture.name="UniverseMotionBlur.Read";const n=t.clone();n.texture.name="UniverseMotionBlur.Write",super("TemporalMotionBlurEffect",f6,{blendFunction:23,uniforms:new Map([["uHistoryTexture",new oq(t.texture)]])}),this.targetA=t,this.targetB=n,this.historyMaterial=new il({uniforms:{uInputTexture:{value:t.texture},uHistoryTexture:{value:t.texture},uAmount:{value:0}},vertexShader:f8,fragmentShader:f9,depthTest:!1,depthWrite:!1,transparent:!1}),this.historyScene=new iw,this.historyCamera=new s6(-1,1,1,-1,0,1),this.historyQuad=new ie(new a5(2,2),this.historyMaterial),this.historyScene.add(this.historyQuad),this.readFromA=!0,this.mixAmount=0,this.setAmount(e),this.hasHistory=!1}setAmount(e){this.mixAmount=Math.max(0,Math.min(.985,e))}update(e,t){let n=this.mixAmount>1e-4,i=this.readFromA?this.targetA:this.targetB,r=this.readFromA?this.targetB:this.targetA;this.historyMaterial.uniforms.uInputTexture.value=t.texture,this.historyMaterial.uniforms.uHistoryTexture.value=i.texture,this.historyMaterial.uniforms.uAmount.value=this.hasHistory?n?this.mixAmount:.01:0,e.setRenderTarget(r),e.render(this.historyScene,this.historyCamera),this.uniforms.get("uHistoryTexture").value=n?r.texture:t.texture,this.readFromA=!this.readFromA,this.hasHistory=!0}setSize(e,t){this.targetA.setSize(e,t),this.targetB.setSize(e,t),this.hasHistory=!1}initialize(e,t,n){void 0!==n&&(this.targetA.texture.type=n,this.targetB.texture.type=n,1009===n&&e.outputColorSpace===ey&&(this.targetA.texture.colorSpace=ey,this.targetB.texture.colorSpace=ey))}dispose(){super.dispose(),this.historyMaterial.dispose(),this.historyQuad.geometry.dispose(),this.targetA.dispose(),this.targetB.dispose()}}function me({amountRef:e}){let t=(0,ed.useMemo)(()=>new f7(0),[]);return dq(()=>{t.setAmount(e.current)}),(0,eu.jsx)("primitive",{object:t,dispose:null})}let mt=120,mn=5*Math.ceil(3*mt);function mi({cameraZ:e,onInitialLoadProgress:t,settings:n,starMode:i="stream",isResponsePlaying:r=!1,showConstellationLines:a=!1,morphMotionRef:s,morphProgressRef:o,onMorphCycle:l}){let u=(0,ed.useRef)(null),c=(0,ed.useRef)(null),d=(0,ed.useRef)(new Map),h=(0,ed.useRef)(new Map),p=(0,ed.useRef)(new Map),f=(0,ed.useRef)(new Map),m=(0,ed.useRef)(new Set),g=(0,ed.useRef)([]),v=(0,ed.useRef)(new Set),y=(0,ed.useRef)({loaded:-1,total:-1}),x=(0,ed.useRef)(!1),b=(0,ed.useRef)([]),S=(0,ed.useRef)(0),_=(0,ed.useRef)([]),w=(0,ed.useRef)([]),M=(0,ed.useRef)(!1),T=(0,ed.useRef)({srcPos:null,dstPos:null,srcAlpha:null,dstAlpha:null,srcSize:null,dstSize:null,arcX:null,arcY:null,progress:1,active:!1}),E=(0,ed.useRef)(0),A=(0,ed.useMemo)(()=>{let e=3*mt,t=mt*Math.min(n.starDensity,3);return Math.max(1,Math.round(Math.min("constellation"===i?1.6*t:t,e)))},[n.starDensity,i]),C=(0,ed.useMemo)(()=>new il({vertexShader:fJ,fragmentShader:fQ,uniforms:{uTime:{value:0},uStarSize:{value:n.starSize},uStarHue:{value:n.starHue},uGlowIntensity:{value:1.5},uGlowFalloff:{value:2.2},uHaloSize:{value:2},uHaloIntensity:{value:.35},uColorTemperature:{value:.6},uTwinkleSpeed:{value:.5},uTwinkleAmount:{value:.14},uPlasmaEnabled:{value:1},uPlasmaFlicker:{value:n.plasmaFlicker},uPlasmaFlowScale:{value:n.plasmaFlowScale},uPlasmaBlobWarp:{value:n.plasmaBlobWarp},uPlasmaProngStrength:{value:n.plasmaProngStrength},uPlasmaProngWidth:{value:n.plasmaProngWidth},uPlasmaColorMix:{value:n.plasmaColorMix},uPlasmaCoreIntensity:{value:n.plasmaCoreIntensity},uPlasmaHaloIntensity:{value:n.plasmaHaloIntensity},uPlasmaSpeed:{value:n.plasmaSpeed},uAlphaMultiplier:{value:1}},transparent:!0,depthWrite:!1,blending:2}),[]);(0,ed.useEffect)(()=>{let e=C.uniforms;e.uStarSize.value=n.starSize,e.uStarHue.value=n.starHue,e.uPlasmaFlicker.value=n.plasmaFlicker,e.uPlasmaFlowScale.value=n.plasmaFlowScale,e.uPlasmaBlobWarp.value=n.plasmaBlobWarp,e.uPlasmaProngStrength.value=n.plasmaProngStrength,e.uPlasmaProngWidth.value=n.plasmaProngWidth,e.uPlasmaColorMix.value=n.plasmaColorMix,e.uPlasmaCoreIntensity.value=n.plasmaCoreIntensity,e.uPlasmaHaloIntensity.value=n.plasmaHaloIntensity,e.uPlasmaSpeed.value=n.plasmaSpeed,e.uAlphaMultiplier.value=1},[C,n]);let P=(0,ed.useMemo)(()=>{let e=new nQ,t=new nN(new Float32Array(3*mn),3);t.setUsage(35048),e.setAttribute("position",t);let n=new nN(new Float32Array(mn),1);n.setUsage(35048),e.setAttribute("aSize",n);let i=new nN(new Float32Array(mn),1);i.setUsage(35048),e.setAttribute("aSeed",i);let r=new nN(new Float32Array(mn),1);return r.setUsage(35048),e.setAttribute("aAlpha",r),e.setDrawRange(0,0),e.boundingSphere=new tD(new e0(0,0,0),1e6),e},[]),R=(0,ed.useMemo)(()=>{let e=new nQ,t=new nN(new Float32Array(480),3);return t.setUsage(35048),e.setAttribute("position",t),e.setDrawRange(0,0),e.boundingSphere=new tD(new e0(0,0,0),1e6),e},[]),I=(0,ed.useMemo)(()=>new rL({color:new nw(0,.58,.97),transparent:!0,opacity:0,blending:2,depthWrite:!1}),[]),D=(0,ed.useCallback)((e,t=mt)=>{let n=new Float32Array(3*t),i=new Float32Array(t),r=new Float32Array(t),a=24*e;for(let s=0;s<t;s+=1){let t=1e4*e+17.13*s,o=3*s;n[o]=(fq(t+1.1)-.5)*80,n[o+1]=(fq(t+2.2)-.5)*80,n[o+2]=a+24*fq(t+3.3);let l=fq(t+4.4);i[s]=.3+l*l*1.7,r[s]=1e3*fq(t+5.5)}return{positions:n,sizes:i,seeds:r}},[]),L=(0,ed.useCallback)((e,t,n)=>{let i=[];for(let r=e-n;r<=e+t;r+=1)i.push(r);return i},[]),F=(0,ed.useCallback)((e,t)=>[...e].sort((e,n)=>(e<t?1e3+(t-e):e-t)-(n<t?1e3+(t-n):n-t)),[]),N=(0,ed.useCallback)(()=>{let e=P.getAttribute("position"),t=P.getAttribute("aSize"),n=P.getAttribute("aSeed"),i=P.getAttribute("aAlpha"),r=e.array,a=t.array,s=n.array,o=i.array,l=Array.from(d.current.keys()).sort((e,t)=>
1874e-t),u=0,c=0;for(let e of l){let t=d.current.get(e),n=h.current.get(e),i=p.current.get(e),l=f.current.get(e);t&&n&&i&&l&&(r.set(t,u),a.set(n,c),s.set(i,c),o.set(l,c),u+=t.length,c+=n.length)}P.setDrawRange(0,u/3),e.needsUpdate=!0,t.needsUpdate=!0,n.needsUpdate=!0,i.needsUpdate=!0,x.current=!1},[P]),U=(0,ed.useCallback)(()=>{let e=v.current,n=e.size,i=0;for(let t of e)d.current.has(t)&&(i+=1);let r=y.current;(r.loaded!==i||r.total!==n)&&(y.current={loaded:i,total:n},t?.(i,n))},[t]);return(0,ed.useEffect)(()=>{if("stream"!==i)return;let t=Math.floor(e.current/24);c.current=t,d.current.clear(),h.current.clear(),p.current.clear(),f.current.clear(),m.current.clear();let n=L(t,1,0);for(let e of n){let t=D(e,A);d.current.set(e,t.positions),h.current.set(e,t.sizes),p.current.set(e,t.seeds);let n=new Float32Array(A);n.fill(1),f.current.set(e,n)}let r=L(t,4,0);v.current=new Set(r),y.current={loaded:-1,total:-1};let a=new Set(n);g.current=F(r.filter(e=>!a.has(e)),t),x.current=!1,n.length>0&&(x.current=!0,N()),U()},[i,e,L,D,A,F,N,U]),(0,ed.useEffect)(()=>()=>{P.dispose(),C.dispose(),R.dispose(),I.dispose()},[P,C,R,I]),(0,ed.useEffect)(()=>{if("constellation"!==i)return;let r=function(){let e=[...fG];for(let t=e.length-1;t>0;t--){let n=Math.floor(Math.random()*(t+1));[e[t],e[n]]=[e[n],e[t]]}return e}();if(b.current=r,0===r.length)return;let a=P.getAttribute("position"),s=P.getAttribute("aSize"),o=P.getAttribute("aSeed"),l=P.getAttribute("aAlpha"),u=a.array,c=s.array,d=o.array,h=l.array,p=e.current,f=Math.min(1,r.length),m=ma(r.slice(0,f),0,n.constellationScale),g=[],v=0;for(let e=0;e<f;e++){let t=r[e],i=m[e],a=v;for(let e=0;e<t.stars.length;e++){let r=v+e;u[3*r]=t.stars[e].x*n.constellationScale*i.scale+i.x,u[3*r+1]=t.stars[e].y*n.constellationScale*i.scale+i.y,u[3*r+2]=p+30,c[r]=ms(t.stars[e].magnitude),d[r]=1e3*fq(17.3*r),h[r]=mo(t.stars[e].magnitude)}g.push({orderIndex:e,startIdx:a,count:t.stars.length,offsetX:i.x,offsetY:i.y,scale:i.scale}),v+=t.stars.length}S.current=f,_.current=g,w.current=g;let y=v;E.current=y;let x=g.length>0?g.reduce((e,t)=>e+t.offsetX,0)/g.length:0,M=g.length>0?g.reduce((e,t)=>e+t.offsetY,0)/g.length:0;for(let e=y;e<mn;e++){let t=31.7*e+99,n=.4>fq(t+7),i=fq(t)*Math.PI*2,r=Math.acos(2*fq(t+1)-1),a=n?4+18*fq(t+2):15+35*fq(t+2);u[3*e]=(n?x:0)+Math.sin(r)*Math.cos(i)*a,u[3*e+1]=(n?M:0)+Math.sin(r)*Math.sin(i)*a,u[3*e+2]=p+30+(fq(t+3)-.5)*20,c[e]=n?.35+.75*fq(t+4):.55+1.1*fq(t+4),d[e]=1e3*fq(t+5),h[e]=n?.35+.45*fq(t+6):.4+.5*fq(t+6)}let C=Math.min(mn-y,5*A);P.setDrawRange(0,y+C),a.needsUpdate=!0,s.needsUpdate=!0,o.needsUpdate=!0,l.needsUpdate=!0,T.current={srcPos:u.slice(),dstPos:u.slice(),srcAlpha:h.slice(),dstAlpha:h.slice(),srcSize:c.slice(),dstSize:c.slice(),arcX:null,arcY:null,progress:1,active:!1},t?.(1,1)},[i,P]),(0,ed.useEffect)(()=>{if("constellation"===i){if(r&&!M.current&&!T.current.active){let t=b.current;if(0===t.length)return;w.current=_.current;let i=T.current,r=P.getAttribute("position").array,a=P.getAttribute("aAlpha").array,s=P.getAttribute("aSize").array;i.srcPos=r.slice(),i.srcAlpha=a.slice(),i.srcSize=s.slice();let o=e.current,u=new Float32Array(3*mn),c=new Float32Array(mn),d=new Float32Array(mn),h=S.current,p=Math.min(1,t.length),f=[];for(let e=0;e<p;e++)f.push(t[(h+e)%t.length]);let m=ma(f,h,n.constellationScale),g=[],v=0;for(let e=0;e<p;e++){let i=(h+e)%t.length,r=t[i],a=m[e],s=v;for(let e=0;e<r.stars.length;e++){let t=v+e;u[3*t]=r.stars[e].x*n.constellationScale*a.scale+a.x,u[3*t+1]=r.stars[e].y*n.constellationScale*a.scale+a.y,u[3*t+2]=o+30,d[t]=ms(r.stars[e].magnitude),c[t]=mo(r.stars[e].magnitude)}g.push({orderIndex:i,startIdx:s,count:r.stars.length,offsetX:a.x,offsetY:a.y,scale:a.scale}),v+=r.stars.length}S.current=(h+p)%t.length,_.current=g;let y=v;E.current=y;let x=fq(13.7*h)>.5?1:-1,M=n.constellationRotationAngle,A=x*(M+fq(29.3*h)*M*.82),C=Math.cos(A),R=Math.sin(A),I=n.constellationRotationTilt,D=(fq(41.1*h)-.5)*I,L=(fq(53.7*h)-.5)*I,F=Math.sqrt(D*D+L*L+1),N=D/F,U=L/F,k=1/F;for(let e=y;e<mn;e++){let t=i.srcPos[3*e],r=i.srcPos[3*e+1],a=i.srcPos[3*e+2]-(o+30),s=N*t+U*r+k*a,l=U*a-k*r,p=k*t-N*a,f=N*r-U*t,m=7.3*e+19.1
1874*h,g=(fq(m)-.5)*n.constellationStarNudge;u[3*e]=t*C+l*R+N*s*(1-C)+g,u[3*e+1]=r*C+p*R+U*s*(1-C)+g,u[3*e+2]=a*C+f*R+k*s*(1-C)+(o+30),d[e]=i.srcSize[e]*(.97+.06*fq(m+4)),c[e]=i.srcAlpha[e]*(.97+.06*fq(m+5))}i.dstPos=u,i.dstAlpha=c,i.dstSize=d;let B=new Float32Array(mn),O=new Float32Array(mn);for(let e=0;e<mn;e++){let t=3*e,r=u[t]-i.srcPos[t],a=u[t+1]-i.srcPos[t+1],s=r*r+a*a;if(s>.25){let t=Math.sqrt(s),i=fq(17.3*e)>.5?1:-1,o=t*n.constellationArcIntensity*i;B[e]=-a/t*o,O[e]=r/t*o}}i.arcX=B,i.arcY=O,i.progress=0,i.active=!0,l?.()}M.current=r}},[i,r,P,e,l]),dq((t,r)=>{let l=Math.min(r,.1);if(C.uniforms.uTime.value=t.clock.elapsedTime,"constellation"===i){let e=T.current;if(e.active&&e.srcPos&&e.dstPos&&e.srcAlpha&&e.dstAlpha&&e.srcSize&&e.dstSize){var u;let t=Math.max(.2,n.speedMultiplier/3.1);e.progress+=l*t/n.constellationMorphDuration,e.progress>=1&&(e.progress=1,e.active=!1);let i=(u=Math.min(e.progress,1))<.5?4*u*u*u:1-Math.pow(-2*u+2,3)/2,r=Math.min(e.progress,1);s&&(s.current=e.active?r<.5?12*r*r:12*(1-r)*(1-r):0),o&&(o.current=e.active?r:0);let a=P.getAttribute("position"),c=P.getAttribute("aAlpha"),d=P.getAttribute("aSize"),h=a.array,p=c.array,f=d.array,m=Math.sin(Math.PI*r),g=e.arcX&&e.arcY;for(let t=0;t<mn;t++){let n=3*t;h[n]=e.srcPos[n]+(e.dstPos[n]-e.srcPos[n])*i,h[n+1]=e.srcPos[n+1]+(e.dstPos[n+1]-e.srcPos[n+1])*i,h[n+2]=e.srcPos[n+2]+(e.dstPos[n+2]-e.srcPos[n+2])*i,g&&(h[n]+=e.arcX[t]*m,h[n+1]+=e.arcY[t]*m),p[t]=e.srcAlpha[t]+(e.dstAlpha[t]-e.srcAlpha[t])*i,f[t]=e.srcSize[t]+(e.dstSize[t]-e.srcSize[t])*i}a.needsUpdate=!0,c.needsUpdate=!0,d.needsUpdate=!0}else s&&(s.current=0),o&&(o.current=0);let t=T.current,i=b.current;if(a&&i.length>0){let e=P.getAttribute("position").array,r=R.attributes.position.array,a=0,s=[];if(!t.active&&t.progress>=1?(a=.35,s=_.current):t.active&&(t.progress<n.constellationLineFadeOutEnd?(a=(1-t.progress/n.constellationLineFadeOutEnd)*.35,s=w.current):t.progress>n.constellationLineFadeInStart&&(a=.35*((t.progress-n.constellationLineFadeInStart)/(1-n.constellationLineFadeInStart)),s=_.current)),s.length>0&&a>.001){I.opacity=a;let t=0;for(let n of s){let a=i[n.orderIndex];if(a)for(let[i,s]of a.lines){if(t>=80)break;if(i<a.stars.length&&s<a.stars.length){let a=n.startIdx+i,o=n.startIdx+s;r[6*t]=e[3*a],r[6*t+1]=e[3*a+1],r[6*t+2]=e[3*a+2],r[6*t+3]=e[3*o],r[6*t+4]=e[3*o+1],r[6*t+5]=e[3*o+2],t++}}}R.attributes.position.needsUpdate=!0,R.setDrawRange(0,2*t)}else I.opacity=0,R.setDrawRange(0,0)}else I.opacity=0,R.setDrawRange(0,0);let r=E.current,c=Math.min(mn-r,5*A);P.setDrawRange(0,r+c);return}let y=Math.floor(e.current/24);if(y!==c.current){c.current=y;let e=L(y,4,0),t=new Set(e);for(let e of Array.from(d.current.keys()))t.has(e)||(d.current.delete(e),h.current.delete(e),p.current.delete(e),f.current.delete(e),m.current.delete(e),x.current=!0);g.current=g.current.filter(e=>t.has(e));let n=new Set(g.current),i=F(e.filter(e=>!d.current.has(e)&&!n.has(e)),y);g.current.push(...i)}let S=0;for(;S<2&&g.current.length>0;){let e=g.current.shift();if(void 0===e)break;if(d.current.has(e))continue;let t=D(e,A);d.current.set(e,t.positions),h.current.set(e,t.sizes),p.current.set(e,t.seeds);let n=new Float32Array(A);v.current.has(e)?n.fill(1):m.current.add(e),f.current.set(e,n),x.current=!0,S+=1}if(m.current.size>0){let e=Math.min(l,.1)/1.8;for(let t of Array.from(m.current)){let n=f.current.get(t);if(!n){m.current.delete(t);continue}let i=!0;for(let t=0;t<n.length;t++)n[t]<1&&(n[t]=Math.min(1,n[t]+e),n[t]<1&&(i=!1));i&&m.current.delete(t)}x.current=!0}x.current&&N(),U()}),(0,eu.jsxs)(eu.Fragment,{children:[(0,eu.jsx)("points",{ref:u,geometry:P,material:C,renderOrder:0}),"constellation"===i&&(0,eu.jsx)("lineSegments",{geometry:R,material:I,renderOrder:1})]})}function mr(e,t=22){let n=1/0,i=-1/0,r=1/0,a=-1/0;for(let s of e.stars){let e=s.x*t,o=s.y*t;e<n&&(n=e),e>i&&(i=e),o<r&&(r=o),o>a&&(a=o)}return{cx:(n+i)/2,cy:(r+a)/2,hw:(i-n)/2,hh:(a-r)/2}}function ma(e,t,n=22){if(1===e.length){let i=mr(e[0],n),r=(fq(7.13*t)-.5)*8,a=(fq(11.3*t)-.5)*6;return[{x:-i.cx+r,y:-i.cy+a,scale:1}]}let i=e.map(e=>mr(e,n)),r=[],a=[];for(let n=0;n<e.length;n++){let e=i[n],s=0,o=0,l=1/0;for(let i=0;i<40;i++){let a=(fq(7.13*t+31.7*n+3.1*i)-.5)*30,u=(fq(11.3*t+47.3*n+5.3*i)-.5)*20,c=e.cx+a,d=e.cy+u,h=0;for(let t of r){let n=e.hw+t.hw+3-Math.abs(c-t.wcx),i=e.hh+t.hh+3-Math.abs(d-t.wcy);n>0&&i>0&&(h=Math.max(h,Math.min(n,i)))}if(0===h){s=a,o=u,l=0;break}h<l&&(l=h,s=a,o=u)}r.push({wcx:e.cx+s,wcy:e.cy+o,hw:e.hw,hh:e.hh}),a.push({x:s,y:o,scale:1})}return a}function ms(e){return Math.max(1,3.5-.3*e)}function mo(e){return Math.max(.75,Math.min(1,1.5-.1*e))}function ml(e,t){return new il({vertexShader:f1,fragmentShader:f2,transparent:!0,depthWrite:!1,blending:2,side:0,toneMapped:!1,uniforms:{uTime:{value:0},uOpacity:{value:0},uSeed:{value:t},uColor:{value:new nw(e)},uAspect:{value:1},uGlowIntensity:{value:1.5},uGlowFalloff:{value:2.2},uHaloIntensity:{value:.35},uPlasmaEnabled:{value:0},uPlasmaFlicker:{value:0},uPlasmaFlowScale:{value:1},uPlasmaBlobWarp:{value:1},uPlasmaProngStrength:{value:1},uPlasmaProngWidth:{value:1},uPlasmaColorMix:{value:1},uPlasmaCoreIntensity:{value:1},uPlasmaHaloIntensity:{value:1},uPlasmaSpeed:{value:1},uImageMap:{value:null},uHasImageMap:{value:0},uGlowPad:{value:1.5}}})}function mu({entry:e,isActive:t,activeCount:n,anyActive:i,isBackgroun
1874dSelected:r=!0,galleryOffset:a,floatSeed:s,tunnelPosition:o,cameraZ:l,totalDepth:u,imageRippleSettings:c,starSettings:d,onTextureSettled:h,onClick:p,meshPointerDown:f,starMode:m="stream"}){let g=(0,ed.useRef)(null),v=(0,ed.useRef)(null),y=(0,ed.useRef)(null),x=(0,ed.useRef)(null),[b,S]=(0,ed.useState)(null),_=(0,ed.useMemo)(()=>ml("#228fff",s),[s]),w=(0,ed.useMemo)(()=>ml("#79d0ff",s+.5),[s]),M=(0,ed.useRef)(null),T=(0,ed.useRef)(!1),E=(0,ed.useRef)(window.innerWidth<768),A=(0,ed.useRef)(0),C=(0,ed.useRef)(1),P=(0,ed.useRef)(t);P.current=t;let R=(0,ed.useRef)(o.z),I=(0,ed.useRef)(o.x),D=(0,ed.useRef)(o.y),L=(0,ed.useRef)(new e0(o.x,o.y,o.z));if((0,ed.useEffect)(()=>{I.current=o.x,D.current=o.y,R.current=o.z,P.current||(L.current.set(o.x,o.y,o.z),A.current=0)},[o.x,o.y,o.z]),(0,ed.useEffect)(()=>{let e=(e,t)=>{let n=e.uniforms;n.uColor.value.set(t),n.uGlowIntensity.value=d.imageGlowIntensity,n.uGlowFalloff.value=d.imageGlowFalloff,n.uHaloIntensity.value=d.imageGlowHaloIntensity,n.uPlasmaEnabled.value=+!!d.imageGlowPlasmaEnabled,n.uPlasmaFlicker.value=d.imageGlowPlasmaFlicker,n.uPlasmaFlowScale.value=d.imageGlowPlasmaFlowScale,n.uPlasmaBlobWarp.value=d.imageGlowPlasmaBlobWarp,n.uPlasmaProngStrength.value=d.imageGlowPlasmaProngStrength,n.uPlasmaProngWidth.value=d.imageGlowPlasmaProngWidth,n.uPlasmaColorMix.value=d.imageGlowPlasmaColorMix,n.uPlasmaCoreIntensity.value=d.imageGlowPlasmaCoreIntensity,n.uPlasmaHaloIntensity.value=d.imageGlowPlasmaHaloIntensity,n.uPlasmaSpeed.value=1};e(_,d.imageGlowColorPrimary),e(w,d.imageGlowColorSecondary)},[_,w,d.imageGlowIntensity,d.imageGlowFalloff,d.imageGlowHaloIntensity,d.imageGlowPlasmaEnabled,d.imageGlowPlasmaFlicker,d.imageGlowPlasmaFlowScale,d.imageGlowPlasmaBlobWarp,d.imageGlowPlasmaProngStrength,d.imageGlowPlasmaProngWidth,d.imageGlowPlasmaColorMix,d.imageGlowPlasmaCoreIntensity,d.imageGlowPlasmaHaloIntensity,d.imageGlowColorPrimary,d.imageGlowColorSecondary]),(0,ed.useEffect)(()=>()=>{_.dispose(),w.dispose()},[_,w]),(0,ed.useEffect)(()=>{let t=!1,n=!1,i=()=>{n||(n=!0,h?.(e.id))};return new sZ().load(e.src,e=>{t?e.dispose():(e.minFilter=1006,e.magFilter=1006,e.generateMipmaps=!1,M.current?.dispose(),M.current=e,S(e),i())},void 0,()=>{i()}),()=>{t=!0,M.current?.dispose(),M.current=null}},[e.id,e.src,h]),(0,ed.useEffect)(()=>{let t=M.current?.image;if(!t||!t.height)return;let n=t.width/t.height;_.uniforms.uAspect.value=n,w.uniforms.uAspect.value=n;let i=!!e.productUrl;_.uniforms.uHasImageMap.value=+!!i,w.uniforms.uHasImageMap.value=+!!i,i&&M.current&&(_.uniforms.uImageMap.value=M.current,w.uniforms.uImageMap.value=M.current)},[b,_,w,e.productUrl]),dq((o,d)=>{let h,p,f,b,S,M=Math.min(d,.1);if(!g.current||!v.current)return;let P=o.camera,F=l.current,N=o.clock.elapsedTime;if("constellation"!==m&&!t&&R.current<F-30){R.current+=u;let e=fq(.37*R.current+s)*Math.PI*2,t=mv+fq(.13*R.current+s)*(my-mv);I.current=Math.cos(e)*t,D.current=Math.sin(e)*t,L.current.set(I.current,D.current,R.current),A.current=0}let U=Math.abs(R.current-F);if(!t&&A.current<=.002&&U>140){g.current.visible=!1,y.current&&(y.current.visible=!1),x.current&&(x.current.visible=!1);return}if(g.current.quaternion.copy(P.quaternion),t&&a){h=P.position.x+a.x,p=P.position.y+a.y,f=F+a.z,b=1;let e=E.current?2===n?.86:n>=3?.78:1:1;S=T.current?(E.current?.95:1.08)*e:(E.current?.85:1)*e}else{let e=.4*Math.sin(.2*N+6.28*s),t=.4*Math.cos(.15*N+4.17*s);h=I.current+e,p=D.current+t,f=R.current;let n=1-Math.min(1,Math.max(0,(U-50)/70));"constellation"===m&&i?(f+=r?0:mb,b=(r?mx:0)*n,S=T.current?1.08:r?.74:.7):(b=(i?E.current?.06:.15:.7)*n,S=T.current?1.12:i?.7:1)}let k=t?"constellation"===m?m_:mS:mw,B=(h-L.current.x)*M*k,O=(p-L.current.y)*M*k,z=(f-L.current.z)*M*k;if(t&&"constellation"===m){let e=mM*M,t=Math.sqrt(B*B+O*O+z*z);if(t>e&&t>1e-4){let n=e/t;L.current.x+=B*n,L.current.y+=O*n,L.current.z+=z*n}else L.current.x+=B,L.current.y+=O,L.current.z+=z}else L.current.x+=B,L.current.y+=O,L.current.z+=z;g.current.position.copy(L.current);let H="constellation"===m&&i&&!t?2.2:3;A.current+=(b-A.current)*M*H,C.current+=(S-C.current)*M*H,g.current.scale.setScalar(C.current);let V=v.current.material;V&&(.01>Math.abs(b-A.current)&&(A.current=b),V.opacity=A.current,V.depthTest=!t),v.current.renderOrder=999*!!t;let G=t||A.current>.002;if(g.current.visible=G,!G){y.current&&(y.current.visible=!1),x.current&&(x.current.visible=!1);return}if(c.enabled){let n=y.current,r=x.current;if(!n||!r)return;let a=!!e.productUrl,o=t?1:i?.76:.9,l=A.current*c.intensity*o,u=l>.001&&!a;if(n.visible=u,r.visible=u,!u)return;let d=N*c.speed,h=.5+.5*Math.sin(d*c.frequency+7.13*s),p=.5+.5*Math.sin(d*(1.67*c.frequency)+11.7*s+1.4),f=c.spread,m=c.pulse,g=1+f*(1.2+.45*h)+(h-.5)*m*.18,v=1+f*(1.9+.65*p)+(p-.5)*m*.28;n.scale.set(g,g,1),r.scale.set(v,v,1),_.uniforms.uTime.value=N,_.uniforms.uOpacity.value=l*(.24+.44*h),w.uniforms.uTime.value=N,w.uniforms.uOpacity.value=.7*l*(.16+.36*p)}}),!b)return null;let F=b.image,N=10*(F?F.width/F.height:1),U=1.5*N,k=t||!i;return(0,eu.jsxs)("group",{ref:g,position:[o.x,o.y,o.z],onPointerOver:k?()=>{T.current=!0}:void 0,onPointerOut:k?()=>{T.current=!1}:void 0,onPointerDown:k?e=>{e.stopPropagation(),f.current=!0}:void 0,onClick:k?e=>{e.stopPropagation(),p()}:void 0,children:[(0,eu.jsxs)("mesh",{ref:v,renderOrder:0,children:[(0,eu.jsx)("planeGeometry",{args:[N,10]}),(0,eu.jsx)("meshBasicMaterial",{map:b,transparent:!0,opacity:0,side:0,depthTest:!0,depthWrite:!0})]}),c.enabled&&(0,eu.jsxs)(eu.Fragment,{children:[(0,eu.jsx)("mesh",{ref:y,renderOrder:1,position:[0,0,-.04],material:_,raycast:()=>{},children:(0,eu.jsx)("planeGeometry",{args:[U,15]})}),(0,eu.jsx)("mesh",{ref:x,renderOrder:1,position:[0,0,-.06],material:w,raycast:()=>{},children:(0,eu.jsx)("planeGeometry",{args:[U,15]})})]})]})}function mc({speed:e,cameraZ:t,mouse:n,scrollSpeed:i,mouseHeld:r,isPau
1874sed:a,starMode:s="stream"}){let{camera:o}=dX(),l=(0,ed.useRef)({x:0,y:0}),u=(0,ed.useRef)(0),c=(0,ed.useRef)(0);return dq((d,h)=>{let p=Math.min(h,.1);if(a)return;let f=d.clock.elapsedTime;u.current+=(i.current-u.current)*Math.min(1,3*p);let m=18*!!r.current,g=r.current?2.5:4;c.current+=(m-c.current)*Math.min(1,p*g),!r.current&&c.current<.05&&(c.current=0);let v=e+u.current+c.current;"constellation"!==s&&(t.current+=v*p),o.position.z=t.current;let y=1-Math.pow(.03,p);l.current.x+=(n.current.x-l.current.x)*y,l.current.y+=(n.current.y-l.current.y)*y;let x="constellation"===s?e/3.1:1,b=1.5*Math.sin(.15*f*x)*x+6*l.current.x,S=Math.cos(.1*f*x)*x-6*l.current.y;o.position.x=b,o.position.y=S,o.lookAt(b+3*l.current.x+.5*Math.sin(.08*f),S-3*l.current.y+.3*Math.cos(.06*f),t.current+30)},-1),null}let md=new eQ,mh=`
1875  varying vec2 vUv;
1876  void main() {
1877    vUv = uv;
1878    gl_Position = vec4(position.xy, -1.0, 1.0);
1879  }
1880`,mp=`
1881  uniform sampler2D uBackdrop;
1882  uniform float uLensWarp;
1883  varying vec2 vUv;
1884  void main() {
1885    vec2 centered = vUv - 0.5;
1886    float r2 = dot(centered, centered);
1887    float distortion = 1.0 - uLensWarp * r2 - uLensWarp * 0.5 * r2 * r2;
1888    vec2 distortedUv = clamp(0.5 + centered * distortion, 0.0, 1.0);
1889    gl_FragColor = texture2D(uBackdrop, distortedUv);
1890  }
1891`;function mf({imageUrl:e,opacity:t,scale:n=1,offsetX:i=0,offsetY:r=0,scrollSpeed:a,mouseHeld:s,morphMotionRef:o,isResponsePlaying:l,settings:u,lensWarpRef:c}){let{gl:d,camera:h}=dX(),p=(0,ed.useRef)(null),f=(0,ed.useRef)(null),[m,g]=(0,ed.useState)(null),v=(0,ed.useRef)(0),{privateScene:y,backdropMesh:x,renderTarget:b}=(0,ed.useMemo)(()=>{let e=new tu(1,1,{minFilter:1006,magFilter:1006,type:ev,depthBuffer:!1,stencilBuffer:!1});e.texture.name="UniverseBackdrop.RT";let t=new iw,n=new ie;return n.renderOrder=-1e3,n.scale.set(420,420,420),t.add(n),{privateScene:t,backdropMesh:n,renderTarget:e}},[]);(0,ed.useEffect)(()=>{let e=new a9(1,64,32);return x.geometry=e,()=>{e.dispose()}},[x]),(0,ed.useEffect)(()=>{let t=!1;if(!e){f.current?.dispose(),f.current=null,g(null);return}return new sZ().load(e,e=>{t?e.dispose():(e.colorSpace=ey,e.minFilter=1006,e.magFilter=1006,e.generateMipmaps=!1,e.wrapS=1e3,f.current?.dispose(),f.current=e,g(e))},void 0,()=>{t||(f.current?.dispose(),f.current=null,g(null))}),()=>{t=!0}},[e]),(0,ed.useEffect)(()=>()=>{f.current?.dispose(),f.current=null},[]);let S=(0,ed.useMemo)(()=>{let e=1/n;return{repeat:new eQ(e,e),offset:new eQ((1-e)/2+i,(1-e)/2+r)}},[n,i,r]),_=(0,ed.useMemo)(()=>new il({vertexShader:f$,fragmentShader:f0,uniforms:{uTime:{value:0},uMap:{value:null},uOpacity:{value:t},uBreathAmount:{value:0},uBreathSpeed:{value:u?.backdropBreathSpeed??1.04},uWarpIntensity:{value:0},uWarpSpeed:{value:u?.backdropWarpSpeed??.23},uWarpScale:{value:u?.backdropWarpScale??5.9},uRepeat:{value:S.repeat.clone()},uOffset:{value:S.offset.clone()}},side:1,transparent:!0,depthWrite:!1,depthTest:!1,toneMapped:!1}),[]);(0,ed.useEffect)(()=>{x.material=_},[x,_]);let w=(0,ed.useMemo)(()=>new il({vertexShader:mh,fragmentShader:mp,uniforms:{uBackdrop:{value:b.texture},uLensWarp:{value:0}},transparent:!0,depthWrite:!1,depthTest:!1,toneMapped:!1}),[]);return((0,ed.useEffect)(()=>{w.uniforms.uBackdrop.value=b.texture},[w,b]),(0,ed.useEffect)(()=>{_&&m&&(_.uniforms.uMap.value=m)},[_,m]),(0,ed.useEffect)(()=>{_&&(_.uniforms.uRepeat.value.copy(S.repeat),_.uniforms.uOffset.value.copy(S.offset))},[_,S]),(0,ed.useEffect)(()=>()=>{b.dispose(),_.dispose(),w.dispose(),x.geometry?.dispose()},[b,_,w,x]),dq((e,n)=>{let i=Math.min(n,.1);if(!_)return;x.position.copy(h.position),u&&(_.uniforms.uBreathSpeed.value=u.backdropBreathSpeed,_.uniforms.uWarpSpeed.value=u.backdropWarpSpeed,_.uniforms.uWarpScale.value=u.backdropWarpScale),_.uniforms.uOpacity.value=t;let r=u?.backdropWarpAlways??!1,p=o?o.current:0,f=u?.backdropWarpAmount??.072,m=u?.backdropBreathAmount??.042,g=0,S=1-Math.exp(-((g=r?(a?Math.abs(a.current):0)+18*!!s?.current+14*p>.5?1:.15:+!!(p>.05||l))>v.current?6:2)*i);v.current+=(g-v.current)*S,_.uniforms.uTime.value+=i*v.current,_.uniforms.uWarpIntensity.value=.15*f,_.uniforms.uBreathAmount.value=.15*m,w.uniforms.uLensWarp.value=c?.current??0;let M=d.getSize(md),T=d.getPixelRatio(),E=Math.round(M.x*T),A=Math.round(M.y*T);(b.width!==E||b.height!==A)&&b.setSize(E,A);let C=d.getRenderTarget(),P=d.getClearAlpha();d.setClearAlpha(0),d.setRenderTarget(b),d.clear(),d.render(y,h),d.setRenderTarget(C),d.setClearAlpha(P)}),!m||t<=0)?null:(0,eu.jsxs)("mesh",{ref:p,renderOrder:-1e3,frustumCulled:!1,children:[(0,eu.jsx)("planeGeometry",{args:[2,2]}),(0,eu.jsx)("primitive",{object:w,attach:"material"})]})}function mm({item:e,isActive:t,anyActive:n,galleryOffset:i,floatSeed:r,tunnelPosition:a,cameraZ:s,totalDepth:o,onClick:l,onComplete:u,meshPointerDown:c,starMode:d="stream"}){let h=(0,ed.useRef)(null),p=(0,ed.useRef)(null),f=(0,ed.useRef)(null),m=(0,ed.useRef)(window.innerWidth<768),g=(0,ed.useRef)(0),v=(0,ed.useRef)(1),y=(0,ed.useRef)(.38),x=(0,ed.useRef)(t);x.current=t;let b=(0,ed.useMemo)(()=>"undefined"!=typeof document?{current:document.body}:void 0,[]),S=(0,ed.useRef)(a.z),_=(0,ed.useRef)(a.x),w=(0,ed.useRef)(a.y),M=(0,ed.useRef)(new e0(a.x,a.y,a.z)),[T,E]=(0,ed.useState)(new Set),[A,C]=(0,ed.useState)(!1),[P,R]=(0,ed.useState)(!1);(0,ed.useEffect)(()=>{t||(E(new Set),C(!1),R(!1))},[t]),(0,ed.useEffect)(()=>{_.current=a.x,w.current=a.y,S.current=a.z,x.current||(M.current.set(a.x,a.y,a.z),g.current=0)},[a.x,a.y,a.z]),dq((e,a)=>{let l,u,c,x,b;if(!h.current)return;let T=Math.min(a,.1),E=e.camera,A=s.current,C=e.clock.elapsedTime;if("constellation"!==d&&!t&&S.current<A-30){S.current+=o;let e=fq(.37*S.current+r)*Math.PI*2,t=mv+fq(.13*S.current+r)*(my-mv);_.current=Math.cos(e)*t,w.current=Math.sin(e)*t,M.current.set(_.current,w.current,S.current),g.current=0}let P=Math.abs(S.current-A);
1891if(h.current.quaternion.copy(E.quaternion),t&&i)l=E.position.x+i.x,u=E.position.y+i.y,c=A+i.z,x=1,b=m.current?.85:1;else{let e=.4*Math.sin(.2*C+6.28*r),t=.4*Math.cos(.15*C+4.17*r);l=_.current+e,u=w.current+t,c=S.current;let i=1-Math.min(1,Math.max(0,(P-50)/70));x=(n?m.current?.06:.15:.7)*i,b=n?.7:1}let R=t?mS:mw;M.current.x+=(l-M.current.x)*T*R,M.current.y+=(u-M.current.y)*T*R,M.current.z+=(c-M.current.z)*T*R,h.current.position.copy(M.current),g.current+=(x-g.current)*T*3,v.current+=(b-v.current)*T*3,.01>Math.abs(x-g.current)&&(g.current=x),h.current.scale.setScalar(v.current);let I=t||g.current>.002;h.current.visible=I,p.current&&(p.current.style.opacity=g.current.toFixed(3));let D=.38;if(t&&i){let e=E.position.x+i.x,t=E.position.y+i.y,n=A+i.z;D=.38+.62*Math.min(1,Math.max(0,1-Math.sqrt((M.current.x-e)**2+(M.current.y-t)**2+(M.current.z-n)**2)/30))}y.current+=(D-y.current)*T*8,.002>Math.abs(D-y.current)&&(y.current=D),f.current&&(f.current.style.transform=`translateZ(0) scale(${y.current.toFixed(4)})`)});let I=t||!n,D=(0,ed.useCallback)(e=>{A||P||E(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[A,P]),L=(0,ed.useCallback)(()=>{A||P||0===T.size||(C(!0),setTimeout(()=>{C(!1),R(!0),setTimeout(()=>u?.(),800)},1500))},[A,P,T.size,u]);return(0,eu.jsx)("group",{ref:h,visible:!1,position:[a.x,a.y,a.z],onPointerDown:I?e=>{e.stopPropagation(),c.current=!0}:void 0,onClick:I&&!t?e=>{e.stopPropagation(),l()}:void 0,children:(0,eu.jsx)(hH,{ref:p,transform:!0,center:!0,distanceFactor:30,occlude:!1,style:{opacity:g.current,pointerEvents:t||I?"auto":"none",willChange:"opacity"},zIndexRange:t?[100,0]:[0,0],portal:b,children:(0,eu.jsx)("div",{ref:f,onClick:t?void 0:e=>{e.stopPropagation(),l()},style:{width:"wide-grid"===e.variant?420:300,transform:`translateZ(0) scale(${y.current})`,transformOrigin:"center center",backfaceVisibility:"hidden",willChange:"transform",cursor:t?"default":"pointer",background:"#fff",borderRadius:8,boxShadow:t?"0 16px 64px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,0,0,0.08)":"0 4px 24px rgba(0,0,0,0.35), 0 0 0 1px rgba(0,0,0,0.08)",overflow:"hidden",fontFamily:"'Helvetica Neue', Helvetica, Arial, sans-serif"},children:"slider"===e.variant?(0,eu.jsx)("img",{src:"/images/captcha/slider-complete.png",alt:"",style:{width:"100%",display:"block",borderRadius:8},draggable:!1}):"card-grid"===e.variant?(0,eu.jsxs)(eu.Fragment,{children:[(0,eu.jsxs)("div",{style:{background:"#4285f4",padding:"14px 16px 10px"},children:[(0,eu.jsx)("div",{style:{fontSize:13,color:"#fff",marginBottom:2},children:"Select"}),(0,eu.jsx)("div",{style:{fontSize:20,fontWeight:700,color:"#fff",lineHeight:1.2},children:"THE ONE"}),(0,eu.jsx)("div",{style:{fontSize:11,color:"rgba(255,255,255,0.75)",marginTop:4},children:"Click verify once you selected your card"})]}),(0,eu.jsxs)("div",{style:{position:"relative",background:"#e8e8e8"},children:[(0,eu.jsx)("img",{src:"/images/captcha/card-grid.png",alt:"",style:{width:"100%",display:"block"},draggable:!1}),(0,eu.jsx)("div",{style:{position:"absolute",inset:0,display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gridTemplateRows:"repeat(3, 1fr)"},children:Array.from({length:12},(e,n)=>{let i=T.has(n);return(0,eu.jsx)("div",{onClick:t?e=>{e.stopPropagation(),D(n)}:void 0,style:{cursor:!t||A||P?"default":"pointer",outline:i?"3px solid #4285f4":"none",outlineOffset:-3,borderRadius:8,transition:"outline 100ms ease",position:"relative"},children:i&&(0,eu.jsx)("div",{style:{position:"absolute",bottom:6,right:6,width:20,height:20,borderRadius:10,background:"#34a853",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,eu.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#fff",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:(0,eu.jsx)("polyline",{points:"20 6 9 17 4 12"})})})},n)})})]}),(0,eu.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 10px",borderTop:"1px solid #e0e0e0"},children:[(0,eu.jsxs)("div",{style:{display:"flex",gap:12},children:[(0,eu.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"#888",strokeWidth:"2",children:[(0,eu.jsx)("path",{d:"M23 4v6h-6"}),(0,eu.jsx)("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"})]}),(0,eu.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"#888",strokeWidth:"2",children:[(0,eu.jsx)("path",{d:"M3 18v-6a9 9 0 0 1 18 0v6"}),(0,eu.jsx)("path",{d:"M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z"})]}),(0,eu.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"#888",strokeWidth:"2",children:[(0,eu.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,eu.jsx)("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),(0,eu.jsx)("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})]}),(0,eu.jsxs)("button",{onClick:t?e=>
1891{e.stopPropagation(),L()}:void 0,disabled:0===T.size||A||P,style:{padding:"8px 18px",borderRadius:4,border:"none",background:P?"#34a853":"#4285f4",color:"#fff",fontWeight:700,fontSize:13,textTransform:"uppercase",letterSpacing:"0.04em",cursor:t&&T.size>0&&!A&&!P?"pointer":"default",opacity:0!==T.size||P?1:.6,transition:"all 150ms ease",display:"flex",alignItems:"center",gap:6},children:[P?"✓ Verified":A?"Verifying...":"VERIFY",!P&&!A&&(0,eu.jsx)("span",{style:{fontSize:14},children:"✦"})]})]})]}):(0,eu.jsxs)(eu.Fragment,{children:[(0,eu.jsxs)("div",{style:{background:"#4285f4",padding:"14px 16px 10px"},children:[e.subPrompt&&(0,eu.jsx)("div",{style:{fontSize:13,color:"#fff",marginBottom:2},children:e.subPrompt}),(0,eu.jsx)("div",{style:{fontSize:20,fontWeight:700,color:"#fff",lineHeight:1.2},children:e.prompt}),(0,eu.jsx)("div",{style:{fontSize:11,color:"rgba(255,255,255,0.75)",marginTop:4},children:"If there are none, click skip"})]}),(0,eu.jsx)("div",{style:{display:"grid",gridTemplateColumns:`repeat(${e.gridCols}, 1fr)`,gap:0,padding:0},children:Array.from({length:e.gridCols*e.gridRows},(n,i)=>{let r=T.has(i),a="wide-grid"===e.variant?"choir":"revival";return(0,eu.jsx)("div",{onClick:t?e=>{e.stopPropagation(),D(i)}:void 0,style:{aspectRatio:"wide-grid"===e.variant?"199 / 196":"221 / 257",backgroundImage:`url(/images/captcha/${a}/cell-${i}.jpg)`,backgroundSize:"100% 100%",backgroundPosition:"center",cursor:!t||A||P?"default":"pointer",position:"relative",outline:r?"3px solid #4285f4":"none",outlineOffset:-3,transition:"outline 100ms ease"},children:r&&(0,eu.jsx)("div",{style:{position:"absolute",bottom:4,left:"wide-grid"===e.variant?4:"50%",transform:"wide-grid"===e.variant?"none":"translateX(-50%)",width:20,height:20,borderRadius:10,background:"#34a853",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,eu.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#fff",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:(0,eu.jsx)("polyline",{points:"20 6 9 17 4 12"})})})},i)})}),(0,eu.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 10px",borderTop:"1px solid #e0e0e0"},children:[(0,eu.jsxs)("div",{style:{display:"flex",gap:12},children:[(0,eu.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"#888",strokeWidth:"2",children:[(0,eu.jsx)("path",{d:"M23 4v6h-6"}),(0,eu.jsx)("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"})]}),(0,eu.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"#888",strokeWidth:"2",children:[(0,eu.jsx)("path",{d:"M3 18v-6a9 9 0 0 1 18 0v6"}),(0,eu.jsx)("path",{d:"M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z"})]}),(0,eu.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"#888",strokeWidth:"2",children:[(0,eu.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,eu.jsx)("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),(0,eu.jsx)("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]})]}),(0,eu.jsxs)("button",{onClick:t?e=>{e.stopPropagation(),L()}:void 0,disabled:0===T.size||A||P,style:{padding:"8px 18px",borderRadius:4,border:"none",background:P?"#34a853":"#4285f4",color:"#fff",fontWeight:700,fontSize:13,textTransform:"uppercase",letterSpacing:"0.04em",cursor:t&&T.size>0&&!A&&!P?"pointer":"default",opacity:0!==T.size||P?1:.6,transition:"all 150ms ease",display:"flex",alignItems:"center",gap:6},children:[P?"✓ Verified":A?"Verifying...":"VERIFY",!P&&!A&&(0,eu.jsx)("span",{style:{fontSize:14},children:"✦"})]})]})]})})})})}let mg=[{id:"captcha-1",variant:"wide-grid",subPrompt:"Select all the squares with",prompt:"find the one",gridCols:8,gridRows:3,gridKey:[0,4,13,17,23]},{id:"captcha-2",variant:"slider",prompt:"Slide to complete the scene.",gridCols:0,gridRows:0,gridKey:[]},{id:"captcha-3",variant:"wide-grid",subPrompt:"Select all the squares with",prompt:"find the one",gridCols:8,gridRows:3,gridKey:[0,4,13,17,23]},{id:"captcha-4",variant:"tall-grid",subPrompt:"Select all the squares where",prompt:"the spirit is moving",gridCols:4,gridRows:4,gridKey:[2,5,9,12,15]},{id:"captcha-5",variant:"wide-grid",subPrompt:"Select all the squares with",prompt:"find the one",gridCols:8,gridRows:3,gridKey:[0,4,13,17,23]},{id:"captcha-6",variant:"tall-grid",subPrompt:"Select all the squares where",prompt:"the spirit is moving",gridCols:4,gridRows:4,gridKey:[2,5,9,12,15]},{id:"captcha-7",variant:"card-grid",subPrompt:"Select",prompt:"THE ONE",gridCols:4,gridRows:3,gridKey:[1,5,8,11]},{id:"captcha-8",variant:"card-grid",subPrompt:"Select",prompt:"THE ONE",gridCols:4,gridRows:3,gridKey:[1,5,8,11]}],mv=20,my=80,mx=.11,mb=36,mS=2.5,m_=2.2,mw=1.8,mM=480;function mT({images:e,activeFolders:t,isResponsePlaying:n,isPaused:i,onFolderSelect:r,onProductClick:a,onImagesLoadProgress:s,onStarsLoadProgress:o,shopifyImages:l,mouse:u,scrollSpeed:c,mouseHeld:d,meshPointerDown:h,priorityImageId:p,priorityProductTitle:f,selectionSeed:m,folderMap:g,starSettings:v,backgroundImageUrl:y,backgroundImageOpacity:x,backgroundImageScale:b,backgroundImageOffsetX:S,backgroundImageOffsetY:_,hideStars:w,hideImages:M,starMode:T="stream",showConstellationLine
1891s:E=!0,showSummaryScreen:A,onStreamingPlatformClick:C,onProductFolderVisibilityChange:P,productExcludeImageIds:R,captchaPreview:I,onCaptchaComplete:D,captchaDeselectRef:L}){let F=(0,ed.useRef)(0),[N,U]=(0,ed.useState)(window.innerWidth<768),[k,B]=(0,ed.useState)(window.innerHeight/Math.max(1,window.innerWidth));(0,ed.useEffect)(()=>{let e=()=>{U(window.innerWidth<768),B(window.innerHeight/Math.max(1,window.innerWidth))};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);let O=400/Math.max(.25,v.photoDensity),z=v.galleryDistance,H=(0,ed.useRef)(!1);A&&(H.current=!0);let V=("constellation"===T?1.5:n?2:1.5)*v.speedMultiplier,[G]=(0,ed.useState)(m),j=(0,ed.useRef)(new Set),W=(0,ed.useRef)(0),X=(0,ed.useRef)(0),[q,Y]=(0,ed.useState)(0),Z=(0,ed.useCallback)(()=>{Y(e=>e+1)},[]),K=(0,ed.useRef)(0),J=(0,ed.useRef)(0);dq(()=>{let e=Math.abs(c.current)+18*!!d.current+22*W.current,t=Math.min(1,e/20);if(i||!v.motionBlurEnabled)K.current=0;else{let{motionBlurStrength:e,motionBlurPersistence:n}=v,i=t*(.4+.4*e+.15*n),r=K.current;K.current=Math.min(.985,r+(i-r)*(i>r?.15:.04))}let n=v.lensWarpStrength,r=Math.min(1,("constellation"===T?Math.abs(c.current)+22*W.current:e)/20),a="constellation"===T;if(i||n<1e-4)J.current*=.97;else{let e=r*r*n*(a?.15:1),t=J.current;J.current=t+(e-t)*(e>t?.04:.02)}});let Q=(0,ed.useMemo)(()=>{let t=e.map(e=>({img:e,key:fq(.001*fY(e.id)+13.7*G)}));return t.sort((e,t)=>e.key-t.key),t.map(e=>e.img)},[e,G]),$=(0,ed.useMemo)(()=>Q.map((e,t)=>{let n=t+1,i=fq(127.1*n)*Math.PI*2,r=mv+fq(269.5*n)*(my-mv);return{entry:e,tunnelPosition:new e0(Math.cos(i)*r,Math.sin(i)*r,t/Q.length*O+(fq(311.7*n)-.5)*8),floatSeed:fq(43.2*n)}}),[Q,O]),ee=(0,ed.useMemo)(()=>I?mg.map((e,t)=>{let n=($.length+t+1)*7,i=fq(127.1*n)*Math.PI*2,r=mv+fq(269.5*n)*(my-mv);return{item:e,tunnelPosition:new e0(Math.cos(i)*r,Math.sin(i)*r,(t+1)/(mg.length+1)*O*.3+8*fq(311.7*n)),floatSeed:fq(43.2*n)}}):[],[I,$.length,O]),[et,en]=(0,ed.useState)(null);(0,ed.useEffect)(()=>(L&&(L.current=()=>en(null)),()=>{L&&(L.current=null)}),[L]);let ei=(0,ed.useMemo)(()=>et?new e0(0,14*!!(window.innerWidth<768),z):null,[et,z]),er=(0,ed.useMemo)(()=>new Set(function(e,t,n){let i=[];for(let r of t){let[t,a]=r.split("/");if("products"===t);else if("media"===t){let n=e.structure.media.subfolders[a];n?.files&&n.files.forEach(e=>{i.push(`/vof-shopify-assets/${t}/${a}/${encodeURIComponent(e)}`)})}n&&n.filter(e=>e.folder===r).forEach(e=>i.push(e.src))}return i}(g,t,l)),[g,t,l]),ea=t.some(e=>e.startsWith("products/")),es=(0,ed.useMemo)(()=>new Set((R??[]).filter(Boolean)),[R]),eo=(0,ed.useMemo)(()=>{if(ea){let e=N?3:6;return 3+Math.floor(fq(m%1e4*3.7+.5)*(e-3+1))}let e=N?1:2,t=N?3:7;return e+Math.floor(fq(m%1e4*3.7+.5)*(t-e+1))},[m,N,ea]),el=(0,ed.useMemo)(()=>{let e=$.filter(e=>er.has(e.entry.src)),t=p?e.find(e=>e.entry.id===p):f?e.find(e=>e.entry.productTitle?.toUpperCase().includes(f.toUpperCase())):null,n=(t?e.filter(e=>e!==t):e).map((e,t)=>({item:e,key:fq(.001*fY(e.entry.id)+m%1e4*7.3),index:t}));ea&&es.size>0?n.sort((e,t)=>{let n=es.has(e.item.entry.id);return n!==es.has(t.item.entry.id)?n?1:-1:e.key!==t.key?e.key-t.key:e.index-t.index}):n.sort((e,t)=>e.key-t.key);let i=Math.min(t?eo-1:eo,n.length),r=n.slice(0,i).map(e=>e.item.entry.id);return t&&r.unshift(t.entry.id),new Set(r)},[$,er,p,f,m,eo,ea,es]),ec=(0,ed.useMemo)(()=>{if(!ea)return[];let e=new Map;for(let t of $){if(!er.has(t.entry.src)||!t.entry.folder.startsWith("products/"))continue;let n=e.get(t.entry.folder);n||(n={total:[],visible:[]},e.set(t.entry.folder,n)),n.total.push(t.entry.id),el.has(t.entry.id)&&n.visible.push(t.entry.id)}return Array.from(e.entries()).map(([e,t])=>({folder:e,totalCount:t.total.length,visibleCount:t.visible.length,visibleImageIds:t.visible})).sort((e,t)=>e.folder.localeCompare(t.folder))},[ea,$,er,el]);(0,ed.useEffect)(()=>{P?.(ec)},[ec,P]);let eh=el.size>0,ep=el.size,ef=(0,ed.useMemo)(()=>{if("constellation"!==T||!eh)return null;let e=$.filter(e=>!el.has(e.entry.id));if(0===e.length)return new Set;let t=Math.min(e.length,Math.max(16,Math.min(28,Math.round(.28*e.length)))),n=[...e].sort((e,t)=>
1891Math.abs(e.tunnelPosition.z)-Math.abs(t.tunnelPosition.z)).slice(0,Math.min(e.length,Math.max(t,3*t))).map(e=>({id:e.entry.id,key:fq(.001*fY(e.entry.id)+311.7)}));n.sort((e,t)=>e.key-t.key);let i=n.length;if(0===i)return new Set;let r=Math.max(1,t),a=Math.max(0,q)%Math.max(1,Math.ceil(i/r))*r%i,s=new Set;for(let e=0;e<t;e+=1){let t=n[(a+e)%i].id;s.add(t)}return s},[T,eh,$,el,q]),em=(0,ed.useMemo)(()=>({enabled:v.imageRippleEnabled,intensity:v.imageRippleIntensity,spread:v.imageRippleSpread,speed:v.imageRippleSpeed,pulse:v.imageRipplePulse,frequency:v.imageRippleFrequency}),[v.imageRippleEnabled,v.imageRippleIntensity,v.imageRippleSpread,v.imageRippleSpeed,v.imageRipplePulse,v.imageRippleFrequency]),eg=(0,ed.useMemo)(()=>{let e=new Map,t=$.filter(e=>el.has(e.entry.id)),n=t.length;if(0===n)return e;let i=N?2===n?.78:n>=3?.72:1:1,r=N&&n>=3?.78:1,a=(N?7:34)*i,s=(N?10:18)*r,o=N?Math.min(16,Math.max(11,11+(k-1.9)*3)):0;return t.forEach((t,i)=>{if(1===n)e.set(t.entry.id,new e0(0,o,z));else if(2===n){let n=0===i?Math.PI:0;e.set(t.entry.id,new e0(Math.cos(n)*a,o,z))}else{let r=i/n*Math.PI*2-Math.PI/2;e.set(t.entry.id,new e0(Math.cos(r)*a,Math.sin(r)*s+o,z))}}),e},[$,el,z,N,k]),ev=(0,ed.useMemo)(()=>{let e=new Map;if(l)for(let t of l)e.set(t.src,t);return e},[l]);(0,ed.useEffect)(()=>{j.current=new Set,s?.(0,$.length)},[$.length,s]);let ey=(0,ed.useCallback)(e=>{j.current.has(e)||(j.current.add(e),s?.(j.current.size,$.length))},[$.length,s]),ex=v.bloomIntensity>1e-4,eb=v.galaxyColorIntensity>1e-4,eS=v.grainAmount>1e-4,e_=[];v.motionBlurEnabled&&e_.push((0,eu.jsx)(me,{amountRef:K},"motion-blur")),ex&&e_.push((0,eu.jsx)(fz,{luminanceThreshold:v.bloomThreshold,luminanceSmoothing:.9,intensity:v.bloomIntensity,radius:v.bloomRadius},"bloom")),eb&&e_.push((0,eu.jsx)(f5,{intensity:v.galaxyColorIntensity,speed:v.galaxyColorSpeed,scale:v.galaxyColorScale,colorWarm:v.galaxyColorWarm,colorCool:v.galaxyColorCool,colorMid:v.galaxyColorMid},"heat-warp")),eS&&e_.push((0,eu.jsx)(fH,{blendFunction:24,opacity:v.grainAmount},"grain"));let ew=e_.length>0;return(0,eu.jsxs)(eu.Fragment,{children:[(0,eu.jsx)(mc,{speed:V,cameraZ:F,mouse:u,scrollSpeed:c,mouseHeld:d,isPaused:i,starMode:T}),(0,eu.jsx)(mf,{imageUrl:y,opacity:x,scale:b,offsetX:S,offsetY:_,scrollSpeed:c,mouseHeld:d,morphMotionRef:W,isResponsePlaying:n,settings:v,lensWarpRef:J}),!w&&(0,eu.jsx)(mi,{cameraZ:F,onInitialLoadProgress:o,settings:v,starMode:T,isResponsePlaying:n,showConstellationLines:E,morphMotionRef:W,morphProgressRef:X,onMorphCycle:Z}),!M&&$.map(e=>{let t=!A&&el.has(e.entry.id),n="constellation"!==T||!eh||(ef?.has(e.entry.id)??!1),i=ev.get(e.entry.src),s=eg.get(e.entry.id)??null;return(0,eu.jsx)(mu,{entry:e.entry,isActive:t,activeCount:ep,anyActive:eh,isBackgroundSelected:n,galleryOffset:s,floatSeed:e.floatSeed,tunnelPosition:e.tunnelPosition,cameraZ:F,totalDepth:O,imageRippleSettings:em,starSettings:v,onTextureSettled:ey,meshPointerDown:h,starMode:T,onClick:()=>{t&&i?a?.(i.productUrl):(et&&en(null),r?.(e.entry.folder,e.entry.id))}},e.entry.id)}),I&&ee.map(e=>{let n=et===e.item.id;return(0,eu.jsx)(mm,{item:e.item,isActive:n,anyActive:!!et||eh,galleryOffset:n?ei:null,floatSeed:e.floatSeed,tunnelPosition:e.tunnelPosition,cameraZ:F,totalDepth:O,meshPointerDown:h,starMode:T,onClick:()=>{t.length>0&&r?.(""),en(e.item.id)},onComplete:()=>{en(null),D?.()}},e.item.id)}),ew&&(0,eu.jsx)(fN,{enableNormalPass:!1,children:e_})]})}let mE=ed.default.forwardRef(function({settings:e,onChange:t,backdropUrlInput:n,backdropFileName:i,backdropSource:r,backdropOpacity:a,backdropScale:s,hasBackdrop:o,onBackdropUrlChange:l,onBackdropFileChange:u,onBackdropOpacityChange:c,onBackdropScaleChange:d,onBackdropClear:h,starMode:p="stream",propBackdropUrl:f,propBackdropOpacity:m,propBackdropScale:g,propBackdropOffsetX:v,propBackdropOffsetY:y,onPropBackdropOpacityChange:x,onPropBackdropScaleChange:b,onPropBackdropOffsetXChange:S,onPropBackdropOffsetYChange:_},w){let[M,T]=(0,ed.useState)({}),[E,A]=(0,ed.useState)(null),C=(e,t)=>(0,eu.jsxs)("button",{onClick:()=>T(t=>t[e]?{}:{[e]:!0}),style:{display:"flex",alignItems:"center",gap:4,fontSize:11,color:"#0094F7",marginBottom:4*!!M[e],fontFamily:"var(--font-neue-haas-thin), sans-serif",letterSpacing:"0.05em",background:"none",border:"none",padding:0,cursor:"pointer"},children:[(0,eu.jsx)("span",{style:{transform:M[e]?"rotate(90deg)":"rotate(0deg)",transition:"transform 100ms ease",display:"inline-block",fontSize:11},children:"▶"}),t]}),P={fontSize:11,color:"#666",background:"none",border:"1px solid #333",borderRadius:3,padding:"1px 6px",cursor:"pointer"},R=(n,i,r,a,s)=>(0,eu.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,eu.jsx)("span",{style:{fontSize:12,color:"#666",fontFamily:"var(--font-neue-haas-thin), sans-serif",minWidth:64},children:n}),(0,eu.jsx)("input",{type:"range",min:r,max:a,step:s,value:e[i],onChange:e=>t({[i]:parseFloat(e.target.value)}),style:{flex:1,accentColor:"#0094F7",height:2}}),(0,eu.jsx)("span",{style:{fontSize:12,color:"#AAA",fontFamily:"var(--font-neue-haas-thin), sans-serif",minWidth:32,textAlign:"right"},children:e[i].toFixed(2)})]},i),I=(n,i)=>(0,eu.jsxs)("div",{className:"flex items-center justify-between gap-2 mb-1.5",children:[(0,eu.jsx)("span",{style:{fontSize:12,color:"#666",fontFamily:"var(--font-neue-haas-thin), sans-serif"},children:n}),(0,eu.jsx)("button",{onClick:()=>t({[i]:!e[i]}),style:{fontSize:11,fontFamily:"var(--font-neue-haas-thin), sans-serif",color:e[i]?"#FFF":"#999",background:e[i]?"rgba(0, 148, 247, 0.3)":"rgba(255, 255, 255, 0.06)",border:e[i]?"1px solid #0094F7":"1px solid #333",borderRadius:3,padding:"2px 8px",cursor:"pointer",minWidth:36},children:e[i]?"on":"off"})]},i);return(0,eu.jsxs)("div",{ref:w,className:"fixed z-50 rounded-lg",style:{to
1891p:"calc(5rem + var(--safe-area-inset-top, 0px))",right:"calc(1rem + var(--safe-area-inset-right, 0px))",backgroundColor:"rgba(0, 0, 0, 0.88)",border:"1px solid rgba(255, 255, 255, 0.1)",backdropFilter:"blur(12px)",minWidth:"320px",maxHeight:"calc(var(--app-height, 100vh) - 96px - var(--safe-area-inset-top, 0px))",overflowY:"auto",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.5)"},children:[(0,eu.jsx)("div",{className:"flex items-center gap-1.5 w-full px-2.5 py-1.5",style:{fontFamily:"var(--font-neue-haas-thin), sans-serif"},children:(0,eu.jsx)("span",{style:{fontSize:12,color:"#0094F7",fontWeight:"bold"},children:"Universe Effects"})}),(0,eu.jsxs)("div",{className:"px-2.5 pb-2.5",children:[(0,eu.jsxs)("div",{className:"flex justify-end gap-1 mb-2",children:[(0,eu.jsx)("button",{onClick:()=>{let t={...e,...f?{_backdropOpacity:m,_backdropScale:g,_backdropRotate:v,_backdropOffsetY:y}:{}};navigator.clipboard.writeText(JSON.stringify(t)),A("Copied!"),setTimeout(()=>A(null),1200)},style:P,children:"Copy Settings"}),(0,eu.jsx)("button",{onClick:async()=>{try{let e=await navigator.clipboard.readText(),{_backdropOpacity:n,_backdropScale:i,_backdropRotate:r,_backdropOffsetY:a,...s}=JSON.parse(e);t(s),null!=n&&x(n),null!=i&&b(i),null!=r&&S(r),null!=a&&_(a),A("Pasted!")}catch{A("Invalid")}setTimeout(()=>A(null),1200)},style:P,children:"Paste"}),(0,eu.jsx)("button",{onClick:()=>t({...fX}),style:P,children:"Reset"})]}),E&&(0,eu.jsx)("div",{style:{fontSize:11,color:"#0094F7",fontFamily:"var(--font-neue-haas-thin), sans-serif",textAlign:"right",marginBottom:4},children:E}),f&&(0,eu.jsxs)("div",{style:{marginBottom:8,borderBottom:"1px solid rgba(255,255,255,0.06)",paddingBottom:8},children:[(0,eu.jsx)("span",{style:{fontSize:11,color:"#666",fontFamily:"var(--font-neue-haas-thin), sans-serif",letterSpacing:"0.08em",display:"block",marginBottom:4},children:"BACKDROP"}),(0,eu.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,eu.jsx)("span",{style:{fontSize:12,color:"#666",fontFamily:"var(--font-neue-haas-thin), sans-serif",minWidth:48},children:"opacity"}),(0,eu.jsx)("input",{type:"range",min:0,max:1,step:.01,value:m,onChange:e=>x(parseFloat(e.target.value)),style:{flex:1,accentColor:"#0094F7",height:2}}),(0,eu.jsx)("span",{style:{fontSize:12,color:"#AAA",fontFamily:"var(--font-neue-haas-thin), sans-serif",minWidth:28,textAlign:"right"},children:m.toFixed(2)})]}),(0,eu.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,eu.jsx)("span",{style:{fontSize:12,color:"#666",fontFamily:"var(--font-neue-haas-thin), sans-serif",minWidth:48},children:"scale"}),(0,eu.jsx)("input",{type:"range",min:.1,max:3,step:.05,value:g,onChange:e=>b(parseFloat(e.target.value)),style:{flex:1,accentColor:"#0094F7",height:2}}),(0,eu.jsx)("span",{style:{fontSize:12,color:"#AAA",fontFamily:"var(--font-neue-haas-thin), sans-serif",minWidth:28,textAlign:"right"},children:g.toFixed(2)})]}),(0,eu.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,eu.jsx)("span",{style:{fontSize:12,color:"#666",fontFamily:"var(--font-neue-haas-thin), sans-serif",minWidth:48},children:"rotate"}),(0,eu.jsx)("input",{type:"range",min:0,max:1,step:.005,value:v,onChange:e=>S(parseFloat(e.target.value)),style:{flex:1,accentColor:"#0094F7",height:2}}),(0,eu.jsxs)("span",{style:{fontSize:12,color:"#AAA",fontFamily:"var(--font-neue-haas-thin), sans-serif",minWidth:28,textAlign:"right"},children:[Math.round(360*v),"°"]})]}),(0,eu.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,eu.jsx)("span",{style:{fontSize:12,color:"#666",fontFamily:"var(--font-neue-haas-thin), sans-serif",minWidth:48},children:"offset y"}),(0,eu.jsx)("input",{type:"range",min:-.5,max:.5,step:.01,value:y,onChange:e=>_(parseFloat(e.target.value)),style:{flex:1,accentColor:"#0094F7",height:2}}),(0,eu.jsx)("span",{style:{fontSize:12,color:"#AAA",fontFamily:"var(--font-neue-haas-thin), sans-serif",minWidth:28,textAlign:"right"},children:y.toFixed(2)})]})]}),(0,eu.jsxs)("div",{style:{marginBottom:8},children:[C("backdrop","ADD BACKDROP"),M.backdrop&&(0,eu.jsx)(eu.Fragment,{children:i?(0,eu.jsxs)(eu.Fragment,{children:[(0,eu.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,eu.jsx)("span",{style:{fontSize:12,color:"#666",fontFamily:"var(--font-neue-haas-thin), sans-serif",minWidth:48},children:"opacity"}
1891),(0,eu.jsx)("input",{type:"range",min:0,max:1,step:.01,value:a,onChange:e=>c(parseFloat(e.target.value)),style:{flex:1,accentColor:"#0094F7",height:2}}),(0,eu.jsx)("span",{style:{fontSize:12,color:"#AAA",fontFamily:"var(--font-neue-haas-thin), sans-serif",minWidth:28,textAlign:"right"},children:a.toFixed(2)})]}),(0,eu.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,eu.jsx)("span",{style:{fontSize:12,color:"#666",fontFamily:"var(--font-neue-haas-thin), sans-serif",minWidth:48},children:"scale"}),(0,eu.jsx)("input",{type:"range",min:.1,max:3,step:.05,value:s,onChange:e=>d(parseFloat(e.target.value)),style:{flex:1,accentColor:"#0094F7",height:2}}),(0,eu.jsx)("span",{style:{fontSize:12,color:"#AAA",fontFamily:"var(--font-neue-haas-thin), sans-serif",minWidth:28,textAlign:"right"},children:s.toFixed(2)})]}),(0,eu.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,eu.jsx)("span",{style:{fontSize:11,color:"#777",fontFamily:"var(--font-neue-haas-thin), sans-serif",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},children:i}),(0,eu.jsx)("button",{onClick:h,className:"px-2.5 py-1 text-xs transition-all",style:{fontFamily:"var(--font-neue-haas-thin), sans-serif",fontSize:12,color:"#AAA",backgroundColor:"rgba(255, 255, 255, 0.06)",border:"1px solid rgba(255, 255, 255, 0.08)",borderRadius:3,cursor:"pointer"},children:"remove"})]})]}):(0,eu.jsxs)("label",{style:{display:"inline-block",padding:"4px 10px",fontSize:12,fontFamily:"var(--font-neue-haas-thin), sans-serif",color:"#AAA",backgroundColor:"rgba(255, 255, 255, 0.06)",border:"1px solid rgba(255, 255, 255, 0.08)",borderRadius:3,cursor:"pointer"},children:["upload image",(0,eu.jsx)("input",{type:"file",accept:"image/*",onChange:e=>{u(e.target.files?.[0]??null),e.target.value=""},style:{display:"none"}})]})})]}),o&&(0,eu.jsxs)("div",{style:{marginBottom:8},children:[C("backdropWarp","BACKDROP WARP"),M.backdropWarp&&(0,eu.jsxs)(eu.Fragment,{children:[I("always warp","backdropWarpAlways"),R("breath amt","backdropBreathAmount",0,.08,.001),R("breath spd","backdropBreathSpeed",0,2,.01),R("warp amt","backdropWarpAmount",0,.15,.001),R("warp spd","backdropWarpSpeed",0,1,.01),R("warp scale","backdropWarpScale",.5,10,.1)]})]}),(0,eu.jsxs)("div",{style:{marginBottom:8},children:[C("star","STARS"),M.star&&(0,eu.jsxs)(eu.Fragment,{children:[R("density","starDensity",.1,3,.05),R("size","starSize",.1,30,.05),R("hue shift","starHue",-180,180,1),R("plasma flicker","plasmaFlicker",0,1,.01),R("noise scale","plasmaFlowScale",.3,3,.01),R("shape warp","plasmaBlobWarp",0,2,.01),R("turbulence","plasmaProngStrength",0,2,.01),R("grain","plasmaProngWidth",.2,2,.01),R("color mix","plasmaColorMix",0,1,.01),R("core bright","plasmaCoreIntensity",0,3,.01),R("outer glow","plasmaHaloIntensity",0,3,.01),R("speed","plasmaSpeed",.1,10,.05)]})]}),(0,eu.jsxs)("div",{style:{marginBottom:8},children:[C("motionBlur","MOTION BLUR"),M.motionBlur&&(0,eu.jsxs)(eu.Fragment,{children:[I("enabled","motionBlurEnabled"),e.motionBlurEnabled&&(0,eu.jsxs)(eu.Fragment,{children:[R("strength","motionBlurStrength",0,1,.01),R("persistence","motionBlurPersistence",0,1,.01)]})]})]}),(0,eu.jsxs)("div",{style:{marginBottom:8},children:[C("galaxyColors","GALAXY COLORS"),M.galaxyColors&&(0,eu.jsxs)(eu.Fragment,{children:[R("intensity","galaxyColorIntensity",0,3,.05),R("speed","galaxyColorSpeed",0,4,.05),R("scale","galaxyColorScale",.5,12,.1),["galaxyColorWarm","galaxyColorCool","galaxyColorMid"].map(n=>(0,eu.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,eu.jsx)("span",{style:{fontSize:12,color:"#666",fontFamily:"var(--font-neue-haas-thin), sans-serif",minWidth:64},children:"galaxyColorWarm"===n?"warm":"galaxyColorCool"===n?"cool":"mid"}),(0,eu.jsx)("input",{type:"color",value:e[n],onChange:e=>t({[n]:e.target.value}),style:{width:28,height:18,border:"1px solid #333",borderRadius:3,padding:0,cursor:"pointer",background:"none"}}),(0,eu.jsx)("span",{style:{fontSize:12,color:"#AAA",fontFamily:"var(--font-neue-haas-thin), sans-serif"},children:e[n]})]},n))]})]}),(0,eu.jsxs)("div",{style:{marginBottom:8},children:[C("photos","PHOTOS"),M.photos&&(0,eu.jsxs)(eu.Fragment,{children:[R("density","photoDensity",.25,3,.05),R("gallery dist","galleryDistance",20,80,1),R("chat spacing","chatLineHeight",1,2,.05)]})]}),(0,eu.jsxs)("div",{style:{marginBottom:8},children:[C("animation","MOVEMENT"),M.animation&&(0,eu.jsxs)(eu.Fragment,{children:[R("speed","speedMultiplier",.1,5,.1),R("lens warp","lensWarpStrength",0,1,.01)]})]}),(0,eu.jsxs)("div",{style:{marginBottom:8},children:[C("constellation","CONSTELLATION"),M.constellation&&(0,eu.jsxs)(eu.Fragment,{children:[R("morph duration","constellationMorphDuration",.5,10,.1),R("ar
1891c intensity","constellationArcIntensity",0,1,.01),R("rotation angle","constellationRotationAngle",0,.8,.01),R("rotation tilt","constellationRotationTilt",0,.5,.01),R("scale","constellationScale",5,60,1),R("line fade out","constellationLineFadeOutEnd",.05,.5,.01),R("line fade in","constellationLineFadeInStart",.3,.95,.01),R("star nudge","constellationStarNudge",0,5,.1)]})]}),(0,eu.jsxs)("div",{style:{marginBottom:8},children:[C("bloom","BLOOM (post)"),M.bloom&&(0,eu.jsxs)(eu.Fragment,{children:[R("intensity","bloomIntensity",0,5,.05),R("threshold","bloomThreshold",0,1,.01),R("radius","bloomRadius",0,2,.05)]})]}),(0,eu.jsxs)("div",{style:{marginBottom:8},children:[C("imageRipple","IMAGE HALO"),M.imageRipple&&(0,eu.jsxs)(eu.Fragment,{children:[I("enabled","imageRippleEnabled"),e.imageRippleEnabled&&(0,eu.jsxs)(eu.Fragment,{children:[R("spread","imageRippleSpread",.02,.8,.01),R("pulse speed","imageRippleSpeed",.1,5,.05),R("pulse amount","imageRippleIntensity",0,2.5,.01),I("organic","imageGlowPlasmaEnabled"),e.imageGlowPlasmaEnabled?(0,eu.jsxs)(eu.Fragment,{children:[R("core","imageGlowPlasmaCoreIntensity",0,2,.01),R("outer glow","imageGlowPlasmaHaloIntensity",0,2,.01),R("flicker","imageGlowPlasmaFlicker",0,1,.01),R("warp","imageGlowPlasmaBlobWarp",0,2,.01)]}):(0,eu.jsxs)(eu.Fragment,{children:[R("brightness","imageGlowIntensity",0,5,.05),R("softness","imageGlowFalloff",.5,6,.05),R("size","imageGlowHaloIntensity",0,2,.01)]}),["imageGlowColorPrimary","imageGlowColorSecondary"].map(n=>(0,eu.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,eu.jsx)("span",{style:{fontSize:12,color:"#666",fontFamily:"var(--font-neue-haas-thin), sans-serif",minWidth:64},children:"imageGlowColorPrimary"===n?"inner color":"outer color"}),(0,eu.jsx)("input",{type:"color",value:e[n],onChange:e=>t({[n]:e.target.value}),style:{width:28,height:18,border:"1px solid #333",borderRadius:3,padding:0,cursor:"pointer",background:"none"}}),(0,eu.jsx)("span",{style:{fontSize:12,color:"#AAA",fontFamily:"var(--font-neue-haas-thin), sans-serif"},children:e[n]})]},n))]})]})]}),(0,eu.jsxs)("div",{style:{marginBottom:8},children:[C("grain","FILM GRAIN"),M.grain&&R("amount","grainAmount",0,.5,.01)]})]})]})});function mA({isResponsePlaying:e,isChoirPlaying:t,activeFolders:n,folderMap:i,onResponseComplete:r,onFolderSelect:a,shopifyImages:s,onProductClick:o,priorityImageId:l,priorityProductTitle:u,selectionSeed:c,className:d,showDebugPanel:h,onChatLineHeightChange:p,backgroundImageUrl:f,backgroundImageOpacity:m,backgroundImageScale:g,backgroundImageOffsetX:v,backgroundImageOffsetY:y,transparentBackground:x,hideStars:b,hideImages:S,starMode:_="stream",showConstellationLines:w=!0,showSummaryScreen:M,onStreamingPlatformClick:T,onProductFolderVisibilityChange:E,productExcludeImageIds:A,onSceneError:C,captchaPreview:P,onCaptchaComplete:R}){let I=h??!1,[D,L]=(0,ed.useState)(0),[F,N]=(0,ed.useState)(1.5),[U,k]=(0,ed.useState)("unknown"),[B,O]=(0,ed.useState)(!1),[z,H]=(0,ed.useState)(!1),[V,G]=(0,ed.useState)(x?"hidden":"visible"),j=(0,ed.useCallback)(e=>{B||(console.error("ImageUniverse failed to render. Falling back to nebula background.",e),O(!0))},[B]);(0,ed.useEffect)(()=>{B&&C?.()},[B,C]),(0,ed.useEffect)(()=>{if("supported"!==U||z||B)return;let e=window.setTimeout(()=>{k("unsupported")},1800);return()=>window.clearTimeout(e)},[U,z,B]),(0,ed.useEffect)(()=>{if("undefined"==typeof navigator)return;let e=navigator,t=window.matchMedia?.("(pointer: coarse)")?.matches??!1,n="number"==typeof e.deviceMemory&&e.deviceMemory<=4;"number"==typeof e.hardwareConcurrency&&e.hardwareConcurrency,N((t,1.5))},[]),(0,ed.useEffect)(()=>{try{let e=document.createElement("canvas"),t=e.getContext("webgl2")||e.getContext("webgl")||e.getContext("experimental-webgl");k(t?"supported":"unsupported")}catch(e){console.warn("WebGL support probe failed; using static fallback.",e),k("unsupported")}},[]),(0,ed.useEffect)(()=>{let e=()=>{if("visible"===document.visibilityState&&"unsupported"===U)try{let e=document.createElement("canvas");e.getContext("webgl2")||e.getContext("webgl")||e.getContext("experimental-webgl")?(k("supported"),L(e=>e+1)):k("unsupported")}catch{k("unsupported")}};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[U]);let[W,X]=(0,ed.useState)(()=>"constellation"===_?{...fj,...fW}:fj),q=(0,ed.useRef)(!1);(0,ed.useEffect)(()=>{I&&!q.current&&(q.current=!0,X(e=>"constellation"===_?{...fX,...fW}:fX))},[I,_]);let[Y,Z]=(0,ed.useState)(""),[K,J]=(0,ed.useState)(""),[Q,$]=(0,ed.useState)(null),[ee,et]=(0,ed.useState)(.8),[en,ei]=(0,ed.useState)(1),er=(0,ed.useRef)(null),[ea,es]=(0,ed.useState)(null),[eo,el]=(0,ed.useState)(null),[ec,eh]=(0,ed.useState)(null),[ep,ef]=(0,ed.useState)(null),em=(0,ed.useCallback)(()=>{er.current&&(URL.revokeObjectURL(er.current),er.current=null)},[]);(0,ed.useEffect)(()=>()=>em(),[em]);let eg=(0,ed.useCallback)(e=>{em(),$(null),J(e),Z(e)},[em]),ev=(0,ed.useCallback)(e=>{if(!e)return;em();let t=URL.createObjectURL(e);er.current=t,$(e.name),J(""),Z(t)},[em]),ey=(0,ed.useCallback)(()=>{em(),$(null),J(""),Z("")},[em]),ex=(0,ed.useRef)(void 0);(0,ed.useEffect)(()=>(e&&(clearTimeout(ex.current),ex.current=setTimeout(()=>{r?.()},2400)),()=>clearTimeout(ex.current)),[e,r]);let eb=(0,ed.useRef)({x:0,y:0});(0,ed.useEffect)(()=>{let e=e=>{eb.current.x=-(e.clientX/window.innerWidth*2-1),eb.current.y=e.clientY/window.innerHeight*2-1};return window.addEventListener("mousemove",e),()=>window.removeEventListener("mousemove",e)},[]);let eS=(0,ed.useRef)(0);(0,ed.useEffect)(()=>{let e,t=e=>{e.preventDefault();let t=-(.015*e.deltaY);eS.current=Math.max(-2,Math.min(30,eS.current+t))};window.addEventListener("wheel",t,{passive:!1});let n=performance.now(),i=()=>{let t=performance.now(),r=Math.min((t-n)/1e3,.1);n=t,eS.current*=Math.pow(.3,r),.05>Math.abs(eS.current)&&(eS.current=0),e=requestAnimationFrame(i)};return e=requestAnimationFrame(i),()=>{window.removeEventListener("wheel",t),cancelAnimationFrame(e)}},[]);let e_=(0,ed.useRef)(!1),ew=(0,ed.useRef)(!1),eM=(0,ed.useRef)(null),eT=(0,ed.useRef)(null),eE=(0,ed.useRef)(null),eA=(0,ed.useRef)(n);eA.current=n,(0,ed.useEffect)(()=>{let e=e=>{if(!(0!==e.button||eE.current?.contains(e.target))&&!(eA.current.length>0)&&eT.current?.contains(e.target)){if(ew.current){ew.current=!1;return}e_.current=!0}},t=e=>{0===e.button&&(e_.current=!1)};return window.addEventListener("mousedown",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousedown",e),window.removeEventListener("mouseup",t)}},[]);let eC=(0,ed.useMemo)(()=>(function(e,t){let n=[];for(let[t,i]of Object.entries(e.structure.media.subfolders))i.files.forEac
1891h(e=>{n.push({src:`/vof-shopify-assets/media/${t}/${encodeURIComponent(e)}`,folder:`media/${t}`})});return t&&t.forEach(e=>{n.push({src:e.src,folder:e.folder,productUrl:e.productUrl,productTitle:e.productTitle,productPrice:e.productPrice})}),n})(i,s).map((e,t)=>({src:e.src,folder:e.folder,id:`${e.folder}-${t}`,productUrl:e.productUrl,productTitle:e.productTitle,productPrice:e.productPrice})),[i,s]),[eP,eR]=(0,ed.useState)({loaded:0,total:5}),[eI,eD]=(0,ed.useState)({loaded:0,total:eC.length}),[eL,eF]=(0,ed.useState)(!1),eN=(0,ed.useCallback)((e,t)=>{eD(n=>n.loaded===e&&n.total===t?n:{loaded:e,total:t})},[]),eU=(0,ed.useCallback)((e,t)=>{eR(n=>n.loaded===e&&n.total===t?n:{loaded:e,total:t})},[]),ek=Math.min(eI.total,16),eB=Math.min(eI.loaded,ek),eO=x||eP.total>0&&eP.loaded>=eP.total,ez=0===ek||eB>=ek;(0,ed.useEffect)(()=>{!eL&&eO&&ez&&eF(!0)},[eL,eO,ez]),(0,ed.useEffect)(()=>{eF(!1)},[eC.length]);let eH="supported"===U&&!B,eV=!x&&("unsupported"===U||B),eG=eH&&z&&!eL,ej=eH?eL:"unsupported"===U||B,eW=Math.max(1,eP.total+ek),eX=Math.round(Math.min(eW,eP.loaded+eB)/eW*100),eq=Y.trim()||f||"/images/backgrounds/space-nebula-blue.webp";return(0,ed.useEffect)(()=>{x&&G("hidden")},[x]),(0,ed.useEffect)(()=>{x||"visible"!==V||ej&&G("fading")},[ej,V,x]),(0,ed.useEffect)(()=>{if("fading"!==V)return;let e=window.setTimeout(()=>{G("hidden")},690);return()=>window.clearTimeout(e)},[V]),(0,eu.jsxs)("div",{ref:eT,className:`fixed inset-0 z-0 ${d??""}`,style:{background:"transparent"},children:[eV&&(0,eu.jsx)(fK,{imageUrl:eq,opacity:1}),eG&&(0,eu.jsx)("div",{className:"absolute inset-0 z-20 flex items-center justify-center",style:{background:"transparent"},children:(0,eu.jsx)("div",{className:"w-[min(420px,82vw)]",children:(0,eu.jsx)("div",{className:"h-[2px] w-full bg-white/20",children:(0,eu.jsx)("div",{className:"h-full bg-white transition-[width] duration-200",style:{width:`${eX}%`}})})})}),eH&&(0,eu.jsx)(hP,{camera:{fov:60,near:.1,far:500,position:[0,0,0]},dpr:[1,F],gl:{antialias:!1,alpha:!!x,powerPreference:"high-performance",stencil:!1,preserveDrawingBuffer:!1},fallback:null,onCreated:({gl:e})=>{H(!0);let t=e.domElement;t&&(t.addEventListener("webglcontextlost",e=>{e.preventDefault(),H(!1),L(e=>e+1)},{once:!0}),t.addEventListener("webglcontextcreationerror",e=>{j(e)},{once:!0}))},style:{width:"100%",height:"100%",opacity:+!eG,transition:"opacity 260ms ease"},onPointerMissed:e=>{"click"===e.type&&"button"in e&&0===e.button&&(M||(eM.current?.(),n.length>0&&a?a(""):eS.current=Math.max(-2,Math.min(30,eS.current+8))))},children:(0,eu.jsx)(fZ,{onError:(e,t)=>{j(e),t.componentStack&&console.error("ImageUniverse scene component stack:",t.componentStack)},children:(0,eu.jsx)(mT,{images:eC,activeFolders:n,isResponsePlaying:e,isPaused:eG,onFolderSelect:a,onProductClick:o,onImagesLoadProgress:eN,onStarsLoadProgress:eU,shopifyImages:s,mouse:eb,scrollSpeed:eS,mouseHeld:e_,meshPointerDown:ew,priorityImageId:l,priorityProductTitle:u,selectionSeed:c??0,folderMap:i,starSettings:W,backgroundImageUrl:Y.trim()||f||void 0,backgroundImageOpacity:Y.trim()?ee:ea??m??.8,backgroundImageScale:Y.trim()?en:eo??g??1,backgroundImageOffsetX:Y.trim()?0:ec??v??0,backgroundImageOffsetY:Y.trim()?0:ep??y??0,hideStars:b??x,hideImages:S,starMode:_,showConstellationLines:w,showSummaryScreen:M,onStreamingPlatformClick:T,onProductFolderVisibilityChange:E,productExcludeImageIds:A,captchaPreview:P,onCaptchaComplete:R,captchaDeselectRef:eM})})},D),"hidden"!==V&&(0,eu.jsx)("div",{className:"absolute inset-0 z-30 pointer-events-none",style:{background:"#000",opacity:+("fading"!==V),transition:"opacity 650ms ease"}}),I&&(0,eu.jsx)(mE,{ref:eE,settings:W,onChange:e=>{X(t=>({...t,...e})),null!=e.chatLineHeight&&p?.(e.chatLineHeight)},backdropUrlInput:K,backdropFileName:Q,backdropSource:Y,backdropOpacity:ee,backdropScale:en,hasBackdrop:!!(Y.trim()||f),onBackdropUrlChange:eg,onBackdropFileChange:ev,onBackdropOpacityChange:et,onBackdropScaleChange:ei,onBackdropClear:ey,starMode:_,propBackdropUrl:f,propBackdropOpacity:ea??m??.4,propBackdropScale:eo??g??1,propBackdropOffsetX:ec??v??0,propBackdropOffsetY:ep??y??0,onPropBackdropOpacityChange:es,onPropBackdropScaleChange:el,onPropBackdropOffsetXChange:eh,onPropBackdropOffsetYChange:ef})]})}var mC=e.i(9385);let mP={hum:"/audio/VoF-bghum.wav",humSolo:"/audio/VoF-bghum--onevoiceonly.wav",angelReveal:"/audio/608892__marknkris1996__angel-reveal.mp3",choirOoh1:"/audio/real-vof/vof-actual-rvb-01.wav",choirOoh2:"/audio/real-vof/vof-actual-rvb-03.wav",choirOoh3:"/audio/real-vof/vof-actual-rvb-04.wav",choirOoh4:"/audio/real-vof/vof-actual-rvb-02.wav",choirOoh5:"/audio/real-vof/vof-actual-rvb-05.wav",choir1:"/audio/miracle-worker/aaaaaaaaaaaaa.wav",choir2:"/audio/miracle-worker/getup.wav",choir3:"/audio/miracle-worker/heavensdisplay.wav",choir4:"/audio/miracle-worker/makesyouwannagetup.wav",choir5:"/audio/miracle-worker/makeyouwannash
1891out.wav",choir6:"/audio/miracle-worker/miracleworkerdown.wav",choir7:"/audio/miracle-worker/miracleworkerup.wav",choir8:"/audio/miracle-worker/staydevout.wav",choir9:"/audio/miracle-worker/thatswhatimtalkinbout.wav",choir10:"/audio/miracle-worker/turnaround.wav",choir11:"/audio/miracle-worker/whoawhoawhoawhoa.wav",choirend:"/audio/miracle-worker/aaaaaaaaaaaaa-thatswhatimtalkingbout.wav",choirlongaaa:"/audio/miracle-worker/longaaa.wav"},mR={};function mI(e){return mR[e]||(mR[e]=new mC.Howl({src:[mP[e]],preload:!0})),mR[e]}function mD(e,t={}){let{peakVolume:n=.8,attackMs:i=150,holdMs:r=800,releaseMs:a=400}=t,s=mI(e);s.volume(0);let o=s.play();return s.fade(0,n,i,o),setTimeout(()=>{s.fade(n,0,a,o),setTimeout(()=>{s.stop(o)},a)},i+r),o}var mL=e.i(19258);let mF=[{text:"The Lord is close to the brokenhearted, and saves those who are crushed in spirit.",reference:"Psalm 34:18"},{text:"Come to me, all you who are weary and burdened, and I will give you rest.",reference:"Matthew 11:28"},{text:"He heals the brokenhearted and binds up their wounds.",reference:"Psalm 147:3"},{text:"Cast all your anxiety on him because he cares for you.",reference:"1 Peter 5:7"},{text:"The Lord is my shepherd, I lack nothing.",reference:"Psalm 23:1"},{text:"Be still, and know that I am God.",reference:"Psalm 46:10"},{text:"For I know the plans I have for you, declares the Lord, plans to prosper you and not to harm you, plans to give you hope and a future.",reference:"Jeremiah 29:11"},{text:"Peace I leave with you; my peace I give you. Do not let your hearts be troubled and do not be afraid.",reference:"John 14:27"},{text:"God is our refuge and strength, an ever-present help in trouble.",reference:"Psalm 46:1"},{text:"Even though I walk through the darkest valley, I will fear no evil, for you are with me.",reference:"Psalm 23:4"},{text:"But those who hope in the Lord will renew their strength. They will soar on wings like eagles; they will run and not grow weary, they will walk and not be faint.",reference:"Isaiah 40:31"},{text:"The Lord himself goes before you and will be with you; he will never leave you nor forsake you. Do not be afraid; do not be discouraged.",reference:"Deuteronomy 31:8"},{text:"My grace is sufficient for you, for my power is made perfect in weakness.",reference:"2 Corinthians 12:9"},{text:"I have told you these things, so that in me you may have peace. In this world you will have trouble. But take heart! I have overcome the world.",reference:"John 16:33"},{text:"The Lord is gracious and compassionate, slow to anger and rich in love.",reference:"Psalm 145:8"}],mN=["Sit with these words for a moment. What comes up for you?","Take a breath and read it again. What draws you in?","Read this slowly. What do you notice?","Let these words settle. What stirs in you?","Breathe that in for a moment. What feels true?"],mU="vof-seen-verses",mk=e.i(85378).default,mB=null,mO=0,mz=null,mH=null;async function mV(){var e;let t=await fetch("/api/session");if(!t.ok)throw Error(`Session token fetch failed: ${t.status}`);let n=await t.json();return mB=n.token,mO=Math.floor(Date.now()/1e3)+n.expiresIn,e=n.expiresIn,mH&&clearTimeout(mH),mH=setTimeout(()=>{mz=mV().finally(()=>{mz=null})},Math.max(1e3,.75*e*1e3)),n.token}async function mG(){return mB&&mB&&mO&&Date.now()/1e3<mO?mB:mz||(mz=mV().finally(()=>{mz=null}))}async function mj(e,t){let n=await mG(),i=new Headers(t?.headers);i.set("X-Session-Token",n);let r=await fetch(e,{...t,headers:i});if(401===r.status){mB=null,mO=0,mH&&(clearTimeout(mH),mH=null);let n=await mG(),i=new Headers(t?.headers);return i.set("X-Session-Token",n),fetch(e,{...t,headers:i})}return r}let mW=Object.fromEntries([{trackNumber:1,hash:"6d9937d6",title:"THE ONE",songId:"the-one",duration:185.352},{trackNumber:2,hash:"ca7e03f7",title:"ANYWHERE",songId:"anywhere",duration:202.272},{trackNumber:3,hash:"225c23b6",title:"BUSINESS",songId:"business",duration:300.648},{trackNumber:4,hash:"1d0af28e",title:"MIRACLE WORKER",songId:"miracle-worker",duration:225.72},{trackNumber:5,hash:"7f0d4198",title:"ARMOR",songId:"armor",duration:260.928},{trackNumber:6,hash:"711222b0",title:"I FORGIVE YOU",songId:"i-forgive-you",duration:204.048},{trackNumber:7,hash:"5e659585",title:"BOUNCE",songId:"bounce",duration:161.016},{trackNumber:8,hash:"6b90a924",title:"FAVOR",songId:"favor",duration:266.64}
1891,{trackNumber:9,hash:"a0975b4a",title:"ARE YOU READY?",songId:"are-you-ready",duration:225.696},{trackNumber:10,hash:"95954c22",title:"ANGELS",songId:"angels",duration:231.912},{trackNumber:11,hash:"8b486a4d",title:"WON'T HE DO IT?",songId:"wont-he-do-it",duration:200.352},{trackNumber:12,hash:"dd082640",title:"OK TO FALL",songId:"ok-to-fall",duration:240.168},{trackNumber:13,hash:"27f07628",title:"REBORN",songId:"reborn",duration:225.264}].map(e=>[e.songId,e])),mX=700;function mq(e){return new Promise(t=>setTimeout(t,e))}function mY(e){let t=e.headers.get("Retry-After");if(!t)return 1e3;let n=Number.parseFloat(t);return!Number.isFinite(n)||n<=0?1e3:Math.min(1e3*n,15e3)}function mZ({songId:e,enabled:t,isTTSPlaying:n}){let i=(0,ec.useRef)(null),r=(0,ec.useRef)(null),a=(0,ec.useRef)(null),s=(0,ec.useRef)(0),o=(0,ec.useRef)(null),l=(0,ec.useRef)(null),u=(0,ec.useRef)(n),c=(0,ec.useRef)(null),d=(0,ec.useRef)(null),h=(0,ec.useRef)(!1);(0,ec.useEffect)(()=>{u.current=n},[n]);let p=(0,ec.useCallback)(()=>{r.current&&(URL.revokeObjectURL(r.current),r.current=null)},[]),f=(0,ec.useCallback)(()=>{c.current&&(clearTimeout(c.current),c.current=null),d.current&&(clearInterval(d.current),d.current=null),h.current=!1},[]),m=(0,ec.useCallback)(()=>{a.current?.abort(),a.current=null,p(),l.current=null,o.current=null},[p]),g=(0,ec.useCallback)(()=>{if(i.current)return i.current;let e=new Audio;return e.preload="auto",i.current=e,e},[]),v=(0,ec.useCallback)(()=>{f(),m();let e=i.current;e&&(e.pause(),e.currentTime=0)},[f,m]),y=(0,ec.useCallback)((e=mX)=>{f(),a.current?.abort(),a.current=null;let t=i.current;if(!t||t.paused||t.volume<=0||e<=0)return void v();let n=t.volume,r=Math.max(1,Math.round(e/40)),s=0;h.current=!0,d.current=setInterval(()=>{let e=i.current;e?(e.volume=Math.max(0,n*Math.max(0,1-++s/r)),s>=r&&v()):v()},40)},[f,v]),x=(0,ec.useCallback)(e=>{f(),c.current=setTimeout(()=>{if(e!==s.current)return;let t=i.current;if(!t||t.paused)return;let n=t.volume;if(n<=0)return;h.current=!0;let r=Math.max(1,Math.round(75)),a=0;d.current=setInterval(()=>{let e=i.current;e?(e.volume=Math.max(0,n*Math.max(0,1-++a/r)),a>=r&&(e.pause(),f())):f()},40)},1e4)},[f]),b=(0,ec.useCallback)(async(e,t)=>{for(let n=0;n<=3;n++){let i=await mj(`/api/album/token?id=${encodeURIComponent(e)}`,{signal:t});if(429===i.status){if(3===n)throw Error("Too many requests for track token");await mq(mY(i));continue}if(!i.ok)throw Error(`Failed to fetch track token: ${i.status}`);let r=await i.json();if(!r.token)throw Error("Token missing from response");return r.token}throw Error("Failed to fetch track token")},[]),S=(0,ec.useCallback)(async(e,t,n)=>{let i=0;for(;;){let r=await fetch(e,{headers:{Range:`bytes=${t}-${t+131072-1}`},signal:n});if(429===r.status&&i<3){i++,await mq(mY(r));continue}return r}},[]);return(0,ec.useEffect)(()=>{if(!t||!e||!mW[e])return void y(mX);let n=++s.current;f();let i=new AbortController;return a.current?.abort(),a.current=i,(async()=>{let t=g();if(t){t.pause(),t.currentTime=0,p(),l.current=null,o.current=null;try{let a=await b(e,i.signal);if(i.signal.aborted||n!==s.current)return;let c=`https://album-stream.vof-shopify.workers.dev?id=${encodeURIComponent(e)}&token=${encodeURIComponent(a)}`;if("undefined"!=typeof MediaSource&&MediaSource.isTypeSupported("audio/mpeg")){let e=new MediaSource;o.current=e;let a=URL.createObjectURL(e);if(r.current=a,t.src=a,await new Promise(t=>{e.addEventListener("sourceopen",()=>t(),{once:!0})}),i.signal.aborted||n!==s.current)return;let d=e.addSourceBuffer("audio/mpeg");l.current=d;let h=e=>new Promise((t,n)=>{let i=()=>{d.removeEventListener("updateend",i),d.removeEventListener("error",r),t()},r=()=>{d.removeEventListener("updateend",i),d.removeEventListener("error",r),n(Error("SourceBuffer append error"))};d.addEventListener("updateend",i),d.addEventListener("error",r),d.appendBuffer(e)}),p=0,f=!1;for(;;){if(i.signal.aborted||n!==s.current)return;let e=await S(c,p,i.signal);if(i.signal.aborted||n!==s.current)return;if(206!==e.status)throw Error(`Unexpected stream response: ${e.status}`);let r=await e.arrayBuffer();if(0===r.byteLength)break;await h(r),f||(f=!0,t.volume=u.current?.15:1,await t.play(),x(n)),p+=r.byteLength;let a=e.headers.get("Content-Range");if(a){let e=a.match(/\/(\d+)$/);if(e){let t=Number.parseInt(e[1],10);if(p>=t)break}}}n===s.current&&"open"===e.readyState&&l.current&&!l.current.updating&&e.endOfStream()}else{let e=[],a=0,o=!1;for(;;){if(i.signal.aborted||n!==s.current)return;let l=await S(c,a,i.signal);if(i.signal.aborted||n!==s.current)return;if(206!==l.status)throw Error(`Unexpected stream response: ${l.status}`);let d=await l.arrayBuffer();if(0===d.byteLength)break;if(e.push(d),a+=d.byteLength,!o&&e.length>=1){o=!0,p();let i=new Blob(e,{type:"audio/mpeg"}),a=URL.createObjectURL(i);r.current=a,t.src=a,t.load(),t.volume=u.current?.15:1,await t.play(),x(n)}let h=l.headers.get("Content-Range");if(h){let e=h.match(/\/(\d+)$/);if(e){let t=Number.parseInt(e[1],10);if(a>=t)break}}}if(i.signal.aborted||n!==s.current)return;p();let l=new Blob(e,{type:"audio/mpeg"}),d=URL.createObjectURL(l);r.current=d;let h=t.currentTime,f=!t.paused;t.src=d,t.load(),t.addEventListener("canplay",()=>{t.currentTime=h,f&&t.play()},{once:!0}),o||(t.volume=u.current?.15:1,await t.play(),x(n))}}catch(e){i.signal.aborted||console.error("Failed to play end-song audio:",e)}}})(),()=>{i.abort(),a.current===i&&(a.current=null)}},[t,e,b,g,v,p,S,x,y,f]),(0,ec.useEffect)(()=>{let e=i.current;if(!e||h.current)return;let t=n?.15:1,r=Math.max(1,Math.round(25)),a=(t-e.volume)/r;if(.001>
1891Math.abs(a))return;let s=0,o=setInterval(()=>{++s>=r?(e.volume=t,clearInterval(o)):e.volume=Math.min(1,Math.max(0,e.volume+a))},16);return()=>clearInterval(o)},[n]),(0,ec.useEffect)(()=>()=>{v();let e=i.current;e&&(e.pause(),e.src="")},[v]),null}let mK=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],mJ=new Set(mK),mQ=(e,t,n)=>n>t?t:n<e?e:n,m$={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},m0={...m$,transform:e=>mQ(0,1,e)},m1={...m$,default:1},m2=e=>Math.round(1e5*e)/1e5,m3=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,m4=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,m5=(e,t)=>n=>!!("string"==typeof n&&m4.test(n)&&n.startsWith(e)||t&&null!=n&&Object.prototype.hasOwnProperty.call(n,t)),m6=(e,t,n)=>i=>{if("string"!=typeof i)return i;let[r,a,s,o]=i.match(m3);return{[e]:parseFloat(r),[t]:parseFloat(a),[n]:parseFloat(s),alpha:void 0!==o?parseFloat(o):1}},m8={...m$,transform:e=>Math.round(mQ(0,255,e))},m9={test:m5("rgb","red"),parse:m6("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+m8.transform(e)+", "+m8.transform(t)+", "+m8.transform(n)+", "+m2(m0.transform(i))+")"},m7={test:m5("#"),parse:function(e){let t="",n="",i="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,i+=i,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}},transform:m9.transform},ge=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),gt=ge("deg"),gn=ge("%"),gi=ge("px"),gr=ge("vh"),ga=ge("vw"),gs={...gn,parse:e=>gn.parse(e)/100,transform:e=>gn.transform(100*e)},go={test:m5("hsl","hue"),parse:m6("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+gn.transform(m2(t))+", "+gn.transform(m2(n))+", "+m2(m0.transform(i))+")"},gl={test:e=>m9.test(e)||m7.test(e)||go.test(e),parse:e=>m9.test(e)?m9.parse(e):go.test(e)?go.parse(e):m7.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?m9.transform(e):go.transform(e),getAnimatableNone:e=>{let t=gl.parse(e);return t.alpha=0,gl.transform(t)}},gu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,gc="number",gd="color",gh=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function gp(e){let t=e.toString(),n=[],i={color:[],number:[],var:[]},r=[],a=0,s=t.replace(gh,e=>(gl.test(e)?(i.color.push(a),r.push(gd),n.push(gl.parse(e))):e.startsWith("var(")?(i.var.push(a),r.push("var"),n.push(e)):(i.number.push(a),r.push(gc),n.push(parseFloat(e))),++a,"${}")).split("${}");return{values:n,split:s,indexes:i,types:r}}function gf(e){return gp(e).values}function gm(e){let{split:t,types:n}=gp(e),i=t.length;return e=>{let r="";for(let a=0;a<i;a++)if(r+=t[a],void 0!==e[a]){let t=n[a];t===gc?r+=m2(e[a]):t===gd?r+=gl.transform(e[a]):r+=e[a]}return r}}let gg=e=>"number"==typeof e?0:gl.test(e)?gl.getAnimatableNone(e):e,gv={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(m3)?.length||0)+(e.match(gu)?.length||0)>0},parse:gf,createTransformer:gm,getAnimatableNone:function(e){let t=gf(e);return gm(e)(t.map(gg))}},gy=new Set(["brightness","contrast","saturate","opacity"]);function gx(e){let[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[i]=n.match(m3)||[];if(!i)return e;let r=n.replace(i,""),a=+!!gy.has(t);return i!==n&&(a*=100),t+"("+a+r+")"}let gb=/\b([a-z-]*)\(.*?\)/gu,gS={...gv,getAnimatableNone:e=>{let t=e.match(gb);return t?t.map(gx).join(" "):e}},g_={...m$,transform:Math.round},gw={borderWidth:gi,borderTopWidth:gi,borderRightWidth:gi,borderBottomWidth:gi,borderLeftWidth:gi,borderRadius:gi,borderTopLeftRadius:gi,borderTopRightRadius:gi,borderBottomRightRadius:gi,borderBottomLeftRadius:gi,width:gi,maxWidth:gi,height:gi,maxHeight:gi,top:gi,right:gi,bottom:gi,left:gi,inset:gi,insetBlock:gi,insetBlockStart:gi,insetBlockEnd:gi,insetInline:gi,insetInlineStart:gi,insetInlineEnd:gi,padding:gi,paddingTop:gi,paddingRight:gi,paddingBottom:gi,paddingLeft:gi,paddingBlock:gi,paddingBlockStart:gi,paddingBlockEnd:gi,paddingInline:gi,paddingInlineStart:gi,paddingInlineEnd:gi,margin:gi,marginTop:gi,marginRight:gi,marginBottom:gi,marginLeft:gi,marginBlock:gi,marginBlockStart:gi,marginBlockEnd:gi,marginInline:gi,marginInlineStart:gi,marginInlineEnd:gi,fontSize:gi,backgroundPositionX:gi,backgroundPositionY:gi,rotate:gt,rotateX:gt,rotateY:gt,rotateZ:gt,scale:m1,scaleX:m1,scaleY:m1,scaleZ:m1,skew:gt,skewX:gt,skewY:gt,distance:gi,translateX:gi,translateY:gi,translateZ:gi,x:gi,y:gi,z:gi,perspective:gi,transformPerspective:gi,opacity:m0,originX:gs,originY:gs,originZ:gi,zIndex:g_,fillOpacity:m0,strokeOpacity:m0,numOctaves:g_},gM={...gw,color:gl,backgroundColor:gl,outlineColor:gl,fill:gl,stroke:gl,borderColor:gl,borderTopColor:gl,borderRightColor:gl,borderBottomColor:gl,borderLeftColor:gl,filter:gS,WebkitFilter:gS},gT=e=>gM[e],gE=()=>({translate:0,scale:1,origin:0,originPoint:0}),gA=()=>({x:gE(),y:gE()}),gC=()=>({min:0,max:0}),gP=()=>({x:gC(),y:gC()}),gR=e=>!!(e&&e.getVelocity),gI=new Set(["width","height","top","left","right","bottom",...mK]),gD=e=>t=>t.test(e),gL=[m$,gi,gn,gt,ga,gr,{test:e=>"auto"===e,parse:e=>e}],gF=e=>gL.find(gD(e)),gN=()=>{},gU=()=>{};el.default;let gk=e=>t=>"string"==typeof t&&t.startsWith(e),gB=gk("--"),gO=gk("var(--"),gz=e=>!!gO(e)&&gH.test(e.split("/*")[0].trim()),gH=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function gV(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}let gG=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,gj=e=>180*e/Math.PI,gW=e=>gq(gj(Math.atan2(e[1],e[0]))),gX={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:gW,rotateZ:gW,skewX:e=>gj(Math.atan(e[1])),skewY:e=>gj(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},gq=e=>((e%=360)<0&&(e+=360),e),gY=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),gZ=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),gK={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:gY,scaleY:gZ,scale:e=>(gY(e)+gZ(e))/2,rotateX:e=>gq(gj(Math.atan2(e[6],e[5]))),rotateY:e=>gq(gj(Math.atan2(-e[2],e[0]))),rotateZ:gW,rotate:gW,skewX:e=>gj(Math.atan(e[4])),skewY:e=>gj(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function gJ(e){return+!!e.includes("scale")}function gQ(e,t){let n,i;if(!e||"none"===e)return gJ(t);let r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);if(r)n=gK,i=r;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=gX,i=t}if(!i)return gJ(t);let a=n[t],s=i[1].split(",").map(g$);return"function"==typeof a?a(s):s[a]}function g$(e){return parseFloat(e.trim())}let g0=e=>e===m$||e===gi,g1=new Set(["x","y","z"]),g2=mK.filter(e=>!g1.has(e)),g3={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>gQ(t,"x"),y:(e,{transform:t})=>gQ(t,"y")};g3.translateX=g3.x,g3.translateY=g3.y;let g4=e=>e,g5={},g6=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function g8(e,t){let n=!1,i=!0,r={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,s=g6.reduce((e,n)=>(e[n]=function(e,t){let n=new Set,i=new Set,r=!1,a=!1,s=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1},l=0;function u(t){s.has(t)&&(c.schedule(t),e()),l++,t(o)}let c={schedule:(e,t=!1,a=!1)=>{let o=a&&r?n:i;return t&&s.add(e),o.has(e)||o.add(e),e},cancel:e=>{i.delete(e),s.delete(e)},process:e=>{if(o=e,r){a=!0;return}
1891r=!0,[n,i]=[i,n],n.forEach(u),t,l=0,n.clear(),r=!1,a&&(a=!1,c.process(e))}};return c}(a,t?n:void 0),e),{}),{setup:o,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:h,render:p,postRender:f}=s,m=()=>{let a=g5.useManualTiming?r.timestamp:performance.now();n=!1,g5.useManualTiming||(r.delta=i?1e3/60:Math.max(Math.min(a-r.timestamp,40),1)),r.timestamp=a,r.isProcessing=!0,o.process(r),l.process(r),u.process(r),c.process(r),d.process(r),h.process(r),p.process(r),f.process(r),r.isProcessing=!1,n&&t&&(i=!1,e(m))};return{schedule:g6.reduce((t,a)=>{let o=s[a];return t[a]=(t,a=!1,s=!1)=>(!n&&(n=!0,i=!0,r.isProcessing||e(m)),o.schedule(t,a,s)),t},{}),cancel:e=>{for(let t=0;t<g6.length;t++)s[g6[t]].cancel(e)},state:r,steps:s}}let{schedule:g9,cancel:g7,state:ve,steps:vt}=g8("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:g4,!0),vn=new Set,vi=!1,vr=!1,va=!1;function vs(){if(vr){let e=Array.from(vn).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t,i=(t=[],g2.forEach(n=>{let i=e.getValue(n);void 0!==i&&(t.push([n,i.get()]),i.set(+!!n.startsWith("scale")))}),t);i.length&&(n.set(e,i),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}vr=!1,vi=!1,vn.forEach(e=>e.complete(va)),vn.clear()}function vo(){vn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(vr=!0)})}class vl{constructor(e,t,n,i,r,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=i,this.element=r,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(vn.add(this),vi||(vi=!0,g9.read(vo),g9.resolveKeyframes(vs))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:i}=this;if(null===e[0]){let r=i?.get(),a=e[e.length-1];if(void 0!==r)e[0]=r;else if(n&&t){let i=n.readValue(t,a);null!=i&&(e[0]=i)}void 0===e[0]&&(e[0]=a),i&&void 0===r&&i.set(e[0])}for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),vn.delete(this)}cancel(){"scheduled"===this.state&&(vn.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}function vu(e,t){let n=gT(e);return n!==gS&&(n=gv),n.getAnimatableNone?n.getAnimatableNone(t):void 0}let vc=new Set(["auto","none","0"]);class vd extends vl{constructor(e,t,n,i,r){super(e,t,n,i,r,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let i=e[n];if("string"==typeof i&&gz(i=i.trim())){let r=function e(t,n,i=1){gU(i<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[r,a]=function(e){let t=gG.exec(e);if(!t)return[,];let[,n,i,r]=t;return[`--${n??i}`,r]}(t);if(!r)return;let s=window.getComputedStyle(n).getPropertyValue(r);if(s){let e=s.trim();return/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e)?parseFloat(e):e}return gz(a)?e(a,n,i+1):a}(i,t.current);void 0!==r&&(e[n]=r),n===e.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!gI.has(n)||2!==e.length)return;let[i,r]=e,a=gF(i),s=gF(r);if(gV(i)!==gV(r)&&g3[n]){this.needsMeasurement=!0;return}if(a!==s)if(g0(a)&&g0(s))for(let t=0;t<e.length;t++){let n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else g3[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(null===e[t]||function(e){if("number"==typeof e)return 0===e;if(null===e)return!0;return"none"===e||"0"===e||/^0[^.\s]+$/u.test(e)}(e[t]))&&n.push(t);n.length&&function(e,t,n){let i,r=0;for(;r<e.length&&!i;){let t=e[r];"string"==typeof t&&!vc.has(t)&&gp(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=vu(n,i)}(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=g3[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let i=t[t.length-1];void 0!==i&&e.getValue(n,i).jump(i,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let i=e.getValue(t);i&&i.jump(this.measuredOrigin,!1);let r=n.length-1,a=n[r];n[r]=g3[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==a&&void 0===this.finalKeyframe&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEac
1891h(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}function vh(e,t){-1===e.indexOf(t)&&e.push(t)}function vp(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}class vf{constructor(){this.subscriptions=[]}add(e){return vh(this.subscriptions,e),()=>vp(this.subscriptions,e)}notify(e,t,n){let i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](e,t,n);else for(let r=0;r<i;r++){let i=this.subscriptions[r];i&&i(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}let{schedule:vm}=g8(queueMicrotask,!1);function vg(){d=void 0}let vv={now:()=>(void 0===d&&vv.set(ve.isProcessing||g5.useManualTiming?ve.timestamp:performance.now()),d),set:e=>{d=e,queueMicrotask(vg)}};class vy{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=vv.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=vv.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=!isNaN(parseFloat(this.current)))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new vf);let n=this.events[e].add(t);return"change"===e?()=>{n(),g9.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return P&&P.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var e;let t=vv.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;let n=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e=parseFloat(this.current)-parseFloat(this.prevFrameValue),n?1e3/n*e:0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function vx(e,t){return new vy(e,t)}let vb=[...gL,gl,gv],vS={current:null},v_={current:!1},vw="undefined"!=typeof window,vM=new WeakMap;function vT(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function vE(e){return"string"==typeof e||Array.isArray(e)}let vA=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],vC=["initial",...vA];function vP(e){return vT(e.animate)||vC.some(t=>vE(e[t]))}function vR(e){return!!(vP(e)||e.variants)}function vI(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function vD(e,t,n,i){if("function"==typeof t){let[r,a]=vI(i);t=t(void 0!==n?n:e.custom,r,a)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[r,a]=vI(i);t=t(void 0!==n?n:e.custom,r,a)}return t}let vL=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],vF={};class vN{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:a,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=vl,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=vv.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,g9.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=r,this.options=o,this.blockInitialAnimation=!!a,this.isControllingVariants=vP(t),this.isVariantNode=vR(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in d){const t=d[e];void 0!==l[e]&&gR(t)&&t.set(l[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,vM.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEac
1891h((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(v_.current||function(){if(v_.current=!0,vw)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>vS.current=e.matches;e.addEventListener("change",t),t()}else vS.current=!1}(),this.shouldReduceMotion=vS.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){for(let e in this.projection&&this.projection.unmount(),g7(this.notifyUpdate),g7(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){let n;this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let i=mJ.has(e);i&&this.onBindTransform&&this.onBindTransform();let r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&g9.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});"undefined"!=typeof window&&window.MotionCheckAppearSync&&(n=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),n&&n(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in vF){let t=vF[e];if(!t)continue;let{isEnabled:n,Feature:i}=t;if(!this.features[e]&&i&&n(this.props)&&(this.features[e]=new i(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):gP()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<vL.length;t++){let n=vL[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let i=e["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(e,t,n){for(let i in t){let r=t[i],a=n[i];if(gR(r))e.addValue(i,r);else if(gR(a))e.addValue(i,vx(r,{owner:e}));else if(a!==r)if(e.hasValue(i)){let t=e.getValue(i);!0===t.liveStyle?t.jump(r):t.hasAnimated||t.set(r)}else{let t=e.getStaticValue(i);e.addValue(i,vx(void 0!==t?t:r,{owner:e}))}}for(let i in n)void 0===t[i]&&e.removeValue(i);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=vx(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];if(null!=n){let i,r;if("string"==typeof n&&(i=n,/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(i)||(r=n,/^0[^.\s]+$/u.test(r))))n=parseFloat(n);else{let i;i=n,!vb.find(gD(i))&&gv.test(t)&&(n=vu(e,t))}this.setBaseTarget(e,gR(n)?n.get():n)}return gR(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let t,{initial:n}=this.props;if("string"==typeof n||"object"==typeof n){let i=vD(this.props,n,this.presenceContext?.custom);i&&(t=i[e])}if(n&&void 0!==t)return t;let i=this.getBaseTargetFromProps(this.props,e);return void 0===i||gR(i)?void 0!==this.initialValues[e]&&void 0===t?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new vf),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){vm.render(this.render)}}class vU extends vN{constructor(){super(...arguments),this.KeyframeResolver=vd}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;gR(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}function vk(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}let vB=(e,t)=>t&&"number"==typeof e?t.transform(e):e,vO={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},vz=mK.length;function vH(e,t,n){let{style:i,vars:r,transformOrigin:a}=e,s=!1,o=!1;for(let e in t){let n=t[e];if(mJ.has(e)){s=!0;continue}if(gB(e)){r[e]=n;continue}{let t=vB(n,gw[e]);e.startsWith("origin")?(o=!0,a[e]=t):i[e]=t}}if(!t.transform&&(s||n?i.transform=function(e,t,n){let i="",r=!0;for(let a=0;a<vz;a++){let s=mK[a],o=e[s];if(void 0===o)continue;let l=!0;if("number"==typeof o)l=o===+!!s.startsWith("scale");else{let e=parseFloat(o);l=s.startsWith("scale")?1===e:0===e}if(!l||n){let e=vB(o,gw[s]);if(!l){r=!1;let t=vO[s]||s;i+=`${t}(${e}) `}n&&(t[s]=e)}}return i=i.trim(),n?i=n(t,r?"":i):r&&(i="none"),i}(t,e.transform,n):i.transform&&(i.transform="none")),o){let{originX:e="50%",originY:t="50%",originZ:n=0}=a;i.transformOrigin=`${e} ${t} ${n}`}}let vV={offset:"stroke-dashoffset",array:"stroke-dasharray"},vG={offset:"strokeDashoffset",array:"strokeDasharray"},vj=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function vW(e,{attrX:t,attrY:n,attrScale:i,pathLength:r,pathSpacing:a=1,pathOffset:s=0,...o}
1891,l,u,c){if(vH(e,o,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:h}=e;for(let e of(d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=c?.transformBox??"fill-box",delete d.transformBox),vj))void 0!==d[e]&&(h[e]=d[e],delete d[e]);void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==i&&(d.scale=i),void 0!==r&&function(e,t,n=1,i=0,r=!0){e.pathLength=1;let a=r?vV:vG;e[a.offset]=`${-i}`,e[a.array]=`${t} ${n}`}(d,r,a,s,!1)}let vX=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),vq=e=>"string"==typeof e&&"svg"===e.toLowerCase();function vY(e,{style:t,vars:n},i,r){let a,s=e.style;for(a in t)s[a]=t[a];for(a in r?.applyProjectionStyles(s,i),n)s.setProperty(a,n[a])}function vZ(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}let vK={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e)if(!gi.test(e))return e;else e=parseFloat(e);let n=vZ(e,t.target.x),i=vZ(e,t.target.y);return`${n}% ${i}%`}},vJ=(e,t,n)=>e+(t-e)*n,vQ={borderRadius:{...vK,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:vK,borderTopRightRadius:vK,borderBottomLeftRadius:vK,borderBottomRightRadius:vK,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let i=gv.parse(e);if(i.length>5)return e;let r=gv.createTransformer(e),a=+("number"!=typeof i[0]),s=n.x.scale*t.x,o=n.y.scale*t.y;i[0+a]/=s,i[1+a]/=o;let l=vJ(s,o,.5);return"number"==typeof i[2+a]&&(i[2+a]/=l),"number"==typeof i[3+a]&&(i[3+a]/=l),r(i)}}};function v$(e,{layout:t,layoutId:n}){return mJ.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!vQ[e]||"opacity"===e)}function v0(e,t,n){let i=e.style,r=t?.style,a={};if(!i)return a;for(let t in i)(gR(i[t])||r&&gR(r[t])||v$(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=i[t]);return a}function v1(e,t,n){let i=v0(e,t,n);for(let n in e)(gR(e[n])||gR(t[n]))&&(i[-1!==mK.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return i}class v2 extends vU{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=gP}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(mJ.has(t)){let e=gT(t);return e&&e.default||0}return t=vX.has(t)?t:vk(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return v1(e,t,n)}
1891build(e,t,n){vW(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,i){for(let n in vY(e,t,void 0,i),t.attrs)e.setAttribute(vX.has(n)?n:vk(n),t.attrs[n])}mount(e){this.isSVGTag=vq(e.tagName),super.mount(e)}}function v3({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function v4(e){return void 0===e||1===e}function v5({scale:e,scaleX:t,scaleY:n}){return!v4(e)||!v4(t)||!v4(n)}function v6(e){return v5(e)||v8(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function v8(e){var t,n;return(t=e.x)&&"0%"!==t||(n=e.y)&&"0%"!==n}function v9(e,t,n,i,r){return void 0!==r&&(e=i+r*(e-i)),i+n*(e-i)+t}function v7(e,t=0,n=1,i,r){e.min=v9(e.min,t,n,i,r),e.max=v9(e.max,t,n,i,r)}function ye(e,{x:t,y:n}){v7(e.x,t.translate,t.scale,t.originPoint),v7(e.y,n.translate,n.scale,n.originPoint)}function yt(e,t){e.min=e.min+t,e.max=e.max+t}function yn(e,t,n,i,r=.5){let a=vJ(e.min,e.max,r);v7(e,t,n,a,i)}function yi(e,t){yn(e.x,t.x,t.scaleX,t.scale,t.originX),yn(e.y,t.y,t.scaleY,t.scale,t.originY)}function yr(e,t){return v3(function(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(e.getBoundingClientRect(),t))}class ya extends vU{constructor(){super(...arguments),this.type="html",this.renderInstance=vY}readValueFromInstance(e,t){if(mJ.has(t))return this.projection?.isProjecting?gJ(t):((e,t)=>{let{transform:n="none"}=getComputedStyle(e);return gQ(n,t)})(e,t);{let n=window.getComputedStyle(e),i=(gB(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof i?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:t}){return yr(e,t)}build(e,t,n){vH(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return v0(e,t,n)}}let ys=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function yo(e){if("string"!=typeof e||e.includes("-"));else if(ys.indexOf(e)>-1||/[A-Z]/u.test(e))return!0;return!1}let yl=(0,ec.createContext)({}),yu=(0,ec.createContext)({strict:!1}),yc=(0,ec.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),yd=(0,ec.createContext)({});function yh(e){return Array.isArray(e)?e.join(" "):e}let yp=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function yf(e,t,n){for(let i in t)gR(t[i])||v$(i,n)||(e[i]=t[i])}let ym=()=>({...yp(),attrs:{}}),yg=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function yv(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||yg.has(e)}let yy=e=>!yv(e);try{F=(()=>{let e=Error("Cannot find module '@emotion/is-prop-valid'");throw e.code="MODULE_NOT_FOUND",e})().default,"function"==typeof F&&(yy=e=>e.startsWith("on")?!yv(e):F(e))}catch{}function yx(e){return gR(e)?e.get():e}let yb=(0,ec.createContext)(null);function yS(e){let t=(0,ec.useRef)(null);return null===t.current&&(t.current=e()),t.current}let y_=e=>(t,n)=>{let i=(0,ec.useContext)(yd),r=(0,ec.useContext)(yb),a=()=>(function({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,r){return{latestValues:function(e,t,n,i){let r={},a=i(e,{});for(let e in a)r[e]=yx(a[e]);let{initial:s,animate:o}=e,l=vP(e),u=vR(e);t&&u&&!l&&!1!==e.inherit&&(void 0===s&&(s=t.initial),void 0===o&&(o=t.animate));let c=!!n&&!1===n.initial,d=(c=c||!1===s)?o:s;if(d&&"boolean"!=typeof d&&!vT(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let i=vD(e,t[n]);if(i){let{transitionEnd:e,transition:t,...n}=i;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=c?t.length-1:0;t=t[e]}null!==t&&(r[e]=t)}for(let t in e)r[t]=e[t]}}}return r}(n,i,r,e),renderState:t()}})(e,t,i,r);return n?a():yS(a)},yw=y_({scrapeMotionValuesFromProps:v0,createRenderState:yp}),yM=y_({scrapeMotionValuesFromProps:v1,createRenderState:ym}),yT="undefined"!=typeof window,yE={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},yA=!1;function yC(){return!function(){if(yA)return;let e={};for(let t in yE)e[t]={isEnabled:e=>yE[t].some(t=>!!e[t])};vF=e,yA=!0}(),vF}let yP=Symbol.for("motionComponentSymbol"),yR="data-"+vk("framerAppearId"),yI=(0,ec.createContext)({});function yD(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}let yL=yT?ec.useLayoutEffect:ec.useEffect;function yF(e,{forwardMotionProps:t=!1,type:n}={},i,r){i&&function(e){let t=yC();for(let n in e)t[n]={...t[n],...e[n]};vF=t}(i);let a=n?"svg"===n:yo(e),s=a?yM:yw;function o(n,i){var o;let l,u,c,d={...(0,ec.useContext)(yc),...n,layoutId:function({layoutId:e}){let t=(0,ec.useContext)(yl).id;return t&&void 0!==e?t+"-"+e:e}(n)},{isStatic:h}=d,p=function(e){let{initial:t,animate:n}=function(e,t){if(vP(e)){let{initial:t,animate:n}=e;return{initial:!1===t||vE(t)?t:void 0,animate:vE(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,ec.useContext)(yd));return(0,ec.useMemo)(()=>({initial:t,animate:n}),[yh(t),yh(n)])}(n),f=s(n,h);if(!h&&yT){(0,ec.useContext)(yu).strict;let t=function(e){let{drag:t,layout:n}=yC();if(!t&&!n)return{};let i={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}
1891(d);l=t.MeasureLayout,p.visualElement=function(e,t,n,i,r,a){let{visualElement:s}=(0,ec.useContext)(yd),o=(0,ec.useContext)(yu),l=(0,ec.useContext)(yb),u=(0,ec.useContext)(yc),c=u.reducedMotion,d=u.skipAnimations,h=(0,ec.useRef)(null),p=(0,ec.useRef)(!1);i=i||o.renderer,!h.current&&i&&(h.current=i(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:c,skipAnimations:d,isSVG:a}),p.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));let f=h.current,m=(0,ec.useContext)(yI);f&&!f.projection&&r&&("html"===f.type||"svg"===f.type)&&function(e,t,n,i){let{layoutId:r,layout:a,drag:s,dragConstraints:o,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1!==t.options.allowProjection?t.projection:e(t.parent)}(e.parent)),e.projection.setOptions({layoutId:r,layout:a,alwaysMeasureLayout:!!s||o&&yD(o),visualElement:e,animationType:"string"==typeof a?a:"both",initialPromotionConfig:i,crossfade:c,layoutScroll:l,layoutRoot:u})}(h.current,n,r,m);let g=(0,ec.useRef)(!1);(0,ec.useInsertionEffect)(()=>{f&&g.current&&f.update(n,l)});let v=n[yR],y=(0,ec.useRef)(!!v&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return yL(()=>{p.current=!0,f&&(g.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),f.scheduleRenderMicrotask(),y.current&&f.animationState&&f.animationState.animateChanges())}),(0,ec.useEffect)(()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),y.current=!1),f.enteringChildren=void 0)}),f}(e,f,d,r,t.ProjectionNode,a)}return(0,eu.jsxs)(yd.Provider,{value:p,children:[l&&p.visualElement?(0,eu.jsx)(l,{visualElement:p.visualElement,...d}):null,function(e,t,n,{latestValues:i},r,a=!1,s){let o=(s??yo(e)?function(e,t,n,i){let r=(0,ec.useMemo)(()=>{let n=ym();return vW(n,t,vq(i),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};yf(t,e.style,e),r.style={...t,...r.style}}return r}:function(e,t){let n,i,r={},a=(n=e.style||{},yf(i={},n,e),Object.assign(i,function({transformTemplate:e},t){return(0,ec.useMemo)(()=>{let n=yp();return vH(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),i);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,a.userSelect=a.WebkitUserSelect=a.WebkitTouchCallout="none",a.touchAction=!0===e.drag?"none":`pan-${"x"===e.drag?"y":"x"}`),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=a,r})(t,i,r,e),l=function(e,t,n){let i={};for(let r in e)("values"!==r||"object"!=typeof e.values)&&(yy(r)||!0===n&&yv(r)||!t&&!yv(r)||e.draggable&&r.startsWith("onDrag"))&&(i[r]=e[r]);return i}(t,"string"==typeof e,a),u=e!==ec.Fragment?{...l,...o,ref:n}:{},{children:c}=t,d=(0,ec.useMemo)(()=>gR(c)?c.get():c,[c]);return(0,ec.createElement)(e,{...u,children:d})}(e,n,(o=p.visualElement,u=(0,ec.useRef)(i),(0,ec.useInsertionEffect)(()=>{u.current=i}),c=(0,ec.useRef)(null),(0,ec.useCallback)(e=>{e&&f.onMount?.(e),o&&(e?o.mount(e):o.unmount());let t=u.current;if("function"==typeof t)if(e){let n=t(e);"function"==typeof n&&(c.current=n)}else c.current?(c.current(),c.current=null):t(e);else t&&(t.current=e)},[o])),f,h,t,a)]})}o.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;let l=(0,ec.forwardRef)(o);return l[yP]=e,l}class yN{constructor(e){this.isMounted=!1,this.node=e}update(){}}function yU(e,t,n){let i=e.getProps();return vD(i,t,void 0!==n?n:i.custom,e)}function yk(e,t){if(e?.inherit&&t){let{inherit:n,...i}=e;return{...t,...i}}return e}function yB(e,t){let n=e?.[t]??e?.default??e;return n!==e?yk(n,e):n}let yO=e=>Array.isArray(e);function yz(e,t){let n=e.getValue("willChange");if(gR(n)&&n.add)return n.add(t);if(!n&&g5.WillChange){let n=new g5.WillChange("auto");e.addValue("willChange",n),n.add(t)}}let yH=e=>1e3*e,yV=(e,t)=>n=>t(e(n)),yG=(...e)=>e.reduce(yV),yj={layout:0,mainThread:0,waapi:0};function yW(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function yX(e,t){return n=>n>0?t:e}let yq=(e,t,n)=>{let i=e*e,r=n*(t*t-i)+i;return r<0?0:Math.sqrt(r)},yY=[m7,m9,go];function yZ(e){let t=yY.find(t=>t.test(e));if(gN(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===go&&(n=function({hue:e,saturation:t,lightness:n,alpha:i}
1891){e/=360,n/=100;let r=0,a=0,s=0;if(t/=100){let i=n<.5?n*(1+t):n+t-n*t,o=2*n-i;r=yW(o,i,e+1/3),a=yW(o,i,e),s=yW(o,i,e-1/3)}else r=a=s=n;return{red:Math.round(255*r),green:Math.round(255*a),blue:Math.round(255*s),alpha:i}}(n)),n}let yK=(e,t)=>{let n=yZ(e),i=yZ(t);if(!n||!i)return yX(e,t);let r={...n};return e=>(r.red=yq(n.red,i.red,e),r.green=yq(n.green,i.green,e),r.blue=yq(n.blue,i.blue,e),r.alpha=vJ(n.alpha,i.alpha,e),m9.transform(r))},yJ=new Set(["none","hidden"]);function yQ(e,t){return n=>vJ(e,t,n)}function y$(e){return"number"==typeof e?yQ:"string"==typeof e?gz(e)?yX:gl.test(e)?yK:y2:Array.isArray(e)?y0:"object"==typeof e?gl.test(e)?yK:y1:yX}function y0(e,t){let n=[...e],i=n.length,r=e.map((e,n)=>y$(e)(e,t[n]));return e=>{for(let t=0;t<i;t++)n[t]=r[t](e);return n}}function y1(e,t){let n={...e,...t},i={};for(let r in n)void 0!==e[r]&&void 0!==t[r]&&(i[r]=y$(e[r])(e[r],t[r]));return e=>{for(let t in i)n[t]=i[t](e);return n}}let y2=(e,t)=>{let n=gv.createTransformer(t),i=gp(e),r=gp(t);if(!(i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length))return gN(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),yX(e,t);if(yJ.has(e)&&!r.values.length||yJ.has(t)&&!i.values.length)return yJ.has(e)?n=>n<=0?e:t:n=>n>=1?t:e;return yG(y0(function(e,t){let n=[],i={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){let a=t.types[r],s=e.indexes[a][i[a]],o=e.values[s]??0;n[r]=o,i[a]++}return n}(i,r),r.values),n)};function y3(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?vJ(e,t,n):y$(e)(e,t)}let y4=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>g9.update(t,e),stop:()=>g7(t),now:()=>ve.isProcessing?ve.timestamp:vv.now()}},y5=(e,t,n=10)=>{let i="",r=Math.max(Math.round(t/n),2);for(let t=0;t<r;t++)i+=Math.round(1e4*e(t/(r-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`};function y6(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function y8(e,t,n){var i,r;let a=Math.max(t-5,0);return i=n-e(a),(r=t-a)?1e3/r*i:0}let y9=.01,y7=2,xe=.005,xt=.5;function xn(e,t){return e*Math.sqrt(1-t*t)}let xi=["duration","bounce"],xr=["stiffness","damping","mass"];function xa(e,t){return t.some(t=>void 0!==e[t])}function xs(e=.3,t=.3){let n,i="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:r,restDelta:a}=i,s=i.keyframes[0],o=i.keyframes[i.keyframes.length-1],l={done:!1,value:s},{stiffness:u,damping:c,mass:d,duration:h,velocity:p,isResolvedFromDuration:f}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!xa(e,xr)&&xa(e,xi))if(e.visualDuration){let n=2*Math.PI/(1.2*e.visualDuration),i=n*n,r=2*mQ(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:1,stiffness:i,damping:r}}else{let n=function({duration:e=800,bounce:t=.3,velocity:n=0,mass:i=1}){let r,a;gN(e<=yH(10),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=mQ(.05,1,s),e=mQ(.01,10,e/1e3),s<1?(r=t=>{let i=t*s,r=i*e;return .001-(i-n)/xn(t,s)*Math.exp(-r)},a=t=>{let i=t*s*e,a=Math.pow(s,2)*Math.pow(t,2)*e,o=Math.exp(-i),l=xn(Math.pow(t,2),s);return(i*n+n-a)*o*(-r(t)+.001>0?-1:1)/l}):(r=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>e*e*(n-t)*Math.exp(-t*e));let o=function(e,t,n){let i=n;for(let n=1;n<12;n++)i-=e(i)/t(i);return i}(r,a,5/e);if(e=yH(e),isNaN(o))return{stiffness:100,damping:10,duration:e};{let t=Math.pow(o,2)*i;return{stiffness:t,damping:2*s*Math.sqrt(i*t),duration:e}}}(e);(t={...t,...n,mass:1}).isResolvedFromDuration=!0}return t}({...i,velocity:-((i.velocity||0)/1e3)}),m=p||0,g=c/(2*Math.sqrt(u*d)),v=o-s,y=Math.sqrt(u/d)/1e3,x=5>Math.abs(v);if(r||(r=x?y9:y7),a||(a=x?xe:xt),g<1){let e=xn(y,g);n=t=>o-Math.exp(-g*y*t)*((m+g*y*v)/e*Math.sin(e*t)+v*Math.cos(e*t))}else if(1===g)n=e=>o-Math.exp(-y*e)*(v+(m+y*v)*e);else{let e=y*Math.sqrt(g*g-1);n=t=>{let n=Math.exp(-g*y*t),i=Math.min(e*t,300);return o-n*((m+g*y*v)*Math.sinh(i)+e*v*Math.cosh(i))/e}}
1891let b={calculatedDuration:f&&h||null,next:e=>{let t=n(e);if(f)l.done=e>=h;else{let i=0===e?m:0;g<1&&(i=0===e?yH(m):y8(n,e,t));let s=Math.abs(o-t)<=a;l.done=Math.abs(i)<=r&&s}return l.value=l.done?o:t,l},toString:()=>{let e=Math.min(y6(b),2e4),t=y5(t=>b.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return b}function xo({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:a=500,modifyTarget:s,min:o,max:l,restDelta:u=.5,restSpeed:c}){let d,h,p=e[0],f={done:!1,value:p},m=n*t,g=p+m,v=void 0===s?g:s(g);v!==g&&(m=v-p);let y=e=>-m*Math.exp(-e/i),x=e=>v+y(e),b=e=>{let t=y(e),n=x(e);f.done=Math.abs(t)<=u,f.value=f.done?v:n},S=e=>{let t;if(t=f.value,void 0!==o&&t<o||void 0!==l&&t>l){var n;d=e,h=xs({keyframes:[f.value,(n=f.value,void 0===o?l:void 0===l||Math.abs(o-n)<Math.abs(l-n)?o:l)],velocity:y8(x,e,f.value),damping:r,stiffness:a,restDelta:u,restSpeed:c})}};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return(h||void 0!==d||(t=!0,b(e),S(e)),void 0!==d&&e>=d)?h.next(e-d):(t||b(e),f)}}}xs.applyToOptions=e=>{let t=function(e,t=100,n){let i=n({...e,keyframes:[0,t]}),r=Math.min(y6(i),2e4);return{type:"keyframes",ease:e=>i.next(r*e).value/t,duration:r/1e3}}(e,100,xs);return e.ease=t.ease,e.duration=yH(t.duration),e.type="keyframes",e};let xl=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function xu(e,t,n,i){return e===t&&n===i?g4:r=>0===r||1===r?r:xl(function(e,t,n,i,r){let a,s,o=0;do(a=xl(s=t+(n-t)/2,i,r)-e)>0?n=s:t=s;while(Math.abs(a)>1e-7&&++o<12)return s}(r,0,1,e,n),t,i)}let xc=xu(.42,0,1,1),xd=xu(0,0,.58,1),xh=xu(.42,0,.58,1),xp=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,xf=e=>t=>1-e(1-t),xm=xu(.33,1.53,.69,.99),xg=xf(xm),xv=xp(xg),xy=e=>(e*=2)<1?.5*xg(e):.5*(2-Math.pow(2,-10*(e-1))),xx=e=>1-Math.sin(Math.acos(e)),xb=xf(xx),xS=xp(xx),x_=e=>Array.isArray(e)&&"number"==typeof e[0],xw={linear:g4,easeIn:xc,easeInOut:xh,easeOut:xd,circIn:xx,circInOut:xS,circOut:xb,backIn:xg,backInOut:xv,backOut:xm,anticipate:xy},xM=e=>{if(x_(e)){gU(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,n,i,r]=e;return xu(t,n,i,r)}return"string"==typeof e?(gU(void 0!==xw[e],`Invalid easing type '${e}'`,"invalid-easing-type"),xw[e]):e},xT=(e,t,n)=>{let i=t-e;return 0===i?1:(n-e)/i};function xE({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){var r;let a,s=Array.isArray(i)&&"number"!=typeof i[0]?i.map(xM):xM(i),o={done:!1,value:t[0]},l=function(e,t,{clamp:n=!0,ease:i,mixer:r}={}){let a=e.length;if(gU(a===t.length,"Both input and output ranges must be the same length","range-length"),1===a)return()=>t[0];if(2===a&&t[0]===t[1])return()=>t[1];let s=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let o=function(e,t,n){let i=[],r=n||g5.mix||y3,a=e.length-1;for(let n=0;n<a;n++){let a=r(e[n],e[n+1]);t&&(a=yG(Array.isArray(t)?t[n]||g4:t,a)),i.push(a)}return i}(t,i,r),l=o.length,u=n=>{if(s&&n<e[0])return t[0];let i=0;if(l>1)for(;i<e.length-2&&!(n<e[i+1]);i++);let r=xT(e[i],e[i+1],n);return o[i](r)};return n?t=>u(mQ(e[0],e[a-1],t)):u}((r=n&&n.length===t.length?n:(!function(e,t){let n=e[e.length-1];for(let i=1;i<=t;i++){let r=xT(0,t,i);e.push(vJ(n,1,r))}}(a=[0],t.length-1),a),r.map(t=>t*e)),t,{ease:Array.isArray(s)?s:t.map(()=>s||xh).splice(0,t.length-1)});return{calculatedDuration:e,next:t=>(o.value=l(t),o.done=t>=e,o)}}let xA=e=>null!==e;function xC(e,{repeat:t,repeatType:n="loop"},i,r=1){let a=e.filter(xA),s=r<0||t&&"loop"!==n&&t%2==1?0:a.length-1;return s&&void 0!==i?i:a[s]}let xP={decay:xo,inertia:xo,tween:xE,keyframes:xE,spring:xs};function xR(e){"string"==typeof e.type&&(e.type=xP[e.type])}class xI{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}let xD=e=>e/100;class xL extends xI{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==vv.now()&&this.tick(vv.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},yj.mainThread++,this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){let{options:e}=this;xR(e);let{type:t=xE,repeat:n=0,repeatDelay:i=0,repeatType:r,velocity:a=0}=e,{keyframes:s}=e,o=t||xE;o!==xE&&"number"!=typeof s[0]&&(this.mixKeyframes=yG(xD,y3(s[0],s[1])),s=[0,100]);let l=o({...e,keyframes:s}
1891);"mirror"===r&&(this.mirroredGenerator=o({...e,keyframes:[...s].reverse(),velocity:-a})),null===l.calculatedDuration&&(l.calculatedDuration=y6(l));let{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=l}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){let{generator:n,totalDuration:i,mixKeyframes:r,mirroredGenerator:a,resolvedDuration:s,calculatedDuration:o}=this;if(null===this.startTime)return n.next(0);let{delay:l=0,keyframes:u,repeat:c,repeatType:d,repeatDelay:h,type:p,onUpdate:f,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=i);let y=this.currentTime,x=n;if(c){let e=Math.min(this.currentTime,i)/s,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,(t=Math.min(t,c+1))%2&&("reverse"===d?(n=1-n,h&&(n-=h/s)):"mirror"===d&&(x=a)),y=mQ(0,1,n)*s}let b=v?{done:!1,value:u[0]}:x.next(y);r&&(b.value=r(b.value));let{done:S}=b;v||null===o||(S=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);let _=null===this.holdTime&&("finished"===this.state||"running"===this.state&&S);return _&&p!==xo&&(b.value=xC(u,this.options,m,this.speed)),f&&f(b.value),_&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return this.calculatedDuration/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return this.currentTime/1e3}set time(e){e=yH(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(vv.now());let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=this.currentTime/1e3)}play(){if(this.isStopped)return;let{driver:e=y4,startTime:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),this.options.onPlay?.();let n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(vv.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,yj.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function xF(e){let t;return()=>(void 0===t&&(t=e()),t)}let xN=xF(()=>void 0!==window.ScrollTimeline),xU={},xk=(C=xF(()=>{try{document.createElement("div").animate({opacity:0}
1891,{easing:"linear(0, 1)"})}catch(e){return!1}return!0}),()=>xU.linearEasing??C()),xB=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,xO={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:xB([0,.65,.55,1]),circOut:xB([.55,0,1,.45]),backIn:xB([.31,.01,.66,-.59]),backOut:xB([.33,1.53,.69,.99])};function xz(e){return"function"==typeof e&&"applyToOptions"in e}class xH extends xI{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:n,keyframes:i,pseudoElement:r,allowFlatten:a=!1,finalKeyframe:s,onComplete:o}=e;this.isPseudoElement=!!r,this.allowFlatten=a,this.options=e,gU("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const l=function({type:e,...t}){return xz(e)&&xk()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=function(e,t,n,{delay:i=0,duration:r=300,repeat:a=0,repeatType:s="loop",ease:o="easeOut",times:l}={},u){let c={[t]:n};l&&(c.offset=l);let d=function e(t,n){if(t)return"function"==typeof t?xk()?y5(t,n):"ease-out":x_(t)?xB(t):Array.isArray(t)?t.map(t=>e(t,n)||xO.easeOut):xO[t]}(o,r);Array.isArray(d)&&(c.easing=d);let h={delay:i,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:"reverse"===s?"alternate":"normal"};u&&(h.pseudoElement=u);let p=e.animate(c,h);return p}(t,n,i,l,r),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){let e=xC(i,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(e):n.startsWith("--")?t.style.setProperty(n,e):t.style[n]=e,this.animation.cancel()}o?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){return Number(this.animation.effect?.getComputedTiming?.().duration||0)/1e3}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+e/1e3}get time(){return(Number(this.animation.currentTime)||0)/1e3}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=yH(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&xN())?(this.animation.timeline=e,g4):t(this)}}let xV={anticipate:xy,backInOut:xv,circInOut:xS};class xG extends xH{constructor(e){!function(e){"string"==typeof e.ease&&e.ease in xV&&(e.ease=xV[e.ease])}(e),xR(e),super(e),void 0!==e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:i,element:r,...a}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);let s=new xL({...a,autoplay:!1}),o=Math.max(10,vv.now()-this.startTime),l=mQ(0,10,o-10);t.setWithVelocity(s.sample(Math.max(0,o-l)).value,s.sample(o).value,l),s.stop()}}let xj=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(gv.test(e)||"0"===e)&&!e.startsWith("url("));function xW(e){e.duration=0,e.type="keyframes"}let xX=new Set(["opacity","clipPath","filter","transform"]),xq=xF(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class xY extends xI{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:a="loop",keyframes:s,name:o,motionValue:l,element:u,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=vv.now();const d={autoplay:e,delay:t,type:n,repeat:i,repeatDelay:r,repeatType:a,name:o,motionValue:l,element:u,...c},h=u?.KeyframeResolver||vl;this.keyframeResolver=new h(s,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),o,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,i){this.keyframeResolver=void 0;let{name:r,type:a,velocity:s,delay:o,isHandoff:l,onUpdate:u}=n;this.resolvedAt=vv.now(),!function(e,t,n,i){let r=e[0];if(null===r)return!1;if("display"===t||"visibility"===t)return!0;let a=e[e.length-1],s=xj(r,t),o=xj(a,t);return gN(s===o,`You are trying to animate ${t} from "${r}" to "${a}". "${s?a:r}" is not an animatable value.`,"value-not-animatable"),!!s&&!!o&&(function(e){let t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||xz(n))&&i)}(e,r,a,s)&&((g5.instantAnimations||!o)&&u?.(xC(e,n,t)),e[0]=e[e.length-1],xW(n),n.repeat=0);let c={startTime:i?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},d=!l&&function(e){let{motionValue:t,name:n,repeatDelay:i,repeatType:r,damping:a,type:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;
1891let{onUpdate:o,transformTemplate:l}=t.owner.getProps();return xq()&&n&&xX.has(n)&&("transform"!==n||!l)&&!o&&!i&&"mirror"!==r&&0!==a&&"inertia"!==s}(c),h=c.motionValue?.owner?.current,p=d?new xG({...c,element:h}):new xL(c);p.finished.then(()=>{this.notifyFinished()}).catch(g4),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),va=!0,vo(),vs(),va=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}let xZ={type:"spring",stiffness:500,damping:25,restSpeed:10},xK={type:"keyframes",duration:.8},xJ={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},xQ=e=>null!==e,x$=(e,t,n,i={},r,a)=>s=>{let o=yB(i,e)||{},l=o.delay||i.delay||0,{elapsed:u=0}=i;u-=yH(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-u,onUpdate:e=>{t.set(e),o.onUpdate&&o.onUpdate(e)},onComplete:()=>{s(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:a?void 0:r};!function({when:e,delay:t,delayChildren:n,staggerChildren:i,staggerDirection:r,repeat:a,repeatType:s,repeatDelay:o,from:l,elapsed:u,...c}){return!!Object.keys(c).length}(o)&&Object.assign(c,((e,{keyframes:t})=>t.length>2?xK:mJ.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:xZ:xJ)(e,c)),c.duration&&(c.duration=yH(c.duration)),c.repeatDelay&&(c.repeatDelay=yH(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let d=!1;if(!1!==c.type&&(0!==c.duration||c.repeatDelay)||(xW(c),0===c.delay&&(d=!0)),(g5.instantAnimations||g5.skipAnimations||r?.shouldSkipAnimations)&&(d=!0,xW(c),c.delay=0),c.allowFlatten=!o.type&&!o.ease,d&&!a&&void 0!==t.get()){let e=function(e,{repeat:t,repeatType:n="loop"},i){let r=e.filter(xQ),a=t&&"loop"!==n&&t%2==1?0:r.length-1;return r[a]}(c.keyframes,o);if(void 0!==e)return void g9.update(()=>{c.onUpdate(e),c.onComplete()})}return o.isSync?new xL(c):new xY(c)};function x0(e,t,{delay:n=0,transitionOverride:i,type:r}={}){let{transition:a,transitionEnd:s,...o}=t,l=e.getDefaultTransition();a=a?yk(a,l):l;let u=a?.reduceMotion;i&&(a=i);let c=[],d=r&&e.animationState&&e.animationState.getState()[r];for(let t in o){let i=e.getValue(t,e.latestValues[t]??null),r=o[t];if(void 0===r||d&&function({protectedKeys:e,needsAnimating:t},n){let i=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,i}(d,t))continue;let s={delay:n,...yB(a||{},t)},l=i.get();if(void 0!==l&&!i.isAnimating&&!Array.isArray(r)&&r===l&&!s.velocity)continue;let h=!1;if(window.MotionHandoffAnimation){let n=e.props[yR];if(n){let e=window.MotionHandoffAnimation(n,t,g9);null!==e&&(s.startTime=e,h=!0)}}yz(e,t);let p=u??e.shouldReduceMotion;i.start(x$(t,i,r,p&&gI.has(t)?{type:!1}:s,e,h));let f=i.animation;f&&c.push(f)}if(s){let t=()=>g9.update(()=>{s&&function(e,t){let{transitionEnd:n={},transition:i={},...r}=yU(e,t)||{};for(let t in r={...r,...n}){var a;let n=yO(a=r[t])?a[a.length-1]||0:a;e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,vx(n))}}(e,s)});c.length?Promise.all(c).then(t):t()}return c}function x1(e,t,n,i=0,r=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),s=e.size,o=(s-1)*i;return"function"==typeof n?n(a,s):1===r?a*i:o-a*i}function x2(e,t,n={}){let i=yU(e,t,"exit"===n.type?e.presenceContext?.custom:void 0),{transition:r=e.getDefaultTransition()||{}}=i||{};
1891n.transitionOverride&&(r=n.transitionOverride);let a=i?()=>Promise.all(x0(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(i=0)=>{let{delayChildren:a=0,staggerChildren:s,staggerDirection:o}=r;return function(e,t,n=0,i=0,r=0,a=1,s){let o=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),o.push(x2(l,t,{...s,delay:n+("function"==typeof i?0:i)+x1(e.variantChildren,l,i,r,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(o)}(e,t,i,a,s,o,n)}:()=>Promise.resolve(),{when:o}=r;if(!o)return Promise.all([a(),s(n.delay)]);{let[e,t]="beforeChildren"===o?[a,s]:[s,a];return e().then(()=>t())}}let x3=vC.length;function x4(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}let x5=[...vA].reverse(),x6=vA.length;function x8(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function x9(){return{animate:x8(!0),whileInView:x8(),whileHover:x8(),whileTap:x8(),whileDrag:x8(),whileFocus:x8(),exit:x8()}}let x7=0;function be(e){return[e("x"),e("y")]}let bt=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),bn=new Set(["INPUT","SELECT","TEXTAREA"]);function bi(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}let br={x:!1,y:!1};function ba(e){return e.max-e.min}function bs(e,t,n,i=.5){e.origin=i,e.originPoint=vJ(t.min,t.max,e.origin),e.scale=ba(n)/ba(t),e.translate=vJ(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function bo(e,t,n,i){bs(e.x,t.x,n.x,i?i.originX:void 0),bs(e.y,t.y,n.y,i?i.originY:void 0)}function bl(e,t,n){e.min=n.min+t.min,e.max=e.min+ba(t)}function bu(e,t,n){e.min=t.min-n.min,e.max=e.min+ba(t)}function bc(e,t,n){bu(e.x,t.x,n.x),bu(e.y,t.y,n.y)}function bd(e){return"object"==typeof e&&null!==e}function bh(e){return bd(e)&&"ownerSVGElement"in e}function bp(e,t,n){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let i=document;t&&(i=t.current);let r=n?.[e]??i.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e).filter(e=>null!=e)}
1891let bf=new WeakMap,bm=(e,t,n)=>(i,r)=>r&&r[0]?r[0][e+"Size"]:bh(i)&&"getBBox"in i?i.getBBox()[t]:i[n],bg=bm("inline","width","offsetWidth"),bv=bm("block","height","offsetHeight");function by({target:e,borderBoxSize:t}){bf.get(e)?.forEach(n=>{n(e,{get width(){return bg(e,t)},get height(){return bv(e,t)}})})}function bx(e){e.forEach(by)}let bb=new Set;function bS(e,t){let n;return"function"==typeof e?(bb.add(e),p||(p=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};bb.forEach(t=>t(e))},window.addEventListener("resize",p)),()=>{bb.delete(e),bb.size||"function"!=typeof p||(window.removeEventListener("resize",p),p=void 0)}):(h||"undefined"!=typeof ResizeObserver&&(h=new ResizeObserver(bx)),(n=bp(e)).forEach(e=>{let n=bf.get(e);n||(n=new Set,bf.set(e,n)),n.add(t),h?.observe(e)}),()=>{n.forEach(e=>{let n=bf.get(e);n?.delete(t),n?.size||h?.unobserve(e)})})}let b_=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function bw(e){return{point:{x:e.pageX,y:e.pageY}}}function bM(e,t,n,i){return bi(e,t,e=>b_(e)&&n(e,bw(e)),i)}let bT=({current:e})=>e?e.ownerDocument.defaultView:null,bE=(e,t)=>Math.abs(e-t),bA=new Set(["auto","scroll"]);class bC{constructor(e,t,{transformPagePoint:n,contextWindow:i=window,dragSnapToOrigin:r=!1,distanceThreshold:a=3,element:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{var e,t;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let n=bI(this.lastMoveEventInfo,this.history),i=null!==this.startEvent,r=(e=n.offset,t={x:0,y:0},Math.sqrt(bE(e.x,t.x)**2+bE(e.y,t.y)**2)>=this.distanceThreshold);if(!i&&!r)return;let{point:a}=n,{timestamp:s}=ve;this.history.push({...a,timestamp:s});let{onStart:o,onMove:l}=this.handlers;
1891i||(o&&o(this.lastMoveEvent,n),this.startEvent=this.lastMoveEvent),l&&l(this.lastMoveEvent,n)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=bP(t,this.transformPagePoint),g9.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:i,resumeAnimation:r}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&r&&r(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=bI("pointercancel"===e.type?this.lastMoveEventInfo:bP(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),i&&i(e,a)},!b_(e))return;this.dragSnapToOrigin=r,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=i||window;const o=bP(bw(e),this.transformPagePoint),{point:l}=o,{timestamp:u}=ve;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=t;c&&c(e,bI(o,this.history)),this.removeListeners=yG(bM(this.contextWindow,"pointermove",this.handlePointerMove),bM(this.contextWindow,"pointerup",this.handlePointerUp),bM(this.contextWindow,"pointercancel",this.handlePointerUp)),s&&this.startScrollTracking(s)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(bA.has(e.overflowX)||bA.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,i=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},r={x:i.x-t.x,y:i.y-t.y};(0!==r.x||0!==r.y)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(e,i),g9.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),g7(this.updatePoint)}}function bP(e,t){return t?{point:t(e.point)}:e}function bR(e,t){return{x:e.x-t.x,y:e.y-t.y}}function bI({point:e},t){return{point:e,delta:bR(e,bD(t)),offset:bR(e,t[0]),velocity:function(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null,r=bD(e);for(;n>=0&&(i=e[n],!(r.timestamp-i.timestamp>yH(.1)));)n--;if(!i)return{x:0,y:0};i===e[0]&&e.length>2&&r.timestamp-i.timestamp>2*yH(.1)&&(i=e[1]);let a=(r.timestamp-i.timestamp)/1e3;if(0===a)return{x:0,y:0};let s={x:(r.x-i.x)/a,y:(r.y-i.y)/a};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}(t,.1)}}function bD(e){return e[e.length-1]}function bL(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function bF(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}function bN(e,t,n){return{min:bU(e,t),max:bU(e,n)}}function bU(e,t){return"number"==typeof e?e:e[t]||0}let bk=new WeakMap;class bB{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=gP(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:i}=this.visualElement;if(i&&!1===i.isPresent)return;let r=e=>{t&&this.snapToCursor(bw(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:i,onDragStart:r}=this.getProps();if(n&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock=function(e){if("x"===e||"y"===e)if(br[e])return null;else return br[e]=!0,()=>{br[e]=!1};return br.x||br.y?null:(br.x=br.y=!0,()=>{br.x=br.y=!1})}(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),be(e=>{let t=this.getAxisMotionValue(e).get()||0;if(gn.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let i=n.layout.layoutBox[e];i&&(t=ba(i)*(parseFloat(t)/100))}}this.originPoint[e]=t}),r&&g9.update(()=>r(e,t),!1,!0),yz(this.visualElement,"transform");let{animationState:a}=this.visualElement;a&&a.setActive("whileDrag",!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:i,onDirectionLock:r,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:s}=t;if(i&&null===this.currentDirection){this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(s),null!==this.currentDirection&&r&&r(this.currentDirection);return}this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),a&&g9.update(()=>a(e,t),!1,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new bC(e,{onSessionStart:r,onStart:a,onMove:s,onSessionEnd:o,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:n,contextWindow:bT(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,i=t||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!i||!n)return;let{velocity:a}=i;this.startAnimation(a);let{onDragEnd:s}=this.getProps();s&&g9.postRender(()=>s(n,i))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:i}=this.getProps();if(!n||!bz(e,i,this.currentDirection))return;let r=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=function(e,{min:t,max:n},i){return void 0!==t&&e<t?e=i?vJ(t,e,i.min):Math.max(e,t):void 0!==n&&e>n&&(e=i?vJ(n,e,i.max):Math.min(e,n)),e}(a,this.constraints[e],this.elastic[e])),r.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&yD(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=function(e,{top:t,left:n,bottom:i,right:r}){return{x:bL(e.x,n,r),y:bL(e.y,t,i)}}(n.layoutBox,e):this.constraints=!1,this.elastic=function(e=.35){return!1===e?e=0:!0===e&&(e=.35),{x:bN(e,"left","right"),y:bN(e,"top","bottom")}}(t),i!==this.constraints&&!yD(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&be(e=>{var t,i;let r;!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=(t=n.layoutBox[e],i=this.constraints[e],r={},void 0!==i.min&&(r.min=i.min-t.min),void 0!==i.max&&(r.max=i.max-t.min),r))})}resolveRefConstraints(){var e;let{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!yD(t))return!1;let i=t.current;gU(null!==i,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let a=function(e,t,n){let i=yr(e,n),{scroll:r}=t;return r&&(yt(i.x,r.offset.x),yt(i.y,r.offset.y)),i}(i,r.root,this.visualElement.getTransformPagePoint()),s=(e=r.layout.layoutBox,{x:bF(e.x,a.x),y:bF(e.y,a.y)});if(n){let e=n(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(s));this.hasMutatedConstraints=!!e,e&&(s=v3(e))}return s}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:i,dragTransition:r,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),o=this.constraints||{};return Promise.all(be(s=>{if(!bz(s,t,this.currentDirection))return;let l=o&&o[s]||{};a&&(l={min:0,max:0});let u={type:"inertia",velocity:n?e[s]:0,bounceStiffness:i?200:1e6,bounceDamping:i?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...r,...l};return this.startAxisValueAnimation(s,u)})).then(s)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return yz(this.visualElement,e),n.start(x$(e,n,0,t,this.visualElement,!1))}stopAnimation(){be(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){be(t=>{let{drag:n}=this.getProps();if(!bz(t,n,this.currentDirection))return;let{projection:i}=this.visualElement,r=this.getAxisMotionValue(t);if(i&&i.layout){let{min:n,max:a}=i.layout.layoutBox[t],s=r.get()||0;r.set(e[t]-vJ(n,a,.5)+s)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!yD(t)||!n||!this.constraints)return;this.stopAnimation();let i={x:0,y:0};be(e=>{let t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){var n,r;let a,s,o,l=t.get();i[e]=(n={min:l,max:l},r=this.constraints[e],a=.5,s=ba(n),(o=ba(r))>s?a=xT(r.min,r.max-s,n.min):s>o&&(a=xT(n.min,n.max-o,r.min)),mQ(0,1,a))}});let{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),be(t=>{if(!bz(t,e,null))return;let n=this.getAxisMotionValue(t),{min:r,max:a}=this.constraints[t];n.set(vJ(r,a,i[t]))}),this.visualElement.render()}addListeners(){let e;if(!this.visualElement.current)return;bk.set(this.visualElement,this);let t=this.visualElement.current,n=bM(t,"pointerdown",e=>{let{drag:n,dragListener:i=!0}=this.getProps(),r=e.target,a=r!==t&&(bn.has(r.tagName)||!0===r.isContentEditable);n&&i&&!a&&this.start(e)}),i=()=>{var n,i,r;let a,s,{dragConstraints:o}=this.getProps();yD(o)&&o.current&&(this.constraints=this.resolveRefConstraints(),e||(n=t,i=o.current,a=bS(n,bO(r=()=>this.scalePositionWithinConstraints())),s=bS(i,bO(r)),e=()=>{a(),s()}))},{projection:r}=this.visualElement,a=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),g9.read(i);let s=bi(window,"resize",()=>this.scalePositionWithinConstraints()),o=r.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(be(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{s(),n(),a(),o&&o(),e&&e()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:a=.35,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:i,dragConstraints:r,dragElastic:a,dragMomentum:s}}}function bO(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function bz(e,t,n){return(!0===t||t===e)&&(null===n||n===e)}let bH=e=>(t,n)=>{e&&g9.update(()=>e(t,n),!1,!0)},bV={hasAnimatedSinceResize:!0,hasEverUpdated:!1};var bG=ec;function bj(e=!0){let t=(0,ec.useContext)(yb);if(null===t)return[!0,null];let{isPresent:n,onExitComplete:i,register:r}=t,a=(0,ec.useId)();(0,ec.useEffect)(()=>
1891{if(e)return r(a)},[e]);let s=(0,ec.useCallback)(()=>e&&i&&i(a),[a,i,e]);return!n&&i?[!1,s]:[!0]}let bW=!1;class bX extends bG.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:i}=this.props,{projection:r}=e;r&&(t.group&&t.group.add(r),n&&n.register&&i&&n.register(r),bW&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),bV.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:i,isPresent:r}=this.props,{projection:a}=n;return a&&(a.isPresent=r,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),bW=!0,i||e.layoutDependency!==t||void 0===t||e.isPresent!==r?a.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?a.promote():a.relegate()||g9.postRender(()=>{let e=a.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),vm.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:i}=e;bW=!0,i&&(i.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}}function bq(e){let[t,n]=bj(),i=(0,bG.useContext)(yl);return(0,eu.jsx)(bX,{...e,layoutGroup:i,switchLayoutGroup:(0,bG.useContext)(yI),isPresent:t,safeToRemove:n})}let bY=["TopLeft","TopRight","BottomLeft","BottomRight"],bZ=bY.length,bK=e=>"string"==typeof e?parseFloat(e):e,bJ=e=>"number"==typeof e||gi.test(e);function bQ(e,t){return void 0!==e[t]?e[t]:e.borderRadius}let b$=b1(0,.5,xb),b0=b1(.5,.95,g4);function b1(e,t,n){return i=>i<e?0:i>t?1:n(xT(e,t,i))}function b2(e,t){e.min=t.min,e.max=t.max}function b3(e,t){b2(e.x,t.x),b2(e.y,t.y)}function b4(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function b5(e,t,n,i,r){return e-=t,e=i+1/n*(e-i),void 0!==r&&(e=i+1/r*(e-i)),e}function b6(e,t,[n,i,r],a,s){!function(e,t=0,n=1,i=.5,r,a=e,s=e){if(gn.test(t)&&(t=parseFloat(t),t=vJ(s.min,s.max,t/100)-s.min),"number"!=typeof t)return;let o=vJ(a.min,a.max,i);e===a&&(o-=t),e.min=b5(e.min,t,n,o,r),e.max=b5(e.max,t,n,o,r)}(e,t[n],t[i],t[r],t.scale,a,s)}let b8=["x","scaleX","originX"],b9=["y","scaleY","originY"];function b7(e,t,n,i){b6(e.x,t,b8,n?n.x:void 0,i?i.x:void 0),b6(e.y,t,b9,n?n.y:void 0,i?i.y:void 0)}function Se(e){return 0===e.translate&&1===e.scale}function St(e){return Se(e.x)&&Se(e.y)}function Sn(e,t){return e.min===t.min&&e.max===t.max}function Si(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Sr(e,t){return Si(e.x,t.x)&&Si(e.y,t.y)}function Sa(e){return ba(e.x)/ba(e.y)}function Ss(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class So{constructor(){this.members=[]}add(e){vh(this.members,e),e.scheduleRender()}remove(e){if(vp(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t,n=this.members.findIndex(t=>e===t);if(0===n)return!1;for(let e=n;e>=0;e--){let n=this.members[e];if(!1!==n.isPresent){t=n;break}}return!!t&&(this.promote(t),!0)}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender();let i=n.options.layoutDependency,r=e.options.layoutDependency;(void 0===i||void 0===r||i!==r)&&(e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0));let{crossfade:a}=e.options;!1===a&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}
1891scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}let Sl=(e,t)=>e.depth-t.depth;class Su{constructor(){this.children=[],this.isDirty=!1}add(e){vh(this.children,e),this.isDirty=!0}remove(e){vp(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Sl),this.isDirty=!1,this.children.forEach(e)}}let Sc=["","X","Y","Z"],Sd=0;function Sh(e,t,n,i){let{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),i&&(i[e]=0))}function Sp({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(e={},n=t?.()){this.id=Sd++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Sg),this.nodes.forEach(Sw),this.nodes.forEach(SM),this.nodes.forEach(Sv)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Su)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new vf),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=bh(t)&&!(bh(t)&&"svg"===t.tagName),this.instance=t;let{layoutId:n,layout:i,visualElement:r}=this.options;if(r&&!r.current&&r.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(i||n)&&(this.isLayoutDirty=!0),e){let n,i=0,r=()=>this.root.updateBlockedByResize=!1;g9.read(()=>{i=window.innerWidth}),e(t,()=>{let e=window.innerWidth;if(e!==i){let t,a;i=e,this.root.updateBlockedByResize=!0,n&&n(),t=vv.now(),a=({timestamp:e})=>{let n=e-t;n>=250&&(g7(a),r(n-250))},g9.setup(a,!0),n=()=>g7(a),bV.hasAnimatedSinceResize&&(bV.hasAnimatedSinceResize=!1,this.nodes.forEach(S_))}})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&r&&(n||i)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||r.getDefaultTransition()||SR,{onLayoutAnimationStart:s,onLayoutAnimationComplete:o}=r.getProps(),l=!this.targetLayout||!Sr(this.targetLayout,i),u=!t&&n;if(this.options.layoutRoot||this.resumeFrom||u||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...yB(a,"layout"),onPlay:s,onComplete:o};(r.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,u)}else t||S_(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),g7(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){!this.isUpdateBlocked()&&(this.isUpdating=!0,this.nodes&&this.nodes.forEac
1891h(ST),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function e(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;let{visualElement:n}=t.options;if(!n)return;let i=n.props[yR];if(window.MotionHasOptimisedAnimation(i,"transform")){let{layout:e,layoutId:n}=t.options;window.MotionCancelOptimisedAnimation(i,"transform",g9,!(e||n))}let{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&e(r)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;let i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Sx);return}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Sb);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(SS),this.nodes.forEach(Sf),this.nodes.forEach(Sm)):this.nodes.forEach(Sb),this.clearAllSnapshots();let e=vv.now();ve.delta=mQ(0,1e3/60,e-ve.timestamp),ve.timestamp=e,ve.isProcessing=!0,vt.update.process(ve),vt.preRender.process(ve),vt.render.process(ve),ve.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,vm.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Sy),this.sharedNodes.forEach(SE)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,g9.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){g9.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||ba(this.snapshot.measuredBox.x)||ba(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=gP(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=i(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!r)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!St(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,a=i!==this.prevTransformTemplateValue;e&&this.instance&&(t||v6(this.latestValues)||a)&&(r(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){var t;let n=this.measurePageBox(),i=this.removeElementScroll(n);return e&&(i=this.removeTransform(i)),SL((t=i).x),SL(t.y),{animationId:this.root.animationId,measuredBox:n,layoutBox:i,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return gP();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(SN))){let{scroll:e}=this.root;e&&(yt(t.x,e.offset.x),yt(t.y,e.offset.y))}return t}removeElementScroll(e){let t=gP();if(b3(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let i=this.path[n],{scroll:r,options:a}=i;i!==this.root&&r&&a.layoutScroll&&(r.wasRoot&&b3(t,e),yt(t.x,r.offset.x),yt(t.y,r.offset.y))}return t}applyTransform(e,t=!1){let n=gP();b3(n,e);for(let e=0;e<this.path.length;e++){let i=this.path[e];!t&&i.options.layoutScroll&&i.scroll&&i!==i.root&&yi(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),v6(i.latestValues)&&yi(n,i.latestValues)}return v6(this.latestValues)&&yi(n,this.latestValues),n}removeTransform(e){let t=gP();b3(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!n.instance||!v6(n.latestValues))continue;v5(n.latestValues)&&n.updateSnapshot();let i=gP();b3(i,n.measurePageBox()),b7(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return v6(this.latestValues)&&b7(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ve.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.
1891isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:i,layoutId:r}=this.options;if(!this.layout||!(i||r))return;this.resolvedRelativeTargetAt=ve.timestamp;let a=this.getClosestProjectingParent();if(a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta){if(this.target||(this.target=gP(),this.targetWithTransforms=gP()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target){var s,o,l;this.forceRelativeParentToResolveTarget(),s=this.target,o=this.relativeTarget,l=this.relativeParent.target,bl(s.x,o.x,l.x),bl(s.y,o.y,l.y)}else this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):b3(this.target,this.layout.layoutBox),ye(this.target,this.targetDelta)):b3(this.target,this.layout.layoutBox);this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&1!==this.animationProgress?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0)}}getClosestProjectingParent(){if(!(!this.parent||v5(this.parent.latestValues)||v8(this.parent.latestValues)))if(this.parent.isProjecting())return this.parent;else return this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=gP(),this.relativeTargetOrigin=gP(),bc(this.relativeTargetOrigin,t,n),b3(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===ve.timestamp&&(n=!1),n)return;let{layout:i,layoutId:r}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(i||r))return;b3(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,s=this.treeScale.y;!function(e,t,n,i=!1){let r,a,s=n.length;if(s){t.x=t.y=1;for(let o=0;o<s;o++){a=(r=n[o]).projectionDelta;let{visualElement:s}=r.options;(!s||!s.props.style||"contents"!==s.props.style.display)&&(i&&r.options.layoutScroll&&r.scroll&&r!==r.root&&yi(e,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,ye(e,a)),i&&v6(r.latestValues)&&yi(e,r.latestValues))}t.x<1.0000000000001&&t.x>.999999999999&&(t.x=1),t.y<1.0000000000001&&t.y>.999999999999&&(t.y=1)}}(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=gP());let{target:o}=e;if(!o){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(b4(this.prevProjectionDelta.x,this.projectionDelta.x),b4(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),bo(this.projectionDelta,this.layoutCorrected,o,this.latestValues),this.treeScale.x===a&&this.treeScale.y===s&&Ss(this.projectionDelta.x,this.prevProjectionDelta.x)&&Ss(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",o))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=gA(),this.projectionDelta=gA(),this.projectionDeltaWithTransform=gA()}setAnimationOrigin(e,t=!1){let n,i=this.snapshot,r=i?i.latestValues:{},a={...this.latestValues},s=gA();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=gP(),l=(i?i.source:void 0)!==(this.layout?this.layout.source:void 0),u=this.getStack(),c=!u||u.members.length<=1,d=!!(l&&!c&&!0===this.options.crossfade&&!this.path.some(SP));this.animationProgress=0,this.mixTargetDelta=t=>{let i=t/1e3;if(SA(s.x,e.x,i),SA(s.y,e.y,i),this.setTargetDelta(s),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var u,h,p,f,m,g;bc(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,f=this.relativeTargetOrigin,m=o,g=i,SC(p.x,f.x,m.x,g),SC(p.y,f.y,m.y,g),n&&(u=this.relativeTarget,h=n,Sn(u.x,h.x)&&Sn(u.y,h.y))&&(this.isProjectionDirty=!1),n||(n=gP()),b3(n,this.relativeTarget)}l&&(this.animationValues=a,function(e,t,n,i,r,a){r?(e.opacity=vJ(0,n.opacity??1,b$(i)),e.opacityExit=vJ(t.opacity??1,0,b0(i))):a&&(e.opacity=vJ(t.opacity??1,n.opacity??1,i));for(let r=0;r<bZ;r++){let a=`border${bY[r]}Radius`,s=bQ(t,a),o=bQ(n,a);(void 0!==s||void 0!==o)&&(s||(s=0),o||(o=0),0===s||0===o||bJ(s)===bJ(o)?(e[a]=Math.max(vJ(bK(s),bK(o),i),0),(gn.test(o)||gn.test(s))&&(e[a]+="%")):e[a]=o)}(t.rotate||n.rotate)&&(e.rotate=vJ(t.rotate||0,n.rotate||0,i))}(a,r,this.latestValues,i,d,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=i},this.mixTargetDelta(1e3*!!this.options.layoutRoot)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(g7(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=g9.update(()=>{var t,n,i;let r;bV.hasAnimatedSinceResize=!0,yj.layout++,this.motionValue||(this.motionValue=vx(0)),this.currentAnimation=(t=this.motionValue,n=[0,1e3],i={...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{yj.layout--},onComplete:()=>{yj.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}
1891,(r=gR(t)?t:vx(t)).start(x$("",r,n,i)),r.animation),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:i,latestValues:r}=e;if(t&&n&&i){if(this!==e&&this.layout&&i&&SF(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||gP();let t=ba(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let i=ba(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+i}b3(t,n),yi(t,r),bo(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new So),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let i=this.getStack();i&&i.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let i={};n.z&&Sh("z",e,i,this.animationValues);for(let t=0;t<Sc.length;t++)Sh(`rotate${Sc[t]}`,e,i,this.animationValues),Sh(`skew${Sc[t]}`,e,i,this.animationValues);for(let t in e.render(),i)e.setStaticValue(t,i[t]),this.animationValues&&(this.animationValues[t]=i[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility="hidden";return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=yx(t?.pointerEvents)||"",e.transform=n?n(this.latestValues,""):"none";return}let i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=yx(t?.pointerEvents)||""),this.hasProjected&&!v6(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1);return}e.visibility="";let r=i.animationValues||i.latestValues;this.applyTransformsToTarget();let a=function(e,t,n){let i="",r=e.x.translate/t.x,a=e.y.translate/t.y,s=n?.z||0;if((r||a||s)&&(i=`translate3d(${r}px, ${a}px, ${s}px) `),(1!==t.x||1!==t.y)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:r,rotateY:a,skewX:s,skewY:o}=n;e&&(i=`perspective(${e}px) ${i}`),t&&(i+=`rotate(${t}deg) `),r&&(i+=`rotateX(${r}deg) `),a&&(i+=`rotateY(${a}deg) `),s&&(i+=`skewX(${s}deg) `),o&&(i+=`skewY(${o}deg) `)}let o=e.x.scale*t.x,l=e.y.scale*t.y;return(1!==o||1!==l)&&(i+=`scale(${o}, ${l})`),i||"none"}(this.projectionDeltaWithTransform,this.treeScale,r);n&&(a=n(r,a)),e.transform=a;let{x:s,y:o}=this.projectionDelta;for(let t in e.transformOrigin=`${100*s.origin}% ${100*o.origin}% 0`,i.animationValues?e.opacity=i===this?r.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:r.opacityExit:e.opacity=i===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0,vQ){if(void 0===r[t])continue;let{correct:n,applyTo:s,isCSSVariable:o}=vQ[t],l="none"===a?r[t]:n(r[t],i);if(s){let t=s.length;for(let n=0;n<t;n++)e[s[n]]=l}
1891else o?this.options.visualElement.renderState.vars[t]=l:e[t]=l}this.options.layoutId&&(e.pointerEvents=i===this?yx(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Sx),this.root.sharedNodes.clear()}}}function Sf(e){e.updateLayout()}function Sm(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:n,measuredBox:i}=e.layout,{animationType:r}=e.options,a=t.source!==e.layout.source;"size"===r?be(e=>{let i=a?t.measuredBox[e]:t.layoutBox[e],r=ba(i);i.min=n[e].min,i.max=i.min+r}):SF(r,t.layoutBox,n)&&be(i=>{let r=a?t.measuredBox[i]:t.layoutBox[i],s=ba(n[i]);r.max=r.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[i].max=e.relativeTarget[i].min+s)});let s=gA();bo(s,n,t.layoutBox);let o=gA();a?bo(o,e.applyTransform(i,!0),t.measuredBox):bo(o,n,t.layoutBox);let l=!St(s),u=!1;if(!e.resumeFrom){let i=e.getClosestProjectingParent();if(i&&!i.resumeFrom){let{snapshot:r,layout:a}=i;if(r&&a){let s=gP();bc(s,t.layoutBox,r.layoutBox);let o=gP();bc(o,n,a.layoutBox),Sr(s,o)||(u=!0),i.options.layoutRoot&&(e.relativeTarget=o,e.relativeTargetOrigin=s,e.relativeParent=i)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:o,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Sg(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Sv(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Sy(e){e.clearSnapshot()}function Sx(e){e.clearMeasurements()}function Sb(e){e.isLayoutDirty=!1}function SS(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function S_(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Sw(e){e.resolveTargetDelta()}function SM(e){e.calcProjection()}function ST(e){e.resetSkewAndRotation()}function SE(e){e.removeLeadSnapshot()}function SA(e,t,n){e.translate=vJ(t.translate,0,n),e.scale=vJ(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function SC(e,t,n,i){e.min=vJ(t.min,n.min,i),e.max=vJ(t.max,n.max,i)}function SP(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}let SR={duration:.45,ease:[.4,0,.1,1]},SI=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),SD=SI("applewebkit/")&&!SI("chrome/")?Math.round:g4;function SL(e){e.min=SD(e.min),e.max=SD(e.max)}function SF(e,t,n){return"position"===e||"preserve-aspect"===e&&!(.2>=Math.abs(Sa(t)-Sa(n)))}function SN(e){return e!==e.root&&e.scroll?.wasRoot}let SU=Sp({attachResizeListener:(e,t)=>bi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Sk={current:void 0},SB=Sp({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Sk.current){let e=new SU({});e.mount(window),e.setOptions({layoutScroll:!0}),Sk.current=e}return Sk.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position});function SO(e,t){let n=bp(e),i=new AbortController;return[n,{passive:!0,...t,signal:i.signal},()=>i.abort()]}function Sz(e,t,n){let{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover","Start"===n);let r=i["onHover"+n];r&&g9.postRender(()=>r(t,bw(t)))}function SH(e){return bd(e)&&"offsetHeight"in e}let SV=(e,t)=>!!t&&(e===t||SV(e,t.parentElement)),SG=new WeakSet;function Sj(e){return t=>{"Enter"===t.key&&e(t)}}function SW(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function SX(e){return b_(e)&&!(br.x||br.y)}let Sq=new WeakSet;function SY(e,t,n){let{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap","Start"===n);let r=i["onTap"+("End"===n?"":n)];r&&g9.postRender(()=>r(t,bw(t)))}let SZ=new WeakMap,SK=new WeakMap,SJ=e=>{let t=SZ.get(e.target);t&&t(e)},SQ=e=>{e.forEach(SJ)},S$={some:0,all:1},S0=function(e,t){if("undefined"==typeof Proxy)return yF;let n=new Map,i=(n,i)=>yF(n,i,e,t);return new Proxy((e,t)=>i(e,t),{get:(r,a)=>"create"===a?i:(n.has(a)||n.set(a,yF(a,void 0,e,t)),n.get(a))})}({animation:{Feature:class extends yN{constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>(function(e,t,n={}){let i;if(e.notify("AnimationStart",t),Array.isArray(t))i=Promise.all(t.map(t=>x2(e,t,n)));else if("string"==typeof t)i=x2(e,t,n);else{let r="function"==typeof t?yU(e,t,n.custom):t;i=Promise.all(x0(e,r,n))}return i.then(()=>
1891{e.notify("AnimationComplete",t)})})(e,t,n))),n=x9(),i=!0,r=t=>(n,i)=>{let r=yU(e,i,"exit"===t?e.presenceContext?.custom:void 0);if(r){let{transition:e,transitionEnd:t,...i}=r;n={...n,...i,...t}}return n};function a(a){let{props:s}=e,o=function e(t){if(!t)return;if(!t.isControllingVariants){let n=t.parent&&e(t.parent)||{};return void 0!==t.props.initial&&(n.initial=t.props.initial),n}let n={};for(let e=0;e<x3;e++){let i=vC[e],r=t.props[i];(vE(r)||!1===r)&&(n[i]=r)}return n}(e.parent)||{},l=[],u=new Set,c={},d=1/0;for(let t=0;t<x6;t++){var h,p;let f=x5[t],m=n[f],g=void 0!==s[f]?s[f]:o[f],v=vE(g),y=f===a?m.isActive:null;!1===y&&(d=t);let x=g===o[f]&&g!==s[f]&&v;if(x&&i&&e.manuallyAnimateOnMount&&(x=!1),m.protectedKeys={...c},!m.isActive&&null===y||!g&&!m.prevProp||vT(g)||"boolean"==typeof g)continue;let b=(h=m.prevProp,"string"==typeof(p=g)?p!==h:!!Array.isArray(p)&&!x4(p,h)),S=b||f===a&&m.isActive&&!x&&v||t>d&&v,_=!1,w=Array.isArray(g)?g:[g],M=w.reduce(r(f),{});!1===y&&(M={});let{prevResolvedValues:T={}}=m,E={...T,...M},A=t=>{S=!0,u.has(t)&&(_=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in E){let t=M[e],n=T[e];if(!c.hasOwnProperty(e))(yO(t)&&yO(n)?x4(t,n):t===n)?void 0!==t&&u.has(e)?A(e):m.protectedKeys[e]=!0:null!=t?A(e):u.add(e)}m.prevProp=g,m.prevResolvedValues=M,m.isActive&&(c={...c,...M}),i&&e.blockInitialAnimation&&(S=!1);let C=x&&b,P=!C||_;S&&P&&l.push(...w.map(t=>{let n={type:f};if("string"==typeof t&&i&&!C&&e.manuallyAnimateOnMount&&e.parent){let{parent:i}=e,r=yU(i,t);if(i.enteringChildren&&r){let{delayChildren:t}=r.transition||{};n.delay=x1(i.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if("boolean"!=typeof s.initial){let n=yU(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let i=e.getBaseTarget(n),r=e.getValue(n);r&&(r.liveStyle=!0),t[n]=i??null}),l.push({animation:t})}let f=!!l.length;return i&&(!1===s.initial||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(f=!1),i=!1,f?t(l):Promise.resolve()}return{animateChanges:a,setActive:function(t,i){if(n[t].isActive===i)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,i)),n[t].isActive=i;let r=a(t);for(let e in n)n[e].protectedKeys={};return r},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=x9()}}}(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();vT(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends yN{constructor(){super(...arguments),this.id=x7++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;let i=this.node.animationState.setActive("exit",!e);t&&!e&&i.then(()=>{t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}},inView:{Feature:class extends yN{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var e;let t;this.unmount();let{viewport:n={}}=this.node.getProps(),{root:i,margin:r,amount:a="some",once:s}=n,o={root:i?i.current:void 0,rootMargin:r,threshold:"number"==typeof a?a:S$[a]},l=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,s&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),r=t?n:i;r&&r(e)};return e=this.node.current,t=function({root:e,...t}){let n=e||document;SK.has(n)||SK.set(n,{});let i=SK.get(n),r=JSON.stringify(t);return i[r]||(i[r]=new IntersectionObserver(SQ,{root:e,...t})),i[r]}(o),SZ.set(e,l),t.observe(e),()=>{SZ.delete(e),t.unobserve(e)}}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends yN{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=function(e,t,n={}){let[i,r,a]=SO(e,n),s=e=>{let i=e.currentTarget;if(!SX(e)||Sq.has(e))return;SG.add(i),n.stopPropagation&&Sq.add(e);let a=t(i,e),s=(e,t)=>{window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",l),SG.has(i)&&SG.delete(i),SX(e)&&"function"==typeof a&&a(e,{success:t})},o=e=>{s(e,i===window||i===document||n.useGlobalTarget||SV(i,e.target))},l=e=>{s(e,!1)};window.addEventListener("pointerup",o,r),window.addEventListener("pointercancel",l,r)};
1891return i.forEach(e=>{((n.useGlobalTarget?window:e).addEventListener("pointerdown",s,r),SH(e))&&(e.addEventListener("focus",e=>((e,t)=>{let n=e.currentTarget;if(!n)return;let i=Sj(()=>{if(SG.has(n))return;SW(n,"down");let e=Sj(()=>{SW(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>SW(n,"cancel"),t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)})(e,r)),bt.has(e.tagName)||!0===e.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),a}(e,(e,t)=>(SY(this.node,t,"Start"),(e,{success:t})=>SY(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}}},focus:{Feature:class extends yN{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=yG(bi(this.node.current,"focus",()=>this.onFocus()),bi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends yN{mount(){let{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){let[i,r,a]=SO(e,n);return i.forEach(e=>{let n,i=!1,a=!1,s=t=>{n&&(n(t),n=void 0),e.removeEventListener("pointerleave",l)},o=e=>{i=!1,window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",o),a&&(a=!1,s(e))},l=e=>{if("touch"!==e.pointerType){if(i){a=!0;return}s(e)}};e.addEventListener("pointerenter",i=>{if("touch"===i.pointerType||br.x||br.y)return;a=!1;let s=t(e,i);"function"==typeof s&&(n=s,e.addEventListener("pointerleave",l,r))},r),e.addEventListener("pointerdown",()=>{i=!0,window.addEventListener("pointerup",o,r),window.addEventListener("pointercancel",o,r)},r)}),a}(e,(e,t)=>(Sz(this.node,t,"Start"),e=>Sz(this.node,e,"End"))))}unmount(){}}},pan:{Feature:class extends yN{constructor(){super(...arguments),this.removePointerDownListener=g4}onPointerDown(e){this.session=new bC(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:bT(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:bH(e),onStart:bH(t),onMove:bH(n),onEnd:(e,t)=>{delete this.session,i&&g9.postRender(()=>i(e,t))}}}mount(){this.removePointerDownListener=bM(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends yN{constructor(e){super(e),this.removeGroupControls=g4,this.removeListeners=g4,this.controls=new bB(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||g4}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:SB,MeasureLayout:bq},layout:{ProjectionNode:SB,MeasureLayout:bq}},(e,t)=>t.isSVG??yo(e)?new v2(t):new ya(t,{allowProjection:e!==ec.Fragment}));var S1=ec;function S2(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}class S3 extends S1.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){let e=t.offsetParent,n=SH(e)&&e.offsetWidth||0,i=SH(e)&&e.offsetHeight||0,r=this.props.sizeRef.current;r.height=t.offsetHeight||0,r.width=t.offsetWidth||0,r.top=t.offsetTop,r.left=t.offsetLeft,r.right=n-r.width-r.left,r.bottom=i-r.height-r.top}return null}componentDidUpdate(){}render(){return this.props.children}}function S4({children:e,isPresent:t,anchorX:n,anchorY:i,root:r,pop:a}){let s=(0,S1.useId)(),o=(0,S1.useRef)(null),l=(0,S1.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=(0,S1.useContext)(yc),c=function(...e){return ec.useCallback(function(...e){return t=>{let n=!1,i=e.map(e=>{let i=S2(e,t);return n||"function"!=typeof i||(n=!0),i});if(n)return()=>{for(let t=0;t<i.length;t++){let n=i[t];"function"==typeof n?n():S2(e[t],null)}}}}(...e),e)}(o,e.props?.ref??e?.ref);return(0,S1.useInsertionEffect)(()=>{let{width:e,height:c,top:d,left:h,right:p,bottom:f}=l.current;if(t||!1===a||!o.current||!e||!c)return;
1891let m="left"===n?`left: ${h}`:`right: ${p}`,g="bottom"===i?`bottom: ${f}`:`top: ${d}`;o.current.dataset.motionPopId=s;let v=document.createElement("style");u&&(v.nonce=u);let y=r??document.head;return y.appendChild(v),v.sheet&&v.sheet.insertRule(`
1892          [data-motion-pop-id="${s}"] {
1893            position: absolute !important;
1894            width: ${e}px !important;
1895            height: ${c}px !important;
1896            ${m}px !important;
1897            ${g}px !important;
1898          }
1899        `),()=>{y.contains(v)&&y.removeChild(v)}},[t]),(0,eu.jsx)(S3,{isPresent:t,childRef:o,sizeRef:l,pop:a,children:!1===a?e:S1.cloneElement(e,{ref:c})})}let S5=({children:e,initial:t,isPresent:n,onExitComplete:i,custom:r,presenceAffectsLayout:a,mode:s,anchorX:o,anchorY:l,root:u})=>{let c=yS(S6),d=(0,ec.useId)(),h=!0,p=(0,ec.useMemo)(()=>(h=!1,{id:d,initial:t,isPresent:n,custom:r,onExitComplete:e=>{for(let t of(c.set(e,!0),c.values()))if(!t)return;i&&i()},register:e=>(c.set(e,!1),()=>c.delete(e))}),[n,c,i]);return a&&h&&(p={...p}),(0,ec.useMemo)(()=>{c.forEach((e,t)=>c.set(t,!1))},[n]),ec.useEffect(()=>{n||c.size||!i||i()},[n]),e=(0,eu.jsx)(S4,{pop:"popLayout"===s,isPresent:n,anchorX:o,anchorY:l,root:u,children:e}),(0,eu.jsx)(yb.Provider,{value:p,children:e})};function S6(){return new Map}let S8=e=>e.key||"";function S9(e){let t=[];return ec.Children.forEach(e,e=>{(0,ec.isValidElement)(e)&&t.push(e)}),t}let S7=({children:e,custom:t,initial:n=!0,onExitComplete:i,presenceAffectsLayout:r=!0,mode:a="sync",propagate:s=!1,anchorX:o="left",anchorY:l="top",root:u})=>{let[c,d]=bj(s),h=(0,ec.useMemo)(()=>S9(e),[e]),p=s&&!c?[]:h.map(S8),f=(0,ec.useRef)(!0),m=(0,ec.useRef)(h),g=yS(()=>new Map),v=(0,ec.useRef)(new Set),[y,x]=(0,ec.useState)(h),[b,S]=(0,ec.useState)(h);yL(()=>{f.current=!1,m.current=h;for(let e=0;e<b.length;e++){let t=S8(b[e]);p.includes(t)?(g.delete(t),v.current.delete(t)):!0!==g.get(t)&&g.set(t,!1)}},[b,p.length,p.join("-")]);let _=[];if(h!==y){let e=[...h];for(let t=0;t<b.length;t++){let n=b[t],i=S8(n);p.includes(i)||(e.splice(t,0,n),_.push(n))}return"wait"===a&&_.length&&(e=_),S(S9(e)),x(h),null}let{forceRender:w}=(0,ec.useContext)(yl);return(0,eu.jsx)(eu.Fragment,{children:b.map(e=>{let y=S8(e),x=(!s||!!c)&&(h===b||p.includes(y));return(0,eu.jsx)(S5,{isPresent:x,initial:(!f.current||!!n)&&void 0,custom:t,presenceAffectsLayout:r,mode:a,root:u,onExitComplete:x?void 0:()=>{if(v.current.has(y)||(v.current.add(y),!g.has(y)))return;g.set(y,!0);let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(w?.(),S(m.current),s&&d?.(),i&&i())},anchorX:o,anchorY:l,children:e},y)})})};var _e=e.i(57688);let _t=[{label:"Home",url:"/",icon:"/menu/home.gif",padding:"8px 10px"},{label:"Music Store",url:"/collections/music",icon:"/menu/music_store.png",padding:"0px"},{label:"Merch",url:"/collections/merch",icon:"/menu/merch.png",padding:"11px 9px"},{label:"Membership",url:"/pages/membership",icon:"/menu/membership.png",padding:"6px 9px"},{label:"Events",url:"/pages/events",icon:"/menu/events.png",padding:"14px",blendMode:"normal"},{label:"Leave Your Mark",url:"/pages/leave-your-mark",icon:"/menu/leave_your_mark.png",padding:"8px 7px"}];function _n(){return(0,eu.jsxs)("svg",{width:"42",height:"15",viewBox:"0 0 42 15",fill:"none",children:[(0,eu.jsx)("line",{x1:"0",y1:"0.5",x2:"21",y2:"14",stroke:"#FFFFFF",strokeWidth:"1"}),(0,eu.jsx)("line",{x1:"21",y1:"14",x2:"42",y2:"0.5",stroke:"#FFFFFF",strokeWidth:"1"})]})}function _i(){let[e,t]=(0,ec.useState)(!1),[n,i]=(0,ec.useState)(!1),r=(0,ec.useCallback)(()=>t(e=>!e),[]);(0,ec.useEffect)(()=>{let e=()=>{i(window.innerWidth<960||window.innerHeight<760)};return e(),window.addEventListener("resize",e),window.addEventListener("orientationchange",e),()=>{window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e)}},[]);let a=(0,ec.useCallback)(e=>{window.parent!==window&&window.parent.postMessage({type:"navigate-external",url:e},"*")},[]);return(0,eu.jsxs)(eu.Fragment,{children:[!e&&(0,eu.jsx)(S0.button,{initial:{opacity:0}
1899,animate:{opacity:1},exit:{opacity:0},onClick:r,className:"menu-chevron-toggle",style:{position:"fixed",top:n?"calc(1.25rem + var(--safe-area-inset-top, 0px))":"calc(72.84px + var(--safe-area-inset-top, 0px))",left:"50%",transform:"translateX(-50%)",zIndex:30,background:"transparent",border:"none",cursor:"pointer",padding:12},"aria-label":"Open menu",children:(0,eu.jsx)(_n,{})}),(0,eu.jsx)(S7,{children:e&&(0,eu.jsxs)(S0.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3,ease:"easeInOut"},onClick:r,style:{position:"fixed",inset:0,zIndex:30},children:[(0,eu.jsx)("div",{style:{position:"absolute",inset:0,background:"rgba(0, 0, 0, 0.5)"}}),(0,eu.jsx)("div",{style:{position:"absolute",inset:0,background:"rgba(0, 0, 0, 0.5)",backdropFilter:"blur(5px)",WebkitBackdropFilter:"blur(5px)"}}),(0,eu.jsxs)("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start",overflowY:"auto",paddingBottom:"var(--safe-area-inset-bottom, 0px)"},children:[(0,eu.jsx)(S0.button,{initial:{opacity:0}
1899,animate:{opacity:1},transition:{delay:.1},onClick:e=>{e.stopPropagation(),r()},style:{position:"absolute",top:n?"calc(1rem + var(--safe-area-inset-top, 0px))":"calc(55px + var(--safe-area-inset-top, 0px))",right:n?"calc(1rem + var(--safe-area-inset-right, 0px))":"120px",width:22,height:22,background:"#000000",border:"none",cursor:"pointer",padding:0,display:"flex",alignItems:"center",justifyContent:"center"},"aria-label":"Close menu",children:(0,eu.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:[(0,eu.jsx)("line",{x1:"1",y1:"1",x2:"17",y2:"17",stroke:"#FFFFFF",strokeWidth:"0.875"}),(0,eu.jsx)("line",{x1:"17",y1:"1",x2:"1",y2:"17",stroke:"#FFFFFF",strokeWidth:"0.875"})]})}),(0,eu.jsx)(S0.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{delay:.12,duration:.35,ease:"easeOut"},onClick:e=>e.stopPropagation(),style:{display:n?"grid":"flex",justifyContent:n?"center":"space-between",alignItems:"flex-start",gridTemplateColumns:n?"repeat(auto-fit, minmax(92px, 1fr))":void 0,columnGap:n?12:void 0,rowGap:n?18:void 0,width:"100%",maxWidth:n?520:963,padding:n?"0 16px":"0 24px",marginTop:n?"calc(70px + var(--safe-area-inset-top, 0px))":"calc(87px + var(--safe-area-inset-top, 0px))"},children:_t.map((e,t)=>{let i=0===t,r=n?64:72;return(0,eu.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:n?16:66},children:[(0,eu.jsx)("button",{className:"glass-circle",onClick:()=>a(e.url),style:{position:"relative",width:r,height:r,borderRadius:100,background:"rgba(141, 141, 141, 0.1)",border:"none",padding:0,isolation:"isolate",cursor:"pointer",overflow:"hidden",flexShrink:0,transition:"background 200ms ease"},onMouseEnter:e=>{e.currentTarget.style.background="rgba(141, 141, 141, 0.25)"},onMouseLeave:e=>{e.currentTarget.style.background="rgba(141, 141, 141, 0.1)"},children:(0,eu.jsx)("div",{style:{position:"absolute",inset:0,padding:e.padding,boxSizing:"border-box"},children:(0,eu.jsx)("div",{style:{position:"relative",width:"100%",height:"100%"},children:(0,eu.jsx)(_e.default,{src:e.icon,alt:e.label,fill:!0,unoptimized:e.icon.endsWith(".gif"),style:{objectFit:"contain",mixBlendMode:e.blendMode||"lighten"}})})})}),(0,eu.jsx)("button",{onClick:()=>a(e.url),style:{padding:"4px 15px",borderRadius:15,background:i?"#FFFFFF":"transparent",color:i?"#000000":"#FFFFFF",border:"none",fontFamily:"var(--font-neue-haas-roman), 'Neue Haas Grotesk Display Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:500,fontSize:14,lineHeight:"17px",textAlign:"center",whiteSpace:"nowrap",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",transition:"background 200ms ease, color 200ms ease"},onMouseEnter:e=>{i||(e.currentTarget.style.background="rgba(255, 255, 255, 0.1)")},onMouseLeave:e=>{i||(e.currentTarget.style.background="transparent")},children:e.label})]},e.label)})})]})]})})]})}let _r=null,_a=null;function _s(){if(_r&&"closed"!==_r.state)return _r;let e=window.AudioContext||window.webkitAudioContext;return e?(_r=new e,_a=null,_r):null}async function _o(e,t,n,i,r){let a=_s();if(!a){console.warn("No AudioContext - streaming playback not available"),n?.();return}"suspended"===a.state&&await a.resume();let s=function(e){if(_a&&_a.context===e)return _a;let t=e.createBiquadFilter();t.type="highpass",t.frequency.value=300,t.Q.value=.7;let n=e.createBiquadFilter();n.type="lowpass",n.frequency.value=3400,n.Q.value=.7;let i=e.createDynamicsCompressor();i.threshold.value=-24,i.ratio.value=4,i.attack.value=.003,i.release.value=.1;let r=e.createWaveShaper(),a=new Float32Array(256);for(let e=0;e<256;e++){let t=(e-128)/128;a[e]=Math.tanh(1.5*t)}r.curve=a;let s=e.createGain();return s.gain.value=1,t.connect(n),n.connect(i),i.connect(r),r.connect(s),s.connect(e.destination),_a={context:e,highpass:t,lowpass:n,compressor:i,distortion:r,gain:s}}(a),o=!1,l=!1,u=()=>{if(v&&(v.pause(),v.src="",v.load(),v=null),x&&(URL.revokeObjectURL(x),x=null),y){try{y.disconnect()}catch{}y=null}m=null,g=null,b.length=0,S=!0},c=()=>{l||(l=!0,n?.(),u())},d=()=>{if(i?.aborted)throw Error("aborted")};i&&i.addEventListener("abort",()=>{u(),c()},{once:!0});let h=[],p=0,f=(r?.formatType??"mp3")==="mp3"&&"undefined"!=typeof MediaSource&&MediaSource.isTypeSupp
1899orted("audio/mpeg"),m=null,g=null,v=null,y=null,x=null,b=[],S=!1,_=()=>{if(!g||g.updating||0===b.length)return;let e=b.shift();e&&g.appendBuffer(e)};f&&(m=new MediaSource,(v=new Audio).preload="auto",v.setAttribute("playsinline",""),v.setAttribute("webkit-playsinline",""),x=URL.createObjectURL(m),v.src=x,(y=a.createMediaElementSource(v)).connect(s.highpass),m.addEventListener("sourceopen",()=>{if(m){try{g=m.addSourceBuffer("audio/mpeg")}catch(e){for(console.warn("Failed to create SourceBuffer:",e),g=null,S=!0;b.length;){let e=b.shift();e&&(h.push(e),p+=e.length)}return}g.addEventListener("updateend",_),_()}}),v.onended=()=>{c()},v.onerror=()=>{console.warn("Media playback error; falling back to full decode."),u()});let w=async e=>{if(f&&!S){b.push(e),_(),!o&&v&&(o=!0,t?.(),v.play().catch(e=>{console.warn("Media playback failed:",e),u()}));return}h.push(e),p+=e.length};try{d();let n=await e();if(d(),!n.ok){console.error("TTS request failed:",n.status),c();return}let i=n.body?.getReader();if(!i)return void c();let r=new TextDecoder,l="";for(;;){d();let{done:e,value:t}=await i.read();if(e)break;let n=(l+=r.decode(t,{stream:!0})).split("\n");for(let e of(l=n.pop()||"",n))if(e.trim())try{let t=JSON.parse(e);if(t.audio){let e=atob(t.audio),n=new Uint8Array(e.length);for(let t=0;t<e.length;t++)n[t]=e.charCodeAt(t);await w(n)}}catch{}}if(l.trim())try{let e=JSON.parse(l);if(e.audio){let t=atob(e.audio),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);await w(n)}}catch{}if(!g&&b.length&&0===p)for(;b.length;){let e=b.shift();e&&(h.push(e),p+=e.length)}if(g){(()=>{if(!m||!g)return;let e=()=>{if(m&&g){if(g.updating||b.length>0)return void g.addEventListener("updateend",e,{once:!0});"open"===m.readyState&&m.endOfStream()}};g.updating?g.addEventListener("updateend",e,{once:!0}):e()})(),o||c();return}if(0===p)return void c();let u=new Uint8Array(p),f=0;for(let e of h)u.set(e,f),f+=e.length;try{let e=await a.decodeAudioData(u.buffer.slice(0));o||(o=!0,t?.());let n=a.createBufferSource();n.buffer=e,n.connect(s.highpass),n.onended=()=>{c()},n.start(0)}catch(e){console.warn("Audio decode failed:",e),c()}}catch(e){if(i?.aborted)return void c();console.error("Streaming TTS error:",e),c()}finally{i?.aborted&&u()}}let _l="true"===el.default.env.NEXT_PUBLIC_SHOW_MENU,_u="true"===el.default.env.NEXT_PUBLIC_LOW_RES_MODE,_c=["not so far away, someone spoke about family","nearby, someone found peace about family","in a quiet moment, someone talked about friends","not long ago, someone opened up about friends","in a distant place, someone was worried about work","nearby, someone just received help with work","somewhere close, someone spoke about community","not so far away, someone found strength in community","someone nearby just received help with love","in a gentle moment, someone spoke about love","nearby, someone was wondering about the future","not long ago, someone found hope for the future","somewhere close, someone was seeking advice","in a quiet corner, someone received guidance","not so far away, someone was searching for faith","nearby, someone found comfort in faith","there are others in this space","you are not alone here"],_d=["everything","you","me","them","us","dust","breath","relation","gravity","music","matter","heat","wind","air","frequency","noise","vibration","light","being","murmur","tremor","thunder","God"],_h=["media/lvmfw","media/recap"],_p=new Set(["media/lvmfw","media/mlb","media/recap","media/studio"]),_f={"media/lvmfw":"Louis Vuitton Fall/Winter 2026 men's show in Paris","media/mlb":"2025 World Series opening performance","media/recap":"Vatican 'Grace for the World' concert","media/studio":"Studio session photos","media/billboards":"Billboard campaign photos","media/performances":"Live performance stills (Beach Prayer, Pharrell walk)","media/grammys":"2026 Grammys performance of 'So Far Ahead'","media/clipse":"Clipse collaboration stills"},_m=0;function _g(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function _v(e){let t=e.toLowerCase();return`I feel something alive in those ${t} moments.`}function _y(e){let t=++_m,n=e.scrollTop;if(e.scrollHeight-e.clientHeight-n<=0)return;let i=performance.now(),r=a=>{if(t!==_m)return;let s=Math.min(1,(a-i)/900),o=s<.5?4*s*s*s:1-Math.pow(-2*s+2,3)/2,l=e.scrollHeight-e.clientHeight;e.scrollTop=n+(l-n)*o,s<1?requestAnimationFrame(r):t===_m&&(e.scrollTop=e.scrollHeight-e.clientHeight)};requestAnimationFrame(()=>{requestAnimationFrame(r)})}function _x(e){window.parent!==window&&window.parent.postMessage(e,"*")}function _b(e){return e.filter(e=>!e.excludeFromLlmContext&&e.content.trim().length>0).map(e=>({role:e.role,content:e.content}))}function _S(e){return e?Math.max(2400,18*e.length+600):2400}function __(e){let t=e??window.matchMedia("(pointer: coarse)").matches,n=Math.min(window.screen.width,window.screen.height),i=window.innerWidth<768;return t&&(n<1024||i)}function _w(e){let t=e.trim().toLowerCase();return!(!t||/\b(no|nah|nope|not now|not yet|later)\b/.test(t))&&!!(/\b(yes|yeah|yep|sure|okay|ok|absolutely|definitely|please|go ahead)\b/.test(t)||/\b(show|see)\b[\s\w]{0,20}\b(more|others|another|next)\b/.test(t)||/^(more|others|another|next)\b/.test(t))}function _M(e,t){let n=new Set(t.filter(e=>e.startsWith("products/")));return e.filter(e=>n.has(e.folder)).map(e=>({folder:e.folder,totalCount:e.totalCount,visibleCount:e.visibleCount}))}function _T(e,t){let n=new Set(t.filter(e=>e.startsWith("products/"))),i=new Set;for(let t of e)if(n.has(t.folder)&&!(t.visibleCount>=t.totalCount))for(let e of t.visibleImageIds)i.add(e);return Array.from(i)}function _E({word:e,allWords:t,isTransitioning:n,className:i,style:r}){let a=(0,ec.useRef)(null),[s,o]=(0,ec.useState)(void 0);return(0,ec.useLayoutEffect)(()=>
1899{if(a.current){let n=a.current,i=0;for(let e of t)n.textContent=e,i=Math.max(i,n.offsetWidth);n.textContent=e,o(i)}},[t]),(0,eu.jsxs)("span",{className:i,style:{display:"inline-block",position:"relative",width:s?`${s}px`:"auto",textAlign:"center",verticalAlign:"baseline",marginLeft:"10px",...r},children:[(0,eu.jsx)("span",{style:{position:"relative",zIndex:1,opacity:1,background:"linear-gradient(180deg, #FFFFFF 0%, #2468FA 51%, #252525 70%)",backgroundSize:"100% 250%",WebkitBackgroundClip:"text",backgroundClip:"text",color:"transparent"},children:e}),(0,eu.jsx)("span",{style:{position:"absolute",inset:"2px -8px",borderRadius:"9999px",padding:"0.7px",background:"linear-gradient(180deg, #2A4469 0%, #FFFFFF 65%, #2A4469 100%)",WebkitMask:"linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",mask:"linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",WebkitMaskComposite:"xor",maskComposite:"exclude",pointerEvents:"none"}}),(0,eu.jsx)("span",{ref:a,style:{position:"absolute",visibility:"hidden",whiteSpace:"nowrap",left:0},children:e})]})}function _A(e){let t,n=e.replace(/\u00A0/g," "),i=[],r=/\b\d{1,2}:\d{1,2}\b/g;for(;null!==(t=r.exec(n));)i.push([t.index,t.index+t[0].length]);return i}function _C(e,t){for(let[n,i]of t)if(e>=n&&e<i)return!0;return!1}function _P(e){return e.replace(/(\S) (\S+)$/gm,"$1 $2")}function _R(e,t=!1){let n=_P(e),i=[],r="",a=!1,s=0,o=0,l=()=>{if(r){if(a){let e=t?_A(r):[],n=[],a=0,s=0;for(;a<r.length;){if("\n"===r[a]){n.push((0,eu.jsx)("br",{},`${o}-br-${s++}`)),a++;continue}let t=_C(a,e),i=a;for(;i<r.length&&"\n"!==r[i]&&_C(i,e)===t;)i++;let l=r.slice(a,i);l&&n.push((0,eu.jsx)("span",{style:t?{background:"none",WebkitBackgroundClip:"initial",backgroundClip:"initial",WebkitTextFillColor:"#fff",color:"#fff"}:void 0,children:l},`${o}-seg-${s++}`)),a=i}i.push((0,eu.jsx)("span",{style:{fontFamily:"var(--font-neue-haas-roman), 'Helvetica Neue', Helvetica, Arial, sans-serif",fontStyle:"normal",fontWeight:700},children:n},o++))}else{let e=r.split("\n"),t=[];e.forEach((e,n)=>{n>0&&t.push((0,eu.jsx)("br",{},`${o}-br-${n}`)),e&&t.push(e)}),i.push((0,eu.jsx)("span",{children:t},o++))}r=""}};for(;s<n.length;){if("*"===n[s]&&"*"===n[s+1]){l(),a=!a,s+=2;continue}if("*"===n[s]){l(),a=!a,s+=1;continue}r+=n[s],s++}return l(),(0,eu.jsx)(eu.Fragment,{children:i})}function _I({text:e,onComplete:t,onReveal:n,skipDots:i=!1,forceWhiteBold:r=!1}){let a=(0,ec.useMemo)(()=>(function(e,t=!1){let n=[],i="",r=!1,a=0;for(;a<e.length;){if("*"===e[a]&&"*"===e[a+1]){i&&(n.push({text:i,bold:r}),i=""),r=!r,a+=2;continue}if("*"===e[a]){i&&(n.push({text:i,bold:r}),i=""),r=!r,a+=1;continue}i+=e[a],a++}i&&n.push({text:i,bold:r});let s=[],o=0;for(let e of n){let n=t&&e.bold?_A(e.text):[];for(let i=0;i<e.text.length;i++){let r=e.text[i];s.push({char:r,bold:e.bold,whiteBold:t&&e.bold&&_C(i,n),visibleIndex:o}),o++}}return s})(_P(e),r),[e,r]),s=a.length,[o,l]=(0,ec.useState)(0),u=(0,ec.useRef)(!1);return(0,ec.useEffect)(()=>
1899{l(0),u.current=!1},[e]),(0,ec.useEffect)(()=>{if(o<s){let e=setTimeout(()=>{l(e=>e+1)},18);return()=>clearTimeout(e)}!u.current&&o===s&&s>0&&(u.current=!0,t?.())},[o,s,t]),(0,ec.useEffect)(()=>{1===o&&n?.()},[o,n]),(0,eu.jsx)(eu.Fragment,{children:a.map((e,t)=>"\n"===e.char?(0,eu.jsx)("br",{style:{opacity:+(t<o)}},t):(0,eu.jsx)("span",{style:{opacity:+(t<o),transition:"opacity 40ms ease-out",fontFamily:e.bold?"var(--font-neue-haas-roman), 'Helvetica Neue', Helvetica, Arial, sans-serif":void 0,fontStyle:e.bold?"normal":void 0,fontWeight:e.bold?700:void 0,background:e.bold&&e.whiteBold?"none":void 0,WebkitBackgroundClip:e.bold&&e.whiteBold?"initial":void 0,backgroundClip:e.bold&&e.whiteBold?"initial":void 0,WebkitTextFillColor:e.bold&&e.whiteBold?"#fff":void 0,color:e.bold&&e.whiteBold?"#fff":void 0},children:e.char},t))})}function _D(){return(0,eu.jsxs)("span",{className:"typing-dots",children:[(0,eu.jsx)("span",{className:"typing-dot"}),(0,eu.jsx)("span",{className:"typing-dot"}),(0,eu.jsx)("span",{className:"typing-dot"})]})}function _L(){let[e,t]=(0,ec.useState)(null),[n,i]=(0,ec.useState)([]);return(0,ec.useEffect)(()=>{let e=new AbortController;return(async()=>{let[n,r]=await Promise.allSettled([fetch("/vof-shopify-assets/folder-map.json",{signal:e.signal}),fetch("/api/shopify/products",{signal:e.signal})]);if(e.signal.aborted||"fulfilled"!==n.status||!n.value.ok)return;let a=[];if("fulfilled"===r.status&&r.value.ok){let e=await r.value.json();Array.isArray(e.shopifyImages)&&(a=e.shopifyImages)}t(await n.value.json()),i(a)})(),()=>e.abort()},[]),(0,eu.jsxs)("div",{className:"w-screen bg-black",style:{height:"var(--app-height, 100vh)"},children:[e&&(0,eu.jsx)(mA,{isResponsePlaying:!1,isChoirPlaying:!1,activeFolders:[],folderMap:e,onResponseComplete:()=>{},onFolderSelect:()=>{},shopifyImages:n,onProductClick:e=>{_x({type:"navigate-product",url:e})},selectionSeed:0,showDebugPanel:!1,hideImages:!1,backgroundImageUrl:"/images/backgrounds/space-nebula-blue.webp",backgroundImageOpacity:.53,backgroundImageScale:.45,backgroundImageOffsetX:.325,backgroundImageOffsetY:-.08,starMode:"stream",showConstellationLines:!1,showSummaryScreen:!1,onSceneError:()=>_x({type:"vof-hide"})}),_l&&(0,eu.jsx)(_i,{})]})}function _F(){return((0,ec.useEffect)(()=>{_x({type:"vof-ready"})},[]),_u)?(0,eu.jsx)(_L,{}):(0,eu.jsx)(_N,{})}function _N(){let[e,t]=(0,ec.useState)(!1),[n,i]=(0,ec.useState)(!0),[r,a]=(0,ec.useState)(!1),[s,o]=(0,ec.useState)(!1),[l,u]=(0,ec.useState)(!1),[c,d]=(0,ec.useState)(!1),[h,p]=(0,ec.useState)([]),[f,m]=(0,ec.useState)(""),[g,v]=(0,ec.useState)(!1),[y,x]=(0,ec.useState)(null),[b,S]=(0,ec.useState)(!1),[_,w]=(0,ec.useState)(""),[M,T]=(0,ec.useState)(()=>Math.floor(Math.random()*_c.length)),[E,A]=(0,ec.useState)(!1),[C,P]=(0,ec.useState)(0),[R,I]=(0,ec.useState)(!1),[D,L]=(0,ec.useState)(!1),[F,N]=(0,ec.useState)(""),[U,k]=(0,ec.useState)(""),[B,O]=(0,ec.useState)(""),[z,H]=(0,ec.useState)(""),[V,G]=(0,ec.useState)(!1),[j,W]=(0,ec.useState)(!1);(0,ec.useEffect)(()=>{a(!0)},[]),(0,ec.useEffect)(()=>{let e=()=>{tP.current&&(clearTimeout(tP.current),tP.current=null),null!==tR.current&&(cancelAnimationFrame(tR.current),tR.current=null)},t=(e,t,n,i,r)=>{N(e),k(t),O(n),H(i),G(r),p([{id:"intro",role:"assistant",content:e}])},n=(n=!1)=>{let{verse:i,reflection:r,fromClock:a,capturedAt:s}=function(){let e=new Date;try{let t=e.getHours(),n=e.getMinutes(),i=mk?.[t]?.[n];if(i?.text&&i?.reference&&!0===i.exactMatch&&function(e,t,n){if(0===t||0===n)return!1;let i=/ (\d+):(\d+)\s*$/.exec(e);if(!i)return!1;let r=Number(i[1]),a=Number(i[2]);return!!Number.isInteger(r)&&!!Number.isInteger(a)&&r===(t-1)%12+1&&a===n}(i.reference,t,n)){let t=mN[Math.floor(Math.random()*mN.length)];return{verse:{text:i.text,reference:i.reference},reflection:t,fromClock:!0,capturedAt:e}}}catch{}return{...function(){let e=[];try{let t=localStorage.getItem(mU);if(t){let n=JSON.parse(t);Array.isArray(n)&&(e=n.filter(e=>Number.isInteger(e)&&e>=0&&e<mF.length))}}catch{e=[]}e.length>=mF.length&&(e=[]);let t=mF.map((e,t)=>t).filter(t=>!e.includes(t)),n=t[Math.floor(Math.random()*t.length)],i=Number.isInteger(n)?n:0;e.push(i);try{localStorage.setItem(mU,JSON.stringify(e))}catch{}return{verse:mF[i]??mF[0],reflection:mN[Math.floor(Math.random()*mN.length)]??"Sit with these words for a moment. What comes up for you?"}}
1899(),fromClock:!1,capturedAt:e}}(),o=function(e,t){let n=t?.showTime??!0,i=`Your verse for this moment is **"${e.text}" — ${e.reference}.**`;if(!n)return`${i}
1900
1901Sit with these words for a moment. What comes up for you?`;let r=t?.now??new Date,a=r.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}).replace(/\s*(AM|PM)$/i,""),s=r.toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"});return`It's **${a}** on ${s}.
1902
1903${i}
1904
1905Sit with these words for a moment. What comes up for you?`}(i,{showTime:a,now:s});if(!n){W(!1),t(o,i.text,i.reference,r,a);return}e(),W(!0),tP.current=setTimeout(()=>{(tP.current=null,tC.current)?W(!1):(t(o,i.text,i.reference,r,a),tR.current=requestAnimationFrame(()=>{W(!1),tR.current=null}))},280)};n(!1);let i=()=>{let e=new Date;return 60*e.getHours()+e.getMinutes()},r=i(),a=setInterval(()=>{if(tC.current)return;let e=i();e!==r&&(r=e,n(!0))},1e3),s=()=>{if("visible"!==document.visibilityState||tC.current)return;let e=i();e!==r&&(r=e,n(!0))};return document.addEventListener("visibilitychange",s),()=>{clearInterval(a),document.removeEventListener("visibilitychange",s),e()}},[]);let[X,q]=(0,ec.useState)(!1),[Y,Z]=(0,ec.useState)(!1),[K,J]=(0,ec.useState)(null),[Q,$]=(0,ec.useState)(!1),[ee,et]=(0,ec.useState)(8),[en,ei]=(0,ec.useState)(2400),[er,ea]=(0,ec.useState)("universe"),[es,eo]=(0,ec.useState)(!1),[el,ed]=(0,ec.useState)(!1),[eh,ep]=(0,ec.useState)("read"),[ef,em]=(0,ec.useState)(!1),[eg,ev]=(0,ec.useState)(!1),[ey,ex]=(0,ec.useState)(""),[eb,eS]=(0,ec.useState)(!1),[e_,ew]=(0,ec.useState)(()=>__()),[eM,eT]=(0,ec.useState)(!1),[eE,eA]=(0,ec.useState)(!1),[eC,eP]=(0,ec.useState)(!1),[eR,eI]=(0,ec.useState)(!1),[eD,eL]=(0,ec.useState)(!1),[eF,eN]=(0,ec.useState)(!1),[eU,ek]=(0,ec.useState)(!1),[eB,eO]=(0,ec.useState)(!1),[ez,eH]=(0,ec.useState)(!1),[eV,eG]=(0,ec.useState)(!1),[ej,eW]=(0,ec.useState)(1.35),[eX,eq]=(0,ec.useState)("1"),[eY,eZ]=(0,ec.useState)("mp3"),[eK,eJ]=(0,ec.useState)(1.25),[eQ,e$]=(0,ec.useState)(""),[e0,e1]=(0,ec.useState)(.3),[e2,e3]=(0,ec.useState)(!0),[e4,e5]=(0,ec.useState)(!0),[e6,e8]=(0,ec.useState)(!0),[e9,e7]=(0,ec.useState)(!0),[te,tt]=(0,ec.useState)(!0),[tn,ti]=(0,ec.useState)(0),[tr,ta]=(0,ec.useState)(!1),[ts,to]=(0,ec.useState)([]),[tl,tu]=(0,ec.useState)(void 0),[tc,td]=(0,ec.useState)(()=>Date.now()),[th,tp]=(0,ec.useState)([]),[tf,tm]=(0,ec.useState)([]),[tg,tv]=(0,ec.useState)(!1),[ty,tx]=(0,ec.useState)(!1),[tb,tS]=(0,ec.useState)(null),[t_,tw]=(0,ec.useState)([]),[tM,tT]=(0,ec.useState)([]),tE=(0,ec.useRef)(null),tA=(0,ec.useRef)(!1),tC=(0,ec.useRef)(!1),tP=(0,ec.useRef)(null),tR=(0,ec.useRef)(null),tI=(0,ec.useRef)([]),tD=(0,ec.useRef)([]),tL=(0,ec.useRef)(!1),[tF,tN]=(0,ec.useState)(0),tU=(0,ec.useRef)(!1),tk=(0,ec.useRef)(null),tB=(0,ec.useCallback)(e=>{if(tk.current&&(tk.current.disconnect(),tk.current=null),!e)return;let t=new ResizeObserver(([e])=>{let t=e.contentRect.height;tN(e=>1>Math.abs(e-t)?e:t),tU.current||requestAnimationFrame(()=>{tU.current=!0})});t.observe(e),tk.current=t},[]),tO=(0,ec.useRef)(null),tz=(0,ec.useRef)(!1),tH=(0,ec.useRef)(null),tV=(0,ec.useRef)(null),tG=(0,ec.useRef)(null),tj=(0,ec.useRef)([]),tW=(0,ec.useRef)(!1),tX=(0,ec.useRef)(null),tq=(0,ec.useRef)(!1),tY=(0,ec.useRef)(!1),tZ=(0,ec.useRef)(!1),tK=(0,ec.useRef)(null),tJ=(0,ec.useRef)(null),tQ=(0,ec.useRef)(null),t$=(0,ec.useRef)(null);(0,ec.useEffect)(()=>{_x({type:"widget-resize",expanded:n})},[n]),(0,ec.useEffect)(()=>{ev(!!(window.SpeechRecognition||window.webkitSpeechRecognition))},[]),(0,ec.useLayoutEffect)(()=>{ew(__())},[]),(0,ec.useEffect)(()=>{let e=window.matchMedia("(pointer: coarse)"),t=()=>{ew(__(e.matches))};return window.addEventListener("resize",t),window.addEventListener("orientationchange",t),"function"==typeof e.addEventListener?e.addEventListener("change",t):e.addListener(t),()=>{window.removeEventListener("resize",t),window.removeEventListener("orientationchange",t),"function"==typeof e.removeEventListener?e.removeEventListener("change",t):e.removeListener(t)}},[]),(0,ec.useEffect)(()=>{tY.current=Q},[Q]),(0,ec.useEffect)(()=>{tZ.current=eb},[eb]),(0,ec.useEffect)(()=>{tI.current=ts},[ts]),(0,ec.useEffect)(()=>{tD.current=tf},[tf]),(0,ec.useEffect)(()=>{tL.current=tg},[tg]),(0,ec.useEffect)(()=>{tC.current=c},[c]),(0,ec.useEffect)(()=>
1905{if(!e&&(Q||g||eb)){tX.current&&(clearTimeout(tX.current),tX.current=null),tx(e=>!e||e);return}return tX.current&&clearTimeout(tX.current),tX.current=setTimeout(()=>{tx(!1),tX.current=null},650),()=>{tX.current&&(clearTimeout(tX.current),tX.current=null)}},[e,Q,g,eb]),(0,ec.useEffect)(()=>()=>{tG.current&&(clearTimeout(tG.current),tG.current=null),tj.current=[],tW.current=!1},[]),(0,ec.useEffect)(()=>()=>{t$.current&&(t$.current.abort(),t$.current=null)},[]),(0,ec.useEffect)(()=>{"read"===eh&&(t$.current&&(t$.current.abort(),t$.current=null),eS(!1),tK.current&&(clearTimeout(tK.current),tK.current=null),tJ.current=null,tQ.current=null)},[eh]),(0,ec.useEffect)(()=>()=>{tK.current&&(clearTimeout(tK.current),tK.current=null),tJ.current=null,tQ.current=null},[]),(0,ec.useEffect)(()=>{let e=new URLSearchParams(window.location.search);e.has("debug")&&eT(!0),e.has("captchapreview")&&eA(!0);let t=e.get("visual");t&&["universe","constellation"].includes(t)&&ea(t),"end"===e.get("page")&&(J({summary:"Dev mode: skipped to end screen.",scripture:"For where two or three gather in my name, there am I with them. — Matthew 18:20",song:"MIRACLE WORKER",songId:"miracle-worker",songReason:"Whatever you're carrying, transformation is possible.",spotifyId:"03Y3YZFpualhQYgfSgqHmk"}),I(!0),q(!0),Z(!1))},[]),(0,ec.useEffect)(()=>{let e=new AbortController;return(async()=>{let[t,n]=await Promise.allSettled([fetch("/vof-shopify-assets/folder-map.json",{signal:e.signal}),fetch("/api/shopify/products",{signal:e.signal})]);if(e.signal.aborted)return;if("fulfilled"!==t.status||!t.value.ok)return console.error("Failed to load folder-map.json:","fulfilled"===t.status?t.value.status:t.reason);let i=[];if("fulfilled"===n.status)if(n.value.ok){let e=await n.value.json();Array.isArray(e.shopifyImages)&&(i=e.shopifyImages),Array.isArray(e.productFolders)&&tT(e.productFolders)}else console.error("Shopify products request failed:",n.value.status);else console.error("Failed to load Shopify products:",n.reason);tS(await t.value.json()),tw(i)})(),()=>e.abort()},[]),(0,ec.useEffect)(()=>{let e=()=>{J({summary:"Debug end screen triggered.",scripture:"For where two or three gather in my name, there am I with them. — Matthew 18:20",song:"MIRACLE WORKER",songId:"miracle-worker",songReason:"Whatever you're carrying, transformation is possible.",spotifyId:"03Y3YZFpualhQYgfSgqHmk"}),I(!0),Z(!0),setTimeout(()=>{q(!0),tI.current=[],to([]),tv(!1),tp([]),t3({frameDurationMs:12,durationMs:3600})},1200)};return window.addEventListener("debug-end-chat",e),()=>window.removeEventListener("debug-end-chat",e)},[]),(0,ec.useEffect)(()=>{if(n&&!e){let e=setTimeout(()=>o(!0),50);return()=>clearTimeout(e)}o(!1)},[n,e]),(0,ec.useEffect)(()=>{n&&!tz.current&&(tz.current=!0,(["angelReveal"]??Object.keys(mP)).forEach(e=>{mI(e)}))},[n]),(0,ec.useEffect)(()=>{if(!e)return;let t=setInterval(()=>{ti(e=>(e+1)%_d.length)},350);return()=>clearInterval(t)},[e]),(0,ec.useEffect)(()=>{let e=tE.current;e&&h.length>1&&_y(e)},[h.length]),(0,ec.useEffect)(()=>{let e=!1,t=0,n=(e,t,n)=>{let i=n.getBoundingClientRect();return e>=i.left&&e<=i.right&&t>=i.top&&t<=i.bottom},i=(e,t)=>{let n=Math.max(0,e.scrollHeight-e.clientHeight);if(n<=0)return;let i=Math.max(0,Math.min(n,e.scrollTop+t));e.scrollTop=i},r=e=>{let t=tE.current;!t||!c&&C<=0||n(e.clientX,e.clientY,t)&&(e.preventDefault(),e.stopPropagation(),i(t,e.deltaY))},a=i=>{let r=tE.current;if(!r||!c&&C<=0)return;if(1!==i.touches.length){e=!1;return}let a=i.touches[0];e=n(a.clientX,a.clientY,r),t=a.clientY},s=n=>{let r=tE.current;if(!r||!e||1!==n.touches.length)return;let a=n.touches[0],s=t-a.clientY;t=a.clientY,n.preventDefault(),n.stopPropagation(),i(r,s)},o=()=>{e=!1};return window.addEventListener("wheel",r,{passive:!1,capture:!0}),window.addEventListener("touchstart",a,{passive:!0,capture:!0}),window.addEventListener("touchmove",s,{passive:!1,capture:!0}),window.addEventListener("touchend",o,{passive:!0,capture:!0}),window.addEventListener("touchcancel",o,{passive:!0,capture:!0}),()=>{window.removeEventListener("wheel",r,!0),window.removeEventListener("touchstart",a,!0),window.removeEventListener("touchmove",s,!0),window.removeEventListener("touchend",o,!0),window.removeEventListener("touchcancel",o,!0)}},[c,C]);let t0=(0,ec.useCallback)(e=>{p(t=>[...t,{...e,isNew:!0}]),requestAnimationFrame(()=>{requestAnimationFrame(()=>{p(t=>t.map(t=>
1905t.id===e.id?{...t,isNew:!1}:t))})})},[]);(0,ec.useEffect)(()=>{s&&tO.current&&(e_||tO.current.focus())},[s,e_,c]);let t1=(0,ec.useCallback)(()=>{e_&&tO.current&&requestAnimationFrame(()=>{tO.current?.scrollIntoView({block:"nearest",inline:"nearest"})})},[e_]);(0,ec.useEffect)(()=>{if(!b)return;let e=setTimeout(()=>S(!1),3e3);return()=>clearTimeout(e)},[b]),(0,ec.useEffect)(()=>{if(!s||l)return void A(!1);let e=setTimeout(()=>{A(!0)},500);return()=>{clearTimeout(e)}},[s,l]);let t2=(0,ec.useCallback)(()=>{let e=tj.current.shift();if(!e){tW.current=!1,$(!1);return}tW.current=!0,et(e.frameDurationMs),ei(e.durationMs),$(!0),tG.current&&(clearTimeout(tG.current),tG.current=null),tG.current=setTimeout(()=>{tG.current=null,$(!1),requestAnimationFrame(t2)},e.durationMs)},[]),t3=(0,ec.useCallback)(e=>{},[]),t4=(0,ec.useCallback)(e=>{let t=Math.min(3200,Math.max(2400,e));null===tJ.current&&(tJ.current=performance.now(),tQ.current=e),t3({durationMs:t}),tK.current&&(clearTimeout(tK.current),tK.current=null),tK.current=setTimeout(()=>{if(tK.current=null,tZ.current){let t=tJ.current,n=tQ.current??e;if(null!==t){let e=n-(performance.now()-t);if(e>0&&e<800)return}t4(n)}},t)},[t3]),t5=(0,ec.useCallback)(()=>{$(!1)},[]),t6=(0,ec.useMemo)(()=>(function(e){let t=new Set(_p);for(let n of e)t.add(n.folder);return t})(tM),[tM]),t8=(0,ec.useMemo)(()=>(function(e){let t={..._f};for(let n of e)t[n.folder]=n.label;return t})(tM),[tM]),[t9,t7]=(0,ec.useState)(void 0),ne=(0,ec.useCallback)(e=>{tm(t=>{if(t.length!==e.length)return e;for(let n=0;n<t.length;n+=1){let i=t[n],r=e[n];if(!r||i.folder!==r.folder||i.totalCount!==r.totalCount||i.visibleCount!==r.visibleCount||i.visibleImageIds.length!==r.visibleImageIds.length)return e;for(let t=0;t<i.visibleImageIds.length;t+=1)if(i.visibleImageIds[t]!==r.visibleImageIds[t])return e}return t})},[]),nt=(0,ec.useCallback)((e,t)=>{let n=function(e,t){if(!Array.isArray(e))return null;let n=new Set;for(let i of e){if("string"!=typeof i)continue;let e=i.trim();if(t.has(e)&&(n.add(e),n.size>=3))break}return 0===n.size?[..._h]:Array.from(n).sort()}(e,t6);n&&(_g(tI.current,n)||(tI.current=n,to(n)),td(e=>e+1),tp([]),tu(void 0),t7(t))},[t6]),nn=(0,ec.useCallback)((e,t,n)=>{if(!e)return;let i=t??crypto.randomUUID(),r=n?.excludeFromLlmContext;if("listen"!==eh){t3({durationMs:_S(e)}),t?p(t=>t.map(t=>t.id===i?{...t,content:e,isPending:!1,isTyping:!0,...void 0!==r?{excludeFromLlmContext:r}:{}}:t)):t0({id:i,role:"assistant",content:e,isTyping:!0,isPending:!1,...r?{excludeFromLlmContext:!0}:{}}),x(i);return}t?p(t=>t.map(t=>t.id===i?{...t,content:e,isPending:!0,isTyping:!1,...void 0!==r?{excludeFromLlmContext:r}:{}}:t)):t0({id:i,role:"assistant",content:e,isTyping:!1,isPending:!0,...r?{excludeFromLlmContext:!0}:{}}),t$.current&&t$.current.abort();let a=new AbortController;t$.current=a,_o(()=>mj("/api/hume-tts",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:e,stream:!0,speed:eK,description:"1"===eX&&eQ.trim()?eQ:void 0,trailing_silence:e0,version:eX,split_utterances:e2,instant_mode:e4,format:"wav"===eY?"wav":void 0}),signal:a.signal}),()=>{eS(!0),p(t=>t.map(t=>t.id===i?{...t,content:e,isPending:!1,isTyping:!0,...void 0!==r?{excludeFromLlmContext:r}:{}}:t)),x(i),t4(_S(e))},()=>{t$.current===a&&(t$.current=null),eS(!1),tK.current&&(clearTimeout(tK.current),tK.current=null),tJ.current=null,tQ.current=null},a.signal,"wav"===eY?{octaveVersion:eX,formatType:"wav"}:{octaveVersion:eX}).catch(t=>{console.error("Streaming TTS error:",t),t$.current===a&&(t$.current=null),eS(!1),tK.current&&(clearTimeout(tK.current),tK.current=null),tJ.current=null,tQ.current=null,p(t=>t.find(e=>e.id===i)?t.map(t=>t.id===i?{...t,content:e,isPending:!1,isTyping:!0,...void 0!==r?{excludeFromLlmContext:r}:{}}:t):[...t,{id:i,role:"assistant",content:e,isPending:!1,isTyping:!0,...r?{excludeFromLlmContext:!0}:{}}]),x(i)})},[t0,eY,e4,e0,eQ,eK,e2,eX,eh,t4,t3]),ni=(0,ec.useCallback)((t,n)=>{let i=t?[t]:[];if(_g(tI.current,i)||(tI.current=i,to(i)),tv(!1),tu(n),t7(void 0),tp([]),td(e=>e+1),e||X||D||!t||!n||(tA.current||(tA.current=!0,u(!0)),tq.current||y||eb))return;d(!0);let r=function(e,t,n){if(!e)return"selected images";if(n[e])return n[e];let[i,r]=e.split("/");if(i&&r&&t&&"media"===i){let e=t.structure.media.subfolders,n=e[r]?.description;if(n)return n}return e.replace(/\//g," ")}(t,tb,t8),a=_b(h).slice(-8),s=crypto.randomUUID();t0({id:s,role:"assistant",content:"",isPending:!0}),tq.current=!0,(async()=>{try{let e=await mj("/api/image-reaction",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({folder:t,folderDescription:r,messages:a})}),n="";if(e.ok){let t=await e.json();n=t.message?.trim()??""}
1905n||(n=_v(r)),nn(n,s)}catch(e){console.error("Image reaction error:",e),nn(_v(r),s)}finally{tq.current=!1}})()},[t0,tb,D,nn,e,X,eb,y]),nr=(0,ec.useCallback)(e=>{let t={...e,timestamp:Date.now()};try{localStorage.setItem("vof_visitor_memory",JSON.stringify(t))}catch(e){console.error("Failed to save visitor memory:",e)}},[]),na=(0,ec.useCallback)(async e=>{if(!R&&!D){L(!0);try{let t=await mj("/api/summarize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:_b(e)})});if(!t.ok)throw Error("Summarize API error");let n=await t.json();nr({summary:n.summary,scripture:n.scripture,topic:n.topic,category:n.category});let i=e=>(e??"").toUpperCase().replace(/[^A-Z0-9]/g,""),r=mL.default.songs.find(e=>i(e.title)===i(n.song));J({summary:n.summary,scripture:n.scripture,song:n.song,songId:r?.id,songReason:n.songReason,spotifyId:r?.spotifyId}),I(!0),Z(!0),to([]),tI.current=[],tv(!1),tp([]),tu(void 0);let a=[...tM].sort(()=>Math.random()-.5).slice(0,3).map(e=>e.folder);setTimeout(()=>{q(!0),tI.current=a,to(a),td(e=>e+1),t3({frameDurationMs:12,durationMs:3600}),setTimeout(()=>{t3({frameDurationMs:12,durationMs:3600})},3900)},1200)}catch(e){console.error("Summarize error:",e)}finally{L(!1)}}},[R,D,tM,nr,t3]);(0,ec.useCallback)(e=>{na(e.map((e,t)=>({id:`voice-${t}`,role:e.role,content:e.content})))},[na]);let[ns,no]=(0,ec.useState)("share this"),[nl,nu]=(0,ec.useState)("add to your story"),nc=function(e){if(!e)return;let t=e.trim();if(!t)return;let n=/[A-Z]/.test(t),i=/[a-z]/.test(t);return!n||i?t:t.toLowerCase().replace(/(^|[\s\-/])([a-z])/g,(e,t,n)=>`${t}${n.toUpperCase()}`)}(K?.song),nd=()=>{if(!K?.spotifyId)return;let e="https://open.spotify.com/album/0h76slDPsJgev9rQ57XedP";eM?window.open(e,"_blank"):_x({type:"navigate-external",url:e}),nu("tap share in spotify"),setTimeout(()=>nu("add to your story"),4e3)},nh=()=>{let e="https://music.apple.com/us/album/ophanim/1839112843";eM?window.open(e,"_blank"):_x({type:"navigate-external",url:e})},np=()=>{let e="https://music.amazon.com/albums/B0FQM9B1PX";eM?window.open(e,"_blank"):_x({type:"navigate-external",url:e})},nf=()=>{let e="https://music.youtube.com/playlist?list=OLAK5uy_n6sImnUfP3BYhSQPoRThXVMmdO-LZjIts";eM?window.open(e,"_blank"):_x({type:"navigate-external",url:e})},nm=()=>{let e="http://www.tidal.com/album/490350022";eM?window.open(e,"_blank"):_x({type:"navigate-external",url:e})},ng=()=>{let e="https://www.deezer.com/album/899267382";eM?window.open(e,"_blank"):_x({type:"navigate-external",url:e})},nv=(0,ec.useCallback)(async()=>{if(!f.trim()||g||y)return;let e=f.trim(),t=!1;if(tL.current&&_w(e)){let e=_T(tD.current,tI.current);tv(!1),e.length>0&&(t=!0,tu(void 0),t7(void 0),tp(e),td(e=>e+1))}let n=_M(tD.current,tI.current);tA.current||(tA.current=!0,u(!0)),d(!0);let i=crypto.randomUUID(),r={id:i,role:"user",content:e,isNew:!0},a=C+1;if(P(a),t0(r),m(""),tO.current?.focus(),v(!0),mD("angelReveal",{peakVolume:.7,attackMs:120,holdMs:1400,releaseMs:1200}),t3(),a>=6&&!R){na([...h,r]),v(!1);return}try{let e=await mj("/api/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:_b([...h,r]),productFolders:tM,activeFolders:tI.current,isMobileViewport:e_,productFolderVisibility:n,productRotationRequested:t,...eE?{captchaPreview:!0}:{}})});if(!e.ok){let t=await e.json().catch(()=>null);if(400===e.status&&t?.code==="content_moderation"&&t.error){P(e=>e-1),p(e=>e.map(e=>e.id===i?{...e,excludeFromLlmContext:!0}:e)),nn(t.error,void 0,{excludeFromLlmContext:!0});return}throw Error(t?.error||"API error")}let a=await e.json(),s=a.message||"What can I help you with?";tv(!0===a.offerMoreProducts),("universe"===er||"constellation"===er)&&a.folders&&nt(a.folders,a.priorityProductTitle),nn(s)}catch(e){console.error("Chat error:",e),eS(!1),tv(!1),nn("I'm having trouble connecting. Please try again.")}finally{v(!1),tO.current?.focus()}},[f,g,h,y,C,R,na,t3,er,nt,nn,tM,e_,eE]),ny=(0,ec.useCallback)(e=>{x(t=>t===e?null:t),e_||tO.current?.focus()},[e_]),nx=(0,ec.useCallback)(()=>
1905{tH.current&&tH.current.stop(),tV.current&&(clearTimeout(tV.current),tV.current=null),em(!1)},[]),nb=(0,ec.useCallback)(async e=>{if(!e.trim())return;let t=e.trim(),n=!1;if(tL.current&&_w(t)){let e=_T(tD.current,tI.current);tv(!1),e.length>0&&(n=!0,tu(void 0),t7(void 0),tp(e),td(e=>e+1))}let i=_M(tD.current,tI.current);tA.current||(tA.current=!0,u(!0)),d(!0);let r=crypto.randomUUID(),a={id:r,role:"user",content:t,isNew:!0},s=C+1;if(P(s),t0(a),ex(""),v(!0),mD("angelReveal",{peakVolume:.7,attackMs:120,holdMs:1400,releaseMs:1200}),t3(),s>=6&&!R){na([...h,a]),v(!1);return}try{let e=await mj("/api/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({messages:_b([...h,a]),productFolders:tM,activeFolders:tI.current,isMobileViewport:e_,productFolderVisibility:i,productRotationRequested:n,...eE?{captchaPreview:!0}:{}})});if(!e.ok){let t=await e.json().catch(()=>null);if(400===e.status&&t?.code==="content_moderation"&&t.error){P(e=>e-1),p(e=>e.map(e=>e.id===r?{...e,excludeFromLlmContext:!0}:e)),nn(t.error,void 0,{excludeFromLlmContext:!0});return}throw Error(t?.error||"API error")}let t=await e.json(),s=t.message||"What can I help you with?";tv(!0===t.offerMoreProducts),("universe"===er||"constellation"===er)&&t.folders&&nt(t.folders,t.priorityProductTitle),nn(s)}catch(e){console.error("Chat error:",e),eS(!1),tv(!1),nn("I'm having trouble connecting. Please try again.")}finally{v(!1)}},[C,h,R,na,t3,er,t0,nt,nn,tM,e_,eE]),nS=(0,ec.useCallback)(()=>{let e=window.SpeechRecognition||window.webkitSpeechRecognition;if(!e)return void console.error("Speech recognition not supported");let t=new e;t.continuous=!0,t.interimResults=!0,t.lang="en-US";let n="";t.onstart=()=>{em(!0),ex(""),tV.current=setTimeout(()=>{t.stop()},4e3)},t.onresult=e=>{tV.current&&clearTimeout(tV.current),tV.current=setTimeout(()=>{t.stop()},1500);let i="";for(let t=e.resultIndex;t<e.results.length;t++){let r=e.results[t];r.isFinal?n+=r[0].transcript+" ":i+=r[0].transcript}ex(n+i)},t.onend=()=>{em(!1),tV.current&&(clearTimeout(tV.current),tV.current=null);let e=n.trim();e&&nb(e),ex("")},t.onerror=e=>{console.error("Speech recognition error:",e.error),em(!1),ex("")},tH.current=t,t.start()},[nb]),n_=(0,ec.useCallback)(()=>{ef?nx():nS()},[ef,nx,nS]),nw=!e&&(Q||g||!!y||eb),nM=c||C>0,nT=e_&&ts.length>0&&nM,nE=e_?"calc(60px + var(--safe-area-inset-bottom, 0px))":nM?"100px":"calc(40vh)",nA=e_?"calc(230px + var(--safe-area-inset-bottom, 0px))":"300px";return(0,eu.jsxs)("div",{className:`w-screen ${eC?"bg-white":"bg-black"}`,style:{height:"var(--app-height, 100vh)",transition:"background-color 500ms ease"},children:[(0,eu.jsx)("div",{className:"fixed inset-0 pointer-events-none",style:{backgroundColor:eF?"transparent":eC?"#FFFFFF":"#000000",transition:"background-color 500ms ease"},children:eF&&(0,eu.jsx)("video",{src:"/videos/nebula-bg-crf25.mp4",muted:!0,loop:!0,playsInline:!0,autoPlay:!0,className:"w-full h-full object-cover"})}),("universe"===er||"constellation"===er)&&tb&&("constellation"===er||!eF||eU)&&(0,eu.jsx)(mA,{isResponsePlaying:"constellation"===er?ty:nw,isChoirPlaying:!e&&b,activeFolders:ts,folderMap:tb,onResponseComplete:t5,onFolderSelect:ni,shopifyImages:t_,onProductClick:e=>{_x({type:"navigate-product",url:e})},priorityImageId:tl,priorityProductTitle:t9,selectionSeed:tc,productExcludeImageIds:th,onProductFolderVisibilityChange:ne,showDebugPanel:eD,onChatLineHeightChange:eW,transparentBackground:eF&&eU,hideStars:eF?!eB:void 0,hideImages:ez,backgroundImageUrl:eC||eF?void 0:"/images/backgrounds/space-nebula-blue.webp",backgroundImageOpacity:.53,backgroundImageScale:.45,backgroundImageOffsetX:.325,backgroundImageOffsetY:-.08,starMode:"constellation"===er?"constellation":"stream",showConstellationLines:es,showSummaryScreen:X,onStreamingPlatformClick:e=>{switch(e){case"spotify":nd();break;case"apple-music":nh();break;case"amazon-music":np();break;case"youtube-music":nf();break;case"tidal":nm();break;case"deezer":ng()}},onSceneError:()=>_x({type:"vof-hide"}),captchaPreview:eE,onCaptchaComplete:()=>{window.open("https://www.youtube.com/watch?v=1a3GnwIoQVg","_blank","noopener")}}),e&&(0,eu.jsx)("div",{className:"fixed inset-0 z-20 flex flex-col items-center justify-center",children:(0,eu.jsxs)("div",{className:"absolute bottom-16 sm:bottom-24 flex flex-col items-center gap-6 px-4",style:{opacity:eV?0:+!!e6,pointerEvents:eV?"none":void 0,transition:"opacity 1000ms ease-out"},children:[(0,eu.jsxs)("p",{className:"text-gradient text-left text-[15px] sm:text-lg",style:{maxWidth:"1026px",fontFamily:"var(--font-neue-haas-roman), 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:500,lineHeight:"1.6"},children:["In the beginning was the Word",(0,eu.jsx)("br",{}),"and the Word was with"," ",(0,eu.jsx)(_E,{word:_d[tn],allWords:_d,isTransitioning:tr}),(0,eu.jsx)("br",{}),"and the Word was"," ",(0,eu.jsx)(_E,{word:_d[tn],allWords:_d,isTransitioning:tr})]}),(0,eu.jsx)("button",{onClick:()=>{let e=_s();e&&"suspended"===e.state&&e.resume().catch(()=>{}),e8(!1),e7(!1),setTimeout(()=>{tt(!0),t(!1),u(!0),tA.current=!0,p([{id:"intro",role:"assistant",content:F,isTyping:!0}]),x("intro")},1200)},className:"glass-button px-8 py-3 transition-all hover:scale-105",style:{fontFamily:"var(--font-neue-haas-roman), 'Helvetica Neue', Helvetica, Arial, sans-serif",fontSize:"14px",fontWeight:"bold",color:"#FFFFFF",textShadow:"0 0 10px #FFFFFF",lineHeight:"31px"},children:"make contact"}),(0,eu.jsx)("p",{className:"text-left text-xs",style:{fontFamily:"var(--font-neue-haas-roman), 'Helvetica Neue', Helvetica, Arial, sans-serif",color:"#DADADA"}
1905,children:"*the Voices reimagine scripture as living dialogue"})]})}),n&&(0,eu.jsx)(eu.Fragment,{children:(0,eu.jsxs)("div",{className:`fixed inset-0 z-10${el?" restart-reset":""}`,style:{pointerEvents:"none"},children:[(0,eu.jsx)("div",{className:`absolute left-1/2 -translate-x-1/2 w-full max-w-[672px] ${eC?"chat-panel-light":"chat-panel"}`,style:{top:e_?"calc(15vh + var(--safe-area-inset-top, 0px))":"15vh",bottom:nA,opacity:eV?0:te&&!K&&(nM||tF>0)?+!Y:0,pointerEvents:"none",transition:Y?"opacity 1200ms ease-in-out":"opacity 600ms ease-in",zIndex:10},children:(0,eu.jsxs)("div",{ref:tE,className:`w-full h-full px-5 py-6 sm:px-7 sm:py-8 flex flex-col hide-scrollbar ${nM&&!nT?"chat-mask":""}`,style:{overflowAnchor:"none",overflowY:nM?"auto":"hidden",position:"relative",zIndex:1,pointerEvents:"none",...nT?{maskImage:"linear-gradient(to bottom, transparent 0px, transparent min(48%, 220px), black min(68%, 320px), black 100%)",WebkitMaskImage:"linear-gradient(to bottom, transparent 0px, transparent min(48%, 220px), black min(68%, 320px), black 100%)"}:void 0},children:[(0,eu.jsx)("div",{style:{height:!nM&&tF>0?`max(0px, calc(45vh - 80px - ${tF}px))`:"0px",transition:tU.current?"height 600ms cubic-bezier(0.4, 0, 0.2, 1)":"none",flexShrink:0}}),(0,eu.jsxs)("div",{className:"space-y-5",style:{pointerEvents:"none"},children:[h.map((e,t)=>{let n=e.id.startsWith("intro"),i=r&&"undefined"!=typeof navigator&&"function"==typeof navigator.share,a=r&&"undefined"!=typeof navigator&&"function"==typeof navigator.clipboard?.writeText,s=async()=>{if(i){try{await navigator.share({text:l})}catch{}return}if(a)try{await navigator.clipboard.writeText(l)}catch{}},o=t>0&&"user"===h[t-1].role?h[t-1].content:null,l=n?`Your verse for this moment is "${U.replace(/\*\*/g,"")}" — ${B}.
1906
1907https://www.voicesoffire.com`:(o?`"${o.replace(/\*\*/g,"")}"
1908`:"")+e.content.replace(/\*\*/g,"")+"\n\nhttps://www.voicesoffire.com";return(0,eu.jsx)("div",{className:`flex ${"user"===e.role?"justify-end":n?"justify-center":"justify-start"}`,style:{pointerEvents:"none",...n?{opacity:+!j,transition:`opacity ${j?280:560}ms ease-in-out`}:void 0},children:"assistant"===e.role?(0,eu.jsxs)("div",{ref:n?tB:void 0,className:"max-w-[95%] text-[15px] sm:text-lg",style:{pointerEvents:"none",userSelect:"none",WebkitUserSelect:"none",fontFamily:"var(--font-neue-haas-roman), 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:500,background:eC?"linear-gradient(90deg, #008DEC 0%, #002F4F 100%)":"linear-gradient(90deg, #B8E2FF 0%, #2468FA 100%)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",isolation:"isolate",lineHeight:String(ej),textAlign:n?"center":void 0,whiteSpace:"pre-wrap",textWrap:"pretty",minHeight:"2rem",overflow:"hidden",opacity:+!e.isNew,transform:e.isNew?"translateY(14px) scale(0.98)":"translateY(0) scale(1)",filter:e.isNew?"blur(3px)":"blur(0)",transformOrigin:"left bottom",transition:"opacity 560ms cubic-bezier(0.22, 1, 0.36, 1), transform 560ms cubic-bezier(0.22, 1, 0.36, 1), filter 560ms cubic-bezier(0.22, 1, 0.36, 1)",willChange:e.isNew?"opacity, transform, filter":void 0},children:[e.isPending?(0,eu.jsx)(_D,{}):e.isTyping&&y===e.id?(0,eu.jsx)(_I,{text:e.content,skipDots:!0,forceWhiteBold:n&&V,onComplete:()=>ny(e.id),onReveal:()=>{tE.current&&_y(tE.current)}}):n&&B?(()=>{let t=`${B}.**`,n=e.content.indexOf(t);if(-1===n)return _R(e.content,V);let r=e.content.slice(0,n+t.length),o=e.content.slice(n+t.length);return(0,eu.jsxs)(eu.Fragment,{children:[_R(r,V),(i||a)&&(0,eu.jsx)("button",{onClick:s,style:{pointerEvents:"auto",display:"inline-flex",alignItems:"center",verticalAlign:"middle",marginLeft:6,padding:2,background:"none",border:"none",cursor:"pointer",WebkitTextFillColor:"initial",opacity:.45,transition:"opacity 200ms ease"},onMouseEnter:e=>{e.currentTarget.style.opacity="0.8"},onMouseLeave:e=>{e.currentTarget.style.opacity="0.45"},children:i?(0,eu.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:eC?"#333":"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{display:"block"},children:[(0,eu.jsx)("path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"}),(0,eu.jsx)("polyline",{points:"16 6 12 2 8 6"}),(0,eu.jsx)("line",{x1:"12",y1:"2",x2:"12",y2:"15"})]}):(0,eu.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:eC?"#333":"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{display:"block"},children:[(0,eu.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,eu.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}),_R(o,V)]})})():_R(e.content,n&&V),!n&&!e.isPending&&!(e.isTyping&&y===e.id)&&e.content&&(i||a)&&(0,eu.jsx)("button",{onClick:s,style:{pointerEvents:"auto",display:"inline-flex",alignItems:"center",verticalAlign:"middle",marginLeft:6,padding:2,background:"none",border:"none",cursor:"pointer",WebkitTextFillColor:"initial",opacity:.45,transition:"opacity 200ms ease"},onMouseEnter:e=>{e.currentTarget.style.opacity="0.8"},onMouseLeave:e=>{e.currentTarget.style.opacity="0.45"},children:i?(0,eu.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:eC?"#333":"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{display:"block"},children:[(0,eu.jsx)("path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"}),(0,eu.jsx)("polyline",{points:"16 6 12 2 8 6"}),(0,eu.jsx)("line",{x1:"12",y1:"2",x2:"12",y2:"15"})]}):(0,eu.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:eC?"#333":"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{display:"block"},children:[(0,eu.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,eu.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})})]}):(0,eu.jsx)("div",{className:`${eC?"glass-bubble-light":"glass-bubble"} max-w-[80%] px-5 py-3`,style:{pointerEvents:"none",userSelect:"none",WebkitUserSelect:"none",fontFamily:"var(--font-neue-haas-roman), 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:500,fontSize:14,color:eC?"#1A1A1A":"#DFDFDF",lineHeight:String(ej),textAlign:"right",opacity:+!e.isNew,transform:e.isNew?"translateY(10px)":"translateY(0)",transition:"opacity 400ms ease-out, transform 400ms ease-out"},children:e.content})},`${e.id}-${eC?"light":"dark"}`)}),g&&!h.some(e=>e.isPending||e.isTyping&&y===e.id)&&(0,eu.jsx)("div",{className:"flex justify-start",children:(0,eu.jsx)("div",{className:"max-w-[95%] px-1 py-2 text-[15px] sm:text-lg",style:{fontFamily:"var(--font-neue-haas-roman), 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:500,color:"#7EB8F0",minHeight:"2rem"},children:(0,eu.jsx)(_D,{})})})]})]})}),(0,eu.jsxs)("div",{className:"absolute left-1/2 w-full px-4 sm:px-0",style:{maxWidth:612,paddingLeft:e_?"calc(1rem + var(--safe-area-inset-left, 0px))":void 0,paddingRight:e_?"calc(1rem + var(--safe-area-inset-right, 0px))":void 0,bottom:nE,transform:e_||nM?"translateX(-50%)":"translate(-50%, 50%)",opacity:eV?0:te&&!K?+!Y:0,pointerEvents:eV||!te||Y||K?"none":"auto",transition:Y?"opacity 1200ms ease-in-out":`opacity 1000ms ease-in, bottom ${e_?"0ms linear":"600ms cubic-bezier(0.4, 0, 0.2, 1)"}, transform 600ms cubic-bezier(0.4, 0, 0.2, 1)`,zIndex:20},children:[(0,eu.jsxs)("div",{className:"flex justify-center",style:{opacity:+!!nM,pointerEvents:nM?"auto":"none",transition:"opacity 400ms ease-out",gap:e_?"8px":"12px",marginBottom:e_?"14px":"16px"},children:[(0,eu.jsxs)("div",{onClick:()=>ep("read"),role:"button",className:"glass-pill",style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",padding:e_?"0":"11px 14px",gap:"7px",width:e_?"39px":"85px",height:"39px",cursor:"pointer",background:eC?"rgba(223, 223, 223, 0.2)":"rgba(12, 16, 24, 0.22)",backdropFilter:"blur(3px) saturate(110%)",WebkitBackdropFilter:"blur(3px) saturate(110%)"},children:[(0,eu.jsx)("img",{src:"/icons/read.svg",alt:"",width:18,height:17,style:{filter:eC?"invert(1)":"none",opacity:"read"===eh?1:.45,transition:"opacity 300ms ease"}}),!e_&&(0,eu.jsx)("span",{style:{fontFamily:"var(--font-neue-haas-roman), 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:400,fontSize:"13.5px",lineHeight:"11px",color:eC?"#1A1A1A":"#FFFFFF",opacity:"read"===eh?1:.45,transition:"opacity 300ms ease"},children:"Read"})]}),(0,eu.jsxs)("div",{onClick:()=>ep("listen"),role:"button",className:"glass-pill",style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",padding:e_?"0":"9px 13px",gap:"7px",width:e_?"39px":"85px",height:"39px",cursor:"pointer",background:eC?"rgba(223, 223, 223, 0.2)":"rgba(12, 16, 24, 0.22)",backdropFilter:"blur(3px) saturate(110%)",WebkitBackdropFilter:"blur(3px) saturate(110%)"},children:[(0,eu.jsx)("img",{src:"/icons/listen.svg",alt:"",width:13,height:20,style:{filter:eC?"invert(1)":"none",opacity:"listen"===eh?1:.45,transition:"opacity 300ms ease"}}),!e_&&(0,eu.jsx)("span",{style:{fontFamily:"var(--font-neue-haas-roman), 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:400,fontSize:"13.5px",lineHeight:"11px",color:eC?"#1A1A1A":"#FFFFFF",opacity:"listen"===eh?1:.45,transition:"opacity 300ms ease"},children:"Listen"})]})]}),(0,eu.jsxs)("div",{className:`${eC?"glass-input-light":"glass-input"} relative`,style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",padding:"0 15px",height:39,overflow:"hidden",isolation:"isolate",background:eC?"rgba(223, 223, 223, 0.2)":"rgba(12, 16, 24, 0.22)",backdropFilter:"blur(3px) saturate(110%)",WebkitBackdropFilter:"blur(3px) saturate(110%)"},children:[(0,eu.jsx)("input",{ref:tO,type:"text",value:ef?ey:f,onChange:e=>!ef&&m(e.target.value),onFocus:t1,onKeyDown:e=>{"Enter"!==e.key||ef||(e.preventDefault(),nv())},placeholder:"Make contact...",disabled:g||ef,className:"flex-1 bg-transparent outline-none chat-input",style:{fontFamily:"var(--font-neue-haas-roman), 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:500,fontSize:e_?16:14,lineHeight:e_?"19px":"17px",color:ef?"#99BCED":eC?"#333333":"#FFFFFF"}}),(0,eu.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:13,flexShrink:0},children:[eg&&(0,eu.jsx)("button",{onClick:n_,disabled:g,className:"transition-all","aria-label":ef?"Stop recording":"Start recording",style:{display:"flex",alignItems:"center",gap:3,padding:0,background:"none",border:"none",cursor:"pointer"},children:[6,14,22,11,16,6].map((e,t)=>(0,eu.jsx)("div",{style:{width:2,height:e,background:ef?"#FF3B30":g?eC?"rgba(0,0,0,0.3)":"rgba(249,249,249,0.4)":eC?"#000000":"#F9F9F9",borderRadius:100,transition:"background 200ms ease"}},t))}),(0,eu.jsx)("button",{onClick:nv,disabled:g||!f.trim()&&!ef||!!y,className:"transition-all","aria-label":"Send message",style:{width:28,height:28,background:eC?"#1A1A1A":"#F9F9F9",borderRadius:17,display:"flex",alignItems:"center",justifyContent:"center",border:"none",cursor:"pointer",padding:0,opacity:!f.trim()||g||y?.4:1,transition:"opacity 200ms ease"},children:(0,eu.jsxs)("svg",{width:"10",height:"13",viewBox:"0 0 10 13",fill:"none",children:[(0,eu.jsx)("path",{d:"M5 12L5 1",stroke:eC?"#FFFFFF":"#000000",strokeWidth:"2",strokeLinecap:"round"}),(0,eu.jsx)("path",{d:"M1 5L5 1L9 5",stroke:eC?"#FFFFFF":"#000000",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})]}),(0,eu.jsx)("p",{className:"text-center mt-3",style:{color:eC?"#1A1A1A":"#DADADA",fontFamily:"var(--font-neue-haas-roman), 'Helvetica Neue', Helvetica, Arial, sans-serif",fontSize:"11px"},children:"'Ask The Voices' can make mistakes. This is an ephemeral experience. Each session starts fresh."})]}),K&&(0,eu.jsx)("div",{className:"absolute inset-0 flex flex-col items-center justify-center px-8",style:{opacity:eV?0:+!!X,pointerEvents:"none",transition:"opacity 1500ms ease-in-out",zIndex:40},children:(0,eu.jsxs)("div",{className:"max-w-2xl w-full text-center space-y-6 sm:space-y-10",style:{pointerEvents:"none"},children:[K.song&&(0,eu.jsxs)("div",{className:"space-y-6 sm:space-y-10",children:[(0,eu.jsx)("p",{className:"text-[15px] sm:text-lg",style:{fontFamily:"var(--font-neue-haas-roman), 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:500,lineHeight:"1.6",background:eC?"linear-gradient(90deg, #008DEC 0%, #002F4F 100%)":"linear-gradient(135deg, #76B5E4 0%, #0542B3 100%)",WebkitBackgroun
1908dClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",textAlign:"center",textWrap:"pretty"},children:_P(K.songReason??"")}),(0,eu.jsx)("div",{className:"flex flex-col items-center",children:(0,eu.jsx)("img",{src:K.songId?`/images/singles/${K.songId}.webp`:"/images/album-cover.webp",alt:nc??K.song??"Album cover",style:{width:"clamp(220px, 50vw, 315px)",height:"clamp(220px, 50vw, 315px)",objectFit:"cover",boxShadow:"none"},onError:e=>{e.currentTarget.src="/images/album-cover.webp"}})})]}),(0,eu.jsx)("div",{className:"flex justify-center gap-4 sm:gap-6",style:{pointerEvents:"auto",paddingBottom:"clamp(16px, 3vh, 36px)"},children:[{id:"amazon-music",src:"/icons/theone_amazonmusic.webp",alt:"Amazon Music"},{id:"youtube-music",src:"/icons/theone_youtube.webp",alt:"YouTube Music"},{id:"spotify",src:"/icons/spotify-icon.webp",alt:"Spotify"},{id:"apple-music",src:"/icons/theone_applemusic.webp",alt:"Apple Music"},{id:"tidal",src:"/icons/theone_tidal.webp",alt:"Tidal"},{id:"deezer",src:"/icons/theone_deezer.webp",alt:"Deezer"}].map(e=>(0,eu.jsx)("img",{src:e.src,alt:e.alt,onClick:()=>{switch(e.id){case"spotify":nd();break;case"apple-music":nh();break;case"amazon-music":np();break;case"youtube-music":nf();break;case"tidal":nm();break;case"deezer":ng()}},style:{width:"clamp(24px, 7vw, 34px)",height:"clamp(24px, 7vw, 34px)",objectFit:"contain",cursor:"pointer",transition:"transform 200ms ease, filter 200ms ease"},onMouseEnter:e=>{e.currentTarget.style.transform="scale(1.15)",e.currentTarget.style.filter="brightness(1.2)"},onMouseLeave:e=>{e.currentTarget.style.transform="scale(1)",e.currentTarget.style.filter="brightness(1)"}},e.id))}),(0,eu.jsx)("div",{className:"flex flex-col items-center sm:flex-row justify-center gap-3 sm:gap-4",style:{pointerEvents:"auto"},children:(0,eu.jsx)("button",{onClick:()=>{if(t$.current&&(t$.current.abort(),t$.current=null),tH.current){let e=tH.current;e.onend=null,e.onresult=null,e.onerror=null,tH.current=null;try{e.stop()}catch{}}tV.current&&(clearTimeout(tV.current),tV.current=null),tK.current&&(clearTimeout(tK.current),tK.current=null),tJ.current=null,tQ.current=null,tC.current=!1,tq.current=!1,v(!1),em(!1),ex(""),eS(!1),Z(!1),q(!1),setTimeout(()=>{u(!1),tA.current=!1,p([]),m(""),x(null),S(!1),P(0),d(!1),I(!1),L(!1),Z(!1),J(null),tv(!1),tp([]),setTimeout(()=>{tt(!0),u(!0),tA.current=!0,p([{id:"intro-"+Date.now(),role:"assistant",content:F,isTyping:!1}]),x(null),e_||setTimeout(()=>{tO.current?.focus()},800)},100)},1e3)},className:"glass-pill px-8 transition-all duration-300 hover:scale-105 hover:brightness-125",style:{fontFamily:"var(--font-neue-haas-roman), 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:500,fontSize:14,lineHeight:"17px",color:eC?"#1A1A1A":"#FFFFFF",height:39,display:"flex",alignItems:"center",justifyContent:"center",border:"none",cursor:"pointer",background:eC?"rgba(223, 223, 223, 0.2)":"rgba(12, 16, 24, 0.22)",backdropFilter:"blur(3px) saturate(110%)",WebkitBackdropFilter:"blur(3px) saturate(110%)"},children:"talk more"})})]})})]})}),!1,!1,_l&&(0,eu.jsx)(_i,{}),(0,eu.jsx)(mZ,{songId:K?.songId,enabled:Y||X,isTTSPlaying:eb})]})}e.s(["default",()=>_F],52683)}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.