From 8d6efee92a429c870c6061686fc083c178376760 Mon Sep 17 00:00:00 2001 From: Satyam Mishra Date: Mon, 25 Dec 2023 13:33:05 +0530 Subject: [PATCH] Updates --- assets/index-20a85412.js | 3574 ------------------------------------- assets/index-533276be.css | 1 + assets/index-6e922349.css | 1 - assets/index-97471f9a.js | 3568 ++++++++++++++++++++++++++++++++++++ index.html | 4 +- 5 files changed, 3571 insertions(+), 3577 deletions(-) delete mode 100644 assets/index-20a85412.js create mode 100644 assets/index-533276be.css delete mode 100644 assets/index-6e922349.css create mode 100644 assets/index-97471f9a.js diff --git a/assets/index-20a85412.js b/assets/index-20a85412.js deleted file mode 100644 index 23f4a3b..0000000 --- a/assets/index-20a85412.js +++ /dev/null @@ -1,3574 +0,0 @@ -function rk(n,e){for(var t=0;ti[r]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=t(r);fetch(r.href,s)}})();function gg(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function sk(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(i){var r=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(t,i,r.get?r:{enumerable:!0,get:function(){return n[i]}})}),t}var RC={exports:{}},vg={},IC={exports:{}},Pt={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var _d=Symbol.for("react.element"),ok=Symbol.for("react.portal"),ak=Symbol.for("react.fragment"),lk=Symbol.for("react.strict_mode"),ck=Symbol.for("react.profiler"),uk=Symbol.for("react.provider"),fk=Symbol.for("react.context"),dk=Symbol.for("react.forward_ref"),hk=Symbol.for("react.suspense"),pk=Symbol.for("react.memo"),mk=Symbol.for("react.lazy"),eA=Symbol.iterator;function gk(n){return n===null||typeof n!="object"?null:(n=eA&&n[eA]||n["@@iterator"],typeof n=="function"?n:null)}var DC={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},kC=Object.assign,NC={};function eu(n,e,t){this.props=n,this.context=e,this.refs=NC,this.updater=t||DC}eu.prototype.isReactComponent={};eu.prototype.setState=function(n,e){if(typeof n!="object"&&typeof n!="function"&&n!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,n,e,"setState")};eu.prototype.forceUpdate=function(n){this.updater.enqueueForceUpdate(this,n,"forceUpdate")};function OC(){}OC.prototype=eu.prototype;function t1(n,e,t){this.props=n,this.context=e,this.refs=NC,this.updater=t||DC}var n1=t1.prototype=new OC;n1.constructor=t1;kC(n1,eu.prototype);n1.isPureReactComponent=!0;var tA=Array.isArray,UC=Object.prototype.hasOwnProperty,i1={current:null},zC={key:!0,ref:!0,__self:!0,__source:!0};function FC(n,e,t){var i,r={},s=null,o=null;if(e!=null)for(i in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)UC.call(e,i)&&!zC.hasOwnProperty(i)&&(r[i]=e[i]);var a=arguments.length-2;if(a===1)r.children=t;else if(1>>1,ee=D[re];if(0>>1;rer(be,V))ger(Q,be)?(D[re]=Q,D[ge]=V,re=ge):(D[re]=be,D[ce]=V,re=ce);else if(ger(Q,V))D[re]=Q,D[ge]=V,re=ge;else break e}}return B}function r(D,B){var V=D.sortIndex-B.sortIndex;return V!==0?V:D.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();n.unstable_now=function(){return o.now()-a}}var l=[],f=[],d=1,h=null,p=3,g=!1,y=!1,x=!1,w=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(D){for(var B=t(f);B!==null;){if(B.callback===null)i(f);else if(B.startTime<=D)i(f),B.sortIndex=B.expirationTime,e(l,B);else break;B=t(f)}}function A(D){if(x=!1,S(D),!y)if(t(l)!==null)y=!0,te(E);else{var B=t(f);B!==null&&ne(A,B.startTime-D)}}function E(D,B){y=!1,x&&(x=!1,m(L),L=-1),g=!0;var V=p;try{for(S(B),h=t(l);h!==null&&(!(h.expirationTime>B)||D&&!W());){var re=h.callback;if(typeof re=="function"){h.callback=null,p=h.priorityLevel;var ee=re(h.expirationTime<=B);B=n.unstable_now(),typeof ee=="function"?h.callback=ee:h===t(l)&&i(l),S(B)}else i(l);h=t(l)}if(h!==null)var ie=!0;else{var ce=t(f);ce!==null&&ne(A,ce.startTime-B),ie=!1}return ie}finally{h=null,p=V,g=!1}}var P=!1,I=null,L=-1,C=5,R=-1;function W(){return!(n.unstable_now()-RD||125re?(D.sortIndex=V,e(f,D),t(l)===null&&D===t(f)&&(x?(m(L),L=-1):x=!0,ne(A,V-re))):(D.sortIndex=ee,e(l,D),y||g||(y=!0,te(E))),D},n.unstable_shouldYield=W,n.unstable_wrapCallback=function(D){var B=p;return function(){var V=p;p=B;try{return D.apply(this,arguments)}finally{p=V}}}})(WC);HC.exports=WC;var Tk=HC.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var GC=N,er=Tk;function Re(n){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+n,t=1;t"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yy=Object.prototype.hasOwnProperty,Ck=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,iA={},rA={};function Pk(n){return Yy.call(rA,n)?!0:Yy.call(iA,n)?!1:Ck.test(n)?rA[n]=!0:(iA[n]=!0,!1)}function Lk(n,e,t,i){if(t!==null&&t.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return i?!1:t!==null?!t.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function Rk(n,e,t,i){if(e===null||typeof e>"u"||Lk(n,e,t,i))return!0;if(i)return!1;if(t!==null)switch(t.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Ai(n,e,t,i,r,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=t,this.propertyName=n,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var Kn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){Kn[n]=new Ai(n,0,!1,n,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var e=n[0];Kn[e]=new Ai(e,1,!1,n[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(n){Kn[n]=new Ai(n,2,!1,n.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){Kn[n]=new Ai(n,2,!1,n,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(n){Kn[n]=new Ai(n,3,!1,n.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(n){Kn[n]=new Ai(n,3,!0,n,null,!1,!1)});["capture","download"].forEach(function(n){Kn[n]=new Ai(n,4,!1,n,null,!1,!1)});["cols","rows","size","span"].forEach(function(n){Kn[n]=new Ai(n,6,!1,n,null,!1,!1)});["rowSpan","start"].forEach(function(n){Kn[n]=new Ai(n,5,!1,n.toLowerCase(),null,!1,!1)});var s1=/[\-:]([a-z])/g;function o1(n){return n[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(n){var e=n.replace(s1,o1);Kn[e]=new Ai(e,1,!1,n,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var e=n.replace(s1,o1);Kn[e]=new Ai(e,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(n){var e=n.replace(s1,o1);Kn[e]=new Ai(e,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(n){Kn[n]=new Ai(n,1,!1,n.toLowerCase(),null,!1,!1)});Kn.xlinkHref=new Ai("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(n){Kn[n]=new Ai(n,1,!1,n.toLowerCase(),null,!0,!0)});function a1(n,e,t,i){var r=Kn.hasOwnProperty(e)?Kn[e]:null;(r!==null?r.type!==0:i||!(2a||r[o]!==s[a]){var l=` -`+r[o].replace(" at new "," at ");return n.displayName&&l.includes("")&&(l=l.replace("",n.displayName)),l}while(1<=o&&0<=a);break}}}finally{vv=!1,Error.prepareStackTrace=t}return(n=n?n.displayName||n.name:"")?of(n):""}function Ik(n){switch(n.tag){case 5:return of(n.type);case 16:return of("Lazy");case 13:return of("Suspense");case 19:return of("SuspenseList");case 0:case 2:case 15:return n=yv(n.type,!1),n;case 11:return n=yv(n.type.render,!1),n;case 1:return n=yv(n.type,!0),n;default:return""}}function Jy(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case ac:return"Fragment";case oc:return"Portal";case qy:return"Profiler";case l1:return"StrictMode";case Zy:return"Suspense";case $y:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case YC:return(n.displayName||"Context")+".Consumer";case XC:return(n._context.displayName||"Context")+".Provider";case c1:var e=n.render;return n=n.displayName,n||(n=e.displayName||e.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case u1:return e=n.displayName||null,e!==null?e:Jy(n.type)||"Memo";case wo:e=n._payload,n=n._init;try{return Jy(n(e))}catch{}}return null}function Dk(n){var e=n.type;switch(n.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=e.render,n=n.displayName||n.name||"",e.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Jy(e);case 8:return e===l1?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function jo(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function ZC(n){var e=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function kk(n){var e=ZC(n)?"checked":"value",t=Object.getOwnPropertyDescriptor(n.constructor.prototype,e),i=""+n[e];if(!n.hasOwnProperty(e)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var r=t.get,s=t.set;return Object.defineProperty(n,e,{configurable:!0,get:function(){return r.call(this)},set:function(o){i=""+o,s.call(this,o)}}),Object.defineProperty(n,e,{enumerable:t.enumerable}),{getValue:function(){return i},setValue:function(o){i=""+o},stopTracking:function(){n._valueTracker=null,delete n[e]}}}}function $h(n){n._valueTracker||(n._valueTracker=kk(n))}function $C(n){if(!n)return!1;var e=n._valueTracker;if(!e)return!0;var t=e.getValue(),i="";return n&&(i=ZC(n)?n.checked?"true":"false":n.value),n=i,n!==t?(e.setValue(n),!0):!1}function Tm(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function Ky(n,e){var t=e.checked;return un({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??n._wrapperState.initialChecked})}function oA(n,e){var t=e.defaultValue==null?"":e.defaultValue,i=e.checked!=null?e.checked:e.defaultChecked;t=jo(e.value!=null?e.value:t),n._wrapperState={initialChecked:i,initialValue:t,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function JC(n,e){e=e.checked,e!=null&&a1(n,"checked",e,!1)}function Qy(n,e){JC(n,e);var t=jo(e.value),i=e.type;if(t!=null)i==="number"?(t===0&&n.value===""||n.value!=t)&&(n.value=""+t):n.value!==""+t&&(n.value=""+t);else if(i==="submit"||i==="reset"){n.removeAttribute("value");return}e.hasOwnProperty("value")?ex(n,e.type,t):e.hasOwnProperty("defaultValue")&&ex(n,e.type,jo(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(n.defaultChecked=!!e.defaultChecked)}function aA(n,e,t){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var i=e.type;if(!(i!=="submit"&&i!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+n._wrapperState.initialValue,t||e===n.value||(n.value=e),n.defaultValue=e}t=n.name,t!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,t!==""&&(n.name=t)}function ex(n,e,t){(e!=="number"||Tm(n.ownerDocument)!==n)&&(t==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+t&&(n.defaultValue=""+t))}var af=Array.isArray;function Cc(n,e,t,i){if(n=n.options,e){e={};for(var r=0;r"+e.valueOf().toString()+"",e=Jh.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;e.firstChild;)n.appendChild(e.firstChild)}});function Df(n,e){if(e){var t=n.firstChild;if(t&&t===n.lastChild&&t.nodeType===3){t.nodeValue=e;return}}n.textContent=e}var hf={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Nk=["Webkit","ms","Moz","O"];Object.keys(hf).forEach(function(n){Nk.forEach(function(e){e=e+n.charAt(0).toUpperCase()+n.substring(1),hf[e]=hf[n]})});function t2(n,e,t){return e==null||typeof e=="boolean"||e===""?"":t||typeof e!="number"||e===0||hf.hasOwnProperty(n)&&hf[n]?(""+e).trim():e+"px"}function n2(n,e){n=n.style;for(var t in e)if(e.hasOwnProperty(t)){var i=t.indexOf("--")===0,r=t2(t,e[t],i);t==="float"&&(t="cssFloat"),i?n.setProperty(t,r):n[t]=r}}var Ok=un({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ix(n,e){if(e){if(Ok[n]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Re(137,n));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Re(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Re(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Re(62))}}function rx(n,e){if(n.indexOf("-")===-1)return typeof e.is=="string";switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var sx=null;function f1(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var ox=null,Pc=null,Lc=null;function uA(n){if(n=Md(n)){if(typeof ox!="function")throw Error(Re(280));var e=n.stateNode;e&&(e=Sg(e),ox(n.stateNode,n.type,e))}}function i2(n){Pc?Lc?Lc.push(n):Lc=[n]:Pc=n}function r2(){if(Pc){var n=Pc,e=Lc;if(Lc=Pc=null,uA(n),e)for(n=0;n>>=0,n===0?32:31-(Yk(n)/qk|0)|0}var Kh=64,Qh=4194304;function lf(n){switch(n&-n){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: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 n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function Rm(n,e){var t=n.pendingLanes;if(t===0)return 0;var i=0,r=n.suspendedLanes,s=n.pingedLanes,o=t&268435455;if(o!==0){var a=o&~r;a!==0?i=lf(a):(s&=o,s!==0&&(i=lf(s)))}else o=t&~r,o!==0?i=lf(o):s!==0&&(i=lf(s));if(i===0)return 0;if(e!==0&&e!==i&&!(e&r)&&(r=i&-i,s=e&-e,r>=s||r===16&&(s&4194240)!==0))return e;if(i&4&&(i|=t&16),e=n.entangledLanes,e!==0)for(n=n.entanglements,e&=i;0t;t++)e.push(n);return e}function wd(n,e,t){n.pendingLanes|=e,e!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,e=31-Br(e),n[e]=t}function Kk(n,e){var t=n.pendingLanes&~e;n.pendingLanes=e,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=e,n.mutableReadLanes&=e,n.entangledLanes&=e,e=n.entanglements;var i=n.eventTimes;for(n=n.expirationTimes;0=mf),xA=String.fromCharCode(32),_A=!1;function A2(n,e){switch(n){case"keyup":return EN.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function b2(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var lc=!1;function CN(n,e){switch(n){case"compositionend":return b2(e);case"keypress":return e.which!==32?null:(_A=!0,xA);case"textInput":return n=e.data,n===xA&&_A?null:n;default:return null}}function PN(n,e){if(lc)return n==="compositionend"||!x1&&A2(n,e)?(n=S2(),cm=g1=To=null,lc=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:t,offset:e-n};n=i}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=AA(t)}}function P2(n,e){return n&&e?n===e?!0:n&&n.nodeType===3?!1:e&&e.nodeType===3?P2(n,e.parentNode):"contains"in n?n.contains(e):n.compareDocumentPosition?!!(n.compareDocumentPosition(e)&16):!1:!1}function L2(){for(var n=window,e=Tm();e instanceof n.HTMLIFrameElement;){try{var t=typeof e.contentWindow.location.href=="string"}catch{t=!1}if(t)n=e.contentWindow;else break;e=Tm(n.document)}return e}function _1(n){var e=n&&n.nodeName&&n.nodeName.toLowerCase();return e&&(e==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||e==="textarea"||n.contentEditable==="true")}function zN(n){var e=L2(),t=n.focusedElem,i=n.selectionRange;if(e!==t&&t&&t.ownerDocument&&P2(t.ownerDocument.documentElement,t)){if(i!==null&&_1(t)){if(e=i.start,n=i.end,n===void 0&&(n=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(n,t.value.length);else if(n=(e=t.ownerDocument||document)&&e.defaultView||window,n.getSelection){n=n.getSelection();var r=t.textContent.length,s=Math.min(i.start,r);i=i.end===void 0?s:Math.min(i.end,r),!n.extend&&s>i&&(r=i,i=s,s=r),r=bA(t,s);var o=bA(t,i);r&&o&&(n.rangeCount!==1||n.anchorNode!==r.node||n.anchorOffset!==r.offset||n.focusNode!==o.node||n.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(r.node,r.offset),n.removeAllRanges(),s>i?(n.addRange(e),n.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),n.addRange(e)))}}for(e=[],n=t;n=n.parentNode;)n.nodeType===1&&e.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,cc=null,dx=null,vf=null,hx=!1;function EA(n,e,t){var i=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;hx||cc==null||cc!==Tm(i)||(i=cc,"selectionStart"in i&&_1(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),vf&&Ff(vf,i)||(vf=i,i=km(dx,"onSelect"),0dc||(n.current=xx[dc],xx[dc]=null,dc--)}function Zt(n,e){dc++,xx[dc]=n.current,n.current=e}var Xo={},di=na(Xo),Ni=na(!1),Qa=Xo;function Fc(n,e){var t=n.type.contextTypes;if(!t)return Xo;var i=n.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===e)return i.__reactInternalMemoizedMaskedChildContext;var r={},s;for(s in t)r[s]=e[s];return i&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=e,n.__reactInternalMemoizedMaskedChildContext=r),r}function Oi(n){return n=n.childContextTypes,n!=null}function Om(){Kt(Ni),Kt(di)}function DA(n,e,t){if(di.current!==Xo)throw Error(Re(168));Zt(di,e),Zt(Ni,t)}function F2(n,e,t){var i=n.stateNode;if(e=e.childContextTypes,typeof i.getChildContext!="function")return t;i=i.getChildContext();for(var r in i)if(!(r in e))throw Error(Re(108,Dk(n)||"Unknown",r));return un({},t,i)}function Um(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||Xo,Qa=di.current,Zt(di,n),Zt(Ni,Ni.current),!0}function kA(n,e,t){var i=n.stateNode;if(!i)throw Error(Re(169));t?(n=F2(n,e,Qa),i.__reactInternalMemoizedMergedChildContext=n,Kt(Ni),Kt(di),Zt(di,n)):Kt(Ni),Zt(Ni,t)}var Is=null,Mg=!1,Iv=!1;function B2(n){Is===null?Is=[n]:Is.push(n)}function $N(n){Mg=!0,B2(n)}function ia(){if(!Iv&&Is!==null){Iv=!0;var n=0,e=Vt;try{var t=Is;for(Vt=1;n>=o,r-=o,Ns=1<<32-Br(e)+r|t<L?(C=I,I=null):C=I.sibling;var R=p(m,I,S[L],A);if(R===null){I===null&&(I=C);break}n&&I&&R.alternate===null&&e(m,I),_=s(R,_,L),P===null?E=R:P.sibling=R,P=R,I=C}if(L===S.length)return t(m,I),tn&&Ca(m,L),E;if(I===null){for(;LL?(C=I,I=null):C=I.sibling;var W=p(m,I,R.value,A);if(W===null){I===null&&(I=C);break}n&&I&&W.alternate===null&&e(m,I),_=s(W,_,L),P===null?E=W:P.sibling=W,P=W,I=C}if(R.done)return t(m,I),tn&&Ca(m,L),E;if(I===null){for(;!R.done;L++,R=S.next())R=h(m,R.value,A),R!==null&&(_=s(R,_,L),P===null?E=R:P.sibling=R,P=R);return tn&&Ca(m,L),E}for(I=i(m,I);!R.done;L++,R=S.next())R=g(I,m,L,R.value,A),R!==null&&(n&&R.alternate!==null&&I.delete(R.key===null?L:R.key),_=s(R,_,L),P===null?E=R:P.sibling=R,P=R);return n&&I.forEach(function(Z){return e(m,Z)}),tn&&Ca(m,L),E}function w(m,_,S,A){if(typeof S=="object"&&S!==null&&S.type===ac&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case Zh:e:{for(var E=S.key,P=_;P!==null;){if(P.key===E){if(E=S.type,E===ac){if(P.tag===7){t(m,P.sibling),_=r(P,S.props.children),_.return=m,m=_;break e}}else if(P.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===wo&&VA(E)===P.type){t(m,P.sibling),_=r(P,S.props),_.ref=Fu(m,P,S),_.return=m,m=_;break e}t(m,P);break}else e(m,P);P=P.sibling}S.type===ac?(_=Xa(S.props.children,m.mode,A,S.key),_.return=m,m=_):(A=vm(S.type,S.key,S.props,null,m.mode,A),A.ref=Fu(m,_,S),A.return=m,m=A)}return o(m);case oc:e:{for(P=S.key;_!==null;){if(_.key===P)if(_.tag===4&&_.stateNode.containerInfo===S.containerInfo&&_.stateNode.implementation===S.implementation){t(m,_.sibling),_=r(_,S.children||[]),_.return=m,m=_;break e}else{t(m,_);break}else e(m,_);_=_.sibling}_=Bv(S,m.mode,A),_.return=m,m=_}return o(m);case wo:return P=S._init,w(m,_,P(S._payload),A)}if(af(S))return y(m,_,S,A);if(ku(S))return x(m,_,S,A);op(m,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,_!==null&&_.tag===6?(t(m,_.sibling),_=r(_,S),_.return=m,m=_):(t(m,_),_=Fv(S,m.mode,A),_.return=m,m=_),o(m)):t(m,_)}return w}var Vc=q2(!0),Z2=q2(!1),Ad={},as=na(Ad),Wf=na(Ad),Gf=na(Ad);function Fa(n){if(n===Ad)throw Error(Re(174));return n}function P1(n,e){switch(Zt(Gf,e),Zt(Wf,n),Zt(as,Ad),n=e.nodeType,n){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:nx(null,"");break;default:n=n===8?e.parentNode:e,e=n.namespaceURI||null,n=n.tagName,e=nx(e,n)}Kt(as),Zt(as,e)}function Hc(){Kt(as),Kt(Wf),Kt(Gf)}function $2(n){Fa(Gf.current);var e=Fa(as.current),t=nx(e,n.type);e!==t&&(Zt(Wf,n),Zt(as,t))}function L1(n){Wf.current===n&&(Kt(as),Kt(Wf))}var sn=na(0);function Wm(n){for(var e=n;e!==null;){if(e.tag===13){var t=e.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||t.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break;for(;e.sibling===null;){if(e.return===null||e.return===n)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Dv=[];function R1(){for(var n=0;nt?t:4,n(!0);var i=kv.transition;kv.transition={};try{n(!1),e()}finally{Vt=t,kv.transition=i}}function dP(){return Sr().memoizedState}function eO(n,e,t){var i=zo(n);if(t={lane:i,action:t,hasEagerState:!1,eagerState:null,next:null},hP(n))pP(e,t);else if(t=G2(n,e,t,i),t!==null){var r=wi();Vr(t,n,i,r),mP(t,e,i)}}function tO(n,e,t){var i=zo(n),r={lane:i,action:t,hasEagerState:!1,eagerState:null,next:null};if(hP(n))pP(e,r);else{var s=n.alternate;if(n.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,t);if(r.hasEagerState=!0,r.eagerState=a,Wr(a,o)){var l=e.interleaved;l===null?(r.next=r,T1(e)):(r.next=l.next,l.next=r),e.interleaved=r;return}}catch{}finally{}t=G2(n,e,r,i),t!==null&&(r=wi(),Vr(t,n,i,r),mP(t,e,i))}}function hP(n){var e=n.alternate;return n===cn||e!==null&&e===cn}function pP(n,e){yf=Gm=!0;var t=n.pending;t===null?e.next=e:(e.next=t.next,t.next=e),n.pending=e}function mP(n,e,t){if(t&4194240){var i=e.lanes;i&=n.pendingLanes,t|=i,e.lanes=t,h1(n,t)}}var jm={readContext:wr,useCallback:si,useContext:si,useEffect:si,useImperativeHandle:si,useInsertionEffect:si,useLayoutEffect:si,useMemo:si,useReducer:si,useRef:si,useState:si,useDebugValue:si,useDeferredValue:si,useTransition:si,useMutableSource:si,useSyncExternalStore:si,useId:si,unstable_isNewReconciler:!1},nO={readContext:wr,useCallback:function(n,e){return is().memoizedState=[n,e===void 0?null:e],n},useContext:wr,useEffect:WA,useImperativeHandle:function(n,e,t){return t=t!=null?t.concat([n]):null,hm(4194308,4,aP.bind(null,e,n),t)},useLayoutEffect:function(n,e){return hm(4194308,4,n,e)},useInsertionEffect:function(n,e){return hm(4,2,n,e)},useMemo:function(n,e){var t=is();return e=e===void 0?null:e,n=n(),t.memoizedState=[n,e],n},useReducer:function(n,e,t){var i=is();return e=t!==void 0?t(e):e,i.memoizedState=i.baseState=e,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:e},i.queue=n,n=n.dispatch=eO.bind(null,cn,n),[i.memoizedState,n]},useRef:function(n){var e=is();return n={current:n},e.memoizedState=n},useState:HA,useDebugValue:O1,useDeferredValue:function(n){return is().memoizedState=n},useTransition:function(){var n=HA(!1),e=n[0];return n=QN.bind(null,n[1]),is().memoizedState=n,[e,n]},useMutableSource:function(){},useSyncExternalStore:function(n,e,t){var i=cn,r=is();if(tn){if(t===void 0)throw Error(Re(407));t=t()}else{if(t=e(),Xn===null)throw Error(Re(349));tl&30||Q2(i,e,t)}r.memoizedState=t;var s={value:t,getSnapshot:e};return r.queue=s,WA(tP.bind(null,i,s,n),[n]),i.flags|=2048,Yf(9,eP.bind(null,i,s,t,e),void 0,null),t},useId:function(){var n=is(),e=Xn.identifierPrefix;if(tn){var t=Os,i=Ns;t=(i&~(1<<32-Br(i)-1)).toString(32)+t,e=":"+e+"R"+t,t=jf++,0<\/script>",n=n.removeChild(n.firstChild)):typeof i.is=="string"?n=o.createElement(t,{is:i.is}):(n=o.createElement(t),t==="select"&&(o=n,i.multiple?o.multiple=!0:i.size&&(o.size=i.size))):n=o.createElementNS(n,t),n[ss]=e,n[Hf]=i,AP(n,e,!1,!1),e.stateNode=n;e:{switch(o=rx(t,i),t){case"dialog":Jt("cancel",n),Jt("close",n),r=i;break;case"iframe":case"object":case"embed":Jt("load",n),r=i;break;case"video":case"audio":for(r=0;rGc&&(e.flags|=128,i=!0,Bu(s,!1),e.lanes=4194304)}else{if(!i)if(n=Wm(o),n!==null){if(e.flags|=128,i=!0,t=n.updateQueue,t!==null&&(e.updateQueue=t,e.flags|=4),Bu(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!tn)return oi(e),null}else 2*wn()-s.renderingStartTime>Gc&&t!==1073741824&&(e.flags|=128,i=!0,Bu(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(t=s.last,t!==null?t.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=wn(),e.sibling=null,t=sn.current,Zt(sn,i?t&1|2:t&1),e):(oi(e),null);case 22:case 23:return H1(),i=e.memoizedState!==null,n!==null&&n.memoizedState!==null!==i&&(e.flags|=8192),i&&e.mode&1?Xi&1073741824&&(oi(e),e.subtreeFlags&6&&(e.flags|=8192)):oi(e),null;case 24:return null;case 25:return null}throw Error(Re(156,e.tag))}function uO(n,e){switch(S1(e),e.tag){case 1:return Oi(e.type)&&Om(),n=e.flags,n&65536?(e.flags=n&-65537|128,e):null;case 3:return Hc(),Kt(Ni),Kt(di),R1(),n=e.flags,n&65536&&!(n&128)?(e.flags=n&-65537|128,e):null;case 5:return L1(e),null;case 13:if(Kt(sn),n=e.memoizedState,n!==null&&n.dehydrated!==null){if(e.alternate===null)throw Error(Re(340));Bc()}return n=e.flags,n&65536?(e.flags=n&-65537|128,e):null;case 19:return Kt(sn),null;case 4:return Hc(),null;case 10:return E1(e.type._context),null;case 22:case 23:return H1(),null;case 24:return null;default:return null}}var lp=!1,ci=!1,fO=typeof WeakSet=="function"?WeakSet:Set,Ze=null;function gc(n,e){var t=n.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(i){hn(n,e,i)}else t.current=null}function Rx(n,e,t){try{t()}catch(i){hn(n,e,i)}}var KA=!1;function dO(n,e){if(px=Im,n=L2(),_1(n)){if("selectionStart"in n)var t={start:n.selectionStart,end:n.selectionEnd};else e:{t=(t=n.ownerDocument)&&t.defaultView||window;var i=t.getSelection&&t.getSelection();if(i&&i.rangeCount!==0){t=i.anchorNode;var r=i.anchorOffset,s=i.focusNode;i=i.focusOffset;try{t.nodeType,s.nodeType}catch{t=null;break e}var o=0,a=-1,l=-1,f=0,d=0,h=n,p=null;t:for(;;){for(var g;h!==t||r!==0&&h.nodeType!==3||(a=o+r),h!==s||i!==0&&h.nodeType!==3||(l=o+i),h.nodeType===3&&(o+=h.nodeValue.length),(g=h.firstChild)!==null;)p=h,h=g;for(;;){if(h===n)break t;if(p===t&&++f===r&&(a=o),p===s&&++d===i&&(l=o),(g=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=g}t=a===-1||l===-1?null:{start:a,end:l}}else t=null}t=t||{start:0,end:0}}else t=null;for(mx={focusedElem:n,selectionRange:t},Im=!1,Ze=e;Ze!==null;)if(e=Ze,n=e.child,(e.subtreeFlags&1028)!==0&&n!==null)n.return=e,Ze=n;else for(;Ze!==null;){e=Ze;try{var y=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var x=y.memoizedProps,w=y.memoizedState,m=e.stateNode,_=m.getSnapshotBeforeUpdate(e.elementType===e.type?x:kr(e.type,x),w);m.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var S=e.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Re(163))}}catch(A){hn(e,e.return,A)}if(n=e.sibling,n!==null){n.return=e.return,Ze=n;break}Ze=e.return}return y=KA,KA=!1,y}function xf(n,e,t){var i=e.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var r=i=i.next;do{if((r.tag&n)===n){var s=r.destroy;r.destroy=void 0,s!==void 0&&Rx(e,t,s)}r=r.next}while(r!==i)}}function Eg(n,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var t=e=e.next;do{if((t.tag&n)===n){var i=t.create;t.destroy=i()}t=t.next}while(t!==e)}}function Ix(n){var e=n.ref;if(e!==null){var t=n.stateNode;switch(n.tag){case 5:n=t;break;default:n=t}typeof e=="function"?e(n):e.current=n}}function TP(n){var e=n.alternate;e!==null&&(n.alternate=null,TP(e)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(e=n.stateNode,e!==null&&(delete e[ss],delete e[Hf],delete e[yx],delete e[qN],delete e[ZN])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function CP(n){return n.tag===5||n.tag===3||n.tag===4}function QA(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||CP(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Dx(n,e,t){var i=n.tag;if(i===5||i===6)n=n.stateNode,e?t.nodeType===8?t.parentNode.insertBefore(n,e):t.insertBefore(n,e):(t.nodeType===8?(e=t.parentNode,e.insertBefore(n,t)):(e=t,e.appendChild(n)),t=t._reactRootContainer,t!=null||e.onclick!==null||(e.onclick=Nm));else if(i!==4&&(n=n.child,n!==null))for(Dx(n,e,t),n=n.sibling;n!==null;)Dx(n,e,t),n=n.sibling}function kx(n,e,t){var i=n.tag;if(i===5||i===6)n=n.stateNode,e?t.insertBefore(n,e):t.appendChild(n);else if(i!==4&&(n=n.child,n!==null))for(kx(n,e,t),n=n.sibling;n!==null;)kx(n,e,t),n=n.sibling}var $n=null,Nr=!1;function fo(n,e,t){for(t=t.child;t!==null;)PP(n,e,t),t=t.sibling}function PP(n,e,t){if(os&&typeof os.onCommitFiberUnmount=="function")try{os.onCommitFiberUnmount(yg,t)}catch{}switch(t.tag){case 5:ci||gc(t,e);case 6:var i=$n,r=Nr;$n=null,fo(n,e,t),$n=i,Nr=r,$n!==null&&(Nr?(n=$n,t=t.stateNode,n.nodeType===8?n.parentNode.removeChild(t):n.removeChild(t)):$n.removeChild(t.stateNode));break;case 18:$n!==null&&(Nr?(n=$n,t=t.stateNode,n.nodeType===8?Rv(n.parentNode,t):n.nodeType===1&&Rv(n,t),Uf(n)):Rv($n,t.stateNode));break;case 4:i=$n,r=Nr,$n=t.stateNode.containerInfo,Nr=!0,fo(n,e,t),$n=i,Nr=r;break;case 0:case 11:case 14:case 15:if(!ci&&(i=t.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){r=i=i.next;do{var s=r,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Rx(t,e,o),r=r.next}while(r!==i)}fo(n,e,t);break;case 1:if(!ci&&(gc(t,e),i=t.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=t.memoizedProps,i.state=t.memoizedState,i.componentWillUnmount()}catch(a){hn(t,e,a)}fo(n,e,t);break;case 21:fo(n,e,t);break;case 22:t.mode&1?(ci=(i=ci)||t.memoizedState!==null,fo(n,e,t),ci=i):fo(n,e,t);break;default:fo(n,e,t)}}function eb(n){var e=n.updateQueue;if(e!==null){n.updateQueue=null;var t=n.stateNode;t===null&&(t=n.stateNode=new fO),e.forEach(function(i){var r=wO.bind(null,n,i);t.has(i)||(t.add(i),i.then(r,r))})}}function Lr(n,e){var t=e.deletions;if(t!==null)for(var i=0;ir&&(r=o),i&=~s}if(i=r,i=wn()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*pO(i/1960))-i,10n?16:n,Co===null)var i=!1;else{if(n=Co,Co=null,qm=0,It&6)throw Error(Re(331));var r=It;for(It|=4,Ze=n.current;Ze!==null;){var s=Ze,o=s.child;if(Ze.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lwn()-B1?ja(n,0):F1|=t),Ui(n,e)}function UP(n,e){e===0&&(n.mode&1?(e=Qh,Qh<<=1,!(Qh&130023424)&&(Qh=4194304)):e=1);var t=wi();n=js(n,e),n!==null&&(wd(n,e,t),Ui(n,t))}function _O(n){var e=n.memoizedState,t=0;e!==null&&(t=e.retryLane),UP(n,t)}function wO(n,e){var t=0;switch(n.tag){case 13:var i=n.stateNode,r=n.memoizedState;r!==null&&(t=r.retryLane);break;case 19:i=n.stateNode;break;default:throw Error(Re(314))}i!==null&&i.delete(e),UP(n,t)}var zP;zP=function(n,e,t){if(n!==null)if(n.memoizedProps!==e.pendingProps||Ni.current)ki=!0;else{if(!(n.lanes&t)&&!(e.flags&128))return ki=!1,lO(n,e,t);ki=!!(n.flags&131072)}else ki=!1,tn&&e.flags&1048576&&V2(e,Fm,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;pm(n,e),n=e.pendingProps;var r=Fc(e,di.current);Ic(e,t),r=D1(null,e,i,n,r,t);var s=k1();return e.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Oi(i)?(s=!0,Um(e)):s=!1,e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,C1(e),r.updater=Ag,e.stateNode=r,r._reactInternals=e,Ax(e,i,n,t),e=Tx(null,e,i,!0,s,t)):(e.tag=0,tn&&s&&w1(e),_i(null,e,r,t),e=e.child),e;case 16:i=e.elementType;e:{switch(pm(n,e),n=e.pendingProps,r=i._init,i=r(i._payload),e.type=i,r=e.tag=MO(i),n=kr(i,n),r){case 0:e=Ex(null,e,i,n,t);break e;case 1:e=ZA(null,e,i,n,t);break e;case 11:e=YA(null,e,i,n,t);break e;case 14:e=qA(null,e,i,kr(i.type,n),t);break e}throw Error(Re(306,i,""))}return e;case 0:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:kr(i,r),Ex(n,e,i,r,t);case 1:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:kr(i,r),ZA(n,e,i,r,t);case 3:e:{if(wP(e),n===null)throw Error(Re(387));i=e.pendingProps,s=e.memoizedState,r=s.element,j2(n,e),Hm(e,i,null,t);var o=e.memoizedState;if(i=o.element,s.isDehydrated)if(s={element:i,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){r=Wc(Error(Re(423)),e),e=$A(n,e,i,t,r);break e}else if(i!==r){r=Wc(Error(Re(424)),e),e=$A(n,e,i,t,r);break e}else for(Zi=No(e.stateNode.containerInfo.firstChild),Ji=e,tn=!0,Ur=null,t=Z2(e,null,i,t),e.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(Bc(),i===r){e=Xs(n,e,t);break e}_i(n,e,i,t)}e=e.child}return e;case 5:return $2(e),n===null&&wx(e),i=e.type,r=e.pendingProps,s=n!==null?n.memoizedProps:null,o=r.children,gx(i,r)?o=null:s!==null&&gx(i,s)&&(e.flags|=32),_P(n,e),_i(n,e,o,t),e.child;case 6:return n===null&&wx(e),null;case 13:return SP(n,e,t);case 4:return P1(e,e.stateNode.containerInfo),i=e.pendingProps,n===null?e.child=Vc(e,null,i,t):_i(n,e,i,t),e.child;case 11:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:kr(i,r),YA(n,e,i,r,t);case 7:return _i(n,e,e.pendingProps,t),e.child;case 8:return _i(n,e,e.pendingProps.children,t),e.child;case 12:return _i(n,e,e.pendingProps.children,t),e.child;case 10:e:{if(i=e.type._context,r=e.pendingProps,s=e.memoizedProps,o=r.value,Zt(Bm,i._currentValue),i._currentValue=o,s!==null)if(Wr(s.value,o)){if(s.children===r.children&&!Ni.current){e=Xs(n,e,t);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===i){if(s.tag===1){l=Fs(-1,t&-t),l.tag=2;var f=s.updateQueue;if(f!==null){f=f.shared;var d=f.pending;d===null?l.next=l:(l.next=d.next,d.next=l),f.pending=l}}s.lanes|=t,l=s.alternate,l!==null&&(l.lanes|=t),Sx(s.return,t,e),a.lanes|=t;break}l=l.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(Re(341));o.lanes|=t,a=o.alternate,a!==null&&(a.lanes|=t),Sx(o,t,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}_i(n,e,r.children,t),e=e.child}return e;case 9:return r=e.type,i=e.pendingProps.children,Ic(e,t),r=wr(r),i=i(r),e.flags|=1,_i(n,e,i,t),e.child;case 14:return i=e.type,r=kr(i,e.pendingProps),r=kr(i.type,r),qA(n,e,i,r,t);case 15:return yP(n,e,e.type,e.pendingProps,t);case 17:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:kr(i,r),pm(n,e),e.tag=1,Oi(i)?(n=!0,Um(e)):n=!1,Ic(e,t),Y2(e,i,r),Ax(e,i,r,t),Tx(null,e,i,!0,n,t);case 19:return MP(n,e,t);case 22:return xP(n,e,t)}throw Error(Re(156,e.tag))};function FP(n,e){return f2(n,e)}function SO(n,e,t,i){this.tag=n,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,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 xr(n,e,t,i){return new SO(n,e,t,i)}function G1(n){return n=n.prototype,!(!n||!n.isReactComponent)}function MO(n){if(typeof n=="function")return G1(n)?1:0;if(n!=null){if(n=n.$$typeof,n===c1)return 11;if(n===u1)return 14}return 2}function Fo(n,e){var t=n.alternate;return t===null?(t=xr(n.tag,e,n.key,n.mode),t.elementType=n.elementType,t.type=n.type,t.stateNode=n.stateNode,t.alternate=n,n.alternate=t):(t.pendingProps=e,t.type=n.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=n.flags&14680064,t.childLanes=n.childLanes,t.lanes=n.lanes,t.child=n.child,t.memoizedProps=n.memoizedProps,t.memoizedState=n.memoizedState,t.updateQueue=n.updateQueue,e=n.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},t.sibling=n.sibling,t.index=n.index,t.ref=n.ref,t}function vm(n,e,t,i,r,s){var o=2;if(i=n,typeof n=="function")G1(n)&&(o=1);else if(typeof n=="string")o=5;else e:switch(n){case ac:return Xa(t.children,r,s,e);case l1:o=8,r|=8;break;case qy:return n=xr(12,t,e,r|2),n.elementType=qy,n.lanes=s,n;case Zy:return n=xr(13,t,e,r),n.elementType=Zy,n.lanes=s,n;case $y:return n=xr(19,t,e,r),n.elementType=$y,n.lanes=s,n;case qC:return Cg(t,r,s,e);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case XC:o=10;break e;case YC:o=9;break e;case c1:o=11;break e;case u1:o=14;break e;case wo:o=16,i=null;break e}throw Error(Re(130,n==null?n:typeof n,""))}return e=xr(o,t,e,r),e.elementType=n,e.type=i,e.lanes=s,e}function Xa(n,e,t,i){return n=xr(7,n,i,e),n.lanes=t,n}function Cg(n,e,t,i){return n=xr(22,n,i,e),n.elementType=qC,n.lanes=t,n.stateNode={isHidden:!1},n}function Fv(n,e,t){return n=xr(6,n,null,e),n.lanes=t,n}function Bv(n,e,t){return e=xr(4,n.children!==null?n.children:[],n.key,e),e.lanes=t,e.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},e}function AO(n,e,t,i,r){this.tag=e,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=_v(0),this.expirationTimes=_v(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_v(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function j1(n,e,t,i,r,s,o,a,l){return n=new AO(n,e,t,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=xr(3,null,null,e),n.current=s,s.stateNode=n,s.memoizedState={element:i,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},C1(s),n}function bO(n,e,t){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(WP)}catch(n){console.error(n)}}WP(),VC.exports=nr;var LO=VC.exports,GP,lb=LO;GP=Xy.createRoot=lb.createRoot,Xy.hydrateRoot=lb.hydrateRoot;/** - * @remix-run/router v1.5.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Zf(){return Zf=Object.assign?Object.assign.bind():function(n){for(var e=1;e"u")throw new Error(e)}function Z1(n,e){if(!n){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function IO(){return Math.random().toString(36).substr(2,8)}function ub(n,e){return{usr:n.state,key:n.key,idx:e}}function Fx(n,e,t,i){return t===void 0&&(t=null),Zf({pathname:typeof n=="string"?n:n.pathname,search:"",hash:""},typeof e=="string"?iu(e):e,{state:t,key:e&&e.key||i||IO()})}function Jm(n){let{pathname:e="/",search:t="",hash:i=""}=n;return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function iu(n){let e={};if(n){let t=n.indexOf("#");t>=0&&(e.hash=n.substr(t),n=n.substr(0,t));let i=n.indexOf("?");i>=0&&(e.search=n.substr(i),n=n.substr(0,i)),n&&(e.pathname=n)}return e}function DO(n,e,t,i){i===void 0&&(i={});let{window:r=document.defaultView,v5Compat:s=!1}=i,o=r.history,a=Po.Pop,l=null,f=d();f==null&&(f=0,o.replaceState(Zf({},o.state,{idx:f}),""));function d(){return(o.state||{idx:null}).idx}function h(){a=Po.Pop;let w=d(),m=w==null?null:w-f;f=w,l&&l({action:a,location:x.location,delta:m})}function p(w,m){a=Po.Push;let _=Fx(x.location,w,m);t&&t(_,w),f=d()+1;let S=ub(_,f),A=x.createHref(_);try{o.pushState(S,"",A)}catch{r.location.assign(A)}s&&l&&l({action:a,location:x.location,delta:1})}function g(w,m){a=Po.Replace;let _=Fx(x.location,w,m);t&&t(_,w),f=d();let S=ub(_,f),A=x.createHref(_);o.replaceState(S,"",A),s&&l&&l({action:a,location:x.location,delta:0})}function y(w){let m=r.location.origin!=="null"?r.location.origin:r.location.href,_=typeof w=="string"?w:Jm(w);return Nn(m,"No window.location.(origin|href) available to create URL for href: "+_),new URL(_,m)}let x={get action(){return a},get location(){return n(r,o)},listen(w){if(l)throw new Error("A history only accepts one active listener");return r.addEventListener(cb,h),l=w,()=>{r.removeEventListener(cb,h),l=null}},createHref(w){return e(r,w)},createURL:y,encodeLocation(w){let m=y(w);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:p,replace:g,go(w){return o.go(w)}};return x}var fb;(function(n){n.data="data",n.deferred="deferred",n.redirect="redirect",n.error="error"})(fb||(fb={}));function kO(n,e,t){t===void 0&&(t="/");let i=typeof e=="string"?iu(e):e,r=$1(i.pathname||"/",t);if(r==null)return null;let s=jP(n);NO(s);let o=null;for(let a=0;o==null&&a{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(Nn(l.relativePath.startsWith(i),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(i.length));let f=Bo([i,l.relativePath]),d=t.concat(l);s.children&&s.children.length>0&&(Nn(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+f+'".')),jP(s.children,e,d,f)),!(s.path==null&&!s.index)&&e.push({path:f,score:HO(f,s.index),routesMeta:d})};return n.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))r(s,o);else for(let l of XP(s.path))r(s,o,l)}),e}function XP(n){let e=n.split("/");if(e.length===0)return[];let[t,...i]=e,r=t.endsWith("?"),s=t.replace(/\?$/,"");if(i.length===0)return r?[s,""]:[s];let o=XP(i.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),r&&a.push(...o),a.map(l=>n.startsWith("/")&&l===""?"/":l)}function NO(n){n.sort((e,t)=>e.score!==t.score?t.score-e.score:WO(e.routesMeta.map(i=>i.childrenIndex),t.routesMeta.map(i=>i.childrenIndex)))}const OO=/^:\w+$/,UO=3,zO=2,FO=1,BO=10,VO=-2,db=n=>n==="*";function HO(n,e){let t=n.split("/"),i=t.length;return t.some(db)&&(i+=VO),e&&(i+=zO),t.filter(r=>!db(r)).reduce((r,s)=>r+(OO.test(s)?UO:s===""?FO:BO),i)}function WO(n,e){return n.length===e.length&&n.slice(0,-1).every((i,r)=>i===e[r])?n[n.length-1]-e[e.length-1]:0}function GO(n,e){let{routesMeta:t}=n,i={},r="/",s=[];for(let o=0;o{if(d==="*"){let p=a[h]||"";o=s.slice(0,s.length-p.length).replace(/(.)\/+$/,"$1")}return f[d]=qO(a[h]||"",d),f},{}),pathname:s,pathnameBase:o,pattern:n}}function XO(n,e,t){e===void 0&&(e=!1),t===void 0&&(t=!0),Z1(n==="*"||!n.endsWith("*")||n.endsWith("/*"),'Route path "'+n+'" will be treated as if it were '+('"'+n.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+n.replace(/\*$/,"/*")+'".'));let i=[],r="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(o,a)=>(i.push(a),"/([^\\/]+)"));return n.endsWith("*")?(i.push("*"),r+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?r+="\\/*$":n!==""&&n!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,e?void 0:"i"),i]}function YO(n){try{return decodeURI(n)}catch(e){return Z1(!1,'The URL path "'+n+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),n}}function qO(n,e){try{return decodeURIComponent(n)}catch(t){return Z1(!1,'The value for the URL param "'+e+'" will not be decoded because'+(' the string "'+n+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+t+").")),n}}function $1(n,e){if(e==="/")return n;if(!n.toLowerCase().startsWith(e.toLowerCase()))return null;let t=e.endsWith("/")?e.length-1:e.length,i=n.charAt(t);return i&&i!=="/"?null:n.slice(t)||"/"}function ZO(n,e){e===void 0&&(e="/");let{pathname:t,search:i="",hash:r=""}=typeof n=="string"?iu(n):n;return{pathname:t?t.startsWith("/")?t:$O(t,e):e,search:KO(i),hash:QO(r)}}function $O(n,e){let t=e.replace(/\/+$/,"").split("/");return n.split("/").forEach(r=>{r===".."?t.length>1&&t.pop():r!=="."&&t.push(r)}),t.length>1?t.join("/"):"/"}function Vv(n,e,t,i){return"Cannot include a '"+n+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+t+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function YP(n){return n.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function qP(n,e,t,i){i===void 0&&(i=!1);let r;typeof n=="string"?r=iu(n):(r=Zf({},n),Nn(!r.pathname||!r.pathname.includes("?"),Vv("?","pathname","search",r)),Nn(!r.pathname||!r.pathname.includes("#"),Vv("#","pathname","hash",r)),Nn(!r.search||!r.search.includes("#"),Vv("#","search","hash",r)));let s=n===""||r.pathname==="",o=s?"/":r.pathname,a;if(i||o==null)a=t;else{let h=e.length-1;if(o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),h-=1;r.pathname=p.join("/")}a=h>=0?e[h]:"/"}let l=ZO(r,a),f=o&&o!=="/"&&o.endsWith("/"),d=(s||o===".")&&t.endsWith("/");return!l.pathname.endsWith("/")&&(f||d)&&(l.pathname+="/"),l}const Bo=n=>n.join("/").replace(/\/\/+/g,"/"),JO=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),KO=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,QO=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function eU(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}const ZP=["post","put","patch","delete"];new Set(ZP);const tU=["get",...ZP];new Set(tU);/** - * React Router v6.10.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function nU(n,e){return n===e&&(n!==0||1/n===1/e)||n!==n&&e!==e}const iU=typeof Object.is=="function"?Object.is:nU,{useState:rU,useEffect:sU,useLayoutEffect:oU,useDebugValue:aU}=jy;function lU(n,e,t){const i=e(),[{inst:r},s]=rU({inst:{value:i,getSnapshot:e}});return oU(()=>{r.value=i,r.getSnapshot=e,Hv(r)&&s({inst:r})},[n,i,e]),sU(()=>(Hv(r)&&s({inst:r}),n(()=>{Hv(r)&&s({inst:r})})),[n]),aU(i),i}function Hv(n){const e=n.getSnapshot,t=n.value;try{const i=e();return!iU(t,i)}catch{return!0}}function cU(n,e,t){return e()}const uU=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",fU=!uU,dU=fU?cU:lU;"useSyncExternalStore"in jy&&(n=>n.useSyncExternalStore)(jy);const $P=N.createContext(null),JP=N.createContext(null),bd=N.createContext(null),Dg=N.createContext(null),ru=N.createContext({outlet:null,matches:[]}),KP=N.createContext(null);function Bx(){return Bx=Object.assign?Object.assign.bind():function(n){for(var e=1;ea.pathnameBase)),s=N.useRef(!1);return N.useEffect(()=>{s.current=!0}),N.useCallback(function(a,l){if(l===void 0&&(l={}),!s.current)return;if(typeof a=="number"){e.go(a);return}let f=qP(a,JSON.parse(r),i,l.relative==="path");n!=="/"&&(f.pathname=f.pathname==="/"?n:Bo([n,f.pathname])),(l.replace?e.replace:e.push)(f,l.state,l)},[n,e,r,i])}function QP(n,e){let{relative:t}=e===void 0?{}:e,{matches:i}=N.useContext(ru),{pathname:r}=kg(),s=JSON.stringify(YP(i).map(o=>o.pathnameBase));return N.useMemo(()=>qP(n,JSON.parse(s),r,t==="path"),[n,s,r,t])}function mU(n,e){Ed()||Nn(!1);let{navigator:t}=N.useContext(bd),i=N.useContext(JP),{matches:r}=N.useContext(ru),s=r[r.length-1],o=s?s.params:{};s&&s.pathname;let a=s?s.pathnameBase:"/";s&&s.route;let l=kg(),f;if(e){var d;let x=typeof e=="string"?iu(e):e;a==="/"||(d=x.pathname)!=null&&d.startsWith(a)||Nn(!1),f=x}else f=l;let h=f.pathname||"/",p=a==="/"?h:h.slice(a.length)||"/",g=kO(n,{pathname:p}),y=xU(g&&g.map(x=>Object.assign({},x,{params:Object.assign({},o,x.params),pathname:Bo([a,t.encodeLocation?t.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?a:Bo([a,t.encodeLocation?t.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),r,i||void 0);return e&&y?N.createElement(Dg.Provider,{value:{location:Bx({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:Po.Pop}},y):y}function gU(){let n=MU(),e=eU(n)?n.status+" "+n.statusText:n instanceof Error?n.message:JSON.stringify(n),t=n instanceof Error?n.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},s=null;return N.createElement(N.Fragment,null,N.createElement("h2",null,"Unexpected Application Error!"),N.createElement("h3",{style:{fontStyle:"italic"}},e),t?N.createElement("pre",{style:r},t):null,s)}class vU extends N.Component{constructor(e){super(e),this.state={location:e.location,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location?{error:e.error,location:e.location}:{error:e.error||t.error,location:t.location}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error?N.createElement(ru.Provider,{value:this.props.routeContext},N.createElement(KP.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function yU(n){let{routeContext:e,match:t,children:i}=n,r=N.useContext($P);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),N.createElement(ru.Provider,{value:e},i)}function xU(n,e,t){if(e===void 0&&(e=[]),n==null)if(t!=null&&t.errors)n=t.matches;else return null;let i=n,r=t==null?void 0:t.errors;if(r!=null){let s=i.findIndex(o=>o.route.id&&(r==null?void 0:r[o.route.id]));s>=0||Nn(!1),i=i.slice(0,Math.min(i.length,s+1))}return i.reduceRight((s,o,a)=>{let l=o.route.id?r==null?void 0:r[o.route.id]:null,f=null;t&&(o.route.ErrorBoundary?f=N.createElement(o.route.ErrorBoundary,null):o.route.errorElement?f=o.route.errorElement:f=N.createElement(gU,null));let d=e.concat(i.slice(0,a+1)),h=()=>{let p=s;return l?p=f:o.route.Component?p=N.createElement(o.route.Component,null):o.route.element&&(p=o.route.element),N.createElement(yU,{match:o,routeContext:{outlet:s,matches:d},children:p})};return t&&(o.route.ErrorBoundary||o.route.errorElement||a===0)?N.createElement(vU,{location:t.location,component:f,error:l,children:h(),routeContext:{outlet:null,matches:d}}):h()},null)}var hb;(function(n){n.UseBlocker="useBlocker",n.UseRevalidator="useRevalidator"})(hb||(hb={}));var Km;(function(n){n.UseBlocker="useBlocker",n.UseLoaderData="useLoaderData",n.UseActionData="useActionData",n.UseRouteError="useRouteError",n.UseNavigation="useNavigation",n.UseRouteLoaderData="useRouteLoaderData",n.UseMatches="useMatches",n.UseRevalidator="useRevalidator"})(Km||(Km={}));function _U(n){let e=N.useContext(JP);return e||Nn(!1),e}function wU(n){let e=N.useContext(ru);return e||Nn(!1),e}function SU(n){let e=wU(),t=e.matches[e.matches.length-1];return t.route.id||Nn(!1),t.route.id}function MU(){var n;let e=N.useContext(KP),t=_U(Km.UseRouteError),i=SU(Km.UseRouteError);return e||((n=t.errors)==null?void 0:n[i])}function ns(n){Nn(!1)}function AU(n){let{basename:e="/",children:t=null,location:i,navigationType:r=Po.Pop,navigator:s,static:o=!1}=n;Ed()&&Nn(!1);let a=e.replace(/^\/*/,"/"),l=N.useMemo(()=>({basename:a,navigator:s,static:o}),[a,s,o]);typeof i=="string"&&(i=iu(i));let{pathname:f="/",search:d="",hash:h="",state:p=null,key:g="default"}=i,y=N.useMemo(()=>{let x=$1(f,a);return x==null?null:{location:{pathname:x,search:d,hash:h,state:p,key:g},navigationType:r}},[a,f,d,h,p,g,r]);return y==null?null:N.createElement(bd.Provider,{value:l},N.createElement(Dg.Provider,{children:t,value:y}))}function bU(n){let{children:e,location:t}=n,i=N.useContext($P),r=i&&!e?i.router.routes:Vx(e);return mU(r,t)}var pb;(function(n){n[n.pending=0]="pending",n[n.success=1]="success",n[n.error=2]="error"})(pb||(pb={}));new Promise(()=>{});function Vx(n,e){e===void 0&&(e=[]);let t=[];return N.Children.forEach(n,(i,r)=>{if(!N.isValidElement(i))return;let s=[...e,r];if(i.type===N.Fragment){t.push.apply(t,Vx(i.props.children,s));return}i.type!==ns&&Nn(!1),!i.props.index||!i.props.children||Nn(!1);let o={id:i.props.id||s.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(o.children=Vx(i.props.children,s)),t.push(o)}),t}/** - * React Router DOM v6.10.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Hx(){return Hx=Object.assign?Object.assign.bind():function(n){for(var e=1;e=0)&&(t[r]=n[r]);return t}function TU(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function CU(n,e){return n.button===0&&(!e||e==="_self")&&!TU(n)}const PU=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function LU(n){let{basename:e,children:t,window:i}=n,r=N.useRef();r.current==null&&(r.current=RO({window:i,v5Compat:!0}));let s=r.current,[o,a]=N.useState({action:s.action,location:s.location});return N.useLayoutEffect(()=>s.listen(a),[s]),N.createElement(AU,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:s})}const RU=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",IU=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Wv=N.forwardRef(function(e,t){let{onClick:i,relative:r,reloadDocument:s,replace:o,state:a,target:l,to:f,preventScrollReset:d}=e,h=EU(e,PU),{basename:p}=N.useContext(bd),g,y=!1;if(typeof f=="string"&&IU.test(f)&&(g=f,RU)){let _=new URL(window.location.href),S=f.startsWith("//")?new URL(_.protocol+f):new URL(f),A=$1(S.pathname,p);S.origin===_.origin&&A!=null?f=A+S.search+S.hash:y=!0}let x=hU(f,{relative:r}),w=DU(f,{replace:o,state:a,target:l,preventScrollReset:d,relative:r});function m(_){i&&i(_),_.defaultPrevented||w(_)}return N.createElement("a",Hx({},h,{href:g||x,onClick:y||s?i:m,ref:t,target:l}))});var mb;(function(n){n.UseScrollRestoration="useScrollRestoration",n.UseSubmitImpl="useSubmitImpl",n.UseFetcher="useFetcher"})(mb||(mb={}));var gb;(function(n){n.UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"})(gb||(gb={}));function DU(n,e){let{target:t,replace:i,state:r,preventScrollReset:s,relative:o}=e===void 0?{}:e,a=pU(),l=kg(),f=QP(n,{relative:o});return N.useCallback(d=>{if(CU(d,t)){d.preventDefault();let h=i!==void 0?i:Jm(l)===Jm(f);a(n,{replace:h,state:r,preventScrollReset:s,relative:o})}},[l,a,f,i,r,t,n,s,o])}const su="/portfolio-react-threejs/assets/anim-bg-41fcb528.gif",e3=N.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"}),Ng=N.createContext({}),J1=N.createContext(null),Og=typeof document<"u",vb=Og?N.useLayoutEffect:N.useEffect,t3=N.createContext({strict:!1});function kU(n,e,t,i){const{visualElement:r}=N.useContext(Ng),s=N.useContext(t3),o=N.useContext(J1),a=N.useContext(e3).reducedMotion,l=N.useRef();i=i||s.renderer,!l.current&&i&&(l.current=i(n,{visualState:e,parent:r,props:t,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const f=l.current;return N.useInsertionEffect(()=>{f&&f.update(t,o)}),vb(()=>{f&&f.render()}),N.useEffect(()=>{f&&f.updateFeatures()}),(window.HandoffAppearAnimations?vb:N.useEffect)(()=>{f&&f.animationState&&f.animationState.animateChanges()}),f}function yc(n){return typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function NU(n,e,t){return N.useCallback(i=>{i&&n.mount&&n.mount(i),e&&(i?e.mount(i):e.unmount()),t&&(typeof t=="function"?t(i):yc(t)&&(t.current=i))},[e])}function $f(n){return typeof n=="string"||Array.isArray(n)}function Ug(n){return typeof n=="object"&&typeof n.start=="function"}const K1=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Q1=["initial",...K1];function zg(n){return Ug(n.animate)||Q1.some(e=>$f(n[e]))}function n3(n){return!!(zg(n)||n.variants)}function OU(n,e){if(zg(n)){const{initial:t,animate:i}=n;return{initial:t===!1||$f(t)?t:void 0,animate:$f(i)?i:void 0}}return n.inherit!==!1?e:{}}function UU(n){const{initial:e,animate:t}=OU(n,N.useContext(Ng));return N.useMemo(()=>({initial:e,animate:t}),[yb(e),yb(t)])}function yb(n){return Array.isArray(n)?n.join(" "):n}const xb={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"]},Jf={};for(const n in xb)Jf[n]={isEnabled:e=>xb[n].some(t=>!!e[t])};function zU(n){for(const e in n)Jf[e]={...Jf[e],...n[e]}}function i3(n){const e=N.useRef(null);return e.current===null&&(e.current=n()),e.current}const Sf={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let FU=1;function BU(){return i3(()=>{if(Sf.hasEverUpdated)return FU++})}const r3=N.createContext({}),s3=N.createContext({}),VU=Symbol.for("motionComponentSymbol");function HU({preloadedFeatures:n,createVisualElement:e,useRender:t,useVisualState:i,Component:r}){n&&zU(n);function s(a,l){let f;const d={...N.useContext(e3),...a,layoutId:WU(a)},{isStatic:h}=d,p=UU(a),g=h?void 0:BU(),y=i(a,h);if(!h&&Og){p.visualElement=kU(r,y,d,e);const x=N.useContext(s3),w=N.useContext(t3).strict;p.visualElement&&(f=p.visualElement.loadFeatures(d,w,n,g,x))}return N.createElement(Ng.Provider,{value:p},f&&p.visualElement?N.createElement(f,{visualElement:p.visualElement,...d}):null,t(r,a,g,NU(y,p.visualElement,l),y,h,p.visualElement))}const o=N.forwardRef(s);return o[VU]=r,o}function WU({layoutId:n}){const e=N.useContext(r3).id;return e&&n!==void 0?e+"-"+n:n}function GU(n){function e(i,r={}){return HU(n(i,r))}if(typeof Proxy>"u")return e;const t=new Map;return new Proxy(e,{get:(i,r)=>(t.has(r)||t.set(r,e(r)),t.get(r))})}const jU=["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 ew(n){return typeof n!="string"||n.includes("-")?!1:!!(jU.indexOf(n)>-1||/[A-Z]/.test(n))}const Qm={};function XU(n){Object.assign(Qm,n)}const Td=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],pl=new Set(Td);function o3(n,{layout:e,layoutId:t}){return pl.has(n)||n.startsWith("origin")||(e||t!==void 0)&&(!!Qm[n]||n==="opacity")}const zi=n=>!!(n&&n.getVelocity),YU={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},qU=Td.length;function ZU(n,{enableHardwareAcceleration:e=!0,allowTransformNone:t=!0},i,r){let s="";for(let o=0;oe=>typeof e=="string"&&e.startsWith(n),l3=a3("--"),Wx=a3("var(--"),$U=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,JU=(n,e)=>e&&typeof n=="number"?e.transform(n):n,rl=(n,e,t)=>Math.min(Math.max(t,n),e),ml={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},Mf={...ml,transform:n=>rl(0,1,n)},fp={...ml,default:1},Af=n=>Math.round(n*1e5)/1e5,Fg=/(-)?([\d]*\.?[\d])+/g,c3=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,KU=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Cd(n){return typeof n=="string"}const Pd=n=>({test:e=>Cd(e)&&e.endsWith(n)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${n}`}),_o=Pd("deg"),ls=Pd("%"),ht=Pd("px"),QU=Pd("vh"),ez=Pd("vw"),_b={...ls,parse:n=>ls.parse(n)/100,transform:n=>ls.transform(n*100)},wb={...ml,transform:Math.round},u3={borderWidth:ht,borderTopWidth:ht,borderRightWidth:ht,borderBottomWidth:ht,borderLeftWidth:ht,borderRadius:ht,radius:ht,borderTopLeftRadius:ht,borderTopRightRadius:ht,borderBottomRightRadius:ht,borderBottomLeftRadius:ht,width:ht,maxWidth:ht,height:ht,maxHeight:ht,size:ht,top:ht,right:ht,bottom:ht,left:ht,padding:ht,paddingTop:ht,paddingRight:ht,paddingBottom:ht,paddingLeft:ht,margin:ht,marginTop:ht,marginRight:ht,marginBottom:ht,marginLeft:ht,rotate:_o,rotateX:_o,rotateY:_o,rotateZ:_o,scale:fp,scaleX:fp,scaleY:fp,scaleZ:fp,skew:_o,skewX:_o,skewY:_o,distance:ht,translateX:ht,translateY:ht,translateZ:ht,x:ht,y:ht,z:ht,perspective:ht,transformPerspective:ht,opacity:Mf,originX:_b,originY:_b,originZ:ht,zIndex:wb,fillOpacity:Mf,strokeOpacity:Mf,numOctaves:wb};function tw(n,e,t,i){const{style:r,vars:s,transform:o,transformOrigin:a}=n;let l=!1,f=!1,d=!0;for(const h in e){const p=e[h];if(l3(h)){s[h]=p;continue}const g=u3[h],y=JU(p,g);if(pl.has(h)){if(l=!0,o[h]=y,!d)continue;p!==(g.default||0)&&(d=!1)}else h.startsWith("origin")?(f=!0,a[h]=y):r[h]=y}if(e.transform||(l||i?r.transform=ZU(n.transform,t,d,i):r.transform&&(r.transform="none")),f){const{originX:h="50%",originY:p="50%",originZ:g=0}=a;r.transformOrigin=`${h} ${p} ${g}`}}const nw=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function f3(n,e,t){for(const i in e)!zi(e[i])&&!o3(i,t)&&(n[i]=e[i])}function tz({transformTemplate:n},e,t){return N.useMemo(()=>{const i=nw();return tw(i,e,{enableHardwareAcceleration:!t},n),Object.assign({},i.vars,i.style)},[e])}function nz(n,e,t){const i=n.style||{},r={};return f3(r,i,n),Object.assign(r,tz(n,e,t)),n.transformValues?n.transformValues(r):r}function iz(n,e,t){const i={},r=nz(n,e,t);return n.drag&&n.dragListener!==!1&&(i.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(i.tabIndex=0),i.style=r,i}const rz=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function eg(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||rz.has(n)}let d3=n=>!eg(n);function sz(n){n&&(d3=e=>e.startsWith("on")?!eg(e):n(e))}try{sz(require("@emotion/is-prop-valid").default)}catch{}function oz(n,e,t){const i={};for(const r in n)r==="values"&&typeof n.values=="object"||(d3(r)||t===!0&&eg(r)||!e&&!eg(r)||n.draggable&&r.startsWith("onDrag"))&&(i[r]=n[r]);return i}function Sb(n,e,t){return typeof n=="string"?n:ht.transform(e+t*n)}function az(n,e,t){const i=Sb(e,n.x,n.width),r=Sb(t,n.y,n.height);return`${i} ${r}`}const lz={offset:"stroke-dashoffset",array:"stroke-dasharray"},cz={offset:"strokeDashoffset",array:"strokeDasharray"};function uz(n,e,t=1,i=0,r=!0){n.pathLength=1;const s=r?lz:cz;n[s.offset]=ht.transform(-i);const o=ht.transform(e),a=ht.transform(t);n[s.array]=`${o} ${a}`}function iw(n,{attrX:e,attrY:t,attrScale:i,originX:r,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...f},d,h,p){if(tw(n,f,d,p),h){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:g,style:y,dimensions:x}=n;g.transform&&(x&&(y.transform=g.transform),delete g.transform),x&&(r!==void 0||s!==void 0||y.transform)&&(y.transformOrigin=az(x,r!==void 0?r:.5,s!==void 0?s:.5)),e!==void 0&&(g.x=e),t!==void 0&&(g.y=t),i!==void 0&&(g.scale=i),o!==void 0&&uz(g,o,a,l,!1)}const h3=()=>({...nw(),attrs:{}}),rw=n=>typeof n=="string"&&n.toLowerCase()==="svg";function fz(n,e,t,i){const r=N.useMemo(()=>{const s=h3();return iw(s,e,{enableHardwareAcceleration:!1},rw(i),n.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(n.style){const s={};f3(s,n.style,n),r.style={...s,...r.style}}return r}function dz(n=!1){return(t,i,r,s,{latestValues:o},a)=>{const f=(ew(t)?fz:iz)(i,o,a,t),h={...oz(i,typeof t=="string",n),...f,ref:s},{children:p}=i,g=N.useMemo(()=>zi(p)?p.get():p,[p]);return r&&(h["data-projection-id"]=r),N.createElement(t,{...h,children:g})}}const sw=n=>n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function p3(n,{style:e,vars:t},i,r){Object.assign(n.style,e,r&&r.getProjectionStyles(i));for(const s in t)n.style.setProperty(s,t[s])}const m3=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"]);function g3(n,e,t,i){p3(n,e,void 0,i);for(const r in e.attrs)n.setAttribute(m3.has(r)?r:sw(r),e.attrs[r])}function ow(n,e){const{style:t}=n,i={};for(const r in t)(zi(t[r])||e.style&&zi(e.style[r])||o3(r,n))&&(i[r]=t[r]);return i}function v3(n,e){const t=ow(n,e);for(const i in n)if(zi(n[i])||zi(e[i])){const r=Td.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;t[r]=n[i]}return t}function aw(n,e,t,i={},r={}){return typeof e=="function"&&(e=e(t!==void 0?t:n.custom,i,r)),typeof e=="string"&&(e=n.variants&&n.variants[e]),typeof e=="function"&&(e=e(t!==void 0?t:n.custom,i,r)),e}const tg=n=>Array.isArray(n),hz=n=>!!(n&&typeof n=="object"&&n.mix&&n.toValue),pz=n=>tg(n)?n[n.length-1]||0:n;function ym(n){const e=zi(n)?n.get():n;return hz(e)?e.toValue():e}function mz({scrapeMotionValuesFromProps:n,createRenderState:e,onMount:t},i,r,s){const o={latestValues:gz(i,r,s,n),renderState:e()};return t&&(o.mount=a=>t(i,a,o)),o}const y3=n=>(e,t)=>{const i=N.useContext(Ng),r=N.useContext(J1),s=()=>mz(n,e,i,r);return t?s():i3(s)};function gz(n,e,t,i){const r={},s=i(n,{});for(const p in s)r[p]=ym(s[p]);let{initial:o,animate:a}=n;const l=zg(n),f=n3(n);e&&f&&!l&&n.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let d=t?t.initial===!1:!1;d=d||o===!1;const h=d?a:o;return h&&typeof h!="boolean"&&!Ug(h)&&(Array.isArray(h)?h:[h]).forEach(g=>{const y=aw(n,g);if(!y)return;const{transitionEnd:x,transition:w,...m}=y;for(const _ in m){let S=m[_];if(Array.isArray(S)){const A=d?S.length-1:0;S=S[A]}S!==null&&(r[_]=S)}for(const _ in x)r[_]=x[_]}),r}const vz={useVisualState:y3({scrapeMotionValuesFromProps:v3,createRenderState:h3,onMount:(n,e,{renderState:t,latestValues:i})=>{try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}iw(t,i,{enableHardwareAcceleration:!1},rw(e.tagName),n.transformTemplate),g3(e,t)}})},yz={useVisualState:y3({scrapeMotionValuesFromProps:ow,createRenderState:nw})};function xz(n,{forwardMotionProps:e=!1},t,i){return{...ew(n)?vz:yz,preloadedFeatures:t,useRender:dz(e),createVisualElement:i,Component:n}}function Us(n,e,t,i={passive:!0}){return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t)}const x3=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1;function Bg(n,e="page"){return{point:{x:n[e+"X"],y:n[e+"Y"]}}}const _z=n=>e=>x3(e)&&n(e,Bg(e));function Bs(n,e,t,i){return Us(n,e,_z(t),i)}const wz=(n,e)=>t=>e(n(t)),Vo=(...n)=>n.reduce(wz);function _3(n){let e=null;return()=>{const t=()=>{e=null};return e===null?(e=n,t):!1}}const Mb=_3("dragHorizontal"),Ab=_3("dragVertical");function w3(n){let e=!1;if(n==="y")e=Ab();else if(n==="x")e=Mb();else{const t=Mb(),i=Ab();t&&i?e=()=>{t(),i()}:(t&&t(),i&&i())}return e}function S3(){const n=w3(!0);return n?(n(),!1):!0}class ra{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Sz(n){let e=[],t=[],i=0,r=!1,s=!1;const o=new WeakSet,a={schedule:(l,f=!1,d=!1)=>{const h=d&&r,p=h?e:t;return f&&o.add(l),p.indexOf(l)===-1&&(p.push(l),h&&r&&(i=e.length)),l},cancel:l=>{const f=t.indexOf(l);f!==-1&&t.splice(f,1),o.delete(l)},process:l=>{if(r){s=!0;return}if(r=!0,[e,t]=[t,e],t.length=0,i=e.length,i)for(let f=0;f(n[e]=Sz(()=>Kf=!0),n),{}),Az=n=>kc[n].process(Gn),M3=n=>{Kf=!1,Gn.delta=Gx?1e3/60:Math.max(Math.min(n-Gn.timestamp,Mz),1),Gn.timestamp=n,Gn.isProcessing=!0,Vg.forEach(Az),Gn.isProcessing=!1,Kf&&(Gx=!1,requestAnimationFrame(M3))},bz=()=>{Kf=!0,Gx=!0,Gn.isProcessing||requestAnimationFrame(M3)},ln=Vg.reduce((n,e)=>{const t=kc[e];return n[e]=(i,r=!1,s=!1)=>(Kf||bz(),t.schedule(i,r,s)),n},{});function Ys(n){Vg.forEach(e=>kc[e].cancel(n))}function bb(n,e){const t="pointer"+(e?"enter":"leave"),i="onHover"+(e?"Start":"End"),r=(s,o)=>{if(s.type==="touch"||S3())return;const a=n.getProps();n.animationState&&a.whileHover&&n.animationState.setActive("whileHover",e),a[i]&&ln.update(()=>a[i](s,o))};return Bs(n.current,t,r,{passive:!n.getProps()[i]})}class Ez extends ra{mount(){this.unmount=Vo(bb(this.node,!0),bb(this.node,!1))}unmount(){}}class Tz extends ra{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{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=Vo(Us(this.node.current,"focus",()=>this.onFocus()),Us(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const A3=(n,e)=>e?n===e?!0:A3(n,e.parentElement):!1,Dn=n=>n;function Gv(n,e){if(!e)return;const t=new PointerEvent("pointer"+n);e(t,Bg(t))}class Cz extends ra{constructor(){super(...arguments),this.removeStartListeners=Dn,this.removeEndListeners=Dn,this.removeAccessibleListeners=Dn,this.startPointerPress=(e,t)=>{if(this.removeEndListeners(),this.isPressing)return;const i=this.node.getProps(),s=Bs(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:f,onTapCancel:d}=this.node.getProps();ln.update(()=>{A3(this.node.current,a.target)?f&&f(a,l):d&&d(a,l)})},{passive:!(i.onTap||i.onPointerUp)}),o=Bs(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(i.onTapCancel||i.onPointerCancel)});this.removeEndListeners=Vo(s,o),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=s=>{if(s.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||Gv("up",(l,f)=>{const{onTap:d}=this.node.getProps();d&&ln.update(()=>d(l,f))})};this.removeEndListeners(),this.removeEndListeners=Us(this.node.current,"keyup",o),Gv("down",(a,l)=>{this.startPress(a,l)})},t=Us(this.node.current,"keydown",e),i=()=>{this.isPressing&&Gv("cancel",(s,o)=>this.cancelPress(s,o))},r=Us(this.node.current,"blur",i);this.removeAccessibleListeners=Vo(t,r)}}startPress(e,t){this.isPressing=!0;const{onTapStart:i,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),i&&ln.update(()=>i(e,t))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!S3()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:i}=this.node.getProps();i&&ln.update(()=>i(e,t))}mount(){const e=this.node.getProps(),t=Bs(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),i=Us(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Vo(t,i)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const jx=new WeakMap,jv=new WeakMap,Pz=n=>{const e=jx.get(n.target);e&&e(n)},Lz=n=>{n.forEach(Pz)};function Rz({root:n,...e}){const t=n||document;jv.has(t)||jv.set(t,{});const i=jv.get(t),r=JSON.stringify(e);return i[r]||(i[r]=new IntersectionObserver(Lz,{root:n,...e})),i[r]}function Iz(n,e,t){const i=Rz(e);return jx.set(n,t),i.observe(n),()=>{jx.delete(n),i.unobserve(n)}}const Dz={some:0,all:1};class kz extends ra{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:i,amount:r="some",once:s}=e,o={root:t?t.current:void 0,rootMargin:i,threshold:typeof r=="number"?r:Dz[r]},a=l=>{const{isIntersecting:f}=l;if(this.isInView===f||(this.isInView=f,s&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:d,onViewportLeave:h}=this.node.getProps(),p=f?d:h;p&&p(l)};return Iz(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(Nz(e,t))&&this.startObserver()}unmount(){}}function Nz({viewport:n={}},{viewport:e={}}={}){return t=>n[t]!==e[t]}const Oz={inView:{Feature:kz},tap:{Feature:Cz},focus:{Feature:Tz},hover:{Feature:Ez}};function b3(n,e){if(!Array.isArray(e))return!1;const t=e.length;if(t!==n.length)return!1;for(let i=0;ie[i]=t.get()),e}function zz(n){const e={};return n.values.forEach((t,i)=>e[i]=t.getVelocity()),e}function Hg(n,e,t){const i=n.getProps();return aw(i,e,t!==void 0?t:i.custom,Uz(n),zz(n))}const Fz="framerAppearId",Bz="data-"+sw(Fz);let Vz=Dn,lw=Dn;const Ho=n=>n*1e3,Vs=n=>n/1e3,Hz={current:!1},E3=n=>Array.isArray(n)&&typeof n[0]=="number";function T3(n){return!!(!n||typeof n=="string"&&C3[n]||E3(n)||Array.isArray(n)&&n.every(T3))}const uf=([n,e,t,i])=>`cubic-bezier(${n}, ${e}, ${t}, ${i})`,C3={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:uf([0,.65,.55,1]),circOut:uf([.55,0,1,.45]),backIn:uf([.31,.01,.66,-.59]),backOut:uf([.33,1.53,.69,.99])};function P3(n){if(n)return E3(n)?uf(n):Array.isArray(n)?n.map(P3):C3[n]}function Wz(n,e,t,{delay:i=0,duration:r,repeat:s=0,repeatType:o="loop",ease:a,times:l}={}){const f={[e]:t};l&&(f.offset=l);const d=P3(a);return Array.isArray(d)&&(f.easing=d),n.animate(f,{delay:i,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const Eb={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},Xv={},L3={};for(const n in Eb)L3[n]=()=>(Xv[n]===void 0&&(Xv[n]=Eb[n]()),Xv[n]);function Gz(n,{repeat:e,repeatType:t="loop"}){const i=e&&t!=="loop"&&e%2===1?0:n.length-1;return n[i]}const R3=(n,e,t)=>(((1-3*t+3*e)*n+(3*t-6*e))*n+3*e)*n,jz=1e-7,Xz=12;function Yz(n,e,t,i,r){let s,o,a=0;do o=e+(t-e)/2,s=R3(o,i,r)-n,s>0?t=o:e=o;while(Math.abs(s)>jz&&++aYz(s,0,1,n,t);return s=>s===0||s===1?s:R3(r(s),e,i)}const qz=Ld(.42,0,1,1),Zz=Ld(0,0,.58,1),I3=Ld(.42,0,.58,1),$z=n=>Array.isArray(n)&&typeof n[0]!="number",D3=n=>e=>e<=.5?n(2*e)/2:(2-n(2*(1-e)))/2,k3=n=>e=>1-n(1-e),N3=n=>1-Math.sin(Math.acos(n)),cw=k3(N3),Jz=D3(cw),O3=Ld(.33,1.53,.69,.99),uw=k3(O3),Kz=D3(uw),Qz=n=>(n*=2)<1?.5*uw(n):.5*(2-Math.pow(2,-10*(n-1))),eF={linear:Dn,easeIn:qz,easeInOut:I3,easeOut:Zz,circIn:N3,circInOut:Jz,circOut:cw,backIn:uw,backInOut:Kz,backOut:O3,anticipate:Qz},Tb=n=>{if(Array.isArray(n)){lw(n.length===4);const[e,t,i,r]=n;return Ld(e,t,i,r)}else if(typeof n=="string")return eF[n];return n},fw=(n,e)=>t=>!!(Cd(t)&&KU.test(t)&&t.startsWith(n)||e&&Object.prototype.hasOwnProperty.call(t,e)),U3=(n,e,t)=>i=>{if(!Cd(i))return i;const[r,s,o,a]=i.match(Fg);return{[n]:parseFloat(r),[e]:parseFloat(s),[t]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},tF=n=>rl(0,255,n),Yv={...ml,transform:n=>Math.round(tF(n))},Ba={test:fw("rgb","red"),parse:U3("red","green","blue"),transform:({red:n,green:e,blue:t,alpha:i=1})=>"rgba("+Yv.transform(n)+", "+Yv.transform(e)+", "+Yv.transform(t)+", "+Af(Mf.transform(i))+")"};function nF(n){let e="",t="",i="",r="";return n.length>5?(e=n.substring(1,3),t=n.substring(3,5),i=n.substring(5,7),r=n.substring(7,9)):(e=n.substring(1,2),t=n.substring(2,3),i=n.substring(3,4),r=n.substring(4,5),e+=e,t+=t,i+=i,r+=r),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}}const Xx={test:fw("#"),parse:nF,transform:Ba.transform},xc={test:fw("hsl","hue"),parse:U3("hue","saturation","lightness"),transform:({hue:n,saturation:e,lightness:t,alpha:i=1})=>"hsla("+Math.round(n)+", "+ls.transform(Af(e))+", "+ls.transform(Af(t))+", "+Af(Mf.transform(i))+")"},xi={test:n=>Ba.test(n)||Xx.test(n)||xc.test(n),parse:n=>Ba.test(n)?Ba.parse(n):xc.test(n)?xc.parse(n):Xx.parse(n),transform:n=>Cd(n)?n:n.hasOwnProperty("red")?Ba.transform(n):xc.transform(n)},on=(n,e,t)=>-t*n+t*e+n;function qv(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*(2/3-t)*6:n}function iF({hue:n,saturation:e,lightness:t,alpha:i}){n/=360,e/=100,t/=100;let r=0,s=0,o=0;if(!e)r=s=o=t;else{const a=t<.5?t*(1+e):t+e-t*e,l=2*t-a;r=qv(l,a,n+1/3),s=qv(l,a,n),o=qv(l,a,n-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:i}}const Zv=(n,e,t)=>{const i=n*n;return Math.sqrt(Math.max(0,t*(e*e-i)+i))},rF=[Xx,Ba,xc],sF=n=>rF.find(e=>e.test(n));function Cb(n){const e=sF(n);let t=e.parse(n);return e===xc&&(t=iF(t)),t}const z3=(n,e)=>{const t=Cb(n),i=Cb(e),r={...t};return s=>(r.red=Zv(t.red,i.red,s),r.green=Zv(t.green,i.green,s),r.blue=Zv(t.blue,i.blue,s),r.alpha=on(t.alpha,i.alpha,s),Ba.transform(r))};function oF(n){var e,t;return isNaN(n)&&Cd(n)&&(((e=n.match(Fg))===null||e===void 0?void 0:e.length)||0)+(((t=n.match(c3))===null||t===void 0?void 0:t.length)||0)>0}const F3={regex:$U,countKey:"Vars",token:"${v}",parse:Dn},B3={regex:c3,countKey:"Colors",token:"${c}",parse:xi.parse},V3={regex:Fg,countKey:"Numbers",token:"${n}",parse:ml.parse};function $v(n,{regex:e,countKey:t,token:i,parse:r}){const s=n.tokenised.match(e);s&&(n["num"+t]=s.length,n.tokenised=n.tokenised.replace(e,i),n.values.push(...s.map(r)))}function ng(n){const e=n.toString(),t={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return t.value.includes("var(--")&&$v(t,F3),$v(t,B3),$v(t,V3),t}function H3(n){return ng(n).values}function W3(n){const{values:e,numColors:t,numVars:i,tokenised:r}=ng(n),s=e.length;return o=>{let a=r;for(let l=0;ltypeof n=="number"?0:n;function lF(n){const e=H3(n);return W3(n)(e.map(aF))}const Yo={test:oF,parse:H3,createTransformer:W3,getAnimatableNone:lF},G3=(n,e)=>t=>`${t>0?e:n}`;function j3(n,e){return typeof n=="number"?t=>on(n,e,t):xi.test(n)?z3(n,e):n.startsWith("var(")?G3(n,e):Y3(n,e)}const X3=(n,e)=>{const t=[...n],i=t.length,r=n.map((s,o)=>j3(s,e[o]));return s=>{for(let o=0;o{const t={...n,...e},i={};for(const r in t)n[r]!==void 0&&e[r]!==void 0&&(i[r]=j3(n[r],e[r]));return r=>{for(const s in i)t[s]=i[s](r);return t}},Y3=(n,e)=>{const t=Yo.createTransformer(e),i=ng(n),r=ng(e);return i.numVars===r.numVars&&i.numColors===r.numColors&&i.numNumbers>=r.numNumbers?Vo(X3(i.values,r.values),t):G3(n,e)},Qf=(n,e,t)=>{const i=e-n;return i===0?1:(t-n)/i},Pb=(n,e)=>t=>on(n,e,t);function uF(n){return typeof n=="number"?Pb:typeof n=="string"?xi.test(n)?z3:Y3:Array.isArray(n)?X3:typeof n=="object"?cF:Pb}function fF(n,e,t){const i=[],r=t||uF(n[0]),s=n.length-1;for(let o=0;oe[0];n[0]>n[s-1]&&(n=[...n].reverse(),e=[...e].reverse());const o=fF(e,i,r),a=o.length,l=f=>{let d=0;if(a>1)for(;dl(rl(n[0],n[s-1],f)):l}function dF(n,e){const t=n[n.length-1];for(let i=1;i<=e;i++){const r=Qf(0,e,i);n.push(on(t,1,r))}}function hF(n){const e=[0];return dF(e,n.length-1),e}function pF(n,e){return n.map(t=>t*e)}function mF(n,e){return n.map(()=>e||I3).splice(0,n.length-1)}function ig({duration:n=300,keyframes:e,times:t,ease:i="easeInOut"}){const r=$z(i)?i.map(Tb):Tb(i),s={done:!1,value:e[0]},o=pF(t&&t.length===e.length?t:hF(e),n),a=q3(o,e,{ease:Array.isArray(r)?r:mF(e,r)});return{calculatedDuration:n,next:l=>(s.value=a(l),s.done=l>=n,s)}}function Z3(n,e){return e?n*(1e3/e):0}const gF=5;function $3(n,e,t){const i=Math.max(e-gF,0);return Z3(t-n(i),e-i)}const Jv=.001,vF=.01,Lb=10,yF=.05,xF=1;function _F({duration:n=800,bounce:e=.25,velocity:t=0,mass:i=1}){let r,s;Vz(n<=Ho(Lb));let o=1-e;o=rl(yF,xF,o),n=rl(vF,Lb,Vs(n)),o<1?(r=f=>{const d=f*o,h=d*n,p=d-t,g=Yx(f,o),y=Math.exp(-h);return Jv-p/g*y},s=f=>{const h=f*o*n,p=h*t+t,g=Math.pow(o,2)*Math.pow(f,2)*n,y=Math.exp(-h),x=Yx(Math.pow(f,2),o);return(-r(f)+Jv>0?-1:1)*((p-g)*y)/x}):(r=f=>{const d=Math.exp(-f*n),h=(f-t)*n+1;return-Jv+d*h},s=f=>{const d=Math.exp(-f*n),h=(t-f)*(n*n);return d*h});const a=5/n,l=SF(r,s,a);if(n=Ho(n),isNaN(l))return{stiffness:100,damping:10,duration:n};{const f=Math.pow(l,2)*i;return{stiffness:f,damping:o*2*Math.sqrt(i*f),duration:n}}}const wF=12;function SF(n,e,t){let i=t;for(let r=1;rn[t]!==void 0)}function bF(n){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...n};if(!Rb(n,AF)&&Rb(n,MF)){const t=_F(n);e={...e,...t,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}function J3({keyframes:n,restDelta:e,restSpeed:t,...i}){const r=n[0],s=n[n.length-1],o={done:!1,value:r},{stiffness:a,damping:l,mass:f,velocity:d,duration:h,isResolvedFromDuration:p}=bF(i),g=d?-Vs(d):0,y=l/(2*Math.sqrt(a*f)),x=s-r,w=Vs(Math.sqrt(a/f)),m=Math.abs(x)<5;t||(t=m?.01:2),e||(e=m?.005:.5);let _;if(y<1){const S=Yx(w,y);_=A=>{const E=Math.exp(-y*w*A);return s-E*((g+y*w*x)/S*Math.sin(S*A)+x*Math.cos(S*A))}}else if(y===1)_=S=>s-Math.exp(-w*S)*(x+(g+w*x)*S);else{const S=w*Math.sqrt(y*y-1);_=A=>{const E=Math.exp(-y*w*A),P=Math.min(S*A,300);return s-E*((g+y*w*x)*Math.sinh(P)+S*x*Math.cosh(P))/S}}return{calculatedDuration:p&&h||null,next:S=>{const A=_(S);if(p)o.done=S>=h;else{let E=g;S!==0&&(y<1?E=$3(_,S,A):E=0);const P=Math.abs(E)<=t,I=Math.abs(s-A)<=e;o.done=P&&I}return o.value=o.done?s:A,o}}}function Ib({keyframes:n,velocity:e=0,power:t=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:f=.5,restSpeed:d}){const h=n[0],p={done:!1,value:h},g=L=>a!==void 0&&Ll,y=L=>a===void 0?l:l===void 0||Math.abs(a-L)-x*Math.exp(-L/i),S=L=>m+_(L),A=L=>{const C=_(L),R=S(L);p.done=Math.abs(C)<=f,p.value=p.done?m:R};let E,P;const I=L=>{g(p.value)&&(E=L,P=J3({keyframes:[p.value,y(p.value)],velocity:$3(S,L,p.value),damping:r,stiffness:s,restDelta:f,restSpeed:d}))};return I(0),{calculatedDuration:null,next:L=>{let C=!1;return!P&&E===void 0&&(C=!0,A(L),I(L)),E!==void 0&&L>E?P.next(L-E):(!C&&A(L),p)}}}const EF=n=>{const e=({timestamp:t})=>n(t);return{start:()=>ln.update(e,!0),stop:()=>Ys(e),now:()=>Gn.isProcessing?Gn.timestamp:performance.now()}},Db=2e4;function kb(n){let e=0;const t=50;let i=n.next(e);for(;!i.done&&e=Db?1/0:e}const TF={decay:Ib,inertia:Ib,tween:ig,keyframes:ig,spring:J3};function rg({autoplay:n=!0,delay:e=0,driver:t=EF,keyframes:i,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:a="loop",onPlay:l,onStop:f,onComplete:d,onUpdate:h,...p}){let g=1,y=!1,x,w;const m=()=>{x&&x(),w=new Promise(re=>{x=re})};m();let _;const S=TF[r]||ig;let A;S!==ig&&typeof i[0]!="number"&&(A=q3([0,100],i,{clamp:!1}),i=[0,100]);const E=S({...p,keyframes:i});let P;a==="mirror"&&(P=S({...p,keyframes:[...i].reverse(),velocity:-(p.velocity||0)}));let I="idle",L=null,C=null,R=null;E.calculatedDuration===null&&s&&(E.calculatedDuration=kb(E));const{calculatedDuration:W}=E;let Z=1/0,X=1/0;W!==null&&(Z=W+o,X=Z*(s+1)-o);let j=0;const Y=re=>{if(C===null)return;g>0&&(C=Math.min(C,re)),L!==null?j=L:j=(re-C)*g;const ee=j-e,ie=ee<0;j=Math.max(ee,0),I==="finished"&&L===null&&(j=X);let ce=j,be=E;if(s){const Be=j/Z;let _e=Math.floor(Be),Me=Be%1;!Me&&Be>=1&&(Me=1),Me===1&&_e--,_e=Math.min(_e,s+1);const ve=!!(_e%2);ve&&(a==="reverse"?(Me=1-Me,o&&(Me-=o/Z)):a==="mirror"&&(be=P));let oe=rl(0,1,Me);j>X&&(oe=a==="reverse"&&ve?1:0),ce=oe*Z}const ge=ie?{done:!1,value:i[0]}:be.next(ce);A&&(ge.value=A(ge.value));let{done:Q}=ge;!ie&&W!==null&&(Q=j>=X);const Fe=L===null&&(I==="finished"||I==="running"&&Q||g<0&&j<=0);return h&&h(ge.value),Fe&&D(),ge},te=()=>{_&&_.stop(),_=void 0},ne=()=>{I="idle",te(),m(),C=R=null},D=()=>{I="finished",d&&d(),te(),m()},B=()=>{if(y)return;_||(_=t(Y));const re=_.now();l&&l(),L!==null?C=re-L:(!C||I==="finished")&&(C=re),R=C,L=null,I="running",_.start()};n&&B();const V={then(re,ee){return w.then(re,ee)},get time(){return Vs(j)},set time(re){re=Ho(re),j=re,L!==null||!_||g===0?L=re:C=_.now()-re/g},get duration(){const re=E.calculatedDuration===null?kb(E):E.calculatedDuration;return Vs(re)},get speed(){return g},set speed(re){re===g||!_||(g=re,V.time=Vs(j))},get state(){return I},play:B,pause:()=>{I="paused",L=j},stop:()=>{y=!0,I!=="idle"&&(I="idle",f&&f(),ne())},cancel:()=>{R!==null&&Y(R),ne()},complete:()=>{I="finished"},sample:re=>(C=0,Y(re))};return V}const CF=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),dp=10,PF=2e4,LF=(n,e)=>e.type==="spring"||n==="backgroundColor"||!T3(e.ease);function RF(n,e,{onUpdate:t,onComplete:i,...r}){if(!(L3.waapi()&&CF.has(e)&&!r.repeatDelay&&r.repeatType!=="mirror"&&r.damping!==0&&r.type!=="inertia"))return!1;let o=!1,a,l;const f=()=>{l=new Promise(m=>{a=m})};f();let{keyframes:d,duration:h=300,ease:p,times:g}=r;if(LF(e,r)){const m=rg({...r,repeat:0,delay:0});let _={done:!1,value:d[0]};const S=[];let A=0;for(;!_.done&&Ay.cancel(),w=()=>{ln.update(x),a(),f()};return y.onfinish=()=>{n.set(Gz(d,r)),i&&i(),w()},{then(m,_){return l.then(m,_)},get time(){return Vs(y.currentTime||0)},set time(m){y.currentTime=Ho(m)},get speed(){return y.playbackRate},set speed(m){y.playbackRate=m},get duration(){return Vs(h)},play:()=>{o||(y.play(),Ys(x))},pause:()=>y.pause(),stop:()=>{if(o=!0,y.playState==="idle")return;const{currentTime:m}=y;if(m){const _=rg({...r,autoplay:!1});n.setWithVelocity(_.sample(m-dp).value,_.sample(m).value,dp)}w()},complete:()=>y.finish(),cancel:w}}function IF({keyframes:n,delay:e,onUpdate:t,onComplete:i}){const r=()=>(t&&t(n[n.length-1]),i&&i(),{time:0,speed:1,duration:0,play:Dn,pause:Dn,stop:Dn,then:s=>(s(),Promise.resolve()),cancel:Dn,complete:Dn});return e?rg({keyframes:[0,1],duration:0,delay:e,onComplete:r}):r()}const DF={type:"spring",stiffness:500,damping:25,restSpeed:10},kF=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),NF={type:"keyframes",duration:.8},OF={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},UF=(n,{keyframes:e})=>e.length>2?NF:pl.has(n)?n.startsWith("scale")?kF(e[1]):DF:OF,qx=(n,e)=>n==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&Yo.test(e)&&!e.startsWith("url(")),zF=new Set(["brightness","contrast","saturate","opacity"]);function FF(n){const[e,t]=n.slice(0,-1).split("(");if(e==="drop-shadow")return n;const[i]=t.match(Fg)||[];if(!i)return n;const r=t.replace(i,"");let s=zF.has(e)?1:0;return i!==t&&(s*=100),e+"("+s+r+")"}const BF=/([a-z-]*)\(.*?\)/g,Zx={...Yo,getAnimatableNone:n=>{const e=n.match(BF);return e?e.map(FF).join(" "):n}},VF={...u3,color:xi,backgroundColor:xi,outlineColor:xi,fill:xi,stroke:xi,borderColor:xi,borderTopColor:xi,borderRightColor:xi,borderBottomColor:xi,borderLeftColor:xi,filter:Zx,WebkitFilter:Zx},dw=n=>VF[n];function hw(n,e){let t=dw(n);return t!==Zx&&(t=Yo),t.getAnimatableNone?t.getAnimatableNone(e):void 0}function HF({when:n,delay:e,delayChildren:t,staggerChildren:i,staggerDirection:r,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:f,...d}){return!!Object.keys(d).length}function Nb(n){return n===0||typeof n=="string"&&parseFloat(n)===0&&n.indexOf(" ")===-1}function Ob(n){return typeof n=="number"?0:hw("",n)}function K3(n,e){return n[e]||n.default||n}function WF(n,[...e]){for(let t=0;tr=>{const s=K3(i,n)||{},o=s.delay||i.delay||0;let{elapsed:a=0}=i;a=a-Ho(o);const l=GF(e,n,t,s),f=l[0],d=l[l.length-1],h=qx(n,f),p=qx(n,d);let g={keyframes:l,velocity:e.getVelocity(),ease:"easeOut",...s,delay:-a,onUpdate:y=>{e.set(y),s.onUpdate&&s.onUpdate(y)},onComplete:()=>{r(),s.onComplete&&s.onComplete()}};if(HF(s)||(g={...g,...UF(n,g)}),g.duration&&(g.duration=Ho(g.duration)),g.repeatDelay&&(g.repeatDelay=Ho(g.repeatDelay)),!h||!p||Hz.current||s.type===!1)return IF(g);if(e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const y=RF(e,n,g);if(y)return y}return rg(g)};function sg(n){return!!(zi(n)&&n.add)}const jF=n=>/^\-?\d*\.?\d+$/.test(n),XF=n=>/^0[^.\s]+$/.test(n);function mw(n,e){n.indexOf(e)===-1&&n.push(e)}function gw(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}class vw{constructor(){this.subscriptions=[]}add(e){return mw(this.subscriptions,e),()=>gw(this.subscriptions,e)}notify(e,t,i){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,i);else for(let s=0;s!isNaN(parseFloat(n));class qF{constructor(e,t={}){this.version="10.12.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(i,r=!0)=>{this.prev=this.current,this.current=i;const{delta:s,timestamp:o}=Gn;this.lastUpdated!==o&&(this.timeDelta=s,this.lastUpdated=o,ln.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>ln.postRender(this.velocityCheck),this.velocityCheck=({timestamp:i})=>{i!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=YF(this.current),this.owner=t.owner}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new vw);const i=this.events[e].add(t);return e==="change"?()=>{i(),ln.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){!t||!this.passiveEffect?this.updateAndNotify(e,t):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,t,i){this.set(t),this.prev=e,this.timeDelta=i}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Z3(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):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.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function jc(n,e){return new qF(n,e)}const Q3=n=>e=>e.test(n),ZF={test:n=>n==="auto",parse:n=>n},eL=[ml,ht,ls,_o,ez,QU,ZF],Hu=n=>eL.find(Q3(n)),$F=[...eL,xi,Yo],JF=n=>$F.find(Q3(n));function KF(n,e,t){n.hasValue(e)?n.getValue(e).set(t):n.addValue(e,jc(t))}function QF(n,e){const t=Hg(n,e);let{transitionEnd:i={},transition:r={},...s}=t?n.makeTargetAnimatable(t,!1):{};s={...s,...i};for(const o in s){const a=pz(s[o]);KF(n,o,a)}}function e4(n,e,t){var i,r;const s=Object.keys(e).filter(a=>!n.hasValue(a)),o=s.length;if(o)for(let a=0;al.remove(h))),f.push(x)}return o&&Promise.all(f).then(()=>{o&&QF(n,o)}),f}function $x(n,e,t={}){const i=Hg(n,e,t.custom);let{transition:r=n.getDefaultTransition()||{}}=i||{};t.transitionOverride&&(r=t.transitionOverride);const s=i?()=>Promise.all(tL(n,i,t)):()=>Promise.resolve(),o=n.variantChildren&&n.variantChildren.size?(l=0)=>{const{delayChildren:f=0,staggerChildren:d,staggerDirection:h}=r;return r4(n,e,f+l,d,h,t)}:()=>Promise.resolve(),{when:a}=r;if(a){const[l,f]=a==="beforeChildren"?[s,o]:[o,s];return l().then(()=>f())}else return Promise.all([s(),o(t.delay)])}function r4(n,e,t=0,i=0,r=1,s){const o=[],a=(n.variantChildren.size-1)*i,l=r===1?(f=0)=>f*i:(f=0)=>a-f*i;return Array.from(n.variantChildren).sort(s4).forEach((f,d)=>{f.notify("AnimationStart",e),o.push($x(f,e,{...s,delay:t+l(d)}).then(()=>f.notify("AnimationComplete",e)))}),Promise.all(o)}function s4(n,e){return n.sortNodePosition(e)}function o4(n,e,t={}){n.notify("AnimationStart",e);let i;if(Array.isArray(e)){const r=e.map(s=>$x(n,s,t));i=Promise.all(r)}else if(typeof e=="string")i=$x(n,e,t);else{const r=typeof e=="function"?Hg(n,e,t.custom):e;i=Promise.all(tL(n,r,t))}return i.then(()=>n.notify("AnimationComplete",e))}const a4=[...K1].reverse(),l4=K1.length;function c4(n){return e=>Promise.all(e.map(({animation:t,options:i})=>o4(n,t,i)))}function u4(n){let e=c4(n);const t=d4();let i=!0;const r=(l,f)=>{const d=Hg(n,f);if(d){const{transition:h,transitionEnd:p,...g}=d;l={...l,...g,...p}}return l};function s(l){e=l(n)}function o(l,f){const d=n.getProps(),h=n.getVariantContext(!0)||{},p=[],g=new Set;let y={},x=1/0;for(let m=0;mx&&E;const R=Array.isArray(A)?A:[A];let W=R.reduce(r,{});P===!1&&(W={});const{prevResolvedValues:Z={}}=S,X={...Z,...W},j=Y=>{C=!0,g.delete(Y),S.needsAnimating[Y]=!0};for(const Y in X){const te=W[Y],ne=Z[Y];y.hasOwnProperty(Y)||(te!==ne?tg(te)&&tg(ne)?!b3(te,ne)||L?j(Y):S.protectedKeys[Y]=!0:te!==void 0?j(Y):g.add(Y):te!==void 0&&g.has(Y)?j(Y):S.protectedKeys[Y]=!0)}S.prevProp=A,S.prevResolvedValues=W,S.isActive&&(y={...y,...W}),i&&n.blockInitialAnimation&&(C=!1),C&&!I&&p.push(...R.map(Y=>({animation:Y,options:{type:_,...l}})))}if(g.size){const m={};g.forEach(_=>{const S=n.getBaseTarget(_);S!==void 0&&(m[_]=S)}),p.push({animation:m})}let w=!!p.length;return i&&d.initial===!1&&!n.manuallyAnimateOnMount&&(w=!1),i=!1,w?e(p):Promise.resolve()}function a(l,f,d){var h;if(t[l].isActive===f)return Promise.resolve();(h=n.variantChildren)===null||h===void 0||h.forEach(g=>{var y;return(y=g.animationState)===null||y===void 0?void 0:y.setActive(l,f)}),t[l].isActive=f;const p=o(d,l);for(const g in t)t[g].protectedKeys={};return p}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>t}}function f4(n,e){return typeof e=="string"?e!==n:Array.isArray(e)?!b3(e,n):!1}function xa(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function d4(){return{animate:xa(!0),whileInView:xa(),whileHover:xa(),whileTap:xa(),whileDrag:xa(),whileFocus:xa(),exit:xa()}}class h4 extends ra{constructor(e){super(e),e.animationState||(e.animationState=u4(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),Ug(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){}}let p4=0;class m4 extends ra{constructor(){super(...arguments),this.id=p4++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t,custom:i}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const s=this.node.animationState.setActive("exit",!e,{custom:i??this.node.getProps().custom});t&&!e&&s.then(()=>t(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const g4={animation:{Feature:h4},exit:{Feature:m4}},Ub=(n,e)=>Math.abs(n-e);function v4(n,e){const t=Ub(n.x,e.x),i=Ub(n.y,e.y);return Math.sqrt(t**2+i**2)}class nL{constructor(e,t,{transformPagePoint:i}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Qv(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=v4(f.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:p}=f,{timestamp:g}=Gn;this.history.push({...p,timestamp:g});const{onStart:y,onMove:x}=this.handlers;d||(y&&y(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,f)},this.handlePointerMove=(f,d)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Kv(d,this.transformPagePoint),ln.update(this.updatePoint,!0)},this.handlePointerUp=(f,d)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:h,onSessionEnd:p}=this.handlers,g=Qv(f.type==="pointercancel"?this.lastMoveEventInfo:Kv(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,g),p&&p(f,g)},!x3(e))return;this.handlers=t,this.transformPagePoint=i;const r=Bg(e),s=Kv(r,this.transformPagePoint),{point:o}=s,{timestamp:a}=Gn;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=t;l&&l(e,Qv(s,this.history)),this.removeListeners=Vo(Bs(window,"pointermove",this.handlePointerMove),Bs(window,"pointerup",this.handlePointerUp),Bs(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Ys(this.updatePoint)}}function Kv(n,e){return e?{point:e(n.point)}:n}function zb(n,e){return{x:n.x-e.x,y:n.y-e.y}}function Qv({point:n},e){return{point:n,delta:zb(n,iL(e)),offset:zb(n,y4(e)),velocity:x4(e,.1)}}function y4(n){return n[0]}function iL(n){return n[n.length-1]}function x4(n,e){if(n.length<2)return{x:0,y:0};let t=n.length-1,i=null;const r=iL(n);for(;t>=0&&(i=n[t],!(r.timestamp-i.timestamp>Ho(e)));)t--;if(!i)return{x:0,y:0};const s=Vs(r.timestamp-i.timestamp);if(s===0)return{x:0,y:0};const o={x:(r.x-i.x)/s,y:(r.y-i.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function tr(n){return n.max-n.min}function Jx(n,e=0,t=.01){return Math.abs(n-e)<=t}function Fb(n,e,t,i=.5){n.origin=i,n.originPoint=on(e.min,e.max,n.origin),n.scale=tr(t)/tr(e),(Jx(n.scale,1,1e-4)||isNaN(n.scale))&&(n.scale=1),n.translate=on(t.min,t.max,n.origin)-n.originPoint,(Jx(n.translate)||isNaN(n.translate))&&(n.translate=0)}function bf(n,e,t,i){Fb(n.x,e.x,t.x,i?i.originX:void 0),Fb(n.y,e.y,t.y,i?i.originY:void 0)}function Bb(n,e,t){n.min=t.min+e.min,n.max=n.min+tr(e)}function _4(n,e,t){Bb(n.x,e.x,t.x),Bb(n.y,e.y,t.y)}function Vb(n,e,t){n.min=e.min-t.min,n.max=n.min+tr(e)}function Ef(n,e,t){Vb(n.x,e.x,t.x),Vb(n.y,e.y,t.y)}function w4(n,{min:e,max:t},i){return e!==void 0&&nt&&(n=i?on(t,n,i.max):Math.min(n,t)),n}function Hb(n,e,t){return{min:e!==void 0?n.min+e:void 0,max:t!==void 0?n.max+t-(n.max-n.min):void 0}}function S4(n,{top:e,left:t,bottom:i,right:r}){return{x:Hb(n.x,t,r),y:Hb(n.y,e,i)}}function Wb(n,e){let t=e.min-n.min,i=e.max-n.max;return e.max-e.mini?t=Qf(e.min,e.max-i,n.min):i>r&&(t=Qf(n.min,n.max-r,e.min)),rl(0,1,t)}function b4(n,e){const t={};return e.min!==void 0&&(t.min=e.min-n.min),e.max!==void 0&&(t.max=e.max-n.min),t}const Kx=.35;function E4(n=Kx){return n===!1?n=0:n===!0&&(n=Kx),{x:Gb(n,"left","right"),y:Gb(n,"top","bottom")}}function Gb(n,e,t){return{min:jb(n,e),max:jb(n,t)}}function jb(n,e){return typeof n=="number"?n:n[e]||0}const Xb=()=>({translate:0,scale:1,origin:0,originPoint:0}),Tf=()=>({x:Xb(),y:Xb()}),Yb=()=>({min:0,max:0}),Cn=()=>({x:Yb(),y:Yb()});function rs(n){return[n("x"),n("y")]}function rL({top:n,left:e,right:t,bottom:i}){return{x:{min:e,max:t},y:{min:n,max:i}}}function T4({x:n,y:e}){return{top:e.min,right:n.max,bottom:e.max,left:n.min}}function C4(n,e){if(!e)return n;const t=e({x:n.left,y:n.top}),i=e({x:n.right,y:n.bottom});return{top:t.y,left:t.x,bottom:i.y,right:i.x}}function ey(n){return n===void 0||n===1}function Qx({scale:n,scaleX:e,scaleY:t}){return!ey(n)||!ey(e)||!ey(t)}function La(n){return Qx(n)||sL(n)||n.z||n.rotate||n.rotateX||n.rotateY}function sL(n){return qb(n.x)||qb(n.y)}function qb(n){return n&&n!=="0%"}function og(n,e,t){const i=n-t,r=e*i;return t+r}function Zb(n,e,t,i,r){return r!==void 0&&(n=og(n,r,i)),og(n,t,i)+e}function e_(n,e=0,t=1,i,r){n.min=Zb(n.min,e,t,i,r),n.max=Zb(n.max,e,t,i,r)}function oL(n,{x:e,y:t}){e_(n.x,e.translate,e.scale,e.originPoint),e_(n.y,t.translate,t.scale,t.originPoint)}function P4(n,e,t,i=!1){const r=t.length;if(!r)return;e.x=e.y=1;let s,o;for(let a=0;a1.0000000000001||n<.999999999999?n:1}function Mo(n,e){n.min=n.min+e,n.max=n.max+e}function Jb(n,e,[t,i,r]){const s=e[r]!==void 0?e[r]:.5,o=on(n.min,n.max,s);e_(n,e[t],e[i],o,e.scale)}const L4=["x","scaleX","originX"],R4=["y","scaleY","originY"];function _c(n,e){Jb(n.x,e,L4),Jb(n.y,e,R4)}function aL(n,e){return rL(C4(n.getBoundingClientRect(),e))}function I4(n,e,t){const i=aL(n,t),{scroll:r}=e;return r&&(Mo(i.x,r.offset.x),Mo(i.y,r.offset.y)),i}const D4=new WeakMap;class k4{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Cn(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=l=>{this.stopAnimation(),t&&this.snapToCursor(Bg(l,"page").point)},s=(l,f)=>{const{drag:d,dragPropagation:h,onDragStart:p}=this.getProps();if(d&&!h&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=w3(d),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),rs(y=>{let x=this.getAxisMotionValue(y).get()||0;if(ls.test(x)){const{projection:w}=this.visualElement;if(w&&w.layout){const m=w.layout.layoutBox[y];m&&(x=tr(m)*(parseFloat(x)/100))}}this.originPoint[y]=x}),p&&ln.update(()=>p(l,f),!1,!0);const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},o=(l,f)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:p,onDrag:g}=this.getProps();if(!d&&!this.openGlobalLock)return;const{offset:y}=f;if(h&&this.currentDirection===null){this.currentDirection=N4(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),g&&g(l,f)},a=(l,f)=>this.stop(l,f);this.panSession=new nL(e,{onSessionStart:r,onStart:s,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,t){const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:s}=this.getProps();s&&ln.update(()=>s(e,t))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,i){const{drag:r}=this.getProps();if(!i||!hp(e,r,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(o=w4(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),{layout:i}=this.visualElement.projection||{},r=this.constraints;e&&yc(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&i?this.constraints=S4(i.layoutBox,e):this.constraints=!1,this.elastic=E4(t),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&rs(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=b4(i.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!yc(e))return!1;const i=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const s=I4(i,r.root,this.visualElement.getTransformPagePoint());let o=M4(r.layout.layoutBox,s);if(t){const a=t(T4(o));this.hasMutatedConstraints=!!a,a&&(o=rL(a))}return o}startAnimation(e){const{drag:t,dragMomentum:i,dragElastic:r,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},f=rs(d=>{if(!hp(d,t,this.currentDirection))return;let h=l&&l[d]||{};o&&(h={min:0,max:0});const p=r?200:1e6,g=r?40:1e7,y={type:"inertia",velocity:i?e[d]:0,bounceStiffness:p,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...s,...h};return this.startAxisValueAnimation(d,y)});return Promise.all(f).then(a)}startAxisValueAnimation(e,t){const i=this.getAxisMotionValue(e);return i.start(pw(e,i,0,t))}stopAnimation(){rs(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const t="_drag"+e.toUpperCase(),i=this.visualElement.getProps(),r=i[t];return r||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){rs(t=>{const{drag:i}=this.getProps();if(!hp(t,i,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(t);if(r&&r.layout){const{min:o,max:a}=r.layout.layoutBox[t];s.set(e[t]-on(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:i}=this.visualElement;if(!yc(t)||!i||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};rs(o=>{const a=this.getAxisMotionValue(o);if(a){const l=a.get();r[o]=A4({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),rs(o=>{if(!hp(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:f}=this.constraints[o];a.set(on(l,f,r[o]))})}addListeners(){if(!this.visualElement.current)return;D4.set(this.visualElement,this);const e=this.visualElement.current,t=Bs(e,"pointerdown",l=>{const{drag:f,dragListener:d=!0}=this.getProps();f&&d&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();yc(l)&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,s=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),i();const o=Us(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",({delta:l,hasLayoutChanged:f})=>{this.isDragging&&f&&(rs(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=l[d].translate,h.set(h.get()+l[d].translate))}),this.visualElement.render())});return()=>{o(),t(),s(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:o=Kx,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:i,dragPropagation:r,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function hp(n,e,t){return(e===!0||e===n)&&(t===null||t===n)}function N4(n,e=10){let t=null;return Math.abs(n.y)>e?t="y":Math.abs(n.x)>e&&(t="x"),t}class O4 extends ra{constructor(e){super(e),this.removeGroupControls=Dn,this.removeListeners=Dn,this.controls=new k4(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Dn}unmount(){this.removeGroupControls(),this.removeListeners()}}const Kb=n=>(e,t)=>{n&&ln.update(()=>n(e,t))};class U4 extends ra{constructor(){super(...arguments),this.removePointerDownListener=Dn}onPointerDown(e){this.session=new nL(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:Kb(e),onStart:Kb(t),onMove:i,onEnd:(s,o)=>{delete this.session,r&&ln.update(()=>r(s,o))}}}mount(){this.removePointerDownListener=Bs(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function z4(){const n=N.useContext(J1);if(n===null)return[!0,null];const{isPresent:e,onExitComplete:t,register:i}=n,r=N.useId();return N.useEffect(()=>i(r),[]),!e&&t?[!1,()=>t&&t(r)]:[!0]}function Qb(n,e){return e.max===e.min?0:n/(e.max-e.min)*100}const Wu={correct:(n,e)=>{if(!e.target)return n;if(typeof n=="string")if(ht.test(n))n=parseFloat(n);else return n;const t=Qb(n,e.target.x),i=Qb(n,e.target.y);return`${t}% ${i}%`}},F4={correct:(n,{treeScale:e,projectionDelta:t})=>{const i=n,r=Yo.parse(n);if(r.length>5)return i;const s=Yo.createTransformer(n),o=typeof r[0]!="number"?1:0,a=t.x.scale*e.x,l=t.y.scale*e.y;r[0+o]/=a,r[1+o]/=l;const f=on(a,l,.5);return typeof r[2+o]=="number"&&(r[2+o]/=f),typeof r[3+o]=="number"&&(r[3+o]/=f),s(r)}};class B4 extends yr.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:i,layoutId:r}=this.props,{projection:s}=e;XU(V4),s&&(t.group&&t.group.add(s),i&&i.register&&r&&i.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Sf.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:i,drag:r,isPresent:s}=this.props,o=i.projection;return o&&(o.isPresent=s,r||e.layoutDependency!==t||t===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||ln.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:i}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),i&&i.deregister&&i.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function lL(n){const[e,t]=z4(),i=N.useContext(r3);return yr.createElement(B4,{...n,layoutGroup:i,switchLayoutGroup:N.useContext(s3),isPresent:e,safeToRemove:t})}const V4={borderRadius:{...Wu,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Wu,borderTopRightRadius:Wu,borderBottomLeftRadius:Wu,borderBottomRightRadius:Wu,boxShadow:F4},cL=["TopLeft","TopRight","BottomLeft","BottomRight"],H4=cL.length,eE=n=>typeof n=="string"?parseFloat(n):n,tE=n=>typeof n=="number"||ht.test(n);function W4(n,e,t,i,r,s){r?(n.opacity=on(0,t.opacity!==void 0?t.opacity:1,G4(i)),n.opacityExit=on(e.opacity!==void 0?e.opacity:1,0,j4(i))):s&&(n.opacity=on(e.opacity!==void 0?e.opacity:1,t.opacity!==void 0?t.opacity:1,i));for(let o=0;oie?1:t(Qf(n,e,i))}function iE(n,e){n.min=e.min,n.max=e.max}function hr(n,e){iE(n.x,e.x),iE(n.y,e.y)}function rE(n,e,t,i,r){return n-=e,n=og(n,1/t,i),r!==void 0&&(n=og(n,1/r,i)),n}function X4(n,e=0,t=1,i=.5,r,s=n,o=n){if(ls.test(e)&&(e=parseFloat(e),e=on(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=on(s.min,s.max,i);n===s&&(a-=e),n.min=rE(n.min,e,t,a,r),n.max=rE(n.max,e,t,a,r)}function sE(n,e,[t,i,r],s,o){X4(n,e[t],e[i],e[r],e.scale,s,o)}const Y4=["x","scaleX","originX"],q4=["y","scaleY","originY"];function oE(n,e,t,i){sE(n.x,e,Y4,t?t.x:void 0,i?i.x:void 0),sE(n.y,e,q4,t?t.y:void 0,i?i.y:void 0)}function aE(n){return n.translate===0&&n.scale===1}function fL(n){return aE(n.x)&&aE(n.y)}function t_(n,e){return n.x.min===e.x.min&&n.x.max===e.x.max&&n.y.min===e.y.min&&n.y.max===e.y.max}function lE(n){return tr(n.x)/tr(n.y)}class Z4{constructor(){this.members=[]}add(e){mw(this.members,e),e.scheduleRender()}remove(e){if(gw(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(e){const t=this.members.findIndex(r=>e===r);if(t===0)return!1;let i;for(let r=t;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1){i=s;break}}return i?(this.promote(i),!0):!1}promote(e,t){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,t&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;r===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:i}=e;t.onExitComplete&&t.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function cE(n,e,t){let i="";const r=n.x.translate/e.x,s=n.y.translate/e.y;if((r||s)&&(i=`translate3d(${r}px, ${s}px, 0) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),t){const{rotate:l,rotateX:f,rotateY:d}=t;l&&(i+=`rotate(${l}deg) `),f&&(i+=`rotateX(${f}deg) `),d&&(i+=`rotateY(${d}deg) `)}const o=n.x.scale*e.x,a=n.y.scale*e.y;return(o!==1||a!==1)&&(i+=`scale(${o}, ${a})`),i||"none"}const $4=(n,e)=>n.depth-e.depth;class J4{constructor(){this.children=[],this.isDirty=!1}add(e){mw(this.children,e),this.isDirty=!0}remove(e){gw(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort($4),this.isDirty=!1,this.children.forEach(e)}}function K4(n,e){const t=performance.now(),i=({timestamp:r})=>{const s=r-t;s>=e&&(Ys(i),n(s-e))};return ln.read(i,!0),()=>Ys(i)}function Q4(n){window.MotionDebug&&window.MotionDebug.record(n)}function eB(n){return n instanceof SVGElement&&n.tagName!=="svg"}function tB(n,e,t){const i=zi(n)?n:jc(n);return i.start(pw("",i,e,t)),i.animation}const uE=["","X","Y","Z"],fE=1e3;let nB=0;const Ra={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function dL({attachResizeListener:n,defaultParent:e,measureScroll:t,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(o,a={},l=e==null?void 0:e()){this.id=nB++,this.animationId=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.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{Ra.totalNodes=Ra.resolvedTargetDeltas=Ra.recalculatedProjection=0,this.nodes.forEach(sB),this.nodes.forEach(cB),this.nodes.forEach(uB),this.nodes.forEach(oB),Q4(Ra)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=o,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(let f=0;fthis.root.updateBlockedByResize=!1;n(o,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=K4(p,250),Sf.hasAnimatedSinceResize&&(Sf.hasAnimatedSinceResize=!1,this.nodes.forEach(hE))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||f)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:p,hasRelativeTargetChanged:g,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||d.getDefaultTransition()||mB,{onLayoutAnimationStart:w,onLayoutAnimationComplete:m}=d.getProps(),_=!this.targetLayout||!t_(this.targetLayout,y)||g,S=!p&&g;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||S||p&&(_||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,S);const A={...K3(x,"layout"),onPlay:w,onComplete:m};(d.shouldReduceMotion||this.options.layoutRoot)&&(A.delay=0,A.type=!1),this.startAnimation(A)}else!p&&this.animationProgress===0&&hE(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ys(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.forEach(fB),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const E=A/1e3;pE(h.x,o.x,E),pE(h.y,o.y,E),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ef(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),hB(this.relativeTarget,this.relativeTargetOrigin,p,E),S&&t_(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=Cn()),hr(S,this.relativeTarget)),x&&(this.animationValues=d,W4(d,f,this.latestValues,E,_,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ys(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ln.update(()=>{Sf.hasAnimatedSinceResize=!0,this.currentAnimation=tB(0,fE,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(fE),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:f,latestValues:d}=o;if(!(!a||!l||!f)){if(this!==o&&this.layout&&f&&hL(this.options.animationType,this.layout.layoutBox,f.layoutBox)){l=this.target||Cn();const h=tr(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const p=tr(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+p}hr(a,l),_c(a,d),bf(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Z4),this.sharedNodes.get(o).add(a);const f=a.options.initialPromotionConfig;a.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const f=this.getStack();f&&f.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const f={};for(let d=0;d{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(dE),this.root.sharedNodes.clear()}}}function iB(n){n.updateLayout()}function rB(n){var e;const t=((e=n.resumeFrom)===null||e===void 0?void 0:e.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&t&&n.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:r}=n.layout,{animationType:s}=n.options,o=t.source!==n.layout.source;s==="size"?rs(h=>{const p=o?t.measuredBox[h]:t.layoutBox[h],g=tr(p);p.min=i[h].min,p.max=p.min+g}):hL(s,t.layoutBox,i)&&rs(h=>{const p=o?t.measuredBox[h]:t.layoutBox[h],g=tr(i[h]);p.max=p.min+g,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[h].max=n.relativeTarget[h].min+g)});const a=Tf();bf(a,i,t.layoutBox);const l=Tf();o?bf(l,n.applyTransform(r,!0),t.measuredBox):bf(l,i,t.layoutBox);const f=!fL(a);let d=!1;if(!n.resumeFrom){const h=n.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:p,layout:g}=h;if(p&&g){const y=Cn();Ef(y,t.layoutBox,p.layoutBox);const x=Cn();Ef(x,i,g.layoutBox),t_(y,x)||(d=!0),h.options.layoutRoot&&(n.relativeTarget=x,n.relativeTargetOrigin=y,n.relativeParent=h)}}}n.notifyListeners("didUpdate",{layout:i,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:f,hasRelativeTargetChanged:d})}else if(n.isLead()){const{onExitComplete:i}=n.options;i&&i()}n.options.transition=void 0}function sB(n){Ra.totalNodes++,n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function oB(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function aB(n){n.clearSnapshot()}function dE(n){n.clearMeasurements()}function lB(n){const{visualElement:e}=n.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),n.resetTransform()}function hE(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0}function cB(n){n.resolveTargetDelta()}function uB(n){n.calcProjection()}function fB(n){n.resetRotation()}function dB(n){n.removeLeadSnapshot()}function pE(n,e,t){n.translate=on(e.translate,0,t),n.scale=on(e.scale,1,t),n.origin=e.origin,n.originPoint=e.originPoint}function mE(n,e,t,i){n.min=on(e.min,t.min,i),n.max=on(e.max,t.max,i)}function hB(n,e,t,i){mE(n.x,e.x,t.x,i),mE(n.y,e.y,t.y,i)}function pB(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const mB={duration:.45,ease:[.4,0,.1,1]};function gB(n,e){let t=n.root;for(let s=n.path.length-1;s>=0;s--)if(n.path[s].instance){t=n.path[s];break}const r=(t&&t!==n.root?t.instance:document).querySelector(`[data-projection-id="${e}"]`);r&&n.mount(r,!0)}function gE(n){n.min=Math.round(n.min),n.max=Math.round(n.max)}function vB(n){gE(n.x),gE(n.y)}function hL(n,e,t){return n==="position"||n==="preserve-aspect"&&!Jx(lE(e),lE(t),.2)}const yB=dL({attachResizeListener:(n,e)=>Us(n,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ty={current:void 0},pL=dL({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!ty.current){const n=new yB(0,{});n.mount(window),n.setOptions({layoutScroll:!0}),ty.current=n}return ty.current},resetTransform:(n,e)=>{n.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),xB={pan:{Feature:U4},drag:{Feature:O4,ProjectionNode:pL,MeasureLayout:lL}},_B=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function wB(n){const e=_B.exec(n);if(!e)return[,];const[,t,i]=e;return[t,i]}function n_(n,e,t=1){const[i,r]=wB(n);if(!i)return;const s=window.getComputedStyle(e).getPropertyValue(i);return s?s.trim():Wx(r)?n_(r,e,t+1):r}function SB(n,{...e},t){const i=n.current;if(!(i instanceof Element))return{target:e,transitionEnd:t};t&&(t={...t}),n.values.forEach(r=>{const s=r.get();if(!Wx(s))return;const o=n_(s,i);o&&r.set(o)});for(const r in e){const s=e[r];if(!Wx(s))continue;const o=n_(s,i);o&&(e[r]=o,t||(t={}),t[r]===void 0&&(t[r]=s))}return{target:e,transitionEnd:t}}const MB=new Set(["width","height","top","left","right","bottom","x","y"]),mL=n=>MB.has(n),AB=n=>Object.keys(n).some(mL),vE=n=>n===ml||n===ht,yE=(n,e)=>parseFloat(n.split(", ")[e]),xE=(n,e)=>(t,{transform:i})=>{if(i==="none"||!i)return 0;const r=i.match(/^matrix3d\((.+)\)$/);if(r)return yE(r[1],e);{const s=i.match(/^matrix\((.+)\)$/);return s?yE(s[1],n):0}},bB=new Set(["x","y","z"]),EB=Td.filter(n=>!bB.has(n));function TB(n){const e=[];return EB.forEach(t=>{const i=n.getValue(t);i!==void 0&&(e.push([t,i.get()]),i.set(t.startsWith("scale")?1:0))}),e.length&&n.render(),e}const _E={width:({x:n},{paddingLeft:e="0",paddingRight:t="0"})=>n.max-n.min-parseFloat(e)-parseFloat(t),height:({y:n},{paddingTop:e="0",paddingBottom:t="0"})=>n.max-n.min-parseFloat(e)-parseFloat(t),top:(n,{top:e})=>parseFloat(e),left:(n,{left:e})=>parseFloat(e),bottom:({y:n},{top:e})=>parseFloat(e)+(n.max-n.min),right:({x:n},{left:e})=>parseFloat(e)+(n.max-n.min),x:xE(4,13),y:xE(5,14)},CB=(n,e,t)=>{const i=e.measureViewportBox(),r=e.current,s=getComputedStyle(r),{display:o}=s,a={};o==="none"&&e.setStaticValue("display",n.display||"block"),t.forEach(f=>{a[f]=_E[f](i,s)}),e.render();const l=e.measureViewportBox();return t.forEach(f=>{const d=e.getValue(f);d&&d.jump(a[f]),n[f]=_E[f](l,s)}),n},PB=(n,e,t={},i={})=>{e={...e},i={...i};const r=Object.keys(e).filter(mL);let s=[],o=!1;const a=[];if(r.forEach(l=>{const f=n.getValue(l);if(!n.hasValue(l))return;let d=t[l],h=Hu(d);const p=e[l];let g;if(tg(p)){const y=p.length,x=p[0]===null?1:0;d=p[x],h=Hu(d);for(let w=x;w=0?window.pageYOffset:null,f=CB(e,n,a);return s.length&&s.forEach(([d,h])=>{n.getValue(d).set(h)}),n.render(),Og&&l!==null&&window.scrollTo({top:l}),{target:f,transitionEnd:i}}else return{target:e,transitionEnd:i}};function LB(n,e,t,i){return AB(e)?PB(n,e,t,i):{target:e,transitionEnd:i}}const RB=(n,e,t,i)=>{const r=SB(n,e,i);return e=r.target,i=r.transitionEnd,LB(n,e,t,i)},i_={current:null},gL={current:!1};function IB(){if(gL.current=!0,!!Og)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),e=()=>i_.current=n.matches;n.addListener(e),e()}else i_.current=!1}function DB(n,e,t){const{willChange:i}=e;for(const r in e){const s=e[r],o=t[r];if(zi(s))n.addValue(r,s),sg(i)&&i.add(r);else if(zi(o))n.addValue(r,jc(s,{owner:n})),sg(i)&&i.remove(r);else if(o!==s)if(n.hasValue(r)){const a=n.getValue(r);!a.hasAnimated&&a.set(s)}else{const a=n.getStaticValue(r);n.addValue(r,jc(a!==void 0?a:s,{owner:n}))}}for(const r in t)e[r]===void 0&&n.removeValue(r);return e}const wE=new WeakMap,vL=Object.keys(Jf),kB=vL.length,SE=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],NB=Q1.length;class OB{constructor({parent:e,props:t,presenceContext:i,reducedMotionConfig:r,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},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.scheduleRender=()=>ln.render(this.render,!1,!0);const{latestValues:a,renderState:l}=s;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.isControllingVariants=zg(t),this.isVariantNode=n3(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:f,...d}=this.scrapeMotionValuesFromProps(t,{});for(const h in d){const p=d[h];a[h]!==void 0&&zi(p)&&(p.set(a[h],!1),sg(f)&&f.add(h))}}scrapeMotionValuesFromProps(e,t){return{}}mount(e){this.current=e,wE.set(e,this),this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,i)=>this.bindToMotionValue(i,t)),gL.current||IB(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:i_.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){wE.delete(this.current),this.projection&&this.projection.unmount(),Ys(this.notifyUpdate),Ys(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,t){const i=pl.has(e),r=t.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&ln.update(this.notifyUpdate,!1,!0),i&&this.projection&&(this.projection.isTransformDirty=!0)}),s=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{r(),s()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...t},i,r,s,o){let a,l;for(let f=0;fthis.scheduleRender(),animationType:typeof d=="string"?d:"both",initialPromotionConfig:o,layoutScroll:g,layoutRoot:y})}return l}updateFeatures(){for(const e in this.features){const t=this.features[e];t.isMounted?t.update(this.props,this.prevProps):(t.mount(),t.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Cn()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}makeTargetAnimatable(e,t=!0){return this.makeTargetAnimatableFromInstance(e,this.props,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 i=0;it.variantChildren.delete(e)}addValue(e,t){t!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,t)),this.values.set(e,t),this.latestValues[e]=t.get()}removeValue(e){this.values.delete(e);const 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 i=this.values.get(e);return i===void 0&&t!==void 0&&(i=jc(t,{owner:this}),this.addValue(e,i)),i}readValue(e){return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:i}=this.props,r=typeof i=="string"||typeof i=="object"?(t=aw(this.props,i))===null||t===void 0?void 0:t[e]:void 0;if(i&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!zi(s)?s:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new vw),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class yL extends OB{sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:i}){delete t[e],delete i[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:t,...i},{transformValues:r},s){let o=n4(i,e||{},this);if(r&&(t&&(t=r(t)),i&&(i=r(i)),o&&(o=r(o))),s){e4(this,i,o);const a=RB(this,i,o,t);t=a.transitionEnd,i=a.target}return{transition:e,transitionEnd:t,...i}}}function UB(n){return window.getComputedStyle(n)}class zB extends yL{readValueFromInstance(e,t){if(pl.has(t)){const i=dw(t);return i&&i.default||0}else{const i=UB(e),r=(l3(t)?i.getPropertyValue(t):i[t])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return aL(e,t)}build(e,t,i,r){tw(e,t,i,r.transformTemplate)}scrapeMotionValuesFromProps(e,t){return ow(e,t)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;zi(e)&&(this.childSubscription=e.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}renderInstance(e,t,i,r){p3(e,t,i,r)}}class FB extends yL{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(pl.has(t)){const i=dw(t);return i&&i.default||0}return t=m3.has(t)?t:sw(t),e.getAttribute(t)}measureInstanceViewportBox(){return Cn()}scrapeMotionValuesFromProps(e,t){return v3(e,t)}build(e,t,i,r){iw(e,t,i,this.isSVGTag,r.transformTemplate)}renderInstance(e,t,i,r){g3(e,t,i,r)}mount(e){this.isSVGTag=rw(e.tagName),super.mount(e)}}const BB=(n,e)=>ew(n)?new FB(e,{enableHardwareAcceleration:!1}):new zB(e,{enableHardwareAcceleration:!0}),VB={layout:{ProjectionNode:pL,MeasureLayout:lL}},HB={...g4,...Oz,...xB,...VB},On=GU((n,e)=>xz(n,e,HB,BB)),$t={paddingX:"sm:px-16 px-6",paddingY:"sm:py-16 py-6",padding:"sm:px-16 px-6 sm:py-16 py-10",heroHeadText:"font-black text-[#373737] lg:text-[80px] sm:text-[60px] xs:text-[50px] text-[40px] lg:leading-[98px] mt-2",heroSubText:"text-[#dfd9ff] font-medium lg:text-[30px] sm:text-[26px] xs:text-[20px] text-[16px] lg:leading-[40px]",sectionHeadText:"text-black font-black md:text-[60px] sm:text-[50px] xs:text-[40px] text-[30px]",sectionSubText:"sm:text-[18px] text-[14px] text-secondary uppercase tracking-wider"},WB="/portfolio-react-threejs/assets/web-0c6824d5.webp",GB="/portfolio-react-threejs/assets/mobile-84df6906.webp",jB="/portfolio-react-threejs/assets/creator-ab86683b.webp",XB="/portfolio-react-threejs/assets/csi-1f769921.webp",YB="/portfolio-react-threejs/assets/msc-abe50c5d.webp",qB="/portfolio-react-threejs/assets/techyv-adede69e.webp",ZB="/portfolio-react-threejs/assets/shapeout-d15c331a.webp",$B="/portfolio-react-threejs/assets/facedetection-65dc0246.webp",JB="/portfolio-react-threejs/assets/Hi-783be2bb.webp",KB="/portfolio-react-threejs/assets/langgo-41707292.webp",QB="/portfolio-react-threejs/assets/lifeoverseas-fd137d40.webp",e5="/portfolio-react-threejs/assets/velox-429d856c.webp",t5="/portfolio-react-threejs/assets/yolo-9ff20b51.webp",n5="/portfolio-react-threejs/assets/anon_exchange-3f3d612c.webp",i5="/portfolio-react-threejs/assets/banana_class-8925bee5.webp",r5="/portfolio-react-threejs/assets/convogen-ba953cbd.webp",s5="/portfolio-react-threejs/assets/1-710ab004.webp",o5="/portfolio-react-threejs/assets/2-bd31252c.webp",a5="/portfolio-react-threejs/assets/3-da0bbfbc.webp",l5="/portfolio-react-threejs/assets/4-8d092131.webp",c5="/portfolio-react-threejs/assets/5-b3191ff5.webp",u5="/portfolio-react-threejs/assets/6-b412236c.webp",f5="/portfolio-react-threejs/assets/7-21761f9b.webp",d5="/portfolio-react-threejs/assets/8-b4888019.webp",h5="/portfolio-react-threejs/assets/9-22d557f1.webp",p5="/portfolio-react-threejs/assets/1-bc4e4556.webp",m5="/portfolio-react-threejs/assets/2-466546d5.webp",g5="/portfolio-react-threejs/assets/1-c8ded170.webp",ME=[{id:"",title:"Home",type:"route"},{id:"projects",title:"Projects",type:"route"},{id:"skills",title:"Skills",type:"route"},{id:"certificate",title:"Certificates",type:"route"},{id:"resume",title:"Resume",type:"route"},{id:"blogs",title:"Blogs",type:"route"},{id:"contact",title:"Contact",type:"route"},{id:"freetools",title:"Free Tools",type:"tools"}],v5=[{id:"downloadtube",title:"DownloadTube (Youtube Downloader)",type:"video",url:"https://downloadtube-iota.vercel.app/"}],y5=[{title:"Full Stack Web Development",icon:WB},{title:"Designing",icon:jB},{title:"ML and DL Learner",icon:GB}],x5=[{title:"Content Writer",company_name:"Techyv",icon:qB,iconBg:"white",date:"October 2023 - Ongoing",points:["Writing Professional articles related to IT.","Ensuring use of no AI content in articles.","Creating articles on real facts and data."]},{title:"Technical member",company_name:"Microsoft Student Chapter",icon:YB,iconBg:"black",date:"October 2022 - March 2023",points:["Maintaining the website and ensuring that it is up-to-date and functioning properly.","Collaborating with other members of the chapter to identify areas for improvement on the website.","Implementing changes and updates to the website using programming languages such as React.js, tailwind and JavaScript.","Debugging any issues or errors that arise on the website and working to resolve them."]},{title:"V open source member",company_name:"CSI Chapter",icon:XB,iconBg:"white",date:"Augest 2021 - June 2022",points:["Conducting regular meetings to discuss open source projects and new initiatives.","Conducting workshops and training sessions to help members learn more about open source technologies.","Coordinating with other teams within the CSI chapter to ensure smooth execution of events."]}],_5=[{name:"ConvoGen AI",description:"'ConvoGen' is the virtual embodiment of me, a chatbot that offers lifelike insights and information about my experiences, interests, and personality. Engage in conversations that feel as real as speaking with me in person, as 'ConvoGen' shares a wealth of personal details and knowledge, creating a truly immersive and authentic chatbot experience.",tags:[{name:"T5 model",color:"blue-text-gradient"},{name:"Transformer",color:"green-text-gradient"},{name:"Colab",color:"pink-text-gradient"}],image:r5,source_code_link:"https://colab.research.google.com/drive/1a6LATySYKaS8qqfk_4maSaV4guvTRA-8?usp=sharing",date:"October 2023",link_type:"colab"},{name:"Anon Exchange - Anonymous chatting app",description:"An innovative anonymous chatting app that redefines digital interactions. This project empowers strangers to connect seamlessly, engaging in candid conversations without the constraints of identity. What sets us apart is our commitment to privacy, allowing users to create exclusive private chat rooms for confidential discussions.",tags:[{name:"vitejs",color:"blue-text-gradient"},{name:"supabase",color:"green-text-gradient"},{name:"tailwind CSS",color:"pink-text-gradient"}],image:n5,source_code_link:"https://github.com/bedead/Anon-Exchange-chatting",date:"August 2023",link_type:"github"},{name:"Banana disease classification",description:"Banana disease classification is a project that uses a YOLOv8 deep learning model to detect and identify various diseases affecting banana plants. The project is based on a custom dataset of images of banana leaves with different types of infections. The project aims to provide a fast and accurate diagnosis of banana diseases, which can help farmers and researchers to prevent crop losses and improve banana production.",tags:[{name:"YOLOv8",color:"green-text-gradient"},{name:"Colab",color:"pink-text-gradient"}],image:i5,source_code_link:"https://colab.research.google.com/drive/1TLumA28dCY-9_lzouIJtt2CsCjONGdNy?usp=sharing",date:"August 2023",link_type:"colab"},{name:"PATENT - CLASSIFICATION OF LUNG CANCER USING DEEP LEARNING TECHNIQUES.",description:"Application No - 202341039647 The model is based on a YOLOv8 (Deep learning Neural network architecture) and is trained on the publicly available dataset, which consists of lung CT scans of patients with and without lung cancer.",tags:[{name:"Gradio",color:"blue-text-gradient"},{name:"YOLO",color:"green-text-gradient"},{name:"Roboflow",color:"pink-text-gradient"}],image:t5,source_code_link:"https://github.com/bedead/lung-cancer-classification-yoloV8---gradio.git",date:"June 2023",link_type:"huggingface"},{name:"Face Detection",description:"'FACE-DETECTOR' is a GitHub repository showcasing an OpenCV project for detecting human faces using a cascade classifier. The project utilizes the OpenCV library, which is a popular computer vision library in Python, to detect human faces in images or video streams.",tags:[{name:"Cascade classifier",color:"blue-text-gradient"},{name:"Python",color:"green-text-gradient"},{name:"OpenCV",color:"pink-text-gradient"}],image:$B,source_code_link:"https://github.com/bedead/FACE-DETECTOR.git",date:"Feb 2023",link_type:"github"},{name:"Life Overseas",description:"Life Overseas is a concept website that aims to provide students with valuable resources and information to successfully clear entrance exams for foreign colleges.",tags:[{name:"Flask",color:"blue-text-gradient"},{name:"Python",color:"green-text-gradient"}],image:QB,source_code_link:"https://github.com/bedead/Life-Overseas-webiste.git",date:"Jan 2023",link_type:"github"},{name:"Velox Todo",description:"Velox Todo is a Windows application built using JavaFX and JSON files. It is a task management tool designed to help users organize and prioritize their daily tasks efficiently.",tags:[{name:"Java",color:"blue-text-gradient"},{name:"JavaFX",color:"green-text-gradient"},{name:"JSON",color:"pink-text-gradient"}],image:e5,source_code_link:"https://github.com/bedead/Velox-Todo-Application.git",date:"Sep 2022",link_type:"github"},{name:"HI",description:"'HI' is a console-based conversational app written in Python. It utilizes various libraries such as pyinstaller, pyjokes, PyDictionary, platform, psutil, requests, getpass, pywhatkit, pyttsx3, speechrecognition, Wikipedia, Pyaudio, speedtest-cli, pyautogui, and py-cpuinfo to provide a wide range of functionalities.",tags:[{name:"Python",color:"blue-text-gradient"},{name:"JSON",color:"green-text-gradient"}],image:JB,source_code_link:"https://github.com/bedead/HI_2021.12.22.4.git",date:"Mar 2022",link_type:"github"},{name:"Lang go",description:"'Lang Go' is a language translation app that is built using the Kivy and KivyMD frameworks in Python. The app utilizes the TextBlob library for translation capabilities. With 'Lang Go', users can input text in one language and translate it to another language seamlessly.",tags:[{name:"Kivy",color:"blue-text-gradient"},{name:"Kivymd",color:"green-text-gradient"},{name:"textBlob",color:"pink-text-gradient"}],image:KB,source_code_link:"https://github.com/bedead/kivymd-language-translation-app.git",date:"Mar 2022",link_type:"github"},{name:"Shape out",description:"'Shape Out' is a 2D platformer game available on Amazon, created using the Godot game engine. The game features intuitive controls, colorful graphics, and engaging gameplay that requires players to jump, run, and solve puzzles to progress through the levels.",tags:[{name:"Godot engine",color:"blue-text-gradient"},{name:"GD-script",color:"green-text-gradient"}],image:ZB,source_code_link:"https://www.amazon.com/Bedead-Shape-Out-2d-platformer/dp/B0999LHBYN",date:"Aug 2021",link_type:"appstore"}],w5=[{name:"Basics of Machien Learing",image:s5},{name:"C++ Course",image:o5},{name:"Making a Webiste",image:a5},{name:"Java (Basics)",image:l5},{name:"Matlab Onramp",image:c5},{name:"MongoDB Tutorial",image:u5},{name:"Python (Basics)",image:f5},{name:"Responsive Web Design Course",image:d5},{name:"TensorFlow Python",image:h5}],S5=[{name:"Technical Member | CSI ",image:p5},{name:"Technical Member | MSC",image:m5}],M5=[{name:" Google Cloud Digital Leader",image:g5}],A5="/portfolio-react-threejs/assets/logo-white-f51edd31.webp",b5="data:image/webp;base64,UklGRmQCAABXRUJQVlA4WAoAAAAwAAAAOwAAOwAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZBTFBIPwAAAAFHoJBtBOime96H8WhEROhZb4CaSFYrLDAowA0OUIAD/DffJB2TJqL/AoIiF6yAJSV4nAc6xy/oOftIb+woAABWUDggLgAAAJADAJ0BKjwAPAA+bTaYSSQjIqEiCACADYlpAAAQN1NQBXiFuQAA/vucwAAAAAA=",E5="data:image/webp;base64,UklGRvwCAABXRUJQVlA4WAoAAAAwAAAALwAALwAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZBTFBI2wAAAAF3oKCNFDb4bDxgYMkjIgJHTaxUSfkkcBTJtqu8T84gJEpAwheABSQkIVEIq7R9a7KCV9fDr3duIK4j+s/IbSRFteDDwEL9wv2lo6Ml4bmW5Yx2LFuayjlSHbMnX5SSBupihiFD9llir3CgZ1kYDzTJ3kFCU0RWRlZBUkNShavDNYBaiBpKPpEPNHbOBNMwbBnHf5bVaQj8s1jnu6bgL451auP4i+PPNol1WsQ6TerwAhGDOrxvjqoF7FtC0cKefFFKGqiLWcS+ZarsDc4wLgwv+Rt0tC4S948OBwBWUDggKgAAADADAJ0BKjAAMAA+bTaYSKQjIqEjiACADYlpAAAbgb0+DgAA/vucwAAAAA==",Wo=n=>({hidden:{y:-50,opacity:0},show:{y:0,opacity:1,transition:{type:"spring",duration:1.25,delay:n}}}),ou=(n,e,t,i)=>({hidden:{x:n==="left"?100:n==="right"?-100:0,y:n==="up"?100:n==="down"?-100:0,opacity:0},show:{x:0,y:0,opacity:1,transition:{type:e,delay:t,duration:i,ease:"easeOut"}}}),T5=(n,e,t,i)=>({hidden:{x:n==="left"?"-100%":n==="right"?"100%":0,y:n==="up"||n==="down"?"100%":0},show:{x:0,y:0,transition:{type:e,delay:t,duration:i,ease:"easeOut"}}}),C5=(n,e)=>({hidden:{},show:{transition:{staggerChildren:n,delayChildren:e||0}}}),Qs=()=>{const[n,e]=N.useState(""),[t,i]=N.useState(!1),[r,s]=N.useState(!1);return H.jsx("nav",{className:`${$t.paddingX} w-full flex items-center py-5 fixed top-0 z-20 bg-gradient-to-b from-white to-primary`,children:H.jsxs("div",{className:"w-full flex justify-between items-center max-w-7xl mx-auto",children:[H.jsxs(Wv,{to:"/",className:"flex items-center gap-2",onClick:()=>{e(""),window.scrollTo(0,0)},children:[H.jsx("img",{src:A5,className:"w-10 h-10 object-contain",alt:"logo"}),H.jsxs("div",{className:" md:block lg:flex ",children:[H.jsx("p",{className:"text-black text-[18px] flex",children:"Satyam Mishra  "}),H.jsx("span",{className:"text-[18px] sm:block hidden",children:"| Bedead"})]})]}),H.jsxs("ul",{className:"list-none hidden sm:flex flex-row md:gap-4 items-center",children:[ME.map(o=>H.jsx("li",{className:o.type=="tools"?"bg-black text-white hover:text-white-100 hover:bg-secondary py-2 px-3 rounded-xl text-[18px] font-medium cursor-pointer":`${n==o.title?"text-black":"text-secondary"} - hover:text-black hover:underline underline-offset-8 text-[18px] font-medium cursor-pointer`,onClick:()=>{e(o.title),o.type=="tools"&&s(!r)},children:o.type=="tools"?o.title:H.jsxs(Wv,{to:`/${o.id}`,children:[o.title," "]})},o.id))," "]}),H.jsx("div",{className:`${r?"flex":"hidden"} p-6 bg-gradient-to-r from-[#f6f6f6] to-white absolute - top-60 right-40 sm:top-20 sm:right-5 mx-4 my-2 min-w-[140px] z-10 rounded-xl outline`,children:H.jsxs("ul",{className:"list-none flex justify-end items-start flex-col gap-2",children:[v5.map(o=>H.jsx(On.li,{variants:ou("right","spring",.1,.75),className:`${n==o.title?"text-black":"text-secondary"} font-poppins hover:underline underline-offset-8 font-medium cursor-pointer text-[16px] hover:text-black`,onClick:()=>{s(!r),e(o.title),window.open(o.url,"_blank")},children:o.title},o.id))," "]})}),H.jsxs("div",{className:"sm:hidden flex flex-1 justify-end items-center",children:[H.jsx("img",{src:t?E5:b5,alt:"menu",className:"w-[28px] h-[28px] object-contain cursor-pointer",onClick:()=>i(!t)}),H.jsx("div",{className:`${t?"flex":"hidden"} p-6 bg-gradient-to-r from-[#f6f6f6] to-white absolute - top-20 right-0 mx-4 my-2 min-w-[140px] z-10 rounded-xl outline`,children:H.jsxs("ul",{className:"list-none flex justify-end items-start flex-col gap-2",children:[ME.map(o=>H.jsx("li",{className:`${n==o.title?"text-black":"text-secondary"} font-poppins hover:underline underline-offset-8 font-medium cursor-pointer text-[16px] hover:text-black`,onClick:()=>{o.type!="tools"&&i(!t),e(o.title),o.type=="tools"&&s(!r)},children:o.type=="tools"?o.title:H.jsxs(Wv,{to:`/${o.id}`,children:[o.title," "]})},o.id))," "]})})]})]})})},P5=()=>{const n="Hi, I'm Satyam";return H.jsxs("section",{className:"relative w-full h-screen mx-auto overflow-hidden",children:[H.jsxs("div",{className:`${$t.paddingX} flex absolute z-10 inset-0 top-[120px] items-start gap-5`,children:[H.jsxs("div",{className:"flex flex-col justify-center items-center mt-5",children:[H.jsx("div",{className:"w-5 h-5 rounded-full bg-[#373737] "}),H.jsx("div",{className:"w-1 sm:h-80 h-40 violet-gradient"})]}),H.jsxs("div",{children:[H.jsx("h1",{className:`${$t.heroHeadText} funky-text-outline-2 `,children:n}),H.jsxs("div",{children:[H.jsx("p",{className:`${$t.heroSubText} funky-text-outline mt-2 text-black-100`,children:"I'm a computer science student with simple and dumb mind."}),H.jsx("p",{className:`${$t.sectionSubText} mt-2 text-gray-600`,children:"This is just a website showcasing some of my works and experiments. Have a look untill you get bored 🥱"})]})]})]}),H.jsx("div",{className:"absolute z-10 xs:bottom-10 bottom-32 w-full flex justify-center items-center",children:H.jsx("a",{href:"#about",children:H.jsx("div",{className:"w-[35px] h-[64px] rounded-3xl border-4 border-[#373737] flex justify-center items-start p-2 ",children:H.jsx(On.div,{animate:{y:[0,24,0]},transition:{duration:1.5,repeat:1/0,repeatType:"loop"},className:"w-3 h-3 rounded-full bg-secondary mb-2"})})})})]})};var L5=Object.defineProperty,R5=Object.defineProperties,I5=Object.getOwnPropertyDescriptors,AE=Object.getOwnPropertySymbols,D5=Object.prototype.hasOwnProperty,k5=Object.prototype.propertyIsEnumerable,bE=(n,e,t)=>e in n?L5(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Gu=(n,e)=>{for(var t in e||(e={}))D5.call(e,t)&&bE(n,t,e[t]);if(AE)for(var t of AE(e))k5.call(e,t)&&bE(n,t,e[t]);return n},ju=(n,e)=>R5(n,I5(e)),Wg=class extends N.Component{constructor(n){super(n),this.ref=yr.createRef(),this.state={style:{}};const e={reverse:!1,max:35,perspective:1e3,easing:"cubic-bezier(.03,.98,.52,.99)",scale:"1.1",speed:"1000",transition:!0,axis:null,reset:!0};this.width=null,this.height=null,this.left=null,this.top=null,this.transitionTimeout=null,this.updateCall=null,this.element=null,this.settings=Object.assign({},e,this.props.options),this.reverse=this.settings.reverse?-1:1,this.onMouseEnter=this.onMouseEnter.bind(this,this.props.onMouseEnter),this.onMouseMove=this.onMouseMove.bind(this,this.props.onMouseMove),this.onMouseLeave=this.onMouseLeave.bind(this,this.props.onMouseLeave)}componentDidMount(){this.element=this.ref.current,setTimeout(()=>{this.element.parentElement.querySelector(":hover")===this.element&&this.onMouseEnter()},0)}componentWillUnmount(){clearTimeout(this.transitionTimeout),cancelAnimationFrame(this.updateCall)}onMouseEnter(n=()=>{},e){return this.updateElementPosition(),this.setState(Object.assign({},this.state,{style:ju(Gu({},this.state.style),{willChange:"transform"})})),this.setTransition(),n(e)}reset(){window.requestAnimationFrame(()=>{this.setState(Object.assign({},this.state,{style:ju(Gu({},this.state.style),{transform:`perspective(${this.settings.perspective}px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)`})}))})}onMouseMove(n=()=>{},e){return e.persist(),this.updateCall!==null&&window.cancelAnimationFrame(this.updateCall),this.event=e,this.updateCall=requestAnimationFrame(this.update.bind(this,e)),n(e)}setTransition(){clearTimeout(this.transitionTimeout),this.setState(Object.assign({},this.state,{style:ju(Gu({},this.state.style),{transition:`${this.settings.speed}ms ${this.settings.easing}`})})),this.transitionTimeout=setTimeout(()=>{this.setState(Object.assign({},this.state,{style:ju(Gu({},this.state.style),{transition:""})}))},this.settings.speed)}onMouseLeave(n=()=>{},e){return this.setTransition(),this.settings.reset&&this.reset(),n(e)}getValues(n){const e=(n.nativeEvent.clientX-this.left)/this.width,t=(n.nativeEvent.clientY-this.top)/this.height,i=Math.min(Math.max(e,0),1),r=Math.min(Math.max(t,0),1),s=(this.reverse*(this.settings.max/2-i*this.settings.max)).toFixed(2),o=(this.reverse*(r*this.settings.max-this.settings.max/2)).toFixed(2),a=i*100,l=r*100;return{tiltX:s,tiltY:o,percentageX:a,percentageY:l}}updateElementPosition(){const n=this.element.getBoundingClientRect();this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,this.left=n.left,this.top=n.top}update(n){const e=this.getValues(n);this.setState(Object.assign({},this.state,{style:ju(Gu({},this.state.style),{transform:`perspective(${this.settings.perspective}px) rotateX(${this.settings.axis==="x"?0:e.tiltY}deg) rotateY(${this.settings.axis==="y"?0:e.tiltX}deg) scale3d(${this.settings.scale}, ${this.settings.scale}, ${this.settings.scale})`})})),this.updateCall=null}render(){const n=Object.assign({},this.props.style,this.state.style);return H.jsx("div",{style:n,ref:this.ref,className:this.props.className,onMouseEnter:this.onMouseEnter,onMouseMove:this.onMouseMove,onMouseLeave:this.onMouseLeave,children:this.props.children})}};const au=(n,e)=>function(){return H.jsxs(On.section,{variants:C5(),initial:"hidden",whileInView:"show",viewport:{once:!0,amount:0},exit:"hidden",className:`${$t.padding} max-w-7xl mx-auto relative z-0`,children:[H.jsx("span",{className:"hash-span",id:e,children:" "}),H.jsx(n,{})]})},N5=({index:n,title:e,icon:t})=>H.jsx(Wg,{className:"xs:w-[250px] w-full ",children:H.jsx(On.div,{variants:ou("right","spring",.5*n,.75),className:" w-full green-pink-gradient p-[1px] rounded-[20px] shadow-[#fcd4d4] shadow-card ",children:H.jsxs("div",{options:{max:45,scale:1,speed:450},className:"bg-primary rounded-[20px] py-5 px-12 min-h-[280px] flex justify-evenly items-center flex-col ",children:[H.jsx("img",{src:t,alt:e,className:"w-16 h-16 object-contain"}),H.jsxs("h3",{className:"text-black text-[20px] font-bold text-center ",children:[e," "]})]})})}),O5=()=>H.jsxs(H.Fragment,{children:[H.jsxs(On.div,{variants:Wo(0),children:[H.jsx("h2",{className:`${$t.sectionHeadText} text-center`,children:"Overview."}),H.jsx("p",{className:`${$t.sectionSubText} text-center`,children:"Introduction?"})]}),H.jsx(On.p,{variants:ou("","",.1,1),className:"mt-4 text-secondary text-center text-[17px] max-w-full leading-[30px] ",children:"I am a full stack web developer, graphic designer, and machine learning enthusiast. I have experience in creating dynamic and responsive websites using HTML, CSS, JavaScript, and other frameworks. I also have a passion for designing graphics that are eye-catching and appealing. I am always eager to learn new skills and technologies in the field of machine learning and deep learning. I have completed several projects and courses on various topics such as computer vision, and natural language processing."}),H.jsxs("div",{className:"mt-20 flex flex-wrap justify-center gap-10",children:[y5.map((n,e)=>H.jsx(N5,{index:e,...n},n.title))," "]})]}),U5=au(O5,"about");var Gg={},xL={exports:{}},z5="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",F5=z5,B5=F5;function _L(){}function wL(){}wL.resetWarningCache=_L;var V5=function(){function n(i,r,s,o,a,l){if(l!==B5){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}n.isRequired=n;function e(){return n}var t={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:e,element:n,elementType:n,instanceOf:e,node:n,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:wL,resetWarningCache:_L};return t.PropTypes=t,t};xL.exports=V5();var SL=xL.exports,ML={exports:{}};/*! - Copyright (c) 2018 Jed Watson. - Licensed under the MIT License (MIT), see - http://jedwatson.github.io/classnames -*/(function(n){(function(){var e={}.hasOwnProperty;function t(){for(var i=[],r=0;r(typeof window=="object"&&document.documentElement.style.setProperty("--line-color",i),H5.default.createElement("div",{className:(0,W5.default)(e,"vertical-timeline",{"vertical-timeline--animate":n,"vertical-timeline--two-columns":t==="2-columns","vertical-timeline--one-column-left":t==="1-column"||t==="1-column-left","vertical-timeline--one-column-right":t==="1-column-right"})},r));AL.propTypes={children:ho.default.oneOfType([ho.default.arrayOf(ho.default.node),ho.default.node]).isRequired,className:ho.default.string,animate:ho.default.bool,layout:ho.default.oneOf(["1-column-left","1-column","2-columns","1-column-right"]),lineColor:ho.default.string};var G5=AL;Gg.default=G5;var jg={};function s_(){return s_=Object.assign||function(n){for(var e=1;e=0)&&(t[r]=n[r]);return t}var a_=new Map,pp=new WeakMap,EE=0,bL=void 0;function Y5(n){bL=n}function q5(n){return n?(pp.has(n)||(EE+=1,pp.set(n,EE.toString())),pp.get(n)):"0"}function Z5(n){return Object.keys(n).sort().filter(function(e){return n[e]!==void 0}).map(function(e){return e+"_"+(e==="root"?q5(n.root):n[e])}).toString()}function $5(n){var e=Z5(n),t=a_.get(e);if(!t){var i=new Map,r,s=new IntersectionObserver(function(o){o.forEach(function(a){var l,f=a.isIntersecting&&r.some(function(d){return a.intersectionRatio>=d});n.trackVisibility&&typeof a.isVisible>"u"&&(a.isVisible=f),(l=i.get(a.target))==null||l.forEach(function(d){d(f,a)})})},n);r=s.thresholds||(Array.isArray(n.threshold)?n.threshold:[n.threshold||0]),t={id:e,observer:s,elements:i},a_.set(e,t)}return t}function _w(n,e,t,i){if(t===void 0&&(t={}),i===void 0&&(i=bL),typeof window.IntersectionObserver>"u"&&i!==void 0){var r=n.getBoundingClientRect();return e(i,{isIntersecting:i,target:n,intersectionRatio:typeof t.threshold=="number"?t.threshold:0,time:0,boundingClientRect:r,intersectionRect:r,rootBounds:r}),function(){}}var s=$5(t),o=s.id,a=s.observer,l=s.elements,f=l.get(n)||[];return l.has(n)||l.set(n,f),f.push(e),a.observe(n),function(){f.splice(f.indexOf(e),1),f.length===0&&(l.delete(n),a.unobserve(n)),l.size===0&&(a.disconnect(),a_.delete(o))}}var J5=["children","as","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView","fallbackInView"];function TE(n){return typeof n.children!="function"}var ag=function(n){j5(e,n);function e(i){var r;return r=n.call(this,i)||this,r.node=null,r._unobserveCb=null,r.handleNode=function(s){r.node&&(r.unobserve(),!s&&!r.props.triggerOnce&&!r.props.skip&&r.setState({inView:!!r.props.initialInView,entry:void 0})),r.node=s||null,r.observeNode()},r.handleChange=function(s,o){s&&r.props.triggerOnce&&r.unobserve(),TE(r.props)||r.setState({inView:s,entry:o}),r.props.onChange&&r.props.onChange(s,o)},r.state={inView:!!i.initialInView,entry:void 0},r}var t=e.prototype;return t.componentDidUpdate=function(r){(r.rootMargin!==this.props.rootMargin||r.root!==this.props.root||r.threshold!==this.props.threshold||r.skip!==this.props.skip||r.trackVisibility!==this.props.trackVisibility||r.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())},t.componentWillUnmount=function(){this.unobserve(),this.node=null},t.observeNode=function(){if(!(!this.node||this.props.skip)){var r=this.props,s=r.threshold,o=r.root,a=r.rootMargin,l=r.trackVisibility,f=r.delay,d=r.fallbackInView;this._unobserveCb=_w(this.node,this.handleChange,{threshold:s,root:o,rootMargin:a,trackVisibility:l,delay:f},d)}},t.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},t.render=function(){if(!TE(this.props)){var r=this.state,s=r.inView,o=r.entry;return this.props.children({inView:s,entry:o,ref:this.handleNode})}var a=this.props,l=a.children,f=a.as,d=X5(a,J5);return N.createElement(f||"div",s_({ref:this.handleNode},d),l)},e}(N.Component);ag.displayName="InView";ag.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1};function K5(n){var e=n===void 0?{}:n,t=e.threshold,i=e.delay,r=e.trackVisibility,s=e.rootMargin,o=e.root,a=e.triggerOnce,l=e.skip,f=e.initialInView,d=e.fallbackInView,h=N.useRef(),p=N.useState({inView:!!f}),g=p[0],y=p[1],x=N.useCallback(function(m){h.current!==void 0&&(h.current(),h.current=void 0),!l&&m&&(h.current=_w(m,function(_,S){y({inView:_,entry:S}),S.isIntersecting&&a&&h.current&&(h.current(),h.current=void 0)},{root:o,rootMargin:s,threshold:t,trackVisibility:r,delay:i},d))},[Array.isArray(t)?t.toString():t,o,s,a,l,r,d,i]);N.useEffect(function(){!h.current&&g.entry&&!a&&!l&&y({inView:!!f})});var w=[x,g.inView,g.entry];return w.ref=w[0],w.inView=w[1],w.entry=w[2],w}const Q5=Object.freeze(Object.defineProperty({__proto__:null,InView:ag,default:ag,defaultFallbackInView:Y5,observe:_w,useInView:K5},Symbol.toStringTag,{value:"Module"})),eV=sk(Q5);jg.__esModule=!0;jg.default=void 0;var po=ww(N),en=ww(SL),mp=ww(yw),tV=eV;function ww(n){return n&&n.__esModule?n:{default:n}}const EL=({children:n="",className:e="",contentArrowStyle:t=null,contentStyle:i=null,date:r="",dateClassName:s="",icon:o=null,iconClassName:a="",iconOnClick:l=null,onTimelineElementClick:f=null,iconStyle:d=null,id:h="",position:p="",style:g=null,textClassName:y="",intersectionObserverProps:x={rootMargin:"0px 0px -40px 0px",triggerOnce:!0},visible:w=!1})=>po.default.createElement(tV.InView,x,({inView:m,ref:_})=>po.default.createElement("div",{ref:_,id:h,className:(0,mp.default)(e,"vertical-timeline-element",{"vertical-timeline-element--left":p==="left","vertical-timeline-element--right":p==="right","vertical-timeline-element--no-children":n===""}),style:g},po.default.createElement(po.default.Fragment,null,po.default.createElement("span",{style:d,onClick:l,className:(0,mp.default)(a,"vertical-timeline-element-icon",{"bounce-in":m||w,"is-hidden":!(m||w)})},o),po.default.createElement("div",{style:i,onClick:f,className:(0,mp.default)(y,"vertical-timeline-element-content",{"bounce-in":m||w,"is-hidden":!(m||w)})},po.default.createElement("div",{style:t,className:"vertical-timeline-element-content-arrow"}),n,po.default.createElement("span",{className:(0,mp.default)(s,"vertical-timeline-element-date")},r)))));EL.propTypes={children:en.default.oneOfType([en.default.arrayOf(en.default.node),en.default.node]),className:en.default.string,contentArrowStyle:en.default.shape({}),contentStyle:en.default.shape({}),date:en.default.node,dateClassName:en.default.string,icon:en.default.element,iconClassName:en.default.string,iconStyle:en.default.shape({}),iconOnClick:en.default.func,onTimelineElementClick:en.default.func,id:en.default.string,position:en.default.string,style:en.default.shape({}),textClassName:en.default.string,visible:en.default.bool,intersectionObserverProps:en.default.shape({root:en.default.object,rootMargin:en.default.string,threshold:en.default.number,triggerOnce:en.default.bool})};var nV=EL;jg.default=nV;var TL={VerticalTimeline:Gg.default,VerticalTimelineElement:jg.default};const iV=({experience:n})=>H.jsxs(TL.VerticalTimelineElement,{contentStyle:{background:"black",color:"black"},contentArrowStyle:{borderRight:"7px solid black"},date:n.date,iconStyle:{background:n.iconBg},icon:H.jsx("div",{className:"flex justify-center items-center w-full h-full",children:H.jsx("img",{src:n.icon,alt:n.company_name,className:"w-[75%] h-[75%] object-contain"})}),children:[H.jsxs("div",{children:[H.jsx("h3",{className:"text-[#fcd4d4] text-[24px] font-bold",children:n.title}),H.jsxs("p",{className:"text-white text-[16px] font-semibold",style:{margin:0},children:[n.company_name," "]})]}),H.jsxs("ul",{className:"mt-5 list-disc ml-5 space-y-2",children:[n.points.map((e,t)=>H.jsxs("li",{className:"text-white-100 text-[14px] pl-1 tracking-wider",children:[e," "]},`experience-point-${t}`))," "]})]}),rV=()=>H.jsxs(H.Fragment,{children:[H.jsxs(On.div,{variants:Wo(),children:[H.jsx("h2",{className:`${$t.sectionHeadText} text-center`,children:"Work Experience."}),H.jsx("p",{className:`${$t.sectionSubText} text-center`,children:"Where I have worked so far?"})]}),H.jsx("div",{className:"mt-20 flex flex-col",children:H.jsxs(TL.VerticalTimeline,{lineColor:"#373737",children:[x5.map((n,e)=>H.jsx(iV,{experience:n},`experience-${e}`))," "]})})]}),sV=au(rV,"work"),oV=()=>H.jsx("div",{className:"h-screen flex justify-center items-center",children:H.jsx("img",{src:su,className:"w-[150px] h-[117px] "})});function aV(){return H.jsx(N.Suspense,{fallback:oV(),children:H.jsxs("div",{className:" z-0 bg-white",children:[H.jsx(Qs,{}),H.jsxs("div",{className:"bg-gradient-to-b from-white to-primary",children:[H.jsx(P5,{}),H.jsx(U5,{}),H.jsx(sV,{})]})]})})}const ny=({index:n,name:e,image:t})=>H.jsx(On.div,{children:H.jsx("div",{children:H.jsx(On.div,{variants:ou("right","spring",.5*n,.75),children:H.jsxs(Wg,{options:{max:45,scale:1,speed:450},className:"bg-white shadow-[#fcd4d4] shadow-card p-5 rounded-2xl sm:w-[360px] w-full",children:[H.jsx("div",{className:"relative w-full h-[230px]",children:H.jsx("img",{src:t,placeholder:`${e}`,loading:"lazy",alt:"certificate image",className:"w-full h-full object-cover rounded-2xl"})}),H.jsx("h3",{className:"mt-5 text-black font-bold text-[24px] text-center",children:e})]})})})}),lV=()=>H.jsxs("div",{className:"my-10",children:[H.jsxs(On.div,{variants:Wo(0),children:[H.jsx("h2",{className:`${$t.sectionHeadText} text-center`,children:"Certificates."}),H.jsx("p",{className:`${$t.sectionSubText} text-center`,children:"Professional Certificates"})]}),H.jsxs("div",{className:"my-20 flex flex-wrap justify-center mx-auto space-x-5 gap-5 w-full",children:[M5.map((n,e)=>H.jsx(ny,{index:e,...n},`project-${e}`))," "]}),H.jsx(On.p,{variants:Wo(0),className:`${$t.sectionSubText} text-center`,children:"Work Certificates"}),H.jsxs("div",{className:"my-20 flex flex-wrap justify-center mx-auto space-x-5 gap-5 w-full",children:[S5.map((n,e)=>H.jsx(ny,{index:e,...n},`project-${e}`))," "]}),H.jsx(On.p,{variants:Wo(0),className:`${$t.sectionSubText} text-center`,children:"Course Certificates"}),H.jsxs("div",{className:"my-20 flex flex-wrap justify-center mx-auto space-x-5 gap-5 w-full",children:[w5.map((n,e)=>H.jsx(ny,{index:e,...n},`project-${e}`))," "]})]}),cV=au(lV,"CertificateLists");function uV(){return H.jsxs("div",{className:"bg-white",children:[H.jsx(Qs,{}),H.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:H.jsx(cV,{})})]})}const fV="/portfolio-react-threejs/assets/cover_img-73d442a3.png",CE="/portfolio-react-threejs/assets/resume-a68436d4.pdf",Xc=Math.min,Ya=Math.max,lg=Math.round,gp=Math.floor,qo=n=>({x:n,y:n}),dV={left:"right",right:"left",bottom:"top",top:"bottom"},hV={start:"end",end:"start"};function l_(n,e,t){return Ya(n,Xc(e,t))}function Rd(n,e){return typeof n=="function"?n(e):n}function sl(n){return n.split("-")[0]}function Id(n){return n.split("-")[1]}function CL(n){return n==="x"?"y":"x"}function Sw(n){return n==="y"?"height":"width"}function Xg(n){return["top","bottom"].includes(sl(n))?"y":"x"}function Mw(n){return CL(Xg(n))}function pV(n,e,t){t===void 0&&(t=!1);const i=Id(n),r=Mw(n),s=Sw(r);let o=r==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=cg(o)),[o,cg(o)]}function mV(n){const e=cg(n);return[c_(n),e,c_(e)]}function c_(n){return n.replace(/start|end/g,e=>hV[e])}function gV(n,e,t){const i=["left","right"],r=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(n){case"top":case"bottom":return t?e?r:i:e?i:r;case"left":case"right":return e?s:o;default:return[]}}function vV(n,e,t,i){const r=Id(n);let s=gV(sl(n),t==="start",i);return r&&(s=s.map(o=>o+"-"+r),e&&(s=s.concat(s.map(c_)))),s}function cg(n){return n.replace(/left|right|bottom|top/g,e=>dV[e])}function yV(n){return{top:0,right:0,bottom:0,left:0,...n}}function PL(n){return typeof n!="number"?yV(n):{top:n,right:n,bottom:n,left:n}}function ug(n){return{...n,top:n.y,left:n.x,right:n.x+n.width,bottom:n.y+n.height}}function PE(n,e,t){let{reference:i,floating:r}=n;const s=Xg(e),o=Mw(e),a=Sw(o),l=sl(e),f=s==="y",d=i.x+i.width/2-r.width/2,h=i.y+i.height/2-r.height/2,p=i[a]/2-r[a]/2;let g;switch(l){case"top":g={x:d,y:i.y-r.height};break;case"bottom":g={x:d,y:i.y+i.height};break;case"right":g={x:i.x+i.width,y:h};break;case"left":g={x:i.x-r.width,y:h};break;default:g={x:i.x,y:i.y}}switch(Id(e)){case"start":g[o]-=p*(t&&f?-1:1);break;case"end":g[o]+=p*(t&&f?-1:1);break}return g}const xV=async(n,e,t)=>{const{placement:i="bottom",strategy:r="absolute",middleware:s=[],platform:o}=t,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let f=await o.getElementRects({reference:n,floating:e,strategy:r}),{x:d,y:h}=PE(f,i,l),p=i,g={},y=0;for(let x=0;x({name:"arrow",options:n,async fn(e){const{x:t,y:i,placement:r,rects:s,platform:o,elements:a,middlewareData:l}=e,{element:f,padding:d=0}=Rd(n,e)||{};if(f==null)return{};const h=PL(d),p={x:t,y:i},g=Mw(r),y=Sw(g),x=await o.getDimensions(f),w=g==="y",m=w?"top":"left",_=w?"bottom":"right",S=w?"clientHeight":"clientWidth",A=s.reference[y]+s.reference[g]-p[g]-s.floating[y],E=p[g]-s.reference[g],P=await(o.getOffsetParent==null?void 0:o.getOffsetParent(f));let I=P?P[S]:0;(!I||!await(o.isElement==null?void 0:o.isElement(P)))&&(I=a.floating[S]||s.floating[y]);const L=A/2-E/2,C=I/2-x[y]/2-1,R=Xc(h[m],C),W=Xc(h[_],C),Z=R,X=I-x[y]-W,j=I/2-x[y]/2+L,Y=l_(Z,j,X),te=!l.arrow&&Id(r)!=null&&j!=Y&&s.reference[y]/2-(jZ<=0)){var C,R;const Z=(((C=s.flip)==null?void 0:C.index)||0)+1,X=E[Z];if(X)return{data:{index:Z,overflows:L},reset:{placement:X}};let j=(R=L.filter(Y=>Y.overflows[0]<=0).sort((Y,te)=>Y.overflows[1]-te.overflows[1])[0])==null?void 0:R.placement;if(!j)switch(g){case"bestFit":{var W;const Y=(W=L.map(te=>[te.placement,te.overflows.filter(ne=>ne>0).reduce((ne,D)=>ne+D,0)]).sort((te,ne)=>te[1]-ne[1])[0])==null?void 0:W[0];Y&&(j=Y);break}case"initialPlacement":j=a;break}if(r!==j)return{reset:{placement:j}}}return{}}}};async function SV(n,e){const{placement:t,platform:i,elements:r}=n,s=await(i.isRTL==null?void 0:i.isRTL(r.floating)),o=sl(t),a=Id(t),l=Xg(t)==="y",f=["left","top"].includes(o)?-1:1,d=s&&l?-1:1,h=Rd(e,n);let{mainAxis:p,crossAxis:g,alignmentAxis:y}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return a&&typeof y=="number"&&(g=a==="end"?y*-1:y),l?{x:g*d,y:p*f}:{x:p*f,y:g*d}}const MV=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(e){var t,i;const{x:r,y:s,placement:o,middlewareData:a}=e,l=await SV(e,n);return o===((t=a.offset)==null?void 0:t.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:o}}}}},AV=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(e){const{x:t,y:i,placement:r}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:w=>{let{x:m,y:_}=w;return{x:m,y:_}}},...l}=Rd(n,e),f={x:t,y:i},d=await LL(e,l),h=Xg(sl(r)),p=CL(h);let g=f[p],y=f[h];if(s){const w=p==="y"?"top":"left",m=p==="y"?"bottom":"right",_=g+d[w],S=g-d[m];g=l_(_,g,S)}if(o){const w=h==="y"?"top":"left",m=h==="y"?"bottom":"right",_=y+d[w],S=y-d[m];y=l_(_,y,S)}const x=a.fn({...e,[p]:g,[h]:y});return{...x,data:{x:x.x-t,y:x.y-i}}}}};function Zo(n){return RL(n)?(n.nodeName||"").toLowerCase():"#document"}function Ki(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function eo(n){var e;return(e=(RL(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function RL(n){return n instanceof Node||n instanceof Ki(n).Node}function qs(n){return n instanceof Element||n instanceof Ki(n).Element}function fs(n){return n instanceof HTMLElement||n instanceof Ki(n).HTMLElement}function LE(n){return typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Ki(n).ShadowRoot}function Dd(n){const{overflow:e,overflowX:t,overflowY:i,display:r}=Mr(n);return/auto|scroll|overlay|hidden|clip/.test(e+i+t)&&!["inline","contents"].includes(r)}function bV(n){return["table","td","th"].includes(Zo(n))}function Aw(n){const e=bw(),t=Mr(n);return t.transform!=="none"||t.perspective!=="none"||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||["transform","perspective","filter"].some(i=>(t.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(t.contain||"").includes(i))}function EV(n){let e=Yc(n);for(;fs(e)&&!Yg(e);){if(Aw(e))return e;e=Yc(e)}return null}function bw(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Yg(n){return["html","body","#document"].includes(Zo(n))}function Mr(n){return Ki(n).getComputedStyle(n)}function qg(n){return qs(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function Yc(n){if(Zo(n)==="html")return n;const e=n.assignedSlot||n.parentNode||LE(n)&&n.host||eo(n);return LE(e)?e.host:e}function IL(n){const e=Yc(n);return Yg(e)?n.ownerDocument?n.ownerDocument.body:n.body:fs(e)&&Dd(e)?e:IL(e)}function ed(n,e,t){var i;e===void 0&&(e=[]),t===void 0&&(t=!0);const r=IL(n),s=r===((i=n.ownerDocument)==null?void 0:i.body),o=Ki(r);return s?e.concat(o,o.visualViewport||[],Dd(r)?r:[],o.frameElement&&t?ed(o.frameElement):[]):e.concat(r,ed(r,[],t))}function DL(n){const e=Mr(n);let t=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=fs(n),s=r?n.offsetWidth:t,o=r?n.offsetHeight:i,a=lg(t)!==s||lg(i)!==o;return a&&(t=s,i=o),{width:t,height:i,$:a}}function Ew(n){return qs(n)?n:n.contextElement}function Nc(n){const e=Ew(n);if(!fs(e))return qo(1);const t=e.getBoundingClientRect(),{width:i,height:r,$:s}=DL(e);let o=(s?lg(t.width):t.width)/i,a=(s?lg(t.height):t.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const TV=qo(0);function kL(n){const e=Ki(n);return!bw()||!e.visualViewport?TV:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function CV(n,e,t){return e===void 0&&(e=!1),!t||e&&t!==Ki(n)?!1:e}function ol(n,e,t,i){e===void 0&&(e=!1),t===void 0&&(t=!1);const r=n.getBoundingClientRect(),s=Ew(n);let o=qo(1);e&&(i?qs(i)&&(o=Nc(i)):o=Nc(n));const a=CV(s,t,i)?kL(s):qo(0);let l=(r.left+a.x)/o.x,f=(r.top+a.y)/o.y,d=r.width/o.x,h=r.height/o.y;if(s){const p=Ki(s),g=i&&qs(i)?Ki(i):i;let y=p.frameElement;for(;y&&i&&g!==p;){const x=Nc(y),w=y.getBoundingClientRect(),m=Mr(y),_=w.left+(y.clientLeft+parseFloat(m.paddingLeft))*x.x,S=w.top+(y.clientTop+parseFloat(m.paddingTop))*x.y;l*=x.x,f*=x.y,d*=x.x,h*=x.y,l+=_,f+=S,y=Ki(y).frameElement}}return ug({width:d,height:h,x:l,y:f})}function PV(n){let{rect:e,offsetParent:t,strategy:i}=n;const r=fs(t),s=eo(t);if(t===s)return e;let o={scrollLeft:0,scrollTop:0},a=qo(1);const l=qo(0);if((r||!r&&i!=="fixed")&&((Zo(t)!=="body"||Dd(s))&&(o=qg(t)),fs(t))){const f=ol(t);a=Nc(t),l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+l.x,y:e.y*a.y-o.scrollTop*a.y+l.y}}function LV(n){return Array.from(n.getClientRects())}function NL(n){return ol(eo(n)).left+qg(n).scrollLeft}function RV(n){const e=eo(n),t=qg(n),i=n.ownerDocument.body,r=Ya(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=Ya(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let o=-t.scrollLeft+NL(n);const a=-t.scrollTop;return Mr(i).direction==="rtl"&&(o+=Ya(e.clientWidth,i.clientWidth)-r),{width:r,height:s,x:o,y:a}}function IV(n,e){const t=Ki(n),i=eo(n),r=t.visualViewport;let s=i.clientWidth,o=i.clientHeight,a=0,l=0;if(r){s=r.width,o=r.height;const f=bw();(!f||f&&e==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}return{width:s,height:o,x:a,y:l}}function DV(n,e){const t=ol(n,!0,e==="fixed"),i=t.top+n.clientTop,r=t.left+n.clientLeft,s=fs(n)?Nc(n):qo(1),o=n.clientWidth*s.x,a=n.clientHeight*s.y,l=r*s.x,f=i*s.y;return{width:o,height:a,x:l,y:f}}function RE(n,e,t){let i;if(e==="viewport")i=IV(n,t);else if(e==="document")i=RV(eo(n));else if(qs(e))i=DV(e,t);else{const r=kL(n);i={...e,x:e.x-r.x,y:e.y-r.y}}return ug(i)}function OL(n,e){const t=Yc(n);return t===e||!qs(t)||Yg(t)?!1:Mr(t).position==="fixed"||OL(t,e)}function kV(n,e){const t=e.get(n);if(t)return t;let i=ed(n,[],!1).filter(a=>qs(a)&&Zo(a)!=="body"),r=null;const s=Mr(n).position==="fixed";let o=s?Yc(n):n;for(;qs(o)&&!Yg(o);){const a=Mr(o),l=Aw(o);!l&&a.position==="fixed"&&(r=null),(s?!l&&!r:!l&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||Dd(o)&&!l&&OL(n,o))?i=i.filter(d=>d!==o):r=a,o=Yc(o)}return e.set(n,i),i}function NV(n){let{element:e,boundary:t,rootBoundary:i,strategy:r}=n;const o=[...t==="clippingAncestors"?kV(e,this._c):[].concat(t),i],a=o[0],l=o.reduce((f,d)=>{const h=RE(e,d,r);return f.top=Ya(h.top,f.top),f.right=Xc(h.right,f.right),f.bottom=Xc(h.bottom,f.bottom),f.left=Ya(h.left,f.left),f},RE(e,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function OV(n){return DL(n)}function UV(n,e,t){const i=fs(e),r=eo(e),s=t==="fixed",o=ol(n,!0,s,e);let a={scrollLeft:0,scrollTop:0};const l=qo(0);if(i||!i&&!s)if((Zo(e)!=="body"||Dd(r))&&(a=qg(e)),i){const f=ol(e,!0,s,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else r&&(l.x=NL(r));return{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function IE(n,e){return!fs(n)||Mr(n).position==="fixed"?null:e?e(n):n.offsetParent}function UL(n,e){const t=Ki(n);if(!fs(n))return t;let i=IE(n,e);for(;i&&bV(i)&&Mr(i).position==="static";)i=IE(i,e);return i&&(Zo(i)==="html"||Zo(i)==="body"&&Mr(i).position==="static"&&!Aw(i))?t:i||EV(n)||t}const zV=async function(n){let{reference:e,floating:t,strategy:i}=n;const r=this.getOffsetParent||UL,s=this.getDimensions;return{reference:UV(e,await r(t),i),floating:{x:0,y:0,...await s(t)}}};function FV(n){return Mr(n).direction==="rtl"}const BV={convertOffsetParentRelativeRectToViewportRelativeRect:PV,getDocumentElement:eo,getClippingRect:NV,getOffsetParent:UL,getElementRects:zV,getClientRects:LV,getDimensions:OV,getScale:Nc,isElement:qs,isRTL:FV};function VV(n,e){let t=null,i;const r=eo(n);function s(){clearTimeout(i),t&&t.disconnect(),t=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:f,top:d,width:h,height:p}=n.getBoundingClientRect();if(a||e(),!h||!p)return;const g=gp(d),y=gp(r.clientWidth-(f+h)),x=gp(r.clientHeight-(d+p)),w=gp(f),_={rootMargin:-g+"px "+-y+"px "+-x+"px "+-w+"px",threshold:Ya(0,Xc(1,l))||1};let S=!0;function A(E){const P=E[0].intersectionRatio;if(P!==l){if(!S)return o();P?o(!1,P):i=setTimeout(()=>{o(!1,1e-7)},100)}S=!1}try{t=new IntersectionObserver(A,{..._,root:r.ownerDocument})}catch{t=new IntersectionObserver(A,_)}t.observe(n)}return o(!0),s}function HV(n,e,t,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,f=Ew(n),d=r||s?[...f?ed(f):[],...ed(e)]:[];d.forEach(m=>{r&&m.addEventListener("scroll",t,{passive:!0}),s&&m.addEventListener("resize",t)});const h=f&&a?VV(f,t):null;let p=-1,g=null;o&&(g=new ResizeObserver(m=>{let[_]=m;_&&_.target===f&&g&&(g.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{g&&g.observe(e)})),t()}),f&&!l&&g.observe(f),g.observe(e));let y,x=l?ol(n):null;l&&w();function w(){const m=ol(n);x&&(m.x!==x.x||m.y!==x.y||m.width!==x.width||m.height!==x.height)&&t(),x=m,y=requestAnimationFrame(w)}return t(),()=>{d.forEach(m=>{r&&m.removeEventListener("scroll",t),s&&m.removeEventListener("resize",t)}),h&&h(),g&&g.disconnect(),g=null,l&&cancelAnimationFrame(y)}}const DE=(n,e,t)=>{const i=new Map,r={platform:BV,...t},s={...r.platform,_c:i};return xV(n,e,{...r,platform:s})};/* -* React Tooltip -* {@link https://github.com/ReactTooltip/react-tooltip} -* @copyright ReactTooltip Team -* @license MIT -*/const WV="react-tooltip-core-styles",GV="react-tooltip-base-styles",kE={core:!1,base:!1};function NE({css:n,id:e=GV,type:t="base",ref:i}){var r,s;if(!n||typeof document>"u"||kE[t]||t==="core"&&typeof process<"u"&&(!((r=process==null?void 0:process.env)===null||r===void 0)&&r.REACT_TOOLTIP_DISABLE_CORE_STYLES)||t!=="base"&&typeof process<"u"&&(!((s=process==null?void 0:process.env)===null||s===void 0)&&s.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;t==="core"&&(e=WV),i||(i={});const{insertAt:o}=i;if(document.getElementById(e))return void console.warn(`[react-tooltip] Element with id '${e}' already exists. Call \`removeStyle()\` first`);const a=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.id=e,l.type="text/css",o==="top"&&a.firstChild?a.insertBefore(l,a.firstChild):a.appendChild(l),l.styleSheet?l.styleSheet.cssText=n:l.appendChild(document.createTextNode(n)),kE[t]=!0}const OE=(n,e,t)=>{let i=null;return function(...r){const s=()=>{i=null,t||n.apply(this,r)};t&&!i&&(n.apply(this,r),i=setTimeout(s,e)),t||(i&&clearTimeout(i),i=setTimeout(s,e))}},jV="DEFAULT_TOOLTIP_ID",XV={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},YV=N.createContext({getTooltipData:()=>XV});function zL(n=jV){return N.useContext(YV).getTooltipData(n)}const qV=typeof window<"u"?N.useLayoutEffect:N.useEffect,ZV=n=>{if(!(n instanceof HTMLElement||n instanceof SVGElement))return!1;const e=getComputedStyle(n);return["overflow","overflow-x","overflow-y"].some(t=>{const i=e.getPropertyValue(t);return i==="auto"||i==="scroll"})},UE=n=>{if(!n)return null;let e=n.parentElement;for(;e;){if(ZV(e))return e;e=e.parentElement}return document.scrollingElement||document.documentElement},zE=async({elementReference:n=null,tooltipReference:e=null,tooltipArrowReference:t=null,place:i="top",offset:r=10,strategy:s="absolute",middlewares:o=[MV(Number(r)),wV(),AV({padding:5})],border:a})=>{if(!n)return{tooltipStyles:{},tooltipArrowStyles:{},place:i};if(e===null)return{tooltipStyles:{},tooltipArrowStyles:{},place:i};const l=o;return t?(l.push(_V({element:t,padding:5})),DE(n,e,{placement:i,strategy:s,middleware:l}).then(({x:f,y:d,placement:h,middlewareData:p})=>{var g,y;const x={left:`${f}px`,top:`${d}px`,border:a},{x:w,y:m}=(g=p.arrow)!==null&&g!==void 0?g:{x:0,y:0},_=(y={top:"bottom",right:"left",bottom:"top",left:"right"}[h.split("-")[0]])!==null&&y!==void 0?y:"bottom",S=a&&{borderBottom:a,borderRight:a};let A=0;if(a){const E=`${a}`.match(/(\d+)px/);A=E!=null&&E[1]?Number(E[1]):1}return{tooltipStyles:x,tooltipArrowStyles:{left:w!=null?`${w}px`:"",top:m!=null?`${m}px`:"",right:"",bottom:"",...S,[_]:`-${4+A}px`},place:h}})):DE(n,e,{placement:"bottom",strategy:s,middleware:l}).then(({x:f,y:d,placement:h})=>({tooltipStyles:{left:`${f}px`,top:`${d}px`},tooltipArrowStyles:{},place:h}))};var kl={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},iy={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const $V=({forwardRef:n,id:e,className:t,classNameArrow:i,variant:r="dark",anchorId:s,anchorSelect:o,place:a="top",offset:l=10,events:f=["hover"],openOnClick:d=!1,positionStrategy:h="absolute",middlewares:p,wrapper:g,delayShow:y=0,delayHide:x=0,float:w=!1,hidden:m=!1,noArrow:_=!1,clickable:S=!1,closeOnEsc:A=!1,closeOnScroll:E=!1,closeOnResize:P=!1,openEvents:I,closeEvents:L,globalCloseEvents:C,imperativeModeOnly:R,style:W,position:Z,afterShow:X,afterHide:j,content:Y,contentWrapperRef:te,isOpen:ne,setIsOpen:D,activeAnchor:B,setActiveAnchor:V,border:re,opacity:ee,arrowColor:ie,role:ce="tooltip"})=>{var be;const ge=N.useRef(null),Q=N.useRef(null),Fe=N.useRef(null),Be=N.useRef(null),[_e,Me]=N.useState(a),[ve,oe]=N.useState({}),[we,Ne]=N.useState({}),[Le,Ye]=N.useState(!1),[Je,Ge]=N.useState(!1),[He,pt]=N.useState(null),z=N.useRef(!1),k=N.useRef(null),{anchorRefs:le,setActiveAnchor:Ee}=zL(e),Te=N.useRef(!1),[Pe,nt]=N.useState([]),Oe=N.useRef(!1),he=d||f.includes("click"),je=he||(I==null?void 0:I.click)||(I==null?void 0:I.dblclick)||(I==null?void 0:I.mousedown),G=I?{...I}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};!I&&he&&Object.assign(G,{mouseenter:!1,focus:!1,click:!0});const de=L?{...L}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};!L&&he&&Object.assign(de,{mouseleave:!1,blur:!1});const ye=C?{...C}:{escape:A||!1,scroll:E||!1,resize:P||!1,clickOutsideAnchor:je||!1};R&&(Object.assign(G,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(de,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(ye,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),qV(()=>(Oe.current=!0,()=>{Oe.current=!1}),[]);const Ce=De=>{Oe.current&&(De&&Ge(!0),setTimeout(()=>{Oe.current&&(D==null||D(De),ne===void 0&&Ye(De))},10))};N.useEffect(()=>{if(ne===void 0)return()=>null;ne&&Ge(!0);const De=setTimeout(()=>{Ye(ne)},10);return()=>{clearTimeout(De)}},[ne]),N.useEffect(()=>{Le!==z.current&&(z.current=Le,Le&&(X==null||X()))},[Le]);const tt=(De=y)=>{Fe.current&&clearTimeout(Fe.current),Fe.current=setTimeout(()=>{Ce(!0)},De)},ut=(De=x)=>{Be.current&&clearTimeout(Be.current),Be.current=setTimeout(()=>{Te.current||Ce(!1)},De)},Lt=De=>{var it;if(!De)return;const at=(it=De.currentTarget)!==null&&it!==void 0?it:De.target;if(!(at!=null&&at.isConnected))return V(null),void Ee({current:null});y?tt():Ce(!0),V(at),Ee({current:at}),Be.current&&clearTimeout(Be.current)},q=()=>{S?ut(x||100):x?ut():Ce(!1),Fe.current&&clearTimeout(Fe.current)},ue=({x:De,y:it})=>{var at;const Gt={getBoundingClientRect:()=>({x:De,y:it,width:0,height:0,top:it,left:De,right:De,bottom:it})};zE({place:(at=He==null?void 0:He.place)!==null&&at!==void 0?at:a,offset:l,elementReference:Gt,tooltipReference:ge.current,tooltipArrowReference:Q.current,strategy:h,middlewares:p,border:re}).then(nn=>{Object.keys(nn.tooltipStyles).length&&oe(nn.tooltipStyles),Object.keys(nn.tooltipArrowStyles).length&&Ne(nn.tooltipArrowStyles),Me(nn.place)})},Ae=De=>{if(!De)return;const it=De,at={x:it.clientX,y:it.clientY};ue(at),k.current=at},Ie=De=>{var it;if(!Le)return;const at=De.target;!((it=ge.current)===null||it===void 0)&&it.contains(at)||[document.querySelector(`[id='${s}']`),...Pe].some(Gt=>Gt==null?void 0:Gt.contains(at))||(Ce(!1),Fe.current&&clearTimeout(Fe.current))},Xe=OE(Lt,50,!0),Ue=OE(q,50,!0),et=N.useCallback(()=>{var De,it;const at=(De=He==null?void 0:He.position)!==null&&De!==void 0?De:Z;at?ue(at):w?k.current&&ue(k.current):B!=null&&B.isConnected&&zE({place:(it=He==null?void 0:He.place)!==null&&it!==void 0?it:a,offset:l,elementReference:B,tooltipReference:ge.current,tooltipArrowReference:Q.current,strategy:h,middlewares:p,border:re}).then(Gt=>{Oe.current&&(Object.keys(Gt.tooltipStyles).length&&oe(Gt.tooltipStyles),Object.keys(Gt.tooltipArrowStyles).length&&Ne(Gt.tooltipArrowStyles),Me(Gt.place))})},[Le,B,Y,W,a,He==null?void 0:He.place,l,h,Z,He==null?void 0:He.position,w]);N.useEffect(()=>{var De,it;const at=new Set(le);Pe.forEach(Ke=>{at.add({current:Ke})});const Gt=document.querySelector(`[id='${s}']`);Gt&&at.add({current:Gt});const nn=()=>{Ce(!1)},hi=UE(B),pi=UE(ge.current);ye.scroll&&(window.addEventListener("scroll",nn),hi==null||hi.addEventListener("scroll",nn),pi==null||pi.addEventListener("scroll",nn));let Yn=null;ye.resize?window.addEventListener("resize",nn):B&&ge.current&&(Yn=HV(B,ge.current,et,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const U=Ke=>{Ke.key==="Escape"&&Ce(!1)};ye.escape&&window.addEventListener("keydown",U),ye.clickOutsideAnchor&&window.addEventListener("click",Ie);const K=[],pe=Ke=>{Le||Lt(Ke)},se=()=>{Le&&q()},xe=["mouseenter","mouseleave","focus","blur"],st=["click","dblclick","mousedown","mouseup"];Object.entries(G).forEach(([Ke,dt])=>{dt&&(xe.includes(Ke)?K.push({event:Ke,listener:Xe}):st.includes(Ke)&&K.push({event:Ke,listener:pe}))}),Object.entries(de).forEach(([Ke,dt])=>{dt&&(xe.includes(Ke)?K.push({event:Ke,listener:Ue}):st.includes(Ke)&&K.push({event:Ke,listener:se}))}),w&&K.push({event:"mousemove",listener:Ae});const ct=()=>{Te.current=!0},ft=()=>{Te.current=!1,q()};return S&&!je&&((De=ge.current)===null||De===void 0||De.addEventListener("mouseenter",ct),(it=ge.current)===null||it===void 0||it.addEventListener("mouseleave",ft)),K.forEach(({event:Ke,listener:dt})=>{at.forEach(vt=>{var mt;(mt=vt.current)===null||mt===void 0||mt.addEventListener(Ke,dt)})}),()=>{var Ke,dt;ye.scroll&&(window.removeEventListener("scroll",nn),hi==null||hi.removeEventListener("scroll",nn),pi==null||pi.removeEventListener("scroll",nn)),ye.resize?window.removeEventListener("resize",nn):Yn==null||Yn(),ye.clickOutsideAnchor&&window.removeEventListener("click",Ie),ye.escape&&window.removeEventListener("keydown",U),S&&!je&&((Ke=ge.current)===null||Ke===void 0||Ke.removeEventListener("mouseenter",ct),(dt=ge.current)===null||dt===void 0||dt.removeEventListener("mouseleave",ft)),K.forEach(({event:vt,listener:mt})=>{at.forEach(Nt=>{var vn;(vn=Nt.current)===null||vn===void 0||vn.removeEventListener(vt,mt)})})}},[B,et,Je,le,Pe,I,L,C,he]),N.useEffect(()=>{var De,it;let at=(it=(De=He==null?void 0:He.anchorSelect)!==null&&De!==void 0?De:o)!==null&&it!==void 0?it:"";!at&&e&&(at=`[data-tooltip-id='${e}']`);const Gt=new MutationObserver(nn=>{const hi=[],pi=[];nn.forEach(Yn=>{if(Yn.type==="attributes"&&Yn.attributeName==="data-tooltip-id"&&Yn.target.getAttribute("data-tooltip-id")===e&&hi.push(Yn.target),Yn.type==="childList"){if(B){const U=[...Yn.removedNodes].filter(K=>K.nodeType===1);if(at)try{pi.push(...U.filter(K=>K.matches(at))),pi.push(...U.flatMap(K=>[...K.querySelectorAll(at)]))}catch{}U.some(K=>{var pe;return!!(!((pe=K==null?void 0:K.contains)===null||pe===void 0)&&pe.call(K,B))&&(Ge(!1),Ce(!1),V(null),Fe.current&&clearTimeout(Fe.current),Be.current&&clearTimeout(Be.current),!0)})}if(at)try{const U=[...Yn.addedNodes].filter(K=>K.nodeType===1);hi.push(...U.filter(K=>K.matches(at))),hi.push(...U.flatMap(K=>[...K.querySelectorAll(at)]))}catch{}}}),(hi.length||pi.length)&&nt(Yn=>[...Yn.filter(U=>!pi.includes(U)),...hi])});return Gt.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"]}),()=>{Gt.disconnect()}},[e,o,He==null?void 0:He.anchorSelect,B]),N.useEffect(()=>{et()},[et]),N.useEffect(()=>{if(!(te!=null&&te.current))return()=>null;const De=new ResizeObserver(()=>{et()});return De.observe(te.current),()=>{De.disconnect()}},[Y,te==null?void 0:te.current]),N.useEffect(()=>{var De;const it=document.querySelector(`[id='${s}']`),at=[...Pe,it];B&&at.includes(B)||V((De=Pe[0])!==null&&De!==void 0?De:it)},[s,Pe,B]),N.useEffect(()=>()=>{Fe.current&&clearTimeout(Fe.current),Be.current&&clearTimeout(Be.current)},[]),N.useEffect(()=>{var De;let it=(De=He==null?void 0:He.anchorSelect)!==null&&De!==void 0?De:o;if(!it&&e&&(it=`[data-tooltip-id='${e}']`),it)try{const at=Array.from(document.querySelectorAll(it));nt(at)}catch{nt([])}},[e,o,He==null?void 0:He.anchorSelect]);const kt=(be=He==null?void 0:He.content)!==null&&be!==void 0?be:Y,Ln=Le&&Object.keys(ve).length>0;return N.useImperativeHandle(n,()=>({open:De=>{if(De!=null&&De.anchorSelect)try{document.querySelector(De.anchorSelect)}catch{return void console.warn(`[react-tooltip] "${De.anchorSelect}" is not a valid CSS selector`)}pt(De??null),De!=null&&De.delay?tt(De.delay):Ce(!0)},close:De=>{De!=null&&De.delay?ut(De.delay):Ce(!1)},activeAnchor:B,place:_e,isOpen:!!(Je&&!m&&kt&&Ln)})),Je&&!m&&kt?yr.createElement(g,{id:e,role:ce,className:r_("react-tooltip",kl.tooltip,iy.tooltip,iy[r],t,`react-tooltip__place-${_e}`,kl[Ln?"show":"closing"],Ln?"react-tooltip__show":"react-tooltip__closing",h==="fixed"&&kl.fixed,S&&kl.clickable),onTransitionEnd:De=>{Le||De.propertyName!=="opacity"||(Ge(!1),pt(null),j==null||j())},style:{...W,...ve,opacity:ee!==void 0&&Ln?ee:void 0},ref:ge},kt,yr.createElement(g,{className:r_("react-tooltip-arrow",kl.arrow,iy.arrow,i,_&&kl.noArrow),style:{...we,background:ie?`linear-gradient(to right bottom, transparent 50%, ${ie} 50%)`:void 0},ref:Q})):null},JV=({content:n})=>yr.createElement("span",{dangerouslySetInnerHTML:{__html:n}}),FE=(n,e)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(n,e);yr.forwardRef(({id:n,anchorId:e,anchorSelect:t,content:i,html:r,render:s,className:o,classNameArrow:a,variant:l="dark",place:f="top",offset:d=10,wrapper:h="div",children:p=null,events:g=["hover"],openOnClick:y=!1,positionStrategy:x="absolute",middlewares:w,delayShow:m=0,delayHide:_=0,float:S=!1,hidden:A=!1,noArrow:E=!1,clickable:P=!1,closeOnEsc:I=!1,closeOnScroll:L=!1,closeOnResize:C=!1,openEvents:R,closeEvents:W,globalCloseEvents:Z,imperativeModeOnly:X=!1,style:j,position:Y,isOpen:te,disableStyleInjection:ne=!1,border:D,opacity:B,arrowColor:V,setIsOpen:re,afterShow:ee,afterHide:ie,role:ce="tooltip"},be)=>{const[ge,Q]=N.useState(i),[Fe,Be]=N.useState(r),[_e,Me]=N.useState(f),[ve,oe]=N.useState(l),[we,Ne]=N.useState(d),[Le,Ye]=N.useState(m),[Je,Ge]=N.useState(_),[He,pt]=N.useState(S),[z,k]=N.useState(A),[le,Ee]=N.useState(h),[Te,Pe]=N.useState(g),[nt,Oe]=N.useState(x),[he,je]=N.useState(null),[G,de]=N.useState(null),ye=N.useRef(ne),{anchorRefs:Ce,activeAnchor:tt}=zL(n),ut=Ie=>Ie==null?void 0:Ie.getAttributeNames().reduce((Xe,Ue)=>{var et;return Ue.startsWith("data-tooltip-")&&(Xe[Ue.replace(/^data-tooltip-/,"")]=(et=Ie==null?void 0:Ie.getAttribute(Ue))!==null&&et!==void 0?et:null),Xe},{}),Lt=Ie=>{const Xe={place:Ue=>{var et;Me((et=Ue)!==null&&et!==void 0?et:f)},content:Ue=>{Q(Ue??i)},html:Ue=>{Be(Ue??r)},variant:Ue=>{var et;oe((et=Ue)!==null&&et!==void 0?et:l)},offset:Ue=>{Ne(Ue===null?d:Number(Ue))},wrapper:Ue=>{var et;Ee((et=Ue)!==null&&et!==void 0?et:h)},events:Ue=>{const et=Ue==null?void 0:Ue.split(" ");Pe(et??g)},"position-strategy":Ue=>{var et;Oe((et=Ue)!==null&&et!==void 0?et:x)},"delay-show":Ue=>{Ye(Ue===null?m:Number(Ue))},"delay-hide":Ue=>{Ge(Ue===null?_:Number(Ue))},float:Ue=>{pt(Ue===null?S:Ue==="true")},hidden:Ue=>{k(Ue===null?A:Ue==="true")},"class-name":Ue=>{je(Ue)}};Object.values(Xe).forEach(Ue=>Ue(null)),Object.entries(Ie).forEach(([Ue,et])=>{var kt;(kt=Xe[Ue])===null||kt===void 0||kt.call(Xe,et)})};N.useEffect(()=>{Q(i)},[i]),N.useEffect(()=>{Be(r)},[r]),N.useEffect(()=>{Me(f)},[f]),N.useEffect(()=>{oe(l)},[l]),N.useEffect(()=>{Ne(d)},[d]),N.useEffect(()=>{Ye(m)},[m]),N.useEffect(()=>{Ge(_)},[_]),N.useEffect(()=>{pt(S)},[S]),N.useEffect(()=>{k(A)},[A]),N.useEffect(()=>{Oe(x)},[x]),N.useEffect(()=>{ye.current!==ne&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")},[ne]),N.useEffect(()=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:ne==="core",disableBase:ne}}))},[]),N.useEffect(()=>{var Ie;const Xe=new Set(Ce);let Ue=t;if(!Ue&&n&&(Ue=`[data-tooltip-id='${n}']`),Ue)try{document.querySelectorAll(Ue).forEach(it=>{Xe.add({current:it})})}catch{console.warn(`[react-tooltip] "${Ue}" is not a valid CSS selector`)}const et=document.querySelector(`[id='${e}']`);if(et&&Xe.add({current:et}),!Xe.size)return()=>null;const kt=(Ie=G??et)!==null&&Ie!==void 0?Ie:tt.current,Ln=new MutationObserver(it=>{it.forEach(at=>{var Gt;if(!kt||at.type!=="attributes"||!(!((Gt=at.attributeName)===null||Gt===void 0)&&Gt.startsWith("data-tooltip-")))return;const nn=ut(kt);Lt(nn)})}),De={attributes:!0,childList:!1,subtree:!1};if(kt){const it=ut(kt);Lt(it),Ln.observe(kt,De)}return()=>{Ln.disconnect()}},[Ce,tt,G,e,t]),N.useEffect(()=>{j!=null&&j.border&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),D&&!FE("border",`${D}`)&&console.warn(`[react-tooltip] "${D}" is not a valid \`border\`.`),j!=null&&j.opacity&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),B&&!FE("opacity",`${B}`)&&console.warn(`[react-tooltip] "${B}" is not a valid \`opacity\`.`)},[]);let q=p;const ue=N.useRef(null);if(s){const Ie=s({content:ge??null,activeAnchor:G});q=Ie?yr.createElement("div",{ref:ue,className:"react-tooltip-content-wrapper"},Ie):null}else ge&&(q=ge);Fe&&(q=yr.createElement(JV,{content:Fe}));const Ae={forwardRef:be,id:n,anchorId:e,anchorSelect:t,className:r_(o,he),classNameArrow:a,content:q,contentWrapperRef:ue,place:_e,variant:ve,offset:we,wrapper:le,events:Te,openOnClick:y,positionStrategy:nt,middlewares:w,delayShow:Le,delayHide:Je,float:He,hidden:z,noArrow:E,clickable:P,closeOnEsc:I,closeOnScroll:L,closeOnResize:C,openEvents:R,closeEvents:W,globalCloseEvents:Z,imperativeModeOnly:X,style:j,position:Y,isOpen:te,border:D,opacity:B,arrowColor:V,setIsOpen:re,afterShow:ee,afterHide:ie,activeAnchor:G,setActiveAnchor:Ie=>de(Ie),role:ce};return yr.createElement($V,{...Ae})});typeof window<"u"&&window.addEventListener("react-tooltip-inject-styles",n=>{n.detail.disableCore||NE({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),n.detail.disableBase||NE({css:` -.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}`,type:"base"})});const KV=()=>{const[n,e]=N.useState(!1),t=()=>e(!0),i=()=>e(!1),r=()=>{const s=document.createElement("a");s.href=CE,s.download="Satyam_Mishra_Resume",s.click()};return H.jsxs("div",{className:"max-w-screen-xl mx-auto my-10 space-y-10 max",children:[H.jsxs("div",{children:[H.jsx("h2",{className:`${$t.sectionHeadText} text-center`,children:"Resume."}),H.jsx("p",{className:`${$t.sectionSubText} text-center`,children:"Check out my beginner resume🤣"})]}),H.jsx("div",{className:"md:flex justify-center items-center",children:H.jsxs(Wg,{options:{max:45,scale:1,speed:450},className:"group bg-white shadow-[#fcd4d4] shadow-card rounded-2xl mx-auto w-[90%] md:min-w-1/3 md:max-w-3xl h-full",children:[H.jsx("div",{className:"group-hover:opacity-100 relative w-full h-full mb-5",children:H.jsx("img",{src:fV,loading:"lazy",alt:"Resume cover image",className:"w-full h-full object-cover rounded-2xl"})}),H.jsxs("div",{className:"group-hover:opacity-100 flex items-center space-x-5 md:space-y-5 justify-center md:absolute md:top-10 md:-right-10 md:bottom-0 md:flex md:flex-col md:items-center md:justify-center opacity-0 hover:opacity-100 transition-opacity duration-300",children:[H.jsx("button",{className:"bg-blue-600 text-white hover:text-white-100 hover:bg-blue-800 py-2 px-3 rounded-xl text-[15px] font-medium cursor-pointer mb-2 md:mb-0",onClick:r,children:"Download"}),H.jsx("button",{className:"bg-green-600 text-white hover:text-white-100 hover:bg-green-800 py-2 px-3 rounded-xl text-[15px] font-medium cursor-pointer mb-2 md:mb-0",onClick:t,children:"View"})]})]})}),n&&H.jsx("div",{className:"fixed inset-0 z-50 overflow-auto -top-10 bg-black bg-opacity-60 flex items-center justify-center",children:H.jsxs("div",{className:"bg-white p-2 rounded-2xl max-w-screen-lg w-[70%] relative",children:[H.jsx("button",{className:"absolute -top-12 right-0 md:top-2 md:-right-20 bg-black hover:bg-gray-800 py-2 px-3 rounded-xl text-white hover:text-gray-200",onClick:i,children:"Close"}),H.jsx("iframe",{title:"PDF Viewer",src:CE,className:"w-full h-[400px]"})]})})]})};function QV(){return H.jsxs("div",{className:"bg-white",children:[H.jsx(Qs,{}),H.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:H.jsx(KV,{})})]})}function FL(){return H.jsxs(On.div,{variants:Wo(0),className:"h-screen ",children:[H.jsx("h1",{className:`${$t.sectionHeadText} text-center`,children:"Coming soon"}),H.jsx("p",{className:`${$t.heroSubText} mt-2 text-black-100 text-center`,children:"More things are on the way ✌️."})]})}const e6=()=>H.jsx("div",{className:"h-screen flex justify-center items-center",children:H.jsx("img",{src:su,className:"w-[150px] h-[117px] "})});function t6(){return H.jsx(N.Suspense,{fallback:e6(),children:H.jsxs("div",{className:"bg-white",children:[H.jsx(Qs,{}),H.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:H.jsx(FL,{})})]})})}const td={_origin:"https://api.emailjs.com"},n6=(n,e="https://api.emailjs.com")=>{td._userID=n,td._origin=e},BL=(n,e,t)=>{if(!n)throw"The public key is required. Visit https://dashboard.emailjs.com/admin/account";if(!e)throw"The service ID is required. Visit https://dashboard.emailjs.com/admin";if(!t)throw"The template ID is required. Visit https://dashboard.emailjs.com/admin/templates";return!0};class BE{constructor(e){this.status=e?e.status:0,this.text=e?e.responseText:"Network Error"}}const VL=(n,e,t={})=>new Promise((i,r)=>{const s=new XMLHttpRequest;s.addEventListener("load",({target:o})=>{const a=new BE(o);a.status===200||a.text==="OK"?i(a):r(a)}),s.addEventListener("error",({target:o})=>{r(new BE(o))}),s.open("POST",td._origin+n,!0),Object.keys(t).forEach(o=>{s.setRequestHeader(o,t[o])}),s.send(e)}),i6=(n,e,t,i)=>{const r=i||td._userID;return BL(r,n,e),VL("/api/v1.0/email/send",JSON.stringify({lib_version:"3.11.0",user_id:r,service_id:n,template_id:e,template_params:t}),{"Content-type":"application/json"})},r6=n=>{let e;if(typeof n=="string"?e=document.querySelector(n):e=n,!e||e.nodeName!=="FORM")throw"The 3rd parameter is expected to be the HTML form element or the style selector of form";return e},s6=(n,e,t,i)=>{const r=i||td._userID,s=r6(t);BL(r,n,e);const o=new FormData(s);return o.append("lib_version","3.11.0"),o.append("service_id",n),o.append("template_id",e),o.append("user_id",r),VL("/api/v1.0/email/send-form",o)},o6={init:n6,send:i6,sendForm:s6},a6=()=>{const n=N.useRef(),[e,t]=N.useState({name:"",email:"",message:""}),[i,r]=N.useState(!1),s=a=>{const{target:l}=a,{name:f,value:d}=l;t({...e,[f]:d})},o=a=>{a.preventDefault(),r(!0),o6.send("service_w2nrv74","template_hmf109b",{from_name:e.name,to_name:"Satyam Mishra",from_email:e.email,to_email:"satyammishra9050@gmail.com",message:e.message},"Tlnn1O7PC8WlYPRT7").then(()=>{r(!1),alert("Thank you. I will get back to you as soon as possible."),t({name:"",email:"",message:""})},l=>{r(!1),console.error(l),alert("Ahh, something went wrong. Please try again.")})};return H.jsxs("div",{className:"xl:mt-6 flex xl:flex-row flex-col-reverse gap-10 overflow-hidden md:w-[80%] lg:w-[70%] ",children:[H.jsxs(On.div,{variants:T5("left","tween",.2,1),className:"flex-[0.75] bg-white p-8 shadow-[#fcd4d4] shadow-card rounded-2xl",children:[H.jsx("p",{className:$t.sectionSubText,children:"I am open to work"}),H.jsx("h3",{className:$t.sectionHeadText,children:"Get In Touch."}),H.jsxs("form",{ref:n,onSubmit:o,className:"mt-12 flex flex-col gap-8",children:[H.jsxs("label",{className:"flex flex-col",children:[H.jsx("span",{className:"text-black font-medium mb-4",children:"Your Name"}),H.jsx("input",{type:"text",name:"name",value:e.name,onChange:s,placeholder:"What's your good name?",className:"bg-secondary py-4 px-6 placeholder:text-white-100 text-white rounded-lg outline-none border-none font-medium"})]}),H.jsxs("label",{className:"flex flex-col",children:[H.jsx("span",{className:"text-black font-medium mb-4",children:"Your email"}),H.jsx("input",{type:"email",name:"email",value:e.email,onChange:s,placeholder:"What's your web address?",className:"bg-secondary py-4 px-6 placeholder:text-white-100 text-white rounded-lg outline-none border-none font-medium"})]}),H.jsxs("label",{className:"flex flex-col",children:[H.jsx("span",{className:"text-black font-medium mb-4",children:"Your Message"}),H.jsx("textarea",{rows:7,name:"message",value:e.message,onChange:s,placeholder:"What you want to say?",className:"bg-secondary py-4 px-6 placeholder:text-white-100 text-white rounded-lg outline-none border-none font-medium"})]}),H.jsxs("button",{type:"submit",className:"bg-black hover:bg-slate-600 py-3 px-8 rounded-xl outline-none w-fit text-white font-bold shadow-md shadow-primary",children:[i?"Sending...":"Send"," "]})]})]})," "]})},l6=au(a6,"contact");function c6(){return H.jsxs("div",{className:"bg-white",children:[H.jsx(Qs,{}),H.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:H.jsx(l6,{})})]})}const VE="data:image/webp;base64,UklGRggMAABXRUJQVlA4WAoAAAAwAAAA7wAA7wAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZBTFBIggkAAAGwBgC0MTfWGWamsV3bbVDbdvu29tp23dRuk7VRu12btW0H89Kkk0wwcx6Ce8+959tf721ETAD87f//pevfqP+jaW9v+fHERZfrHuI9l+viiR+3vJX2aP9G/n81nMlTln+biVLvfLN8SrLzr0HMgLSfPUi05ETG+OrGztE9bT+Sv5AxwGHQQibsdKOi7h3jgw2X/5jtHlTas220v5FqlJaDGrybkWSQnNMPoDb3T3MYn8jnb6BWM9PijE3V9ALUbsHaROMSlVaIWi7KiDMmYUsKUNsFi0ONh3V6Jmo953Grweh5ArV/rLuRCMtAFtdHGoYRmcika7oxiNuDjO6ONQCDs5DVrEHcOVcgux/4s1b/JDJ8vC5jA/6JLOcN48oy34dM++ZaWPLfhozvCWQoZh+yfjienUaXkflLDZlJykb2Xa1Z6XAXDWB+V0a65KMhdPdio6cHDaKnBxNt89EwujuxkJqHBvJuCgONXGgosxtqL+YyGsxL0Zpz/o6Gc7+/1izb0IBuMetsPhrS2Rob5DMmvmHaqpuLBjWvgab8T6JhPVZFT2+ggV2rpcEoPbuWf2i9HtNW/1akH8+vq6Z2rxvqXztbmG+AhuKy5A2CcgMGvOnSSU5Gf38od6gwzIzRzx6U/g1U2G/UL7r4abgdKvy9MNypnXEof2DFAKDD7zr4tR1Udog4HK2ZqCx5LmulwDTinGrnhpug0rZccXci9PIJyt8IIh1LvCp5F/qByC3i8H2t9ESCrwgB6HpVnUudQOwLErCLRqwnKIwWBBE/qvJtGAgeIOOIRR+PIMVWosDv/cpk7duw+JH+bVrWjAu1WEMTaia1HfDY0s0HXZV52w6im8nAB7QRlk0iShiYVpSXtWtGv0gQHjtw9heu8paA+GgpmSG6WIIkg8SBaQUiurdPrwnyTXUf2lOIiEtAYogUXKCJuAIagRLAvC69nxPI+g9+K90kI0iOO0YPa5Cmvwy9BsrB5Vqo5jEWAZIKE3SQjkTjuUiQhKs1EFlApTkXSbLcEerNQKo9uegjC19VzplJZgwXE6Tddqg2Dcm+ysUMaThFtQN0PuTiM3l/KpaEdPdxcUgetlArnVCeiQezm8BqpfzvEsI6PDRAgrlVVBqLlMfwMJECjlJpB6kVPKwjsVmhEA+pP3g4SKIwUJ2JSLo0lINwLwkco85OWjiYg+FIc6syDjex+RwsJ5JvV6UX0r4czUH1TBrYVZXltAqSgMX2RTQWqnKa1jBg8iEaxxSJQ9IZwOYGEhijxkhS5wP5iLhFYogayyh5WwOjA0ksVmMfpXRgdTuF35RwFhNyRfJS20OgyKFCChJ+HJhdQACTVJhK6LaDm7B8AhNVWEHoWWB3GYElKnxHJzeYn4QieV+pcIfOCmD4c3k3FfBHukkcDZDnq0KvMZ0TwLH1tjRsQK8/nddYgnXy+tJ7lE5bnobLe4heGpk8G0/hXmnz6L1FZjcwfUjaG/S2kpnP1fvSNtH7icwErl6S9j29U2RacTVE2nF618jEcZUk7Qq9TDIBXNWVdoteLhWvmatYaS56BVTuAdeB0tz0SqmUsBUlrZSelwr6cVVDPx4yYVw1kVZIL49MDa7aScujl0OmC1djpGXTu05mGlevS7tC7ziZNK4+lHaE3s9ktnO1T9qP9HaQyTHzFFgibQe998hgU556o/S36M2l8whP8+XNpPcQnb08HZX3AL2BdEpiOGqK8gfQa0EHn+BoIYFG9AJ8dA4yZLsmz+ekBzfoYE9+JqH8a6DgN4R+ZMdylsDXKqwhhJ24GYMEF6owjdJhGy9VLlIYqUISJXyGl2VIsaYK9iJK7pqcJJdSyDGpAAcp4c92PoJOIsUvQcmVpHANG6YNSHKuGsNp4WQuXkWaw9SI9tEq6sfDZC+N0nA14CQt9PTlYIIXaf4Kii4lhp6++hvvRaKvqtKTGpY8rznT816kmqyKXz41xDftOgvYhGQzzarAVnr4Sy19NT+OdD8AZccogPceM+vJNqMYCd+nTlChAog/1NdRymGk7A5SB7Ypgd711XRTLcOLpD8AhUepgeieF66T+DXFSLy7Sg6XIoieD5roouUHxUj9mkUlWKMMou+roQ71Asb8igrOAaVTFELEux/0tankHLa+AFX01VEL/lQKEXM+mVJNjboPbcpDRX8Gxcep9t/n1o1vbKVkbznlnSuo8CjV/G5r4L8L/lj3QM/adll+9fs8+uaBIlT7vEU1mKGJsksvv2oRZ3n9mg91+CAoH54v6tLQyLovnqHmug+kjs7VwR2nerBEVFcAAPOQk6QO1QTJNQ5r4BXQYJxH0MD/ArA9U0jnS3+QHvilcvlhOoAVgq7VKwOgySkqOx1A0LFXtcWgxah8MXh3aFkQ8iWN35xA0rlfLVeYHmCWIPQ+WBbYN1G4GAVEq2Yq9SRoMuiOIPSNKAusW+QVpwLZziUKnbPrAqaJQndSWVBln7TngPALCg0FbZoPiMKrQWVB7FVJf5op2Y4q8wNotJ1PFC4rB5rlSSlNAtLtfIp4k3UCbworaVYODPPJeBOIv6XIatBq6E1RuK08mCPBk0gttlCJCwF6geHCfA3LM70jbiWQT1fB1wV0u14UvlMemJeJ8taiV7tUgTWg3fAbou4FlAcw8IKY7aDg5/QuBugHevoE4YSKgLn7gq9PuYoQ81xXLxz7dfs7aQ/3behQoSc5XxfQ8VJRX1dIn9Y71OaDlm0/C/Im6gjWEvvGoidIzBKDz2upE60rkaDrXqViTmjJXkjJkwL6fkYMpuoIfqU0FXT+rph0LS0j9CZo3e9HIe5IHY2ms9umNwg9LgJn66g9md/8QffxV0S4a2moPpWzUaD/RlkC8EuzfiKIXE0EDlu4BOBy/ZhpZDcAHlNyBeBck26ARFYScNnKJQA3BvNzoyHw2ey2ALw52sTMhZrAab2rAhBPPhDKyYk44DX+sAjEkh9mjmySGMzCvgjgNugLIUJ1tT0Q+LVlMOabYwaWpxdxdW84cN3+Fk8XmwLfMV9z9FUEcG56vJibwufNwHzbc7wcaAT8O9O8fJSm2cEQdjvPxdk2YBQdMzwcuGc4wEA2+Ep7vk8TwGB2P6a3Qx3BeNoeuamvGw9YwJD6Tb+lpyuPO8GwBjx1TT/nJtvA0NonHNfLsbFWMLymLuuLK2RVxYaI7vfagUGOfelUBaJVqYqHHw4BI5266nZZjVSJTwXDbU6acRoR/6GKUa85ff2Cv1Z/+///8wRWUDggkAAAAFAPAJ0BKvAA8AA+bTaZSaQjIqEgKACADYlpbuF2sRtACewD32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D31gAAP7/1gAAAAAAAAAAAA==",u6="/portfolio-react-threejs/assets/appstore-0b8f390b.png",f6="/portfolio-react-threejs/assets/colab-9e4861eb.png",d6="/portfolio-react-threejs/assets/huggingface-720eadc9.png",h6=({index:n,name:e,description:t,tags:i,image:r,source_code_link:s,date:o,link_type:a})=>H.jsx(On.div,{children:H.jsx("div",{children:H.jsx(On.div,{variants:ou("right","spring",.5*n,.75),children:H.jsxs(Wg,{options:{max:45,scale:1,speed:450},className:"bg-white shadow-[#fcd4d4] shadow-card p-5 rounded-2xl sm:w-[360px] w-full",children:[H.jsxs("div",{className:"relative w-full h-[230px]",children:[H.jsx("img",{src:r,alt:"project_image",className:"w-full h-full object-cover rounded-2xl"}),H.jsx("div",{className:"absolute inset-0 flex justify-end m-3 card-img_hover",children:H.jsx("div",{onClick:()=>window.open(s,"_blank"),className:"white-gradient w-10 h-10 rounded-full flex justify-center items-center cursor-pointer",children:H.jsx("img",{src:a=="github"?VE:a=="colab"?f6:a=="huggingface"?d6:a=="appstore"?u6:VE,alt:"github repositories for projects",className:"w-1/2 h-1/2 object-contain"})})})]}),H.jsxs("div",{className:"mt-5",children:[H.jsx("h3",{className:"text-black font-bold text-[24px]",children:e}),H.jsx("p",{className:"mt-2 text-secondary text-[14px]",children:t})]}),H.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[i.map(l=>H.jsxs("p",{className:`text-[14px] ${l.color}`,children:["#",l.name," "]},`${e}-${l.name}`))," "]}),H.jsx("p",{children:o})]})})})}),p6=()=>H.jsxs("div",{children:[H.jsxs(On.div,{variants:Wo(0),children:[H.jsx("h2",{className:`${$t.sectionHeadText} text-center`,children:"Projects."}),H.jsx("p",{className:`${$t.sectionSubText} text-center`,children:"My works?"})]}),H.jsx(On.div,{variants:ou("","",.1,1),className:"w-full flex",children:H.jsx("p",{className:"mt-3 text-secondary text-center text-[17px] max-w-full leading-[30px]",children:"The projects that are listed below provide examples of my work in the real world, showcasing my abilities and experience. Each project has a brief description, links to code repositories, and live demonstrations. It exhibits my ability to work with various technologies, manage projects efficiently, and solve complex problems."})}),H.jsxs("div",{className:" mt-20 grid md:grid-cols-2 lg:grid-cols-3 gap-5",children:[_5.map((n,e)=>H.jsx(h6,{index:e,...n},`project-${e}`))," "]})]}),m6=au(p6,"project");function g6(){return H.jsxs("div",{className:"bg-white",children:[H.jsx(Qs,{}),H.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:H.jsx(m6,{})})]})}/** - * @license - * Copyright 2010-2023 Three.js Authors - * SPDX-License-Identifier: MIT - */const Zg="151",Ia={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Da={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},HL=0,u_=1,WL=2,v6=3,y6=0,Tw=1,Cw=2,wc=3,Zs=0,Si=1,Fr=2,x6=2,Hs=0,qa=1,f_=2,d_=3,h_=4,GL=5,Na=100,jL=101,XL=102,p_=103,m_=104,YL=200,qL=201,ZL=202,$L=203,Pw=204,Lw=205,JL=206,KL=207,QL=208,eR=209,tR=210,nR=0,iR=1,rR=2,fg=3,sR=4,oR=5,aR=6,lR=7,kd=0,cR=1,uR=2,Hr=0,fR=1,dR=2,hR=3,Rw=4,pR=5,$g=300,$o=301,Jo=302,nd=303,id=304,lu=306,rd=1e3,ui=1001,sd=1002,_n=1003,dg=1004,_6=1004,Cf=1005,w6=1005,Sn=1006,Iw=1007,S6=1007,Ko=1008,M6=1008,Qo=1009,mR=1010,gR=1011,Dw=1012,vR=1013,Lo=1014,zs=1015,qc=1016,yR=1017,xR=1018,Za=1020,_R=1021,qi=1023,wR=1024,SR=1025,Go=1026,al=1027,MR=1028,AR=1029,bR=1030,ER=1031,TR=1033,xm=33776,_m=33777,wm=33778,Sm=33779,g_=35840,v_=35841,y_=35842,x_=35843,CR=36196,__=37492,w_=37496,S_=37808,M_=37809,A_=37810,b_=37811,E_=37812,T_=37813,C_=37814,P_=37815,L_=37816,R_=37817,I_=37818,D_=37819,k_=37820,N_=37821,Mm=36492,PR=36283,O_=36284,U_=36285,z_=36286,LR=2200,RR=2201,IR=2202,od=2300,ad=2301,Am=2302,Va=2400,Ha=2401,ld=2402,Jg=2500,kw=2501,A6=0,b6=1,E6=2,$s=3e3,Wt=3001,DR=3200,kR=3201,sa=0,NR=1,T6="",Or="srgb",Zc="srgb-linear",Nw="display-p3",C6=0,bm=7680,P6=7681,L6=7682,R6=7683,I6=34055,D6=34056,k6=5386,N6=512,O6=513,U6=514,z6=515,F6=516,B6=517,V6=518,OR=519,cd=35044,H6=35048,W6=35040,G6=35045,j6=35049,X6=35041,Y6=35046,q6=35050,Z6=35042,$6="100",F_="300 es",hg=1035;class hs{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const i=this._listeners;return i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;const r=this._listeners[e];if(r!==void 0){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const i=this._listeners[e.type];if(i!==void 0){e.target=this;const r=i.slice(0);for(let s=0,o=r.length;s>8&255]+ai[n>>16&255]+ai[n>>24&255]+"-"+ai[e&255]+ai[e>>8&255]+"-"+ai[e>>16&15|64]+ai[e>>24&255]+"-"+ai[t&63|128]+ai[t>>8&255]+"-"+ai[t>>16&255]+ai[t>>24&255]+ai[i&255]+ai[i>>8&255]+ai[i>>16&255]+ai[i>>24&255]).toLowerCase()}function mn(n,e,t){return Math.max(e,Math.min(t,n))}function Ow(n,e){return(n%e+e)%e}function J6(n,e,t,i,r){return i+(n-e)*(r-i)/(t-e)}function K6(n,e,t){return n!==e?(t-n)/(e-n):0}function Pf(n,e,t){return(1-t)*n+t*e}function Q6(n,e,t,i){return Pf(n,e,1-Math.exp(-t*i))}function eH(n,e=1){return e-Math.abs(Ow(n,e*2)-e)}function tH(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function nH(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function iH(n,e){return n+Math.floor(Math.random()*(e-n+1))}function rH(n,e){return n+Math.random()*(e-n)}function sH(n){return n*(.5-Math.random())}function oH(n){n!==void 0&&(HE=n);let e=HE+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function aH(n){return n*$a}function lH(n){return n*$c}function B_(n){return(n&n-1)===0&&n!==0}function UR(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function zR(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function cH(n,e,t,i,r){const s=Math.cos,o=Math.sin,a=s(t/2),l=o(t/2),f=s((e+i)/2),d=o((e+i)/2),h=s((e-i)/2),p=o((e-i)/2),g=s((i-e)/2),y=o((i-e)/2);switch(r){case"XYX":n.set(a*d,l*h,l*p,a*f);break;case"YZY":n.set(l*p,a*d,l*h,a*f);break;case"ZXZ":n.set(l*h,l*p,a*d,a*f);break;case"XZX":n.set(a*d,l*y,l*g,a*f);break;case"YXY":n.set(l*g,a*d,l*y,a*f);break;case"ZYZ":n.set(l*y,l*g,a*d,a*f);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function $i(n,e){switch(e.constructor){case Float32Array:return n;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function bt(n,e){switch(e.constructor){case Float32Array:return n;case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}const FR={DEG2RAD:$a,RAD2DEG:$c,generateUUID:Qi,clamp:mn,euclideanModulo:Ow,mapLinear:J6,inverseLerp:K6,lerp:Pf,damp:Q6,pingpong:eH,smoothstep:tH,smootherstep:nH,randInt:iH,randFloat:rH,randFloatSpread:sH,seededRandom:oH,degToRad:aH,radToDeg:lH,isPowerOfTwo:B_,ceilPowerOfTwo:UR,floorPowerOfTwo:zR,setQuaternionFromProperEuler:cH,normalize:bt,denormalize:$i};class Se{constructor(e=0,t=0){Se.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,i=this.y,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6],this.y=r[1]*t+r[4]*i+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(mn(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const i=Math.cos(t),r=Math.sin(t),s=this.x-e.x,o=this.y-e.y;return this.x=s*i-o*r+e.x,this.y=s*r+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Ct{constructor(){Ct.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1]}set(e,t,i,r,s,o,a,l,f){const d=this.elements;return d[0]=e,d[1]=r,d[2]=a,d[3]=t,d[4]=s,d[5]=l,d[6]=i,d[7]=o,d[8]=f,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,r=t.elements,s=this.elements,o=i[0],a=i[3],l=i[6],f=i[1],d=i[4],h=i[7],p=i[2],g=i[5],y=i[8],x=r[0],w=r[3],m=r[6],_=r[1],S=r[4],A=r[7],E=r[2],P=r[5],I=r[8];return s[0]=o*x+a*_+l*E,s[3]=o*w+a*S+l*P,s[6]=o*m+a*A+l*I,s[1]=f*x+d*_+h*E,s[4]=f*w+d*S+h*P,s[7]=f*m+d*A+h*I,s[2]=p*x+g*_+y*E,s[5]=p*w+g*S+y*P,s[8]=p*m+g*A+y*I,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],f=e[7],d=e[8];return t*o*d-t*a*f-i*s*d+i*a*l+r*s*f-r*o*l}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],f=e[7],d=e[8],h=d*o-a*f,p=a*l-d*s,g=f*s-o*l,y=t*h+i*p+r*g;if(y===0)return this.set(0,0,0,0,0,0,0,0,0);const x=1/y;return e[0]=h*x,e[1]=(r*f-d*i)*x,e[2]=(a*i-r*o)*x,e[3]=p*x,e[4]=(d*t-r*l)*x,e[5]=(r*s-a*t)*x,e[6]=g*x,e[7]=(i*l-f*t)*x,e[8]=(o*t-i*s)*x,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,r,s,o,a){const l=Math.cos(s),f=Math.sin(s);return this.set(i*l,i*f,-i*(l*o+f*a)+o+e,-r*f,r*l,-r*(-f*o+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(ry.makeScale(e,t)),this}rotate(e){return this.premultiply(ry.makeRotation(-e)),this}translate(e,t){return this.premultiply(ry.makeTranslation(e,t)),this}makeTranslation(e,t){return this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,i=e.elements;for(let r=0;r<9;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const ry=new Ct;function BR(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}const uH={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Sc(n,e){return new uH[n](e)}function ud(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function Oc(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function sy(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}const fH=new Ct().fromArray([.8224621,.0331941,.0170827,.177538,.9668058,.0723974,-1e-7,1e-7,.9105199]),dH=new Ct().fromArray([1.2249401,-.0420569,-.0196376,-.2249404,1.0420571,-.0786361,1e-7,0,1.0982735]);function hH(n){return n.convertSRGBToLinear().applyMatrix3(dH)}function pH(n){return n.applyMatrix3(fH).convertLinearToSRGB()}const mH={[Zc]:n=>n,[Or]:n=>n.convertSRGBToLinear(),[Nw]:hH},gH={[Zc]:n=>n,[Or]:n=>n.convertLinearToSRGB(),[Nw]:pH},Li={enabled:!1,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(n){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!n},get workingColorSpace(){return Zc},set workingColorSpace(n){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(n,e,t){if(this.enabled===!1||e===t||!e||!t)return n;const i=mH[e],r=gH[t];if(i===void 0||r===void 0)throw new Error(`Unsupported color space conversion, "${e}" to "${t}".`);return r(i(n))},fromWorkingColorSpace:function(n,e){return this.convert(n,this.workingColorSpace,e)},toWorkingColorSpace:function(n,e){return this.convert(n,e,this.workingColorSpace)}};let Nl;class Uw{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{Nl===void 0&&(Nl=ud("canvas")),Nl.width=e.width,Nl.height=e.height;const i=Nl.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=Nl}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=ud("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const r=i.getImageData(0,0,e.width,e.height),s=r.data;for(let o=0;o0&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==$g)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case rd:e.x=e.x-Math.floor(e.x);break;case ui:e.x=e.x<0?0:1;break;case sd:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case rd:e.y=e.y-Math.floor(e.y);break;case ui:e.y=e.y<0?0:1;break;case sd:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}}gn.DEFAULT_IMAGE=null;gn.DEFAULT_MAPPING=$g;gn.DEFAULT_ANISOTROPY=1;class Bt{constructor(e=0,t=0,i=0,r=1){Bt.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,r){return this.x=e,this.y=t,this.z=i,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,i=this.y,r=this.z,s=this.w,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*r+o[12]*s,this.y=o[1]*t+o[5]*i+o[9]*r+o[13]*s,this.z=o[2]*t+o[6]*i+o[10]*r+o[14]*s,this.w=o[3]*t+o[7]*i+o[11]*r+o[15]*s,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,r,s;const l=e.elements,f=l[0],d=l[4],h=l[8],p=l[1],g=l[5],y=l[9],x=l[2],w=l[6],m=l[10];if(Math.abs(d-p)<.01&&Math.abs(h-x)<.01&&Math.abs(y-w)<.01){if(Math.abs(d+p)<.1&&Math.abs(h+x)<.1&&Math.abs(y+w)<.1&&Math.abs(f+g+m-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const S=(f+1)/2,A=(g+1)/2,E=(m+1)/2,P=(d+p)/4,I=(h+x)/4,L=(y+w)/4;return S>A&&S>E?S<.01?(i=0,r=.707106781,s=.707106781):(i=Math.sqrt(S),r=P/i,s=I/i):A>E?A<.01?(i=.707106781,r=0,s=.707106781):(r=Math.sqrt(A),i=P/r,s=L/r):E<.01?(i=.707106781,r=.707106781,s=0):(s=Math.sqrt(E),i=I/s,r=L/s),this.set(i,r,s,t),this}let _=Math.sqrt((w-y)*(w-y)+(h-x)*(h-x)+(p-d)*(p-d));return Math.abs(_)<.001&&(_=1),this.x=(w-y)/_,this.y=(h-x)/_,this.z=(p-d)/_,this.w=Math.acos((f+g+m-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class Gr extends hs{constructor(e=1,t=1,i={}){super(),this.isWebGLRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new Bt(0,0,e,t),this.scissorTest=!1,this.viewport=new Bt(0,0,e,t);const r={width:e,height:t,depth:1};this.texture=new gn(r,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.encoding),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=i.generateMipmaps!==void 0?i.generateMipmaps:!1,this.texture.internalFormat=i.internalFormat!==void 0?i.internalFormat:null,this.texture.minFilter=i.minFilter!==void 0?i.minFilter:Sn,this.depthBuffer=i.depthBuffer!==void 0?i.depthBuffer:!0,this.stencilBuffer=i.stencilBuffer!==void 0?i.stencilBuffer:!1,this.depthTexture=i.depthTexture!==void 0?i.depthTexture:null,this.samples=i.samples!==void 0?i.samples:0}setSize(e,t,i=1){(this.width!==e||this.height!==t||this.depth!==i)&&(this.width=e,this.height=t,this.depth=i,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=i,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new Wa(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class Kg extends gn{constructor(e=null,t=1,i=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=_n,this.minFilter=_n,this.wrapR=ui,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class yH extends Gr{constructor(e=1,t=1,i=1){super(e,t),this.isWebGLArrayRenderTarget=!0,this.depth=i,this.texture=new Kg(null,e,t,i),this.texture.isRenderTargetTexture=!0}}class zw extends gn{constructor(e=null,t=1,i=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=_n,this.minFilter=_n,this.wrapR=ui,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class xH extends Gr{constructor(e=1,t=1,i=1){super(e,t),this.isWebGL3DRenderTarget=!0,this.depth=i,this.texture=new zw(null,e,t,i),this.texture.isRenderTargetTexture=!0}}class _H extends Gr{constructor(e=1,t=1,i=1,r={}){super(e,t,r),this.isWebGLMultipleRenderTargets=!0;const s=this.texture;this.texture=[];for(let o=0;o=0?1:-1,S=1-m*m;if(S>Number.EPSILON){const E=Math.sqrt(S),P=Math.atan2(E,m*_);w=Math.sin(w*P)/E,a=Math.sin(a*P)/E}const A=a*_;if(l=l*w+p*A,f=f*w+g*A,d=d*w+y*A,h=h*w+x*A,w===1-a){const E=1/Math.sqrt(l*l+f*f+d*d+h*h);l*=E,f*=E,d*=E,h*=E}}e[t]=l,e[t+1]=f,e[t+2]=d,e[t+3]=h}static multiplyQuaternionsFlat(e,t,i,r,s,o){const a=i[r],l=i[r+1],f=i[r+2],d=i[r+3],h=s[o],p=s[o+1],g=s[o+2],y=s[o+3];return e[t]=a*y+d*h+l*g-f*p,e[t+1]=l*y+d*p+f*h-a*g,e[t+2]=f*y+d*g+a*p-l*h,e[t+3]=d*y-a*h-l*p-f*g,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,r){return this._x=e,this._y=t,this._z=i,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){const i=e._x,r=e._y,s=e._z,o=e._order,a=Math.cos,l=Math.sin,f=a(i/2),d=a(r/2),h=a(s/2),p=l(i/2),g=l(r/2),y=l(s/2);switch(o){case"XYZ":this._x=p*d*h+f*g*y,this._y=f*g*h-p*d*y,this._z=f*d*y+p*g*h,this._w=f*d*h-p*g*y;break;case"YXZ":this._x=p*d*h+f*g*y,this._y=f*g*h-p*d*y,this._z=f*d*y-p*g*h,this._w=f*d*h+p*g*y;break;case"ZXY":this._x=p*d*h-f*g*y,this._y=f*g*h+p*d*y,this._z=f*d*y+p*g*h,this._w=f*d*h-p*g*y;break;case"ZYX":this._x=p*d*h-f*g*y,this._y=f*g*h+p*d*y,this._z=f*d*y-p*g*h,this._w=f*d*h+p*g*y;break;case"YZX":this._x=p*d*h+f*g*y,this._y=f*g*h+p*d*y,this._z=f*d*y-p*g*h,this._w=f*d*h-p*g*y;break;case"XZY":this._x=p*d*h-f*g*y,this._y=f*g*h-p*d*y,this._z=f*d*y+p*g*h,this._w=f*d*h+p*g*y;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,r=Math.sin(i);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],r=t[4],s=t[8],o=t[1],a=t[5],l=t[9],f=t[2],d=t[6],h=t[10],p=i+a+h;if(p>0){const g=.5/Math.sqrt(p+1);this._w=.25/g,this._x=(d-l)*g,this._y=(s-f)*g,this._z=(o-r)*g}else if(i>a&&i>h){const g=2*Math.sqrt(1+i-a-h);this._w=(d-l)/g,this._x=.25*g,this._y=(r+o)/g,this._z=(s+f)/g}else if(a>h){const g=2*Math.sqrt(1+a-i-h);this._w=(s-f)/g,this._x=(r+o)/g,this._y=.25*g,this._z=(l+d)/g}else{const g=2*Math.sqrt(1+h-i-a);this._w=(o-r)/g,this._x=(s+f)/g,this._y=(l+d)/g,this._z=.25*g}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(mn(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(i===0)return this;const r=Math.min(1,t/i);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const i=e._x,r=e._y,s=e._z,o=e._w,a=t._x,l=t._y,f=t._z,d=t._w;return this._x=i*d+o*a+r*f-s*l,this._y=r*d+o*l+s*a-i*f,this._z=s*d+o*f+i*l-r*a,this._w=o*d-i*a-r*l-s*f,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const i=this._x,r=this._y,s=this._z,o=this._w;let a=o*e._w+i*e._x+r*e._y+s*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=i,this._y=r,this._z=s,this;const l=1-a*a;if(l<=Number.EPSILON){const g=1-t;return this._w=g*o+t*this._w,this._x=g*i+t*this._x,this._y=g*r+t*this._y,this._z=g*s+t*this._z,this.normalize(),this._onChangeCallback(),this}const f=Math.sqrt(l),d=Math.atan2(f,a),h=Math.sin((1-t)*d)/f,p=Math.sin(t*d)/f;return this._w=o*h+this._w*p,this._x=i*h+this._x*p,this._y=r*h+this._y*p,this._z=s*h+this._z*p,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){const e=Math.random(),t=Math.sqrt(1-e),i=Math.sqrt(e),r=2*Math.PI*Math.random(),s=2*Math.PI*Math.random();return this.set(t*Math.cos(r),i*Math.sin(s),i*Math.cos(s),t*Math.sin(r))}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}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 O{constructor(e=0,t=0,i=0){O.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(WE.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(WE.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[3]*i+s[6]*r,this.y=s[1]*t+s[4]*i+s[7]*r,this.z=s[2]*t+s[5]*i+s[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,r=this.z,s=e.elements,o=1/(s[3]*t+s[7]*i+s[11]*r+s[15]);return this.x=(s[0]*t+s[4]*i+s[8]*r+s[12])*o,this.y=(s[1]*t+s[5]*i+s[9]*r+s[13])*o,this.z=(s[2]*t+s[6]*i+s[10]*r+s[14])*o,this}applyQuaternion(e){const t=this.x,i=this.y,r=this.z,s=e.x,o=e.y,a=e.z,l=e.w,f=l*t+o*r-a*i,d=l*i+a*t-s*r,h=l*r+s*i-o*t,p=-s*t-o*i-a*r;return this.x=f*l+p*-s+d*-a-h*-o,this.y=d*l+p*-o+h*-s-f*-a,this.z=h*l+p*-a+f*-o-d*-s,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[4]*i+s[8]*r,this.y=s[1]*t+s[5]*i+s[9]*r,this.z=s[2]*t+s[6]*i+s[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,r=e.y,s=e.z,o=t.x,a=t.y,l=t.z;return this.x=r*l-s*a,this.y=s*o-i*l,this.z=i*a-r*o,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return ay.copy(this).projectOnVector(e),this.sub(ay)}reflect(e){return this.sub(ay.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(mn(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,r=this.z-e.z;return t*t+i*i+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){const r=Math.sin(t)*e;return this.x=r*Math.sin(i),this.y=Math.cos(t)*e,this.z=r*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,t=Math.random()*Math.PI*2,i=Math.sqrt(1-e**2);return this.x=i*Math.cos(t),this.y=i*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const ay=new O,WE=new fi;class ps{constructor(e=new O(1/0,1/0,1/0),t=new O(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,i=e.length;tthis.max.x||e.ythis.max.y||e.zthis.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.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,bs),bs.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Xu),vp.subVectors(this.max,Xu),Ul.subVectors(e.a,Xu),zl.subVectors(e.b,Xu),Fl.subVectors(e.c,Xu),mo.subVectors(zl,Ul),go.subVectors(Fl,zl),_a.subVectors(Ul,Fl);let t=[0,-mo.z,mo.y,0,-go.z,go.y,0,-_a.z,_a.y,mo.z,0,-mo.x,go.z,0,-go.x,_a.z,0,-_a.x,-mo.y,mo.x,0,-go.y,go.x,0,-_a.y,_a.x,0];return!ly(t,Ul,zl,Fl,vp)||(t=[1,0,0,0,1,0,0,0,1],!ly(t,Ul,zl,Fl,vp))?!1:(yp.crossVectors(mo,go),t=[yp.x,yp.y,yp.z],ly(t,Ul,zl,Fl,vp))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,bs).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(bs).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(As[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),As[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),As[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),As[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),As[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),As[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),As[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),As[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(As),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const As=[new O,new O,new O,new O,new O,new O,new O,new O],bs=new O,Ol=new ps,Ul=new O,zl=new O,Fl=new O,mo=new O,go=new O,_a=new O,Xu=new O,vp=new O,yp=new O,wa=new O;function ly(n,e,t,i,r){for(let s=0,o=n.length-3;s<=o;s+=3){wa.fromArray(n,s);const a=r.x*Math.abs(wa.x)+r.y*Math.abs(wa.y)+r.z*Math.abs(wa.z),l=e.dot(wa),f=t.dot(wa),d=i.dot(wa);if(Math.max(-Math.max(l,f,d),Math.min(l,f,d))>a)return!1}return!0}const wH=new ps,Yu=new O,cy=new O;class ms{constructor(e=new O,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const i=this.center;t!==void 0?i.copy(t):wH.setFromPoints(e).getCenter(i);let r=0;for(let s=0,o=e.length;sthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Yu.subVectors(e,this.center);const t=Yu.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),r=(i-this.radius)*.5;this.center.addScaledVector(Yu,r/i),this.radius+=r}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(cy.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Yu.copy(e.center).add(cy)),this.expandByPoint(Yu.copy(e.center).sub(cy))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const Es=new O,uy=new O,xp=new O,vo=new O,fy=new O,_p=new O,dy=new O;class Nd{constructor(e=new O,t=new O(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,Es)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Es.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Es.copy(this.origin).addScaledVector(this.direction,t),Es.distanceToSquared(e))}distanceSqToSegment(e,t,i,r){uy.copy(e).add(t).multiplyScalar(.5),xp.copy(t).sub(e).normalize(),vo.copy(this.origin).sub(uy);const s=e.distanceTo(t)*.5,o=-this.direction.dot(xp),a=vo.dot(this.direction),l=-vo.dot(xp),f=vo.lengthSq(),d=Math.abs(1-o*o);let h,p,g,y;if(d>0)if(h=o*l-a,p=o*a-l,y=s*d,h>=0)if(p>=-y)if(p<=y){const x=1/d;h*=x,p*=x,g=h*(h+o*p+2*a)+p*(o*h+p+2*l)+f}else p=s,h=Math.max(0,-(o*p+a)),g=-h*h+p*(p+2*l)+f;else p=-s,h=Math.max(0,-(o*p+a)),g=-h*h+p*(p+2*l)+f;else p<=-y?(h=Math.max(0,-(-o*s+a)),p=h>0?-s:Math.min(Math.max(-s,-l),s),g=-h*h+p*(p+2*l)+f):p<=y?(h=0,p=Math.min(Math.max(-s,-l),s),g=p*(p+2*l)+f):(h=Math.max(0,-(o*s+a)),p=h>0?s:Math.min(Math.max(-s,-l),s),g=-h*h+p*(p+2*l)+f);else p=o>0?-s:s,h=Math.max(0,-(o*p+a)),g=-h*h+p*(p+2*l)+f;return i&&i.copy(this.origin).addScaledVector(this.direction,h),r&&r.copy(uy).addScaledVector(xp,p),g}intersectSphere(e,t){Es.subVectors(e.center,this.origin);const i=Es.dot(this.direction),r=Es.dot(Es)-i*i,s=e.radius*e.radius;if(r>s)return null;const o=Math.sqrt(s-r),a=i-o,l=i+o;return l<0?null:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,r,s,o,a,l;const f=1/this.direction.x,d=1/this.direction.y,h=1/this.direction.z,p=this.origin;return f>=0?(i=(e.min.x-p.x)*f,r=(e.max.x-p.x)*f):(i=(e.max.x-p.x)*f,r=(e.min.x-p.x)*f),d>=0?(s=(e.min.y-p.y)*d,o=(e.max.y-p.y)*d):(s=(e.max.y-p.y)*d,o=(e.min.y-p.y)*d),i>o||s>r||((s>i||isNaN(i))&&(i=s),(o=0?(a=(e.min.z-p.z)*h,l=(e.max.z-p.z)*h):(a=(e.max.z-p.z)*h,l=(e.min.z-p.z)*h),i>l||a>r)||((a>i||i!==i)&&(i=a),(l=0?i:r,t)}intersectsBox(e){return this.intersectBox(e,Es)!==null}intersectTriangle(e,t,i,r,s){fy.subVectors(t,e),_p.subVectors(i,e),dy.crossVectors(fy,_p);let o=this.direction.dot(dy),a;if(o>0){if(r)return null;a=1}else if(o<0)a=-1,o=-o;else return null;vo.subVectors(this.origin,e);const l=a*this.direction.dot(_p.crossVectors(vo,_p));if(l<0)return null;const f=a*this.direction.dot(fy.cross(vo));if(f<0||l+f>o)return null;const d=-a*vo.dot(dy);return d<0?null:this.at(d/o,s)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class gt{constructor(){gt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}set(e,t,i,r,s,o,a,l,f,d,h,p,g,y,x,w){const m=this.elements;return m[0]=e,m[4]=t,m[8]=i,m[12]=r,m[1]=s,m[5]=o,m[9]=a,m[13]=l,m[2]=f,m[6]=d,m[10]=h,m[14]=p,m[3]=g,m[7]=y,m[11]=x,m[15]=w,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 gt().fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,i=e.elements,r=1/Bl.setFromMatrixColumn(e,0).length(),s=1/Bl.setFromMatrixColumn(e,1).length(),o=1/Bl.setFromMatrixColumn(e,2).length();return t[0]=i[0]*r,t[1]=i[1]*r,t[2]=i[2]*r,t[3]=0,t[4]=i[4]*s,t[5]=i[5]*s,t[6]=i[6]*s,t[7]=0,t[8]=i[8]*o,t[9]=i[9]*o,t[10]=i[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,i=e.x,r=e.y,s=e.z,o=Math.cos(i),a=Math.sin(i),l=Math.cos(r),f=Math.sin(r),d=Math.cos(s),h=Math.sin(s);if(e.order==="XYZ"){const p=o*d,g=o*h,y=a*d,x=a*h;t[0]=l*d,t[4]=-l*h,t[8]=f,t[1]=g+y*f,t[5]=p-x*f,t[9]=-a*l,t[2]=x-p*f,t[6]=y+g*f,t[10]=o*l}else if(e.order==="YXZ"){const p=l*d,g=l*h,y=f*d,x=f*h;t[0]=p+x*a,t[4]=y*a-g,t[8]=o*f,t[1]=o*h,t[5]=o*d,t[9]=-a,t[2]=g*a-y,t[6]=x+p*a,t[10]=o*l}else if(e.order==="ZXY"){const p=l*d,g=l*h,y=f*d,x=f*h;t[0]=p-x*a,t[4]=-o*h,t[8]=y+g*a,t[1]=g+y*a,t[5]=o*d,t[9]=x-p*a,t[2]=-o*f,t[6]=a,t[10]=o*l}else if(e.order==="ZYX"){const p=o*d,g=o*h,y=a*d,x=a*h;t[0]=l*d,t[4]=y*f-g,t[8]=p*f+x,t[1]=l*h,t[5]=x*f+p,t[9]=g*f-y,t[2]=-f,t[6]=a*l,t[10]=o*l}else if(e.order==="YZX"){const p=o*l,g=o*f,y=a*l,x=a*f;t[0]=l*d,t[4]=x-p*h,t[8]=y*h+g,t[1]=h,t[5]=o*d,t[9]=-a*d,t[2]=-f*d,t[6]=g*h+y,t[10]=p-x*h}else if(e.order==="XZY"){const p=o*l,g=o*f,y=a*l,x=a*f;t[0]=l*d,t[4]=-h,t[8]=f*d,t[1]=p*h+x,t[5]=o*d,t[9]=g*h-y,t[2]=y*h-g,t[6]=a*d,t[10]=x*h+p}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(SH,e,MH)}lookAt(e,t,i){const r=this.elements;return Gi.subVectors(e,t),Gi.lengthSq()===0&&(Gi.z=1),Gi.normalize(),yo.crossVectors(i,Gi),yo.lengthSq()===0&&(Math.abs(i.z)===1?Gi.x+=1e-4:Gi.z+=1e-4,Gi.normalize(),yo.crossVectors(i,Gi)),yo.normalize(),wp.crossVectors(Gi,yo),r[0]=yo.x,r[4]=wp.x,r[8]=Gi.x,r[1]=yo.y,r[5]=wp.y,r[9]=Gi.y,r[2]=yo.z,r[6]=wp.z,r[10]=Gi.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,r=t.elements,s=this.elements,o=i[0],a=i[4],l=i[8],f=i[12],d=i[1],h=i[5],p=i[9],g=i[13],y=i[2],x=i[6],w=i[10],m=i[14],_=i[3],S=i[7],A=i[11],E=i[15],P=r[0],I=r[4],L=r[8],C=r[12],R=r[1],W=r[5],Z=r[9],X=r[13],j=r[2],Y=r[6],te=r[10],ne=r[14],D=r[3],B=r[7],V=r[11],re=r[15];return s[0]=o*P+a*R+l*j+f*D,s[4]=o*I+a*W+l*Y+f*B,s[8]=o*L+a*Z+l*te+f*V,s[12]=o*C+a*X+l*ne+f*re,s[1]=d*P+h*R+p*j+g*D,s[5]=d*I+h*W+p*Y+g*B,s[9]=d*L+h*Z+p*te+g*V,s[13]=d*C+h*X+p*ne+g*re,s[2]=y*P+x*R+w*j+m*D,s[6]=y*I+x*W+w*Y+m*B,s[10]=y*L+x*Z+w*te+m*V,s[14]=y*C+x*X+w*ne+m*re,s[3]=_*P+S*R+A*j+E*D,s[7]=_*I+S*W+A*Y+E*B,s[11]=_*L+S*Z+A*te+E*V,s[15]=_*C+S*X+A*ne+E*re,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[4],r=e[8],s=e[12],o=e[1],a=e[5],l=e[9],f=e[13],d=e[2],h=e[6],p=e[10],g=e[14],y=e[3],x=e[7],w=e[11],m=e[15];return y*(+s*l*h-r*f*h-s*a*p+i*f*p+r*a*g-i*l*g)+x*(+t*l*g-t*f*p+s*o*p-r*o*g+r*f*d-s*l*d)+w*(+t*f*h-t*a*g-s*o*h+i*o*g+s*a*d-i*f*d)+m*(-r*a*d-t*l*h+t*a*p+r*o*h-i*o*p+i*l*d)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],f=e[7],d=e[8],h=e[9],p=e[10],g=e[11],y=e[12],x=e[13],w=e[14],m=e[15],_=h*w*f-x*p*f+x*l*g-a*w*g-h*l*m+a*p*m,S=y*p*f-d*w*f-y*l*g+o*w*g+d*l*m-o*p*m,A=d*x*f-y*h*f+y*a*g-o*x*g-d*a*m+o*h*m,E=y*h*l-d*x*l-y*a*p+o*x*p+d*a*w-o*h*w,P=t*_+i*S+r*A+s*E;if(P===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const I=1/P;return e[0]=_*I,e[1]=(x*p*s-h*w*s-x*r*g+i*w*g+h*r*m-i*p*m)*I,e[2]=(a*w*s-x*l*s+x*r*f-i*w*f-a*r*m+i*l*m)*I,e[3]=(h*l*s-a*p*s-h*r*f+i*p*f+a*r*g-i*l*g)*I,e[4]=S*I,e[5]=(d*w*s-y*p*s+y*r*g-t*w*g-d*r*m+t*p*m)*I,e[6]=(y*l*s-o*w*s-y*r*f+t*w*f+o*r*m-t*l*m)*I,e[7]=(o*p*s-d*l*s+d*r*f-t*p*f-o*r*g+t*l*g)*I,e[8]=A*I,e[9]=(y*h*s-d*x*s-y*i*g+t*x*g+d*i*m-t*h*m)*I,e[10]=(o*x*s-y*a*s+y*i*f-t*x*f-o*i*m+t*a*m)*I,e[11]=(d*a*s-o*h*s-d*i*f+t*h*f+o*i*g-t*a*g)*I,e[12]=E*I,e[13]=(d*x*r-y*h*r+y*i*p-t*x*p-d*i*w+t*h*w)*I,e[14]=(y*a*r-o*x*r-y*i*l+t*x*l+o*i*w-t*a*w)*I,e[15]=(o*h*r-d*a*r+d*i*l-t*h*l-o*i*p+t*a*p)*I,this}scale(e){const t=this.elements,i=e.x,r=e.y,s=e.z;return t[0]*=i,t[4]*=r,t[8]*=s,t[1]*=i,t[5]*=r,t[9]*=s,t[2]*=i,t[6]*=r,t[10]*=s,t[3]*=i,t[7]*=r,t[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,r))}makeTranslation(e,t,i){return this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),r=Math.sin(t),s=1-i,o=e.x,a=e.y,l=e.z,f=s*o,d=s*a;return this.set(f*o+i,f*a-r*l,f*l+r*a,0,f*a+r*l,d*a+i,d*l-r*o,0,f*l-r*a,d*l+r*o,s*l*l+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,r,s,o){return this.set(1,i,s,0,e,1,o,0,t,r,1,0,0,0,0,1),this}compose(e,t,i){const r=this.elements,s=t._x,o=t._y,a=t._z,l=t._w,f=s+s,d=o+o,h=a+a,p=s*f,g=s*d,y=s*h,x=o*d,w=o*h,m=a*h,_=l*f,S=l*d,A=l*h,E=i.x,P=i.y,I=i.z;return r[0]=(1-(x+m))*E,r[1]=(g+A)*E,r[2]=(y-S)*E,r[3]=0,r[4]=(g-A)*P,r[5]=(1-(p+m))*P,r[6]=(w+_)*P,r[7]=0,r[8]=(y+S)*I,r[9]=(w-_)*I,r[10]=(1-(p+x))*I,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,i){const r=this.elements;let s=Bl.set(r[0],r[1],r[2]).length();const o=Bl.set(r[4],r[5],r[6]).length(),a=Bl.set(r[8],r[9],r[10]).length();this.determinant()<0&&(s=-s),e.x=r[12],e.y=r[13],e.z=r[14],Rr.copy(this);const f=1/s,d=1/o,h=1/a;return Rr.elements[0]*=f,Rr.elements[1]*=f,Rr.elements[2]*=f,Rr.elements[4]*=d,Rr.elements[5]*=d,Rr.elements[6]*=d,Rr.elements[8]*=h,Rr.elements[9]*=h,Rr.elements[10]*=h,t.setFromRotationMatrix(Rr),i.x=s,i.y=o,i.z=a,this}makePerspective(e,t,i,r,s,o){const a=this.elements,l=2*s/(t-e),f=2*s/(i-r),d=(t+e)/(t-e),h=(i+r)/(i-r),p=-(o+s)/(o-s),g=-2*o*s/(o-s);return a[0]=l,a[4]=0,a[8]=d,a[12]=0,a[1]=0,a[5]=f,a[9]=h,a[13]=0,a[2]=0,a[6]=0,a[10]=p,a[14]=g,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(e,t,i,r,s,o){const a=this.elements,l=1/(t-e),f=1/(i-r),d=1/(o-s),h=(t+e)*l,p=(i+r)*f,g=(o+s)*d;return a[0]=2*l,a[4]=0,a[8]=0,a[12]=-h,a[1]=0,a[5]=2*f,a[9]=0,a[13]=-p,a[2]=0,a[6]=0,a[10]=-2*d,a[14]=-g,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let r=0;r<16;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}const Bl=new O,Rr=new gt,SH=new O(0,0,0),MH=new O(1,1,1),yo=new O,wp=new O,Gi=new O,GE=new gt,jE=new fi;class gl{constructor(e=0,t=0,i=0,r=gl.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,r=this._order){return this._x=e,this._y=t,this._z=i,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){const r=e.elements,s=r[0],o=r[4],a=r[8],l=r[1],f=r[5],d=r[9],h=r[2],p=r[6],g=r[10];switch(t){case"XYZ":this._y=Math.asin(mn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-d,g),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(p,f),this._z=0);break;case"YXZ":this._x=Math.asin(-mn(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(a,g),this._z=Math.atan2(l,f)):(this._y=Math.atan2(-h,s),this._z=0);break;case"ZXY":this._x=Math.asin(mn(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(-h,g),this._z=Math.atan2(-o,f)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-mn(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(p,g),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,f));break;case"YZX":this._z=Math.asin(mn(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-d,f),this._y=Math.atan2(-h,s)):(this._x=0,this._y=Math.atan2(a,g));break;case"XZY":this._z=Math.asin(-mn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(p,f),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-d,g),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return GE.makeRotationFromQuaternion(e),this.setFromRotationMatrix(GE,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return jE.setFromEuler(this),this.setFromQuaternion(jE,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}gl.DEFAULT_ORDER="XYZ";class Ja{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let t=0;t1){for(let i=0;i0&&(i=i.concat(o))}return i}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(qu,e,bH),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(qu,EH,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let i=0,r=t.length;i0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(r.instanceColor=this.instanceColor.toJSON()));function s(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=s(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let f=0,d=l.length;f0){r.children=[];for(let a=0;a0){r.animations=[];for(let a=0;a0&&(i.geometries=a),l.length>0&&(i.materials=l),f.length>0&&(i.textures=f),d.length>0&&(i.images=d),h.length>0&&(i.shapes=h),p.length>0&&(i.skeletons=p),g.length>0&&(i.animations=g),y.length>0&&(i.nodes=y)}return i.object=r,i;function o(a){const l=[];for(const f in a){const d=a[f];delete d.metadata,l.push(d)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,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.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let i=0;i0?r.multiplyScalar(1/Math.sqrt(s)):r.set(0,0,0)}static getBarycoord(e,t,i,r,s){Ir.subVectors(r,t),Cs.subVectors(i,t),hy.subVectors(e,t);const o=Ir.dot(Ir),a=Ir.dot(Cs),l=Ir.dot(hy),f=Cs.dot(Cs),d=Cs.dot(hy),h=o*f-a*a;if(h===0)return s.set(-2,-1,-1);const p=1/h,g=(f*l-a*d)*p,y=(o*d-a*l)*p;return s.set(1-g-y,y,g)}static containsPoint(e,t,i,r){return this.getBarycoord(e,t,i,r,Ps),Ps.x>=0&&Ps.y>=0&&Ps.x+Ps.y<=1}static getUV(e,t,i,r,s,o,a,l){return Mp===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Mp=!0),this.getInterpolation(e,t,i,r,s,o,a,l)}static getInterpolation(e,t,i,r,s,o,a,l){return this.getBarycoord(e,t,i,r,Ps),l.setScalar(0),l.addScaledVector(s,Ps.x),l.addScaledVector(o,Ps.y),l.addScaledVector(a,Ps.z),l}static isFrontFacing(e,t,i,r){return Ir.subVectors(i,t),Cs.subVectors(e,t),Ir.cross(Cs).dot(r)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,r){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,i,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Ir.subVectors(this.c,this.b),Cs.subVectors(this.a,this.b),Ir.cross(Cs).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Di.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Di.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,i,r,s){return Mp===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Mp=!0),Di.getInterpolation(e,this.a,this.b,this.c,t,i,r,s)}getInterpolation(e,t,i,r,s){return Di.getInterpolation(e,this.a,this.b,this.c,t,i,r,s)}containsPoint(e){return Di.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Di.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,r=this.b,s=this.c;let o,a;Hl.subVectors(r,i),Wl.subVectors(s,i),py.subVectors(e,i);const l=Hl.dot(py),f=Wl.dot(py);if(l<=0&&f<=0)return t.copy(i);my.subVectors(e,r);const d=Hl.dot(my),h=Wl.dot(my);if(d>=0&&h<=d)return t.copy(r);const p=l*h-d*f;if(p<=0&&l>=0&&d<=0)return o=l/(l-d),t.copy(i).addScaledVector(Hl,o);gy.subVectors(e,s);const g=Hl.dot(gy),y=Wl.dot(gy);if(y>=0&&g<=y)return t.copy(s);const x=g*f-l*y;if(x<=0&&f>=0&&y<=0)return a=f/(f-y),t.copy(i).addScaledVector(Wl,a);const w=d*y-g*h;if(w<=0&&h-d>=0&&g-y>=0)return JE.subVectors(s,r),a=(h-d)/(h-d+(g-y)),t.copy(r).addScaledVector(JE,a);const m=1/(w+x+p);return o=x*m,a=p*m,t.copy(i).addScaledVector(Hl,o).addScaledVector(Wl,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let CH=0;class Qn extends hs{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:CH++}),this.uuid=Qi(),this.name="",this.type="Material",this.blending=qa,this.side=Zs,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=Pw,this.blendDst=Lw,this.blendEquation=Na,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=fg,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=OR,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=bm,this.stencilZFail=bm,this.stencilZPass=bm,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const i=e[t];if(i===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const r=this[t];if(r===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(i):r&&r.isVector3&&i&&i.isVector3?r.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const i={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==qa&&(i.blending=this.blending),this.side!==Zs&&(i.side=this.side),this.vertexColors&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=this.transparent),i.depthFunc=this.depthFunc,i.depthTest=this.depthTest,i.depthWrite=this.depthWrite,i.colorWrite=this.colorWrite,i.stencilWrite=this.stencilWrite,i.stencilWriteMask=this.stencilWriteMask,i.stencilFunc=this.stencilFunc,i.stencilRef=this.stencilRef,i.stencilFuncMask=this.stencilFuncMask,i.stencilFail=this.stencilFail,i.stencilZFail=this.stencilZFail,i.stencilZPass=this.stencilZPass,this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaToCoverage===!0&&(i.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=this.premultipliedAlpha),this.forceSinglePass===!0&&(i.forceSinglePass=this.forceSinglePass),this.wireframe===!0&&(i.wireframe=this.wireframe),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=this.flatShading),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function r(s){const o=[];for(const a in s){const l=s[a];delete l.metadata,o.push(l)}return o}if(t){const s=r(e.textures),o=r(e.images);s.length>0&&(i.textures=s),o.length>0&&(i.images=o)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let i=null;if(t!==null){const r=t.length;i=new Array(r);for(let s=0;s!==r;++s)i[s]=t[s].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.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.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}const VR={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Dr={h:0,s:0,l:0},Ap={h:0,s:0,l:0};function vy(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}class qe{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,t===void 0&&i===void 0?this.set(e):this.setRGB(e,t,i)}set(e){return e&&e.isColor?this.copy(e):typeof e=="number"?this.setHex(e):typeof e=="string"&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Or){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Li.toWorkingColorSpace(this,t),this}setRGB(e,t,i,r=Li.workingColorSpace){return this.r=e,this.g=t,this.b=i,Li.toWorkingColorSpace(this,r),this}setHSL(e,t,i,r=Li.workingColorSpace){if(e=Ow(e,1),t=mn(t,0,1),i=mn(i,0,1),t===0)this.r=this.g=this.b=i;else{const s=i<=.5?i*(1+t):i+t-i*t,o=2*i-s;this.r=vy(o,s,e+1/3),this.g=vy(o,s,e),this.b=vy(o,s,e-1/3)}return Li.toWorkingColorSpace(this,r),this}setStyle(e,t=Or){function i(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const o=r[1],a=r[2];switch(o){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return this.r=Math.min(255,parseInt(s[1],10))/255,this.g=Math.min(255,parseInt(s[2],10))/255,this.b=Math.min(255,parseInt(s[3],10))/255,Li.toWorkingColorSpace(this,t),i(s[4]),this;if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return this.r=Math.min(100,parseInt(s[1],10))/100,this.g=Math.min(100,parseInt(s[2],10))/100,this.b=Math.min(100,parseInt(s[3],10))/100,Li.toWorkingColorSpace(this,t),i(s[4]),this;break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a)){const l=parseFloat(s[1])/360,f=parseFloat(s[2])/100,d=parseFloat(s[3])/100;return i(s[4]),this.setHSL(l,f,d,t)}break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=r[1],o=s.length;if(o===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,t);if(o===6)return this.setHex(parseInt(s,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Or){const i=VR[e.toLowerCase()];return i!==void 0?this.setHex(i,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Oc(e.r),this.g=Oc(e.g),this.b=Oc(e.b),this}copyLinearToSRGB(e){return this.r=sy(e.r),this.g=sy(e.g),this.b=sy(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Or){return Li.fromWorkingColorSpace(li.copy(this),e),mn(li.r*255,0,255)<<16^mn(li.g*255,0,255)<<8^mn(li.b*255,0,255)<<0}getHexString(e=Or){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Li.workingColorSpace){Li.fromWorkingColorSpace(li.copy(this),t);const i=li.r,r=li.g,s=li.b,o=Math.max(i,r,s),a=Math.min(i,r,s);let l,f;const d=(a+o)/2;if(a===o)l=0,f=0;else{const h=o-a;switch(f=d<=.5?h/(o+a):h/(2-o-a),o){case i:l=(r-s)/h+(r>-f-14,i[l|256]=1024>>-f-14|32768,r[l]=-f-1,r[l|256]=-f-1):f<=15?(i[l]=f+15<<10,i[l|256]=f+15<<10|32768,r[l]=13,r[l|256]=13):f<128?(i[l]=31744,i[l|256]=64512,r[l]=24,r[l|256]=24):(i[l]=31744,i[l|256]=64512,r[l]=13,r[l|256]=13)}const s=new Uint32Array(2048),o=new Uint32Array(64),a=new Uint32Array(64);for(let l=1;l<1024;++l){let f=l<<13,d=0;for(;!(f&8388608);)f<<=1,d-=8388608;f&=-8388609,d+=947912704,s[l]=f|d}for(let l=1024;l<2048;++l)s[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)o[l]=l<<23;o[31]=1199570944,o[32]=2147483648;for(let l=33;l<63;++l)o[l]=2147483648+(l-32<<23);o[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(a[l]=1024);return{floatView:e,uint32View:t,baseTable:i,shiftTable:r,mantissaTable:s,exponentTable:o,offsetTable:a}}function Ri(n){Math.abs(n)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),n=mn(n,-65504,65504),Ds.floatView[0]=n;const e=Ds.uint32View[0],t=e>>23&511;return Ds.baseTable[t]+((e&8388607)>>Ds.shiftTable[t])}function ff(n){const e=n>>10;return Ds.uint32View[0]=Ds.mantissaTable[Ds.offsetTable[e]+(n&1023)]+Ds.exponentTable[e],Ds.floatView[0]}const LH={toHalfFloat:Ri,fromHalfFloat:ff},Tn=new O,bp=new Se;class Xt{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=cd,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}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}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(let r=0,s=this.itemSize;r0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const f in l)l[f]!==void 0&&(e[f]=l[f]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const l in i){const f=i[l];e.data.attributes[l]=f.toJSON(e.data)}const r={};let s=!1;for(const l in this.morphAttributes){const f=this.morphAttributes[l],d=[];for(let h=0,p=f.length;h0&&(r[l]=d,s=!0)}s&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone(t));const r=e.attributes;for(const f in r){const d=r[f];this.setAttribute(f,d.clone(t))}const s=e.morphAttributes;for(const f in s){const d=[],h=s[f];for(let p=0,g=h.length;p0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s(e.far-e.near)**2))||(KE.copy(s).invert(),ts.copy(e.ray).applyMatrix4(KE),i.boundingBox!==null&&ts.intersectsBox(i.boundingBox)===!1))return;let o;const a=i.index,l=i.attributes.position,f=i.attributes.uv,d=i.attributes.uv2,h=i.attributes.normal,p=i.groups,g=i.drawRange;if(a!==null)if(Array.isArray(r))for(let y=0,x=p.length;yt.far?null:{distance:f,point:Ip.clone(),object:n}}function Dp(n,e,t,i,r,s,o,a,l,f){n.getVertexPosition(a,jl),n.getVertexPosition(l,Xl),n.getVertexPosition(f,Yl);const d=FH(n,e,t,i,jl,Xl,Yl,Rp);if(d){r&&(Cp.fromBufferAttribute(r,a),Pp.fromBufferAttribute(r,l),Lp.fromBufferAttribute(r,f),d.uv=Di.getInterpolation(Rp,jl,Xl,Yl,Cp,Pp,Lp,new Se)),s&&(Cp.fromBufferAttribute(s,a),Pp.fromBufferAttribute(s,l),Lp.fromBufferAttribute(s,f),d.uv2=Di.getInterpolation(Rp,jl,Xl,Yl,Cp,Pp,Lp,new Se)),o&&(eT.fromBufferAttribute(o,a),tT.fromBufferAttribute(o,l),nT.fromBufferAttribute(o,f),d.normal=Di.getInterpolation(Rp,jl,Xl,Yl,eT,tT,nT,new O),d.normal.dot(i.direction)>0&&d.normal.multiplyScalar(-1));const h={a,b:l,c:f,normal:new O,materialIndex:0};Di.getNormal(jl,Xl,Yl,h.normal),d.face=h}return d}class aa extends St{constructor(e=1,t=1,i=1,r=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:r,heightSegments:s,depthSegments:o};const a=this;r=Math.floor(r),s=Math.floor(s),o=Math.floor(o);const l=[],f=[],d=[],h=[];let p=0,g=0;y("z","y","x",-1,-1,i,t,e,o,s,0),y("z","y","x",1,-1,i,t,-e,o,s,1),y("x","z","y",1,1,e,i,t,r,o,2),y("x","z","y",1,-1,e,i,-t,r,o,3),y("x","y","z",1,-1,e,t,i,r,s,4),y("x","y","z",-1,-1,e,t,-i,r,s,5),this.setIndex(l),this.setAttribute("position",new Qe(f,3)),this.setAttribute("normal",new Qe(d,3)),this.setAttribute("uv",new Qe(h,2));function y(x,w,m,_,S,A,E,P,I,L,C){const R=A/I,W=E/L,Z=A/2,X=E/2,j=P/2,Y=I+1,te=L+1;let ne=0,D=0;const B=new O;for(let V=0;V0?1:-1,d.push(B.x,B.y,B.z),h.push(ee/I),h.push(1-V/L),ne+=1}}for(let V=0;V0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;const i={};for(const r in this.extensions)this.extensions[r]===!0&&(i[r]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}}class Od extends Dt{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new gt,this.projectionMatrix=new gt,this.projectionMatrixInverse=new gt}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}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)}}class qt extends Od{constructor(e=50,t=1,i=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=$c*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan($a*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return $c*2*Math.atan(Math.tan($a*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,i,r,s,o){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan($a*.5*this.fov)/this.zoom,i=2*t,r=this.aspect*i,s=-.5*r;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,f=o.fullHeight;s+=o.offsetX*r/l,t-=o.offsetY*i/f,r*=o.width/l,i*=o.height/f}const a=this.filmOffset;a!==0&&(s+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+r,t,t-i,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const ql=-90,Zl=1;class Vw extends Dt{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i;const r=new qt(ql,Zl,e,t);r.layers=this.layers,r.up.set(0,1,0),r.lookAt(1,0,0),this.add(r);const s=new qt(ql,Zl,e,t);s.layers=this.layers,s.up.set(0,1,0),s.lookAt(-1,0,0),this.add(s);const o=new qt(ql,Zl,e,t);o.layers=this.layers,o.up.set(0,0,-1),o.lookAt(0,1,0),this.add(o);const a=new qt(ql,Zl,e,t);a.layers=this.layers,a.up.set(0,0,1),a.lookAt(0,-1,0),this.add(a);const l=new qt(ql,Zl,e,t);l.layers=this.layers,l.up.set(0,1,0),l.lookAt(0,0,1),this.add(l);const f=new qt(ql,Zl,e,t);f.layers=this.layers,f.up.set(0,1,0),f.lookAt(0,0,-1),this.add(f)}update(e,t){this.parent===null&&this.updateMatrixWorld();const i=this.renderTarget,[r,s,o,a,l,f]=this.children,d=e.getRenderTarget(),h=e.toneMapping,p=e.xr.enabled;e.toneMapping=Hr,e.xr.enabled=!1;const g=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0),e.render(t,r),e.setRenderTarget(i,1),e.render(t,s),e.setRenderTarget(i,2),e.render(t,o),e.setRenderTarget(i,3),e.render(t,a),e.setRenderTarget(i,4),e.render(t,l),i.texture.generateMipmaps=g,e.setRenderTarget(i,5),e.render(t,f),e.setRenderTarget(d),e.toneMapping=h,e.xr.enabled=p,i.texture.needsPMREMUpdate=!0}}class Ud extends gn{constructor(e,t,i,r,s,o,a,l,f,d){e=e!==void 0?e:[],t=t!==void 0?t:$o,super(e,t,i,r,s,o,a,l,f,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class Hw extends Gr{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},r=[i,i,i,i,i,i];this.texture=new Ud(r,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=t.generateMipmaps!==void 0?t.generateMipmaps:!1,this.texture.minFilter=t.minFilter!==void 0?t.minFilter:Sn}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.encoding=t.encoding,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:` - - varying vec3 vWorldDirection; - - vec3 transformDirection( in vec3 dir, in mat4 matrix ) { - - return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); - - } - - void main() { - - vWorldDirection = transformDirection( position, modelMatrix ); - - #include - #include - - } - `,fragmentShader:` - - uniform sampler2D tEquirect; - - varying vec3 vWorldDirection; - - #include - - void main() { - - vec3 direction = normalize( vWorldDirection ); - - vec2 sampleUV = equirectUv( direction ); - - gl_FragColor = texture2D( tEquirect, sampleUV ); - - } - `},r=new aa(5,5,5),s=new ds({name:"CubemapFromEquirect",uniforms:Jc(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:Si,blending:Hs});s.uniforms.tEquirect.value=t;const o=new jn(r,s),a=t.minFilter;return t.minFilter===Ko&&(t.minFilter=Sn),new Vw(1,10,this).update(e,o),t.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,i,r){const s=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,i,r);e.setRenderTarget(s)}}const _y=new O,WH=new O,GH=new Ct;class Ao{constructor(e=new O(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,i,r){return this.normal.set(e,t,i),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){const r=_y.subVectors(i,t).cross(WH.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const i=e.delta(_y),r=this.normal.dot(i);if(r===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;const s=-(e.start.dot(this.normal)+this.constant)/r;return s<0||s>1?null:t.copy(e.start).addScaledVector(i,s)}intersectsLine(e){const t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const i=t||GH.getNormalMatrix(e),r=this.coplanarPoint(_y).applyMatrix4(e),s=this.normal.applyMatrix3(i).normalize();return this.constant=-r.dot(s),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Sa=new ms,kp=new O;class Qg{constructor(e=new Ao,t=new Ao,i=new Ao,r=new Ao,s=new Ao,o=new Ao){this.planes=[e,t,i,r,s,o]}set(e,t,i,r,s,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(i),a[3].copy(r),a[4].copy(s),a[5].copy(o),this}copy(e){const t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e){const t=this.planes,i=e.elements,r=i[0],s=i[1],o=i[2],a=i[3],l=i[4],f=i[5],d=i[6],h=i[7],p=i[8],g=i[9],y=i[10],x=i[11],w=i[12],m=i[13],_=i[14],S=i[15];return t[0].setComponents(a-r,h-l,x-p,S-w).normalize(),t[1].setComponents(a+r,h+l,x+p,S+w).normalize(),t[2].setComponents(a+s,h+f,x+g,S+m).normalize(),t[3].setComponents(a-s,h-f,x-g,S-m).normalize(),t[4].setComponents(a-o,h-d,x-y,S-_).normalize(),t[5].setComponents(a+o,h+d,x+y,S+_).normalize(),this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Sa.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Sa.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Sa)}intersectsSprite(e){return Sa.center.set(0,0,0),Sa.radius=.7071067811865476,Sa.applyMatrix4(e.matrixWorld),this.intersectsSphere(Sa)}intersectsSphere(e){const t=this.planes,i=e.center,r=-e.radius;for(let s=0;s<6;s++)if(t[s].distanceToPoint(i)0?e.max.x:e.min.x,kp.y=r.normal.y>0?e.max.y:e.min.y,kp.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(kp)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function GR(){let n=null,e=!1,t=null,i=null;function r(s,o){t(s,o),i=n.requestAnimationFrame(r)}return{start:function(){e!==!0&&t!==null&&(i=n.requestAnimationFrame(r),e=!0)},stop:function(){n.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(s){t=s},setContext:function(s){n=s}}}function jH(n,e){const t=e.isWebGL2,i=new WeakMap;function r(f,d){const h=f.array,p=f.usage,g=n.createBuffer();n.bindBuffer(d,g),n.bufferData(d,h,p),f.onUploadCallback();let y;if(h instanceof Float32Array)y=5126;else if(h instanceof Uint16Array)if(f.isFloat16BufferAttribute)if(t)y=5131;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else y=5123;else if(h instanceof Int16Array)y=5122;else if(h instanceof Uint32Array)y=5125;else if(h instanceof Int32Array)y=5124;else if(h instanceof Int8Array)y=5120;else if(h instanceof Uint8Array)y=5121;else if(h instanceof Uint8ClampedArray)y=5121;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+h);return{buffer:g,type:y,bytesPerElement:h.BYTES_PER_ELEMENT,version:f.version}}function s(f,d,h){const p=d.array,g=d.updateRange;n.bindBuffer(h,f),g.count===-1?n.bufferSubData(h,0,p):(t?n.bufferSubData(h,g.offset*p.BYTES_PER_ELEMENT,p,g.offset,g.count):n.bufferSubData(h,g.offset*p.BYTES_PER_ELEMENT,p.subarray(g.offset,g.offset+g.count)),g.count=-1),d.onUploadCallback()}function o(f){return f.isInterleavedBufferAttribute&&(f=f.data),i.get(f)}function a(f){f.isInterleavedBufferAttribute&&(f=f.data);const d=i.get(f);d&&(n.deleteBuffer(d.buffer),i.delete(f))}function l(f,d){if(f.isGLBufferAttribute){const p=i.get(f);(!p||p.version 0 - vec4 plane; - #pragma unroll_loop_start - for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { - plane = clippingPlanes[ i ]; - if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; - } - #pragma unroll_loop_end - #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES - bool clipped = true; - #pragma unroll_loop_start - for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { - plane = clippingPlanes[ i ]; - clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; - } - #pragma unroll_loop_end - if ( clipped ) discard; - #endif -#endif`,rW=`#if NUM_CLIPPING_PLANES > 0 - varying vec3 vClipPosition; - uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; -#endif`,sW=`#if NUM_CLIPPING_PLANES > 0 - varying vec3 vClipPosition; -#endif`,oW=`#if NUM_CLIPPING_PLANES > 0 - vClipPosition = - mvPosition.xyz; -#endif`,aW=`#if defined( USE_COLOR_ALPHA ) - diffuseColor *= vColor; -#elif defined( USE_COLOR ) - diffuseColor.rgb *= vColor; -#endif`,lW=`#if defined( USE_COLOR_ALPHA ) - varying vec4 vColor; -#elif defined( USE_COLOR ) - varying vec3 vColor; -#endif`,cW=`#if defined( USE_COLOR_ALPHA ) - varying vec4 vColor; -#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) - varying vec3 vColor; -#endif`,uW=`#if defined( USE_COLOR_ALPHA ) - vColor = vec4( 1.0 ); -#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) - vColor = vec3( 1.0 ); -#endif -#ifdef USE_COLOR - vColor *= color; -#endif -#ifdef USE_INSTANCING_COLOR - vColor.xyz *= instanceColor.xyz; -#endif`,fW=`#define PI 3.141592653589793 -#define PI2 6.283185307179586 -#define PI_HALF 1.5707963267948966 -#define RECIPROCAL_PI 0.3183098861837907 -#define RECIPROCAL_PI2 0.15915494309189535 -#define EPSILON 1e-6 -#ifndef saturate -#define saturate( a ) clamp( a, 0.0, 1.0 ) -#endif -#define whiteComplement( a ) ( 1.0 - saturate( a ) ) -float pow2( const in float x ) { return x*x; } -vec3 pow2( const in vec3 x ) { return x*x; } -float pow3( const in float x ) { return x*x*x; } -float pow4( const in float x ) { float x2 = x*x; return x2*x2; } -float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } -float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } -highp float rand( const in vec2 uv ) { - const highp float a = 12.9898, b = 78.233, c = 43758.5453; - highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); - return fract( sin( sn ) * c ); -} -#ifdef HIGH_PRECISION - float precisionSafeLength( vec3 v ) { return length( v ); } -#else - float precisionSafeLength( vec3 v ) { - float maxComponent = max3( abs( v ) ); - return length( v / maxComponent ) * maxComponent; - } -#endif -struct IncidentLight { - vec3 color; - vec3 direction; - bool visible; -}; -struct ReflectedLight { - vec3 directDiffuse; - vec3 directSpecular; - vec3 indirectDiffuse; - vec3 indirectSpecular; -}; -struct GeometricContext { - vec3 position; - vec3 normal; - vec3 viewDir; -#ifdef USE_CLEARCOAT - vec3 clearcoatNormal; -#endif -}; -vec3 transformDirection( in vec3 dir, in mat4 matrix ) { - return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); -} -vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { - return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); -} -mat3 transposeMat3( const in mat3 m ) { - mat3 tmp; - tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x ); - tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y ); - tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z ); - return tmp; -} -float luminance( const in vec3 rgb ) { - const vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 ); - return dot( weights, rgb ); -} -bool isPerspectiveMatrix( mat4 m ) { - return m[ 2 ][ 3 ] == - 1.0; -} -vec2 equirectUv( in vec3 dir ) { - float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; - float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; - return vec2( u, v ); -} -vec3 BRDF_Lambert( const in vec3 diffuseColor ) { - return RECIPROCAL_PI * diffuseColor; -} -vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { - float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); - return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); -} -float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { - float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); - return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); -} // validated`,dW=`#ifdef ENVMAP_TYPE_CUBE_UV - #define cubeUV_minMipLevel 4.0 - #define cubeUV_minTileSize 16.0 - float getFace( vec3 direction ) { - vec3 absDirection = abs( direction ); - float face = - 1.0; - if ( absDirection.x > absDirection.z ) { - if ( absDirection.x > absDirection.y ) - face = direction.x > 0.0 ? 0.0 : 3.0; - else - face = direction.y > 0.0 ? 1.0 : 4.0; - } else { - if ( absDirection.z > absDirection.y ) - face = direction.z > 0.0 ? 2.0 : 5.0; - else - face = direction.y > 0.0 ? 1.0 : 4.0; - } - return face; - } - vec2 getUV( vec3 direction, float face ) { - vec2 uv; - if ( face == 0.0 ) { - uv = vec2( direction.z, direction.y ) / abs( direction.x ); - } else if ( face == 1.0 ) { - uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); - } else if ( face == 2.0 ) { - uv = vec2( - direction.x, direction.y ) / abs( direction.z ); - } else if ( face == 3.0 ) { - uv = vec2( - direction.z, direction.y ) / abs( direction.x ); - } else if ( face == 4.0 ) { - uv = vec2( - direction.x, direction.z ) / abs( direction.y ); - } else { - uv = vec2( direction.x, direction.y ) / abs( direction.z ); - } - return 0.5 * ( uv + 1.0 ); - } - vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { - float face = getFace( direction ); - float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); - mipInt = max( mipInt, cubeUV_minMipLevel ); - float faceSize = exp2( mipInt ); - highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; - if ( face > 2.0 ) { - uv.y += faceSize; - face -= 3.0; - } - uv.x += face * faceSize; - uv.x += filterInt * 3.0 * cubeUV_minTileSize; - uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); - uv.x *= CUBEUV_TEXEL_WIDTH; - uv.y *= CUBEUV_TEXEL_HEIGHT; - #ifdef texture2DGradEXT - return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; - #else - return texture2D( envMap, uv ).rgb; - #endif - } - #define cubeUV_r0 1.0 - #define cubeUV_v0 0.339 - #define cubeUV_m0 - 2.0 - #define cubeUV_r1 0.8 - #define cubeUV_v1 0.276 - #define cubeUV_m1 - 1.0 - #define cubeUV_r4 0.4 - #define cubeUV_v4 0.046 - #define cubeUV_m4 2.0 - #define cubeUV_r5 0.305 - #define cubeUV_v5 0.016 - #define cubeUV_m5 3.0 - #define cubeUV_r6 0.21 - #define cubeUV_v6 0.0038 - #define cubeUV_m6 4.0 - float roughnessToMip( float roughness ) { - float mip = 0.0; - if ( roughness >= cubeUV_r1 ) { - mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; - } else if ( roughness >= cubeUV_r4 ) { - mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; - } else if ( roughness >= cubeUV_r5 ) { - mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; - } else if ( roughness >= cubeUV_r6 ) { - mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; - } else { - mip = - 2.0 * log2( 1.16 * roughness ); } - return mip; - } - vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { - float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); - float mipF = fract( mip ); - float mipInt = floor( mip ); - vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); - if ( mipF == 0.0 ) { - return vec4( color0, 1.0 ); - } else { - vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); - return vec4( mix( color0, color1, mipF ), 1.0 ); - } - } -#endif`,hW=`vec3 transformedNormal = objectNormal; -#ifdef USE_INSTANCING - mat3 m = mat3( instanceMatrix ); - transformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) ); - transformedNormal = m * transformedNormal; -#endif -transformedNormal = normalMatrix * transformedNormal; -#ifdef FLIP_SIDED - transformedNormal = - transformedNormal; -#endif -#ifdef USE_TANGENT - vec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz; - #ifdef FLIP_SIDED - transformedTangent = - transformedTangent; - #endif -#endif`,pW=`#ifdef USE_DISPLACEMENTMAP - uniform sampler2D displacementMap; - uniform float displacementScale; - uniform float displacementBias; -#endif`,mW=`#ifdef USE_DISPLACEMENTMAP - transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); -#endif`,gW=`#ifdef USE_EMISSIVEMAP - vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); - totalEmissiveRadiance *= emissiveColor.rgb; -#endif`,vW=`#ifdef USE_EMISSIVEMAP - uniform sampler2D emissiveMap; -#endif`,yW="gl_FragColor = linearToOutputTexel( gl_FragColor );",xW=`vec4 LinearToLinear( in vec4 value ) { - return value; -} -vec4 LinearTosRGB( in vec4 value ) { - 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 ); -}`,_W=`#ifdef USE_ENVMAP - #ifdef ENV_WORLDPOS - vec3 cameraToFrag; - if ( isOrthographic ) { - cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); - } else { - cameraToFrag = normalize( vWorldPosition - cameraPosition ); - } - vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); - #ifdef ENVMAP_MODE_REFLECTION - vec3 reflectVec = reflect( cameraToFrag, worldNormal ); - #else - vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); - #endif - #else - vec3 reflectVec = vReflect; - #endif - #ifdef ENVMAP_TYPE_CUBE - vec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); - #else - vec4 envColor = vec4( 0.0 ); - #endif - #ifdef ENVMAP_BLENDING_MULTIPLY - outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); - #elif defined( ENVMAP_BLENDING_MIX ) - outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); - #elif defined( ENVMAP_BLENDING_ADD ) - outgoingLight += envColor.xyz * specularStrength * reflectivity; - #endif -#endif`,wW=`#ifdef USE_ENVMAP - uniform float envMapIntensity; - uniform float flipEnvMap; - #ifdef ENVMAP_TYPE_CUBE - uniform samplerCube envMap; - #else - uniform sampler2D envMap; - #endif - -#endif`,SW=`#ifdef USE_ENVMAP - uniform float reflectivity; - #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) - #define ENV_WORLDPOS - #endif - #ifdef ENV_WORLDPOS - varying vec3 vWorldPosition; - uniform float refractionRatio; - #else - varying vec3 vReflect; - #endif -#endif`,MW=`#ifdef USE_ENVMAP - #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) - #define ENV_WORLDPOS - #endif - #ifdef ENV_WORLDPOS - - varying vec3 vWorldPosition; - #else - varying vec3 vReflect; - uniform float refractionRatio; - #endif -#endif`,AW=`#ifdef USE_ENVMAP - #ifdef ENV_WORLDPOS - vWorldPosition = worldPosition.xyz; - #else - vec3 cameraToVertex; - if ( isOrthographic ) { - cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); - } else { - cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); - } - vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); - #ifdef ENVMAP_MODE_REFLECTION - vReflect = reflect( cameraToVertex, worldNormal ); - #else - vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); - #endif - #endif -#endif`,bW=`#ifdef USE_FOG - vFogDepth = - mvPosition.z; -#endif`,EW=`#ifdef USE_FOG - varying float vFogDepth; -#endif`,TW=`#ifdef USE_FOG - #ifdef FOG_EXP2 - float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); - #else - float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); - #endif - gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); -#endif`,CW=`#ifdef USE_FOG - uniform vec3 fogColor; - varying float vFogDepth; - #ifdef FOG_EXP2 - uniform float fogDensity; - #else - uniform float fogNear; - uniform float fogFar; - #endif -#endif`,PW=`#ifdef USE_GRADIENTMAP - uniform sampler2D gradientMap; -#endif -vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { - float dotNL = dot( normal, lightDirection ); - vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); - #ifdef USE_GRADIENTMAP - return vec3( texture2D( gradientMap, coord ).r ); - #else - vec2 fw = fwidth( coord ) * 0.5; - return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); - #endif -}`,LW=`#ifdef USE_LIGHTMAP - vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); - vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; - reflectedLight.indirectDiffuse += lightMapIrradiance; -#endif`,RW=`#ifdef USE_LIGHTMAP - uniform sampler2D lightMap; - uniform float lightMapIntensity; -#endif`,IW=`LambertMaterial material; -material.diffuseColor = diffuseColor.rgb; -material.specularStrength = specularStrength;`,DW=`varying vec3 vViewPosition; -struct LambertMaterial { - vec3 diffuseColor; - float specularStrength; -}; -void RE_Direct_Lambert( const in IncidentLight directLight, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { - float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); - vec3 irradiance = dotNL * directLight.color; - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -#define RE_Direct RE_Direct_Lambert -#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,kW=`uniform bool receiveShadow; -uniform vec3 ambientLightColor; -uniform vec3 lightProbe[ 9 ]; -vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { - float x = normal.x, y = normal.y, z = normal.z; - vec3 result = shCoefficients[ 0 ] * 0.886227; - result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; - result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; - result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; - result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; - result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; - result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); - result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; - result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); - return result; -} -vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { - vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); - vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); - return irradiance; -} -vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { - vec3 irradiance = ambientLightColor; - return irradiance; -} -float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { - #if defined ( LEGACY_LIGHTS ) - if ( cutoffDistance > 0.0 && decayExponent > 0.0 ) { - return pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent ); - } - return 1.0; - #else - float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); - if ( cutoffDistance > 0.0 ) { - distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); - } - return distanceFalloff; - #endif -} -float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { - return smoothstep( coneCosine, penumbraCosine, angleCosine ); -} -#if NUM_DIR_LIGHTS > 0 - struct DirectionalLight { - vec3 direction; - vec3 color; - }; - uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; - void getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) { - light.color = directionalLight.color; - light.direction = directionalLight.direction; - light.visible = true; - } -#endif -#if NUM_POINT_LIGHTS > 0 - struct PointLight { - vec3 position; - vec3 color; - float distance; - float decay; - }; - uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; - void getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) { - vec3 lVector = pointLight.position - geometry.position; - light.direction = normalize( lVector ); - float lightDistance = length( lVector ); - light.color = pointLight.color; - light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); - light.visible = ( light.color != vec3( 0.0 ) ); - } -#endif -#if NUM_SPOT_LIGHTS > 0 - struct SpotLight { - vec3 position; - vec3 direction; - vec3 color; - float distance; - float decay; - float coneCos; - float penumbraCos; - }; - uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; - void getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) { - vec3 lVector = spotLight.position - geometry.position; - light.direction = normalize( lVector ); - float angleCos = dot( light.direction, spotLight.direction ); - float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); - if ( spotAttenuation > 0.0 ) { - float lightDistance = length( lVector ); - light.color = spotLight.color * spotAttenuation; - light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); - light.visible = ( light.color != vec3( 0.0 ) ); - } else { - light.color = vec3( 0.0 ); - light.visible = false; - } - } -#endif -#if NUM_RECT_AREA_LIGHTS > 0 - struct RectAreaLight { - vec3 color; - vec3 position; - vec3 halfWidth; - vec3 halfHeight; - }; - uniform sampler2D ltc_1; uniform sampler2D ltc_2; - uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; -#endif -#if NUM_HEMI_LIGHTS > 0 - struct HemisphereLight { - vec3 direction; - vec3 skyColor; - vec3 groundColor; - }; - uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; - vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { - float dotNL = dot( normal, hemiLight.direction ); - float hemiDiffuseWeight = 0.5 * dotNL + 0.5; - vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); - return irradiance; - } -#endif`,NW=`#if defined( USE_ENVMAP ) - vec3 getIBLIrradiance( const in vec3 normal ) { - #if defined( ENVMAP_TYPE_CUBE_UV ) - vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); - vec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 ); - return PI * envMapColor.rgb * envMapIntensity; - #else - return vec3( 0.0 ); - #endif - } - vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { - #if defined( ENVMAP_TYPE_CUBE_UV ) - vec3 reflectVec = reflect( - viewDir, normal ); - reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) ); - reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); - vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness ); - return envMapColor.rgb * envMapIntensity; - #else - return vec3( 0.0 ); - #endif - } -#endif`,OW=`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;`,UW=`varying vec3 vViewPosition; -struct ToonMaterial { - vec3 diffuseColor; -}; -void RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { - vec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color; - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -#define RE_Direct RE_Direct_Toon -#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,zW=`BlinnPhongMaterial material; -material.diffuseColor = diffuseColor.rgb; -material.specularColor = specular; -material.specularShininess = shininess; -material.specularStrength = specularStrength;`,FW=`varying vec3 vViewPosition; -struct BlinnPhongMaterial { - vec3 diffuseColor; - vec3 specularColor; - float specularShininess; - float specularStrength; -}; -void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { - float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); - vec3 irradiance = dotNL * directLight.color; - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); - reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength; -} -void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -#define RE_Direct RE_Direct_BlinnPhong -#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,BW=`PhysicalMaterial material; -material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); -vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) ); -float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); -material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; -material.roughness = min( material.roughness, 1.0 ); -#ifdef IOR - material.ior = ior; - #ifdef USE_SPECULAR - float specularIntensityFactor = specularIntensity; - vec3 specularColorFactor = specularColor; - #ifdef USE_SPECULAR_COLORMAP - specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb; - #endif - #ifdef USE_SPECULAR_INTENSITYMAP - specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a; - #endif - material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); - #else - float specularIntensityFactor = 1.0; - vec3 specularColorFactor = vec3( 1.0 ); - material.specularF90 = 1.0; - #endif - material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor ); -#else - material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor ); - material.specularF90 = 1.0; -#endif -#ifdef USE_CLEARCOAT - material.clearcoat = clearcoat; - material.clearcoatRoughness = clearcoatRoughness; - material.clearcoatF0 = vec3( 0.04 ); - material.clearcoatF90 = 1.0; - #ifdef USE_CLEARCOATMAP - material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x; - #endif - #ifdef USE_CLEARCOAT_ROUGHNESSMAP - material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y; - #endif - material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); - material.clearcoatRoughness += geometryRoughness; - material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); -#endif -#ifdef USE_IRIDESCENCE - material.iridescence = iridescence; - material.iridescenceIOR = iridescenceIOR; - #ifdef USE_IRIDESCENCEMAP - material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r; - #endif - #ifdef USE_IRIDESCENCE_THICKNESSMAP - material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum; - #else - material.iridescenceThickness = iridescenceThicknessMaximum; - #endif -#endif -#ifdef USE_SHEEN - material.sheenColor = sheenColor; - #ifdef USE_SHEEN_COLORMAP - material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb; - #endif - material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 ); - #ifdef USE_SHEEN_ROUGHNESSMAP - material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; - #endif -#endif`,VW=`struct PhysicalMaterial { - vec3 diffuseColor; - float roughness; - vec3 specularColor; - float specularF90; - #ifdef USE_CLEARCOAT - float clearcoat; - float clearcoatRoughness; - vec3 clearcoatF0; - float clearcoatF90; - #endif - #ifdef USE_IRIDESCENCE - float iridescence; - float iridescenceIOR; - float iridescenceThickness; - vec3 iridescenceFresnel; - vec3 iridescenceF0; - #endif - #ifdef USE_SHEEN - vec3 sheenColor; - float sheenRoughness; - #endif - #ifdef IOR - float ior; - #endif - #ifdef USE_TRANSMISSION - float transmission; - float transmissionAlpha; - float thickness; - float attenuationDistance; - vec3 attenuationColor; - #endif -}; -vec3 clearcoatSpecular = vec3( 0.0 ); -vec3 sheenSpecular = vec3( 0.0 ); -vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { - float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); - float x2 = x * x; - float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); - return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); -} -float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { - float a2 = pow2( alpha ); - float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); - float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); - return 0.5 / max( gv + gl, EPSILON ); -} -float D_GGX( const in float alpha, const in float dotNH ) { - float a2 = pow2( alpha ); - float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; - return RECIPROCAL_PI * a2 / pow2( denom ); -} -#ifdef USE_CLEARCOAT - vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) { - vec3 f0 = material.clearcoatF0; - float f90 = material.clearcoatF90; - float roughness = material.clearcoatRoughness; - float alpha = pow2( roughness ); - vec3 halfDir = normalize( lightDir + viewDir ); - float dotNL = saturate( dot( normal, lightDir ) ); - float dotNV = saturate( dot( normal, viewDir ) ); - float dotNH = saturate( dot( normal, halfDir ) ); - float dotVH = saturate( dot( viewDir, halfDir ) ); - vec3 F = F_Schlick( f0, f90, dotVH ); - float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); - float D = D_GGX( alpha, dotNH ); - return F * ( V * D ); - } -#endif -vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { - vec3 f0 = material.specularColor; - float f90 = material.specularF90; - float roughness = material.roughness; - float alpha = pow2( roughness ); - vec3 halfDir = normalize( lightDir + viewDir ); - float dotNL = saturate( dot( normal, lightDir ) ); - float dotNV = saturate( dot( normal, viewDir ) ); - float dotNH = saturate( dot( normal, halfDir ) ); - float dotVH = saturate( dot( viewDir, halfDir ) ); - vec3 F = F_Schlick( f0, f90, dotVH ); - #ifdef USE_IRIDESCENCE - F = mix( F, material.iridescenceFresnel, material.iridescence ); - #endif - float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); - float D = D_GGX( alpha, dotNH ); - return F * ( V * D ); -} -vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { - const float LUT_SIZE = 64.0; - const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; - const float LUT_BIAS = 0.5 / LUT_SIZE; - float dotNV = saturate( dot( N, V ) ); - vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); - uv = uv * LUT_SCALE + LUT_BIAS; - return uv; -} -float LTC_ClippedSphereFormFactor( const in vec3 f ) { - float l = length( f ); - return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); -} -vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { - float x = dot( v1, v2 ); - float y = abs( x ); - float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; - float b = 3.4175940 + ( 4.1616724 + y ) * y; - float v = a / b; - float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; - return cross( v1, v2 ) * theta_sintheta; -} -vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { - vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; - vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; - vec3 lightNormal = cross( v1, v2 ); - if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); - vec3 T1, T2; - T1 = normalize( V - N * dot( V, N ) ); - T2 = - cross( N, T1 ); - mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) ); - vec3 coords[ 4 ]; - coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); - coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); - coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); - coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); - coords[ 0 ] = normalize( coords[ 0 ] ); - coords[ 1 ] = normalize( coords[ 1 ] ); - coords[ 2 ] = normalize( coords[ 2 ] ); - coords[ 3 ] = normalize( coords[ 3 ] ); - vec3 vectorFormFactor = vec3( 0.0 ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); - float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); - return vec3( result ); -} -#if defined( USE_SHEEN ) -float D_Charlie( float roughness, float dotNH ) { - float alpha = pow2( roughness ); - float invAlpha = 1.0 / alpha; - float cos2h = dotNH * dotNH; - float sin2h = max( 1.0 - cos2h, 0.0078125 ); - return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); -} -float V_Neubelt( float dotNV, float dotNL ) { - return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); -} -vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { - vec3 halfDir = normalize( lightDir + viewDir ); - float dotNL = saturate( dot( normal, lightDir ) ); - float dotNV = saturate( dot( normal, viewDir ) ); - float dotNH = saturate( dot( normal, halfDir ) ); - float D = D_Charlie( sheenRoughness, dotNH ); - float V = V_Neubelt( dotNV, dotNL ); - return sheenColor * ( D * V ); -} -#endif -float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { - float dotNV = saturate( dot( normal, viewDir ) ); - float r2 = roughness * roughness; - float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95; - float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72; - float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) ); - return saturate( DG * RECIPROCAL_PI ); -} -vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { - float dotNV = saturate( dot( normal, viewDir ) ); - const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 ); - const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 ); - vec4 r = roughness * c0 + c1; - float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y; - vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw; - return fab; -} -vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { - vec2 fab = DFGApprox( normal, viewDir, roughness ); - return specularColor * fab.x + specularF90 * fab.y; -} -#ifdef USE_IRIDESCENCE -void 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 ) { -#else -void 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 ) { -#endif - vec2 fab = DFGApprox( normal, viewDir, roughness ); - #ifdef USE_IRIDESCENCE - vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); - #else - vec3 Fr = specularColor; - #endif - vec3 FssEss = Fr * fab.x + specularF90 * fab.y; - float Ess = fab.x + fab.y; - float Ems = 1.0 - Ess; - vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); - singleScatter += FssEss; - multiScatter += Fms * Ems; -} -#if NUM_RECT_AREA_LIGHTS > 0 - void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { - vec3 normal = geometry.normal; - vec3 viewDir = geometry.viewDir; - vec3 position = geometry.position; - vec3 lightPos = rectAreaLight.position; - vec3 halfWidth = rectAreaLight.halfWidth; - vec3 halfHeight = rectAreaLight.halfHeight; - vec3 lightColor = rectAreaLight.color; - float roughness = material.roughness; - vec3 rectCoords[ 4 ]; - rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; - rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; - rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; - vec2 uv = LTC_Uv( normal, viewDir, roughness ); - vec4 t1 = texture2D( ltc_1, uv ); - vec4 t2 = texture2D( ltc_2, uv ); - mat3 mInv = mat3( - vec3( t1.x, 0, t1.y ), - vec3( 0, 1, 0 ), - vec3( t1.z, 0, t1.w ) - ); - vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); - reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); - reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); - } -#endif -void RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { - float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); - vec3 irradiance = dotNL * directLight.color; - #ifdef USE_CLEARCOAT - float dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) ); - vec3 ccIrradiance = dotNLcc * directLight.color; - clearcoatSpecular += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material ); - #endif - #ifdef USE_SHEEN - sheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness ); - #endif - reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material ); - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) { - #ifdef USE_CLEARCOAT - clearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); - #endif - #ifdef USE_SHEEN - sheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness ); - #endif - vec3 singleScattering = vec3( 0.0 ); - vec3 multiScattering = vec3( 0.0 ); - vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; - #ifdef USE_IRIDESCENCE - computeMultiscatteringIridescence( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering ); - #else - computeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering ); - #endif - vec3 totalScattering = singleScattering + multiScattering; - vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) ); - reflectedLight.indirectSpecular += radiance * singleScattering; - reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; - reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; -} -#define RE_Direct RE_Direct_Physical -#define RE_Direct_RectArea RE_Direct_RectArea_Physical -#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical -#define RE_IndirectSpecular RE_IndirectSpecular_Physical -float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { - return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); -}`,HW=` -GeometricContext geometry; -geometry.position = - vViewPosition; -geometry.normal = normal; -geometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); -#ifdef USE_CLEARCOAT - geometry.clearcoatNormal = clearcoatNormal; -#endif -#ifdef USE_IRIDESCENCE - float dotNVi = saturate( dot( normal, geometry.viewDir ) ); - if ( material.iridescenceThickness == 0.0 ) { - material.iridescence = 0.0; - } else { - material.iridescence = saturate( material.iridescence ); - } - if ( material.iridescence > 0.0 ) { - material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); - material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); - } -#endif -IncidentLight directLight; -#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) - PointLight pointLight; - #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 - PointLightShadow pointLightShadow; - #endif - #pragma unroll_loop_start - for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { - pointLight = pointLights[ i ]; - getPointLightInfo( pointLight, geometry, directLight ); - #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) - pointLightShadow = pointLightShadows[ i ]; - directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; - #endif - RE_Direct( directLight, geometry, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) - SpotLight spotLight; - vec4 spotColor; - vec3 spotLightCoord; - bool inSpotLightMap; - #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 - SpotLightShadow spotLightShadow; - #endif - #pragma unroll_loop_start - for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { - spotLight = spotLights[ i ]; - getSpotLightInfo( spotLight, geometry, directLight ); - #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) - #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX - #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) - #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS - #else - #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) - #endif - #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) - spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; - inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); - spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); - directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; - #endif - #undef SPOT_LIGHT_MAP_INDEX - #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) - spotLightShadow = spotLightShadows[ i ]; - directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; - #endif - RE_Direct( directLight, geometry, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) - DirectionalLight directionalLight; - #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 - DirectionalLightShadow directionalLightShadow; - #endif - #pragma unroll_loop_start - for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { - directionalLight = directionalLights[ i ]; - getDirectionalLightInfo( directionalLight, geometry, directLight ); - #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) - directionalLightShadow = directionalLightShadows[ i ]; - directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; - #endif - RE_Direct( directLight, geometry, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) - RectAreaLight rectAreaLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { - rectAreaLight = rectAreaLights[ i ]; - RE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if defined( RE_IndirectDiffuse ) - vec3 iblIrradiance = vec3( 0.0 ); - vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); - irradiance += getLightProbeIrradiance( lightProbe, geometry.normal ); - #if ( NUM_HEMI_LIGHTS > 0 ) - #pragma unroll_loop_start - for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { - irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal ); - } - #pragma unroll_loop_end - #endif -#endif -#if defined( RE_IndirectSpecular ) - vec3 radiance = vec3( 0.0 ); - vec3 clearcoatRadiance = vec3( 0.0 ); -#endif`,WW=`#if defined( RE_IndirectDiffuse ) - #ifdef USE_LIGHTMAP - vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); - vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; - irradiance += lightMapIrradiance; - #endif - #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) - iblIrradiance += getIBLIrradiance( geometry.normal ); - #endif -#endif -#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) - radiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness ); - #ifdef USE_CLEARCOAT - clearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness ); - #endif -#endif`,GW=`#if defined( RE_IndirectDiffuse ) - RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight ); -#endif -#if defined( RE_IndirectSpecular ) - RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight ); -#endif`,jW=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) - gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; -#endif`,XW=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) - uniform float logDepthBufFC; - varying float vFragDepth; - varying float vIsPerspective; -#endif`,YW=`#ifdef USE_LOGDEPTHBUF - #ifdef USE_LOGDEPTHBUF_EXT - varying float vFragDepth; - varying float vIsPerspective; - #else - uniform float logDepthBufFC; - #endif -#endif`,qW=`#ifdef USE_LOGDEPTHBUF - #ifdef USE_LOGDEPTHBUF_EXT - vFragDepth = 1.0 + gl_Position.w; - vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); - #else - if ( isPerspectiveMatrix( projectionMatrix ) ) { - gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0; - gl_Position.z *= gl_Position.w; - } - #endif -#endif`,ZW=`#ifdef USE_MAP - vec4 sampledDiffuseColor = texture2D( map, vMapUv ); - #ifdef DECODE_VIDEO_TEXTURE - sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w ); - #endif - diffuseColor *= sampledDiffuseColor; -#endif`,$W=`#ifdef USE_MAP - uniform sampler2D map; -#endif`,JW=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) - #if defined( USE_POINTS_UV ) - vec2 uv = vUv; - #else - vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; - #endif -#endif -#ifdef USE_MAP - diffuseColor *= texture2D( map, uv ); -#endif -#ifdef USE_ALPHAMAP - diffuseColor.a *= texture2D( alphaMap, uv ).g; -#endif`,KW=`#if defined( USE_POINTS_UV ) - varying vec2 vUv; -#else - #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) - uniform mat3 uvTransform; - #endif -#endif -#ifdef USE_MAP - uniform sampler2D map; -#endif -#ifdef USE_ALPHAMAP - uniform sampler2D alphaMap; -#endif`,QW=`float metalnessFactor = metalness; -#ifdef USE_METALNESSMAP - vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); - metalnessFactor *= texelMetalness.b; -#endif`,e8=`#ifdef USE_METALNESSMAP - uniform sampler2D metalnessMap; -#endif`,t8=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) - vColor *= morphTargetBaseInfluence; - for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { - #if defined( USE_COLOR_ALPHA ) - if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; - #elif defined( USE_COLOR ) - if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; - #endif - } -#endif`,n8=`#ifdef USE_MORPHNORMALS - objectNormal *= morphTargetBaseInfluence; - #ifdef MORPHTARGETS_TEXTURE - for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { - if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; - } - #else - objectNormal += morphNormal0 * morphTargetInfluences[ 0 ]; - objectNormal += morphNormal1 * morphTargetInfluences[ 1 ]; - objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; - objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; - #endif -#endif`,i8=`#ifdef USE_MORPHTARGETS - uniform float morphTargetBaseInfluence; - #ifdef MORPHTARGETS_TEXTURE - uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; - uniform sampler2DArray morphTargetsTexture; - uniform ivec2 morphTargetsTextureSize; - vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { - int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; - int y = texelIndex / morphTargetsTextureSize.x; - int x = texelIndex - y * morphTargetsTextureSize.x; - ivec3 morphUV = ivec3( x, y, morphTargetIndex ); - return texelFetch( morphTargetsTexture, morphUV, 0 ); - } - #else - #ifndef USE_MORPHNORMALS - uniform float morphTargetInfluences[ 8 ]; - #else - uniform float morphTargetInfluences[ 4 ]; - #endif - #endif -#endif`,r8=`#ifdef USE_MORPHTARGETS - transformed *= morphTargetBaseInfluence; - #ifdef MORPHTARGETS_TEXTURE - for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { - if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; - } - #else - transformed += morphTarget0 * morphTargetInfluences[ 0 ]; - transformed += morphTarget1 * morphTargetInfluences[ 1 ]; - transformed += morphTarget2 * morphTargetInfluences[ 2 ]; - transformed += morphTarget3 * morphTargetInfluences[ 3 ]; - #ifndef USE_MORPHNORMALS - transformed += morphTarget4 * morphTargetInfluences[ 4 ]; - transformed += morphTarget5 * morphTargetInfluences[ 5 ]; - transformed += morphTarget6 * morphTargetInfluences[ 6 ]; - transformed += morphTarget7 * morphTargetInfluences[ 7 ]; - #endif - #endif -#endif`,s8=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; -#ifdef FLAT_SHADED - vec3 fdx = dFdx( vViewPosition ); - vec3 fdy = dFdy( vViewPosition ); - vec3 normal = normalize( cross( fdx, fdy ) ); -#else - vec3 normal = normalize( vNormal ); - #ifdef DOUBLE_SIDED - normal *= faceDirection; - #endif -#endif -#ifdef USE_NORMALMAP_TANGENTSPACE - #ifdef USE_TANGENT - mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); - #else - mat3 tbn = getTangentFrame( - vViewPosition, normal, vNormalMapUv ); - #endif - #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) - tbn[0] *= faceDirection; - tbn[1] *= faceDirection; - #endif -#endif -#ifdef USE_CLEARCOAT_NORMALMAP - #ifdef USE_TANGENT - mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); - #else - mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv ); - #endif - #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) - tbn2[0] *= faceDirection; - tbn2[1] *= faceDirection; - #endif -#endif -vec3 geometryNormal = normal;`,o8=`#ifdef USE_NORMALMAP_OBJECTSPACE - normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; - #ifdef FLIP_SIDED - normal = - normal; - #endif - #ifdef DOUBLE_SIDED - normal = normal * faceDirection; - #endif - normal = normalize( normalMatrix * normal ); -#elif defined( USE_NORMALMAP_TANGENTSPACE ) - vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; - mapN.xy *= normalScale; - normal = normalize( tbn * mapN ); -#elif defined( USE_BUMPMAP ) - normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); -#endif`,a8=`#ifndef FLAT_SHADED - varying vec3 vNormal; - #ifdef USE_TANGENT - varying vec3 vTangent; - varying vec3 vBitangent; - #endif -#endif`,l8=`#ifndef FLAT_SHADED - varying vec3 vNormal; - #ifdef USE_TANGENT - varying vec3 vTangent; - varying vec3 vBitangent; - #endif -#endif`,c8=`#ifndef FLAT_SHADED - vNormal = normalize( transformedNormal ); - #ifdef USE_TANGENT - vTangent = normalize( transformedTangent ); - vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); - #endif -#endif`,u8=`#ifdef USE_NORMALMAP - uniform sampler2D normalMap; - uniform vec2 normalScale; -#endif -#ifdef USE_NORMALMAP_OBJECTSPACE - uniform mat3 normalMatrix; -#endif -#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) ) - mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) { - vec3 q0 = dFdx( eye_pos.xyz ); - vec3 q1 = dFdy( eye_pos.xyz ); - vec2 st0 = dFdx( uv.st ); - vec2 st1 = dFdy( uv.st ); - vec3 N = surf_norm; - vec3 q1perp = cross( q1, N ); - vec3 q0perp = cross( N, q0 ); - vec3 T = q1perp * st0.x + q0perp * st1.x; - vec3 B = q1perp * st0.y + q0perp * st1.y; - float det = max( dot( T, T ), dot( B, B ) ); - float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); - return mat3( T * scale, B * scale, N ); - } -#endif`,f8=`#ifdef USE_CLEARCOAT - vec3 clearcoatNormal = geometryNormal; -#endif`,d8=`#ifdef USE_CLEARCOAT_NORMALMAP - vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; - clearcoatMapN.xy *= clearcoatNormalScale; - clearcoatNormal = normalize( tbn2 * clearcoatMapN ); -#endif`,h8=`#ifdef USE_CLEARCOATMAP - uniform sampler2D clearcoatMap; -#endif -#ifdef USE_CLEARCOAT_NORMALMAP - uniform sampler2D clearcoatNormalMap; - uniform vec2 clearcoatNormalScale; -#endif -#ifdef USE_CLEARCOAT_ROUGHNESSMAP - uniform sampler2D clearcoatRoughnessMap; -#endif`,p8=`#ifdef USE_IRIDESCENCEMAP - uniform sampler2D iridescenceMap; -#endif -#ifdef USE_IRIDESCENCE_THICKNESSMAP - uniform sampler2D iridescenceThicknessMap; -#endif`,m8=`#ifdef OPAQUE -diffuseColor.a = 1.0; -#endif -#ifdef USE_TRANSMISSION -diffuseColor.a *= material.transmissionAlpha + 0.1; -#endif -gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,g8=`vec3 packNormalToRGB( const in vec3 normal ) { - return normalize( normal ) * 0.5 + 0.5; -} -vec3 unpackRGBToNormal( const in vec3 rgb ) { - return 2.0 * rgb.xyz - 1.0; -} -const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.; -const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. ); -const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. ); -const float ShiftRight8 = 1. / 256.; -vec4 packDepthToRGBA( const in float v ) { - vec4 r = vec4( fract( v * PackFactors ), v ); - r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale; -} -float unpackRGBAToDepth( const in vec4 v ) { - return dot( v, UnpackFactors ); -} -vec2 packDepthToRG( in highp float v ) { - return packDepthToRGBA( v ).yx; -} -float unpackRGToDepth( const in highp vec2 v ) { - return unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) ); -} -vec4 pack2HalfToRGBA( vec2 v ) { - vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); - return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); -} -vec2 unpackRGBATo2Half( vec4 v ) { - return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); -} -float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { - return ( viewZ + near ) / ( near - far ); -} -float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) { - return depth * ( near - far ) - near; -} -float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { - return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); -} -float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { - return ( near * far ) / ( ( far - near ) * depth - far ); -}`,v8=`#ifdef PREMULTIPLIED_ALPHA - gl_FragColor.rgb *= gl_FragColor.a; -#endif`,y8=`vec4 mvPosition = vec4( transformed, 1.0 ); -#ifdef USE_INSTANCING - mvPosition = instanceMatrix * mvPosition; -#endif -mvPosition = modelViewMatrix * mvPosition; -gl_Position = projectionMatrix * mvPosition;`,x8=`#ifdef DITHERING - gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif`,_8=`#ifdef DITHERING - vec3 dithering( vec3 color ) { - float grid_position = rand( gl_FragCoord.xy ); - vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); - dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); - return color + dither_shift_RGB; - } -#endif`,w8=`float roughnessFactor = roughness; -#ifdef USE_ROUGHNESSMAP - vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); - roughnessFactor *= texelRoughness.g; -#endif`,S8=`#ifdef USE_ROUGHNESSMAP - uniform sampler2D roughnessMap; -#endif`,M8=`#if NUM_SPOT_LIGHT_COORDS > 0 - varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; -#endif -#if NUM_SPOT_LIGHT_MAPS > 0 - uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; -#endif -#ifdef USE_SHADOWMAP - #if NUM_DIR_LIGHT_SHADOWS > 0 - uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; - varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; - struct DirectionalLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; - #endif - #if NUM_SPOT_LIGHT_SHADOWS > 0 - uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; - struct SpotLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; - varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; - struct PointLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - float shadowCameraNear; - float shadowCameraFar; - }; - uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; - #endif - float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { - return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); - } - vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { - return unpackRGBATo2Half( texture2D( shadow, uv ) ); - } - float VSMShadow (sampler2D shadow, vec2 uv, float compare ){ - float occlusion = 1.0; - vec2 distribution = texture2DDistribution( shadow, uv ); - float hard_shadow = step( compare , distribution.x ); - if (hard_shadow != 1.0 ) { - float distance = compare - distribution.x ; - float variance = max( 0.00000, distribution.y * distribution.y ); - float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 ); - } - return occlusion; - } - float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) { - float shadow = 1.0; - shadowCoord.xyz /= shadowCoord.w; - shadowCoord.z += shadowBias; - bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; - bool frustumTest = inFrustum && shadowCoord.z <= 1.0; - if ( frustumTest ) { - #if defined( SHADOWMAP_TYPE_PCF ) - vec2 texelSize = vec2( 1.0 ) / shadowMapSize; - float dx0 = - texelSize.x * shadowRadius; - float dy0 = - texelSize.y * shadowRadius; - float dx1 = + texelSize.x * shadowRadius; - float dy1 = + texelSize.y * shadowRadius; - float dx2 = dx0 / 2.0; - float dy2 = dy0 / 2.0; - float dx3 = dx1 / 2.0; - float dy3 = dy1 / 2.0; - shadow = ( - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) - ) * ( 1.0 / 17.0 ); - #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) - vec2 texelSize = vec2( 1.0 ) / shadowMapSize; - float dx = texelSize.x; - float dy = texelSize.y; - vec2 uv = shadowCoord.xy; - vec2 f = fract( uv * shadowMapSize + 0.5 ); - uv -= f * texelSize; - shadow = ( - texture2DCompare( shadowMap, uv, shadowCoord.z ) + - texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + - texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + - mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), - f.x ) + - mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), - f.x ) + - mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), - f.y ) + - mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), - f.y ) + - mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), - f.x ), - mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), - f.x ), - f.y ) - ) * ( 1.0 / 9.0 ); - #elif defined( SHADOWMAP_TYPE_VSM ) - shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); - #else - shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); - #endif - } - return shadow; - } - vec2 cubeToUV( vec3 v, float texelSizeY ) { - vec3 absV = abs( v ); - float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); - absV *= scaleToCube; - v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); - vec2 planar = v.xy; - float almostATexel = 1.5 * texelSizeY; - float almostOne = 1.0 - almostATexel; - if ( absV.z >= almostOne ) { - if ( v.z > 0.0 ) - planar.x = 4.0 - v.x; - } else if ( absV.x >= almostOne ) { - float signX = sign( v.x ); - planar.x = v.z * signX + 2.0 * signX; - } else if ( absV.y >= almostOne ) { - float signY = sign( v.y ); - planar.x = v.x + 2.0 * signY + 2.0; - planar.y = v.z * signY - 2.0; - } - return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); - } - float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { - vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); - vec3 lightToPosition = shadowCoord.xyz; - float dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; - vec3 bd3D = normalize( lightToPosition ); - #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) - vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; - return ( - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) - ) * ( 1.0 / 9.0 ); - #else - return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); - #endif - } -#endif`,A8=`#if NUM_SPOT_LIGHT_COORDS > 0 - uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; - varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; -#endif -#ifdef USE_SHADOWMAP - #if NUM_DIR_LIGHT_SHADOWS > 0 - uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; - varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; - struct DirectionalLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; - #endif - #if NUM_SPOT_LIGHT_SHADOWS > 0 - struct SpotLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; - varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; - struct PointLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - float shadowCameraNear; - float shadowCameraFar; - }; - uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; - #endif -#endif`,b8=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) - vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); - vec4 shadowWorldPosition; -#endif -#if defined( USE_SHADOWMAP ) - #if NUM_DIR_LIGHT_SHADOWS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { - shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); - vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; - } - #pragma unroll_loop_end - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { - shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); - vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; - } - #pragma unroll_loop_end - #endif -#endif -#if NUM_SPOT_LIGHT_COORDS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { - shadowWorldPosition = worldPosition; - #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) - shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; - #endif - vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; - } - #pragma unroll_loop_end -#endif`,E8=`float getShadowMask() { - float shadow = 1.0; - #ifdef USE_SHADOWMAP - #if NUM_DIR_LIGHT_SHADOWS > 0 - DirectionalLightShadow directionalLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { - directionalLight = directionalLightShadows[ i ]; - shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; - } - #pragma unroll_loop_end - #endif - #if NUM_SPOT_LIGHT_SHADOWS > 0 - SpotLightShadow spotLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { - spotLight = spotLightShadows[ i ]; - shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; - } - #pragma unroll_loop_end - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - PointLightShadow pointLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { - pointLight = pointLightShadows[ i ]; - shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; - } - #pragma unroll_loop_end - #endif - #endif - return shadow; -}`,T8=`#ifdef USE_SKINNING - mat4 boneMatX = getBoneMatrix( skinIndex.x ); - mat4 boneMatY = getBoneMatrix( skinIndex.y ); - mat4 boneMatZ = getBoneMatrix( skinIndex.z ); - mat4 boneMatW = getBoneMatrix( skinIndex.w ); -#endif`,C8=`#ifdef USE_SKINNING - uniform mat4 bindMatrix; - uniform mat4 bindMatrixInverse; - uniform highp sampler2D boneTexture; - uniform int boneTextureSize; - mat4 getBoneMatrix( const in float i ) { - float j = i * 4.0; - float x = mod( j, float( boneTextureSize ) ); - float y = floor( j / float( boneTextureSize ) ); - float dx = 1.0 / float( boneTextureSize ); - float dy = 1.0 / float( boneTextureSize ); - y = dy * ( y + 0.5 ); - vec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) ); - vec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) ); - vec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) ); - vec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) ); - mat4 bone = mat4( v1, v2, v3, v4 ); - return bone; - } -#endif`,P8=`#ifdef USE_SKINNING - vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); - vec4 skinned = vec4( 0.0 ); - skinned += boneMatX * skinVertex * skinWeight.x; - skinned += boneMatY * skinVertex * skinWeight.y; - skinned += boneMatZ * skinVertex * skinWeight.z; - skinned += boneMatW * skinVertex * skinWeight.w; - transformed = ( bindMatrixInverse * skinned ).xyz; -#endif`,L8=`#ifdef USE_SKINNING - mat4 skinMatrix = mat4( 0.0 ); - skinMatrix += skinWeight.x * boneMatX; - skinMatrix += skinWeight.y * boneMatY; - skinMatrix += skinWeight.z * boneMatZ; - skinMatrix += skinWeight.w * boneMatW; - skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; - objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; - #ifdef USE_TANGENT - objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; - #endif -#endif`,R8=`float specularStrength; -#ifdef USE_SPECULARMAP - vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); - specularStrength = texelSpecular.r; -#else - specularStrength = 1.0; -#endif`,I8=`#ifdef USE_SPECULARMAP - uniform sampler2D specularMap; -#endif`,D8=`#if defined( TONE_MAPPING ) - gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif`,k8=`#ifndef saturate -#define saturate( a ) clamp( a, 0.0, 1.0 ) -#endif -uniform float toneMappingExposure; -vec3 LinearToneMapping( vec3 color ) { - return toneMappingExposure * color; -} -vec3 ReinhardToneMapping( vec3 color ) { - color *= toneMappingExposure; - return saturate( color / ( vec3( 1.0 ) + color ) ); -} -vec3 OptimizedCineonToneMapping( vec3 color ) { - color *= toneMappingExposure; - color = max( vec3( 0.0 ), color - 0.004 ); - return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); -} -vec3 RRTAndODTFit( vec3 v ) { - vec3 a = v * ( v + 0.0245786 ) - 0.000090537; - vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; - return a / b; -} -vec3 ACESFilmicToneMapping( vec3 color ) { - const mat3 ACESInputMat = mat3( - vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), - vec3( 0.04823, 0.01566, 0.83777 ) - ); - const mat3 ACESOutputMat = mat3( - vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), - vec3( -0.07367, -0.00605, 1.07602 ) - ); - color *= toneMappingExposure / 0.6; - color = ACESInputMat * color; - color = RRTAndODTFit( color ); - color = ACESOutputMat * color; - return saturate( color ); -} -vec3 CustomToneMapping( vec3 color ) { return color; }`,N8=`#ifdef USE_TRANSMISSION - material.transmission = transmission; - material.transmissionAlpha = 1.0; - material.thickness = thickness; - material.attenuationDistance = attenuationDistance; - material.attenuationColor = attenuationColor; - #ifdef USE_TRANSMISSIONMAP - material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r; - #endif - #ifdef USE_THICKNESSMAP - material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g; - #endif - vec3 pos = vWorldPosition; - vec3 v = normalize( cameraPosition - pos ); - vec3 n = inverseTransformDirection( normal, viewMatrix ); - vec4 transmission = getIBLVolumeRefraction( - n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90, - pos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness, - material.attenuationColor, material.attenuationDistance ); - material.transmissionAlpha = mix( material.transmissionAlpha, transmission.a, material.transmission ); - totalDiffuse = mix( totalDiffuse, transmission.rgb, material.transmission ); -#endif`,O8=`#ifdef USE_TRANSMISSION - uniform float transmission; - uniform float thickness; - uniform float attenuationDistance; - uniform vec3 attenuationColor; - #ifdef USE_TRANSMISSIONMAP - uniform sampler2D transmissionMap; - #endif - #ifdef USE_THICKNESSMAP - uniform sampler2D thicknessMap; - #endif - uniform vec2 transmissionSamplerSize; - uniform sampler2D transmissionSamplerMap; - uniform mat4 modelMatrix; - uniform mat4 projectionMatrix; - varying vec3 vWorldPosition; - float w0( float a ) { - return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 ); - } - float w1( float a ) { - return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 ); - } - float w2( float a ){ - return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 ); - } - float w3( float a ) { - return ( 1.0 / 6.0 ) * ( a * a * a ); - } - float g0( float a ) { - return w0( a ) + w1( a ); - } - float g1( float a ) { - return w2( a ) + w3( a ); - } - float h0( float a ) { - return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) ); - } - float h1( float a ) { - return 1.0 + w3( a ) / ( w2( a ) + w3( a ) ); - } - vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, vec2 fullSize, float lod ) { - uv = uv * texelSize.zw + 0.5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - float g0x = g0( fuv.x ); - float g1x = g1( fuv.x ); - float h0x = h0( fuv.x ); - float h1x = h1( fuv.x ); - float h0y = h0( fuv.y ); - float h1y = h1( fuv.y ); - vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; - vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; - vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; - vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; - - vec2 lodFudge = pow( 1.95, lod ) / fullSize; - return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + - g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); - } - vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) { - vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) ); - vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) ); - vec2 fLodSizeInv = 1.0 / fLodSize; - vec2 cLodSizeInv = 1.0 / cLodSize; - vec2 fullSize = vec2( textureSize( sampler, 0 ) ); - vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), fullSize, floor( lod ) ); - vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), fullSize, ceil( lod ) ); - return mix( fSample, cSample, fract( lod ) ); - } - vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { - vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); - vec3 modelScale; - modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); - modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); - modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); - return normalize( refractionVector ) * thickness * modelScale; - } - float applyIorToRoughness( const in float roughness, const in float ior ) { - return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); - } - vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { - float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); - return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod ); - } - vec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { - if ( isinf( attenuationDistance ) ) { - return radiance; - } else { - vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; - vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance * radiance; - } - } - vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, - const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, - const in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness, - const in vec3 attenuationColor, const in float attenuationDistance ) { - vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); - vec3 refractedRayExit = position + transmissionRay; - vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); - vec2 refractionCoords = ndcPos.xy / ndcPos.w; - refractionCoords += 1.0; - refractionCoords /= 2.0; - vec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); - vec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance ); - vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); - return vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a ); - } -#endif`,U8=`#ifdef USE_UV - varying vec2 vUv; -#endif -#ifdef USE_MAP - varying vec2 vMapUv; -#endif -#ifdef USE_ALPHAMAP - varying vec2 vAlphaMapUv; -#endif -#ifdef USE_LIGHTMAP - varying vec2 vLightMapUv; -#endif -#ifdef USE_AOMAP - varying vec2 vAoMapUv; -#endif -#ifdef USE_BUMPMAP - varying vec2 vBumpMapUv; -#endif -#ifdef USE_NORMALMAP - varying vec2 vNormalMapUv; -#endif -#ifdef USE_EMISSIVEMAP - varying vec2 vEmissiveMapUv; -#endif -#ifdef USE_METALNESSMAP - varying vec2 vMetalnessMapUv; -#endif -#ifdef USE_ROUGHNESSMAP - varying vec2 vRoughnessMapUv; -#endif -#ifdef USE_CLEARCOATMAP - varying vec2 vClearcoatMapUv; -#endif -#ifdef USE_CLEARCOAT_NORMALMAP - varying vec2 vClearcoatNormalMapUv; -#endif -#ifdef USE_CLEARCOAT_ROUGHNESSMAP - varying vec2 vClearcoatRoughnessMapUv; -#endif -#ifdef USE_IRIDESCENCEMAP - varying vec2 vIridescenceMapUv; -#endif -#ifdef USE_IRIDESCENCE_THICKNESSMAP - varying vec2 vIridescenceThicknessMapUv; -#endif -#ifdef USE_SHEEN_COLORMAP - varying vec2 vSheenColorMapUv; -#endif -#ifdef USE_SHEEN_ROUGHNESSMAP - varying vec2 vSheenRoughnessMapUv; -#endif -#ifdef USE_SPECULARMAP - varying vec2 vSpecularMapUv; -#endif -#ifdef USE_SPECULAR_COLORMAP - varying vec2 vSpecularColorMapUv; -#endif -#ifdef USE_SPECULAR_INTENSITYMAP - varying vec2 vSpecularIntensityMapUv; -#endif -#ifdef USE_TRANSMISSIONMAP - uniform mat3 transmissionMapTransform; - varying vec2 vTransmissionMapUv; -#endif -#ifdef USE_THICKNESSMAP - uniform mat3 thicknessMapTransform; - varying vec2 vThicknessMapUv; -#endif`,z8=`#ifdef USE_UV - varying vec2 vUv; -#endif -#ifdef USE_UV2 - attribute vec2 uv2; -#endif -#ifdef USE_MAP - uniform mat3 mapTransform; - varying vec2 vMapUv; -#endif -#ifdef USE_ALPHAMAP - uniform mat3 alphaMapTransform; - varying vec2 vAlphaMapUv; -#endif -#ifdef USE_LIGHTMAP - uniform mat3 lightMapTransform; - varying vec2 vLightMapUv; -#endif -#ifdef USE_AOMAP - uniform mat3 aoMapTransform; - varying vec2 vAoMapUv; -#endif -#ifdef USE_BUMPMAP - uniform mat3 bumpMapTransform; - varying vec2 vBumpMapUv; -#endif -#ifdef USE_NORMALMAP - uniform mat3 normalMapTransform; - varying vec2 vNormalMapUv; -#endif -#ifdef USE_DISPLACEMENTMAP - uniform mat3 displacementMapTransform; - varying vec2 vDisplacementMapUv; -#endif -#ifdef USE_EMISSIVEMAP - uniform mat3 emissiveMapTransform; - varying vec2 vEmissiveMapUv; -#endif -#ifdef USE_METALNESSMAP - uniform mat3 metalnessMapTransform; - varying vec2 vMetalnessMapUv; -#endif -#ifdef USE_ROUGHNESSMAP - uniform mat3 roughnessMapTransform; - varying vec2 vRoughnessMapUv; -#endif -#ifdef USE_CLEARCOATMAP - uniform mat3 clearcoatMapTransform; - varying vec2 vClearcoatMapUv; -#endif -#ifdef USE_CLEARCOAT_NORMALMAP - uniform mat3 clearcoatNormalMapTransform; - varying vec2 vClearcoatNormalMapUv; -#endif -#ifdef USE_CLEARCOAT_ROUGHNESSMAP - uniform mat3 clearcoatRoughnessMapTransform; - varying vec2 vClearcoatRoughnessMapUv; -#endif -#ifdef USE_SHEEN_COLORMAP - uniform mat3 sheenColorMapTransform; - varying vec2 vSheenColorMapUv; -#endif -#ifdef USE_SHEEN_ROUGHNESSMAP - uniform mat3 sheenRoughnessMapTransform; - varying vec2 vSheenRoughnessMapUv; -#endif -#ifdef USE_IRIDESCENCEMAP - uniform mat3 iridescenceMapTransform; - varying vec2 vIridescenceMapUv; -#endif -#ifdef USE_IRIDESCENCE_THICKNESSMAP - uniform mat3 iridescenceThicknessMapTransform; - varying vec2 vIridescenceThicknessMapUv; -#endif -#ifdef USE_SPECULARMAP - uniform mat3 specularMapTransform; - varying vec2 vSpecularMapUv; -#endif -#ifdef USE_SPECULAR_COLORMAP - uniform mat3 specularColorMapTransform; - varying vec2 vSpecularColorMapUv; -#endif -#ifdef USE_SPECULAR_INTENSITYMAP - uniform mat3 specularIntensityMapTransform; - varying vec2 vSpecularIntensityMapUv; -#endif -#ifdef USE_TRANSMISSIONMAP - uniform mat3 transmissionMapTransform; - varying vec2 vTransmissionMapUv; -#endif -#ifdef USE_THICKNESSMAP - uniform mat3 thicknessMapTransform; - varying vec2 vThicknessMapUv; -#endif`,F8=`#ifdef USE_UV - vUv = vec3( uv, 1 ).xy; -#endif -#ifdef USE_MAP - vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy; -#endif -#ifdef USE_ALPHAMAP - vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_LIGHTMAP - vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_AOMAP - vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_BUMPMAP - vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_NORMALMAP - vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_DISPLACEMENTMAP - vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_EMISSIVEMAP - vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_METALNESSMAP - vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_ROUGHNESSMAP - vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_CLEARCOATMAP - vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_CLEARCOAT_NORMALMAP - vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_CLEARCOAT_ROUGHNESSMAP - vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_IRIDESCENCEMAP - vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_IRIDESCENCE_THICKNESSMAP - vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_SHEEN_COLORMAP - vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_SHEEN_ROUGHNESSMAP - vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_SPECULARMAP - vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_SPECULAR_COLORMAP - vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_SPECULAR_INTENSITYMAP - vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_TRANSMISSIONMAP - vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_THICKNESSMAP - vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; -#endif`,B8=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 - vec4 worldPosition = vec4( transformed, 1.0 ); - #ifdef USE_INSTANCING - worldPosition = instanceMatrix * worldPosition; - #endif - worldPosition = modelMatrix * worldPosition; -#endif`;const V8=`varying vec2 vUv; -uniform mat3 uvTransform; -void main() { - vUv = ( uvTransform * vec3( uv, 1 ) ).xy; - gl_Position = vec4( position.xy, 1.0, 1.0 ); -}`,H8=`uniform sampler2D t2D; -uniform float backgroundIntensity; -varying vec2 vUv; -void main() { - vec4 texColor = texture2D( t2D, vUv ); - #ifdef DECODE_VIDEO_TEXTURE - 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 ); - #endif - texColor.rgb *= backgroundIntensity; - gl_FragColor = texColor; - #include - #include -}`,W8=`varying vec3 vWorldDirection; -#include -void main() { - vWorldDirection = transformDirection( position, modelMatrix ); - #include - #include - gl_Position.z = gl_Position.w; -}`,G8=`#ifdef ENVMAP_TYPE_CUBE - uniform samplerCube envMap; -#elif defined( ENVMAP_TYPE_CUBE_UV ) - uniform sampler2D envMap; -#endif -uniform float flipEnvMap; -uniform float backgroundBlurriness; -uniform float backgroundIntensity; -varying vec3 vWorldDirection; -#include -void main() { - #ifdef ENVMAP_TYPE_CUBE - vec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); - #elif defined( ENVMAP_TYPE_CUBE_UV ) - vec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness ); - #else - vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); - #endif - texColor.rgb *= backgroundIntensity; - gl_FragColor = texColor; - #include - #include -}`,j8=`varying vec3 vWorldDirection; -#include -void main() { - vWorldDirection = transformDirection( position, modelMatrix ); - #include - #include - gl_Position.z = gl_Position.w; -}`,X8=`uniform samplerCube tCube; -uniform float tFlip; -uniform float opacity; -varying vec3 vWorldDirection; -void main() { - vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); - gl_FragColor = texColor; - gl_FragColor.a *= opacity; - #include - #include -}`,Y8=`#include -#include -#include -#include -#include -#include -#include -varying vec2 vHighPrecisionZW; -void main() { - #include - #include - #ifdef USE_DISPLACEMENTMAP - #include - #include - #include - #endif - #include - #include - #include - #include - #include - #include - #include - vHighPrecisionZW = gl_Position.zw; -}`,q8=`#if DEPTH_PACKING == 3200 - uniform float opacity; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -varying vec2 vHighPrecisionZW; -void main() { - #include - vec4 diffuseColor = vec4( 1.0 ); - #if DEPTH_PACKING == 3200 - diffuseColor.a = opacity; - #endif - #include - #include - #include - #include - float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; - #if DEPTH_PACKING == 3200 - gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); - #elif DEPTH_PACKING == 3201 - gl_FragColor = packDepthToRGBA( fragCoordZ ); - #endif -}`,Z8=`#define DISTANCE -varying vec3 vWorldPosition; -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #ifdef USE_DISPLACEMENTMAP - #include - #include - #include - #endif - #include - #include - #include - #include - #include - #include - #include - vWorldPosition = worldPosition.xyz; -}`,$8=`#define DISTANCE -uniform vec3 referencePosition; -uniform float nearDistance; -uniform float farDistance; -varying vec3 vWorldPosition; -#include -#include -#include -#include -#include -#include -#include -void main () { - #include - vec4 diffuseColor = vec4( 1.0 ); - #include - #include - #include - float dist = length( vWorldPosition - referencePosition ); - dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); - dist = saturate( dist ); - gl_FragColor = packDepthToRGBA( dist ); -}`,J8=`varying vec3 vWorldDirection; -#include -void main() { - vWorldDirection = transformDirection( position, modelMatrix ); - #include - #include -}`,K8=`uniform sampler2D tEquirect; -varying vec3 vWorldDirection; -#include -void main() { - vec3 direction = normalize( vWorldDirection ); - vec2 sampleUV = equirectUv( direction ); - gl_FragColor = texture2D( tEquirect, sampleUV ); - #include - #include -}`,Q8=`uniform float scale; -attribute float lineDistance; -varying float vLineDistance; -#include -#include -#include -#include -#include -#include -#include -void main() { - vLineDistance = scale * lineDistance; - #include - #include - #include - #include - #include - #include - #include - #include - #include -}`,eG=`uniform vec3 diffuse; -uniform float opacity; -uniform float dashSize; -uniform float totalSize; -varying float vLineDistance; -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - if ( mod( vLineDistance, totalSize ) > dashSize ) { - discard; - } - vec3 outgoingLight = vec3( 0.0 ); - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - outgoingLight = diffuseColor.rgb; - #include - #include - #include - #include - #include -}`,tG=`#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) - #include - #include - #include - #include - #include - #endif - #include - #include - #include - #include - #include - #include - #include - #include - #include -}`,nG=`uniform vec3 diffuse; -uniform float opacity; -#ifndef FLAT_SHADED - varying vec3 vNormal; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - #include - #include - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - #ifdef USE_LIGHTMAP - vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); - reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; - #else - reflectedLight.indirectDiffuse += vec3( 1.0 ); - #endif - #include - reflectedLight.indirectDiffuse *= diffuseColor.rgb; - vec3 outgoingLight = reflectedLight.indirectDiffuse; - #include - #include - #include - #include - #include - #include - #include -}`,iG=`#define LAMBERT -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include - #include -}`,rG=`#define LAMBERT -uniform vec3 diffuse; -uniform vec3 emissive; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; - #include - #include - #include - #include - #include - #include - #include -}`,sG=`#define MATCAP -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; -}`,oG=`#define MATCAP -uniform vec3 diffuse; -uniform float opacity; -uniform sampler2D matcap; -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - #include - #include - #include - vec3 viewDir = normalize( vViewPosition ); - vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); - vec3 y = cross( viewDir, x ); - vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; - #ifdef USE_MATCAP - vec4 matcapColor = texture2D( matcap, uv ); - #else - vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); - #endif - vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; - #include - #include - #include - #include - #include - #include -}`,aG=`#define NORMAL -#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) - varying vec3 vViewPosition; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include -#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) - vViewPosition = - mvPosition.xyz; -#endif -}`,lG=`#define NORMAL -uniform float opacity; -#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) - varying vec3 vViewPosition; -#endif -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - gl_FragColor = vec4( packNormalToRGB( normal ), opacity ); - #ifdef OPAQUE - gl_FragColor.a = 1.0; - #endif -}`,cG=`#define PHONG -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include - #include -}`,uG=`#define PHONG -uniform vec3 diffuse; -uniform vec3 emissive; -uniform vec3 specular; -uniform float shininess; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; - #include - #include - #include - #include - #include - #include - #include -}`,fG=`#define STANDARD -varying vec3 vViewPosition; -#ifdef USE_TRANSMISSION - varying vec3 vWorldPosition; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include -#ifdef USE_TRANSMISSION - vWorldPosition = worldPosition.xyz; -#endif -}`,dG=`#define STANDARD -#ifdef PHYSICAL - #define IOR - #define USE_SPECULAR -#endif -uniform vec3 diffuse; -uniform vec3 emissive; -uniform float roughness; -uniform float metalness; -uniform float opacity; -#ifdef IOR - uniform float ior; -#endif -#ifdef USE_SPECULAR - uniform float specularIntensity; - uniform vec3 specularColor; - #ifdef USE_SPECULAR_COLORMAP - uniform sampler2D specularColorMap; - #endif - #ifdef USE_SPECULAR_INTENSITYMAP - uniform sampler2D specularIntensityMap; - #endif -#endif -#ifdef USE_CLEARCOAT - uniform float clearcoat; - uniform float clearcoatRoughness; -#endif -#ifdef USE_IRIDESCENCE - uniform float iridescence; - uniform float iridescenceIOR; - uniform float iridescenceThicknessMinimum; - uniform float iridescenceThicknessMaximum; -#endif -#ifdef USE_SHEEN - uniform vec3 sheenColor; - uniform float sheenRoughness; - #ifdef USE_SHEEN_COLORMAP - uniform sampler2D sheenColorMap; - #endif - #ifdef USE_SHEEN_ROUGHNESSMAP - uniform sampler2D sheenRoughnessMap; - #endif -#endif -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; - vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; - #include - vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; - #ifdef USE_SHEEN - float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor ); - outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular; - #endif - #ifdef USE_CLEARCOAT - float dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) ); - vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); - outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat; - #endif - #include - #include - #include - #include - #include - #include -}`,hG=`#define TOON -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include -}`,pG=`#define TOON -uniform vec3 diffuse; -uniform vec3 emissive; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; - #include - #include - #include - #include - #include - #include -}`,mG=`uniform float size; -uniform float scale; -#include -#include -#include -#include -#include -#include -#ifdef USE_POINTS_UV - varying vec2 vUv; - uniform mat3 uvTransform; -#endif -void main() { - #ifdef USE_POINTS_UV - vUv = ( uvTransform * vec3( uv, 1 ) ).xy; - #endif - #include - #include - #include - #include - #include - gl_PointSize = size; - #ifdef USE_SIZEATTENUATION - bool isPerspective = isPerspectiveMatrix( projectionMatrix ); - if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); - #endif - #include - #include - #include - #include -}`,gG=`uniform vec3 diffuse; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec3 outgoingLight = vec3( 0.0 ); - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - outgoingLight = diffuseColor.rgb; - #include - #include - #include - #include - #include -}`,vG=`#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include -}`,yG=`uniform vec3 color; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); - #include - #include - #include -}`,xG=`uniform float rotation; -uniform vec2 center; -#include -#include -#include -#include -#include -void main() { - #include - vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); - vec2 scale; - scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); - scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); - #ifndef USE_SIZEATTENUATION - bool isPerspective = isPerspectiveMatrix( projectionMatrix ); - if ( isPerspective ) scale *= - mvPosition.z; - #endif - vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; - vec2 rotatedPosition; - rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; - rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; - mvPosition.xy += rotatedPosition; - gl_Position = projectionMatrix * mvPosition; - #include - #include - #include -}`,_G=`uniform vec3 diffuse; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec3 outgoingLight = vec3( 0.0 ); - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - outgoingLight = diffuseColor.rgb; - #include - #include - #include - #include -}`,At={alphamap_fragment:XH,alphamap_pars_fragment:YH,alphatest_fragment:qH,alphatest_pars_fragment:ZH,aomap_fragment:$H,aomap_pars_fragment:JH,begin_vertex:KH,beginnormal_vertex:QH,bsdfs:eW,iridescence_fragment:tW,bumpmap_pars_fragment:nW,clipping_planes_fragment:iW,clipping_planes_pars_fragment:rW,clipping_planes_pars_vertex:sW,clipping_planes_vertex:oW,color_fragment:aW,color_pars_fragment:lW,color_pars_vertex:cW,color_vertex:uW,common:fW,cube_uv_reflection_fragment:dW,defaultnormal_vertex:hW,displacementmap_pars_vertex:pW,displacementmap_vertex:mW,emissivemap_fragment:gW,emissivemap_pars_fragment:vW,encodings_fragment:yW,encodings_pars_fragment:xW,envmap_fragment:_W,envmap_common_pars_fragment:wW,envmap_pars_fragment:SW,envmap_pars_vertex:MW,envmap_physical_pars_fragment:NW,envmap_vertex:AW,fog_vertex:bW,fog_pars_vertex:EW,fog_fragment:TW,fog_pars_fragment:CW,gradientmap_pars_fragment:PW,lightmap_fragment:LW,lightmap_pars_fragment:RW,lights_lambert_fragment:IW,lights_lambert_pars_fragment:DW,lights_pars_begin:kW,lights_toon_fragment:OW,lights_toon_pars_fragment:UW,lights_phong_fragment:zW,lights_phong_pars_fragment:FW,lights_physical_fragment:BW,lights_physical_pars_fragment:VW,lights_fragment_begin:HW,lights_fragment_maps:WW,lights_fragment_end:GW,logdepthbuf_fragment:jW,logdepthbuf_pars_fragment:XW,logdepthbuf_pars_vertex:YW,logdepthbuf_vertex:qW,map_fragment:ZW,map_pars_fragment:$W,map_particle_fragment:JW,map_particle_pars_fragment:KW,metalnessmap_fragment:QW,metalnessmap_pars_fragment:e8,morphcolor_vertex:t8,morphnormal_vertex:n8,morphtarget_pars_vertex:i8,morphtarget_vertex:r8,normal_fragment_begin:s8,normal_fragment_maps:o8,normal_pars_fragment:a8,normal_pars_vertex:l8,normal_vertex:c8,normalmap_pars_fragment:u8,clearcoat_normal_fragment_begin:f8,clearcoat_normal_fragment_maps:d8,clearcoat_pars_fragment:h8,iridescence_pars_fragment:p8,output_fragment:m8,packing:g8,premultiplied_alpha_fragment:v8,project_vertex:y8,dithering_fragment:x8,dithering_pars_fragment:_8,roughnessmap_fragment:w8,roughnessmap_pars_fragment:S8,shadowmap_pars_fragment:M8,shadowmap_pars_vertex:A8,shadowmap_vertex:b8,shadowmask_pars_fragment:E8,skinbase_vertex:T8,skinning_pars_vertex:C8,skinning_vertex:P8,skinnormal_vertex:L8,specularmap_fragment:R8,specularmap_pars_fragment:I8,tonemapping_fragment:D8,tonemapping_pars_fragment:k8,transmission_fragment:N8,transmission_pars_fragment:O8,uv_pars_fragment:U8,uv_pars_vertex:z8,uv_vertex:F8,worldpos_vertex:B8,background_vert:V8,background_frag:H8,backgroundCube_vert:W8,backgroundCube_frag:G8,cube_vert:j8,cube_frag:X8,depth_vert:Y8,depth_frag:q8,distanceRGBA_vert:Z8,distanceRGBA_frag:$8,equirect_vert:J8,equirect_frag:K8,linedashed_vert:Q8,linedashed_frag:eG,meshbasic_vert:tG,meshbasic_frag:nG,meshlambert_vert:iG,meshlambert_frag:rG,meshmatcap_vert:sG,meshmatcap_frag:oG,meshnormal_vert:aG,meshnormal_frag:lG,meshphong_vert:cG,meshphong_frag:uG,meshphysical_vert:fG,meshphysical_frag:dG,meshtoon_vert:hG,meshtoon_frag:pG,points_vert:mG,points_frag:gG,shadow_vert:vG,shadow_frag:yG,sprite_vert:xG,sprite_frag:_G},ze={common:{diffuse:{value:new qe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Ct},alphaMap:{value:null},alphaMapTransform:{value:new Ct},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Ct}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Ct}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Ct}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Ct},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Ct},normalScale:{value:new Se(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Ct},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Ct}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Ct}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Ct}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new qe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{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 qe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Ct}},sprite:{diffuse:{value:new qe(16777215)},opacity:{value:1},center:{value:new Se(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Ct},alphaMap:{value:null},alphaTest:{value:0}}},zr={basic:{uniforms:yi([ze.common,ze.specularmap,ze.envmap,ze.aomap,ze.lightmap,ze.fog]),vertexShader:At.meshbasic_vert,fragmentShader:At.meshbasic_frag},lambert:{uniforms:yi([ze.common,ze.specularmap,ze.envmap,ze.aomap,ze.lightmap,ze.emissivemap,ze.bumpmap,ze.normalmap,ze.displacementmap,ze.fog,ze.lights,{emissive:{value:new qe(0)}}]),vertexShader:At.meshlambert_vert,fragmentShader:At.meshlambert_frag},phong:{uniforms:yi([ze.common,ze.specularmap,ze.envmap,ze.aomap,ze.lightmap,ze.emissivemap,ze.bumpmap,ze.normalmap,ze.displacementmap,ze.fog,ze.lights,{emissive:{value:new qe(0)},specular:{value:new qe(1118481)},shininess:{value:30}}]),vertexShader:At.meshphong_vert,fragmentShader:At.meshphong_frag},standard:{uniforms:yi([ze.common,ze.envmap,ze.aomap,ze.lightmap,ze.emissivemap,ze.bumpmap,ze.normalmap,ze.displacementmap,ze.roughnessmap,ze.metalnessmap,ze.fog,ze.lights,{emissive:{value:new qe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:At.meshphysical_vert,fragmentShader:At.meshphysical_frag},toon:{uniforms:yi([ze.common,ze.aomap,ze.lightmap,ze.emissivemap,ze.bumpmap,ze.normalmap,ze.displacementmap,ze.gradientmap,ze.fog,ze.lights,{emissive:{value:new qe(0)}}]),vertexShader:At.meshtoon_vert,fragmentShader:At.meshtoon_frag},matcap:{uniforms:yi([ze.common,ze.bumpmap,ze.normalmap,ze.displacementmap,ze.fog,{matcap:{value:null}}]),vertexShader:At.meshmatcap_vert,fragmentShader:At.meshmatcap_frag},points:{uniforms:yi([ze.points,ze.fog]),vertexShader:At.points_vert,fragmentShader:At.points_frag},dashed:{uniforms:yi([ze.common,ze.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:At.linedashed_vert,fragmentShader:At.linedashed_frag},depth:{uniforms:yi([ze.common,ze.displacementmap]),vertexShader:At.depth_vert,fragmentShader:At.depth_frag},normal:{uniforms:yi([ze.common,ze.bumpmap,ze.normalmap,ze.displacementmap,{opacity:{value:1}}]),vertexShader:At.meshnormal_vert,fragmentShader:At.meshnormal_frag},sprite:{uniforms:yi([ze.sprite,ze.fog]),vertexShader:At.sprite_vert,fragmentShader:At.sprite_frag},background:{uniforms:{uvTransform:{value:new Ct},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:At.background_vert,fragmentShader:At.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:At.backgroundCube_vert,fragmentShader:At.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:At.cube_vert,fragmentShader:At.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:At.equirect_vert,fragmentShader:At.equirect_frag},distanceRGBA:{uniforms:yi([ze.common,ze.displacementmap,{referencePosition:{value:new O},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:At.distanceRGBA_vert,fragmentShader:At.distanceRGBA_frag},shadow:{uniforms:yi([ze.lights,ze.fog,{color:{value:new qe(0)},opacity:{value:1}}]),vertexShader:At.shadow_vert,fragmentShader:At.shadow_frag}};zr.physical={uniforms:yi([zr.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Ct},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Ct},clearcoatNormalScale:{value:new Se(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Ct},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Ct},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Ct},sheen:{value:0},sheenColor:{value:new qe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Ct},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Ct},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Ct},transmissionSamplerSize:{value:new Se},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Ct},attenuationDistance:{value:0},attenuationColor:{value:new qe(0)},specularColor:{value:new qe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Ct},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Ct}}]),vertexShader:At.meshphysical_vert,fragmentShader:At.meshphysical_frag};const Np={r:0,b:0,g:0};function wG(n,e,t,i,r,s,o){const a=new qe(0);let l=s===!0?0:1,f,d,h=null,p=0,g=null;function y(w,m){let _=!1,S=m.isScene===!0?m.background:null;S&&S.isTexture&&(S=(m.backgroundBlurriness>0?t:e).get(S));const A=n.xr,E=A.getSession&&A.getSession();E&&E.environmentBlendMode==="additive"&&(S=null),S===null?x(a,l):S&&S.isColor&&(x(S,1),_=!0),(n.autoClear||_)&&n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil),S&&(S.isCubeTexture||S.mapping===lu)?(d===void 0&&(d=new jn(new aa(1,1,1),new ds({name:"BackgroundCubeMaterial",uniforms:Jc(zr.backgroundCube.uniforms),vertexShader:zr.backgroundCube.vertexShader,fragmentShader:zr.backgroundCube.fragmentShader,side:Si,depthTest:!1,depthWrite:!1,fog:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(P,I,L){this.matrixWorld.copyPosition(L.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(d)),d.material.uniforms.envMap.value=S,d.material.uniforms.flipEnvMap.value=S.isCubeTexture&&S.isRenderTargetTexture===!1?-1:1,d.material.uniforms.backgroundBlurriness.value=m.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=m.backgroundIntensity,d.material.toneMapped=S.encoding!==Wt,(h!==S||p!==S.version||g!==n.toneMapping)&&(d.material.needsUpdate=!0,h=S,p=S.version,g=n.toneMapping),d.layers.enableAll(),w.unshift(d,d.geometry,d.material,0,0,null)):S&&S.isTexture&&(f===void 0&&(f=new jn(new cu(2,2),new ds({name:"BackgroundMaterial",uniforms:Jc(zr.background.uniforms),vertexShader:zr.background.vertexShader,fragmentShader:zr.background.fragmentShader,side:Zs,depthTest:!1,depthWrite:!1,fog:!1})),f.geometry.deleteAttribute("normal"),Object.defineProperty(f.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(f)),f.material.uniforms.t2D.value=S,f.material.uniforms.backgroundIntensity.value=m.backgroundIntensity,f.material.toneMapped=S.encoding!==Wt,S.matrixAutoUpdate===!0&&S.updateMatrix(),f.material.uniforms.uvTransform.value.copy(S.matrix),(h!==S||p!==S.version||g!==n.toneMapping)&&(f.material.needsUpdate=!0,h=S,p=S.version,g=n.toneMapping),f.layers.enableAll(),w.unshift(f,f.geometry,f.material,0,0,null))}function x(w,m){w.getRGB(Np,HR(n)),i.buffers.color.setClear(Np.r,Np.g,Np.b,m,o)}return{getClearColor:function(){return a},setClearColor:function(w,m=1){a.set(w),l=m,x(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(w){l=w,x(a,l)},render:y}}function SG(n,e,t,i){const r=n.getParameter(34921),s=i.isWebGL2?null:e.get("OES_vertex_array_object"),o=i.isWebGL2||s!==null,a={},l=w(null);let f=l,d=!1;function h(j,Y,te,ne,D){let B=!1;if(o){const V=x(ne,te,Y);f!==V&&(f=V,g(f.object)),B=m(j,ne,te,D),B&&_(j,ne,te,D)}else{const V=Y.wireframe===!0;(f.geometry!==ne.id||f.program!==te.id||f.wireframe!==V)&&(f.geometry=ne.id,f.program=te.id,f.wireframe=V,B=!0)}D!==null&&t.update(D,34963),(B||d)&&(d=!1,L(j,Y,te,ne),D!==null&&n.bindBuffer(34963,t.get(D).buffer))}function p(){return i.isWebGL2?n.createVertexArray():s.createVertexArrayOES()}function g(j){return i.isWebGL2?n.bindVertexArray(j):s.bindVertexArrayOES(j)}function y(j){return i.isWebGL2?n.deleteVertexArray(j):s.deleteVertexArrayOES(j)}function x(j,Y,te){const ne=te.wireframe===!0;let D=a[j.id];D===void 0&&(D={},a[j.id]=D);let B=D[Y.id];B===void 0&&(B={},D[Y.id]=B);let V=B[ne];return V===void 0&&(V=w(p()),B[ne]=V),V}function w(j){const Y=[],te=[],ne=[];for(let D=0;D=0){const ce=D[ee];let be=B[ee];if(be===void 0&&(ee==="instanceMatrix"&&j.instanceMatrix&&(be=j.instanceMatrix),ee==="instanceColor"&&j.instanceColor&&(be=j.instanceColor)),ce===void 0||ce.attribute!==be||be&&ce.data!==be.data)return!0;V++}return f.attributesNum!==V||f.index!==ne}function _(j,Y,te,ne){const D={},B=Y.attributes;let V=0;const re=te.getAttributes();for(const ee in re)if(re[ee].location>=0){let ce=B[ee];ce===void 0&&(ee==="instanceMatrix"&&j.instanceMatrix&&(ce=j.instanceMatrix),ee==="instanceColor"&&j.instanceColor&&(ce=j.instanceColor));const be={};be.attribute=ce,ce&&ce.data&&(be.data=ce.data),D[ee]=be,V++}f.attributes=D,f.attributesNum=V,f.index=ne}function S(){const j=f.newAttributes;for(let Y=0,te=j.length;Y=0){let ie=D[re];if(ie===void 0&&(re==="instanceMatrix"&&j.instanceMatrix&&(ie=j.instanceMatrix),re==="instanceColor"&&j.instanceColor&&(ie=j.instanceColor)),ie!==void 0){const ce=ie.normalized,be=ie.itemSize,ge=t.get(ie);if(ge===void 0)continue;const Q=ge.buffer,Fe=ge.type,Be=ge.bytesPerElement;if(ie.isInterleavedBufferAttribute){const _e=ie.data,Me=_e.stride,ve=ie.offset;if(_e.isInstancedInterleavedBuffer){for(let oe=0;oe0&&n.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";I="mediump"}return I==="mediump"&&n.getShaderPrecisionFormat(35633,36337).precision>0&&n.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}const o=typeof WebGL2RenderingContext<"u"&&n.constructor.name==="WebGL2RenderingContext";let a=t.precision!==void 0?t.precision:"highp";const l=s(a);l!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",l,"instead."),a=l);const f=o||e.has("WEBGL_draw_buffers"),d=t.logarithmicDepthBuffer===!0,h=n.getParameter(34930),p=n.getParameter(35660),g=n.getParameter(3379),y=n.getParameter(34076),x=n.getParameter(34921),w=n.getParameter(36347),m=n.getParameter(36348),_=n.getParameter(36349),S=p>0,A=o||e.has("OES_texture_float"),E=S&&A,P=o?n.getParameter(36183):0;return{isWebGL2:o,drawBuffers:f,getMaxAnisotropy:r,getMaxPrecision:s,precision:a,logarithmicDepthBuffer:d,maxTextures:h,maxVertexTextures:p,maxTextureSize:g,maxCubemapSize:y,maxAttributes:x,maxVertexUniforms:w,maxVaryings:m,maxFragmentUniforms:_,vertexTextures:S,floatFragmentTextures:A,floatVertexTextures:E,maxSamples:P}}function bG(n){const e=this;let t=null,i=0,r=!1,s=!1;const o=new Ao,a=new Ct,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(h,p){const g=h.length!==0||p||i!==0||r;return r=p,i=h.length,g},this.beginShadows=function(){s=!0,d(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(h,p){t=d(h,p,0)},this.setState=function(h,p,g){const y=h.clippingPlanes,x=h.clipIntersection,w=h.clipShadows,m=n.get(h);if(!r||y===null||y.length===0||s&&!w)s?d(null):f();else{const _=s?0:i,S=_*4;let A=m.clippingState||null;l.value=A,A=d(y,p,S,g);for(let E=0;E!==S;++E)A[E]=t[E];m.clippingState=A,this.numIntersection=x?this.numPlanes:0,this.numPlanes+=_}};function f(){l.value!==t&&(l.value=t,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function d(h,p,g,y){const x=h!==null?h.length:0;let w=null;if(x!==0){if(w=l.value,y!==!0||w===null){const m=g+x*4,_=p.matrixWorldInverse;a.getNormalMatrix(_),(w===null||w.length0){const f=new Hw(l.height/2);return f.fromEquirectangularTexture(n,o),e.set(o,f),o.addEventListener("dispose",r),t(f.texture,o.mapping)}else return null}}return o}function r(o){const a=o.target;a.removeEventListener("dispose",r);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function s(){e=new WeakMap}return{get:i,dispose:s}}class cs extends Od{constructor(e=-1,t=1,i=1,r=-1,s=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=r,this.near=s,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,i,r,s,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let s=i-e,o=i+e,a=r+t,l=r-t;if(this.view!==null&&this.view.enabled){const f=(this.right-this.left)/this.view.fullWidth/this.zoom,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=f*this.view.offsetX,o=s+f*this.view.width,a-=d*this.view.offsetY,l=a-d*this.view.height}this.projectionMatrix.makeOrthographic(s,o,a,l,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}const Mc=4,iT=[.125,.215,.35,.446,.526,.582],Oa=20,wy=new cs,rT=new qe;let Sy=null;const ka=(1+Math.sqrt(5))/2,$l=1/ka,sT=[new O(1,1,1),new O(-1,1,1),new O(1,1,-1),new O(-1,1,-1),new O(0,ka,$l),new O(0,ka,-$l),new O($l,0,ka),new O(-$l,0,ka),new O(ka,$l,0),new O(-ka,$l,0)];class V_{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,r=100){Sy=this._renderer.getRenderTarget(),this._setSize(256);const s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,i,r,s),t>0&&this._blur(s,0,0,t),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=lT(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=aT(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?S:0,S,S),d.setRenderTarget(r),x&&d.render(y,a),d.render(e,a)}y.geometry.dispose(),y.material.dispose(),d.toneMapping=p,d.autoClear=h,e.background=w}_textureToCubeUV(e,t){const i=this._renderer,r=e.mapping===$o||e.mapping===Jo;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=lT()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=aT());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new jn(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=e;const l=this._cubeSize;Op(t,0,0,3*l,2*l),i.setRenderTarget(t),i.render(o,wy)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;for(let r=1;rOa&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${w} samples when the maximum is set to ${Oa}`);const m=[];let _=0;for(let I=0;IS-Mc?r-S+Mc:0),P=4*(this._cubeSize-A);Op(t,E,P,3*A,2*A),l.setRenderTarget(t),l.render(h,wy)}}function TG(n){const e=[],t=[],i=[];let r=n;const s=n-Mc+1+iT.length;for(let o=0;on-Mc?l=iT[o-n+Mc-1]:o===0&&(l=0),i.push(l);const f=1/(a-2),d=-f,h=1+f,p=[d,d,h,d,h,h,d,d,h,h,d,h],g=6,y=6,x=3,w=2,m=1,_=new Float32Array(x*y*g),S=new Float32Array(w*y*g),A=new Float32Array(m*y*g);for(let P=0;P2?0:-1,C=[I,L,0,I+2/3,L,0,I+2/3,L+1,0,I,L,0,I+2/3,L+1,0,I,L+1,0];_.set(C,x*y*P),S.set(p,w*y*P);const R=[P,P,P,P,P,P];A.set(R,m*y*P)}const E=new St;E.setAttribute("position",new Xt(_,x)),E.setAttribute("uv",new Xt(S,w)),E.setAttribute("faceIndex",new Xt(A,m)),e.push(E),r>Mc&&r--}return{lodPlanes:e,sizeLods:t,sigmas:i}}function oT(n,e,t){const i=new Gr(n,e,t);return i.texture.mapping=lu,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function Op(n,e,t,i,r){n.viewport.set(e,t,i,r),n.scissor.set(e,t,i,r)}function CG(n,e,t){const i=new Float32Array(Oa),r=new O(0,1,0);return new ds({name:"SphericalGaussianBlur",defines:{n:Oa,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${n}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:Ww(),fragmentShader:` - - precision mediump float; - precision mediump int; - - varying vec3 vOutputDirection; - - uniform sampler2D envMap; - uniform int samples; - uniform float weights[ n ]; - uniform bool latitudinal; - uniform float dTheta; - uniform float mipInt; - uniform vec3 poleAxis; - - #define ENVMAP_TYPE_CUBE_UV - #include - - vec3 getSample( float theta, vec3 axis ) { - - float cosTheta = cos( theta ); - // Rodrigues' axis-angle rotation - vec3 sampleDirection = vOutputDirection * cosTheta - + cross( axis, vOutputDirection ) * sin( theta ) - + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); - - return bilinearCubeUV( envMap, sampleDirection, mipInt ); - - } - - void main() { - - vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); - - if ( all( equal( axis, vec3( 0.0 ) ) ) ) { - - axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); - - } - - axis = normalize( axis ); - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); - gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); - - for ( int i = 1; i < n; i++ ) { - - if ( i >= samples ) { - - break; - - } - - float theta = dTheta * float( i ); - gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); - gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); - - } - - } - `,blending:Hs,depthTest:!1,depthWrite:!1})}function aT(){return new ds({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:Ww(),fragmentShader:` - - precision mediump float; - precision mediump int; - - varying vec3 vOutputDirection; - - uniform sampler2D envMap; - - #include - - void main() { - - vec3 outputDirection = normalize( vOutputDirection ); - vec2 uv = equirectUv( outputDirection ); - - gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); - - } - `,blending:Hs,depthTest:!1,depthWrite:!1})}function lT(){return new ds({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:Ww(),fragmentShader:` - - precision mediump float; - precision mediump int; - - uniform float flipEnvMap; - - varying vec3 vOutputDirection; - - uniform samplerCube envMap; - - void main() { - - gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); - - } - `,blending:Hs,depthTest:!1,depthWrite:!1})}function Ww(){return` - - precision mediump float; - precision mediump int; - - attribute float faceIndex; - - varying vec3 vOutputDirection; - - // RH coordinate system; PMREM face-indexing convention - vec3 getDirection( vec2 uv, float face ) { - - uv = 2.0 * uv - 1.0; - - vec3 direction = vec3( uv, 1.0 ); - - if ( face == 0.0 ) { - - direction = direction.zyx; // ( 1, v, u ) pos x - - } else if ( face == 1.0 ) { - - direction = direction.xzy; - direction.xz *= -1.0; // ( -u, 1, -v ) pos y - - } else if ( face == 2.0 ) { - - direction.x *= -1.0; // ( -u, v, 1 ) pos z - - } else if ( face == 3.0 ) { - - direction = direction.zyx; - direction.xz *= -1.0; // ( -1, v, -u ) neg x - - } else if ( face == 4.0 ) { - - direction = direction.xzy; - direction.xy *= -1.0; // ( -u, -1, v ) neg y - - } else if ( face == 5.0 ) { - - direction.z *= -1.0; // ( u, v, -1 ) neg z - - } - - return direction; - - } - - void main() { - - vOutputDirection = getDirection( uv, faceIndex ); - gl_Position = vec4( position, 1.0 ); - - } - `}function PG(n){let e=new WeakMap,t=null;function i(a){if(a&&a.isTexture){const l=a.mapping,f=l===nd||l===id,d=l===$o||l===Jo;if(f||d)if(a.isRenderTargetTexture&&a.needsPMREMUpdate===!0){a.needsPMREMUpdate=!1;let h=e.get(a);return t===null&&(t=new V_(n)),h=f?t.fromEquirectangular(a,h):t.fromCubemap(a,h),e.set(a,h),h.texture}else{if(e.has(a))return e.get(a).texture;{const h=a.image;if(f&&h&&h.height>0||d&&h&&r(h)){t===null&&(t=new V_(n));const p=f?t.fromEquirectangular(a):t.fromCubemap(a);return e.set(a,p),a.addEventListener("dispose",s),p.texture}else return null}}}return a}function r(a){let l=0;const f=6;for(let d=0;de.maxTextureSize&&(W=Math.ceil(R/e.maxTextureSize),R=e.maxTextureSize);const Z=new Float32Array(R*W*4*x),X=new Kg(Z,R,W,x);X.type=zs,X.needsUpdate=!0;const j=C*4;for(let te=0;te0)return n;const r=e*t;let s=cT[r];if(s===void 0&&(s=new Float32Array(r),cT[r]=s),e!==0){i.toArray(s,0);for(let o=1,a=0;o!==e;++o)a+=t,n[o].toArray(s,a)}return s}function Un(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t":" "} ${a}: ${t[o]}`)}return i.join(` -`)}function Lj(n){switch(n){case $s:return["Linear","( value )"];case Wt:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",n),["Linear","( value )"]}}function gT(n,e,t){const i=n.getShaderParameter(e,35713),r=n.getShaderInfoLog(e).trim();if(i&&r==="")return"";const s=/ERROR: 0:(\d+)/.exec(r);if(s){const o=parseInt(s[1]);return t.toUpperCase()+` - -`+r+` - -`+Pj(n.getShaderSource(e),o)}else return r}function Rj(n,e){const t=Lj(e);return"vec4 "+n+"( vec4 value ) { return LinearTo"+t[0]+t[1]+"; }"}function Ij(n,e){let t;switch(e){case fR:t="Linear";break;case dR:t="Reinhard";break;case hR:t="OptimizedCineon";break;case Rw:t="ACESFilmic";break;case pR:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+n+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}function Dj(n){return[n.extensionDerivatives||n.envMapCubeUVHeight||n.bumpMap||n.normalMapTangentSpace||n.clearcoatNormalMap||n.flatShading||n.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(n.extensionFragDepth||n.logarithmicDepthBuffer)&&n.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",n.extensionDrawBuffers&&n.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(n.extensionShaderTextureLOD||n.envMap||n.transmission)&&n.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(df).join(` -`)}function kj(n){const e=[];for(const t in n){const i=n[t];i!==!1&&e.push("#define "+t+" "+i)}return e.join(` -`)}function Nj(n,e){const t={},i=n.getProgramParameter(e,35721);for(let r=0;r/gm;function H_(n){return n.replace(Oj,Uj)}function Uj(n,e){const t=At[e];if(t===void 0)throw new Error("Can not resolve #include <"+e+">");return H_(t)}const zj=/#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 xT(n){return n.replace(zj,Fj)}function Fj(n,e,t,i){let r="";for(let s=parseInt(e);s0&&(w+=` -`),m=[g,y].filter(df).join(` -`),m.length>0&&(m+=` -`)):(w=[_T(t),"#define SHADER_NAME "+t.shaderName,y,t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+d:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUvs2?"#define USE_UV2":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphColors&&t.isWebGL2?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","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","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` -`].filter(df).join(` -`),m=[g,_T(t),"#define SHADER_NAME "+t.shaderName,y,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+f:"",t.envMap?"#define "+d:"",t.envMap?"#define "+h:"",p?"#define CUBEUV_TEXEL_WIDTH "+p.texelWidth:"",p?"#define CUBEUV_TEXEL_HEIGHT "+p.texelHeight:"",p?"#define CUBEUV_MAX_MIP "+p.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescence?"#define USE_IRIDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.vertexTangents?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUvs2?"#define USE_UV2":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==Hr?"#define TONE_MAPPING":"",t.toneMapping!==Hr?At.tonemapping_pars_fragment:"",t.toneMapping!==Hr?Ij("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",At.encodings_pars_fragment,Rj("linearToOutputTexel",t.outputEncoding),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` -`].filter(df).join(` -`)),o=H_(o),o=vT(o,t),o=yT(o,t),a=H_(a),a=vT(a,t),a=yT(a,t),o=xT(o),a=xT(a),t.isWebGL2&&t.isRawShaderMaterial!==!0&&(_=`#version 300 es -`,w=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` -`)+` -`+w,m=["#define varying in",t.glslVersion===F_?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===F_?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` -`)+` -`+m);const S=_+w+o,A=_+m+a,E=mT(r,35633,S),P=mT(r,35632,A);if(r.attachShader(x,E),r.attachShader(x,P),t.index0AttributeName!==void 0?r.bindAttribLocation(x,0,t.index0AttributeName):t.morphTargets===!0&&r.bindAttribLocation(x,0,"position"),r.linkProgram(x),n.debug.checkShaderErrors){const C=r.getProgramInfoLog(x).trim(),R=r.getShaderInfoLog(E).trim(),W=r.getShaderInfoLog(P).trim();let Z=!0,X=!0;if(r.getProgramParameter(x,35714)===!1)if(Z=!1,typeof n.debug.onShaderError=="function")n.debug.onShaderError(r,x,E,P);else{const j=gT(r,E,"vertex"),Y=gT(r,P,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(x,35715)+` - -Program Info Log: `+C+` -`+j+` -`+Y)}else C!==""?console.warn("THREE.WebGLProgram: Program Info Log:",C):(R===""||W==="")&&(X=!1);X&&(this.diagnostics={runnable:Z,programLog:C,vertexShader:{log:R,prefix:w},fragmentShader:{log:W,prefix:m}})}r.deleteShader(E),r.deleteShader(P);let I;this.getUniforms=function(){return I===void 0&&(I=new Em(r,x)),I};let L;return this.getAttributes=function(){return L===void 0&&(L=Nj(r,x)),L},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(x),this.program=void 0},this.name=t.shaderName,this.id=Cj++,this.cacheKey=e,this.usedTimes=1,this.program=x,this.vertexShader=E,this.fragmentShader=P,this}let Xj=0;class Yj{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,i=e.fragmentShader,r=this._getShaderStage(t),s=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return o.has(r)===!1&&(o.add(r),r.usedTimes++),o.has(s)===!1&&(o.add(s),s.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const i of t)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let i=t.get(e);return i===void 0&&(i=new Set,t.set(e,i)),i}_getShaderStage(e){const t=this.shaderCache;let i=t.get(e);return i===void 0&&(i=new qj(e),t.set(e,i)),i}}class qj{constructor(e){this.id=Xj++,this.code=e,this.usedTimes=0}}function Zj(n,e,t,i,r,s,o){const a=new Ja,l=new Yj,f=[],d=r.isWebGL2,h=r.logarithmicDepthBuffer,p=r.vertexTextures;let g=r.precision;const y={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function x(C){return C===1?"uv2":"uv"}function w(C,R,W,Z,X){const j=Z.fog,Y=X.geometry,te=C.isMeshStandardMaterial?Z.environment:null,ne=(C.isMeshStandardMaterial?t:e).get(C.envMap||te),D=ne&&ne.mapping===lu?ne.image.height:null,B=y[C.type];C.precision!==null&&(g=r.getMaxPrecision(C.precision),g!==C.precision&&console.warn("THREE.WebGLProgram.getParameters:",C.precision,"not supported, using",g,"instead."));const V=Y.morphAttributes.position||Y.morphAttributes.normal||Y.morphAttributes.color,re=V!==void 0?V.length:0;let ee=0;Y.morphAttributes.position!==void 0&&(ee=1),Y.morphAttributes.normal!==void 0&&(ee=2),Y.morphAttributes.color!==void 0&&(ee=3);let ie,ce,be,ge;if(B){const Ie=zr[B];ie=Ie.vertexShader,ce=Ie.fragmentShader}else ie=C.vertexShader,ce=C.fragmentShader,l.update(C),be=l.getVertexShaderID(C),ge=l.getFragmentShaderID(C);const Q=n.getRenderTarget(),Fe=X.isInstancedMesh===!0,Be=!!C.map,_e=!!C.matcap,Me=!!ne,ve=!!C.aoMap,oe=!!C.lightMap,we=!!C.bumpMap,Ne=!!C.normalMap,Le=!!C.displacementMap,Ye=!!C.emissiveMap,Je=!!C.metalnessMap,Ge=!!C.roughnessMap,He=C.clearcoat>0,pt=C.iridescence>0,z=C.sheen>0,k=C.transmission>0,le=He&&!!C.clearcoatMap,Ee=He&&!!C.clearcoatNormalMap,Te=He&&!!C.clearcoatRoughnessMap,Pe=pt&&!!C.iridescenceMap,nt=pt&&!!C.iridescenceThicknessMap,Oe=z&&!!C.sheenColorMap,he=z&&!!C.sheenRoughnessMap,je=!!C.specularMap,G=!!C.specularColorMap,de=!!C.specularIntensityMap,ye=k&&!!C.transmissionMap,Ce=k&&!!C.thicknessMap,tt=!!C.gradientMap,ut=!!C.alphaMap,Lt=C.alphaTest>0,q=!!C.extensions,ue=!!Y.attributes.uv2;return{isWebGL2:d,shaderID:B,shaderName:C.type,vertexShader:ie,fragmentShader:ce,defines:C.defines,customVertexShaderID:be,customFragmentShaderID:ge,isRawShaderMaterial:C.isRawShaderMaterial===!0,glslVersion:C.glslVersion,precision:g,instancing:Fe,instancingColor:Fe&&X.instanceColor!==null,supportsVertexTextures:p,outputEncoding:Q===null?n.outputEncoding:Q.isXRRenderTarget===!0?Q.texture.encoding:$s,map:Be,matcap:_e,envMap:Me,envMapMode:Me&&ne.mapping,envMapCubeUVHeight:D,aoMap:ve,lightMap:oe,bumpMap:we,normalMap:Ne,displacementMap:p&&Le,emissiveMap:Ye,normalMapObjectSpace:Ne&&C.normalMapType===NR,normalMapTangentSpace:Ne&&C.normalMapType===sa,decodeVideoTexture:Be&&C.map.isVideoTexture===!0&&C.map.encoding===Wt,metalnessMap:Je,roughnessMap:Ge,clearcoat:He,clearcoatMap:le,clearcoatNormalMap:Ee,clearcoatRoughnessMap:Te,iridescence:pt,iridescenceMap:Pe,iridescenceThicknessMap:nt,sheen:z,sheenColorMap:Oe,sheenRoughnessMap:he,specularMap:je,specularColorMap:G,specularIntensityMap:de,transmission:k,transmissionMap:ye,thicknessMap:Ce,gradientMap:tt,opaque:C.transparent===!1&&C.blending===qa,alphaMap:ut,alphaTest:Lt,combine:C.combine,mapUv:Be&&x(C.map.channel),aoMapUv:ve&&x(C.aoMap.channel),lightMapUv:oe&&x(C.lightMap.channel),bumpMapUv:we&&x(C.bumpMap.channel),normalMapUv:Ne&&x(C.normalMap.channel),displacementMapUv:Le&&x(C.displacementMap.channel),emissiveMapUv:Ye&&x(C.emissiveMap.channel),metalnessMapUv:Je&&x(C.metalnessMap.channel),roughnessMapUv:Ge&&x(C.roughnessMap.channel),clearcoatMapUv:le&&x(C.clearcoatMap.channel),clearcoatNormalMapUv:Ee&&x(C.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Te&&x(C.clearcoatRoughnessMap.channel),iridescenceMapUv:Pe&&x(C.iridescenceMap.channel),iridescenceThicknessMapUv:nt&&x(C.iridescenceThicknessMap.channel),sheenColorMapUv:Oe&&x(C.sheenColorMap.channel),sheenRoughnessMapUv:he&&x(C.sheenRoughnessMap.channel),specularMapUv:je&&x(C.specularMap.channel),specularColorMapUv:G&&x(C.specularColorMap.channel),specularIntensityMapUv:de&&x(C.specularIntensityMap.channel),transmissionMapUv:ye&&x(C.transmissionMap.channel),thicknessMapUv:Ce&&x(C.thicknessMap.channel),alphaMapUv:ut&&x(C.alphaMap.channel),vertexTangents:Ne&&!!Y.attributes.tangent,vertexColors:C.vertexColors,vertexAlphas:C.vertexColors===!0&&!!Y.attributes.color&&Y.attributes.color.itemSize===4,vertexUvs2:ue,pointsUvs:X.isPoints===!0&&!!Y.attributes.uv&&(Be||ut),fog:!!j,useFog:C.fog===!0,fogExp2:j&&j.isFogExp2,flatShading:C.flatShading===!0,sizeAttenuation:C.sizeAttenuation===!0,logarithmicDepthBuffer:h,skinning:X.isSkinnedMesh===!0,morphTargets:Y.morphAttributes.position!==void 0,morphNormals:Y.morphAttributes.normal!==void 0,morphColors:Y.morphAttributes.color!==void 0,morphTargetsCount:re,morphTextureStride:ee,numDirLights:R.directional.length,numPointLights:R.point.length,numSpotLights:R.spot.length,numSpotLightMaps:R.spotLightMap.length,numRectAreaLights:R.rectArea.length,numHemiLights:R.hemi.length,numDirLightShadows:R.directionalShadowMap.length,numPointLightShadows:R.pointShadowMap.length,numSpotLightShadows:R.spotShadowMap.length,numSpotLightShadowsWithMaps:R.numSpotLightShadowsWithMaps,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:C.dithering,shadowMapEnabled:n.shadowMap.enabled&&W.length>0,shadowMapType:n.shadowMap.type,toneMapping:C.toneMapped?n.toneMapping:Hr,useLegacyLights:n.useLegacyLights,premultipliedAlpha:C.premultipliedAlpha,doubleSided:C.side===Fr,flipSided:C.side===Si,useDepthPacking:C.depthPacking>=0,depthPacking:C.depthPacking||0,index0AttributeName:C.index0AttributeName,extensionDerivatives:q&&C.extensions.derivatives===!0,extensionFragDepth:q&&C.extensions.fragDepth===!0,extensionDrawBuffers:q&&C.extensions.drawBuffers===!0,extensionShaderTextureLOD:q&&C.extensions.shaderTextureLOD===!0,rendererExtensionFragDepth:d||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:d||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:d||i.has("EXT_shader_texture_lod"),customProgramCacheKey:C.customProgramCacheKey()}}function m(C){const R=[];if(C.shaderID?R.push(C.shaderID):(R.push(C.customVertexShaderID),R.push(C.customFragmentShaderID)),C.defines!==void 0)for(const W in C.defines)R.push(W),R.push(C.defines[W]);return C.isRawShaderMaterial===!1&&(_(R,C),S(R,C),R.push(n.outputEncoding)),R.push(C.customProgramCacheKey),R.join()}function _(C,R){C.push(R.precision),C.push(R.outputEncoding),C.push(R.envMapMode),C.push(R.envMapCubeUVHeight),C.push(R.mapUv),C.push(R.alphaMapUv),C.push(R.lightMapUv),C.push(R.aoMapUv),C.push(R.bumpMapUv),C.push(R.normalMapUv),C.push(R.displacementMapUv),C.push(R.emissiveMapUv),C.push(R.metalnessMapUv),C.push(R.roughnessMapUv),C.push(R.clearcoatMapUv),C.push(R.clearcoatNormalMapUv),C.push(R.clearcoatRoughnessMapUv),C.push(R.iridescenceMapUv),C.push(R.iridescenceThicknessMapUv),C.push(R.sheenColorMapUv),C.push(R.sheenRoughnessMapUv),C.push(R.specularMapUv),C.push(R.specularColorMapUv),C.push(R.specularIntensityMapUv),C.push(R.transmissionMapUv),C.push(R.thicknessMapUv),C.push(R.combine),C.push(R.fogExp2),C.push(R.sizeAttenuation),C.push(R.morphTargetsCount),C.push(R.morphAttributeCount),C.push(R.numDirLights),C.push(R.numPointLights),C.push(R.numSpotLights),C.push(R.numSpotLightMaps),C.push(R.numHemiLights),C.push(R.numRectAreaLights),C.push(R.numDirLightShadows),C.push(R.numPointLightShadows),C.push(R.numSpotLightShadows),C.push(R.numSpotLightShadowsWithMaps),C.push(R.shadowMapType),C.push(R.toneMapping),C.push(R.numClippingPlanes),C.push(R.numClipIntersection),C.push(R.depthPacking)}function S(C,R){a.disableAll(),R.isWebGL2&&a.enable(0),R.supportsVertexTextures&&a.enable(1),R.instancing&&a.enable(2),R.instancingColor&&a.enable(3),R.matcap&&a.enable(4),R.envMap&&a.enable(5),R.normalMapObjectSpace&&a.enable(6),R.normalMapTangentSpace&&a.enable(7),R.clearcoat&&a.enable(8),R.iridescence&&a.enable(9),R.alphaTest&&a.enable(10),R.vertexColors&&a.enable(11),R.vertexAlphas&&a.enable(12),R.vertexUvs2&&a.enable(13),R.vertexTangents&&a.enable(14),C.push(a.mask),a.disableAll(),R.fog&&a.enable(0),R.useFog&&a.enable(1),R.flatShading&&a.enable(2),R.logarithmicDepthBuffer&&a.enable(3),R.skinning&&a.enable(4),R.morphTargets&&a.enable(5),R.morphNormals&&a.enable(6),R.morphColors&&a.enable(7),R.premultipliedAlpha&&a.enable(8),R.shadowMapEnabled&&a.enable(9),R.useLegacyLights&&a.enable(10),R.doubleSided&&a.enable(11),R.flipSided&&a.enable(12),R.useDepthPacking&&a.enable(13),R.dithering&&a.enable(14),R.transmission&&a.enable(15),R.sheen&&a.enable(16),R.decodeVideoTexture&&a.enable(17),R.opaque&&a.enable(18),R.pointsUvs&&a.enable(19),C.push(a.mask)}function A(C){const R=y[C.type];let W;if(R){const Z=zr[R];W=WR.clone(Z.uniforms)}else W=C.uniforms;return W}function E(C,R){let W;for(let Z=0,X=f.length;Z0?i.push(m):g.transparent===!0?r.push(m):t.push(m)}function l(h,p,g,y,x,w){const m=o(h,p,g,y,x,w);g.transmission>0?i.unshift(m):g.transparent===!0?r.unshift(m):t.unshift(m)}function f(h,p){t.length>1&&t.sort(h||Jj),i.length>1&&i.sort(p||wT),r.length>1&&r.sort(p||wT)}function d(){for(let h=e,p=n.length;h=s.length?(o=new ST,s.push(o)):o=s[r],o}function t(){n=new WeakMap}return{get:e,dispose:t}}function Qj(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new O,color:new qe};break;case"SpotLight":t={position:new O,direction:new O,color:new qe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new O,color:new qe,distance:0,decay:0};break;case"HemisphereLight":t={direction:new O,skyColor:new qe,groundColor:new qe};break;case"RectAreaLight":t={color:new qe,position:new O,halfWidth:new O,halfHeight:new O};break}return n[e.id]=t,t}}}function e9(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Se};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Se};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Se,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}let t9=0;function n9(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function i9(n,e){const t=new Qj,i=e9(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-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};for(let d=0;d<9;d++)r.probe.push(new O);const s=new O,o=new gt,a=new gt;function l(d,h){let p=0,g=0,y=0;for(let W=0;W<9;W++)r.probe[W].set(0,0,0);let x=0,w=0,m=0,_=0,S=0,A=0,E=0,P=0,I=0,L=0;d.sort(n9);const C=h===!0?Math.PI:1;for(let W=0,Z=d.length;W0&&(e.isWebGL2||n.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=ze.LTC_FLOAT_1,r.rectAreaLTC2=ze.LTC_FLOAT_2):n.has("OES_texture_half_float_linear")===!0?(r.rectAreaLTC1=ze.LTC_HALF_1,r.rectAreaLTC2=ze.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=p,r.ambient[1]=g,r.ambient[2]=y;const R=r.hash;(R.directionalLength!==x||R.pointLength!==w||R.spotLength!==m||R.rectAreaLength!==_||R.hemiLength!==S||R.numDirectionalShadows!==A||R.numPointShadows!==E||R.numSpotShadows!==P||R.numSpotMaps!==I)&&(r.directional.length=x,r.spot.length=m,r.rectArea.length=_,r.point.length=w,r.hemi.length=S,r.directionalShadow.length=A,r.directionalShadowMap.length=A,r.pointShadow.length=E,r.pointShadowMap.length=E,r.spotShadow.length=P,r.spotShadowMap.length=P,r.directionalShadowMatrix.length=A,r.pointShadowMatrix.length=E,r.spotLightMatrix.length=P+I-L,r.spotLightMap.length=I,r.numSpotLightShadowsWithMaps=L,R.directionalLength=x,R.pointLength=w,R.spotLength=m,R.rectAreaLength=_,R.hemiLength=S,R.numDirectionalShadows=A,R.numPointShadows=E,R.numSpotShadows=P,R.numSpotMaps=I,r.version=t9++)}function f(d,h){let p=0,g=0,y=0,x=0,w=0;const m=h.matrixWorldInverse;for(let _=0,S=d.length;_=a.length?(l=new MT(n,e),a.push(l)):l=a[o],l}function r(){t=new WeakMap}return{get:i,dispose:r}}class Gw extends Qn{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=DR,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 jw extends Qn{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}}const s9=`void main() { - gl_Position = vec4( position, 1.0 ); -}`,o9=`uniform sampler2D shadow_pass; -uniform vec2 resolution; -uniform float radius; -#include -void main() { - const float samples = float( VSM_SAMPLES ); - float mean = 0.0; - float squared_mean = 0.0; - float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); - float uvStart = samples <= 1.0 ? 0.0 : - 1.0; - for ( float i = 0.0; i < samples; i ++ ) { - float uvOffset = uvStart + i * uvStride; - #ifdef HORIZONTAL_PASS - vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); - mean += distribution.x; - squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; - #else - float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); - mean += depth; - squared_mean += depth * depth; - #endif - } - mean = mean / samples; - squared_mean = squared_mean / samples; - float std_dev = sqrt( squared_mean - mean * mean ); - gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function a9(n,e,t){let i=new Qg;const r=new Se,s=new Se,o=new Bt,a=new Gw({depthPacking:kR}),l=new jw,f={},d=t.maxTextureSize,h={[Zs]:Si,[Si]:Zs,[Fr]:Fr},p=new ds({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Se},radius:{value:4}},vertexShader:s9,fragmentShader:o9}),g=p.clone();g.defines.HORIZONTAL_PASS=1;const y=new St;y.setAttribute("position",new Xt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const x=new jn(y,p),w=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Tw,this.render=function(A,E,P){if(w.enabled===!1||w.autoUpdate===!1&&w.needsUpdate===!1||A.length===0)return;const I=n.getRenderTarget(),L=n.getActiveCubeFace(),C=n.getActiveMipmapLevel(),R=n.state;R.setBlending(Hs),R.buffers.color.setClear(1,1,1,1),R.buffers.depth.setTest(!0),R.setScissorTest(!1);for(let W=0,Z=A.length;Wd||r.y>d)&&(r.x>d&&(s.x=Math.floor(d/Y.x),r.x=s.x*Y.x,j.mapSize.x=s.x),r.y>d&&(s.y=Math.floor(d/Y.y),r.y=s.y*Y.y,j.mapSize.y=s.y)),j.map===null){const ne=this.type!==wc?{minFilter:_n,magFilter:_n}:{};j.map=new Gr(r.x,r.y,ne),j.map.texture.name=X.name+".shadowMap",j.camera.updateProjectionMatrix()}n.setRenderTarget(j.map),n.clear();const te=j.getViewportCount();for(let ne=0;ne0||E.map&&E.alphaTest>0){const R=L.uuid,W=E.uuid;let Z=f[R];Z===void 0&&(Z={},f[R]=Z);let X=Z[W];X===void 0&&(X=L.clone(),Z[W]=X),L=X}if(L.visible=E.visible,L.wireframe=E.wireframe,I===wc?L.side=E.shadowSide!==null?E.shadowSide:E.side:L.side=E.shadowSide!==null?E.shadowSide:h[E.side],L.alphaMap=E.alphaMap,L.alphaTest=E.alphaTest,L.map=E.map,L.clipShadows=E.clipShadows,L.clippingPlanes=E.clippingPlanes,L.clipIntersection=E.clipIntersection,L.displacementMap=E.displacementMap,L.displacementScale=E.displacementScale,L.displacementBias=E.displacementBias,L.wireframeLinewidth=E.wireframeLinewidth,L.linewidth=E.linewidth,P.isPointLight===!0&&L.isMeshDistanceMaterial===!0){const R=n.properties.get(L);R.light=P}return L}function S(A,E,P,I,L){if(A.visible===!1)return;if(A.layers.test(E.layers)&&(A.isMesh||A.isLine||A.isPoints)&&(A.castShadow||A.receiveShadow&&L===wc)&&(!A.frustumCulled||i.intersectsObject(A))){A.modelViewMatrix.multiplyMatrices(P.matrixWorldInverse,A.matrixWorld);const W=e.update(A),Z=A.material;if(Array.isArray(Z)){const X=W.groups;for(let j=0,Y=X.length;j=1):D.indexOf("OpenGL ES")!==-1&&(ne=parseFloat(/^OpenGL ES (\d)/.exec(D)[1]),te=ne>=2);let B=null,V={};const re=n.getParameter(3088),ee=n.getParameter(2978),ie=new Bt().fromArray(re),ce=new Bt().fromArray(ee);function be(q,ue,Ae){const Ie=new Uint8Array(4),Xe=n.createTexture();n.bindTexture(q,Xe),n.texParameteri(q,10241,9728),n.texParameteri(q,10240,9728);for(let Ue=0;Ue"u"?!1:/OculusBrowser/g.test(navigator.userAgent),y=new WeakMap;let x;const w=new WeakMap;let m=!1;try{m=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function _(z,k){return m?new OffscreenCanvas(z,k):ud("canvas")}function S(z,k,le,Ee){let Te=1;if((z.width>Ee||z.height>Ee)&&(Te=Ee/Math.max(z.width,z.height)),Te<1||k===!0)if(typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&z instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&z instanceof ImageBitmap){const Pe=k?zR:Math.floor,nt=Pe(Te*z.width),Oe=Pe(Te*z.height);x===void 0&&(x=_(nt,Oe));const he=le?_(nt,Oe):x;return he.width=nt,he.height=Oe,he.getContext("2d").drawImage(z,0,0,nt,Oe),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+z.width+"x"+z.height+") to ("+nt+"x"+Oe+")."),he}else return"data"in z&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+z.width+"x"+z.height+")."),z;return z}function A(z){return B_(z.width)&&B_(z.height)}function E(z){return a?!1:z.wrapS!==ui||z.wrapT!==ui||z.minFilter!==_n&&z.minFilter!==Sn}function P(z,k){return z.generateMipmaps&&k&&z.minFilter!==_n&&z.minFilter!==Sn}function I(z){n.generateMipmap(z)}function L(z,k,le,Ee,Te=!1){if(a===!1)return k;if(z!==null){if(n[z]!==void 0)return n[z];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+z+"'")}let Pe=k;return k===6403&&(le===5126&&(Pe=33326),le===5131&&(Pe=33325),le===5121&&(Pe=33321)),k===33319&&(le===5126&&(Pe=33328),le===5131&&(Pe=33327),le===5121&&(Pe=33323)),k===6408&&(le===5126&&(Pe=34836),le===5131&&(Pe=34842),le===5121&&(Pe=Ee===Wt&&Te===!1?35907:32856),le===32819&&(Pe=32854),le===32820&&(Pe=32855)),(Pe===33325||Pe===33326||Pe===33327||Pe===33328||Pe===34842||Pe===34836)&&e.get("EXT_color_buffer_float"),Pe}function C(z,k,le){return P(z,le)===!0||z.isFramebufferTexture&&z.minFilter!==_n&&z.minFilter!==Sn?Math.log2(Math.max(k.width,k.height))+1:z.mipmaps!==void 0&&z.mipmaps.length>0?z.mipmaps.length:z.isCompressedTexture&&Array.isArray(z.image)?k.mipmaps.length:1}function R(z){return z===_n||z===dg||z===Cf?9728:9729}function W(z){const k=z.target;k.removeEventListener("dispose",W),X(k),k.isVideoTexture&&y.delete(k)}function Z(z){const k=z.target;k.removeEventListener("dispose",Z),Y(k)}function X(z){const k=i.get(z);if(k.__webglInit===void 0)return;const le=z.source,Ee=w.get(le);if(Ee){const Te=Ee[k.__cacheKey];Te.usedTimes--,Te.usedTimes===0&&j(z),Object.keys(Ee).length===0&&w.delete(le)}i.remove(z)}function j(z){const k=i.get(z);n.deleteTexture(k.__webglTexture);const le=z.source,Ee=w.get(le);delete Ee[k.__cacheKey],o.memory.textures--}function Y(z){const k=z.texture,le=i.get(z),Ee=i.get(k);if(Ee.__webglTexture!==void 0&&(n.deleteTexture(Ee.__webglTexture),o.memory.textures--),z.depthTexture&&z.depthTexture.dispose(),z.isWebGLCubeRenderTarget)for(let Te=0;Te<6;Te++)n.deleteFramebuffer(le.__webglFramebuffer[Te]),le.__webglDepthbuffer&&n.deleteRenderbuffer(le.__webglDepthbuffer[Te]);else{if(n.deleteFramebuffer(le.__webglFramebuffer),le.__webglDepthbuffer&&n.deleteRenderbuffer(le.__webglDepthbuffer),le.__webglMultisampledFramebuffer&&n.deleteFramebuffer(le.__webglMultisampledFramebuffer),le.__webglColorRenderbuffer)for(let Te=0;Te=l&&console.warn("THREE.WebGLTextures: Trying to use "+z+" texture units while this GPU supports only "+l),te+=1,z}function B(z){const k=[];return k.push(z.wrapS),k.push(z.wrapT),k.push(z.wrapR||0),k.push(z.magFilter),k.push(z.minFilter),k.push(z.anisotropy),k.push(z.internalFormat),k.push(z.format),k.push(z.type),k.push(z.generateMipmaps),k.push(z.premultiplyAlpha),k.push(z.flipY),k.push(z.unpackAlignment),k.push(z.encoding),k.join()}function V(z,k){const le=i.get(z);if(z.isVideoTexture&&He(z),z.isRenderTargetTexture===!1&&z.version>0&&le.__version!==z.version){const Ee=z.image;if(Ee===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Ee.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Fe(le,z,k);return}}t.bindTexture(3553,le.__webglTexture,33984+k)}function re(z,k){const le=i.get(z);if(z.version>0&&le.__version!==z.version){Fe(le,z,k);return}t.bindTexture(35866,le.__webglTexture,33984+k)}function ee(z,k){const le=i.get(z);if(z.version>0&&le.__version!==z.version){Fe(le,z,k);return}t.bindTexture(32879,le.__webglTexture,33984+k)}function ie(z,k){const le=i.get(z);if(z.version>0&&le.__version!==z.version){Be(le,z,k);return}t.bindTexture(34067,le.__webglTexture,33984+k)}const ce={[rd]:10497,[ui]:33071,[sd]:33648},be={[_n]:9728,[dg]:9984,[Cf]:9986,[Sn]:9729,[Iw]:9985,[Ko]:9987};function ge(z,k,le){if(le?(n.texParameteri(z,10242,ce[k.wrapS]),n.texParameteri(z,10243,ce[k.wrapT]),(z===32879||z===35866)&&n.texParameteri(z,32882,ce[k.wrapR]),n.texParameteri(z,10240,be[k.magFilter]),n.texParameteri(z,10241,be[k.minFilter])):(n.texParameteri(z,10242,33071),n.texParameteri(z,10243,33071),(z===32879||z===35866)&&n.texParameteri(z,32882,33071),(k.wrapS!==ui||k.wrapT!==ui)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),n.texParameteri(z,10240,R(k.magFilter)),n.texParameteri(z,10241,R(k.minFilter)),k.minFilter!==_n&&k.minFilter!==Sn&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),e.has("EXT_texture_filter_anisotropic")===!0){const Ee=e.get("EXT_texture_filter_anisotropic");if(k.magFilter===_n||k.minFilter!==Cf&&k.minFilter!==Ko||k.type===zs&&e.has("OES_texture_float_linear")===!1||a===!1&&k.type===qc&&e.has("OES_texture_half_float_linear")===!1)return;(k.anisotropy>1||i.get(k).__currentAnisotropy)&&(n.texParameterf(z,Ee.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(k.anisotropy,r.getMaxAnisotropy())),i.get(k).__currentAnisotropy=k.anisotropy)}}function Q(z,k){let le=!1;z.__webglInit===void 0&&(z.__webglInit=!0,k.addEventListener("dispose",W));const Ee=k.source;let Te=w.get(Ee);Te===void 0&&(Te={},w.set(Ee,Te));const Pe=B(k);if(Pe!==z.__cacheKey){Te[Pe]===void 0&&(Te[Pe]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,le=!0),Te[Pe].usedTimes++;const nt=Te[z.__cacheKey];nt!==void 0&&(Te[z.__cacheKey].usedTimes--,nt.usedTimes===0&&j(k)),z.__cacheKey=Pe,z.__webglTexture=Te[Pe].texture}return le}function Fe(z,k,le){let Ee=3553;(k.isDataArrayTexture||k.isCompressedArrayTexture)&&(Ee=35866),k.isData3DTexture&&(Ee=32879);const Te=Q(z,k),Pe=k.source;t.bindTexture(Ee,z.__webglTexture,33984+le);const nt=i.get(Pe);if(Pe.version!==nt.__version||Te===!0){t.activeTexture(33984+le),n.pixelStorei(37440,k.flipY),n.pixelStorei(37441,k.premultiplyAlpha),n.pixelStorei(3317,k.unpackAlignment),n.pixelStorei(37443,0);const Oe=E(k)&&A(k.image)===!1;let he=S(k.image,Oe,!1,d);he=pt(k,he);const je=A(he)||a,G=s.convert(k.format,k.encoding);let de=s.convert(k.type),ye=L(k.internalFormat,G,de,k.encoding,k.isVideoTexture);ge(Ee,k,je);let Ce;const tt=k.mipmaps,ut=a&&k.isVideoTexture!==!0,Lt=nt.__version===void 0||Te===!0,q=C(k,he,je);if(k.isDepthTexture)ye=6402,a?k.type===zs?ye=36012:k.type===Lo?ye=33190:k.type===Za?ye=35056:ye=33189:k.type===zs&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),k.format===Go&&ye===6402&&k.type!==Dw&&k.type!==Lo&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),k.type=Lo,de=s.convert(k.type)),k.format===al&&ye===6402&&(ye=34041,k.type!==Za&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),k.type=Za,de=s.convert(k.type))),Lt&&(ut?t.texStorage2D(3553,1,ye,he.width,he.height):t.texImage2D(3553,0,ye,he.width,he.height,0,G,de,null));else if(k.isDataTexture)if(tt.length>0&&je){ut&&Lt&&t.texStorage2D(3553,q,ye,tt[0].width,tt[0].height);for(let ue=0,Ae=tt.length;ue>=1,Ae>>=1}}else if(tt.length>0&&je){ut&&Lt&&t.texStorage2D(3553,q,ye,tt[0].width,tt[0].height);for(let ue=0,Ae=tt.length;ue0&&Lt++,t.texStorage2D(34067,Lt,Ce,he[0].width,he[0].height));for(let ue=0;ue<6;ue++)if(Oe){tt?t.texSubImage2D(34069+ue,0,0,0,he[ue].width,he[ue].height,de,ye,he[ue].data):t.texImage2D(34069+ue,0,Ce,he[ue].width,he[ue].height,0,de,ye,he[ue].data);for(let Ae=0;Ae=34069&&Te<=34074)&&n.framebufferTexture2D(36160,Ee,Te,i.get(le).__webglTexture,0),t.bindFramebuffer(36160,null)}function Me(z,k,le){if(n.bindRenderbuffer(36161,z),k.depthBuffer&&!k.stencilBuffer){let Ee=33189;if(le||Ge(k)){const Te=k.depthTexture;Te&&Te.isDepthTexture&&(Te.type===zs?Ee=36012:Te.type===Lo&&(Ee=33190));const Pe=Je(k);Ge(k)?p.renderbufferStorageMultisampleEXT(36161,Pe,Ee,k.width,k.height):n.renderbufferStorageMultisample(36161,Pe,Ee,k.width,k.height)}else n.renderbufferStorage(36161,Ee,k.width,k.height);n.framebufferRenderbuffer(36160,36096,36161,z)}else if(k.depthBuffer&&k.stencilBuffer){const Ee=Je(k);le&&Ge(k)===!1?n.renderbufferStorageMultisample(36161,Ee,35056,k.width,k.height):Ge(k)?p.renderbufferStorageMultisampleEXT(36161,Ee,35056,k.width,k.height):n.renderbufferStorage(36161,34041,k.width,k.height),n.framebufferRenderbuffer(36160,33306,36161,z)}else{const Ee=k.isWebGLMultipleRenderTargets===!0?k.texture:[k.texture];for(let Te=0;Te0&&Ge(z)===!1){const Oe=Pe?k:[k];le.__webglMultisampledFramebuffer=n.createFramebuffer(),le.__webglColorRenderbuffer=[],t.bindFramebuffer(36160,le.__webglMultisampledFramebuffer);for(let he=0;he0&&Ge(z)===!1){const k=z.isWebGLMultipleRenderTargets?z.texture:[z.texture],le=z.width,Ee=z.height;let Te=16384;const Pe=[],nt=z.stencilBuffer?33306:36096,Oe=i.get(z),he=z.isWebGLMultipleRenderTargets===!0;if(he)for(let je=0;je0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&k.__useRenderToTexture!==!1}function He(z){const k=o.render.frame;y.get(z)!==k&&(y.set(z,k),z.update())}function pt(z,k){const le=z.encoding,Ee=z.format,Te=z.type;return z.isCompressedTexture===!0||z.isVideoTexture===!0||z.format===hg||le!==$s&&(le===Wt?a===!1?e.has("EXT_sRGB")===!0&&Ee===qi?(z.format=hg,z.minFilter=Sn,z.generateMipmaps=!1):k=Uw.sRGBToLinear(k):(Ee!==qi||Te!==Qo)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",le)),k}this.allocateTextureUnit=D,this.resetTextureUnits=ne,this.setTexture2D=V,this.setTexture2DArray=re,this.setTexture3D=ee,this.setTextureCube=ie,this.rebindTextures=we,this.setupRenderTarget=Ne,this.updateRenderTargetMipmap=Le,this.updateMultisampleRenderTarget=Ye,this.setupDepthRenderbuffer=oe,this.setupFrameBufferTexture=_e,this.useMultisampledRTT=Ge}function ZR(n,e,t){const i=t.isWebGL2;function r(s,o=null){let a;if(s===Qo)return 5121;if(s===yR)return 32819;if(s===xR)return 32820;if(s===mR)return 5120;if(s===gR)return 5122;if(s===Dw)return 5123;if(s===vR)return 5124;if(s===Lo)return 5125;if(s===zs)return 5126;if(s===qc)return i?5131:(a=e.get("OES_texture_half_float"),a!==null?a.HALF_FLOAT_OES:null);if(s===_R)return 6406;if(s===qi)return 6408;if(s===wR)return 6409;if(s===SR)return 6410;if(s===Go)return 6402;if(s===al)return 34041;if(s===hg)return a=e.get("EXT_sRGB"),a!==null?a.SRGB_ALPHA_EXT:null;if(s===MR)return 6403;if(s===AR)return 36244;if(s===bR)return 33319;if(s===ER)return 33320;if(s===TR)return 36249;if(s===xm||s===_m||s===wm||s===Sm)if(o===Wt)if(a=e.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(s===xm)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(s===_m)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(s===wm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(s===Sm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=e.get("WEBGL_compressed_texture_s3tc"),a!==null){if(s===xm)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(s===_m)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(s===wm)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(s===Sm)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(s===g_||s===v_||s===y_||s===x_)if(a=e.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(s===g_)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(s===v_)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(s===y_)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(s===x_)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(s===CR)return a=e.get("WEBGL_compressed_texture_etc1"),a!==null?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(s===__||s===w_)if(a=e.get("WEBGL_compressed_texture_etc"),a!==null){if(s===__)return o===Wt?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(s===w_)return o===Wt?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(s===S_||s===M_||s===A_||s===b_||s===E_||s===T_||s===C_||s===P_||s===L_||s===R_||s===I_||s===D_||s===k_||s===N_)if(a=e.get("WEBGL_compressed_texture_astc"),a!==null){if(s===S_)return o===Wt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(s===M_)return o===Wt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(s===A_)return o===Wt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(s===b_)return o===Wt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(s===E_)return o===Wt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(s===T_)return o===Wt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(s===C_)return o===Wt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(s===P_)return o===Wt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(s===L_)return o===Wt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(s===R_)return o===Wt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(s===I_)return o===Wt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(s===D_)return o===Wt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(s===k_)return o===Wt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(s===N_)return o===Wt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(s===Mm)if(a=e.get("EXT_texture_compression_bptc"),a!==null){if(s===Mm)return o===Wt?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT}else return null;if(s===PR||s===O_||s===U_||s===z_)if(a=e.get("EXT_texture_compression_rgtc"),a!==null){if(s===Mm)return a.COMPRESSED_RED_RGTC1_EXT;if(s===O_)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(s===U_)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(s===z_)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return s===Za?i?34042:(a=e.get("WEBGL_depth_texture"),a!==null?a.UNSIGNED_INT_24_8_WEBGL:null):n[s]!==void 0?n[s]:null}return{convert:r}}class $R extends qt{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class Ac extends Dt{constructor(){super(),this.isGroup=!0,this.type="Group"}}const u9={type:"move"};class Ay{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Ac,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Ac,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new O,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new O),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Ac,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new O,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new O),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const i of e.hand.values())this._getHandJoint(t,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,i){let r=null,s=null,o=null;const a=this._targetRay,l=this._grip,f=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(f&&e.hand){o=!0;for(const x of e.hand.values()){const w=t.getJointPose(x,i),m=this._getHandJoint(f,x);w!==null&&(m.matrix.fromArray(w.transform.matrix),m.matrix.decompose(m.position,m.rotation,m.scale),m.jointRadius=w.radius),m.visible=w!==null}const d=f.joints["index-finger-tip"],h=f.joints["thumb-tip"],p=d.position.distanceTo(h.position),g=.02,y=.005;f.inputState.pinching&&p>g+y?(f.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!f.inputState.pinching&&p<=g-y&&(f.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(s=t.getPose(e.gripSpace,i),s!==null&&(l.matrix.fromArray(s.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),s.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(s.linearVelocity)):l.hasLinearVelocity=!1,s.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(s.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(r=t.getPose(e.targetRaySpace,i),r===null&&s!==null&&(r=s),r!==null&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(u9)))}return a!==null&&(a.visible=r!==null),l!==null&&(l.visible=s!==null),f!==null&&(f.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const i=new Ac;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}class JR extends gn{constructor(e,t,i,r,s,o,a,l,f,d){if(d=d!==void 0?d:Go,d!==Go&&d!==al)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&d===Go&&(i=Lo),i===void 0&&d===al&&(i=Za),super(null,r,s,o,a,l,d,i,f),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=a!==void 0?a:_n,this.minFilter=l!==void 0?l:_n,this.flipY=!1,this.generateMipmaps=!1}}class f9 extends hs{constructor(e,t){super();const i=this;let r=null,s=1,o=null,a="local-floor",l=1,f=null,d=null,h=null,p=null,g=null,y=null;const x=t.getContextAttributes();let w=null,m=null;const _=[],S=[],A=new Set,E=new Map,P=new qt;P.layers.enable(1),P.viewport=new Bt;const I=new qt;I.layers.enable(2),I.viewport=new Bt;const L=[P,I],C=new $R;C.layers.enable(1),C.layers.enable(2);let R=null,W=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ie){let ce=_[ie];return ce===void 0&&(ce=new Ay,_[ie]=ce),ce.getTargetRaySpace()},this.getControllerGrip=function(ie){let ce=_[ie];return ce===void 0&&(ce=new Ay,_[ie]=ce),ce.getGripSpace()},this.getHand=function(ie){let ce=_[ie];return ce===void 0&&(ce=new Ay,_[ie]=ce),ce.getHandSpace()};function Z(ie){const ce=S.indexOf(ie.inputSource);if(ce===-1)return;const be=_[ce];be!==void 0&&be.dispatchEvent({type:ie.type,data:ie.inputSource})}function X(){r.removeEventListener("select",Z),r.removeEventListener("selectstart",Z),r.removeEventListener("selectend",Z),r.removeEventListener("squeeze",Z),r.removeEventListener("squeezestart",Z),r.removeEventListener("squeezeend",Z),r.removeEventListener("end",X),r.removeEventListener("inputsourceschange",j);for(let ie=0;ie<_.length;ie++){const ce=S[ie];ce!==null&&(S[ie]=null,_[ie].disconnect(ce))}R=null,W=null,e.setRenderTarget(w),g=null,p=null,h=null,r=null,m=null,ee.stop(),i.isPresenting=!1,i.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(ie){s=ie,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(ie){a=ie,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return f||o},this.setReferenceSpace=function(ie){f=ie},this.getBaseLayer=function(){return p!==null?p:g},this.getBinding=function(){return h},this.getFrame=function(){return y},this.getSession=function(){return r},this.setSession=async function(ie){if(r=ie,r!==null){if(w=e.getRenderTarget(),r.addEventListener("select",Z),r.addEventListener("selectstart",Z),r.addEventListener("selectend",Z),r.addEventListener("squeeze",Z),r.addEventListener("squeezestart",Z),r.addEventListener("squeezeend",Z),r.addEventListener("end",X),r.addEventListener("inputsourceschange",j),x.xrCompatible!==!0&&await t.makeXRCompatible(),r.renderState.layers===void 0||e.capabilities.isWebGL2===!1){const ce={antialias:r.renderState.layers===void 0?x.antialias:!0,alpha:x.alpha,depth:x.depth,stencil:x.stencil,framebufferScaleFactor:s};g=new XRWebGLLayer(r,t,ce),r.updateRenderState({baseLayer:g}),m=new Gr(g.framebufferWidth,g.framebufferHeight,{format:qi,type:Qo,encoding:e.outputEncoding,stencilBuffer:x.stencil})}else{let ce=null,be=null,ge=null;x.depth&&(ge=x.stencil?35056:33190,ce=x.stencil?al:Go,be=x.stencil?Za:Lo);const Q={colorFormat:32856,depthFormat:ge,scaleFactor:s};h=new XRWebGLBinding(r,t),p=h.createProjectionLayer(Q),r.updateRenderState({layers:[p]}),m=new Gr(p.textureWidth,p.textureHeight,{format:qi,type:Qo,depthTexture:new JR(p.textureWidth,p.textureHeight,be,void 0,void 0,void 0,void 0,void 0,void 0,ce),stencilBuffer:x.stencil,encoding:e.outputEncoding,samples:x.antialias?4:0});const Fe=e.properties.get(m);Fe.__ignoreDepthValues=p.ignoreDepthValues}m.isXRRenderTarget=!0,this.setFoveation(l),f=null,o=await r.requestReferenceSpace(a),ee.setContext(r),ee.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}};function j(ie){for(let ce=0;ce=0&&(S[ge]=null,_[ge].disconnect(be))}for(let ce=0;ce=S.length){S.push(be),ge=Fe;break}else if(S[Fe]===null){S[Fe]=be,ge=Fe;break}if(ge===-1)break}const Q=_[ge];Q&&Q.connect(be)}}const Y=new O,te=new O;function ne(ie,ce,be){Y.setFromMatrixPosition(ce.matrixWorld),te.setFromMatrixPosition(be.matrixWorld);const ge=Y.distanceTo(te),Q=ce.projectionMatrix.elements,Fe=be.projectionMatrix.elements,Be=Q[14]/(Q[10]-1),_e=Q[14]/(Q[10]+1),Me=(Q[9]+1)/Q[5],ve=(Q[9]-1)/Q[5],oe=(Q[8]-1)/Q[0],we=(Fe[8]+1)/Fe[0],Ne=Be*oe,Le=Be*we,Ye=ge/(-oe+we),Je=Ye*-oe;ce.matrixWorld.decompose(ie.position,ie.quaternion,ie.scale),ie.translateX(Je),ie.translateZ(Ye),ie.matrixWorld.compose(ie.position,ie.quaternion,ie.scale),ie.matrixWorldInverse.copy(ie.matrixWorld).invert();const Ge=Be+Ye,He=_e+Ye,pt=Ne-Je,z=Le+(ge-Je),k=Me*_e/He*Ge,le=ve*_e/He*Ge;ie.projectionMatrix.makePerspective(pt,z,k,le,Ge,He),ie.projectionMatrixInverse.copy(ie.projectionMatrix).invert()}function D(ie,ce){ce===null?ie.matrixWorld.copy(ie.matrix):ie.matrixWorld.multiplyMatrices(ce.matrixWorld,ie.matrix),ie.matrixWorldInverse.copy(ie.matrixWorld).invert()}this.updateCamera=function(ie){if(r===null)return;C.near=I.near=P.near=ie.near,C.far=I.far=P.far=ie.far,(R!==C.near||W!==C.far)&&(r.updateRenderState({depthNear:C.near,depthFar:C.far}),R=C.near,W=C.far);const ce=ie.parent,be=C.cameras;D(C,ce);for(let ge=0;geQ&&(E.set(ge,ge.lastChangedTime),i.dispatchEvent({type:"planechanged",data:ge}))}}y=null}const ee=new GR;ee.setAnimationLoop(re),this.setAnimationLoop=function(ie){V=ie},this.dispose=function(){}}}function d9(n,e){function t(w,m){w.matrixAutoUpdate===!0&&w.updateMatrix(),m.value.copy(w.matrix)}function i(w,m){m.color.getRGB(w.fogColor.value,HR(n)),m.isFog?(w.fogNear.value=m.near,w.fogFar.value=m.far):m.isFogExp2&&(w.fogDensity.value=m.density)}function r(w,m,_,S,A){m.isMeshBasicMaterial||m.isMeshLambertMaterial?s(w,m):m.isMeshToonMaterial?(s(w,m),h(w,m)):m.isMeshPhongMaterial?(s(w,m),d(w,m)):m.isMeshStandardMaterial?(s(w,m),p(w,m),m.isMeshPhysicalMaterial&&g(w,m,A)):m.isMeshMatcapMaterial?(s(w,m),y(w,m)):m.isMeshDepthMaterial?s(w,m):m.isMeshDistanceMaterial?(s(w,m),x(w,m)):m.isMeshNormalMaterial?s(w,m):m.isLineBasicMaterial?(o(w,m),m.isLineDashedMaterial&&a(w,m)):m.isPointsMaterial?l(w,m,_,S):m.isSpriteMaterial?f(w,m):m.isShadowMaterial?(w.color.value.copy(m.color),w.opacity.value=m.opacity):m.isShaderMaterial&&(m.uniformsNeedUpdate=!1)}function s(w,m){w.opacity.value=m.opacity,m.color&&w.diffuse.value.copy(m.color),m.emissive&&w.emissive.value.copy(m.emissive).multiplyScalar(m.emissiveIntensity),m.map&&(w.map.value=m.map,t(m.map,w.mapTransform)),m.alphaMap&&(w.alphaMap.value=m.alphaMap,t(m.alphaMap,w.alphaMapTransform)),m.bumpMap&&(w.bumpMap.value=m.bumpMap,t(m.bumpMap,w.bumpMapTransform),w.bumpScale.value=m.bumpScale,m.side===Si&&(w.bumpScale.value*=-1)),m.normalMap&&(w.normalMap.value=m.normalMap,t(m.normalMap,w.normalMapTransform),w.normalScale.value.copy(m.normalScale),m.side===Si&&w.normalScale.value.negate()),m.displacementMap&&(w.displacementMap.value=m.displacementMap,t(m.displacementMap,w.displacementMapTransform),w.displacementScale.value=m.displacementScale,w.displacementBias.value=m.displacementBias),m.emissiveMap&&(w.emissiveMap.value=m.emissiveMap,t(m.emissiveMap,w.emissiveMapTransform)),m.specularMap&&(w.specularMap.value=m.specularMap,t(m.specularMap,w.specularMapTransform)),m.alphaTest>0&&(w.alphaTest.value=m.alphaTest);const _=e.get(m).envMap;if(_&&(w.envMap.value=_,w.flipEnvMap.value=_.isCubeTexture&&_.isRenderTargetTexture===!1?-1:1,w.reflectivity.value=m.reflectivity,w.ior.value=m.ior,w.refractionRatio.value=m.refractionRatio),m.lightMap){w.lightMap.value=m.lightMap;const S=n.useLegacyLights===!0?Math.PI:1;w.lightMapIntensity.value=m.lightMapIntensity*S,t(m.lightMap,w.lightMapTransform)}m.aoMap&&(w.aoMap.value=m.aoMap,w.aoMapIntensity.value=m.aoMapIntensity,t(m.aoMap,w.aoMapTransform))}function o(w,m){w.diffuse.value.copy(m.color),w.opacity.value=m.opacity,m.map&&(w.map.value=m.map,t(m.map,w.mapTransform))}function a(w,m){w.dashSize.value=m.dashSize,w.totalSize.value=m.dashSize+m.gapSize,w.scale.value=m.scale}function l(w,m,_,S){w.diffuse.value.copy(m.color),w.opacity.value=m.opacity,w.size.value=m.size*_,w.scale.value=S*.5,m.map&&(w.map.value=m.map,t(m.map,w.uvTransform)),m.alphaMap&&(w.alphaMap.value=m.alphaMap),m.alphaTest>0&&(w.alphaTest.value=m.alphaTest)}function f(w,m){w.diffuse.value.copy(m.color),w.opacity.value=m.opacity,w.rotation.value=m.rotation,m.map&&(w.map.value=m.map,t(m.map,w.mapTransform)),m.alphaMap&&(w.alphaMap.value=m.alphaMap),m.alphaTest>0&&(w.alphaTest.value=m.alphaTest)}function d(w,m){w.specular.value.copy(m.specular),w.shininess.value=Math.max(m.shininess,1e-4)}function h(w,m){m.gradientMap&&(w.gradientMap.value=m.gradientMap)}function p(w,m){w.metalness.value=m.metalness,m.metalnessMap&&(w.metalnessMap.value=m.metalnessMap,t(m.metalnessMap,w.metalnessMapTransform)),w.roughness.value=m.roughness,m.roughnessMap&&(w.roughnessMap.value=m.roughnessMap,t(m.roughnessMap,w.roughnessMapTransform)),e.get(m).envMap&&(w.envMapIntensity.value=m.envMapIntensity)}function g(w,m,_){w.ior.value=m.ior,m.sheen>0&&(w.sheenColor.value.copy(m.sheenColor).multiplyScalar(m.sheen),w.sheenRoughness.value=m.sheenRoughness,m.sheenColorMap&&(w.sheenColorMap.value=m.sheenColorMap,t(m.sheenColorMap,w.sheenColorMapTransform)),m.sheenRoughnessMap&&(w.sheenRoughnessMap.value=m.sheenRoughnessMap,t(m.sheenRoughnessMap,w.sheenRoughnessMapTransform))),m.clearcoat>0&&(w.clearcoat.value=m.clearcoat,w.clearcoatRoughness.value=m.clearcoatRoughness,m.clearcoatMap&&(w.clearcoatMap.value=m.clearcoatMap,t(m.clearcoatMap,w.clearcoatMapTransform)),m.clearcoatRoughnessMap&&(w.clearcoatRoughnessMap.value=m.clearcoatRoughnessMap,t(m.clearcoatRoughnessMap,w.clearcoatRoughnessMapTransform)),m.clearcoatNormalMap&&(w.clearcoatNormalMap.value=m.clearcoatNormalMap,t(m.clearcoatNormalMap,w.clearcoatNormalMapTransform),w.clearcoatNormalScale.value.copy(m.clearcoatNormalScale),m.side===Si&&w.clearcoatNormalScale.value.negate())),m.iridescence>0&&(w.iridescence.value=m.iridescence,w.iridescenceIOR.value=m.iridescenceIOR,w.iridescenceThicknessMinimum.value=m.iridescenceThicknessRange[0],w.iridescenceThicknessMaximum.value=m.iridescenceThicknessRange[1],m.iridescenceMap&&(w.iridescenceMap.value=m.iridescenceMap,t(m.iridescenceMap,w.iridescenceMapTransform)),m.iridescenceThicknessMap&&(w.iridescenceThicknessMap.value=m.iridescenceThicknessMap,t(m.iridescenceThicknessMap,w.iridescenceThicknessMapTransform))),m.transmission>0&&(w.transmission.value=m.transmission,w.transmissionSamplerMap.value=_.texture,w.transmissionSamplerSize.value.set(_.width,_.height),m.transmissionMap&&(w.transmissionMap.value=m.transmissionMap,t(m.transmissionMap,w.transmissionMapTransform)),w.thickness.value=m.thickness,m.thicknessMap&&(w.thicknessMap.value=m.thicknessMap,t(m.thicknessMap,w.thicknessMapTransform)),w.attenuationDistance.value=m.attenuationDistance,w.attenuationColor.value.copy(m.attenuationColor)),w.specularIntensity.value=m.specularIntensity,w.specularColor.value.copy(m.specularColor),m.specularColorMap&&(w.specularColorMap.value=m.specularColorMap,t(m.specularColorMap,w.specularColorMapTransform)),m.specularIntensityMap&&(w.specularIntensityMap.value=m.specularIntensityMap,t(m.specularIntensityMap,w.specularIntensityMapTransform))}function y(w,m){m.matcap&&(w.matcap.value=m.matcap)}function x(w,m){const _=e.get(m).light;w.referencePosition.value.setFromMatrixPosition(_.matrixWorld),w.nearDistance.value=_.shadow.camera.near,w.farDistance.value=_.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:r}}function h9(n,e,t,i){let r={},s={},o=[];const a=t.isWebGL2?n.getParameter(35375):0;function l(_,S){const A=S.program;i.uniformBlockBinding(_,A)}function f(_,S){let A=r[_.id];A===void 0&&(y(_),A=d(_),r[_.id]=A,_.addEventListener("dispose",w));const E=S.program;i.updateUBOMapping(_,E);const P=e.render.frame;s[_.id]!==P&&(p(_),s[_.id]=P)}function d(_){const S=h();_.__bindingPointIndex=S;const A=n.createBuffer(),E=_.__size,P=_.usage;return n.bindBuffer(35345,A),n.bufferData(35345,E,P),n.bindBuffer(35345,null),n.bindBufferBase(35345,S,A),A}function h(){for(let _=0;_0){P=A%E;const Z=E-P;P!==0&&Z-R.boundary<0&&(A+=E-P,C.__offset=A)}A+=R.storage}return P=A%E,P>0&&(A+=E-P),_.__size=A,_.__cache={},this}function x(_){const S={boundary:0,storage:0};return typeof _=="number"?(S.boundary=4,S.storage=4):_.isVector2?(S.boundary=8,S.storage=8):_.isVector3||_.isColor?(S.boundary=16,S.storage=12):_.isVector4?(S.boundary=16,S.storage=16):_.isMatrix3?(S.boundary=48,S.storage=48):_.isMatrix4?(S.boundary=64,S.storage=64):_.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",_),S}function w(_){const S=_.target;S.removeEventListener("dispose",w);const A=o.indexOf(S.__bindingPointIndex);o.splice(A,1),n.deleteBuffer(r[S.id]),delete r[S.id],delete s[S.id]}function m(){for(const _ in r)n.deleteBuffer(r[_]);o=[],r={},s={}}return{bind:l,update:f,dispose:m}}function p9(){const n=ud("canvas");return n.style.display="block",n}class Xw{constructor(e={}){const{canvas:t=p9(),context:i=null,depth:r=!0,stencil:s=!0,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:f=!1,powerPreference:d="default",failIfMajorPerformanceCaveat:h=!1}=e;this.isWebGLRenderer=!0;let p;i!==null?p=i.getContextAttributes().alpha:p=o;let g=null,y=null;const x=[],w=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=$s,this.useLegacyLights=!0,this.toneMapping=Hr,this.toneMappingExposure=1;const m=this;let _=!1,S=0,A=0,E=null,P=-1,I=null;const L=new Bt,C=new Bt;let R=null,W=t.width,Z=t.height,X=1,j=null,Y=null;const te=new Bt(0,0,W,Z),ne=new Bt(0,0,W,Z);let D=!1;const B=new Qg;let V=!1,re=!1,ee=null;const ie=new gt,ce=new O,be={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function ge(){return E===null?X:1}let Q=i;function Fe(U,K){for(let pe=0;pe0?y=w[w.length-1]:y=null,x.pop(),x.length>0?g=x[x.length-1]:g=null};function kt(U,K,pe,se){if(U.visible===!1)return;if(U.layers.test(K.layers)){if(U.isGroup)pe=U.renderOrder;else if(U.isLOD)U.autoUpdate===!0&&U.update(K);else if(U.isLight)y.pushLight(U),U.castShadow&&y.pushShadow(U);else if(U.isSprite){if(!U.frustumCulled||B.intersectsSprite(U)){se&&ce.setFromMatrixPosition(U.matrixWorld).applyMatrix4(ie);const ct=Ge.update(U),ft=U.material;ft.visible&&g.push(U,ct,ft,pe,ce.z,null)}}else if((U.isMesh||U.isLine||U.isPoints)&&(U.isSkinnedMesh&&U.skeleton.frame!==ve.render.frame&&(U.skeleton.update(),U.skeleton.frame=ve.render.frame),!U.frustumCulled||B.intersectsObject(U))){se&&ce.setFromMatrixPosition(U.matrixWorld).applyMatrix4(ie);const ct=Ge.update(U),ft=U.material;if(Array.isArray(ft)){const Ke=ct.groups;for(let dt=0,vt=Ke.length;dt0&&De(xe,st,K,pe),se&&Me.viewport(L.copy(se)),xe.length>0&&it(xe,K,pe),st.length>0&&it(st,K,pe),ct.length>0&&it(ct,K,pe),Me.buffers.depth.setTest(!0),Me.buffers.depth.setMask(!0),Me.buffers.color.setMask(!0),Me.setPolygonOffset(!1)}function De(U,K,pe,se){if(ee===null){const ft=_e.isWebGL2;ee=new Gr(1024,1024,{generateMipmaps:!0,type:Be.has("EXT_color_buffer_half_float")?qc:Qo,minFilter:Ko,samples:ft&&a===!0?4:0})}const xe=m.getRenderTarget();m.setRenderTarget(ee),m.clear();const st=m.toneMapping;m.toneMapping=Hr,it(U,pe,se),we.updateMultisampleRenderTarget(ee),we.updateRenderTargetMipmap(ee);let ct=!1;for(let ft=0,Ke=K.length;ft0&&we.useMultisampledRTT(U)===!1?xe=oe.get(U).__webglMultisampledFramebuffer:xe=vt,L.copy(U.viewport),C.copy(U.scissor),R=U.scissorTest}else L.copy(te).multiplyScalar(X).floor(),C.copy(ne).multiplyScalar(X).floor(),R=D;if(Me.bindFramebuffer(36160,xe)&&_e.drawBuffers&&se&&Me.drawBuffers(U,xe),Me.viewport(L),Me.scissor(C),Me.setScissorTest(R),st){const Ke=oe.get(U.texture);Q.framebufferTexture2D(36160,36064,34069+K,Ke.__webglTexture,pe)}else if(ct){const Ke=oe.get(U.texture),dt=K||0;Q.framebufferTextureLayer(36160,36064,Ke.__webglTexture,pe||0,dt)}P=-1},this.readRenderTargetPixels=function(U,K,pe,se,xe,st,ct){if(!(U&&U.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let ft=oe.get(U).__webglFramebuffer;if(U.isWebGLCubeRenderTarget&&ct!==void 0&&(ft=ft[ct]),ft){Me.bindFramebuffer(36160,ft);try{const Ke=U.texture,dt=Ke.format,vt=Ke.type;if(dt!==qi&&he.convert(dt)!==Q.getParameter(35739)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const mt=vt===qc&&(Be.has("EXT_color_buffer_half_float")||_e.isWebGL2&&Be.has("EXT_color_buffer_float"));if(vt!==Qo&&he.convert(vt)!==Q.getParameter(35738)&&!(vt===zs&&(_e.isWebGL2||Be.has("OES_texture_float")||Be.has("WEBGL_color_buffer_float")))&&!mt){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}K>=0&&K<=U.width-se&&pe>=0&&pe<=U.height-xe&&Q.readPixels(K,pe,se,xe,he.convert(dt),he.convert(vt),st)}finally{const Ke=E!==null?oe.get(E).__webglFramebuffer:null;Me.bindFramebuffer(36160,Ke)}}},this.copyFramebufferToTexture=function(U,K,pe=0){const se=Math.pow(2,-pe),xe=Math.floor(K.image.width*se),st=Math.floor(K.image.height*se);we.setTexture2D(K,0),Q.copyTexSubImage2D(3553,pe,0,0,U.x,U.y,xe,st),Me.unbindTexture()},this.copyTextureToTexture=function(U,K,pe,se=0){const xe=K.image.width,st=K.image.height,ct=he.convert(pe.format),ft=he.convert(pe.type);we.setTexture2D(pe,0),Q.pixelStorei(37440,pe.flipY),Q.pixelStorei(37441,pe.premultiplyAlpha),Q.pixelStorei(3317,pe.unpackAlignment),K.isDataTexture?Q.texSubImage2D(3553,se,U.x,U.y,xe,st,ct,ft,K.image.data):K.isCompressedTexture?Q.compressedTexSubImage2D(3553,se,U.x,U.y,K.mipmaps[0].width,K.mipmaps[0].height,ct,K.mipmaps[0].data):Q.texSubImage2D(3553,se,U.x,U.y,ct,ft,K.image),se===0&&pe.generateMipmaps&&Q.generateMipmap(3553),Me.unbindTexture()},this.copyTextureToTexture3D=function(U,K,pe,se,xe=0){if(m.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const st=U.max.x-U.min.x+1,ct=U.max.y-U.min.y+1,ft=U.max.z-U.min.z+1,Ke=he.convert(se.format),dt=he.convert(se.type);let vt;if(se.isData3DTexture)we.setTexture3D(se,0),vt=32879;else if(se.isDataArrayTexture)we.setTexture2DArray(se,0),vt=35866;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}Q.pixelStorei(37440,se.flipY),Q.pixelStorei(37441,se.premultiplyAlpha),Q.pixelStorei(3317,se.unpackAlignment);const mt=Q.getParameter(3314),Nt=Q.getParameter(32878),vn=Q.getParameter(3316),Fi=Q.getParameter(3315),Ar=Q.getParameter(32877),Yt=pe.isCompressedTexture?pe.mipmaps[0]:pe.image;Q.pixelStorei(3314,Yt.width),Q.pixelStorei(32878,Yt.height),Q.pixelStorei(3316,U.min.x),Q.pixelStorei(3315,U.min.y),Q.pixelStorei(32877,U.min.z),pe.isDataTexture||pe.isData3DTexture?Q.texSubImage3D(vt,xe,K.x,K.y,K.z,st,ct,ft,Ke,dt,Yt.data):pe.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),Q.compressedTexSubImage3D(vt,xe,K.x,K.y,K.z,st,ct,ft,Ke,Yt.data)):Q.texSubImage3D(vt,xe,K.x,K.y,K.z,st,ct,ft,Ke,dt,Yt),Q.pixelStorei(3314,mt),Q.pixelStorei(32878,Nt),Q.pixelStorei(3316,vn),Q.pixelStorei(3315,Fi),Q.pixelStorei(32877,Ar),xe===0&&se.generateMipmaps&&Q.generateMipmap(vt),Me.unbindTexture()},this.initTexture=function(U){U.isCubeTexture?we.setTextureCube(U,0):U.isData3DTexture?we.setTexture3D(U,0):U.isDataArrayTexture||U.isCompressedArrayTexture?we.setTexture2DArray(U,0):we.setTexture2D(U,0),Me.unbindTexture()},this.resetState=function(){S=0,A=0,E=null,Me.reset(),je.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}}class KR extends Xw{}KR.prototype.isWebGL1Renderer=!0;class t0{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new qe(e),this.density=t}clone(){return new t0(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}class n0{constructor(e,t=1,i=1e3){this.isFog=!0,this.name="",this.color=new qe(e),this.near=t,this.far=i}clone(){return new n0(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}class Yw extends Dt{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t}get autoUpdate(){return console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate}set autoUpdate(e){console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate=e}}class i0{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=cd,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=Qi()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,i){e*=this.stride,i*=t.stride;for(let r=0,s=this.stride;re.far||t.push({distance:l,point:$u.clone(),uv:Di.getInterpolation($u,Up,Ku,zp,AT,by,bT,new Se),face:null,object:this})}copy(e,t){return super.copy(e,t),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function Fp(n,e,t,i,r,s){ec.subVectors(n,t).addScalar(.5).multiply(i),r!==void 0?(Ju.x=s*ec.x-r*ec.y,Ju.y=r*ec.x+s*ec.y):Ju.copy(ec),n.copy(e),n.x+=Ju.x,n.y+=Ju.y,n.applyMatrix4(QR)}const Bp=new O,ET=new O;class tI extends Dt{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let i=0,r=t.length;i0){let i,r;for(i=1,r=t.length;i0){Bp.setFromMatrixPosition(this.matrixWorld);const r=e.ray.origin.distanceTo(Bp);this.getObjectForDistance(r).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){Bp.setFromMatrixPosition(e.matrixWorld),ET.setFromMatrixPosition(this.matrixWorld);const i=Bp.distanceTo(ET)/e.zoom;t[0].object.visible=!0;let r,s;for(r=1,s=t.length;r=o)t[r-1].object.visible=!1,t[r].object.visible=!0;else break}for(this._currentLevel=r-1;rl)continue;p.applyMatrix4(this.matrixWorld);const L=e.ray.origin.distanceTo(p);Le.far||t.push({distance:L,point:h.clone().applyMatrix4(this.matrixWorld),index:S,face:null,faceIndex:null,object:this})}}else{const m=Math.max(0,o.start),_=Math.min(w.count,o.start+o.count);for(let S=m,A=_-1;Sl)continue;p.applyMatrix4(this.matrixWorld);const P=e.ray.origin.distanceTo(p);Pe.far||t.push({distance:P,point:h.clone().applyMatrix4(this.matrixWorld),index:S,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sr.far)return;s.push({distance:f,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:o})}}class y9 extends gn{constructor(e,t,i,r,s,o,a,l,f){super(e,t,i,r,s,o,a,l,f),this.isVideoTexture=!0,this.minFilter=o!==void 0?o:Sn,this.magFilter=s!==void 0?s:Sn,this.generateMipmaps=!1;const d=this;function h(){d.needsUpdate=!0,e.requestVideoFrameCallback(h)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(h)}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class x9 extends gn{constructor(e,t,i){super({width:e,height:t}),this.isFramebufferTexture=!0,this.format=i,this.magFilter=_n,this.minFilter=_n,this.generateMipmaps=!1,this.needsUpdate=!0}}class Jw extends gn{constructor(e,t,i,r,s,o,a,l,f,d,h,p){super(null,o,a,l,f,d,r,s,h,p),this.isCompressedTexture=!0,this.image={width:t,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class _9 extends Jw{constructor(e,t,i,r,s,o){super(e,t,i,s,o),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=ui}}class w9 extends gn{constructor(e,t,i,r,s,o,a,l,f){super(e,t,i,r,s,o,a,l,f),this.isCanvasTexture=!0,this.needsUpdate=!0}}class jr{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const i=this.getUtoTmapping(e);return this.getPoint(i,t)}getPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return t}getSpacedPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPointAt(i/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let i,r=this.getPoint(0),s=0;t.push(0);for(let o=1;o<=e;o++)i=this.getPoint(o/e),s+=i.distanceTo(r),t.push(s),r=i;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const i=this.getLengths();let r=0;const s=i.length;let o;t?o=t:o=e*i[s-1];let a=0,l=s-1,f;for(;a<=l;)if(r=Math.floor(a+(l-a)/2),f=i[r]-o,f<0)a=r+1;else if(f>0)l=r-1;else{l=r;break}if(r=l,i[r]===o)return r/(s-1);const d=i[r],p=i[r+1]-d,g=(o-d)/p;return(r+g)/(s-1)}getTangent(e,t){let r=e-1e-4,s=e+1e-4;r<0&&(r=0),s>1&&(s=1);const o=this.getPoint(r),a=this.getPoint(s),l=t||(o.isVector2?new Se:new O);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,t){const i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t){const i=new O,r=[],s=[],o=[],a=new O,l=new gt;for(let g=0;g<=e;g++){const y=g/e;r[g]=this.getTangentAt(y,new O)}s[0]=new O,o[0]=new O;let f=Number.MAX_VALUE;const d=Math.abs(r[0].x),h=Math.abs(r[0].y),p=Math.abs(r[0].z);d<=f&&(f=d,i.set(1,0,0)),h<=f&&(f=h,i.set(0,1,0)),p<=f&&i.set(0,0,1),a.crossVectors(r[0],i).normalize(),s[0].crossVectors(r[0],a),o[0].crossVectors(r[0],s[0]);for(let g=1;g<=e;g++){if(s[g]=s[g-1].clone(),o[g]=o[g-1].clone(),a.crossVectors(r[g-1],r[g]),a.length()>Number.EPSILON){a.normalize();const y=Math.acos(mn(r[g-1].dot(r[g]),-1,1));s[g].applyMatrix4(l.makeRotationAxis(a,y))}o[g].crossVectors(r[g],s[g])}if(t===!0){let g=Math.acos(mn(s[0].dot(s[e]),-1,1));g/=e,r[0].dot(a.crossVectors(s[0],s[e]))>0&&(g=-g);for(let y=1;y<=e;y++)s[y].applyMatrix4(l.makeRotationAxis(r[y],g*y)),o[y].crossVectors(r[y],s[y])}return{tangents:r,normals:s,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class s0 extends jr{constructor(e=0,t=0,i=1,r=1,s=0,o=Math.PI*2,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=i,this.yRadius=r,this.aStartAngle=s,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,t){const i=t||new Se,r=Math.PI*2;let s=this.aEndAngle-this.aStartAngle;const o=Math.abs(s)r;)s-=r;s0?0:(Math.floor(Math.abs(a)/s)+1)*s:l===0&&a===s-1&&(a=s-2,l=1);let f,d;this.closed||a>0?f=r[(a-1)%s]:(jp.subVectors(r[0],r[1]).add(r[0]),f=jp);const h=r[a%s],p=r[(a+1)%s];if(this.closed||a+2r.length-2?r.length-1:o+1],h=r[o>r.length-3?r.length-1:o+2];return i.set(VT(a,l.x,f.x,d.x,h.x),VT(a,l.y,f.y,d.y,h.y)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t=i){const o=r[s]-i,a=this.curves[s],l=a.getLength(),f=l===0?0:1-o/l;return a.getPointAt(f,t)}s++}return null}getLength(){const 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;const e=[];let t=0;for(let i=0,r=this.curves.length;i1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,i=e.curves.length;t0){const h=f.getPoint(0);h.equals(this.currentPoint)||this.lineTo(h.x,h.y)}this.curves.push(f);const d=f.getPoint(1);return this.currentPoint.copy(d),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class fu extends St{constructor(e=[new Se(0,-.5),new Se(.5,0),new Se(0,.5)],t=12,i=0,r=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:i,phiLength:r},t=Math.floor(t),r=mn(r,0,Math.PI*2);const s=[],o=[],a=[],l=[],f=[],d=1/t,h=new O,p=new Se,g=new O,y=new O,x=new O;let w=0,m=0;for(let _=0;_<=e.length-1;_++)switch(_){case 0:w=e[_+1].x-e[_].x,m=e[_+1].y-e[_].y,g.x=m*1,g.y=-w,g.z=m*0,x.copy(g),g.normalize(),l.push(g.x,g.y,g.z);break;case e.length-1:l.push(x.x,x.y,x.z);break;default:w=e[_+1].x-e[_].x,m=e[_+1].y-e[_].y,g.x=m*1,g.y=-w,g.z=m*0,y.copy(g),g.x+=x.x,g.y+=x.y,g.z+=x.z,g.normalize(),l.push(g.x,g.y,g.z),x.copy(y)}for(let _=0;_<=t;_++){const S=i+_*d*r,A=Math.sin(S),E=Math.cos(S);for(let P=0;P<=e.length-1;P++){h.x=e[P].x*A,h.y=e[P].y,h.z=e[P].x*E,o.push(h.x,h.y,h.z),p.x=_/t,p.y=P/(e.length-1),a.push(p.x,p.y);const I=l[3*P+0]*A,L=l[3*P+1],C=l[3*P+0]*E;f.push(I,L,C)}}for(let _=0;_0&&S(!0),t>0&&S(!1)),this.setIndex(d),this.setAttribute("position",new Qe(h,3)),this.setAttribute("normal",new Qe(p,3)),this.setAttribute("uv",new Qe(g,2));function _(){const A=new O,E=new O;let P=0;const I=(t-e)/i;for(let L=0;L<=s;L++){const C=[],R=L/s,W=R*(t-e)+e;for(let Z=0;Z<=r;Z++){const X=Z/r,j=X*l+a,Y=Math.sin(j),te=Math.cos(j);E.x=W*Y,E.y=-R*i+w,E.z=W*te,h.push(E.x,E.y,E.z),A.set(Y,I,te).normalize(),p.push(A.x,A.y,A.z),g.push(X,1-R),C.push(y++)}x.push(C)}for(let L=0;L.9&&I<.1&&(S<.2&&(o[_+0]+=1),A<.2&&(o[_+2]+=1),E<.2&&(o[_+4]+=1))}}function p(_){s.push(_.x,_.y,_.z)}function g(_,S){const A=_*3;S.x=e[A+0],S.y=e[A+1],S.z=e[A+2]}function y(){const _=new O,S=new O,A=new O,E=new O,P=new Se,I=new Se,L=new Se;for(let C=0,R=0;C80*t){a=f=n[0],l=d=n[1];for(let y=t;yf&&(f=h),p>d&&(d=p);g=Math.max(f-a,d-l),g=g!==0?32767/g:0}return dd(s,o,t,a,l,g,0),o}};function dI(n,e,t,i,r){let s,o;if(r===j9(n,e,t,i)>0)for(s=e;s=e;s-=i)o=HT(s,n[s],n[s+1],o);return o&&a0(o,o.next)&&(pd(o),o=o.next),o}function cl(n,e){if(!n)return n;e||(e=n);let t=n,i;do if(i=!1,!t.steiner&&(a0(t,t.next)||an(t.prev,t,t.next)===0)){if(pd(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function dd(n,e,t,i,r,s,o){if(!n)return;!o&&s&&F9(n,i,r,s);let a=n,l,f;for(;n.prev!==n.next;){if(l=n.prev,f=n.next,s?R9(n,i,r,s):L9(n)){e.push(l.i/t|0),e.push(n.i/t|0),e.push(f.i/t|0),pd(n),n=f.next,a=f.next;continue}if(n=f,n===a){o?o===1?(n=I9(cl(n),e,t),dd(n,e,t,i,r,s,2)):o===2&&D9(n,e,t,i,r,s):dd(cl(n),e,t,i,r,s,1);break}}}function L9(n){const e=n.prev,t=n,i=n.next;if(an(e,t,i)>=0)return!1;const r=e.x,s=t.x,o=i.x,a=e.y,l=t.y,f=i.y,d=rs?r>o?r:o:s>o?s:o,g=a>l?a>f?a:f:l>f?l:f;let y=i.next;for(;y!==e;){if(y.x>=d&&y.x<=p&&y.y>=h&&y.y<=g&&bc(r,a,s,l,o,f,y.x,y.y)&&an(y.prev,y,y.next)>=0)return!1;y=y.next}return!0}function R9(n,e,t,i){const r=n.prev,s=n,o=n.next;if(an(r,s,o)>=0)return!1;const a=r.x,l=s.x,f=o.x,d=r.y,h=s.y,p=o.y,g=al?a>f?a:f:l>f?l:f,w=d>h?d>p?d:p:h>p?h:p,m=G_(g,y,e,t,i),_=G_(x,w,e,t,i);let S=n.prevZ,A=n.nextZ;for(;S&&S.z>=m&&A&&A.z<=_;){if(S.x>=g&&S.x<=x&&S.y>=y&&S.y<=w&&S!==r&&S!==o&&bc(a,d,l,h,f,p,S.x,S.y)&&an(S.prev,S,S.next)>=0||(S=S.prevZ,A.x>=g&&A.x<=x&&A.y>=y&&A.y<=w&&A!==r&&A!==o&&bc(a,d,l,h,f,p,A.x,A.y)&&an(A.prev,A,A.next)>=0))return!1;A=A.nextZ}for(;S&&S.z>=m;){if(S.x>=g&&S.x<=x&&S.y>=y&&S.y<=w&&S!==r&&S!==o&&bc(a,d,l,h,f,p,S.x,S.y)&&an(S.prev,S,S.next)>=0)return!1;S=S.prevZ}for(;A&&A.z<=_;){if(A.x>=g&&A.x<=x&&A.y>=y&&A.y<=w&&A!==r&&A!==o&&bc(a,d,l,h,f,p,A.x,A.y)&&an(A.prev,A,A.next)>=0)return!1;A=A.nextZ}return!0}function I9(n,e,t){let i=n;do{const r=i.prev,s=i.next.next;!a0(r,s)&&hI(r,i,i.next,s)&&hd(r,s)&&hd(s,r)&&(e.push(r.i/t|0),e.push(i.i/t|0),e.push(s.i/t|0),pd(i),pd(i.next),i=n=s),i=i.next}while(i!==n);return cl(i)}function D9(n,e,t,i,r,s){let o=n;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&H9(o,a)){let l=pI(o,a);o=cl(o,o.next),l=cl(l,l.next),dd(o,e,t,i,r,s,0),dd(l,e,t,i,r,s,0);return}a=a.next}o=o.next}while(o!==n)}function k9(n,e,t,i){const r=[];let s,o,a,l,f;for(s=0,o=e.length;s=t.next.y&&t.next.y!==t.y){const p=t.x+(o-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(p<=s&&p>i&&(i=p,r=t.x=t.x&&t.x>=l&&s!==t.x&&bc(or.x||t.x===r.x&&z9(r,t)))&&(r=t,d=h)),t=t.next;while(t!==a);return r}function z9(n,e){return an(n.prev,n,e.prev)<0&&an(e.next,n,n.next)<0}function F9(n,e,t,i){let r=n;do r.z===0&&(r.z=G_(r.x,r.y,e,t,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==n);r.prevZ.nextZ=null,r.prevZ=null,B9(r)}function B9(n){let e,t,i,r,s,o,a,l,f=1;do{for(t=n,n=null,s=null,o=0;t;){for(o++,i=t,a=0,e=0;e0||l>0&&i;)a!==0&&(l===0||!i||t.z<=i.z)?(r=t,t=t.nextZ,a--):(r=i,i=i.nextZ,l--),s?s.nextZ=r:n=r,r.prevZ=s,s=r;t=i}s.nextZ=null,f*=2}while(o>1);return n}function G_(n,e,t,i,r){return n=(n-t)*r|0,e=(e-i)*r|0,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,n|e<<1}function V9(n){let e=n,t=n;do(e.x=(n-o)*(s-a)&&(n-o)*(i-a)>=(t-o)*(e-a)&&(t-o)*(s-a)>=(r-o)*(i-a)}function H9(n,e){return n.next.i!==e.i&&n.prev.i!==e.i&&!W9(n,e)&&(hd(n,e)&&hd(e,n)&&G9(n,e)&&(an(n.prev,n,e.prev)||an(n,e.prev,e))||a0(n,e)&&an(n.prev,n,n.next)>0&&an(e.prev,e,e.next)>0)}function an(n,e,t){return(e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y)}function a0(n,e){return n.x===e.x&&n.y===e.y}function hI(n,e,t,i){const r=$p(an(n,e,t)),s=$p(an(n,e,i)),o=$p(an(t,i,n)),a=$p(an(t,i,e));return!!(r!==s&&o!==a||r===0&&Zp(n,t,e)||s===0&&Zp(n,i,e)||o===0&&Zp(t,n,i)||a===0&&Zp(t,e,i))}function Zp(n,e,t){return e.x<=Math.max(n.x,t.x)&&e.x>=Math.min(n.x,t.x)&&e.y<=Math.max(n.y,t.y)&&e.y>=Math.min(n.y,t.y)}function $p(n){return n>0?1:n<0?-1:0}function W9(n,e){let t=n;do{if(t.i!==n.i&&t.next.i!==n.i&&t.i!==e.i&&t.next.i!==e.i&&hI(t,t.next,n,e))return!0;t=t.next}while(t!==n);return!1}function hd(n,e){return an(n.prev,n,n.next)<0?an(n,e,n.next)>=0&&an(n,n.prev,e)>=0:an(n,e,n.prev)<0||an(n,n.next,e)<0}function G9(n,e){let t=n,i=!1;const r=(n.x+e.x)/2,s=(n.y+e.y)/2;do t.y>s!=t.next.y>s&&t.next.y!==t.y&&r<(t.next.x-t.x)*(s-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==n);return i}function pI(n,e){const t=new j_(n.i,n.x,n.y),i=new j_(e.i,e.x,e.y),r=n.next,s=e.prev;return n.next=e,e.prev=n,t.next=r,r.prev=t,i.next=t,t.prev=i,s.next=i,i.prev=s,i}function HT(n,e,t,i){const r=new j_(n,e,t);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function pd(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function j_(n,e,t){this.i=n,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function j9(n,e,t,i){let r=0;for(let s=e,o=t-i;s2&&n[e-1].equals(n[0])&&n.pop()}function GT(n,e){for(let t=0;tNumber.EPSILON){const le=Math.sqrt(z),Ee=Math.sqrt(He*He+pt*pt),Te=oe.x-Ge/le,Pe=oe.y+Je/le,nt=we.x-pt/Ee,Oe=we.y+He/Ee,he=((nt-Te)*pt-(Oe-Pe)*He)/(Je*pt-Ge*He);Ne=Te+Je*he-ve.x,Le=Pe+Ge*he-ve.y;const je=Ne*Ne+Le*Le;if(je<=2)return new Se(Ne,Le);Ye=Math.sqrt(je/2)}else{let le=!1;Je>Number.EPSILON?He>Number.EPSILON&&(le=!0):Je<-Number.EPSILON?He<-Number.EPSILON&&(le=!0):Math.sign(Ge)===Math.sign(pt)&&(le=!0),le?(Ne=-Ge,Le=Je,Ye=Math.sqrt(z)):(Ne=Je,Le=Ge,Ye=Math.sqrt(z/2))}return new Se(Ne/Ye,Le/Ye)}const B=[];for(let ve=0,oe=j.length,we=oe-1,Ne=ve+1;ve=0;ve--){const oe=ve/w,we=g*Math.cos(oe*Math.PI/2),Ne=y*Math.sin(oe*Math.PI/2)+x;for(let Le=0,Ye=j.length;Le=0;){const Ne=we;let Le=we-1;Le<0&&(Le=ve.length-1);for(let Ye=0,Je=d+w*2;Ye0)&&g.push(S,A,P),(m!==i-1||l0!=e>0&&this.version++,this._sheen=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 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.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.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 xI extends Qn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new qe(16777215),this.specular=new qe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new qe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=sa,this.normalScale=new Se(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=kd,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.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 _I extends Qn{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new qe(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new qe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=sa,this.normalScale=new Se(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 wI extends Qn{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=sa,this.normalScale=new Se(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 SI extends Qn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new qe(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new qe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=sa,this.normalScale=new Se(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=kd,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.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 MI extends Qn{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new qe(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=sa,this.normalScale=new Se(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class AI extends bi{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 mr(n,e,t){return sS(n)?new n.constructor(n.subarray(e,t!==void 0?t:n.length)):n.slice(e,t)}function Ga(n,e,t){return!n||!t&&n.constructor===e?n:typeof e.BYTES_PER_ELEMENT=="number"?new e(n):Array.prototype.slice.call(n)}function sS(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function bI(n){function e(r,s){return n[r]-n[s]}const t=n.length,i=new Array(t);for(let r=0;r!==t;++r)i[r]=r;return i.sort(e),i}function X_(n,e,t){const i=n.length,r=new n.constructor(i);for(let s=0,o=0;o!==i;++s){const a=t[s]*e;for(let l=0;l!==e;++l)r[o++]=n[a+l]}return r}function oS(n,e,t,i){let r=1,s=n[0];for(;s!==void 0&&s[i]===void 0;)s=n[r++];if(s===void 0)return;let o=s[i];if(o!==void 0)if(Array.isArray(o))do o=s[i],o!==void 0&&(e.push(s.time),t.push.apply(t,o)),s=n[r++];while(s!==void 0);else if(o.toArray!==void 0)do o=s[i],o!==void 0&&(e.push(s.time),o.toArray(t,t.length)),s=n[r++];while(s!==void 0);else do o=s[i],o!==void 0&&(e.push(s.time),t.push(o)),s=n[r++];while(s!==void 0)}function Z9(n,e,t,i,r=30){const s=n.clone();s.name=e;const o=[];for(let l=0;l=i)){h.push(f.times[g]);for(let x=0;xs.tracks[l].times[0]&&(a=s.tracks[l].times[0]);for(let l=0;l=a.times[y]){const m=y*h+d,_=m+h-d;x=mr(a.values,m,_)}else{const m=a.createInterpolant(),_=d,S=h-d;m.evaluate(s),x=mr(m.resultBuffer,_,S)}l==="quaternion"&&new fi().fromArray(x).normalize().conjugate().toArray(x);const w=f.times.length;for(let m=0;m=s)){const a=t[1];e=s)break t}o=i,i=0;break n}break e}for(;i>>1;et;)--o;if(++o,s!==0||o!==r){s>=o&&(o=Math.max(o,1),s=o-1);const a=this.getValueSize();this.times=mr(i,s,o),this.values=mr(this.values,s*a,o*a)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,r=this.values,s=i.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==s;a++){const l=i[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(r!==void 0&&sS(r))for(let a=0,l=r.length;a!==l;++a){const f=r[a];if(isNaN(f)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,f),e=!1;break}}return e}optimize(){const e=mr(this.times),t=mr(this.values),i=this.getValueSize(),r=this.getInterpolation()===Am,s=e.length-1;let o=1;for(let a=1;a0){e[o]=e[s];for(let a=s*i,l=o*i,f=0;f!==i;++f)t[l+f]=t[a+f];++o}return o!==e.length?(this.times=mr(e,0,o),this.values=mr(t,0,o*i)):(this.times=e,this.values=t),this}clone(){const e=mr(this.times,0),t=mr(this.values,0),i=this.constructor,r=new i(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}}Xr.prototype.TimeBufferType=Float32Array;Xr.prototype.ValueBufferType=Float32Array;Xr.prototype.DefaultInterpolation=ad;class yl extends Xr{}yl.prototype.ValueTypeName="bool";yl.prototype.ValueBufferType=Array;yl.prototype.DefaultInterpolation=od;yl.prototype.InterpolantFactoryMethodLinear=void 0;yl.prototype.InterpolantFactoryMethodSmooth=void 0;class lS extends Xr{}lS.prototype.ValueTypeName="color";class md extends Xr{}md.prototype.ValueTypeName="number";class CI extends $d{constructor(e,t,i,r){super(e,t,i,r)}interpolate_(e,t,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(i-t)/(r-t);let f=e*a;for(let d=f+a;f!==d;f+=4)fi.slerpFlat(s,0,o,f-a,o,f,l);return s}}class pu extends Xr{InterpolantFactoryMethodLinear(e){return new CI(this.times,this.values,this.getValueSize(),e)}}pu.prototype.ValueTypeName="quaternion";pu.prototype.DefaultInterpolation=ad;pu.prototype.InterpolantFactoryMethodSmooth=void 0;class xl extends Xr{}xl.prototype.ValueTypeName="string";xl.prototype.ValueBufferType=Array;xl.prototype.DefaultInterpolation=od;xl.prototype.InterpolantFactoryMethodLinear=void 0;xl.prototype.InterpolantFactoryMethodSmooth=void 0;class gd extends Xr{}gd.prototype.ValueTypeName="vector";class vd{constructor(e,t=-1,i,r=Jg){this.name=e,this.tracks=i,this.duration=t,this.blendMode=r,this.uuid=Qi(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,r=1/(e.fps||1);for(let o=0,a=i.length;o!==a;++o)t.push(Q9(i[o]).scale(r));const s=new this(e.name,e.duration,t,e.blendMode);return s.uuid=e.uuid,s}static toJSON(e){const t=[],i=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let s=0,o=i.length;s!==o;++s)t.push(Xr.toJSON(i[s]));return r}static CreateFromMorphTargetSequence(e,t,i,r){const s=t.length,o=[];for(let a=0;a1){const h=d[1];let p=r[h];p||(r[h]=p=[]),p.push(f)}}const o=[];for(const a in r)o.push(this.CreateFromMorphTargetSequence(a,r[a],t,i));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(h,p,g,y,x){if(g.length!==0){const w=[],m=[];oS(g,w,m,y),w.length!==0&&x.push(new h(p,w,m))}},r=[],s=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const f=e.hierarchy||[];for(let h=0;h{t&&t(s),this.manager.itemEnd(e)},0),s;if(Ls[e]!==void 0){Ls[e].push({onLoad:t,onProgress:i,onError:r});return}Ls[e]=[],Ls[e].push({onLoad:t,onProgress:i,onError:r});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(f=>{if(f.status===200||f.status===0){if(f.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||f.body===void 0||f.body.getReader===void 0)return f;const d=Ls[e],h=f.body.getReader(),p=f.headers.get("Content-Length")||f.headers.get("X-File-Size"),g=p?parseInt(p):0,y=g!==0;let x=0;const w=new ReadableStream({start(m){_();function _(){h.read().then(({done:S,value:A})=>{if(S)m.close();else{x+=A.byteLength;const E=new ProgressEvent("progress",{lengthComputable:y,loaded:x,total:g});for(let P=0,I=d.length;P{switch(l){case"arraybuffer":return f.arrayBuffer();case"blob":return f.blob();case"document":return f.text().then(d=>new DOMParser().parseFromString(d,a));case"json":return f.json();default:if(a===void 0)return f.text();{const h=/charset="?([^;"\s]*)"?/i.exec(a),p=h&&h[1]?h[1].toLowerCase():void 0,g=new TextDecoder(p);return f.arrayBuffer().then(y=>g.decode(y))}}}).then(f=>{ul.add(e,f);const d=Ls[e];delete Ls[e];for(let h=0,p=d.length;h{const d=Ls[e];if(d===void 0)throw this.manager.itemError(e),f;delete Ls[e];for(let h=0,p=d.length;h{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class t7 extends rr{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new Js(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{t(s.parse(JSON.parse(a)))}catch(l){r?r(l):console.error(l),s.manager.itemError(e)}},i,r)}parse(e){const t=[];for(let i=0;i0:r.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const s in e.uniforms){const o=e.uniforms[s];switch(r.uniforms[s]={},o.type){case"t":r.uniforms[s].value=i(o.value);break;case"c":r.uniforms[s].value=new qe().setHex(o.value);break;case"v2":r.uniforms[s].value=new Se().fromArray(o.value);break;case"v3":r.uniforms[s].value=new O().fromArray(o.value);break;case"v4":r.uniforms[s].value=new Bt().fromArray(o.value);break;case"m3":r.uniforms[s].value=new Ct().fromArray(o.value);break;case"m4":r.uniforms[s].value=new gt().fromArray(o.value);break;default:r.uniforms[s].value=o.value}}if(e.defines!==void 0&&(r.defines=e.defines),e.vertexShader!==void 0&&(r.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(r.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(r.glslVersion=e.glslVersion),e.extensions!==void 0)for(const s in e.extensions)r.extensions[s]=e.extensions[s];if(e.size!==void 0&&(r.size=e.size),e.sizeAttenuation!==void 0&&(r.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(r.map=i(e.map)),e.matcap!==void 0&&(r.matcap=i(e.matcap)),e.alphaMap!==void 0&&(r.alphaMap=i(e.alphaMap)),e.bumpMap!==void 0&&(r.bumpMap=i(e.bumpMap)),e.bumpScale!==void 0&&(r.bumpScale=e.bumpScale),e.normalMap!==void 0&&(r.normalMap=i(e.normalMap)),e.normalMapType!==void 0&&(r.normalMapType=e.normalMapType),e.normalScale!==void 0){let s=e.normalScale;Array.isArray(s)===!1&&(s=[s,s]),r.normalScale=new Se().fromArray(s)}return e.displacementMap!==void 0&&(r.displacementMap=i(e.displacementMap)),e.displacementScale!==void 0&&(r.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(r.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(r.roughnessMap=i(e.roughnessMap)),e.metalnessMap!==void 0&&(r.metalnessMap=i(e.metalnessMap)),e.emissiveMap!==void 0&&(r.emissiveMap=i(e.emissiveMap)),e.emissiveIntensity!==void 0&&(r.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(r.specularMap=i(e.specularMap)),e.specularIntensityMap!==void 0&&(r.specularIntensityMap=i(e.specularIntensityMap)),e.specularColorMap!==void 0&&(r.specularColorMap=i(e.specularColorMap)),e.envMap!==void 0&&(r.envMap=i(e.envMap)),e.envMapIntensity!==void 0&&(r.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(r.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(r.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(r.lightMap=i(e.lightMap)),e.lightMapIntensity!==void 0&&(r.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(r.aoMap=i(e.aoMap)),e.aoMapIntensity!==void 0&&(r.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(r.gradientMap=i(e.gradientMap)),e.clearcoatMap!==void 0&&(r.clearcoatMap=i(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(r.clearcoatRoughnessMap=i(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(r.clearcoatNormalMap=i(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(r.clearcoatNormalScale=new Se().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(r.iridescenceMap=i(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(r.iridescenceThicknessMap=i(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(r.transmissionMap=i(e.transmissionMap)),e.thicknessMap!==void 0&&(r.thicknessMap=i(e.thicknessMap)),e.sheenColorMap!==void 0&&(r.sheenColorMap=i(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(r.sheenRoughnessMap=i(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}static createMaterialFromType(e){const t={ShadowMaterial:gI,SpriteMaterial:qw,RawShaderMaterial:vI,ShaderMaterial:ds,PointsMaterial:$w,MeshPhysicalMaterial:yI,MeshStandardMaterial:rS,MeshPhongMaterial:xI,MeshToonMaterial:_I,MeshNormalMaterial:wI,MeshLambertMaterial:SI,MeshDepthMaterial:Gw,MeshDistanceMaterial:jw,MeshBasicMaterial:oa,MeshMatcapMaterial:MI,LineDashedMaterial:AI,LineBasicMaterial:bi,Material:Qn};return new t[e]}}class Y_{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let t="";for(let i=0,r=e.length;i0){const l=new cS(t);s=new yd(l),s.setCrossOrigin(this.crossOrigin);for(let f=0,d=e.length;f0){r=new yd(this.manager),r.setCrossOrigin(this.crossOrigin);for(let o=0,a=e.length;o"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,i,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=ul.get(e);if(o!==void 0)return s.manager.itemStart(e),setTimeout(function(){t&&t(o),s.manager.itemEnd(e)},0),o;const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(s.options,{colorSpaceConversion:"none"}))}).then(function(l){ul.add(e,l),t&&t(l),s.manager.itemEnd(e)}).catch(function(l){r&&r(l),s.manager.itemError(e),s.manager.itemEnd(e)}),s.manager.itemStart(e)}}let Jp;class fS{static getContext(){return Jp===void 0&&(Jp=new(window.AudioContext||window.webkitAudioContext)),Jp}static setContext(e){Jp=e}}class f7 extends rr{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new Js(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{const l=a.slice(0);fS.getContext().decodeAudioData(l,function(d){t(d)})}catch(l){r?r(l):console.error(l),s.manager.itemError(e)}},i,r)}}class d7 extends c0{constructor(e,t,i=1){super(void 0,i),this.isHemisphereLightProbe=!0;const r=new qe().set(e),s=new qe().set(t),o=new O(r.r,r.g,r.b),a=new O(s.r,s.g,s.b),l=Math.sqrt(Math.PI),f=l*Math.sqrt(.75);this.sh.coefficients[0].copy(o).add(a).multiplyScalar(l),this.sh.coefficients[1].copy(o).sub(a).multiplyScalar(f)}}class h7 extends c0{constructor(e,t=1){super(void 0,t),this.isAmbientLightProbe=!0;const i=new qe().set(e);this.sh.coefficients[0].set(i.r,i.g,i.b).multiplyScalar(2*Math.sqrt(Math.PI))}}const KT=new gt,QT=new gt,Ma=new gt;class p7{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new qt,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new qt,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){const 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){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,Ma.copy(e.projectionMatrix);const r=t.eyeSep/2,s=r*t.near/t.focus,o=t.near*Math.tan($a*t.fov*.5)/t.zoom;let a,l;QT.elements[12]=-r,KT.elements[12]=r,a=-o*t.aspect+s,l=o*t.aspect+s,Ma.elements[0]=2*t.near/(l-a),Ma.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(Ma),a=-o*t.aspect-s,l=o*t.aspect-s,Ma.elements[0]=2*t.near/(l-a),Ma.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(Ma)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(QT),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(KT)}}class dS{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=eC(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=eC();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function eC(){return(typeof performance>"u"?Date:performance).now()}const Aa=new O,tC=new fi,m7=new O,ba=new O;class g7 extends Dt{constructor(){super(),this.type="AudioListener",this.context=fS.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new dS}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(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 this.filter!==null?(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);const t=this.context.listener,i=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Aa,tC,m7),ba.set(0,0,-1).applyQuaternion(tC),t.positionX){const r=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(Aa.x,r),t.positionY.linearRampToValueAtTime(Aa.y,r),t.positionZ.linearRampToValueAtTime(Aa.z,r),t.forwardX.linearRampToValueAtTime(ba.x,r),t.forwardY.linearRampToValueAtTime(ba.y,r),t.forwardZ.linearRampToValueAtTime(ba.z,r),t.upX.linearRampToValueAtTime(i.x,r),t.upY.linearRampToValueAtTime(i.y,r),t.upZ.linearRampToValueAtTime(i.z,r)}else t.setPosition(Aa.x,Aa.y,Aa.z),t.setOrientation(ba.x,ba.y,ba.z,i.x,i.y,i.z)}}class zI extends Dt{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;const 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(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(),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;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e0&&this._mixBufferRegionAdditive(i,r,this._addIndex*t,1,t);for(let l=t,f=t+t;l!==f;++l)if(i[l]!==i[l+t]){a.setValue(i,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,i=this.valueSize,r=i*this._origIndex;e.getValue(t,r);for(let s=i,o=r;s!==o;++s)t[s]=t[r+s%i];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let i=e;i=.5)for(let o=0;o!==s;++o)e[t+o]=e[i+o]}_slerp(e,t,i,r){fi.slerpFlat(e,t,e,t,e,i,r)}_slerpAdditive(e,t,i,r,s){const o=this._workIndex*s;fi.multiplyQuaternionsFlat(e,o,e,t,e,i),fi.slerpFlat(e,t,e,t,e,o,r)}_lerp(e,t,i,r,s){const o=1-r;for(let a=0;a!==s;++a){const l=t+a;e[l]=e[l]*o+e[i+a]*r}}_lerpAdditive(e,t,i,r,s){for(let o=0;o!==s;++o){const a=t+o;e[a]=e[a]+e[i+o]*r}}}const hS="\\[\\]\\.:\\/",_7=new RegExp("["+hS+"]","g"),pS="[^"+hS+"]",w7="[^"+hS.replace("\\.","")+"]",S7=/((?:WC+[\/:])*)/.source.replace("WC",pS),M7=/(WCOD+)?/.source.replace("WCOD",w7),A7=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",pS),b7=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",pS),E7=new RegExp("^"+S7+M7+A7+b7+"$"),T7=["material","materials","bones","map"];class C7{constructor(e,t,i){const r=i||Rt.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const i=this._targetGroup.nCachedObjects_,r=this._bindings[i];r!==void 0&&r.getValue(e,t)}setValue(e,t){const i=this._bindings;for(let r=this._targetGroup.nCachedObjects_,s=i.length;r!==s;++r)i[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].unbind()}}class Rt{constructor(e,t,i){this.path=t,this.parsedPath=i||Rt.parseTrackName(t),this.node=Rt.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,i){return e&&e.isAnimationObjectGroup?new Rt.Composite(e,t,i):new Rt(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(_7,"")}static parseTrackName(e){const t=E7.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const i={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=i.nodeName&&i.nodeName.lastIndexOf(".");if(r!==void 0&&r!==-1){const s=i.nodeName.substring(r+1);T7.indexOf(s)!==-1&&(i.nodeName=i.nodeName.substring(0,r),i.objectName=s)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const i=e.skeleton.getBoneByName(t);if(i!==void 0)return i}if(e.children){const i=function(s){for(let o=0;o=s){const h=s++,p=e[h];t[p.uuid]=d,e[d]=p,t[f]=h,e[h]=l;for(let g=0,y=r;g!==y;++g){const x=i[g],w=x[h],m=x[d];x[d]=w,x[h]=m}}}this.nCachedObjects_=s}uncache(){const e=this._objects,t=this._indicesByUUID,i=this._bindings,r=i.length;let s=this.nCachedObjects_,o=e.length;for(let a=0,l=arguments.length;a!==l;++a){const f=arguments[a],d=f.uuid,h=t[d];if(h!==void 0)if(delete t[d],h0&&(t[g.uuid]=h),e[h]=g,e.pop();for(let y=0,x=r;y!==x;++y){const w=i[y];w[h]=w[p],w.pop()}}}this.nCachedObjects_=s}subscribe_(e,t){const i=this._bindingsIndicesByPath;let r=i[e];const s=this._bindings;if(r!==void 0)return s[r];const o=this._paths,a=this._parsedPaths,l=this._objects,f=l.length,d=this.nCachedObjects_,h=new Array(f);r=s.length,i[e]=r,o.push(e),a.push(t),s.push(h);for(let p=d,g=l.length;p!==g;++p){const y=l[p];h[p]=new Rt(y,e,t)}return h}unsubscribe_(e){const t=this._bindingsIndicesByPath,i=t[e];if(i!==void 0){const r=this._paths,s=this._parsedPaths,o=this._bindings,a=o.length-1,l=o[a],f=e[a];t[f]=i,o[i]=l,o.pop(),s[i]=s[a],s.pop(),r[i]=r[a],r.pop()}}}class BI{constructor(e,t,i=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=i,this.blendMode=r;const s=t.tracks,o=s.length,a=new Array(o),l={endingStart:Va,endingEnd:Va};for(let f=0;f!==o;++f){const d=s[f].createInterpolant(null);a[f]=d,d.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=RR,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&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,i){if(e.fadeOut(t),this.fadeIn(t),i){const r=this._clip.duration,s=e._clip.duration,o=s/r,a=r/s;e.warp(1,o,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,i){return e.crossFadeFrom(this,t,i)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,i){const r=this._mixer,s=r.time,o=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);const l=a.parameterPositions,f=a.sampleValues;return l[0]=s,l[1]=s+i,f[0]=e/o,f[1]=t/o,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,i,r){if(!this.enabled){this._updateWeight(e);return}const s=this._startTime;if(s!==null){const l=(e-s)*i;l<0||i===0?t=0:(this._startTime=null,t=i*l)}t*=this._updateTimeScale(e);const o=this._updateTime(t),a=this._updateWeight(e);if(a>0){const l=this._interpolants,f=this._propertyBindings;switch(this.blendMode){case kw:for(let d=0,h=l.length;d!==h;++d)l[d].evaluate(o),f[d].accumulateAdditive(a);break;case Jg:default:for(let d=0,h=l.length;d!==h;++d)l[d].evaluate(o),f[d].accumulate(r,a)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const i=this._weightInterpolant;if(i!==null){const r=i.evaluate(e)[0];t*=r,e>i.parameterPositions[1]&&(this.stopFading(),r===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const i=this._timeScaleInterpolant;if(i!==null){const r=i.evaluate(e)[0];t*=r,e>i.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,i=this.loop;let r=this.time+e,s=this._loopCount;const o=i===IR;if(e===0)return s===-1?r:o&&(s&1)===1?t-r:r;if(i===LR){s===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else if(r<0)r=0;else{this.time=r;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(s===-1&&(e>=0?(s=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),r>=t||r<0){const a=Math.floor(r/t);r-=t*a,s+=Math.abs(a);const l=this.repetitions-s;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){const f=e<0;this._setEndings(f,!f,o)}else this._setEndings(!1,!1,o);this._loopCount=s,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=r;if(o&&(s&1)===1)return t-r}return r}_setEndings(e,t,i){const r=this._interpolantSettings;i?(r.endingStart=Ha,r.endingEnd=Ha):(e?r.endingStart=this.zeroSlopeAtStart?Ha:Va:r.endingStart=ld,t?r.endingEnd=this.zeroSlopeAtEnd?Ha:Va:r.endingEnd=ld)}_scheduleFading(e,t,i){const r=this._mixer,s=r.time;let o=this._weightInterpolant;o===null&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,l=o.sampleValues;return a[0]=s,l[0]=t,a[1]=s+e,l[1]=i,this}}const L7=new Float32Array(1);class R7 extends hs{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const i=e._localRoot||this._root,r=e._clip.tracks,s=r.length,o=e._propertyBindings,a=e._interpolants,l=i.uuid,f=this._bindingsByRootAndName;let d=f[l];d===void 0&&(d={},f[l]=d);for(let h=0;h!==s;++h){const p=r[h],g=p.name;let y=d[g];if(y!==void 0)++y.referenceCount,o[h]=y;else{if(y=o[h],y!==void 0){y._cacheIndex===null&&(++y.referenceCount,this._addInactiveBinding(y,l,g));continue}const x=t&&t._propertyBindings[h].binding.parsedPath;y=new FI(Rt.create(i,g,x),p.ValueTypeName,p.getValueSize()),++y.referenceCount,this._addInactiveBinding(y,l,g),o[h]=y}a[h].resultBuffer=y.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const i=(e._localRoot||this._root).uuid,r=e._clip.uuid,s=this._actionsByClip[r];this._bindAction(e,s&&s.knownActions[0]),this._addInactiveAction(e,r,i)}const t=e._propertyBindings;for(let i=0,r=t.length;i!==r;++i){const s=t[i];s.useCount++===0&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let i=0,r=t.length;i!==r;++i){const s=t[i];--s.useCount===0&&(s.restoreOriginalState(),this._takeBackBinding(s))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const 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){const t=e._cacheIndex;return t!==null&&t=0;--i)e[i].stop();return this}update(e){e*=this.timeScale;const t=this._actions,i=this._nActiveActions,r=this.time+=e,s=Math.sign(e),o=this._accuIndex^=1;for(let f=0;f!==i;++f)t[f]._update(r,e,s,o);const a=this._bindings,l=this._nActiveBindings;for(let f=0;f!==l;++f)a[f].apply(o);return this}setTime(e){this.time=0;for(let t=0;tthis.max.x||e.ythis.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.xthis.max.x||e.max.ythis.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,rC).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)}}const sC=new O,Kp=new O;class z7{constructor(e=new O,t=new O){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){sC.subVectors(e,this.start),Kp.subVectors(this.end,this.start);const i=Kp.dot(Kp);let s=Kp.dot(sC)/i;return t&&(s=mn(s,0,1)),s}closestPointToPoint(e,t,i){const r=this.closestPointToPointParameter(e,t);return this.delta(i).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const oC=new O;class F7 extends Dt{constructor(e,t){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const i=new St,r=[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 o=0,a=1,l=32;o1)for(let h=0;h.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{fC.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(fC,t)}}setLength(e,t=e*.2,i=t*.2){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(i,t,i),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class K7 extends gs{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],i=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],r=new St;r.setAttribute("position",new Qe(t,3)),r.setAttribute("color",new Qe(i,3));const s=new bi({vertexColors:!0,toneMapped:!1});super(r,s),this.type="AxesHelper"}setColors(e,t,i){const r=new qe,s=this.geometry.attributes.color.array;return r.set(e),r.toArray(s,0),r.toArray(s,3),r.set(t),r.toArray(s,6),r.toArray(s,9),r.set(i),r.toArray(s,12),r.toArray(s,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class Q7{constructor(){this.type="ShapePath",this.color=new qe,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new fd,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,i,r){return this.currentPath.quadraticCurveTo(e,t,i,r),this}bezierCurveTo(e,t,i,r,s,o){return this.currentPath.bezierCurveTo(e,t,i,r,s,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(m){const _=[];for(let S=0,A=m.length;SNumber.EPSILON){if(R<0&&(I=_[P],C=-C,L=_[E],R=-R),m.yL.y)continue;if(m.y===I.y){if(m.x===I.x)return!0}else{const W=R*(m.x-I.x)-C*(m.y-I.y);if(W===0)return!0;if(W<0)continue;A=!A}}else{if(m.y!==I.y)continue;if(L.x<=m.x&&m.x<=I.x||I.x<=m.x&&m.x<=L.x)return!0}}return A}const r=us.isClockWise,s=this.subPaths;if(s.length===0)return[];let o,a,l;const f=[];if(s.length===1)return a=s[0],l=new Ka,l.curves=a.curves,f.push(l),f;let d=!r(s[0].getPoints());d=e?!d:d;const h=[],p=[];let g=[],y=0,x;p[y]=void 0,g[y]=[];for(let m=0,_=s.length;m<_;m++)a=s[m],x=a.getPoints(),o=r(x),o=e?!o:o,o?(!d&&p[y]&&y++,p[y]={s:new Ka,p:x},p[y].s.curves=a.curves,d&&y++,g[y]=[]):g[y].push({h:a,p:x[0]});if(!p[0])return t(s);if(p.length>1){let m=!1,_=0;for(let S=0,A=p.length;S0&&m===!1&&(g=h)}let w;for(let m=0,_=p.length;m<_;m++){l=p[m].s,f.push(l),w=g[m];for(let S=0,A=w.length;S{const h=typeof f=="function"?f(e):f;if(h!==e){const p=e;e=d?h:Object.assign({},e,h),t.forEach(g=>g(e,p))}},r=()=>e,s=(f,d=r,h=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let p=d(e);function g(){const y=d(e);if(!h(p,y)){const x=p;f(p=y,x)}}return t.add(g),()=>t.delete(g)},l={setState:i,getState:r,subscribe:(f,d,h)=>d||h?s(f,d,h):(t.add(f),()=>t.delete(f)),destroy:()=>t.clear()};return e=n(i,r,l),l}const _X=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),dC=_X?N.useEffect:N.useLayoutEffect;function GI(n){const e=typeof n=="function"?xX(n):n,t=(i=e.getState,r=Object.is)=>{const[,s]=N.useReducer(w=>w+1,0),o=e.getState(),a=N.useRef(o),l=N.useRef(i),f=N.useRef(r),d=N.useRef(!1),h=N.useRef();h.current===void 0&&(h.current=i(o));let p,g=!1;(a.current!==o||l.current!==i||f.current!==r||d.current)&&(p=i(o),g=!r(h.current,p)),dC(()=>{g&&(h.current=p),a.current=o,l.current=i,f.current=r,d.current=!1});const y=N.useRef(o);dC(()=>{const w=()=>{try{const _=e.getState(),S=l.current(_);f.current(h.current,S)||(a.current=_,h.current=S,s())}catch{d.current=!0,s()}},m=e.subscribe(w);return e.getState()!==y.current&&w(),m},[]);const x=g?p:h.current;return N.useDebugValue(x),x};return Object.assign(t,e),t[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const i=[t,e];return{next(){const r=i.length<=0;return{value:i.shift(),done:r}}}},t}var jI={exports:{}},Ny={exports:{}},Oy={};/** - * @license React - * scheduler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var hC;function wX(){return hC||(hC=1,function(n){function e(D,B){var V=D.length;D.push(B);e:for(;0>>1,ee=D[re];if(0>>1;rer(be,V))ger(Q,be)?(D[re]=Q,D[ge]=V,re=ge):(D[re]=be,D[ce]=V,re=ce);else if(ger(Q,V))D[re]=Q,D[ge]=V,re=ge;else break e}}return B}function r(D,B){var V=D.sortIndex-B.sortIndex;return V!==0?V:D.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();n.unstable_now=function(){return o.now()-a}}var l=[],f=[],d=1,h=null,p=3,g=!1,y=!1,x=!1,w=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(D){for(var B=t(f);B!==null;){if(B.callback===null)i(f);else if(B.startTime<=D)i(f),B.sortIndex=B.expirationTime,e(l,B);else break;B=t(f)}}function A(D){if(x=!1,S(D),!y)if(t(l)!==null)y=!0,te(E);else{var B=t(f);B!==null&&ne(A,B.startTime-D)}}function E(D,B){y=!1,x&&(x=!1,m(L),L=-1),g=!0;var V=p;try{for(S(B),h=t(l);h!==null&&(!(h.expirationTime>B)||D&&!W());){var re=h.callback;if(typeof re=="function"){h.callback=null,p=h.priorityLevel;var ee=re(h.expirationTime<=B);B=n.unstable_now(),typeof ee=="function"?h.callback=ee:h===t(l)&&i(l),S(B)}else i(l);h=t(l)}if(h!==null)var ie=!0;else{var ce=t(f);ce!==null&&ne(A,ce.startTime-B),ie=!1}return ie}finally{h=null,p=V,g=!1}}var P=!1,I=null,L=-1,C=5,R=-1;function W(){return!(n.unstable_now()-RD||125re?(D.sortIndex=V,e(f,D),t(l)===null&&D===t(f)&&(x?(m(L),L=-1):x=!0,ne(A,V-re))):(D.sortIndex=ee,e(l,D),y||g||(y=!0,te(E))),D},n.unstable_shouldYield=W,n.unstable_wrapCallback=function(D){var B=p;return function(){var V=p;p=B;try{return D.apply(this,arguments)}finally{p=V}}}}(Oy)),Oy}var pC;function SX(){return pC||(pC=1,Ny.exports=wX()),Ny.exports}/** - * @license React - * react-reconciler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var MX=function(e){var t={},i=N,r=SX(),s=Object.assign;function o(c){for(var u="https://reactjs.org/docs/error-decoder.html?invariant="+c,v=1;v$||b[F]!==T[$]){var me=` -`+b[F].replace(" at new "," at ");return c.displayName&&me.includes("")&&(me=me.replace("",c.displayName)),me}while(1<=F&&0<=$);break}}}finally{Tt=!1,Error.prepareStackTrace=v}return(c=c?c.displayName||c.name:"")?Yt(c):""}var Mn=Object.prototype.hasOwnProperty,br=[],vs=-1;function Ei(c){return{current:c}}function Ft(c){0>vs||(c.current=br[vs],br[vs]=null,vs--)}function wt(c,u){vs++,br[vs]=c.current,c.current=u}var ei={},An=Ei(ei),Ht=Ei(!1),Er=ei;function no(c,u){var v=c.type.contextTypes;if(!v)return ei;var M=c.stateNode;if(M&&M.__reactInternalMemoizedUnmaskedChildContext===u)return M.__reactInternalMemoizedMaskedChildContext;var b={},T;for(T in v)b[T]=u[T];return M&&(c=c.stateNode,c.__reactInternalMemoizedUnmaskedChildContext=u,c.__reactInternalMemoizedMaskedChildContext=b),b}function qn(c){return c=c.childContextTypes,c!=null}function eh(){Ft(Ht),Ft(An)}function _S(c,u,v){if(An.current!==ei)throw Error(o(168));wt(An,u),wt(Ht,v)}function wS(c,u,v){var M=c.stateNode;if(u=u.childContextTypes,typeof M.getChildContext!="function")return v;M=M.getChildContext();for(var b in M)if(!(b in u))throw Error(o(108,L(c)||"Unknown",b));return s({},v,M)}function th(c){return c=(c=c.stateNode)&&c.__reactInternalMemoizedMergedChildContext||ei,Er=An.current,wt(An,c),wt(Ht,Ht.current),!0}function SS(c,u,v){var M=c.stateNode;if(!M)throw Error(o(169));v?(c=wS(c,u,Er),M.__reactInternalMemoizedMergedChildContext=c,Ft(Ht),Ft(An),wt(An,c)):Ft(Ht),wt(Ht,v)}var Tr=Math.clz32?Math.clz32:mD,hD=Math.log,pD=Math.LN2;function mD(c){return c>>>=0,c===0?32:31-(hD(c)/pD|0)|0}var nh=64,ih=4194304;function mu(c){switch(c&-c){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: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 c&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return c&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return c}}function rh(c,u){var v=c.pendingLanes;if(v===0)return 0;var M=0,b=c.suspendedLanes,T=c.pingedLanes,F=v&268435455;if(F!==0){var $=F&~b;$!==0?M=mu($):(T&=F,T!==0&&(M=mu(T)))}else F=v&~b,F!==0?M=mu(F):T!==0&&(M=mu(T));if(M===0)return 0;if(u!==0&&u!==M&&!(u&b)&&(b=M&-M,T=u&-u,b>=T||b===16&&(T&4194240)!==0))return u;if(M&4&&(M|=v&16),u=c.entangledLanes,u!==0)for(c=c.entanglements,u&=M;0v;v++)u.push(c);return u}function gu(c,u,v){c.pendingLanes|=u,u!==536870912&&(c.suspendedLanes=0,c.pingedLanes=0),c=c.eventTimes,u=31-Tr(u),c[u]=v}function yD(c,u){var v=c.pendingLanes&~u;c.pendingLanes=u,c.suspendedLanes=0,c.pingedLanes=0,c.expiredLanes&=u,c.mutableReadLanes&=u,c.entangledLanes&=u,u=c.entanglements;var M=c.eventTimes;for(c=c.expirationTimes;0>=F,b-=F,_s=1<<32-Tr(u)+b|v<Ut?(Vn=xt,xt=null):Vn=xt.sibling;var zt=lt(ae,xt,fe[Ut],We);if(zt===null){xt===null&&(xt=Vn);break}c&&xt&&zt.alternate===null&&u(ae,xt),J=T(zt,J,Ut),Mt===null?rt=zt:Mt.sibling=zt,Mt=zt,xt=Vn}if(Ut===fe.length)return v(ae,xt),Qt&&fa(ae,Ut),rt;if(xt===null){for(;UtUt?(Vn=xt,xt=null):Vn=xt.sibling;var uo=lt(ae,xt,zt.value,We);if(uo===null){xt===null&&(xt=Vn);break}c&&xt&&uo.alternate===null&&u(ae,xt),J=T(uo,J,Ut),Mt===null?rt=uo:Mt.sibling=uo,Mt=uo,xt=Vn}if(zt.done)return v(ae,xt),Qt&&fa(ae,Ut),rt;if(xt===null){for(;!zt.done;Ut++,zt=fe.next())zt=yt(ae,zt.value,We),zt!==null&&(J=T(zt,J,Ut),Mt===null?rt=zt:Mt.sibling=zt,Mt=zt);return Qt&&fa(ae,Ut),rt}for(xt=M(ae,xt);!zt.done;Ut++,zt=fe.next())zt=jt(xt,ae,Ut,zt.value,We),zt!==null&&(c&&zt.alternate!==null&&xt.delete(zt.key===null?Ut:zt.key),J=T(zt,J,Ut),Mt===null?rt=zt:Mt.sibling=zt,Mt=zt);return c&&xt.forEach(function(ik){return u(ae,ik)}),Qt&&fa(ae,Ut),rt}function dr(ae,J,fe,We){if(typeof fe=="object"&&fe!==null&&fe.type===d&&fe.key===null&&(fe=fe.props.children),typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case l:e:{for(var rt=fe.key,Mt=J;Mt!==null;){if(Mt.key===rt){if(rt=fe.type,rt===d){if(Mt.tag===7){v(ae,Mt.sibling),J=b(Mt,fe.props.children),J.return=ae,ae=J;break e}}else if(Mt.elementType===rt||typeof rt=="object"&&rt!==null&&rt.$$typeof===S&&zS(rt)===Mt.type){v(ae,Mt.sibling),J=b(Mt,fe.props),J.ref=xu(ae,Mt,fe),J.return=ae,ae=J;break e}v(ae,Mt);break}else u(ae,Mt);Mt=Mt.sibling}fe.type===d?(J=ya(fe.props.children,ae.mode,We,fe.key),J.return=ae,ae=J):(We=Xh(fe.type,fe.key,fe.props,null,ae.mode,We),We.ref=xu(ae,J,fe),We.return=ae,ae=We)}return F(ae);case f:e:{for(Mt=fe.key;J!==null;){if(J.key===Mt)if(J.tag===4&&J.stateNode.containerInfo===fe.containerInfo&&J.stateNode.implementation===fe.implementation){v(ae,J.sibling),J=b(J,fe.children||[]),J.return=ae,ae=J;break e}else{v(ae,J);break}else u(ae,J);J=J.sibling}J=hv(fe,ae.mode,We),J.return=ae,ae=J}return F(ae);case S:return Mt=fe._init,dr(ae,J,Mt(fe._payload),We)}if(Y(fe))return ot(ae,J,fe,We);if(P(fe))return ri(ae,J,fe,We);mh(ae,fe)}return typeof fe=="string"&&fe!==""||typeof fe=="number"?(fe=""+fe,J!==null&&J.tag===6?(v(ae,J.sibling),J=b(J,fe),J.return=ae,ae=J):(v(ae,J),J=dv(fe,ae.mode,We),J.return=ae,ae=J),F(ae)):v(ae,J)}return dr}var El=FS(!0),BS=FS(!1),_u={},lr=Ei(_u),wu=Ei(_u),Tl=Ei(_u);function Jr(c){if(c===_u)throw Error(o(174));return c}function L0(c,u){wt(Tl,u),wt(wu,c),wt(lr,_u),c=ne(u),Ft(lr),wt(lr,c)}function Cl(){Ft(lr),Ft(wu),Ft(Tl)}function VS(c){var u=Jr(Tl.current),v=Jr(lr.current);u=D(v,c.type,u),v!==u&&(wt(wu,c),wt(lr,u))}function R0(c){wu.current===c&&(Ft(lr),Ft(wu))}var rn=Ei(0);function gh(c){for(var u=c;u!==null;){if(u.tag===13){var v=u.memoizedState;if(v!==null&&(v=v.dehydrated,v===null||hi(v)||pi(v)))return u}else if(u.tag===19&&u.memoizedProps.revealOrder!==void 0){if(u.flags&128)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===c)break;for(;u.sibling===null;){if(u.return===null||u.return===c)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var I0=[];function D0(){for(var c=0;cv?v:4,c(!0);var M=cr.transition;cr.transition={};try{c(!1),u()}finally{Ot=v,cr.transition=M}}function tM(){return Kr().memoizedState}function LD(c,u,v){var M=ao(c);v={lane:M,action:v,hasEagerState:!1,eagerState:null,next:null},nM(c)?iM(u,v):(rM(c,u,v),v=gi(),c=ur(c,M,v),c!==null&&sM(c,u,M))}function RD(c,u,v){var M=ao(c),b={lane:M,action:v,hasEagerState:!1,eagerState:null,next:null};if(nM(c))iM(u,b);else{rM(c,u,b);var T=c.alternate;if(c.lanes===0&&(T===null||T.lanes===0)&&(T=u.lastRenderedReducer,T!==null))try{var F=u.lastRenderedState,$=T(F,v);if(b.hasEagerState=!0,b.eagerState=$,qr($,F))return}catch{}finally{}v=gi(),c=ur(c,M,v),c!==null&&sM(c,u,M)}}function nM(c){var u=c.alternate;return c===fn||u!==null&&u===fn}function iM(c,u){Su=yh=!0;var v=c.pending;v===null?u.next=u:(u.next=v.next,v.next=u),c.pending=u}function rM(c,u,v){bn!==null&&c.mode&1&&!(Et&2)?(c=u.interleaved,c===null?(v.next=v,$r===null?$r=[u]:$r.push(u)):(v.next=c.next,c.next=v),u.interleaved=v):(c=u.pending,c===null?v.next=v:(v.next=c.next,c.next=v),u.pending=v)}function sM(c,u,v){if(v&4194240){var M=u.lanes;M&=c.pendingLanes,v|=M,u.lanes=v,h0(c,v)}}var Mh={readContext:sr,useCallback:ni,useContext:ni,useEffect:ni,useImperativeHandle:ni,useInsertionEffect:ni,useLayoutEffect:ni,useMemo:ni,useReducer:ni,useRef:ni,useState:ni,useDebugValue:ni,useDeferredValue:ni,useTransition:ni,useMutableSource:ni,useSyncExternalStore:ni,useId:ni,unstable_isNewReconciler:!1},ID={readContext:sr,useCallback:function(c,u){return Ss().memoizedState=[c,u===void 0?null:u],c},useContext:sr,useEffect:z0,useImperativeHandle:function(c,u,v){return v=v!=null?v.concat([c]):null,wh(4194308,4,JS.bind(null,u,c),v)},useLayoutEffect:function(c,u){return wh(4194308,4,c,u)},useInsertionEffect:function(c,u){return wh(4,2,c,u)},useMemo:function(c,u){var v=Ss();return u=u===void 0?null:u,c=c(),v.memoizedState=[c,u],c},useReducer:function(c,u,v){var M=Ss();return u=v!==void 0?v(u):u,M.memoizedState=M.baseState=u,c={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:c,lastRenderedState:u},M.queue=c,c=c.dispatch=LD.bind(null,fn,c),[M.memoizedState,c]},useRef:function(c){var u=Ss();return c={current:c},u.memoizedState=c},useState:U0,useDebugValue:F0,useDeferredValue:function(c){var u=U0(c),v=u[0],M=u[1];return z0(function(){var b=cr.transition;cr.transition={};try{M(c)}finally{cr.transition=b}},[c]),v},useTransition:function(){var c=U0(!1),u=c[0];return c=PD.bind(null,c[1]),Ss().memoizedState=c,[u,c]},useMutableSource:function(){},useSyncExternalStore:function(c,u,v){var M=fn,b=Ss();if(Qt){if(v===void 0)throw Error(o(407));v=v()}else{if(v=u(),bn===null)throw Error(o(349));Pl&30||GS(M,u,v)}b.memoizedState=v;var T={value:v,getSnapshot:u};return b.queue=T,z0(XS.bind(null,M,T,c),[c]),M.flags|=2048,Au(9,jS.bind(null,M,T,v,u),void 0,null),v},useId:function(){var c=Ss(),u=bn.identifierPrefix;if(Qt){var v=ws,M=_s;v=(M&~(1<<32-Tr(M)-1)).toString(32)+v,u=":"+u+"R"+v,v=Mu++,0rv&&(u.flags|=128,M=!0,Cu(b,!1),u.lanes=4194304)}else{if(!M)if(c=gh(T),c!==null){if(u.flags|=128,M=!0,c=c.updateQueue,c!==null&&(u.updateQueue=c,u.flags|=4),Cu(b,!0),b.tail===null&&b.tailMode==="hidden"&&!T.alternate&&!Qt)return ii(u),null}else 2*Fn()-b.renderingStartTime>rv&&v!==1073741824&&(u.flags|=128,M=!0,Cu(b,!1),u.lanes=4194304);b.isBackwards?(T.sibling=u.child,u.child=T):(c=b.last,c!==null?c.sibling=T:u.child=T,b.last=T)}return b.tail!==null?(u=b.tail,b.rendering=u,b.tail=u.sibling,b.renderingStartTime=Fn(),u.sibling=null,c=rn.current,wt(rn,M?c&1|2:c&1),u):(ii(u),null);case 22:case 23:return cv(),M=u.memoizedState!==null,c!==null&&c.memoizedState!==null!==M&&(u.flags|=8192),M&&u.mode&1?Wi&1073741824&&(ii(u),Me&&u.subtreeFlags&6&&(u.flags|=8192)):ii(u),null;case 24:return null;case 25:return null}throw Error(o(156,u.tag))}var UD=a.ReactCurrentOwner,Hi=!1;function mi(c,u,v,M){u.child=c===null?BS(u,null,v,M):El(u,c.child,v,M)}function hM(c,u,v,M,b){v=v.render;var T=u.ref;return Sl(u,b),M=N0(c,u,v,M,T,b),v=O0(),c!==null&&!Hi?(u.updateQueue=c.updateQueue,u.flags&=-2053,c.lanes&=~b,Ms(c,u,b)):(Qt&&v&&b0(u),u.flags|=1,mi(c,u,M,b),u.child)}function pM(c,u,v,M,b){if(c===null){var T=v.type;return typeof T=="function"&&!fv(T)&&T.defaultProps===void 0&&v.compare===null&&v.defaultProps===void 0?(u.tag=15,u.type=T,mM(c,u,T,M,b)):(c=Xh(v.type,null,M,u,u.mode,b),c.ref=u.ref,c.return=u,u.child=c)}if(T=c.child,!(c.lanes&b)){var F=T.memoizedProps;if(v=v.compare,v=v!==null?v:ah,v(F,M)&&c.ref===u.ref)return Ms(c,u,b)}return u.flags|=1,c=co(T,M),c.ref=u.ref,c.return=u,u.child=c}function mM(c,u,v,M,b){if(c!==null&&ah(c.memoizedProps,M)&&c.ref===u.ref)if(Hi=!1,(c.lanes&b)!==0)c.flags&131072&&(Hi=!0);else return u.lanes=c.lanes,Ms(c,u,b);return H0(c,u,v,M,b)}function gM(c,u,v){var M=u.pendingProps,b=M.children,T=c!==null?c.memoizedState:null;if(M.mode==="hidden")if(!(u.mode&1))u.memoizedState={baseLanes:0,cachePool:null},wt(Ll,Wi),Wi|=v;else if(v&1073741824)u.memoizedState={baseLanes:0,cachePool:null},M=T!==null?T.baseLanes:v,wt(Ll,Wi),Wi|=M;else return c=T!==null?T.baseLanes|v:v,u.lanes=u.childLanes=1073741824,u.memoizedState={baseLanes:c,cachePool:null},u.updateQueue=null,wt(Ll,Wi),Wi|=c,null;else T!==null?(M=T.baseLanes|v,u.memoizedState=null):M=v,wt(Ll,Wi),Wi|=M;return mi(c,u,b,v),u.child}function vM(c,u){var v=u.ref;(c===null&&v!==null||c!==null&&c.ref!==v)&&(u.flags|=512,u.flags|=2097152)}function H0(c,u,v,M,b){var T=qn(v)?Er:An.current;return T=no(u,T),Sl(u,b),v=N0(c,u,v,M,T,b),M=O0(),c!==null&&!Hi?(u.updateQueue=c.updateQueue,u.flags&=-2053,c.lanes&=~b,Ms(c,u,b)):(Qt&&M&&b0(u),u.flags|=1,mi(c,u,v,b),u.child)}function yM(c,u,v,M,b){if(qn(v)){var T=!0;th(u)}else T=!1;if(Sl(u,b),u.stateNode===null)c!==null&&(c.alternate=null,u.alternate=null,u.flags|=2),IS(u,v,M),A0(u,v,M,b),M=!0;else if(c===null){var F=u.stateNode,$=u.memoizedProps;F.props=$;var me=F.context,ke=v.contextType;typeof ke=="object"&&ke!==null?ke=sr(ke):(ke=qn(v)?Er:An.current,ke=no(u,ke));var $e=v.getDerivedStateFromProps,yt=typeof $e=="function"||typeof F.getSnapshotBeforeUpdate=="function";yt||typeof F.UNSAFE_componentWillReceiveProps!="function"&&typeof F.componentWillReceiveProps!="function"||($!==M||me!==ke)&&DS(u,F,M,ke),io=!1;var lt=u.memoizedState;F.state=lt,fh(u,M,F,b),me=u.memoizedState,$!==M||lt!==me||Ht.current||io?(typeof $e=="function"&&(M0(u,v,$e,M),me=u.memoizedState),($=io||RS(u,v,$,M,lt,me,ke))?(yt||typeof F.UNSAFE_componentWillMount!="function"&&typeof F.componentWillMount!="function"||(typeof F.componentWillMount=="function"&&F.componentWillMount(),typeof F.UNSAFE_componentWillMount=="function"&&F.UNSAFE_componentWillMount()),typeof F.componentDidMount=="function"&&(u.flags|=4194308)):(typeof F.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=M,u.memoizedState=me),F.props=M,F.state=me,F.context=ke,M=$):(typeof F.componentDidMount=="function"&&(u.flags|=4194308),M=!1)}else{F=u.stateNode,TS(c,u),$=u.memoizedProps,ke=u.type===u.elementType?$:Cr(u.type,$),F.props=ke,yt=u.pendingProps,lt=F.context,me=v.contextType,typeof me=="object"&&me!==null?me=sr(me):(me=qn(v)?Er:An.current,me=no(u,me));var jt=v.getDerivedStateFromProps;($e=typeof jt=="function"||typeof F.getSnapshotBeforeUpdate=="function")||typeof F.UNSAFE_componentWillReceiveProps!="function"&&typeof F.componentWillReceiveProps!="function"||($!==yt||lt!==me)&&DS(u,F,M,me),io=!1,lt=u.memoizedState,F.state=lt,fh(u,M,F,b);var ot=u.memoizedState;$!==yt||lt!==ot||Ht.current||io?(typeof jt=="function"&&(M0(u,v,jt,M),ot=u.memoizedState),(ke=io||RS(u,v,ke,M,lt,ot,me)||!1)?($e||typeof F.UNSAFE_componentWillUpdate!="function"&&typeof F.componentWillUpdate!="function"||(typeof F.componentWillUpdate=="function"&&F.componentWillUpdate(M,ot,me),typeof F.UNSAFE_componentWillUpdate=="function"&&F.UNSAFE_componentWillUpdate(M,ot,me)),typeof F.componentDidUpdate=="function"&&(u.flags|=4),typeof F.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof F.componentDidUpdate!="function"||$===c.memoizedProps&<===c.memoizedState||(u.flags|=4),typeof F.getSnapshotBeforeUpdate!="function"||$===c.memoizedProps&<===c.memoizedState||(u.flags|=1024),u.memoizedProps=M,u.memoizedState=ot),F.props=M,F.state=ot,F.context=me,M=ke):(typeof F.componentDidUpdate!="function"||$===c.memoizedProps&<===c.memoizedState||(u.flags|=4),typeof F.getSnapshotBeforeUpdate!="function"||$===c.memoizedProps&<===c.memoizedState||(u.flags|=1024),M=!1)}return W0(c,u,v,M,T,b)}function W0(c,u,v,M,b,T){vM(c,u);var F=(u.flags&128)!==0;if(!M&&!F)return b&&SS(u,v,!1),Ms(c,u,T);M=u.stateNode,UD.current=u;var $=F&&typeof v.getDerivedStateFromError!="function"?null:M.render();return u.flags|=1,c!==null&&F?(u.child=El(u,c.child,null,T),u.child=El(u,null,$,T)):mi(c,u,$,T),u.memoizedState=M.state,b&&SS(u,v,!0),u.child}function xM(c){var u=c.stateNode;u.pendingContext?_S(c,u.pendingContext,u.pendingContext!==u.context):u.context&&_S(c,u.context,!1),L0(c,u.containerInfo)}function _M(c,u,v,M,b){return bl(),P0(b),u.flags|=256,mi(c,u,v,M),u.child}var Eh={dehydrated:null,treeContext:null,retryLane:0};function Th(c){return{baseLanes:c,cachePool:null}}function wM(c,u,v){var M=u.pendingProps,b=rn.current,T=!1,F=(u.flags&128)!==0,$;if(($=F)||($=c!==null&&c.memoizedState===null?!1:(b&2)!==0),$?(T=!0,u.flags&=-129):(c===null||c.memoizedState!==null)&&(b|=1),wt(rn,b&1),c===null)return C0(u),c=u.memoizedState,c!==null&&(c=c.dehydrated,c!==null)?(u.mode&1?pi(c)?u.lanes=8:u.lanes=1073741824:u.lanes=1,null):(b=M.children,c=M.fallback,T?(M=u.mode,T=u.child,b={mode:"hidden",children:b},!(M&1)&&T!==null?(T.childLanes=0,T.pendingProps=b):T=Yh(b,M,0,null),c=ya(c,M,v,null),T.return=u,c.return=u,T.sibling=c,u.child=T,u.child.memoizedState=Th(v),u.memoizedState=Eh,c):G0(u,b));if(b=c.memoizedState,b!==null){if($=b.dehydrated,$!==null){if(F)return u.flags&256?(u.flags&=-257,Ch(c,u,v,Error(o(422)))):u.memoizedState!==null?(u.child=c.child,u.flags|=128,null):(T=M.fallback,b=u.mode,M=Yh({mode:"visible",children:M.children},b,0,null),T=ya(T,b,v,null),T.flags|=2,M.return=u,T.return=u,M.sibling=T,u.child=M,u.mode&1&&El(u,c.child,null,v),u.child.memoizedState=Th(v),u.memoizedState=Eh,T);if(!(u.mode&1))u=Ch(c,u,v,null);else if(pi($))u=Ch(c,u,v,Error(o(419)));else if(M=(v&c.childLanes)!==0,Hi||M){if(M=bn,M!==null){switch(v&-v){case 4:T=2;break;case 16:T=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:T=32;break;case 536870912:T=268435456;break;default:T=0}M=T&(M.suspendedLanes|v)?0:T,M!==0&&M!==b.retryLane&&(b.retryLane=M,ur(c,M,-1))}uv(),u=Ch(c,u,v,Error(o(421)))}else hi($)?(u.flags|=128,u.child=c.child,u=$D.bind(null,c),Yn($,u),u=null):(v=b.treeContext,oe&&(Vi=se($),Bi=u,Qt=!0,Pr=null,vu=!1,v!==null&&(or[ar++]=_s,or[ar++]=ws,or[ar++]=ua,_s=v.id,ws=v.overflow,ua=u)),u=G0(u,u.pendingProps.children),u.flags|=4096);return u}return T?(M=MM(c,u,M.children,M.fallback,v),T=u.child,b=c.child.memoizedState,T.memoizedState=b===null?Th(v):{baseLanes:b.baseLanes|v,cachePool:null},T.childLanes=c.childLanes&~v,u.memoizedState=Eh,M):(v=SM(c,u,M.children,v),u.memoizedState=null,v)}return T?(M=MM(c,u,M.children,M.fallback,v),T=u.child,b=c.child.memoizedState,T.memoizedState=b===null?Th(v):{baseLanes:b.baseLanes|v,cachePool:null},T.childLanes=c.childLanes&~v,u.memoizedState=Eh,M):(v=SM(c,u,M.children,v),u.memoizedState=null,v)}function G0(c,u){return u=Yh({mode:"visible",children:u},c.mode,0,null),u.return=c,c.child=u}function SM(c,u,v,M){var b=c.child;return c=b.sibling,v=co(b,{mode:"visible",children:v}),!(u.mode&1)&&(v.lanes=M),v.return=u,v.sibling=null,c!==null&&(M=u.deletions,M===null?(u.deletions=[c],u.flags|=16):M.push(c)),u.child=v}function MM(c,u,v,M,b){var T=u.mode;c=c.child;var F=c.sibling,$={mode:"hidden",children:v};return!(T&1)&&u.child!==c?(v=u.child,v.childLanes=0,v.pendingProps=$,u.deletions=null):(v=co(c,$),v.subtreeFlags=c.subtreeFlags&14680064),F!==null?M=co(F,M):(M=ya(M,T,b,null),M.flags|=2),M.return=u,v.return=u,v.sibling=M,u.child=v,M}function Ch(c,u,v,M){return M!==null&&P0(M),El(u,c.child,null,v),c=G0(u,u.pendingProps.children),c.flags|=2,u.memoizedState=null,c}function AM(c,u,v){c.lanes|=u;var M=c.alternate;M!==null&&(M.lanes|=u),w0(c.return,u,v)}function j0(c,u,v,M,b){var T=c.memoizedState;T===null?c.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:M,tail:v,tailMode:b}:(T.isBackwards=u,T.rendering=null,T.renderingStartTime=0,T.last=M,T.tail=v,T.tailMode=b)}function bM(c,u,v){var M=u.pendingProps,b=M.revealOrder,T=M.tail;if(mi(c,u,M.children,v),M=rn.current,M&2)M=M&1|2,u.flags|=128;else{if(c!==null&&c.flags&128)e:for(c=u.child;c!==null;){if(c.tag===13)c.memoizedState!==null&&AM(c,v,u);else if(c.tag===19)AM(c,v,u);else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===u)break e;for(;c.sibling===null;){if(c.return===null||c.return===u)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}M&=1}if(wt(rn,M),!(u.mode&1))u.memoizedState=null;else switch(b){case"forwards":for(v=u.child,b=null;v!==null;)c=v.alternate,c!==null&&gh(c)===null&&(b=v),v=v.sibling;v=b,v===null?(b=u.child,u.child=null):(b=v.sibling,v.sibling=null),j0(u,!1,b,v,T);break;case"backwards":for(v=null,b=u.child,u.child=null;b!==null;){if(c=b.alternate,c!==null&&gh(c)===null){u.child=b;break}c=b.sibling,b.sibling=v,v=b,b=c}j0(u,!0,v,null,T);break;case"together":j0(u,!1,null,null,void 0);break;default:u.memoizedState=null}return u.child}function Ms(c,u,v){if(c!==null&&(u.dependencies=c.dependencies),Rl|=u.lanes,!(v&u.childLanes))return null;if(c!==null&&u.child!==c.child)throw Error(o(153));if(u.child!==null){for(c=u.child,v=co(c,c.pendingProps),u.child=v,v.return=u;c.sibling!==null;)c=c.sibling,v=v.sibling=co(c,c.pendingProps),v.return=u;v.sibling=null}return u.child}function zD(c,u,v){switch(u.tag){case 3:xM(u),bl();break;case 5:VS(u);break;case 1:qn(u.type)&&th(u);break;case 4:L0(u,u.stateNode.containerInfo);break;case 10:ES(u,u.type._context,u.memoizedProps.value);break;case 13:var M=u.memoizedState;if(M!==null)return M.dehydrated!==null?(wt(rn,rn.current&1),u.flags|=128,null):v&u.child.childLanes?wM(c,u,v):(wt(rn,rn.current&1),c=Ms(c,u,v),c!==null?c.sibling:null);wt(rn,rn.current&1);break;case 19:if(M=(v&u.childLanes)!==0,c.flags&128){if(M)return bM(c,u,v);u.flags|=128}var b=u.memoizedState;if(b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),wt(rn,rn.current),M)break;return null;case 22:case 23:return u.lanes=0,gM(c,u,v)}return Ms(c,u,v)}function FD(c,u){switch(E0(u),u.tag){case 1:return qn(u.type)&&eh(),c=u.flags,c&65536?(u.flags=c&-65537|128,u):null;case 3:return Cl(),Ft(Ht),Ft(An),D0(),c=u.flags,c&65536&&!(c&128)?(u.flags=c&-65537|128,u):null;case 5:return R0(u),null;case 13:if(Ft(rn),c=u.memoizedState,c!==null&&c.dehydrated!==null){if(u.alternate===null)throw Error(o(340));bl()}return c=u.flags,c&65536?(u.flags=c&-65537|128,u):null;case 19:return Ft(rn),null;case 4:return Cl(),null;case 10:return _0(u.type._context),null;case 22:case 23:return cv(),null;case 24:return null;default:return null}}var Ph=!1,ha=!1,BD=typeof WeakSet=="function"?WeakSet:Set,Ve=null;function Lh(c,u){var v=c.ref;if(v!==null)if(typeof v=="function")try{v(null)}catch(M){Pi(c,u,M)}else v.current=null}function X0(c,u,v){try{v()}catch(M){Pi(c,u,M)}}var EM=!1;function VD(c,u){for(B(c.containerInfo),Ve=u;Ve!==null;)if(c=Ve,u=c.child,(c.subtreeFlags&1028)!==0&&u!==null)u.return=c,Ve=u;else for(;Ve!==null;){c=Ve;try{var v=c.alternate;if(c.flags&1024)switch(c.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var M=v.memoizedProps,b=v.memoizedState,T=c.stateNode,F=T.getSnapshotBeforeUpdate(c.elementType===c.type?M:Cr(c.type,M),b);T.__reactInternalSnapshotBeforeUpdate=F}break;case 3:Me&&Ie(c.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch($){Pi(c,c.return,$)}if(u=c.sibling,u!==null){u.return=c.return,Ve=u;break}Ve=c.return}return v=EM,EM=!1,v}function pa(c,u,v){var M=u.updateQueue;if(M=M!==null?M.lastEffect:null,M!==null){var b=M=M.next;do{if((b.tag&c)===c){var T=b.destroy;b.destroy=void 0,T!==void 0&&X0(u,v,T)}b=b.next}while(b!==M)}}function Pu(c,u){if(u=u.updateQueue,u=u!==null?u.lastEffect:null,u!==null){var v=u=u.next;do{if((v.tag&c)===c){var M=v.create;v.destroy=M()}v=v.next}while(v!==u)}}function Y0(c){var u=c.ref;if(u!==null){var v=c.stateNode;switch(c.tag){case 5:c=te(v);break;default:c=v}typeof u=="function"?u(c):u.current=c}}function TM(c,u,v){if(Yr&&typeof Yr.onCommitFiberUnmount=="function")try{Yr.onCommitFiberUnmount(sh,u)}catch{}switch(u.tag){case 0:case 11:case 14:case 15:if(c=u.updateQueue,c!==null&&(c=c.lastEffect,c!==null)){var M=c=c.next;do{var b=M,T=b.destroy;b=b.tag,T!==void 0&&(b&2||b&4)&&X0(u,v,T),M=M.next}while(M!==c)}break;case 1:if(Lh(u,v),c=u.stateNode,typeof c.componentWillUnmount=="function")try{c.props=u.memoizedProps,c.state=u.memoizedState,c.componentWillUnmount()}catch(F){Pi(u,v,F)}break;case 5:Lh(u,v);break;case 4:Me?DM(c,u,v):ve&&ve&&(u=u.stateNode.containerInfo,v=Ue(u),Ln(u,v))}}function CM(c,u,v){for(var M=u;;)if(TM(c,M,v),M.child===null||Me&&M.tag===4){if(M===u)break;for(;M.sibling===null;){if(M.return===null||M.return===u)return;M=M.return}M.sibling.return=M.return,M=M.sibling}else M.child.return=M,M=M.child}function PM(c){var u=c.alternate;u!==null&&(c.alternate=null,PM(u)),c.child=null,c.deletions=null,c.sibling=null,c.tag===5&&(u=c.stateNode,u!==null&&Ye(u)),c.stateNode=null,c.return=null,c.dependencies=null,c.memoizedProps=null,c.memoizedState=null,c.pendingProps=null,c.stateNode=null,c.updateQueue=null}function LM(c){return c.tag===5||c.tag===3||c.tag===4}function RM(c){e:for(;;){for(;c.sibling===null;){if(c.return===null||LM(c.return))return null;c=c.return}for(c.sibling.return=c.return,c=c.sibling;c.tag!==5&&c.tag!==6&&c.tag!==18;){if(c.flags&2||c.child===null||c.tag===4)continue e;c.child.return=c,c=c.child}if(!(c.flags&2))return c.stateNode}}function IM(c){if(Me){e:{for(var u=c.return;u!==null;){if(LM(u))break e;u=u.return}throw Error(o(160))}var v=u;switch(v.tag){case 5:u=v.stateNode,v.flags&32&&(ut(u),v.flags&=-33),v=RM(c),Z0(c,v,u);break;case 3:case 4:u=v.stateNode.containerInfo,v=RM(c),q0(c,v,u);break;default:throw Error(o(161))}}}function q0(c,u,v){var M=c.tag;if(M===5||M===6)c=c.stateNode,u?ye(v,c,u):Oe(v,c);else if(M!==4&&(c=c.child,c!==null))for(q0(c,u,v),c=c.sibling;c!==null;)q0(c,u,v),c=c.sibling}function Z0(c,u,v){var M=c.tag;if(M===5||M===6)c=c.stateNode,u?de(v,c,u):nt(v,c);else if(M!==4&&(c=c.child,c!==null))for(Z0(c,u,v),c=c.sibling;c!==null;)Z0(c,u,v),c=c.sibling}function DM(c,u,v){for(var M=u,b=!1,T,F;;){if(!b){b=M.return;e:for(;;){if(b===null)throw Error(o(160));switch(T=b.stateNode,b.tag){case 5:F=!1;break e;case 3:T=T.containerInfo,F=!0;break e;case 4:T=T.containerInfo,F=!0;break e}b=b.return}b=!0}if(M.tag===5||M.tag===6)CM(c,M,v),F?tt(T,M.stateNode):Ce(T,M.stateNode);else if(M.tag===18)F?mt(T,M.stateNode):vt(T,M.stateNode);else if(M.tag===4){if(M.child!==null){T=M.stateNode.containerInfo,F=!0,M.child.return=M,M=M.child;continue}}else if(TM(c,M,v),M.child!==null){M.child.return=M,M=M.child;continue}if(M===u)break;for(;M.sibling===null;){if(M.return===null||M.return===u)return;M=M.return,M.tag===4&&(b=!1)}M.sibling.return=M.return,M=M.sibling}}function $0(c,u){if(Me){switch(u.tag){case 0:case 11:case 14:case 15:pa(3,u,u.return),Pu(3,u),pa(5,u,u.return);return;case 1:return;case 5:var v=u.stateNode;if(v!=null){var M=u.memoizedProps;c=c!==null?c.memoizedProps:M;var b=u.type,T=u.updateQueue;u.updateQueue=null,T!==null&&G(v,T,b,c,M,u)}return;case 6:if(u.stateNode===null)throw Error(o(162));v=u.memoizedProps,he(u.stateNode,c!==null?c.memoizedProps:v,v);return;case 3:oe&&c!==null&&c.memoizedState.isDehydrated&&Ke(u.stateNode.containerInfo);return;case 12:return;case 13:Rh(u);return;case 19:Rh(u);return;case 17:return}throw Error(o(163))}switch(u.tag){case 0:case 11:case 14:case 15:pa(3,u,u.return),Pu(3,u),pa(5,u,u.return);return;case 12:return;case 13:Rh(u);return;case 19:Rh(u);return;case 3:oe&&c!==null&&c.memoizedState.isDehydrated&&Ke(u.stateNode.containerInfo);break;case 22:case 23:return}e:if(ve){switch(u.tag){case 1:case 5:case 6:break e;case 3:case 4:u=u.stateNode,Ln(u.containerInfo,u.pendingChildren);break e}throw Error(o(163))}}function Rh(c){var u=c.updateQueue;if(u!==null){c.updateQueue=null;var v=c.stateNode;v===null&&(v=c.stateNode=new BD),u.forEach(function(M){var b=JD.bind(null,c,M);v.has(M)||(v.add(M),M.then(b,b))})}}function HD(c,u){for(Ve=u;Ve!==null;){u=Ve;var v=u.deletions;if(v!==null)for(var M=0;M";case Dh:return":has("+(Q0(c)||"")+")";case kh:return'[role="'+c.value+'"]';case Oh:return'"'+c.value+'"';case Nh:return'[data-testname="'+c.value+'"]';default:throw Error(o(365))}}function zM(c,u){var v=[];c=[c,0];for(var M=0;Mb&&(b=F),M&=~T}if(M=b,M=Fn()-M,M=(120>M?120:480>M?480:1080>M?1080:1920>M?1920:3e3>M?3e3:4320>M?4320:1960*GD(M/1960))-M,10c?16:c,oo===null)var M=!1;else{if(c=oo,oo=null,Vh=0,Et&6)throw Error(o(331));var b=Et;for(Et|=4,Ve=c.current;Ve!==null;){var T=Ve,F=T.child;if(Ve.flags&16){var $=T.deletions;if($!==null){for(var me=0;me<$.length;me++){var ke=$[me];for(Ve=ke;Ve!==null;){var $e=Ve;switch($e.tag){case 0:case 11:case 15:pa(8,$e,T)}var yt=$e.child;if(yt!==null)yt.return=$e,Ve=yt;else for(;Ve!==null;){$e=Ve;var lt=$e.sibling,jt=$e.return;if(PM($e),$e===ke){Ve=null;break}if(lt!==null){lt.return=jt,Ve=lt;break}Ve=jt}}}var ot=T.alternate;if(ot!==null){var ri=ot.child;if(ri!==null){ot.child=null;do{var dr=ri.sibling;ri.sibling=null,ri=dr}while(ri!==null)}}Ve=T}}if(T.subtreeFlags&2064&&F!==null)F.return=T,Ve=F;else e:for(;Ve!==null;){if(T=Ve,T.flags&2048)switch(T.tag){case 0:case 11:case 15:pa(9,T,T.return)}var ae=T.sibling;if(ae!==null){ae.return=T.return,Ve=ae;break e}Ve=T.return}}var J=c.current;for(Ve=J;Ve!==null;){F=Ve;var fe=F.child;if(F.subtreeFlags&2064&&fe!==null)fe.return=F,Ve=fe;else e:for(F=J;Ve!==null;){if($=Ve,$.flags&2048)try{switch($.tag){case 0:case 11:case 15:Pu(9,$)}}catch(rt){Pi($,$.return,rt)}if($===F){Ve=null;break e}var We=$.sibling;if(We!==null){We.return=$.return,Ve=We;break e}Ve=$.return}}if(Et=b,Zr(),Yr&&typeof Yr.onPostCommitFiberRoot=="function")try{Yr.onPostCommitFiberRoot(sh,c)}catch{}M=!0}return M}finally{Ot=v,yn.transition=u}}return!1}function XM(c,u,v){u=B0(v,u),u=oM(c,u,1),ro(c,u),u=gi(),c=Gh(c,1),c!==null&&(gu(c,1,u),Ci(c,u))}function Pi(c,u,v){if(c.tag===3)XM(c,c,v);else for(;u!==null;){if(u.tag===3){XM(u,c,v);break}else if(u.tag===1){var M=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof M.componentDidCatch=="function"&&(so===null||!so.has(M))){c=B0(v,c),c=aM(u,c,1),ro(u,c),c=gi(),u=Gh(u,1),u!==null&&(gu(u,1,c),Ci(u,c));break}}u=u.return}}function ZD(c,u,v){var M=c.pingCache;M!==null&&M.delete(u),u=gi(),c.pingedLanes|=c.suspendedLanes&v,bn===c&&(Zn&v)===v&&(Rn===4||Rn===3&&(Zn&130023424)===Zn&&500>Fn()-iv?ma(c,0):nv|=v),Ci(c,u)}function YM(c,u){u===0&&(c.mode&1?(u=ih,ih<<=1,!(ih&130023424)&&(ih=4194304)):u=1);var v=gi();c=Gh(c,u),c!==null&&(gu(c,u,v),Ci(c,v))}function $D(c){var u=c.memoizedState,v=0;u!==null&&(v=u.retryLane),YM(c,v)}function JD(c,u){var v=0;switch(c.tag){case 13:var M=c.stateNode,b=c.memoizedState;b!==null&&(v=b.retryLane);break;case 19:M=c.stateNode;break;default:throw Error(o(314))}M!==null&&M.delete(u),YM(c,v)}var qM;qM=function(c,u,v){if(c!==null)if(c.memoizedProps!==u.pendingProps||Ht.current)Hi=!0;else{if(!(c.lanes&v)&&!(u.flags&128))return Hi=!1,zD(c,u,v);Hi=!!(c.flags&131072)}else Hi=!1,Qt&&u.flags&1048576&&kS(u,ph,u.index);switch(u.lanes=0,u.tag){case 2:var M=u.type;c!==null&&(c.alternate=null,u.alternate=null,u.flags|=2),c=u.pendingProps;var b=no(u,An.current);Sl(u,v),b=N0(null,u,M,c,b,v);var T=O0();return u.flags|=1,typeof b=="object"&&b!==null&&typeof b.render=="function"&&b.$$typeof===void 0?(u.tag=1,u.memoizedState=null,u.updateQueue=null,qn(M)?(T=!0,th(u)):T=!1,u.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,S0(u),b.updater=dh,u.stateNode=b,b._reactInternals=u,A0(u,M,c,v),u=W0(null,u,M,!0,T,v)):(u.tag=0,Qt&&T&&b0(u),mi(null,u,b,v),u=u.child),u;case 16:M=u.elementType;e:{switch(c!==null&&(c.alternate=null,u.alternate=null,u.flags|=2),c=u.pendingProps,b=M._init,M=b(M._payload),u.type=M,b=u.tag=QD(M),c=Cr(M,c),b){case 0:u=H0(null,u,M,c,v);break e;case 1:u=yM(null,u,M,c,v);break e;case 11:u=hM(null,u,M,c,v);break e;case 14:u=pM(null,u,M,Cr(M.type,c),v);break e}throw Error(o(306,M,""))}return u;case 0:return M=u.type,b=u.pendingProps,b=u.elementType===M?b:Cr(M,b),H0(c,u,M,b,v);case 1:return M=u.type,b=u.pendingProps,b=u.elementType===M?b:Cr(M,b),yM(c,u,M,b,v);case 3:e:{if(xM(u),c===null)throw Error(o(387));M=u.pendingProps,T=u.memoizedState,b=T.element,TS(c,u),fh(u,M,null,v);var F=u.memoizedState;if(M=F.element,oe&&T.isDehydrated)if(T={element:M,isDehydrated:!1,cache:F.cache,transitions:F.transitions},u.updateQueue.baseState=T,u.memoizedState=T,u.flags&256){b=Error(o(423)),u=_M(c,u,M,v,b);break e}else if(M!==b){b=Error(o(424)),u=_M(c,u,M,v,b);break e}else for(oe&&(Vi=pe(u.stateNode.containerInfo),Bi=u,Qt=!0,Pr=null,vu=!1),v=BS(u,null,M,v),u.child=v;v;)v.flags=v.flags&-3|4096,v=v.sibling;else{if(bl(),M===b){u=Ms(c,u,v);break e}mi(c,u,M,v)}u=u.child}return u;case 5:return VS(u),c===null&&C0(u),M=u.type,b=u.pendingProps,T=c!==null?c.memoizedProps:null,F=b.children,be(M,b)?F=null:T!==null&&be(M,T)&&(u.flags|=32),vM(c,u),mi(c,u,F,v),u.child;case 6:return c===null&&C0(u),null;case 13:return wM(c,u,v);case 4:return L0(u,u.stateNode.containerInfo),M=u.pendingProps,c===null?u.child=El(u,null,M,v):mi(c,u,M,v),u.child;case 11:return M=u.type,b=u.pendingProps,b=u.elementType===M?b:Cr(M,b),hM(c,u,M,b,v);case 7:return mi(c,u,u.pendingProps,v),u.child;case 8:return mi(c,u,u.pendingProps.children,v),u.child;case 12:return mi(c,u,u.pendingProps.children,v),u.child;case 10:e:{if(M=u.type._context,b=u.pendingProps,T=u.memoizedProps,F=b.value,ES(u,M,F),T!==null)if(qr(T.value,F)){if(T.children===b.children&&!Ht.current){u=Ms(c,u,v);break e}}else for(T=u.child,T!==null&&(T.return=u);T!==null;){var $=T.dependencies;if($!==null){F=T.child;for(var me=$.firstContext;me!==null;){if(me.context===M){if(T.tag===1){me=xs(-1,v&-v),me.tag=2;var ke=T.updateQueue;if(ke!==null){ke=ke.shared;var $e=ke.pending;$e===null?me.next=me:(me.next=$e.next,$e.next=me),ke.pending=me}}T.lanes|=v,me=T.alternate,me!==null&&(me.lanes|=v),w0(T.return,v,u),$.lanes|=v;break}me=me.next}}else if(T.tag===10)F=T.type===u.type?null:T.child;else if(T.tag===18){if(F=T.return,F===null)throw Error(o(341));F.lanes|=v,$=F.alternate,$!==null&&($.lanes|=v),w0(F,v,u),F=T.sibling}else F=T.child;if(F!==null)F.return=T;else for(F=T;F!==null;){if(F===u){F=null;break}if(T=F.sibling,T!==null){T.return=F.return,F=T;break}F=F.return}T=F}mi(c,u,b.children,v),u=u.child}return u;case 9:return b=u.type,M=u.pendingProps.children,Sl(u,v),b=sr(b),M=M(b),u.flags|=1,mi(c,u,M,v),u.child;case 14:return M=u.type,b=Cr(M,u.pendingProps),b=Cr(M.type,b),pM(c,u,M,b,v);case 15:return mM(c,u,u.type,u.pendingProps,v);case 17:return M=u.type,b=u.pendingProps,b=u.elementType===M?b:Cr(M,b),c!==null&&(c.alternate=null,u.alternate=null,u.flags|=2),u.tag=1,qn(M)?(c=!0,th(u)):c=!1,Sl(u,v),IS(u,M,b),A0(u,M,b,v),W0(null,u,M,!0,c,v);case 19:return bM(c,u,v);case 22:return gM(c,u,v)}throw Error(o(156,u.tag))};function ZM(c,u){return p0(c,u)}function KD(c,u,v,M){this.tag=c,this.key=v,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=M,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fr(c,u,v,M){return new KD(c,u,v,M)}function fv(c){return c=c.prototype,!(!c||!c.isReactComponent)}function QD(c){if(typeof c=="function")return fv(c)?1:0;if(c!=null){if(c=c.$$typeof,c===x)return 11;if(c===_)return 14}return 2}function co(c,u){var v=c.alternate;return v===null?(v=fr(c.tag,u,c.key,c.mode),v.elementType=c.elementType,v.type=c.type,v.stateNode=c.stateNode,v.alternate=c,c.alternate=v):(v.pendingProps=u,v.type=c.type,v.flags=0,v.subtreeFlags=0,v.deletions=null),v.flags=c.flags&14680064,v.childLanes=c.childLanes,v.lanes=c.lanes,v.child=c.child,v.memoizedProps=c.memoizedProps,v.memoizedState=c.memoizedState,v.updateQueue=c.updateQueue,u=c.dependencies,v.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},v.sibling=c.sibling,v.index=c.index,v.ref=c.ref,v}function Xh(c,u,v,M,b,T){var F=2;if(M=c,typeof c=="function")fv(c)&&(F=1);else if(typeof c=="string")F=5;else e:switch(c){case d:return ya(v.children,b,T,u);case h:F=8,b|=8;break;case p:return c=fr(12,v,u,b|2),c.elementType=p,c.lanes=T,c;case w:return c=fr(13,v,u,b),c.elementType=w,c.lanes=T,c;case m:return c=fr(19,v,u,b),c.elementType=m,c.lanes=T,c;case A:return Yh(v,b,T,u);default:if(typeof c=="object"&&c!==null)switch(c.$$typeof){case g:F=10;break e;case y:F=9;break e;case x:F=11;break e;case _:F=14;break e;case S:F=16,M=null;break e}throw Error(o(130,c==null?c:typeof c,""))}return u=fr(F,v,u,b),u.elementType=c,u.type=M,u.lanes=T,u}function ya(c,u,v,M){return c=fr(7,c,M,u),c.lanes=v,c}function Yh(c,u,v,M){return c=fr(22,c,M,u),c.elementType=A,c.lanes=v,c.stateNode={},c}function dv(c,u,v){return c=fr(6,c,null,u),c.lanes=v,c}function hv(c,u,v){return u=fr(4,c.children!==null?c.children:[],c.key,u),u.lanes=v,u.stateNode={containerInfo:c.containerInfo,pendingChildren:null,implementation:c.implementation},u}function ek(c,u,v,M,b){this.tag=u,this.containerInfo=c,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Be,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=d0(0),this.expirationTimes=d0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=d0(0),this.identifierPrefix=M,this.onRecoverableError=b,oe&&(this.mutableSourceEagerHydrationData=null)}function $M(c,u,v,M,b,T,F,$,me){return c=new ek(c,u,v,$,me),u===1?(u=1,T===!0&&(u|=8)):u=0,T=fr(3,null,null,u),c.current=T,T.stateNode=c,T.memoizedState={element:M,isDehydrated:v,cache:null,transitions:null},S0(T),c}function JM(c){if(!c)return ei;c=c._reactInternals;e:{if(C(c)!==c||c.tag!==1)throw Error(o(170));var u=c;do{switch(u.tag){case 3:u=u.stateNode.context;break e;case 1:if(qn(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break e}}u=u.return}while(u!==null);throw Error(o(171))}if(c.tag===1){var v=c.type;if(qn(v))return wS(c,v,u)}return u}function KM(c){var u=c._reactInternals;if(u===void 0)throw typeof c.render=="function"?Error(o(188)):(c=Object.keys(c).join(","),Error(o(268,c)));return c=Z(u),c===null?null:c.stateNode}function QM(c,u){if(c=c.memoizedState,c!==null&&c.dehydrated!==null){var v=c.retryLane;c.retryLane=v!==0&&v=ke&&T>=yt&&b<=$e&&F<=lt){c.splice(u,1);break}else if(M!==ke||v.width!==me.width||ltF){if(!(T!==yt||v.height!==me.height||$eb)){ke>M&&(me.width+=ke-M,me.x=M),$eT&&(me.height+=yt-T,me.y=T),ltv&&(v=F)),F ")+` - -No matching component was found for: - `)+c.join(" > ")}return null},t.getPublicRootInstance=function(c){if(c=c.current,!c.child)return null;switch(c.child.tag){case 5:return te(c.child.stateNode);default:return c.child.stateNode}},t.injectIntoDevTools=function(c){if(c={bundleType:c.bundleType,version:c.version,rendererPackageName:c.rendererPackageName,rendererConfig:c.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:tk,findFiberByHostInstance:c.findFiberByHostInstance||nk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")c=!1;else{var u=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(u.isDisabled||!u.supportsFiber)c=!0;else{try{sh=u.inject(c),Yr=u}catch{}c=!!u.checkDCE}}return c},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(c,u,v,M){if(!He)throw Error(o(363));c=ev(c,u);var b=Pe(c,v,M).disconnect;return{disconnect:function(){b()}}},t.registerMutableSourceForHydration=function(c,u){var v=u._getVersion;v=v(u._source),c.mutableSourceEagerHydrationData==null?c.mutableSourceEagerHydrationData=[u,v]:c.mutableSourceEagerHydrationData.push(u,v)},t.runWithPriority=function(c,u){var v=Ot;try{return Ot=c,u()}finally{Ot=v}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(c,u,v,M){var b=u.current,T=gi(),F=ao(b);return v=JM(v),u.context===null?u.context=v:u.pendingContext=v,u=xs(T,F),u.payload={element:c},M=M===void 0?null:M,M!==null&&(u.callback=M),ro(b,u),c=ur(b,F,T),c!==null&&uh(c,b,F),F},t};jI.exports=MX;var AX=jI.exports;const bX=gg(AX);var XI={exports:{}},YI={};/** - * @license React - * scheduler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */(function(n){function e(D,B){var V=D.length;D.push(B);e:for(;0>>1,ee=D[re];if(0>>1;rer(be,V))ger(Q,be)?(D[re]=Q,D[ge]=V,re=ge):(D[re]=be,D[ce]=V,re=ce);else if(ger(Q,V))D[re]=Q,D[ge]=V,re=ge;else break e}}return B}function r(D,B){var V=D.sortIndex-B.sortIndex;return V!==0?V:D.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();n.unstable_now=function(){return o.now()-a}}var l=[],f=[],d=1,h=null,p=3,g=!1,y=!1,x=!1,w=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(D){for(var B=t(f);B!==null;){if(B.callback===null)i(f);else if(B.startTime<=D)i(f),B.sortIndex=B.expirationTime,e(l,B);else break;B=t(f)}}function A(D){if(x=!1,S(D),!y)if(t(l)!==null)y=!0,te(E);else{var B=t(f);B!==null&&ne(A,B.startTime-D)}}function E(D,B){y=!1,x&&(x=!1,m(L),L=-1),g=!0;var V=p;try{for(S(B),h=t(l);h!==null&&(!(h.expirationTime>B)||D&&!W());){var re=h.callback;if(typeof re=="function"){h.callback=null,p=h.priorityLevel;var ee=re(h.expirationTime<=B);B=n.unstable_now(),typeof ee=="function"?h.callback=ee:h===t(l)&&i(l),S(B)}else i(l);h=t(l)}if(h!==null)var ie=!0;else{var ce=t(f);ce!==null&&ne(A,ce.startTime-B),ie=!1}return ie}finally{h=null,p=V,g=!1}}var P=!1,I=null,L=-1,C=5,R=-1;function W(){return!(n.unstable_now()-RD||125re?(D.sortIndex=V,e(f,D),t(l)===null&&D===t(f)&&(x?(m(L),L=-1):x=!0,ne(A,V-re))):(D.sortIndex=ee,e(l,D),y||g||(y=!0,te(E))),D},n.unstable_shouldYield=W,n.unstable_wrapCallback=function(D){var B=p;return function(){var V=p;p=B;try{return D.apply(this,arguments)}finally{p=V}}}})(YI);XI.exports=YI;var mC=XI.exports;function qI(n,e,t=(i,r)=>i===r){if(n===e)return!0;if(!n||!e)return!1;const i=n.length;if(e.length!==i)return!1;for(let r=0;rr.response=s).then(()=>{i.lifespan&&i.lifespan>0&&setTimeout(()=>{const s=ks.indexOf(r);s!==-1&&ks.splice(s,1)},i.lifespan)}).catch(s=>r.error=s)};if(ks.push(r),!t)throw r.promise}const EX=(n,e,t)=>ZI(n,e,!1,t),TX=(n,e,t)=>void ZI(n,e,!0,t),CX=n=>{if(n===void 0||n.length===0)ks.splice(0,ks.length);else{const e=ks.find(t=>qI(n,t.keys,t.equal));if(e){const t=ks.indexOf(e);t!==-1&&ks.splice(t,1)}}};var gC,vC;const $I=n=>n&&n.isOrthographicCamera,PX=n=>n&&n.hasOwnProperty("current"),Jd=typeof window<"u"&&((gC=window.document)!=null&&gC.createElement||((vC=window.navigator)==null?void 0:vC.product)==="ReactNative")?N.useLayoutEffect:N.useEffect;function JI(n){const e=N.useRef(n);return Jd(()=>void(e.current=n),[n]),e}function LX({set:n}){return Jd(()=>(n(new Promise(()=>null)),()=>n(!1)),[n]),null}class KI extends N.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}KI.getDerivedStateFromError=()=>({error:!0});const QI="__default",RX=n=>n&&!!n.memoized&&!!n.changes;function eD(n){const e=typeof window<"u"?window.devicePixelRatio:1;return Array.isArray(n)?Math.min(Math.max(n[0],e),n[1]):n}const nf=n=>{var e;return(e=n.__r3f)==null?void 0:e.root.getState()},pn={obj:n=>n===Object(n)&&!pn.arr(n)&&typeof n!="function",fun:n=>typeof n=="function",str:n=>typeof n=="string",num:n=>typeof n=="number",boo:n=>typeof n=="boolean",und:n=>n===void 0,arr:n=>Array.isArray(n),equ(n,e,{arrays:t="shallow",objects:i="reference",strict:r=!0}={}){if(typeof n!=typeof e||!!n!=!!e)return!1;if(pn.str(n)||pn.num(n))return n===e;const s=pn.obj(n);if(s&&i==="reference")return n===e;const o=pn.arr(n);if(o&&t==="reference")return n===e;if((o||s)&&n===e)return!0;let a;for(a in n)if(!(a in e))return!1;for(a in r?e:n)if(n[a]!==e[a])return!1;if(pn.und(a)){if(o&&n.length===0&&e.length===0||s&&Object.keys(n).length===0&&Object.keys(e).length===0)return!0;if(n!==e)return!1}return!0}};function IX(n){const e={nodes:{},materials:{}};return n&&n.traverse(t=>{t.name&&(e.nodes[t.name]=t),t.material&&!e.materials[t.material.name]&&(e.materials[t.material.name]=t.material)}),e}function DX(n){n.dispose&&n.type!=="Scene"&&n.dispose();for(const e in n)e.dispose==null||e.dispose(),delete n[e]}function rc(n,e){const t=n;return(e!=null&&e.primitive||!t.__r3f)&&(t.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e}),n}function $_(n,e){let t=n;if(e.includes("-")){const i=e.split("-"),r=i.pop();return t=i.reduce((s,o)=>s[o],n),{target:t,key:r}}else return{target:t,key:e}}const yC=/-\d+$/;function Uy(n,e,t){if(pn.str(t)){if(yC.test(t)){const s=t.replace(yC,""),{target:o,key:a}=$_(n,s);Array.isArray(o[a])||(o[a]=[])}const{target:i,key:r}=$_(n,t);e.__r3f.previousAttach=i[r],i[r]=e}else e.__r3f.previousAttach=t(n,e)}function xC(n,e,t){var i,r;if(pn.str(t)){const{target:s,key:o}=$_(n,t),a=e.__r3f.previousAttach;a===void 0?delete s[o]:s[o]=a}else(i=e.__r3f)==null||i.previousAttach==null||i.previousAttach(n,e);(r=e.__r3f)==null||delete r.previousAttach}function tD(n,{children:e,key:t,ref:i,...r},{children:s,key:o,ref:a,...l}={},f=!1){var d;const h=(d=n==null?void 0:n.__r3f)!=null?d:{},p=Object.entries(r),g=[];if(f){const x=Object.keys(l);for(let w=0;w{var m;if((m=n.__r3f)!=null&&m.primitive&&x==="object"||pn.equ(w,l[x]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(x))return g.push([x,w,!0,[]]);let _=[];x.includes("-")&&(_=x.split("-")),g.push([x,w,!1,_]);for(const S in r){const A=r[S];S.startsWith(`${x}-`)&&g.push([S,A,!1,S.split("-")])}});const y={...r};return h.memoizedProps&&h.memoizedProps.args&&(y.args=h.memoizedProps.args),h.memoizedProps&&h.memoizedProps.attach&&(y.attach=h.memoizedProps.attach),{memoized:y,changes:g}}function zy(n,e){var t,i,r;const s=(t=n.__r3f)!=null?t:{},o=s.root,a=(i=o==null||o.getState==null?void 0:o.getState())!=null?i:{},{memoized:l,changes:f}=RX(e)?e:tD(n,e),d=s.eventCount;n.__r3f&&(n.__r3f.memoizedProps=l);for(let g=0;gA[E],n),!(S&&S.set))){const[A,...E]=m.reverse();_=E.reverse().reduce((P,I)=>P[I],n),y=A}if(x===QI+"remove")if(S&&S.constructor){var h;x=new S.constructor(...(h=l.args)!=null?h:[])}else if(_.constructor){var p;const A=new _.constructor(...(p=_.__r3f.memoizedProps.args)!=null?p:[]);x=A[S],A.dispose&&A.dispose()}else x=0;if(w)x?s.handlers[y]=x:delete s.handlers[y],s.eventCount=Object.keys(s.handlers).length;else if(S&&S.set&&(S.copy||S instanceof Ja)){if(Array.isArray(x))S.fromArray?S.fromArray(x):S.set(...x);else if(S.copy&&x&&x.constructor&&S.constructor.name===x.constructor.name)S.copy(x);else if(x!==void 0){const A=S instanceof qe;!A&&S.setScalar?S.setScalar(x):S instanceof Ja&&x instanceof Ja?S.mask=x.mask:S.set(x),!("ColorManagement"in pg)&&!a.linear&&A&&S.convertSRGBToLinear()}}else _[y]=x,!a.linear&&_[y]instanceof gn&&(_[y].encoding=Wt);sc(n)}if(s.parent&&a.internal&&n.raycast&&d!==s.eventCount){const g=a.internal.interaction.indexOf(n);g>-1&&a.internal.interaction.splice(g,1),s.eventCount&&a.internal.interaction.push(n)}return f.length&&(r=n.__r3f)!=null&&r.parent&&J_(n),n}function sc(n){var e,t;const i=(e=n.__r3f)==null||(t=e.root)==null||t.getState==null?void 0:t.getState();i&&i.internal.frames===0&&i.invalidate()}function J_(n){n.onUpdate==null||n.onUpdate(n)}function kX(n,e){n.manual||($I(n)?(n.left=e.width/-2,n.right=e.width/2,n.top=e.height/2,n.bottom=e.height/-2):n.aspect=e.width/e.height,n.updateProjectionMatrix(),n.updateMatrixWorld())}function NX(n,e,t){const i=t.pop(),r=t.reduce((s,o)=>s[o],n);return r[i]=e}function rm(n){return(n.eventObject||n.object).uuid+"/"+n.index+n.instanceId}function OX(){var n;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return Tc.DefaultEventPriority;switch((n=e.event)==null?void 0:n.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return Tc.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return Tc.ContinuousEventPriority;default:return Tc.DefaultEventPriority}}function nD(n,e,t,i){const r=t.get(e);r&&(t.delete(e),t.size===0&&(n.delete(i),r.target.releasePointerCapture(i)))}function UX(n,e){const{internal:t}=n.getState();t.interaction=t.interaction.filter(i=>i!==e),t.initialHits=t.initialHits.filter(i=>i!==e),t.hovered.forEach((i,r)=>{(i.eventObject===e||i.object===e)&&t.hovered.delete(r)}),t.capturedMap.forEach((i,r)=>{nD(t.capturedMap,e,i,r)})}function zX(n){function e(l){const{internal:f}=n.getState(),d=l.offsetX-f.initialClick[0],h=l.offsetY-f.initialClick[1];return Math.round(Math.sqrt(d*d+h*h))}function t(l){return l.filter(f=>["Move","Over","Enter","Out","Leave"].some(d=>{var h;return(h=f.__r3f)==null?void 0:h.handlers["onPointer"+d]}))}function i(l,f){const d=n.getState(),h=new Set,p=[],g=f?f(d.internal.interaction):d.internal.interaction;for(let m=0;m{const S=nf(m.object),A=nf(_.object);return!S||!A?m.distance-_.distance:A.events.priority-S.events.priority||m.distance-_.distance}).filter(m=>{const _=rm(m);return h.has(_)?!1:(h.add(_),!0)});d.events.filter&&(x=d.events.filter(x,d));for(const m of x){let _=m.object;for(;_;){var w;(w=_.__r3f)!=null&&w.eventCount&&p.push({...m,eventObject:_}),_=_.parent}}if("pointerId"in l&&d.internal.capturedMap.has(l.pointerId))for(let m of d.internal.capturedMap.get(l.pointerId).values())h.has(rm(m.intersection))||p.push(m.intersection);return p}function r(l,f,d,h){const p=n.getState();if(l.length){const g={stopped:!1};for(const y of l){const x=nf(y.object)||p,{raycaster:w,pointer:m,camera:_,internal:S}=x,A=new O(m.x,m.y,0).unproject(_),E=R=>{var W,Z;return(W=(Z=S.capturedMap.get(R))==null?void 0:Z.has(y.eventObject))!=null?W:!1},P=R=>{const W={intersection:y,target:f.target};S.capturedMap.has(R)?S.capturedMap.get(R).set(y.eventObject,W):S.capturedMap.set(R,new Map([[y.eventObject,W]])),f.target.setPointerCapture(R)},I=R=>{const W=S.capturedMap.get(R);W&&nD(S.capturedMap,y.eventObject,W,R)};let L={};for(let R in f){let W=f[R];typeof W!="function"&&(L[R]=W)}let C={...y,...L,pointer:m,intersections:l,stopped:g.stopped,delta:d,unprojectedPoint:A,ray:w.ray,camera:_,stopPropagation(){const R="pointerId"in f&&S.capturedMap.get(f.pointerId);if((!R||R.has(y.eventObject))&&(C.stopped=g.stopped=!0,S.hovered.size&&Array.from(S.hovered.values()).find(W=>W.eventObject===y.eventObject))){const W=l.slice(0,l.indexOf(y));s([...W,y])}},target:{hasPointerCapture:E,setPointerCapture:P,releasePointerCapture:I},currentTarget:{hasPointerCapture:E,setPointerCapture:P,releasePointerCapture:I},nativeEvent:f};if(h(C),g.stopped===!0)break}}return l}function s(l){const{internal:f}=n.getState();for(const d of f.hovered.values())if(!l.length||!l.find(h=>h.object===d.object&&h.index===d.index&&h.instanceId===d.instanceId)){const p=d.eventObject.__r3f,g=p==null?void 0:p.handlers;if(f.hovered.delete(rm(d)),p!=null&&p.eventCount){const y={...d,intersections:l};g.onPointerOut==null||g.onPointerOut(y),g.onPointerLeave==null||g.onPointerLeave(y)}}}function o(l,f){for(let d=0;ds([]);case"onLostPointerCapture":return f=>{const{internal:d}=n.getState();"pointerId"in f&&d.capturedMap.has(f.pointerId)&&(d.capturedMap.delete(f.pointerId),s([]))}}return function(d){const{onPointerMissed:h,internal:p}=n.getState();p.lastEvent.current=d;const g=l==="onPointerMove",y=l==="onClick"||l==="onContextMenu"||l==="onDoubleClick",w=i(d,g?t:void 0),m=y?e(d):0;l==="onPointerDown"&&(p.initialClick=[d.offsetX,d.offsetY],p.initialHits=w.map(S=>S.eventObject)),y&&!w.length&&m<=2&&(o(d,p.interaction),h&&h(d)),g&&s(w);function _(S){const A=S.eventObject,E=A.__r3f,P=E==null?void 0:E.handlers;if(E!=null&&E.eventCount)if(g){if(P.onPointerOver||P.onPointerEnter||P.onPointerOut||P.onPointerLeave){const I=rm(S),L=p.hovered.get(I);L?L.stopped&&S.stopPropagation():(p.hovered.set(I,S),P.onPointerOver==null||P.onPointerOver(S),P.onPointerEnter==null||P.onPointerEnter(S))}P.onPointerMove==null||P.onPointerMove(S)}else{const I=P[l];I?(!y||p.initialHits.includes(A))&&(o(d,p.interaction.filter(L=>!p.initialHits.includes(L))),I(S)):y&&p.initialHits.includes(A)&&o(d,p.interaction.filter(L=>!p.initialHits.includes(L)))}}r(w,d,m,_)}}return{handlePointer:a}}let K_={},FX=n=>void(K_={...K_,...n});function BX(n,e){function t(d,{args:h=[],attach:p,...g},y){let x=`${d[0].toUpperCase()}${d.slice(1)}`,w;if(d==="primitive"){if(g.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const m=g.object;w=rc(m,{type:d,root:y,attach:p,primitive:!0})}else{const m=K_[x];if(!m)throw new Error(`R3F: ${x} 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(!Array.isArray(h))throw new Error("R3F: The args prop must be an array!");w=rc(new m(...h),{type:d,root:y,attach:p,memoizedProps:{args:h}})}return w.__r3f.attach===void 0&&(w instanceof St?w.__r3f.attach="geometry":w instanceof Qn&&(w.__r3f.attach="material")),x!=="inject"&&zy(w,g),w}function i(d,h){let p=!1;if(h){var g,y;(g=h.__r3f)!=null&&g.attach?Uy(d,h,h.__r3f.attach):h.isObject3D&&d.isObject3D&&(d.add(h),p=!0),p||(y=d.__r3f)==null||y.objects.push(h),h.__r3f||rc(h,{}),h.__r3f.parent=d,J_(h),sc(h)}}function r(d,h,p){let g=!1;if(h){var y,x;if((y=h.__r3f)!=null&&y.attach)Uy(d,h,h.__r3f.attach);else if(h.isObject3D&&d.isObject3D){h.parent=d,h.dispatchEvent({type:"added"});const w=d.children.filter(_=>_!==h),m=w.indexOf(p);d.children=[...w.slice(0,m),h,...w.slice(m)],g=!0}g||(x=d.__r3f)==null||x.objects.push(h),h.__r3f||rc(h,{}),h.__r3f.parent=d,J_(h),sc(h)}}function s(d,h,p=!1){d&&[...d].forEach(g=>o(h,g,p))}function o(d,h,p){if(h){var g,y,x;if(h.__r3f&&(h.__r3f.parent=null),(g=d.__r3f)!=null&&g.objects&&(d.__r3f.objects=d.__r3f.objects.filter(A=>A!==h)),(y=h.__r3f)!=null&&y.attach)xC(d,h,h.__r3f.attach);else if(h.isObject3D&&d.isObject3D){var w;d.remove(h),(w=h.__r3f)!=null&&w.root&&UX(h.__r3f.root,h)}const _=(x=h.__r3f)==null?void 0:x.primitive,S=p===void 0?h.dispose!==null&&!_:p;if(!_){var m;s((m=h.__r3f)==null?void 0:m.objects,h,S),s(h.children,h,S)}h.__r3f&&(delete h.__r3f.root,delete h.__r3f.objects,delete h.__r3f.handlers,delete h.__r3f.memoizedProps,_||delete h.__r3f),S&&h.dispose&&h.type!=="Scene"&&mC.unstable_scheduleCallback(mC.unstable_IdlePriority,()=>{try{h.dispose()}catch{}}),sc(d)}}function a(d,h,p,g){var y;const x=(y=d.__r3f)==null?void 0:y.parent;if(!x)return;const w=t(h,p,d.__r3f.root);if(d.children){for(const m of d.children)m.__r3f&&i(w,m);d.children=d.children.filter(m=>!m.__r3f)}d.__r3f.objects.forEach(m=>i(w,m)),d.__r3f.objects=[],o(x,d),i(x,w),w.raycast&&w.__r3f.eventCount&&w.__r3f.root.getState().internal.interaction.push(w),[g,g.alternate].forEach(m=>{m!==null&&(m.stateNode=w,m.ref&&(typeof m.ref=="function"?m.ref(w):m.ref.current=w))})}const l=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:bX({createInstance:t,removeChild:o,appendChild:i,appendInitialChild:i,insertBefore:r,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(d,h)=>{if(!h)return;const p=d.getState().scene;p.__r3f&&(p.__r3f.root=d,i(p,h))},removeChildFromContainer:(d,h)=>{h&&o(d.getState().scene,h)},insertInContainerBefore:(d,h,p)=>{if(!h||!p)return;const g=d.getState().scene;g.__r3f&&r(g,h,p)},getRootHostContext:()=>null,getChildHostContext:d=>d,finalizeInitialChildren(d){var h;return!!((h=d==null?void 0:d.__r3f)!=null?h:{}).handlers},prepareUpdate(d,h,p,g){if(d.__r3f.primitive&&g.object&&g.object!==d)return[!0];{const{args:y=[],children:x,...w}=g,{args:m=[],children:_,...S}=p;if(!Array.isArray(y))throw new Error("R3F: the args prop must be an array!");if(y.some((E,P)=>E!==m[P]))return[!0];const A=tD(d,w,S,!0);return A.changes.length?[!1,A]:null}},commitUpdate(d,[h,p],g,y,x,w){h?a(d,g,x,w):zy(d,p)},commitMount(d,h,p,g){var y;const x=(y=d.__r3f)!=null?y:{};d.raycast&&x.handlers&&x.eventCount&&d.__r3f.root.getState().internal.interaction.push(d)},getPublicInstance:d=>d,prepareForCommit:()=>null,preparePortalMount:d=>rc(d.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(d){var h;const{attach:p,parent:g}=(h=d.__r3f)!=null?h:{};p&&g&&xC(g,d,p),d.isObject3D&&(d.visible=!1),sc(d)},unhideInstance(d,h){var p;const{attach:g,parent:y}=(p=d.__r3f)!=null?p:{};g&&y&&Uy(y,d,g),(d.isObject3D&&h.visible==null||h.visible)&&(d.visible=!0),sc(d)},createTextInstance:l,hideTextInstance:l,unhideTextInstance:l,getCurrentEventPriority:()=>e?e():Tc.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&pn.fun(performance.now)?performance.now:pn.fun(Date.now)?Date.now:()=>0,scheduleTimeout:pn.fun(setTimeout)?setTimeout:void 0,cancelTimeout:pn.fun(clearTimeout)?clearTimeout:void 0}),applyProps:zy}}const iD=n=>!!(n!=null&&n.render),rD=N.createContext(null),VX=(n,e)=>{const t=GI((a,l)=>{const f=new O,d=new O,h=new O;function p(m=l().camera,_=d,S=l().size){const{width:A,height:E,top:P,left:I}=S,L=A/E;_ instanceof O?h.copy(_):h.set(..._);const C=m.getWorldPosition(f).distanceTo(h);if($I(m))return{width:A/m.zoom,height:E/m.zoom,top:P,left:I,factor:1,distance:C,aspect:L};{const R=m.fov*Math.PI/180,W=2*Math.tan(R/2)*C,Z=W*(A/E);return{width:Z,height:W,top:P,left:I,factor:A/Z,distance:C,aspect:L}}}let g;const y=m=>a(_=>({performance:{..._.performance,current:m}})),x=new Se;return{set:a,get:l,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,invalidate:(m=1)=>n(l(),m),advance:(m,_)=>e(m,_,l()),legacy:!1,linear:!1,flat:!1,scene:rc(new Yw),controls:null,clock:new dS,pointer:x,mouse:x,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const m=l();g&&clearTimeout(g),m.performance.current!==m.performance.min&&y(m.performance.min),g=setTimeout(()=>y(l().performance.max),m.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:p},setEvents:m=>a(_=>({..._,events:{..._.events,...m}})),setSize:(m,_,S,A,E)=>{const P=l().camera,I={width:m,height:_,top:A||0,left:E||0,updateStyle:S};a(L=>({size:I,viewport:{...L.viewport,...p(P,d,I)}}))},setDpr:m=>a(_=>{const S=eD(m);return{viewport:{..._.viewport,dpr:S,initialDpr:_.viewport.initialDpr||S}}}),setFrameloop:(m="always")=>{const _=l().clock;_.stop(),_.elapsedTime=0,m!=="never"&&(_.start(),_.elapsedTime=0),a(()=>({frameloop:m}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:N.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(m,_,S)=>{const A=l().internal;return A.priority=A.priority+(_>0?1:0),A.subscribers.push({ref:m,priority:_,store:S}),A.subscribers=A.subscribers.sort((E,P)=>E.priority-P.priority),()=>{const E=l().internal;E!=null&&E.subscribers&&(E.priority=E.priority-(_>0?1:0),E.subscribers=E.subscribers.filter(P=>P.ref!==m))}}}}}),i=t.getState();let r=i.size,s=i.viewport.dpr,o=i.camera;return t.subscribe(()=>{const{camera:a,size:l,viewport:f,gl:d,set:h}=t.getState();(l!==r||f.dpr!==s)&&(r=l,s=f.dpr,kX(a,l),d.setPixelRatio(f.dpr),d.setSize(l.width,l.height,l.updateStyle)),a!==o&&(o=a,h(p=>({viewport:{...p.viewport,...p.viewport.getCurrentViewport(a)}})))}),t.subscribe(a=>n(a)),t};let sm,HX=new Set,WX=new Set,GX=new Set;function Fy(n,e){if(n.size)for(const{callback:t}of n.values())t(e)}function rf(n,e){switch(n){case"before":return Fy(HX,e);case"after":return Fy(WX,e);case"tail":return Fy(GX,e)}}let By,Vy;function Hy(n,e,t){let i=e.clock.getDelta();for(e.frameloop==="never"&&typeof n=="number"&&(i=n-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=n),By=e.internal.subscribers,sm=0;sm0)&&!((f=r.gl.xr)!=null&&f.isPresenting)&&(t+=Hy(l,r))}if(rf("after",l),t===0)return rf("tail",l),e=!1,cancelAnimationFrame(i)}function o(l,f=1){var d;if(!l)return n.forEach(h=>o(h.store.getState()),f);(d=l.gl.xr)!=null&&d.isPresenting||!l.internal.active||l.frameloop==="never"||(l.internal.frames=Math.min(60,l.internal.frames+f),e||(e=!0,requestAnimationFrame(s)))}function a(l,f=!0,d,h){if(f&&rf("before",l),d)Hy(l,d,h);else for(const p of n.values())Hy(l,p.store.getState());f&&rf("after",l)}return{loop:s,invalidate:o,advance:a}}function sD(){const n=N.useContext(rD);if(!n)throw new Error("R3F: Hooks can only be used within the Canvas component!");return n}function Yi(n=t=>t,e){return sD()(n,e)}function gS(n,e=0){const t=sD(),i=t.getState().internal.subscribe,r=JI(n);return Jd(()=>i(r,e,t),[e,i,t]),null}function oD(n,e){return function(t,...i){const r=new t;return n&&n(r),Promise.all(i.map(s=>new Promise((o,a)=>r.load(s,l=>{l.scene&&Object.assign(l,IX(l.scene)),o(l)},e,l=>a(new Error(`Could not load ${s}: ${l.message})`))))))}}function Kd(n,e,t,i){const r=Array.isArray(e)?e:[e],s=EX(oD(t,i),[n,...r],{equal:pn.equ});return Array.isArray(e)?s:s[0]}Kd.preload=function(n,e,t){const i=Array.isArray(e)?e:[e];return TX(oD(t),[n,...i])};Kd.clear=function(n,e){const t=Array.isArray(e)?e:[e];return CX([n,...t])};const Qc=new Map,{invalidate:_C,advance:wC}=jX(Qc),{reconciler:mg,applyProps:Ro}=BX(Qc,OX),ic={objects:"shallow",strict:!1},XX=(n,e)=>{const t=typeof n=="function"?n(e):n;return iD(t)?t:new Xw({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...n})};function YX(n){return n instanceof HTMLCanvasElement}function qX(n,e){if(e)return e;if(YX(n)&&n.parentElement){const{width:t,height:i,top:r,left:s}=n.parentElement.getBoundingClientRect();return{width:t,height:i,top:r,left:s}}return{width:0,height:0,top:0,left:0}}function ZX(n){const e=Qc.get(n),t=e==null?void 0:e.fiber,i=e==null?void 0:e.store;e&&console.warn("R3F.createRoot should only be called once!");const r=typeof reportError=="function"?reportError:console.error,s=i||VX(_C,wC),o=t||mg.createContainer(s,Tc.ConcurrentRoot,null,!1,null,"",r,null);e||Qc.set(n,{fiber:o,store:s});let a,l=!1;return{configure(f={}){let{gl:d,size:h,events:p,onCreated:g,shadows:y=!1,linear:x=!1,flat:w=!1,legacy:m=!1,orthographic:_=!1,frameloop:S="always",dpr:A=[1,2],performance:E,raycaster:P,camera:I,onPointerMissed:L}=f,C=s.getState(),R=C.gl;C.gl||C.set({gl:R=XX(d,n)});let W=C.raycaster;W||C.set({raycaster:W=new VI});const{params:Z,...X}=P||{};if(pn.equ(X,W,ic)||Ro(W,{...X}),pn.equ(Z,W.params,ic)||Ro(W,{params:{...W.params,...Z}}),!C.camera){const ne=I instanceof Od,D=ne?I:_?new cs(0,0,0,0,.1,1e3):new qt(75,0,.1,1e3);ne||(D.position.z=5,I&&Ro(D,I),I!=null&&I.rotation||D.lookAt(0,0,0)),C.set({camera:D})}if(!C.xr){const ne=(V,re)=>{const ee=s.getState();ee.frameloop!=="never"&&wC(V,!0,ee,re)},D=()=>{const V=s.getState();V.gl.xr.enabled=V.gl.xr.isPresenting,V.gl.xr.setAnimationLoop(V.gl.xr.isPresenting?ne:null),V.gl.xr.isPresenting||_C(V)},B={connect(){const V=s.getState().gl;V.xr.addEventListener("sessionstart",D),V.xr.addEventListener("sessionend",D)},disconnect(){const V=s.getState().gl;V.xr.removeEventListener("sessionstart",D),V.xr.removeEventListener("sessionend",D)}};R.xr&&B.connect(),C.set({xr:B})}if(R.shadowMap){const ne=pn.boo(y);if(ne&&R.shadowMap.enabled!==y||!pn.equ(y,R.shadowMap,ic)){const D=R.shadowMap.enabled;R.shadowMap.enabled=!!y,ne?R.shadowMap.type=Cw:Object.assign(R.shadowMap,y),D!==R.shadowMap.enabled&&(R.shadowMap.needsUpdate=!0)}}"ColorManagement"in pg&&NX(pg,m,["ColorManagement","legacyMode"]);const j=x?$s:Wt,Y=w?Hr:Rw;R.outputEncoding!==j&&(R.outputEncoding=j),R.toneMapping!==Y&&(R.toneMapping=Y),C.legacy!==m&&C.set(()=>({legacy:m})),C.linear!==x&&C.set(()=>({linear:x})),C.flat!==w&&C.set(()=>({flat:w})),d&&!pn.fun(d)&&!iD(d)&&!pn.equ(d,R,ic)&&Ro(R,d),p&&!C.events.handlers&&C.set({events:p(s)}),A&&C.viewport.dpr!==eD(A)&&C.setDpr(A);const te=qX(n,h);return pn.equ(te,C.size,ic)||C.setSize(te.width,te.height,te.updateStyle,te.top,te.left),C.frameloop!==S&&C.setFrameloop(S),C.onPointerMissed||C.set({onPointerMissed:L}),E&&!pn.equ(E,C.performance,ic)&&C.set(ne=>({performance:{...ne.performance,...E}})),a=g,l=!0,this},render(f){return l||this.configure(),mg.updateContainer(N.createElement($X,{store:s,children:f,onCreated:a,rootElement:n}),o,null,()=>{}),s},unmount(){aD(n)}}}function $X({store:n,children:e,onCreated:t,rootElement:i}){return Jd(()=>{const r=n.getState();r.set(s=>({internal:{...s.internal,active:!0}})),t&&t(r),n.getState().events.connected||r.events.connect==null||r.events.connect(i)},[]),N.createElement(rD.Provider,{value:n},e)}function aD(n,e){const t=Qc.get(n),i=t==null?void 0:t.fiber;if(i){const r=t==null?void 0:t.store.getState();r&&(r.internal.active=!1),mg.updateContainer(null,i,null,()=>{r&&setTimeout(()=>{try{var s,o,a,l;r.events.disconnect==null||r.events.disconnect(),(s=r.gl)==null||(o=s.renderLists)==null||o.dispose==null||o.dispose(),(a=r.gl)==null||a.forceContextLoss==null||a.forceContextLoss(),(l=r.gl)!=null&&l.xr&&r.xr.disconnect(),DX(r),Qc.delete(n),e&&e(n)}catch{}},500)})}}mg.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:N.version});function fl(){return fl=Object.assign?Object.assign.bind():function(n){for(var e=1;e=0?i=setTimeout(l,e-d):(i=null,t||(a=n.apply(s,r),s=r=null))}var f=function(){s=this,r=arguments,o=Date.now();var d=t&&!i;return i||(i=setTimeout(l,e)),d&&(a=n.apply(s,r),s=r=null),a};return f.clear=function(){i&&(clearTimeout(i),i=null)},f.flush=function(){i&&(a=n.apply(s,r),s=r=null,clearTimeout(i),i=null)},f}Q_.debounce=Q_;var JX=Q_;const SC=gg(JX);function KX(n){let{debounce:e,scroll:t,polyfill:i,offsetSize:r}=n===void 0?{debounce:0,scroll:!1,offsetSize:!1}:n;const s=i||(typeof window>"u"?class{}:window.ResizeObserver);if(!s)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[o,a]=N.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=N.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o}),f=e?typeof e=="number"?e:e.scroll:null,d=e?typeof e=="number"?e:e.resize:null,h=N.useRef(!1);N.useEffect(()=>(h.current=!0,()=>void(h.current=!1)));const[p,g,y]=N.useMemo(()=>{const _=()=>{if(!l.current.element)return;const{left:S,top:A,width:E,height:P,bottom:I,right:L,x:C,y:R}=l.current.element.getBoundingClientRect(),W={left:S,top:A,width:E,height:P,bottom:I,right:L,x:C,y:R};l.current.element instanceof HTMLElement&&r&&(W.height=l.current.element.offsetHeight,W.width=l.current.element.offsetWidth),Object.freeze(W),h.current&&!nY(l.current.lastBounds,W)&&a(l.current.lastBounds=W)};return[_,d?SC(_,d):_,f?SC(_,f):_]},[a,r,f,d]);function x(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(_=>_.removeEventListener("scroll",y,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function w(){l.current.element&&(l.current.resizeObserver=new s(y),l.current.resizeObserver.observe(l.current.element),t&&l.current.scrollContainers&&l.current.scrollContainers.forEach(_=>_.addEventListener("scroll",y,{capture:!0,passive:!0})))}const m=_=>{!_||_===l.current.element||(x(),l.current.element=_,l.current.scrollContainers=lD(_),w())};return eY(y,!!t),QX(g),N.useEffect(()=>{x(),w()},[t,y,g]),N.useEffect(()=>x,[]),[m,o,p]}function QX(n){N.useEffect(()=>{const e=n;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[n])}function eY(n,e){N.useEffect(()=>{if(e){const t=n;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",t,!0)}},[n,e])}function lD(n){const e=[];if(!n||n===document.body)return e;const{overflow:t,overflowX:i,overflowY:r}=window.getComputedStyle(n);return[t,i,r].some(s=>s==="auto"||s==="scroll")&&e.push(n),[...e,...lD(n.parentElement)]}const tY=["x","y","top","bottom","left","right","width","height"],nY=(n,e)=>tY.every(t=>n[t]===e[t]);var iY=Object.defineProperty,rY=Object.defineProperties,sY=Object.getOwnPropertyDescriptors,MC=Object.getOwnPropertySymbols,oY=Object.prototype.hasOwnProperty,aY=Object.prototype.propertyIsEnumerable,AC=(n,e,t)=>e in n?iY(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,bC=(n,e)=>{for(var t in e||(e={}))oY.call(e,t)&&AC(n,t,e[t]);if(MC)for(var t of MC(e))aY.call(e,t)&&AC(n,t,e[t]);return n},lY=(n,e)=>rY(n,sY(e));function cD(n,e,t){if(!n)return;if(t(n)===!0)return n;let i=e?n.return:n.child;for(;i;){const r=cD(i,e,t);if(r)return r;i=e?null:i.sibling}}function uD(n){try{return Object.defineProperties(n,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return n}}const vS=uD(N.createContext(null));class fD extends N.Component{render(){return N.createElement(vS.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:EC,ReactCurrentDispatcher:TC}=N.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function cY(){const n=N.useContext(vS);if(n===null)throw new Error("its-fine: useFiber must be called within a !");const e=N.useId();return N.useMemo(()=>{var i;return(i=EC==null?void 0:EC.current)!=null?i:cD(n,!1,r=>{let s=r.memoizedState;for(;s;){if(s.memoizedState===e)return!0;s=s.next}})},[n,e])}function uY(){var n,e;const t=cY(),[i]=N.useState(()=>new Map);i.clear();let r=t;for(;r;){const s=(n=r.type)==null?void 0:n._context;s&&s!==vS&&!i.has(s)&&i.set(s,(e=TC==null?void 0:TC.current)==null?void 0:e.readContext(uD(s))),r=r.return}return i}function fY(){const n=uY();return N.useMemo(()=>Array.from(n.keys()).reduce((e,t)=>i=>N.createElement(e,null,N.createElement(t.Provider,lY(bC({},i),{value:n.get(t)}))),e=>N.createElement(fD,bC({},e))),[n])}const Wy={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 dY(n){const{handlePointer:e}=zX(n);return{priority:1,enabled:!0,compute(t,i,r){i.pointer.set(t.offsetX/i.size.width*2-1,-(t.offsetY/i.size.height)*2+1),i.raycaster.setFromCamera(i.pointer,i.camera)},connected:void 0,handlers:Object.keys(Wy).reduce((t,i)=>({...t,[i]:e(i)}),{}),connect:t=>{var i;const{set:r,events:s}=n.getState();s.disconnect==null||s.disconnect(),r(o=>({events:{...o.events,connected:t}})),Object.entries((i=s.handlers)!=null?i:[]).forEach(([o,a])=>{const[l,f]=Wy[o];t.addEventListener(l,a,{passive:f})})},disconnect:()=>{const{set:t,events:i}=n.getState();if(i.connected){var r;Object.entries((r=i.handlers)!=null?r:[]).forEach(([s,o])=>{if(i&&i.connected instanceof HTMLElement){const[a]=Wy[s];i.connected.removeEventListener(a,o)}}),t(s=>({events:{...s.events,connected:void 0}}))}}}}const hY=N.forwardRef(function({children:e,fallback:t,resize:i,style:r,gl:s,events:o=dY,eventSource:a,eventPrefix:l,shadows:f,linear:d,flat:h,legacy:p,orthographic:g,frameloop:y,dpr:x,performance:w,raycaster:m,camera:_,onPointerMissed:S,onCreated:A,...E},P){N.useMemo(()=>FX(pg),[]);const I=fY(),[L,C]=KX({scroll:!0,debounce:{scroll:50,resize:0},...i}),R=N.useRef(null),W=N.useRef(null),[Z,X]=N.useState(null);N.useImperativeHandle(P,()=>R.current);const j=JI(S),[Y,te]=N.useState(!1),[ne,D]=N.useState(!1);if(Y)throw Y;if(ne)throw ne;const B=N.useRef(null);C.width>0&&C.height>0&&Z&&(B.current||(B.current=ZX(Z)),B.current.configure({gl:s,events:o,shadows:f,linear:d,flat:h,legacy:p,orthographic:g,frameloop:y,dpr:x,performance:w,raycaster:m,camera:_,size:C,onPointerMissed:(...re)=>j.current==null?void 0:j.current(...re),onCreated:re=>{re.events.connect==null||re.events.connect(a?PX(a)?a.current:a:W.current),l&&re.setEvents({compute:(ee,ie)=>{const ce=ee[l+"X"],be=ee[l+"Y"];ie.pointer.set(ce/ie.size.width*2-1,-(be/ie.size.height)*2+1),ie.raycaster.setFromCamera(ie.pointer,ie.camera)}}),A==null||A(re)}}),B.current.render(N.createElement(I,null,N.createElement(KI,{set:D},N.createElement(N.Suspense,{fallback:N.createElement(LX,{set:te})},e))))),Jd(()=>{X(R.current)},[]),N.useEffect(()=>{if(Z)return()=>aD(Z)},[Z]);const V=a?"none":"auto";return N.createElement("div",fl({ref:W,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:V,...r}},E),N.createElement("div",{ref:L,style:{width:"100%",height:"100%"}},N.createElement("canvas",{ref:R,style:{display:"block"}},t)))}),pY=N.forwardRef(function(e,t){return N.createElement(fD,null,N.createElement(hY,fl({},e,{ref:t})))}),Qd=new O,yS=new O,mY=new O;function gY(n,e,t){const i=Qd.setFromMatrixPosition(n.matrixWorld);i.project(e);const r=t.width/2,s=t.height/2;return[i.x*r+r,-(i.y*s)+s]}function vY(n,e){const t=Qd.setFromMatrixPosition(n.matrixWorld),i=yS.setFromMatrixPosition(e.matrixWorld),r=t.sub(i),s=e.getWorldDirection(mY);return r.angleTo(s)>Math.PI/2}function yY(n,e,t,i){const r=Qd.setFromMatrixPosition(n.matrixWorld),s=r.clone();s.project(e),t.setFromCamera(s,e);const o=t.intersectObjects(i,!0);if(o.length){const a=o[0].distance;return r.distanceTo(t.ray.origin)Math.abs(n)<1e-10?0:n;function dD(n,e,t=""){let i="matrix3d(";for(let r=0;r!==16;r++)i+=e1(e[r]*n.elements[r])+(r!==15?",":")");return t+i}const wY=(n=>e=>dD(e,n))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),SY=(n=>(e,t)=>dD(e,n(t),"translate(-50%,-50%)"))(n=>[1/n,1/n,1/n,1,-1/n,-1/n,-1/n,-1,1/n,1/n,1/n,1,1,1,1,1]);function MY(n){return n&&typeof n=="object"&&"current"in n}const AY=N.forwardRef(({children:n,eps:e=.001,style:t,className:i,prepend:r,center:s,fullscreen:o,portal:a,distanceFactor:l,sprite:f=!1,transform:d=!1,occlude:h,onOcclude:p,castShadow:g,receiveShadow:y,material:x,geometry:w,zIndexRange:m=[16777271,0],calculatePosition:_=gY,as:S="div",wrapperClass:A,pointerEvents:E="auto",...P},I)=>{const{gl:L,camera:C,scene:R,size:W,raycaster:Z,events:X,viewport:j}=Yi(),[Y]=N.useState(()=>document.createElement(S)),te=N.useRef(),ne=N.useRef(null),D=N.useRef(0),B=N.useRef([0,0]),V=N.useRef(null),re=N.useRef(null),ee=(a==null?void 0:a.current)||X.connected||L.domElement.parentNode,ie=N.useRef(null),ce=N.useRef(!1),be=N.useMemo(()=>h&&h!=="blending"||Array.isArray(h)&&h.length&&MY(h[0]),[h]);N.useLayoutEffect(()=>{const _e=L.domElement;h&&h==="blending"?(_e.style.zIndex=`${Math.floor(m[0]/2)}`,_e.style.position="absolute",_e.style.pointerEvents="none"):(_e.style.zIndex=null,_e.style.position=null,_e.style.pointerEvents=null)},[h]),N.useLayoutEffect(()=>{if(ne.current){const _e=te.current=GP(Y);if(R.updateMatrixWorld(),d)Y.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{const Me=_(ne.current,C,W);Y.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${Me[0]}px,${Me[1]}px,0);transform-origin:0 0;`}return ee&&(r?ee.prepend(Y):ee.appendChild(Y)),()=>{ee&&ee.removeChild(Y),_e.unmount()}}},[ee,d]),N.useLayoutEffect(()=>{A&&(Y.className=A)},[A]);const ge=N.useMemo(()=>d?{position:"absolute",top:0,left:0,width:W.width,height:W.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:s?"translate3d(-50%,-50%,0)":"none",...o&&{top:-W.height/2,left:-W.width/2,width:W.width,height:W.height},...t},[t,s,o,W,d]),Q=N.useMemo(()=>({position:"absolute",pointerEvents:E}),[E]);N.useLayoutEffect(()=>{if(ce.current=!1,d){var _e;(_e=te.current)==null||_e.render(N.createElement("div",{ref:V,style:ge},N.createElement("div",{ref:re,style:Q},N.createElement("div",{ref:I,className:i,style:t,children:n}))))}else{var Me;(Me=te.current)==null||Me.render(N.createElement("div",{ref:I,style:ge,className:i,children:n}))}});const Fe=N.useRef(!0);gS(_e=>{if(ne.current){C.updateMatrixWorld(),ne.current.updateWorldMatrix(!0,!1);const Me=d?B.current:_(ne.current,C,W);if(d||Math.abs(D.current-C.zoom)>e||Math.abs(B.current[0]-Me[0])>e||Math.abs(B.current[1]-Me[1])>e){const ve=vY(ne.current,C);let oe=!1;be&&(h!=="blending"?oe=[R]:Array.isArray(h)&&(oe=h.map(Ye=>Ye.current)));const we=Fe.current;if(oe){const Ye=yY(ne.current,C,Z,oe);Fe.current=Ye&&!ve}else Fe.current=!ve;we!==Fe.current&&(p?p(!Fe.current):Y.style.display=Fe.current?"block":"none");const Ne=Math.floor(m[0]/2),Le=h?be?[m[0],Ne]:[Ne-1,0]:m;if(Y.style.zIndex=`${_Y(ne.current,C,Le)}`,d){const[Ye,Je]=[W.width/2,W.height/2],Ge=C.projectionMatrix.elements[5]*Je,{isOrthographicCamera:He,top:pt,left:z,bottom:k,right:le}=C,Ee=wY(C.matrixWorldInverse),Te=He?`scale(${Ge})translate(${e1(-(le+z)/2)}px,${e1((pt+k)/2)}px)`:`translateZ(${Ge}px)`;let Pe=ne.current.matrixWorld;f&&(Pe=C.matrixWorldInverse.clone().transpose().copyPosition(Pe).scale(ne.current.scale),Pe.elements[3]=Pe.elements[7]=Pe.elements[11]=0,Pe.elements[15]=1),Y.style.width=W.width+"px",Y.style.height=W.height+"px",Y.style.perspective=He?"":`${Ge}px`,V.current&&re.current&&(V.current.style.transform=`${Te}${Ee}translate(${Ye}px,${Je}px)`,re.current.style.transform=SY(Pe,1/((l||10)/400)))}else{const Ye=l===void 0?1:xY(ne.current,C)*l;Y.style.transform=`translate3d(${Me[0]}px,${Me[1]}px,0) scale(${Ye})`}B.current=Me,D.current=C.zoom}}if(!be&&ie.current&&!ce.current)if(d){if(V.current){const Me=V.current.children[0];if(Me!=null&&Me.clientWidth&&Me!=null&&Me.clientHeight){const{isOrthographicCamera:ve}=C;if(ve||w)P.scale&&(Array.isArray(P.scale)?P.scale instanceof O?ie.current.scale.copy(P.scale.clone().divideScalar(1)):ie.current.scale.set(1/P.scale[0],1/P.scale[1],1/P.scale[2]):ie.current.scale.setScalar(1/P.scale));else{const oe=(l||10)/400,we=Me.clientWidth*oe,Ne=Me.clientHeight*oe;ie.current.scale.set(we,Ne,1)}ce.current=!0}}}else{const Me=Y.children[0];if(Me!=null&&Me.clientWidth&&Me!=null&&Me.clientHeight){const ve=1/j.factor,oe=Me.clientWidth*ve,we=Me.clientHeight*ve;ie.current.scale.set(oe,we,1),ce.current=!0}ie.current.lookAt(_e.camera.position)}});const Be=N.useMemo(()=>({vertexShader:d?void 0:` - /* - This shader is from the THREE's SpriteMaterial. - We need to turn the backing plane into a Sprite - (make it always face the camera) if "transfrom" - is false. - */ - #include - - void main() { - vec2 center = vec2(0., 1.); - float rotation = 0.0; - - // This is somewhat arbitrary, but it seems to work well - // Need to figure out how to derive this dynamically if it even matters - float size = 0.03; - - vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); - vec2 scale; - scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); - scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); - - bool isPerspective = isPerspectiveMatrix( projectionMatrix ); - if ( isPerspective ) scale *= - mvPosition.z; - - vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale * size; - vec2 rotatedPosition; - rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; - rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; - mvPosition.xy += rotatedPosition; - - gl_Position = projectionMatrix * mvPosition; - } - `,fragmentShader:` - void main() { - gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); - } - `}),[d]);return N.createElement("group",fl({},P,{ref:ne}),h&&!be&&N.createElement("mesh",{castShadow:g,receiveShadow:y,ref:ie},w||N.createElement("planeGeometry",null),x||N.createElement("shaderMaterial",{side:Fr,vertexShader:Be.vertexShader,fragmentShader:Be.fragmentShader})))});let sf=0;const bY=GI(n=>(Ec.onStart=(e,t,i)=>{n({active:!0,item:e,loaded:t,total:i,progress:(t-sf)/(i-sf)*100})},Ec.onLoad=()=>{n({active:!1})},Ec.onError=e=>n(t=>({errors:[...t.errors,e]})),Ec.onProgress=(e,t,i)=>{t===i&&(sf=i),n({active:!0,item:e,loaded:t,total:i,progress:(t-sf)/(i-sf)*100||100})},{errors:[],active:!1,progress:0,item:"",loaded:0,total:0}));function EY(n){return function(e){n.forEach(function(t){typeof t=="function"?t(e):t!=null&&(t.current=e)})}}function xd(n){"@babel/helpers - typeof";return xd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xd(n)}function TY(n,e){if(xd(n)!=="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var i=t.call(n,e||"default");if(xd(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function CY(n){var e=TY(n,"string");return xd(e)==="symbol"?e:String(e)}function _t(n,e,t){return e=CY(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}const CC=(n,e)=>(n%e+e)%e;let PY=class extends hs{constructor(e,t){super(),_t(this,"object",void 0),_t(this,"domElement",void 0),_t(this,"enabled",!0),_t(this,"target",new O),_t(this,"minDistance",0),_t(this,"maxDistance",1/0),_t(this,"minZoom",0),_t(this,"maxZoom",1/0),_t(this,"minPolarAngle",0),_t(this,"maxPolarAngle",Math.PI),_t(this,"minAzimuthAngle",-1/0),_t(this,"maxAzimuthAngle",1/0),_t(this,"enableDamping",!1),_t(this,"dampingFactor",.05),_t(this,"enableZoom",!0),_t(this,"zoomSpeed",1),_t(this,"enableRotate",!0),_t(this,"rotateSpeed",1),_t(this,"enablePan",!0),_t(this,"panSpeed",1),_t(this,"screenSpacePanning",!0),_t(this,"keyPanSpeed",7),_t(this,"autoRotate",!1),_t(this,"autoRotateSpeed",2),_t(this,"reverseOrbit",!1),_t(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),_t(this,"mouseButtons",{LEFT:Ia.ROTATE,MIDDLE:Ia.DOLLY,RIGHT:Ia.PAN}),_t(this,"touches",{ONE:Da.ROTATE,TWO:Da.DOLLY_PAN}),_t(this,"target0",void 0),_t(this,"position0",void 0),_t(this,"zoom0",void 0),_t(this,"_domElementKeyEvents",null),_t(this,"getPolarAngle",void 0),_t(this,"getAzimuthalAngle",void 0),_t(this,"setPolarAngle",void 0),_t(this,"setAzimuthalAngle",void 0),_t(this,"getDistance",void 0),_t(this,"listenToKeyEvents",void 0),_t(this,"saveState",void 0),_t(this,"reset",void 0),_t(this,"update",void 0),_t(this,"connect",void 0),_t(this,"dispose",void 0),this.object=e,this.domElement=t,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object instanceof qt?this.object.zoom:1,this.getPolarAngle=()=>d.phi,this.getAzimuthalAngle=()=>d.theta,this.setPolarAngle=G=>{let de=CC(G,2*Math.PI),ye=d.phi;ye<0&&(ye+=2*Math.PI),de<0&&(de+=2*Math.PI);let Ce=Math.abs(de-ye);2*Math.PI-Ce{let de=CC(G,2*Math.PI),ye=d.theta;ye<0&&(ye+=2*Math.PI),de<0&&(de+=2*Math.PI);let Ce=Math.abs(de-ye);2*Math.PI-Cei.object.position.distanceTo(i.target),this.listenToKeyEvents=G=>{G.addEventListener("keydown",le),this._domElementKeyEvents=G},this.saveState=()=>{i.target0.copy(i.target),i.position0.copy(i.object.position),i.zoom0=i.object instanceof qt?i.object.zoom:1},this.reset=()=>{i.target.copy(i.target0),i.object.position.copy(i.position0),i.object instanceof qt&&(i.object.zoom=i.zoom0,i.object.updateProjectionMatrix()),i.dispatchEvent(r),i.update(),l=a.NONE},this.update=(()=>{const G=new O,de=new fi().setFromUnitVectors(e.up,new O(0,1,0)),ye=de.clone().invert(),Ce=new O,tt=new fi,ut=2*Math.PI;return function(){const q=i.object.position;G.copy(q).sub(i.target),G.applyQuaternion(de),d.setFromVector3(G),i.autoRotate&&l===a.NONE&&Z(R()),i.enableDamping?(d.theta+=h.theta*i.dampingFactor,d.phi+=h.phi*i.dampingFactor):(d.theta+=h.theta,d.phi+=h.phi);let ue=i.minAzimuthAngle,Ae=i.maxAzimuthAngle;return isFinite(ue)&&isFinite(Ae)&&(ue<-Math.PI?ue+=ut:ue>Math.PI&&(ue-=ut),Ae<-Math.PI?Ae+=ut:Ae>Math.PI&&(Ae-=ut),ue<=Ae?d.theta=Math.max(ue,Math.min(Ae,d.theta)):d.theta=d.theta>(ue+Ae)/2?Math.max(ue,d.theta):Math.min(Ae,d.theta)),d.phi=Math.max(i.minPolarAngle,Math.min(i.maxPolarAngle,d.phi)),d.makeSafe(),d.radius*=p,d.radius=Math.max(i.minDistance,Math.min(i.maxDistance,d.radius)),i.enableDamping===!0?i.target.addScaledVector(g,i.dampingFactor):i.target.add(g),G.setFromSpherical(d),G.applyQuaternion(ye),q.copy(i.target).add(G),i.object.lookAt(i.target),i.enableDamping===!0?(h.theta*=1-i.dampingFactor,h.phi*=1-i.dampingFactor,g.multiplyScalar(1-i.dampingFactor)):(h.set(0,0,0),g.set(0,0,0)),p=1,y||Ce.distanceToSquared(i.object.position)>f||8*(1-tt.dot(i.object.quaternion))>f?(i.dispatchEvent(r),Ce.copy(i.object.position),tt.copy(i.object.quaternion),y=!1,!0):!1}})(),this.connect=G=>{G===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),i.domElement=G,i.domElement.style.touchAction="none",i.domElement.addEventListener("contextmenu",Pe),i.domElement.addEventListener("pointerdown",Ye),i.domElement.addEventListener("pointercancel",He),i.domElement.addEventListener("wheel",k)},this.dispose=()=>{var G,de,ye,Ce,tt,ut;(G=i.domElement)===null||G===void 0||G.removeEventListener("contextmenu",Pe),(de=i.domElement)===null||de===void 0||de.removeEventListener("pointerdown",Ye),(ye=i.domElement)===null||ye===void 0||ye.removeEventListener("pointercancel",He),(Ce=i.domElement)===null||Ce===void 0||Ce.removeEventListener("wheel",k),(tt=i.domElement)===null||tt===void 0||tt.ownerDocument.removeEventListener("pointermove",Je),(ut=i.domElement)===null||ut===void 0||ut.ownerDocument.removeEventListener("pointerup",Ge),i._domElementKeyEvents!==null&&i._domElementKeyEvents.removeEventListener("keydown",le)};const i=this,r={type:"change"},s={type:"start"},o={type:"end"},a={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let l=a.NONE;const f=1e-6,d=new Z_,h=new Z_;let p=1;const g=new O;let y=!1;const x=new Se,w=new Se,m=new Se,_=new Se,S=new Se,A=new Se,E=new Se,P=new Se,I=new Se,L=[],C={};function R(){return 2*Math.PI/60/60*i.autoRotateSpeed}function W(){return Math.pow(.95,i.zoomSpeed)}function Z(G){i.reverseOrbit?h.theta+=G:h.theta-=G}function X(G){i.reverseOrbit?h.phi+=G:h.phi-=G}const j=(()=>{const G=new O;return function(ye,Ce){G.setFromMatrixColumn(Ce,0),G.multiplyScalar(-ye),g.add(G)}})(),Y=(()=>{const G=new O;return function(ye,Ce){i.screenSpacePanning===!0?G.setFromMatrixColumn(Ce,1):(G.setFromMatrixColumn(Ce,0),G.crossVectors(i.object.up,G)),G.multiplyScalar(ye),g.add(G)}})(),te=(()=>{const G=new O;return function(ye,Ce){const tt=i.domElement;if(tt&&i.object instanceof qt&&i.object.isPerspectiveCamera){const ut=i.object.position;G.copy(ut).sub(i.target);let Lt=G.length();Lt*=Math.tan(i.object.fov/2*Math.PI/180),j(2*ye*Lt/tt.clientHeight,i.object.matrix),Y(2*Ce*Lt/tt.clientHeight,i.object.matrix)}else tt&&i.object instanceof cs&&i.object.isOrthographicCamera?(j(ye*(i.object.right-i.object.left)/i.object.zoom/tt.clientWidth,i.object.matrix),Y(Ce*(i.object.top-i.object.bottom)/i.object.zoom/tt.clientHeight,i.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),i.enablePan=!1)}})();function ne(G){i.object instanceof qt&&i.object.isPerspectiveCamera?p/=G:i.object instanceof cs&&i.object.isOrthographicCamera?(i.object.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.zoom*G)),i.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function D(G){i.object instanceof qt&&i.object.isPerspectiveCamera?p*=G:i.object instanceof cs&&i.object.isOrthographicCamera?(i.object.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.zoom/G)),i.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function B(G){x.set(G.clientX,G.clientY)}function V(G){E.set(G.clientX,G.clientY)}function re(G){_.set(G.clientX,G.clientY)}function ee(G){w.set(G.clientX,G.clientY),m.subVectors(w,x).multiplyScalar(i.rotateSpeed);const de=i.domElement;de&&(Z(2*Math.PI*m.x/de.clientHeight),X(2*Math.PI*m.y/de.clientHeight)),x.copy(w),i.update()}function ie(G){P.set(G.clientX,G.clientY),I.subVectors(P,E),I.y>0?ne(W()):I.y<0&&D(W()),E.copy(P),i.update()}function ce(G){S.set(G.clientX,G.clientY),A.subVectors(S,_).multiplyScalar(i.panSpeed),te(A.x,A.y),_.copy(S),i.update()}function be(G){G.deltaY<0?D(W()):G.deltaY>0&&ne(W()),i.update()}function ge(G){let de=!1;switch(G.code){case i.keys.UP:te(0,i.keyPanSpeed),de=!0;break;case i.keys.BOTTOM:te(0,-i.keyPanSpeed),de=!0;break;case i.keys.LEFT:te(i.keyPanSpeed,0),de=!0;break;case i.keys.RIGHT:te(-i.keyPanSpeed,0),de=!0;break}de&&(G.preventDefault(),i.update())}function Q(){if(L.length==1)x.set(L[0].pageX,L[0].pageY);else{const G=.5*(L[0].pageX+L[1].pageX),de=.5*(L[0].pageY+L[1].pageY);x.set(G,de)}}function Fe(){if(L.length==1)_.set(L[0].pageX,L[0].pageY);else{const G=.5*(L[0].pageX+L[1].pageX),de=.5*(L[0].pageY+L[1].pageY);_.set(G,de)}}function Be(){const G=L[0].pageX-L[1].pageX,de=L[0].pageY-L[1].pageY,ye=Math.sqrt(G*G+de*de);E.set(0,ye)}function _e(){i.enableZoom&&Be(),i.enablePan&&Fe()}function Me(){i.enableZoom&&Be(),i.enableRotate&&Q()}function ve(G){if(L.length==1)w.set(G.pageX,G.pageY);else{const ye=je(G),Ce=.5*(G.pageX+ye.x),tt=.5*(G.pageY+ye.y);w.set(Ce,tt)}m.subVectors(w,x).multiplyScalar(i.rotateSpeed);const de=i.domElement;de&&(Z(2*Math.PI*m.x/de.clientHeight),X(2*Math.PI*m.y/de.clientHeight)),x.copy(w)}function oe(G){if(L.length==1)S.set(G.pageX,G.pageY);else{const de=je(G),ye=.5*(G.pageX+de.x),Ce=.5*(G.pageY+de.y);S.set(ye,Ce)}A.subVectors(S,_).multiplyScalar(i.panSpeed),te(A.x,A.y),_.copy(S)}function we(G){const de=je(G),ye=G.pageX-de.x,Ce=G.pageY-de.y,tt=Math.sqrt(ye*ye+Ce*Ce);P.set(0,tt),I.set(0,Math.pow(P.y/E.y,i.zoomSpeed)),ne(I.y),E.copy(P)}function Ne(G){i.enableZoom&&we(G),i.enablePan&&oe(G)}function Le(G){i.enableZoom&&we(G),i.enableRotate&&ve(G)}function Ye(G){if(i.enabled!==!1){if(L.length===0){var de,ye;(de=i.domElement)===null||de===void 0||de.ownerDocument.addEventListener("pointermove",Je),(ye=i.domElement)===null||ye===void 0||ye.ownerDocument.addEventListener("pointerup",Ge)}nt(G),G.pointerType==="touch"?Ee(G):pt(G)}}function Je(G){i.enabled!==!1&&(G.pointerType==="touch"?Te(G):z(G))}function Ge(G){if(Oe(G),L.length===0){var de,ye,Ce;(de=i.domElement)===null||de===void 0||de.releasePointerCapture(G.pointerId),(ye=i.domElement)===null||ye===void 0||ye.ownerDocument.removeEventListener("pointermove",Je),(Ce=i.domElement)===null||Ce===void 0||Ce.ownerDocument.removeEventListener("pointerup",Ge)}i.dispatchEvent(o),l=a.NONE}function He(G){Oe(G)}function pt(G){let de;switch(G.button){case 0:de=i.mouseButtons.LEFT;break;case 1:de=i.mouseButtons.MIDDLE;break;case 2:de=i.mouseButtons.RIGHT;break;default:de=-1}switch(de){case Ia.DOLLY:if(i.enableZoom===!1)return;V(G),l=a.DOLLY;break;case Ia.ROTATE:if(G.ctrlKey||G.metaKey||G.shiftKey){if(i.enablePan===!1)return;re(G),l=a.PAN}else{if(i.enableRotate===!1)return;B(G),l=a.ROTATE}break;case Ia.PAN:if(G.ctrlKey||G.metaKey||G.shiftKey){if(i.enableRotate===!1)return;B(G),l=a.ROTATE}else{if(i.enablePan===!1)return;re(G),l=a.PAN}break;default:l=a.NONE}l!==a.NONE&&i.dispatchEvent(s)}function z(G){if(i.enabled!==!1)switch(l){case a.ROTATE:if(i.enableRotate===!1)return;ee(G);break;case a.DOLLY:if(i.enableZoom===!1)return;ie(G);break;case a.PAN:if(i.enablePan===!1)return;ce(G);break}}function k(G){i.enabled===!1||i.enableZoom===!1||l!==a.NONE&&l!==a.ROTATE||(G.preventDefault(),i.dispatchEvent(s),be(G),i.dispatchEvent(o))}function le(G){i.enabled===!1||i.enablePan===!1||ge(G)}function Ee(G){switch(he(G),L.length){case 1:switch(i.touches.ONE){case Da.ROTATE:if(i.enableRotate===!1)return;Q(),l=a.TOUCH_ROTATE;break;case Da.PAN:if(i.enablePan===!1)return;Fe(),l=a.TOUCH_PAN;break;default:l=a.NONE}break;case 2:switch(i.touches.TWO){case Da.DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;_e(),l=a.TOUCH_DOLLY_PAN;break;case Da.DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;Me(),l=a.TOUCH_DOLLY_ROTATE;break;default:l=a.NONE}break;default:l=a.NONE}l!==a.NONE&&i.dispatchEvent(s)}function Te(G){switch(he(G),l){case a.TOUCH_ROTATE:if(i.enableRotate===!1)return;ve(G),i.update();break;case a.TOUCH_PAN:if(i.enablePan===!1)return;oe(G),i.update();break;case a.TOUCH_DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;Ne(G),i.update();break;case a.TOUCH_DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;Le(G),i.update();break;default:l=a.NONE}}function Pe(G){i.enabled!==!1&&G.preventDefault()}function nt(G){L.push(G)}function Oe(G){delete C[G.pointerId];for(let de=0;de0,E=X>0,P=j>0,I=(A?1:0)+(E?1:0)+(P?1:0),I){case 0:{m.push(x[S]),m.push(x[S+1]),m.push(x[S+2]);break}case 1:{if(A&&(L=x[S+1],C=x[S+2],R=y(x[S],L,w,_),W=y(x[S],C,w,_)),E){L=x[S],C=x[S+2],R=y(x[S+1],L,w,_),W=y(x[S+1],C,w,_),m.push(R),m.push(C.clone()),m.push(L.clone()),m.push(C.clone()),m.push(R.clone()),m.push(W);break}P&&(L=x[S],C=x[S+1],R=y(x[S+2],L,w,_),W=y(x[S+2],C,w,_)),m.push(L.clone()),m.push(C.clone()),m.push(R),m.push(W),m.push(R.clone()),m.push(C.clone());break}case 2:{A||(L=x[S].clone(),C=y(L,x[S+1],w,_),R=y(L,x[S+2],w,_),m.push(L),m.push(C),m.push(R)),E||(L=x[S+1].clone(),C=y(L,x[S+2],w,_),R=y(L,x[S],w,_),m.push(L),m.push(C),m.push(R)),P||(L=x[S+2].clone(),C=y(L,x[S],w,_),R=y(L,x[S+1],w,_),m.push(L),m.push(C),m.push(R));break}}}return m}function y(x,w,m,_){const S=x.position.dot(m)-_,A=w.position.dot(m)-_,E=S/(S-A);return new PC(new O(x.position.x+E*(w.position.x-x.position.x),x.position.y+E*(w.position.y-x.position.y),x.position.z+E*(w.position.z-x.position.z)),new O(x.normal.x+E*(w.normal.x-x.normal.x),x.normal.y+E*(w.normal.y-x.normal.y),x.normal.z+E*(w.normal.z-x.normal.z)))}}}class PC{constructor(e,t){this.position=e,this.normal=t}clone(){return new this.constructor(this.position.clone(),this.normal.clone())}}const LC=n=>n===Object(n)&&!Array.isArray(n)&&typeof n!="function";function xS(n,e){const t=Yi(r=>r.gl),i=Kd(l0,LC(n)?Object.values(n):n);if(N.useLayoutEffect(()=>{e==null||e(i)},[e]),N.useEffect(()=>{(Array.isArray(i)?i:[i]).forEach(t.initTexture)},[t,i]),LC(n)){const r=Object.keys(n),s={};return r.forEach(o=>Object.assign(s,{[o]:i[r.indexOf(o)]})),s}else return i}xS.preload=n=>Kd.preload(l0,n);xS.clear=n=>Kd.clear(l0,n);function RY(n){return Array.isArray(n)}function Gy(n=[0,0,0]){return RY(n)?n:n instanceof O||n instanceof gl?[n.x,n.y,n.z]:[n,n,n]}const IY=N.forwardRef(function({debug:e,mesh:t,children:i,position:r,rotation:s,scale:o,...a},l){const f=N.useRef(null);N.useImperativeHandle(l,()=>f.current);const d=N.useRef(null);return N.useLayoutEffect(()=>{const h=(t==null?void 0:t.current)||f.current.parent,p=f.current;if(!(h instanceof jn))throw new Error('Decal must have a Mesh as parent or specify its "mesh" prop');const g={position:new O,rotation:new gl,scale:new O(1,1,1)};if(h){Ro(g,{position:r,scale:o});const y=h.matrixWorld.clone();if(h.matrixWorld.identity(),!s||typeof s=="number"){const x=new Dt;x.position.copy(g.position),x.lookAt(h.position),typeof s=="number"&&x.rotateZ(s),Ro(g,{rotation:x.rotation})}else Ro(g,{rotation:s});return p.geometry=new LY(h,g.position,g.rotation,g.scale),d.current&&Ro(d.current,g),h.matrixWorld=y,()=>{p.geometry.dispose()}}},[t,...Gy(r),...Gy(o),...Gy(s)]),N.createElement("mesh",{ref:f},i||N.createElement("meshStandardMaterial",fl({transparent:!0,polygonOffset:!0,polygonOffsetFactor:-10},a)),e&&N.createElement("mesh",{ref:d},N.createElement("boxGeometry",null),N.createElement("meshNormalMaterial",{wireframe:!0}),N.createElement("axesHelper",null)))}),DY=N.forwardRef(({makeDefault:n,camera:e,regress:t,domElement:i,enableDamping:r=!0,onChange:s,onStart:o,onEnd:a,...l},f)=>{const d=Yi(E=>E.invalidate),h=Yi(E=>E.camera),p=Yi(E=>E.gl),g=Yi(E=>E.events),y=Yi(E=>E.setEvents),x=Yi(E=>E.set),w=Yi(E=>E.get),m=Yi(E=>E.performance),_=e||h,S=i||g.connected||p.domElement,A=N.useMemo(()=>new PY(_),[_]);return gS(()=>{A.enabled&&A.update()},-1),N.useEffect(()=>(A.connect(S),()=>void A.dispose()),[S,t,A,d]),N.useEffect(()=>{const E=L=>{d(),t&&m.regress(),s&&s(L)},P=L=>{o&&o(L)},I=L=>{a&&a(L)};return A.addEventListener("change",E),A.addEventListener("start",P),A.addEventListener("end",I),()=>{A.removeEventListener("start",P),A.removeEventListener("end",I),A.removeEventListener("change",E)}},[s,o,a,A,d,y]),N.useEffect(()=>{if(n){const E=w().controls;return x({controls:A}),()=>x({controls:E})}},[n,A]),N.createElement("primitive",fl({ref:f,object:A,enableDamping:r},l))}),kY=N.forwardRef(({children:n,enabled:e=!0,speed:t=1,rotationIntensity:i=1,floatIntensity:r=1,floatingRange:s=[-.1,.1],...o},a)=>{const l=N.useRef(null),f=N.useRef(Math.random()*1e4);return gS(d=>{var h,p;if(!e||t===0)return;const g=f.current+d.clock.getElapsedTime();l.current.rotation.x=Math.cos(g/4*t)/8*i,l.current.rotation.y=Math.sin(g/4*t)/8*i,l.current.rotation.z=Math.sin(g/4*t)/20*i;let y=Math.sin(g/4*t)/10;y=FR.mapLinear(y,-.1,.1,(h=s==null?void 0:s[0])!==null&&h!==void 0?h:-.1,(p=s==null?void 0:s[1])!==null&&p!==void 0?p:.1),l.current.position.y=y*r,l.current.updateMatrix()}),N.createElement("group",o,N.createElement("group",{ref:EY([l,a]),matrixAutoUpdate:!1},n))});function NY({all:n,scene:e,camera:t}){const i=Yi(({gl:o})=>o),r=Yi(({camera:o})=>o),s=Yi(({scene:o})=>o);return N.useLayoutEffect(()=>{const o=[];n&&(e||s).traverse(f=>{f.visible===!1&&(o.push(f),f.visible=!0)}),i.compile(e||s,t||r);const a=new Hw(128);new Vw(.01,1e5,a).update(i,e||s),a.dispose(),o.forEach(f=>f.visible=!1)},[]),null}const OY=()=>{const{progress:n}=bY();return H.jsxs(AY,{as:"div",center:!0,style:{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"},children:[H.jsx("span",{className:"canvas-loader"}),H.jsxs("p",{style:{fontSize:14,color:"#F1F1F1",fontWeight:800,marginTop:40},children:[n.toFixed(2),"%"]})]})},UY=n=>{const[e]=xS([n.imgUrl]);return H.jsxs(kY,{speed:1.5,rotationIntensity:1,floatIntensity:1,children:[H.jsx("ambientLight",{intensity:.25}),H.jsx("directionalLight",{position:[0,0,.05]}),H.jsxs("mesh",{castShadow:!0,receiveShadow:!0,scale:2.75,children:[H.jsx("icosahedronGeometry",{args:[1,1]}),H.jsx("meshStandardMaterial",{color:"#fcd4d4",polygonOffset:!0,polygonOffsetFactor:-5,flatShading:!0}),H.jsx(IY,{position:[0,0,1],rotation:[2*Math.PI,0,6.25],scale:1,map:e,flatShading:!0})]})]})},zY=({icon:n})=>H.jsxs(pY,{frameloop:"demand",dpr:[1,2],gl:{preserveDrawingBuffer:!0},children:[H.jsxs(N.Suspense,{fallback:H.jsx(OY,{}),children:[H.jsx(DY,{enableZoom:!1}),H.jsx(UY,{imgUrl:n})]}),H.jsx(NY,{all:!0})]}),FY="/portfolio-react-threejs/assets/texture-5adaf7bf.webp",BY=()=>H.jsxs("div",{className:"xl:mt-6 flex flex-row flex-wrap justify-center items-center gap-10",children:[H.jsxs(On.div,{variants:Wo(),children:[H.jsx("h2",{className:`${$t.sectionHeadText} text-center`,children:"Skills & Technologies."}),H.jsx("p",{className:`${$t.sectionSubText} text-center`,children:"What have i learnd?"})]}),H.jsx("div",{className:"lg:w-[400px] lg:h-[400px]",children:H.jsx(zY,{icon:FY})},"skillsBall")]}),VY=au(BY,"skills"),HY=()=>H.jsx("div",{className:"h-screen flex justify-center items-center",children:H.jsx("img",{src:su,className:"w-[150px] h-[117px] "})});function WY(){return H.jsx(N.Suspense,{fallback:HY(),children:H.jsxs("div",{className:"bg-white",children:[H.jsx(Qs,{}),H.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:H.jsx(VY,{})})]})})}const GY=()=>H.jsx("div",{className:"h-screen flex justify-center items-center",children:H.jsx("img",{src:su,className:"w-[150px] h-[117px] "})});function jY(){return H.jsx(N.Suspense,{fallback:GY(),children:H.jsxs("div",{className:"bg-white",children:[H.jsx(Qs,{}),H.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:H.jsx(FL,{})})]})})}const XY=()=>H.jsx("div",{className:"h-screen flex justify-center items-center",children:H.jsx("img",{src:su,className:"w-[150px] h-[117px] "})});function YY(){return H.jsx(N.Suspense,{fallback:XY(),children:H.jsxs("div",{className:"bg-white",children:[H.jsx(Qs,{}),H.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:H.jsxs("div",{className:"h-screen ",children:[H.jsx("h1",{className:`${$t.sectionHeadText} text-center`,children:"No Page Found"}),H.jsx("p",{className:`${$t.heroSubText} mt-2 text-black-100 text-center`,children:"Try after something, it might showup 😊."})]})})]})})}const qY=()=>H.jsx("div",{className:"h-screen flex justify-center items-center",children:H.jsx("img",{src:su,className:"w-[150px] h-[117px] "})});function ZY(){return H.jsx(N.Suspense,{fallback:qY(),children:H.jsx(LU,{basename:"/portfolio-react-threejs",children:H.jsxs(bU,{children:[H.jsx(ns,{index:!0,element:H.jsx(aV,{})}),H.jsx(ns,{path:"/certificate",element:H.jsx(uV,{})}),H.jsx(ns,{path:"/resume",element:H.jsx(QV,{})}),H.jsx(ns,{path:"/blogs",element:H.jsx(t6,{})}),H.jsx(ns,{path:"/contact",element:H.jsx(c6,{})}),H.jsx(ns,{path:"/projects",element:H.jsx(g6,{})}),H.jsx(ns,{path:"/skills",element:H.jsx(WY,{})}),H.jsx(ns,{path:"/freetools",element:H.jsx(jY,{})}),H.jsx(ns,{path:"*",element:H.jsx(YY,{})})]})})})}Xy.createRoot(document.getElementById("root")).render(H.jsx(yr.StrictMode,{children:H.jsx(ZY,{})})); diff --git a/assets/index-533276be.css b/assets/index-533276be.css new file mode 100644 index 0000000..554ae83 --- /dev/null +++ b/assets/index-533276be.css @@ -0,0 +1 @@ +@import"https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap";.vertical-timeline *{-webkit-box-sizing:border-box;box-sizing:border-box}.vertical-timeline{width:95%;max-width:1170px;margin:0 auto;position:relative;padding:2em 0}.vertical-timeline:after{content:"";display:table;clear:both}.vertical-timeline:before{content:"";position:absolute;top:0;left:18px;height:100%;width:4px;background:var(--line-color)}.vertical-timeline.vertical-timeline--one-column-right:before{right:18px;left:unset}@media only screen and (min-width:1170px){.vertical-timeline.vertical-timeline--two-columns{width:90%}.vertical-timeline.vertical-timeline--two-columns:before{left:50%;margin-left:-2px}}.vertical-timeline-element{position:relative;margin:2em 0}.vertical-timeline-element>div{min-height:1px}.vertical-timeline-element:after{content:"";display:table;clear:both}.vertical-timeline-element:first-child{margin-top:0}.vertical-timeline-element:last-child{margin-bottom:0}@media only screen and (min-width:1170px){.vertical-timeline-element{margin:4em 0}.vertical-timeline-element:first-child{margin-top:0}.vertical-timeline-element:last-child{margin-bottom:0}}.vertical-timeline-element-icon{position:absolute;top:0;left:0;width:40px;height:40px;border-radius:50%;-webkit-box-shadow:0 0 0 4px #fff,inset 0 2px 0 rgba(0,0,0,.08),0 3px 0 4px rgba(0,0,0,.05);box-shadow:0 0 0 4px #fff,inset 0 2px #00000014,0 3px 0 4px #0000000d}.vertical-timeline--one-column-right .vertical-timeline-element-icon{right:0;left:unset}.vertical-timeline-element-icon svg{display:block;width:24px;height:24px;position:relative;left:50%;top:50%;margin-left:-12px;margin-top:-12px}@media only screen and (min-width:1170px){.vertical-timeline--two-columns .vertical-timeline-element-icon{width:60px;height:60px;left:50%;margin-left:-30px}}.vertical-timeline-element-icon{-webkit-transform:translateZ(0);-webkit-backface-visibility:hidden}.vertical-timeline--animate .vertical-timeline-element-icon.is-hidden{visibility:hidden}.vertical-timeline--animate .vertical-timeline-element-icon.bounce-in{visibility:visible;-webkit-animation:cd-bounce-1 .6s;animation:cd-bounce-1 .6s}@-webkit-keyframes cd-bounce-1{0%{opacity:0;-webkit-transform:scale(.5)}60%{opacity:1;-webkit-transform:scale(1.2)}to{-webkit-transform:scale(1)}}@keyframes cd-bounce-1{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}60%{opacity:1;-webkit-transform:scale(1.2);transform:scale(1.2)}to{-webkit-transform:scale(1);transform:scale(1)}}.vertical-timeline-element-content{position:relative;margin-left:60px;background:#fff;border-radius:.25em;padding:1em;-webkit-box-shadow:0 3px 0 #ddd;box-shadow:0 3px #ddd}.vertical-timeline--one-column-right .vertical-timeline-element-content{margin-right:60px;margin-left:unset}.vertical-timeline-element--no-children .vertical-timeline-element-content{background:0 0;-webkit-box-shadow:none;box-shadow:none}.vertical-timeline-element-content:after{content:"";display:table;clear:both}.vertical-timeline-element-content h2{color:#303e49}.vertical-timeline-element-content .vertical-timeline-element-date,.vertical-timeline-element-content p{font-size:13px;font-size:.8125rem;font-weight:500}.vertical-timeline-element-content .vertical-timeline-element-date{display:inline-block}.vertical-timeline-element-content p{margin:1em 0 0;line-height:1.6}.vertical-timeline-element-title,.vertical-timeline-element-subtitle{margin:0}.vertical-timeline-element-content .vertical-timeline-element-date{float:left;padding:.8em 0;opacity:.7}.vertical-timeline-element-content-arrow{content:"";position:absolute;top:16px;right:100%;height:0;width:0;border:7px solid transparent;border-right:7px solid #fff}.vertical-timeline--one-column-right .vertical-timeline-element-content-arrow{content:"";position:absolute;top:16px;right:unset;left:100%;height:0;width:0;border:7px solid transparent;border-left:7px solid #fff}.vertical-timeline--one-column-right .vertical-timeline-element-content:before{left:100%;border-left:7px solid #fff;border-right:unset}.vertical-timeline-element--no-children .vertical-timeline-element-content:before{display:none}.vertical-timeline-element--no-children .vertical-timeline-element-content-arrow{display:none}@media only screen and (min-width:768px){.vertical-timeline-element-content h2{font-size:20px;font-size:1.25rem}.vertical-timeline-element-content p{font-size:16px;font-size:1rem}.vertical-timeline-element-content .vertical-timeline-element-date{font-size:14px;font-size:.875rem}}@media only screen and (min-width:1170px){.vertical-timeline--two-columns .vertical-timeline-element-content{margin-left:0;padding:1.5em;width:44%}.vertical-timeline--two-columns .vertical-timeline-element-content-arrow{top:24px;left:100%;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vertical-timeline--two-columns .vertical-timeline-element-content .vertical-timeline-element-date{position:absolute;width:100%;left:124%;top:6px;font-size:16px;font-size:1rem}.vertical-timeline--two-columns .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content,.vertical-timeline--two-columns .vertical-timeline-element:nth-child(2n):not(.vertical-timeline-element--left) .vertical-timeline-element-content{float:right}.vertical-timeline--two-columns .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content-arrow,.vertical-timeline--two-columns .vertical-timeline-element:nth-child(2n):not(.vertical-timeline-element--left) .vertical-timeline-element-content-arrow{top:24px;left:auto;right:100%;-webkit-transform:rotate(0);transform:rotate(0)}.vertical-timeline--one-column-right .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content-arrow,.vertical-timeline--one-column-right .vertical-timeline-element:nth-child(2n):not(.vertical-timeline-element--left) .vertical-timeline-element-content-arrow{top:24px;left:100%;right:auto;-webkit-transform:rotate(0);transform:rotate(0)}.vertical-timeline--two-columns .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content .vertical-timeline-element-date,.vertical-timeline--two-columns .vertical-timeline-element:nth-child(2n):not(.vertical-timeline-element--left) .vertical-timeline-element-content .vertical-timeline-element-date{left:auto;right:124%;text-align:right}}.vertical-timeline--animate .vertical-timeline-element-content.is-hidden{visibility:hidden}.vertical-timeline--animate .vertical-timeline-element-content.bounce-in{visibility:visible;-webkit-animation:cd-bounce-2 .6s;animation:cd-bounce-2 .6s}@media only screen and (min-width:1170px){.vertical-timeline--two-columns.vertical-timeline--animate .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content.bounce-in,.vertical-timeline--two-columns.vertical-timeline--animate .vertical-timeline-element:nth-child(2n):not(.vertical-timeline-element--left) .vertical-timeline-element-content.bounce-in{-webkit-animation:cd-bounce-2-inverse .6s;animation:cd-bounce-2-inverse .6s}}@media only screen and (max-width:1169px){.vertical-timeline--animate .vertical-timeline-element-content.bounce-in{visibility:visible;-webkit-animation:cd-bounce-2-inverse .6s;animation:cd-bounce-2-inverse .6s}}@-webkit-keyframes cd-bounce-2{0%{opacity:0;-webkit-transform:translateX(-100px)}60%{opacity:1;-webkit-transform:translateX(20px)}to{-webkit-transform:translateX(0)}}@keyframes cd-bounce-2{0%{opacity:0;-webkit-transform:translateX(-100px);transform:translate(-100px)}60%{opacity:1;-webkit-transform:translateX(20px);transform:translate(20px)}to{-webkit-transform:translateX(0);transform:translate(0)}}@-webkit-keyframes cd-bounce-2-inverse{0%{opacity:0;-webkit-transform:translateX(100px)}60%{opacity:1;-webkit-transform:translateX(-20px)}to{-webkit-transform:translateX(0)}}@keyframes cd-bounce-2-inverse{0%{opacity:0;-webkit-transform:translateX(100px);transform:translate(100px)}60%{opacity:1;-webkit-transform:translateX(-20px);transform:translate(-20px)}to{-webkit-transform:translateX(0);transform:translate(0)}}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.-top-10{top:-2.5rem}.-top-12{top:-3rem}.bottom-32{bottom:8rem}.right-0{right:0}.right-40{right:10rem}.top-0{top:0}.top-20{top:5rem}.top-60{top:15rem}.top-\[120px\]{top:120px}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.-m-5{margin:-1.25rem}.m-3{margin:.75rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-10{margin-top:2.5rem;margin-bottom:2.5rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-20{margin-top:5rem;margin-bottom:5rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.ml-5{margin-left:1.25rem}.mt-12{margin-top:3rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-1\/2{height:50%}.h-10{height:2.5rem}.h-16{height:4rem}.h-3{height:.75rem}.h-40{height:10rem}.h-5{height:1.25rem}.h-\[117px\]{height:117px}.h-\[230px\]{height:230px}.h-\[28px\]{height:28px}.h-\[350px\]{height:350px}.h-\[400px\]{height:400px}.h-\[64px\]{height:64px}.h-\[75\%\]{height:75%}.h-full{height:100%}.h-screen{height:100vh}.min-h-\[280px\]{min-height:280px}.w-1{width:.25rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-16{width:4rem}.w-3{width:.75rem}.w-5{width:1.25rem}.w-\[150px\]{width:150px}.w-\[28px\]{width:28px}.w-\[35px\]{width:35px}.w-\[70\%\]{width:70%}.w-\[75\%\]{width:75%}.w-\[90\%\]{width:90%}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.min-w-\[140px\]{min-width:140px}.max-w-7xl{max-width:80rem}.max-w-full{max-width:100%}.max-w-screen-lg{max-width:1024px}.max-w-screen-xl{max-width:1280px}.flex-1{flex:1 1 0%}.flex-\[0\.75\]{flex:.75}.cursor-pointer{cursor:pointer}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-evenly{justify-content:space-evenly}.gap-10{gap:2.5rem}.gap-2{gap:.5rem}.gap-5{gap:1.25rem}.gap-8{gap:2rem}.space-x-5>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.25rem * var(--tw-space-x-reverse));margin-left:calc(1.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-10>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2.5rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[20px\]{border-radius:20px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.border-4{border-width:4px}.border-none{border-style:none}.border-\[\#373737\]{--tw-border-opacity: 1;border-color:rgb(55 55 55 / var(--tw-border-opacity))}.bg-\[\#373737\]{--tw-bg-opacity: 1;background-color:rgb(55 55 55 / var(--tw-bg-opacity))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity))}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(246 246 246 / var(--tw-bg-opacity))}.bg-secondary{--tw-bg-opacity: 1;background-color:rgb(55 55 55 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-60{--tw-bg-opacity: .6}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-\[\#f6f6f6\]{--tw-gradient-from: #f6f6f6 var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to: rgb(246 246 246 / 0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-white{--tw-gradient-from: #fff var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-primary{--tw-gradient-to: #f6f6f6 var(--tw-gradient-to-position);--tw-gradient-to-position: }.to-white{--tw-gradient-to: #fff var(--tw-gradient-to-position);--tw-gradient-to-position: }.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-2{padding:.5rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-\[1px\]{padding:1px}.px-12{padding-left:3rem;padding-right:3rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-10{padding-bottom:2.5rem}.pl-1{padding-left:.25rem}.text-center{text-align:center}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[16px\]{font-size:16px}.text-\[17px\]{font-size:17px}.text-\[18px\]{font-size:18px}.text-\[20px\]{font-size:20px}.text-\[24px\]{font-size:24px}.text-\[30px\]{font-size:30px}.text-\[40px\]{font-size:40px}.font-black{font-weight:900}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-\[30px\]{line-height:30px}.tracking-wider{letter-spacing:.05em}.text-\[\#373737\]{--tw-text-opacity: 1;color:rgb(55 55 55 / var(--tw-text-opacity))}.text-\[\#dfd9ff\]{--tw-text-opacity: 1;color:rgb(223 217 255 / var(--tw-text-opacity))}.text-\[\#fcd4d4\]{--tw-text-opacity: 1;color:rgb(252 212 212 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-black-100{--tw-text-opacity: 1;color:rgb(16 13 37 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-secondary{--tw-text-opacity: 1;color:rgb(55 55 55 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-white-100{--tw-text-opacity: 1;color:rgb(243 243 243 / var(--tw-text-opacity))}.underline-offset-8{text-underline-offset:8px}.opacity-0{opacity:0}.shadow-card{--tw-shadow: 0px 35px 120px -15px #211e35;--tw-shadow-colored: 0px 35px 120px -15px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[\#fcd4d4\]{--tw-shadow-color: #fcd4d4;--tw-shadow: var(--tw-shadow-colored)}.shadow-primary{--tw-shadow-color: #f6f6f6;--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}*{margin:0;padding:0;box-sizing:border-box;font-family:Poppins,sans-serif;scroll-behavior:smooth}body{background:linear-gradient(180deg,#e6eaf5 0%,#f6f6f6 80%)}.hash-span{margin-top:-100px;padding-bottom:100px;display:block}.black-gradient{background:#000000;background:linear-gradient(to right,#434343,#000000)}.white-gradient{background:#ffffff;background:linear-gradient(to right,#e6eaf5,#f6f6f6)}.violet-gradient{background:#373737;background:linear-gradient(-90deg,#373737 0%,rgba(60,51,80,0) 100%);background:-webkit-linear-gradient(-90deg,#373737 0%,black 100%)}.green-pink-gradient{background:"#00cea8";background:linear-gradient(90.13deg,#00cea8 1.9%,#bf61ff 97.5%);background:-webkit-linear-gradient(-90.13deg,#00cea8 1.9%,#bf61ff 97.5%)}.orange-text-gradient{background:#f12711;background:linear-gradient(to top,#f12711,#f5af19);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.green-text-gradient{background:#11998e;background:linear-gradient(to top,#11998e,#38ef7d);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.blue-text-gradient{background:#56ccf2;background:linear-gradient(to top,#2f80ed,#56ccf2);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.pink-text-gradient{background:#ec008c;background:linear-gradient(to top,#ec008c,#fc6767);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.canvas-loader{font-size:10px;width:1em;height:1em;border-radius:50%;position:relative;text-indent:-9999em;animation:mulShdSpin 1.1s infinite ease;transform:translateZ(0)}@keyframes mulShdSpin{0%,to{box-shadow:0 -2.6em #fff,1.8em -1.8em #fff3,2.5em 0 #fff3,1.75em 1.75em #fff3,0 2.5em #fff3,-1.8em 1.8em #fff3,-2.6em 0 #ffffff80,-1.8em -1.8em #ffffffb3}12.5%{box-shadow:0 -2.6em #ffffffb3,1.8em -1.8em #fff,2.5em 0 #fff3,1.75em 1.75em #fff3,0 2.5em #fff3,-1.8em 1.8em #fff3,-2.6em 0 #fff3,-1.8em -1.8em #ffffff80}25%{box-shadow:0 -2.6em #ffffff80,1.8em -1.8em #ffffffb3,2.5em 0 #fff,1.75em 1.75em #fff3,0 2.5em #fff3,-1.8em 1.8em #fff3,-2.6em 0 #fff3,-1.8em -1.8em #fff3}37.5%{box-shadow:0 -2.6em #fff3,1.8em -1.8em #ffffff80,2.5em 0 #ffffffb3,1.75em 1.75em #fff,0 2.5em #fff3,-1.8em 1.8em #fff3,-2.6em 0 #fff3,-1.8em -1.8em #fff3}50%{box-shadow:0 -2.6em #fff3,1.8em -1.8em #fff3,2.5em 0 #ffffff80,1.75em 1.75em #ffffffb3,0 2.5em #fff,-1.8em 1.8em #fff3,-2.6em 0 #fff3,-1.8em -1.8em #fff3}62.5%{box-shadow:0 -2.6em #fff3,1.8em -1.8em #fff3,2.5em 0 #fff3,1.75em 1.75em #ffffff80,0 2.5em #ffffffb3,-1.8em 1.8em #fff,-2.6em 0 #fff3,-1.8em -1.8em #fff3}75%{box-shadow:0 -2.6em #fff3,1.8em -1.8em #fff3,2.5em 0 #fff3,1.75em 1.75em #fff3,0 2.5em #ffffff80,-1.8em 1.8em #ffffffb3,-2.6em 0 #fff,-1.8em -1.8em #fff3}87.5%{box-shadow:0 -2.6em #fff3,1.8em -1.8em #fff3,2.5em 0 #fff3,1.75em 1.75em #fff3,0 2.5em #fff3,-1.8em 1.8em #ffffff80,-2.6em 0 #ffffffb3,-1.8em -1.8em #fff}}.funky-text-outline{text-shadow:-1px -1px 0 #fff,1px -1px 0 #fff,-1px 1px 0 #fff,1px 1px 0 #fff,2px 2px 0 #fff,-2px -2px 0 #fff,2px -2px 0 #fff,-2px 2px 0 #fff}.funky-text-outline-2{text-shadow:-3px -3px 0 #C0C0C0,3px -3px 0 #C0C0C0,-3px 3px 0 #C0C0C0,3px 3px 0 #C0C0C0}.placeholder\:text-white-100::-moz-placeholder{--tw-text-opacity: 1;color:rgb(243 243 243 / var(--tw-text-opacity))}.placeholder\:text-white-100::placeholder{--tw-text-opacity: 1;color:rgb(243 243 243 / var(--tw-text-opacity))}.hover\:bg-blue-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 64 175 / var(--tw-bg-opacity))}.hover\:bg-gray-800:hover{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.hover\:bg-green-800:hover{--tw-bg-opacity: 1;background-color:rgb(22 101 52 / var(--tw-bg-opacity))}.hover\:bg-secondary:hover{--tw-bg-opacity: 1;background-color:rgb(55 55 55 / var(--tw-bg-opacity))}.hover\:bg-slate-600:hover{--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity))}.hover\:text-black:hover{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.hover\:text-gray-200:hover{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.hover\:text-white-100:hover{--tw-text-opacity: 1;color:rgb(243 243 243 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover,.group:hover .group-hover\:opacity-100{opacity:1}@media (min-width: 450px){.xs\:bottom-10{bottom:2.5rem}.xs\:w-\[250px\]{width:250px}.xs\:text-\[20px\]{font-size:20px}.xs\:text-\[40px\]{font-size:40px}.xs\:text-\[50px\]{font-size:50px}}@media (min-width: 640px){.sm\:right-5{right:1.25rem}.sm\:top-20{top:5rem}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:h-80{height:20rem}.sm\:w-\[360px\]{width:360px}.sm\:px-16{padding-left:4rem;padding-right:4rem}.sm\:py-16{padding-top:4rem;padding-bottom:4rem}.sm\:text-\[18px\]{font-size:18px}.sm\:text-\[26px\]{font-size:26px}.sm\:text-\[50px\]{font-size:50px}.sm\:text-\[60px\]{font-size:60px}}@media (min-width: 768px){.md\:absolute{position:absolute}.md\:-right-10{right:-2.5rem}.md\:-right-20{right:-5rem}.md\:bottom-0{bottom:0}.md\:top-10{top:2.5rem}.md\:top-2{top:.5rem}.md\:-m-10{margin:-2.5rem}.md\:mb-0{margin-bottom:0}.md\:block{display:block}.md\:flex{display:flex}.md\:h-\[550px\]{height:550px}.md\:w-\[80\%\]{width:80%}.md\:max-w-3xl{max-width:48rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:flex-col{flex-direction:column}.md\:items-center{align-items:center}.md\:justify-center{justify-content:center}.md\:gap-4{gap:1rem}.md\:space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.md\:text-\[60px\]{font-size:60px}}@media (min-width: 1024px){.lg\:top-\[100px\]{top:100px}.lg\:flex{display:flex}.lg\:h-\[400px\]{height:400px}.lg\:w-\[400px\]{width:400px}.lg\:w-\[70\%\]{width:70%}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:text-\[30px\]{font-size:30px}.lg\:text-\[80px\]{font-size:80px}.lg\:leading-\[40px\]{line-height:40px}.lg\:leading-\[98px\]{line-height:98px}}@media (min-width: 1280px){.xl\:mt-6{margin-top:1.5rem}.xl\:h-auto{height:auto}.xl\:flex-1{flex:1 1 0%}.xl\:flex-row{flex-direction:row}} diff --git a/assets/index-6e922349.css b/assets/index-6e922349.css deleted file mode 100644 index 3a16e18..0000000 --- a/assets/index-6e922349.css +++ /dev/null @@ -1 +0,0 @@ -@import"https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap";.vertical-timeline *{-webkit-box-sizing:border-box;box-sizing:border-box}.vertical-timeline{width:95%;max-width:1170px;margin:0 auto;position:relative;padding:2em 0}.vertical-timeline:after{content:"";display:table;clear:both}.vertical-timeline:before{content:"";position:absolute;top:0;left:18px;height:100%;width:4px;background:var(--line-color)}.vertical-timeline.vertical-timeline--one-column-right:before{right:18px;left:unset}@media only screen and (min-width:1170px){.vertical-timeline.vertical-timeline--two-columns{width:90%}.vertical-timeline.vertical-timeline--two-columns:before{left:50%;margin-left:-2px}}.vertical-timeline-element{position:relative;margin:2em 0}.vertical-timeline-element>div{min-height:1px}.vertical-timeline-element:after{content:"";display:table;clear:both}.vertical-timeline-element:first-child{margin-top:0}.vertical-timeline-element:last-child{margin-bottom:0}@media only screen and (min-width:1170px){.vertical-timeline-element{margin:4em 0}.vertical-timeline-element:first-child{margin-top:0}.vertical-timeline-element:last-child{margin-bottom:0}}.vertical-timeline-element-icon{position:absolute;top:0;left:0;width:40px;height:40px;border-radius:50%;-webkit-box-shadow:0 0 0 4px #fff,inset 0 2px 0 rgba(0,0,0,.08),0 3px 0 4px rgba(0,0,0,.05);box-shadow:0 0 0 4px #fff,inset 0 2px #00000014,0 3px 0 4px #0000000d}.vertical-timeline--one-column-right .vertical-timeline-element-icon{right:0;left:unset}.vertical-timeline-element-icon svg{display:block;width:24px;height:24px;position:relative;left:50%;top:50%;margin-left:-12px;margin-top:-12px}@media only screen and (min-width:1170px){.vertical-timeline--two-columns .vertical-timeline-element-icon{width:60px;height:60px;left:50%;margin-left:-30px}}.vertical-timeline-element-icon{-webkit-transform:translateZ(0);-webkit-backface-visibility:hidden}.vertical-timeline--animate .vertical-timeline-element-icon.is-hidden{visibility:hidden}.vertical-timeline--animate .vertical-timeline-element-icon.bounce-in{visibility:visible;-webkit-animation:cd-bounce-1 .6s;animation:cd-bounce-1 .6s}@-webkit-keyframes cd-bounce-1{0%{opacity:0;-webkit-transform:scale(.5)}60%{opacity:1;-webkit-transform:scale(1.2)}to{-webkit-transform:scale(1)}}@keyframes cd-bounce-1{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}60%{opacity:1;-webkit-transform:scale(1.2);transform:scale(1.2)}to{-webkit-transform:scale(1);transform:scale(1)}}.vertical-timeline-element-content{position:relative;margin-left:60px;background:#fff;border-radius:.25em;padding:1em;-webkit-box-shadow:0 3px 0 #ddd;box-shadow:0 3px #ddd}.vertical-timeline--one-column-right .vertical-timeline-element-content{margin-right:60px;margin-left:unset}.vertical-timeline-element--no-children .vertical-timeline-element-content{background:0 0;-webkit-box-shadow:none;box-shadow:none}.vertical-timeline-element-content:after{content:"";display:table;clear:both}.vertical-timeline-element-content h2{color:#303e49}.vertical-timeline-element-content .vertical-timeline-element-date,.vertical-timeline-element-content p{font-size:13px;font-size:.8125rem;font-weight:500}.vertical-timeline-element-content .vertical-timeline-element-date{display:inline-block}.vertical-timeline-element-content p{margin:1em 0 0;line-height:1.6}.vertical-timeline-element-title,.vertical-timeline-element-subtitle{margin:0}.vertical-timeline-element-content .vertical-timeline-element-date{float:left;padding:.8em 0;opacity:.7}.vertical-timeline-element-content-arrow{content:"";position:absolute;top:16px;right:100%;height:0;width:0;border:7px solid transparent;border-right:7px solid #fff}.vertical-timeline--one-column-right .vertical-timeline-element-content-arrow{content:"";position:absolute;top:16px;right:unset;left:100%;height:0;width:0;border:7px solid transparent;border-left:7px solid #fff}.vertical-timeline--one-column-right .vertical-timeline-element-content:before{left:100%;border-left:7px solid #fff;border-right:unset}.vertical-timeline-element--no-children .vertical-timeline-element-content:before{display:none}.vertical-timeline-element--no-children .vertical-timeline-element-content-arrow{display:none}@media only screen and (min-width:768px){.vertical-timeline-element-content h2{font-size:20px;font-size:1.25rem}.vertical-timeline-element-content p{font-size:16px;font-size:1rem}.vertical-timeline-element-content .vertical-timeline-element-date{font-size:14px;font-size:.875rem}}@media only screen and (min-width:1170px){.vertical-timeline--two-columns .vertical-timeline-element-content{margin-left:0;padding:1.5em;width:44%}.vertical-timeline--two-columns .vertical-timeline-element-content-arrow{top:24px;left:100%;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vertical-timeline--two-columns .vertical-timeline-element-content .vertical-timeline-element-date{position:absolute;width:100%;left:124%;top:6px;font-size:16px;font-size:1rem}.vertical-timeline--two-columns .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content,.vertical-timeline--two-columns .vertical-timeline-element:nth-child(2n):not(.vertical-timeline-element--left) .vertical-timeline-element-content{float:right}.vertical-timeline--two-columns .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content-arrow,.vertical-timeline--two-columns .vertical-timeline-element:nth-child(2n):not(.vertical-timeline-element--left) .vertical-timeline-element-content-arrow{top:24px;left:auto;right:100%;-webkit-transform:rotate(0);transform:rotate(0)}.vertical-timeline--one-column-right .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content-arrow,.vertical-timeline--one-column-right .vertical-timeline-element:nth-child(2n):not(.vertical-timeline-element--left) .vertical-timeline-element-content-arrow{top:24px;left:100%;right:auto;-webkit-transform:rotate(0);transform:rotate(0)}.vertical-timeline--two-columns .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content .vertical-timeline-element-date,.vertical-timeline--two-columns .vertical-timeline-element:nth-child(2n):not(.vertical-timeline-element--left) .vertical-timeline-element-content .vertical-timeline-element-date{left:auto;right:124%;text-align:right}}.vertical-timeline--animate .vertical-timeline-element-content.is-hidden{visibility:hidden}.vertical-timeline--animate .vertical-timeline-element-content.bounce-in{visibility:visible;-webkit-animation:cd-bounce-2 .6s;animation:cd-bounce-2 .6s}@media only screen and (min-width:1170px){.vertical-timeline--two-columns.vertical-timeline--animate .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content.bounce-in,.vertical-timeline--two-columns.vertical-timeline--animate .vertical-timeline-element:nth-child(2n):not(.vertical-timeline-element--left) .vertical-timeline-element-content.bounce-in{-webkit-animation:cd-bounce-2-inverse .6s;animation:cd-bounce-2-inverse .6s}}@media only screen and (max-width:1169px){.vertical-timeline--animate .vertical-timeline-element-content.bounce-in{visibility:visible;-webkit-animation:cd-bounce-2-inverse .6s;animation:cd-bounce-2-inverse .6s}}@-webkit-keyframes cd-bounce-2{0%{opacity:0;-webkit-transform:translateX(-100px)}60%{opacity:1;-webkit-transform:translateX(20px)}to{-webkit-transform:translateX(0)}}@keyframes cd-bounce-2{0%{opacity:0;-webkit-transform:translateX(-100px);transform:translate(-100px)}60%{opacity:1;-webkit-transform:translateX(20px);transform:translate(20px)}to{-webkit-transform:translateX(0);transform:translate(0)}}@-webkit-keyframes cd-bounce-2-inverse{0%{opacity:0;-webkit-transform:translateX(100px)}60%{opacity:1;-webkit-transform:translateX(-20px)}to{-webkit-transform:translateX(0)}}@keyframes cd-bounce-2-inverse{0%{opacity:0;-webkit-transform:translateX(100px);transform:translate(100px)}60%{opacity:1;-webkit-transform:translateX(-20px);transform:translate(-20px)}to{-webkit-transform:translateX(0);transform:translate(0)}}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.-top-10{top:-2.5rem}.-top-12{top:-3rem}.bottom-32{bottom:8rem}.right-0{right:0}.right-40{right:10rem}.top-0{top:0}.top-20{top:5rem}.top-60{top:15rem}.top-\[120px\]{top:120px}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.m-3{margin:.75rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-10{margin-top:2.5rem;margin-bottom:2.5rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-20{margin-top:5rem;margin-bottom:5rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.ml-5{margin-left:1.25rem}.mt-12{margin-top:3rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-1\/2{height:50%}.h-10{height:2.5rem}.h-16{height:4rem}.h-3{height:.75rem}.h-40{height:10rem}.h-5{height:1.25rem}.h-\[117px\]{height:117px}.h-\[230px\]{height:230px}.h-\[28px\]{height:28px}.h-\[350px\]{height:350px}.h-\[400px\]{height:400px}.h-\[64px\]{height:64px}.h-\[75\%\]{height:75%}.h-full{height:100%}.h-screen{height:100vh}.min-h-\[280px\]{min-height:280px}.w-1{width:.25rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-16{width:4rem}.w-3{width:.75rem}.w-5{width:1.25rem}.w-\[150px\]{width:150px}.w-\[28px\]{width:28px}.w-\[35px\]{width:35px}.w-\[70\%\]{width:70%}.w-\[75\%\]{width:75%}.w-\[90\%\]{width:90%}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.min-w-\[140px\]{min-width:140px}.max-w-7xl{max-width:80rem}.max-w-full{max-width:100%}.max-w-screen-lg{max-width:1024px}.max-w-screen-xl{max-width:1280px}.flex-1{flex:1 1 0%}.flex-\[0\.75\]{flex:.75}.cursor-pointer{cursor:pointer}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-evenly{justify-content:space-evenly}.gap-10{gap:2.5rem}.gap-2{gap:.5rem}.gap-5{gap:1.25rem}.gap-8{gap:2rem}.space-x-5>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.25rem * var(--tw-space-x-reverse));margin-left:calc(1.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-10>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2.5rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[20px\]{border-radius:20px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.border-4{border-width:4px}.border-none{border-style:none}.border-\[\#373737\]{--tw-border-opacity: 1;border-color:rgb(55 55 55 / var(--tw-border-opacity))}.bg-\[\#373737\]{--tw-bg-opacity: 1;background-color:rgb(55 55 55 / var(--tw-bg-opacity))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity))}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(246 246 246 / var(--tw-bg-opacity))}.bg-secondary{--tw-bg-opacity: 1;background-color:rgb(55 55 55 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-60{--tw-bg-opacity: .6}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-\[\#f6f6f6\]{--tw-gradient-from: #f6f6f6 var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to: rgb(246 246 246 / 0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-white{--tw-gradient-from: #fff var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-primary{--tw-gradient-to: #f6f6f6 var(--tw-gradient-to-position);--tw-gradient-to-position: }.to-white{--tw-gradient-to: #fff var(--tw-gradient-to-position);--tw-gradient-to-position: }.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-2{padding:.5rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-\[1px\]{padding:1px}.px-12{padding-left:3rem;padding-right:3rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-10{padding-bottom:2.5rem}.pl-1{padding-left:.25rem}.text-center{text-align:center}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[16px\]{font-size:16px}.text-\[17px\]{font-size:17px}.text-\[18px\]{font-size:18px}.text-\[20px\]{font-size:20px}.text-\[24px\]{font-size:24px}.text-\[30px\]{font-size:30px}.text-\[40px\]{font-size:40px}.font-black{font-weight:900}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-\[30px\]{line-height:30px}.tracking-wider{letter-spacing:.05em}.text-\[\#373737\]{--tw-text-opacity: 1;color:rgb(55 55 55 / var(--tw-text-opacity))}.text-\[\#dfd9ff\]{--tw-text-opacity: 1;color:rgb(223 217 255 / var(--tw-text-opacity))}.text-\[\#fcd4d4\]{--tw-text-opacity: 1;color:rgb(252 212 212 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-black-100{--tw-text-opacity: 1;color:rgb(16 13 37 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-secondary{--tw-text-opacity: 1;color:rgb(55 55 55 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-white-100{--tw-text-opacity: 1;color:rgb(243 243 243 / var(--tw-text-opacity))}.underline-offset-8{text-underline-offset:8px}.opacity-0{opacity:0}.shadow-card{--tw-shadow: 0px 35px 120px -15px #211e35;--tw-shadow-colored: 0px 35px 120px -15px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[\#fcd4d4\]{--tw-shadow-color: #fcd4d4;--tw-shadow: var(--tw-shadow-colored)}.shadow-primary{--tw-shadow-color: #f6f6f6;--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}*{margin:0;padding:0;box-sizing:border-box;font-family:Poppins,sans-serif;scroll-behavior:smooth}body{background:linear-gradient(180deg,#e6eaf5 0%,#f6f6f6 80%)}.hash-span{margin-top:-100px;padding-bottom:100px;display:block}.black-gradient{background:#000000;background:linear-gradient(to right,#434343,#000000)}.white-gradient{background:#ffffff;background:linear-gradient(to right,#e6eaf5,#f6f6f6)}.violet-gradient{background:#373737;background:linear-gradient(-90deg,#373737 0%,rgba(60,51,80,0) 100%);background:-webkit-linear-gradient(-90deg,#373737 0%,black 100%)}.green-pink-gradient{background:"#00cea8";background:linear-gradient(90.13deg,#00cea8 1.9%,#bf61ff 97.5%);background:-webkit-linear-gradient(-90.13deg,#00cea8 1.9%,#bf61ff 97.5%)}.orange-text-gradient{background:#f12711;background:linear-gradient(to top,#f12711,#f5af19);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.green-text-gradient{background:#11998e;background:linear-gradient(to top,#11998e,#38ef7d);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.blue-text-gradient{background:#56ccf2;background:linear-gradient(to top,#2f80ed,#56ccf2);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.pink-text-gradient{background:#ec008c;background:linear-gradient(to top,#ec008c,#fc6767);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.canvas-loader{font-size:10px;width:1em;height:1em;border-radius:50%;position:relative;text-indent:-9999em;animation:mulShdSpin 1.1s infinite ease;transform:translateZ(0)}@keyframes mulShdSpin{0%,to{box-shadow:0 -2.6em #fff,1.8em -1.8em #fff3,2.5em 0 #fff3,1.75em 1.75em #fff3,0 2.5em #fff3,-1.8em 1.8em #fff3,-2.6em 0 #ffffff80,-1.8em -1.8em #ffffffb3}12.5%{box-shadow:0 -2.6em #ffffffb3,1.8em -1.8em #fff,2.5em 0 #fff3,1.75em 1.75em #fff3,0 2.5em #fff3,-1.8em 1.8em #fff3,-2.6em 0 #fff3,-1.8em -1.8em #ffffff80}25%{box-shadow:0 -2.6em #ffffff80,1.8em -1.8em #ffffffb3,2.5em 0 #fff,1.75em 1.75em #fff3,0 2.5em #fff3,-1.8em 1.8em #fff3,-2.6em 0 #fff3,-1.8em -1.8em #fff3}37.5%{box-shadow:0 -2.6em #fff3,1.8em -1.8em #ffffff80,2.5em 0 #ffffffb3,1.75em 1.75em #fff,0 2.5em #fff3,-1.8em 1.8em #fff3,-2.6em 0 #fff3,-1.8em -1.8em #fff3}50%{box-shadow:0 -2.6em #fff3,1.8em -1.8em #fff3,2.5em 0 #ffffff80,1.75em 1.75em #ffffffb3,0 2.5em #fff,-1.8em 1.8em #fff3,-2.6em 0 #fff3,-1.8em -1.8em #fff3}62.5%{box-shadow:0 -2.6em #fff3,1.8em -1.8em #fff3,2.5em 0 #fff3,1.75em 1.75em #ffffff80,0 2.5em #ffffffb3,-1.8em 1.8em #fff,-2.6em 0 #fff3,-1.8em -1.8em #fff3}75%{box-shadow:0 -2.6em #fff3,1.8em -1.8em #fff3,2.5em 0 #fff3,1.75em 1.75em #fff3,0 2.5em #ffffff80,-1.8em 1.8em #ffffffb3,-2.6em 0 #fff,-1.8em -1.8em #fff3}87.5%{box-shadow:0 -2.6em #fff3,1.8em -1.8em #fff3,2.5em 0 #fff3,1.75em 1.75em #fff3,0 2.5em #fff3,-1.8em 1.8em #ffffff80,-2.6em 0 #ffffffb3,-1.8em -1.8em #fff}}.funky-text-outline{text-shadow:-1px -1px 0 #fff,1px -1px 0 #fff,-1px 1px 0 #fff,1px 1px 0 #fff,2px 2px 0 #fff,-2px -2px 0 #fff,2px -2px 0 #fff,-2px 2px 0 #fff}.funky-text-outline-2{text-shadow:-3px -3px 0 #C0C0C0,3px -3px 0 #C0C0C0,-3px 3px 0 #C0C0C0,3px 3px 0 #C0C0C0}.placeholder\:text-white-100::-moz-placeholder{--tw-text-opacity: 1;color:rgb(243 243 243 / var(--tw-text-opacity))}.placeholder\:text-white-100::placeholder{--tw-text-opacity: 1;color:rgb(243 243 243 / var(--tw-text-opacity))}.hover\:bg-blue-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 64 175 / var(--tw-bg-opacity))}.hover\:bg-gray-800:hover{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.hover\:bg-green-800:hover{--tw-bg-opacity: 1;background-color:rgb(22 101 52 / var(--tw-bg-opacity))}.hover\:bg-secondary:hover{--tw-bg-opacity: 1;background-color:rgb(55 55 55 / var(--tw-bg-opacity))}.hover\:bg-slate-600:hover{--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity))}.hover\:text-black:hover{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.hover\:text-gray-200:hover{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.hover\:text-white-100:hover{--tw-text-opacity: 1;color:rgb(243 243 243 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover,.group:hover .group-hover\:opacity-100{opacity:1}@media (min-width: 450px){.xs\:bottom-10{bottom:2.5rem}.xs\:w-\[250px\]{width:250px}.xs\:text-\[20px\]{font-size:20px}.xs\:text-\[40px\]{font-size:40px}.xs\:text-\[50px\]{font-size:50px}}@media (min-width: 640px){.sm\:right-5{right:1.25rem}.sm\:top-20{top:5rem}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:h-80{height:20rem}.sm\:w-\[360px\]{width:360px}.sm\:px-16{padding-left:4rem;padding-right:4rem}.sm\:py-16{padding-top:4rem;padding-bottom:4rem}.sm\:text-\[18px\]{font-size:18px}.sm\:text-\[26px\]{font-size:26px}.sm\:text-\[50px\]{font-size:50px}.sm\:text-\[60px\]{font-size:60px}}@media (min-width: 768px){.md\:absolute{position:absolute}.md\:-right-10{right:-2.5rem}.md\:-right-20{right:-5rem}.md\:bottom-0{bottom:0}.md\:top-10{top:2.5rem}.md\:top-2{top:.5rem}.md\:mb-0{margin-bottom:0}.md\:block{display:block}.md\:flex{display:flex}.md\:h-\[550px\]{height:550px}.md\:w-\[80\%\]{width:80%}.md\:max-w-3xl{max-width:48rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:flex-col{flex-direction:column}.md\:items-center{align-items:center}.md\:justify-center{justify-content:center}.md\:gap-4{gap:1rem}.md\:space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.md\:text-\[60px\]{font-size:60px}}@media (min-width: 1024px){.lg\:top-\[100px\]{top:100px}.lg\:flex{display:flex}.lg\:h-\[400px\]{height:400px}.lg\:w-\[400px\]{width:400px}.lg\:w-\[70\%\]{width:70%}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:text-\[30px\]{font-size:30px}.lg\:text-\[80px\]{font-size:80px}.lg\:leading-\[40px\]{line-height:40px}.lg\:leading-\[98px\]{line-height:98px}}@media (min-width: 1280px){.xl\:mt-6{margin-top:1.5rem}.xl\:h-auto{height:auto}.xl\:flex-1{flex:1 1 0%}.xl\:flex-row{flex-direction:row}} diff --git a/assets/index-97471f9a.js b/assets/index-97471f9a.js new file mode 100644 index 0000000..33d8950 --- /dev/null +++ b/assets/index-97471f9a.js @@ -0,0 +1,3568 @@ +function nD(n,e){for(var t=0;ti[r]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=t(r);fetch(r.href,s)}})();function E_(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function iD(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(i){var r=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(t,i,r.get?r:{enumerable:!0,get:function(){return n[i]}})}),t}var FT={exports:{}},Ym={},BT={exports:{}},At={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var th=Symbol.for("react.element"),rD=Symbol.for("react.portal"),sD=Symbol.for("react.fragment"),oD=Symbol.for("react.strict_mode"),aD=Symbol.for("react.profiler"),lD=Symbol.for("react.provider"),uD=Symbol.for("react.context"),cD=Symbol.for("react.forward_ref"),fD=Symbol.for("react.suspense"),hD=Symbol.for("react.memo"),dD=Symbol.for("react.lazy"),xM=Symbol.iterator;function pD(n){return n===null||typeof n!="object"?null:(n=xM&&n[xM]||n["@@iterator"],typeof n=="function"?n:null)}var VT={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},HT=Object.assign,WT={};function Uu(n,e,t){this.props=n,this.context=e,this.refs=WT,this.updater=t||VT}Uu.prototype.isReactComponent={};Uu.prototype.setState=function(n,e){if(typeof n!="object"&&typeof n!="function"&&n!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,n,e,"setState")};Uu.prototype.forceUpdate=function(n){this.updater.enqueueForceUpdate(this,n,"forceUpdate")};function GT(){}GT.prototype=Uu.prototype;function b_(n,e,t){this.props=n,this.context=e,this.refs=WT,this.updater=t||VT}var T_=b_.prototype=new GT;T_.constructor=b_;HT(T_,Uu.prototype);T_.isPureReactComponent=!0;var _M=Array.isArray,jT=Object.prototype.hasOwnProperty,C_={current:null},XT={key:!0,ref:!0,__self:!0,__source:!0};function YT(n,e,t){var i,r={},s=null,o=null;if(e!=null)for(i in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)jT.call(e,i)&&!XT.hasOwnProperty(i)&&(r[i]=e[i]);var a=arguments.length-2;if(a===1)r.children=t;else if(1>>1,$=D[te];if(0>>1;ter(Ee,B))we<$&&0>r(Q,Ee)?(D[te]=Q,D[we]=B,te=we):(D[te]=Ee,D[ue]=B,te=ue);else if(we<$&&0>r(Q,B))D[te]=Q,D[we]=B,te=we;else break e}}return V}function r(D,V){var B=D.sortIndex-V.sortIndex;return B!==0?B:D.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();n.unstable_now=function(){return o.now()-a}}var l=[],f=[],h=1,d=null,p=3,v=!1,y=!1,_=!1,M=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(D){for(var V=t(f);V!==null;){if(V.callback===null)i(f);else if(V.startTime<=D)i(f),V.sortIndex=V.expirationTime,e(l,V);else break;V=t(f)}}function A(D){if(_=!1,w(D),!y)if(t(l)!==null)y=!0,se(b);else{var V=t(f);V!==null&&ae(A,V.startTime-D)}}function b(D,V){y=!1,_&&(_=!1,m(L),L=-1),v=!0;var B=p;try{for(w(V),d=t(l);d!==null&&(!(d.expirationTime>V)||D&&!W());){var te=d.callback;if(typeof te=="function"){d.callback=null,p=d.priorityLevel;var $=te(d.expirationTime<=V);V=n.unstable_now(),typeof $=="function"?d.callback=$:d===t(l)&&i(l),w(V)}else i(l);d=t(l)}if(d!==null)var ee=!0;else{var ue=t(f);ue!==null&&ae(A,ue.startTime-V),ee=!1}return ee}finally{d=null,p=B,v=!1}}var P=!1,I=null,L=-1,C=5,R=-1;function W(){return!(n.unstable_now()-RD||125te?(D.sortIndex=B,e(f,D),t(l)===null&&D===t(f)&&(_?(m(L),L=-1):_=!0,ae(A,B-te))):(D.sortIndex=$,e(l,D),y||v||(y=!0,se(b))),D},n.unstable_shouldYield=W,n.unstable_wrapCallback=function(D){var V=p;return function(){var B=p;p=V;try{return D.apply(this,arguments)}finally{p=B}}}})(KT);JT.exports=KT;var ED=JT.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var QT=H,Xi=ED;function Ce(n){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+n,t=1;t"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_y=Object.prototype.hasOwnProperty,bD=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,wM={},MM={};function TD(n){return _y.call(MM,n)?!0:_y.call(wM,n)?!1:bD.test(n)?MM[n]=!0:(wM[n]=!0,!1)}function CD(n,e,t,i){if(t!==null&&t.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return i?!1:t!==null?!t.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function PD(n,e,t,i){if(e===null||typeof e>"u"||CD(n,e,t,i))return!0;if(i)return!1;if(t!==null)switch(t.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function vi(n,e,t,i,r,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=t,this.propertyName=n,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var Xn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){Xn[n]=new vi(n,0,!1,n,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var e=n[0];Xn[e]=new vi(e,1,!1,n[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(n){Xn[n]=new vi(n,2,!1,n.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){Xn[n]=new vi(n,2,!1,n,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(n){Xn[n]=new vi(n,3,!1,n.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(n){Xn[n]=new vi(n,3,!0,n,null,!1,!1)});["capture","download"].forEach(function(n){Xn[n]=new vi(n,4,!1,n,null,!1,!1)});["cols","rows","size","span"].forEach(function(n){Xn[n]=new vi(n,6,!1,n,null,!1,!1)});["rowSpan","start"].forEach(function(n){Xn[n]=new vi(n,5,!1,n.toLowerCase(),null,!1,!1)});var L_=/[\-:]([a-z])/g;function R_(n){return n[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(n){var e=n.replace(L_,R_);Xn[e]=new vi(e,1,!1,n,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var e=n.replace(L_,R_);Xn[e]=new vi(e,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(n){var e=n.replace(L_,R_);Xn[e]=new vi(e,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(n){Xn[n]=new vi(n,1,!1,n.toLowerCase(),null,!1,!1)});Xn.xlinkHref=new vi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(n){Xn[n]=new vi(n,1,!1,n.toLowerCase(),null,!0,!0)});function I_(n,e,t,i){var r=Xn.hasOwnProperty(e)?Xn[e]:null;(r!==null?r.type!==0:i||!(2a||r[o]!==s[a]){var l=` +`+r[o].replace(" at new "," at ");return n.displayName&&l.includes("")&&(l=l.replace("",n.displayName)),l}while(1<=o&&0<=a);break}}}finally{j0=!1,Error.prepareStackTrace=t}return(n=n?n.displayName||n.name:"")?Vc(n):""}function LD(n){switch(n.tag){case 5:return Vc(n.type);case 16:return Vc("Lazy");case 13:return Vc("Suspense");case 19:return Vc("SuspenseList");case 0:case 2:case 15:return n=X0(n.type,!1),n;case 11:return n=X0(n.type.render,!1),n;case 1:return n=X0(n.type,!0),n;default:return""}}function Ay(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case Yl:return"Fragment";case Xl:return"Portal";case Sy:return"Profiler";case D_:return"StrictMode";case wy:return"Suspense";case My:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case tC:return(n.displayName||"Context")+".Consumer";case eC:return(n._context.displayName||"Context")+".Provider";case N_:var e=n.render;return n=n.displayName,n||(n=e.displayName||e.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case k_:return e=n.displayName||null,e!==null?e:Ay(n.type)||"Memo";case fo:e=n._payload,n=n._init;try{return Ay(n(e))}catch{}}return null}function RD(n){var e=n.type;switch(n.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=e.render,n=n.displayName||n.name||"",e.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ay(e);case 8:return e===D_?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function ko(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function iC(n){var e=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function ID(n){var e=iC(n)?"checked":"value",t=Object.getOwnPropertyDescriptor(n.constructor.prototype,e),i=""+n[e];if(!n.hasOwnProperty(e)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var r=t.get,s=t.set;return Object.defineProperty(n,e,{configurable:!0,get:function(){return r.call(this)},set:function(o){i=""+o,s.call(this,o)}}),Object.defineProperty(n,e,{enumerable:t.enumerable}),{getValue:function(){return i},setValue:function(o){i=""+o},stopTracking:function(){n._valueTracker=null,delete n[e]}}}}function Rd(n){n._valueTracker||(n._valueTracker=ID(n))}function rC(n){if(!n)return!1;var e=n._valueTracker;if(!e)return!0;var t=e.getValue(),i="";return n&&(i=iC(n)?n.checked?"true":"false":n.value),n=i,n!==t?(e.setValue(n),!0):!1}function am(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function Ey(n,e){var t=e.checked;return on({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??n._wrapperState.initialChecked})}function EM(n,e){var t=e.defaultValue==null?"":e.defaultValue,i=e.checked!=null?e.checked:e.defaultChecked;t=ko(e.value!=null?e.value:t),n._wrapperState={initialChecked:i,initialValue:t,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function sC(n,e){e=e.checked,e!=null&&I_(n,"checked",e,!1)}function by(n,e){sC(n,e);var t=ko(e.value),i=e.type;if(t!=null)i==="number"?(t===0&&n.value===""||n.value!=t)&&(n.value=""+t):n.value!==""+t&&(n.value=""+t);else if(i==="submit"||i==="reset"){n.removeAttribute("value");return}e.hasOwnProperty("value")?Ty(n,e.type,t):e.hasOwnProperty("defaultValue")&&Ty(n,e.type,ko(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(n.defaultChecked=!!e.defaultChecked)}function bM(n,e,t){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var i=e.type;if(!(i!=="submit"&&i!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+n._wrapperState.initialValue,t||e===n.value||(n.value=e),n.defaultValue=e}t=n.name,t!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,t!==""&&(n.name=t)}function Ty(n,e,t){(e!=="number"||am(n.ownerDocument)!==n)&&(t==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+t&&(n.defaultValue=""+t))}var Hc=Array.isArray;function pu(n,e,t,i){if(n=n.options,e){e={};for(var r=0;r"+e.valueOf().toString()+"",e=Id.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;e.firstChild;)n.appendChild(e.firstChild)}});function mf(n,e){if(e){var t=n.firstChild;if(t&&t===n.lastChild&&t.nodeType===3){t.nodeValue=e;return}}n.textContent=e}var qc={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},DD=["Webkit","ms","Moz","O"];Object.keys(qc).forEach(function(n){DD.forEach(function(e){e=e+n.charAt(0).toUpperCase()+n.substring(1),qc[e]=qc[n]})});function uC(n,e,t){return e==null||typeof e=="boolean"||e===""?"":t||typeof e!="number"||e===0||qc.hasOwnProperty(n)&&qc[n]?(""+e).trim():e+"px"}function cC(n,e){n=n.style;for(var t in e)if(e.hasOwnProperty(t)){var i=t.indexOf("--")===0,r=uC(t,e[t],i);t==="float"&&(t="cssFloat"),i?n.setProperty(t,r):n[t]=r}}var ND=on({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ly(n,e){if(e){if(ND[n]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Ce(137,n));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Ce(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Ce(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Ce(62))}}function Ry(n,e){if(n.indexOf("-")===-1)return typeof e.is=="string";switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Iy=null;function O_(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Dy=null,mu=null,gu=null;function PM(n){if(n=sh(n)){if(typeof Dy!="function")throw Error(Ce(280));var e=n.stateNode;e&&(e=Qm(e),Dy(n.stateNode,n.type,e))}}function fC(n){mu?gu?gu.push(n):gu=[n]:mu=n}function hC(){if(mu){var n=mu,e=gu;if(gu=mu=null,PM(n),e)for(n=0;n>>=0,n===0?32:31-(jD(n)/XD|0)|0}var Dd=64,Nd=4194304;function Wc(n){switch(n&-n){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: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 n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function fm(n,e){var t=n.pendingLanes;if(t===0)return 0;var i=0,r=n.suspendedLanes,s=n.pingedLanes,o=t&268435455;if(o!==0){var a=o&~r;a!==0?i=Wc(a):(s&=o,s!==0&&(i=Wc(s)))}else o=t&~r,o!==0?i=Wc(o):s!==0&&(i=Wc(s));if(i===0)return 0;if(e!==0&&e!==i&&!(e&r)&&(r=i&-i,s=e&-e,r>=s||r===16&&(s&4194240)!==0))return e;if(i&4&&(i|=t&16),e=n.entangledLanes,e!==0)for(n=n.entanglements,e&=i;0t;t++)e.push(n);return e}function ih(n,e,t){n.pendingLanes|=e,e!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,e=31-Ir(e),n[e]=t}function JD(n,e){var t=n.pendingLanes&~e;n.pendingLanes=e,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=e,n.mutableReadLanes&=e,n.entangledLanes&=e,e=n.entanglements;var i=n.eventTimes;for(n=n.expirationTimes;0=Jc),zM=String.fromCharCode(32),FM=!1;function IC(n,e){switch(n){case"keyup":return AN.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function DC(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var ql=!1;function bN(n,e){switch(n){case"compositionend":return DC(e);case"keypress":return e.which!==32?null:(FM=!0,zM);case"textInput":return n=e.data,n===zM&&FM?null:n;default:return null}}function TN(n,e){if(ql)return n==="compositionend"||!G_&&IC(n,e)?(n=LC(),Wp=V_=yo=null,ql=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:t,offset:e-n};n=i}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=WM(t)}}function UC(n,e){return n&&e?n===e?!0:n&&n.nodeType===3?!1:e&&e.nodeType===3?UC(n,e.parentNode):"contains"in n?n.contains(e):n.compareDocumentPosition?!!(n.compareDocumentPosition(e)&16):!1:!1}function zC(){for(var n=window,e=am();e instanceof n.HTMLIFrameElement;){try{var t=typeof e.contentWindow.location.href=="string"}catch{t=!1}if(t)n=e.contentWindow;else break;e=am(n.document)}return e}function j_(n){var e=n&&n.nodeName&&n.nodeName.toLowerCase();return e&&(e==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||e==="textarea"||n.contentEditable==="true")}function ON(n){var e=zC(),t=n.focusedElem,i=n.selectionRange;if(e!==t&&t&&t.ownerDocument&&UC(t.ownerDocument.documentElement,t)){if(i!==null&&j_(t)){if(e=i.start,n=i.end,n===void 0&&(n=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(n,t.value.length);else if(n=(e=t.ownerDocument||document)&&e.defaultView||window,n.getSelection){n=n.getSelection();var r=t.textContent.length,s=Math.min(i.start,r);i=i.end===void 0?s:Math.min(i.end,r),!n.extend&&s>i&&(r=i,i=s,s=r),r=GM(t,s);var o=GM(t,i);r&&o&&(n.rangeCount!==1||n.anchorNode!==r.node||n.anchorOffset!==r.offset||n.focusNode!==o.node||n.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(r.node,r.offset),n.removeAllRanges(),s>i?(n.addRange(e),n.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),n.addRange(e)))}}for(e=[],n=t;n=n.parentNode;)n.nodeType===1&&e.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,Zl=null,Fy=null,Qc=null,By=!1;function jM(n,e,t){var i=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;By||Zl==null||Zl!==am(i)||(i=Zl,"selectionStart"in i&&j_(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Qc&&Sf(Qc,i)||(Qc=i,i=pm(Fy,"onSelect"),0Ql||(n.current=Xy[Ql],Xy[Ql]=null,Ql--)}function Gt(n,e){Ql++,Xy[Ql]=n.current,n.current=e}var Oo={},oi=Go(Oo),Ci=Go(!1),Va=Oo;function Au(n,e){var t=n.type.contextTypes;if(!t)return Oo;var i=n.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===e)return i.__reactInternalMemoizedMaskedChildContext;var r={},s;for(s in t)r[s]=e[s];return i&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=e,n.__reactInternalMemoizedMaskedChildContext=r),r}function Pi(n){return n=n.childContextTypes,n!=null}function gm(){Yt(Ci),Yt(oi)}function QM(n,e,t){if(oi.current!==Oo)throw Error(Ce(168));Gt(oi,e),Gt(Ci,t)}function YC(n,e,t){var i=n.stateNode;if(e=e.childContextTypes,typeof i.getChildContext!="function")return t;i=i.getChildContext();for(var r in i)if(!(r in e))throw Error(Ce(108,RD(n)||"Unknown",r));return on({},t,i)}function vm(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||Oo,Va=oi.current,Gt(oi,n),Gt(Ci,Ci.current),!0}function $M(n,e,t){var i=n.stateNode;if(!i)throw Error(Ce(169));t?(n=YC(n,e,Va),i.__reactInternalMemoizedMergedChildContext=n,Yt(Ci),Yt(oi),Gt(oi,n)):Yt(Ci),Gt(Ci,t)}var As=null,$m=!1,ov=!1;function qC(n){As===null?As=[n]:As.push(n)}function qN(n){$m=!0,qC(n)}function jo(){if(!ov&&As!==null){ov=!0;var n=0,e=Nt;try{var t=As;for(Nt=1;n>=o,r-=o,Ts=1<<32-Ir(e)+r|t<L?(C=I,I=null):C=I.sibling;var R=p(m,I,w[L],A);if(R===null){I===null&&(I=C);break}n&&I&&R.alternate===null&&e(m,I),S=s(R,S,L),P===null?b=R:P.sibling=R,P=R,I=C}if(L===w.length)return t(m,I),Kt&&va(m,L),b;if(I===null){for(;LL?(C=I,I=null):C=I.sibling;var W=p(m,I,R.value,A);if(W===null){I===null&&(I=C);break}n&&I&&W.alternate===null&&e(m,I),S=s(W,S,L),P===null?b=W:P.sibling=W,P=W,I=C}if(R.done)return t(m,I),Kt&&va(m,L),b;if(I===null){for(;!R.done;L++,R=w.next())R=d(m,R.value,A),R!==null&&(S=s(R,S,L),P===null?b=R:P.sibling=R,P=R);return Kt&&va(m,L),b}for(I=i(m,I);!R.done;L++,R=w.next())R=v(I,m,L,R.value,A),R!==null&&(n&&R.alternate!==null&&I.delete(R.key===null?L:R.key),S=s(R,S,L),P===null?b=R:P.sibling=R,P=R);return n&&I.forEach(function(J){return e(m,J)}),Kt&&va(m,L),b}function M(m,S,w,A){if(typeof w=="object"&&w!==null&&w.type===Yl&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Ld:e:{for(var b=w.key,P=S;P!==null;){if(P.key===b){if(b=w.type,b===Yl){if(P.tag===7){t(m,P.sibling),S=r(P,w.props.children),S.return=m,m=S;break e}}else if(P.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===fo&&oA(b)===P.type){t(m,P.sibling),S=r(P,w.props),S.ref=Sc(m,P,w),S.return=m,m=S;break e}t(m,P);break}else e(m,P);P=P.sibling}w.type===Yl?(S=ka(w.props.children,m.mode,A,w.key),S.return=m,m=S):(A=Kp(w.type,w.key,w.props,null,m.mode,A),A.ref=Sc(m,S,w),A.return=m,m=A)}return o(m);case Xl:e:{for(P=w.key;S!==null;){if(S.key===P)if(S.tag===4&&S.stateNode.containerInfo===w.containerInfo&&S.stateNode.implementation===w.implementation){t(m,S.sibling),S=r(S,w.children||[]),S.return=m,m=S;break e}else{t(m,S);break}else e(m,S);S=S.sibling}S=pv(w,m.mode,A),S.return=m,m=S}return o(m);case fo:return P=w._init,M(m,S,P(w._payload),A)}if(Hc(w))return y(m,S,w,A);if(gc(w))return _(m,S,w,A);Vd(m,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,S!==null&&S.tag===6?(t(m,S.sibling),S=r(S,w),S.return=m,m=S):(t(m,S),S=dv(w,m.mode,A),S.return=m,m=S),o(m)):t(m,S)}return M}var bu=n2(!0),i2=n2(!1),oh={},$r=Go(oh),Ef=Go(oh),bf=Go(oh);function Ca(n){if(n===oh)throw Error(Ce(174));return n}function e1(n,e){switch(Gt(bf,e),Gt(Ef,n),Gt($r,oh),n=e.nodeType,n){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Py(null,"");break;default:n=n===8?e.parentNode:e,e=n.namespaceURI||null,n=n.tagName,e=Py(e,n)}Yt($r),Gt($r,e)}function Tu(){Yt($r),Yt(Ef),Yt(bf)}function r2(n){Ca(bf.current);var e=Ca($r.current),t=Py(e,n.type);e!==t&&(Gt(Ef,n),Gt($r,t))}function t1(n){Ef.current===n&&(Yt($r),Yt(Ef))}var $t=Go(0);function Mm(n){for(var e=n;e!==null;){if(e.tag===13){var t=e.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||t.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break;for(;e.sibling===null;){if(e.return===null||e.return===n)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var av=[];function n1(){for(var n=0;nt?t:4,n(!0);var i=lv.transition;lv.transition={};try{n(!1),e()}finally{Nt=t,lv.transition=i}}function _2(){return pr().memoizedState}function QN(n,e,t){var i=Po(n);if(t={lane:i,action:t,hasEagerState:!1,eagerState:null,next:null},S2(n))w2(e,t);else if(t=QC(n,e,t,i),t!==null){var r=pi();Dr(t,n,i,r),M2(t,e,i)}}function $N(n,e,t){var i=Po(n),r={lane:i,action:t,hasEagerState:!1,eagerState:null,next:null};if(S2(n))w2(e,r);else{var s=n.alternate;if(n.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,t);if(r.hasEagerState=!0,r.eagerState=a,kr(a,o)){var l=e.interleaved;l===null?(r.next=r,Q_(e)):(r.next=l.next,l.next=r),e.interleaved=r;return}}catch{}finally{}t=QC(n,e,r,i),t!==null&&(r=pi(),Dr(t,n,i,r),M2(t,e,i))}}function S2(n){var e=n.alternate;return n===rn||e!==null&&e===rn}function w2(n,e){$c=Am=!0;var t=n.pending;t===null?e.next=e:(e.next=t.next,t.next=e),n.pending=e}function M2(n,e,t){if(t&4194240){var i=e.lanes;i&=n.pendingLanes,t|=i,e.lanes=t,z_(n,t)}}var Em={readContext:dr,useCallback:$n,useContext:$n,useEffect:$n,useImperativeHandle:$n,useInsertionEffect:$n,useLayoutEffect:$n,useMemo:$n,useReducer:$n,useRef:$n,useState:$n,useDebugValue:$n,useDeferredValue:$n,useTransition:$n,useMutableSource:$n,useSyncExternalStore:$n,useId:$n,unstable_isNewReconciler:!1},ek={readContext:dr,useCallback:function(n,e){return Zr().memoizedState=[n,e===void 0?null:e],n},useContext:dr,useEffect:lA,useImperativeHandle:function(n,e,t){return t=t!=null?t.concat([n]):null,Yp(4194308,4,m2.bind(null,e,n),t)},useLayoutEffect:function(n,e){return Yp(4194308,4,n,e)},useInsertionEffect:function(n,e){return Yp(4,2,n,e)},useMemo:function(n,e){var t=Zr();return e=e===void 0?null:e,n=n(),t.memoizedState=[n,e],n},useReducer:function(n,e,t){var i=Zr();return e=t!==void 0?t(e):e,i.memoizedState=i.baseState=e,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:e},i.queue=n,n=n.dispatch=QN.bind(null,rn,n),[i.memoizedState,n]},useRef:function(n){var e=Zr();return n={current:n},e.memoizedState=n},useState:aA,useDebugValue:a1,useDeferredValue:function(n){return Zr().memoizedState=n},useTransition:function(){var n=aA(!1),e=n[0];return n=KN.bind(null,n[1]),Zr().memoizedState=n,[e,n]},useMutableSource:function(){},useSyncExternalStore:function(n,e,t){var i=rn,r=Zr();if(Kt){if(t===void 0)throw Error(Ce(407));t=t()}else{if(t=e(),Bn===null)throw Error(Ce(349));Wa&30||a2(i,e,t)}r.memoizedState=t;var s={value:t,getSnapshot:e};return r.queue=s,lA(u2.bind(null,i,s,n),[n]),i.flags|=2048,Pf(9,l2.bind(null,i,s,t,e),void 0,null),t},useId:function(){var n=Zr(),e=Bn.identifierPrefix;if(Kt){var t=Cs,i=Ts;t=(i&~(1<<32-Ir(i)-1)).toString(32)+t,e=":"+e+"R"+t,t=Tf++,0<\/script>",n=n.removeChild(n.firstChild)):typeof i.is=="string"?n=o.createElement(t,{is:i.is}):(n=o.createElement(t),t==="select"&&(o=n,i.multiple?o.multiple=!0:i.size&&(o.size=i.size))):n=o.createElementNS(n,t),n[Kr]=e,n[Af]=i,I2(n,e,!1,!1),e.stateNode=n;e:{switch(o=Ry(t,i),t){case"dialog":Xt("cancel",n),Xt("close",n),r=i;break;case"iframe":case"object":case"embed":Xt("load",n),r=i;break;case"video":case"audio":for(r=0;rPu&&(e.flags|=128,i=!0,wc(s,!1),e.lanes=4194304)}else{if(!i)if(n=Mm(o),n!==null){if(e.flags|=128,i=!0,t=n.updateQueue,t!==null&&(e.updateQueue=t,e.flags|=4),wc(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Kt)return ei(e),null}else 2*gn()-s.renderingStartTime>Pu&&t!==1073741824&&(e.flags|=128,i=!0,wc(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(t=s.last,t!==null?t.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=gn(),e.sibling=null,t=$t.current,Gt($t,i?t&1|2:t&1),e):(ei(e),null);case 22:case 23:return d1(),i=e.memoizedState!==null,n!==null&&n.memoizedState!==null!==i&&(e.flags|=8192),i&&e.mode&1?Fi&1073741824&&(ei(e),e.subtreeFlags&6&&(e.flags|=8192)):ei(e),null;case 24:return null;case 25:return null}throw Error(Ce(156,e.tag))}function lk(n,e){switch(Y_(e),e.tag){case 1:return Pi(e.type)&&gm(),n=e.flags,n&65536?(e.flags=n&-65537|128,e):null;case 3:return Tu(),Yt(Ci),Yt(oi),n1(),n=e.flags,n&65536&&!(n&128)?(e.flags=n&-65537|128,e):null;case 5:return t1(e),null;case 13:if(Yt($t),n=e.memoizedState,n!==null&&n.dehydrated!==null){if(e.alternate===null)throw Error(Ce(340));Eu()}return n=e.flags,n&65536?(e.flags=n&-65537|128,e):null;case 19:return Yt($t),null;case 4:return Tu(),null;case 10:return K_(e.type._context),null;case 22:case 23:return d1(),null;case 24:return null;default:return null}}var Wd=!1,ii=!1,uk=typeof WeakSet=="function"?WeakSet:Set,Be=null;function nu(n,e){var t=n.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(i){un(n,e,i)}else t.current=null}function rx(n,e,t){try{t()}catch(i){un(n,e,i)}}var vA=!1;function ck(n,e){if(Vy=hm,n=zC(),j_(n)){if("selectionStart"in n)var t={start:n.selectionStart,end:n.selectionEnd};else e:{t=(t=n.ownerDocument)&&t.defaultView||window;var i=t.getSelection&&t.getSelection();if(i&&i.rangeCount!==0){t=i.anchorNode;var r=i.anchorOffset,s=i.focusNode;i=i.focusOffset;try{t.nodeType,s.nodeType}catch{t=null;break e}var o=0,a=-1,l=-1,f=0,h=0,d=n,p=null;t:for(;;){for(var v;d!==t||r!==0&&d.nodeType!==3||(a=o+r),d!==s||i!==0&&d.nodeType!==3||(l=o+i),d.nodeType===3&&(o+=d.nodeValue.length),(v=d.firstChild)!==null;)p=d,d=v;for(;;){if(d===n)break t;if(p===t&&++f===r&&(a=o),p===s&&++h===i&&(l=o),(v=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=v}t=a===-1||l===-1?null:{start:a,end:l}}else t=null}t=t||{start:0,end:0}}else t=null;for(Hy={focusedElem:n,selectionRange:t},hm=!1,Be=e;Be!==null;)if(e=Be,n=e.child,(e.subtreeFlags&1028)!==0&&n!==null)n.return=e,Be=n;else for(;Be!==null;){e=Be;try{var y=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,M=y.memoizedState,m=e.stateNode,S=m.getSnapshotBeforeUpdate(e.elementType===e.type?_:br(e.type,_),M);m.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var w=e.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ce(163))}}catch(A){un(e,e.return,A)}if(n=e.sibling,n!==null){n.return=e.return,Be=n;break}Be=e.return}return y=vA,vA=!1,y}function ef(n,e,t){var i=e.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var r=i=i.next;do{if((r.tag&n)===n){var s=r.destroy;r.destroy=void 0,s!==void 0&&rx(e,t,s)}r=r.next}while(r!==i)}}function ng(n,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var t=e=e.next;do{if((t.tag&n)===n){var i=t.create;t.destroy=i()}t=t.next}while(t!==e)}}function sx(n){var e=n.ref;if(e!==null){var t=n.stateNode;switch(n.tag){case 5:n=t;break;default:n=t}typeof e=="function"?e(n):e.current=n}}function k2(n){var e=n.alternate;e!==null&&(n.alternate=null,k2(e)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(e=n.stateNode,e!==null&&(delete e[Kr],delete e[Af],delete e[jy],delete e[XN],delete e[YN])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function O2(n){return n.tag===5||n.tag===3||n.tag===4}function yA(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||O2(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function ox(n,e,t){var i=n.tag;if(i===5||i===6)n=n.stateNode,e?t.nodeType===8?t.parentNode.insertBefore(n,e):t.insertBefore(n,e):(t.nodeType===8?(e=t.parentNode,e.insertBefore(n,t)):(e=t,e.appendChild(n)),t=t._reactRootContainer,t!=null||e.onclick!==null||(e.onclick=mm));else if(i!==4&&(n=n.child,n!==null))for(ox(n,e,t),n=n.sibling;n!==null;)ox(n,e,t),n=n.sibling}function ax(n,e,t){var i=n.tag;if(i===5||i===6)n=n.stateNode,e?t.insertBefore(n,e):t.appendChild(n);else if(i!==4&&(n=n.child,n!==null))for(ax(n,e,t),n=n.sibling;n!==null;)ax(n,e,t),n=n.sibling}var Gn=null,Tr=!1;function no(n,e,t){for(t=t.child;t!==null;)U2(n,e,t),t=t.sibling}function U2(n,e,t){if(Qr&&typeof Qr.onCommitFiberUnmount=="function")try{Qr.onCommitFiberUnmount(qm,t)}catch{}switch(t.tag){case 5:ii||nu(t,e);case 6:var i=Gn,r=Tr;Gn=null,no(n,e,t),Gn=i,Tr=r,Gn!==null&&(Tr?(n=Gn,t=t.stateNode,n.nodeType===8?n.parentNode.removeChild(t):n.removeChild(t)):Gn.removeChild(t.stateNode));break;case 18:Gn!==null&&(Tr?(n=Gn,t=t.stateNode,n.nodeType===8?sv(n.parentNode,t):n.nodeType===1&&sv(n,t),xf(n)):sv(Gn,t.stateNode));break;case 4:i=Gn,r=Tr,Gn=t.stateNode.containerInfo,Tr=!0,no(n,e,t),Gn=i,Tr=r;break;case 0:case 11:case 14:case 15:if(!ii&&(i=t.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){r=i=i.next;do{var s=r,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&rx(t,e,o),r=r.next}while(r!==i)}no(n,e,t);break;case 1:if(!ii&&(nu(t,e),i=t.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=t.memoizedProps,i.state=t.memoizedState,i.componentWillUnmount()}catch(a){un(t,e,a)}no(n,e,t);break;case 21:no(n,e,t);break;case 22:t.mode&1?(ii=(i=ii)||t.memoizedState!==null,no(n,e,t),ii=i):no(n,e,t);break;default:no(n,e,t)}}function xA(n){var e=n.updateQueue;if(e!==null){n.updateQueue=null;var t=n.stateNode;t===null&&(t=n.stateNode=new uk),e.forEach(function(i){var r=xk.bind(null,n,i);t.has(i)||(t.add(i),i.then(r,r))})}}function wr(n,e){var t=e.deletions;if(t!==null)for(var i=0;ir&&(r=o),i&=~s}if(i=r,i=gn()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*hk(i/1960))-i,10n?16:n,xo===null)var i=!1;else{if(n=xo,xo=null,Cm=0,bt&6)throw Error(Ce(331));var r=bt;for(bt|=4,Be=n.current;Be!==null;){var s=Be,o=s.child;if(Be.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lgn()-f1?Na(n,0):c1|=t),Li(n,e)}function j2(n,e){e===0&&(n.mode&1?(e=Nd,Nd<<=1,!(Nd&130023424)&&(Nd=4194304)):e=1);var t=pi();n=Us(n,e),n!==null&&(ih(n,e,t),Li(n,t))}function yk(n){var e=n.memoizedState,t=0;e!==null&&(t=e.retryLane),j2(n,t)}function xk(n,e){var t=0;switch(n.tag){case 13:var i=n.stateNode,r=n.memoizedState;r!==null&&(t=r.retryLane);break;case 19:i=n.stateNode;break;default:throw Error(Ce(314))}i!==null&&i.delete(e),j2(n,t)}var X2;X2=function(n,e,t){if(n!==null)if(n.memoizedProps!==e.pendingProps||Ci.current)Ti=!0;else{if(!(n.lanes&t)&&!(e.flags&128))return Ti=!1,ok(n,e,t);Ti=!!(n.flags&131072)}else Ti=!1,Kt&&e.flags&1048576&&ZC(e,xm,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;qp(n,e),n=e.pendingProps;var r=Au(e,oi.current);yu(e,t),r=r1(null,e,i,n,r,t);var s=s1();return e.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Pi(i)?(s=!0,vm(e)):s=!1,e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,$_(e),r.updater=eg,e.stateNode=r,r._reactInternals=e,Ky(e,i,n,t),e=ex(null,e,i,!0,s,t)):(e.tag=0,Kt&&s&&X_(e),di(null,e,r,t),e=e.child),e;case 16:i=e.elementType;e:{switch(qp(n,e),n=e.pendingProps,r=i._init,i=r(i._payload),e.type=i,r=e.tag=Sk(i),n=br(i,n),r){case 0:e=$y(null,e,i,n,t);break e;case 1:e=pA(null,e,i,n,t);break e;case 11:e=hA(null,e,i,n,t);break e;case 14:e=dA(null,e,i,br(i.type,n),t);break e}throw Error(Ce(306,i,""))}return e;case 0:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:br(i,r),$y(n,e,i,r,t);case 1:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:br(i,r),pA(n,e,i,r,t);case 3:e:{if(P2(e),n===null)throw Error(Ce(387));i=e.pendingProps,s=e.memoizedState,r=s.element,$C(n,e),wm(e,i,null,t);var o=e.memoizedState;if(i=o.element,s.isDehydrated)if(s={element:i,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){r=Cu(Error(Ce(423)),e),e=mA(n,e,i,t,r);break e}else if(i!==r){r=Cu(Error(Ce(424)),e),e=mA(n,e,i,t,r);break e}else for(Hi=bo(e.stateNode.containerInfo.firstChild),Gi=e,Kt=!0,Pr=null,t=i2(e,null,i,t),e.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(Eu(),i===r){e=zs(n,e,t);break e}di(n,e,i,t)}e=e.child}return e;case 5:return r2(e),n===null&&qy(e),i=e.type,r=e.pendingProps,s=n!==null?n.memoizedProps:null,o=r.children,Wy(i,r)?o=null:s!==null&&Wy(i,s)&&(e.flags|=32),C2(n,e),di(n,e,o,t),e.child;case 6:return n===null&&qy(e),null;case 13:return L2(n,e,t);case 4:return e1(e,e.stateNode.containerInfo),i=e.pendingProps,n===null?e.child=bu(e,null,i,t):di(n,e,i,t),e.child;case 11:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:br(i,r),hA(n,e,i,r,t);case 7:return di(n,e,e.pendingProps,t),e.child;case 8:return di(n,e,e.pendingProps.children,t),e.child;case 12:return di(n,e,e.pendingProps.children,t),e.child;case 10:e:{if(i=e.type._context,r=e.pendingProps,s=e.memoizedProps,o=r.value,Gt(_m,i._currentValue),i._currentValue=o,s!==null)if(kr(s.value,o)){if(s.children===r.children&&!Ci.current){e=zs(n,e,t);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===i){if(s.tag===1){l=Rs(-1,t&-t),l.tag=2;var f=s.updateQueue;if(f!==null){f=f.shared;var h=f.pending;h===null?l.next=l:(l.next=h.next,h.next=l),f.pending=l}}s.lanes|=t,l=s.alternate,l!==null&&(l.lanes|=t),Zy(s.return,t,e),a.lanes|=t;break}l=l.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(Ce(341));o.lanes|=t,a=o.alternate,a!==null&&(a.lanes|=t),Zy(o,t,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}di(n,e,r.children,t),e=e.child}return e;case 9:return r=e.type,i=e.pendingProps.children,yu(e,t),r=dr(r),i=i(r),e.flags|=1,di(n,e,i,t),e.child;case 14:return i=e.type,r=br(i,e.pendingProps),r=br(i.type,r),dA(n,e,i,r,t);case 15:return b2(n,e,e.type,e.pendingProps,t);case 17:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:br(i,r),qp(n,e),e.tag=1,Pi(i)?(n=!0,vm(e)):n=!1,yu(e,t),t2(e,i,r),Ky(e,i,r,t),ex(null,e,i,!0,n,t);case 19:return R2(n,e,t);case 22:return T2(n,e,t)}throw Error(Ce(156,e.tag))};function Y2(n,e){return xC(n,e)}function _k(n,e,t,i){this.tag=n,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,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 fr(n,e,t,i){return new _k(n,e,t,i)}function m1(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Sk(n){if(typeof n=="function")return m1(n)?1:0;if(n!=null){if(n=n.$$typeof,n===N_)return 11;if(n===k_)return 14}return 2}function Lo(n,e){var t=n.alternate;return t===null?(t=fr(n.tag,e,n.key,n.mode),t.elementType=n.elementType,t.type=n.type,t.stateNode=n.stateNode,t.alternate=n,n.alternate=t):(t.pendingProps=e,t.type=n.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=n.flags&14680064,t.childLanes=n.childLanes,t.lanes=n.lanes,t.child=n.child,t.memoizedProps=n.memoizedProps,t.memoizedState=n.memoizedState,t.updateQueue=n.updateQueue,e=n.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},t.sibling=n.sibling,t.index=n.index,t.ref=n.ref,t}function Kp(n,e,t,i,r,s){var o=2;if(i=n,typeof n=="function")m1(n)&&(o=1);else if(typeof n=="string")o=5;else e:switch(n){case Yl:return ka(t.children,r,s,e);case D_:o=8,r|=8;break;case Sy:return n=fr(12,t,e,r|2),n.elementType=Sy,n.lanes=s,n;case wy:return n=fr(13,t,e,r),n.elementType=wy,n.lanes=s,n;case My:return n=fr(19,t,e,r),n.elementType=My,n.lanes=s,n;case nC:return rg(t,r,s,e);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case eC:o=10;break e;case tC:o=9;break e;case N_:o=11;break e;case k_:o=14;break e;case fo:o=16,i=null;break e}throw Error(Ce(130,n==null?n:typeof n,""))}return e=fr(o,t,e,r),e.elementType=n,e.type=i,e.lanes=s,e}function ka(n,e,t,i){return n=fr(7,n,i,e),n.lanes=t,n}function rg(n,e,t,i){return n=fr(22,n,i,e),n.elementType=nC,n.lanes=t,n.stateNode={isHidden:!1},n}function dv(n,e,t){return n=fr(6,n,null,e),n.lanes=t,n}function pv(n,e,t){return e=fr(4,n.children!==null?n.children:[],n.key,e),e.lanes=t,e.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},e}function wk(n,e,t,i,r){this.tag=e,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=q0(0),this.expirationTimes=q0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=q0(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function g1(n,e,t,i,r,s,o,a,l){return n=new wk(n,e,t,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=fr(3,null,null,e),n.current=s,s.stateNode=n,s.memoizedState={element:i,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},$_(s),n}function Mk(n,e,t){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(K2)}catch(n){console.error(n)}}K2(),ZT.exports=qi;var Ck=ZT.exports,Q2,TA=Ck;Q2=xy.createRoot=TA.createRoot,xy.hydrateRoot=TA.hydrateRoot;/** + * @remix-run/router v1.5.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Rf(){return Rf=Object.assign?Object.assign.bind():function(n){for(var e=1;e"u")throw new Error(e)}function _1(n,e){if(!n){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Lk(){return Math.random().toString(36).substr(2,8)}function PA(n,e){return{usr:n.state,key:n.key,idx:e}}function hx(n,e,t,i){return t===void 0&&(t=null),Rf({pathname:typeof n=="string"?n:n.pathname,search:"",hash:""},typeof e=="string"?Bu(e):e,{state:t,key:e&&e.key||i||Lk()})}function Rm(n){let{pathname:e="/",search:t="",hash:i=""}=n;return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function Bu(n){let e={};if(n){let t=n.indexOf("#");t>=0&&(e.hash=n.substr(t),n=n.substr(0,t));let i=n.indexOf("?");i>=0&&(e.search=n.substr(i),n=n.substr(0,i)),n&&(e.pathname=n)}return e}function Rk(n,e,t,i){i===void 0&&(i={});let{window:r=document.defaultView,v5Compat:s=!1}=i,o=r.history,a=_o.Pop,l=null,f=h();f==null&&(f=0,o.replaceState(Rf({},o.state,{idx:f}),""));function h(){return(o.state||{idx:null}).idx}function d(){a=_o.Pop;let M=h(),m=M==null?null:M-f;f=M,l&&l({action:a,location:_.location,delta:m})}function p(M,m){a=_o.Push;let S=hx(_.location,M,m);t&&t(S,M),f=h()+1;let w=PA(S,f),A=_.createHref(S);try{o.pushState(w,"",A)}catch{r.location.assign(A)}s&&l&&l({action:a,location:_.location,delta:1})}function v(M,m){a=_o.Replace;let S=hx(_.location,M,m);t&&t(S,M),f=h();let w=PA(S,f),A=_.createHref(S);o.replaceState(w,"",A),s&&l&&l({action:a,location:_.location,delta:0})}function y(M){let m=r.location.origin!=="null"?r.location.origin:r.location.href,S=typeof M=="string"?M:Rm(M);return Pn(m,"No window.location.(origin|href) available to create URL for href: "+S),new URL(S,m)}let _={get action(){return a},get location(){return n(r,o)},listen(M){if(l)throw new Error("A history only accepts one active listener");return r.addEventListener(CA,d),l=M,()=>{r.removeEventListener(CA,d),l=null}},createHref(M){return e(r,M)},createURL:y,encodeLocation(M){let m=y(M);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:p,replace:v,go(M){return o.go(M)}};return _}var LA;(function(n){n.data="data",n.deferred="deferred",n.redirect="redirect",n.error="error"})(LA||(LA={}));function Ik(n,e,t){t===void 0&&(t="/");let i=typeof e=="string"?Bu(e):e,r=S1(i.pathname||"/",t);if(r==null)return null;let s=$2(n);Dk(s);let o=null;for(let a=0;o==null&&a{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(Pn(l.relativePath.startsWith(i),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(i.length));let f=Ro([i,l.relativePath]),h=t.concat(l);s.children&&s.children.length>0&&(Pn(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+f+'".')),$2(s.children,e,h,f)),!(s.path==null&&!s.index)&&e.push({path:f,score:Bk(f,s.index),routesMeta:h})};return n.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))r(s,o);else for(let l of eP(s.path))r(s,o,l)}),e}function eP(n){let e=n.split("/");if(e.length===0)return[];let[t,...i]=e,r=t.endsWith("?"),s=t.replace(/\?$/,"");if(i.length===0)return r?[s,""]:[s];let o=eP(i.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),r&&a.push(...o),a.map(l=>n.startsWith("/")&&l===""?"/":l)}function Dk(n){n.sort((e,t)=>e.score!==t.score?t.score-e.score:Vk(e.routesMeta.map(i=>i.childrenIndex),t.routesMeta.map(i=>i.childrenIndex)))}const Nk=/^:\w+$/,kk=3,Ok=2,Uk=1,zk=10,Fk=-2,RA=n=>n==="*";function Bk(n,e){let t=n.split("/"),i=t.length;return t.some(RA)&&(i+=Fk),e&&(i+=Ok),t.filter(r=>!RA(r)).reduce((r,s)=>r+(Nk.test(s)?kk:s===""?Uk:zk),i)}function Vk(n,e){return n.length===e.length&&n.slice(0,-1).every((i,r)=>i===e[r])?n[n.length-1]-e[e.length-1]:0}function Hk(n,e){let{routesMeta:t}=n,i={},r="/",s=[];for(let o=0;o{if(h==="*"){let p=a[d]||"";o=s.slice(0,s.length-p.length).replace(/(.)\/+$/,"$1")}return f[h]=Xk(a[d]||"",h),f},{}),pathname:s,pathnameBase:o,pattern:n}}function Gk(n,e,t){e===void 0&&(e=!1),t===void 0&&(t=!0),_1(n==="*"||!n.endsWith("*")||n.endsWith("/*"),'Route path "'+n+'" will be treated as if it were '+('"'+n.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+n.replace(/\*$/,"/*")+'".'));let i=[],r="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(o,a)=>(i.push(a),"/([^\\/]+)"));return n.endsWith("*")?(i.push("*"),r+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?r+="\\/*$":n!==""&&n!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,e?void 0:"i"),i]}function jk(n){try{return decodeURI(n)}catch(e){return _1(!1,'The URL path "'+n+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),n}}function Xk(n,e){try{return decodeURIComponent(n)}catch(t){return _1(!1,'The value for the URL param "'+e+'" will not be decoded because'+(' the string "'+n+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+t+").")),n}}function S1(n,e){if(e==="/")return n;if(!n.toLowerCase().startsWith(e.toLowerCase()))return null;let t=e.endsWith("/")?e.length-1:e.length,i=n.charAt(t);return i&&i!=="/"?null:n.slice(t)||"/"}function Yk(n,e){e===void 0&&(e="/");let{pathname:t,search:i="",hash:r=""}=typeof n=="string"?Bu(n):n;return{pathname:t?t.startsWith("/")?t:qk(t,e):e,search:Jk(i),hash:Kk(r)}}function qk(n,e){let t=e.replace(/\/+$/,"").split("/");return n.split("/").forEach(r=>{r===".."?t.length>1&&t.pop():r!=="."&&t.push(r)}),t.length>1?t.join("/"):"/"}function mv(n,e,t,i){return"Cannot include a '"+n+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+t+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function tP(n){return n.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function nP(n,e,t,i){i===void 0&&(i=!1);let r;typeof n=="string"?r=Bu(n):(r=Rf({},n),Pn(!r.pathname||!r.pathname.includes("?"),mv("?","pathname","search",r)),Pn(!r.pathname||!r.pathname.includes("#"),mv("#","pathname","hash",r)),Pn(!r.search||!r.search.includes("#"),mv("#","search","hash",r)));let s=n===""||r.pathname==="",o=s?"/":r.pathname,a;if(i||o==null)a=t;else{let d=e.length-1;if(o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),d-=1;r.pathname=p.join("/")}a=d>=0?e[d]:"/"}let l=Yk(r,a),f=o&&o!=="/"&&o.endsWith("/"),h=(s||o===".")&&t.endsWith("/");return!l.pathname.endsWith("/")&&(f||h)&&(l.pathname+="/"),l}const Ro=n=>n.join("/").replace(/\/\/+/g,"/"),Zk=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Jk=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Kk=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function Qk(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}const iP=["post","put","patch","delete"];new Set(iP);const $k=["get",...iP];new Set($k);/** + * React Router v6.10.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function eO(n,e){return n===e&&(n!==0||1/n===1/e)||n!==n&&e!==e}const tO=typeof Object.is=="function"?Object.is:eO,{useState:nO,useEffect:iO,useLayoutEffect:rO,useDebugValue:sO}=yy;function oO(n,e,t){const i=e(),[{inst:r},s]=nO({inst:{value:i,getSnapshot:e}});return rO(()=>{r.value=i,r.getSnapshot=e,gv(r)&&s({inst:r})},[n,i,e]),iO(()=>(gv(r)&&s({inst:r}),n(()=>{gv(r)&&s({inst:r})})),[n]),sO(i),i}function gv(n){const e=n.getSnapshot,t=n.value;try{const i=e();return!tO(t,i)}catch{return!0}}function aO(n,e,t){return e()}const lO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",uO=!lO,cO=uO?aO:oO;"useSyncExternalStore"in yy&&(n=>n.useSyncExternalStore)(yy);const rP=H.createContext(null),sP=H.createContext(null),ah=H.createContext(null),ug=H.createContext(null),Vu=H.createContext({outlet:null,matches:[]}),oP=H.createContext(null);function dx(){return dx=Object.assign?Object.assign.bind():function(n){for(var e=1;ea.pathnameBase)),s=H.useRef(!1);return H.useEffect(()=>{s.current=!0}),H.useCallback(function(a,l){if(l===void 0&&(l={}),!s.current)return;if(typeof a=="number"){e.go(a);return}let f=nP(a,JSON.parse(r),i,l.relative==="path");n!=="/"&&(f.pathname=f.pathname==="/"?n:Ro([n,f.pathname])),(l.replace?e.replace:e.push)(f,l.state,l)},[n,e,r,i])}function aP(n,e){let{relative:t}=e===void 0?{}:e,{matches:i}=H.useContext(Vu),{pathname:r}=cg(),s=JSON.stringify(tP(i).map(o=>o.pathnameBase));return H.useMemo(()=>nP(n,JSON.parse(s),r,t==="path"),[n,s,r,t])}function dO(n,e){lh()||Pn(!1);let{navigator:t}=H.useContext(ah),i=H.useContext(sP),{matches:r}=H.useContext(Vu),s=r[r.length-1],o=s?s.params:{};s&&s.pathname;let a=s?s.pathnameBase:"/";s&&s.route;let l=cg(),f;if(e){var h;let _=typeof e=="string"?Bu(e):e;a==="/"||(h=_.pathname)!=null&&h.startsWith(a)||Pn(!1),f=_}else f=l;let d=f.pathname||"/",p=a==="/"?d:d.slice(a.length)||"/",v=Ik(n,{pathname:p}),y=vO(v&&v.map(_=>Object.assign({},_,{params:Object.assign({},o,_.params),pathname:Ro([a,t.encodeLocation?t.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?a:Ro([a,t.encodeLocation?t.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),r,i||void 0);return e&&y?H.createElement(ug.Provider,{value:{location:dx({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:_o.Pop}},y):y}function pO(){let n=SO(),e=Qk(n)?n.status+" "+n.statusText:n instanceof Error?n.message:JSON.stringify(n),t=n instanceof Error?n.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},s=null;return H.createElement(H.Fragment,null,H.createElement("h2",null,"Unexpected Application Error!"),H.createElement("h3",{style:{fontStyle:"italic"}},e),t?H.createElement("pre",{style:r},t):null,s)}class mO extends H.Component{constructor(e){super(e),this.state={location:e.location,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location?{error:e.error,location:e.location}:{error:e.error||t.error,location:t.location}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error?H.createElement(Vu.Provider,{value:this.props.routeContext},H.createElement(oP.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function gO(n){let{routeContext:e,match:t,children:i}=n,r=H.useContext(rP);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),H.createElement(Vu.Provider,{value:e},i)}function vO(n,e,t){if(e===void 0&&(e=[]),n==null)if(t!=null&&t.errors)n=t.matches;else return null;let i=n,r=t==null?void 0:t.errors;if(r!=null){let s=i.findIndex(o=>o.route.id&&(r==null?void 0:r[o.route.id]));s>=0||Pn(!1),i=i.slice(0,Math.min(i.length,s+1))}return i.reduceRight((s,o,a)=>{let l=o.route.id?r==null?void 0:r[o.route.id]:null,f=null;t&&(o.route.ErrorBoundary?f=H.createElement(o.route.ErrorBoundary,null):o.route.errorElement?f=o.route.errorElement:f=H.createElement(pO,null));let h=e.concat(i.slice(0,a+1)),d=()=>{let p=s;return l?p=f:o.route.Component?p=H.createElement(o.route.Component,null):o.route.element&&(p=o.route.element),H.createElement(gO,{match:o,routeContext:{outlet:s,matches:h},children:p})};return t&&(o.route.ErrorBoundary||o.route.errorElement||a===0)?H.createElement(mO,{location:t.location,component:f,error:l,children:d(),routeContext:{outlet:null,matches:h}}):d()},null)}var IA;(function(n){n.UseBlocker="useBlocker",n.UseRevalidator="useRevalidator"})(IA||(IA={}));var Im;(function(n){n.UseBlocker="useBlocker",n.UseLoaderData="useLoaderData",n.UseActionData="useActionData",n.UseRouteError="useRouteError",n.UseNavigation="useNavigation",n.UseRouteLoaderData="useRouteLoaderData",n.UseMatches="useMatches",n.UseRevalidator="useRevalidator"})(Im||(Im={}));function yO(n){let e=H.useContext(sP);return e||Pn(!1),e}function xO(n){let e=H.useContext(Vu);return e||Pn(!1),e}function _O(n){let e=xO(),t=e.matches[e.matches.length-1];return t.route.id||Pn(!1),t.route.id}function SO(){var n;let e=H.useContext(oP),t=yO(Im.UseRouteError),i=_O(Im.UseRouteError);return e||((n=t.errors)==null?void 0:n[i])}function qr(n){Pn(!1)}function wO(n){let{basename:e="/",children:t=null,location:i,navigationType:r=_o.Pop,navigator:s,static:o=!1}=n;lh()&&Pn(!1);let a=e.replace(/^\/*/,"/"),l=H.useMemo(()=>({basename:a,navigator:s,static:o}),[a,s,o]);typeof i=="string"&&(i=Bu(i));let{pathname:f="/",search:h="",hash:d="",state:p=null,key:v="default"}=i,y=H.useMemo(()=>{let _=S1(f,a);return _==null?null:{location:{pathname:_,search:h,hash:d,state:p,key:v},navigationType:r}},[a,f,h,d,p,v,r]);return y==null?null:H.createElement(ah.Provider,{value:l},H.createElement(ug.Provider,{children:t,value:y}))}function MO(n){let{children:e,location:t}=n,i=H.useContext(rP),r=i&&!e?i.router.routes:px(e);return dO(r,t)}var DA;(function(n){n[n.pending=0]="pending",n[n.success=1]="success",n[n.error=2]="error"})(DA||(DA={}));new Promise(()=>{});function px(n,e){e===void 0&&(e=[]);let t=[];return H.Children.forEach(n,(i,r)=>{if(!H.isValidElement(i))return;let s=[...e,r];if(i.type===H.Fragment){t.push.apply(t,px(i.props.children,s));return}i.type!==qr&&Pn(!1),!i.props.index||!i.props.children||Pn(!1);let o={id:i.props.id||s.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(o.children=px(i.props.children,s)),t.push(o)}),t}/** + * React Router DOM v6.10.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function mx(){return mx=Object.assign?Object.assign.bind():function(n){for(var e=1;e=0)&&(t[r]=n[r]);return t}function EO(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function bO(n,e){return n.button===0&&(!e||e==="_self")&&!EO(n)}const TO=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function CO(n){let{basename:e,children:t,window:i}=n,r=H.useRef();r.current==null&&(r.current=Pk({window:i,v5Compat:!0}));let s=r.current,[o,a]=H.useState({action:s.action,location:s.location});return H.useLayoutEffect(()=>s.listen(a),[s]),H.createElement(wO,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:s})}const PO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",LO=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,vv=H.forwardRef(function(e,t){let{onClick:i,relative:r,reloadDocument:s,replace:o,state:a,target:l,to:f,preventScrollReset:h}=e,d=AO(e,TO),{basename:p}=H.useContext(ah),v,y=!1;if(typeof f=="string"&&LO.test(f)&&(v=f,PO)){let S=new URL(window.location.href),w=f.startsWith("//")?new URL(S.protocol+f):new URL(f),A=S1(w.pathname,p);w.origin===S.origin&&A!=null?f=A+w.search+w.hash:y=!0}let _=fO(f,{relative:r}),M=RO(f,{replace:o,state:a,target:l,preventScrollReset:h,relative:r});function m(S){i&&i(S),S.defaultPrevented||M(S)}return H.createElement("a",mx({},d,{href:v||_,onClick:y||s?i:m,ref:t,target:l}))});var NA;(function(n){n.UseScrollRestoration="useScrollRestoration",n.UseSubmitImpl="useSubmitImpl",n.UseFetcher="useFetcher"})(NA||(NA={}));var kA;(function(n){n.UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"})(kA||(kA={}));function RO(n,e){let{target:t,replace:i,state:r,preventScrollReset:s,relative:o}=e===void 0?{}:e,a=hO(),l=cg(),f=aP(n,{relative:o});return H.useCallback(h=>{if(bO(h,t)){h.preventDefault();let d=i!==void 0?i:Rm(l)===Rm(f);a(n,{replace:d,state:r,preventScrollReset:s,relative:o})}},[l,a,f,i,r,t,n,s,o])}const Hu="/portfolio-react-threejs/assets/anim-bg-41fcb528.gif",lP=H.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"}),fg=H.createContext({}),w1=H.createContext(null),hg=typeof document<"u",OA=hg?H.useLayoutEffect:H.useEffect,uP=H.createContext({strict:!1});function IO(n,e,t,i){const{visualElement:r}=H.useContext(fg),s=H.useContext(uP),o=H.useContext(w1),a=H.useContext(lP).reducedMotion,l=H.useRef();i=i||s.renderer,!l.current&&i&&(l.current=i(n,{visualState:e,parent:r,props:t,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const f=l.current;return H.useInsertionEffect(()=>{f&&f.update(t,o)}),OA(()=>{f&&f.render()}),H.useEffect(()=>{f&&f.updateFeatures()}),(window.HandoffAppearAnimations?OA:H.useEffect)(()=>{f&&f.animationState&&f.animationState.animateChanges()}),f}function ru(n){return typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function DO(n,e,t){return H.useCallback(i=>{i&&n.mount&&n.mount(i),e&&(i?e.mount(i):e.unmount()),t&&(typeof t=="function"?t(i):ru(t)&&(t.current=i))},[e])}function If(n){return typeof n=="string"||Array.isArray(n)}function dg(n){return typeof n=="object"&&typeof n.start=="function"}const M1=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],A1=["initial",...M1];function pg(n){return dg(n.animate)||A1.some(e=>If(n[e]))}function cP(n){return!!(pg(n)||n.variants)}function NO(n,e){if(pg(n)){const{initial:t,animate:i}=n;return{initial:t===!1||If(t)?t:void 0,animate:If(i)?i:void 0}}return n.inherit!==!1?e:{}}function kO(n){const{initial:e,animate:t}=NO(n,H.useContext(fg));return H.useMemo(()=>({initial:e,animate:t}),[UA(e),UA(t)])}function UA(n){return Array.isArray(n)?n.join(" "):n}const zA={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"]},Df={};for(const n in zA)Df[n]={isEnabled:e=>zA[n].some(t=>!!e[t])};function OO(n){for(const e in n)Df[e]={...Df[e],...n[e]}}function fP(n){const e=H.useRef(null);return e.current===null&&(e.current=n()),e.current}const rf={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let UO=1;function zO(){return fP(()=>{if(rf.hasEverUpdated)return UO++})}const hP=H.createContext({}),dP=H.createContext({}),FO=Symbol.for("motionComponentSymbol");function BO({preloadedFeatures:n,createVisualElement:e,useRender:t,useVisualState:i,Component:r}){n&&OO(n);function s(a,l){let f;const h={...H.useContext(lP),...a,layoutId:VO(a)},{isStatic:d}=h,p=kO(a),v=d?void 0:zO(),y=i(a,d);if(!d&&hg){p.visualElement=IO(r,y,h,e);const _=H.useContext(dP),M=H.useContext(uP).strict;p.visualElement&&(f=p.visualElement.loadFeatures(h,M,n,v,_))}return H.createElement(fg.Provider,{value:p},f&&p.visualElement?H.createElement(f,{visualElement:p.visualElement,...h}):null,t(r,a,v,DO(y,p.visualElement,l),y,d,p.visualElement))}const o=H.forwardRef(s);return o[FO]=r,o}function VO({layoutId:n}){const e=H.useContext(hP).id;return e&&n!==void 0?e+"-"+n:n}function HO(n){function e(i,r={}){return BO(n(i,r))}if(typeof Proxy>"u")return e;const t=new Map;return new Proxy(e,{get:(i,r)=>(t.has(r)||t.set(r,e(r)),t.get(r))})}const WO=["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 E1(n){return typeof n!="string"||n.includes("-")?!1:!!(WO.indexOf(n)>-1||/[A-Z]/.test(n))}const Dm={};function GO(n){Object.assign(Dm,n)}const uh=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],el=new Set(uh);function pP(n,{layout:e,layoutId:t}){return el.has(n)||n.startsWith("origin")||(e||t!==void 0)&&(!!Dm[n]||n==="opacity")}const Ri=n=>!!(n&&n.getVelocity),jO={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},XO=uh.length;function YO(n,{enableHardwareAcceleration:e=!0,allowTransformNone:t=!0},i,r){let s="";for(let o=0;oe=>typeof e=="string"&&e.startsWith(n),gP=mP("--"),gx=mP("var(--"),qO=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,ZO=(n,e)=>e&&typeof n=="number"?e.transform(n):n,Xa=(n,e,t)=>Math.min(Math.max(t,n),e),tl={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},sf={...tl,transform:n=>Xa(0,1,n)},Xd={...tl,default:1},of=n=>Math.round(n*1e5)/1e5,mg=/(-)?([\d]*\.?[\d])+/g,vP=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,JO=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function ch(n){return typeof n=="string"}const fh=n=>({test:e=>ch(e)&&e.endsWith(n)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${n}`}),co=fh("deg"),es=fh("%"),it=fh("px"),KO=fh("vh"),QO=fh("vw"),FA={...es,parse:n=>es.parse(n)/100,transform:n=>es.transform(n*100)},BA={...tl,transform:Math.round},yP={borderWidth:it,borderTopWidth:it,borderRightWidth:it,borderBottomWidth:it,borderLeftWidth:it,borderRadius:it,radius:it,borderTopLeftRadius:it,borderTopRightRadius:it,borderBottomRightRadius:it,borderBottomLeftRadius:it,width:it,maxWidth:it,height:it,maxHeight:it,size:it,top:it,right:it,bottom:it,left:it,padding:it,paddingTop:it,paddingRight:it,paddingBottom:it,paddingLeft:it,margin:it,marginTop:it,marginRight:it,marginBottom:it,marginLeft:it,rotate:co,rotateX:co,rotateY:co,rotateZ:co,scale:Xd,scaleX:Xd,scaleY:Xd,scaleZ:Xd,skew:co,skewX:co,skewY:co,distance:it,translateX:it,translateY:it,translateZ:it,x:it,y:it,z:it,perspective:it,transformPerspective:it,opacity:sf,originX:FA,originY:FA,originZ:it,zIndex:BA,fillOpacity:sf,strokeOpacity:sf,numOctaves:BA};function b1(n,e,t,i){const{style:r,vars:s,transform:o,transformOrigin:a}=n;let l=!1,f=!1,h=!0;for(const d in e){const p=e[d];if(gP(d)){s[d]=p;continue}const v=yP[d],y=ZO(p,v);if(el.has(d)){if(l=!0,o[d]=y,!h)continue;p!==(v.default||0)&&(h=!1)}else d.startsWith("origin")?(f=!0,a[d]=y):r[d]=y}if(e.transform||(l||i?r.transform=YO(n.transform,t,h,i):r.transform&&(r.transform="none")),f){const{originX:d="50%",originY:p="50%",originZ:v=0}=a;r.transformOrigin=`${d} ${p} ${v}`}}const T1=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function xP(n,e,t){for(const i in e)!Ri(e[i])&&!pP(i,t)&&(n[i]=e[i])}function $O({transformTemplate:n},e,t){return H.useMemo(()=>{const i=T1();return b1(i,e,{enableHardwareAcceleration:!t},n),Object.assign({},i.vars,i.style)},[e])}function eU(n,e,t){const i=n.style||{},r={};return xP(r,i,n),Object.assign(r,$O(n,e,t)),n.transformValues?n.transformValues(r):r}function tU(n,e,t){const i={},r=eU(n,e,t);return n.drag&&n.dragListener!==!1&&(i.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(i.tabIndex=0),i.style=r,i}const nU=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function Nm(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||nU.has(n)}let _P=n=>!Nm(n);function iU(n){n&&(_P=e=>e.startsWith("on")?!Nm(e):n(e))}try{iU(require("@emotion/is-prop-valid").default)}catch{}function rU(n,e,t){const i={};for(const r in n)r==="values"&&typeof n.values=="object"||(_P(r)||t===!0&&Nm(r)||!e&&!Nm(r)||n.draggable&&r.startsWith("onDrag"))&&(i[r]=n[r]);return i}function VA(n,e,t){return typeof n=="string"?n:it.transform(e+t*n)}function sU(n,e,t){const i=VA(e,n.x,n.width),r=VA(t,n.y,n.height);return`${i} ${r}`}const oU={offset:"stroke-dashoffset",array:"stroke-dasharray"},aU={offset:"strokeDashoffset",array:"strokeDasharray"};function lU(n,e,t=1,i=0,r=!0){n.pathLength=1;const s=r?oU:aU;n[s.offset]=it.transform(-i);const o=it.transform(e),a=it.transform(t);n[s.array]=`${o} ${a}`}function C1(n,{attrX:e,attrY:t,attrScale:i,originX:r,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...f},h,d,p){if(b1(n,f,h,p),d){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:v,style:y,dimensions:_}=n;v.transform&&(_&&(y.transform=v.transform),delete v.transform),_&&(r!==void 0||s!==void 0||y.transform)&&(y.transformOrigin=sU(_,r!==void 0?r:.5,s!==void 0?s:.5)),e!==void 0&&(v.x=e),t!==void 0&&(v.y=t),i!==void 0&&(v.scale=i),o!==void 0&&lU(v,o,a,l,!1)}const SP=()=>({...T1(),attrs:{}}),P1=n=>typeof n=="string"&&n.toLowerCase()==="svg";function uU(n,e,t,i){const r=H.useMemo(()=>{const s=SP();return C1(s,e,{enableHardwareAcceleration:!1},P1(i),n.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(n.style){const s={};xP(s,n.style,n),r.style={...s,...r.style}}return r}function cU(n=!1){return(t,i,r,s,{latestValues:o},a)=>{const f=(E1(t)?uU:tU)(i,o,a,t),d={...rU(i,typeof t=="string",n),...f,ref:s},{children:p}=i,v=H.useMemo(()=>Ri(p)?p.get():p,[p]);return r&&(d["data-projection-id"]=r),H.createElement(t,{...d,children:v})}}const L1=n=>n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function wP(n,{style:e,vars:t},i,r){Object.assign(n.style,e,r&&r.getProjectionStyles(i));for(const s in t)n.style.setProperty(s,t[s])}const MP=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"]);function AP(n,e,t,i){wP(n,e,void 0,i);for(const r in e.attrs)n.setAttribute(MP.has(r)?r:L1(r),e.attrs[r])}function R1(n,e){const{style:t}=n,i={};for(const r in t)(Ri(t[r])||e.style&&Ri(e.style[r])||pP(r,n))&&(i[r]=t[r]);return i}function EP(n,e){const t=R1(n,e);for(const i in n)if(Ri(n[i])||Ri(e[i])){const r=uh.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;t[r]=n[i]}return t}function I1(n,e,t,i={},r={}){return typeof e=="function"&&(e=e(t!==void 0?t:n.custom,i,r)),typeof e=="string"&&(e=n.variants&&n.variants[e]),typeof e=="function"&&(e=e(t!==void 0?t:n.custom,i,r)),e}const km=n=>Array.isArray(n),fU=n=>!!(n&&typeof n=="object"&&n.mix&&n.toValue),hU=n=>km(n)?n[n.length-1]||0:n;function Qp(n){const e=Ri(n)?n.get():n;return fU(e)?e.toValue():e}function dU({scrapeMotionValuesFromProps:n,createRenderState:e,onMount:t},i,r,s){const o={latestValues:pU(i,r,s,n),renderState:e()};return t&&(o.mount=a=>t(i,a,o)),o}const bP=n=>(e,t)=>{const i=H.useContext(fg),r=H.useContext(w1),s=()=>dU(n,e,i,r);return t?s():fP(s)};function pU(n,e,t,i){const r={},s=i(n,{});for(const p in s)r[p]=Qp(s[p]);let{initial:o,animate:a}=n;const l=pg(n),f=cP(n);e&&f&&!l&&n.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let h=t?t.initial===!1:!1;h=h||o===!1;const d=h?a:o;return d&&typeof d!="boolean"&&!dg(d)&&(Array.isArray(d)?d:[d]).forEach(v=>{const y=I1(n,v);if(!y)return;const{transitionEnd:_,transition:M,...m}=y;for(const S in m){let w=m[S];if(Array.isArray(w)){const A=h?w.length-1:0;w=w[A]}w!==null&&(r[S]=w)}for(const S in _)r[S]=_[S]}),r}const mU={useVisualState:bP({scrapeMotionValuesFromProps:EP,createRenderState:SP,onMount:(n,e,{renderState:t,latestValues:i})=>{try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}C1(t,i,{enableHardwareAcceleration:!1},P1(e.tagName),n.transformTemplate),AP(e,t)}})},gU={useVisualState:bP({scrapeMotionValuesFromProps:R1,createRenderState:T1})};function vU(n,{forwardMotionProps:e=!1},t,i){return{...E1(n)?mU:gU,preloadedFeatures:t,useRender:cU(e),createVisualElement:i,Component:n}}function Ps(n,e,t,i={passive:!0}){return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t)}const TP=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1;function gg(n,e="page"){return{point:{x:n[e+"X"],y:n[e+"Y"]}}}const yU=n=>e=>TP(e)&&n(e,gg(e));function Is(n,e,t,i){return Ps(n,e,yU(t),i)}const xU=(n,e)=>t=>e(n(t)),Io=(...n)=>n.reduce(xU);function CP(n){let e=null;return()=>{const t=()=>{e=null};return e===null?(e=n,t):!1}}const HA=CP("dragHorizontal"),WA=CP("dragVertical");function PP(n){let e=!1;if(n==="y")e=WA();else if(n==="x")e=HA();else{const t=HA(),i=WA();t&&i?e=()=>{t(),i()}:(t&&t(),i&&i())}return e}function LP(){const n=PP(!0);return n?(n(),!1):!0}class Xo{constructor(e){this.isMounted=!1,this.node=e}update(){}}function _U(n){let e=[],t=[],i=0,r=!1,s=!1;const o=new WeakSet,a={schedule:(l,f=!1,h=!1)=>{const d=h&&r,p=d?e:t;return f&&o.add(l),p.indexOf(l)===-1&&(p.push(l),d&&r&&(i=e.length)),l},cancel:l=>{const f=t.indexOf(l);f!==-1&&t.splice(f,1),o.delete(l)},process:l=>{if(r){s=!0;return}if(r=!0,[e,t]=[t,e],t.length=0,i=e.length,i)for(let f=0;f(n[e]=_U(()=>Nf=!0),n),{}),wU=n=>_u[n].process(zn),RP=n=>{Nf=!1,zn.delta=vx?1e3/60:Math.max(Math.min(n-zn.timestamp,SU),1),zn.timestamp=n,zn.isProcessing=!0,vg.forEach(wU),zn.isProcessing=!1,Nf&&(vx=!1,requestAnimationFrame(RP))},MU=()=>{Nf=!0,vx=!0,zn.isProcessing||requestAnimationFrame(RP)},nn=vg.reduce((n,e)=>{const t=_u[e];return n[e]=(i,r=!1,s=!1)=>(Nf||MU(),t.schedule(i,r,s)),n},{});function Fs(n){vg.forEach(e=>_u[e].cancel(n))}function GA(n,e){const t="pointer"+(e?"enter":"leave"),i="onHover"+(e?"Start":"End"),r=(s,o)=>{if(s.type==="touch"||LP())return;const a=n.getProps();n.animationState&&a.whileHover&&n.animationState.setActive("whileHover",e),a[i]&&nn.update(()=>a[i](s,o))};return Is(n.current,t,r,{passive:!n.getProps()[i]})}class AU extends Xo{mount(){this.unmount=Io(GA(this.node,!0),GA(this.node,!1))}unmount(){}}class EU extends Xo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{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=Io(Ps(this.node.current,"focus",()=>this.onFocus()),Ps(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const IP=(n,e)=>e?n===e?!0:IP(n,e.parentElement):!1,Tn=n=>n;function yv(n,e){if(!e)return;const t=new PointerEvent("pointer"+n);e(t,gg(t))}class bU extends Xo{constructor(){super(...arguments),this.removeStartListeners=Tn,this.removeEndListeners=Tn,this.removeAccessibleListeners=Tn,this.startPointerPress=(e,t)=>{if(this.removeEndListeners(),this.isPressing)return;const i=this.node.getProps(),s=Is(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:f,onTapCancel:h}=this.node.getProps();nn.update(()=>{IP(this.node.current,a.target)?f&&f(a,l):h&&h(a,l)})},{passive:!(i.onTap||i.onPointerUp)}),o=Is(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(i.onTapCancel||i.onPointerCancel)});this.removeEndListeners=Io(s,o),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=s=>{if(s.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||yv("up",(l,f)=>{const{onTap:h}=this.node.getProps();h&&nn.update(()=>h(l,f))})};this.removeEndListeners(),this.removeEndListeners=Ps(this.node.current,"keyup",o),yv("down",(a,l)=>{this.startPress(a,l)})},t=Ps(this.node.current,"keydown",e),i=()=>{this.isPressing&&yv("cancel",(s,o)=>this.cancelPress(s,o))},r=Ps(this.node.current,"blur",i);this.removeAccessibleListeners=Io(t,r)}}startPress(e,t){this.isPressing=!0;const{onTapStart:i,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),i&&nn.update(()=>i(e,t))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!LP()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:i}=this.node.getProps();i&&nn.update(()=>i(e,t))}mount(){const e=this.node.getProps(),t=Is(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),i=Ps(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Io(t,i)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const yx=new WeakMap,xv=new WeakMap,TU=n=>{const e=yx.get(n.target);e&&e(n)},CU=n=>{n.forEach(TU)};function PU({root:n,...e}){const t=n||document;xv.has(t)||xv.set(t,{});const i=xv.get(t),r=JSON.stringify(e);return i[r]||(i[r]=new IntersectionObserver(CU,{root:n,...e})),i[r]}function LU(n,e,t){const i=PU(e);return yx.set(n,t),i.observe(n),()=>{yx.delete(n),i.unobserve(n)}}const RU={some:0,all:1};class IU extends Xo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:i,amount:r="some",once:s}=e,o={root:t?t.current:void 0,rootMargin:i,threshold:typeof r=="number"?r:RU[r]},a=l=>{const{isIntersecting:f}=l;if(this.isInView===f||(this.isInView=f,s&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:h,onViewportLeave:d}=this.node.getProps(),p=f?h:d;p&&p(l)};return LU(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(DU(e,t))&&this.startObserver()}unmount(){}}function DU({viewport:n={}},{viewport:e={}}={}){return t=>n[t]!==e[t]}const NU={inView:{Feature:IU},tap:{Feature:bU},focus:{Feature:EU},hover:{Feature:AU}};function DP(n,e){if(!Array.isArray(e))return!1;const t=e.length;if(t!==n.length)return!1;for(let i=0;ie[i]=t.get()),e}function OU(n){const e={};return n.values.forEach((t,i)=>e[i]=t.getVelocity()),e}function yg(n,e,t){const i=n.getProps();return I1(i,e,t!==void 0?t:i.custom,kU(n),OU(n))}const UU="framerAppearId",zU="data-"+L1(UU);let FU=Tn,D1=Tn;const Do=n=>n*1e3,Ds=n=>n/1e3,BU={current:!1},NP=n=>Array.isArray(n)&&typeof n[0]=="number";function kP(n){return!!(!n||typeof n=="string"&&OP[n]||NP(n)||Array.isArray(n)&&n.every(kP))}const jc=([n,e,t,i])=>`cubic-bezier(${n}, ${e}, ${t}, ${i})`,OP={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:jc([0,.65,.55,1]),circOut:jc([.55,0,1,.45]),backIn:jc([.31,.01,.66,-.59]),backOut:jc([.33,1.53,.69,.99])};function UP(n){if(n)return NP(n)?jc(n):Array.isArray(n)?n.map(UP):OP[n]}function VU(n,e,t,{delay:i=0,duration:r,repeat:s=0,repeatType:o="loop",ease:a,times:l}={}){const f={[e]:t};l&&(f.offset=l);const h=UP(a);return Array.isArray(h)&&(f.easing=h),n.animate(f,{delay:i,duration:r,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const jA={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},_v={},zP={};for(const n in jA)zP[n]=()=>(_v[n]===void 0&&(_v[n]=jA[n]()),_v[n]);function HU(n,{repeat:e,repeatType:t="loop"}){const i=e&&t!=="loop"&&e%2===1?0:n.length-1;return n[i]}const FP=(n,e,t)=>(((1-3*t+3*e)*n+(3*t-6*e))*n+3*e)*n,WU=1e-7,GU=12;function jU(n,e,t,i,r){let s,o,a=0;do o=e+(t-e)/2,s=FP(o,i,r)-n,s>0?t=o:e=o;while(Math.abs(s)>WU&&++ajU(s,0,1,n,t);return s=>s===0||s===1?s:FP(r(s),e,i)}const XU=hh(.42,0,1,1),YU=hh(0,0,.58,1),BP=hh(.42,0,.58,1),qU=n=>Array.isArray(n)&&typeof n[0]!="number",VP=n=>e=>e<=.5?n(2*e)/2:(2-n(2*(1-e)))/2,HP=n=>e=>1-n(1-e),WP=n=>1-Math.sin(Math.acos(n)),N1=HP(WP),ZU=VP(N1),GP=hh(.33,1.53,.69,.99),k1=HP(GP),JU=VP(k1),KU=n=>(n*=2)<1?.5*k1(n):.5*(2-Math.pow(2,-10*(n-1))),QU={linear:Tn,easeIn:XU,easeInOut:BP,easeOut:YU,circIn:WP,circInOut:ZU,circOut:N1,backIn:k1,backInOut:JU,backOut:GP,anticipate:KU},XA=n=>{if(Array.isArray(n)){D1(n.length===4);const[e,t,i,r]=n;return hh(e,t,i,r)}else if(typeof n=="string")return QU[n];return n},O1=(n,e)=>t=>!!(ch(t)&&JO.test(t)&&t.startsWith(n)||e&&Object.prototype.hasOwnProperty.call(t,e)),jP=(n,e,t)=>i=>{if(!ch(i))return i;const[r,s,o,a]=i.match(mg);return{[n]:parseFloat(r),[e]:parseFloat(s),[t]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},$U=n=>Xa(0,255,n),Sv={...tl,transform:n=>Math.round($U(n))},Pa={test:O1("rgb","red"),parse:jP("red","green","blue"),transform:({red:n,green:e,blue:t,alpha:i=1})=>"rgba("+Sv.transform(n)+", "+Sv.transform(e)+", "+Sv.transform(t)+", "+of(sf.transform(i))+")"};function ez(n){let e="",t="",i="",r="";return n.length>5?(e=n.substring(1,3),t=n.substring(3,5),i=n.substring(5,7),r=n.substring(7,9)):(e=n.substring(1,2),t=n.substring(2,3),i=n.substring(3,4),r=n.substring(4,5),e+=e,t+=t,i+=i,r+=r),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}}const xx={test:O1("#"),parse:ez,transform:Pa.transform},su={test:O1("hsl","hue"),parse:jP("hue","saturation","lightness"),transform:({hue:n,saturation:e,lightness:t,alpha:i=1})=>"hsla("+Math.round(n)+", "+es.transform(of(e))+", "+es.transform(of(t))+", "+of(sf.transform(i))+")"},hi={test:n=>Pa.test(n)||xx.test(n)||su.test(n),parse:n=>Pa.test(n)?Pa.parse(n):su.test(n)?su.parse(n):xx.parse(n),transform:n=>ch(n)?n:n.hasOwnProperty("red")?Pa.transform(n):su.transform(n)},en=(n,e,t)=>-t*n+t*e+n;function wv(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*(2/3-t)*6:n}function tz({hue:n,saturation:e,lightness:t,alpha:i}){n/=360,e/=100,t/=100;let r=0,s=0,o=0;if(!e)r=s=o=t;else{const a=t<.5?t*(1+e):t+e-t*e,l=2*t-a;r=wv(l,a,n+1/3),s=wv(l,a,n),o=wv(l,a,n-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:i}}const Mv=(n,e,t)=>{const i=n*n;return Math.sqrt(Math.max(0,t*(e*e-i)+i))},nz=[xx,Pa,su],iz=n=>nz.find(e=>e.test(n));function YA(n){const e=iz(n);let t=e.parse(n);return e===su&&(t=tz(t)),t}const XP=(n,e)=>{const t=YA(n),i=YA(e),r={...t};return s=>(r.red=Mv(t.red,i.red,s),r.green=Mv(t.green,i.green,s),r.blue=Mv(t.blue,i.blue,s),r.alpha=en(t.alpha,i.alpha,s),Pa.transform(r))};function rz(n){var e,t;return isNaN(n)&&ch(n)&&(((e=n.match(mg))===null||e===void 0?void 0:e.length)||0)+(((t=n.match(vP))===null||t===void 0?void 0:t.length)||0)>0}const YP={regex:qO,countKey:"Vars",token:"${v}",parse:Tn},qP={regex:vP,countKey:"Colors",token:"${c}",parse:hi.parse},ZP={regex:mg,countKey:"Numbers",token:"${n}",parse:tl.parse};function Av(n,{regex:e,countKey:t,token:i,parse:r}){const s=n.tokenised.match(e);s&&(n["num"+t]=s.length,n.tokenised=n.tokenised.replace(e,i),n.values.push(...s.map(r)))}function Om(n){const e=n.toString(),t={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return t.value.includes("var(--")&&Av(t,YP),Av(t,qP),Av(t,ZP),t}function JP(n){return Om(n).values}function KP(n){const{values:e,numColors:t,numVars:i,tokenised:r}=Om(n),s=e.length;return o=>{let a=r;for(let l=0;ltypeof n=="number"?0:n;function oz(n){const e=JP(n);return KP(n)(e.map(sz))}const Uo={test:rz,parse:JP,createTransformer:KP,getAnimatableNone:oz},QP=(n,e)=>t=>`${t>0?e:n}`;function $P(n,e){return typeof n=="number"?t=>en(n,e,t):hi.test(n)?XP(n,e):n.startsWith("var(")?QP(n,e):t3(n,e)}const e3=(n,e)=>{const t=[...n],i=t.length,r=n.map((s,o)=>$P(s,e[o]));return s=>{for(let o=0;o{const t={...n,...e},i={};for(const r in t)n[r]!==void 0&&e[r]!==void 0&&(i[r]=$P(n[r],e[r]));return r=>{for(const s in i)t[s]=i[s](r);return t}},t3=(n,e)=>{const t=Uo.createTransformer(e),i=Om(n),r=Om(e);return i.numVars===r.numVars&&i.numColors===r.numColors&&i.numNumbers>=r.numNumbers?Io(e3(i.values,r.values),t):QP(n,e)},kf=(n,e,t)=>{const i=e-n;return i===0?1:(t-n)/i},qA=(n,e)=>t=>en(n,e,t);function lz(n){return typeof n=="number"?qA:typeof n=="string"?hi.test(n)?XP:t3:Array.isArray(n)?e3:typeof n=="object"?az:qA}function uz(n,e,t){const i=[],r=t||lz(n[0]),s=n.length-1;for(let o=0;oe[0];n[0]>n[s-1]&&(n=[...n].reverse(),e=[...e].reverse());const o=uz(e,i,r),a=o.length,l=f=>{let h=0;if(a>1)for(;hl(Xa(n[0],n[s-1],f)):l}function cz(n,e){const t=n[n.length-1];for(let i=1;i<=e;i++){const r=kf(0,e,i);n.push(en(t,1,r))}}function fz(n){const e=[0];return cz(e,n.length-1),e}function hz(n,e){return n.map(t=>t*e)}function dz(n,e){return n.map(()=>e||BP).splice(0,n.length-1)}function Um({duration:n=300,keyframes:e,times:t,ease:i="easeInOut"}){const r=qU(i)?i.map(XA):XA(i),s={done:!1,value:e[0]},o=hz(t&&t.length===e.length?t:fz(e),n),a=n3(o,e,{ease:Array.isArray(r)?r:dz(e,r)});return{calculatedDuration:n,next:l=>(s.value=a(l),s.done=l>=n,s)}}function i3(n,e){return e?n*(1e3/e):0}const pz=5;function r3(n,e,t){const i=Math.max(e-pz,0);return i3(t-n(i),e-i)}const Ev=.001,mz=.01,ZA=10,gz=.05,vz=1;function yz({duration:n=800,bounce:e=.25,velocity:t=0,mass:i=1}){let r,s;FU(n<=Do(ZA));let o=1-e;o=Xa(gz,vz,o),n=Xa(mz,ZA,Ds(n)),o<1?(r=f=>{const h=f*o,d=h*n,p=h-t,v=_x(f,o),y=Math.exp(-d);return Ev-p/v*y},s=f=>{const d=f*o*n,p=d*t+t,v=Math.pow(o,2)*Math.pow(f,2)*n,y=Math.exp(-d),_=_x(Math.pow(f,2),o);return(-r(f)+Ev>0?-1:1)*((p-v)*y)/_}):(r=f=>{const h=Math.exp(-f*n),d=(f-t)*n+1;return-Ev+h*d},s=f=>{const h=Math.exp(-f*n),d=(t-f)*(n*n);return h*d});const a=5/n,l=_z(r,s,a);if(n=Do(n),isNaN(l))return{stiffness:100,damping:10,duration:n};{const f=Math.pow(l,2)*i;return{stiffness:f,damping:o*2*Math.sqrt(i*f),duration:n}}}const xz=12;function _z(n,e,t){let i=t;for(let r=1;rn[t]!==void 0)}function Mz(n){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...n};if(!JA(n,wz)&&JA(n,Sz)){const t=yz(n);e={...e,...t,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}function s3({keyframes:n,restDelta:e,restSpeed:t,...i}){const r=n[0],s=n[n.length-1],o={done:!1,value:r},{stiffness:a,damping:l,mass:f,velocity:h,duration:d,isResolvedFromDuration:p}=Mz(i),v=h?-Ds(h):0,y=l/(2*Math.sqrt(a*f)),_=s-r,M=Ds(Math.sqrt(a/f)),m=Math.abs(_)<5;t||(t=m?.01:2),e||(e=m?.005:.5);let S;if(y<1){const w=_x(M,y);S=A=>{const b=Math.exp(-y*M*A);return s-b*((v+y*M*_)/w*Math.sin(w*A)+_*Math.cos(w*A))}}else if(y===1)S=w=>s-Math.exp(-M*w)*(_+(v+M*_)*w);else{const w=M*Math.sqrt(y*y-1);S=A=>{const b=Math.exp(-y*M*A),P=Math.min(w*A,300);return s-b*((v+y*M*_)*Math.sinh(P)+w*_*Math.cosh(P))/w}}return{calculatedDuration:p&&d||null,next:w=>{const A=S(w);if(p)o.done=w>=d;else{let b=v;w!==0&&(y<1?b=r3(S,w,A):b=0);const P=Math.abs(b)<=t,I=Math.abs(s-A)<=e;o.done=P&&I}return o.value=o.done?s:A,o}}}function KA({keyframes:n,velocity:e=0,power:t=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:f=.5,restSpeed:h}){const d=n[0],p={done:!1,value:d},v=L=>a!==void 0&&Ll,y=L=>a===void 0?l:l===void 0||Math.abs(a-L)-_*Math.exp(-L/i),w=L=>m+S(L),A=L=>{const C=S(L),R=w(L);p.done=Math.abs(C)<=f,p.value=p.done?m:R};let b,P;const I=L=>{v(p.value)&&(b=L,P=s3({keyframes:[p.value,y(p.value)],velocity:r3(w,L,p.value),damping:r,stiffness:s,restDelta:f,restSpeed:h}))};return I(0),{calculatedDuration:null,next:L=>{let C=!1;return!P&&b===void 0&&(C=!0,A(L),I(L)),b!==void 0&&L>b?P.next(L-b):(!C&&A(L),p)}}}const Az=n=>{const e=({timestamp:t})=>n(t);return{start:()=>nn.update(e,!0),stop:()=>Fs(e),now:()=>zn.isProcessing?zn.timestamp:performance.now()}},QA=2e4;function $A(n){let e=0;const t=50;let i=n.next(e);for(;!i.done&&e=QA?1/0:e}const Ez={decay:KA,inertia:KA,tween:Um,keyframes:Um,spring:s3};function zm({autoplay:n=!0,delay:e=0,driver:t=Az,keyframes:i,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:a="loop",onPlay:l,onStop:f,onComplete:h,onUpdate:d,...p}){let v=1,y=!1,_,M;const m=()=>{_&&_(),M=new Promise(te=>{_=te})};m();let S;const w=Ez[r]||Um;let A;w!==Um&&typeof i[0]!="number"&&(A=n3([0,100],i,{clamp:!1}),i=[0,100]);const b=w({...p,keyframes:i});let P;a==="mirror"&&(P=w({...p,keyframes:[...i].reverse(),velocity:-(p.velocity||0)}));let I="idle",L=null,C=null,R=null;b.calculatedDuration===null&&s&&(b.calculatedDuration=$A(b));const{calculatedDuration:W}=b;let J=1/0,j=1/0;W!==null&&(J=W+o,j=J*(s+1)-o);let X=0;const Z=te=>{if(C===null)return;v>0&&(C=Math.min(C,te)),L!==null?X=L:X=(te-C)*v;const $=X-e,ee=$<0;X=Math.max($,0),I==="finished"&&L===null&&(X=j);let ue=X,Ee=b;if(s){const Ye=X/J;let xe=Math.floor(Ye),Me=Ye%1;!Me&&Ye>=1&&(Me=1),Me===1&&xe--,xe=Math.min(xe,s+1);const ge=!!(xe%2);ge&&(a==="reverse"?(Me=1-Me,o&&(Me-=o/J)):a==="mirror"&&(Ee=P));let oe=Xa(0,1,Me);X>j&&(oe=a==="reverse"&&ge?1:0),ue=oe*J}const we=ee?{done:!1,value:i[0]}:Ee.next(ue);A&&(we.value=A(we.value));let{done:Q}=we;!ee&&W!==null&&(Q=X>=j);const Xe=L===null&&(I==="finished"||I==="running"&&Q||v<0&&X<=0);return d&&d(we.value),Xe&&D(),we},se=()=>{S&&S.stop(),S=void 0},ae=()=>{I="idle",se(),m(),C=R=null},D=()=>{I="finished",h&&h(),se(),m()},V=()=>{if(y)return;S||(S=t(Z));const te=S.now();l&&l(),L!==null?C=te-L:(!C||I==="finished")&&(C=te),R=C,L=null,I="running",S.start()};n&&V();const B={then(te,$){return M.then(te,$)},get time(){return Ds(X)},set time(te){te=Do(te),X=te,L!==null||!S||v===0?L=te:C=S.now()-te/v},get duration(){const te=b.calculatedDuration===null?$A(b):b.calculatedDuration;return Ds(te)},get speed(){return v},set speed(te){te===v||!S||(v=te,B.time=Ds(X))},get state(){return I},play:V,pause:()=>{I="paused",L=X},stop:()=>{y=!0,I!=="idle"&&(I="idle",f&&f(),ae())},cancel:()=>{R!==null&&Z(R),ae()},complete:()=>{I="finished"},sample:te=>(C=0,Z(te))};return B}const bz=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Yd=10,Tz=2e4,Cz=(n,e)=>e.type==="spring"||n==="backgroundColor"||!kP(e.ease);function Pz(n,e,{onUpdate:t,onComplete:i,...r}){if(!(zP.waapi()&&bz.has(e)&&!r.repeatDelay&&r.repeatType!=="mirror"&&r.damping!==0&&r.type!=="inertia"))return!1;let o=!1,a,l;const f=()=>{l=new Promise(m=>{a=m})};f();let{keyframes:h,duration:d=300,ease:p,times:v}=r;if(Cz(e,r)){const m=zm({...r,repeat:0,delay:0});let S={done:!1,value:h[0]};const w=[];let A=0;for(;!S.done&&Ay.cancel(),M=()=>{nn.update(_),a(),f()};return y.onfinish=()=>{n.set(HU(h,r)),i&&i(),M()},{then(m,S){return l.then(m,S)},get time(){return Ds(y.currentTime||0)},set time(m){y.currentTime=Do(m)},get speed(){return y.playbackRate},set speed(m){y.playbackRate=m},get duration(){return Ds(d)},play:()=>{o||(y.play(),Fs(_))},pause:()=>y.pause(),stop:()=>{if(o=!0,y.playState==="idle")return;const{currentTime:m}=y;if(m){const S=zm({...r,autoplay:!1});n.setWithVelocity(S.sample(m-Yd).value,S.sample(m).value,Yd)}M()},complete:()=>y.finish(),cancel:M}}function Lz({keyframes:n,delay:e,onUpdate:t,onComplete:i}){const r=()=>(t&&t(n[n.length-1]),i&&i(),{time:0,speed:1,duration:0,play:Tn,pause:Tn,stop:Tn,then:s=>(s(),Promise.resolve()),cancel:Tn,complete:Tn});return e?zm({keyframes:[0,1],duration:0,delay:e,onComplete:r}):r()}const Rz={type:"spring",stiffness:500,damping:25,restSpeed:10},Iz=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),Dz={type:"keyframes",duration:.8},Nz={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},kz=(n,{keyframes:e})=>e.length>2?Dz:el.has(n)?n.startsWith("scale")?Iz(e[1]):Rz:Nz,Sx=(n,e)=>n==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&Uo.test(e)&&!e.startsWith("url(")),Oz=new Set(["brightness","contrast","saturate","opacity"]);function Uz(n){const[e,t]=n.slice(0,-1).split("(");if(e==="drop-shadow")return n;const[i]=t.match(mg)||[];if(!i)return n;const r=t.replace(i,"");let s=Oz.has(e)?1:0;return i!==t&&(s*=100),e+"("+s+r+")"}const zz=/([a-z-]*)\(.*?\)/g,wx={...Uo,getAnimatableNone:n=>{const e=n.match(zz);return e?e.map(Uz).join(" "):n}},Fz={...yP,color:hi,backgroundColor:hi,outlineColor:hi,fill:hi,stroke:hi,borderColor:hi,borderTopColor:hi,borderRightColor:hi,borderBottomColor:hi,borderLeftColor:hi,filter:wx,WebkitFilter:wx},U1=n=>Fz[n];function z1(n,e){let t=U1(n);return t!==wx&&(t=Uo),t.getAnimatableNone?t.getAnimatableNone(e):void 0}function Bz({when:n,delay:e,delayChildren:t,staggerChildren:i,staggerDirection:r,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:f,...h}){return!!Object.keys(h).length}function eE(n){return n===0||typeof n=="string"&&parseFloat(n)===0&&n.indexOf(" ")===-1}function tE(n){return typeof n=="number"?0:z1("",n)}function o3(n,e){return n[e]||n.default||n}function Vz(n,[...e]){for(let t=0;tr=>{const s=o3(i,n)||{},o=s.delay||i.delay||0;let{elapsed:a=0}=i;a=a-Do(o);const l=Hz(e,n,t,s),f=l[0],h=l[l.length-1],d=Sx(n,f),p=Sx(n,h);let v={keyframes:l,velocity:e.getVelocity(),ease:"easeOut",...s,delay:-a,onUpdate:y=>{e.set(y),s.onUpdate&&s.onUpdate(y)},onComplete:()=>{r(),s.onComplete&&s.onComplete()}};if(Bz(s)||(v={...v,...kz(n,v)}),v.duration&&(v.duration=Do(v.duration)),v.repeatDelay&&(v.repeatDelay=Do(v.repeatDelay)),!d||!p||BU.current||s.type===!1)return Lz(v);if(e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const y=Pz(e,n,v);if(y)return y}return zm(v)};function Fm(n){return!!(Ri(n)&&n.add)}const Wz=n=>/^\-?\d*\.?\d+$/.test(n),Gz=n=>/^0[^.\s]+$/.test(n);function B1(n,e){n.indexOf(e)===-1&&n.push(e)}function V1(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}class H1{constructor(){this.subscriptions=[]}add(e){return B1(this.subscriptions,e),()=>V1(this.subscriptions,e)}notify(e,t,i){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,i);else for(let s=0;s!isNaN(parseFloat(n));class Xz{constructor(e,t={}){this.version="10.12.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(i,r=!0)=>{this.prev=this.current,this.current=i;const{delta:s,timestamp:o}=zn;this.lastUpdated!==o&&(this.timeDelta=s,this.lastUpdated=o,nn.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>nn.postRender(this.velocityCheck),this.velocityCheck=({timestamp:i})=>{i!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=jz(this.current),this.owner=t.owner}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new H1);const i=this.events[e].add(t);return e==="change"?()=>{i(),nn.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){!t||!this.passiveEffect?this.updateAndNotify(e,t):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,t,i){this.set(t),this.prev=e,this.timeDelta=i}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?i3(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):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.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Lu(n,e){return new Xz(n,e)}const a3=n=>e=>e.test(n),Yz={test:n=>n==="auto",parse:n=>n},l3=[tl,it,es,co,QO,KO,Yz],Ac=n=>l3.find(a3(n)),qz=[...l3,hi,Uo],Zz=n=>qz.find(a3(n));function Jz(n,e,t){n.hasValue(e)?n.getValue(e).set(t):n.addValue(e,Lu(t))}function Kz(n,e){const t=yg(n,e);let{transitionEnd:i={},transition:r={},...s}=t?n.makeTargetAnimatable(t,!1):{};s={...s,...i};for(const o in s){const a=hU(s[o]);Jz(n,o,a)}}function Qz(n,e,t){var i,r;const s=Object.keys(e).filter(a=>!n.hasValue(a)),o=s.length;if(o)for(let a=0;al.remove(d))),f.push(_)}return o&&Promise.all(f).then(()=>{o&&Kz(n,o)}),f}function Mx(n,e,t={}){const i=yg(n,e,t.custom);let{transition:r=n.getDefaultTransition()||{}}=i||{};t.transitionOverride&&(r=t.transitionOverride);const s=i?()=>Promise.all(u3(n,i,t)):()=>Promise.resolve(),o=n.variantChildren&&n.variantChildren.size?(l=0)=>{const{delayChildren:f=0,staggerChildren:h,staggerDirection:d}=r;return nF(n,e,f+l,h,d,t)}:()=>Promise.resolve(),{when:a}=r;if(a){const[l,f]=a==="beforeChildren"?[s,o]:[o,s];return l().then(()=>f())}else return Promise.all([s(),o(t.delay)])}function nF(n,e,t=0,i=0,r=1,s){const o=[],a=(n.variantChildren.size-1)*i,l=r===1?(f=0)=>f*i:(f=0)=>a-f*i;return Array.from(n.variantChildren).sort(iF).forEach((f,h)=>{f.notify("AnimationStart",e),o.push(Mx(f,e,{...s,delay:t+l(h)}).then(()=>f.notify("AnimationComplete",e)))}),Promise.all(o)}function iF(n,e){return n.sortNodePosition(e)}function rF(n,e,t={}){n.notify("AnimationStart",e);let i;if(Array.isArray(e)){const r=e.map(s=>Mx(n,s,t));i=Promise.all(r)}else if(typeof e=="string")i=Mx(n,e,t);else{const r=typeof e=="function"?yg(n,e,t.custom):e;i=Promise.all(u3(n,r,t))}return i.then(()=>n.notify("AnimationComplete",e))}const sF=[...M1].reverse(),oF=M1.length;function aF(n){return e=>Promise.all(e.map(({animation:t,options:i})=>rF(n,t,i)))}function lF(n){let e=aF(n);const t=cF();let i=!0;const r=(l,f)=>{const h=yg(n,f);if(h){const{transition:d,transitionEnd:p,...v}=h;l={...l,...v,...p}}return l};function s(l){e=l(n)}function o(l,f){const h=n.getProps(),d=n.getVariantContext(!0)||{},p=[],v=new Set;let y={},_=1/0;for(let m=0;m_&&b;const R=Array.isArray(A)?A:[A];let W=R.reduce(r,{});P===!1&&(W={});const{prevResolvedValues:J={}}=w,j={...J,...W},X=Z=>{C=!0,v.delete(Z),w.needsAnimating[Z]=!0};for(const Z in j){const se=W[Z],ae=J[Z];y.hasOwnProperty(Z)||(se!==ae?km(se)&&km(ae)?!DP(se,ae)||L?X(Z):w.protectedKeys[Z]=!0:se!==void 0?X(Z):v.add(Z):se!==void 0&&v.has(Z)?X(Z):w.protectedKeys[Z]=!0)}w.prevProp=A,w.prevResolvedValues=W,w.isActive&&(y={...y,...W}),i&&n.blockInitialAnimation&&(C=!1),C&&!I&&p.push(...R.map(Z=>({animation:Z,options:{type:S,...l}})))}if(v.size){const m={};v.forEach(S=>{const w=n.getBaseTarget(S);w!==void 0&&(m[S]=w)}),p.push({animation:m})}let M=!!p.length;return i&&h.initial===!1&&!n.manuallyAnimateOnMount&&(M=!1),i=!1,M?e(p):Promise.resolve()}function a(l,f,h){var d;if(t[l].isActive===f)return Promise.resolve();(d=n.variantChildren)===null||d===void 0||d.forEach(v=>{var y;return(y=v.animationState)===null||y===void 0?void 0:y.setActive(l,f)}),t[l].isActive=f;const p=o(h,l);for(const v in t)t[v].protectedKeys={};return p}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>t}}function uF(n,e){return typeof e=="string"?e!==n:Array.isArray(e)?!DP(e,n):!1}function la(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function cF(){return{animate:la(!0),whileInView:la(),whileHover:la(),whileTap:la(),whileDrag:la(),whileFocus:la(),exit:la()}}class fF extends Xo{constructor(e){super(e),e.animationState||(e.animationState=lF(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),dg(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){}}let hF=0;class dF extends Xo{constructor(){super(...arguments),this.id=hF++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t,custom:i}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const s=this.node.animationState.setActive("exit",!e,{custom:i??this.node.getProps().custom});t&&!e&&s.then(()=>t(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const pF={animation:{Feature:fF},exit:{Feature:dF}},nE=(n,e)=>Math.abs(n-e);function mF(n,e){const t=nE(n.x,e.x),i=nE(n.y,e.y);return Math.sqrt(t**2+i**2)}class c3{constructor(e,t,{transformPagePoint:i}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Tv(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,d=mF(f.offset,{x:0,y:0})>=3;if(!h&&!d)return;const{point:p}=f,{timestamp:v}=zn;this.history.push({...p,timestamp:v});const{onStart:y,onMove:_}=this.handlers;h||(y&&y(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),_&&_(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=bv(h,this.transformPagePoint),nn.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:d,onSessionEnd:p}=this.handlers,v=Tv(f.type==="pointercancel"?this.lastMoveEventInfo:bv(h,this.transformPagePoint),this.history);this.startEvent&&d&&d(f,v),p&&p(f,v)},!TP(e))return;this.handlers=t,this.transformPagePoint=i;const r=gg(e),s=bv(r,this.transformPagePoint),{point:o}=s,{timestamp:a}=zn;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=t;l&&l(e,Tv(s,this.history)),this.removeListeners=Io(Is(window,"pointermove",this.handlePointerMove),Is(window,"pointerup",this.handlePointerUp),Is(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Fs(this.updatePoint)}}function bv(n,e){return e?{point:e(n.point)}:n}function iE(n,e){return{x:n.x-e.x,y:n.y-e.y}}function Tv({point:n},e){return{point:n,delta:iE(n,f3(e)),offset:iE(n,gF(e)),velocity:vF(e,.1)}}function gF(n){return n[0]}function f3(n){return n[n.length-1]}function vF(n,e){if(n.length<2)return{x:0,y:0};let t=n.length-1,i=null;const r=f3(n);for(;t>=0&&(i=n[t],!(r.timestamp-i.timestamp>Do(e)));)t--;if(!i)return{x:0,y:0};const s=Ds(r.timestamp-i.timestamp);if(s===0)return{x:0,y:0};const o={x:(r.x-i.x)/s,y:(r.y-i.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Yi(n){return n.max-n.min}function Ax(n,e=0,t=.01){return Math.abs(n-e)<=t}function rE(n,e,t,i=.5){n.origin=i,n.originPoint=en(e.min,e.max,n.origin),n.scale=Yi(t)/Yi(e),(Ax(n.scale,1,1e-4)||isNaN(n.scale))&&(n.scale=1),n.translate=en(t.min,t.max,n.origin)-n.originPoint,(Ax(n.translate)||isNaN(n.translate))&&(n.translate=0)}function af(n,e,t,i){rE(n.x,e.x,t.x,i?i.originX:void 0),rE(n.y,e.y,t.y,i?i.originY:void 0)}function sE(n,e,t){n.min=t.min+e.min,n.max=n.min+Yi(e)}function yF(n,e,t){sE(n.x,e.x,t.x),sE(n.y,e.y,t.y)}function oE(n,e,t){n.min=e.min-t.min,n.max=n.min+Yi(e)}function lf(n,e,t){oE(n.x,e.x,t.x),oE(n.y,e.y,t.y)}function xF(n,{min:e,max:t},i){return e!==void 0&&nt&&(n=i?en(t,n,i.max):Math.min(n,t)),n}function aE(n,e,t){return{min:e!==void 0?n.min+e:void 0,max:t!==void 0?n.max+t-(n.max-n.min):void 0}}function _F(n,{top:e,left:t,bottom:i,right:r}){return{x:aE(n.x,t,r),y:aE(n.y,e,i)}}function lE(n,e){let t=e.min-n.min,i=e.max-n.max;return e.max-e.mini?t=kf(e.min,e.max-i,n.min):i>r&&(t=kf(n.min,n.max-r,e.min)),Xa(0,1,t)}function MF(n,e){const t={};return e.min!==void 0&&(t.min=e.min-n.min),e.max!==void 0&&(t.max=e.max-n.min),t}const Ex=.35;function AF(n=Ex){return n===!1?n=0:n===!0&&(n=Ex),{x:uE(n,"left","right"),y:uE(n,"top","bottom")}}function uE(n,e,t){return{min:cE(n,e),max:cE(n,t)}}function cE(n,e){return typeof n=="number"?n:n[e]||0}const fE=()=>({translate:0,scale:1,origin:0,originPoint:0}),uf=()=>({x:fE(),y:fE()}),hE=()=>({min:0,max:0}),Mn=()=>({x:hE(),y:hE()});function Jr(n){return[n("x"),n("y")]}function h3({top:n,left:e,right:t,bottom:i}){return{x:{min:e,max:t},y:{min:n,max:i}}}function EF({x:n,y:e}){return{top:e.min,right:n.max,bottom:e.max,left:n.min}}function bF(n,e){if(!e)return n;const t=e({x:n.left,y:n.top}),i=e({x:n.right,y:n.bottom});return{top:t.y,left:t.x,bottom:i.y,right:i.x}}function Cv(n){return n===void 0||n===1}function bx({scale:n,scaleX:e,scaleY:t}){return!Cv(n)||!Cv(e)||!Cv(t)}function xa(n){return bx(n)||d3(n)||n.z||n.rotate||n.rotateX||n.rotateY}function d3(n){return dE(n.x)||dE(n.y)}function dE(n){return n&&n!=="0%"}function Bm(n,e,t){const i=n-t,r=e*i;return t+r}function pE(n,e,t,i,r){return r!==void 0&&(n=Bm(n,r,i)),Bm(n,t,i)+e}function Tx(n,e=0,t=1,i,r){n.min=pE(n.min,e,t,i,r),n.max=pE(n.max,e,t,i,r)}function p3(n,{x:e,y:t}){Tx(n.x,e.translate,e.scale,e.originPoint),Tx(n.y,t.translate,t.scale,t.originPoint)}function TF(n,e,t,i=!1){const r=t.length;if(!r)return;e.x=e.y=1;let s,o;for(let a=0;a1.0000000000001||n<.999999999999?n:1}function po(n,e){n.min=n.min+e,n.max=n.max+e}function gE(n,e,[t,i,r]){const s=e[r]!==void 0?e[r]:.5,o=en(n.min,n.max,s);Tx(n,e[t],e[i],o,e.scale)}const CF=["x","scaleX","originX"],PF=["y","scaleY","originY"];function ou(n,e){gE(n.x,e,CF),gE(n.y,e,PF)}function m3(n,e){return h3(bF(n.getBoundingClientRect(),e))}function LF(n,e,t){const i=m3(n,t),{scroll:r}=e;return r&&(po(i.x,r.offset.x),po(i.y,r.offset.y)),i}const RF=new WeakMap;class IF{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Mn(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=l=>{this.stopAnimation(),t&&this.snapToCursor(gg(l,"page").point)},s=(l,f)=>{const{drag:h,dragPropagation:d,onDragStart:p}=this.getProps();if(h&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=PP(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Jr(y=>{let _=this.getAxisMotionValue(y).get()||0;if(es.test(_)){const{projection:M}=this.visualElement;if(M&&M.layout){const m=M.layout.layoutBox[y];m&&(_=Yi(m)*(parseFloat(_)/100))}}this.originPoint[y]=_}),p&&nn.update(()=>p(l,f),!1,!0);const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},o=(l,f)=>{const{dragPropagation:h,dragDirectionLock:d,onDirectionLock:p,onDrag:v}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:y}=f;if(d&&this.currentDirection===null){this.currentDirection=DF(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),v&&v(l,f)},a=(l,f)=>this.stop(l,f);this.panSession=new c3(e,{onSessionStart:r,onStart:s,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,t){const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:s}=this.getProps();s&&nn.update(()=>s(e,t))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,i){const{drag:r}=this.getProps();if(!i||!qd(e,r,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(o=xF(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),{layout:i}=this.visualElement.projection||{},r=this.constraints;e&&ru(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&i?this.constraints=_F(i.layoutBox,e):this.constraints=!1,this.elastic=AF(t),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Jr(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=MF(i.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!ru(e))return!1;const i=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const s=LF(i,r.root,this.visualElement.getTransformPagePoint());let o=SF(r.layout.layoutBox,s);if(t){const a=t(EF(o));this.hasMutatedConstraints=!!a,a&&(o=h3(a))}return o}startAnimation(e){const{drag:t,dragMomentum:i,dragElastic:r,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},f=Jr(h=>{if(!qd(h,t,this.currentDirection))return;let d=l&&l[h]||{};o&&(d={min:0,max:0});const p=r?200:1e6,v=r?40:1e7,y={type:"inertia",velocity:i?e[h]:0,bounceStiffness:p,bounceDamping:v,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(h,y)});return Promise.all(f).then(a)}startAxisValueAnimation(e,t){const i=this.getAxisMotionValue(e);return i.start(F1(e,i,0,t))}stopAnimation(){Jr(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const t="_drag"+e.toUpperCase(),i=this.visualElement.getProps(),r=i[t];return r||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){Jr(t=>{const{drag:i}=this.getProps();if(!qd(t,i,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(t);if(r&&r.layout){const{min:o,max:a}=r.layout.layoutBox[t];s.set(e[t]-en(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:i}=this.visualElement;if(!ru(t)||!i||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Jr(o=>{const a=this.getAxisMotionValue(o);if(a){const l=a.get();r[o]=wF({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),Jr(o=>{if(!qd(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:f}=this.constraints[o];a.set(en(l,f,r[o]))})}addListeners(){if(!this.visualElement.current)return;RF.set(this.visualElement,this);const e=this.visualElement.current,t=Is(e,"pointerdown",l=>{const{drag:f,dragListener:h=!0}=this.getProps();f&&h&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();ru(l)&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,s=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),i();const o=Ps(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",({delta:l,hasLayoutChanged:f})=>{this.isDragging&&f&&(Jr(h=>{const d=this.getAxisMotionValue(h);d&&(this.originPoint[h]+=l[h].translate,d.set(d.get()+l[h].translate))}),this.visualElement.render())});return()=>{o(),t(),s(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:o=Ex,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:i,dragPropagation:r,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function qd(n,e,t){return(e===!0||e===n)&&(t===null||t===n)}function DF(n,e=10){let t=null;return Math.abs(n.y)>e?t="y":Math.abs(n.x)>e&&(t="x"),t}class NF extends Xo{constructor(e){super(e),this.removeGroupControls=Tn,this.removeListeners=Tn,this.controls=new IF(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Tn}unmount(){this.removeGroupControls(),this.removeListeners()}}const vE=n=>(e,t)=>{n&&nn.update(()=>n(e,t))};class kF extends Xo{constructor(){super(...arguments),this.removePointerDownListener=Tn}onPointerDown(e){this.session=new c3(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:vE(e),onStart:vE(t),onMove:i,onEnd:(s,o)=>{delete this.session,r&&nn.update(()=>r(s,o))}}}mount(){this.removePointerDownListener=Is(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function OF(){const n=H.useContext(w1);if(n===null)return[!0,null];const{isPresent:e,onExitComplete:t,register:i}=n,r=H.useId();return H.useEffect(()=>i(r),[]),!e&&t?[!1,()=>t&&t(r)]:[!0]}function yE(n,e){return e.max===e.min?0:n/(e.max-e.min)*100}const Ec={correct:(n,e)=>{if(!e.target)return n;if(typeof n=="string")if(it.test(n))n=parseFloat(n);else return n;const t=yE(n,e.target.x),i=yE(n,e.target.y);return`${t}% ${i}%`}},UF={correct:(n,{treeScale:e,projectionDelta:t})=>{const i=n,r=Uo.parse(n);if(r.length>5)return i;const s=Uo.createTransformer(n),o=typeof r[0]!="number"?1:0,a=t.x.scale*e.x,l=t.y.scale*e.y;r[0+o]/=a,r[1+o]/=l;const f=en(a,l,.5);return typeof r[2+o]=="number"&&(r[2+o]/=f),typeof r[3+o]=="number"&&(r[3+o]/=f),s(r)}};class zF extends nh.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:i,layoutId:r}=this.props,{projection:s}=e;GO(FF),s&&(t.group&&t.group.add(s),i&&i.register&&r&&i.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),rf.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:i,drag:r,isPresent:s}=this.props,o=i.projection;return o&&(o.isPresent=s,r||e.layoutDependency!==t||t===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||nn.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:i}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),i&&i.deregister&&i.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function g3(n){const[e,t]=OF(),i=H.useContext(hP);return nh.createElement(zF,{...n,layoutGroup:i,switchLayoutGroup:H.useContext(dP),isPresent:e,safeToRemove:t})}const FF={borderRadius:{...Ec,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ec,borderTopRightRadius:Ec,borderBottomLeftRadius:Ec,borderBottomRightRadius:Ec,boxShadow:UF},v3=["TopLeft","TopRight","BottomLeft","BottomRight"],BF=v3.length,xE=n=>typeof n=="string"?parseFloat(n):n,_E=n=>typeof n=="number"||it.test(n);function VF(n,e,t,i,r,s){r?(n.opacity=en(0,t.opacity!==void 0?t.opacity:1,HF(i)),n.opacityExit=en(e.opacity!==void 0?e.opacity:1,0,WF(i))):s&&(n.opacity=en(e.opacity!==void 0?e.opacity:1,t.opacity!==void 0?t.opacity:1,i));for(let o=0;oie?1:t(kf(n,e,i))}function wE(n,e){n.min=e.min,n.max=e.max}function or(n,e){wE(n.x,e.x),wE(n.y,e.y)}function ME(n,e,t,i,r){return n-=e,n=Bm(n,1/t,i),r!==void 0&&(n=Bm(n,1/r,i)),n}function GF(n,e=0,t=1,i=.5,r,s=n,o=n){if(es.test(e)&&(e=parseFloat(e),e=en(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=en(s.min,s.max,i);n===s&&(a-=e),n.min=ME(n.min,e,t,a,r),n.max=ME(n.max,e,t,a,r)}function AE(n,e,[t,i,r],s,o){GF(n,e[t],e[i],e[r],e.scale,s,o)}const jF=["x","scaleX","originX"],XF=["y","scaleY","originY"];function EE(n,e,t,i){AE(n.x,e,jF,t?t.x:void 0,i?i.x:void 0),AE(n.y,e,XF,t?t.y:void 0,i?i.y:void 0)}function bE(n){return n.translate===0&&n.scale===1}function x3(n){return bE(n.x)&&bE(n.y)}function Cx(n,e){return n.x.min===e.x.min&&n.x.max===e.x.max&&n.y.min===e.y.min&&n.y.max===e.y.max}function TE(n){return Yi(n.x)/Yi(n.y)}class YF{constructor(){this.members=[]}add(e){B1(this.members,e),e.scheduleRender()}remove(e){if(V1(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(e){const t=this.members.findIndex(r=>e===r);if(t===0)return!1;let i;for(let r=t;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1){i=s;break}}return i?(this.promote(i),!0):!1}promote(e,t){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,t&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;r===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:i}=e;t.onExitComplete&&t.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function CE(n,e,t){let i="";const r=n.x.translate/e.x,s=n.y.translate/e.y;if((r||s)&&(i=`translate3d(${r}px, ${s}px, 0) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),t){const{rotate:l,rotateX:f,rotateY:h}=t;l&&(i+=`rotate(${l}deg) `),f&&(i+=`rotateX(${f}deg) `),h&&(i+=`rotateY(${h}deg) `)}const o=n.x.scale*e.x,a=n.y.scale*e.y;return(o!==1||a!==1)&&(i+=`scale(${o}, ${a})`),i||"none"}const qF=(n,e)=>n.depth-e.depth;class ZF{constructor(){this.children=[],this.isDirty=!1}add(e){B1(this.children,e),this.isDirty=!0}remove(e){V1(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(qF),this.isDirty=!1,this.children.forEach(e)}}function JF(n,e){const t=performance.now(),i=({timestamp:r})=>{const s=r-t;s>=e&&(Fs(i),n(s-e))};return nn.read(i,!0),()=>Fs(i)}function KF(n){window.MotionDebug&&window.MotionDebug.record(n)}function QF(n){return n instanceof SVGElement&&n.tagName!=="svg"}function $F(n,e,t){const i=Ri(n)?n:Lu(n);return i.start(F1("",i,e,t)),i.animation}const PE=["","X","Y","Z"],LE=1e3;let e4=0;const _a={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function _3({attachResizeListener:n,defaultParent:e,measureScroll:t,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(o,a={},l=e==null?void 0:e()){this.id=e4++,this.animationId=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.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{_a.totalNodes=_a.resolvedTargetDeltas=_a.recalculatedProjection=0,this.nodes.forEach(i4),this.nodes.forEach(a4),this.nodes.forEach(l4),this.nodes.forEach(r4),KF(_a)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=o,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(let f=0;fthis.root.updateBlockedByResize=!1;n(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=JF(p,250),rf.hasAnimatedSinceResize&&(rf.hasAnimatedSinceResize=!1,this.nodes.forEach(IE))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&h&&(l||f)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeTargetChanged:v,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const _=this.options.transition||h.getDefaultTransition()||d4,{onLayoutAnimationStart:M,onLayoutAnimationComplete:m}=h.getProps(),S=!this.targetLayout||!Cx(this.targetLayout,y)||v,w=!p&&v;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||w||p&&(S||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,w);const A={...o3(_,"layout"),onPlay:M,onComplete:m};(h.shouldReduceMotion||this.options.layoutRoot)&&(A.delay=0,A.type=!1),this.startAnimation(A)}else!p&&this.animationProgress===0&&IE(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Fs(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.forEach(u4),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const b=A/1e3;DE(d.x,o.x,b),DE(d.y,o.y,b),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(lf(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),f4(this.relativeTarget,this.relativeTargetOrigin,p,b),w&&Cx(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Mn()),or(w,this.relativeTarget)),_&&(this.animationValues=h,VF(h,f,this.latestValues,b,S,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Fs(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=nn.update(()=>{rf.hasAnimatedSinceResize=!0,this.currentAnimation=$F(0,LE,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(LE),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:f,latestValues:h}=o;if(!(!a||!l||!f)){if(this!==o&&this.layout&&f&&S3(this.options.animationType,this.layout.layoutBox,f.layoutBox)){l=this.target||Mn();const d=Yi(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const p=Yi(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+p}or(a,l),ou(a,h),af(this.projectionDeltaWithTransform,this.layoutCorrected,a,h)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new YF),this.sharedNodes.get(o).add(a);const f=a.options.initialPromotionConfig;a.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const f=this.getStack();f&&f.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const f={};for(let h=0;h{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(RE),this.root.sharedNodes.clear()}}}function t4(n){n.updateLayout()}function n4(n){var e;const t=((e=n.resumeFrom)===null||e===void 0?void 0:e.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&t&&n.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:r}=n.layout,{animationType:s}=n.options,o=t.source!==n.layout.source;s==="size"?Jr(d=>{const p=o?t.measuredBox[d]:t.layoutBox[d],v=Yi(p);p.min=i[d].min,p.max=p.min+v}):S3(s,t.layoutBox,i)&&Jr(d=>{const p=o?t.measuredBox[d]:t.layoutBox[d],v=Yi(i[d]);p.max=p.min+v,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[d].max=n.relativeTarget[d].min+v)});const a=uf();af(a,i,t.layoutBox);const l=uf();o?af(l,n.applyTransform(r,!0),t.measuredBox):af(l,i,t.layoutBox);const f=!x3(a);let h=!1;if(!n.resumeFrom){const d=n.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:v}=d;if(p&&v){const y=Mn();lf(y,t.layoutBox,p.layoutBox);const _=Mn();lf(_,i,v.layoutBox),Cx(y,_)||(h=!0),d.options.layoutRoot&&(n.relativeTarget=_,n.relativeTargetOrigin=y,n.relativeParent=d)}}}n.notifyListeners("didUpdate",{layout:i,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:f,hasRelativeTargetChanged:h})}else if(n.isLead()){const{onExitComplete:i}=n.options;i&&i()}n.options.transition=void 0}function i4(n){_a.totalNodes++,n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function r4(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function s4(n){n.clearSnapshot()}function RE(n){n.clearMeasurements()}function o4(n){const{visualElement:e}=n.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),n.resetTransform()}function IE(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0}function a4(n){n.resolveTargetDelta()}function l4(n){n.calcProjection()}function u4(n){n.resetRotation()}function c4(n){n.removeLeadSnapshot()}function DE(n,e,t){n.translate=en(e.translate,0,t),n.scale=en(e.scale,1,t),n.origin=e.origin,n.originPoint=e.originPoint}function NE(n,e,t,i){n.min=en(e.min,t.min,i),n.max=en(e.max,t.max,i)}function f4(n,e,t,i){NE(n.x,e.x,t.x,i),NE(n.y,e.y,t.y,i)}function h4(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const d4={duration:.45,ease:[.4,0,.1,1]};function p4(n,e){let t=n.root;for(let s=n.path.length-1;s>=0;s--)if(n.path[s].instance){t=n.path[s];break}const r=(t&&t!==n.root?t.instance:document).querySelector(`[data-projection-id="${e}"]`);r&&n.mount(r,!0)}function kE(n){n.min=Math.round(n.min),n.max=Math.round(n.max)}function m4(n){kE(n.x),kE(n.y)}function S3(n,e,t){return n==="position"||n==="preserve-aspect"&&!Ax(TE(e),TE(t),.2)}const g4=_3({attachResizeListener:(n,e)=>Ps(n,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Pv={current:void 0},w3=_3({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!Pv.current){const n=new g4(0,{});n.mount(window),n.setOptions({layoutScroll:!0}),Pv.current=n}return Pv.current},resetTransform:(n,e)=>{n.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),v4={pan:{Feature:kF},drag:{Feature:NF,ProjectionNode:w3,MeasureLayout:g3}},y4=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function x4(n){const e=y4.exec(n);if(!e)return[,];const[,t,i]=e;return[t,i]}function Px(n,e,t=1){const[i,r]=x4(n);if(!i)return;const s=window.getComputedStyle(e).getPropertyValue(i);return s?s.trim():gx(r)?Px(r,e,t+1):r}function _4(n,{...e},t){const i=n.current;if(!(i instanceof Element))return{target:e,transitionEnd:t};t&&(t={...t}),n.values.forEach(r=>{const s=r.get();if(!gx(s))return;const o=Px(s,i);o&&r.set(o)});for(const r in e){const s=e[r];if(!gx(s))continue;const o=Px(s,i);o&&(e[r]=o,t||(t={}),t[r]===void 0&&(t[r]=s))}return{target:e,transitionEnd:t}}const S4=new Set(["width","height","top","left","right","bottom","x","y"]),M3=n=>S4.has(n),w4=n=>Object.keys(n).some(M3),OE=n=>n===tl||n===it,UE=(n,e)=>parseFloat(n.split(", ")[e]),zE=(n,e)=>(t,{transform:i})=>{if(i==="none"||!i)return 0;const r=i.match(/^matrix3d\((.+)\)$/);if(r)return UE(r[1],e);{const s=i.match(/^matrix\((.+)\)$/);return s?UE(s[1],n):0}},M4=new Set(["x","y","z"]),A4=uh.filter(n=>!M4.has(n));function E4(n){const e=[];return A4.forEach(t=>{const i=n.getValue(t);i!==void 0&&(e.push([t,i.get()]),i.set(t.startsWith("scale")?1:0))}),e.length&&n.render(),e}const FE={width:({x:n},{paddingLeft:e="0",paddingRight:t="0"})=>n.max-n.min-parseFloat(e)-parseFloat(t),height:({y:n},{paddingTop:e="0",paddingBottom:t="0"})=>n.max-n.min-parseFloat(e)-parseFloat(t),top:(n,{top:e})=>parseFloat(e),left:(n,{left:e})=>parseFloat(e),bottom:({y:n},{top:e})=>parseFloat(e)+(n.max-n.min),right:({x:n},{left:e})=>parseFloat(e)+(n.max-n.min),x:zE(4,13),y:zE(5,14)},b4=(n,e,t)=>{const i=e.measureViewportBox(),r=e.current,s=getComputedStyle(r),{display:o}=s,a={};o==="none"&&e.setStaticValue("display",n.display||"block"),t.forEach(f=>{a[f]=FE[f](i,s)}),e.render();const l=e.measureViewportBox();return t.forEach(f=>{const h=e.getValue(f);h&&h.jump(a[f]),n[f]=FE[f](l,s)}),n},T4=(n,e,t={},i={})=>{e={...e},i={...i};const r=Object.keys(e).filter(M3);let s=[],o=!1;const a=[];if(r.forEach(l=>{const f=n.getValue(l);if(!n.hasValue(l))return;let h=t[l],d=Ac(h);const p=e[l];let v;if(km(p)){const y=p.length,_=p[0]===null?1:0;h=p[_],d=Ac(h);for(let M=_;M=0?window.pageYOffset:null,f=b4(e,n,a);return s.length&&s.forEach(([h,d])=>{n.getValue(h).set(d)}),n.render(),hg&&l!==null&&window.scrollTo({top:l}),{target:f,transitionEnd:i}}else return{target:e,transitionEnd:i}};function C4(n,e,t,i){return w4(e)?T4(n,e,t,i):{target:e,transitionEnd:i}}const P4=(n,e,t,i)=>{const r=_4(n,e,i);return e=r.target,i=r.transitionEnd,C4(n,e,t,i)},Lx={current:null},A3={current:!1};function L4(){if(A3.current=!0,!!hg)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),e=()=>Lx.current=n.matches;n.addListener(e),e()}else Lx.current=!1}function R4(n,e,t){const{willChange:i}=e;for(const r in e){const s=e[r],o=t[r];if(Ri(s))n.addValue(r,s),Fm(i)&&i.add(r);else if(Ri(o))n.addValue(r,Lu(s,{owner:n})),Fm(i)&&i.remove(r);else if(o!==s)if(n.hasValue(r)){const a=n.getValue(r);!a.hasAnimated&&a.set(s)}else{const a=n.getStaticValue(r);n.addValue(r,Lu(a!==void 0?a:s,{owner:n}))}}for(const r in t)e[r]===void 0&&n.removeValue(r);return e}const BE=new WeakMap,E3=Object.keys(Df),I4=E3.length,VE=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],D4=A1.length;class N4{constructor({parent:e,props:t,presenceContext:i,reducedMotionConfig:r,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},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.scheduleRender=()=>nn.render(this.render,!1,!0);const{latestValues:a,renderState:l}=s;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.isControllingVariants=pg(t),this.isVariantNode=cP(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(t,{});for(const d in h){const p=h[d];a[d]!==void 0&&Ri(p)&&(p.set(a[d],!1),Fm(f)&&f.add(d))}}scrapeMotionValuesFromProps(e,t){return{}}mount(e){this.current=e,BE.set(e,this),this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,i)=>this.bindToMotionValue(i,t)),A3.current||L4(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Lx.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){BE.delete(this.current),this.projection&&this.projection.unmount(),Fs(this.notifyUpdate),Fs(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,t){const i=el.has(e),r=t.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&nn.update(this.notifyUpdate,!1,!0),i&&this.projection&&(this.projection.isTransformDirty=!0)}),s=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{r(),s()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...t},i,r,s,o){let a,l;for(let f=0;fthis.scheduleRender(),animationType:typeof h=="string"?h:"both",initialPromotionConfig:o,layoutScroll:v,layoutRoot:y})}return l}updateFeatures(){for(const e in this.features){const t=this.features[e];t.isMounted?t.update(this.props,this.prevProps):(t.mount(),t.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Mn()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}makeTargetAnimatable(e,t=!0){return this.makeTargetAnimatableFromInstance(e,this.props,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 i=0;it.variantChildren.delete(e)}addValue(e,t){t!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,t)),this.values.set(e,t),this.latestValues[e]=t.get()}removeValue(e){this.values.delete(e);const 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 i=this.values.get(e);return i===void 0&&t!==void 0&&(i=Lu(t,{owner:this}),this.addValue(e,i)),i}readValue(e){return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:i}=this.props,r=typeof i=="string"||typeof i=="object"?(t=I1(this.props,i))===null||t===void 0?void 0:t[e]:void 0;if(i&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!Ri(s)?s:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new H1),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class b3 extends N4{sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:i}){delete t[e],delete i[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:t,...i},{transformValues:r},s){let o=eF(i,e||{},this);if(r&&(t&&(t=r(t)),i&&(i=r(i)),o&&(o=r(o))),s){Qz(this,i,o);const a=P4(this,i,o,t);t=a.transitionEnd,i=a.target}return{transition:e,transitionEnd:t,...i}}}function k4(n){return window.getComputedStyle(n)}class O4 extends b3{readValueFromInstance(e,t){if(el.has(t)){const i=U1(t);return i&&i.default||0}else{const i=k4(e),r=(gP(t)?i.getPropertyValue(t):i[t])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return m3(e,t)}build(e,t,i,r){b1(e,t,i,r.transformTemplate)}scrapeMotionValuesFromProps(e,t){return R1(e,t)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Ri(e)&&(this.childSubscription=e.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}renderInstance(e,t,i,r){wP(e,t,i,r)}}class U4 extends b3{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(el.has(t)){const i=U1(t);return i&&i.default||0}return t=MP.has(t)?t:L1(t),e.getAttribute(t)}measureInstanceViewportBox(){return Mn()}scrapeMotionValuesFromProps(e,t){return EP(e,t)}build(e,t,i,r){C1(e,t,i,this.isSVGTag,r.transformTemplate)}renderInstance(e,t,i,r){AP(e,t,i,r)}mount(e){this.isSVGTag=P1(e.tagName),super.mount(e)}}const z4=(n,e)=>E1(n)?new U4(e,{enableHardwareAcceleration:!1}):new O4(e,{enableHardwareAcceleration:!0}),F4={layout:{ProjectionNode:w3,MeasureLayout:g3}},B4={...pF,...NU,...v4,...F4},sn=HO((n,e)=>vU(n,e,B4,z4)),jt={paddingX:"sm:px-16 px-6",paddingY:"sm:py-16 py-6",padding:"sm:px-16 px-6 sm:py-16 py-10",heroHeadText:"font-black text-[#373737] lg:text-[80px] sm:text-[60px] xs:text-[50px] text-[40px] lg:leading-[98px] mt-2",heroSubText:"text-[#dfd9ff] font-medium lg:text-[30px] sm:text-[26px] xs:text-[20px] text-[16px] lg:leading-[40px]",sectionHeadText:"text-black font-black md:text-[60px] sm:text-[50px] xs:text-[40px] text-[30px]",sectionSubText:"sm:text-[18px] text-[14px] text-secondary uppercase tracking-wider"},V4="/portfolio-react-threejs/assets/web-0c6824d5.webp",H4="/portfolio-react-threejs/assets/mobile-84df6906.webp",W4="/portfolio-react-threejs/assets/creator-ab86683b.webp",G4="/portfolio-react-threejs/assets/csi-1f769921.webp",j4="/portfolio-react-threejs/assets/msc-abe50c5d.webp",X4="/portfolio-react-threejs/assets/techyv-adede69e.webp",Y4="/portfolio-react-threejs/assets/shapeout-d15c331a.webp",q4="/portfolio-react-threejs/assets/facedetection-65dc0246.webp",Z4="/portfolio-react-threejs/assets/Hi-783be2bb.webp",J4="/portfolio-react-threejs/assets/langgo-41707292.webp",K4="/portfolio-react-threejs/assets/lifeoverseas-fd137d40.webp",Q4="/portfolio-react-threejs/assets/velox-429d856c.webp",$4="/portfolio-react-threejs/assets/yolo-9ff20b51.webp",eB="/portfolio-react-threejs/assets/anon_exchange-3f3d612c.webp",tB="/portfolio-react-threejs/assets/banana_class-8925bee5.webp",nB="/portfolio-react-threejs/assets/convogen-ba953cbd.webp",iB="/portfolio-react-threejs/assets/1-710ab004.webp",rB="/portfolio-react-threejs/assets/2-bd31252c.webp",sB="/portfolio-react-threejs/assets/3-da0bbfbc.webp",oB="/portfolio-react-threejs/assets/4-8d092131.webp",aB="/portfolio-react-threejs/assets/5-b3191ff5.webp",lB="/portfolio-react-threejs/assets/6-b412236c.webp",uB="/portfolio-react-threejs/assets/7-21761f9b.webp",cB="/portfolio-react-threejs/assets/8-b4888019.webp",fB="/portfolio-react-threejs/assets/9-22d557f1.webp",hB="/portfolio-react-threejs/assets/1-bc4e4556.webp",dB="/portfolio-react-threejs/assets/2-466546d5.webp",pB="/portfolio-react-threejs/assets/1-c8ded170.webp",HE=[{id:"",title:"Home",type:"route"},{id:"projects",title:"Projects",type:"route"},{id:"skills",title:"Skills",type:"route"},{id:"certificate",title:"Certificates",type:"route"},{id:"resume",title:"Resume",type:"route"},{id:"blogs",title:"Blogs",type:"route"},{id:"contact",title:"Contact",type:"route"},{id:"freetools",title:"Free Tools",type:"tools"}],mB=[{id:"downloadtube",title:"DownloadTube (Youtube Downloader)",type:"video",url:"https://downloadtube-iota.vercel.app/"}],gB=[{title:"Full Stack Web Development",icon:V4},{title:"Designing",icon:W4},{title:"ML and DL Learner",icon:H4}],vB=[{title:"Content Writer",company_name:"Techyv",icon:X4,iconBg:"white",date:"October 2023 - Ongoing",points:["Writing Professional articles related to IT.","Ensuring use of no AI content in articles.","Creating articles on real facts and data."]},{title:"Technical member",company_name:"Microsoft Student Chapter",icon:j4,iconBg:"black",date:"October 2022 - March 2023",points:["Maintaining the website and ensuring that it is up-to-date and functioning properly.","Collaborating with other members of the chapter to identify areas for improvement on the website.","Implementing changes and updates to the website using programming languages such as React.js, tailwind and JavaScript.","Debugging any issues or errors that arise on the website and working to resolve them."]},{title:"V open source member",company_name:"CSI Chapter",icon:G4,iconBg:"white",date:"Augest 2021 - June 2022",points:["Conducting regular meetings to discuss open source projects and new initiatives.","Conducting workshops and training sessions to help members learn more about open source technologies.","Coordinating with other teams within the CSI chapter to ensure smooth execution of events."]}],yB=[{name:"ConvoGen AI",description:"'ConvoGen' is the virtual embodiment of me, a chatbot that offers lifelike insights and information about my experiences, interests, and personality. Engage in conversations that feel as real as speaking with me in person, as 'ConvoGen' shares a wealth of personal details and knowledge, creating a truly immersive and authentic chatbot experience.",tags:[{name:"T5 model",color:"blue-text-gradient"},{name:"Transformer",color:"green-text-gradient"},{name:"Colab",color:"pink-text-gradient"}],image:nB,source_code_link:"https://colab.research.google.com/drive/1a6LATySYKaS8qqfk_4maSaV4guvTRA-8?usp=sharing",date:"October 2023",link_type:"colab"},{name:"Anon Exchange - Anonymous chatting app",description:"An innovative anonymous chatting app that redefines digital interactions. This project empowers strangers to connect seamlessly, engaging in candid conversations without the constraints of identity. What sets us apart is our commitment to privacy, allowing users to create exclusive private chat rooms for confidential discussions.",tags:[{name:"vitejs",color:"blue-text-gradient"},{name:"supabase",color:"green-text-gradient"},{name:"tailwind CSS",color:"pink-text-gradient"}],image:eB,source_code_link:"https://github.com/bedead/Anon-Exchange-chatting",date:"August 2023",link_type:"github"},{name:"Banana disease classification",description:"Banana disease classification is a project that uses a YOLOv8 deep learning model to detect and identify various diseases affecting banana plants. The project is based on a custom dataset of images of banana leaves with different types of infections. The project aims to provide a fast and accurate diagnosis of banana diseases, which can help farmers and researchers to prevent crop losses and improve banana production.",tags:[{name:"YOLOv8",color:"green-text-gradient"},{name:"Colab",color:"pink-text-gradient"}],image:tB,source_code_link:"https://colab.research.google.com/drive/1TLumA28dCY-9_lzouIJtt2CsCjONGdNy?usp=sharing",date:"August 2023",link_type:"colab"},{name:"PATENT - CLASSIFICATION OF LUNG CANCER USING DEEP LEARNING TECHNIQUES.",description:"Application No - 202341039647 The model is based on a YOLOv8 (Deep learning Neural network architecture) and is trained on the publicly available dataset, which consists of lung CT scans of patients with and without lung cancer.",tags:[{name:"Gradio",color:"blue-text-gradient"},{name:"YOLO",color:"green-text-gradient"},{name:"Roboflow",color:"pink-text-gradient"}],image:$4,source_code_link:"https://github.com/bedead/lung-cancer-classification-yoloV8---gradio.git",date:"June 2023",link_type:"huggingface"},{name:"Face Detection",description:"'FACE-DETECTOR' is a GitHub repository showcasing an OpenCV project for detecting human faces using a cascade classifier. The project utilizes the OpenCV library, which is a popular computer vision library in Python, to detect human faces in images or video streams.",tags:[{name:"Cascade classifier",color:"blue-text-gradient"},{name:"Python",color:"green-text-gradient"},{name:"OpenCV",color:"pink-text-gradient"}],image:q4,source_code_link:"https://github.com/bedead/FACE-DETECTOR.git",date:"Feb 2023",link_type:"github"},{name:"Life Overseas",description:"Life Overseas is a concept website that aims to provide students with valuable resources and information to successfully clear entrance exams for foreign colleges.",tags:[{name:"Flask",color:"blue-text-gradient"},{name:"Python",color:"green-text-gradient"}],image:K4,source_code_link:"https://github.com/bedead/Life-Overseas-webiste.git",date:"Jan 2023",link_type:"github"},{name:"Velox Todo",description:"Velox Todo is a Windows application built using JavaFX and JSON files. It is a task management tool designed to help users organize and prioritize their daily tasks efficiently.",tags:[{name:"Java",color:"blue-text-gradient"},{name:"JavaFX",color:"green-text-gradient"},{name:"JSON",color:"pink-text-gradient"}],image:Q4,source_code_link:"https://github.com/bedead/Velox-Todo-Application.git",date:"Sep 2022",link_type:"github"},{name:"HI",description:"'HI' is a console-based conversational app written in Python. It utilizes various libraries such as pyinstaller, pyjokes, PyDictionary, platform, psutil, requests, getpass, pywhatkit, pyttsx3, speechrecognition, Wikipedia, Pyaudio, speedtest-cli, pyautogui, and py-cpuinfo to provide a wide range of functionalities.",tags:[{name:"Python",color:"blue-text-gradient"},{name:"JSON",color:"green-text-gradient"}],image:Z4,source_code_link:"https://github.com/bedead/HI_2021.12.22.4.git",date:"Mar 2022",link_type:"github"},{name:"Lang go",description:"'Lang Go' is a language translation app that is built using the Kivy and KivyMD frameworks in Python. The app utilizes the TextBlob library for translation capabilities. With 'Lang Go', users can input text in one language and translate it to another language seamlessly.",tags:[{name:"Kivy",color:"blue-text-gradient"},{name:"Kivymd",color:"green-text-gradient"},{name:"textBlob",color:"pink-text-gradient"}],image:J4,source_code_link:"https://github.com/bedead/kivymd-language-translation-app.git",date:"Mar 2022",link_type:"github"},{name:"Shape out",description:"'Shape Out' is a 2D platformer game available on Amazon, created using the Godot game engine. The game features intuitive controls, colorful graphics, and engaging gameplay that requires players to jump, run, and solve puzzles to progress through the levels.",tags:[{name:"Godot engine",color:"blue-text-gradient"},{name:"GD-script",color:"green-text-gradient"}],image:Y4,source_code_link:"https://www.amazon.com/Bedead-Shape-Out-2d-platformer/dp/B0999LHBYN",date:"Aug 2021",link_type:"appstore"}],xB=[{name:"Basics of Machien Learing",image:iB},{name:"C++ Course",image:rB},{name:"Making a Webiste",image:sB},{name:"Java (Basics)",image:oB},{name:"Matlab Onramp",image:aB},{name:"MongoDB Tutorial",image:lB},{name:"Python (Basics)",image:uB},{name:"Responsive Web Design Course",image:cB},{name:"TensorFlow Python",image:fB}],_B=[{name:"Technical Member | CSI ",image:hB},{name:"Technical Member | MSC",image:dB}],SB=[{name:" Google Cloud Digital Leader",image:pB}],wB="/portfolio-react-threejs/assets/logo-white-f51edd31.webp",MB="data:image/webp;base64,UklGRmQCAABXRUJQVlA4WAoAAAAwAAAAOwAAOwAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZBTFBIPwAAAAFHoJBtBOime96H8WhEROhZb4CaSFYrLDAowA0OUIAD/DffJB2TJqL/AoIiF6yAJSV4nAc6xy/oOftIb+woAABWUDggLgAAAJADAJ0BKjwAPAA+bTaYSSQjIqEiCACADYlpAAAQN1NQBXiFuQAA/vucwAAAAAA=",AB="data:image/webp;base64,UklGRvwCAABXRUJQVlA4WAoAAAAwAAAALwAALwAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZBTFBI2wAAAAF3oKCNFDb4bDxgYMkjIgJHTaxUSfkkcBTJtqu8T84gJEpAwheABSQkIVEIq7R9a7KCV9fDr3duIK4j+s/IbSRFteDDwEL9wv2lo6Ml4bmW5Yx2LFuayjlSHbMnX5SSBupihiFD9llir3CgZ1kYDzTJ3kFCU0RWRlZBUkNShavDNYBaiBpKPpEPNHbOBNMwbBnHf5bVaQj8s1jnu6bgL451auP4i+PPNol1WsQ6TerwAhGDOrxvjqoF7FtC0cKefFFKGqiLWcS+ZarsDc4wLgwv+Rt0tC4S948OBwBWUDggKgAAADADAJ0BKjAAMAA+bTaYSKQjIqEjiACADYlpAAAbgb0+DgAA/vucwAAAAA==",ts=n=>({hidden:{y:-50,opacity:0},show:{y:0,opacity:1,transition:{type:"spring",duration:1.25,delay:n}}}),Yo=(n,e,t,i)=>({hidden:{x:n==="left"?100:n==="right"?-100:0,y:n==="up"?100:n==="down"?-100:0,opacity:0},show:{x:0,y:0,opacity:1,transition:{type:e,delay:t,duration:i,ease:"easeOut"}}}),EB=(n,e,t,i)=>({hidden:{x:n==="left"?"-100%":n==="right"?"100%":0,y:n==="up"||n==="down"?"100%":0},show:{x:0,y:0,transition:{type:e,delay:t,duration:i,ease:"easeOut"}}}),bB=(n,e)=>({hidden:{},show:{transition:{staggerChildren:n,delayChildren:e||0}}}),Gs=()=>{const[n,e]=H.useState(""),[t,i]=H.useState(!1),[r,s]=H.useState(!1);return F.jsx("nav",{className:`${jt.paddingX} w-full flex items-center py-5 fixed top-0 z-20 bg-gradient-to-b from-white to-primary`,children:F.jsxs("div",{className:"w-full flex justify-between items-center max-w-7xl mx-auto",children:[F.jsxs(vv,{to:"/",className:"flex items-center gap-2",onClick:()=>{e(""),window.scrollTo(0,0)},children:[F.jsx("img",{src:wB,className:"w-10 h-10 object-contain",alt:"logo"}),F.jsxs("div",{className:" md:block lg:flex ",children:[F.jsx("p",{className:"text-black text-[18px] flex",children:"Satyam Mishra  "}),F.jsx("span",{className:"text-[18px] sm:block hidden",children:"| Bedead"})]})]}),F.jsxs("ul",{className:"list-none hidden sm:flex flex-row md:gap-4 items-center",children:[HE.map(o=>F.jsx("li",{className:o.type=="tools"?"bg-black text-white hover:text-white-100 hover:bg-secondary py-2 px-3 rounded-xl text-[18px] font-medium cursor-pointer":`${n==o.title?"text-black":"text-secondary"} + hover:text-black hover:underline underline-offset-8 text-[18px] font-medium cursor-pointer`,onClick:()=>{e(o.title),o.type=="tools"&&s(!r)},children:o.type=="tools"?o.title:F.jsxs(vv,{to:`/${o.id}`,children:[o.title," "]})},o.id))," "]}),F.jsx("div",{className:`${r?"flex":"hidden"} p-6 bg-gradient-to-r from-[#f6f6f6] to-white absolute + top-60 right-40 sm:top-20 sm:right-5 mx-4 my-2 min-w-[140px] z-10 rounded-xl outline`,children:F.jsxs("ul",{className:"list-none flex justify-end items-start flex-col gap-2",children:[mB.map(o=>F.jsx(sn.li,{variants:Yo("right","spring",.1,.75),className:`${n==o.title?"text-black":"text-secondary"} font-poppins hover:underline underline-offset-8 font-medium cursor-pointer text-[16px] hover:text-black`,onClick:()=>{s(!r),e(o.title),window.open(o.url,"_blank")},children:o.title},o.id))," "]})}),F.jsxs("div",{className:"sm:hidden flex flex-1 justify-end items-center",children:[F.jsx("img",{src:t?AB:MB,alt:"menu",className:"w-[28px] h-[28px] object-contain cursor-pointer",onClick:()=>i(!t)}),F.jsx("div",{className:`${t?"flex":"hidden"} p-6 bg-gradient-to-r from-[#f6f6f6] to-white absolute + top-20 right-0 mx-4 my-2 min-w-[140px] z-10 rounded-xl outline`,children:F.jsxs("ul",{className:"list-none flex justify-end items-start flex-col gap-2",children:[HE.map(o=>F.jsx("li",{className:`${n==o.title?"text-black":"text-secondary"} font-poppins hover:underline underline-offset-8 font-medium cursor-pointer text-[16px] hover:text-black`,onClick:()=>{o.type!="tools"&&i(!t),e(o.title),o.type=="tools"&&s(!r)},children:o.type=="tools"?o.title:F.jsxs(vv,{to:`/${o.id}`,children:[o.title," "]})},o.id))," "]})})]})]})})},js=(n,e)=>function(){return F.jsxs(sn.section,{variants:bB(),initial:"hidden",whileInView:"show",viewport:{once:!0,amount:0},exit:"hidden",className:`${jt.padding} max-w-7xl mx-auto relative z-0`,children:[F.jsx("span",{className:"hash-span",id:e,children:" "}),F.jsx(n,{})]})},TB=()=>{const n="Hi, I'm Satyam";return F.jsxs("section",{className:"relative w-full h-screen mx-auto overflow-hidden",children:[F.jsxs("div",{className:`${jt.paddingX} flex absolute z-10 inset-0 top-[120px] items-start gap-5`,children:[F.jsxs("div",{className:"flex flex-col justify-center items-center mt-5",children:[F.jsx("div",{className:"w-5 h-5 rounded-full bg-[#373737] "}),F.jsx("div",{className:"w-1 sm:h-80 h-40 violet-gradient"})]}),F.jsxs("div",{children:[F.jsx(sn.h1,{variants:ts(0),className:`${jt.heroHeadText} funky-text-outline-2 `,children:n}),F.jsxs(sn.div,{variants:Yo("","",.1,1),children:[F.jsx("p",{className:`${jt.heroSubText} funky-text-outline mt-2 text-black-100`,children:"I'm a computer science student with simple and dumb mind."}),F.jsx("p",{className:`${jt.sectionSubText} mt-2 text-gray-600`,children:"This is just a website showcasing some of my works and experiments. Have a look untill you get bored 🥱"})]})]})]}),F.jsx("div",{className:"absolute z-10 xs:bottom-10 bottom-32 w-full flex justify-center items-center",children:F.jsx("a",{href:"#about",children:F.jsx("div",{className:"w-[35px] h-[64px] rounded-3xl border-4 border-[#373737] flex justify-center items-start p-2 ",children:F.jsx(sn.div,{animate:{y:[0,24,0]},transition:{duration:1.5,repeat:1/0,repeatType:"loop"},className:"w-3 h-3 rounded-full bg-secondary mb-2"})})})})]})},CB=js(TB,"Hero");var PB=Object.defineProperty,LB=Object.defineProperties,RB=Object.getOwnPropertyDescriptors,WE=Object.getOwnPropertySymbols,IB=Object.prototype.hasOwnProperty,DB=Object.prototype.propertyIsEnumerable,GE=(n,e,t)=>e in n?PB(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,bc=(n,e)=>{for(var t in e||(e={}))IB.call(e,t)&&GE(n,t,e[t]);if(WE)for(var t of WE(e))DB.call(e,t)&&GE(n,t,e[t]);return n},Tc=(n,e)=>LB(n,RB(e)),xg=class extends H.Component{constructor(n){super(n),this.ref=nh.createRef(),this.state={style:{}};const e={reverse:!1,max:35,perspective:1e3,easing:"cubic-bezier(.03,.98,.52,.99)",scale:"1.1",speed:"1000",transition:!0,axis:null,reset:!0};this.width=null,this.height=null,this.left=null,this.top=null,this.transitionTimeout=null,this.updateCall=null,this.element=null,this.settings=Object.assign({},e,this.props.options),this.reverse=this.settings.reverse?-1:1,this.onMouseEnter=this.onMouseEnter.bind(this,this.props.onMouseEnter),this.onMouseMove=this.onMouseMove.bind(this,this.props.onMouseMove),this.onMouseLeave=this.onMouseLeave.bind(this,this.props.onMouseLeave)}componentDidMount(){this.element=this.ref.current,setTimeout(()=>{this.element.parentElement.querySelector(":hover")===this.element&&this.onMouseEnter()},0)}componentWillUnmount(){clearTimeout(this.transitionTimeout),cancelAnimationFrame(this.updateCall)}onMouseEnter(n=()=>{},e){return this.updateElementPosition(),this.setState(Object.assign({},this.state,{style:Tc(bc({},this.state.style),{willChange:"transform"})})),this.setTransition(),n(e)}reset(){window.requestAnimationFrame(()=>{this.setState(Object.assign({},this.state,{style:Tc(bc({},this.state.style),{transform:`perspective(${this.settings.perspective}px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)`})}))})}onMouseMove(n=()=>{},e){return e.persist(),this.updateCall!==null&&window.cancelAnimationFrame(this.updateCall),this.event=e,this.updateCall=requestAnimationFrame(this.update.bind(this,e)),n(e)}setTransition(){clearTimeout(this.transitionTimeout),this.setState(Object.assign({},this.state,{style:Tc(bc({},this.state.style),{transition:`${this.settings.speed}ms ${this.settings.easing}`})})),this.transitionTimeout=setTimeout(()=>{this.setState(Object.assign({},this.state,{style:Tc(bc({},this.state.style),{transition:""})}))},this.settings.speed)}onMouseLeave(n=()=>{},e){return this.setTransition(),this.settings.reset&&this.reset(),n(e)}getValues(n){const e=(n.nativeEvent.clientX-this.left)/this.width,t=(n.nativeEvent.clientY-this.top)/this.height,i=Math.min(Math.max(e,0),1),r=Math.min(Math.max(t,0),1),s=(this.reverse*(this.settings.max/2-i*this.settings.max)).toFixed(2),o=(this.reverse*(r*this.settings.max-this.settings.max/2)).toFixed(2),a=i*100,l=r*100;return{tiltX:s,tiltY:o,percentageX:a,percentageY:l}}updateElementPosition(){const n=this.element.getBoundingClientRect();this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,this.left=n.left,this.top=n.top}update(n){const e=this.getValues(n);this.setState(Object.assign({},this.state,{style:Tc(bc({},this.state.style),{transform:`perspective(${this.settings.perspective}px) rotateX(${this.settings.axis==="x"?0:e.tiltY}deg) rotateY(${this.settings.axis==="y"?0:e.tiltX}deg) scale3d(${this.settings.scale}, ${this.settings.scale}, ${this.settings.scale})`})})),this.updateCall=null}render(){const n=Object.assign({},this.props.style,this.state.style);return F.jsx("div",{style:n,ref:this.ref,className:this.props.className,onMouseEnter:this.onMouseEnter,onMouseMove:this.onMouseMove,onMouseLeave:this.onMouseLeave,children:this.props.children})}};const NB=({index:n,title:e,icon:t})=>F.jsx(xg,{className:"xs:w-[250px] w-full ",children:F.jsx(sn.div,{variants:Yo("right","spring",.5*n,.75),className:" w-full green-pink-gradient p-[1px] rounded-[20px] shadow-[#fcd4d4] shadow-card ",children:F.jsxs("div",{options:{max:45,scale:1,speed:450},className:"bg-primary rounded-[20px] py-5 px-12 min-h-[280px] flex justify-evenly items-center flex-col ",children:[F.jsx("img",{src:t,alt:e,className:"w-16 h-16 object-contain"}),F.jsxs("h3",{className:"text-black text-[20px] font-bold text-center ",children:[e," "]})]})})}),kB=()=>F.jsxs(F.Fragment,{children:[F.jsxs(sn.div,{variants:ts(0),children:[F.jsx("h2",{className:`${jt.sectionHeadText} text-center`,children:"Overview."}),F.jsx("p",{className:`${jt.sectionSubText} text-center`,children:"Introduction?"})]}),F.jsx(sn.p,{variants:Yo("","",.1,1),className:"mt-4 text-secondary text-center text-[17px] max-w-full leading-[30px] ",children:"I am a full stack web developer, graphic designer, and machine learning enthusiast. I have experience in creating dynamic and responsive websites using HTML, CSS, JavaScript, and other frameworks. I also have a passion for designing graphics that are eye-catching and appealing. I am always eager to learn new skills and technologies in the field of machine learning and deep learning. I have completed several projects and courses on various topics such as computer vision, and natural language processing."}),F.jsxs("div",{className:"mt-20 flex flex-wrap justify-center gap-10",children:[gB.map((n,e)=>F.jsx(NB,{index:e,...n},n.title))," "]})]}),OB=js(kB,"about");var _g={},T3={exports:{}},UB="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",zB=UB,FB=zB;function C3(){}function P3(){}P3.resetWarningCache=C3;var BB=function(){function n(i,r,s,o,a,l){if(l!==FB){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}n.isRequired=n;function e(){return n}var t={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:e,element:n,elementType:n,instanceOf:e,node:n,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:P3,resetWarningCache:C3};return t.PropTypes=t,t};T3.exports=BB();var L3=T3.exports,R3={exports:{}};/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/(function(n){(function(){var e={}.hasOwnProperty;function t(){for(var i=[],r=0;r(typeof window=="object"&&document.documentElement.style.setProperty("--line-color",i),VB.default.createElement("div",{className:(0,HB.default)(e,"vertical-timeline",{"vertical-timeline--animate":n,"vertical-timeline--two-columns":t==="2-columns","vertical-timeline--one-column-left":t==="1-column"||t==="1-column-left","vertical-timeline--one-column-right":t==="1-column-right"})},r));D3.propTypes={children:io.default.oneOfType([io.default.arrayOf(io.default.node),io.default.node]).isRequired,className:io.default.string,animate:io.default.bool,layout:io.default.oneOf(["1-column-left","1-column","2-columns","1-column-right"]),lineColor:io.default.string};var WB=D3;_g.default=WB;var Sg={};function Rx(){return Rx=Object.assign||function(n){for(var e=1;e=0)&&(t[r]=n[r]);return t}var Dx=new Map,Zd=new WeakMap,jE=0,N3=void 0;function XB(n){N3=n}function YB(n){return n?(Zd.has(n)||(jE+=1,Zd.set(n,jE.toString())),Zd.get(n)):"0"}function qB(n){return Object.keys(n).sort().filter(function(e){return n[e]!==void 0}).map(function(e){return e+"_"+(e==="root"?YB(n.root):n[e])}).toString()}function ZB(n){var e=qB(n),t=Dx.get(e);if(!t){var i=new Map,r,s=new IntersectionObserver(function(o){o.forEach(function(a){var l,f=a.isIntersecting&&r.some(function(h){return a.intersectionRatio>=h});n.trackVisibility&&typeof a.isVisible>"u"&&(a.isVisible=f),(l=i.get(a.target))==null||l.forEach(function(h){h(f,a)})})},n);r=s.thresholds||(Array.isArray(n.threshold)?n.threshold:[n.threshold||0]),t={id:e,observer:s,elements:i},Dx.set(e,t)}return t}function G1(n,e,t,i){if(t===void 0&&(t={}),i===void 0&&(i=N3),typeof window.IntersectionObserver>"u"&&i!==void 0){var r=n.getBoundingClientRect();return e(i,{isIntersecting:i,target:n,intersectionRatio:typeof t.threshold=="number"?t.threshold:0,time:0,boundingClientRect:r,intersectionRect:r,rootBounds:r}),function(){}}var s=ZB(t),o=s.id,a=s.observer,l=s.elements,f=l.get(n)||[];return l.has(n)||l.set(n,f),f.push(e),a.observe(n),function(){f.splice(f.indexOf(e),1),f.length===0&&(l.delete(n),a.unobserve(n)),l.size===0&&(a.disconnect(),Dx.delete(o))}}var JB=["children","as","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView","fallbackInView"];function XE(n){return typeof n.children!="function"}var Vm=function(n){GB(e,n);function e(i){var r;return r=n.call(this,i)||this,r.node=null,r._unobserveCb=null,r.handleNode=function(s){r.node&&(r.unobserve(),!s&&!r.props.triggerOnce&&!r.props.skip&&r.setState({inView:!!r.props.initialInView,entry:void 0})),r.node=s||null,r.observeNode()},r.handleChange=function(s,o){s&&r.props.triggerOnce&&r.unobserve(),XE(r.props)||r.setState({inView:s,entry:o}),r.props.onChange&&r.props.onChange(s,o)},r.state={inView:!!i.initialInView,entry:void 0},r}var t=e.prototype;return t.componentDidUpdate=function(r){(r.rootMargin!==this.props.rootMargin||r.root!==this.props.root||r.threshold!==this.props.threshold||r.skip!==this.props.skip||r.trackVisibility!==this.props.trackVisibility||r.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())},t.componentWillUnmount=function(){this.unobserve(),this.node=null},t.observeNode=function(){if(!(!this.node||this.props.skip)){var r=this.props,s=r.threshold,o=r.root,a=r.rootMargin,l=r.trackVisibility,f=r.delay,h=r.fallbackInView;this._unobserveCb=G1(this.node,this.handleChange,{threshold:s,root:o,rootMargin:a,trackVisibility:l,delay:f},h)}},t.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},t.render=function(){if(!XE(this.props)){var r=this.state,s=r.inView,o=r.entry;return this.props.children({inView:s,entry:o,ref:this.handleNode})}var a=this.props,l=a.children,f=a.as,h=jB(a,JB);return H.createElement(f||"div",Rx({ref:this.handleNode},h),l)},e}(H.Component);Vm.displayName="InView";Vm.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1};function KB(n){var e=n===void 0?{}:n,t=e.threshold,i=e.delay,r=e.trackVisibility,s=e.rootMargin,o=e.root,a=e.triggerOnce,l=e.skip,f=e.initialInView,h=e.fallbackInView,d=H.useRef(),p=H.useState({inView:!!f}),v=p[0],y=p[1],_=H.useCallback(function(m){d.current!==void 0&&(d.current(),d.current=void 0),!l&&m&&(d.current=G1(m,function(S,w){y({inView:S,entry:w}),w.isIntersecting&&a&&d.current&&(d.current(),d.current=void 0)},{root:o,rootMargin:s,threshold:t,trackVisibility:r,delay:i},h))},[Array.isArray(t)?t.toString():t,o,s,a,l,r,h,i]);H.useEffect(function(){!d.current&&v.entry&&!a&&!l&&y({inView:!!f})});var M=[_,v.inView,v.entry];return M.ref=M[0],M.inView=M[1],M.entry=M[2],M}const QB=Object.freeze(Object.defineProperty({__proto__:null,InView:Vm,default:Vm,defaultFallbackInView:XB,observe:G1,useInView:KB},Symbol.toStringTag,{value:"Module"})),$B=iD(QB);Sg.__esModule=!0;Sg.default=void 0;var ro=j1(H),Jt=j1(L3),Jd=j1(I3),e5=$B;function j1(n){return n&&n.__esModule?n:{default:n}}const k3=({children:n="",className:e="",contentArrowStyle:t=null,contentStyle:i=null,date:r="",dateClassName:s="",icon:o=null,iconClassName:a="",iconOnClick:l=null,onTimelineElementClick:f=null,iconStyle:h=null,id:d="",position:p="",style:v=null,textClassName:y="",intersectionObserverProps:_={rootMargin:"0px 0px -40px 0px",triggerOnce:!0},visible:M=!1})=>ro.default.createElement(e5.InView,_,({inView:m,ref:S})=>ro.default.createElement("div",{ref:S,id:d,className:(0,Jd.default)(e,"vertical-timeline-element",{"vertical-timeline-element--left":p==="left","vertical-timeline-element--right":p==="right","vertical-timeline-element--no-children":n===""}),style:v},ro.default.createElement(ro.default.Fragment,null,ro.default.createElement("span",{style:h,onClick:l,className:(0,Jd.default)(a,"vertical-timeline-element-icon",{"bounce-in":m||M,"is-hidden":!(m||M)})},o),ro.default.createElement("div",{style:i,onClick:f,className:(0,Jd.default)(y,"vertical-timeline-element-content",{"bounce-in":m||M,"is-hidden":!(m||M)})},ro.default.createElement("div",{style:t,className:"vertical-timeline-element-content-arrow"}),n,ro.default.createElement("span",{className:(0,Jd.default)(s,"vertical-timeline-element-date")},r)))));k3.propTypes={children:Jt.default.oneOfType([Jt.default.arrayOf(Jt.default.node),Jt.default.node]),className:Jt.default.string,contentArrowStyle:Jt.default.shape({}),contentStyle:Jt.default.shape({}),date:Jt.default.node,dateClassName:Jt.default.string,icon:Jt.default.element,iconClassName:Jt.default.string,iconStyle:Jt.default.shape({}),iconOnClick:Jt.default.func,onTimelineElementClick:Jt.default.func,id:Jt.default.string,position:Jt.default.string,style:Jt.default.shape({}),textClassName:Jt.default.string,visible:Jt.default.bool,intersectionObserverProps:Jt.default.shape({root:Jt.default.object,rootMargin:Jt.default.string,threshold:Jt.default.number,triggerOnce:Jt.default.bool})};var t5=k3;Sg.default=t5;var O3={VerticalTimeline:_g.default,VerticalTimelineElement:Sg.default};const n5=({experience:n})=>F.jsxs(O3.VerticalTimelineElement,{contentStyle:{background:"black",color:"black"},contentArrowStyle:{borderRight:"7px solid black"},date:n.date,iconStyle:{background:n.iconBg},icon:F.jsx("div",{className:"flex justify-center items-center w-full h-full",children:F.jsx("img",{src:n.icon,alt:n.company_name,className:"w-[75%] h-[75%] object-contain"})}),children:[F.jsxs("div",{children:[F.jsx("h3",{className:"text-[#fcd4d4] text-[24px] font-bold",children:n.title}),F.jsxs("p",{className:"text-white text-[16px] font-semibold",style:{margin:0},children:[n.company_name," "]})]}),F.jsxs("ul",{className:"mt-5 list-disc ml-5 space-y-2",children:[n.points.map((e,t)=>F.jsxs("li",{className:"text-white-100 text-[14px] pl-1 tracking-wider",children:[e," "]},`experience-point-${t}`))," "]})]}),i5=()=>F.jsxs(F.Fragment,{children:[F.jsxs(sn.div,{variants:ts(),children:[F.jsx("h2",{className:`${jt.sectionHeadText} text-center`,children:"Work Experience."}),F.jsx("p",{className:`${jt.sectionSubText} text-center`,children:"Where I have worked so far?"})]}),F.jsx("div",{className:"mt-20 flex flex-col",children:F.jsxs(O3.VerticalTimeline,{lineColor:"#373737",children:[vB.map((n,e)=>F.jsx(n5,{experience:n},`experience-${e}`))," "]})})]}),r5=js(i5,"work"),s5=()=>F.jsx("div",{className:"h-screen flex justify-center items-center",children:F.jsx("img",{src:Hu,className:"w-[150px] h-[117px] "})});function o5(){return F.jsx(H.Suspense,{fallback:s5(),children:F.jsxs("div",{className:" z-0 bg-white",children:[F.jsx(Gs,{}),F.jsxs("div",{className:"bg-gradient-to-b from-white to-primary",children:[F.jsx(CB,{}),F.jsx(OB,{}),F.jsx(r5,{})]})]})})}const Lv=({index:n,name:e,image:t})=>F.jsx(sn.div,{children:F.jsx("div",{children:F.jsx(sn.div,{variants:Yo("right","spring",.5*n,.75),children:F.jsxs(xg,{options:{max:45,scale:1,speed:450},className:"bg-white shadow-[#fcd4d4] shadow-card p-5 rounded-2xl sm:w-[360px] w-full",children:[F.jsx("div",{className:"relative w-full h-[230px]",children:F.jsx("img",{src:t,placeholder:`${e}`,loading:"lazy",alt:"certificate image",className:"w-full h-full object-cover rounded-2xl"})}),F.jsx("h3",{className:"mt-5 text-black font-bold text-[24px] text-center",children:e})]})})})}),a5=()=>F.jsxs("div",{className:"-m-5 md:-m-10",children:[F.jsxs(sn.div,{variants:ts(0),children:[F.jsx("h2",{className:`${jt.sectionHeadText} text-center`,children:"Certificates."}),F.jsx("p",{className:`${jt.sectionSubText} text-center`,children:"Professional Certificates"})]}),F.jsxs("div",{className:"my-20 flex flex-wrap justify-center mx-auto space-x-5 gap-5 w-full",children:[SB.map((n,e)=>F.jsx(Lv,{index:e,...n},`project-${e}`))," "]}),F.jsx(sn.p,{variants:ts(0),className:`${jt.sectionSubText} text-center`,children:"Work Certificates"}),F.jsxs("div",{className:"my-20 flex flex-wrap justify-center mx-auto space-x-5 gap-5 w-full",children:[_B.map((n,e)=>F.jsx(Lv,{index:e,...n},`project-${e}`))," "]}),F.jsx(sn.p,{variants:ts(0),className:`${jt.sectionSubText} text-center`,children:"Course Certificates"}),F.jsxs("div",{className:"my-20 flex flex-wrap justify-center mx-auto space-x-5 gap-5 w-full",children:[xB.map((n,e)=>F.jsx(Lv,{index:e,...n},`project-${e}`))," "]})]}),l5=js(a5,"CertificateLists");function u5(){return F.jsxs("div",{className:"bg-white",children:[F.jsx(Gs,{}),F.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:F.jsx(l5,{})})]})}const c5="/portfolio-react-threejs/assets/cover_img-73d442a3.png",YE="/portfolio-react-threejs/assets/resume-a68436d4.pdf",f5=()=>{const[n,e]=H.useState(!1),t=()=>e(!0),i=()=>e(!1),r=()=>{const s=document.createElement("a");s.href=YE,s.download="Satyam_Mishra_Resume",s.click()};return F.jsxs("div",{className:"-m-5 md:-m-10 max-w-screen-xl mx-auto my-10 space-y-10 max",children:[F.jsxs(sn.div,{variants:ts(0),children:[F.jsx("h2",{className:`${jt.sectionHeadText} text-center`,children:"Resume."}),F.jsx("p",{className:`${jt.sectionSubText} text-center`,children:"Check out my beginner resume🤣"})]}),F.jsx(sn.div,{variants:Yo("right","spring",.5*0,.75),className:"md:flex justify-center items-center",children:F.jsxs(xg,{options:{max:45,scale:1,speed:450},className:"group bg-white shadow-[#fcd4d4] shadow-card rounded-2xl mx-auto w-[90%] md:min-w-1/3 md:max-w-3xl h-full",children:[F.jsx("div",{className:"group-hover:opacity-100 relative w-full h-full mb-5",children:F.jsx("img",{src:c5,loading:"lazy",alt:"Resume cover image",className:"w-full h-full object-cover rounded-2xl"})}),F.jsxs("div",{className:"group-hover:opacity-100 flex items-center space-x-5 md:space-y-5 justify-center md:absolute md:top-10 md:-right-10 md:bottom-0 md:flex md:flex-col md:items-center md:justify-center opacity-0 hover:opacity-100 transition-opacity duration-300",children:[F.jsx("button",{className:"bg-blue-600 text-white hover:text-white-100 hover:bg-blue-800 py-2 px-3 rounded-xl text-[15px] font-medium cursor-pointer mb-2 md:mb-0",onClick:r,children:"Download"}),F.jsx("button",{className:"bg-green-600 text-white hover:text-white-100 hover:bg-green-800 py-2 px-3 rounded-xl text-[15px] font-medium cursor-pointer mb-2 md:mb-0",onClick:t,children:"View"})]})]})}),n&&F.jsx("div",{className:"fixed inset-0 z-50 overflow-auto -top-10 bg-black bg-opacity-60 flex items-center justify-center",children:F.jsxs("div",{className:"bg-white p-2 rounded-2xl max-w-screen-lg w-[70%] relative",children:[F.jsx("button",{className:"absolute -top-12 right-0 md:top-2 md:-right-20 bg-black hover:bg-gray-800 py-2 px-3 rounded-xl text-white hover:text-gray-200",onClick:i,children:"Close"}),F.jsx("iframe",{title:"PDF Viewer",src:YE,className:"w-full h-[400px]"})]})})]})},h5=js(f5,"ResumeComp");function d5(){return F.jsxs("div",{className:"bg-white",children:[F.jsx(Gs,{}),F.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:F.jsx(h5,{})})]})}function p5(){return F.jsxs(sn.div,{variants:ts(0),className:"h-screen ",children:[F.jsx("h1",{className:`${jt.sectionHeadText} text-center`,children:"Coming soon"}),F.jsx("p",{className:`${jt.heroSubText} mt-2 text-black-100 text-center`,children:"More things are on the way ✌️."})]})}const U3=js(p5,"ComingSoon"),m5=()=>F.jsx("div",{className:"h-screen flex justify-center items-center",children:F.jsx("img",{src:Hu,className:"w-[150px] h-[117px] "})});function g5(){return F.jsx(H.Suspense,{fallback:m5(),children:F.jsxs("div",{className:"bg-white",children:[F.jsx(Gs,{}),F.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:F.jsx(U3,{})})]})})}const Of={_origin:"https://api.emailjs.com"},v5=(n,e="https://api.emailjs.com")=>{Of._userID=n,Of._origin=e},z3=(n,e,t)=>{if(!n)throw"The public key is required. Visit https://dashboard.emailjs.com/admin/account";if(!e)throw"The service ID is required. Visit https://dashboard.emailjs.com/admin";if(!t)throw"The template ID is required. Visit https://dashboard.emailjs.com/admin/templates";return!0};class qE{constructor(e){this.status=e?e.status:0,this.text=e?e.responseText:"Network Error"}}const F3=(n,e,t={})=>new Promise((i,r)=>{const s=new XMLHttpRequest;s.addEventListener("load",({target:o})=>{const a=new qE(o);a.status===200||a.text==="OK"?i(a):r(a)}),s.addEventListener("error",({target:o})=>{r(new qE(o))}),s.open("POST",Of._origin+n,!0),Object.keys(t).forEach(o=>{s.setRequestHeader(o,t[o])}),s.send(e)}),y5=(n,e,t,i)=>{const r=i||Of._userID;return z3(r,n,e),F3("/api/v1.0/email/send",JSON.stringify({lib_version:"3.11.0",user_id:r,service_id:n,template_id:e,template_params:t}),{"Content-type":"application/json"})},x5=n=>{let e;if(typeof n=="string"?e=document.querySelector(n):e=n,!e||e.nodeName!=="FORM")throw"The 3rd parameter is expected to be the HTML form element or the style selector of form";return e},_5=(n,e,t,i)=>{const r=i||Of._userID,s=x5(t);z3(r,n,e);const o=new FormData(s);return o.append("lib_version","3.11.0"),o.append("service_id",n),o.append("template_id",e),o.append("user_id",r),F3("/api/v1.0/email/send-form",o)},S5={init:v5,send:y5,sendForm:_5},w5=()=>{const n=H.useRef(),[e,t]=H.useState({name:"",email:"",message:""}),[i,r]=H.useState(!1),s=a=>{const{target:l}=a,{name:f,value:h}=l;t({...e,[f]:h})},o=a=>{a.preventDefault(),r(!0),S5.send("service_w2nrv74","template_hmf109b",{from_name:e.name,to_name:"Satyam Mishra",from_email:e.email,to_email:"satyammishra9050@gmail.com",message:e.message},"Tlnn1O7PC8WlYPRT7").then(()=>{r(!1),alert("Thank you. I will get back to you as soon as possible."),t({name:"",email:"",message:""})},l=>{r(!1),console.error(l),alert("Ahh, something went wrong. Please try again.")})};return F.jsxs("div",{className:"xl:mt-6 flex xl:flex-row flex-col-reverse gap-10 overflow-hidden md:w-[80%] lg:w-[70%] ",children:[F.jsxs(sn.div,{variants:EB("left","tween",.2,1),className:"flex-[0.75] bg-white p-8 shadow-[#fcd4d4] shadow-card rounded-2xl",children:[F.jsx("p",{className:jt.sectionSubText,children:"I am open to work"}),F.jsx("h3",{className:jt.sectionHeadText,children:"Get In Touch."}),F.jsxs("form",{ref:n,onSubmit:o,className:"mt-12 flex flex-col gap-8",children:[F.jsxs("label",{className:"flex flex-col",children:[F.jsx("span",{className:"text-black font-medium mb-4",children:"Your Name"}),F.jsx("input",{type:"text",name:"name",value:e.name,onChange:s,placeholder:"What's your good name?",className:"bg-secondary py-4 px-6 placeholder:text-white-100 text-white rounded-lg outline-none border-none font-medium"})]}),F.jsxs("label",{className:"flex flex-col",children:[F.jsx("span",{className:"text-black font-medium mb-4",children:"Your email"}),F.jsx("input",{type:"email",name:"email",value:e.email,onChange:s,placeholder:"What's your web address?",className:"bg-secondary py-4 px-6 placeholder:text-white-100 text-white rounded-lg outline-none border-none font-medium"})]}),F.jsxs("label",{className:"flex flex-col",children:[F.jsx("span",{className:"text-black font-medium mb-4",children:"Your Message"}),F.jsx("textarea",{rows:7,name:"message",value:e.message,onChange:s,placeholder:"What you want to say?",className:"bg-secondary py-4 px-6 placeholder:text-white-100 text-white rounded-lg outline-none border-none font-medium"})]}),F.jsxs("button",{type:"submit",className:"bg-black hover:bg-slate-600 py-3 px-8 rounded-xl outline-none w-fit text-white font-bold shadow-md shadow-primary",children:[i?"Sending...":"Send"," "]})]})]})," "]})},M5=js(w5,"contact");function A5(){return F.jsxs("div",{className:"bg-white",children:[F.jsx(Gs,{}),F.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:F.jsx(M5,{})})]})}const ZE="data:image/webp;base64,UklGRggMAABXRUJQVlA4WAoAAAAwAAAA7wAA7wAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZBTFBIggkAAAGwBgC0MTfWGWamsV3bbVDbdvu29tp23dRuk7VRu12btW0H89Kkk0wwcx6Ce8+959tf721ETAD87f//pevfqP+jaW9v+fHERZfrHuI9l+viiR+3vJX2aP9G/n81nMlTln+biVLvfLN8SrLzr0HMgLSfPUi05ETG+OrGztE9bT+Sv5AxwGHQQibsdKOi7h3jgw2X/5jtHlTas220v5FqlJaDGrybkWSQnNMPoDb3T3MYn8jnb6BWM9PijE3V9ALUbsHaROMSlVaIWi7KiDMmYUsKUNsFi0ONh3V6Jmo953Grweh5ArV/rLuRCMtAFtdHGoYRmcika7oxiNuDjO6ONQCDs5DVrEHcOVcgux/4s1b/JDJ8vC5jA/6JLOcN48oy34dM++ZaWPLfhozvCWQoZh+yfjienUaXkflLDZlJykb2Xa1Z6XAXDWB+V0a65KMhdPdio6cHDaKnBxNt89EwujuxkJqHBvJuCgONXGgosxtqL+YyGsxL0Zpz/o6Gc7+/1izb0IBuMetsPhrS2Rob5DMmvmHaqpuLBjWvgab8T6JhPVZFT2+ggV2rpcEoPbuWf2i9HtNW/1akH8+vq6Z2rxvqXztbmG+AhuKy5A2CcgMGvOnSSU5Gf38od6gwzIzRzx6U/g1U2G/UL7r4abgdKvy9MNypnXEof2DFAKDD7zr4tR1Udog4HK2ZqCx5LmulwDTinGrnhpug0rZccXci9PIJyt8IIh1LvCp5F/qByC3i8H2t9ESCrwgB6HpVnUudQOwLErCLRqwnKIwWBBE/qvJtGAgeIOOIRR+PIMVWosDv/cpk7duw+JH+bVrWjAu1WEMTaia1HfDY0s0HXZV52w6im8nAB7QRlk0iShiYVpSXtWtGv0gQHjtw9heu8paA+GgpmSG6WIIkg8SBaQUiurdPrwnyTXUf2lOIiEtAYogUXKCJuAIagRLAvC69nxPI+g9+K90kI0iOO0YPa5Cmvwy9BsrB5Vqo5jEWAZIKE3SQjkTjuUiQhKs1EFlApTkXSbLcEerNQKo9uegjC19VzplJZgwXE6Tddqg2Dcm+ysUMaThFtQN0PuTiM3l/KpaEdPdxcUgetlArnVCeiQezm8BqpfzvEsI6PDRAgrlVVBqLlMfwMJECjlJpB6kVPKwjsVmhEA+pP3g4SKIwUJ2JSLo0lINwLwkco85OWjiYg+FIc6syDjex+RwsJ5JvV6UX0r4czUH1TBrYVZXltAqSgMX2RTQWqnKa1jBg8iEaxxSJQ9IZwOYGEhijxkhS5wP5iLhFYogayyh5WwOjA0ksVmMfpXRgdTuF35RwFhNyRfJS20OgyKFCChJ+HJhdQACTVJhK6LaDm7B8AhNVWEHoWWB3GYElKnxHJzeYn4QieV+pcIfOCmD4c3k3FfBHukkcDZDnq0KvMZ0TwLH1tjRsQK8/nddYgnXy+tJ7lE5bnobLe4heGpk8G0/hXmnz6L1FZjcwfUjaG/S2kpnP1fvSNtH7icwErl6S9j29U2RacTVE2nF618jEcZUk7Qq9TDIBXNWVdoteLhWvmatYaS56BVTuAdeB0tz0SqmUsBUlrZSelwr6cVVDPx4yYVw1kVZIL49MDa7aScujl0OmC1djpGXTu05mGlevS7tC7ziZNK4+lHaE3s9ktnO1T9qP9HaQyTHzFFgibQe998hgU556o/S36M2l8whP8+XNpPcQnb08HZX3AL2BdEpiOGqK8gfQa0EHn+BoIYFG9AJ8dA4yZLsmz+ekBzfoYE9+JqH8a6DgN4R+ZMdylsDXKqwhhJ24GYMEF6owjdJhGy9VLlIYqUISJXyGl2VIsaYK9iJK7pqcJJdSyDGpAAcp4c92PoJOIsUvQcmVpHANG6YNSHKuGsNp4WQuXkWaw9SI9tEq6sfDZC+N0nA14CQt9PTlYIIXaf4Kii4lhp6++hvvRaKvqtKTGpY8rznT816kmqyKXz41xDftOgvYhGQzzarAVnr4Sy19NT+OdD8AZccogPceM+vJNqMYCd+nTlChAog/1NdRymGk7A5SB7Ypgd711XRTLcOLpD8AhUepgeieF66T+DXFSLy7Sg6XIoieD5roouUHxUj9mkUlWKMMou+roQ71Asb8igrOAaVTFELEux/0tankHLa+AFX01VEL/lQKEXM+mVJNjboPbcpDRX8Gxcep9t/n1o1vbKVkbznlnSuo8CjV/G5r4L8L/lj3QM/adll+9fs8+uaBIlT7vEU1mKGJsksvv2oRZ3n9mg91+CAoH54v6tLQyLovnqHmug+kjs7VwR2nerBEVFcAAPOQk6QO1QTJNQ5r4BXQYJxH0MD/ArA9U0jnS3+QHvilcvlhOoAVgq7VKwOgySkqOx1A0LFXtcWgxah8MXh3aFkQ8iWN35xA0rlfLVeYHmCWIPQ+WBbYN1G4GAVEq2Yq9SRoMuiOIPSNKAusW+QVpwLZziUKnbPrAqaJQndSWVBln7TngPALCg0FbZoPiMKrQWVB7FVJf5op2Y4q8wNotJ1PFC4rB5rlSSlNAtLtfIp4k3UCbworaVYODPPJeBOIv6XIatBq6E1RuK08mCPBk0gttlCJCwF6geHCfA3LM70jbiWQT1fB1wV0u14UvlMemJeJ8taiV7tUgTWg3fAbou4FlAcw8IKY7aDg5/QuBugHevoE4YSKgLn7gq9PuYoQ81xXLxz7dfs7aQ/3behQoSc5XxfQ8VJRX1dIn9Y71OaDlm0/C/Im6gjWEvvGoidIzBKDz2upE60rkaDrXqViTmjJXkjJkwL6fkYMpuoIfqU0FXT+rph0LS0j9CZo3e9HIe5IHY2ms9umNwg9LgJn66g9md/8QffxV0S4a2moPpWzUaD/RlkC8EuzfiKIXE0EDlu4BOBy/ZhpZDcAHlNyBeBck26ARFYScNnKJQA3BvNzoyHw2ey2ALw52sTMhZrAab2rAhBPPhDKyYk44DX+sAjEkh9mjmySGMzCvgjgNugLIUJ1tT0Q+LVlMOabYwaWpxdxdW84cN3+Fk8XmwLfMV9z9FUEcG56vJibwufNwHzbc7wcaAT8O9O8fJSm2cEQdjvPxdk2YBQdMzwcuGc4wEA2+Ep7vk8TwGB2P6a3Qx3BeNoeuamvGw9YwJD6Tb+lpyuPO8GwBjx1TT/nJtvA0NonHNfLsbFWMLymLuuLK2RVxYaI7vfagUGOfelUBaJVqYqHHw4BI5266nZZjVSJTwXDbU6acRoR/6GKUa85ff2Cv1Z/+///8wRWUDggkAAAAFAPAJ0BKvAA8AA+bTaZSaQjIqEgKACADYlpbuF2sRtACewD32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D31gAAP7/1gAAAAAAAAAAAA==",E5="/portfolio-react-threejs/assets/appstore-0b8f390b.png",b5="/portfolio-react-threejs/assets/colab-9e4861eb.png",T5="/portfolio-react-threejs/assets/huggingface-720eadc9.png",C5=({index:n,name:e,description:t,tags:i,image:r,source_code_link:s,date:o,link_type:a})=>F.jsx(sn.div,{children:F.jsx("div",{children:F.jsx(sn.div,{variants:Yo("right","spring",.5*n,.75),children:F.jsxs(xg,{options:{max:45,scale:1,speed:450},className:"bg-white shadow-[#fcd4d4] shadow-card p-5 rounded-2xl sm:w-[360px] w-full",children:[F.jsxs("div",{className:"relative w-full h-[230px]",children:[F.jsx("img",{src:r,alt:"project_image",className:"w-full h-full object-cover rounded-2xl"}),F.jsx("div",{className:"absolute inset-0 flex justify-end m-3 card-img_hover",children:F.jsx("div",{onClick:()=>window.open(s,"_blank"),className:"white-gradient w-10 h-10 rounded-full flex justify-center items-center cursor-pointer",children:F.jsx("img",{src:a=="github"?ZE:a=="colab"?b5:a=="huggingface"?T5:a=="appstore"?E5:ZE,alt:"github repositories for projects",className:"w-1/2 h-1/2 object-contain"})})})]}),F.jsxs("div",{className:"mt-5",children:[F.jsx("h3",{className:"text-black font-bold text-[24px]",children:e}),F.jsx("p",{className:"mt-2 text-secondary text-[14px]",children:t})]}),F.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[i.map(l=>F.jsxs("p",{className:`text-[14px] ${l.color}`,children:["#",l.name," "]},`${e}-${l.name}`))," "]}),F.jsx("p",{children:o})]})})})}),P5=()=>F.jsxs("div",{className:"-m-5 md:-m-10 ",children:[F.jsxs(sn.div,{variants:ts(0),children:[F.jsx("h2",{className:`${jt.sectionHeadText} text-center`,children:"Projects."}),F.jsx("p",{className:`${jt.sectionSubText} text-center`,children:"My works?"})]}),F.jsx(sn.div,{variants:Yo("","",.1,1),className:"w-full flex",children:F.jsx("p",{className:"mt-3 text-secondary text-center text-[17px] max-w-full leading-[30px]",children:"The projects that are listed below provide examples of my work in the real world, showcasing my abilities and experience. Each project has a brief description, links to code repositories, and live demonstrations. It exhibits my ability to work with various technologies, manage projects efficiently, and solve complex problems."})}),F.jsxs("div",{className:" mt-20 grid md:grid-cols-2 lg:grid-cols-3 gap-5",children:[yB.map((n,e)=>F.jsx(C5,{index:e,...n},`project-${e}`))," "]})]}),L5=js(P5,"project");function R5(){return F.jsxs("div",{className:"bg-white",children:[F.jsx(Gs,{}),F.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:F.jsx(L5,{})})]})}/** + * @license + * Copyright 2010-2023 Three.js Authors + * SPDX-License-Identifier: MIT + */const wg="151",Sa={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},wa={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},B3=0,Nx=1,V3=2,I5=3,D5=0,X1=1,Y1=2,au=3,Bs=0,mi=1,Rr=2,N5=2,Ns=0,Oa=1,kx=2,Ox=3,Ux=4,H3=5,Aa=100,W3=101,G3=102,zx=103,Fx=104,j3=200,X3=201,Y3=202,q3=203,q1=204,Z1=205,Z3=206,J3=207,K3=208,Q3=209,$3=210,eL=0,tL=1,nL=2,Hm=3,iL=4,rL=5,sL=6,oL=7,dh=0,aL=1,lL=2,Nr=0,uL=1,cL=2,fL=3,J1=4,hL=5,Mg=300,zo=301,Fo=302,Uf=303,zf=304,Wu=306,Ff=1e3,ri=1001,Bf=1002,mn=1003,Wm=1004,k5=1004,cf=1005,O5=1005,vn=1006,K1=1007,U5=1007,Bo=1008,z5=1008,Vo=1009,dL=1010,pL=1011,Q1=1012,mL=1013,So=1014,Ls=1015,Ru=1016,gL=1017,vL=1018,Ua=1020,yL=1021,Vi=1023,xL=1024,_L=1025,No=1026,Ya=1027,SL=1028,wL=1029,ML=1030,AL=1031,EL=1033,$p=33776,em=33777,tm=33778,nm=33779,Bx=35840,Vx=35841,Hx=35842,Wx=35843,bL=36196,Gx=37492,jx=37496,Xx=37808,Yx=37809,qx=37810,Zx=37811,Jx=37812,Kx=37813,Qx=37814,$x=37815,e_=37816,t_=37817,n_=37818,i_=37819,r_=37820,s_=37821,im=36492,TL=36283,o_=36284,a_=36285,l_=36286,CL=2200,PL=2201,LL=2202,Vf=2300,Hf=2301,rm=2302,La=2400,Ra=2401,Wf=2402,Ag=2500,$1=2501,F5=0,B5=1,V5=2,Vs=3e3,zt=3001,RL=3200,IL=3201,qo=0,DL=1,H5="",Cr="srgb",Iu="srgb-linear",eS="display-p3",W5=0,sm=7680,G5=7681,j5=7682,X5=7683,Y5=34055,q5=34056,Z5=5386,J5=512,K5=513,Q5=514,$5=515,eV=516,tV=517,nV=518,NL=519,Gf=35044,iV=35048,rV=35040,sV=35045,oV=35049,aV=35041,lV=35046,uV=35050,cV=35042,fV="100",u_="300 es",Gm=1035;class ss{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const i=this._listeners;return i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;const r=this._listeners[e];if(r!==void 0){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const i=this._listeners[e.type];if(i!==void 0){e.target=this;const r=i.slice(0);for(let s=0,o=r.length;s>8&255]+ti[n>>16&255]+ti[n>>24&255]+"-"+ti[e&255]+ti[e>>8&255]+"-"+ti[e>>16&15|64]+ti[e>>24&255]+"-"+ti[t&63|128]+ti[t>>8&255]+"-"+ti[t>>16&255]+ti[t>>24&255]+ti[i&255]+ti[i>>8&255]+ti[i>>16&255]+ti[i>>24&255]).toLowerCase()}function fn(n,e,t){return Math.max(e,Math.min(t,n))}function tS(n,e){return(n%e+e)%e}function hV(n,e,t,i,r){return i+(n-e)*(r-i)/(t-e)}function dV(n,e,t){return n!==e?(t-n)/(e-n):0}function ff(n,e,t){return(1-t)*n+t*e}function pV(n,e,t,i){return ff(n,e,1-Math.exp(-t*i))}function mV(n,e=1){return e-Math.abs(tS(n,e*2)-e)}function gV(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function vV(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function yV(n,e){return n+Math.floor(Math.random()*(e-n+1))}function xV(n,e){return n+Math.random()*(e-n)}function _V(n){return n*(.5-Math.random())}function SV(n){n!==void 0&&(JE=n);let e=JE+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function wV(n){return n*za}function MV(n){return n*Du}function c_(n){return(n&n-1)===0&&n!==0}function kL(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function OL(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function AV(n,e,t,i,r){const s=Math.cos,o=Math.sin,a=s(t/2),l=o(t/2),f=s((e+i)/2),h=o((e+i)/2),d=s((e-i)/2),p=o((e-i)/2),v=s((i-e)/2),y=o((i-e)/2);switch(r){case"XYX":n.set(a*h,l*d,l*p,a*f);break;case"YZY":n.set(l*p,a*h,l*d,a*f);break;case"ZXZ":n.set(l*d,l*p,a*h,a*f);break;case"XZX":n.set(a*h,l*y,l*v,a*f);break;case"YXY":n.set(l*v,a*h,l*y,a*f);break;case"ZYZ":n.set(l*y,l*v,a*h,a*f);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function Wi(n,e){switch(e.constructor){case Float32Array:return n;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function gt(n,e){switch(e.constructor){case Float32Array:return n;case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}const UL={DEG2RAD:za,RAD2DEG:Du,generateUUID:ji,clamp:fn,euclideanModulo:tS,mapLinear:hV,inverseLerp:dV,lerp:ff,damp:pV,pingpong:mV,smoothstep:gV,smootherstep:vV,randInt:yV,randFloat:xV,randFloatSpread:_V,seededRandom:SV,degToRad:wV,radToDeg:MV,isPowerOfTwo:c_,ceilPowerOfTwo:kL,floorPowerOfTwo:OL,setQuaternionFromProperEuler:AV,normalize:gt,denormalize:Wi};class ye{constructor(e=0,t=0){ye.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,i=this.y,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6],this.y=r[1]*t+r[4]*i+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(fn(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const i=Math.cos(t),r=Math.sin(t),s=this.x-e.x,o=this.y-e.y;return this.x=s*i-o*r+e.x,this.y=s*r+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Mt{constructor(){Mt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1]}set(e,t,i,r,s,o,a,l,f){const h=this.elements;return h[0]=e,h[1]=r,h[2]=a,h[3]=t,h[4]=s,h[5]=l,h[6]=i,h[7]=o,h[8]=f,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,r=t.elements,s=this.elements,o=i[0],a=i[3],l=i[6],f=i[1],h=i[4],d=i[7],p=i[2],v=i[5],y=i[8],_=r[0],M=r[3],m=r[6],S=r[1],w=r[4],A=r[7],b=r[2],P=r[5],I=r[8];return s[0]=o*_+a*S+l*b,s[3]=o*M+a*w+l*P,s[6]=o*m+a*A+l*I,s[1]=f*_+h*S+d*b,s[4]=f*M+h*w+d*P,s[7]=f*m+h*A+d*I,s[2]=p*_+v*S+y*b,s[5]=p*M+v*w+y*P,s[8]=p*m+v*A+y*I,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],f=e[7],h=e[8];return t*o*h-t*a*f-i*s*h+i*a*l+r*s*f-r*o*l}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],f=e[7],h=e[8],d=h*o-a*f,p=a*l-h*s,v=f*s-o*l,y=t*d+i*p+r*v;if(y===0)return this.set(0,0,0,0,0,0,0,0,0);const _=1/y;return e[0]=d*_,e[1]=(r*f-h*i)*_,e[2]=(a*i-r*o)*_,e[3]=p*_,e[4]=(h*t-r*l)*_,e[5]=(r*s-a*t)*_,e[6]=v*_,e[7]=(i*l-f*t)*_,e[8]=(o*t-i*s)*_,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,r,s,o,a){const l=Math.cos(s),f=Math.sin(s);return this.set(i*l,i*f,-i*(l*o+f*a)+o+e,-r*f,r*l,-r*(-f*o+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(Rv.makeScale(e,t)),this}rotate(e){return this.premultiply(Rv.makeRotation(-e)),this}translate(e,t){return this.premultiply(Rv.makeTranslation(e,t)),this}makeTranslation(e,t){return this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,i=e.elements;for(let r=0;r<9;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const Rv=new Mt;function zL(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}const EV={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function lu(n,e){return new EV[n](e)}function jf(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function Su(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function Iv(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}const bV=new Mt().fromArray([.8224621,.0331941,.0170827,.177538,.9668058,.0723974,-1e-7,1e-7,.9105199]),TV=new Mt().fromArray([1.2249401,-.0420569,-.0196376,-.2249404,1.0420571,-.0786361,1e-7,0,1.0982735]);function CV(n){return n.convertSRGBToLinear().applyMatrix3(TV)}function PV(n){return n.applyMatrix3(bV).convertLinearToSRGB()}const LV={[Iu]:n=>n,[Cr]:n=>n.convertSRGBToLinear(),[eS]:CV},RV={[Iu]:n=>n,[Cr]:n=>n.convertLinearToSRGB(),[eS]:PV},Mi={enabled:!1,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(n){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!n},get workingColorSpace(){return Iu},set workingColorSpace(n){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(n,e,t){if(this.enabled===!1||e===t||!e||!t)return n;const i=LV[e],r=RV[t];if(i===void 0||r===void 0)throw new Error(`Unsupported color space conversion, "${e}" to "${t}".`);return r(i(n))},fromWorkingColorSpace:function(n,e){return this.convert(n,this.workingColorSpace,e)},toWorkingColorSpace:function(n,e){return this.convert(n,e,this.workingColorSpace)}};let Sl;class nS{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{Sl===void 0&&(Sl=jf("canvas")),Sl.width=e.width,Sl.height=e.height;const i=Sl.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=Sl}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=jf("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const r=i.getImageData(0,0,e.width,e.height),s=r.data;for(let o=0;o0&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==Mg)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Ff:e.x=e.x-Math.floor(e.x);break;case ri:e.x=e.x<0?0:1;break;case Bf:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case Ff:e.y=e.y-Math.floor(e.y);break;case ri:e.y=e.y<0?0:1;break;case Bf:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}}hn.DEFAULT_IMAGE=null;hn.DEFAULT_MAPPING=Mg;hn.DEFAULT_ANISOTROPY=1;class Dt{constructor(e=0,t=0,i=0,r=1){Dt.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,r){return this.x=e,this.y=t,this.z=i,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,i=this.y,r=this.z,s=this.w,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*r+o[12]*s,this.y=o[1]*t+o[5]*i+o[9]*r+o[13]*s,this.z=o[2]*t+o[6]*i+o[10]*r+o[14]*s,this.w=o[3]*t+o[7]*i+o[11]*r+o[15]*s,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,r,s;const l=e.elements,f=l[0],h=l[4],d=l[8],p=l[1],v=l[5],y=l[9],_=l[2],M=l[6],m=l[10];if(Math.abs(h-p)<.01&&Math.abs(d-_)<.01&&Math.abs(y-M)<.01){if(Math.abs(h+p)<.1&&Math.abs(d+_)<.1&&Math.abs(y+M)<.1&&Math.abs(f+v+m-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const w=(f+1)/2,A=(v+1)/2,b=(m+1)/2,P=(h+p)/4,I=(d+_)/4,L=(y+M)/4;return w>A&&w>b?w<.01?(i=0,r=.707106781,s=.707106781):(i=Math.sqrt(w),r=P/i,s=I/i):A>b?A<.01?(i=.707106781,r=0,s=.707106781):(r=Math.sqrt(A),i=P/r,s=L/r):b<.01?(i=.707106781,r=.707106781,s=0):(s=Math.sqrt(b),i=I/s,r=L/s),this.set(i,r,s,t),this}let S=Math.sqrt((M-y)*(M-y)+(d-_)*(d-_)+(p-h)*(p-h));return Math.abs(S)<.001&&(S=1),this.x=(M-y)/S,this.y=(d-_)/S,this.z=(p-h)/S,this.w=Math.acos((f+v+m-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class Or extends ss{constructor(e=1,t=1,i={}){super(),this.isWebGLRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new Dt(0,0,e,t),this.scissorTest=!1,this.viewport=new Dt(0,0,e,t);const r={width:e,height:t,depth:1};this.texture=new hn(r,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.encoding),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=i.generateMipmaps!==void 0?i.generateMipmaps:!1,this.texture.internalFormat=i.internalFormat!==void 0?i.internalFormat:null,this.texture.minFilter=i.minFilter!==void 0?i.minFilter:vn,this.depthBuffer=i.depthBuffer!==void 0?i.depthBuffer:!0,this.stencilBuffer=i.stencilBuffer!==void 0?i.stencilBuffer:!1,this.depthTexture=i.depthTexture!==void 0?i.depthTexture:null,this.samples=i.samples!==void 0?i.samples:0}setSize(e,t,i=1){(this.width!==e||this.height!==t||this.depth!==i)&&(this.width=e,this.height=t,this.depth=i,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=i,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new Ia(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class Eg extends hn{constructor(e=null,t=1,i=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=mn,this.minFilter=mn,this.wrapR=ri,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class DV extends Or{constructor(e=1,t=1,i=1){super(e,t),this.isWebGLArrayRenderTarget=!0,this.depth=i,this.texture=new Eg(null,e,t,i),this.texture.isRenderTargetTexture=!0}}class iS extends hn{constructor(e=null,t=1,i=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=mn,this.minFilter=mn,this.wrapR=ri,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class NV extends Or{constructor(e=1,t=1,i=1){super(e,t),this.isWebGL3DRenderTarget=!0,this.depth=i,this.texture=new iS(null,e,t,i),this.texture.isRenderTargetTexture=!0}}class kV extends Or{constructor(e=1,t=1,i=1,r={}){super(e,t,r),this.isWebGLMultipleRenderTargets=!0;const s=this.texture;this.texture=[];for(let o=0;o=0?1:-1,w=1-m*m;if(w>Number.EPSILON){const b=Math.sqrt(w),P=Math.atan2(b,m*S);M=Math.sin(M*P)/b,a=Math.sin(a*P)/b}const A=a*S;if(l=l*M+p*A,f=f*M+v*A,h=h*M+y*A,d=d*M+_*A,M===1-a){const b=1/Math.sqrt(l*l+f*f+h*h+d*d);l*=b,f*=b,h*=b,d*=b}}e[t]=l,e[t+1]=f,e[t+2]=h,e[t+3]=d}static multiplyQuaternionsFlat(e,t,i,r,s,o){const a=i[r],l=i[r+1],f=i[r+2],h=i[r+3],d=s[o],p=s[o+1],v=s[o+2],y=s[o+3];return e[t]=a*y+h*d+l*v-f*p,e[t+1]=l*y+h*p+f*d-a*v,e[t+2]=f*y+h*v+a*p-l*d,e[t+3]=h*y-a*d-l*p-f*v,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,r){return this._x=e,this._y=t,this._z=i,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){const i=e._x,r=e._y,s=e._z,o=e._order,a=Math.cos,l=Math.sin,f=a(i/2),h=a(r/2),d=a(s/2),p=l(i/2),v=l(r/2),y=l(s/2);switch(o){case"XYZ":this._x=p*h*d+f*v*y,this._y=f*v*d-p*h*y,this._z=f*h*y+p*v*d,this._w=f*h*d-p*v*y;break;case"YXZ":this._x=p*h*d+f*v*y,this._y=f*v*d-p*h*y,this._z=f*h*y-p*v*d,this._w=f*h*d+p*v*y;break;case"ZXY":this._x=p*h*d-f*v*y,this._y=f*v*d+p*h*y,this._z=f*h*y+p*v*d,this._w=f*h*d-p*v*y;break;case"ZYX":this._x=p*h*d-f*v*y,this._y=f*v*d+p*h*y,this._z=f*h*y-p*v*d,this._w=f*h*d+p*v*y;break;case"YZX":this._x=p*h*d+f*v*y,this._y=f*v*d+p*h*y,this._z=f*h*y-p*v*d,this._w=f*h*d-p*v*y;break;case"XZY":this._x=p*h*d-f*v*y,this._y=f*v*d-p*h*y,this._z=f*h*y+p*v*d,this._w=f*h*d+p*v*y;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,r=Math.sin(i);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],r=t[4],s=t[8],o=t[1],a=t[5],l=t[9],f=t[2],h=t[6],d=t[10],p=i+a+d;if(p>0){const v=.5/Math.sqrt(p+1);this._w=.25/v,this._x=(h-l)*v,this._y=(s-f)*v,this._z=(o-r)*v}else if(i>a&&i>d){const v=2*Math.sqrt(1+i-a-d);this._w=(h-l)/v,this._x=.25*v,this._y=(r+o)/v,this._z=(s+f)/v}else if(a>d){const v=2*Math.sqrt(1+a-i-d);this._w=(s-f)/v,this._x=(r+o)/v,this._y=.25*v,this._z=(l+h)/v}else{const v=2*Math.sqrt(1+d-i-a);this._w=(o-r)/v,this._x=(s+f)/v,this._y=(l+h)/v,this._z=.25*v}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(fn(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(i===0)return this;const r=Math.min(1,t/i);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const i=e._x,r=e._y,s=e._z,o=e._w,a=t._x,l=t._y,f=t._z,h=t._w;return this._x=i*h+o*a+r*f-s*l,this._y=r*h+o*l+s*a-i*f,this._z=s*h+o*f+i*l-r*a,this._w=o*h-i*a-r*l-s*f,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const i=this._x,r=this._y,s=this._z,o=this._w;let a=o*e._w+i*e._x+r*e._y+s*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=i,this._y=r,this._z=s,this;const l=1-a*a;if(l<=Number.EPSILON){const v=1-t;return this._w=v*o+t*this._w,this._x=v*i+t*this._x,this._y=v*r+t*this._y,this._z=v*s+t*this._z,this.normalize(),this._onChangeCallback(),this}const f=Math.sqrt(l),h=Math.atan2(f,a),d=Math.sin((1-t)*h)/f,p=Math.sin(t*h)/f;return this._w=o*d+this._w*p,this._x=i*d+this._x*p,this._y=r*d+this._y*p,this._z=s*d+this._z*p,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){const e=Math.random(),t=Math.sqrt(1-e),i=Math.sqrt(e),r=2*Math.PI*Math.random(),s=2*Math.PI*Math.random();return this.set(t*Math.cos(r),i*Math.sin(s),i*Math.cos(s),t*Math.sin(r))}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}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class k{constructor(e=0,t=0,i=0){k.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(KE.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(KE.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[3]*i+s[6]*r,this.y=s[1]*t+s[4]*i+s[7]*r,this.z=s[2]*t+s[5]*i+s[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,r=this.z,s=e.elements,o=1/(s[3]*t+s[7]*i+s[11]*r+s[15]);return this.x=(s[0]*t+s[4]*i+s[8]*r+s[12])*o,this.y=(s[1]*t+s[5]*i+s[9]*r+s[13])*o,this.z=(s[2]*t+s[6]*i+s[10]*r+s[14])*o,this}applyQuaternion(e){const t=this.x,i=this.y,r=this.z,s=e.x,o=e.y,a=e.z,l=e.w,f=l*t+o*r-a*i,h=l*i+a*t-s*r,d=l*r+s*i-o*t,p=-s*t-o*i-a*r;return this.x=f*l+p*-s+h*-a-d*-o,this.y=h*l+p*-o+d*-s-f*-a,this.z=d*l+p*-a+f*-o-h*-s,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[4]*i+s[8]*r,this.y=s[1]*t+s[5]*i+s[9]*r,this.z=s[2]*t+s[6]*i+s[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,r=e.y,s=e.z,o=t.x,a=t.y,l=t.z;return this.x=r*l-s*a,this.y=s*o-i*l,this.z=i*a-r*o,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return Nv.copy(this).projectOnVector(e),this.sub(Nv)}reflect(e){return this.sub(Nv.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(fn(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,r=this.z-e.z;return t*t+i*i+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){const r=Math.sin(t)*e;return this.x=r*Math.sin(i),this.y=Math.cos(t)*e,this.z=r*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,t=Math.random()*Math.PI*2,i=Math.sqrt(1-e**2);return this.x=i*Math.cos(t),this.y=i*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Nv=new k,KE=new si;class os{constructor(e=new k(1/0,1/0,1/0),t=new k(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,i=e.length;tthis.max.x||e.ythis.max.y||e.zthis.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.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,vs),vs.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Cc),Kd.subVectors(this.max,Cc),Ml.subVectors(e.a,Cc),Al.subVectors(e.b,Cc),El.subVectors(e.c,Cc),so.subVectors(Al,Ml),oo.subVectors(El,Al),ua.subVectors(Ml,El);let t=[0,-so.z,so.y,0,-oo.z,oo.y,0,-ua.z,ua.y,so.z,0,-so.x,oo.z,0,-oo.x,ua.z,0,-ua.x,-so.y,so.x,0,-oo.y,oo.x,0,-ua.y,ua.x,0];return!kv(t,Ml,Al,El,Kd)||(t=[1,0,0,0,1,0,0,0,1],!kv(t,Ml,Al,El,Kd))?!1:(Qd.crossVectors(so,oo),t=[Qd.x,Qd.y,Qd.z],kv(t,Ml,Al,El,Kd))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,vs).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(vs).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(gs[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),gs[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),gs[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),gs[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),gs[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),gs[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),gs[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),gs[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(gs),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const gs=[new k,new k,new k,new k,new k,new k,new k,new k],vs=new k,wl=new os,Ml=new k,Al=new k,El=new k,so=new k,oo=new k,ua=new k,Cc=new k,Kd=new k,Qd=new k,ca=new k;function kv(n,e,t,i,r){for(let s=0,o=n.length-3;s<=o;s+=3){ca.fromArray(n,s);const a=r.x*Math.abs(ca.x)+r.y*Math.abs(ca.y)+r.z*Math.abs(ca.z),l=e.dot(ca),f=t.dot(ca),h=i.dot(ca);if(Math.max(-Math.max(l,f,h),Math.min(l,f,h))>a)return!1}return!0}const OV=new os,Pc=new k,Ov=new k;class as{constructor(e=new k,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const i=this.center;t!==void 0?i.copy(t):OV.setFromPoints(e).getCenter(i);let r=0;for(let s=0,o=e.length;sthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Pc.subVectors(e,this.center);const t=Pc.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),r=(i-this.radius)*.5;this.center.addScaledVector(Pc,r/i),this.radius+=r}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(Ov.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Pc.copy(e.center).add(Ov)),this.expandByPoint(Pc.copy(e.center).sub(Ov))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const ys=new k,Uv=new k,$d=new k,ao=new k,zv=new k,ep=new k,Fv=new k;class ph{constructor(e=new k,t=new k(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,ys)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=ys.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(ys.copy(this.origin).addScaledVector(this.direction,t),ys.distanceToSquared(e))}distanceSqToSegment(e,t,i,r){Uv.copy(e).add(t).multiplyScalar(.5),$d.copy(t).sub(e).normalize(),ao.copy(this.origin).sub(Uv);const s=e.distanceTo(t)*.5,o=-this.direction.dot($d),a=ao.dot(this.direction),l=-ao.dot($d),f=ao.lengthSq(),h=Math.abs(1-o*o);let d,p,v,y;if(h>0)if(d=o*l-a,p=o*a-l,y=s*h,d>=0)if(p>=-y)if(p<=y){const _=1/h;d*=_,p*=_,v=d*(d+o*p+2*a)+p*(o*d+p+2*l)+f}else p=s,d=Math.max(0,-(o*p+a)),v=-d*d+p*(p+2*l)+f;else p=-s,d=Math.max(0,-(o*p+a)),v=-d*d+p*(p+2*l)+f;else p<=-y?(d=Math.max(0,-(-o*s+a)),p=d>0?-s:Math.min(Math.max(-s,-l),s),v=-d*d+p*(p+2*l)+f):p<=y?(d=0,p=Math.min(Math.max(-s,-l),s),v=p*(p+2*l)+f):(d=Math.max(0,-(o*s+a)),p=d>0?s:Math.min(Math.max(-s,-l),s),v=-d*d+p*(p+2*l)+f);else p=o>0?-s:s,d=Math.max(0,-(o*p+a)),v=-d*d+p*(p+2*l)+f;return i&&i.copy(this.origin).addScaledVector(this.direction,d),r&&r.copy(Uv).addScaledVector($d,p),v}intersectSphere(e,t){ys.subVectors(e.center,this.origin);const i=ys.dot(this.direction),r=ys.dot(ys)-i*i,s=e.radius*e.radius;if(r>s)return null;const o=Math.sqrt(s-r),a=i-o,l=i+o;return l<0?null:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,r,s,o,a,l;const f=1/this.direction.x,h=1/this.direction.y,d=1/this.direction.z,p=this.origin;return f>=0?(i=(e.min.x-p.x)*f,r=(e.max.x-p.x)*f):(i=(e.max.x-p.x)*f,r=(e.min.x-p.x)*f),h>=0?(s=(e.min.y-p.y)*h,o=(e.max.y-p.y)*h):(s=(e.max.y-p.y)*h,o=(e.min.y-p.y)*h),i>o||s>r||((s>i||isNaN(i))&&(i=s),(o=0?(a=(e.min.z-p.z)*d,l=(e.max.z-p.z)*d):(a=(e.max.z-p.z)*d,l=(e.min.z-p.z)*d),i>l||a>r)||((a>i||i!==i)&&(i=a),(l=0?i:r,t)}intersectsBox(e){return this.intersectBox(e,ys)!==null}intersectTriangle(e,t,i,r,s){zv.subVectors(t,e),ep.subVectors(i,e),Fv.crossVectors(zv,ep);let o=this.direction.dot(Fv),a;if(o>0){if(r)return null;a=1}else if(o<0)a=-1,o=-o;else return null;ao.subVectors(this.origin,e);const l=a*this.direction.dot(ep.crossVectors(ao,ep));if(l<0)return null;const f=a*this.direction.dot(zv.cross(ao));if(f<0||l+f>o)return null;const h=-a*ao.dot(Fv);return h<0?null:this.at(h/o,s)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class ot{constructor(){ot.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}set(e,t,i,r,s,o,a,l,f,h,d,p,v,y,_,M){const m=this.elements;return m[0]=e,m[4]=t,m[8]=i,m[12]=r,m[1]=s,m[5]=o,m[9]=a,m[13]=l,m[2]=f,m[6]=h,m[10]=d,m[14]=p,m[3]=v,m[7]=y,m[11]=_,m[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 ot().fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,i=e.elements,r=1/bl.setFromMatrixColumn(e,0).length(),s=1/bl.setFromMatrixColumn(e,1).length(),o=1/bl.setFromMatrixColumn(e,2).length();return t[0]=i[0]*r,t[1]=i[1]*r,t[2]=i[2]*r,t[3]=0,t[4]=i[4]*s,t[5]=i[5]*s,t[6]=i[6]*s,t[7]=0,t[8]=i[8]*o,t[9]=i[9]*o,t[10]=i[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,i=e.x,r=e.y,s=e.z,o=Math.cos(i),a=Math.sin(i),l=Math.cos(r),f=Math.sin(r),h=Math.cos(s),d=Math.sin(s);if(e.order==="XYZ"){const p=o*h,v=o*d,y=a*h,_=a*d;t[0]=l*h,t[4]=-l*d,t[8]=f,t[1]=v+y*f,t[5]=p-_*f,t[9]=-a*l,t[2]=_-p*f,t[6]=y+v*f,t[10]=o*l}else if(e.order==="YXZ"){const p=l*h,v=l*d,y=f*h,_=f*d;t[0]=p+_*a,t[4]=y*a-v,t[8]=o*f,t[1]=o*d,t[5]=o*h,t[9]=-a,t[2]=v*a-y,t[6]=_+p*a,t[10]=o*l}else if(e.order==="ZXY"){const p=l*h,v=l*d,y=f*h,_=f*d;t[0]=p-_*a,t[4]=-o*d,t[8]=y+v*a,t[1]=v+y*a,t[5]=o*h,t[9]=_-p*a,t[2]=-o*f,t[6]=a,t[10]=o*l}else if(e.order==="ZYX"){const p=o*h,v=o*d,y=a*h,_=a*d;t[0]=l*h,t[4]=y*f-v,t[8]=p*f+_,t[1]=l*d,t[5]=_*f+p,t[9]=v*f-y,t[2]=-f,t[6]=a*l,t[10]=o*l}else if(e.order==="YZX"){const p=o*l,v=o*f,y=a*l,_=a*f;t[0]=l*h,t[4]=_-p*d,t[8]=y*d+v,t[1]=d,t[5]=o*h,t[9]=-a*h,t[2]=-f*h,t[6]=v*d+y,t[10]=p-_*d}else if(e.order==="XZY"){const p=o*l,v=o*f,y=a*l,_=a*f;t[0]=l*h,t[4]=-d,t[8]=f*h,t[1]=p*d+_,t[5]=o*h,t[9]=v*d-y,t[2]=y*d-v,t[6]=a*h,t[10]=_*d+p}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(UV,e,zV)}lookAt(e,t,i){const r=this.elements;return Ui.subVectors(e,t),Ui.lengthSq()===0&&(Ui.z=1),Ui.normalize(),lo.crossVectors(i,Ui),lo.lengthSq()===0&&(Math.abs(i.z)===1?Ui.x+=1e-4:Ui.z+=1e-4,Ui.normalize(),lo.crossVectors(i,Ui)),lo.normalize(),tp.crossVectors(Ui,lo),r[0]=lo.x,r[4]=tp.x,r[8]=Ui.x,r[1]=lo.y,r[5]=tp.y,r[9]=Ui.y,r[2]=lo.z,r[6]=tp.z,r[10]=Ui.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,r=t.elements,s=this.elements,o=i[0],a=i[4],l=i[8],f=i[12],h=i[1],d=i[5],p=i[9],v=i[13],y=i[2],_=i[6],M=i[10],m=i[14],S=i[3],w=i[7],A=i[11],b=i[15],P=r[0],I=r[4],L=r[8],C=r[12],R=r[1],W=r[5],J=r[9],j=r[13],X=r[2],Z=r[6],se=r[10],ae=r[14],D=r[3],V=r[7],B=r[11],te=r[15];return s[0]=o*P+a*R+l*X+f*D,s[4]=o*I+a*W+l*Z+f*V,s[8]=o*L+a*J+l*se+f*B,s[12]=o*C+a*j+l*ae+f*te,s[1]=h*P+d*R+p*X+v*D,s[5]=h*I+d*W+p*Z+v*V,s[9]=h*L+d*J+p*se+v*B,s[13]=h*C+d*j+p*ae+v*te,s[2]=y*P+_*R+M*X+m*D,s[6]=y*I+_*W+M*Z+m*V,s[10]=y*L+_*J+M*se+m*B,s[14]=y*C+_*j+M*ae+m*te,s[3]=S*P+w*R+A*X+b*D,s[7]=S*I+w*W+A*Z+b*V,s[11]=S*L+w*J+A*se+b*B,s[15]=S*C+w*j+A*ae+b*te,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[4],r=e[8],s=e[12],o=e[1],a=e[5],l=e[9],f=e[13],h=e[2],d=e[6],p=e[10],v=e[14],y=e[3],_=e[7],M=e[11],m=e[15];return y*(+s*l*d-r*f*d-s*a*p+i*f*p+r*a*v-i*l*v)+_*(+t*l*v-t*f*p+s*o*p-r*o*v+r*f*h-s*l*h)+M*(+t*f*d-t*a*v-s*o*d+i*o*v+s*a*h-i*f*h)+m*(-r*a*h-t*l*d+t*a*p+r*o*d-i*o*p+i*l*h)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],f=e[7],h=e[8],d=e[9],p=e[10],v=e[11],y=e[12],_=e[13],M=e[14],m=e[15],S=d*M*f-_*p*f+_*l*v-a*M*v-d*l*m+a*p*m,w=y*p*f-h*M*f-y*l*v+o*M*v+h*l*m-o*p*m,A=h*_*f-y*d*f+y*a*v-o*_*v-h*a*m+o*d*m,b=y*d*l-h*_*l-y*a*p+o*_*p+h*a*M-o*d*M,P=t*S+i*w+r*A+s*b;if(P===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const I=1/P;return e[0]=S*I,e[1]=(_*p*s-d*M*s-_*r*v+i*M*v+d*r*m-i*p*m)*I,e[2]=(a*M*s-_*l*s+_*r*f-i*M*f-a*r*m+i*l*m)*I,e[3]=(d*l*s-a*p*s-d*r*f+i*p*f+a*r*v-i*l*v)*I,e[4]=w*I,e[5]=(h*M*s-y*p*s+y*r*v-t*M*v-h*r*m+t*p*m)*I,e[6]=(y*l*s-o*M*s-y*r*f+t*M*f+o*r*m-t*l*m)*I,e[7]=(o*p*s-h*l*s+h*r*f-t*p*f-o*r*v+t*l*v)*I,e[8]=A*I,e[9]=(y*d*s-h*_*s-y*i*v+t*_*v+h*i*m-t*d*m)*I,e[10]=(o*_*s-y*a*s+y*i*f-t*_*f-o*i*m+t*a*m)*I,e[11]=(h*a*s-o*d*s-h*i*f+t*d*f+o*i*v-t*a*v)*I,e[12]=b*I,e[13]=(h*_*r-y*d*r+y*i*p-t*_*p-h*i*M+t*d*M)*I,e[14]=(y*a*r-o*_*r-y*i*l+t*_*l+o*i*M-t*a*M)*I,e[15]=(o*d*r-h*a*r+h*i*l-t*d*l-o*i*p+t*a*p)*I,this}scale(e){const t=this.elements,i=e.x,r=e.y,s=e.z;return t[0]*=i,t[4]*=r,t[8]*=s,t[1]*=i,t[5]*=r,t[9]*=s,t[2]*=i,t[6]*=r,t[10]*=s,t[3]*=i,t[7]*=r,t[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,r))}makeTranslation(e,t,i){return this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),r=Math.sin(t),s=1-i,o=e.x,a=e.y,l=e.z,f=s*o,h=s*a;return this.set(f*o+i,f*a-r*l,f*l+r*a,0,f*a+r*l,h*a+i,h*l-r*o,0,f*l-r*a,h*l+r*o,s*l*l+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,r,s,o){return this.set(1,i,s,0,e,1,o,0,t,r,1,0,0,0,0,1),this}compose(e,t,i){const r=this.elements,s=t._x,o=t._y,a=t._z,l=t._w,f=s+s,h=o+o,d=a+a,p=s*f,v=s*h,y=s*d,_=o*h,M=o*d,m=a*d,S=l*f,w=l*h,A=l*d,b=i.x,P=i.y,I=i.z;return r[0]=(1-(_+m))*b,r[1]=(v+A)*b,r[2]=(y-w)*b,r[3]=0,r[4]=(v-A)*P,r[5]=(1-(p+m))*P,r[6]=(M+S)*P,r[7]=0,r[8]=(y+w)*I,r[9]=(M-S)*I,r[10]=(1-(p+_))*I,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,i){const r=this.elements;let s=bl.set(r[0],r[1],r[2]).length();const o=bl.set(r[4],r[5],r[6]).length(),a=bl.set(r[8],r[9],r[10]).length();this.determinant()<0&&(s=-s),e.x=r[12],e.y=r[13],e.z=r[14],Mr.copy(this);const f=1/s,h=1/o,d=1/a;return Mr.elements[0]*=f,Mr.elements[1]*=f,Mr.elements[2]*=f,Mr.elements[4]*=h,Mr.elements[5]*=h,Mr.elements[6]*=h,Mr.elements[8]*=d,Mr.elements[9]*=d,Mr.elements[10]*=d,t.setFromRotationMatrix(Mr),i.x=s,i.y=o,i.z=a,this}makePerspective(e,t,i,r,s,o){const a=this.elements,l=2*s/(t-e),f=2*s/(i-r),h=(t+e)/(t-e),d=(i+r)/(i-r),p=-(o+s)/(o-s),v=-2*o*s/(o-s);return a[0]=l,a[4]=0,a[8]=h,a[12]=0,a[1]=0,a[5]=f,a[9]=d,a[13]=0,a[2]=0,a[6]=0,a[10]=p,a[14]=v,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(e,t,i,r,s,o){const a=this.elements,l=1/(t-e),f=1/(i-r),h=1/(o-s),d=(t+e)*l,p=(i+r)*f,v=(o+s)*h;return a[0]=2*l,a[4]=0,a[8]=0,a[12]=-d,a[1]=0,a[5]=2*f,a[9]=0,a[13]=-p,a[2]=0,a[6]=0,a[10]=-2*h,a[14]=-v,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let r=0;r<16;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}const bl=new k,Mr=new ot,UV=new k(0,0,0),zV=new k(1,1,1),lo=new k,tp=new k,Ui=new k,QE=new ot,$E=new si;class nl{constructor(e=0,t=0,i=0,r=nl.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,r=this._order){return this._x=e,this._y=t,this._z=i,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){const r=e.elements,s=r[0],o=r[4],a=r[8],l=r[1],f=r[5],h=r[9],d=r[2],p=r[6],v=r[10];switch(t){case"XYZ":this._y=Math.asin(fn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-h,v),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(p,f),this._z=0);break;case"YXZ":this._x=Math.asin(-fn(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(a,v),this._z=Math.atan2(l,f)):(this._y=Math.atan2(-d,s),this._z=0);break;case"ZXY":this._x=Math.asin(fn(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(-d,v),this._z=Math.atan2(-o,f)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-fn(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(p,v),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,f));break;case"YZX":this._z=Math.asin(fn(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,f),this._y=Math.atan2(-d,s)):(this._x=0,this._y=Math.atan2(a,v));break;case"XZY":this._z=Math.asin(-fn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(p,f),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-h,v),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return QE.makeRotationFromQuaternion(e),this.setFromRotationMatrix(QE,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return $E.setFromEuler(this),this.setFromQuaternion($E,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}nl.DEFAULT_ORDER="XYZ";class Fa{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let t=0;t1){for(let i=0;i0&&(i=i.concat(o))}return i}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Lc,e,BV),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Lc,VV,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let i=0,r=t.length;i0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(r.instanceColor=this.instanceColor.toJSON()));function s(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=s(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let f=0,h=l.length;f0){r.children=[];for(let a=0;a0){r.animations=[];for(let a=0;a0&&(i.geometries=a),l.length>0&&(i.materials=l),f.length>0&&(i.textures=f),h.length>0&&(i.images=h),d.length>0&&(i.shapes=d),p.length>0&&(i.skeletons=p),v.length>0&&(i.animations=v),y.length>0&&(i.nodes=y)}return i.object=r,i;function o(a){const l=[];for(const f in a){const h=a[f];delete h.metadata,l.push(h)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,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.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let i=0;i0?r.multiplyScalar(1/Math.sqrt(s)):r.set(0,0,0)}static getBarycoord(e,t,i,r,s){Ar.subVectors(r,t),_s.subVectors(i,t),Bv.subVectors(e,t);const o=Ar.dot(Ar),a=Ar.dot(_s),l=Ar.dot(Bv),f=_s.dot(_s),h=_s.dot(Bv),d=o*f-a*a;if(d===0)return s.set(-2,-1,-1);const p=1/d,v=(f*l-a*h)*p,y=(o*h-a*l)*p;return s.set(1-v-y,y,v)}static containsPoint(e,t,i,r){return this.getBarycoord(e,t,i,r,Ss),Ss.x>=0&&Ss.y>=0&&Ss.x+Ss.y<=1}static getUV(e,t,i,r,s,o,a,l){return ip===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),ip=!0),this.getInterpolation(e,t,i,r,s,o,a,l)}static getInterpolation(e,t,i,r,s,o,a,l){return this.getBarycoord(e,t,i,r,Ss),l.setScalar(0),l.addScaledVector(s,Ss.x),l.addScaledVector(o,Ss.y),l.addScaledVector(a,Ss.z),l}static isFrontFacing(e,t,i,r){return Ar.subVectors(i,t),_s.subVectors(e,t),Ar.cross(_s).dot(r)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,r){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,i,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Ar.subVectors(this.c,this.b),_s.subVectors(this.a,this.b),Ar.cross(_s).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return bi.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return bi.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,i,r,s){return ip===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),ip=!0),bi.getInterpolation(e,this.a,this.b,this.c,t,i,r,s)}getInterpolation(e,t,i,r,s){return bi.getInterpolation(e,this.a,this.b,this.c,t,i,r,s)}containsPoint(e){return bi.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return bi.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,r=this.b,s=this.c;let o,a;Cl.subVectors(r,i),Pl.subVectors(s,i),Vv.subVectors(e,i);const l=Cl.dot(Vv),f=Pl.dot(Vv);if(l<=0&&f<=0)return t.copy(i);Hv.subVectors(e,r);const h=Cl.dot(Hv),d=Pl.dot(Hv);if(h>=0&&d<=h)return t.copy(r);const p=l*d-h*f;if(p<=0&&l>=0&&h<=0)return o=l/(l-h),t.copy(i).addScaledVector(Cl,o);Wv.subVectors(e,s);const v=Cl.dot(Wv),y=Pl.dot(Wv);if(y>=0&&v<=y)return t.copy(s);const _=v*f-l*y;if(_<=0&&f>=0&&y<=0)return a=f/(f-y),t.copy(i).addScaledVector(Pl,a);const M=h*y-v*d;if(M<=0&&d-h>=0&&v-y>=0)return sb.subVectors(s,r),a=(d-h)/(d-h+(v-y)),t.copy(r).addScaledVector(sb,a);const m=1/(M+_+p);return o=_*m,a=p*m,t.copy(i).addScaledVector(Cl,o).addScaledVector(Pl,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let WV=0;class Yn extends ss{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:WV++}),this.uuid=ji(),this.name="",this.type="Material",this.blending=Oa,this.side=Bs,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=q1,this.blendDst=Z1,this.blendEquation=Aa,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=Hm,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=NL,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=sm,this.stencilZFail=sm,this.stencilZPass=sm,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const i=e[t];if(i===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const r=this[t];if(r===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(i):r&&r.isVector3&&i&&i.isVector3?r.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const i={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==Oa&&(i.blending=this.blending),this.side!==Bs&&(i.side=this.side),this.vertexColors&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=this.transparent),i.depthFunc=this.depthFunc,i.depthTest=this.depthTest,i.depthWrite=this.depthWrite,i.colorWrite=this.colorWrite,i.stencilWrite=this.stencilWrite,i.stencilWriteMask=this.stencilWriteMask,i.stencilFunc=this.stencilFunc,i.stencilRef=this.stencilRef,i.stencilFuncMask=this.stencilFuncMask,i.stencilFail=this.stencilFail,i.stencilZFail=this.stencilZFail,i.stencilZPass=this.stencilZPass,this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaToCoverage===!0&&(i.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=this.premultipliedAlpha),this.forceSinglePass===!0&&(i.forceSinglePass=this.forceSinglePass),this.wireframe===!0&&(i.wireframe=this.wireframe),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=this.flatShading),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function r(s){const o=[];for(const a in s){const l=s[a];delete l.metadata,o.push(l)}return o}if(t){const s=r(e.textures),o=r(e.images);s.length>0&&(i.textures=s),o.length>0&&(i.images=o)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let i=null;if(t!==null){const r=t.length;i=new Array(r);for(let s=0;s!==r;++s)i[s]=t[s].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.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.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}const FL={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Er={h:0,s:0,l:0},rp={h:0,s:0,l:0};function Gv(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}class Fe{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,t===void 0&&i===void 0?this.set(e):this.setRGB(e,t,i)}set(e){return e&&e.isColor?this.copy(e):typeof e=="number"?this.setHex(e):typeof e=="string"&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Cr){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Mi.toWorkingColorSpace(this,t),this}setRGB(e,t,i,r=Mi.workingColorSpace){return this.r=e,this.g=t,this.b=i,Mi.toWorkingColorSpace(this,r),this}setHSL(e,t,i,r=Mi.workingColorSpace){if(e=tS(e,1),t=fn(t,0,1),i=fn(i,0,1),t===0)this.r=this.g=this.b=i;else{const s=i<=.5?i*(1+t):i+t-i*t,o=2*i-s;this.r=Gv(o,s,e+1/3),this.g=Gv(o,s,e),this.b=Gv(o,s,e-1/3)}return Mi.toWorkingColorSpace(this,r),this}setStyle(e,t=Cr){function i(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const o=r[1],a=r[2];switch(o){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return this.r=Math.min(255,parseInt(s[1],10))/255,this.g=Math.min(255,parseInt(s[2],10))/255,this.b=Math.min(255,parseInt(s[3],10))/255,Mi.toWorkingColorSpace(this,t),i(s[4]),this;if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return this.r=Math.min(100,parseInt(s[1],10))/100,this.g=Math.min(100,parseInt(s[2],10))/100,this.b=Math.min(100,parseInt(s[3],10))/100,Mi.toWorkingColorSpace(this,t),i(s[4]),this;break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a)){const l=parseFloat(s[1])/360,f=parseFloat(s[2])/100,h=parseFloat(s[3])/100;return i(s[4]),this.setHSL(l,f,h,t)}break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=r[1],o=s.length;if(o===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,t);if(o===6)return this.setHex(parseInt(s,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Cr){const i=FL[e.toLowerCase()];return i!==void 0?this.setHex(i,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Su(e.r),this.g=Su(e.g),this.b=Su(e.b),this}copyLinearToSRGB(e){return this.r=Iv(e.r),this.g=Iv(e.g),this.b=Iv(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Cr){return Mi.fromWorkingColorSpace(ni.copy(this),e),fn(ni.r*255,0,255)<<16^fn(ni.g*255,0,255)<<8^fn(ni.b*255,0,255)<<0}getHexString(e=Cr){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Mi.workingColorSpace){Mi.fromWorkingColorSpace(ni.copy(this),t);const i=ni.r,r=ni.g,s=ni.b,o=Math.max(i,r,s),a=Math.min(i,r,s);let l,f;const h=(a+o)/2;if(a===o)l=0,f=0;else{const d=o-a;switch(f=h<=.5?d/(o+a):d/(2-o-a),o){case i:l=(r-s)/d+(r>-f-14,i[l|256]=1024>>-f-14|32768,r[l]=-f-1,r[l|256]=-f-1):f<=15?(i[l]=f+15<<10,i[l|256]=f+15<<10|32768,r[l]=13,r[l|256]=13):f<128?(i[l]=31744,i[l|256]=64512,r[l]=24,r[l|256]=24):(i[l]=31744,i[l|256]=64512,r[l]=13,r[l|256]=13)}const s=new Uint32Array(2048),o=new Uint32Array(64),a=new Uint32Array(64);for(let l=1;l<1024;++l){let f=l<<13,h=0;for(;!(f&8388608);)f<<=1,h-=8388608;f&=-8388609,h+=947912704,s[l]=f|h}for(let l=1024;l<2048;++l)s[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)o[l]=l<<23;o[31]=1199570944,o[32]=2147483648;for(let l=33;l<63;++l)o[l]=2147483648+(l-32<<23);o[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(a[l]=1024);return{floatView:e,uint32View:t,baseTable:i,shiftTable:r,mantissaTable:s,exponentTable:o,offsetTable:a}}function Ai(n){Math.abs(n)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),n=fn(n,-65504,65504),Es.floatView[0]=n;const e=Es.uint32View[0],t=e>>23&511;return Es.baseTable[t]+((e&8388607)>>Es.shiftTable[t])}function Xc(n){const e=n>>10;return Es.uint32View[0]=Es.mantissaTable[Es.offsetTable[e]+(n&1023)]+Es.exponentTable[e],Es.floatView[0]}const jV={toHalfFloat:Ai,fromHalfFloat:Xc},wn=new k,sp=new ye;class Bt{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=Gf,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}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}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(let r=0,s=this.itemSize;r0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const f in l)l[f]!==void 0&&(e[f]=l[f]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const l in i){const f=i[l];e.data.attributes[l]=f.toJSON(e.data)}const r={};let s=!1;for(const l in this.morphAttributes){const f=this.morphAttributes[l],h=[];for(let d=0,p=f.length;d0&&(r[l]=h,s=!0)}s&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone(t));const r=e.attributes;for(const f in r){const h=r[f];this.setAttribute(f,h.clone(t))}const s=e.morphAttributes;for(const f in s){const h=[],d=s[f];for(let p=0,v=d.length;p0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s(e.far-e.near)**2))||(ob.copy(s).invert(),Yr.copy(e.ray).applyMatrix4(ob),i.boundingBox!==null&&Yr.intersectsBox(i.boundingBox)===!1))return;let o;const a=i.index,l=i.attributes.position,f=i.attributes.uv,h=i.attributes.uv2,d=i.attributes.normal,p=i.groups,v=i.drawRange;if(a!==null)if(Array.isArray(r))for(let y=0,_=p.length;y<_;y++){const M=p[y],m=r[M.materialIndex],S=Math.max(M.start,v.start),w=Math.min(a.count,Math.min(M.start+M.count,v.start+v.count));for(let A=S,b=w;At.far?null:{distance:f,point:hp.clone(),object:n}}function dp(n,e,t,i,r,s,o,a,l,f){n.getVertexPosition(a,Rl),n.getVertexPosition(l,Il),n.getVertexPosition(f,Dl);const h=e6(n,e,t,i,Rl,Il,Dl,fp);if(h){r&&(lp.fromBufferAttribute(r,a),up.fromBufferAttribute(r,l),cp.fromBufferAttribute(r,f),h.uv=bi.getInterpolation(fp,Rl,Il,Dl,lp,up,cp,new ye)),s&&(lp.fromBufferAttribute(s,a),up.fromBufferAttribute(s,l),cp.fromBufferAttribute(s,f),h.uv2=bi.getInterpolation(fp,Rl,Il,Dl,lp,up,cp,new ye)),o&&(lb.fromBufferAttribute(o,a),ub.fromBufferAttribute(o,l),cb.fromBufferAttribute(o,f),h.normal=bi.getInterpolation(fp,Rl,Il,Dl,lb,ub,cb,new k),h.normal.dot(i.direction)>0&&h.normal.multiplyScalar(-1));const d={a,b:l,c:f,normal:new k,materialIndex:0};bi.getNormal(Rl,Il,Dl,d.normal),h.face=d}return h}class Jo extends dt{constructor(e=1,t=1,i=1,r=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:r,heightSegments:s,depthSegments:o};const a=this;r=Math.floor(r),s=Math.floor(s),o=Math.floor(o);const l=[],f=[],h=[],d=[];let p=0,v=0;y("z","y","x",-1,-1,i,t,e,o,s,0),y("z","y","x",1,-1,i,t,-e,o,s,1),y("x","z","y",1,1,e,i,t,r,o,2),y("x","z","y",1,-1,e,i,-t,r,o,3),y("x","y","z",1,-1,e,t,i,r,s,4),y("x","y","z",-1,-1,e,t,-i,r,s,5),this.setIndex(l),this.setAttribute("position",new We(f,3)),this.setAttribute("normal",new We(h,3)),this.setAttribute("uv",new We(d,2));function y(_,M,m,S,w,A,b,P,I,L,C){const R=A/I,W=b/L,J=A/2,j=b/2,X=P/2,Z=I+1,se=L+1;let ae=0,D=0;const V=new k;for(let B=0;B0?1:-1,h.push(V.x,V.y,V.z),d.push($/I),d.push(1-B/L),ae+=1}}for(let B=0;B0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;const i={};for(const r in this.extensions)this.extensions[r]===!0&&(i[r]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}}class mh extends Tt{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new ot,this.projectionMatrix=new ot,this.projectionMatrixInverse=new ot}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}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)}}class Wt extends mh{constructor(e=50,t=1,i=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=Du*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(za*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Du*2*Math.atan(Math.tan(za*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,i,r,s,o){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(za*.5*this.fov)/this.zoom,i=2*t,r=this.aspect*i,s=-.5*r;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,f=o.fullHeight;s+=o.offsetX*r/l,t-=o.offsetY*i/f,r*=o.width/l,i*=o.height/f}const a=this.filmOffset;a!==0&&(s+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+r,t,t-i,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const Nl=-90,kl=1;class oS extends Tt{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i;const r=new Wt(Nl,kl,e,t);r.layers=this.layers,r.up.set(0,1,0),r.lookAt(1,0,0),this.add(r);const s=new Wt(Nl,kl,e,t);s.layers=this.layers,s.up.set(0,1,0),s.lookAt(-1,0,0),this.add(s);const o=new Wt(Nl,kl,e,t);o.layers=this.layers,o.up.set(0,0,-1),o.lookAt(0,1,0),this.add(o);const a=new Wt(Nl,kl,e,t);a.layers=this.layers,a.up.set(0,0,1),a.lookAt(0,-1,0),this.add(a);const l=new Wt(Nl,kl,e,t);l.layers=this.layers,l.up.set(0,1,0),l.lookAt(0,0,1),this.add(l);const f=new Wt(Nl,kl,e,t);f.layers=this.layers,f.up.set(0,1,0),f.lookAt(0,0,-1),this.add(f)}update(e,t){this.parent===null&&this.updateMatrixWorld();const i=this.renderTarget,[r,s,o,a,l,f]=this.children,h=e.getRenderTarget(),d=e.toneMapping,p=e.xr.enabled;e.toneMapping=Nr,e.xr.enabled=!1;const v=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0),e.render(t,r),e.setRenderTarget(i,1),e.render(t,s),e.setRenderTarget(i,2),e.render(t,o),e.setRenderTarget(i,3),e.render(t,a),e.setRenderTarget(i,4),e.render(t,l),i.texture.generateMipmaps=v,e.setRenderTarget(i,5),e.render(t,f),e.setRenderTarget(h),e.toneMapping=d,e.xr.enabled=p,i.texture.needsPMREMUpdate=!0}}class gh extends hn{constructor(e,t,i,r,s,o,a,l,f,h){e=e!==void 0?e:[],t=t!==void 0?t:zo,super(e,t,i,r,s,o,a,l,f,h),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class aS extends Or{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},r=[i,i,i,i,i,i];this.texture=new gh(r,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=t.generateMipmaps!==void 0?t.generateMipmaps:!1,this.texture.minFilter=t.minFilter!==void 0?t.minFilter:vn}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.encoding=t.encoding,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:` + + varying vec3 vWorldDirection; + + vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); + + } + + void main() { + + vWorldDirection = transformDirection( position, modelMatrix ); + + #include + #include + + } + `,fragmentShader:` + + uniform sampler2D tEquirect; + + varying vec3 vWorldDirection; + + #include + + void main() { + + vec3 direction = normalize( vWorldDirection ); + + vec2 sampleUV = equirectUv( direction ); + + gl_FragColor = texture2D( tEquirect, sampleUV ); + + } + `},r=new Jo(5,5,5),s=new rs({name:"CubemapFromEquirect",uniforms:Nu(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:mi,blending:Ns});s.uniforms.tEquirect.value=t;const o=new Fn(r,s),a=t.minFilter;return t.minFilter===Bo&&(t.minFilter=vn),new oS(1,10,this).update(e,o),t.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,i,r){const s=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,i,r);e.setRenderTarget(s)}}const Yv=new k,r6=new k,s6=new Mt;class mo{constructor(e=new k(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,i,r){return this.normal.set(e,t,i),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){const r=Yv.subVectors(i,t).cross(r6.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const i=e.delta(Yv),r=this.normal.dot(i);if(r===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;const s=-(e.start.dot(this.normal)+this.constant)/r;return s<0||s>1?null:t.copy(e.start).addScaledVector(i,s)}intersectsLine(e){const t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const i=t||s6.getNormalMatrix(e),r=this.coplanarPoint(Yv).applyMatrix4(e),s=this.normal.applyMatrix3(i).normalize();return this.constant=-r.dot(s),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const fa=new as,pp=new k;class bg{constructor(e=new mo,t=new mo,i=new mo,r=new mo,s=new mo,o=new mo){this.planes=[e,t,i,r,s,o]}set(e,t,i,r,s,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(i),a[3].copy(r),a[4].copy(s),a[5].copy(o),this}copy(e){const t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e){const t=this.planes,i=e.elements,r=i[0],s=i[1],o=i[2],a=i[3],l=i[4],f=i[5],h=i[6],d=i[7],p=i[8],v=i[9],y=i[10],_=i[11],M=i[12],m=i[13],S=i[14],w=i[15];return t[0].setComponents(a-r,d-l,_-p,w-M).normalize(),t[1].setComponents(a+r,d+l,_+p,w+M).normalize(),t[2].setComponents(a+s,d+f,_+v,w+m).normalize(),t[3].setComponents(a-s,d-f,_-v,w-m).normalize(),t[4].setComponents(a-o,d-h,_-y,w-S).normalize(),t[5].setComponents(a+o,d+h,_+y,w+S).normalize(),this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),fa.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),fa.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(fa)}intersectsSprite(e){return fa.center.set(0,0,0),fa.radius=.7071067811865476,fa.applyMatrix4(e.matrixWorld),this.intersectsSphere(fa)}intersectsSphere(e){const t=this.planes,i=e.center,r=-e.radius;for(let s=0;s<6;s++)if(t[s].distanceToPoint(i)0?e.max.x:e.min.x,pp.y=r.normal.y>0?e.max.y:e.min.y,pp.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(pp)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function HL(){let n=null,e=!1,t=null,i=null;function r(s,o){t(s,o),i=n.requestAnimationFrame(r)}return{start:function(){e!==!0&&t!==null&&(i=n.requestAnimationFrame(r),e=!0)},stop:function(){n.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(s){t=s},setContext:function(s){n=s}}}function o6(n,e){const t=e.isWebGL2,i=new WeakMap;function r(f,h){const d=f.array,p=f.usage,v=n.createBuffer();n.bindBuffer(h,v),n.bufferData(h,d,p),f.onUploadCallback();let y;if(d instanceof Float32Array)y=5126;else if(d instanceof Uint16Array)if(f.isFloat16BufferAttribute)if(t)y=5131;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else y=5123;else if(d instanceof Int16Array)y=5122;else if(d instanceof Uint32Array)y=5125;else if(d instanceof Int32Array)y=5124;else if(d instanceof Int8Array)y=5120;else if(d instanceof Uint8Array)y=5121;else if(d instanceof Uint8ClampedArray)y=5121;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+d);return{buffer:v,type:y,bytesPerElement:d.BYTES_PER_ELEMENT,version:f.version}}function s(f,h,d){const p=h.array,v=h.updateRange;n.bindBuffer(d,f),v.count===-1?n.bufferSubData(d,0,p):(t?n.bufferSubData(d,v.offset*p.BYTES_PER_ELEMENT,p,v.offset,v.count):n.bufferSubData(d,v.offset*p.BYTES_PER_ELEMENT,p.subarray(v.offset,v.offset+v.count)),v.count=-1),h.onUploadCallback()}function o(f){return f.isInterleavedBufferAttribute&&(f=f.data),i.get(f)}function a(f){f.isInterleavedBufferAttribute&&(f=f.data);const h=i.get(f);h&&(n.deleteBuffer(h.buffer),i.delete(f))}function l(f,h){if(f.isGLBufferAttribute){const p=i.get(f);(!p||p.version 0 + vec4 plane; + #pragma unroll_loop_start + for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; + } + #pragma unroll_loop_end + #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES + bool clipped = true; + #pragma unroll_loop_start + for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; + } + #pragma unroll_loop_end + if ( clipped ) discard; + #endif +#endif`,x6=`#if NUM_CLIPPING_PLANES > 0 + varying vec3 vClipPosition; + uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; +#endif`,_6=`#if NUM_CLIPPING_PLANES > 0 + varying vec3 vClipPosition; +#endif`,S6=`#if NUM_CLIPPING_PLANES > 0 + vClipPosition = - mvPosition.xyz; +#endif`,w6=`#if defined( USE_COLOR_ALPHA ) + diffuseColor *= vColor; +#elif defined( USE_COLOR ) + diffuseColor.rgb *= vColor; +#endif`,M6=`#if defined( USE_COLOR_ALPHA ) + varying vec4 vColor; +#elif defined( USE_COLOR ) + varying vec3 vColor; +#endif`,A6=`#if defined( USE_COLOR_ALPHA ) + varying vec4 vColor; +#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) + varying vec3 vColor; +#endif`,E6=`#if defined( USE_COLOR_ALPHA ) + vColor = vec4( 1.0 ); +#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) + vColor = vec3( 1.0 ); +#endif +#ifdef USE_COLOR + vColor *= color; +#endif +#ifdef USE_INSTANCING_COLOR + vColor.xyz *= instanceColor.xyz; +#endif`,b6=`#define PI 3.141592653589793 +#define PI2 6.283185307179586 +#define PI_HALF 1.5707963267948966 +#define RECIPROCAL_PI 0.3183098861837907 +#define RECIPROCAL_PI2 0.15915494309189535 +#define EPSILON 1e-6 +#ifndef saturate +#define saturate( a ) clamp( a, 0.0, 1.0 ) +#endif +#define whiteComplement( a ) ( 1.0 - saturate( a ) ) +float pow2( const in float x ) { return x*x; } +vec3 pow2( const in vec3 x ) { return x*x; } +float pow3( const in float x ) { return x*x*x; } +float pow4( const in float x ) { float x2 = x*x; return x2*x2; } +float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } +float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } +highp float rand( const in vec2 uv ) { + const highp float a = 12.9898, b = 78.233, c = 43758.5453; + highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); + return fract( sin( sn ) * c ); +} +#ifdef HIGH_PRECISION + float precisionSafeLength( vec3 v ) { return length( v ); } +#else + float precisionSafeLength( vec3 v ) { + float maxComponent = max3( abs( v ) ); + return length( v / maxComponent ) * maxComponent; + } +#endif +struct IncidentLight { + vec3 color; + vec3 direction; + bool visible; +}; +struct ReflectedLight { + vec3 directDiffuse; + vec3 directSpecular; + vec3 indirectDiffuse; + vec3 indirectSpecular; +}; +struct GeometricContext { + vec3 position; + vec3 normal; + vec3 viewDir; +#ifdef USE_CLEARCOAT + vec3 clearcoatNormal; +#endif +}; +vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); +} +vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { + return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); +} +mat3 transposeMat3( const in mat3 m ) { + mat3 tmp; + tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x ); + tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y ); + tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z ); + return tmp; +} +float luminance( const in vec3 rgb ) { + const vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 ); + return dot( weights, rgb ); +} +bool isPerspectiveMatrix( mat4 m ) { + return m[ 2 ][ 3 ] == - 1.0; +} +vec2 equirectUv( in vec3 dir ) { + float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; + float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; + return vec2( u, v ); +} +vec3 BRDF_Lambert( const in vec3 diffuseColor ) { + return RECIPROCAL_PI * diffuseColor; +} +vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { + float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); + return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); +} +float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { + float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); + return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); +} // validated`,T6=`#ifdef ENVMAP_TYPE_CUBE_UV + #define cubeUV_minMipLevel 4.0 + #define cubeUV_minTileSize 16.0 + float getFace( vec3 direction ) { + vec3 absDirection = abs( direction ); + float face = - 1.0; + if ( absDirection.x > absDirection.z ) { + if ( absDirection.x > absDirection.y ) + face = direction.x > 0.0 ? 0.0 : 3.0; + else + face = direction.y > 0.0 ? 1.0 : 4.0; + } else { + if ( absDirection.z > absDirection.y ) + face = direction.z > 0.0 ? 2.0 : 5.0; + else + face = direction.y > 0.0 ? 1.0 : 4.0; + } + return face; + } + vec2 getUV( vec3 direction, float face ) { + vec2 uv; + if ( face == 0.0 ) { + uv = vec2( direction.z, direction.y ) / abs( direction.x ); + } else if ( face == 1.0 ) { + uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); + } else if ( face == 2.0 ) { + uv = vec2( - direction.x, direction.y ) / abs( direction.z ); + } else if ( face == 3.0 ) { + uv = vec2( - direction.z, direction.y ) / abs( direction.x ); + } else if ( face == 4.0 ) { + uv = vec2( - direction.x, direction.z ) / abs( direction.y ); + } else { + uv = vec2( direction.x, direction.y ) / abs( direction.z ); + } + return 0.5 * ( uv + 1.0 ); + } + vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { + float face = getFace( direction ); + float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); + mipInt = max( mipInt, cubeUV_minMipLevel ); + float faceSize = exp2( mipInt ); + highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; + if ( face > 2.0 ) { + uv.y += faceSize; + face -= 3.0; + } + uv.x += face * faceSize; + uv.x += filterInt * 3.0 * cubeUV_minTileSize; + uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); + uv.x *= CUBEUV_TEXEL_WIDTH; + uv.y *= CUBEUV_TEXEL_HEIGHT; + #ifdef texture2DGradEXT + return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; + #else + return texture2D( envMap, uv ).rgb; + #endif + } + #define cubeUV_r0 1.0 + #define cubeUV_v0 0.339 + #define cubeUV_m0 - 2.0 + #define cubeUV_r1 0.8 + #define cubeUV_v1 0.276 + #define cubeUV_m1 - 1.0 + #define cubeUV_r4 0.4 + #define cubeUV_v4 0.046 + #define cubeUV_m4 2.0 + #define cubeUV_r5 0.305 + #define cubeUV_v5 0.016 + #define cubeUV_m5 3.0 + #define cubeUV_r6 0.21 + #define cubeUV_v6 0.0038 + #define cubeUV_m6 4.0 + float roughnessToMip( float roughness ) { + float mip = 0.0; + if ( roughness >= cubeUV_r1 ) { + mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; + } else if ( roughness >= cubeUV_r4 ) { + mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; + } else if ( roughness >= cubeUV_r5 ) { + mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; + } else if ( roughness >= cubeUV_r6 ) { + mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; + } else { + mip = - 2.0 * log2( 1.16 * roughness ); } + return mip; + } + vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { + float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); + float mipF = fract( mip ); + float mipInt = floor( mip ); + vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); + if ( mipF == 0.0 ) { + return vec4( color0, 1.0 ); + } else { + vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); + return vec4( mix( color0, color1, mipF ), 1.0 ); + } + } +#endif`,C6=`vec3 transformedNormal = objectNormal; +#ifdef USE_INSTANCING + mat3 m = mat3( instanceMatrix ); + transformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) ); + transformedNormal = m * transformedNormal; +#endif +transformedNormal = normalMatrix * transformedNormal; +#ifdef FLIP_SIDED + transformedNormal = - transformedNormal; +#endif +#ifdef USE_TANGENT + vec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz; + #ifdef FLIP_SIDED + transformedTangent = - transformedTangent; + #endif +#endif`,P6=`#ifdef USE_DISPLACEMENTMAP + uniform sampler2D displacementMap; + uniform float displacementScale; + uniform float displacementBias; +#endif`,L6=`#ifdef USE_DISPLACEMENTMAP + transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); +#endif`,R6=`#ifdef USE_EMISSIVEMAP + vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); + totalEmissiveRadiance *= emissiveColor.rgb; +#endif`,I6=`#ifdef USE_EMISSIVEMAP + uniform sampler2D emissiveMap; +#endif`,D6="gl_FragColor = linearToOutputTexel( gl_FragColor );",N6=`vec4 LinearToLinear( in vec4 value ) { + return value; +} +vec4 LinearTosRGB( in vec4 value ) { + 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 ); +}`,k6=`#ifdef USE_ENVMAP + #ifdef ENV_WORLDPOS + vec3 cameraToFrag; + if ( isOrthographic ) { + cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); + } else { + cameraToFrag = normalize( vWorldPosition - cameraPosition ); + } + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + #ifdef ENVMAP_MODE_REFLECTION + vec3 reflectVec = reflect( cameraToFrag, worldNormal ); + #else + vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); + #endif + #else + vec3 reflectVec = vReflect; + #endif + #ifdef ENVMAP_TYPE_CUBE + vec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); + #else + vec4 envColor = vec4( 0.0 ); + #endif + #ifdef ENVMAP_BLENDING_MULTIPLY + outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); + #elif defined( ENVMAP_BLENDING_MIX ) + outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); + #elif defined( ENVMAP_BLENDING_ADD ) + outgoingLight += envColor.xyz * specularStrength * reflectivity; + #endif +#endif`,O6=`#ifdef USE_ENVMAP + uniform float envMapIntensity; + uniform float flipEnvMap; + #ifdef ENVMAP_TYPE_CUBE + uniform samplerCube envMap; + #else + uniform sampler2D envMap; + #endif + +#endif`,U6=`#ifdef USE_ENVMAP + uniform float reflectivity; + #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) + #define ENV_WORLDPOS + #endif + #ifdef ENV_WORLDPOS + varying vec3 vWorldPosition; + uniform float refractionRatio; + #else + varying vec3 vReflect; + #endif +#endif`,z6=`#ifdef USE_ENVMAP + #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) + #define ENV_WORLDPOS + #endif + #ifdef ENV_WORLDPOS + + varying vec3 vWorldPosition; + #else + varying vec3 vReflect; + uniform float refractionRatio; + #endif +#endif`,F6=`#ifdef USE_ENVMAP + #ifdef ENV_WORLDPOS + vWorldPosition = worldPosition.xyz; + #else + vec3 cameraToVertex; + if ( isOrthographic ) { + cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); + } else { + cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); + } + vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); + #ifdef ENVMAP_MODE_REFLECTION + vReflect = reflect( cameraToVertex, worldNormal ); + #else + vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); + #endif + #endif +#endif`,B6=`#ifdef USE_FOG + vFogDepth = - mvPosition.z; +#endif`,V6=`#ifdef USE_FOG + varying float vFogDepth; +#endif`,H6=`#ifdef USE_FOG + #ifdef FOG_EXP2 + float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); + #else + float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); + #endif + gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); +#endif`,W6=`#ifdef USE_FOG + uniform vec3 fogColor; + varying float vFogDepth; + #ifdef FOG_EXP2 + uniform float fogDensity; + #else + uniform float fogNear; + uniform float fogFar; + #endif +#endif`,G6=`#ifdef USE_GRADIENTMAP + uniform sampler2D gradientMap; +#endif +vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { + float dotNL = dot( normal, lightDirection ); + vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); + #ifdef USE_GRADIENTMAP + return vec3( texture2D( gradientMap, coord ).r ); + #else + vec2 fw = fwidth( coord ) * 0.5; + return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); + #endif +}`,j6=`#ifdef USE_LIGHTMAP + vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); + vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; + reflectedLight.indirectDiffuse += lightMapIrradiance; +#endif`,X6=`#ifdef USE_LIGHTMAP + uniform sampler2D lightMap; + uniform float lightMapIntensity; +#endif`,Y6=`LambertMaterial material; +material.diffuseColor = diffuseColor.rgb; +material.specularStrength = specularStrength;`,q6=`varying vec3 vViewPosition; +struct LambertMaterial { + vec3 diffuseColor; + float specularStrength; +}; +void RE_Direct_Lambert( const in IncidentLight directLight, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { + float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_Lambert +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,Z6=`uniform bool receiveShadow; +uniform vec3 ambientLightColor; +uniform vec3 lightProbe[ 9 ]; +vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { + float x = normal.x, y = normal.y, z = normal.z; + vec3 result = shCoefficients[ 0 ] * 0.886227; + result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; + result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; + result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; + result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; + result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; + result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); + result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; + result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); + return result; +} +vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); + return irradiance; +} +vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { + vec3 irradiance = ambientLightColor; + return irradiance; +} +float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { + #if defined ( LEGACY_LIGHTS ) + if ( cutoffDistance > 0.0 && decayExponent > 0.0 ) { + return pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent ); + } + return 1.0; + #else + float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); + if ( cutoffDistance > 0.0 ) { + distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); + } + return distanceFalloff; + #endif +} +float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { + return smoothstep( coneCosine, penumbraCosine, angleCosine ); +} +#if NUM_DIR_LIGHTS > 0 + struct DirectionalLight { + vec3 direction; + vec3 color; + }; + uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; + void getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) { + light.color = directionalLight.color; + light.direction = directionalLight.direction; + light.visible = true; + } +#endif +#if NUM_POINT_LIGHTS > 0 + struct PointLight { + vec3 position; + vec3 color; + float distance; + float decay; + }; + uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; + void getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) { + vec3 lVector = pointLight.position - geometry.position; + light.direction = normalize( lVector ); + float lightDistance = length( lVector ); + light.color = pointLight.color; + light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); + light.visible = ( light.color != vec3( 0.0 ) ); + } +#endif +#if NUM_SPOT_LIGHTS > 0 + struct SpotLight { + vec3 position; + vec3 direction; + vec3 color; + float distance; + float decay; + float coneCos; + float penumbraCos; + }; + uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; + void getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) { + vec3 lVector = spotLight.position - geometry.position; + light.direction = normalize( lVector ); + float angleCos = dot( light.direction, spotLight.direction ); + float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); + if ( spotAttenuation > 0.0 ) { + float lightDistance = length( lVector ); + light.color = spotLight.color * spotAttenuation; + light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); + light.visible = ( light.color != vec3( 0.0 ) ); + } else { + light.color = vec3( 0.0 ); + light.visible = false; + } + } +#endif +#if NUM_RECT_AREA_LIGHTS > 0 + struct RectAreaLight { + vec3 color; + vec3 position; + vec3 halfWidth; + vec3 halfHeight; + }; + uniform sampler2D ltc_1; uniform sampler2D ltc_2; + uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; +#endif +#if NUM_HEMI_LIGHTS > 0 + struct HemisphereLight { + vec3 direction; + vec3 skyColor; + vec3 groundColor; + }; + uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; + vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { + float dotNL = dot( normal, hemiLight.direction ); + float hemiDiffuseWeight = 0.5 * dotNL + 0.5; + vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); + return irradiance; + } +#endif`,J6=`#if defined( USE_ENVMAP ) + vec3 getIBLIrradiance( const in vec3 normal ) { + #if defined( ENVMAP_TYPE_CUBE_UV ) + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + vec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 ); + return PI * envMapColor.rgb * envMapIntensity; + #else + return vec3( 0.0 ); + #endif + } + vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { + #if defined( ENVMAP_TYPE_CUBE_UV ) + vec3 reflectVec = reflect( - viewDir, normal ); + reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) ); + reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); + vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness ); + return envMapColor.rgb * envMapIntensity; + #else + return vec3( 0.0 ); + #endif + } +#endif`,K6=`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,Q6=`varying vec3 vViewPosition; +struct ToonMaterial { + vec3 diffuseColor; +}; +void RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { + vec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_Toon +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,$6=`BlinnPhongMaterial material; +material.diffuseColor = diffuseColor.rgb; +material.specularColor = specular; +material.specularShininess = shininess; +material.specularStrength = specularStrength;`,eH=`varying vec3 vViewPosition; +struct BlinnPhongMaterial { + vec3 diffuseColor; + vec3 specularColor; + float specularShininess; + float specularStrength; +}; +void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { + float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); + reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength; +} +void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_BlinnPhong +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,tH=`PhysicalMaterial material; +material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); +vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) ); +float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); +material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; +material.roughness = min( material.roughness, 1.0 ); +#ifdef IOR + material.ior = ior; + #ifdef USE_SPECULAR + float specularIntensityFactor = specularIntensity; + vec3 specularColorFactor = specularColor; + #ifdef USE_SPECULAR_COLORMAP + specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb; + #endif + #ifdef USE_SPECULAR_INTENSITYMAP + specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a; + #endif + material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); + #else + float specularIntensityFactor = 1.0; + vec3 specularColorFactor = vec3( 1.0 ); + material.specularF90 = 1.0; + #endif + material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor ); +#else + material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor ); + material.specularF90 = 1.0; +#endif +#ifdef USE_CLEARCOAT + material.clearcoat = clearcoat; + material.clearcoatRoughness = clearcoatRoughness; + material.clearcoatF0 = vec3( 0.04 ); + material.clearcoatF90 = 1.0; + #ifdef USE_CLEARCOATMAP + material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x; + #endif + #ifdef USE_CLEARCOAT_ROUGHNESSMAP + material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y; + #endif + material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); + material.clearcoatRoughness += geometryRoughness; + material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); +#endif +#ifdef USE_IRIDESCENCE + material.iridescence = iridescence; + material.iridescenceIOR = iridescenceIOR; + #ifdef USE_IRIDESCENCEMAP + material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r; + #endif + #ifdef USE_IRIDESCENCE_THICKNESSMAP + material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum; + #else + material.iridescenceThickness = iridescenceThicknessMaximum; + #endif +#endif +#ifdef USE_SHEEN + material.sheenColor = sheenColor; + #ifdef USE_SHEEN_COLORMAP + material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb; + #endif + material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 ); + #ifdef USE_SHEEN_ROUGHNESSMAP + material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; + #endif +#endif`,nH=`struct PhysicalMaterial { + vec3 diffuseColor; + float roughness; + vec3 specularColor; + float specularF90; + #ifdef USE_CLEARCOAT + float clearcoat; + float clearcoatRoughness; + vec3 clearcoatF0; + float clearcoatF90; + #endif + #ifdef USE_IRIDESCENCE + float iridescence; + float iridescenceIOR; + float iridescenceThickness; + vec3 iridescenceFresnel; + vec3 iridescenceF0; + #endif + #ifdef USE_SHEEN + vec3 sheenColor; + float sheenRoughness; + #endif + #ifdef IOR + float ior; + #endif + #ifdef USE_TRANSMISSION + float transmission; + float transmissionAlpha; + float thickness; + float attenuationDistance; + vec3 attenuationColor; + #endif +}; +vec3 clearcoatSpecular = vec3( 0.0 ); +vec3 sheenSpecular = vec3( 0.0 ); +vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { + float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); + float x2 = x * x; + float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); + return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); +} +float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { + float a2 = pow2( alpha ); + float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); + float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); + return 0.5 / max( gv + gl, EPSILON ); +} +float D_GGX( const in float alpha, const in float dotNH ) { + float a2 = pow2( alpha ); + float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; + return RECIPROCAL_PI * a2 / pow2( denom ); +} +#ifdef USE_CLEARCOAT + vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) { + vec3 f0 = material.clearcoatF0; + float f90 = material.clearcoatF90; + float roughness = material.clearcoatRoughness; + float alpha = pow2( roughness ); + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float dotVH = saturate( dot( viewDir, halfDir ) ); + vec3 F = F_Schlick( f0, f90, dotVH ); + float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); + float D = D_GGX( alpha, dotNH ); + return F * ( V * D ); + } +#endif +vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { + vec3 f0 = material.specularColor; + float f90 = material.specularF90; + float roughness = material.roughness; + float alpha = pow2( roughness ); + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float dotVH = saturate( dot( viewDir, halfDir ) ); + vec3 F = F_Schlick( f0, f90, dotVH ); + #ifdef USE_IRIDESCENCE + F = mix( F, material.iridescenceFresnel, material.iridescence ); + #endif + float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); + float D = D_GGX( alpha, dotNH ); + return F * ( V * D ); +} +vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { + const float LUT_SIZE = 64.0; + const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; + const float LUT_BIAS = 0.5 / LUT_SIZE; + float dotNV = saturate( dot( N, V ) ); + vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); + uv = uv * LUT_SCALE + LUT_BIAS; + return uv; +} +float LTC_ClippedSphereFormFactor( const in vec3 f ) { + float l = length( f ); + return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); +} +vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { + float x = dot( v1, v2 ); + float y = abs( x ); + float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; + float b = 3.4175940 + ( 4.1616724 + y ) * y; + float v = a / b; + float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; + return cross( v1, v2 ) * theta_sintheta; +} +vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { + vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; + vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; + vec3 lightNormal = cross( v1, v2 ); + if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); + vec3 T1, T2; + T1 = normalize( V - N * dot( V, N ) ); + T2 = - cross( N, T1 ); + mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) ); + vec3 coords[ 4 ]; + coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); + coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); + coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); + coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); + coords[ 0 ] = normalize( coords[ 0 ] ); + coords[ 1 ] = normalize( coords[ 1 ] ); + coords[ 2 ] = normalize( coords[ 2 ] ); + coords[ 3 ] = normalize( coords[ 3 ] ); + vec3 vectorFormFactor = vec3( 0.0 ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); + float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); + return vec3( result ); +} +#if defined( USE_SHEEN ) +float D_Charlie( float roughness, float dotNH ) { + float alpha = pow2( roughness ); + float invAlpha = 1.0 / alpha; + float cos2h = dotNH * dotNH; + float sin2h = max( 1.0 - cos2h, 0.0078125 ); + return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); +} +float V_Neubelt( float dotNV, float dotNL ) { + return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); +} +vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float D = D_Charlie( sheenRoughness, dotNH ); + float V = V_Neubelt( dotNV, dotNL ); + return sheenColor * ( D * V ); +} +#endif +float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { + float dotNV = saturate( dot( normal, viewDir ) ); + float r2 = roughness * roughness; + float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95; + float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72; + float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) ); + return saturate( DG * RECIPROCAL_PI ); +} +vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { + float dotNV = saturate( dot( normal, viewDir ) ); + const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 ); + const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 ); + vec4 r = roughness * c0 + c1; + float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y; + vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw; + return fab; +} +vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { + vec2 fab = DFGApprox( normal, viewDir, roughness ); + return specularColor * fab.x + specularF90 * fab.y; +} +#ifdef USE_IRIDESCENCE +void 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 ) { +#else +void 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 ) { +#endif + vec2 fab = DFGApprox( normal, viewDir, roughness ); + #ifdef USE_IRIDESCENCE + vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); + #else + vec3 Fr = specularColor; + #endif + vec3 FssEss = Fr * fab.x + specularF90 * fab.y; + float Ess = fab.x + fab.y; + float Ems = 1.0 - Ess; + vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); + singleScatter += FssEss; + multiScatter += Fms * Ems; +} +#if NUM_RECT_AREA_LIGHTS > 0 + void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + vec3 normal = geometry.normal; + vec3 viewDir = geometry.viewDir; + vec3 position = geometry.position; + vec3 lightPos = rectAreaLight.position; + vec3 halfWidth = rectAreaLight.halfWidth; + vec3 halfHeight = rectAreaLight.halfHeight; + vec3 lightColor = rectAreaLight.color; + float roughness = material.roughness; + vec3 rectCoords[ 4 ]; + rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; + rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; + rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; + vec2 uv = LTC_Uv( normal, viewDir, roughness ); + vec4 t1 = texture2D( ltc_1, uv ); + vec4 t2 = texture2D( ltc_2, uv ); + mat3 mInv = mat3( + vec3( t1.x, 0, t1.y ), + vec3( 0, 1, 0 ), + vec3( t1.z, 0, t1.w ) + ); + vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); + reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); + reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); + } +#endif +void RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + #ifdef USE_CLEARCOAT + float dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) ); + vec3 ccIrradiance = dotNLcc * directLight.color; + clearcoatSpecular += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material ); + #endif + #ifdef USE_SHEEN + sheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness ); + #endif + reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material ); + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) { + #ifdef USE_CLEARCOAT + clearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); + #endif + #ifdef USE_SHEEN + sheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness ); + #endif + vec3 singleScattering = vec3( 0.0 ); + vec3 multiScattering = vec3( 0.0 ); + vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; + #ifdef USE_IRIDESCENCE + computeMultiscatteringIridescence( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering ); + #else + computeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering ); + #endif + vec3 totalScattering = singleScattering + multiScattering; + vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) ); + reflectedLight.indirectSpecular += radiance * singleScattering; + reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; + reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; +} +#define RE_Direct RE_Direct_Physical +#define RE_Direct_RectArea RE_Direct_RectArea_Physical +#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical +#define RE_IndirectSpecular RE_IndirectSpecular_Physical +float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { + return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); +}`,iH=` +GeometricContext geometry; +geometry.position = - vViewPosition; +geometry.normal = normal; +geometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); +#ifdef USE_CLEARCOAT + geometry.clearcoatNormal = clearcoatNormal; +#endif +#ifdef USE_IRIDESCENCE + float dotNVi = saturate( dot( normal, geometry.viewDir ) ); + if ( material.iridescenceThickness == 0.0 ) { + material.iridescence = 0.0; + } else { + material.iridescence = saturate( material.iridescence ); + } + if ( material.iridescence > 0.0 ) { + material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); + material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); + } +#endif +IncidentLight directLight; +#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) + PointLight pointLight; + #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 + PointLightShadow pointLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { + pointLight = pointLights[ i ]; + getPointLightInfo( pointLight, geometry, directLight ); + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) + pointLightShadow = pointLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; + #endif + RE_Direct( directLight, geometry, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) + SpotLight spotLight; + vec4 spotColor; + vec3 spotLightCoord; + bool inSpotLightMap; + #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 + SpotLightShadow spotLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { + spotLight = spotLights[ i ]; + getSpotLightInfo( spotLight, geometry, directLight ); + #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) + #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX + #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS + #else + #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) + #endif + #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) + spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; + inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); + spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); + directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; + #endif + #undef SPOT_LIGHT_MAP_INDEX + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + spotLightShadow = spotLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; + #endif + RE_Direct( directLight, geometry, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) + DirectionalLight directionalLight; + #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 + DirectionalLightShadow directionalLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { + directionalLight = directionalLights[ i ]; + getDirectionalLightInfo( directionalLight, geometry, directLight ); + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) + directionalLightShadow = directionalLightShadows[ i ]; + directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + #endif + RE_Direct( directLight, geometry, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) + RectAreaLight rectAreaLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { + rectAreaLight = rectAreaLights[ i ]; + RE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if defined( RE_IndirectDiffuse ) + vec3 iblIrradiance = vec3( 0.0 ); + vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); + irradiance += getLightProbeIrradiance( lightProbe, geometry.normal ); + #if ( NUM_HEMI_LIGHTS > 0 ) + #pragma unroll_loop_start + for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { + irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal ); + } + #pragma unroll_loop_end + #endif +#endif +#if defined( RE_IndirectSpecular ) + vec3 radiance = vec3( 0.0 ); + vec3 clearcoatRadiance = vec3( 0.0 ); +#endif`,rH=`#if defined( RE_IndirectDiffuse ) + #ifdef USE_LIGHTMAP + vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); + vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; + irradiance += lightMapIrradiance; + #endif + #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) + iblIrradiance += getIBLIrradiance( geometry.normal ); + #endif +#endif +#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) + radiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness ); + #ifdef USE_CLEARCOAT + clearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness ); + #endif +#endif`,sH=`#if defined( RE_IndirectDiffuse ) + RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight ); +#endif +#if defined( RE_IndirectSpecular ) + RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight ); +#endif`,oH=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) + gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; +#endif`,aH=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) + uniform float logDepthBufFC; + varying float vFragDepth; + varying float vIsPerspective; +#endif`,lH=`#ifdef USE_LOGDEPTHBUF + #ifdef USE_LOGDEPTHBUF_EXT + varying float vFragDepth; + varying float vIsPerspective; + #else + uniform float logDepthBufFC; + #endif +#endif`,uH=`#ifdef USE_LOGDEPTHBUF + #ifdef USE_LOGDEPTHBUF_EXT + vFragDepth = 1.0 + gl_Position.w; + vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); + #else + if ( isPerspectiveMatrix( projectionMatrix ) ) { + gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0; + gl_Position.z *= gl_Position.w; + } + #endif +#endif`,cH=`#ifdef USE_MAP + vec4 sampledDiffuseColor = texture2D( map, vMapUv ); + #ifdef DECODE_VIDEO_TEXTURE + sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w ); + #endif + diffuseColor *= sampledDiffuseColor; +#endif`,fH=`#ifdef USE_MAP + uniform sampler2D map; +#endif`,hH=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) + #if defined( USE_POINTS_UV ) + vec2 uv = vUv; + #else + vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; + #endif +#endif +#ifdef USE_MAP + diffuseColor *= texture2D( map, uv ); +#endif +#ifdef USE_ALPHAMAP + diffuseColor.a *= texture2D( alphaMap, uv ).g; +#endif`,dH=`#if defined( USE_POINTS_UV ) + varying vec2 vUv; +#else + #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) + uniform mat3 uvTransform; + #endif +#endif +#ifdef USE_MAP + uniform sampler2D map; +#endif +#ifdef USE_ALPHAMAP + uniform sampler2D alphaMap; +#endif`,pH=`float metalnessFactor = metalness; +#ifdef USE_METALNESSMAP + vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); + metalnessFactor *= texelMetalness.b; +#endif`,mH=`#ifdef USE_METALNESSMAP + uniform sampler2D metalnessMap; +#endif`,gH=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) + vColor *= morphTargetBaseInfluence; + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + #if defined( USE_COLOR_ALPHA ) + if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; + #elif defined( USE_COLOR ) + if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; + #endif + } +#endif`,vH=`#ifdef USE_MORPHNORMALS + objectNormal *= morphTargetBaseInfluence; + #ifdef MORPHTARGETS_TEXTURE + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; + } + #else + objectNormal += morphNormal0 * morphTargetInfluences[ 0 ]; + objectNormal += morphNormal1 * morphTargetInfluences[ 1 ]; + objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; + objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; + #endif +#endif`,yH=`#ifdef USE_MORPHTARGETS + uniform float morphTargetBaseInfluence; + #ifdef MORPHTARGETS_TEXTURE + uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; + uniform sampler2DArray morphTargetsTexture; + uniform ivec2 morphTargetsTextureSize; + vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { + int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; + int y = texelIndex / morphTargetsTextureSize.x; + int x = texelIndex - y * morphTargetsTextureSize.x; + ivec3 morphUV = ivec3( x, y, morphTargetIndex ); + return texelFetch( morphTargetsTexture, morphUV, 0 ); + } + #else + #ifndef USE_MORPHNORMALS + uniform float morphTargetInfluences[ 8 ]; + #else + uniform float morphTargetInfluences[ 4 ]; + #endif + #endif +#endif`,xH=`#ifdef USE_MORPHTARGETS + transformed *= morphTargetBaseInfluence; + #ifdef MORPHTARGETS_TEXTURE + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; + } + #else + transformed += morphTarget0 * morphTargetInfluences[ 0 ]; + transformed += morphTarget1 * morphTargetInfluences[ 1 ]; + transformed += morphTarget2 * morphTargetInfluences[ 2 ]; + transformed += morphTarget3 * morphTargetInfluences[ 3 ]; + #ifndef USE_MORPHNORMALS + transformed += morphTarget4 * morphTargetInfluences[ 4 ]; + transformed += morphTarget5 * morphTargetInfluences[ 5 ]; + transformed += morphTarget6 * morphTargetInfluences[ 6 ]; + transformed += morphTarget7 * morphTargetInfluences[ 7 ]; + #endif + #endif +#endif`,_H=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#ifdef FLAT_SHADED + vec3 fdx = dFdx( vViewPosition ); + vec3 fdy = dFdy( vViewPosition ); + vec3 normal = normalize( cross( fdx, fdy ) ); +#else + vec3 normal = normalize( vNormal ); + #ifdef DOUBLE_SIDED + normal *= faceDirection; + #endif +#endif +#ifdef USE_NORMALMAP_TANGENTSPACE + #ifdef USE_TANGENT + mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); + #else + mat3 tbn = getTangentFrame( - vViewPosition, normal, vNormalMapUv ); + #endif + #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) + tbn[0] *= faceDirection; + tbn[1] *= faceDirection; + #endif +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + #ifdef USE_TANGENT + mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); + #else + mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv ); + #endif + #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) + tbn2[0] *= faceDirection; + tbn2[1] *= faceDirection; + #endif +#endif +vec3 geometryNormal = normal;`,SH=`#ifdef USE_NORMALMAP_OBJECTSPACE + normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; + #ifdef FLIP_SIDED + normal = - normal; + #endif + #ifdef DOUBLE_SIDED + normal = normal * faceDirection; + #endif + normal = normalize( normalMatrix * normal ); +#elif defined( USE_NORMALMAP_TANGENTSPACE ) + vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; + mapN.xy *= normalScale; + normal = normalize( tbn * mapN ); +#elif defined( USE_BUMPMAP ) + normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); +#endif`,wH=`#ifndef FLAT_SHADED + varying vec3 vNormal; + #ifdef USE_TANGENT + varying vec3 vTangent; + varying vec3 vBitangent; + #endif +#endif`,MH=`#ifndef FLAT_SHADED + varying vec3 vNormal; + #ifdef USE_TANGENT + varying vec3 vTangent; + varying vec3 vBitangent; + #endif +#endif`,AH=`#ifndef FLAT_SHADED + vNormal = normalize( transformedNormal ); + #ifdef USE_TANGENT + vTangent = normalize( transformedTangent ); + vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); + #endif +#endif`,EH=`#ifdef USE_NORMALMAP + uniform sampler2D normalMap; + uniform vec2 normalScale; +#endif +#ifdef USE_NORMALMAP_OBJECTSPACE + uniform mat3 normalMatrix; +#endif +#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) ) + mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) { + vec3 q0 = dFdx( eye_pos.xyz ); + vec3 q1 = dFdy( eye_pos.xyz ); + vec2 st0 = dFdx( uv.st ); + vec2 st1 = dFdy( uv.st ); + vec3 N = surf_norm; + vec3 q1perp = cross( q1, N ); + vec3 q0perp = cross( N, q0 ); + vec3 T = q1perp * st0.x + q0perp * st1.x; + vec3 B = q1perp * st0.y + q0perp * st1.y; + float det = max( dot( T, T ), dot( B, B ) ); + float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); + return mat3( T * scale, B * scale, N ); + } +#endif`,bH=`#ifdef USE_CLEARCOAT + vec3 clearcoatNormal = geometryNormal; +#endif`,TH=`#ifdef USE_CLEARCOAT_NORMALMAP + vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; + clearcoatMapN.xy *= clearcoatNormalScale; + clearcoatNormal = normalize( tbn2 * clearcoatMapN ); +#endif`,CH=`#ifdef USE_CLEARCOATMAP + uniform sampler2D clearcoatMap; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + uniform sampler2D clearcoatNormalMap; + uniform vec2 clearcoatNormalScale; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + uniform sampler2D clearcoatRoughnessMap; +#endif`,PH=`#ifdef USE_IRIDESCENCEMAP + uniform sampler2D iridescenceMap; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + uniform sampler2D iridescenceThicknessMap; +#endif`,LH=`#ifdef OPAQUE +diffuseColor.a = 1.0; +#endif +#ifdef USE_TRANSMISSION +diffuseColor.a *= material.transmissionAlpha + 0.1; +#endif +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,RH=`vec3 packNormalToRGB( const in vec3 normal ) { + return normalize( normal ) * 0.5 + 0.5; +} +vec3 unpackRGBToNormal( const in vec3 rgb ) { + return 2.0 * rgb.xyz - 1.0; +} +const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.; +const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. ); +const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. ); +const float ShiftRight8 = 1. / 256.; +vec4 packDepthToRGBA( const in float v ) { + vec4 r = vec4( fract( v * PackFactors ), v ); + r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale; +} +float unpackRGBAToDepth( const in vec4 v ) { + return dot( v, UnpackFactors ); +} +vec2 packDepthToRG( in highp float v ) { + return packDepthToRGBA( v ).yx; +} +float unpackRGToDepth( const in highp vec2 v ) { + return unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) ); +} +vec4 pack2HalfToRGBA( vec2 v ) { + vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); + return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); +} +vec2 unpackRGBATo2Half( vec4 v ) { + return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); +} +float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { + return ( viewZ + near ) / ( near - far ); +} +float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) { + return depth * ( near - far ) - near; +} +float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { + return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); +} +float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { + return ( near * far ) / ( ( far - near ) * depth - far ); +}`,IH=`#ifdef PREMULTIPLIED_ALPHA + gl_FragColor.rgb *= gl_FragColor.a; +#endif`,DH=`vec4 mvPosition = vec4( transformed, 1.0 ); +#ifdef USE_INSTANCING + mvPosition = instanceMatrix * mvPosition; +#endif +mvPosition = modelViewMatrix * mvPosition; +gl_Position = projectionMatrix * mvPosition;`,NH=`#ifdef DITHERING + gl_FragColor.rgb = dithering( gl_FragColor.rgb ); +#endif`,kH=`#ifdef DITHERING + vec3 dithering( vec3 color ) { + float grid_position = rand( gl_FragCoord.xy ); + vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); + dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); + return color + dither_shift_RGB; + } +#endif`,OH=`float roughnessFactor = roughness; +#ifdef USE_ROUGHNESSMAP + vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); + roughnessFactor *= texelRoughness.g; +#endif`,UH=`#ifdef USE_ROUGHNESSMAP + uniform sampler2D roughnessMap; +#endif`,zH=`#if NUM_SPOT_LIGHT_COORDS > 0 + varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; +#endif +#if NUM_SPOT_LIGHT_MAPS > 0 + uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; +#endif +#ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 + uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; + varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; + struct DirectionalLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; + struct SpotLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; + varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; + struct PointLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + float shadowCameraNear; + float shadowCameraFar; + }; + uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; + #endif + float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { + return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); + } + vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { + return unpackRGBATo2Half( texture2D( shadow, uv ) ); + } + float VSMShadow (sampler2D shadow, vec2 uv, float compare ){ + float occlusion = 1.0; + vec2 distribution = texture2DDistribution( shadow, uv ); + float hard_shadow = step( compare , distribution.x ); + if (hard_shadow != 1.0 ) { + float distance = compare - distribution.x ; + float variance = max( 0.00000, distribution.y * distribution.y ); + float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 ); + } + return occlusion; + } + float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) { + float shadow = 1.0; + shadowCoord.xyz /= shadowCoord.w; + shadowCoord.z += shadowBias; + bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; + bool frustumTest = inFrustum && shadowCoord.z <= 1.0; + if ( frustumTest ) { + #if defined( SHADOWMAP_TYPE_PCF ) + vec2 texelSize = vec2( 1.0 ) / shadowMapSize; + float dx0 = - texelSize.x * shadowRadius; + float dy0 = - texelSize.y * shadowRadius; + float dx1 = + texelSize.x * shadowRadius; + float dy1 = + texelSize.y * shadowRadius; + float dx2 = dx0 / 2.0; + float dy2 = dy0 / 2.0; + float dx3 = dx1 / 2.0; + float dy3 = dy1 / 2.0; + shadow = ( + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) + ) * ( 1.0 / 17.0 ); + #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) + vec2 texelSize = vec2( 1.0 ) / shadowMapSize; + float dx = texelSize.x; + float dy = texelSize.y; + vec2 uv = shadowCoord.xy; + vec2 f = fract( uv * shadowMapSize + 0.5 ); + uv -= f * texelSize; + shadow = ( + texture2DCompare( shadowMap, uv, shadowCoord.z ) + + texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + + texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + + mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), + f.x ) + + mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), + f.x ) + + mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), + f.y ) + + mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), + f.y ) + + mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), + f.x ), + mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), + f.x ), + f.y ) + ) * ( 1.0 / 9.0 ); + #elif defined( SHADOWMAP_TYPE_VSM ) + shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); + #else + shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); + #endif + } + return shadow; + } + vec2 cubeToUV( vec3 v, float texelSizeY ) { + vec3 absV = abs( v ); + float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); + absV *= scaleToCube; + v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); + vec2 planar = v.xy; + float almostATexel = 1.5 * texelSizeY; + float almostOne = 1.0 - almostATexel; + if ( absV.z >= almostOne ) { + if ( v.z > 0.0 ) + planar.x = 4.0 - v.x; + } else if ( absV.x >= almostOne ) { + float signX = sign( v.x ); + planar.x = v.z * signX + 2.0 * signX; + } else if ( absV.y >= almostOne ) { + float signY = sign( v.y ); + planar.x = v.x + 2.0 * signY + 2.0; + planar.y = v.z * signY - 2.0; + } + return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); + } + float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { + vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); + vec3 lightToPosition = shadowCoord.xyz; + float dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; + vec3 bd3D = normalize( lightToPosition ); + #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) + vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; + return ( + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) + ) * ( 1.0 / 9.0 ); + #else + return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); + #endif + } +#endif`,FH=`#if NUM_SPOT_LIGHT_COORDS > 0 + uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; + varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; +#endif +#ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 + uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; + varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; + struct DirectionalLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + struct SpotLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; + varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; + struct PointLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + float shadowCameraNear; + float shadowCameraFar; + }; + uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; + #endif +#endif`,BH=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) + vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); + vec4 shadowWorldPosition; +#endif +#if defined( USE_SHADOWMAP ) + #if NUM_DIR_LIGHT_SHADOWS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { + shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); + vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { + shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); + vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end + #endif +#endif +#if NUM_SPOT_LIGHT_COORDS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { + shadowWorldPosition = worldPosition; + #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; + #endif + vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end +#endif`,VH=`float getShadowMask() { + float shadow = 1.0; + #ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 + DirectionalLightShadow directionalLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { + directionalLight = directionalLightShadows[ i ]; + shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + } + #pragma unroll_loop_end + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + SpotLightShadow spotLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { + spotLight = spotLightShadows[ i ]; + shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; + } + #pragma unroll_loop_end + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + PointLightShadow pointLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { + pointLight = pointLightShadows[ i ]; + shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; + } + #pragma unroll_loop_end + #endif + #endif + return shadow; +}`,HH=`#ifdef USE_SKINNING + mat4 boneMatX = getBoneMatrix( skinIndex.x ); + mat4 boneMatY = getBoneMatrix( skinIndex.y ); + mat4 boneMatZ = getBoneMatrix( skinIndex.z ); + mat4 boneMatW = getBoneMatrix( skinIndex.w ); +#endif`,WH=`#ifdef USE_SKINNING + uniform mat4 bindMatrix; + uniform mat4 bindMatrixInverse; + uniform highp sampler2D boneTexture; + uniform int boneTextureSize; + mat4 getBoneMatrix( const in float i ) { + float j = i * 4.0; + float x = mod( j, float( boneTextureSize ) ); + float y = floor( j / float( boneTextureSize ) ); + float dx = 1.0 / float( boneTextureSize ); + float dy = 1.0 / float( boneTextureSize ); + y = dy * ( y + 0.5 ); + vec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) ); + vec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) ); + vec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) ); + vec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) ); + mat4 bone = mat4( v1, v2, v3, v4 ); + return bone; + } +#endif`,GH=`#ifdef USE_SKINNING + vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); + vec4 skinned = vec4( 0.0 ); + skinned += boneMatX * skinVertex * skinWeight.x; + skinned += boneMatY * skinVertex * skinWeight.y; + skinned += boneMatZ * skinVertex * skinWeight.z; + skinned += boneMatW * skinVertex * skinWeight.w; + transformed = ( bindMatrixInverse * skinned ).xyz; +#endif`,jH=`#ifdef USE_SKINNING + mat4 skinMatrix = mat4( 0.0 ); + skinMatrix += skinWeight.x * boneMatX; + skinMatrix += skinWeight.y * boneMatY; + skinMatrix += skinWeight.z * boneMatZ; + skinMatrix += skinWeight.w * boneMatW; + skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; + objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; + #ifdef USE_TANGENT + objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; + #endif +#endif`,XH=`float specularStrength; +#ifdef USE_SPECULARMAP + vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); + specularStrength = texelSpecular.r; +#else + specularStrength = 1.0; +#endif`,YH=`#ifdef USE_SPECULARMAP + uniform sampler2D specularMap; +#endif`,qH=`#if defined( TONE_MAPPING ) + gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); +#endif`,ZH=`#ifndef saturate +#define saturate( a ) clamp( a, 0.0, 1.0 ) +#endif +uniform float toneMappingExposure; +vec3 LinearToneMapping( vec3 color ) { + return toneMappingExposure * color; +} +vec3 ReinhardToneMapping( vec3 color ) { + color *= toneMappingExposure; + return saturate( color / ( vec3( 1.0 ) + color ) ); +} +vec3 OptimizedCineonToneMapping( vec3 color ) { + color *= toneMappingExposure; + color = max( vec3( 0.0 ), color - 0.004 ); + return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); +} +vec3 RRTAndODTFit( vec3 v ) { + vec3 a = v * ( v + 0.0245786 ) - 0.000090537; + vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; + return a / b; +} +vec3 ACESFilmicToneMapping( vec3 color ) { + const mat3 ACESInputMat = mat3( + vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), + vec3( 0.04823, 0.01566, 0.83777 ) + ); + const mat3 ACESOutputMat = mat3( + vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), + vec3( -0.07367, -0.00605, 1.07602 ) + ); + color *= toneMappingExposure / 0.6; + color = ACESInputMat * color; + color = RRTAndODTFit( color ); + color = ACESOutputMat * color; + return saturate( color ); +} +vec3 CustomToneMapping( vec3 color ) { return color; }`,JH=`#ifdef USE_TRANSMISSION + material.transmission = transmission; + material.transmissionAlpha = 1.0; + material.thickness = thickness; + material.attenuationDistance = attenuationDistance; + material.attenuationColor = attenuationColor; + #ifdef USE_TRANSMISSIONMAP + material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r; + #endif + #ifdef USE_THICKNESSMAP + material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g; + #endif + vec3 pos = vWorldPosition; + vec3 v = normalize( cameraPosition - pos ); + vec3 n = inverseTransformDirection( normal, viewMatrix ); + vec4 transmission = getIBLVolumeRefraction( + n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90, + pos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness, + material.attenuationColor, material.attenuationDistance ); + material.transmissionAlpha = mix( material.transmissionAlpha, transmission.a, material.transmission ); + totalDiffuse = mix( totalDiffuse, transmission.rgb, material.transmission ); +#endif`,KH=`#ifdef USE_TRANSMISSION + uniform float transmission; + uniform float thickness; + uniform float attenuationDistance; + uniform vec3 attenuationColor; + #ifdef USE_TRANSMISSIONMAP + uniform sampler2D transmissionMap; + #endif + #ifdef USE_THICKNESSMAP + uniform sampler2D thicknessMap; + #endif + uniform vec2 transmissionSamplerSize; + uniform sampler2D transmissionSamplerMap; + uniform mat4 modelMatrix; + uniform mat4 projectionMatrix; + varying vec3 vWorldPosition; + float w0( float a ) { + return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 ); + } + float w1( float a ) { + return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 ); + } + float w2( float a ){ + return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 ); + } + float w3( float a ) { + return ( 1.0 / 6.0 ) * ( a * a * a ); + } + float g0( float a ) { + return w0( a ) + w1( a ); + } + float g1( float a ) { + return w2( a ) + w3( a ); + } + float h0( float a ) { + return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) ); + } + float h1( float a ) { + return 1.0 + w3( a ) / ( w2( a ) + w3( a ) ); + } + vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, vec2 fullSize, float lod ) { + uv = uv * texelSize.zw + 0.5; + vec2 iuv = floor( uv ); + vec2 fuv = fract( uv ); + float g0x = g0( fuv.x ); + float g1x = g1( fuv.x ); + float h0x = h0( fuv.x ); + float h1x = h1( fuv.x ); + float h0y = h0( fuv.y ); + float h1y = h1( fuv.y ); + vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; + vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; + vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; + vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; + + vec2 lodFudge = pow( 1.95, lod ) / fullSize; + return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + + g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); + } + vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) { + vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) ); + vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) ); + vec2 fLodSizeInv = 1.0 / fLodSize; + vec2 cLodSizeInv = 1.0 / cLodSize; + vec2 fullSize = vec2( textureSize( sampler, 0 ) ); + vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), fullSize, floor( lod ) ); + vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), fullSize, ceil( lod ) ); + return mix( fSample, cSample, fract( lod ) ); + } + vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { + vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); + vec3 modelScale; + modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); + modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); + modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); + return normalize( refractionVector ) * thickness * modelScale; + } + float applyIorToRoughness( const in float roughness, const in float ior ) { + return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); + } + vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { + float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); + return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod ); + } + vec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { + if ( isinf( attenuationDistance ) ) { + return radiance; + } else { + vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; + vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance * radiance; + } + } + vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, + const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, + const in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness, + const in vec3 attenuationColor, const in float attenuationDistance ) { + vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); + vec3 refractedRayExit = position + transmissionRay; + vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); + vec2 refractionCoords = ndcPos.xy / ndcPos.w; + refractionCoords += 1.0; + refractionCoords /= 2.0; + vec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); + vec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance ); + vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); + return vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a ); + } +#endif`,QH=`#ifdef USE_UV + varying vec2 vUv; +#endif +#ifdef USE_MAP + varying vec2 vMapUv; +#endif +#ifdef USE_ALPHAMAP + varying vec2 vAlphaMapUv; +#endif +#ifdef USE_LIGHTMAP + varying vec2 vLightMapUv; +#endif +#ifdef USE_AOMAP + varying vec2 vAoMapUv; +#endif +#ifdef USE_BUMPMAP + varying vec2 vBumpMapUv; +#endif +#ifdef USE_NORMALMAP + varying vec2 vNormalMapUv; +#endif +#ifdef USE_EMISSIVEMAP + varying vec2 vEmissiveMapUv; +#endif +#ifdef USE_METALNESSMAP + varying vec2 vMetalnessMapUv; +#endif +#ifdef USE_ROUGHNESSMAP + varying vec2 vRoughnessMapUv; +#endif +#ifdef USE_CLEARCOATMAP + varying vec2 vClearcoatMapUv; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + varying vec2 vClearcoatNormalMapUv; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + varying vec2 vClearcoatRoughnessMapUv; +#endif +#ifdef USE_IRIDESCENCEMAP + varying vec2 vIridescenceMapUv; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + varying vec2 vIridescenceThicknessMapUv; +#endif +#ifdef USE_SHEEN_COLORMAP + varying vec2 vSheenColorMapUv; +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + varying vec2 vSheenRoughnessMapUv; +#endif +#ifdef USE_SPECULARMAP + varying vec2 vSpecularMapUv; +#endif +#ifdef USE_SPECULAR_COLORMAP + varying vec2 vSpecularColorMapUv; +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + varying vec2 vSpecularIntensityMapUv; +#endif +#ifdef USE_TRANSMISSIONMAP + uniform mat3 transmissionMapTransform; + varying vec2 vTransmissionMapUv; +#endif +#ifdef USE_THICKNESSMAP + uniform mat3 thicknessMapTransform; + varying vec2 vThicknessMapUv; +#endif`,$H=`#ifdef USE_UV + varying vec2 vUv; +#endif +#ifdef USE_UV2 + attribute vec2 uv2; +#endif +#ifdef USE_MAP + uniform mat3 mapTransform; + varying vec2 vMapUv; +#endif +#ifdef USE_ALPHAMAP + uniform mat3 alphaMapTransform; + varying vec2 vAlphaMapUv; +#endif +#ifdef USE_LIGHTMAP + uniform mat3 lightMapTransform; + varying vec2 vLightMapUv; +#endif +#ifdef USE_AOMAP + uniform mat3 aoMapTransform; + varying vec2 vAoMapUv; +#endif +#ifdef USE_BUMPMAP + uniform mat3 bumpMapTransform; + varying vec2 vBumpMapUv; +#endif +#ifdef USE_NORMALMAP + uniform mat3 normalMapTransform; + varying vec2 vNormalMapUv; +#endif +#ifdef USE_DISPLACEMENTMAP + uniform mat3 displacementMapTransform; + varying vec2 vDisplacementMapUv; +#endif +#ifdef USE_EMISSIVEMAP + uniform mat3 emissiveMapTransform; + varying vec2 vEmissiveMapUv; +#endif +#ifdef USE_METALNESSMAP + uniform mat3 metalnessMapTransform; + varying vec2 vMetalnessMapUv; +#endif +#ifdef USE_ROUGHNESSMAP + uniform mat3 roughnessMapTransform; + varying vec2 vRoughnessMapUv; +#endif +#ifdef USE_CLEARCOATMAP + uniform mat3 clearcoatMapTransform; + varying vec2 vClearcoatMapUv; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + uniform mat3 clearcoatNormalMapTransform; + varying vec2 vClearcoatNormalMapUv; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + uniform mat3 clearcoatRoughnessMapTransform; + varying vec2 vClearcoatRoughnessMapUv; +#endif +#ifdef USE_SHEEN_COLORMAP + uniform mat3 sheenColorMapTransform; + varying vec2 vSheenColorMapUv; +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + uniform mat3 sheenRoughnessMapTransform; + varying vec2 vSheenRoughnessMapUv; +#endif +#ifdef USE_IRIDESCENCEMAP + uniform mat3 iridescenceMapTransform; + varying vec2 vIridescenceMapUv; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + uniform mat3 iridescenceThicknessMapTransform; + varying vec2 vIridescenceThicknessMapUv; +#endif +#ifdef USE_SPECULARMAP + uniform mat3 specularMapTransform; + varying vec2 vSpecularMapUv; +#endif +#ifdef USE_SPECULAR_COLORMAP + uniform mat3 specularColorMapTransform; + varying vec2 vSpecularColorMapUv; +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + uniform mat3 specularIntensityMapTransform; + varying vec2 vSpecularIntensityMapUv; +#endif +#ifdef USE_TRANSMISSIONMAP + uniform mat3 transmissionMapTransform; + varying vec2 vTransmissionMapUv; +#endif +#ifdef USE_THICKNESSMAP + uniform mat3 thicknessMapTransform; + varying vec2 vThicknessMapUv; +#endif`,e8=`#ifdef USE_UV + vUv = vec3( uv, 1 ).xy; +#endif +#ifdef USE_MAP + vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy; +#endif +#ifdef USE_ALPHAMAP + vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_LIGHTMAP + vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_AOMAP + vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_BUMPMAP + vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_NORMALMAP + vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_DISPLACEMENTMAP + vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_EMISSIVEMAP + vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_METALNESSMAP + vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_ROUGHNESSMAP + vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_CLEARCOATMAP + vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_IRIDESCENCEMAP + vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SHEEN_COLORMAP + vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SHEEN_ROUGHNESSMAP + vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SPECULARMAP + vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SPECULAR_COLORMAP + vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_SPECULAR_INTENSITYMAP + vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_TRANSMISSIONMAP + vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy; +#endif +#ifdef USE_THICKNESSMAP + vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; +#endif`,t8=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 + vec4 worldPosition = vec4( transformed, 1.0 ); + #ifdef USE_INSTANCING + worldPosition = instanceMatrix * worldPosition; + #endif + worldPosition = modelMatrix * worldPosition; +#endif`;const n8=`varying vec2 vUv; +uniform mat3 uvTransform; +void main() { + vUv = ( uvTransform * vec3( uv, 1 ) ).xy; + gl_Position = vec4( position.xy, 1.0, 1.0 ); +}`,i8=`uniform sampler2D t2D; +uniform float backgroundIntensity; +varying vec2 vUv; +void main() { + vec4 texColor = texture2D( t2D, vUv ); + #ifdef DECODE_VIDEO_TEXTURE + 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 ); + #endif + texColor.rgb *= backgroundIntensity; + gl_FragColor = texColor; + #include + #include +}`,r8=`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include + gl_Position.z = gl_Position.w; +}`,s8=`#ifdef ENVMAP_TYPE_CUBE + uniform samplerCube envMap; +#elif defined( ENVMAP_TYPE_CUBE_UV ) + uniform sampler2D envMap; +#endif +uniform float flipEnvMap; +uniform float backgroundBlurriness; +uniform float backgroundIntensity; +varying vec3 vWorldDirection; +#include +void main() { + #ifdef ENVMAP_TYPE_CUBE + vec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); + #elif defined( ENVMAP_TYPE_CUBE_UV ) + vec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness ); + #else + vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + #endif + texColor.rgb *= backgroundIntensity; + gl_FragColor = texColor; + #include + #include +}`,o8=`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include + gl_Position.z = gl_Position.w; +}`,a8=`uniform samplerCube tCube; +uniform float tFlip; +uniform float opacity; +varying vec3 vWorldDirection; +void main() { + vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); + gl_FragColor = texColor; + gl_FragColor.a *= opacity; + #include + #include +}`,l8=`#include +#include +#include +#include +#include +#include +#include +varying vec2 vHighPrecisionZW; +void main() { + #include + #include + #ifdef USE_DISPLACEMENTMAP + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + vHighPrecisionZW = gl_Position.zw; +}`,u8=`#if DEPTH_PACKING == 3200 + uniform float opacity; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +varying vec2 vHighPrecisionZW; +void main() { + #include + vec4 diffuseColor = vec4( 1.0 ); + #if DEPTH_PACKING == 3200 + diffuseColor.a = opacity; + #endif + #include + #include + #include + #include + float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; + #if DEPTH_PACKING == 3200 + gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); + #elif DEPTH_PACKING == 3201 + gl_FragColor = packDepthToRGBA( fragCoordZ ); + #endif +}`,c8=`#define DISTANCE +varying vec3 vWorldPosition; +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #ifdef USE_DISPLACEMENTMAP + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + vWorldPosition = worldPosition.xyz; +}`,f8=`#define DISTANCE +uniform vec3 referencePosition; +uniform float nearDistance; +uniform float farDistance; +varying vec3 vWorldPosition; +#include +#include +#include +#include +#include +#include +#include +void main () { + #include + vec4 diffuseColor = vec4( 1.0 ); + #include + #include + #include + float dist = length( vWorldPosition - referencePosition ); + dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); + dist = saturate( dist ); + gl_FragColor = packDepthToRGBA( dist ); +}`,h8=`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include +}`,d8=`uniform sampler2D tEquirect; +varying vec3 vWorldDirection; +#include +void main() { + vec3 direction = normalize( vWorldDirection ); + vec2 sampleUV = equirectUv( direction ); + gl_FragColor = texture2D( tEquirect, sampleUV ); + #include + #include +}`,p8=`uniform float scale; +attribute float lineDistance; +varying float vLineDistance; +#include +#include +#include +#include +#include +#include +#include +void main() { + vLineDistance = scale * lineDistance; + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,m8=`uniform vec3 diffuse; +uniform float opacity; +uniform float dashSize; +uniform float totalSize; +varying float vLineDistance; +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + if ( mod( vLineDistance, totalSize ) > dashSize ) { + discard; + } + vec3 outgoingLight = vec3( 0.0 ); + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include + #include +}`,g8=`#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) + #include + #include + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,v8=`uniform vec3 diffuse; +uniform float opacity; +#ifndef FLAT_SHADED + varying vec3 vNormal; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + #include + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + #ifdef USE_LIGHTMAP + vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); + reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; + #else + reflectedLight.indirectDiffuse += vec3( 1.0 ); + #endif + #include + reflectedLight.indirectDiffuse *= diffuseColor.rgb; + vec3 outgoingLight = reflectedLight.indirectDiffuse; + #include + #include + #include + #include + #include + #include + #include +}`,y8=`#define LAMBERT +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include + #include +}`,x8=`#define LAMBERT +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec4 diffuseColor = vec4( diffuse, opacity ); + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include + #include +}`,_8=`#define MATCAP +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; +}`,S8=`#define MATCAP +uniform vec3 diffuse; +uniform float opacity; +uniform sampler2D matcap; +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + #include + #include + #include + vec3 viewDir = normalize( vViewPosition ); + vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); + vec3 y = cross( viewDir, x ); + vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; + #ifdef USE_MATCAP + vec4 matcapColor = texture2D( matcap, uv ); + #else + vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); + #endif + vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; + #include + #include + #include + #include + #include + #include +}`,w8=`#define NORMAL +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + varying vec3 vViewPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + vViewPosition = - mvPosition.xyz; +#endif +}`,M8=`#define NORMAL +uniform float opacity; +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) + varying vec3 vViewPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + gl_FragColor = vec4( packNormalToRGB( normal ), opacity ); + #ifdef OPAQUE + gl_FragColor.a = 1.0; + #endif +}`,A8=`#define PHONG +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include + #include +}`,E8=`#define PHONG +uniform vec3 diffuse; +uniform vec3 emissive; +uniform vec3 specular; +uniform float shininess; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec4 diffuseColor = vec4( diffuse, opacity ); + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include + #include +}`,b8=`#define STANDARD +varying vec3 vViewPosition; +#ifdef USE_TRANSMISSION + varying vec3 vWorldPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include +#ifdef USE_TRANSMISSION + vWorldPosition = worldPosition.xyz; +#endif +}`,T8=`#define STANDARD +#ifdef PHYSICAL + #define IOR + #define USE_SPECULAR +#endif +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float roughness; +uniform float metalness; +uniform float opacity; +#ifdef IOR + uniform float ior; +#endif +#ifdef USE_SPECULAR + uniform float specularIntensity; + uniform vec3 specularColor; + #ifdef USE_SPECULAR_COLORMAP + uniform sampler2D specularColorMap; + #endif + #ifdef USE_SPECULAR_INTENSITYMAP + uniform sampler2D specularIntensityMap; + #endif +#endif +#ifdef USE_CLEARCOAT + uniform float clearcoat; + uniform float clearcoatRoughness; +#endif +#ifdef USE_IRIDESCENCE + uniform float iridescence; + uniform float iridescenceIOR; + uniform float iridescenceThicknessMinimum; + uniform float iridescenceThicknessMaximum; +#endif +#ifdef USE_SHEEN + uniform vec3 sheenColor; + uniform float sheenRoughness; + #ifdef USE_SHEEN_COLORMAP + uniform sampler2D sheenColorMap; + #endif + #ifdef USE_SHEEN_ROUGHNESSMAP + uniform sampler2D sheenRoughnessMap; + #endif +#endif +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec4 diffuseColor = vec4( diffuse, opacity ); + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; + vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; + #include + vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; + #ifdef USE_SHEEN + float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor ); + outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular; + #endif + #ifdef USE_CLEARCOAT + float dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) ); + vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); + outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat; + #endif + #include + #include + #include + #include + #include + #include +}`,C8=`#define TOON +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include +}`,P8=`#define TOON +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec4 diffuseColor = vec4( diffuse, opacity ); + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include +}`,L8=`uniform float size; +uniform float scale; +#include +#include +#include +#include +#include +#include +#ifdef USE_POINTS_UV + varying vec2 vUv; + uniform mat3 uvTransform; +#endif +void main() { + #ifdef USE_POINTS_UV + vUv = ( uvTransform * vec3( uv, 1 ) ).xy; + #endif + #include + #include + #include + #include + #include + gl_PointSize = size; + #ifdef USE_SIZEATTENUATION + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); + #endif + #include + #include + #include + #include +}`,R8=`uniform vec3 diffuse; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec3 outgoingLight = vec3( 0.0 ); + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include + #include +}`,I8=`#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,D8=`uniform vec3 color; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); + #include + #include + #include +}`,N8=`uniform float rotation; +uniform vec2 center; +#include +#include +#include +#include +#include +void main() { + #include + vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); + vec2 scale; + scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); + scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); + #ifndef USE_SIZEATTENUATION + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + if ( isPerspective ) scale *= - mvPosition.z; + #endif + vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; + vec2 rotatedPosition; + rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; + rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; + mvPosition.xy += rotatedPosition; + gl_Position = projectionMatrix * mvPosition; + #include + #include + #include +}`,k8=`uniform vec3 diffuse; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec3 outgoingLight = vec3( 0.0 ); + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include +}`,mt={alphamap_fragment:a6,alphamap_pars_fragment:l6,alphatest_fragment:u6,alphatest_pars_fragment:c6,aomap_fragment:f6,aomap_pars_fragment:h6,begin_vertex:d6,beginnormal_vertex:p6,bsdfs:m6,iridescence_fragment:g6,bumpmap_pars_fragment:v6,clipping_planes_fragment:y6,clipping_planes_pars_fragment:x6,clipping_planes_pars_vertex:_6,clipping_planes_vertex:S6,color_fragment:w6,color_pars_fragment:M6,color_pars_vertex:A6,color_vertex:E6,common:b6,cube_uv_reflection_fragment:T6,defaultnormal_vertex:C6,displacementmap_pars_vertex:P6,displacementmap_vertex:L6,emissivemap_fragment:R6,emissivemap_pars_fragment:I6,encodings_fragment:D6,encodings_pars_fragment:N6,envmap_fragment:k6,envmap_common_pars_fragment:O6,envmap_pars_fragment:U6,envmap_pars_vertex:z6,envmap_physical_pars_fragment:J6,envmap_vertex:F6,fog_vertex:B6,fog_pars_vertex:V6,fog_fragment:H6,fog_pars_fragment:W6,gradientmap_pars_fragment:G6,lightmap_fragment:j6,lightmap_pars_fragment:X6,lights_lambert_fragment:Y6,lights_lambert_pars_fragment:q6,lights_pars_begin:Z6,lights_toon_fragment:K6,lights_toon_pars_fragment:Q6,lights_phong_fragment:$6,lights_phong_pars_fragment:eH,lights_physical_fragment:tH,lights_physical_pars_fragment:nH,lights_fragment_begin:iH,lights_fragment_maps:rH,lights_fragment_end:sH,logdepthbuf_fragment:oH,logdepthbuf_pars_fragment:aH,logdepthbuf_pars_vertex:lH,logdepthbuf_vertex:uH,map_fragment:cH,map_pars_fragment:fH,map_particle_fragment:hH,map_particle_pars_fragment:dH,metalnessmap_fragment:pH,metalnessmap_pars_fragment:mH,morphcolor_vertex:gH,morphnormal_vertex:vH,morphtarget_pars_vertex:yH,morphtarget_vertex:xH,normal_fragment_begin:_H,normal_fragment_maps:SH,normal_pars_fragment:wH,normal_pars_vertex:MH,normal_vertex:AH,normalmap_pars_fragment:EH,clearcoat_normal_fragment_begin:bH,clearcoat_normal_fragment_maps:TH,clearcoat_pars_fragment:CH,iridescence_pars_fragment:PH,output_fragment:LH,packing:RH,premultiplied_alpha_fragment:IH,project_vertex:DH,dithering_fragment:NH,dithering_pars_fragment:kH,roughnessmap_fragment:OH,roughnessmap_pars_fragment:UH,shadowmap_pars_fragment:zH,shadowmap_pars_vertex:FH,shadowmap_vertex:BH,shadowmask_pars_fragment:VH,skinbase_vertex:HH,skinning_pars_vertex:WH,skinning_vertex:GH,skinnormal_vertex:jH,specularmap_fragment:XH,specularmap_pars_fragment:YH,tonemapping_fragment:qH,tonemapping_pars_fragment:ZH,transmission_fragment:JH,transmission_pars_fragment:KH,uv_pars_fragment:QH,uv_pars_vertex:$H,uv_vertex:e8,worldpos_vertex:t8,background_vert:n8,background_frag:i8,backgroundCube_vert:r8,backgroundCube_frag:s8,cube_vert:o8,cube_frag:a8,depth_vert:l8,depth_frag:u8,distanceRGBA_vert:c8,distanceRGBA_frag:f8,equirect_vert:h8,equirect_frag:d8,linedashed_vert:p8,linedashed_frag:m8,meshbasic_vert:g8,meshbasic_frag:v8,meshlambert_vert:y8,meshlambert_frag:x8,meshmatcap_vert:_8,meshmatcap_frag:S8,meshnormal_vert:w8,meshnormal_frag:M8,meshphong_vert:A8,meshphong_frag:E8,meshphysical_vert:b8,meshphysical_frag:T8,meshtoon_vert:C8,meshtoon_frag:P8,points_vert:L8,points_frag:R8,shadow_vert:I8,shadow_frag:D8,sprite_vert:N8,sprite_frag:k8},De={common:{diffuse:{value:new Fe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Mt},alphaMap:{value:null},alphaMapTransform:{value:new Mt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Mt}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Mt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Mt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Mt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Mt},normalScale:{value:new ye(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Mt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Mt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Mt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Mt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Fe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{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 Fe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Mt}},sprite:{diffuse:{value:new Fe(16777215)},opacity:{value:1},center:{value:new ye(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Mt},alphaMap:{value:null},alphaTest:{value:0}}},Lr={basic:{uniforms:fi([De.common,De.specularmap,De.envmap,De.aomap,De.lightmap,De.fog]),vertexShader:mt.meshbasic_vert,fragmentShader:mt.meshbasic_frag},lambert:{uniforms:fi([De.common,De.specularmap,De.envmap,De.aomap,De.lightmap,De.emissivemap,De.bumpmap,De.normalmap,De.displacementmap,De.fog,De.lights,{emissive:{value:new Fe(0)}}]),vertexShader:mt.meshlambert_vert,fragmentShader:mt.meshlambert_frag},phong:{uniforms:fi([De.common,De.specularmap,De.envmap,De.aomap,De.lightmap,De.emissivemap,De.bumpmap,De.normalmap,De.displacementmap,De.fog,De.lights,{emissive:{value:new Fe(0)},specular:{value:new Fe(1118481)},shininess:{value:30}}]),vertexShader:mt.meshphong_vert,fragmentShader:mt.meshphong_frag},standard:{uniforms:fi([De.common,De.envmap,De.aomap,De.lightmap,De.emissivemap,De.bumpmap,De.normalmap,De.displacementmap,De.roughnessmap,De.metalnessmap,De.fog,De.lights,{emissive:{value:new Fe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:mt.meshphysical_vert,fragmentShader:mt.meshphysical_frag},toon:{uniforms:fi([De.common,De.aomap,De.lightmap,De.emissivemap,De.bumpmap,De.normalmap,De.displacementmap,De.gradientmap,De.fog,De.lights,{emissive:{value:new Fe(0)}}]),vertexShader:mt.meshtoon_vert,fragmentShader:mt.meshtoon_frag},matcap:{uniforms:fi([De.common,De.bumpmap,De.normalmap,De.displacementmap,De.fog,{matcap:{value:null}}]),vertexShader:mt.meshmatcap_vert,fragmentShader:mt.meshmatcap_frag},points:{uniforms:fi([De.points,De.fog]),vertexShader:mt.points_vert,fragmentShader:mt.points_frag},dashed:{uniforms:fi([De.common,De.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:mt.linedashed_vert,fragmentShader:mt.linedashed_frag},depth:{uniforms:fi([De.common,De.displacementmap]),vertexShader:mt.depth_vert,fragmentShader:mt.depth_frag},normal:{uniforms:fi([De.common,De.bumpmap,De.normalmap,De.displacementmap,{opacity:{value:1}}]),vertexShader:mt.meshnormal_vert,fragmentShader:mt.meshnormal_frag},sprite:{uniforms:fi([De.sprite,De.fog]),vertexShader:mt.sprite_vert,fragmentShader:mt.sprite_frag},background:{uniforms:{uvTransform:{value:new Mt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:mt.background_vert,fragmentShader:mt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:mt.backgroundCube_vert,fragmentShader:mt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:mt.cube_vert,fragmentShader:mt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:mt.equirect_vert,fragmentShader:mt.equirect_frag},distanceRGBA:{uniforms:fi([De.common,De.displacementmap,{referencePosition:{value:new k},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:mt.distanceRGBA_vert,fragmentShader:mt.distanceRGBA_frag},shadow:{uniforms:fi([De.lights,De.fog,{color:{value:new Fe(0)},opacity:{value:1}}]),vertexShader:mt.shadow_vert,fragmentShader:mt.shadow_frag}};Lr.physical={uniforms:fi([Lr.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Mt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Mt},clearcoatNormalScale:{value:new ye(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Mt},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Mt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Mt},sheen:{value:0},sheenColor:{value:new Fe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Mt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Mt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Mt},transmissionSamplerSize:{value:new ye},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Mt},attenuationDistance:{value:0},attenuationColor:{value:new Fe(0)},specularColor:{value:new Fe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Mt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Mt}}]),vertexShader:mt.meshphysical_vert,fragmentShader:mt.meshphysical_frag};const mp={r:0,b:0,g:0};function O8(n,e,t,i,r,s,o){const a=new Fe(0);let l=s===!0?0:1,f,h,d=null,p=0,v=null;function y(M,m){let S=!1,w=m.isScene===!0?m.background:null;w&&w.isTexture&&(w=(m.backgroundBlurriness>0?t:e).get(w));const A=n.xr,b=A.getSession&&A.getSession();b&&b.environmentBlendMode==="additive"&&(w=null),w===null?_(a,l):w&&w.isColor&&(_(w,1),S=!0),(n.autoClear||S)&&n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil),w&&(w.isCubeTexture||w.mapping===Wu)?(h===void 0&&(h=new Fn(new Jo(1,1,1),new rs({name:"BackgroundCubeMaterial",uniforms:Nu(Lr.backgroundCube.uniforms),vertexShader:Lr.backgroundCube.vertexShader,fragmentShader:Lr.backgroundCube.fragmentShader,side:mi,depthTest:!1,depthWrite:!1,fog:!1})),h.geometry.deleteAttribute("normal"),h.geometry.deleteAttribute("uv"),h.onBeforeRender=function(P,I,L){this.matrixWorld.copyPosition(L.matrixWorld)},Object.defineProperty(h.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(h)),h.material.uniforms.envMap.value=w,h.material.uniforms.flipEnvMap.value=w.isCubeTexture&&w.isRenderTargetTexture===!1?-1:1,h.material.uniforms.backgroundBlurriness.value=m.backgroundBlurriness,h.material.uniforms.backgroundIntensity.value=m.backgroundIntensity,h.material.toneMapped=w.encoding!==zt,(d!==w||p!==w.version||v!==n.toneMapping)&&(h.material.needsUpdate=!0,d=w,p=w.version,v=n.toneMapping),h.layers.enableAll(),M.unshift(h,h.geometry,h.material,0,0,null)):w&&w.isTexture&&(f===void 0&&(f=new Fn(new Gu(2,2),new rs({name:"BackgroundMaterial",uniforms:Nu(Lr.background.uniforms),vertexShader:Lr.background.vertexShader,fragmentShader:Lr.background.fragmentShader,side:Bs,depthTest:!1,depthWrite:!1,fog:!1})),f.geometry.deleteAttribute("normal"),Object.defineProperty(f.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(f)),f.material.uniforms.t2D.value=w,f.material.uniforms.backgroundIntensity.value=m.backgroundIntensity,f.material.toneMapped=w.encoding!==zt,w.matrixAutoUpdate===!0&&w.updateMatrix(),f.material.uniforms.uvTransform.value.copy(w.matrix),(d!==w||p!==w.version||v!==n.toneMapping)&&(f.material.needsUpdate=!0,d=w,p=w.version,v=n.toneMapping),f.layers.enableAll(),M.unshift(f,f.geometry,f.material,0,0,null))}function _(M,m){M.getRGB(mp,BL(n)),i.buffers.color.setClear(mp.r,mp.g,mp.b,m,o)}return{getClearColor:function(){return a},setClearColor:function(M,m=1){a.set(M),l=m,_(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(M){l=M,_(a,l)},render:y}}function U8(n,e,t,i){const r=n.getParameter(34921),s=i.isWebGL2?null:e.get("OES_vertex_array_object"),o=i.isWebGL2||s!==null,a={},l=M(null);let f=l,h=!1;function d(X,Z,se,ae,D){let V=!1;if(o){const B=_(ae,se,Z);f!==B&&(f=B,v(f.object)),V=m(X,ae,se,D),V&&S(X,ae,se,D)}else{const B=Z.wireframe===!0;(f.geometry!==ae.id||f.program!==se.id||f.wireframe!==B)&&(f.geometry=ae.id,f.program=se.id,f.wireframe=B,V=!0)}D!==null&&t.update(D,34963),(V||h)&&(h=!1,L(X,Z,se,ae),D!==null&&n.bindBuffer(34963,t.get(D).buffer))}function p(){return i.isWebGL2?n.createVertexArray():s.createVertexArrayOES()}function v(X){return i.isWebGL2?n.bindVertexArray(X):s.bindVertexArrayOES(X)}function y(X){return i.isWebGL2?n.deleteVertexArray(X):s.deleteVertexArrayOES(X)}function _(X,Z,se){const ae=se.wireframe===!0;let D=a[X.id];D===void 0&&(D={},a[X.id]=D);let V=D[Z.id];V===void 0&&(V={},D[Z.id]=V);let B=V[ae];return B===void 0&&(B=M(p()),V[ae]=B),B}function M(X){const Z=[],se=[],ae=[];for(let D=0;D=0){const ue=D[$];let Ee=V[$];if(Ee===void 0&&($==="instanceMatrix"&&X.instanceMatrix&&(Ee=X.instanceMatrix),$==="instanceColor"&&X.instanceColor&&(Ee=X.instanceColor)),ue===void 0||ue.attribute!==Ee||Ee&&ue.data!==Ee.data)return!0;B++}return f.attributesNum!==B||f.index!==ae}function S(X,Z,se,ae){const D={},V=Z.attributes;let B=0;const te=se.getAttributes();for(const $ in te)if(te[$].location>=0){let ue=V[$];ue===void 0&&($==="instanceMatrix"&&X.instanceMatrix&&(ue=X.instanceMatrix),$==="instanceColor"&&X.instanceColor&&(ue=X.instanceColor));const Ee={};Ee.attribute=ue,ue&&ue.data&&(Ee.data=ue.data),D[$]=Ee,B++}f.attributes=D,f.attributesNum=B,f.index=ae}function w(){const X=f.newAttributes;for(let Z=0,se=X.length;Z=0){let ee=D[te];if(ee===void 0&&(te==="instanceMatrix"&&X.instanceMatrix&&(ee=X.instanceMatrix),te==="instanceColor"&&X.instanceColor&&(ee=X.instanceColor)),ee!==void 0){const ue=ee.normalized,Ee=ee.itemSize,we=t.get(ee);if(we===void 0)continue;const Q=we.buffer,Xe=we.type,Ye=we.bytesPerElement;if(ee.isInterleavedBufferAttribute){const xe=ee.data,Me=xe.stride,ge=ee.offset;if(xe.isInstancedInterleavedBuffer){for(let oe=0;oe<$.locationSize;oe++)b($.location+oe,xe.meshPerAttribute);X.isInstancedMesh!==!0&&ae._maxInstanceCount===void 0&&(ae._maxInstanceCount=xe.meshPerAttribute*xe.count)}else for(let oe=0;oe<$.locationSize;oe++)A($.location+oe);n.bindBuffer(34962,Q);for(let oe=0;oe<$.locationSize;oe++)I($.location+oe,Ee/$.locationSize,Xe,ue,Me*Ye,(ge+Ee/$.locationSize*oe)*Ye)}else{if(ee.isInstancedBufferAttribute){for(let xe=0;xe<$.locationSize;xe++)b($.location+xe,ee.meshPerAttribute);X.isInstancedMesh!==!0&&ae._maxInstanceCount===void 0&&(ae._maxInstanceCount=ee.meshPerAttribute*ee.count)}else for(let xe=0;xe<$.locationSize;xe++)A($.location+xe);n.bindBuffer(34962,Q);for(let xe=0;xe<$.locationSize;xe++)I($.location+xe,Ee/$.locationSize,Xe,ue,Ee*Ye,Ee/$.locationSize*xe*Ye)}}else if(B!==void 0){const ue=B[te];if(ue!==void 0)switch(ue.length){case 2:n.vertexAttrib2fv($.location,ue);break;case 3:n.vertexAttrib3fv($.location,ue);break;case 4:n.vertexAttrib4fv($.location,ue);break;default:n.vertexAttrib1fv($.location,ue)}}}}P()}function C(){J();for(const X in a){const Z=a[X];for(const se in Z){const ae=Z[se];for(const D in ae)y(ae[D].object),delete ae[D];delete Z[se]}delete a[X]}}function R(X){if(a[X.id]===void 0)return;const Z=a[X.id];for(const se in Z){const ae=Z[se];for(const D in ae)y(ae[D].object),delete ae[D];delete Z[se]}delete a[X.id]}function W(X){for(const Z in a){const se=a[Z];if(se[X.id]===void 0)continue;const ae=se[X.id];for(const D in ae)y(ae[D].object),delete ae[D];delete se[X.id]}}function J(){j(),h=!0,f!==l&&(f=l,v(f.object))}function j(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:d,reset:J,resetDefaultState:j,dispose:C,releaseStatesOfGeometry:R,releaseStatesOfProgram:W,initAttributes:w,enableAttribute:A,disableUnusedAttributes:P}}function z8(n,e,t,i){const r=i.isWebGL2;let s;function o(f){s=f}function a(f,h){n.drawArrays(s,f,h),t.update(h,s,1)}function l(f,h,d){if(d===0)return;let p,v;if(r)p=n,v="drawArraysInstanced";else if(p=e.get("ANGLE_instanced_arrays"),v="drawArraysInstancedANGLE",p===null){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}p[v](s,f,h,d),t.update(h,s,d)}this.setMode=o,this.render=a,this.renderInstances=l}function F8(n,e,t){let i;function r(){if(i!==void 0)return i;if(e.has("EXT_texture_filter_anisotropic")===!0){const I=e.get("EXT_texture_filter_anisotropic");i=n.getParameter(I.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i}function s(I){if(I==="highp"){if(n.getShaderPrecisionFormat(35633,36338).precision>0&&n.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";I="mediump"}return I==="mediump"&&n.getShaderPrecisionFormat(35633,36337).precision>0&&n.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}const o=typeof WebGL2RenderingContext<"u"&&n.constructor.name==="WebGL2RenderingContext";let a=t.precision!==void 0?t.precision:"highp";const l=s(a);l!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",l,"instead."),a=l);const f=o||e.has("WEBGL_draw_buffers"),h=t.logarithmicDepthBuffer===!0,d=n.getParameter(34930),p=n.getParameter(35660),v=n.getParameter(3379),y=n.getParameter(34076),_=n.getParameter(34921),M=n.getParameter(36347),m=n.getParameter(36348),S=n.getParameter(36349),w=p>0,A=o||e.has("OES_texture_float"),b=w&&A,P=o?n.getParameter(36183):0;return{isWebGL2:o,drawBuffers:f,getMaxAnisotropy:r,getMaxPrecision:s,precision:a,logarithmicDepthBuffer:h,maxTextures:d,maxVertexTextures:p,maxTextureSize:v,maxCubemapSize:y,maxAttributes:_,maxVertexUniforms:M,maxVaryings:m,maxFragmentUniforms:S,vertexTextures:w,floatFragmentTextures:A,floatVertexTextures:b,maxSamples:P}}function B8(n){const e=this;let t=null,i=0,r=!1,s=!1;const o=new mo,a=new Mt,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(d,p){const v=d.length!==0||p||i!==0||r;return r=p,i=d.length,v},this.beginShadows=function(){s=!0,h(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(d,p){t=h(d,p,0)},this.setState=function(d,p,v){const y=d.clippingPlanes,_=d.clipIntersection,M=d.clipShadows,m=n.get(d);if(!r||y===null||y.length===0||s&&!M)s?h(null):f();else{const S=s?0:i,w=S*4;let A=m.clippingState||null;l.value=A,A=h(y,p,w,v);for(let b=0;b!==w;++b)A[b]=t[b];m.clippingState=A,this.numIntersection=_?this.numPlanes:0,this.numPlanes+=S}};function f(){l.value!==t&&(l.value=t,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function h(d,p,v,y){const _=d!==null?d.length:0;let M=null;if(_!==0){if(M=l.value,y!==!0||M===null){const m=v+_*4,S=p.matrixWorldInverse;a.getNormalMatrix(S),(M===null||M.length0){const f=new aS(l.height/2);return f.fromEquirectangularTexture(n,o),e.set(o,f),o.addEventListener("dispose",r),t(f.texture,o.mapping)}else return null}}return o}function r(o){const a=o.target;a.removeEventListener("dispose",r);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function s(){e=new WeakMap}return{get:i,dispose:s}}class ns extends mh{constructor(e=-1,t=1,i=1,r=-1,s=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=r,this.near=s,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,i,r,s,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let s=i-e,o=i+e,a=r+t,l=r-t;if(this.view!==null&&this.view.enabled){const f=(this.right-this.left)/this.view.fullWidth/this.zoom,h=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=f*this.view.offsetX,o=s+f*this.view.width,a-=h*this.view.offsetY,l=a-h*this.view.height}this.projectionMatrix.makeOrthographic(s,o,a,l,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}const uu=4,fb=[.125,.215,.35,.446,.526,.582],Ea=20,qv=new ns,hb=new Fe;let Zv=null;const Ma=(1+Math.sqrt(5))/2,Ol=1/Ma,db=[new k(1,1,1),new k(-1,1,1),new k(1,1,-1),new k(-1,1,-1),new k(0,Ma,Ol),new k(0,Ma,-Ol),new k(Ol,0,Ma),new k(-Ol,0,Ma),new k(Ma,Ol,0),new k(-Ma,Ol,0)];class f_{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,r=100){Zv=this._renderer.getRenderTarget(),this._setSize(256);const s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,i,r,s),t>0&&this._blur(s,0,0,t),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=gb(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=mb(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?w:0,w,w),h.setRenderTarget(r),_&&h.render(y,a),h.render(e,a)}y.geometry.dispose(),y.material.dispose(),h.toneMapping=p,h.autoClear=d,e.background=M}_textureToCubeUV(e,t){const i=this._renderer,r=e.mapping===zo||e.mapping===Fo;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=gb()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=mb());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new Fn(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=e;const l=this._cubeSize;gp(t,0,0,3*l,2*l),i.setRenderTarget(t),i.render(o,qv)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;for(let r=1;rEa&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${M} samples when the maximum is set to ${Ea}`);const m=[];let S=0;for(let I=0;Iw-uu?r-w+uu:0),P=4*(this._cubeSize-A);gp(t,b,P,3*A,2*A),l.setRenderTarget(t),l.render(d,qv)}}function H8(n){const e=[],t=[],i=[];let r=n;const s=n-uu+1+fb.length;for(let o=0;on-uu?l=fb[o-n+uu-1]:o===0&&(l=0),i.push(l);const f=1/(a-2),h=-f,d=1+f,p=[h,h,d,h,d,d,h,h,d,d,h,d],v=6,y=6,_=3,M=2,m=1,S=new Float32Array(_*y*v),w=new Float32Array(M*y*v),A=new Float32Array(m*y*v);for(let P=0;P2?0:-1,C=[I,L,0,I+2/3,L,0,I+2/3,L+1,0,I,L,0,I+2/3,L+1,0,I,L+1,0];S.set(C,_*y*P),w.set(p,M*y*P);const R=[P,P,P,P,P,P];A.set(R,m*y*P)}const b=new dt;b.setAttribute("position",new Bt(S,_)),b.setAttribute("uv",new Bt(w,M)),b.setAttribute("faceIndex",new Bt(A,m)),e.push(b),r>uu&&r--}return{lodPlanes:e,sizeLods:t,sigmas:i}}function pb(n,e,t){const i=new Or(n,e,t);return i.texture.mapping=Wu,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function gp(n,e,t,i,r){n.viewport.set(e,t,i,r),n.scissor.set(e,t,i,r)}function W8(n,e,t){const i=new Float32Array(Ea),r=new k(0,1,0);return new rs({name:"SphericalGaussianBlur",defines:{n:Ea,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${n}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:lS(),fragmentShader:` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + uniform int samples; + uniform float weights[ n ]; + uniform bool latitudinal; + uniform float dTheta; + uniform float mipInt; + uniform vec3 poleAxis; + + #define ENVMAP_TYPE_CUBE_UV + #include + + vec3 getSample( float theta, vec3 axis ) { + + float cosTheta = cos( theta ); + // Rodrigues' axis-angle rotation + vec3 sampleDirection = vOutputDirection * cosTheta + + cross( axis, vOutputDirection ) * sin( theta ) + + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); + + return bilinearCubeUV( envMap, sampleDirection, mipInt ); + + } + + void main() { + + vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); + + if ( all( equal( axis, vec3( 0.0 ) ) ) ) { + + axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); + + } + + axis = normalize( axis ); + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); + + for ( int i = 1; i < n; i++ ) { + + if ( i >= samples ) { + + break; + + } + + float theta = dTheta * float( i ); + gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); + gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); + + } + + } + `,blending:Ns,depthTest:!1,depthWrite:!1})}function mb(){return new rs({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:lS(),fragmentShader:` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + + #include + + void main() { + + vec3 outputDirection = normalize( vOutputDirection ); + vec2 uv = equirectUv( outputDirection ); + + gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); + + } + `,blending:Ns,depthTest:!1,depthWrite:!1})}function gb(){return new rs({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:lS(),fragmentShader:` + + precision mediump float; + precision mediump int; + + uniform float flipEnvMap; + + varying vec3 vOutputDirection; + + uniform samplerCube envMap; + + void main() { + + gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); + + } + `,blending:Ns,depthTest:!1,depthWrite:!1})}function lS(){return` + + precision mediump float; + precision mediump int; + + attribute float faceIndex; + + varying vec3 vOutputDirection; + + // RH coordinate system; PMREM face-indexing convention + vec3 getDirection( vec2 uv, float face ) { + + uv = 2.0 * uv - 1.0; + + vec3 direction = vec3( uv, 1.0 ); + + if ( face == 0.0 ) { + + direction = direction.zyx; // ( 1, v, u ) pos x + + } else if ( face == 1.0 ) { + + direction = direction.xzy; + direction.xz *= -1.0; // ( -u, 1, -v ) pos y + + } else if ( face == 2.0 ) { + + direction.x *= -1.0; // ( -u, v, 1 ) pos z + + } else if ( face == 3.0 ) { + + direction = direction.zyx; + direction.xz *= -1.0; // ( -1, v, -u ) neg x + + } else if ( face == 4.0 ) { + + direction = direction.xzy; + direction.xy *= -1.0; // ( -u, -1, v ) neg y + + } else if ( face == 5.0 ) { + + direction.z *= -1.0; // ( u, v, -1 ) neg z + + } + + return direction; + + } + + void main() { + + vOutputDirection = getDirection( uv, faceIndex ); + gl_Position = vec4( position, 1.0 ); + + } + `}function G8(n){let e=new WeakMap,t=null;function i(a){if(a&&a.isTexture){const l=a.mapping,f=l===Uf||l===zf,h=l===zo||l===Fo;if(f||h)if(a.isRenderTargetTexture&&a.needsPMREMUpdate===!0){a.needsPMREMUpdate=!1;let d=e.get(a);return t===null&&(t=new f_(n)),d=f?t.fromEquirectangular(a,d):t.fromCubemap(a,d),e.set(a,d),d.texture}else{if(e.has(a))return e.get(a).texture;{const d=a.image;if(f&&d&&d.height>0||h&&d&&r(d)){t===null&&(t=new f_(n));const p=f?t.fromEquirectangular(a):t.fromCubemap(a);return e.set(a,p),a.addEventListener("dispose",s),p.texture}else return null}}}return a}function r(a){let l=0;const f=6;for(let h=0;he.maxTextureSize&&(W=Math.ceil(R/e.maxTextureSize),R=e.maxTextureSize);const J=new Float32Array(R*W*4*_),j=new Eg(J,R,W,_);j.type=Ls,j.needsUpdate=!0;const X=C*4;for(let se=0;se<_;se++){const ae=P[se],D=I[se],V=L[se],B=R*W*4*se;for(let te=0;te0)return n;const r=e*t;let s=vb[r];if(s===void 0&&(s=new Float32Array(r),vb[r]=s),e!==0){i.toArray(s,0);for(let o=1,a=0;o!==e;++o)a+=t,n[o].toArray(s,a)}return s}function Ln(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t":" "} ${a}: ${t[o]}`)}return i.join(` +`)}function jW(n){switch(n){case Vs:return["Linear","( value )"];case zt:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",n),["Linear","( value )"]}}function Ab(n,e,t){const i=n.getShaderParameter(e,35713),r=n.getShaderInfoLog(e).trim();if(i&&r==="")return"";const s=/ERROR: 0:(\d+)/.exec(r);if(s){const o=parseInt(s[1]);return t.toUpperCase()+` + +`+r+` + +`+GW(n.getShaderSource(e),o)}else return r}function XW(n,e){const t=jW(e);return"vec4 "+n+"( vec4 value ) { return LinearTo"+t[0]+t[1]+"; }"}function YW(n,e){let t;switch(e){case uL:t="Linear";break;case cL:t="Reinhard";break;case fL:t="OptimizedCineon";break;case J1:t="ACESFilmic";break;case hL:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+n+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}function qW(n){return[n.extensionDerivatives||n.envMapCubeUVHeight||n.bumpMap||n.normalMapTangentSpace||n.clearcoatNormalMap||n.flatShading||n.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(n.extensionFragDepth||n.logarithmicDepthBuffer)&&n.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",n.extensionDrawBuffers&&n.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(n.extensionShaderTextureLOD||n.envMap||n.transmission)&&n.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Yc).join(` +`)}function ZW(n){const e=[];for(const t in n){const i=n[t];i!==!1&&e.push("#define "+t+" "+i)}return e.join(` +`)}function JW(n,e){const t={},i=n.getProgramParameter(e,35721);for(let r=0;r/gm;function h_(n){return n.replace(KW,QW)}function QW(n,e){const t=mt[e];if(t===void 0)throw new Error("Can not resolve #include <"+e+">");return h_(t)}const $W=/#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 Tb(n){return n.replace($W,eG)}function eG(n,e,t,i){let r="";for(let s=parseInt(e);s0&&(M+=` +`),m=[v,y].filter(Yc).join(` +`),m.length>0&&(m+=` +`)):(M=[Cb(t),"#define SHADER_NAME "+t.shaderName,y,t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+h:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUvs2?"#define USE_UV2":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphColors&&t.isWebGL2?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","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","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` +`].filter(Yc).join(` +`),m=[v,Cb(t),"#define SHADER_NAME "+t.shaderName,y,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+f:"",t.envMap?"#define "+h:"",t.envMap?"#define "+d:"",p?"#define CUBEUV_TEXEL_WIDTH "+p.texelWidth:"",p?"#define CUBEUV_TEXEL_HEIGHT "+p.texelHeight:"",p?"#define CUBEUV_MAX_MIP "+p.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescence?"#define USE_IRIDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.vertexTangents?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUvs2?"#define USE_UV2":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==Nr?"#define TONE_MAPPING":"",t.toneMapping!==Nr?mt.tonemapping_pars_fragment:"",t.toneMapping!==Nr?YW("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",mt.encodings_pars_fragment,XW("linearToOutputTexel",t.outputEncoding),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` +`].filter(Yc).join(` +`)),o=h_(o),o=Eb(o,t),o=bb(o,t),a=h_(a),a=Eb(a,t),a=bb(a,t),o=Tb(o),a=Tb(a),t.isWebGL2&&t.isRawShaderMaterial!==!0&&(S=`#version 300 es +`,M=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` +`)+` +`+M,m=["#define varying in",t.glslVersion===u_?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===u_?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` +`)+` +`+m);const w=S+M+o,A=S+m+a,b=Mb(r,35633,w),P=Mb(r,35632,A);if(r.attachShader(_,b),r.attachShader(_,P),t.index0AttributeName!==void 0?r.bindAttribLocation(_,0,t.index0AttributeName):t.morphTargets===!0&&r.bindAttribLocation(_,0,"position"),r.linkProgram(_),n.debug.checkShaderErrors){const C=r.getProgramInfoLog(_).trim(),R=r.getShaderInfoLog(b).trim(),W=r.getShaderInfoLog(P).trim();let J=!0,j=!0;if(r.getProgramParameter(_,35714)===!1)if(J=!1,typeof n.debug.onShaderError=="function")n.debug.onShaderError(r,_,b,P);else{const X=Ab(r,b,"vertex"),Z=Ab(r,P,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(_,35715)+` + +Program Info Log: `+C+` +`+X+` +`+Z)}else C!==""?console.warn("THREE.WebGLProgram: Program Info Log:",C):(R===""||W==="")&&(j=!1);j&&(this.diagnostics={runnable:J,programLog:C,vertexShader:{log:R,prefix:M},fragmentShader:{log:W,prefix:m}})}r.deleteShader(b),r.deleteShader(P);let I;this.getUniforms=function(){return I===void 0&&(I=new om(r,_)),I};let L;return this.getAttributes=function(){return L===void 0&&(L=JW(r,_)),L},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(_),this.program=void 0},this.name=t.shaderName,this.id=WW++,this.cacheKey=e,this.usedTimes=1,this.program=_,this.vertexShader=b,this.fragmentShader=P,this}let aG=0;class lG{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,i=e.fragmentShader,r=this._getShaderStage(t),s=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return o.has(r)===!1&&(o.add(r),r.usedTimes++),o.has(s)===!1&&(o.add(s),s.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const i of t)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let i=t.get(e);return i===void 0&&(i=new Set,t.set(e,i)),i}_getShaderStage(e){const t=this.shaderCache;let i=t.get(e);return i===void 0&&(i=new uG(e),t.set(e,i)),i}}class uG{constructor(e){this.id=aG++,this.code=e,this.usedTimes=0}}function cG(n,e,t,i,r,s,o){const a=new Fa,l=new lG,f=[],h=r.isWebGL2,d=r.logarithmicDepthBuffer,p=r.vertexTextures;let v=r.precision;const y={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function _(C){return C===1?"uv2":"uv"}function M(C,R,W,J,j){const X=J.fog,Z=j.geometry,se=C.isMeshStandardMaterial?J.environment:null,ae=(C.isMeshStandardMaterial?t:e).get(C.envMap||se),D=ae&&ae.mapping===Wu?ae.image.height:null,V=y[C.type];C.precision!==null&&(v=r.getMaxPrecision(C.precision),v!==C.precision&&console.warn("THREE.WebGLProgram.getParameters:",C.precision,"not supported, using",v,"instead."));const B=Z.morphAttributes.position||Z.morphAttributes.normal||Z.morphAttributes.color,te=B!==void 0?B.length:0;let $=0;Z.morphAttributes.position!==void 0&&($=1),Z.morphAttributes.normal!==void 0&&($=2),Z.morphAttributes.color!==void 0&&($=3);let ee,ue,Ee,we;if(V){const Ue=Lr[V];ee=Ue.vertexShader,ue=Ue.fragmentShader}else ee=C.vertexShader,ue=C.fragmentShader,l.update(C),Ee=l.getVertexShaderID(C),we=l.getFragmentShaderID(C);const Q=n.getRenderTarget(),Xe=j.isInstancedMesh===!0,Ye=!!C.map,xe=!!C.matcap,Me=!!ae,ge=!!C.aoMap,oe=!!C.lightMap,_e=!!C.bumpMap,ke=!!C.normalMap,Ie=!!C.displacementMap,Ge=!!C.emissiveMap,qe=!!C.metalnessMap,je=!!C.roughnessMap,nt=C.clearcoat>0,_t=C.iridescence>0,z=C.sheen>0,N=C.transmission>0,le=nt&&!!C.clearcoatMap,be=nt&&!!C.clearcoatNormalMap,Te=nt&&!!C.clearcoatRoughnessMap,Re=_t&&!!C.iridescenceMap,et=_t&&!!C.iridescenceThicknessMap,ze=z&&!!C.sheenColorMap,pe=z&&!!C.sheenRoughnessMap,He=!!C.specularMap,G=!!C.specularColorMap,de=!!C.specularIntensityMap,Se=N&&!!C.transmissionMap,Pe=N&&!!C.thicknessMap,Qe=!!C.gradientMap,ct=!!C.alphaMap,kt=C.alphaTest>0,Y=!!C.extensions,fe=!!Z.attributes.uv2;return{isWebGL2:h,shaderID:V,shaderName:C.type,vertexShader:ee,fragmentShader:ue,defines:C.defines,customVertexShaderID:Ee,customFragmentShaderID:we,isRawShaderMaterial:C.isRawShaderMaterial===!0,glslVersion:C.glslVersion,precision:v,instancing:Xe,instancingColor:Xe&&j.instanceColor!==null,supportsVertexTextures:p,outputEncoding:Q===null?n.outputEncoding:Q.isXRRenderTarget===!0?Q.texture.encoding:Vs,map:Ye,matcap:xe,envMap:Me,envMapMode:Me&&ae.mapping,envMapCubeUVHeight:D,aoMap:ge,lightMap:oe,bumpMap:_e,normalMap:ke,displacementMap:p&&Ie,emissiveMap:Ge,normalMapObjectSpace:ke&&C.normalMapType===DL,normalMapTangentSpace:ke&&C.normalMapType===qo,decodeVideoTexture:Ye&&C.map.isVideoTexture===!0&&C.map.encoding===zt,metalnessMap:qe,roughnessMap:je,clearcoat:nt,clearcoatMap:le,clearcoatNormalMap:be,clearcoatRoughnessMap:Te,iridescence:_t,iridescenceMap:Re,iridescenceThicknessMap:et,sheen:z,sheenColorMap:ze,sheenRoughnessMap:pe,specularMap:He,specularColorMap:G,specularIntensityMap:de,transmission:N,transmissionMap:Se,thicknessMap:Pe,gradientMap:Qe,opaque:C.transparent===!1&&C.blending===Oa,alphaMap:ct,alphaTest:kt,combine:C.combine,mapUv:Ye&&_(C.map.channel),aoMapUv:ge&&_(C.aoMap.channel),lightMapUv:oe&&_(C.lightMap.channel),bumpMapUv:_e&&_(C.bumpMap.channel),normalMapUv:ke&&_(C.normalMap.channel),displacementMapUv:Ie&&_(C.displacementMap.channel),emissiveMapUv:Ge&&_(C.emissiveMap.channel),metalnessMapUv:qe&&_(C.metalnessMap.channel),roughnessMapUv:je&&_(C.roughnessMap.channel),clearcoatMapUv:le&&_(C.clearcoatMap.channel),clearcoatNormalMapUv:be&&_(C.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Te&&_(C.clearcoatRoughnessMap.channel),iridescenceMapUv:Re&&_(C.iridescenceMap.channel),iridescenceThicknessMapUv:et&&_(C.iridescenceThicknessMap.channel),sheenColorMapUv:ze&&_(C.sheenColorMap.channel),sheenRoughnessMapUv:pe&&_(C.sheenRoughnessMap.channel),specularMapUv:He&&_(C.specularMap.channel),specularColorMapUv:G&&_(C.specularColorMap.channel),specularIntensityMapUv:de&&_(C.specularIntensityMap.channel),transmissionMapUv:Se&&_(C.transmissionMap.channel),thicknessMapUv:Pe&&_(C.thicknessMap.channel),alphaMapUv:ct&&_(C.alphaMap.channel),vertexTangents:ke&&!!Z.attributes.tangent,vertexColors:C.vertexColors,vertexAlphas:C.vertexColors===!0&&!!Z.attributes.color&&Z.attributes.color.itemSize===4,vertexUvs2:fe,pointsUvs:j.isPoints===!0&&!!Z.attributes.uv&&(Ye||ct),fog:!!X,useFog:C.fog===!0,fogExp2:X&&X.isFogExp2,flatShading:C.flatShading===!0,sizeAttenuation:C.sizeAttenuation===!0,logarithmicDepthBuffer:d,skinning:j.isSkinnedMesh===!0,morphTargets:Z.morphAttributes.position!==void 0,morphNormals:Z.morphAttributes.normal!==void 0,morphColors:Z.morphAttributes.color!==void 0,morphTargetsCount:te,morphTextureStride:$,numDirLights:R.directional.length,numPointLights:R.point.length,numSpotLights:R.spot.length,numSpotLightMaps:R.spotLightMap.length,numRectAreaLights:R.rectArea.length,numHemiLights:R.hemi.length,numDirLightShadows:R.directionalShadowMap.length,numPointLightShadows:R.pointShadowMap.length,numSpotLightShadows:R.spotShadowMap.length,numSpotLightShadowsWithMaps:R.numSpotLightShadowsWithMaps,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:C.dithering,shadowMapEnabled:n.shadowMap.enabled&&W.length>0,shadowMapType:n.shadowMap.type,toneMapping:C.toneMapped?n.toneMapping:Nr,useLegacyLights:n.useLegacyLights,premultipliedAlpha:C.premultipliedAlpha,doubleSided:C.side===Rr,flipSided:C.side===mi,useDepthPacking:C.depthPacking>=0,depthPacking:C.depthPacking||0,index0AttributeName:C.index0AttributeName,extensionDerivatives:Y&&C.extensions.derivatives===!0,extensionFragDepth:Y&&C.extensions.fragDepth===!0,extensionDrawBuffers:Y&&C.extensions.drawBuffers===!0,extensionShaderTextureLOD:Y&&C.extensions.shaderTextureLOD===!0,rendererExtensionFragDepth:h||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:h||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:h||i.has("EXT_shader_texture_lod"),customProgramCacheKey:C.customProgramCacheKey()}}function m(C){const R=[];if(C.shaderID?R.push(C.shaderID):(R.push(C.customVertexShaderID),R.push(C.customFragmentShaderID)),C.defines!==void 0)for(const W in C.defines)R.push(W),R.push(C.defines[W]);return C.isRawShaderMaterial===!1&&(S(R,C),w(R,C),R.push(n.outputEncoding)),R.push(C.customProgramCacheKey),R.join()}function S(C,R){C.push(R.precision),C.push(R.outputEncoding),C.push(R.envMapMode),C.push(R.envMapCubeUVHeight),C.push(R.mapUv),C.push(R.alphaMapUv),C.push(R.lightMapUv),C.push(R.aoMapUv),C.push(R.bumpMapUv),C.push(R.normalMapUv),C.push(R.displacementMapUv),C.push(R.emissiveMapUv),C.push(R.metalnessMapUv),C.push(R.roughnessMapUv),C.push(R.clearcoatMapUv),C.push(R.clearcoatNormalMapUv),C.push(R.clearcoatRoughnessMapUv),C.push(R.iridescenceMapUv),C.push(R.iridescenceThicknessMapUv),C.push(R.sheenColorMapUv),C.push(R.sheenRoughnessMapUv),C.push(R.specularMapUv),C.push(R.specularColorMapUv),C.push(R.specularIntensityMapUv),C.push(R.transmissionMapUv),C.push(R.thicknessMapUv),C.push(R.combine),C.push(R.fogExp2),C.push(R.sizeAttenuation),C.push(R.morphTargetsCount),C.push(R.morphAttributeCount),C.push(R.numDirLights),C.push(R.numPointLights),C.push(R.numSpotLights),C.push(R.numSpotLightMaps),C.push(R.numHemiLights),C.push(R.numRectAreaLights),C.push(R.numDirLightShadows),C.push(R.numPointLightShadows),C.push(R.numSpotLightShadows),C.push(R.numSpotLightShadowsWithMaps),C.push(R.shadowMapType),C.push(R.toneMapping),C.push(R.numClippingPlanes),C.push(R.numClipIntersection),C.push(R.depthPacking)}function w(C,R){a.disableAll(),R.isWebGL2&&a.enable(0),R.supportsVertexTextures&&a.enable(1),R.instancing&&a.enable(2),R.instancingColor&&a.enable(3),R.matcap&&a.enable(4),R.envMap&&a.enable(5),R.normalMapObjectSpace&&a.enable(6),R.normalMapTangentSpace&&a.enable(7),R.clearcoat&&a.enable(8),R.iridescence&&a.enable(9),R.alphaTest&&a.enable(10),R.vertexColors&&a.enable(11),R.vertexAlphas&&a.enable(12),R.vertexUvs2&&a.enable(13),R.vertexTangents&&a.enable(14),C.push(a.mask),a.disableAll(),R.fog&&a.enable(0),R.useFog&&a.enable(1),R.flatShading&&a.enable(2),R.logarithmicDepthBuffer&&a.enable(3),R.skinning&&a.enable(4),R.morphTargets&&a.enable(5),R.morphNormals&&a.enable(6),R.morphColors&&a.enable(7),R.premultipliedAlpha&&a.enable(8),R.shadowMapEnabled&&a.enable(9),R.useLegacyLights&&a.enable(10),R.doubleSided&&a.enable(11),R.flipSided&&a.enable(12),R.useDepthPacking&&a.enable(13),R.dithering&&a.enable(14),R.transmission&&a.enable(15),R.sheen&&a.enable(16),R.decodeVideoTexture&&a.enable(17),R.opaque&&a.enable(18),R.pointsUvs&&a.enable(19),C.push(a.mask)}function A(C){const R=y[C.type];let W;if(R){const J=Lr[R];W=VL.clone(J.uniforms)}else W=C.uniforms;return W}function b(C,R){let W;for(let J=0,j=f.length;J0?i.push(m):v.transparent===!0?r.push(m):t.push(m)}function l(d,p,v,y,_,M){const m=o(d,p,v,y,_,M);v.transmission>0?i.unshift(m):v.transparent===!0?r.unshift(m):t.unshift(m)}function f(d,p){t.length>1&&t.sort(d||hG),i.length>1&&i.sort(p||Pb),r.length>1&&r.sort(p||Pb)}function h(){for(let d=e,p=n.length;d=s.length?(o=new Lb,s.push(o)):o=s[r],o}function t(){n=new WeakMap}return{get:e,dispose:t}}function pG(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new k,color:new Fe};break;case"SpotLight":t={position:new k,direction:new k,color:new Fe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new k,color:new Fe,distance:0,decay:0};break;case"HemisphereLight":t={direction:new k,skyColor:new Fe,groundColor:new Fe};break;case"RectAreaLight":t={color:new Fe,position:new k,halfWidth:new k,halfHeight:new k};break}return n[e.id]=t,t}}}function mG(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ye};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ye};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ye,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}let gG=0;function vG(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function yG(n,e){const t=new pG,i=mG(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-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};for(let h=0;h<9;h++)r.probe.push(new k);const s=new k,o=new ot,a=new ot;function l(h,d){let p=0,v=0,y=0;for(let W=0;W<9;W++)r.probe[W].set(0,0,0);let _=0,M=0,m=0,S=0,w=0,A=0,b=0,P=0,I=0,L=0;h.sort(vG);const C=d===!0?Math.PI:1;for(let W=0,J=h.length;W0&&(e.isWebGL2||n.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=De.LTC_FLOAT_1,r.rectAreaLTC2=De.LTC_FLOAT_2):n.has("OES_texture_half_float_linear")===!0?(r.rectAreaLTC1=De.LTC_HALF_1,r.rectAreaLTC2=De.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=p,r.ambient[1]=v,r.ambient[2]=y;const R=r.hash;(R.directionalLength!==_||R.pointLength!==M||R.spotLength!==m||R.rectAreaLength!==S||R.hemiLength!==w||R.numDirectionalShadows!==A||R.numPointShadows!==b||R.numSpotShadows!==P||R.numSpotMaps!==I)&&(r.directional.length=_,r.spot.length=m,r.rectArea.length=S,r.point.length=M,r.hemi.length=w,r.directionalShadow.length=A,r.directionalShadowMap.length=A,r.pointShadow.length=b,r.pointShadowMap.length=b,r.spotShadow.length=P,r.spotShadowMap.length=P,r.directionalShadowMatrix.length=A,r.pointShadowMatrix.length=b,r.spotLightMatrix.length=P+I-L,r.spotLightMap.length=I,r.numSpotLightShadowsWithMaps=L,R.directionalLength=_,R.pointLength=M,R.spotLength=m,R.rectAreaLength=S,R.hemiLength=w,R.numDirectionalShadows=A,R.numPointShadows=b,R.numSpotShadows=P,R.numSpotMaps=I,r.version=gG++)}function f(h,d){let p=0,v=0,y=0,_=0,M=0;const m=d.matrixWorldInverse;for(let S=0,w=h.length;S=a.length?(l=new Rb(n,e),a.push(l)):l=a[o],l}function r(){t=new WeakMap}return{get:i,dispose:r}}class uS extends Yn{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=RL,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 cS extends Yn{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}}const _G=`void main() { + gl_Position = vec4( position, 1.0 ); +}`,SG=`uniform sampler2D shadow_pass; +uniform vec2 resolution; +uniform float radius; +#include +void main() { + const float samples = float( VSM_SAMPLES ); + float mean = 0.0; + float squared_mean = 0.0; + float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); + float uvStart = samples <= 1.0 ? 0.0 : - 1.0; + for ( float i = 0.0; i < samples; i ++ ) { + float uvOffset = uvStart + i * uvStride; + #ifdef HORIZONTAL_PASS + vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); + mean += distribution.x; + squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; + #else + float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); + mean += depth; + squared_mean += depth * depth; + #endif + } + mean = mean / samples; + squared_mean = squared_mean / samples; + float std_dev = sqrt( squared_mean - mean * mean ); + gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); +}`;function wG(n,e,t){let i=new bg;const r=new ye,s=new ye,o=new Dt,a=new uS({depthPacking:IL}),l=new cS,f={},h=t.maxTextureSize,d={[Bs]:mi,[mi]:Bs,[Rr]:Rr},p=new rs({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new ye},radius:{value:4}},vertexShader:_G,fragmentShader:SG}),v=p.clone();v.defines.HORIZONTAL_PASS=1;const y=new dt;y.setAttribute("position",new Bt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const _=new Fn(y,p),M=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=X1,this.render=function(A,b,P){if(M.enabled===!1||M.autoUpdate===!1&&M.needsUpdate===!1||A.length===0)return;const I=n.getRenderTarget(),L=n.getActiveCubeFace(),C=n.getActiveMipmapLevel(),R=n.state;R.setBlending(Ns),R.buffers.color.setClear(1,1,1,1),R.buffers.depth.setTest(!0),R.setScissorTest(!1);for(let W=0,J=A.length;Wh||r.y>h)&&(r.x>h&&(s.x=Math.floor(h/Z.x),r.x=s.x*Z.x,X.mapSize.x=s.x),r.y>h&&(s.y=Math.floor(h/Z.y),r.y=s.y*Z.y,X.mapSize.y=s.y)),X.map===null){const ae=this.type!==au?{minFilter:mn,magFilter:mn}:{};X.map=new Or(r.x,r.y,ae),X.map.texture.name=j.name+".shadowMap",X.camera.updateProjectionMatrix()}n.setRenderTarget(X.map),n.clear();const se=X.getViewportCount();for(let ae=0;ae0||b.map&&b.alphaTest>0){const R=L.uuid,W=b.uuid;let J=f[R];J===void 0&&(J={},f[R]=J);let j=J[W];j===void 0&&(j=L.clone(),J[W]=j),L=j}if(L.visible=b.visible,L.wireframe=b.wireframe,I===au?L.side=b.shadowSide!==null?b.shadowSide:b.side:L.side=b.shadowSide!==null?b.shadowSide:d[b.side],L.alphaMap=b.alphaMap,L.alphaTest=b.alphaTest,L.map=b.map,L.clipShadows=b.clipShadows,L.clippingPlanes=b.clippingPlanes,L.clipIntersection=b.clipIntersection,L.displacementMap=b.displacementMap,L.displacementScale=b.displacementScale,L.displacementBias=b.displacementBias,L.wireframeLinewidth=b.wireframeLinewidth,L.linewidth=b.linewidth,P.isPointLight===!0&&L.isMeshDistanceMaterial===!0){const R=n.properties.get(L);R.light=P}return L}function w(A,b,P,I,L){if(A.visible===!1)return;if(A.layers.test(b.layers)&&(A.isMesh||A.isLine||A.isPoints)&&(A.castShadow||A.receiveShadow&&L===au)&&(!A.frustumCulled||i.intersectsObject(A))){A.modelViewMatrix.multiplyMatrices(P.matrixWorldInverse,A.matrixWorld);const W=e.update(A),J=A.material;if(Array.isArray(J)){const j=W.groups;for(let X=0,Z=j.length;X=1):D.indexOf("OpenGL ES")!==-1&&(ae=parseFloat(/^OpenGL ES (\d)/.exec(D)[1]),se=ae>=2);let V=null,B={};const te=n.getParameter(3088),$=n.getParameter(2978),ee=new Dt().fromArray(te),ue=new Dt().fromArray($);function Ee(Y,fe,Ae){const Ue=new Uint8Array(4),Je=n.createTexture();n.bindTexture(Y,Je),n.texParameteri(Y,10241,9728),n.texParameteri(Y,10240,9728);for(let Ot=0;Ot"u"?!1:/OculusBrowser/g.test(navigator.userAgent),y=new WeakMap;let _;const M=new WeakMap;let m=!1;try{m=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function S(z,N){return m?new OffscreenCanvas(z,N):jf("canvas")}function w(z,N,le,be){let Te=1;if((z.width>be||z.height>be)&&(Te=be/Math.max(z.width,z.height)),Te<1||N===!0)if(typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&z instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&z instanceof ImageBitmap){const Re=N?OL:Math.floor,et=Re(Te*z.width),ze=Re(Te*z.height);_===void 0&&(_=S(et,ze));const pe=le?S(et,ze):_;return pe.width=et,pe.height=ze,pe.getContext("2d").drawImage(z,0,0,et,ze),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+z.width+"x"+z.height+") to ("+et+"x"+ze+")."),pe}else return"data"in z&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+z.width+"x"+z.height+")."),z;return z}function A(z){return c_(z.width)&&c_(z.height)}function b(z){return a?!1:z.wrapS!==ri||z.wrapT!==ri||z.minFilter!==mn&&z.minFilter!==vn}function P(z,N){return z.generateMipmaps&&N&&z.minFilter!==mn&&z.minFilter!==vn}function I(z){n.generateMipmap(z)}function L(z,N,le,be,Te=!1){if(a===!1)return N;if(z!==null){if(n[z]!==void 0)return n[z];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+z+"'")}let Re=N;return N===6403&&(le===5126&&(Re=33326),le===5131&&(Re=33325),le===5121&&(Re=33321)),N===33319&&(le===5126&&(Re=33328),le===5131&&(Re=33327),le===5121&&(Re=33323)),N===6408&&(le===5126&&(Re=34836),le===5131&&(Re=34842),le===5121&&(Re=be===zt&&Te===!1?35907:32856),le===32819&&(Re=32854),le===32820&&(Re=32855)),(Re===33325||Re===33326||Re===33327||Re===33328||Re===34842||Re===34836)&&e.get("EXT_color_buffer_float"),Re}function C(z,N,le){return P(z,le)===!0||z.isFramebufferTexture&&z.minFilter!==mn&&z.minFilter!==vn?Math.log2(Math.max(N.width,N.height))+1:z.mipmaps!==void 0&&z.mipmaps.length>0?z.mipmaps.length:z.isCompressedTexture&&Array.isArray(z.image)?N.mipmaps.length:1}function R(z){return z===mn||z===Wm||z===cf?9728:9729}function W(z){const N=z.target;N.removeEventListener("dispose",W),j(N),N.isVideoTexture&&y.delete(N)}function J(z){const N=z.target;N.removeEventListener("dispose",J),Z(N)}function j(z){const N=i.get(z);if(N.__webglInit===void 0)return;const le=z.source,be=M.get(le);if(be){const Te=be[N.__cacheKey];Te.usedTimes--,Te.usedTimes===0&&X(z),Object.keys(be).length===0&&M.delete(le)}i.remove(z)}function X(z){const N=i.get(z);n.deleteTexture(N.__webglTexture);const le=z.source,be=M.get(le);delete be[N.__cacheKey],o.memory.textures--}function Z(z){const N=z.texture,le=i.get(z),be=i.get(N);if(be.__webglTexture!==void 0&&(n.deleteTexture(be.__webglTexture),o.memory.textures--),z.depthTexture&&z.depthTexture.dispose(),z.isWebGLCubeRenderTarget)for(let Te=0;Te<6;Te++)n.deleteFramebuffer(le.__webglFramebuffer[Te]),le.__webglDepthbuffer&&n.deleteRenderbuffer(le.__webglDepthbuffer[Te]);else{if(n.deleteFramebuffer(le.__webglFramebuffer),le.__webglDepthbuffer&&n.deleteRenderbuffer(le.__webglDepthbuffer),le.__webglMultisampledFramebuffer&&n.deleteFramebuffer(le.__webglMultisampledFramebuffer),le.__webglColorRenderbuffer)for(let Te=0;Te=l&&console.warn("THREE.WebGLTextures: Trying to use "+z+" texture units while this GPU supports only "+l),se+=1,z}function V(z){const N=[];return N.push(z.wrapS),N.push(z.wrapT),N.push(z.wrapR||0),N.push(z.magFilter),N.push(z.minFilter),N.push(z.anisotropy),N.push(z.internalFormat),N.push(z.format),N.push(z.type),N.push(z.generateMipmaps),N.push(z.premultiplyAlpha),N.push(z.flipY),N.push(z.unpackAlignment),N.push(z.encoding),N.join()}function B(z,N){const le=i.get(z);if(z.isVideoTexture&&nt(z),z.isRenderTargetTexture===!1&&z.version>0&&le.__version!==z.version){const be=z.image;if(be===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(be.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Xe(le,z,N);return}}t.bindTexture(3553,le.__webglTexture,33984+N)}function te(z,N){const le=i.get(z);if(z.version>0&&le.__version!==z.version){Xe(le,z,N);return}t.bindTexture(35866,le.__webglTexture,33984+N)}function $(z,N){const le=i.get(z);if(z.version>0&&le.__version!==z.version){Xe(le,z,N);return}t.bindTexture(32879,le.__webglTexture,33984+N)}function ee(z,N){const le=i.get(z);if(z.version>0&&le.__version!==z.version){Ye(le,z,N);return}t.bindTexture(34067,le.__webglTexture,33984+N)}const ue={[Ff]:10497,[ri]:33071,[Bf]:33648},Ee={[mn]:9728,[Wm]:9984,[cf]:9986,[vn]:9729,[K1]:9985,[Bo]:9987};function we(z,N,le){if(le?(n.texParameteri(z,10242,ue[N.wrapS]),n.texParameteri(z,10243,ue[N.wrapT]),(z===32879||z===35866)&&n.texParameteri(z,32882,ue[N.wrapR]),n.texParameteri(z,10240,Ee[N.magFilter]),n.texParameteri(z,10241,Ee[N.minFilter])):(n.texParameteri(z,10242,33071),n.texParameteri(z,10243,33071),(z===32879||z===35866)&&n.texParameteri(z,32882,33071),(N.wrapS!==ri||N.wrapT!==ri)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),n.texParameteri(z,10240,R(N.magFilter)),n.texParameteri(z,10241,R(N.minFilter)),N.minFilter!==mn&&N.minFilter!==vn&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),e.has("EXT_texture_filter_anisotropic")===!0){const be=e.get("EXT_texture_filter_anisotropic");if(N.magFilter===mn||N.minFilter!==cf&&N.minFilter!==Bo||N.type===Ls&&e.has("OES_texture_float_linear")===!1||a===!1&&N.type===Ru&&e.has("OES_texture_half_float_linear")===!1)return;(N.anisotropy>1||i.get(N).__currentAnisotropy)&&(n.texParameterf(z,be.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(N.anisotropy,r.getMaxAnisotropy())),i.get(N).__currentAnisotropy=N.anisotropy)}}function Q(z,N){let le=!1;z.__webglInit===void 0&&(z.__webglInit=!0,N.addEventListener("dispose",W));const be=N.source;let Te=M.get(be);Te===void 0&&(Te={},M.set(be,Te));const Re=V(N);if(Re!==z.__cacheKey){Te[Re]===void 0&&(Te[Re]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,le=!0),Te[Re].usedTimes++;const et=Te[z.__cacheKey];et!==void 0&&(Te[z.__cacheKey].usedTimes--,et.usedTimes===0&&X(N)),z.__cacheKey=Re,z.__webglTexture=Te[Re].texture}return le}function Xe(z,N,le){let be=3553;(N.isDataArrayTexture||N.isCompressedArrayTexture)&&(be=35866),N.isData3DTexture&&(be=32879);const Te=Q(z,N),Re=N.source;t.bindTexture(be,z.__webglTexture,33984+le);const et=i.get(Re);if(Re.version!==et.__version||Te===!0){t.activeTexture(33984+le),n.pixelStorei(37440,N.flipY),n.pixelStorei(37441,N.premultiplyAlpha),n.pixelStorei(3317,N.unpackAlignment),n.pixelStorei(37443,0);const ze=b(N)&&A(N.image)===!1;let pe=w(N.image,ze,!1,h);pe=_t(N,pe);const He=A(pe)||a,G=s.convert(N.format,N.encoding);let de=s.convert(N.type),Se=L(N.internalFormat,G,de,N.encoding,N.isVideoTexture);we(be,N,He);let Pe;const Qe=N.mipmaps,ct=a&&N.isVideoTexture!==!0,kt=et.__version===void 0||Te===!0,Y=C(N,pe,He);if(N.isDepthTexture)Se=6402,a?N.type===Ls?Se=36012:N.type===So?Se=33190:N.type===Ua?Se=35056:Se=33189:N.type===Ls&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),N.format===No&&Se===6402&&N.type!==Q1&&N.type!==So&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),N.type=So,de=s.convert(N.type)),N.format===Ya&&Se===6402&&(Se=34041,N.type!==Ua&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),N.type=Ua,de=s.convert(N.type))),kt&&(ct?t.texStorage2D(3553,1,Se,pe.width,pe.height):t.texImage2D(3553,0,Se,pe.width,pe.height,0,G,de,null));else if(N.isDataTexture)if(Qe.length>0&&He){ct&&kt&&t.texStorage2D(3553,Y,Se,Qe[0].width,Qe[0].height);for(let fe=0,Ae=Qe.length;fe>=1,Ae>>=1}}else if(Qe.length>0&&He){ct&&kt&&t.texStorage2D(3553,Y,Se,Qe[0].width,Qe[0].height);for(let fe=0,Ae=Qe.length;fe0&&kt++,t.texStorage2D(34067,kt,Pe,pe[0].width,pe[0].height));for(let fe=0;fe<6;fe++)if(ze){Qe?t.texSubImage2D(34069+fe,0,0,0,pe[fe].width,pe[fe].height,de,Se,pe[fe].data):t.texImage2D(34069+fe,0,Pe,pe[fe].width,pe[fe].height,0,de,Se,pe[fe].data);for(let Ae=0;Ae=34069&&Te<=34074)&&n.framebufferTexture2D(36160,be,Te,i.get(le).__webglTexture,0),t.bindFramebuffer(36160,null)}function Me(z,N,le){if(n.bindRenderbuffer(36161,z),N.depthBuffer&&!N.stencilBuffer){let be=33189;if(le||je(N)){const Te=N.depthTexture;Te&&Te.isDepthTexture&&(Te.type===Ls?be=36012:Te.type===So&&(be=33190));const Re=qe(N);je(N)?p.renderbufferStorageMultisampleEXT(36161,Re,be,N.width,N.height):n.renderbufferStorageMultisample(36161,Re,be,N.width,N.height)}else n.renderbufferStorage(36161,be,N.width,N.height);n.framebufferRenderbuffer(36160,36096,36161,z)}else if(N.depthBuffer&&N.stencilBuffer){const be=qe(N);le&&je(N)===!1?n.renderbufferStorageMultisample(36161,be,35056,N.width,N.height):je(N)?p.renderbufferStorageMultisampleEXT(36161,be,35056,N.width,N.height):n.renderbufferStorage(36161,34041,N.width,N.height),n.framebufferRenderbuffer(36160,33306,36161,z)}else{const be=N.isWebGLMultipleRenderTargets===!0?N.texture:[N.texture];for(let Te=0;Te0&&je(z)===!1){const ze=Re?N:[N];le.__webglMultisampledFramebuffer=n.createFramebuffer(),le.__webglColorRenderbuffer=[],t.bindFramebuffer(36160,le.__webglMultisampledFramebuffer);for(let pe=0;pe0&&je(z)===!1){const N=z.isWebGLMultipleRenderTargets?z.texture:[z.texture],le=z.width,be=z.height;let Te=16384;const Re=[],et=z.stencilBuffer?33306:36096,ze=i.get(z),pe=z.isWebGLMultipleRenderTargets===!0;if(pe)for(let He=0;He0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&N.__useRenderToTexture!==!1}function nt(z){const N=o.render.frame;y.get(z)!==N&&(y.set(z,N),z.update())}function _t(z,N){const le=z.encoding,be=z.format,Te=z.type;return z.isCompressedTexture===!0||z.isVideoTexture===!0||z.format===Gm||le!==Vs&&(le===zt?a===!1?e.has("EXT_sRGB")===!0&&be===Vi?(z.format=Gm,z.minFilter=vn,z.generateMipmaps=!1):N=nS.sRGBToLinear(N):(be!==Vi||Te!==Vo)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",le)),N}this.allocateTextureUnit=D,this.resetTextureUnits=ae,this.setTexture2D=B,this.setTexture2DArray=te,this.setTexture3D=$,this.setTextureCube=ee,this.rebindTextures=_e,this.setupRenderTarget=ke,this.updateRenderTargetMipmap=Ie,this.updateMultisampleRenderTarget=Ge,this.setupDepthRenderbuffer=oe,this.setupFrameBufferTexture=xe,this.useMultisampledRTT=je}function YL(n,e,t){const i=t.isWebGL2;function r(s,o=null){let a;if(s===Vo)return 5121;if(s===gL)return 32819;if(s===vL)return 32820;if(s===dL)return 5120;if(s===pL)return 5122;if(s===Q1)return 5123;if(s===mL)return 5124;if(s===So)return 5125;if(s===Ls)return 5126;if(s===Ru)return i?5131:(a=e.get("OES_texture_half_float"),a!==null?a.HALF_FLOAT_OES:null);if(s===yL)return 6406;if(s===Vi)return 6408;if(s===xL)return 6409;if(s===_L)return 6410;if(s===No)return 6402;if(s===Ya)return 34041;if(s===Gm)return a=e.get("EXT_sRGB"),a!==null?a.SRGB_ALPHA_EXT:null;if(s===SL)return 6403;if(s===wL)return 36244;if(s===ML)return 33319;if(s===AL)return 33320;if(s===EL)return 36249;if(s===$p||s===em||s===tm||s===nm)if(o===zt)if(a=e.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(s===$p)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(s===em)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(s===tm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(s===nm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=e.get("WEBGL_compressed_texture_s3tc"),a!==null){if(s===$p)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(s===em)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(s===tm)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(s===nm)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(s===Bx||s===Vx||s===Hx||s===Wx)if(a=e.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(s===Bx)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(s===Vx)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(s===Hx)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(s===Wx)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(s===bL)return a=e.get("WEBGL_compressed_texture_etc1"),a!==null?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(s===Gx||s===jx)if(a=e.get("WEBGL_compressed_texture_etc"),a!==null){if(s===Gx)return o===zt?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(s===jx)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(s===Xx||s===Yx||s===qx||s===Zx||s===Jx||s===Kx||s===Qx||s===$x||s===e_||s===t_||s===n_||s===i_||s===r_||s===s_)if(a=e.get("WEBGL_compressed_texture_astc"),a!==null){if(s===Xx)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(s===Yx)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(s===qx)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(s===Zx)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(s===Jx)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(s===Kx)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(s===Qx)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(s===$x)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(s===e_)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(s===t_)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(s===n_)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(s===i_)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(s===r_)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(s===s_)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(s===im)if(a=e.get("EXT_texture_compression_bptc"),a!==null){if(s===im)return o===zt?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT}else return null;if(s===TL||s===o_||s===a_||s===l_)if(a=e.get("EXT_texture_compression_rgtc"),a!==null){if(s===im)return a.COMPRESSED_RED_RGTC1_EXT;if(s===o_)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(s===a_)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(s===l_)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return s===Ua?i?34042:(a=e.get("WEBGL_depth_texture"),a!==null?a.UNSIGNED_INT_24_8_WEBGL:null):n[s]!==void 0?n[s]:null}return{convert:r}}class qL extends Wt{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class cu extends Tt{constructor(){super(),this.isGroup=!0,this.type="Group"}}const EG={type:"move"};class Kv{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new cu,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new cu,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new k,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new k),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new cu,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new k,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new k),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const i of e.hand.values())this._getHandJoint(t,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,i){let r=null,s=null,o=null;const a=this._targetRay,l=this._grip,f=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(f&&e.hand){o=!0;for(const _ of e.hand.values()){const M=t.getJointPose(_,i),m=this._getHandJoint(f,_);M!==null&&(m.matrix.fromArray(M.transform.matrix),m.matrix.decompose(m.position,m.rotation,m.scale),m.jointRadius=M.radius),m.visible=M!==null}const h=f.joints["index-finger-tip"],d=f.joints["thumb-tip"],p=h.position.distanceTo(d.position),v=.02,y=.005;f.inputState.pinching&&p>v+y?(f.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!f.inputState.pinching&&p<=v-y&&(f.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(s=t.getPose(e.gripSpace,i),s!==null&&(l.matrix.fromArray(s.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),s.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(s.linearVelocity)):l.hasLinearVelocity=!1,s.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(s.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(r=t.getPose(e.targetRaySpace,i),r===null&&s!==null&&(r=s),r!==null&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(EG)))}return a!==null&&(a.visible=r!==null),l!==null&&(l.visible=s!==null),f!==null&&(f.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const i=new cu;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}class ZL extends hn{constructor(e,t,i,r,s,o,a,l,f,h){if(h=h!==void 0?h:No,h!==No&&h!==Ya)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&h===No&&(i=So),i===void 0&&h===Ya&&(i=Ua),super(null,r,s,o,a,l,h,i,f),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=a!==void 0?a:mn,this.minFilter=l!==void 0?l:mn,this.flipY=!1,this.generateMipmaps=!1}}class bG extends ss{constructor(e,t){super();const i=this;let r=null,s=1,o=null,a="local-floor",l=1,f=null,h=null,d=null,p=null,v=null,y=null;const _=t.getContextAttributes();let M=null,m=null;const S=[],w=[],A=new Set,b=new Map,P=new Wt;P.layers.enable(1),P.viewport=new Dt;const I=new Wt;I.layers.enable(2),I.viewport=new Dt;const L=[P,I],C=new qL;C.layers.enable(1),C.layers.enable(2);let R=null,W=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ee){let ue=S[ee];return ue===void 0&&(ue=new Kv,S[ee]=ue),ue.getTargetRaySpace()},this.getControllerGrip=function(ee){let ue=S[ee];return ue===void 0&&(ue=new Kv,S[ee]=ue),ue.getGripSpace()},this.getHand=function(ee){let ue=S[ee];return ue===void 0&&(ue=new Kv,S[ee]=ue),ue.getHandSpace()};function J(ee){const ue=w.indexOf(ee.inputSource);if(ue===-1)return;const Ee=S[ue];Ee!==void 0&&Ee.dispatchEvent({type:ee.type,data:ee.inputSource})}function j(){r.removeEventListener("select",J),r.removeEventListener("selectstart",J),r.removeEventListener("selectend",J),r.removeEventListener("squeeze",J),r.removeEventListener("squeezestart",J),r.removeEventListener("squeezeend",J),r.removeEventListener("end",j),r.removeEventListener("inputsourceschange",X);for(let ee=0;ee=0&&(w[we]=null,S[we].disconnect(Ee))}for(let ue=0;ue=w.length){w.push(Ee),we=Xe;break}else if(w[Xe]===null){w[Xe]=Ee,we=Xe;break}if(we===-1)break}const Q=S[we];Q&&Q.connect(Ee)}}const Z=new k,se=new k;function ae(ee,ue,Ee){Z.setFromMatrixPosition(ue.matrixWorld),se.setFromMatrixPosition(Ee.matrixWorld);const we=Z.distanceTo(se),Q=ue.projectionMatrix.elements,Xe=Ee.projectionMatrix.elements,Ye=Q[14]/(Q[10]-1),xe=Q[14]/(Q[10]+1),Me=(Q[9]+1)/Q[5],ge=(Q[9]-1)/Q[5],oe=(Q[8]-1)/Q[0],_e=(Xe[8]+1)/Xe[0],ke=Ye*oe,Ie=Ye*_e,Ge=we/(-oe+_e),qe=Ge*-oe;ue.matrixWorld.decompose(ee.position,ee.quaternion,ee.scale),ee.translateX(qe),ee.translateZ(Ge),ee.matrixWorld.compose(ee.position,ee.quaternion,ee.scale),ee.matrixWorldInverse.copy(ee.matrixWorld).invert();const je=Ye+Ge,nt=xe+Ge,_t=ke-qe,z=Ie+(we-qe),N=Me*xe/nt*je,le=ge*xe/nt*je;ee.projectionMatrix.makePerspective(_t,z,N,le,je,nt),ee.projectionMatrixInverse.copy(ee.projectionMatrix).invert()}function D(ee,ue){ue===null?ee.matrixWorld.copy(ee.matrix):ee.matrixWorld.multiplyMatrices(ue.matrixWorld,ee.matrix),ee.matrixWorldInverse.copy(ee.matrixWorld).invert()}this.updateCamera=function(ee){if(r===null)return;C.near=I.near=P.near=ee.near,C.far=I.far=P.far=ee.far,(R!==C.near||W!==C.far)&&(r.updateRenderState({depthNear:C.near,depthFar:C.far}),R=C.near,W=C.far);const ue=ee.parent,Ee=C.cameras;D(C,ue);for(let we=0;weQ&&(b.set(we,we.lastChangedTime),i.dispatchEvent({type:"planechanged",data:we}))}}y=null}const $=new HL;$.setAnimationLoop(te),this.setAnimationLoop=function(ee){B=ee},this.dispose=function(){}}}function TG(n,e){function t(M,m){M.matrixAutoUpdate===!0&&M.updateMatrix(),m.value.copy(M.matrix)}function i(M,m){m.color.getRGB(M.fogColor.value,BL(n)),m.isFog?(M.fogNear.value=m.near,M.fogFar.value=m.far):m.isFogExp2&&(M.fogDensity.value=m.density)}function r(M,m,S,w,A){m.isMeshBasicMaterial||m.isMeshLambertMaterial?s(M,m):m.isMeshToonMaterial?(s(M,m),d(M,m)):m.isMeshPhongMaterial?(s(M,m),h(M,m)):m.isMeshStandardMaterial?(s(M,m),p(M,m),m.isMeshPhysicalMaterial&&v(M,m,A)):m.isMeshMatcapMaterial?(s(M,m),y(M,m)):m.isMeshDepthMaterial?s(M,m):m.isMeshDistanceMaterial?(s(M,m),_(M,m)):m.isMeshNormalMaterial?s(M,m):m.isLineBasicMaterial?(o(M,m),m.isLineDashedMaterial&&a(M,m)):m.isPointsMaterial?l(M,m,S,w):m.isSpriteMaterial?f(M,m):m.isShadowMaterial?(M.color.value.copy(m.color),M.opacity.value=m.opacity):m.isShaderMaterial&&(m.uniformsNeedUpdate=!1)}function s(M,m){M.opacity.value=m.opacity,m.color&&M.diffuse.value.copy(m.color),m.emissive&&M.emissive.value.copy(m.emissive).multiplyScalar(m.emissiveIntensity),m.map&&(M.map.value=m.map,t(m.map,M.mapTransform)),m.alphaMap&&(M.alphaMap.value=m.alphaMap,t(m.alphaMap,M.alphaMapTransform)),m.bumpMap&&(M.bumpMap.value=m.bumpMap,t(m.bumpMap,M.bumpMapTransform),M.bumpScale.value=m.bumpScale,m.side===mi&&(M.bumpScale.value*=-1)),m.normalMap&&(M.normalMap.value=m.normalMap,t(m.normalMap,M.normalMapTransform),M.normalScale.value.copy(m.normalScale),m.side===mi&&M.normalScale.value.negate()),m.displacementMap&&(M.displacementMap.value=m.displacementMap,t(m.displacementMap,M.displacementMapTransform),M.displacementScale.value=m.displacementScale,M.displacementBias.value=m.displacementBias),m.emissiveMap&&(M.emissiveMap.value=m.emissiveMap,t(m.emissiveMap,M.emissiveMapTransform)),m.specularMap&&(M.specularMap.value=m.specularMap,t(m.specularMap,M.specularMapTransform)),m.alphaTest>0&&(M.alphaTest.value=m.alphaTest);const S=e.get(m).envMap;if(S&&(M.envMap.value=S,M.flipEnvMap.value=S.isCubeTexture&&S.isRenderTargetTexture===!1?-1:1,M.reflectivity.value=m.reflectivity,M.ior.value=m.ior,M.refractionRatio.value=m.refractionRatio),m.lightMap){M.lightMap.value=m.lightMap;const w=n.useLegacyLights===!0?Math.PI:1;M.lightMapIntensity.value=m.lightMapIntensity*w,t(m.lightMap,M.lightMapTransform)}m.aoMap&&(M.aoMap.value=m.aoMap,M.aoMapIntensity.value=m.aoMapIntensity,t(m.aoMap,M.aoMapTransform))}function o(M,m){M.diffuse.value.copy(m.color),M.opacity.value=m.opacity,m.map&&(M.map.value=m.map,t(m.map,M.mapTransform))}function a(M,m){M.dashSize.value=m.dashSize,M.totalSize.value=m.dashSize+m.gapSize,M.scale.value=m.scale}function l(M,m,S,w){M.diffuse.value.copy(m.color),M.opacity.value=m.opacity,M.size.value=m.size*S,M.scale.value=w*.5,m.map&&(M.map.value=m.map,t(m.map,M.uvTransform)),m.alphaMap&&(M.alphaMap.value=m.alphaMap),m.alphaTest>0&&(M.alphaTest.value=m.alphaTest)}function f(M,m){M.diffuse.value.copy(m.color),M.opacity.value=m.opacity,M.rotation.value=m.rotation,m.map&&(M.map.value=m.map,t(m.map,M.mapTransform)),m.alphaMap&&(M.alphaMap.value=m.alphaMap),m.alphaTest>0&&(M.alphaTest.value=m.alphaTest)}function h(M,m){M.specular.value.copy(m.specular),M.shininess.value=Math.max(m.shininess,1e-4)}function d(M,m){m.gradientMap&&(M.gradientMap.value=m.gradientMap)}function p(M,m){M.metalness.value=m.metalness,m.metalnessMap&&(M.metalnessMap.value=m.metalnessMap,t(m.metalnessMap,M.metalnessMapTransform)),M.roughness.value=m.roughness,m.roughnessMap&&(M.roughnessMap.value=m.roughnessMap,t(m.roughnessMap,M.roughnessMapTransform)),e.get(m).envMap&&(M.envMapIntensity.value=m.envMapIntensity)}function v(M,m,S){M.ior.value=m.ior,m.sheen>0&&(M.sheenColor.value.copy(m.sheenColor).multiplyScalar(m.sheen),M.sheenRoughness.value=m.sheenRoughness,m.sheenColorMap&&(M.sheenColorMap.value=m.sheenColorMap,t(m.sheenColorMap,M.sheenColorMapTransform)),m.sheenRoughnessMap&&(M.sheenRoughnessMap.value=m.sheenRoughnessMap,t(m.sheenRoughnessMap,M.sheenRoughnessMapTransform))),m.clearcoat>0&&(M.clearcoat.value=m.clearcoat,M.clearcoatRoughness.value=m.clearcoatRoughness,m.clearcoatMap&&(M.clearcoatMap.value=m.clearcoatMap,t(m.clearcoatMap,M.clearcoatMapTransform)),m.clearcoatRoughnessMap&&(M.clearcoatRoughnessMap.value=m.clearcoatRoughnessMap,t(m.clearcoatRoughnessMap,M.clearcoatRoughnessMapTransform)),m.clearcoatNormalMap&&(M.clearcoatNormalMap.value=m.clearcoatNormalMap,t(m.clearcoatNormalMap,M.clearcoatNormalMapTransform),M.clearcoatNormalScale.value.copy(m.clearcoatNormalScale),m.side===mi&&M.clearcoatNormalScale.value.negate())),m.iridescence>0&&(M.iridescence.value=m.iridescence,M.iridescenceIOR.value=m.iridescenceIOR,M.iridescenceThicknessMinimum.value=m.iridescenceThicknessRange[0],M.iridescenceThicknessMaximum.value=m.iridescenceThicknessRange[1],m.iridescenceMap&&(M.iridescenceMap.value=m.iridescenceMap,t(m.iridescenceMap,M.iridescenceMapTransform)),m.iridescenceThicknessMap&&(M.iridescenceThicknessMap.value=m.iridescenceThicknessMap,t(m.iridescenceThicknessMap,M.iridescenceThicknessMapTransform))),m.transmission>0&&(M.transmission.value=m.transmission,M.transmissionSamplerMap.value=S.texture,M.transmissionSamplerSize.value.set(S.width,S.height),m.transmissionMap&&(M.transmissionMap.value=m.transmissionMap,t(m.transmissionMap,M.transmissionMapTransform)),M.thickness.value=m.thickness,m.thicknessMap&&(M.thicknessMap.value=m.thicknessMap,t(m.thicknessMap,M.thicknessMapTransform)),M.attenuationDistance.value=m.attenuationDistance,M.attenuationColor.value.copy(m.attenuationColor)),M.specularIntensity.value=m.specularIntensity,M.specularColor.value.copy(m.specularColor),m.specularColorMap&&(M.specularColorMap.value=m.specularColorMap,t(m.specularColorMap,M.specularColorMapTransform)),m.specularIntensityMap&&(M.specularIntensityMap.value=m.specularIntensityMap,t(m.specularIntensityMap,M.specularIntensityMapTransform))}function y(M,m){m.matcap&&(M.matcap.value=m.matcap)}function _(M,m){const S=e.get(m).light;M.referencePosition.value.setFromMatrixPosition(S.matrixWorld),M.nearDistance.value=S.shadow.camera.near,M.farDistance.value=S.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:r}}function CG(n,e,t,i){let r={},s={},o=[];const a=t.isWebGL2?n.getParameter(35375):0;function l(S,w){const A=w.program;i.uniformBlockBinding(S,A)}function f(S,w){let A=r[S.id];A===void 0&&(y(S),A=h(S),r[S.id]=A,S.addEventListener("dispose",M));const b=w.program;i.updateUBOMapping(S,b);const P=e.render.frame;s[S.id]!==P&&(p(S),s[S.id]=P)}function h(S){const w=d();S.__bindingPointIndex=w;const A=n.createBuffer(),b=S.__size,P=S.usage;return n.bindBuffer(35345,A),n.bufferData(35345,b,P),n.bindBuffer(35345,null),n.bindBufferBase(35345,w,A),A}function d(){for(let S=0;S0){P=A%b;const J=b-P;P!==0&&J-R.boundary<0&&(A+=b-P,C.__offset=A)}A+=R.storage}return P=A%b,P>0&&(A+=b-P),S.__size=A,S.__cache={},this}function _(S){const w={boundary:0,storage:0};return typeof S=="number"?(w.boundary=4,w.storage=4):S.isVector2?(w.boundary=8,w.storage=8):S.isVector3||S.isColor?(w.boundary=16,w.storage=12):S.isVector4?(w.boundary=16,w.storage=16):S.isMatrix3?(w.boundary=48,w.storage=48):S.isMatrix4?(w.boundary=64,w.storage=64):S.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",S),w}function M(S){const w=S.target;w.removeEventListener("dispose",M);const A=o.indexOf(w.__bindingPointIndex);o.splice(A,1),n.deleteBuffer(r[w.id]),delete r[w.id],delete s[w.id]}function m(){for(const S in r)n.deleteBuffer(r[S]);o=[],r={},s={}}return{bind:l,update:f,dispose:m}}function PG(){const n=jf("canvas");return n.style.display="block",n}class fS{constructor(e={}){const{canvas:t=PG(),context:i=null,depth:r=!0,stencil:s=!0,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:f=!1,powerPreference:h="default",failIfMajorPerformanceCaveat:d=!1}=e;this.isWebGLRenderer=!0;let p;i!==null?p=i.getContextAttributes().alpha:p=o;let v=null,y=null;const _=[],M=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=Vs,this.useLegacyLights=!0,this.toneMapping=Nr,this.toneMappingExposure=1;const m=this;let S=!1,w=0,A=0,b=null,P=-1,I=null;const L=new Dt,C=new Dt;let R=null,W=t.width,J=t.height,j=1,X=null,Z=null;const se=new Dt(0,0,W,J),ae=new Dt(0,0,W,J);let D=!1;const V=new bg;let B=!1,te=!1,$=null;const ee=new ot,ue=new k,Ee={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function we(){return b===null?j:1}let Q=i;function Xe(O,re){for(let me=0;me0?y=M[M.length-1]:y=null,_.pop(),_.length>0?v=_[_.length-1]:v=null};function In(O,re,me,ne){if(O.visible===!1)return;if(O.layers.test(re.layers)){if(O.isGroup)me=O.renderOrder;else if(O.isLOD)O.autoUpdate===!0&&O.update(re);else if(O.isLight)y.pushLight(O),O.castShadow&&y.pushShadow(O);else if(O.isSprite){if(!O.frustumCulled||V.intersectsSprite(O)){ne&&ue.setFromMatrixPosition(O.matrixWorld).applyMatrix4(ee);const rt=je.update(O),st=O.material;st.visible&&v.push(O,rt,st,me,ue.z,null)}}else if((O.isMesh||O.isLine||O.isPoints)&&(O.isSkinnedMesh&&O.skeleton.frame!==ge.render.frame&&(O.skeleton.update(),O.skeleton.frame=ge.render.frame),!O.frustumCulled||V.intersectsObject(O))){ne&&ue.setFromMatrixPosition(O.matrixWorld).applyMatrix4(ee);const rt=je.update(O),st=O.material;if(Array.isArray(st)){const ft=rt.groups;for(let vt=0,yt=ft.length;vt0&&qt(ve,$e,re,me),ne&&Me.viewport(L.copy(ne)),ve.length>0&&ai(ve,re,me),$e.length>0&&ai($e,re,me),rt.length>0&&ai(rt,re,me),Me.buffers.depth.setTest(!0),Me.buffers.depth.setMask(!0),Me.buffers.color.setMask(!0),Me.setPolygonOffset(!1)}function qt(O,re,me,ne){if($===null){const st=xe.isWebGL2;$=new Or(1024,1024,{generateMipmaps:!0,type:Ye.has("EXT_color_buffer_half_float")?Ru:Vo,minFilter:Bo,samples:st&&a===!0?4:0})}const ve=m.getRenderTarget();m.setRenderTarget($),m.clear();const $e=m.toneMapping;m.toneMapping=Nr,ai(O,me,ne),_e.updateMultisampleRenderTarget($),_e.updateRenderTargetMipmap($);let rt=!1;for(let st=0,ft=re.length;st0&&_e.useMultisampledRTT(O)===!1?ve=oe.get(O).__webglMultisampledFramebuffer:ve=yt,L.copy(O.viewport),C.copy(O.scissor),R=O.scissorTest}else L.copy(se).multiplyScalar(j).floor(),C.copy(ae).multiplyScalar(j).floor(),R=D;if(Me.bindFramebuffer(36160,ve)&&xe.drawBuffers&&ne&&Me.drawBuffers(O,ve),Me.viewport(L),Me.scissor(C),Me.setScissorTest(R),$e){const ft=oe.get(O.texture);Q.framebufferTexture2D(36160,36064,34069+re,ft.__webglTexture,me)}else if(rt){const ft=oe.get(O.texture),vt=re||0;Q.framebufferTextureLayer(36160,36064,ft.__webglTexture,me||0,vt)}P=-1},this.readRenderTargetPixels=function(O,re,me,ne,ve,$e,rt){if(!(O&&O.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let st=oe.get(O).__webglFramebuffer;if(O.isWebGLCubeRenderTarget&&rt!==void 0&&(st=st[rt]),st){Me.bindFramebuffer(36160,st);try{const ft=O.texture,vt=ft.format,yt=ft.type;if(vt!==Vi&&pe.convert(vt)!==Q.getParameter(35739)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const St=yt===Ru&&(Ye.has("EXT_color_buffer_half_float")||xe.isWebGL2&&Ye.has("EXT_color_buffer_float"));if(yt!==Vo&&pe.convert(yt)!==Q.getParameter(35738)&&!(yt===Ls&&(xe.isWebGL2||Ye.has("OES_texture_float")||Ye.has("WEBGL_color_buffer_float")))&&!St){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}re>=0&&re<=O.width-ne&&me>=0&&me<=O.height-ve&&Q.readPixels(re,me,ne,ve,pe.convert(vt),pe.convert(yt),$e)}finally{const ft=b!==null?oe.get(b).__webglFramebuffer:null;Me.bindFramebuffer(36160,ft)}}},this.copyFramebufferToTexture=function(O,re,me=0){const ne=Math.pow(2,-me),ve=Math.floor(re.image.width*ne),$e=Math.floor(re.image.height*ne);_e.setTexture2D(re,0),Q.copyTexSubImage2D(3553,me,0,0,O.x,O.y,ve,$e),Me.unbindTexture()},this.copyTextureToTexture=function(O,re,me,ne=0){const ve=re.image.width,$e=re.image.height,rt=pe.convert(me.format),st=pe.convert(me.type);_e.setTexture2D(me,0),Q.pixelStorei(37440,me.flipY),Q.pixelStorei(37441,me.premultiplyAlpha),Q.pixelStorei(3317,me.unpackAlignment),re.isDataTexture?Q.texSubImage2D(3553,ne,O.x,O.y,ve,$e,rt,st,re.image.data):re.isCompressedTexture?Q.compressedTexSubImage2D(3553,ne,O.x,O.y,re.mipmaps[0].width,re.mipmaps[0].height,rt,re.mipmaps[0].data):Q.texSubImage2D(3553,ne,O.x,O.y,rt,st,re.image),ne===0&&me.generateMipmaps&&Q.generateMipmap(3553),Me.unbindTexture()},this.copyTextureToTexture3D=function(O,re,me,ne,ve=0){if(m.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const $e=O.max.x-O.min.x+1,rt=O.max.y-O.min.y+1,st=O.max.z-O.min.z+1,ft=pe.convert(ne.format),vt=pe.convert(ne.type);let yt;if(ne.isData3DTexture)_e.setTexture3D(ne,0),yt=32879;else if(ne.isDataArrayTexture)_e.setTexture2DArray(ne,0),yt=35866;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}Q.pixelStorei(37440,ne.flipY),Q.pixelStorei(37441,ne.premultiplyAlpha),Q.pixelStorei(3317,ne.unpackAlignment);const St=Q.getParameter(3314),Rt=Q.getParameter(32878),Vn=Q.getParameter(3316),Ii=Q.getParameter(3315),gr=Q.getParameter(32877),Ht=me.isCompressedTexture?me.mipmaps[0]:me.image;Q.pixelStorei(3314,Ht.width),Q.pixelStorei(32878,Ht.height),Q.pixelStorei(3316,O.min.x),Q.pixelStorei(3315,O.min.y),Q.pixelStorei(32877,O.min.z),me.isDataTexture||me.isData3DTexture?Q.texSubImage3D(yt,ve,re.x,re.y,re.z,$e,rt,st,ft,vt,Ht.data):me.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),Q.compressedTexSubImage3D(yt,ve,re.x,re.y,re.z,$e,rt,st,ft,Ht.data)):Q.texSubImage3D(yt,ve,re.x,re.y,re.z,$e,rt,st,ft,vt,Ht),Q.pixelStorei(3314,St),Q.pixelStorei(32878,Rt),Q.pixelStorei(3316,Vn),Q.pixelStorei(3315,Ii),Q.pixelStorei(32877,gr),ve===0&&ne.generateMipmaps&&Q.generateMipmap(yt),Me.unbindTexture()},this.initTexture=function(O){O.isCubeTexture?_e.setTextureCube(O,0):O.isData3DTexture?_e.setTexture3D(O,0):O.isDataArrayTexture||O.isCompressedArrayTexture?_e.setTexture2DArray(O,0):_e.setTexture2D(O,0),Me.unbindTexture()},this.resetState=function(){w=0,A=0,b=null,Me.reset(),He.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}}class JL extends fS{}JL.prototype.isWebGL1Renderer=!0;class Cg{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new Fe(e),this.density=t}clone(){return new Cg(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}class Pg{constructor(e,t=1,i=1e3){this.isFog=!0,this.name="",this.color=new Fe(e),this.near=t,this.far=i}clone(){return new Pg(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}class hS extends Tt{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t}get autoUpdate(){return console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate}set autoUpdate(e){console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate=e}}class Lg{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=Gf,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=ji()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,i){e*=this.stride,i*=t.stride;for(let r=0,s=this.stride;re.far||t.push({distance:l,point:Ic.clone(),uv:bi.getInterpolation(Ic,vp,Nc,yp,Ib,Qv,Db,new ye),face:null,object:this})}copy(e,t){return super.copy(e,t),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function xp(n,e,t,i,r,s){Bl.subVectors(n,t).addScalar(.5).multiply(i),r!==void 0?(Dc.x=s*Bl.x-r*Bl.y,Dc.y=r*Bl.x+s*Bl.y):Dc.copy(Bl),n.copy(e),n.x+=Dc.x,n.y+=Dc.y,n.applyMatrix4(KL)}const _p=new k,Nb=new k;class $L extends Tt{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let i=0,r=t.length;i0){let i,r;for(i=1,r=t.length;i0){_p.setFromMatrixPosition(this.matrixWorld);const r=e.ray.origin.distanceTo(_p);this.getObjectForDistance(r).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){_p.setFromMatrixPosition(e.matrixWorld),Nb.setFromMatrixPosition(this.matrixWorld);const i=_p.distanceTo(Nb)/e.zoom;t[0].object.visible=!0;let r,s;for(r=1,s=t.length;r=o)t[r-1].object.visible=!1,t[r].object.visible=!0;else break}for(this._currentLevel=r-1;rl)continue;p.applyMatrix4(this.matrixWorld);const L=e.ray.origin.distanceTo(p);Le.far||t.push({distance:L,point:d.clone().applyMatrix4(this.matrixWorld),index:w,face:null,faceIndex:null,object:this})}}else{const m=Math.max(0,o.start),S=Math.min(M.count,o.start+o.count);for(let w=m,A=S-1;wl)continue;p.applyMatrix4(this.matrixWorld);const P=e.ray.origin.distanceTo(p);Pe.far||t.push({distance:P,point:d.clone().applyMatrix4(this.matrixWorld),index:w,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sr.far)return;s.push({distance:f,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:o})}}class DG extends hn{constructor(e,t,i,r,s,o,a,l,f){super(e,t,i,r,s,o,a,l,f),this.isVideoTexture=!0,this.minFilter=o!==void 0?o:vn,this.magFilter=s!==void 0?s:vn,this.generateMipmaps=!1;const h=this;function d(){h.needsUpdate=!0,e.requestVideoFrameCallback(d)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(d)}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class NG extends hn{constructor(e,t,i){super({width:e,height:t}),this.isFramebufferTexture=!0,this.format=i,this.magFilter=mn,this.minFilter=mn,this.generateMipmaps=!1,this.needsUpdate=!0}}class gS extends hn{constructor(e,t,i,r,s,o,a,l,f,h,d,p){super(null,o,a,l,f,h,r,s,d,p),this.isCompressedTexture=!0,this.image={width:t,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class kG extends gS{constructor(e,t,i,r,s,o){super(e,t,i,s,o),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=ri}}class OG extends hn{constructor(e,t,i,r,s,o,a,l,f){super(e,t,i,r,s,o,a,l,f),this.isCanvasTexture=!0,this.needsUpdate=!0}}class Ur{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const i=this.getUtoTmapping(e);return this.getPoint(i,t)}getPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return t}getSpacedPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPointAt(i/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let i,r=this.getPoint(0),s=0;t.push(0);for(let o=1;o<=e;o++)i=this.getPoint(o/e),s+=i.distanceTo(r),t.push(s),r=i;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const i=this.getLengths();let r=0;const s=i.length;let o;t?o=t:o=e*i[s-1];let a=0,l=s-1,f;for(;a<=l;)if(r=Math.floor(a+(l-a)/2),f=i[r]-o,f<0)a=r+1;else if(f>0)l=r-1;else{l=r;break}if(r=l,i[r]===o)return r/(s-1);const h=i[r],p=i[r+1]-h,v=(o-h)/p;return(r+v)/(s-1)}getTangent(e,t){let r=e-1e-4,s=e+1e-4;r<0&&(r=0),s>1&&(s=1);const o=this.getPoint(r),a=this.getPoint(s),l=t||(o.isVector2?new ye:new k);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,t){const i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t){const i=new k,r=[],s=[],o=[],a=new k,l=new ot;for(let v=0;v<=e;v++){const y=v/e;r[v]=this.getTangentAt(y,new k)}s[0]=new k,o[0]=new k;let f=Number.MAX_VALUE;const h=Math.abs(r[0].x),d=Math.abs(r[0].y),p=Math.abs(r[0].z);h<=f&&(f=h,i.set(1,0,0)),d<=f&&(f=d,i.set(0,1,0)),p<=f&&i.set(0,0,1),a.crossVectors(r[0],i).normalize(),s[0].crossVectors(r[0],a),o[0].crossVectors(r[0],s[0]);for(let v=1;v<=e;v++){if(s[v]=s[v-1].clone(),o[v]=o[v-1].clone(),a.crossVectors(r[v-1],r[v]),a.length()>Number.EPSILON){a.normalize();const y=Math.acos(fn(r[v-1].dot(r[v]),-1,1));s[v].applyMatrix4(l.makeRotationAxis(a,y))}o[v].crossVectors(r[v],s[v])}if(t===!0){let v=Math.acos(fn(s[0].dot(s[e]),-1,1));v/=e,r[0].dot(a.crossVectors(s[0],s[e]))>0&&(v=-v);for(let y=1;y<=e;y++)s[y].applyMatrix4(l.makeRotationAxis(r[y],v*y)),o[y].crossVectors(r[y],s[y])}return{tangents:r,normals:s,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class Ig extends Ur{constructor(e=0,t=0,i=1,r=1,s=0,o=Math.PI*2,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=i,this.yRadius=r,this.aStartAngle=s,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,t){const i=t||new ye,r=Math.PI*2;let s=this.aEndAngle-this.aStartAngle;const o=Math.abs(s)r;)s-=r;s0?0:(Math.floor(Math.abs(a)/s)+1)*s:l===0&&a===s-1&&(a=s-2,l=1);let f,h;this.closed||a>0?f=r[(a-1)%s]:(Ep.subVectors(r[0],r[1]).add(r[0]),f=Ep);const d=r[a%s],p=r[(a+1)%s];if(this.closed||a+2r.length-2?r.length-1:o+1],d=r[o>r.length-3?r.length-1:o+2];return i.set(Zb(a,l.x,f.x,h.x,d.x),Zb(a,l.y,f.y,h.y,d.y)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t=i){const o=r[s]-i,a=this.curves[s],l=a.getLength(),f=l===0?0:1-o/l;return a.getPointAt(f,t)}s++}return null}getLength(){const 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;const e=[];let t=0;for(let i=0,r=this.curves.length;i1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,i=e.curves.length;t0){const d=f.getPoint(0);d.equals(this.currentPoint)||this.lineTo(d.x,d.y)}this.curves.push(f);const h=f.getPoint(1);return this.currentPoint.copy(h),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class Xu extends dt{constructor(e=[new ye(0,-.5),new ye(.5,0),new ye(0,.5)],t=12,i=0,r=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:i,phiLength:r},t=Math.floor(t),r=fn(r,0,Math.PI*2);const s=[],o=[],a=[],l=[],f=[],h=1/t,d=new k,p=new ye,v=new k,y=new k,_=new k;let M=0,m=0;for(let S=0;S<=e.length-1;S++)switch(S){case 0:M=e[S+1].x-e[S].x,m=e[S+1].y-e[S].y,v.x=m*1,v.y=-M,v.z=m*0,_.copy(v),v.normalize(),l.push(v.x,v.y,v.z);break;case e.length-1:l.push(_.x,_.y,_.z);break;default:M=e[S+1].x-e[S].x,m=e[S+1].y-e[S].y,v.x=m*1,v.y=-M,v.z=m*0,y.copy(v),v.x+=_.x,v.y+=_.y,v.z+=_.z,v.normalize(),l.push(v.x,v.y,v.z),_.copy(y)}for(let S=0;S<=t;S++){const w=i+S*h*r,A=Math.sin(w),b=Math.cos(w);for(let P=0;P<=e.length-1;P++){d.x=e[P].x*A,d.y=e[P].y,d.z=e[P].x*b,o.push(d.x,d.y,d.z),p.x=S/t,p.y=P/(e.length-1),a.push(p.x,p.y);const I=l[3*P+0]*A,L=l[3*P+1],C=l[3*P+0]*b;f.push(I,L,C)}}for(let S=0;S0&&w(!0),t>0&&w(!1)),this.setIndex(h),this.setAttribute("position",new We(d,3)),this.setAttribute("normal",new We(p,3)),this.setAttribute("uv",new We(v,2));function S(){const A=new k,b=new k;let P=0;const I=(t-e)/i;for(let L=0;L<=s;L++){const C=[],R=L/s,W=R*(t-e)+e;for(let J=0;J<=r;J++){const j=J/r,X=j*l+a,Z=Math.sin(X),se=Math.cos(X);b.x=W*Z,b.y=-R*i+M,b.z=W*se,d.push(b.x,b.y,b.z),A.set(Z,I,se).normalize(),p.push(A.x,A.y,A.z),v.push(j,1-R),C.push(y++)}_.push(C)}for(let L=0;L.9&&I<.1&&(w<.2&&(o[S+0]+=1),A<.2&&(o[S+2]+=1),b<.2&&(o[S+4]+=1))}}function p(S){s.push(S.x,S.y,S.z)}function v(S,w){const A=S*3;w.x=e[A+0],w.y=e[A+1],w.z=e[A+2]}function y(){const S=new k,w=new k,A=new k,b=new k,P=new ye,I=new ye,L=new ye;for(let C=0,R=0;C80*t){a=f=n[0],l=h=n[1];for(let y=t;yf&&(f=d),p>h&&(h=p);v=Math.max(f-a,h-l),v=v!==0?32767/v:0}return Yf(s,o,t,a,l,v,0),o}};function cR(n,e,t,i,r){let s,o;if(r===oj(n,e,t,i)>0)for(s=e;s=e;s-=i)o=Jb(s,n[s],n[s+1],o);return o&&Ng(o,o.next)&&(Zf(o),o=o.next),o}function Za(n,e){if(!n)return n;e||(e=n);let t=n,i;do if(i=!1,!t.steiner&&(Ng(t,t.next)||tn(t.prev,t,t.next)===0)){if(Zf(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function Yf(n,e,t,i,r,s,o){if(!n)return;!o&&s&&ej(n,i,r,s);let a=n,l,f;for(;n.prev!==n.next;){if(l=n.prev,f=n.next,s?XG(n,i,r,s):jG(n)){e.push(l.i/t|0),e.push(n.i/t|0),e.push(f.i/t|0),Zf(n),n=f.next,a=f.next;continue}if(n=f,n===a){o?o===1?(n=YG(Za(n),e,t),Yf(n,e,t,i,r,s,2)):o===2&&qG(n,e,t,i,r,s):Yf(Za(n),e,t,i,r,s,1);break}}}function jG(n){const e=n.prev,t=n,i=n.next;if(tn(e,t,i)>=0)return!1;const r=e.x,s=t.x,o=i.x,a=e.y,l=t.y,f=i.y,h=rs?r>o?r:o:s>o?s:o,v=a>l?a>f?a:f:l>f?l:f;let y=i.next;for(;y!==e;){if(y.x>=h&&y.x<=p&&y.y>=d&&y.y<=v&&fu(r,a,s,l,o,f,y.x,y.y)&&tn(y.prev,y,y.next)>=0)return!1;y=y.next}return!0}function XG(n,e,t,i){const r=n.prev,s=n,o=n.next;if(tn(r,s,o)>=0)return!1;const a=r.x,l=s.x,f=o.x,h=r.y,d=s.y,p=o.y,v=al?a>f?a:f:l>f?l:f,M=h>d?h>p?h:p:d>p?d:p,m=p_(v,y,e,t,i),S=p_(_,M,e,t,i);let w=n.prevZ,A=n.nextZ;for(;w&&w.z>=m&&A&&A.z<=S;){if(w.x>=v&&w.x<=_&&w.y>=y&&w.y<=M&&w!==r&&w!==o&&fu(a,h,l,d,f,p,w.x,w.y)&&tn(w.prev,w,w.next)>=0||(w=w.prevZ,A.x>=v&&A.x<=_&&A.y>=y&&A.y<=M&&A!==r&&A!==o&&fu(a,h,l,d,f,p,A.x,A.y)&&tn(A.prev,A,A.next)>=0))return!1;A=A.nextZ}for(;w&&w.z>=m;){if(w.x>=v&&w.x<=_&&w.y>=y&&w.y<=M&&w!==r&&w!==o&&fu(a,h,l,d,f,p,w.x,w.y)&&tn(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;A&&A.z<=S;){if(A.x>=v&&A.x<=_&&A.y>=y&&A.y<=M&&A!==r&&A!==o&&fu(a,h,l,d,f,p,A.x,A.y)&&tn(A.prev,A,A.next)>=0)return!1;A=A.nextZ}return!0}function YG(n,e,t){let i=n;do{const r=i.prev,s=i.next.next;!Ng(r,s)&&fR(r,i,i.next,s)&&qf(r,s)&&qf(s,r)&&(e.push(r.i/t|0),e.push(i.i/t|0),e.push(s.i/t|0),Zf(i),Zf(i.next),i=n=s),i=i.next}while(i!==n);return Za(i)}function qG(n,e,t,i,r,s){let o=n;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&ij(o,a)){let l=hR(o,a);o=Za(o,o.next),l=Za(l,l.next),Yf(o,e,t,i,r,s,0),Yf(l,e,t,i,r,s,0);return}a=a.next}o=o.next}while(o!==n)}function ZG(n,e,t,i){const r=[];let s,o,a,l,f;for(s=0,o=e.length;s=t.next.y&&t.next.y!==t.y){const p=t.x+(o-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(p<=s&&p>i&&(i=p,r=t.x=t.x&&t.x>=l&&s!==t.x&&fu(or.x||t.x===r.x&&$G(r,t)))&&(r=t,h=d)),t=t.next;while(t!==a);return r}function $G(n,e){return tn(n.prev,n,e.prev)<0&&tn(e.next,n,n.next)<0}function ej(n,e,t,i){let r=n;do r.z===0&&(r.z=p_(r.x,r.y,e,t,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==n);r.prevZ.nextZ=null,r.prevZ=null,tj(r)}function tj(n){let e,t,i,r,s,o,a,l,f=1;do{for(t=n,n=null,s=null,o=0;t;){for(o++,i=t,a=0,e=0;e0||l>0&&i;)a!==0&&(l===0||!i||t.z<=i.z)?(r=t,t=t.nextZ,a--):(r=i,i=i.nextZ,l--),s?s.nextZ=r:n=r,r.prevZ=s,s=r;t=i}s.nextZ=null,f*=2}while(o>1);return n}function p_(n,e,t,i,r){return n=(n-t)*r|0,e=(e-i)*r|0,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,n|e<<1}function nj(n){let e=n,t=n;do(e.x=(n-o)*(s-a)&&(n-o)*(i-a)>=(t-o)*(e-a)&&(t-o)*(s-a)>=(r-o)*(i-a)}function ij(n,e){return n.next.i!==e.i&&n.prev.i!==e.i&&!rj(n,e)&&(qf(n,e)&&qf(e,n)&&sj(n,e)&&(tn(n.prev,n,e.prev)||tn(n,e.prev,e))||Ng(n,e)&&tn(n.prev,n,n.next)>0&&tn(e.prev,e,e.next)>0)}function tn(n,e,t){return(e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y)}function Ng(n,e){return n.x===e.x&&n.y===e.y}function fR(n,e,t,i){const r=Lp(tn(n,e,t)),s=Lp(tn(n,e,i)),o=Lp(tn(t,i,n)),a=Lp(tn(t,i,e));return!!(r!==s&&o!==a||r===0&&Pp(n,t,e)||s===0&&Pp(n,i,e)||o===0&&Pp(t,n,i)||a===0&&Pp(t,e,i))}function Pp(n,e,t){return e.x<=Math.max(n.x,t.x)&&e.x>=Math.min(n.x,t.x)&&e.y<=Math.max(n.y,t.y)&&e.y>=Math.min(n.y,t.y)}function Lp(n){return n>0?1:n<0?-1:0}function rj(n,e){let t=n;do{if(t.i!==n.i&&t.next.i!==n.i&&t.i!==e.i&&t.next.i!==e.i&&fR(t,t.next,n,e))return!0;t=t.next}while(t!==n);return!1}function qf(n,e){return tn(n.prev,n,n.next)<0?tn(n,e,n.next)>=0&&tn(n,n.prev,e)>=0:tn(n,e,n.prev)<0||tn(n,n.next,e)<0}function sj(n,e){let t=n,i=!1;const r=(n.x+e.x)/2,s=(n.y+e.y)/2;do t.y>s!=t.next.y>s&&t.next.y!==t.y&&r<(t.next.x-t.x)*(s-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==n);return i}function hR(n,e){const t=new m_(n.i,n.x,n.y),i=new m_(e.i,e.x,e.y),r=n.next,s=e.prev;return n.next=e,e.prev=n,t.next=r,r.prev=t,i.next=t,t.prev=i,s.next=i,i.prev=s,i}function Jb(n,e,t,i){const r=new m_(n,e,t);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function Zf(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function m_(n,e,t){this.i=n,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function oj(n,e,t,i){let r=0;for(let s=e,o=t-i;s2&&n[e-1].equals(n[0])&&n.pop()}function Qb(n,e){for(let t=0;tNumber.EPSILON){const le=Math.sqrt(z),be=Math.sqrt(nt*nt+_t*_t),Te=oe.x-je/le,Re=oe.y+qe/le,et=_e.x-_t/be,ze=_e.y+nt/be,pe=((et-Te)*_t-(ze-Re)*nt)/(qe*_t-je*nt);ke=Te+qe*pe-ge.x,Ie=Re+je*pe-ge.y;const He=ke*ke+Ie*Ie;if(He<=2)return new ye(ke,Ie);Ge=Math.sqrt(He/2)}else{let le=!1;qe>Number.EPSILON?nt>Number.EPSILON&&(le=!0):qe<-Number.EPSILON?nt<-Number.EPSILON&&(le=!0):Math.sign(je)===Math.sign(_t)&&(le=!0),le?(ke=-je,Ie=qe,Ge=Math.sqrt(z)):(ke=qe,Ie=je,Ge=Math.sqrt(z/2))}return new ye(ke/Ge,Ie/Ge)}const V=[];for(let ge=0,oe=X.length,_e=oe-1,ke=ge+1;ge=0;ge--){const oe=ge/M,_e=v*Math.cos(oe*Math.PI/2),ke=y*Math.sin(oe*Math.PI/2)+_;for(let Ie=0,Ge=X.length;Ie=0;){const ke=_e;let Ie=_e-1;Ie<0&&(Ie=ge.length-1);for(let Ge=0,qe=h+M*2;Ge0)&&v.push(w,A,P),(m!==i-1||l0!=e>0&&this.version++,this._sheen=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 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.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.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 vR extends Yn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Fe(16777215),this.specular=new Fe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Fe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=qo,this.normalScale=new ye(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=dh,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.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 yR extends Yn{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Fe(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Fe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=qo,this.normalScale=new ye(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 xR extends Yn{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=qo,this.normalScale=new ye(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 _R extends Yn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Fe(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Fe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=qo,this.normalScale=new ye(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=dh,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.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 SR extends Yn{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Fe(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=qo,this.normalScale=new ye(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class wR extends yi{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 lr(n,e,t){return AS(n)?new n.constructor(n.subarray(e,t!==void 0?t:n.length)):n.slice(e,t)}function Da(n,e,t){return!n||!t&&n.constructor===e?n:typeof e.BYTES_PER_ELEMENT=="number"?new e(n):Array.prototype.slice.call(n)}function AS(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function MR(n){function e(r,s){return n[r]-n[s]}const t=n.length,i=new Array(t);for(let r=0;r!==t;++r)i[r]=r;return i.sort(e),i}function g_(n,e,t){const i=n.length,r=new n.constructor(i);for(let s=0,o=0;o!==i;++s){const a=t[s]*e;for(let l=0;l!==e;++l)r[o++]=n[a+l]}return r}function ES(n,e,t,i){let r=1,s=n[0];for(;s!==void 0&&s[i]===void 0;)s=n[r++];if(s===void 0)return;let o=s[i];if(o!==void 0)if(Array.isArray(o))do o=s[i],o!==void 0&&(e.push(s.time),t.push.apply(t,o)),s=n[r++];while(s!==void 0);else if(o.toArray!==void 0)do o=s[i],o!==void 0&&(e.push(s.time),o.toArray(t,t.length)),s=n[r++];while(s!==void 0);else do o=s[i],o!==void 0&&(e.push(s.time),t.push(o)),s=n[r++];while(s!==void 0)}function cj(n,e,t,i,r=30){const s=n.clone();s.name=e;const o=[];for(let l=0;l=i)){d.push(f.times[v]);for(let _=0;_s.tracks[l].times[0]&&(a=s.tracks[l].times[0]);for(let l=0;l=a.times[y]){const m=y*d+h,S=m+d-h;_=lr(a.values,m,S)}else{const m=a.createInterpolant(),S=h,w=d-h;m.evaluate(s),_=lr(m.resultBuffer,S,w)}l==="quaternion"&&new si().fromArray(_).normalize().conjugate().toArray(_);const M=f.times.length;for(let m=0;m=s)){const a=t[1];e=s)break t}o=i,i=0;break n}break e}for(;i>>1;et;)--o;if(++o,s!==0||o!==r){s>=o&&(o=Math.max(o,1),s=o-1);const a=this.getValueSize();this.times=lr(i,s,o),this.values=lr(this.values,s*a,o*a)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,r=this.values,s=i.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==s;a++){const l=i[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(r!==void 0&&AS(r))for(let a=0,l=r.length;a!==l;++a){const f=r[a];if(isNaN(f)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,f),e=!1;break}}return e}optimize(){const e=lr(this.times),t=lr(this.values),i=this.getValueSize(),r=this.getInterpolation()===rm,s=e.length-1;let o=1;for(let a=1;a0){e[o]=e[s];for(let a=s*i,l=o*i,f=0;f!==i;++f)t[l+f]=t[a+f];++o}return o!==e.length?(this.times=lr(e,0,o),this.values=lr(t,0,o*i)):(this.times=e,this.values=t),this}clone(){const e=lr(this.times,0),t=lr(this.values,0),i=this.constructor,r=new i(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}}zr.prototype.TimeBufferType=Float32Array;zr.prototype.ValueBufferType=Float32Array;zr.prototype.DefaultInterpolation=Hf;class rl extends zr{}rl.prototype.ValueTypeName="bool";rl.prototype.ValueBufferType=Array;rl.prototype.DefaultInterpolation=Vf;rl.prototype.InterpolantFactoryMethodLinear=void 0;rl.prototype.InterpolantFactoryMethodSmooth=void 0;class TS extends zr{}TS.prototype.ValueTypeName="color";class Jf extends zr{}Jf.prototype.ValueTypeName="number";class bR extends Ph{constructor(e,t,i,r){super(e,t,i,r)}interpolate_(e,t,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(i-t)/(r-t);let f=e*a;for(let h=f+a;f!==h;f+=4)si.slerpFlat(s,0,o,f-a,o,f,l);return s}}class Zu extends zr{InterpolantFactoryMethodLinear(e){return new bR(this.times,this.values,this.getValueSize(),e)}}Zu.prototype.ValueTypeName="quaternion";Zu.prototype.DefaultInterpolation=Hf;Zu.prototype.InterpolantFactoryMethodSmooth=void 0;class sl extends zr{}sl.prototype.ValueTypeName="string";sl.prototype.ValueBufferType=Array;sl.prototype.DefaultInterpolation=Vf;sl.prototype.InterpolantFactoryMethodLinear=void 0;sl.prototype.InterpolantFactoryMethodSmooth=void 0;class Kf extends zr{}Kf.prototype.ValueTypeName="vector";class Qf{constructor(e,t=-1,i,r=Ag){this.name=e,this.tracks=i,this.duration=t,this.blendMode=r,this.uuid=ji(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,r=1/(e.fps||1);for(let o=0,a=i.length;o!==a;++o)t.push(pj(i[o]).scale(r));const s=new this(e.name,e.duration,t,e.blendMode);return s.uuid=e.uuid,s}static toJSON(e){const t=[],i=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let s=0,o=i.length;s!==o;++s)t.push(zr.toJSON(i[s]));return r}static CreateFromMorphTargetSequence(e,t,i,r){const s=t.length,o=[];for(let a=0;a1){const d=h[1];let p=r[d];p||(r[d]=p=[]),p.push(f)}}const o=[];for(const a in r)o.push(this.CreateFromMorphTargetSequence(a,r[a],t,i));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(d,p,v,y,_){if(v.length!==0){const M=[],m=[];ES(v,M,m,y),M.length!==0&&_.push(new d(p,M,m))}},r=[],s=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const f=e.hierarchy||[];for(let d=0;d{t&&t(s),this.manager.itemEnd(e)},0),s;if(ws[e]!==void 0){ws[e].push({onLoad:t,onProgress:i,onError:r});return}ws[e]=[],ws[e].push({onLoad:t,onProgress:i,onError:r});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(f=>{if(f.status===200||f.status===0){if(f.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||f.body===void 0||f.body.getReader===void 0)return f;const h=ws[e],d=f.body.getReader(),p=f.headers.get("Content-Length")||f.headers.get("X-File-Size"),v=p?parseInt(p):0,y=v!==0;let _=0;const M=new ReadableStream({start(m){S();function S(){d.read().then(({done:w,value:A})=>{if(w)m.close();else{_+=A.byteLength;const b=new ProgressEvent("progress",{lengthComputable:y,loaded:_,total:v});for(let P=0,I=h.length;P{switch(l){case"arraybuffer":return f.arrayBuffer();case"blob":return f.blob();case"document":return f.text().then(h=>new DOMParser().parseFromString(h,a));case"json":return f.json();default:if(a===void 0)return f.text();{const d=/charset="?([^;"\s]*)"?/i.exec(a),p=d&&d[1]?d[1].toLowerCase():void 0,v=new TextDecoder(p);return f.arrayBuffer().then(y=>v.decode(y))}}}).then(f=>{Ja.add(e,f);const h=ws[e];delete ws[e];for(let d=0,p=h.length;d{const h=ws[e];if(h===void 0)throw this.manager.itemError(e),f;delete ws[e];for(let d=0,p=h.length;d{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class gj extends Ji{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new Hs(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{t(s.parse(JSON.parse(a)))}catch(l){r?r(l):console.error(l),s.manager.itemError(e)}},i,r)}parse(e){const t=[];for(let i=0;i0:r.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const s in e.uniforms){const o=e.uniforms[s];switch(r.uniforms[s]={},o.type){case"t":r.uniforms[s].value=i(o.value);break;case"c":r.uniforms[s].value=new Fe().setHex(o.value);break;case"v2":r.uniforms[s].value=new ye().fromArray(o.value);break;case"v3":r.uniforms[s].value=new k().fromArray(o.value);break;case"v4":r.uniforms[s].value=new Dt().fromArray(o.value);break;case"m3":r.uniforms[s].value=new Mt().fromArray(o.value);break;case"m4":r.uniforms[s].value=new ot().fromArray(o.value);break;default:r.uniforms[s].value=o.value}}if(e.defines!==void 0&&(r.defines=e.defines),e.vertexShader!==void 0&&(r.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(r.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(r.glslVersion=e.glslVersion),e.extensions!==void 0)for(const s in e.extensions)r.extensions[s]=e.extensions[s];if(e.size!==void 0&&(r.size=e.size),e.sizeAttenuation!==void 0&&(r.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(r.map=i(e.map)),e.matcap!==void 0&&(r.matcap=i(e.matcap)),e.alphaMap!==void 0&&(r.alphaMap=i(e.alphaMap)),e.bumpMap!==void 0&&(r.bumpMap=i(e.bumpMap)),e.bumpScale!==void 0&&(r.bumpScale=e.bumpScale),e.normalMap!==void 0&&(r.normalMap=i(e.normalMap)),e.normalMapType!==void 0&&(r.normalMapType=e.normalMapType),e.normalScale!==void 0){let s=e.normalScale;Array.isArray(s)===!1&&(s=[s,s]),r.normalScale=new ye().fromArray(s)}return e.displacementMap!==void 0&&(r.displacementMap=i(e.displacementMap)),e.displacementScale!==void 0&&(r.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(r.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(r.roughnessMap=i(e.roughnessMap)),e.metalnessMap!==void 0&&(r.metalnessMap=i(e.metalnessMap)),e.emissiveMap!==void 0&&(r.emissiveMap=i(e.emissiveMap)),e.emissiveIntensity!==void 0&&(r.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(r.specularMap=i(e.specularMap)),e.specularIntensityMap!==void 0&&(r.specularIntensityMap=i(e.specularIntensityMap)),e.specularColorMap!==void 0&&(r.specularColorMap=i(e.specularColorMap)),e.envMap!==void 0&&(r.envMap=i(e.envMap)),e.envMapIntensity!==void 0&&(r.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(r.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(r.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(r.lightMap=i(e.lightMap)),e.lightMapIntensity!==void 0&&(r.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(r.aoMap=i(e.aoMap)),e.aoMapIntensity!==void 0&&(r.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(r.gradientMap=i(e.gradientMap)),e.clearcoatMap!==void 0&&(r.clearcoatMap=i(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(r.clearcoatRoughnessMap=i(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(r.clearcoatNormalMap=i(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(r.clearcoatNormalScale=new ye().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(r.iridescenceMap=i(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(r.iridescenceThicknessMap=i(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(r.transmissionMap=i(e.transmissionMap)),e.thicknessMap!==void 0&&(r.thicknessMap=i(e.thicknessMap)),e.sheenColorMap!==void 0&&(r.sheenColorMap=i(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(r.sheenRoughnessMap=i(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}static createMaterialFromType(e){const t={ShadowMaterial:pR,SpriteMaterial:dS,RawShaderMaterial:mR,ShaderMaterial:rs,PointsMaterial:mS,MeshPhysicalMaterial:gR,MeshStandardMaterial:MS,MeshPhongMaterial:vR,MeshToonMaterial:yR,MeshNormalMaterial:xR,MeshLambertMaterial:_R,MeshDepthMaterial:uS,MeshDistanceMaterial:cS,MeshBasicMaterial:Zo,MeshMatcapMaterial:SR,LineDashedMaterial:wR,LineBasicMaterial:yi,Material:Yn};return new t[e]}}class v_{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let t="";for(let i=0,r=e.length;i0){const l=new CS(t);s=new $f(l),s.setCrossOrigin(this.crossOrigin);for(let f=0,h=e.length;f0){r=new $f(this.manager),r.setCrossOrigin(this.crossOrigin);for(let o=0,a=e.length;o"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,i,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=Ja.get(e);if(o!==void 0)return s.manager.itemStart(e),setTimeout(function(){t&&t(o),s.manager.itemEnd(e)},0),o;const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(s.options,{colorSpaceConversion:"none"}))}).then(function(l){Ja.add(e,l),t&&t(l),s.manager.itemEnd(e)}).catch(function(l){r&&r(l),s.manager.itemError(e),s.manager.itemEnd(e)}),s.manager.itemStart(e)}}let Rp;class LS{static getContext(){return Rp===void 0&&(Rp=new(window.AudioContext||window.webkitAudioContext)),Rp}static setContext(e){Rp=e}}class bj extends Ji{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new Hs(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{const l=a.slice(0);LS.getContext().decodeAudioData(l,function(h){t(h)})}catch(l){r?r(l):console.error(l),s.manager.itemError(e)}},i,r)}}class Tj extends Og{constructor(e,t,i=1){super(void 0,i),this.isHemisphereLightProbe=!0;const r=new Fe().set(e),s=new Fe().set(t),o=new k(r.r,r.g,r.b),a=new k(s.r,s.g,s.b),l=Math.sqrt(Math.PI),f=l*Math.sqrt(.75);this.sh.coefficients[0].copy(o).add(a).multiplyScalar(l),this.sh.coefficients[1].copy(o).sub(a).multiplyScalar(f)}}class Cj extends Og{constructor(e,t=1){super(void 0,t),this.isAmbientLightProbe=!0;const i=new Fe().set(e);this.sh.coefficients[0].set(i.r,i.g,i.b).multiplyScalar(2*Math.sqrt(Math.PI))}}const oT=new ot,aT=new ot,ha=new ot;class Pj{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Wt,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Wt,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){const 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){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,ha.copy(e.projectionMatrix);const r=t.eyeSep/2,s=r*t.near/t.focus,o=t.near*Math.tan(za*t.fov*.5)/t.zoom;let a,l;aT.elements[12]=-r,oT.elements[12]=r,a=-o*t.aspect+s,l=o*t.aspect+s,ha.elements[0]=2*t.near/(l-a),ha.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(ha),a=-o*t.aspect-s,l=o*t.aspect-s,ha.elements[0]=2*t.near/(l-a),ha.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(ha)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(aT),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(oT)}}class RS{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=lT(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=lT();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function lT(){return(typeof performance>"u"?Date:performance).now()}const da=new k,uT=new si,Lj=new k,pa=new k;class Rj extends Tt{constructor(){super(),this.type="AudioListener",this.context=LS.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new RS}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(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 this.filter!==null?(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);const t=this.context.listener,i=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(da,uT,Lj),pa.set(0,0,-1).applyQuaternion(uT),t.positionX){const r=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(da.x,r),t.positionY.linearRampToValueAtTime(da.y,r),t.positionZ.linearRampToValueAtTime(da.z,r),t.forwardX.linearRampToValueAtTime(pa.x,r),t.forwardY.linearRampToValueAtTime(pa.y,r),t.forwardZ.linearRampToValueAtTime(pa.z,r),t.upX.linearRampToValueAtTime(i.x,r),t.upY.linearRampToValueAtTime(i.y,r),t.upZ.linearRampToValueAtTime(i.z,r)}else t.setPosition(da.x,da.y,da.z),t.setOrientation(pa.x,pa.y,pa.z,i.x,i.y,i.z)}}class OR extends Tt{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;const 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(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(),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;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e0&&this._mixBufferRegionAdditive(i,r,this._addIndex*t,1,t);for(let l=t,f=t+t;l!==f;++l)if(i[l]!==i[l+t]){a.setValue(i,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,i=this.valueSize,r=i*this._origIndex;e.getValue(t,r);for(let s=i,o=r;s!==o;++s)t[s]=t[r+s%i];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let i=e;i=.5)for(let o=0;o!==s;++o)e[t+o]=e[i+o]}_slerp(e,t,i,r){si.slerpFlat(e,t,e,t,e,i,r)}_slerpAdditive(e,t,i,r,s){const o=this._workIndex*s;si.multiplyQuaternionsFlat(e,o,e,t,e,i),si.slerpFlat(e,t,e,t,e,o,r)}_lerp(e,t,i,r,s){const o=1-r;for(let a=0;a!==s;++a){const l=t+a;e[l]=e[l]*o+e[i+a]*r}}_lerpAdditive(e,t,i,r,s){for(let o=0;o!==s;++o){const a=t+o;e[a]=e[a]+e[i+o]*r}}}const IS="\\[\\]\\.:\\/",kj=new RegExp("["+IS+"]","g"),DS="[^"+IS+"]",Oj="[^"+IS.replace("\\.","")+"]",Uj=/((?:WC+[\/:])*)/.source.replace("WC",DS),zj=/(WCOD+)?/.source.replace("WCOD",Oj),Fj=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",DS),Bj=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",DS),Vj=new RegExp("^"+Uj+zj+Fj+Bj+"$"),Hj=["material","materials","bones","map"];class Wj{constructor(e,t,i){const r=i||Et.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const i=this._targetGroup.nCachedObjects_,r=this._bindings[i];r!==void 0&&r.getValue(e,t)}setValue(e,t){const i=this._bindings;for(let r=this._targetGroup.nCachedObjects_,s=i.length;r!==s;++r)i[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].unbind()}}class Et{constructor(e,t,i){this.path=t,this.parsedPath=i||Et.parseTrackName(t),this.node=Et.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,i){return e&&e.isAnimationObjectGroup?new Et.Composite(e,t,i):new Et(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(kj,"")}static parseTrackName(e){const t=Vj.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const i={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=i.nodeName&&i.nodeName.lastIndexOf(".");if(r!==void 0&&r!==-1){const s=i.nodeName.substring(r+1);Hj.indexOf(s)!==-1&&(i.nodeName=i.nodeName.substring(0,r),i.objectName=s)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const i=e.skeleton.getBoneByName(t);if(i!==void 0)return i}if(e.children){const i=function(s){for(let o=0;o=s){const d=s++,p=e[d];t[p.uuid]=h,e[h]=p,t[f]=d,e[d]=l;for(let v=0,y=r;v!==y;++v){const _=i[v],M=_[d],m=_[h];_[h]=M,_[d]=m}}}this.nCachedObjects_=s}uncache(){const e=this._objects,t=this._indicesByUUID,i=this._bindings,r=i.length;let s=this.nCachedObjects_,o=e.length;for(let a=0,l=arguments.length;a!==l;++a){const f=arguments[a],h=f.uuid,d=t[h];if(d!==void 0)if(delete t[h],d0&&(t[v.uuid]=d),e[d]=v,e.pop();for(let y=0,_=r;y!==_;++y){const M=i[y];M[d]=M[p],M.pop()}}}this.nCachedObjects_=s}subscribe_(e,t){const i=this._bindingsIndicesByPath;let r=i[e];const s=this._bindings;if(r!==void 0)return s[r];const o=this._paths,a=this._parsedPaths,l=this._objects,f=l.length,h=this.nCachedObjects_,d=new Array(f);r=s.length,i[e]=r,o.push(e),a.push(t),s.push(d);for(let p=h,v=l.length;p!==v;++p){const y=l[p];d[p]=new Et(y,e,t)}return d}unsubscribe_(e){const t=this._bindingsIndicesByPath,i=t[e];if(i!==void 0){const r=this._paths,s=this._parsedPaths,o=this._bindings,a=o.length-1,l=o[a],f=e[a];t[f]=i,o[i]=l,o.pop(),s[i]=s[a],s.pop(),r[i]=r[a],r.pop()}}}class zR{constructor(e,t,i=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=i,this.blendMode=r;const s=t.tracks,o=s.length,a=new Array(o),l={endingStart:La,endingEnd:La};for(let f=0;f!==o;++f){const h=s[f].createInterpolant(null);a[f]=h,h.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=PL,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&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,i){if(e.fadeOut(t),this.fadeIn(t),i){const r=this._clip.duration,s=e._clip.duration,o=s/r,a=r/s;e.warp(1,o,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,i){return e.crossFadeFrom(this,t,i)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,i){const r=this._mixer,s=r.time,o=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);const l=a.parameterPositions,f=a.sampleValues;return l[0]=s,l[1]=s+i,f[0]=e/o,f[1]=t/o,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,i,r){if(!this.enabled){this._updateWeight(e);return}const s=this._startTime;if(s!==null){const l=(e-s)*i;l<0||i===0?t=0:(this._startTime=null,t=i*l)}t*=this._updateTimeScale(e);const o=this._updateTime(t),a=this._updateWeight(e);if(a>0){const l=this._interpolants,f=this._propertyBindings;switch(this.blendMode){case $1:for(let h=0,d=l.length;h!==d;++h)l[h].evaluate(o),f[h].accumulateAdditive(a);break;case Ag:default:for(let h=0,d=l.length;h!==d;++h)l[h].evaluate(o),f[h].accumulate(r,a)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const i=this._weightInterpolant;if(i!==null){const r=i.evaluate(e)[0];t*=r,e>i.parameterPositions[1]&&(this.stopFading(),r===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const i=this._timeScaleInterpolant;if(i!==null){const r=i.evaluate(e)[0];t*=r,e>i.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,i=this.loop;let r=this.time+e,s=this._loopCount;const o=i===LL;if(e===0)return s===-1?r:o&&(s&1)===1?t-r:r;if(i===CL){s===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else if(r<0)r=0;else{this.time=r;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(s===-1&&(e>=0?(s=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),r>=t||r<0){const a=Math.floor(r/t);r-=t*a,s+=Math.abs(a);const l=this.repetitions-s;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){const f=e<0;this._setEndings(f,!f,o)}else this._setEndings(!1,!1,o);this._loopCount=s,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=r;if(o&&(s&1)===1)return t-r}return r}_setEndings(e,t,i){const r=this._interpolantSettings;i?(r.endingStart=Ra,r.endingEnd=Ra):(e?r.endingStart=this.zeroSlopeAtStart?Ra:La:r.endingStart=Wf,t?r.endingEnd=this.zeroSlopeAtEnd?Ra:La:r.endingEnd=Wf)}_scheduleFading(e,t,i){const r=this._mixer,s=r.time;let o=this._weightInterpolant;o===null&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,l=o.sampleValues;return a[0]=s,l[0]=t,a[1]=s+e,l[1]=i,this}}const jj=new Float32Array(1);class Xj extends ss{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const i=e._localRoot||this._root,r=e._clip.tracks,s=r.length,o=e._propertyBindings,a=e._interpolants,l=i.uuid,f=this._bindingsByRootAndName;let h=f[l];h===void 0&&(h={},f[l]=h);for(let d=0;d!==s;++d){const p=r[d],v=p.name;let y=h[v];if(y!==void 0)++y.referenceCount,o[d]=y;else{if(y=o[d],y!==void 0){y._cacheIndex===null&&(++y.referenceCount,this._addInactiveBinding(y,l,v));continue}const _=t&&t._propertyBindings[d].binding.parsedPath;y=new UR(Et.create(i,v,_),p.ValueTypeName,p.getValueSize()),++y.referenceCount,this._addInactiveBinding(y,l,v),o[d]=y}a[d].resultBuffer=y.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const i=(e._localRoot||this._root).uuid,r=e._clip.uuid,s=this._actionsByClip[r];this._bindAction(e,s&&s.knownActions[0]),this._addInactiveAction(e,r,i)}const t=e._propertyBindings;for(let i=0,r=t.length;i!==r;++i){const s=t[i];s.useCount++===0&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let i=0,r=t.length;i!==r;++i){const s=t[i];--s.useCount===0&&(s.restoreOriginalState(),this._takeBackBinding(s))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const 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){const t=e._cacheIndex;return t!==null&&t=0;--i)e[i].stop();return this}update(e){e*=this.timeScale;const t=this._actions,i=this._nActiveActions,r=this.time+=e,s=Math.sign(e),o=this._accuIndex^=1;for(let f=0;f!==i;++f)t[f]._update(r,e,s,o);const a=this._bindings,l=this._nActiveBindings;for(let f=0;f!==l;++f)a[f].apply(o);return this}setTime(e){this.time=0;for(let t=0;tthis.max.x||e.ythis.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.xthis.max.x||e.max.ythis.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,hT).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)}}const dT=new k,Ip=new k;class $j{constructor(e=new k,t=new k){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){dT.subVectors(e,this.start),Ip.subVectors(this.end,this.start);const i=Ip.dot(Ip);let s=Ip.dot(dT)/i;return t&&(s=fn(s,0,1)),s}closestPointToPoint(e,t,i){const r=this.closestPointToPointParameter(e,t);return this.delta(i).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const pT=new k;class e9 extends Tt{constructor(e,t){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const i=new dt,r=[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 o=0,a=1,l=32;o1)for(let d=0;d.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{xT.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(xT,t)}}setLength(e,t=e*.2,i=t*.2){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(i,t,i),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class d9 extends ls{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],i=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],r=new dt;r.setAttribute("position",new We(t,3)),r.setAttribute("color",new We(i,3));const s=new yi({vertexColors:!0,toneMapped:!1});super(r,s),this.type="AxesHelper"}setColors(e,t,i){const r=new Fe,s=this.geometry.attributes.color.array;return r.set(e),r.toArray(s,0),r.toArray(s,3),r.set(t),r.toArray(s,6),r.toArray(s,9),r.set(i),r.toArray(s,12),r.toArray(s,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class p9{constructor(){this.type="ShapePath",this.color=new Fe,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new Xf,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,i,r){return this.currentPath.quadraticCurveTo(e,t,i,r),this}bezierCurveTo(e,t,i,r,s,o){return this.currentPath.bezierCurveTo(e,t,i,r,s,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(m){const S=[];for(let w=0,A=m.length;wNumber.EPSILON){if(R<0&&(I=S[P],C=-C,L=S[b],R=-R),m.yL.y)continue;if(m.y===I.y){if(m.x===I.x)return!0}else{const W=R*(m.x-I.x)-C*(m.y-I.y);if(W===0)return!0;if(W<0)continue;A=!A}}else{if(m.y!==I.y)continue;if(L.x<=m.x&&m.x<=I.x||I.x<=m.x&&m.x<=L.x)return!0}}return A}const r=is.isClockWise,s=this.subPaths;if(s.length===0)return[];let o,a,l;const f=[];if(s.length===1)return a=s[0],l=new Ba,l.curves=a.curves,f.push(l),f;let h=!r(s[0].getPoints());h=e?!h:h;const d=[],p=[];let v=[],y=0,_;p[y]=void 0,v[y]=[];for(let m=0,S=s.length;m1){let m=!1,S=0;for(let w=0,A=p.length;w0&&m===!1&&(v=d)}let M;for(let m=0,S=p.length;m{const d=typeof f=="function"?f(e):f;if(d!==e){const p=e;e=h?d:Object.assign({},e,d),t.forEach(v=>v(e,p))}},r=()=>e,s=(f,h=r,d=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let p=h(e);function v(){const y=h(e);if(!d(p,y)){const _=p;f(p=y,_)}}return t.add(v),()=>t.delete(v)},l={setState:i,getState:r,subscribe:(f,h,d)=>h||d?s(f,h,d):(t.add(f),()=>t.delete(f)),destroy:()=>t.clear()};return e=n(i,r,l),l}const k9=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),_T=k9?H.useEffect:H.useLayoutEffect;function HR(n){const e=typeof n=="function"?N9(n):n,t=(i=e.getState,r=Object.is)=>{const[,s]=H.useReducer(M=>M+1,0),o=e.getState(),a=H.useRef(o),l=H.useRef(i),f=H.useRef(r),h=H.useRef(!1),d=H.useRef();d.current===void 0&&(d.current=i(o));let p,v=!1;(a.current!==o||l.current!==i||f.current!==r||h.current)&&(p=i(o),v=!r(d.current,p)),_T(()=>{v&&(d.current=p),a.current=o,l.current=i,f.current=r,h.current=!1});const y=H.useRef(o);_T(()=>{const M=()=>{try{const S=e.getState(),w=l.current(S);f.current(d.current,w)||(a.current=S,d.current=w,s())}catch{h.current=!0,s()}},m=e.subscribe(M);return e.getState()!==y.current&&M(),m},[]);const _=v?p:d.current;return H.useDebugValue(_),_};return Object.assign(t,e),t[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const i=[t,e];return{next(){const r=i.length<=0;return{value:i.shift(),done:r}}}},t}var WR={exports:{}},ly={exports:{}},uy={};/** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var ST;function O9(){return ST||(ST=1,function(n){function e(D,V){var B=D.length;D.push(V);e:for(;0>>1,$=D[te];if(0>>1;ter(Ee,B))we<$&&0>r(Q,Ee)?(D[te]=Q,D[we]=B,te=we):(D[te]=Ee,D[ue]=B,te=ue);else if(we<$&&0>r(Q,B))D[te]=Q,D[we]=B,te=we;else break e}}return V}function r(D,V){var B=D.sortIndex-V.sortIndex;return B!==0?B:D.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();n.unstable_now=function(){return o.now()-a}}var l=[],f=[],h=1,d=null,p=3,v=!1,y=!1,_=!1,M=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(D){for(var V=t(f);V!==null;){if(V.callback===null)i(f);else if(V.startTime<=D)i(f),V.sortIndex=V.expirationTime,e(l,V);else break;V=t(f)}}function A(D){if(_=!1,w(D),!y)if(t(l)!==null)y=!0,se(b);else{var V=t(f);V!==null&&ae(A,V.startTime-D)}}function b(D,V){y=!1,_&&(_=!1,m(L),L=-1),v=!0;var B=p;try{for(w(V),d=t(l);d!==null&&(!(d.expirationTime>V)||D&&!W());){var te=d.callback;if(typeof te=="function"){d.callback=null,p=d.priorityLevel;var $=te(d.expirationTime<=V);V=n.unstable_now(),typeof $=="function"?d.callback=$:d===t(l)&&i(l),w(V)}else i(l);d=t(l)}if(d!==null)var ee=!0;else{var ue=t(f);ue!==null&&ae(A,ue.startTime-V),ee=!1}return ee}finally{d=null,p=B,v=!1}}var P=!1,I=null,L=-1,C=5,R=-1;function W(){return!(n.unstable_now()-RD||125te?(D.sortIndex=B,e(f,D),t(l)===null&&D===t(f)&&(_?(m(L),L=-1):_=!0,ae(A,B-te))):(D.sortIndex=$,e(l,D),y||v||(y=!0,se(b))),D},n.unstable_shouldYield=W,n.unstable_wrapCallback=function(D){var V=p;return function(){var B=p;p=V;try{return D.apply(this,arguments)}finally{p=B}}}}(uy)),uy}var wT;function U9(){return wT||(wT=1,ly.exports=O9()),ly.exports}/** + * @license React + * react-reconciler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var z9=function(e){var t={},i=H,r=U9(),s=Object.assign;function o(u){for(var c="https://reactjs.org/docs/error-decoder.html?invariant="+u,g=1;gq||E[U]!==T[q]){var he=` +`+E[U].replace(" at new "," at ");return u.displayName&&he.includes("")&&(he=he.replace("",u.displayName)),he}while(1<=U&&0<=q);break}}}finally{wt=!1,Error.prepareStackTrace=g}return(u=u?u.displayName||u.name:"")?Ht(u):""}var yn=Object.prototype.hasOwnProperty,vr=[],us=-1;function xi(u){return{current:u}}function It(u){0>us||(u.current=vr[us],vr[us]=null,us--)}function ht(u,c){us++,vr[us]=u.current,u.current=c}var qn={},xn=xi(qn),Ut=xi(!1),yr=qn;function Ys(u,c){var g=u.type.contextTypes;if(!g)return qn;var x=u.stateNode;if(x&&x.__reactInternalMemoizedUnmaskedChildContext===c)return x.__reactInternalMemoizedMaskedChildContext;var E={},T;for(T in g)E[T]=c[T];return x&&(u=u.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=c,u.__reactInternalMemoizedMaskedChildContext=E),E}function Hn(u){return u=u.childContextTypes,u!=null}function kh(){It(Ut),It(xn)}function FS(u,c,g){if(xn.current!==qn)throw Error(o(168));ht(xn,c),ht(Ut,g)}function BS(u,c,g){var x=u.stateNode;if(c=c.childContextTypes,typeof x.getChildContext!="function")return g;x=x.getChildContext();for(var E in x)if(!(E in c))throw Error(o(108,L(u)||"Unknown",E));return s({},g,x)}function Oh(u){return u=(u=u.stateNode)&&u.__reactInternalMemoizedMergedChildContext||qn,yr=xn.current,ht(xn,u),ht(Ut,Ut.current),!0}function VS(u,c,g){var x=u.stateNode;if(!x)throw Error(o(169));g?(u=BS(u,c,yr),x.__reactInternalMemoizedMergedChildContext=u,It(Ut),It(xn),ht(xn,u)):It(Ut),ht(Ut,g)}var xr=Math.clz32?Math.clz32:dI,fI=Math.log,hI=Math.LN2;function dI(u){return u>>>=0,u===0?32:31-(fI(u)/hI|0)|0}var Uh=64,zh=4194304;function Ku(u){switch(u&-u){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: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 u&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return u&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return u}}function Fh(u,c){var g=u.pendingLanes;if(g===0)return 0;var x=0,E=u.suspendedLanes,T=u.pingedLanes,U=g&268435455;if(U!==0){var q=U&~E;q!==0?x=Ku(q):(T&=U,T!==0&&(x=Ku(T)))}else U=g&~E,U!==0?x=Ku(U):T!==0&&(x=Ku(T));if(x===0)return 0;if(c!==0&&c!==x&&!(c&E)&&(E=x&-x,T=c&-c,E>=T||E===16&&(T&4194240)!==0))return c;if(x&4&&(x|=g&16),c=u.entangledLanes,c!==0)for(u=u.entanglements,c&=x;0g;g++)c.push(u);return c}function Qu(u,c,g){u.pendingLanes|=c,c!==536870912&&(u.suspendedLanes=0,u.pingedLanes=0),u=u.eventTimes,c=31-xr(c),u[c]=g}function gI(u,c){var g=u.pendingLanes&~c;u.pendingLanes=c,u.suspendedLanes=0,u.pingedLanes=0,u.expiredLanes&=c,u.mutableReadLanes&=c,u.entangledLanes&=c,c=u.entanglements;var x=u.eventTimes;for(u=u.expirationTimes;0>=U,E-=U,hs=1<<32-xr(c)+E|g<Pt?(kn=lt,lt=null):kn=lt.sibling;var Lt=tt(ie,lt,ce[Pt],Oe);if(Lt===null){lt===null&&(lt=kn);break}u&<&&Lt.alternate===null&&c(ie,lt),K=T(Lt,K,Pt),pt===null?Ze=Lt:pt.sibling=Lt,pt=Lt,lt=kn}if(Pt===ce.length)return g(ie,lt),Zt&&ea(ie,Pt),Ze;if(lt===null){for(;PtPt?(kn=lt,lt=null):kn=lt.sibling;var to=tt(ie,lt,Lt.value,Oe);if(to===null){lt===null&&(lt=kn);break}u&<&&to.alternate===null&&c(ie,lt),K=T(to,K,Pt),pt===null?Ze=to:pt.sibling=to,pt=to,lt=kn}if(Lt.done)return g(ie,lt),Zt&&ea(ie,Pt),Ze;if(lt===null){for(;!Lt.done;Pt++,Lt=ce.next())Lt=at(ie,Lt.value,Oe),Lt!==null&&(K=T(Lt,K,Pt),pt===null?Ze=Lt:pt.sibling=Lt,pt=Lt);return Zt&&ea(ie,Pt),Ze}for(lt=x(ie,lt);!Lt.done;Pt++,Lt=ce.next())Lt=Ft(lt,ie,Pt,Lt.value,Oe),Lt!==null&&(u&&Lt.alternate!==null&<.delete(Lt.key===null?Pt:Lt.key),K=T(Lt,K,Pt),pt===null?Ze=Lt:pt.sibling=Lt,pt=Lt);return u&<.forEach(function(tD){return c(ie,tD)}),Zt&&ea(ie,Pt),Ze}function sr(ie,K,ce,Oe){if(typeof ce=="object"&&ce!==null&&ce.type===h&&ce.key===null&&(ce=ce.props.children),typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case l:e:{for(var Ze=ce.key,pt=K;pt!==null;){if(pt.key===Ze){if(Ze=ce.type,Ze===h){if(pt.tag===7){g(ie,pt.sibling),K=E(pt,ce.props.children),K.return=ie,ie=K;break e}}else if(pt.elementType===Ze||typeof Ze=="object"&&Ze!==null&&Ze.$$typeof===w&&iw(Ze)===pt.type){g(ie,pt.sibling),K=E(pt,ce.props),K.ref=tc(ie,pt,ce),K.return=ie,ie=K;break e}g(ie,pt);break}else c(ie,pt);pt=pt.sibling}ce.type===h?(K=aa(ce.props.children,ie.mode,Oe,ce.key),K.return=ie,ie=K):(Oe=Td(ce.type,ce.key,ce.props,null,ie.mode,Oe),Oe.ref=tc(ie,K,ce),Oe.return=ie,ie=Oe)}return U(ie);case f:e:{for(pt=ce.key;K!==null;){if(K.key===pt)if(K.tag===4&&K.stateNode.containerInfo===ce.containerInfo&&K.stateNode.implementation===ce.implementation){g(ie,K.sibling),K=E(K,ce.children||[]),K.return=ie,ie=K;break e}else{g(ie,K);break}else c(ie,K);K=K.sibling}K=V0(ce,ie.mode,Oe),K.return=ie,ie=K}return U(ie);case w:return pt=ce._init,sr(ie,K,pt(ce._payload),Oe)}if(Z(ce))return Ke(ie,K,ce,Oe);if(P(ce))return Qn(ie,K,ce,Oe);Jh(ie,ce)}return typeof ce=="string"&&ce!==""||typeof ce=="number"?(ce=""+ce,K!==null&&K.tag===6?(g(ie,K.sibling),K=E(K,ce),K.return=ie,ie=K):(g(ie,K),K=B0(ce,ie.mode,Oe),K.return=ie,ie=K),U(ie)):g(ie,K)}return sr}var dl=rw(!0),sw=rw(!1),nc={},tr=xi(nc),ic=xi(nc),pl=xi(nc);function Wr(u){if(u===nc)throw Error(o(174));return u}function r0(u,c){ht(pl,c),ht(ic,u),ht(tr,nc),u=ae(c),It(tr),ht(tr,u)}function ml(){It(tr),It(ic),It(pl)}function ow(u){var c=Wr(pl.current),g=Wr(tr.current);c=D(g,u.type,c),g!==c&&(ht(ic,u),ht(tr,c))}function s0(u){ic.current===u&&(It(tr),It(ic))}var Qt=xi(0);function Kh(u){for(var c=u;c!==null;){if(c.tag===13){var g=c.memoizedState;if(g!==null&&(g=g.dehydrated,g===null||Nh(g)||Ju(g)))return c}else if(c.tag===19&&c.memoizedProps.revealOrder!==void 0){if(c.flags&128)return c}else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===u)break;for(;c.sibling===null;){if(c.return===null||c.return===u)return null;c=c.return}c.sibling.return=c.return,c=c.sibling}return null}var o0=[];function a0(){for(var u=0;ug?g:4,u(!0);var x=nr.transition;nr.transition={};try{u(!1),c()}finally{Ct=g,nr.transition=x}}function _w(){return Gr().memoizedState}function CI(u,c,g){var x=Qs(u);g={lane:x,action:g,hasEagerState:!1,eagerState:null,next:null},Sw(u)?ww(c,g):(Mw(u,c,g),g=ui(),u=ir(u,x,g),u!==null&&Aw(u,c,x))}function PI(u,c,g){var x=Qs(u),E={lane:x,action:g,hasEagerState:!1,eagerState:null,next:null};if(Sw(u))ww(c,E);else{Mw(u,c,E);var T=u.alternate;if(u.lanes===0&&(T===null||T.lanes===0)&&(T=c.lastRenderedReducer,T!==null))try{var U=c.lastRenderedState,q=T(U,g);if(E.hasEagerState=!0,E.eagerState=q,Br(q,U))return}catch{}finally{}g=ui(),u=ir(u,x,g),u!==null&&Aw(u,c,x)}}function Sw(u){var c=u.alternate;return u===an||c!==null&&c===an}function ww(u,c){rc=$h=!0;var g=u.pending;g===null?c.next=c:(c.next=g.next,g.next=c),u.pending=c}function Mw(u,c,g){_n!==null&&u.mode&1&&!(xt&2)?(u=c.interleaved,u===null?(g.next=g,Hr===null?Hr=[c]:Hr.push(c)):(g.next=u.next,u.next=g),c.interleaved=g):(u=c.pending,u===null?g.next=g:(g.next=u.next,u.next=g),c.pending=g)}function Aw(u,c,g){if(g&4194240){var x=c.lanes;x&=u.pendingLanes,g|=x,c.lanes=g,Vg(u,g)}}var rd={readContext:Qi,useCallback:Jn,useContext:Jn,useEffect:Jn,useImperativeHandle:Jn,useInsertionEffect:Jn,useLayoutEffect:Jn,useMemo:Jn,useReducer:Jn,useRef:Jn,useState:Jn,useDebugValue:Jn,useDeferredValue:Jn,useTransition:Jn,useMutableSource:Jn,useSyncExternalStore:Jn,useId:Jn,unstable_isNewReconciler:!1},LI={readContext:Qi,useCallback:function(u,c){return ps().memoizedState=[u,c===void 0?null:c],u},useContext:Qi,useEffect:h0,useImperativeHandle:function(u,c,g){return g=g!=null?g.concat([u]):null,nd(4194308,4,gw.bind(null,c,u),g)},useLayoutEffect:function(u,c){return nd(4194308,4,u,c)},useInsertionEffect:function(u,c){return nd(4,2,u,c)},useMemo:function(u,c){var g=ps();return c=c===void 0?null:c,u=u(),g.memoizedState=[u,c],u},useReducer:function(u,c,g){var x=ps();return c=g!==void 0?g(c):c,x.memoizedState=x.baseState=c,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:u,lastRenderedState:c},x.queue=u,u=u.dispatch=CI.bind(null,an,u),[x.memoizedState,u]},useRef:function(u){var c=ps();return u={current:u},c.memoizedState=u},useState:f0,useDebugValue:d0,useDeferredValue:function(u){var c=f0(u),g=c[0],x=c[1];return h0(function(){var E=nr.transition;nr.transition={};try{x(u)}finally{nr.transition=E}},[u]),g},useTransition:function(){var u=f0(!1),c=u[0];return u=TI.bind(null,u[1]),ps().memoizedState=u,[c,u]},useMutableSource:function(){},useSyncExternalStore:function(u,c,g){var x=an,E=ps();if(Zt){if(g===void 0)throw Error(o(407));g=g()}else{if(g=c(),_n===null)throw Error(o(349));gl&30||uw(x,c,g)}E.memoizedState=g;var T={value:g,getSnapshot:c};return E.queue=T,h0(fw.bind(null,x,T,u),[u]),x.flags|=2048,oc(9,cw.bind(null,x,T,g,c),void 0,null),g},useId:function(){var u=ps(),c=_n.identifierPrefix;if(Zt){var g=ds,x=hs;g=(x&~(1<<32-xr(x)-1)).toString(32)+g,c=":"+c+"R"+g,g=sc++,0I0&&(c.flags|=128,x=!0,cc(E,!1),c.lanes=4194304)}else{if(!x)if(u=Kh(T),u!==null){if(c.flags|=128,x=!0,u=u.updateQueue,u!==null&&(c.updateQueue=u,c.flags|=4),cc(E,!0),E.tail===null&&E.tailMode==="hidden"&&!T.alternate&&!Zt)return Kn(c),null}else 2*Dn()-E.renderingStartTime>I0&&g!==1073741824&&(c.flags|=128,x=!0,cc(E,!1),c.lanes=4194304);E.isBackwards?(T.sibling=c.child,c.child=T):(u=E.last,u!==null?u.sibling=T:c.child=T,E.last=T)}return E.tail!==null?(c=E.tail,E.rendering=c,E.tail=c.sibling,E.renderingStartTime=Dn(),c.sibling=null,u=Qt.current,ht(Qt,x?u&1|2:u&1),c):(Kn(c),null);case 22:case 23:return U0(),x=c.memoizedState!==null,u!==null&&u.memoizedState!==null!==x&&(c.flags|=8192),x&&c.mode&1?Oi&1073741824&&(Kn(c),Me&&c.subtreeFlags&6&&(c.flags|=8192)):Kn(c),null;case 24:return null;case 25:return null}throw Error(o(156,c.tag))}var kI=a.ReactCurrentOwner,ki=!1;function li(u,c,g,x){c.child=u===null?sw(c,null,g,x):dl(c,u.child,g,x)}function Iw(u,c,g,x,E){g=g.render;var T=c.ref;return ul(c,E),x=u0(u,c,g,x,T,E),g=c0(),u!==null&&!ki?(c.updateQueue=u.updateQueue,c.flags&=-2053,u.lanes&=~E,ms(u,c,E)):(Zt&&g&&$g(c),c.flags|=1,li(u,c,x,E),c.child)}function Dw(u,c,g,x,E){if(u===null){var T=g.type;return typeof T=="function"&&!F0(T)&&T.defaultProps===void 0&&g.compare===null&&g.defaultProps===void 0?(c.tag=15,c.type=T,Nw(u,c,T,x,E)):(u=Td(g.type,null,x,c,c.mode,E),u.ref=c.ref,u.return=c,c.child=u)}if(T=u.child,!(u.lanes&E)){var U=T.memoizedProps;if(g=g.compare,g=g!==null?g:Hh,g(U,x)&&u.ref===c.ref)return ms(u,c,E)}return c.flags|=1,u=eo(T,x),u.ref=c.ref,u.return=c,c.child=u}function Nw(u,c,g,x,E){if(u!==null&&Hh(u.memoizedProps,x)&&u.ref===c.ref)if(ki=!1,(u.lanes&E)!==0)u.flags&131072&&(ki=!0);else return c.lanes=u.lanes,ms(u,c,E);return g0(u,c,g,x,E)}function kw(u,c,g){var x=c.pendingProps,E=x.children,T=u!==null?u.memoizedState:null;if(x.mode==="hidden")if(!(c.mode&1))c.memoizedState={baseLanes:0,cachePool:null},ht(vl,Oi),Oi|=g;else if(g&1073741824)c.memoizedState={baseLanes:0,cachePool:null},x=T!==null?T.baseLanes:g,ht(vl,Oi),Oi|=x;else return u=T!==null?T.baseLanes|g:g,c.lanes=c.childLanes=1073741824,c.memoizedState={baseLanes:u,cachePool:null},c.updateQueue=null,ht(vl,Oi),Oi|=u,null;else T!==null?(x=T.baseLanes|g,c.memoizedState=null):x=g,ht(vl,Oi),Oi|=x;return li(u,c,E,g),c.child}function Ow(u,c){var g=c.ref;(u===null&&g!==null||u!==null&&u.ref!==g)&&(c.flags|=512,c.flags|=2097152)}function g0(u,c,g,x,E){var T=Hn(g)?yr:xn.current;return T=Ys(c,T),ul(c,E),g=u0(u,c,g,x,T,E),x=c0(),u!==null&&!ki?(c.updateQueue=u.updateQueue,c.flags&=-2053,u.lanes&=~E,ms(u,c,E)):(Zt&&x&&$g(c),c.flags|=1,li(u,c,g,E),c.child)}function Uw(u,c,g,x,E){if(Hn(g)){var T=!0;Oh(c)}else T=!1;if(ul(c,E),c.stateNode===null)u!==null&&(u.alternate=null,c.alternate=null,c.flags|=2),KS(c,g,x),Qg(c,g,x,E),x=!0;else if(u===null){var U=c.stateNode,q=c.memoizedProps;U.props=q;var he=U.context,Le=g.contextType;typeof Le=="object"&&Le!==null?Le=Qi(Le):(Le=Hn(g)?yr:xn.current,Le=Ys(c,Le));var Ve=g.getDerivedStateFromProps,at=typeof Ve=="function"||typeof U.getSnapshotBeforeUpdate=="function";at||typeof U.UNSAFE_componentWillReceiveProps!="function"&&typeof U.componentWillReceiveProps!="function"||(q!==x||he!==Le)&&QS(c,U,x,Le),qs=!1;var tt=c.memoizedState;U.state=tt,Xh(c,x,U,E),he=c.memoizedState,q!==x||tt!==he||Ut.current||qs?(typeof Ve=="function"&&(Kg(c,g,Ve,x),he=c.memoizedState),(q=qs||JS(c,g,q,x,tt,he,Le))?(at||typeof U.UNSAFE_componentWillMount!="function"&&typeof U.componentWillMount!="function"||(typeof U.componentWillMount=="function"&&U.componentWillMount(),typeof U.UNSAFE_componentWillMount=="function"&&U.UNSAFE_componentWillMount()),typeof U.componentDidMount=="function"&&(c.flags|=4194308)):(typeof U.componentDidMount=="function"&&(c.flags|=4194308),c.memoizedProps=x,c.memoizedState=he),U.props=x,U.state=he,U.context=Le,x=q):(typeof U.componentDidMount=="function"&&(c.flags|=4194308),x=!1)}else{U=c.stateNode,XS(u,c),q=c.memoizedProps,Le=c.type===c.elementType?q:_r(c.type,q),U.props=Le,at=c.pendingProps,tt=U.context,he=g.contextType,typeof he=="object"&&he!==null?he=Qi(he):(he=Hn(g)?yr:xn.current,he=Ys(c,he));var Ft=g.getDerivedStateFromProps;(Ve=typeof Ft=="function"||typeof U.getSnapshotBeforeUpdate=="function")||typeof U.UNSAFE_componentWillReceiveProps!="function"&&typeof U.componentWillReceiveProps!="function"||(q!==at||tt!==he)&&QS(c,U,x,he),qs=!1,tt=c.memoizedState,U.state=tt,Xh(c,x,U,E);var Ke=c.memoizedState;q!==at||tt!==Ke||Ut.current||qs?(typeof Ft=="function"&&(Kg(c,g,Ft,x),Ke=c.memoizedState),(Le=qs||JS(c,g,Le,x,tt,Ke,he)||!1)?(Ve||typeof U.UNSAFE_componentWillUpdate!="function"&&typeof U.componentWillUpdate!="function"||(typeof U.componentWillUpdate=="function"&&U.componentWillUpdate(x,Ke,he),typeof U.UNSAFE_componentWillUpdate=="function"&&U.UNSAFE_componentWillUpdate(x,Ke,he)),typeof U.componentDidUpdate=="function"&&(c.flags|=4),typeof U.getSnapshotBeforeUpdate=="function"&&(c.flags|=1024)):(typeof U.componentDidUpdate!="function"||q===u.memoizedProps&&tt===u.memoizedState||(c.flags|=4),typeof U.getSnapshotBeforeUpdate!="function"||q===u.memoizedProps&&tt===u.memoizedState||(c.flags|=1024),c.memoizedProps=x,c.memoizedState=Ke),U.props=x,U.state=Ke,U.context=he,x=Le):(typeof U.componentDidUpdate!="function"||q===u.memoizedProps&&tt===u.memoizedState||(c.flags|=4),typeof U.getSnapshotBeforeUpdate!="function"||q===u.memoizedProps&&tt===u.memoizedState||(c.flags|=1024),x=!1)}return v0(u,c,g,x,T,E)}function v0(u,c,g,x,E,T){Ow(u,c);var U=(c.flags&128)!==0;if(!x&&!U)return E&&VS(c,g,!1),ms(u,c,T);x=c.stateNode,kI.current=c;var q=U&&typeof g.getDerivedStateFromError!="function"?null:x.render();return c.flags|=1,u!==null&&U?(c.child=dl(c,u.child,null,T),c.child=dl(c,null,q,T)):li(u,c,q,T),c.memoizedState=x.state,E&&VS(c,g,!0),c.child}function zw(u){var c=u.stateNode;c.pendingContext?FS(u,c.pendingContext,c.pendingContext!==c.context):c.context&&FS(u,c.context,!1),r0(u,c.containerInfo)}function Fw(u,c,g,x,E){return hl(),i0(E),c.flags|=256,li(u,c,g,x),c.child}var ad={dehydrated:null,treeContext:null,retryLane:0};function ld(u){return{baseLanes:u,cachePool:null}}function Bw(u,c,g){var x=c.pendingProps,E=Qt.current,T=!1,U=(c.flags&128)!==0,q;if((q=U)||(q=u!==null&&u.memoizedState===null?!1:(E&2)!==0),q?(T=!0,c.flags&=-129):(u===null||u.memoizedState!==null)&&(E|=1),ht(Qt,E&1),u===null)return n0(c),u=c.memoizedState,u!==null&&(u=u.dehydrated,u!==null)?(c.mode&1?Ju(u)?c.lanes=8:c.lanes=1073741824:c.lanes=1,null):(E=x.children,u=x.fallback,T?(x=c.mode,T=c.child,E={mode:"hidden",children:E},!(x&1)&&T!==null?(T.childLanes=0,T.pendingProps=E):T=Cd(E,x,0,null),u=aa(u,x,g,null),T.return=c,u.return=c,T.sibling=u,c.child=T,c.child.memoizedState=ld(g),c.memoizedState=ad,u):y0(c,E));if(E=u.memoizedState,E!==null){if(q=E.dehydrated,q!==null){if(U)return c.flags&256?(c.flags&=-257,ud(u,c,g,Error(o(422)))):c.memoizedState!==null?(c.child=u.child,c.flags|=128,null):(T=x.fallback,E=c.mode,x=Cd({mode:"visible",children:x.children},E,0,null),T=aa(T,E,g,null),T.flags|=2,x.return=c,T.return=c,x.sibling=T,c.child=x,c.mode&1&&dl(c,u.child,null,g),c.child.memoizedState=ld(g),c.memoizedState=ad,T);if(!(c.mode&1))c=ud(u,c,g,null);else if(Ju(q))c=ud(u,c,g,Error(o(419)));else if(x=(g&u.childLanes)!==0,ki||x){if(x=_n,x!==null){switch(g&-g){case 4:T=2;break;case 16:T=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:T=32;break;case 536870912:T=268435456;break;default:T=0}x=T&(x.suspendedLanes|g)?0:T,x!==0&&x!==E.retryLane&&(E.retryLane=x,ir(u,x,-1))}z0(),c=ud(u,c,g,Error(o(421)))}else Nh(q)?(c.flags|=128,c.child=u.child,c=qI.bind(null,u),zg(q,c),c=null):(g=E.treeContext,oe&&(Ni=ne(q),Di=c,Zt=!0,Sr=null,$u=!1,g!==null&&($i[er++]=hs,$i[er++]=ds,$i[er++]=$o,hs=g.id,ds=g.overflow,$o=c)),c=y0(c,c.pendingProps.children),c.flags|=4096);return c}return T?(x=Hw(u,c,x.children,x.fallback,g),T=c.child,E=u.child.memoizedState,T.memoizedState=E===null?ld(g):{baseLanes:E.baseLanes|g,cachePool:null},T.childLanes=u.childLanes&~g,c.memoizedState=ad,x):(g=Vw(u,c,x.children,g),c.memoizedState=null,g)}return T?(x=Hw(u,c,x.children,x.fallback,g),T=c.child,E=u.child.memoizedState,T.memoizedState=E===null?ld(g):{baseLanes:E.baseLanes|g,cachePool:null},T.childLanes=u.childLanes&~g,c.memoizedState=ad,x):(g=Vw(u,c,x.children,g),c.memoizedState=null,g)}function y0(u,c){return c=Cd({mode:"visible",children:c},u.mode,0,null),c.return=u,u.child=c}function Vw(u,c,g,x){var E=u.child;return u=E.sibling,g=eo(E,{mode:"visible",children:g}),!(c.mode&1)&&(g.lanes=x),g.return=c,g.sibling=null,u!==null&&(x=c.deletions,x===null?(c.deletions=[u],c.flags|=16):x.push(u)),c.child=g}function Hw(u,c,g,x,E){var T=c.mode;u=u.child;var U=u.sibling,q={mode:"hidden",children:g};return!(T&1)&&c.child!==u?(g=c.child,g.childLanes=0,g.pendingProps=q,c.deletions=null):(g=eo(u,q),g.subtreeFlags=u.subtreeFlags&14680064),U!==null?x=eo(U,x):(x=aa(x,T,E,null),x.flags|=2),x.return=c,g.return=c,g.sibling=x,c.child=g,x}function ud(u,c,g,x){return x!==null&&i0(x),dl(c,u.child,null,g),u=y0(c,c.pendingProps.children),u.flags|=2,c.memoizedState=null,u}function Ww(u,c,g){u.lanes|=c;var x=u.alternate;x!==null&&(x.lanes|=c),Zg(u.return,c,g)}function x0(u,c,g,x,E){var T=u.memoizedState;T===null?u.memoizedState={isBackwards:c,rendering:null,renderingStartTime:0,last:x,tail:g,tailMode:E}:(T.isBackwards=c,T.rendering=null,T.renderingStartTime=0,T.last=x,T.tail=g,T.tailMode=E)}function Gw(u,c,g){var x=c.pendingProps,E=x.revealOrder,T=x.tail;if(li(u,c,x.children,g),x=Qt.current,x&2)x=x&1|2,c.flags|=128;else{if(u!==null&&u.flags&128)e:for(u=c.child;u!==null;){if(u.tag===13)u.memoizedState!==null&&Ww(u,g,c);else if(u.tag===19)Ww(u,g,c);else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===c)break e;for(;u.sibling===null;){if(u.return===null||u.return===c)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}x&=1}if(ht(Qt,x),!(c.mode&1))c.memoizedState=null;else switch(E){case"forwards":for(g=c.child,E=null;g!==null;)u=g.alternate,u!==null&&Kh(u)===null&&(E=g),g=g.sibling;g=E,g===null?(E=c.child,c.child=null):(E=g.sibling,g.sibling=null),x0(c,!1,E,g,T);break;case"backwards":for(g=null,E=c.child,c.child=null;E!==null;){if(u=E.alternate,u!==null&&Kh(u)===null){c.child=E;break}u=E.sibling,E.sibling=g,g=E,E=u}x0(c,!0,g,null,T);break;case"together":x0(c,!1,null,null,void 0);break;default:c.memoizedState=null}return c.child}function ms(u,c,g){if(u!==null&&(c.dependencies=u.dependencies),yl|=c.lanes,!(g&c.childLanes))return null;if(u!==null&&c.child!==u.child)throw Error(o(153));if(c.child!==null){for(u=c.child,g=eo(u,u.pendingProps),c.child=g,g.return=c;u.sibling!==null;)u=u.sibling,g=g.sibling=eo(u,u.pendingProps),g.return=c;g.sibling=null}return c.child}function OI(u,c,g){switch(c.tag){case 3:zw(c),hl();break;case 5:ow(c);break;case 1:Hn(c.type)&&Oh(c);break;case 4:r0(c,c.stateNode.containerInfo);break;case 10:jS(c,c.type._context,c.memoizedProps.value);break;case 13:var x=c.memoizedState;if(x!==null)return x.dehydrated!==null?(ht(Qt,Qt.current&1),c.flags|=128,null):g&c.child.childLanes?Bw(u,c,g):(ht(Qt,Qt.current&1),u=ms(u,c,g),u!==null?u.sibling:null);ht(Qt,Qt.current&1);break;case 19:if(x=(g&c.childLanes)!==0,u.flags&128){if(x)return Gw(u,c,g);c.flags|=128}var E=c.memoizedState;if(E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),ht(Qt,Qt.current),x)break;return null;case 22:case 23:return c.lanes=0,kw(u,c,g)}return ms(u,c,g)}function UI(u,c){switch(e0(c),c.tag){case 1:return Hn(c.type)&&kh(),u=c.flags,u&65536?(c.flags=u&-65537|128,c):null;case 3:return ml(),It(Ut),It(xn),a0(),u=c.flags,u&65536&&!(u&128)?(c.flags=u&-65537|128,c):null;case 5:return s0(c),null;case 13:if(It(Qt),u=c.memoizedState,u!==null&&u.dehydrated!==null){if(c.alternate===null)throw Error(o(340));hl()}return u=c.flags,u&65536?(c.flags=u&-65537|128,c):null;case 19:return It(Qt),null;case 4:return ml(),null;case 10:return qg(c.type._context),null;case 22:case 23:return U0(),null;case 24:return null;default:return null}}var cd=!1,na=!1,zI=typeof WeakSet=="function"?WeakSet:Set,Ne=null;function fd(u,c){var g=u.ref;if(g!==null)if(typeof g=="function")try{g(null)}catch(x){wi(u,c,x)}else g.current=null}function _0(u,c,g){try{g()}catch(x){wi(u,c,x)}}var jw=!1;function FI(u,c){for(V(u.containerInfo),Ne=c;Ne!==null;)if(u=Ne,c=u.child,(u.subtreeFlags&1028)!==0&&c!==null)c.return=u,Ne=c;else for(;Ne!==null;){u=Ne;try{var g=u.alternate;if(u.flags&1024)switch(u.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var x=g.memoizedProps,E=g.memoizedState,T=u.stateNode,U=T.getSnapshotBeforeUpdate(u.elementType===u.type?x:_r(u.type,x),E);T.__reactInternalSnapshotBeforeUpdate=U}break;case 3:Me&&Ue(u.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(q){wi(u,u.return,q)}if(c=u.sibling,c!==null){c.return=u.return,Ne=c;break}Ne=u.return}return g=jw,jw=!1,g}function ia(u,c,g){var x=c.updateQueue;if(x=x!==null?x.lastEffect:null,x!==null){var E=x=x.next;do{if((E.tag&u)===u){var T=E.destroy;E.destroy=void 0,T!==void 0&&_0(c,g,T)}E=E.next}while(E!==x)}}function fc(u,c){if(c=c.updateQueue,c=c!==null?c.lastEffect:null,c!==null){var g=c=c.next;do{if((g.tag&u)===u){var x=g.create;g.destroy=x()}g=g.next}while(g!==c)}}function S0(u){var c=u.ref;if(c!==null){var g=u.stateNode;switch(u.tag){case 5:u=se(g);break;default:u=g}typeof c=="function"?c(u):c.current=u}}function Xw(u,c,g){if(Fr&&typeof Fr.onCommitFiberUnmount=="function")try{Fr.onCommitFiberUnmount(Bh,c)}catch{}switch(c.tag){case 0:case 11:case 14:case 15:if(u=c.updateQueue,u!==null&&(u=u.lastEffect,u!==null)){var x=u=u.next;do{var E=x,T=E.destroy;E=E.tag,T!==void 0&&(E&2||E&4)&&_0(c,g,T),x=x.next}while(x!==u)}break;case 1:if(fd(c,g),u=c.stateNode,typeof u.componentWillUnmount=="function")try{u.props=c.memoizedProps,u.state=c.memoizedState,u.componentWillUnmount()}catch(U){wi(c,g,U)}break;case 5:fd(c,g);break;case 4:Me?Qw(u,c,g):ge&&ge&&(c=c.stateNode.containerInfo,g=Ot(c),mr(c,g))}}function Yw(u,c,g){for(var x=c;;)if(Xw(u,x,g),x.child===null||Me&&x.tag===4){if(x===c)break;for(;x.sibling===null;){if(x.return===null||x.return===c)return;x=x.return}x.sibling.return=x.return,x=x.sibling}else x.child.return=x,x=x.child}function qw(u){var c=u.alternate;c!==null&&(u.alternate=null,qw(c)),u.child=null,u.deletions=null,u.sibling=null,u.tag===5&&(c=u.stateNode,c!==null&&Ge(c)),u.stateNode=null,u.return=null,u.dependencies=null,u.memoizedProps=null,u.memoizedState=null,u.pendingProps=null,u.stateNode=null,u.updateQueue=null}function Zw(u){return u.tag===5||u.tag===3||u.tag===4}function Jw(u){e:for(;;){for(;u.sibling===null;){if(u.return===null||Zw(u.return))return null;u=u.return}for(u.sibling.return=u.return,u=u.sibling;u.tag!==5&&u.tag!==6&&u.tag!==18;){if(u.flags&2||u.child===null||u.tag===4)continue e;u.child.return=u,u=u.child}if(!(u.flags&2))return u.stateNode}}function Kw(u){if(Me){e:{for(var c=u.return;c!==null;){if(Zw(c))break e;c=c.return}throw Error(o(160))}var g=c;switch(g.tag){case 5:c=g.stateNode,g.flags&32&&(ct(c),g.flags&=-33),g=Jw(u),M0(u,g,c);break;case 3:case 4:c=g.stateNode.containerInfo,g=Jw(u),w0(u,g,c);break;default:throw Error(o(161))}}}function w0(u,c,g){var x=u.tag;if(x===5||x===6)u=u.stateNode,c?Se(g,u,c):ze(g,u);else if(x!==4&&(u=u.child,u!==null))for(w0(u,c,g),u=u.sibling;u!==null;)w0(u,c,g),u=u.sibling}function M0(u,c,g){var x=u.tag;if(x===5||x===6)u=u.stateNode,c?de(g,u,c):et(g,u);else if(x!==4&&(u=u.child,u!==null))for(M0(u,c,g),u=u.sibling;u!==null;)M0(u,c,g),u=u.sibling}function Qw(u,c,g){for(var x=c,E=!1,T,U;;){if(!E){E=x.return;e:for(;;){if(E===null)throw Error(o(160));switch(T=E.stateNode,E.tag){case 5:U=!1;break e;case 3:T=T.containerInfo,U=!0;break e;case 4:T=T.containerInfo,U=!0;break e}E=E.return}E=!0}if(x.tag===5||x.tag===6)Yw(u,x,g),U?Qe(T,x.stateNode):Pe(T,x.stateNode);else if(x.tag===18)U?St(T,x.stateNode):yt(T,x.stateNode);else if(x.tag===4){if(x.child!==null){T=x.stateNode.containerInfo,U=!0,x.child.return=x,x=x.child;continue}}else if(Xw(u,x,g),x.child!==null){x.child.return=x,x=x.child;continue}if(x===c)break;for(;x.sibling===null;){if(x.return===null||x.return===c)return;x=x.return,x.tag===4&&(E=!1)}x.sibling.return=x.return,x=x.sibling}}function A0(u,c){if(Me){switch(c.tag){case 0:case 11:case 14:case 15:ia(3,c,c.return),fc(3,c),ia(5,c,c.return);return;case 1:return;case 5:var g=c.stateNode;if(g!=null){var x=c.memoizedProps;u=u!==null?u.memoizedProps:x;var E=c.type,T=c.updateQueue;c.updateQueue=null,T!==null&&G(g,T,E,u,x,c)}return;case 6:if(c.stateNode===null)throw Error(o(162));g=c.memoizedProps,pe(c.stateNode,u!==null?u.memoizedProps:g,g);return;case 3:oe&&u!==null&&u.memoizedState.isDehydrated&&ft(c.stateNode.containerInfo);return;case 12:return;case 13:hd(c);return;case 19:hd(c);return;case 17:return}throw Error(o(163))}switch(c.tag){case 0:case 11:case 14:case 15:ia(3,c,c.return),fc(3,c),ia(5,c,c.return);return;case 12:return;case 13:hd(c);return;case 19:hd(c);return;case 3:oe&&u!==null&&u.memoizedState.isDehydrated&&ft(c.stateNode.containerInfo);break;case 22:case 23:return}e:if(ge){switch(c.tag){case 1:case 5:case 6:break e;case 3:case 4:c=c.stateNode,mr(c.containerInfo,c.pendingChildren);break e}throw Error(o(163))}}function hd(u){var c=u.updateQueue;if(c!==null){u.updateQueue=null;var g=u.stateNode;g===null&&(g=u.stateNode=new zI),c.forEach(function(x){var E=ZI.bind(null,u,x);g.has(x)||(g.add(x),x.then(E,E))})}}function BI(u,c){for(Ne=c;Ne!==null;){c=Ne;var g=c.deletions;if(g!==null)for(var x=0;x";case pd:return":has("+(T0(u)||"")+")";case md:return'[role="'+u.value+'"]';case vd:return'"'+u.value+'"';case gd:return'[data-testname="'+u.value+'"]';default:throw Error(o(365))}}function iM(u,c){var g=[];u=[u,0];for(var x=0;xE&&(E=U),x&=~T}if(x=E,x=Dn()-x,x=(120>x?120:480>x?480:1080>x?1080:1920>x?1920:3e3>x?3e3:4320>x?4320:1960*HI(x/1960))-x,10u?16:u,Ks===null)var x=!1;else{if(u=Ks,Ks=null,wd=0,xt&6)throw Error(o(331));var E=xt;for(xt|=4,Ne=u.current;Ne!==null;){var T=Ne,U=T.child;if(Ne.flags&16){var q=T.deletions;if(q!==null){for(var he=0;heDn()-R0?ra(u,0):L0|=g),Si(u,c)}function hM(u,c){c===0&&(u.mode&1?(c=zh,zh<<=1,!(zh&130023424)&&(zh=4194304)):c=1);var g=ui();u=Ed(u,c),u!==null&&(Qu(u,c,g),Si(u,g))}function qI(u){var c=u.memoizedState,g=0;c!==null&&(g=c.retryLane),hM(u,g)}function ZI(u,c){var g=0;switch(u.tag){case 13:var x=u.stateNode,E=u.memoizedState;E!==null&&(g=E.retryLane);break;case 19:x=u.stateNode;break;default:throw Error(o(314))}x!==null&&x.delete(c),hM(u,g)}var dM;dM=function(u,c,g){if(u!==null)if(u.memoizedProps!==c.pendingProps||Ut.current)ki=!0;else{if(!(u.lanes&g)&&!(c.flags&128))return ki=!1,OI(u,c,g);ki=!!(u.flags&131072)}else ki=!1,Zt&&c.flags&1048576&&$S(c,Zh,c.index);switch(c.lanes=0,c.tag){case 2:var x=c.type;u!==null&&(u.alternate=null,c.alternate=null,c.flags|=2),u=c.pendingProps;var E=Ys(c,xn.current);ul(c,g),E=u0(null,c,x,u,E,g);var T=c0();return c.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(c.tag=1,c.memoizedState=null,c.updateQueue=null,Hn(x)?(T=!0,Oh(c)):T=!1,c.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Jg(c),E.updater=Yh,c.stateNode=E,E._reactInternals=c,Qg(c,x,u,g),c=v0(null,c,x,!0,T,g)):(c.tag=0,Zt&&T&&$g(c),li(null,c,E,g),c=c.child),c;case 16:x=c.elementType;e:{switch(u!==null&&(u.alternate=null,c.alternate=null,c.flags|=2),u=c.pendingProps,E=x._init,x=E(x._payload),c.type=x,E=c.tag=KI(x),u=_r(x,u),E){case 0:c=g0(null,c,x,u,g);break e;case 1:c=Uw(null,c,x,u,g);break e;case 11:c=Iw(null,c,x,u,g);break e;case 14:c=Dw(null,c,x,_r(x.type,u),g);break e}throw Error(o(306,x,""))}return c;case 0:return x=c.type,E=c.pendingProps,E=c.elementType===x?E:_r(x,E),g0(u,c,x,E,g);case 1:return x=c.type,E=c.pendingProps,E=c.elementType===x?E:_r(x,E),Uw(u,c,x,E,g);case 3:e:{if(zw(c),u===null)throw Error(o(387));x=c.pendingProps,T=c.memoizedState,E=T.element,XS(u,c),Xh(c,x,null,g);var U=c.memoizedState;if(x=U.element,oe&&T.isDehydrated)if(T={element:x,isDehydrated:!1,cache:U.cache,transitions:U.transitions},c.updateQueue.baseState=T,c.memoizedState=T,c.flags&256){E=Error(o(423)),c=Fw(u,c,x,g,E);break e}else if(x!==E){E=Error(o(424)),c=Fw(u,c,x,g,E);break e}else for(oe&&(Ni=me(c.stateNode.containerInfo),Di=c,Zt=!0,Sr=null,$u=!1),g=sw(c,null,x,g),c.child=g;g;)g.flags=g.flags&-3|4096,g=g.sibling;else{if(hl(),x===E){c=ms(u,c,g);break e}li(u,c,x,g)}c=c.child}return c;case 5:return ow(c),u===null&&n0(c),x=c.type,E=c.pendingProps,T=u!==null?u.memoizedProps:null,U=E.children,Ee(x,E)?U=null:T!==null&&Ee(x,T)&&(c.flags|=32),Ow(u,c),li(u,c,U,g),c.child;case 6:return u===null&&n0(c),null;case 13:return Bw(u,c,g);case 4:return r0(c,c.stateNode.containerInfo),x=c.pendingProps,u===null?c.child=dl(c,null,x,g):li(u,c,x,g),c.child;case 11:return x=c.type,E=c.pendingProps,E=c.elementType===x?E:_r(x,E),Iw(u,c,x,E,g);case 7:return li(u,c,c.pendingProps,g),c.child;case 8:return li(u,c,c.pendingProps.children,g),c.child;case 12:return li(u,c,c.pendingProps.children,g),c.child;case 10:e:{if(x=c.type._context,E=c.pendingProps,T=c.memoizedProps,U=E.value,jS(c,x,U),T!==null)if(Br(T.value,U)){if(T.children===E.children&&!Ut.current){c=ms(u,c,g);break e}}else for(T=c.child,T!==null&&(T.return=c);T!==null;){var q=T.dependencies;if(q!==null){U=T.child;for(var he=q.firstContext;he!==null;){if(he.context===x){if(T.tag===1){he=fs(-1,g&-g),he.tag=2;var Le=T.updateQueue;if(Le!==null){Le=Le.shared;var Ve=Le.pending;Ve===null?he.next=he:(he.next=Ve.next,Ve.next=he),Le.pending=he}}T.lanes|=g,he=T.alternate,he!==null&&(he.lanes|=g),Zg(T.return,g,c),q.lanes|=g;break}he=he.next}}else if(T.tag===10)U=T.type===c.type?null:T.child;else if(T.tag===18){if(U=T.return,U===null)throw Error(o(341));U.lanes|=g,q=U.alternate,q!==null&&(q.lanes|=g),Zg(U,g,c),U=T.sibling}else U=T.child;if(U!==null)U.return=T;else for(U=T;U!==null;){if(U===c){U=null;break}if(T=U.sibling,T!==null){T.return=U.return,U=T;break}U=U.return}T=U}li(u,c,E.children,g),c=c.child}return c;case 9:return E=c.type,x=c.pendingProps.children,ul(c,g),E=Qi(E),x=x(E),c.flags|=1,li(u,c,x,g),c.child;case 14:return x=c.type,E=_r(x,c.pendingProps),E=_r(x.type,E),Dw(u,c,x,E,g);case 15:return Nw(u,c,c.type,c.pendingProps,g);case 17:return x=c.type,E=c.pendingProps,E=c.elementType===x?E:_r(x,E),u!==null&&(u.alternate=null,c.alternate=null,c.flags|=2),c.tag=1,Hn(x)?(u=!0,Oh(c)):u=!1,ul(c,g),KS(c,x,E),Qg(c,x,E,g),v0(null,c,x,!0,u,g);case 19:return Gw(u,c,g);case 22:return kw(u,c,g)}throw Error(o(156,c.tag))};function pM(u,c){return Hg(u,c)}function JI(u,c,g,x){this.tag=u,this.key=g,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=c,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=x,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rr(u,c,g,x){return new JI(u,c,g,x)}function F0(u){return u=u.prototype,!(!u||!u.isReactComponent)}function KI(u){if(typeof u=="function")return F0(u)?1:0;if(u!=null){if(u=u.$$typeof,u===_)return 11;if(u===S)return 14}return 2}function eo(u,c){var g=u.alternate;return g===null?(g=rr(u.tag,c,u.key,u.mode),g.elementType=u.elementType,g.type=u.type,g.stateNode=u.stateNode,g.alternate=u,u.alternate=g):(g.pendingProps=c,g.type=u.type,g.flags=0,g.subtreeFlags=0,g.deletions=null),g.flags=u.flags&14680064,g.childLanes=u.childLanes,g.lanes=u.lanes,g.child=u.child,g.memoizedProps=u.memoizedProps,g.memoizedState=u.memoizedState,g.updateQueue=u.updateQueue,c=u.dependencies,g.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext},g.sibling=u.sibling,g.index=u.index,g.ref=u.ref,g}function Td(u,c,g,x,E,T){var U=2;if(x=u,typeof u=="function")F0(u)&&(U=1);else if(typeof u=="string")U=5;else e:switch(u){case h:return aa(g.children,E,T,c);case d:U=8,E|=8;break;case p:return u=rr(12,g,c,E|2),u.elementType=p,u.lanes=T,u;case M:return u=rr(13,g,c,E),u.elementType=M,u.lanes=T,u;case m:return u=rr(19,g,c,E),u.elementType=m,u.lanes=T,u;case A:return Cd(g,E,T,c);default:if(typeof u=="object"&&u!==null)switch(u.$$typeof){case v:U=10;break e;case y:U=9;break e;case _:U=11;break e;case S:U=14;break e;case w:U=16,x=null;break e}throw Error(o(130,u==null?u:typeof u,""))}return c=rr(U,g,c,E),c.elementType=u,c.type=x,c.lanes=T,c}function aa(u,c,g,x){return u=rr(7,u,x,c),u.lanes=g,u}function Cd(u,c,g,x){return u=rr(22,u,x,c),u.elementType=A,u.lanes=g,u.stateNode={},u}function B0(u,c,g){return u=rr(6,u,null,c),u.lanes=g,u}function V0(u,c,g){return c=rr(4,u.children!==null?u.children:[],u.key,c),c.lanes=g,c.stateNode={containerInfo:u.containerInfo,pendingChildren:null,implementation:u.implementation},c}function QI(u,c,g,x,E){this.tag=c,this.containerInfo=u,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Ye,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Bg(0),this.expirationTimes=Bg(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bg(0),this.identifierPrefix=x,this.onRecoverableError=E,oe&&(this.mutableSourceEagerHydrationData=null)}function mM(u,c,g,x,E,T,U,q,he){return u=new QI(u,c,g,q,he),c===1?(c=1,T===!0&&(c|=8)):c=0,T=rr(3,null,null,c),u.current=T,T.stateNode=u,T.memoizedState={element:x,isDehydrated:g,cache:null,transitions:null},Jg(T),u}function gM(u){if(!u)return qn;u=u._reactInternals;e:{if(C(u)!==u||u.tag!==1)throw Error(o(170));var c=u;do{switch(c.tag){case 3:c=c.stateNode.context;break e;case 1:if(Hn(c.type)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break e}}c=c.return}while(c!==null);throw Error(o(171))}if(u.tag===1){var g=u.type;if(Hn(g))return BS(u,g,c)}return c}function vM(u){var c=u._reactInternals;if(c===void 0)throw typeof u.render=="function"?Error(o(188)):(u=Object.keys(u).join(","),Error(o(268,u)));return u=J(c),u===null?null:u.stateNode}function yM(u,c){if(u=u.memoizedState,u!==null&&u.dehydrated!==null){var g=u.retryLane;u.retryLane=g!==0&&g=Le&&T>=at&&E<=Ve&&U<=tt){u.splice(c,1);break}else if(x!==Le||g.width!==he.width||ttU){if(!(T!==at||g.height!==he.height||VeE)){Le>x&&(he.width+=Le-x,he.x=x),VeT&&(he.height+=at-T,he.y=T),ttg&&(g=U)),U ")+` + +No matching component was found for: + `)+u.join(" > ")}return null},t.getPublicRootInstance=function(u){if(u=u.current,!u.child)return null;switch(u.child.tag){case 5:return se(u.child.stateNode);default:return u.child.stateNode}},t.injectIntoDevTools=function(u){if(u={bundleType:u.bundleType,version:u.version,rendererPackageName:u.rendererPackageName,rendererConfig:u.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:$I,findFiberByHostInstance:u.findFiberByHostInstance||eD,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")u=!1;else{var c=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(c.isDisabled||!c.supportsFiber)u=!0;else{try{Bh=c.inject(u),Fr=c}catch{}u=!!c.checkDCE}}return u},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(u,c,g,x){if(!nt)throw Error(o(363));u=C0(u,c);var E=Re(u,g,x).disconnect;return{disconnect:function(){E()}}},t.registerMutableSourceForHydration=function(u,c){var g=c._getVersion;g=g(c._source),u.mutableSourceEagerHydrationData==null?u.mutableSourceEagerHydrationData=[c,g]:u.mutableSourceEagerHydrationData.push(c,g)},t.runWithPriority=function(u,c){var g=Ct;try{return Ct=u,c()}finally{Ct=g}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(u,c,g,x){var E=c.current,T=ui(),U=Qs(E);return g=gM(g),c.context===null?c.context=g:c.pendingContext=g,c=fs(T,U),c.payload={element:u},x=x===void 0?null:x,x!==null&&(c.callback=x),Zs(E,c),u=ir(E,U,T),u!==null&&jh(u,E,U),U},t};WR.exports=z9;var F9=WR.exports;const B9=E_(F9);var GR={exports:{}},jR={};/** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */(function(n){function e(D,V){var B=D.length;D.push(V);e:for(;0>>1,$=D[te];if(0>>1;ter(Ee,B))we<$&&0>r(Q,Ee)?(D[te]=Q,D[we]=B,te=we):(D[te]=Ee,D[ue]=B,te=ue);else if(we<$&&0>r(Q,B))D[te]=Q,D[we]=B,te=we;else break e}}return V}function r(D,V){var B=D.sortIndex-V.sortIndex;return B!==0?B:D.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();n.unstable_now=function(){return o.now()-a}}var l=[],f=[],h=1,d=null,p=3,v=!1,y=!1,_=!1,M=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(D){for(var V=t(f);V!==null;){if(V.callback===null)i(f);else if(V.startTime<=D)i(f),V.sortIndex=V.expirationTime,e(l,V);else break;V=t(f)}}function A(D){if(_=!1,w(D),!y)if(t(l)!==null)y=!0,se(b);else{var V=t(f);V!==null&&ae(A,V.startTime-D)}}function b(D,V){y=!1,_&&(_=!1,m(L),L=-1),v=!0;var B=p;try{for(w(V),d=t(l);d!==null&&(!(d.expirationTime>V)||D&&!W());){var te=d.callback;if(typeof te=="function"){d.callback=null,p=d.priorityLevel;var $=te(d.expirationTime<=V);V=n.unstable_now(),typeof $=="function"?d.callback=$:d===t(l)&&i(l),w(V)}else i(l);d=t(l)}if(d!==null)var ee=!0;else{var ue=t(f);ue!==null&&ae(A,ue.startTime-V),ee=!1}return ee}finally{d=null,p=B,v=!1}}var P=!1,I=null,L=-1,C=5,R=-1;function W(){return!(n.unstable_now()-RD||125te?(D.sortIndex=B,e(f,D),t(l)===null&&D===t(f)&&(_?(m(L),L=-1):_=!0,ae(A,B-te))):(D.sortIndex=$,e(l,D),y||v||(y=!0,se(b))),D},n.unstable_shouldYield=W,n.unstable_wrapCallback=function(D){var V=p;return function(){var B=p;p=V;try{return D.apply(this,arguments)}finally{p=B}}}})(jR);GR.exports=jR;var MT=GR.exports;function XR(n,e,t=(i,r)=>i===r){if(n===e)return!0;if(!n||!e)return!1;const i=n.length;if(e.length!==i)return!1;for(let r=0;rr.response=s).then(()=>{i.lifespan&&i.lifespan>0&&setTimeout(()=>{const s=bs.indexOf(r);s!==-1&&bs.splice(s,1)},i.lifespan)}).catch(s=>r.error=s)};if(bs.push(r),!t)throw r.promise}const V9=(n,e,t)=>YR(n,e,!1,t),H9=(n,e,t)=>void YR(n,e,!0,t),W9=n=>{if(n===void 0||n.length===0)bs.splice(0,bs.length);else{const e=bs.find(t=>XR(n,t.keys,t.equal));if(e){const t=bs.indexOf(e);t!==-1&&bs.splice(t,1)}}};var AT,ET;const qR=n=>n&&n.isOrthographicCamera,G9=n=>n&&n.hasOwnProperty("current"),Lh=typeof window<"u"&&((AT=window.document)!=null&&AT.createElement||((ET=window.navigator)==null?void 0:ET.product)==="ReactNative")?H.useLayoutEffect:H.useEffect;function ZR(n){const e=H.useRef(n);return Lh(()=>void(e.current=n),[n]),e}function j9({set:n}){return Lh(()=>(n(new Promise(()=>null)),()=>n(!1)),[n]),null}class JR extends H.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}JR.getDerivedStateFromError=()=>({error:!0});const KR="__default",X9=n=>n&&!!n.memoized&&!!n.changes;function QR(n){const e=typeof window<"u"?window.devicePixelRatio:1;return Array.isArray(n)?Math.min(Math.max(n[0],e),n[1]):n}const zc=n=>{var e;return(e=n.__r3f)==null?void 0:e.root.getState()},cn={obj:n=>n===Object(n)&&!cn.arr(n)&&typeof n!="function",fun:n=>typeof n=="function",str:n=>typeof n=="string",num:n=>typeof n=="number",boo:n=>typeof n=="boolean",und:n=>n===void 0,arr:n=>Array.isArray(n),equ(n,e,{arrays:t="shallow",objects:i="reference",strict:r=!0}={}){if(typeof n!=typeof e||!!n!=!!e)return!1;if(cn.str(n)||cn.num(n))return n===e;const s=cn.obj(n);if(s&&i==="reference")return n===e;const o=cn.arr(n);if(o&&t==="reference")return n===e;if((o||s)&&n===e)return!0;let a;for(a in n)if(!(a in e))return!1;for(a in r?e:n)if(n[a]!==e[a])return!1;if(cn.und(a)){if(o&&n.length===0&&e.length===0||s&&Object.keys(n).length===0&&Object.keys(e).length===0)return!0;if(n!==e)return!1}return!0}};function Y9(n){const e={nodes:{},materials:{}};return n&&n.traverse(t=>{t.name&&(e.nodes[t.name]=t),t.material&&!e.materials[t.material.name]&&(e.materials[t.material.name]=t.material)}),e}function q9(n){n.dispose&&n.type!=="Scene"&&n.dispose();for(const e in n)e.dispose==null||e.dispose(),delete n[e]}function Gl(n,e){const t=n;return(e!=null&&e.primitive||!t.__r3f)&&(t.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e}),n}function __(n,e){let t=n;if(e.includes("-")){const i=e.split("-"),r=i.pop();return t=i.reduce((s,o)=>s[o],n),{target:t,key:r}}else return{target:t,key:e}}const bT=/-\d+$/;function cy(n,e,t){if(cn.str(t)){if(bT.test(t)){const s=t.replace(bT,""),{target:o,key:a}=__(n,s);Array.isArray(o[a])||(o[a]=[])}const{target:i,key:r}=__(n,t);e.__r3f.previousAttach=i[r],i[r]=e}else e.__r3f.previousAttach=t(n,e)}function TT(n,e,t){var i,r;if(cn.str(t)){const{target:s,key:o}=__(n,t),a=e.__r3f.previousAttach;a===void 0?delete s[o]:s[o]=a}else(i=e.__r3f)==null||i.previousAttach==null||i.previousAttach(n,e);(r=e.__r3f)==null||delete r.previousAttach}function $R(n,{children:e,key:t,ref:i,...r},{children:s,key:o,ref:a,...l}={},f=!1){var h;const d=(h=n==null?void 0:n.__r3f)!=null?h:{},p=Object.entries(r),v=[];if(f){const _=Object.keys(l);for(let M=0;M<_.length;M++)r.hasOwnProperty(_[M])||p.unshift([_[M],KR+"remove"])}p.forEach(([_,M])=>{var m;if((m=n.__r3f)!=null&&m.primitive&&_==="object"||cn.equ(M,l[_]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(_))return v.push([_,M,!0,[]]);let S=[];_.includes("-")&&(S=_.split("-")),v.push([_,M,!1,S]);for(const w in r){const A=r[w];w.startsWith(`${_}-`)&&v.push([w,A,!1,w.split("-")])}});const y={...r};return d.memoizedProps&&d.memoizedProps.args&&(y.args=d.memoizedProps.args),d.memoizedProps&&d.memoizedProps.attach&&(y.attach=d.memoizedProps.attach),{memoized:y,changes:v}}function fy(n,e){var t,i,r;const s=(t=n.__r3f)!=null?t:{},o=s.root,a=(i=o==null||o.getState==null?void 0:o.getState())!=null?i:{},{memoized:l,changes:f}=X9(e)?e:$R(n,e),h=s.eventCount;n.__r3f&&(n.__r3f.memoizedProps=l);for(let v=0;vA[b],n),!(w&&w.set))){const[A,...b]=m.reverse();S=b.reverse().reduce((P,I)=>P[I],n),y=A}if(_===KR+"remove")if(w&&w.constructor){var d;_=new w.constructor(...(d=l.args)!=null?d:[])}else if(S.constructor){var p;const A=new S.constructor(...(p=S.__r3f.memoizedProps.args)!=null?p:[]);_=A[w],A.dispose&&A.dispose()}else _=0;if(M)_?s.handlers[y]=_:delete s.handlers[y],s.eventCount=Object.keys(s.handlers).length;else if(w&&w.set&&(w.copy||w instanceof Fa)){if(Array.isArray(_))w.fromArray?w.fromArray(_):w.set(..._);else if(w.copy&&_&&_.constructor&&w.constructor.name===_.constructor.name)w.copy(_);else if(_!==void 0){const A=w instanceof Fe;!A&&w.setScalar?w.setScalar(_):w instanceof Fa&&_ instanceof Fa?w.mask=_.mask:w.set(_),!("ColorManagement"in jm)&&!a.linear&&A&&w.convertSRGBToLinear()}}else S[y]=_,!a.linear&&S[y]instanceof hn&&(S[y].encoding=zt);jl(n)}if(s.parent&&a.internal&&n.raycast&&h!==s.eventCount){const v=a.internal.interaction.indexOf(n);v>-1&&a.internal.interaction.splice(v,1),s.eventCount&&a.internal.interaction.push(n)}return f.length&&(r=n.__r3f)!=null&&r.parent&&S_(n),n}function jl(n){var e,t;const i=(e=n.__r3f)==null||(t=e.root)==null||t.getState==null?void 0:t.getState();i&&i.internal.frames===0&&i.invalidate()}function S_(n){n.onUpdate==null||n.onUpdate(n)}function Z9(n,e){n.manual||(qR(n)?(n.left=e.width/-2,n.right=e.width/2,n.top=e.height/2,n.bottom=e.height/-2):n.aspect=e.width/e.height,n.updateProjectionMatrix(),n.updateMatrixWorld())}function J9(n,e,t){const i=t.pop(),r=t.reduce((s,o)=>s[o],n);return r[i]=e}function zp(n){return(n.eventObject||n.object).uuid+"/"+n.index+n.instanceId}function K9(){var n;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return du.DefaultEventPriority;switch((n=e.event)==null?void 0:n.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return du.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return du.ContinuousEventPriority;default:return du.DefaultEventPriority}}function eI(n,e,t,i){const r=t.get(e);r&&(t.delete(e),t.size===0&&(n.delete(i),r.target.releasePointerCapture(i)))}function Q9(n,e){const{internal:t}=n.getState();t.interaction=t.interaction.filter(i=>i!==e),t.initialHits=t.initialHits.filter(i=>i!==e),t.hovered.forEach((i,r)=>{(i.eventObject===e||i.object===e)&&t.hovered.delete(r)}),t.capturedMap.forEach((i,r)=>{eI(t.capturedMap,e,i,r)})}function $9(n){function e(l){const{internal:f}=n.getState(),h=l.offsetX-f.initialClick[0],d=l.offsetY-f.initialClick[1];return Math.round(Math.sqrt(h*h+d*d))}function t(l){return l.filter(f=>["Move","Over","Enter","Out","Leave"].some(h=>{var d;return(d=f.__r3f)==null?void 0:d.handlers["onPointer"+h]}))}function i(l,f){const h=n.getState(),d=new Set,p=[],v=f?f(h.internal.interaction):h.internal.interaction;for(let m=0;m{const w=zc(m.object),A=zc(S.object);return!w||!A?m.distance-S.distance:A.events.priority-w.events.priority||m.distance-S.distance}).filter(m=>{const S=zp(m);return d.has(S)?!1:(d.add(S),!0)});h.events.filter&&(_=h.events.filter(_,h));for(const m of _){let S=m.object;for(;S;){var M;(M=S.__r3f)!=null&&M.eventCount&&p.push({...m,eventObject:S}),S=S.parent}}if("pointerId"in l&&h.internal.capturedMap.has(l.pointerId))for(let m of h.internal.capturedMap.get(l.pointerId).values())d.has(zp(m.intersection))||p.push(m.intersection);return p}function r(l,f,h,d){const p=n.getState();if(l.length){const v={stopped:!1};for(const y of l){const _=zc(y.object)||p,{raycaster:M,pointer:m,camera:S,internal:w}=_,A=new k(m.x,m.y,0).unproject(S),b=R=>{var W,J;return(W=(J=w.capturedMap.get(R))==null?void 0:J.has(y.eventObject))!=null?W:!1},P=R=>{const W={intersection:y,target:f.target};w.capturedMap.has(R)?w.capturedMap.get(R).set(y.eventObject,W):w.capturedMap.set(R,new Map([[y.eventObject,W]])),f.target.setPointerCapture(R)},I=R=>{const W=w.capturedMap.get(R);W&&eI(w.capturedMap,y.eventObject,W,R)};let L={};for(let R in f){let W=f[R];typeof W!="function"&&(L[R]=W)}let C={...y,...L,pointer:m,intersections:l,stopped:v.stopped,delta:h,unprojectedPoint:A,ray:M.ray,camera:S,stopPropagation(){const R="pointerId"in f&&w.capturedMap.get(f.pointerId);if((!R||R.has(y.eventObject))&&(C.stopped=v.stopped=!0,w.hovered.size&&Array.from(w.hovered.values()).find(W=>W.eventObject===y.eventObject))){const W=l.slice(0,l.indexOf(y));s([...W,y])}},target:{hasPointerCapture:b,setPointerCapture:P,releasePointerCapture:I},currentTarget:{hasPointerCapture:b,setPointerCapture:P,releasePointerCapture:I},nativeEvent:f};if(d(C),v.stopped===!0)break}}return l}function s(l){const{internal:f}=n.getState();for(const h of f.hovered.values())if(!l.length||!l.find(d=>d.object===h.object&&d.index===h.index&&d.instanceId===h.instanceId)){const p=h.eventObject.__r3f,v=p==null?void 0:p.handlers;if(f.hovered.delete(zp(h)),p!=null&&p.eventCount){const y={...h,intersections:l};v.onPointerOut==null||v.onPointerOut(y),v.onPointerLeave==null||v.onPointerLeave(y)}}}function o(l,f){for(let h=0;hs([]);case"onLostPointerCapture":return f=>{const{internal:h}=n.getState();"pointerId"in f&&h.capturedMap.has(f.pointerId)&&(h.capturedMap.delete(f.pointerId),s([]))}}return function(h){const{onPointerMissed:d,internal:p}=n.getState();p.lastEvent.current=h;const v=l==="onPointerMove",y=l==="onClick"||l==="onContextMenu"||l==="onDoubleClick",M=i(h,v?t:void 0),m=y?e(h):0;l==="onPointerDown"&&(p.initialClick=[h.offsetX,h.offsetY],p.initialHits=M.map(w=>w.eventObject)),y&&!M.length&&m<=2&&(o(h,p.interaction),d&&d(h)),v&&s(M);function S(w){const A=w.eventObject,b=A.__r3f,P=b==null?void 0:b.handlers;if(b!=null&&b.eventCount)if(v){if(P.onPointerOver||P.onPointerEnter||P.onPointerOut||P.onPointerLeave){const I=zp(w),L=p.hovered.get(I);L?L.stopped&&w.stopPropagation():(p.hovered.set(I,w),P.onPointerOver==null||P.onPointerOver(w),P.onPointerEnter==null||P.onPointerEnter(w))}P.onPointerMove==null||P.onPointerMove(w)}else{const I=P[l];I?(!y||p.initialHits.includes(A))&&(o(h,p.interaction.filter(L=>!p.initialHits.includes(L))),I(w)):y&&p.initialHits.includes(A)&&o(h,p.interaction.filter(L=>!p.initialHits.includes(L)))}}r(M,h,m,S)}}return{handlePointer:a}}let w_={},e7=n=>void(w_={...w_,...n});function t7(n,e){function t(h,{args:d=[],attach:p,...v},y){let _=`${h[0].toUpperCase()}${h.slice(1)}`,M;if(h==="primitive"){if(v.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const m=v.object;M=Gl(m,{type:h,root:y,attach:p,primitive:!0})}else{const m=w_[_];if(!m)throw new Error(`R3F: ${_} 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(!Array.isArray(d))throw new Error("R3F: The args prop must be an array!");M=Gl(new m(...d),{type:h,root:y,attach:p,memoizedProps:{args:d}})}return M.__r3f.attach===void 0&&(M instanceof dt?M.__r3f.attach="geometry":M instanceof Yn&&(M.__r3f.attach="material")),_!=="inject"&&fy(M,v),M}function i(h,d){let p=!1;if(d){var v,y;(v=d.__r3f)!=null&&v.attach?cy(h,d,d.__r3f.attach):d.isObject3D&&h.isObject3D&&(h.add(d),p=!0),p||(y=h.__r3f)==null||y.objects.push(d),d.__r3f||Gl(d,{}),d.__r3f.parent=h,S_(d),jl(d)}}function r(h,d,p){let v=!1;if(d){var y,_;if((y=d.__r3f)!=null&&y.attach)cy(h,d,d.__r3f.attach);else if(d.isObject3D&&h.isObject3D){d.parent=h,d.dispatchEvent({type:"added"});const M=h.children.filter(S=>S!==d),m=M.indexOf(p);h.children=[...M.slice(0,m),d,...M.slice(m)],v=!0}v||(_=h.__r3f)==null||_.objects.push(d),d.__r3f||Gl(d,{}),d.__r3f.parent=h,S_(d),jl(d)}}function s(h,d,p=!1){h&&[...h].forEach(v=>o(d,v,p))}function o(h,d,p){if(d){var v,y,_;if(d.__r3f&&(d.__r3f.parent=null),(v=h.__r3f)!=null&&v.objects&&(h.__r3f.objects=h.__r3f.objects.filter(A=>A!==d)),(y=d.__r3f)!=null&&y.attach)TT(h,d,d.__r3f.attach);else if(d.isObject3D&&h.isObject3D){var M;h.remove(d),(M=d.__r3f)!=null&&M.root&&Q9(d.__r3f.root,d)}const S=(_=d.__r3f)==null?void 0:_.primitive,w=p===void 0?d.dispose!==null&&!S:p;if(!S){var m;s((m=d.__r3f)==null?void 0:m.objects,d,w),s(d.children,d,w)}d.__r3f&&(delete d.__r3f.root,delete d.__r3f.objects,delete d.__r3f.handlers,delete d.__r3f.memoizedProps,S||delete d.__r3f),w&&d.dispose&&d.type!=="Scene"&&MT.unstable_scheduleCallback(MT.unstable_IdlePriority,()=>{try{d.dispose()}catch{}}),jl(h)}}function a(h,d,p,v){var y;const _=(y=h.__r3f)==null?void 0:y.parent;if(!_)return;const M=t(d,p,h.__r3f.root);if(h.children){for(const m of h.children)m.__r3f&&i(M,m);h.children=h.children.filter(m=>!m.__r3f)}h.__r3f.objects.forEach(m=>i(M,m)),h.__r3f.objects=[],o(_,h),i(_,M),M.raycast&&M.__r3f.eventCount&&M.__r3f.root.getState().internal.interaction.push(M),[v,v.alternate].forEach(m=>{m!==null&&(m.stateNode=M,m.ref&&(typeof m.ref=="function"?m.ref(M):m.ref.current=M))})}const l=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:B9({createInstance:t,removeChild:o,appendChild:i,appendInitialChild:i,insertBefore:r,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(h,d)=>{if(!d)return;const p=h.getState().scene;p.__r3f&&(p.__r3f.root=h,i(p,d))},removeChildFromContainer:(h,d)=>{d&&o(h.getState().scene,d)},insertInContainerBefore:(h,d,p)=>{if(!d||!p)return;const v=h.getState().scene;v.__r3f&&r(v,d,p)},getRootHostContext:()=>null,getChildHostContext:h=>h,finalizeInitialChildren(h){var d;return!!((d=h==null?void 0:h.__r3f)!=null?d:{}).handlers},prepareUpdate(h,d,p,v){if(h.__r3f.primitive&&v.object&&v.object!==h)return[!0];{const{args:y=[],children:_,...M}=v,{args:m=[],children:S,...w}=p;if(!Array.isArray(y))throw new Error("R3F: the args prop must be an array!");if(y.some((b,P)=>b!==m[P]))return[!0];const A=$R(h,M,w,!0);return A.changes.length?[!1,A]:null}},commitUpdate(h,[d,p],v,y,_,M){d?a(h,v,_,M):fy(h,p)},commitMount(h,d,p,v){var y;const _=(y=h.__r3f)!=null?y:{};h.raycast&&_.handlers&&_.eventCount&&h.__r3f.root.getState().internal.interaction.push(h)},getPublicInstance:h=>h,prepareForCommit:()=>null,preparePortalMount:h=>Gl(h.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(h){var d;const{attach:p,parent:v}=(d=h.__r3f)!=null?d:{};p&&v&&TT(v,h,p),h.isObject3D&&(h.visible=!1),jl(h)},unhideInstance(h,d){var p;const{attach:v,parent:y}=(p=h.__r3f)!=null?p:{};v&&y&&cy(y,h,v),(h.isObject3D&&d.visible==null||d.visible)&&(h.visible=!0),jl(h)},createTextInstance:l,hideTextInstance:l,unhideTextInstance:l,getCurrentEventPriority:()=>e?e():du.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&cn.fun(performance.now)?performance.now:cn.fun(Date.now)?Date.now:()=>0,scheduleTimeout:cn.fun(setTimeout)?setTimeout:void 0,cancelTimeout:cn.fun(clearTimeout)?clearTimeout:void 0}),applyProps:fy}}const tI=n=>!!(n!=null&&n.render),nI=H.createContext(null),n7=(n,e)=>{const t=HR((a,l)=>{const f=new k,h=new k,d=new k;function p(m=l().camera,S=h,w=l().size){const{width:A,height:b,top:P,left:I}=w,L=A/b;S instanceof k?d.copy(S):d.set(...S);const C=m.getWorldPosition(f).distanceTo(d);if(qR(m))return{width:A/m.zoom,height:b/m.zoom,top:P,left:I,factor:1,distance:C,aspect:L};{const R=m.fov*Math.PI/180,W=2*Math.tan(R/2)*C,J=W*(A/b);return{width:J,height:W,top:P,left:I,factor:A/J,distance:C,aspect:L}}}let v;const y=m=>a(S=>({performance:{...S.performance,current:m}})),_=new ye;return{set:a,get:l,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,invalidate:(m=1)=>n(l(),m),advance:(m,S)=>e(m,S,l()),legacy:!1,linear:!1,flat:!1,scene:Gl(new hS),controls:null,clock:new RS,pointer:_,mouse:_,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const m=l();v&&clearTimeout(v),m.performance.current!==m.performance.min&&y(m.performance.min),v=setTimeout(()=>y(l().performance.max),m.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:p},setEvents:m=>a(S=>({...S,events:{...S.events,...m}})),setSize:(m,S,w,A,b)=>{const P=l().camera,I={width:m,height:S,top:A||0,left:b||0,updateStyle:w};a(L=>({size:I,viewport:{...L.viewport,...p(P,h,I)}}))},setDpr:m=>a(S=>{const w=QR(m);return{viewport:{...S.viewport,dpr:w,initialDpr:S.viewport.initialDpr||w}}}),setFrameloop:(m="always")=>{const S=l().clock;S.stop(),S.elapsedTime=0,m!=="never"&&(S.start(),S.elapsedTime=0),a(()=>({frameloop:m}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:H.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(m,S,w)=>{const A=l().internal;return A.priority=A.priority+(S>0?1:0),A.subscribers.push({ref:m,priority:S,store:w}),A.subscribers=A.subscribers.sort((b,P)=>b.priority-P.priority),()=>{const b=l().internal;b!=null&&b.subscribers&&(b.priority=b.priority-(S>0?1:0),b.subscribers=b.subscribers.filter(P=>P.ref!==m))}}}}}),i=t.getState();let r=i.size,s=i.viewport.dpr,o=i.camera;return t.subscribe(()=>{const{camera:a,size:l,viewport:f,gl:h,set:d}=t.getState();(l!==r||f.dpr!==s)&&(r=l,s=f.dpr,Z9(a,l),h.setPixelRatio(f.dpr),h.setSize(l.width,l.height,l.updateStyle)),a!==o&&(o=a,d(p=>({viewport:{...p.viewport,...p.viewport.getCurrentViewport(a)}})))}),t.subscribe(a=>n(a)),t};let Fp,i7=new Set,r7=new Set,s7=new Set;function hy(n,e){if(n.size)for(const{callback:t}of n.values())t(e)}function Fc(n,e){switch(n){case"before":return hy(i7,e);case"after":return hy(r7,e);case"tail":return hy(s7,e)}}let dy,py;function my(n,e,t){let i=e.clock.getDelta();for(e.frameloop==="never"&&typeof n=="number"&&(i=n-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=n),dy=e.internal.subscribers,Fp=0;Fp0)&&!((f=r.gl.xr)!=null&&f.isPresenting)&&(t+=my(l,r))}if(Fc("after",l),t===0)return Fc("tail",l),e=!1,cancelAnimationFrame(i)}function o(l,f=1){var h;if(!l)return n.forEach(d=>o(d.store.getState()),f);(h=l.gl.xr)!=null&&h.isPresenting||!l.internal.active||l.frameloop==="never"||(l.internal.frames=Math.min(60,l.internal.frames+f),e||(e=!0,requestAnimationFrame(s)))}function a(l,f=!0,h,d){if(f&&Fc("before",l),h)my(l,h,d);else for(const p of n.values())my(l,p.store.getState());f&&Fc("after",l)}return{loop:s,invalidate:o,advance:a}}function iI(){const n=H.useContext(nI);if(!n)throw new Error("R3F: Hooks can only be used within the Canvas component!");return n}function Bi(n=t=>t,e){return iI()(n,e)}function kS(n,e=0){const t=iI(),i=t.getState().internal.subscribe,r=ZR(n);return Lh(()=>i(r,e,t),[e,i,t]),null}function rI(n,e){return function(t,...i){const r=new t;return n&&n(r),Promise.all(i.map(s=>new Promise((o,a)=>r.load(s,l=>{l.scene&&Object.assign(l,Y9(l.scene)),o(l)},e,l=>a(new Error(`Could not load ${s}: ${l.message})`))))))}}function Rh(n,e,t,i){const r=Array.isArray(e)?e:[e],s=V9(rI(t,i),[n,...r],{equal:cn.equ});return Array.isArray(e)?s:s[0]}Rh.preload=function(n,e,t){const i=Array.isArray(e)?e:[e];return H9(rI(t),[n,...i])};Rh.clear=function(n,e){const t=Array.isArray(e)?e:[e];return W9([n,...t])};const Ou=new Map,{invalidate:CT,advance:PT}=o7(Ou),{reconciler:Xm,applyProps:wo}=t7(Ou,K9),Wl={objects:"shallow",strict:!1},a7=(n,e)=>{const t=typeof n=="function"?n(e):n;return tI(t)?t:new fS({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...n})};function l7(n){return n instanceof HTMLCanvasElement}function u7(n,e){if(e)return e;if(l7(n)&&n.parentElement){const{width:t,height:i,top:r,left:s}=n.parentElement.getBoundingClientRect();return{width:t,height:i,top:r,left:s}}return{width:0,height:0,top:0,left:0}}function c7(n){const e=Ou.get(n),t=e==null?void 0:e.fiber,i=e==null?void 0:e.store;e&&console.warn("R3F.createRoot should only be called once!");const r=typeof reportError=="function"?reportError:console.error,s=i||n7(CT,PT),o=t||Xm.createContainer(s,du.ConcurrentRoot,null,!1,null,"",r,null);e||Ou.set(n,{fiber:o,store:s});let a,l=!1;return{configure(f={}){let{gl:h,size:d,events:p,onCreated:v,shadows:y=!1,linear:_=!1,flat:M=!1,legacy:m=!1,orthographic:S=!1,frameloop:w="always",dpr:A=[1,2],performance:b,raycaster:P,camera:I,onPointerMissed:L}=f,C=s.getState(),R=C.gl;C.gl||C.set({gl:R=a7(h,n)});let W=C.raycaster;W||C.set({raycaster:W=new FR});const{params:J,...j}=P||{};if(cn.equ(j,W,Wl)||wo(W,{...j}),cn.equ(J,W.params,Wl)||wo(W,{params:{...W.params,...J}}),!C.camera){const ae=I instanceof mh,D=ae?I:S?new ns(0,0,0,0,.1,1e3):new Wt(75,0,.1,1e3);ae||(D.position.z=5,I&&wo(D,I),I!=null&&I.rotation||D.lookAt(0,0,0)),C.set({camera:D})}if(!C.xr){const ae=(B,te)=>{const $=s.getState();$.frameloop!=="never"&&PT(B,!0,$,te)},D=()=>{const B=s.getState();B.gl.xr.enabled=B.gl.xr.isPresenting,B.gl.xr.setAnimationLoop(B.gl.xr.isPresenting?ae:null),B.gl.xr.isPresenting||CT(B)},V={connect(){const B=s.getState().gl;B.xr.addEventListener("sessionstart",D),B.xr.addEventListener("sessionend",D)},disconnect(){const B=s.getState().gl;B.xr.removeEventListener("sessionstart",D),B.xr.removeEventListener("sessionend",D)}};R.xr&&V.connect(),C.set({xr:V})}if(R.shadowMap){const ae=cn.boo(y);if(ae&&R.shadowMap.enabled!==y||!cn.equ(y,R.shadowMap,Wl)){const D=R.shadowMap.enabled;R.shadowMap.enabled=!!y,ae?R.shadowMap.type=Y1:Object.assign(R.shadowMap,y),D!==R.shadowMap.enabled&&(R.shadowMap.needsUpdate=!0)}}"ColorManagement"in jm&&J9(jm,m,["ColorManagement","legacyMode"]);const X=_?Vs:zt,Z=M?Nr:J1;R.outputEncoding!==X&&(R.outputEncoding=X),R.toneMapping!==Z&&(R.toneMapping=Z),C.legacy!==m&&C.set(()=>({legacy:m})),C.linear!==_&&C.set(()=>({linear:_})),C.flat!==M&&C.set(()=>({flat:M})),h&&!cn.fun(h)&&!tI(h)&&!cn.equ(h,R,Wl)&&wo(R,h),p&&!C.events.handlers&&C.set({events:p(s)}),A&&C.viewport.dpr!==QR(A)&&C.setDpr(A);const se=u7(n,d);return cn.equ(se,C.size,Wl)||C.setSize(se.width,se.height,se.updateStyle,se.top,se.left),C.frameloop!==w&&C.setFrameloop(w),C.onPointerMissed||C.set({onPointerMissed:L}),b&&!cn.equ(b,C.performance,Wl)&&C.set(ae=>({performance:{...ae.performance,...b}})),a=v,l=!0,this},render(f){return l||this.configure(),Xm.updateContainer(H.createElement(f7,{store:s,children:f,onCreated:a,rootElement:n}),o,null,()=>{}),s},unmount(){sI(n)}}}function f7({store:n,children:e,onCreated:t,rootElement:i}){return Lh(()=>{const r=n.getState();r.set(s=>({internal:{...s.internal,active:!0}})),t&&t(r),n.getState().events.connected||r.events.connect==null||r.events.connect(i)},[]),H.createElement(nI.Provider,{value:n},e)}function sI(n,e){const t=Ou.get(n),i=t==null?void 0:t.fiber;if(i){const r=t==null?void 0:t.store.getState();r&&(r.internal.active=!1),Xm.updateContainer(null,i,null,()=>{r&&setTimeout(()=>{try{var s,o,a,l;r.events.disconnect==null||r.events.disconnect(),(s=r.gl)==null||(o=s.renderLists)==null||o.dispose==null||o.dispose(),(a=r.gl)==null||a.forceContextLoss==null||a.forceContextLoss(),(l=r.gl)!=null&&l.xr&&r.xr.disconnect(),q9(r),Ou.delete(n),e&&e(n)}catch{}},500)})}}Xm.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:H.version});function Ka(){return Ka=Object.assign?Object.assign.bind():function(n){for(var e=1;e=0?i=setTimeout(l,e-h):(i=null,t||(a=n.apply(s,r),s=r=null))}var f=function(){s=this,r=arguments,o=Date.now();var h=t&&!i;return i||(i=setTimeout(l,e)),h&&(a=n.apply(s,r),s=r=null),a};return f.clear=function(){i&&(clearTimeout(i),i=null)},f.flush=function(){i&&(a=n.apply(s,r),s=r=null,clearTimeout(i),i=null)},f}M_.debounce=M_;var h7=M_;const LT=E_(h7);function d7(n){let{debounce:e,scroll:t,polyfill:i,offsetSize:r}=n===void 0?{debounce:0,scroll:!1,offsetSize:!1}:n;const s=i||(typeof window>"u"?class{}:window.ResizeObserver);if(!s)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[o,a]=H.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=H.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o}),f=e?typeof e=="number"?e:e.scroll:null,h=e?typeof e=="number"?e:e.resize:null,d=H.useRef(!1);H.useEffect(()=>(d.current=!0,()=>void(d.current=!1)));const[p,v,y]=H.useMemo(()=>{const S=()=>{if(!l.current.element)return;const{left:w,top:A,width:b,height:P,bottom:I,right:L,x:C,y:R}=l.current.element.getBoundingClientRect(),W={left:w,top:A,width:b,height:P,bottom:I,right:L,x:C,y:R};l.current.element instanceof HTMLElement&&r&&(W.height=l.current.element.offsetHeight,W.width=l.current.element.offsetWidth),Object.freeze(W),d.current&&!v7(l.current.lastBounds,W)&&a(l.current.lastBounds=W)};return[S,h?LT(S,h):S,f?LT(S,f):S]},[a,r,f,h]);function _(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(S=>S.removeEventListener("scroll",y,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function M(){l.current.element&&(l.current.resizeObserver=new s(y),l.current.resizeObserver.observe(l.current.element),t&&l.current.scrollContainers&&l.current.scrollContainers.forEach(S=>S.addEventListener("scroll",y,{capture:!0,passive:!0})))}const m=S=>{!S||S===l.current.element||(_(),l.current.element=S,l.current.scrollContainers=oI(S),M())};return m7(y,!!t),p7(v),H.useEffect(()=>{_(),M()},[t,y,v]),H.useEffect(()=>_,[]),[m,o,p]}function p7(n){H.useEffect(()=>{const e=n;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[n])}function m7(n,e){H.useEffect(()=>{if(e){const t=n;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",t,!0)}},[n,e])}function oI(n){const e=[];if(!n||n===document.body)return e;const{overflow:t,overflowX:i,overflowY:r}=window.getComputedStyle(n);return[t,i,r].some(s=>s==="auto"||s==="scroll")&&e.push(n),[...e,...oI(n.parentElement)]}const g7=["x","y","top","bottom","left","right","width","height"],v7=(n,e)=>g7.every(t=>n[t]===e[t]);var y7=Object.defineProperty,x7=Object.defineProperties,_7=Object.getOwnPropertyDescriptors,RT=Object.getOwnPropertySymbols,S7=Object.prototype.hasOwnProperty,w7=Object.prototype.propertyIsEnumerable,IT=(n,e,t)=>e in n?y7(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,DT=(n,e)=>{for(var t in e||(e={}))S7.call(e,t)&&IT(n,t,e[t]);if(RT)for(var t of RT(e))w7.call(e,t)&&IT(n,t,e[t]);return n},M7=(n,e)=>x7(n,_7(e));function aI(n,e,t){if(!n)return;if(t(n)===!0)return n;let i=e?n.return:n.child;for(;i;){const r=aI(i,e,t);if(r)return r;i=e?null:i.sibling}}function lI(n){try{return Object.defineProperties(n,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return n}}const OS=lI(H.createContext(null));class uI extends H.Component{render(){return H.createElement(OS.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:NT,ReactCurrentDispatcher:kT}=H.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function A7(){const n=H.useContext(OS);if(n===null)throw new Error("its-fine: useFiber must be called within a !");const e=H.useId();return H.useMemo(()=>{var i;return(i=NT==null?void 0:NT.current)!=null?i:aI(n,!1,r=>{let s=r.memoizedState;for(;s;){if(s.memoizedState===e)return!0;s=s.next}})},[n,e])}function E7(){var n,e;const t=A7(),[i]=H.useState(()=>new Map);i.clear();let r=t;for(;r;){const s=(n=r.type)==null?void 0:n._context;s&&s!==OS&&!i.has(s)&&i.set(s,(e=kT==null?void 0:kT.current)==null?void 0:e.readContext(lI(s))),r=r.return}return i}function b7(){const n=E7();return H.useMemo(()=>Array.from(n.keys()).reduce((e,t)=>i=>H.createElement(e,null,H.createElement(t.Provider,M7(DT({},i),{value:n.get(t)}))),e=>H.createElement(uI,DT({},e))),[n])}const gy={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 T7(n){const{handlePointer:e}=$9(n);return{priority:1,enabled:!0,compute(t,i,r){i.pointer.set(t.offsetX/i.size.width*2-1,-(t.offsetY/i.size.height)*2+1),i.raycaster.setFromCamera(i.pointer,i.camera)},connected:void 0,handlers:Object.keys(gy).reduce((t,i)=>({...t,[i]:e(i)}),{}),connect:t=>{var i;const{set:r,events:s}=n.getState();s.disconnect==null||s.disconnect(),r(o=>({events:{...o.events,connected:t}})),Object.entries((i=s.handlers)!=null?i:[]).forEach(([o,a])=>{const[l,f]=gy[o];t.addEventListener(l,a,{passive:f})})},disconnect:()=>{const{set:t,events:i}=n.getState();if(i.connected){var r;Object.entries((r=i.handlers)!=null?r:[]).forEach(([s,o])=>{if(i&&i.connected instanceof HTMLElement){const[a]=gy[s];i.connected.removeEventListener(a,o)}}),t(s=>({events:{...s.events,connected:void 0}}))}}}}const C7=H.forwardRef(function({children:e,fallback:t,resize:i,style:r,gl:s,events:o=T7,eventSource:a,eventPrefix:l,shadows:f,linear:h,flat:d,legacy:p,orthographic:v,frameloop:y,dpr:_,performance:M,raycaster:m,camera:S,onPointerMissed:w,onCreated:A,...b},P){H.useMemo(()=>e7(jm),[]);const I=b7(),[L,C]=d7({scroll:!0,debounce:{scroll:50,resize:0},...i}),R=H.useRef(null),W=H.useRef(null),[J,j]=H.useState(null);H.useImperativeHandle(P,()=>R.current);const X=ZR(w),[Z,se]=H.useState(!1),[ae,D]=H.useState(!1);if(Z)throw Z;if(ae)throw ae;const V=H.useRef(null);C.width>0&&C.height>0&&J&&(V.current||(V.current=c7(J)),V.current.configure({gl:s,events:o,shadows:f,linear:h,flat:d,legacy:p,orthographic:v,frameloop:y,dpr:_,performance:M,raycaster:m,camera:S,size:C,onPointerMissed:(...te)=>X.current==null?void 0:X.current(...te),onCreated:te=>{te.events.connect==null||te.events.connect(a?G9(a)?a.current:a:W.current),l&&te.setEvents({compute:($,ee)=>{const ue=$[l+"X"],Ee=$[l+"Y"];ee.pointer.set(ue/ee.size.width*2-1,-(Ee/ee.size.height)*2+1),ee.raycaster.setFromCamera(ee.pointer,ee.camera)}}),A==null||A(te)}}),V.current.render(H.createElement(I,null,H.createElement(JR,{set:D},H.createElement(H.Suspense,{fallback:H.createElement(j9,{set:se})},e))))),Lh(()=>{j(R.current)},[]),H.useEffect(()=>{if(J)return()=>sI(J)},[J]);const B=a?"none":"auto";return H.createElement("div",Ka({ref:W,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:B,...r}},b),H.createElement("div",{ref:L,style:{width:"100%",height:"100%"}},H.createElement("canvas",{ref:R,style:{display:"block"}},t)))}),P7=H.forwardRef(function(e,t){return H.createElement(uI,null,H.createElement(C7,Ka({},e,{ref:t})))}),Ih=new k,US=new k,L7=new k;function R7(n,e,t){const i=Ih.setFromMatrixPosition(n.matrixWorld);i.project(e);const r=t.width/2,s=t.height/2;return[i.x*r+r,-(i.y*s)+s]}function I7(n,e){const t=Ih.setFromMatrixPosition(n.matrixWorld),i=US.setFromMatrixPosition(e.matrixWorld),r=t.sub(i),s=e.getWorldDirection(L7);return r.angleTo(s)>Math.PI/2}function D7(n,e,t,i){const r=Ih.setFromMatrixPosition(n.matrixWorld),s=r.clone();s.project(e),t.setFromCamera(s,e);const o=t.intersectObjects(i,!0);if(o.length){const a=o[0].distance;return r.distanceTo(t.ray.origin)Math.abs(n)<1e-10?0:n;function cI(n,e,t=""){let i="matrix3d(";for(let r=0;r!==16;r++)i+=A_(e[r]*n.elements[r])+(r!==15?",":")");return t+i}const O7=(n=>e=>cI(e,n))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),U7=(n=>(e,t)=>cI(e,n(t),"translate(-50%,-50%)"))(n=>[1/n,1/n,1/n,1,-1/n,-1/n,-1/n,-1,1/n,1/n,1/n,1,1,1,1,1]);function z7(n){return n&&typeof n=="object"&&"current"in n}const F7=H.forwardRef(({children:n,eps:e=.001,style:t,className:i,prepend:r,center:s,fullscreen:o,portal:a,distanceFactor:l,sprite:f=!1,transform:h=!1,occlude:d,onOcclude:p,castShadow:v,receiveShadow:y,material:_,geometry:M,zIndexRange:m=[16777271,0],calculatePosition:S=R7,as:w="div",wrapperClass:A,pointerEvents:b="auto",...P},I)=>{const{gl:L,camera:C,scene:R,size:W,raycaster:J,events:j,viewport:X}=Bi(),[Z]=H.useState(()=>document.createElement(w)),se=H.useRef(),ae=H.useRef(null),D=H.useRef(0),V=H.useRef([0,0]),B=H.useRef(null),te=H.useRef(null),$=(a==null?void 0:a.current)||j.connected||L.domElement.parentNode,ee=H.useRef(null),ue=H.useRef(!1),Ee=H.useMemo(()=>d&&d!=="blending"||Array.isArray(d)&&d.length&&z7(d[0]),[d]);H.useLayoutEffect(()=>{const xe=L.domElement;d&&d==="blending"?(xe.style.zIndex=`${Math.floor(m[0]/2)}`,xe.style.position="absolute",xe.style.pointerEvents="none"):(xe.style.zIndex=null,xe.style.position=null,xe.style.pointerEvents=null)},[d]),H.useLayoutEffect(()=>{if(ae.current){const xe=se.current=Q2(Z);if(R.updateMatrixWorld(),h)Z.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{const Me=S(ae.current,C,W);Z.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${Me[0]}px,${Me[1]}px,0);transform-origin:0 0;`}return $&&(r?$.prepend(Z):$.appendChild(Z)),()=>{$&&$.removeChild(Z),xe.unmount()}}},[$,h]),H.useLayoutEffect(()=>{A&&(Z.className=A)},[A]);const we=H.useMemo(()=>h?{position:"absolute",top:0,left:0,width:W.width,height:W.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:s?"translate3d(-50%,-50%,0)":"none",...o&&{top:-W.height/2,left:-W.width/2,width:W.width,height:W.height},...t},[t,s,o,W,h]),Q=H.useMemo(()=>({position:"absolute",pointerEvents:b}),[b]);H.useLayoutEffect(()=>{if(ue.current=!1,h){var xe;(xe=se.current)==null||xe.render(H.createElement("div",{ref:B,style:we},H.createElement("div",{ref:te,style:Q},H.createElement("div",{ref:I,className:i,style:t,children:n}))))}else{var Me;(Me=se.current)==null||Me.render(H.createElement("div",{ref:I,style:we,className:i,children:n}))}});const Xe=H.useRef(!0);kS(xe=>{if(ae.current){C.updateMatrixWorld(),ae.current.updateWorldMatrix(!0,!1);const Me=h?V.current:S(ae.current,C,W);if(h||Math.abs(D.current-C.zoom)>e||Math.abs(V.current[0]-Me[0])>e||Math.abs(V.current[1]-Me[1])>e){const ge=I7(ae.current,C);let oe=!1;Ee&&(d!=="blending"?oe=[R]:Array.isArray(d)&&(oe=d.map(Ge=>Ge.current)));const _e=Xe.current;if(oe){const Ge=D7(ae.current,C,J,oe);Xe.current=Ge&&!ge}else Xe.current=!ge;_e!==Xe.current&&(p?p(!Xe.current):Z.style.display=Xe.current?"block":"none");const ke=Math.floor(m[0]/2),Ie=d?Ee?[m[0],ke]:[ke-1,0]:m;if(Z.style.zIndex=`${k7(ae.current,C,Ie)}`,h){const[Ge,qe]=[W.width/2,W.height/2],je=C.projectionMatrix.elements[5]*qe,{isOrthographicCamera:nt,top:_t,left:z,bottom:N,right:le}=C,be=O7(C.matrixWorldInverse),Te=nt?`scale(${je})translate(${A_(-(le+z)/2)}px,${A_((_t+N)/2)}px)`:`translateZ(${je}px)`;let Re=ae.current.matrixWorld;f&&(Re=C.matrixWorldInverse.clone().transpose().copyPosition(Re).scale(ae.current.scale),Re.elements[3]=Re.elements[7]=Re.elements[11]=0,Re.elements[15]=1),Z.style.width=W.width+"px",Z.style.height=W.height+"px",Z.style.perspective=nt?"":`${je}px`,B.current&&te.current&&(B.current.style.transform=`${Te}${be}translate(${Ge}px,${qe}px)`,te.current.style.transform=U7(Re,1/((l||10)/400)))}else{const Ge=l===void 0?1:N7(ae.current,C)*l;Z.style.transform=`translate3d(${Me[0]}px,${Me[1]}px,0) scale(${Ge})`}V.current=Me,D.current=C.zoom}}if(!Ee&&ee.current&&!ue.current)if(h){if(B.current){const Me=B.current.children[0];if(Me!=null&&Me.clientWidth&&Me!=null&&Me.clientHeight){const{isOrthographicCamera:ge}=C;if(ge||M)P.scale&&(Array.isArray(P.scale)?P.scale instanceof k?ee.current.scale.copy(P.scale.clone().divideScalar(1)):ee.current.scale.set(1/P.scale[0],1/P.scale[1],1/P.scale[2]):ee.current.scale.setScalar(1/P.scale));else{const oe=(l||10)/400,_e=Me.clientWidth*oe,ke=Me.clientHeight*oe;ee.current.scale.set(_e,ke,1)}ue.current=!0}}}else{const Me=Z.children[0];if(Me!=null&&Me.clientWidth&&Me!=null&&Me.clientHeight){const ge=1/X.factor,oe=Me.clientWidth*ge,_e=Me.clientHeight*ge;ee.current.scale.set(oe,_e,1),ue.current=!0}ee.current.lookAt(xe.camera.position)}});const Ye=H.useMemo(()=>({vertexShader:h?void 0:` + /* + This shader is from the THREE's SpriteMaterial. + We need to turn the backing plane into a Sprite + (make it always face the camera) if "transfrom" + is false. + */ + #include + + void main() { + vec2 center = vec2(0., 1.); + float rotation = 0.0; + + // This is somewhat arbitrary, but it seems to work well + // Need to figure out how to derive this dynamically if it even matters + float size = 0.03; + + vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); + vec2 scale; + scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); + scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); + + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + if ( isPerspective ) scale *= - mvPosition.z; + + vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale * size; + vec2 rotatedPosition; + rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; + rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; + mvPosition.xy += rotatedPosition; + + gl_Position = projectionMatrix * mvPosition; + } + `,fragmentShader:` + void main() { + gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); + } + `}),[h]);return H.createElement("group",Ka({},P,{ref:ae}),d&&!Ee&&H.createElement("mesh",{castShadow:v,receiveShadow:y,ref:ee},M||H.createElement("planeGeometry",null),_||H.createElement("shaderMaterial",{side:Rr,vertexShader:Ye.vertexShader,fragmentShader:Ye.fragmentShader})))});let Bc=0;const B7=HR(n=>(hu.onStart=(e,t,i)=>{n({active:!0,item:e,loaded:t,total:i,progress:(t-Bc)/(i-Bc)*100})},hu.onLoad=()=>{n({active:!1})},hu.onError=e=>n(t=>({errors:[...t.errors,e]})),hu.onProgress=(e,t,i)=>{t===i&&(Bc=i),n({active:!0,item:e,loaded:t,total:i,progress:(t-Bc)/(i-Bc)*100||100})},{errors:[],active:!1,progress:0,item:"",loaded:0,total:0}));function V7(n){return function(e){n.forEach(function(t){typeof t=="function"?t(e):t!=null&&(t.current=e)})}}function eh(n){"@babel/helpers - typeof";return eh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},eh(n)}function H7(n,e){if(eh(n)!=="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var i=t.call(n,e||"default");if(eh(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function W7(n){var e=H7(n,"string");return eh(e)==="symbol"?e:String(e)}function ut(n,e,t){return e=W7(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}const OT=(n,e)=>(n%e+e)%e;let G7=class extends ss{constructor(e,t){super(),ut(this,"object",void 0),ut(this,"domElement",void 0),ut(this,"enabled",!0),ut(this,"target",new k),ut(this,"minDistance",0),ut(this,"maxDistance",1/0),ut(this,"minZoom",0),ut(this,"maxZoom",1/0),ut(this,"minPolarAngle",0),ut(this,"maxPolarAngle",Math.PI),ut(this,"minAzimuthAngle",-1/0),ut(this,"maxAzimuthAngle",1/0),ut(this,"enableDamping",!1),ut(this,"dampingFactor",.05),ut(this,"enableZoom",!0),ut(this,"zoomSpeed",1),ut(this,"enableRotate",!0),ut(this,"rotateSpeed",1),ut(this,"enablePan",!0),ut(this,"panSpeed",1),ut(this,"screenSpacePanning",!0),ut(this,"keyPanSpeed",7),ut(this,"autoRotate",!1),ut(this,"autoRotateSpeed",2),ut(this,"reverseOrbit",!1),ut(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),ut(this,"mouseButtons",{LEFT:Sa.ROTATE,MIDDLE:Sa.DOLLY,RIGHT:Sa.PAN}),ut(this,"touches",{ONE:wa.ROTATE,TWO:wa.DOLLY_PAN}),ut(this,"target0",void 0),ut(this,"position0",void 0),ut(this,"zoom0",void 0),ut(this,"_domElementKeyEvents",null),ut(this,"getPolarAngle",void 0),ut(this,"getAzimuthalAngle",void 0),ut(this,"setPolarAngle",void 0),ut(this,"setAzimuthalAngle",void 0),ut(this,"getDistance",void 0),ut(this,"listenToKeyEvents",void 0),ut(this,"saveState",void 0),ut(this,"reset",void 0),ut(this,"update",void 0),ut(this,"connect",void 0),ut(this,"dispose",void 0),this.object=e,this.domElement=t,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object instanceof Wt?this.object.zoom:1,this.getPolarAngle=()=>h.phi,this.getAzimuthalAngle=()=>h.theta,this.setPolarAngle=G=>{let de=OT(G,2*Math.PI),Se=h.phi;Se<0&&(Se+=2*Math.PI),de<0&&(de+=2*Math.PI);let Pe=Math.abs(de-Se);2*Math.PI-Pe{let de=OT(G,2*Math.PI),Se=h.theta;Se<0&&(Se+=2*Math.PI),de<0&&(de+=2*Math.PI);let Pe=Math.abs(de-Se);2*Math.PI-Pei.object.position.distanceTo(i.target),this.listenToKeyEvents=G=>{G.addEventListener("keydown",le),this._domElementKeyEvents=G},this.saveState=()=>{i.target0.copy(i.target),i.position0.copy(i.object.position),i.zoom0=i.object instanceof Wt?i.object.zoom:1},this.reset=()=>{i.target.copy(i.target0),i.object.position.copy(i.position0),i.object instanceof Wt&&(i.object.zoom=i.zoom0,i.object.updateProjectionMatrix()),i.dispatchEvent(r),i.update(),l=a.NONE},this.update=(()=>{const G=new k,de=new si().setFromUnitVectors(e.up,new k(0,1,0)),Se=de.clone().invert(),Pe=new k,Qe=new si,ct=2*Math.PI;return function(){const Y=i.object.position;G.copy(Y).sub(i.target),G.applyQuaternion(de),h.setFromVector3(G),i.autoRotate&&l===a.NONE&&J(R()),i.enableDamping?(h.theta+=d.theta*i.dampingFactor,h.phi+=d.phi*i.dampingFactor):(h.theta+=d.theta,h.phi+=d.phi);let fe=i.minAzimuthAngle,Ae=i.maxAzimuthAngle;return isFinite(fe)&&isFinite(Ae)&&(fe<-Math.PI?fe+=ct:fe>Math.PI&&(fe-=ct),Ae<-Math.PI?Ae+=ct:Ae>Math.PI&&(Ae-=ct),fe<=Ae?h.theta=Math.max(fe,Math.min(Ae,h.theta)):h.theta=h.theta>(fe+Ae)/2?Math.max(fe,h.theta):Math.min(Ae,h.theta)),h.phi=Math.max(i.minPolarAngle,Math.min(i.maxPolarAngle,h.phi)),h.makeSafe(),h.radius*=p,h.radius=Math.max(i.minDistance,Math.min(i.maxDistance,h.radius)),i.enableDamping===!0?i.target.addScaledVector(v,i.dampingFactor):i.target.add(v),G.setFromSpherical(h),G.applyQuaternion(Se),Y.copy(i.target).add(G),i.object.lookAt(i.target),i.enableDamping===!0?(d.theta*=1-i.dampingFactor,d.phi*=1-i.dampingFactor,v.multiplyScalar(1-i.dampingFactor)):(d.set(0,0,0),v.set(0,0,0)),p=1,y||Pe.distanceToSquared(i.object.position)>f||8*(1-Qe.dot(i.object.quaternion))>f?(i.dispatchEvent(r),Pe.copy(i.object.position),Qe.copy(i.object.quaternion),y=!1,!0):!1}})(),this.connect=G=>{G===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),i.domElement=G,i.domElement.style.touchAction="none",i.domElement.addEventListener("contextmenu",Re),i.domElement.addEventListener("pointerdown",Ge),i.domElement.addEventListener("pointercancel",nt),i.domElement.addEventListener("wheel",N)},this.dispose=()=>{var G,de,Se,Pe,Qe,ct;(G=i.domElement)===null||G===void 0||G.removeEventListener("contextmenu",Re),(de=i.domElement)===null||de===void 0||de.removeEventListener("pointerdown",Ge),(Se=i.domElement)===null||Se===void 0||Se.removeEventListener("pointercancel",nt),(Pe=i.domElement)===null||Pe===void 0||Pe.removeEventListener("wheel",N),(Qe=i.domElement)===null||Qe===void 0||Qe.ownerDocument.removeEventListener("pointermove",qe),(ct=i.domElement)===null||ct===void 0||ct.ownerDocument.removeEventListener("pointerup",je),i._domElementKeyEvents!==null&&i._domElementKeyEvents.removeEventListener("keydown",le)};const i=this,r={type:"change"},s={type:"start"},o={type:"end"},a={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let l=a.NONE;const f=1e-6,h=new x_,d=new x_;let p=1;const v=new k;let y=!1;const _=new ye,M=new ye,m=new ye,S=new ye,w=new ye,A=new ye,b=new ye,P=new ye,I=new ye,L=[],C={};function R(){return 2*Math.PI/60/60*i.autoRotateSpeed}function W(){return Math.pow(.95,i.zoomSpeed)}function J(G){i.reverseOrbit?d.theta+=G:d.theta-=G}function j(G){i.reverseOrbit?d.phi+=G:d.phi-=G}const X=(()=>{const G=new k;return function(Se,Pe){G.setFromMatrixColumn(Pe,0),G.multiplyScalar(-Se),v.add(G)}})(),Z=(()=>{const G=new k;return function(Se,Pe){i.screenSpacePanning===!0?G.setFromMatrixColumn(Pe,1):(G.setFromMatrixColumn(Pe,0),G.crossVectors(i.object.up,G)),G.multiplyScalar(Se),v.add(G)}})(),se=(()=>{const G=new k;return function(Se,Pe){const Qe=i.domElement;if(Qe&&i.object instanceof Wt&&i.object.isPerspectiveCamera){const ct=i.object.position;G.copy(ct).sub(i.target);let kt=G.length();kt*=Math.tan(i.object.fov/2*Math.PI/180),X(2*Se*kt/Qe.clientHeight,i.object.matrix),Z(2*Pe*kt/Qe.clientHeight,i.object.matrix)}else Qe&&i.object instanceof ns&&i.object.isOrthographicCamera?(X(Se*(i.object.right-i.object.left)/i.object.zoom/Qe.clientWidth,i.object.matrix),Z(Pe*(i.object.top-i.object.bottom)/i.object.zoom/Qe.clientHeight,i.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),i.enablePan=!1)}})();function ae(G){i.object instanceof Wt&&i.object.isPerspectiveCamera?p/=G:i.object instanceof ns&&i.object.isOrthographicCamera?(i.object.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.zoom*G)),i.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function D(G){i.object instanceof Wt&&i.object.isPerspectiveCamera?p*=G:i.object instanceof ns&&i.object.isOrthographicCamera?(i.object.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.zoom/G)),i.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function V(G){_.set(G.clientX,G.clientY)}function B(G){b.set(G.clientX,G.clientY)}function te(G){S.set(G.clientX,G.clientY)}function $(G){M.set(G.clientX,G.clientY),m.subVectors(M,_).multiplyScalar(i.rotateSpeed);const de=i.domElement;de&&(J(2*Math.PI*m.x/de.clientHeight),j(2*Math.PI*m.y/de.clientHeight)),_.copy(M),i.update()}function ee(G){P.set(G.clientX,G.clientY),I.subVectors(P,b),I.y>0?ae(W()):I.y<0&&D(W()),b.copy(P),i.update()}function ue(G){w.set(G.clientX,G.clientY),A.subVectors(w,S).multiplyScalar(i.panSpeed),se(A.x,A.y),S.copy(w),i.update()}function Ee(G){G.deltaY<0?D(W()):G.deltaY>0&&ae(W()),i.update()}function we(G){let de=!1;switch(G.code){case i.keys.UP:se(0,i.keyPanSpeed),de=!0;break;case i.keys.BOTTOM:se(0,-i.keyPanSpeed),de=!0;break;case i.keys.LEFT:se(i.keyPanSpeed,0),de=!0;break;case i.keys.RIGHT:se(-i.keyPanSpeed,0),de=!0;break}de&&(G.preventDefault(),i.update())}function Q(){if(L.length==1)_.set(L[0].pageX,L[0].pageY);else{const G=.5*(L[0].pageX+L[1].pageX),de=.5*(L[0].pageY+L[1].pageY);_.set(G,de)}}function Xe(){if(L.length==1)S.set(L[0].pageX,L[0].pageY);else{const G=.5*(L[0].pageX+L[1].pageX),de=.5*(L[0].pageY+L[1].pageY);S.set(G,de)}}function Ye(){const G=L[0].pageX-L[1].pageX,de=L[0].pageY-L[1].pageY,Se=Math.sqrt(G*G+de*de);b.set(0,Se)}function xe(){i.enableZoom&&Ye(),i.enablePan&&Xe()}function Me(){i.enableZoom&&Ye(),i.enableRotate&&Q()}function ge(G){if(L.length==1)M.set(G.pageX,G.pageY);else{const Se=He(G),Pe=.5*(G.pageX+Se.x),Qe=.5*(G.pageY+Se.y);M.set(Pe,Qe)}m.subVectors(M,_).multiplyScalar(i.rotateSpeed);const de=i.domElement;de&&(J(2*Math.PI*m.x/de.clientHeight),j(2*Math.PI*m.y/de.clientHeight)),_.copy(M)}function oe(G){if(L.length==1)w.set(G.pageX,G.pageY);else{const de=He(G),Se=.5*(G.pageX+de.x),Pe=.5*(G.pageY+de.y);w.set(Se,Pe)}A.subVectors(w,S).multiplyScalar(i.panSpeed),se(A.x,A.y),S.copy(w)}function _e(G){const de=He(G),Se=G.pageX-de.x,Pe=G.pageY-de.y,Qe=Math.sqrt(Se*Se+Pe*Pe);P.set(0,Qe),I.set(0,Math.pow(P.y/b.y,i.zoomSpeed)),ae(I.y),b.copy(P)}function ke(G){i.enableZoom&&_e(G),i.enablePan&&oe(G)}function Ie(G){i.enableZoom&&_e(G),i.enableRotate&&ge(G)}function Ge(G){if(i.enabled!==!1){if(L.length===0){var de,Se;(de=i.domElement)===null||de===void 0||de.ownerDocument.addEventListener("pointermove",qe),(Se=i.domElement)===null||Se===void 0||Se.ownerDocument.addEventListener("pointerup",je)}et(G),G.pointerType==="touch"?be(G):_t(G)}}function qe(G){i.enabled!==!1&&(G.pointerType==="touch"?Te(G):z(G))}function je(G){if(ze(G),L.length===0){var de,Se,Pe;(de=i.domElement)===null||de===void 0||de.releasePointerCapture(G.pointerId),(Se=i.domElement)===null||Se===void 0||Se.ownerDocument.removeEventListener("pointermove",qe),(Pe=i.domElement)===null||Pe===void 0||Pe.ownerDocument.removeEventListener("pointerup",je)}i.dispatchEvent(o),l=a.NONE}function nt(G){ze(G)}function _t(G){let de;switch(G.button){case 0:de=i.mouseButtons.LEFT;break;case 1:de=i.mouseButtons.MIDDLE;break;case 2:de=i.mouseButtons.RIGHT;break;default:de=-1}switch(de){case Sa.DOLLY:if(i.enableZoom===!1)return;B(G),l=a.DOLLY;break;case Sa.ROTATE:if(G.ctrlKey||G.metaKey||G.shiftKey){if(i.enablePan===!1)return;te(G),l=a.PAN}else{if(i.enableRotate===!1)return;V(G),l=a.ROTATE}break;case Sa.PAN:if(G.ctrlKey||G.metaKey||G.shiftKey){if(i.enableRotate===!1)return;V(G),l=a.ROTATE}else{if(i.enablePan===!1)return;te(G),l=a.PAN}break;default:l=a.NONE}l!==a.NONE&&i.dispatchEvent(s)}function z(G){if(i.enabled!==!1)switch(l){case a.ROTATE:if(i.enableRotate===!1)return;$(G);break;case a.DOLLY:if(i.enableZoom===!1)return;ee(G);break;case a.PAN:if(i.enablePan===!1)return;ue(G);break}}function N(G){i.enabled===!1||i.enableZoom===!1||l!==a.NONE&&l!==a.ROTATE||(G.preventDefault(),i.dispatchEvent(s),Ee(G),i.dispatchEvent(o))}function le(G){i.enabled===!1||i.enablePan===!1||we(G)}function be(G){switch(pe(G),L.length){case 1:switch(i.touches.ONE){case wa.ROTATE:if(i.enableRotate===!1)return;Q(),l=a.TOUCH_ROTATE;break;case wa.PAN:if(i.enablePan===!1)return;Xe(),l=a.TOUCH_PAN;break;default:l=a.NONE}break;case 2:switch(i.touches.TWO){case wa.DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;xe(),l=a.TOUCH_DOLLY_PAN;break;case wa.DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;Me(),l=a.TOUCH_DOLLY_ROTATE;break;default:l=a.NONE}break;default:l=a.NONE}l!==a.NONE&&i.dispatchEvent(s)}function Te(G){switch(pe(G),l){case a.TOUCH_ROTATE:if(i.enableRotate===!1)return;ge(G),i.update();break;case a.TOUCH_PAN:if(i.enablePan===!1)return;oe(G),i.update();break;case a.TOUCH_DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;ke(G),i.update();break;case a.TOUCH_DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;Ie(G),i.update();break;default:l=a.NONE}}function Re(G){i.enabled!==!1&&G.preventDefault()}function et(G){L.push(G)}function ze(G){delete C[G.pointerId];for(let de=0;de0,b=j>0,P=X>0,I=(A?1:0)+(b?1:0)+(P?1:0),I){case 0:{m.push(_[w]),m.push(_[w+1]),m.push(_[w+2]);break}case 1:{if(A&&(L=_[w+1],C=_[w+2],R=y(_[w],L,M,S),W=y(_[w],C,M,S)),b){L=_[w],C=_[w+2],R=y(_[w+1],L,M,S),W=y(_[w+1],C,M,S),m.push(R),m.push(C.clone()),m.push(L.clone()),m.push(C.clone()),m.push(R.clone()),m.push(W);break}P&&(L=_[w],C=_[w+1],R=y(_[w+2],L,M,S),W=y(_[w+2],C,M,S)),m.push(L.clone()),m.push(C.clone()),m.push(R),m.push(W),m.push(R.clone()),m.push(C.clone());break}case 2:{A||(L=_[w].clone(),C=y(L,_[w+1],M,S),R=y(L,_[w+2],M,S),m.push(L),m.push(C),m.push(R)),b||(L=_[w+1].clone(),C=y(L,_[w+2],M,S),R=y(L,_[w],M,S),m.push(L),m.push(C),m.push(R)),P||(L=_[w+2].clone(),C=y(L,_[w],M,S),R=y(L,_[w+1],M,S),m.push(L),m.push(C),m.push(R));break}}}return m}function y(_,M,m,S){const w=_.position.dot(m)-S,A=M.position.dot(m)-S,b=w/(w-A);return new UT(new k(_.position.x+b*(M.position.x-_.position.x),_.position.y+b*(M.position.y-_.position.y),_.position.z+b*(M.position.z-_.position.z)),new k(_.normal.x+b*(M.normal.x-_.normal.x),_.normal.y+b*(M.normal.y-_.normal.y),_.normal.z+b*(M.normal.z-_.normal.z)))}}}class UT{constructor(e,t){this.position=e,this.normal=t}clone(){return new this.constructor(this.position.clone(),this.normal.clone())}}const zT=n=>n===Object(n)&&!Array.isArray(n)&&typeof n!="function";function zS(n,e){const t=Bi(r=>r.gl),i=Rh(kg,zT(n)?Object.values(n):n);if(H.useLayoutEffect(()=>{e==null||e(i)},[e]),H.useEffect(()=>{(Array.isArray(i)?i:[i]).forEach(t.initTexture)},[t,i]),zT(n)){const r=Object.keys(n),s={};return r.forEach(o=>Object.assign(s,{[o]:i[r.indexOf(o)]})),s}else return i}zS.preload=n=>Rh.preload(kg,n);zS.clear=n=>Rh.clear(kg,n);function X7(n){return Array.isArray(n)}function vy(n=[0,0,0]){return X7(n)?n:n instanceof k||n instanceof nl?[n.x,n.y,n.z]:[n,n,n]}const Y7=H.forwardRef(function({debug:e,mesh:t,children:i,position:r,rotation:s,scale:o,...a},l){const f=H.useRef(null);H.useImperativeHandle(l,()=>f.current);const h=H.useRef(null);return H.useLayoutEffect(()=>{const d=(t==null?void 0:t.current)||f.current.parent,p=f.current;if(!(d instanceof Fn))throw new Error('Decal must have a Mesh as parent or specify its "mesh" prop');const v={position:new k,rotation:new nl,scale:new k(1,1,1)};if(d){wo(v,{position:r,scale:o});const y=d.matrixWorld.clone();if(d.matrixWorld.identity(),!s||typeof s=="number"){const _=new Tt;_.position.copy(v.position),_.lookAt(d.position),typeof s=="number"&&_.rotateZ(s),wo(v,{rotation:_.rotation})}else wo(v,{rotation:s});return p.geometry=new j7(d,v.position,v.rotation,v.scale),h.current&&wo(h.current,v),d.matrixWorld=y,()=>{p.geometry.dispose()}}},[t,...vy(r),...vy(o),...vy(s)]),H.createElement("mesh",{ref:f},i||H.createElement("meshStandardMaterial",Ka({transparent:!0,polygonOffset:!0,polygonOffsetFactor:-10},a)),e&&H.createElement("mesh",{ref:h},H.createElement("boxGeometry",null),H.createElement("meshNormalMaterial",{wireframe:!0}),H.createElement("axesHelper",null)))}),q7=H.forwardRef(({makeDefault:n,camera:e,regress:t,domElement:i,enableDamping:r=!0,onChange:s,onStart:o,onEnd:a,...l},f)=>{const h=Bi(b=>b.invalidate),d=Bi(b=>b.camera),p=Bi(b=>b.gl),v=Bi(b=>b.events),y=Bi(b=>b.setEvents),_=Bi(b=>b.set),M=Bi(b=>b.get),m=Bi(b=>b.performance),S=e||d,w=i||v.connected||p.domElement,A=H.useMemo(()=>new G7(S),[S]);return kS(()=>{A.enabled&&A.update()},-1),H.useEffect(()=>(A.connect(w),()=>void A.dispose()),[w,t,A,h]),H.useEffect(()=>{const b=L=>{h(),t&&m.regress(),s&&s(L)},P=L=>{o&&o(L)},I=L=>{a&&a(L)};return A.addEventListener("change",b),A.addEventListener("start",P),A.addEventListener("end",I),()=>{A.removeEventListener("start",P),A.removeEventListener("end",I),A.removeEventListener("change",b)}},[s,o,a,A,h,y]),H.useEffect(()=>{if(n){const b=M().controls;return _({controls:A}),()=>_({controls:b})}},[n,A]),H.createElement("primitive",Ka({ref:f,object:A,enableDamping:r},l))}),Z7=H.forwardRef(({children:n,enabled:e=!0,speed:t=1,rotationIntensity:i=1,floatIntensity:r=1,floatingRange:s=[-.1,.1],...o},a)=>{const l=H.useRef(null),f=H.useRef(Math.random()*1e4);return kS(h=>{var d,p;if(!e||t===0)return;const v=f.current+h.clock.getElapsedTime();l.current.rotation.x=Math.cos(v/4*t)/8*i,l.current.rotation.y=Math.sin(v/4*t)/8*i,l.current.rotation.z=Math.sin(v/4*t)/20*i;let y=Math.sin(v/4*t)/10;y=UL.mapLinear(y,-.1,.1,(d=s==null?void 0:s[0])!==null&&d!==void 0?d:-.1,(p=s==null?void 0:s[1])!==null&&p!==void 0?p:.1),l.current.position.y=y*r,l.current.updateMatrix()}),H.createElement("group",o,H.createElement("group",{ref:V7([l,a]),matrixAutoUpdate:!1},n))});function J7({all:n,scene:e,camera:t}){const i=Bi(({gl:o})=>o),r=Bi(({camera:o})=>o),s=Bi(({scene:o})=>o);return H.useLayoutEffect(()=>{const o=[];n&&(e||s).traverse(f=>{f.visible===!1&&(o.push(f),f.visible=!0)}),i.compile(e||s,t||r);const a=new aS(128);new oS(.01,1e5,a).update(i,e||s),a.dispose(),o.forEach(f=>f.visible=!1)},[]),null}const K7=()=>{const{progress:n}=B7();return F.jsxs(F7,{as:"div",center:!0,style:{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"},children:[F.jsx("span",{className:"canvas-loader"}),F.jsxs("p",{style:{fontSize:14,color:"#F1F1F1",fontWeight:800,marginTop:40},children:[n.toFixed(2),"%"]})]})},Q7=n=>{const[e]=zS([n.imgUrl]);return F.jsxs(Z7,{speed:1.5,rotationIntensity:1,floatIntensity:1,children:[F.jsx("ambientLight",{intensity:.25}),F.jsx("directionalLight",{position:[0,0,.05]}),F.jsxs("mesh",{castShadow:!0,receiveShadow:!0,scale:2.75,children:[F.jsx("icosahedronGeometry",{args:[1,1]}),F.jsx("meshStandardMaterial",{color:"#fcd4d4",polygonOffset:!0,polygonOffsetFactor:-5,flatShading:!0}),F.jsx(Y7,{position:[0,0,1],rotation:[2*Math.PI,0,6.25],scale:1,map:e,flatShading:!0})]})]})},$7=({icon:n})=>F.jsxs(P7,{frameloop:"demand",dpr:[1,2],gl:{preserveDrawingBuffer:!0},children:[F.jsxs(H.Suspense,{fallback:F.jsx(K7,{}),children:[F.jsx(q7,{enableZoom:!1}),F.jsx(Q7,{imgUrl:n})]}),F.jsx(J7,{all:!0})]}),eX="/portfolio-react-threejs/assets/texture-5adaf7bf.webp",tX=()=>F.jsxs("div",{className:"xl:mt-6 flex flex-row flex-wrap justify-center items-center gap-10",children:[F.jsxs(sn.div,{variants:ts(),children:[F.jsx("h2",{className:`${jt.sectionHeadText} text-center`,children:"Skills & Technologies."}),F.jsx("p",{className:`${jt.sectionSubText} text-center`,children:"What have i learnd?"})]}),F.jsx("div",{className:"lg:w-[400px] lg:h-[400px]",children:F.jsx($7,{icon:eX})},"skillsBall")]}),nX=js(tX,"skills"),iX=()=>F.jsx("div",{className:"h-screen flex justify-center items-center",children:F.jsx("img",{src:Hu,className:"w-[150px] h-[117px] "})});function rX(){return F.jsx(H.Suspense,{fallback:iX(),children:F.jsxs("div",{className:"bg-white",children:[F.jsx(Gs,{}),F.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:F.jsx(nX,{})})]})})}const sX=()=>F.jsx("div",{className:"h-screen flex justify-center items-center",children:F.jsx("img",{src:Hu,className:"w-[150px] h-[117px] "})});function oX(){return F.jsx(H.Suspense,{fallback:sX(),children:F.jsxs("div",{className:"bg-white",children:[F.jsx(Gs,{}),F.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:F.jsx(U3,{})})]})})}const aX=()=>F.jsx("div",{className:"h-screen flex justify-center items-center",children:F.jsx("img",{src:Hu,className:"w-[150px] h-[117px] "})});function lX(){return F.jsx(H.Suspense,{fallback:aX(),children:F.jsxs("div",{className:"bg-white",children:[F.jsx(Gs,{}),F.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:F.jsxs("div",{className:"h-screen ",children:[F.jsx("h1",{className:`${jt.sectionHeadText} text-center`,children:"No Page Found"}),F.jsx("p",{className:`${jt.heroSubText} mt-2 text-black-100 text-center`,children:"Try after something, it might showup 😊."})]})})]})})}const uX=()=>F.jsx("div",{className:"h-screen flex justify-center items-center",children:F.jsx("img",{src:Hu,className:"w-[150px] h-[117px] "})});function cX(){return F.jsx(H.Suspense,{fallback:uX(),children:F.jsx(CO,{basename:"/portfolio-react-threejs",children:F.jsxs(MO,{children:[F.jsx(qr,{index:!0,element:F.jsx(o5,{})}),F.jsx(qr,{path:"/certificate",element:F.jsx(u5,{})}),F.jsx(qr,{path:"/resume",element:F.jsx(d5,{})}),F.jsx(qr,{path:"/blogs",element:F.jsx(g5,{})}),F.jsx(qr,{path:"/contact",element:F.jsx(A5,{})}),F.jsx(qr,{path:"/projects",element:F.jsx(R5,{})}),F.jsx(qr,{path:"/skills",element:F.jsx(rX,{})}),F.jsx(qr,{path:"/freetools",element:F.jsx(oX,{})}),F.jsx(qr,{path:"*",element:F.jsx(lX,{})})]})})})}xy.createRoot(document.getElementById("root")).render(F.jsx(nh.StrictMode,{children:F.jsx(cX,{})})); diff --git a/index.html b/index.html index f16e144..302db93 100644 --- a/index.html +++ b/index.html @@ -7,8 +7,8 @@ Satyam Mishra | Bedead - - + +