vendor: 4,978 bytes, line 1
1(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function t(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(s){if(s.ep)return;s.ep=!0;const o=t(s);fetch(s.href,o)}})();function BM(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var n_={exports:{}},jm={};var hE;function gP(){if(hE)return jm;hE=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(i,s,o){var c=null;if(o!==void 0&&(c=""+o),s.key!==void 0&&(c=""+s.key),"key"in s){o={};for(var h in s)h!=="key"&&(o[h]=s[h])}else o=s;return s=o.ref,{$$typeof:n,type:i,key:c,ref:s!==void 0?s:null,props:o}}return jm.Fragment=e,jm.jsx=t,jm.jsxs=t,jm}var fE;function xP(){return fE||(fE=1,n_.exports=gP()),n_.exports}var E=xP(),i_={exports:{}},Wm={},s_={exports:{}},a_={};var pE;function yP(){return pE||(pE=1,(function(n){function e(Y,$){var le=Y.length;Y.push($);e:for(;0<le;){var ge=le-1>>>1,Ce=Y[ge];if(0<s(Ce,$))Y[ge]=$,Y[le]=Ce,le=ge;else break e}}function t(Y){return Y.length===0?null:Y[0]}function i(Y){if(Y.length===0)return null;var $=Y[0],le=Y.pop();if(le!==$){Y[0]=le;e:for(var ge=0,Ce=Y.length,q=Ce>>>1;ge<q;){var ae=2*(ge+1)-1,Ae=Y[ae],Ie=ae+1,We=Y[Ie];if(0>s(Ae,le))Ie<Ce&&0>s(We,Ae)?(Y[ge]=We,Y[Ie]=le,ge=Ie):(Y[ge]=Ae,Y[ae]=le,ge=ae);else if(Ie<Ce&&0>s(We,le))Y[ge]=We,Y[Ie]=le,ge=Ie;else break e}}return $}function s(Y,$){var le=Y.sortIndex-$.sortIndex;return le!==0?le:Y.id-$.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;n.unstable_now=function(){return o.now()}}else{var c=Date,h=c.now();n.unstable_now=function(){return c.now()-h}}var f=[],p=[],x=1,y=null,v=3,S=!1,M=!1,R=!1,A=!1,w=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function I(Y){for(var $=t(p);$!==null;){if($.callback===null)i(p);else if($.startTime<=Y)i(p),$.sortIndex=$.expirationTime,e(f,$);else break;$=t(p)}}function B(Y){if(R=!1,I(Y),!M)if(t(f)!==null)M=!0,O||(O=!0,ee());else{var $=t(p);$!==null&&Q(B,$.startTime-Y)}}var O=!1,F=-1,P=5,V=-1;function j(){return A?!0:!(n.unstable_now()-V<P)}function W(){if(A=!1,O){var Y=n.unstable_now();V=Y;var $=!0;try{e:{M=!1,R&&(R=!1,N(F),F=-1),S=!0;var le=v;try{t:{for(I(Y),y=t(f);y!==null&&!(y.expirationTime>Y&&j());){var ge=y.callback;if(typeof ge=="function"){y.callback=null,v=y.priorityLevel;var Ce=ge(y.expirationTime<=Y);if(Y=n.unstable_now(),typeof Ce=="function"){y.callback=Ce,I(Y),$=!0;break t}y===t(f)&&i(f),I(Y)}else i(f);y=t(f)}if(y!==null)$=!0;else{var q=t(p);q!==null&&Q(B,q.startTime-Y),$=!1}}break e}finally{y=null,v=le,S=!1}$=void 0}}finally{$?ee():O=!1}}}var ee;if(typeof L=="function")ee=function(){L(W)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,ue=ie.port2;ie.port1.onmessage=W,ee=function(){ue.postMessage(null)}}else ee=function(){w(W,0)};function Q(Y,$){F=w(function(){Y(n.unstable_now())},$)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(Y){Y.callback=null},n.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<Y?Math.floor(1e3/Y):5},n.unstable_getCurrentPriorityLevel=function(){return v},n.unstable_next=function(Y){switch(v){case 1:case 2:case 3:var $=3;break;default:$=v}var le=v;v=$;try{return Y()}finally{v=le}},n.unstable_requestPaint=function(){A=!0},n.unstable_runWithPriority=function(Y,$){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var le=v;v=Y;try{return $()}finally{v=le}},n.unstable_scheduleCallback=function(Y,$,le){var ge=n.unstable_now();switch(typeof le=="object"&&le!==null?(le=le.delay,le=typeof le=="number"&&0<le?ge+le:ge):le=ge,Y){case 1:var Ce=-1;break;case 2:Ce=250;break;case 5:Ce=1073741823;break;case 4:Ce=1e4;break;default:Ce=5e3}return Ce=le+Ce,Y={id:x++,callback:$,priorityLevel:Y,startTime:le,expirationTime:Ce,sortIndex:-1},le>ge?(Y.sortIndex=le,e(p,Y),t(f)===null&&Y===t(p)&&(R?(N(F),F=-1):R=!0,Q(B,le-ge))):(Y.sortIndex=Ce,e(f,Y),M||S||(M=!0,O||(O=!0,ee()))),Y},n.unstable_shouldYield=j,n.unstable_wrapCallback=function(Y){var $=v;return function(){var le=v;v=$;try{return Y.apply(this,arguments)}finally{v=le}}}})(a_)),a_}var mE;
vendor: 16,622 bytes, lines 1-3
1function KC(){return mE||(mE=1,s_.exports=yP()),s_.exports}var r_={exports:{}},nn={};var gE;function vP(){if(gE)return nn;gE=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),v=Symbol.iterator;function S(q){return q===null||typeof q!="object"?null:(q=v&&q[v]||q["@@iterator"],typeof q=="function"?q:null)}var M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,A={};function w(q,ae,Ae){this.props=q,this.context=ae,this.refs=A,this.updater=Ae||M}w.prototype.isReactComponent={},w.prototype.setState=function(q,ae){if(typeof q!="object"&&typeof q!="function"&&q!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,q,ae,"setState")},w.prototype.forceUpdate=function(q){this.updater.enqueueForceUpdate(this,q,"forceUpdate")};function N(){}N.prototype=w.prototype;function L(q,ae,Ae){this.props=q,this.context=ae,this.refs=A,this.updater=Ae||M}var I=L.prototype=new N;I.constructor=L,R(I,w.prototype),I.isPureReactComponent=!0;var B=Array.isArray;function O(){}var F={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function V(q,ae,Ae){var Ie=Ae.ref;return{$$typeof:n,type:q,key:ae,ref:Ie!==void 0?Ie:null,props:Ae}}function j(q,ae){return V(q.type,ae,q.props)}function W(q){return typeof q=="object"&&q!==null&&q.$$typeof===n}function ee(q){var ae={"=":"=0",":":"=2"};return"$"+q.replace(/[=:]/g,function(Ae){return ae[Ae]})}var ie=/\/+/g;function ue(q,ae){return typeof q=="object"&&q!==null&&q.key!=null?ee(""+q.key):ae.toString(36)}function Q(q){switch(q.status){case"fulfilled":return q.value;case"rejected":throw q.reason;default:switch(typeof q.status=="string"?q.then(O,O):(q.status="pending",q.then(function(ae){q.status==="pending"&&(q.status="fulfilled",q.value=ae)},function(ae){q.status==="pending"&&(q.status="rejected",q.reason=ae)})),q.status){case"fulfilled":return q.value;case"rejected":throw q.reason}}throw q}function Y(q,ae,Ae,Ie,We){var pe=typeof q;(pe==="undefined"||pe==="boolean")&&(q=null);var Be=!1;if(q===null)Be=!0;else switch(pe){case"bigint":case"string":case"number":Be=!0;break;case"object":switch(q.$$typeof){case n:case e:Be=!0;break;case x:return Be=q._init,Y(Be(q._payload),ae,Ae,Ie,We)}}if(Be)return We=We(q),Be=Ie===""?"."+ue(q,0):Ie,B(We)?(Ae="",Be!=null&&(Ae=Be.replace(ie,"$&/")+"/"),Y(We,ae,Ae,"",function(Rt){return Rt})):We!=null&&(W(We)&&(We=j(We,Ae+(We.key==null||q&&q.key===We.key?"":(""+We.key).replace(ie,"$&/")+"/")+Be)),ae.push(We)),1;Be=0;var Ve=Ie===""?".":Ie+":";if(B(q))for(var Ze=0;Ze<q.length;Ze++)Ie=q[Ze],pe=Ve+ue(Ie,Ze),Be+=Y(Ie,ae,Ae,pe,We);else if(Ze=S(q),typeof Ze=="function")for(q=Ze.call(q),Ze=0;!(Ie=q.next()).done;)Ie=Ie.value,pe=Ve+ue(Ie,Ze++),Be+=Y(Ie,ae,Ae,pe,We);else if(pe==="object"){if(typeof q.then=="function")return Y(Q(q),ae,Ae,Ie,We);throw ae=String(q),Error("Objects are not valid as a React child (found: "+(ae==="[object Object]"?"object with keys {"+Object.keys(q).join(", ")+"}":ae)+"). If you meant to render a collection of children, use an array instead.")}return Be}function $(q,ae,Ae){if(q==null)return q;var Ie=[],We=0;return Y(q,Ie,"","",function(pe){return ae.call(Ae,pe,We++)}),Ie}function le(q){if(q._status===-1){var ae=q._result;ae=ae(),ae.then(function(Ae){(q._status===0||q._status===-1)&&(q._status=1,q._result=Ae)},function(Ae){(q._status===0||q._status===-1)&&(q._status=2,q._result=Ae)}),q._status===-1&&(q._status=0,q._result=ae)}if(q._status===1)return q._result.default;throw q._result}var ge=typeof reportError=="function"?reportError:function(q){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var ae=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof q=="object"&&q!==null&&typeof q.message=="string"?String(q.message):String(q),error:q});if(!window.dispatchEvent(ae))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",q);return}console.error(q)},Ce={map:$,forEach:function(q,ae,Ae){$(q,function(){ae.apply(this,arguments)},Ae)},count:function(q){var ae=0;return $(q,function(){ae++}),ae},toArray:function(q){return $(q,function(ae){return ae})||[]},only:function(q){if(!W(q))throw Error("React.Children.only expected to receive a single React element child.");return q}};return nn.Activity=y,nn.Children=Ce,nn.Component=w,nn.Fragment=t,nn.Profiler=s,nn.PureComponent=L,nn.StrictMode=i,nn.Suspense=f,nn.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,nn.__COMPILER_RUNTIME={__proto__:null,c:function(q){return F.H.useMemoCache(q)}},nn.cache=function(q){return function(){return q.apply(null,arguments)}},nn.cacheSignal=function(){return null},nn.cloneElement=function(q,ae,Ae){if(q==null)throw Error("The argument must be a React element, but you passed "+q+".");var Ie=R({},q.props),We=q.key;if(ae!=null)for(pe in ae.key!==void 0&&(We=""+ae.key),ae)!P.call(ae,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&ae.ref===void 0||(Ie[pe]=ae[pe]);var pe=arguments.length-2;if(pe===1)Ie.children=Ae;else if(1<pe){for(var Be=Array(pe),Ve=0;Ve<pe;Ve++)Be[Ve]=arguments[Ve+2];Ie.children=Be}return V(q.type,We,Ie)},nn.createContext=function(q){return q={$$typeof:c,_currentValue:q,_currentValue2:q,_threadCount:0,Provider:null,Consumer:null},q.Provider=q,q.Consumer={$$typeof:o,_context:q},q},nn.createElement=function(q,ae,Ae){var Ie,We={},pe=null;if(ae!=null)for(Ie in ae.key!==void 0&&(pe=""+ae.key),ae)P.call(ae,Ie)&&Ie!=="key"&&Ie!=="__self"&&Ie!=="__source"&&(We[Ie]=ae[Ie]);var Be=arguments.length-2;if(Be===1)We.children=Ae;else if(1<Be){for(var Ve=Array(Be),Ze=0;Ze<Be;Ze++)Ve[Ze]=arguments[Ze+2];We.children=Ve}if(q&&q.defaultProps)for(Ie in Be=q.defaultProps,Be)We[Ie]===void 0&&(We[Ie]=Be[Ie]);return V(q,pe,We)},nn.createRef=function(){return{current:null}},nn.forwardRef=function(q){return{$$typeof:h,render:q}},nn.isValidElement=W,nn.lazy=function(q){return{$$typeof:x,_payload:{_status:-1,_result:q},_init:le}},nn.memo=function(q,ae){return{$$typeof:p,type:q,compare:ae===void 0?null:ae}},nn.startTransition=function(q){var ae=F.T,Ae={};F.T=Ae;try{var Ie=q(),We=F.S;We!==null&&We(Ae,Ie),typeof Ie=="object"&&Ie!==null&&typeof Ie.then=="function"&&Ie.then(O,ge)}catch(pe){ge(pe)}finally{ae!==null&&Ae.types!==null&&(ae.types=Ae.types),F.T=ae}},nn.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},nn.use=function(q){return F.H.use(q)},nn.useActionState=function(q,ae,Ae){return F.H.useActionState(q,ae,Ae)},nn.useCallback=function(q,ae){return F.H.useCallback(q,ae)},nn.useContext=function(q){return F.H.useContext(q)},nn.useDebugValue=function(){},nn.useDeferredValue=function(q,ae){return F.H.useDeferredValue(q,ae)},nn.useEffect=function(q,ae){return F.H.useEffect(q,ae)},nn.useEffectEvent=function(q){return F.H.useEffectEvent(q)},nn.useId=function(){return F.H.useId()},nn.useImperativeHandle=function(q,ae,Ae){return F.H.useImperativeHandle(q,ae,Ae)},nn.useInsertionEffect=function(q,ae){return F.H.useInsertionEffect(q,ae)},nn.useLayoutEffect=function(q,ae){return F.H.useLayoutEffect(q,ae)},nn.useMemo=function(q,ae){return F.H.useMemo(q,ae)},nn.useOptimistic=function(q,ae){return F.H.useOptimistic(q,ae)},nn.useReducer=function(q,ae,Ae){return F.H.useReducer(q,ae,Ae)},nn.useRef=function(q){return F.H.useRef(q)},nn.useState=function(q){return F.H.useState(q)},nn.useSyncExternalStore=function(q,ae,Ae){return F.H.useSyncExternalStore(q,ae,Ae)},nn.useTransition=function(){return F.H.useTransition()},nn.version="19.2.3",nn}var xE;function a0(){return xE||(xE=1,r_.exports=vP()),r_.exports}var o_={exports:{}},qs={};var yE;function bP(){if(yE)return qs;yE=1;var n=a0();function e(f){var p="https://react.dev/errors/"+f;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)p+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+f+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function t(){}var i={d:{f:t,r:function(){throw Error(e(522))},D:t,C:t,L:t,m:t,X:t,S:t,M:t},p:0,findDOMNode:null},s=Symbol.for("react.portal");function o(f,p,x){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:y==null?null:""+y,children:f,containerInfo:p,implementation:x}}var c=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(f,p){if(f==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return qs.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,qs.createPortal=function(f,p){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(e(299));return o(f,p,null,x)},qs.flushSync=function(f){var p=c.T,x=i.p;try{if(c.T=null,i.p=2,f)return f()}finally{c.T=p,i.p=x,i.d.f()}},qs.preconnect=function(f,p){typeof f=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,i.d.C(f,p))},qs.prefetchDNS=function(f){typeof f=="string"&&i.d.D(f)},qs.preinit=function(f,p){if(typeof f=="string"&&p&&typeof p.as=="string"){var x=p.as,y=h(x,p.crossOrigin),v=typeof p.integrity=="string"?p.integrity:void 0,S=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;x==="style"?i.d.S(f,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:v,fetchPriority:S}):x==="script"&&i.d.X(f,{crossOrigin:y,integrity:v,fetchPriority:S,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},qs.preinitModule=function(f,p){if(typeof f=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var x=h(p.as,p.crossOrigin);i.d.M(f,{crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&i.d.M(f)},qs.preload=function(f,p){if(typeof f=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var x=p.as,y=h(x,p.crossOrigin);i.d.L(f,x,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},qs.preloadModule=function(f,p){if(typeof f=="string")if(p){var x=h(p.as,p.crossOrigin);i.d.m(f,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else i.d.m(f)},qs.requestFormReset=function(f){i.d.r(f)},qs.unstable_batchedUpdates=function(f,p){return f(p)},qs.useFormState=function(f,p,x){return c.H.useFormState(f,p,x)},qs.useFormStatus=function(){return c.H.useHostTransitionStatus()},qs.version="19.2.3",qs}var vE;function _P(){if(vE)return o_.exports;vE=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),o_.exports=bP(),o_.exports}var bE;function SP(){if(bE)return Wm;bE=1;var n=KC(),e=a0(),t=_P();function i(a){var r="https://react.dev/errors/"+a;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)r+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+a+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function o(a){var r=a,d=a;if(a.alternate)for(;r.return;)r=r.return;else{a=r;do r=a,(r.flags&4098)!==0&&(d=r.return),a=r.return;while(a)}return r.tag===3?d:null}function c(a){if(a.tag===13){var r=a.memoizedState;if(r===null&&(a=a.alternate,a!==null&&(r=a.memoizedState)),r!==null)return r.dehydrated}return null}function h(a){if(a.tag===31){var r=a.memoizedState;if(r===null&&(a=a.alternate,a!==null&&(r=a.memoizedState)),r!==null)return r.dehydrated}return null}function f(a){if(o(a)!==a)throw Error(i(188))}function p(a){var r=a.alternate;if(!r){if(r=o(a),r===null)throw Error(i(188));return r!==a?null:a}for(var d=a,m=r;;){var _=d.return;if(_===null)break;var T=_.alternate;if(T===null){if(m=_.return,m!==null){d=m;continue}break}if(_.child===T.child){for(T=_.child;T;){if(T===d)return f(_),a;if(T===m)return f(_),r;T=T.sibling}throw Error(i(188))}if(d.return!==m.return)d=_,m=T;else{for(var U=!1,G=_.child;G;){if(G===d){U=!0,d=_,m=T;break}if(G===m){U=!0,m=_,d=T;break}G=G.sibling}if(!U){for(G=T.child;G;){if(G===d){U=!0,d=T,m=_;break}if(G===m){U=!0,m=T,d=_;break}G=G.sibling}if(!U)throw Error(i(189))}}if(d.alternate!==m)throw Error(i(190))}if(d.tag!==3)throw Error(i(188));return d.stateNode.current===d?a:r}function x(a){var r=a.tag;if(r===5||r===26||r===27||r===6)return a;for(a=a.child;a!==null;){if(r=x(a),r!==null)return r;a=a.sibling}return null}var y=Object.assign,v=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),M=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),L=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),j=Symbol.for("react.memo_cache_sentinel"),W=Symbol.iterator;function ee(a){return a===null||typeof a!="object"?null:(a=W&&a[W]||a["@@iterator"],typeof a=="function"?a:null)}var ie=Symbol.for("react.client.reference");function ue(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===ie?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case R:return"Fragment";case w:return"Profiler";case A:return"StrictMode";case B:return"Suspense";case O:return"SuspenseList";case V:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case M:return"Portal";case L:return a.displayName||"Context";case N:return(a._context.displayName||"Context")+".Consumer";case I:var r=a.render;return a=a.displayName,a||(a=r.displayName||r.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case F:return r=a.displayName||null,r!==null?r:ue(a.type)||"Memo";case P:r=a._payload,a=a._init;try{return ue(a(r))}catch{}}return null}var Q=Array.isArray,Y=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le={pending:!1,data:null,method:null,action:null},ge=[],Ce=-1;function q(a){return{current:a}}function ae(a){0>Ce||(a.current=ge[Ce],ge[Ce]=null,Ce--)}function Ae(a,r){Ce++,ge[Ce]=a.current,a.current=r}var Ie=q(null),We=q(null),pe=q(null),Be=q(null);function Ve(a,r){switch(Ae(pe,r),Ae(We,a),Ae(Ie,null),r.nodeType){case 9:case 11:a=(a=r.documentElement)&&(a=a.namespaceURI)?UT(a):0;break;default:if(a=r.tagName,r=r.namespaceURI)r=UT(r),a=OT(r,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}ae(Ie),Ae(Ie,a)}function Ze(){ae(Ie),ae(We),ae(pe)}function Rt(a){a.memoizedState!==null&&Ae(Be,a);var r=Ie.current,d=OT(r,a.type);r!==d&&(Ae(We,a),Ae(Ie,d))}function Ct(a){We.current===a&&(ae(Ie),ae(We)),Be.current===a&&(ae(Be),Fm._currentValue=le)}var Jt,Nt;function Ue(a){if(Jt===void 0)try{throw Error()}catch(d){var r=d.stack.trim().match(/\n( *(at )?)/);Jt=r&&r[1]||"",Nt=-1<d.stack.indexOf(` 2 at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return` 3`+Jt+a+Nt}var Xe=!1;function Oe(a,r){if(!a||Xe)return"";Xe=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(r){var ze=function(){throw Error()};if(Object.defineProperty(ze.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ze,[])}catch(Te){var Se=Te}Reflect.construct(a,[],ze)}else{try{ze.call()}catch(Te){Se=Te}a.call(ze.prototype)}}else{try{throw Error()}catch(Te){Se=Te}(ze=a())&&typeof ze.catch=="function"&&ze.catch(function(){})}}
vendor: 8,747 bytes, lines 3-8
3catch(Te){if(Te&&Se&&typeof Te.stack=="string")return[Te.stack,Se.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var _=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");_&&_.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var T=m.DetermineComponentFrameRoot(),U=T[0],G=T[1];if(U&&G){var te=U.split(` 4`),ve=G.split(` 5`);for(_=m=0;m<te.length&&!te[m].includes("DetermineComponentFrameRoot");)m++;for(;_<ve.length&&!ve[_].includes("DetermineComponentFrameRoot");)_++;if(m===te.length||_===ve.length)for(m=te.length-1,_=ve.length-1;1<=m&&0<=_&&te[m]!==ve[_];)_--;for(;1<=m&&0<=_;m--,_--)if(te[m]!==ve[_]){if(m!==1||_!==1)do if(m--,_--,0>_||te[m]!==ve[_]){var Le=` 6`+te[m].replace(" at new "," at ");return a.displayName&&Le.includes("<anonymous>")&&(Le=Le.replace("<anonymous>",a.displayName)),Le}while(1<=m&&0<=_);break}}}finally{Xe=!1,Error.prepareStackTrace=d}return(d=a?a.displayName||a.name:"")?Ue(d):""}function at(a,r){switch(a.tag){case 26:case 27:case 5:return Ue(a.type);case 16:return Ue("Lazy");case 13:return a.child!==r&&r!==null?Ue("Suspense Fallback"):Ue("Suspense");case 19:return Ue("SuspenseList");case 0:case 15:return Oe(a.type,!1);case 11:return Oe(a.type.render,!1);case 1:return Oe(a.type,!0);case 31:return Ue("Activity");default:return""}}function st(a){try{var r="",d=null;do r+=at(a,d),d=a,a=a.return;while(a);return r}catch(m){return` 7Error generating stack: `+m.message+` 8`+m.stack}}var Pt=Object.prototype.hasOwnProperty,J=n.unstable_scheduleCallback,Ot=n.unstable_cancelCallback,gt=n.unstable_shouldYield,vt=n.unstable_requestPaint,He=n.unstable_now,Cn=n.unstable_getCurrentPriorityLevel,X=n.unstable_ImmediatePriority,z=n.unstable_UserBlockingPriority,de=n.unstable_NormalPriority,Re=n.unstable_LowPriority,Fe=n.unstable_IdlePriority,$e=n.log,Je=n.unstable_setDisableYieldValue,Ee=null,Ne=null;function rt(a){if(typeof $e=="function"&&Je(a),Ne&&typeof Ne.setStrictMode=="function")try{Ne.setStrictMode(Ee,a)}catch{}}var lt=Math.clz32?Math.clz32:kt,tt=Math.log,et=Math.LN2;function kt(a){return a>>>=0,a===0?32:31-(tt(a)/et|0)|0}var jt=256,un=262144,se=4194304;function Ke(a){var r=a&42;if(r!==0)return r;switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function De(a,r,d){var m=a.pendingLanes;if(m===0)return 0;var _=0,T=a.suspendedLanes,U=a.pingedLanes;a=a.warmLanes;var G=m&134217727;return G!==0?(m=G&~T,m!==0?_=Ke(m):(U&=G,U!==0?_=Ke(U):d||(d=G&~a,d!==0&&(_=Ke(d))))):(G=m&~T,G!==0?_=Ke(G):U!==0?_=Ke(U):d||(d=m&~a,d!==0&&(_=Ke(d)))),_===0?0:r!==0&&r!==_&&(r&T)===0&&(T=_&-_,d=r&-r,T>=d||T===32&&(d&4194048)!==0)?r:_}function ut(a,r){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&r)===0}function it(a,r){switch(a){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ke(){var a=se;return se<<=1,(se&62914560)===0&&(se=4194304),a}function _t(a){for(var r=[],d=0;31>d;d++)r.push(a);return r}function Bt(a,r){a.pendingLanes|=r,r!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function qn(a,r,d,m,_,T){var U=a.pendingLanes;a.pendingLanes=d,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=d,a.entangledLanes&=d,a.errorRecoveryDisabledLanes&=d,a.shellSuspendCounter=0;var G=a.entanglements,te=a.expirationTimes,ve=a.hiddenUpdates;for(d=U&~d;0<d;){var Le=31-lt(d),ze=1<<Le;G[Le]=0,te[Le]=-1;var Se=ve[Le];if(Se!==null)for(ve[Le]=null,Le=0;Le<Se.length;Le++){var Te=Se[Le];Te!==null&&(Te.lane&=-536870913)}d&=~ze}m!==0&&Sn(a,m,0),T!==0&&_===0&&a.tag!==0&&(a.suspendedLanes|=T&~(U&~r))}function Sn(a,r,d){a.pendingLanes|=r,a.suspendedLanes&=~r;var m=31-lt(r);a.entangledLanes|=r,a.entanglements[m]=a.entanglements[m]|1073741824|d&261930}function bs(a,r){var d=a.entangledLanes|=r;for(a=a.entanglements;d;){var m=31-lt(d),_=1<<m;_&r|a[m]&r&&(a[m]|=r),d&=~_}}function Us(a,r){var d=r&-r;return d=(d&42)!==0?1:hr(d),(d&(a.suspendedLanes|r))!==0?0:d}function hr(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function Io(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function Al(){var a=$.p;return a!==0?a:(a=window.event,a===void 0?32:aE(a.type))}function Ka(a,r){var d=$.p;try{return $.p=a,r()}finally{$.p=d}}var as=Math.random().toString(36).slice(2),ii="__reactFiber$"+as,Fi="__reactProps$"+as,$a="__reactContainer$"+as,_s="__reactEvents$"+as,Qa="__reactListeners$"+as,fr="__reactHandles$"+as,Cl="__reactResources$"+as,Sa="__reactMarker$"+as;function Zr(a){delete a[ii],delete a[Fi],delete a[_s],delete a[Qa],delete a[fr]}function Kr(a){var r=a[ii];if(r)return r;for(var d=a.parentNode;d;){if(r=d[$a]||d[ii]){if(d=r.alternate,r.child!==null||d!==null&&d.child!==null)for(a=GT(a);a!==null;){if(d=a[ii])return d;a=GT(a)}return r}a=d,d=a.parentNode}return null}function $r(a){if(a=a[ii]||a[$a]){var r=a.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return a}return null}function Po(a){var r=a.tag;if(r===5||r===26||r===27||r===6)return a.stateNode;throw Error(i(33))}function pr(a){var r=a[Cl];return r||(r=a[Cl]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function vi(a){a[Sa]=!0}var Ja=new Set,H={};function oe(a,r){xe(a,r),xe(a+"Capture",r)}function xe(a,r){for(H[a]=r,a=0;a<r.length;a++)Ja.add(r[a])}var fe=RegExp("^[: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]*$"),me={},Ye={};function pt(a){return Pt.call(Ye,a)?!0:Pt.call(me,a)?!1:fe.test(a)?Ye[a]=!0:(me[a]=!0,!1)}function ot(a,r,d){if(pt(r))if(d===null)a.removeAttribute(r);else{switch(typeof d){case"undefined":case"function":case"symbol":a.removeAttribute(r);return;case"boolean":var m=r.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){a.removeAttribute(r);return}}a.setAttribute(r,""+d)}}function yt(a,r,d){if(d===null)a.removeAttribute(r);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(r);return}a.setAttribute(r,""+d)}}function xt(a,r,d,m){if(m===null)a.removeAttribute(d);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(d);return}a.setAttributeNS(r,d,""+m)}}function Dt(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function Zt(a){var r=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function wt(a,r,d){var m=Object.getOwnPropertyDescriptor(a.constructor.prototype,r);if(!a.hasOwnProperty(r)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var _=m.get,T=m.set;return Object.defineProperty(a,r,{configurable:!0,get:function(){return _.call(this)},set:function(U){d=""+U,T.call(this,U)}}),Object.defineProperty(a,r,{enumerable:m.enumerable}),{getValue:function(){return d},setValue:function(U){d=""+U},stopTracking:function(){a._valueTracker=null,delete a[r]}}}}function Tn(a){if(!a._valueTracker){var r=Zt(a)?"checked":"value";a._valueTracker=wt(a,r,""+a[r])}}function fn(a){if(!a)return!1;var r=a._valueTracker;if(!r)return!0;var d=r.getValue(),m="";return a&&(m=Zt(a)?a.checked?"true":"false":a.value),a=m,a!==d?(r.setValue(a),!0):!1}function Ht(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}
vendor: 4,522 bytes, line 8
8catch{return a.body}}var Dn=/[\n"\\]/g;function Rn(a){return a.replace(Dn,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function dt(a,r,d,m,_,T,U,G){a.name="",U!=null&&typeof U!="function"&&typeof U!="symbol"&&typeof U!="boolean"?a.type=U:a.removeAttribute("type"),r!=null?U==="number"?(r===0&&a.value===""||a.value!=r)&&(a.value=""+Dt(r)):a.value!==""+Dt(r)&&(a.value=""+Dt(r)):U!=="submit"&&U!=="reset"||a.removeAttribute("value"),r!=null?qt(a,U,Dt(r)):d!=null?qt(a,U,Dt(d)):m!=null&&a.removeAttribute("value"),_==null&&T!=null&&(a.defaultChecked=!!T),_!=null&&(a.checked=_&&typeof _!="function"&&typeof _!="symbol"),G!=null&&typeof G!="function"&&typeof G!="symbol"&&typeof G!="boolean"?a.name=""+Dt(G):a.removeAttribute("name")}function Yi(a,r,d,m,_,T,U,G){if(T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(a.type=T),r!=null||d!=null){if(!(T!=="submit"&&T!=="reset"||r!=null)){Tn(a);return}d=d!=null?""+Dt(d):"",r=r!=null?""+Dt(r):d,G||r===a.value||(a.value=r),a.defaultValue=r}m=m??_,m=typeof m!="function"&&typeof m!="symbol"&&!!m,a.checked=G?a.checked:!!m,a.defaultChecked=!!m,U!=null&&typeof U!="function"&&typeof U!="symbol"&&typeof U!="boolean"&&(a.name=U),Tn(a)}function qt(a,r,d){r==="number"&&Ht(a.ownerDocument)===a||a.defaultValue===""+d||(a.defaultValue=""+d)}function bi(a,r,d,m){if(a=a.options,r){r={};for(var _=0;_<d.length;_++)r["$"+d[_]]=!0;for(d=0;d<a.length;d++)_=r.hasOwnProperty("$"+a[d].value),a[d].selected!==_&&(a[d].selected=_),_&&m&&(a[d].defaultSelected=!0)}else{for(d=""+Dt(d),r=null,_=0;_<a.length;_++){if(a[_].value===d){a[_].selected=!0,m&&(a[_].defaultSelected=!0);return}r!==null||a[_].disabled||(r=a[_])}r!==null&&(r.selected=!0)}}function Ss(a,r,d){if(r!=null&&(r=""+Dt(r),r!==a.value&&(a.value=r),d==null)){a.defaultValue!==r&&(a.defaultValue=r);return}a.defaultValue=d!=null?""+Dt(d):""}function ta(a,r,d,m){if(r==null){if(m!=null){if(d!=null)throw Error(i(92));if(Q(m)){if(1<m.length)throw Error(i(93));m=m[0]}d=m}d==null&&(d=""),r=d}d=Dt(r),a.defaultValue=d,m=a.textContent,m===d&&m!==""&&m!==null&&(a.value=m),Tn(a)}function Os(a,r){if(r){var d=a.firstChild;if(d&&d===a.lastChild&&d.nodeType===3){d.nodeValue=r;return}}a.textContent=r}var On=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Jn(a,r,d){var m=r.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?m?a.setProperty(r,""):r==="float"?a.cssFloat="":a[r]="":m?a.setProperty(r,d):typeof d!="number"||d===0||On.has(r)?r==="float"?a.cssFloat=d:a[r]=(""+d).trim():a[r]=d+"px"}function Ma(a,r,d){if(r!=null&&typeof r!="object")throw Error(i(62));if(a=a.style,d!=null){for(var m in d)!d.hasOwnProperty(m)||r!=null&&r.hasOwnProperty(m)||(m.indexOf("--")===0?a.setProperty(m,""):m==="float"?a.cssFloat="":a[m]="");for(var _ in r)m=r[_],r.hasOwnProperty(_)&&d[_]!==m&&Jn(a,_,m)}else for(var T in r)r.hasOwnProperty(T)&&Jn(a,T,r[T])}function In(a){if(a.indexOf("-")===-1)return!1;switch(a){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 er=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRen
8dering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),mr=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Uo(a){return mr.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function Qr(){}var lh=null;function ch(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Rl=null,Oo=null;function _p(a){var r=$r(a);if(r&&(a=r.stateNode)){var d=a[Fi]||null;e:switch(a=r.stateNode,r.type){case"input":if(dt(a,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),r=d.name,d.type==="radio"&&r!=null){for(d=a;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+Rn(""+r)+'"][type="radio"]'),r=0;r<d.length;r++){var m=d[r];if(m!==a&&m.form===a.form){var _=m[Fi]||null;if(!_)throw Error(i(90));dt(m,_.value,_.defaultValue,_.defaultValue,_.checked,_.defaultChecked,_.type,_.name)}}for(r=0;r<d.length;r++)m=d[r],m.form===a.form&&fn(m)}break e;case"textarea":Ss(a,d.value,d.defaultValue);break e;case"select":r=d.value,r!=null&&bi(a,!!d.multiple,r,!1)}}}var uh=!1;function Sp(a,r,d){if(uh)return a(r,d);uh=!0;try{var m=a(r);return m}finally{if(uh=!1,(Rl!==null||Oo!==null)&&(ar(),Rl&&(r=Rl,a=Oo,Oo=Rl=null,_p(r),a)))for(r=0;r<a.length;r++)_p(a[r])}}function _c(a,r){var d=a.stateNode;if(d===null)return null;var m=d[Fi]||null;if(m===null)return null;d=m[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(a=a.type,m=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!m;break e;default:a=!1}if(a)return null;if(d&&typeof d!="function")throw Error(i(231,r,typeof d));return d}var gr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Mp=!1;if(gr)try{var Sc={};Object.defineProperty(Sc,"passive",{get:function(){Mp=!0}}),window.addEventListener("test",Sc,Sc),window.removeEventListener("test",Sc,Sc)}catch{Mp=!1}var na=null,dh=null,Nl=null;function Bu(){if(Nl)return Nl;var a,r=dh,d=r.length,m,_="value"in na?na.value:na.textContent,T=_.length;for(a=0;a<d&&r[a]===_[a];a++);var U=d-a;for(m=1;m<=U&&r[d-m]===_[T-m];m++);return Nl=_.slice(a,1<m?1-m:void 0)}function Vu(a){var r=a.keyCode;
vendor: 2,821 bytes, line 8
8return"charCode"in a?(a=a.charCode,a===0&&r===13&&(a=13)):a=r,a===10&&(a=13),32<=a||a===13?a:0}function Mc(){return!0}function S0(){return!1}function Ms(a){function r(d,m,_,T,U){this._reactName=d,this._targetInst=_,this.type=m,this.nativeEvent=T,this.target=U,this.currentTarget=null;for(var G in a)a.hasOwnProperty(G)&&(d=a[G],this[G]=d?d(T):T[G]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?Mc:S0,this.isPropagationStopped=S0,this}return y(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=Mc)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=Mc)},persist:function(){},isPersistent:Mc}),r}var zo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fu=Ms(zo),wc=y({},zo,{view:0,detail:0}),M0=Ms(wc),ku,hh,Tc,Ec=y({},wc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gh,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==Tc&&(Tc&&a.type==="mousemove"?(ku=a.screenX-Tc.screenX,hh=a.screenY-Tc.screenY):hh=ku=0,Tc=a),ku)},movementY:function(a){return"movementY"in a?a.movementY:hh}}),wp=Ms(Ec),w0=y({},Ec,{dataTransfer:0}),T0=Ms(w0),Tp=y({},wc,{relatedTarget:0}),fh=Ms(Tp),E0=y({},zo,{animationName:0,elapsedTime:0,pseudoElement:0}),Sb=Ms(E0),Mb=y({},zo,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),A0=Ms(Mb),Hu=y({},zo,{data:0}),ph=Ms(Hu),mh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},C0={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},R0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ep(a){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(a):(a=R0[a])?!!r[a]:!1}function gh(){return Ep}var N0=y({},wc,{key:function(a){if(a.key){var r=mh[a.key]||a.key;if(r!=="Unidentified")return r}
vendor: 5,186 bytes, line 8
8return a.type==="keypress"?(a=Vu(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?C0[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gh,charCode:function(a){return a.type==="keypress"?Vu(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Vu(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),Dl=Ms(N0),xh=y({},Ec,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ap=Ms(xh),Cp=y({},wc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gh}),D0=Ms(Cp),L0=y({},zo,{propertyName:0,elapsedTime:0,pseudoElement:0}),wb=Ms(L0),rs=y({},Ec,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),I0=Ms(rs),P0=y({},zo,{newState:0,oldState:0}),U0=Ms(P0),O0=[9,13,27,32],Ll=gr&&"CompositionEvent"in window,Ac=null;gr&&"documentMode"in document&&(Ac=document.documentMode);var yh=gr&&"TextEvent"in window&&!Ac,Rp=gr&&(!Ll||Ac&&8<Ac&&11>=Ac),z0=" ",Gu=!1;function vh(a,r){switch(a){case"keyup":return O0.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Np(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Il=!1;function B0(a,r){switch(a){case"compositionend":return Np(r);case"keypress":return r.which!==32?null:(Gu=!0,z0);case"textInput":return a=r.data,a===z0&&Gu?null:a;default:return null}}function Dp(a,r){if(Il)return a==="compositionend"||!Ll&&vh(a,r)?(a=Bu(),Nl=dh=na=null,Il=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Rp&&r.locale!=="ko"?null:r.data;default:return null}}var Lp={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ip(a){var r=a&&a.nodeName&&a.nodeName.toLowerCase();return r==="input"?!!Lp[a.type]:r==="textarea"}function bh(a,r,d,m){Rl?Oo?Oo.push(m):Oo=[m]:Rl=m,r=Gx(r,"onChange"),0<r.length&&(d=new Fu("onChange","change",null,d,m),a.push({event:d,listeners:r}))}var Bo=null,Pl=null;function V0(a){RT(a,0)}function Cc(a){var r=Po(a);if(fn(r))return a}function Pp(a,r){if(a==="change")return r}var xr=!1;if(gr){var ju;if(gr){var Up="oninput"in document;if(!Up){var Op=document.createElement("div");Op.setAttribute("oninput","return;"),Up=typeof Op.oninput=="function"}ju=Up}else ju=!1;xr=ju&&(!document.documentMode||9<document.documentMode)}function wa(){Bo&&(Bo.detachEvent("onpropertychange",Wu),Pl=Bo=null)}function Wu(a){if(a.propertyName==="value"&&Cc(Pl)){var r=[];bh(r,Pl,a,ch(a)),Sp(V0,r)}}function F0(a,r,d){a==="focusin"?(wa(),Bo=r,Pl=d,Bo.attachEvent("onpropertychange",Wu)):a==="focusout"&&wa()}function zp(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Cc(Pl)}function k0(a,r){if(a==="click")return Cc(r)}function H0(a,r){if(a==="input"||a==="change")return Cc(r)}function Bp(a,r){return a===r&&(a!==0||1/a===1/r)||a!==a&&r!==r}var ws=typeof Object.is=="function"?Object.is:Bp;function Rc(a,r){if(ws(a,r))return!0;if(typeof a!="object"||a===null||typeof r!="object"||r===null)return!1;var d=Object.keys(a),m=Object.keys(r);if(d.length!==m.length)return!1;for(m=0;m<d.length;m++){var _=d[m];if(!Pt.call(r,_)||!ws(a[_],r[_]))return!1}return!0}function Xu(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function Nc(a,r){var d=Xu(a);a=0;for(var m;d;){if(d.nodeType===3){if(m=a+d.textContent.length,a<=r&&m>=r)return{node:d,offset:r-a};a=m}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=Xu(d)}}function Yn(a,r){return a&&r?a===r?!0:a&&a.nodeType===3?!1:r&&r.nodeType===3?Yn(a,r.parentNode):"contains"in a?a.contains(r):a.compareDocumentPosition?!!(a.compareDocumentPosition(r)&16):!1:!1}function G0(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var r=Ht(a.document);r instanceof a.HTMLIFrameElement;){try{var d=typeof r.contentWindow.location.href=="string"}catch{d=!1}if(d)a=r.contentWindow;else break;r=Ht(a.document)}return r}function Vp(a){var r=a&&a.nodeName&&a.nodeName.toLowerCase();return r&&(r==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||r==="textarea"||a.contentEditable==="true")}var j0=gr&&"documentMode"in document&&11>=document.documentMode,yr=null,vr=null,Dc=null,_h=!1;function Lc(a,r,d){var m=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;_h||yr==null||yr!==Ht(m)||(m=yr,"selectionStart"in m&&Vp(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focu
vendor: 13,098 bytes, line 8
8sNode:m.focusNode,focusOffset:m.focusOffset}),Dc&&Rc(Dc,m)||(Dc=m,m=Gx(vr,"onSelect"),0<m.length&&(r=new Fu("onSelect","select",null,r,d),a.push({event:r,listeners:m}),r.target=yr)))}function ps(a,r){var d={};return d[a.toLowerCase()]=r.toLowerCase(),d["Webkit"+a]="webkit"+r,d["Moz"+a]="moz"+r,d}var Ul={animationend:ps("Animation","AnimationEnd"),animationiteration:ps("Animation","AnimationIteration"),animationstart:ps("Animation","AnimationStart"),transitionrun:ps("Transition","TransitionRun"),transitionstart:ps("Transition","TransitionStart"),transitioncancel:ps("Transition","TransitionCancel"),transitionend:ps("Transition","TransitionEnd")},qu={},Fp={};gr&&(Fp=document.createElement("div").style,"AnimationEvent"in window||(delete Ul.animationend.animation,delete Ul.animationiteration.animation,delete Ul.animationstart.animation),"TransitionEvent"in window||delete Ul.transitionend.transition);function Jr(a){if(qu[a])return qu[a];if(!Ul[a])return a;var r=Ul[a],d;for(d in r)if(r.hasOwnProperty(d)&&d in Fp)return qu[a]=r[d];return a}var Sh=Jr("animationend"),Yu=Jr("animationiteration"),kp=Jr("animationstart"),W0=Jr("transitionrun"),Tb=Jr("transitionstart"),X0=Jr("transitioncancel"),Hp=Jr("transitionend"),Ta=new Map,Zu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Zu.push("scrollEnd");function Ea(a,r){Ta.set(a,r),oe(r,[a])}var Ku=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},Aa=[],eo=0,Zi=0;function $u(){for(var a=eo,r=Zi=eo=0;r<a;){var d=Aa[r];Aa[r++]=null;var m=Aa[r];Aa[r++]=null;var _=Aa[r];Aa[r++]=null;var T=Aa[r];if(Aa[r++]=null,m!==null&&_!==null){var U=m.pending;U===null?_.next=_:(_.next=U.next,U.next=_),m.pending=_}T!==0&&Vo(d,_,T)}}function Ki(a,r,d,m){Aa[eo++]=a,Aa[eo++]=r,Aa[eo++]=d,Aa[eo++]=m,Zi|=m,a.lanes|=m,a=a.alternate,a!==null&&(a.lanes|=m)}function Mh(a,r,d,m){return Ki(a,r,d,m),Ca(a)}function Ts(a,r){return Ki(a,null,null,r),Ca(a)}function Vo(a,r,d){a.lanes|=d;var m=a.alternate;m!==null&&(m.lanes|=d);for(var _=!1,T=a.return;T!==null;)T.childLanes|=d,m=T.alternate,m!==null&&(m.childLanes|=d),T.tag===22&&(a=T.stateNode,a===null||a._visibility&1||(_=!0)),a=T,T=T.return;return a.tag===3?(T=a.stateNode,_&&r!==null&&(_=31-lt(d),a=T.hiddenUpdates,m=a[_],m===null?a[_]=[r]:m.push(r),r.lane=d|536870912),T):null}function Ca(a){if(50<sl)throw sl=0,ec=null,Error(i(185));for(var r=a.return;r!==null;)a=r,r=a.return;return a.tag===3?a.stateNode:null}var Fo={};function Gp(a,r,d,m){this.tag=a,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,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 ui(a,r,d,m){return new Gp(a,r,d,m)}function wh(a){return a=a.prototype,!(!a||!a.isReactComponent)}function zs(a,r){var d=a.alternate;return d===null?(d=ui(a.tag,r,a.key,a.mode),d.elementType=a.elementType,d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.pendingProps=r,d.type=a.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=a.flags&65011712,d.childLanes=a.childLanes,d.lanes=a.lanes,d.child=a.child,d.memoizedProps=a.memoizedProps,d.memoizedState=a.memoizedState,d.updateQueue=a.updateQueue,r=a.dependencies,d.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},d.sibling=a.sibling,d.index=a.index,d.ref=a.ref,d.refCleanup=a.refCleanup,d}function Ic(a,r){a.flags&=65011714;var d=a.alternate;return d===null?(a.childLanes=0,a.lanes=r,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=d.childLanes,a.lanes=d.lanes,a.child=d.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=d.memoizedProps,a.memoizedState=d.memoizedState,a.updateQueue=d.updateQueue,a.type=d.type,r=d.dependencies,a.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),a}function br(a,r,d,m,_,T){var U=0;if(m=a,typeof a=="function")wh(a)&&(U=1);else if(typeof a=="string")U=sP(a,d,Ie.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case V:return a=ui(31,d,r,_),a.elementType=V,a.lanes=T,a;case R:return ko(d.children,_,T,r);case A:U=8,_|=24;break;case w:return a=ui(12,d,r,_|2),a.elementType=w,a.lanes=T,a;case B:return a=ui(13,d,r,_),a.elementType=B,a.lanes=T,a;case O:return a=ui(19,d,r,_),a.elementType=O,a.lanes=T,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case L:U=10;break e;case N:U=9;break e;case I:U=11;break e;case F:U=14;break e;case P:U=16,m=null;break e}U=29,d=Error(i(130,a===null?"null":typeof a,"")),m=null}return r=ui(U,d,r,_),r.elementType=a,r.type=m,r.lanes=T,r}function ko(a,r,d,m){return a=ui(7,a,m,r),a.lanes=d,a}function Th(a,r,d){return a=ui(6,a,null,r),a.lanes=d,a}function Pc(a){var r=ui(18,null,null,0);return r.stateNode=a,r}function Eh(a,r,d){return r=ui(4,a.children!==null?a.children:[],a.key,r),r.lanes=d,r.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},r}var Qu=new WeakMap;function ia(a,r){if(typeof a=="object"&&a!==null){var d=Qu.get(a);return d!==void 0?d:(r={value:a,source:r,stack:st(r)},Qu.set(a,r),r)}return{value:a,source:r,stack:st(r)}}var Ho=[],Go=0,Uc=null,Oc=0,Bs=[],si=0,to=null,di=1,tr="";function _r(a,r){Ho[Go++]=Oc,Ho[Go++]=Uc,Uc=a,Oc=r}function q0(a,r,d){Bs[si++]=di,Bs[si++]=tr,Bs[si++]=to,to=a;var m=di;a=tr;var _=32-lt(m)-1;m&=~(1<<_),d+=1;var T=32-lt(r)+_;if(30<T){var U=_-_%5;T=(m&(1<<U)-1).toString(32),m>>=U,_-=U,di=1<<32-lt(r)+_|d<<_|m,tr=T+a}else di=1<<T|d<<_|m,tr=a}function Sr(a){a.return!==null&&(_r(a,1),q0(a,1,0))}function Ah(a){for(;a===Uc;)Uc=Ho[--Go],Ho[Go]=null,Oc=Ho[--Go],Ho[Go]=null;for(;a===to;)to=Bs[--si],Bs[si]=null,tr=Bs[--si],Bs[si]=null,di=Bs[--si],Bs[si]=null}function Ch(a,r){Bs[si++]=di,Bs[si++]=tr,Bs[si++]=to,di=r.id,tr=r.overflow,to=a}var _i=null,Zn=null,vn=!1,no=null,sa=!1,zc=Error(i(519));function Mr(a){var r=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw wr(ia(r,a)),zc}function Y0(a){var r=a.stateNode,d=a.type,m=a.memoizedProps;switch(r[ii]=a,r[Fi]=m,d){case"dialog":wn("cancel",r),wn("close",r);break;case"iframe":case"object":case"embed":wn("load",r);break;case"video":case"audio":for(d=0;d<ka.length;d++)wn(ka[d],r);break;case"source":wn("error",r);break;case"img":case"image":case"link":wn("error",r),wn("load",r);break;case"details":wn("toggle",r);break;case"input":wn("invalid",r),Yi(r,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":wn("invalid",r);break;case"textarea":wn("invalid",r),ta(r,m.value,m.defaultValue,m.children)}d=m.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||r.textContent===""+d||m.suppressHydrationWarning===!0||IT(r.textContent,d)?(m.popover!=null&&(wn("beforetoggle",r),wn("toggle",r)),m.onScroll!=null&&wn("scroll",r),m.onScrollEnd!=null&&wn("scrollend",r),m.onClick!=null&&(r.onclick=Qr),r=!0):r=!1,r||Mr(a,!0)}function Z0(a){for(_i=a.return;_i;)switch(_i.tag){case 5:case 31:case 13:sa=!1;return;case 27:case 3:sa=!0;return;default:_i=_i.return}}function Bc(a){if(a!==_i)return!1;if(!vn)return Z0(a),vn=!0,!1;var r=a.tag,d;if((d=r!==3&&r!==27)&&((d=r===5)&&(d=a.type,d=!(d!=="form"&&d!=="button")||kb(a.type,a.memoizedProps)),d=!d),d&&Zn&&Mr(a),Z0(a),r===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(i(317));Zn=HT(a)}else if(r===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(i(317));Zn=HT(a)}else r===27?(r=Zn,su(a.type)?(a=Xb,Xb=null,Zn=a):Zn=r):Zn=_i?Br(a.stateNode.nextSibling):null;return!0}function jo(){Zn=_i=null,vn=!1}function Rh(){var a=no;return a!==null&&(Mi===null?Mi=a:Mi.push.apply(Mi,a),no=null),a}function wr(a){no===null?no=[a]:no.push(a)}var Vc=q(null),Wo=null,Tr=null;function io(a,r,d){Ae(Vc,r._currentValue),r._currentValue=d}function Er(a){a._currentValue=Vc.current,ae(Vc)}function Nh(a,r,d){for(;a!==null;){var m=a.alternate;if((a.childLanes&r)!==r?(a.childLanes|=r,m!==null&&(m.childLanes|=r)):m!==null&&(m.childLanes&r)!==r&&(m.childLanes|=r),a===d)break;a=a.return}}function Dh(a,r,d,m){var _=a.child;for(_!==null&&(_.return=a);_!==null;){var T=_.dependencies;if(T!==null){var U=_.child;T=T.firstContext;e:for(;T!==null;){var G=T;T=_;for(var te=0;te<r.length;te++)if(G.context===r[te]){T.lanes|=d,G=T.alternate,G!==null&&(G.lanes|=d),Nh(T.return,d,a),m||(U=null);break e}T=G.next}}else if(_.tag===18){if(U=_.return,U===null)throw Error(i(341));U.lanes|=d,T=U.alternate,T!==null&&(T.lanes|=d),Nh(U,d,a),U=null}else U=_.child;if(U!==null)U.return=_;else for(U=_;U!==null;){if(U===a){U=null;break}if(_=U.sibling,_!==null){_.return=U.return,U=_;break}U=U.return}_=U}}function Ar(a,r,d,m){a=null;for(var _=r,T=!1;_!==null;){if(!T){if((_.flags&524288)!==0)T=!0;else if((_.flags&262144)!==0)break}if(_.tag===10){var U=_.alternate;if(U===null)throw Error(i(387));if(U=U.memoizedProps,U!==null){var G=_.type;ws(_.pendingProps.value,U.value)||(a!==null?a.push(G):a=[G])}}else if(_===Be.current){if(U=_.alternate,U===null)throw Error(i(387));U.memoizedState.memoizedState!==_.memoizedState.memoizedState&&(a!==null?a.push(Fm):a=[Fm])}_=_.return}a!==null&&Dh(r,a,d,m),r.flags|=262144}function Ju(a){for(a=a.firstContext;a!==null;){if(!ws(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function Xo(a){Wo=a,Tr=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function Ft(a){return K0(Wo,a)}function Fc(a,r){return Wo===null&&Xo(a),K0(a,r)}function K0(a,r){var d=r._currentValue;if(r={context:r,memoizedValue:d,next:null},Tr===null){if(a===null)throw Error(i(308));Tr=r,a.dependencies={lanes:0,firstContext:r},a.flags|=524288}else Tr=Tr.next=r;return d}var $0=typeof AbortController<"u"?AbortController:function(){var a=[],r=this.signal={aborted:!1,addEventListener:function(d,m){a.push(m)}};this.abort=function(){r.aborted=!0,a.forEach(function(d){return d()})}},Eb=n.unstable_scheduleCallback,Ab=n.unstable_NormalPriority,Pi={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function jp(){return{controller:new $0,data:new Map,refCount:0}}function Ol(a){a.refCount--,a.refCount===0&&Eb(Ab,function(){a.controller.abort()})}var aa=null,Lh=0,so=0,Ra=null;function Wp(a,r){if(aa===null){var d=aa=[];Lh=0,so=Me(),Ra={status:"pending",value:void 0,then:function(m){d.push(m)}}}return Lh++,r.then(Xp,Xp),r}function Xp(){if(--Lh===0&&aa!==null){Ra!==null&&(Ra.status="fulfilled");var a=aa;aa=null,so=0,Ra=null;for(var r=0;r<a.length;r++)(0,a[r])()}}function qp(a,r){var d=[],m={status:"pending",value:null,reason:null,then:function(_){d.push(_)}};return a.then(function(){m.status="fulfilled",m.value=r;for(var _=0;_<d.length;_++)(0,d[_])(r)},function(_){for(m.status="rejected",m.reason=_,_=0;_<d.length;_++)(0,d[_])(void 0)}),m}var Q0=Y.S;Y.S=function(a,r){Pm=He(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&Wp(a,r),Q0!==null&&Q0(a,r)};var qo=q(null);function Ih(){var a=qo.current;return a!==null?a:Wt.pooledCache}function ed(a,r){r===null?Ae(qo,qo.current):Ae(qo,r.pool)}function Yp(){var a=Ih();return a===null?null:{parent:Pi._currentValue,pool:a}}var zl=Error(i(460)),td=Error(i(474)),rn=Error(i(542)),Ph={then:function(){}};function Vs(a){return a=a.status,a==="fulfilled"||a==="rejected"}function Uh(a,r,d){switch(d=a[d],d===void 0?a.push(r):d!==r&&(r.then(Qr,Qr),r=d),r.status){case"fulfilled":return r.value;case"rejected":throw a=r.reason,Fl(a),a;default:if(typeof r.status=="string")r.then(Qr,Qr);else{if(a=Wt,a!==null&&100<a.shellSuspendCounter)throw Error(i(482));a=r,a.status="pending",a.then(function(m){if(r.status==="pending"){var _=r;_.status="fulfilled",_.value=m}},function(m){if(r.status==="pending"){var _=r;_.status="rejected",_.reason=m}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw a=r.reason,Fl(a),a}throw Cr=r,zl}}function Bl(a){try{var r=a._init;return r(a._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(Cr=d,zl):d}}var Cr=null;
vendor: 7,426 bytes, line 8
8function Vl(){if(Cr===null)throw Error(i(459));var a=Cr;return Cr=null,a}function Fl(a){if(a===zl||a===rn)throw Error(i(483))}var kl=null,Hl=0;function nd(a){var r=Hl;return Hl+=1,kl===null&&(kl=[]),Uh(kl,a,r)}function Na(a,r){r=r.props.ref,a.ref=r!==void 0?r:null}function kc(a,r){throw r.$$typeof===v?Error(i(525)):(a=Object.prototype.toString.call(r),Error(i(31,a==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":a)))}function Oh(a){function r(ce,re){if(a){var ye=ce.deletions;ye===null?(ce.deletions=[re],ce.flags|=16):ye.push(re)}}function d(ce,re){if(!a)return null;for(;re!==null;)r(ce,re),re=re.sibling;return null}function m(ce){for(var re=new Map;ce!==null;)ce.key!==null?re.set(ce.key,ce):re.set(ce.index,ce),ce=ce.sibling;return re}function _(ce,re){return ce=zs(ce,re),ce.index=0,ce.sibling=null,ce}function T(ce,re,ye){return ce.index=ye,a?(ye=ce.alternate,ye!==null?(ye=ye.index,ye<re?(ce.flags|=67108866,re):ye):(ce.flags|=67108866,re)):(ce.flags|=1048576,re)}function U(ce){return a&&ce.alternate===null&&(ce.flags|=67108866),ce}function G(ce,re,ye,Pe){return re===null||re.tag!==6?(re=Th(ye,ce.mode,Pe),re.return=ce,re):(re=_(re,ye),re.return=ce,re)}function te(ce,re,ye,Pe){var It=ye.type;return It===R?Le(ce,re,ye.props.children,Pe,ye.key):re!==null&&(re.elementType===It||typeof It=="object"&&It!==null&&It.$$typeof===P&&Bl(It)===re.type)?(re=_(re,ye.props),Na(re,ye),re.return=ce,re):(re=br(ye.type,ye.key,ye.props,null,ce.mode,Pe),Na(re,ye),re.return=ce,re)}function ve(ce,re,ye,Pe){return re===null||re.tag!==4||re.stateNode.containerInfo!==ye.containerInfo||re.stateNode.implementation!==ye.implementation?(re=Eh(ye,ce.mode,Pe),re.return=ce,re):(re=_(re,ye.children||[]),re.return=ce,re)}function Le(ce,re,ye,Pe,It){return re===null||re.tag!==7?(re=ko(ye,ce.mode,Pe,It),re.return=ce,re):(re=_(re,ye),re.return=ce,re)}function ze(ce,re,ye){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return re=Th(""+re,ce.mode,ye),re.return=ce,re;if(typeof re=="object"&&re!==null){switch(re.$$typeof){case S:return ye=br(re.type,re.key,re.props,null,ce.mode,ye),Na(ye,re),ye.return=ce,ye;case M:return re=Eh(re,ce.mode,ye),re.return=ce,re;case P:return re=Bl(re),ze(ce,re,ye)}if(Q(re)||ee(re))return re=ko(re,ce.mode,ye,null),re.return=ce,re;if(typeof re.then=="function")return ze(ce,nd(re),ye);if(re.$$typeof===L)return ze(ce,Fc(ce,re),ye);kc(ce,re)}return null}function Se(ce,re,ye,Pe){var It=re!==null?re.key:null;if(typeof ye=="string"&&ye!==""||typeof ye=="number"||typeof ye=="bigint")return It!==null?null:G(ce,re,""+ye,Pe);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case S:return ye.key===It?te(ce,re,ye,Pe):null;case M:return ye.key===It?ve(ce,re,ye,Pe):null;case P:return ye=Bl(ye),Se(ce,re,ye,Pe)}if(Q(ye)||ee(ye))return It!==null?null:Le(ce,re,ye,Pe,null);if(typeof ye.then=="function")return Se(ce,re,nd(ye),Pe);if(ye.$$typeof===L)return Se(ce,re,Fc(ce,ye),Pe);kc(ce,ye)}return null}function Te(ce,re,ye,Pe,It){if(typeof Pe=="string"&&Pe!==""||typeof Pe=="number"||typeof Pe=="bigint")return ce=ce.get(ye)||null,G(re,ce,""+Pe,It);if(typeof Pe=="object"&&Pe!==null){switch(Pe.$$typeof){case S:return ce=ce.get(Pe.key===null?ye:Pe.key)||null,te(re,ce,Pe,It);case M:return ce=ce.get(Pe.key===null?ye:Pe.key)||null,ve(re,ce,Pe,It);case P:return Pe=Bl(Pe),Te(ce,re,ye,Pe,It)}if(Q(Pe)||ee(Pe))return ce=ce.get(ye)||null,Le(re,ce,Pe,It,null);if(typeof Pe.then=="function")return Te(ce,re,ye,nd(Pe),It);if(Pe.$$typeof===L)return Te(ce,re,ye,Fc(re,Pe),It);kc(re,Pe)}return null}function St(ce,re,ye,Pe){for(var It=null,zn=null,Tt=re,dn=re=0,An=null;Tt!==null&&dn<ye.length;dn++){Tt.index>dn?(An=Tt,Tt=null):An=Tt.sibling;var Bn=Se(ce,Tt,ye[dn],Pe);if(Bn===null){Tt===null&&(Tt=An);break}a&&Tt&&Bn.alternate===null&&r(ce,Tt),re=T(Bn,re,dn),zn===null?It=Bn:zn.sibling=Bn,zn=Bn,Tt=An}if(dn===ye.length)return d(ce,Tt),vn&&_r(ce,dn),It;if(Tt===null){for(;dn<ye.length;dn++)Tt=ze(ce,ye[dn],Pe),Tt!==null&&(re=T(Tt,re,dn),zn===null?It=Tt:zn.sibling=Tt,zn=Tt);return vn&&_r(ce,dn),It}for(Tt=m(Tt);dn<ye.length;dn++)An=Te(Tt,ce,dn,ye[dn],Pe),An!==null&&(a&&An.alternate!==null&&Tt.delete(An.key===null?dn:An.key),re=T(An,re,dn),zn===null?It=An:zn.sibling=An,zn=An);return a&&Tt.forEach(function(cu){return r(ce,cu)}),vn&&_r(ce,dn),It}function Vt(ce,re,ye,Pe){if(ye==null)throw Error(i(151));for(var It=null,zn=null,Tt=re,dn=re=0,An=null,Bn=ye.next();Tt!==null&&!Bn.done;dn++,Bn=ye.next()){Tt.index>dn?(An=Tt,Tt=null):An=Tt.sibling;var cu=Se(ce,Tt,Bn.value,Pe);if(cu===null){Tt===null&&(Tt=An);break}a&&Tt&&cu.alternate===null&&r(ce,Tt),re=T(cu,re,dn),zn===null?It=cu:zn.sibling=cu,zn=cu,Tt=An}if(Bn.done)return d(ce,Tt),vn&&_r(ce,dn),It;if(Tt===null){for(;!Bn.done;dn++,Bn=ye.next())Bn=ze(ce,Bn.value,Pe),Bn!==null&&(re=T(Bn,re,dn),zn===null?It=Bn:zn.sibling=Bn,zn=Bn);return vn&&_r(ce,dn),It}for(Tt=m(Tt);!Bn.done;dn++,Bn=ye.next())Bn=Te(Tt,ce,dn,Bn.value,Pe),Bn!==null&&(a&&Bn.alternate!==null&&Tt.delete(Bn.key===null?dn:Bn.key),re=T(Bn,re,dn),zn===null?It=Bn:zn.sibling=Bn,zn=Bn);return a&&Tt.forEach(function(mP){return r(ce,mP)}),vn&&_r(ce,dn),It}function Qn(ce,re,ye,Pe){if(typeof ye=="object"&&ye!==null&&ye.type===R&&ye.key===null&&(ye=ye.props.children),typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case S:e:{for(var It=ye.key;re!==null;){if(re.key===It){if(It=ye.type,It===R){if(re.tag===7){d(ce,re.sibling),Pe=_(re,ye.props.children),Pe.return=ce,ce=Pe;break e}}else if(re.elementType===It||typeof It=="object"&&It!==null&&It.$$typeof===P&&Bl(It)===re.type){d(ce,re.sibling),Pe=_(re,ye.props),Na(Pe,ye),Pe.return=ce,ce=Pe;break e}d(ce,re);break}else r(ce,re);re=re.sibling}ye.type===R?(Pe=ko(ye.props.children,ce.mode,Pe,ye.key),Pe.return=ce,ce=Pe):(Pe=br(ye.type,ye.key,ye.props,null,ce.mode,Pe),Na(Pe,ye),Pe.return=ce,ce=Pe)}return U(ce);case M:e:{for(It=ye.key;re!==null;){if(re.key===It)if(re.tag===4&&re.stateNode.containerInfo===ye.containerInfo&&re.stateNode.implementation===ye.implementation){d(ce,re.sibling),Pe=_(re,ye.children||[]),Pe.return=ce,ce=Pe;break e}else{d(ce,re);break}else r(ce,re);re=re.sibling}Pe=Eh(ye,ce.mode,Pe),Pe.return=ce,ce=Pe}return U(ce);case P:return ye=Bl(ye),Qn(ce,re,ye,Pe)}if(Q(ye))return St(ce,re,ye,Pe);if(ee(ye)){if(It=ee(ye),typeof It!="function")throw Error(i(150));return ye=It.call(ye),Vt(ce,re,ye,Pe)}if(typeof ye.then=="function")return Qn(ce,re,nd(ye),Pe);if(ye.$$typeof===L)return Qn(ce,re,Fc(ce,ye),Pe);kc(ce,ye)}return typeof ye=="string"&&ye!==""||typeof ye=="number"||typeof ye=="bigint"?(ye=""+ye,re!==null&&re.tag===6?(d(ce,re.sibling),Pe=_(re,ye),Pe.return=ce,ce=Pe):(d(ce,re),Pe=Th(ye,ce.mode,Pe),Pe.return=ce,ce=Pe),U(ce)):d(ce,re)}return function(ce,re,ye,Pe){try{Hl=0;var It=Qn(ce,re,ye,Pe);return kl=null,It}catch(Tt){if(Tt===zl||Tt===rn)throw Tt;var zn=ui(29,Tt,null,ce.mode);return zn.lanes=Pe,zn.return=ce,zn}}}var ao=Oh(!0),zh=Oh(!1),Es=!1;function id(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Zp(a,r){a=a.updateQueue,r.updateQueue===a&&(r.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function ro(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function Yo(a,r,d){var m=a.updateQueue;if(m===null)return null;if(m=m.shared,(At&2)!==0){var _=m.pending;
vendor: 4,052 bytes, line 8
8return _===null?r.next=r:(r.next=_.next,_.next=r),m.pending=r,r=Ca(a),Vo(a,null,d),r}return Ki(a,m,r,d),Ca(a)}function Zo(a,r,d){if(r=r.updateQueue,r!==null&&(r=r.shared,(d&4194048)!==0)){var m=r.lanes;m&=a.pendingLanes,d|=m,r.lanes=d,bs(a,d)}}function Lt(a,r){var d=a.updateQueue,m=a.alternate;if(m!==null&&(m=m.updateQueue,d===m)){var _=null,T=null;if(d=d.firstBaseUpdate,d!==null){do{var U={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};T===null?_=T=U:T=T.next=U,d=d.next}while(d!==null);T===null?_=T=r:T=T.next=r}else _=T=r;d={baseState:m.baseState,firstBaseUpdate:_,lastBaseUpdate:T,shared:m.shared,callbacks:m.callbacks},a.updateQueue=d;return}a=d.lastBaseUpdate,a===null?d.firstBaseUpdate=r:a.next=r,d.lastBaseUpdate=r}var Kp=!1;function sd(){if(Kp){var a=Ra;if(a!==null)throw a}}function Hc(a,r,d,m){Kp=!1;var _=a.updateQueue;Es=!1;var T=_.firstBaseUpdate,U=_.lastBaseUpdate,G=_.shared.pending;if(G!==null){_.shared.pending=null;var te=G,ve=te.next;te.next=null,U===null?T=ve:U.next=ve,U=te;var Le=a.alternate;Le!==null&&(Le=Le.updateQueue,G=Le.lastBaseUpdate,G!==U&&(G===null?Le.firstBaseUpdate=ve:G.next=ve,Le.lastBaseUpdate=te))}if(T!==null){var ze=_.baseState;U=0,Le=ve=te=null,G=T;do{var Se=G.lane&-536870913,Te=Se!==G.lane;if(Te?(an&Se)===Se:(m&Se)===Se){Se!==0&&Se===so&&(Kp=!0),Le!==null&&(Le=Le.next={lane:0,tag:G.tag,payload:G.payload,callback:null,next:null});e:{var St=a,Vt=G;Se=r;var Qn=d;switch(Vt.tag){case 1:if(St=Vt.payload,typeof St=="function"){ze=St.call(Qn,ze,Se);break e}ze=St;break e;case 3:St.flags=St.flags&-65537|128;case 0:if(St=Vt.payload,Se=typeof St=="function"?St.call(Qn,ze,Se):St,Se==null)break e;ze=y({},ze,Se);break e;case 2:Es=!0}}Se=G.callback,Se!==null&&(a.flags|=64,Te&&(a.flags|=8192),Te=_.callbacks,Te===null?_.callbacks=[Se]:Te.push(Se))}else Te={lane:Se,tag:G.tag,payload:G.payload,callback:G.callback,next:null},Le===null?(ve=Le=Te,te=ze):Le=Le.next=Te,U|=Se;if(G=G.next,G===null){if(G=_.shared.pending,G===null)break;Te=G,G=Te.next,Te.next=null,_.lastBaseUpdate=Te,_.shared.pending=null}}while(!0);Le===null&&(te=ze),_.baseState=te,_.firstBaseUpdate=ve,_.lastBaseUpdate=Le,T===null&&(_.shared.lanes=0),Ur|=U,a.lanes=U,a.memoizedState=ze}}function Gc(a,r){if(typeof a!="function")throw Error(i(191,a));a.call(r)}function J0(a,r){var d=a.callbacks;if(d!==null)for(a.callbacks=null,a=0;a<d.length;a++)Gc(d[a],r)}var jc=q(null),Bh=q(0);function ex(a,r){a=ca,Ae(Bh,a),Ae(jc,r),ca=a|r.baseLanes}function $p(){Ae(Bh,ca),Ae(jc,jc.current)}function ad(){ca=Bh.current,ae(jc),ae(Bh)}var Fs=q(null),As=null;function oo(a){var r=a.alternate;Ae(bn,bn.current&1),Ae(Fs,a),As===null&&(r===null||jc.current!==null||r.memoizedState!==null)&&(As=a)}function Qp(a){Ae(bn,bn.current),Ae(Fs,a),As===null&&(As=a)}function tx(a){a.tag===22?(Ae(bn,bn.current),Ae(Fs,a),As===null&&(As=a)):ks()}function ks(){Ae(bn,bn.current),Ae(Fs,Fs.current)}function Ti(a){ae(Fs),As===a&&(As=null),ae(bn)}var bn=q(0);function ra(a){for(var r=a;r!==null;){if(r.tag===13){var d=r.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||jb(d)||Wb(d)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===a)break;for(;r.sibling===null;){if(r.return===null||r.return===a)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var ai=0,en=null,Gn=null,gn=null,Da=!1,Wc=!1,Gl=!1,Vh=0,rd=0,Xc=null,Jp=0;function hi(){throw Error(i(321))}function em(a,r){if(r===null)return!1;for(var d=0;d<r.length&&d<a.length;d++)if(!ws(a[d],r[d]))return!1;return!0}function Fh(a,r,d,m,_,T){return ai=T,en=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,Y.H=a===null||a.memoizedState===null?Ix:bm,Gl=!1,T=d(m,_),Gl=!1,Wc&&(T=jl(r,d,m,_)),nx(a),T}function nx(a){Y.H=qc;var r=Gn!==null&&Gn.next!==null;if(ai=0,gn=Gn=en=null,Da=!1,rd=0,Xc=null,r)throw Error(i(300));
vendor: 5,848 bytes, line 8
8a===null||Ui||(a=a.dependencies,a!==null&&Ju(a)&&(Ui=!0))}function jl(a,r,d,m){en=a;var _=0;do{if(Wc&&(Xc=null),rd=0,Wc=!1,25<=_)throw Error(i(301));if(_+=1,gn=Gn=null,a.updateQueue!=null){var T=a.updateQueue;T.lastEffect=null,T.events=null,T.stores=null,T.memoCache!=null&&(T.memoCache.index=0)}Y.H=La,T=r(d,m)}while(Wc);return T}function Wl(){var a=Y.H,r=a.useState()[0];return r=typeof r.then=="function"?od(r):r,a=a.useState()[0],(Gn!==null?Gn.memoizedState:null)!==a&&(en.flags|=1024),r}function tm(){var a=Vh!==0;return Vh=0,a}function nm(a,r,d){r.updateQueue=a.updateQueue,r.flags&=-2053,a.lanes&=~d}function im(a){if(Da){for(a=a.memoizedState;a!==null;){var r=a.queue;r!==null&&(r.pending=null),a=a.next}Da=!1}ai=0,gn=Gn=en=null,Wc=!1,rd=Vh=0,Xc=null}function ki(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gn===null?en.memoizedState=gn=a:gn=gn.next=a,gn}function Ei(){if(Gn===null){var a=en.alternate;a=a!==null?a.memoizedState:null}else a=Gn.next;var r=gn===null?en.memoizedState:gn.next;if(r!==null)gn=r,Gn=a;else{if(a===null)throw en.alternate===null?Error(i(467)):Error(i(310));Gn=a,a={memoizedState:Gn.memoizedState,baseState:Gn.baseState,baseQueue:Gn.baseQueue,queue:Gn.queue,next:null},gn===null?en.memoizedState=gn=a:gn=gn.next=a}return gn}function kh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function od(a){var r=rd;return rd+=1,Xc===null&&(Xc=[]),a=Uh(Xc,a,r),r=en,(gn===null?r.memoizedState:gn.next)===null&&(r=r.alternate,Y.H=r===null||r.memoizedState===null?Ix:bm),a}function Ko(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return od(a);if(a.$$typeof===L)return Ft(a)}throw Error(i(438,String(a)))}function sm(a){var r=null,d=en.updateQueue;if(d!==null&&(r=d.memoCache),r==null){var m=en.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(r={data:m.data.map(function(_){return _.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),d===null&&(d=kh(),en.updateQueue=d),d.memoCache=r,d=r.data[r.index],d===void 0)for(d=r.data[r.index]=Array(a),m=0;m<a;m++)d[m]=j;return r.index++,d}function lo(a,r){return typeof r=="function"?r(a):r}function Hh(a){var r=Ei();return am(r,Gn,a)}function am(a,r,d){var m=a.queue;if(m===null)throw Error(i(311));m.lastRenderedReducer=d;var _=a.baseQueue,T=m.pending;if(T!==null){if(_!==null){var U=_.next;_.next=T.next,T.next=U}r.baseQueue=_=T,m.pending=null}if(T=a.baseState,_===null)a.memoizedState=T;else{r=_.next;var G=U=null,te=null,ve=r,Le=!1;do{var ze=ve.lane&-536870913;if(ze!==ve.lane?(an&ze)===ze:(ai&ze)===ze){var Se=ve.revertLane;if(Se===0)te!==null&&(te=te.next={lane:0,revertLane:0,gesture:null,action:ve.action,hasEagerState:ve.hasEagerState,eagerState:ve.eagerState,next:null}),ze===so&&(Le=!0);else if((ai&Se)===Se){ve=ve.next,Se===so&&(Le=!0);continue}else ze={lane:0,revertLane:ve.revertLane,gesture:null,action:ve.action,hasEagerState:ve.hasEagerState,eagerState:ve.eagerState,next:null},te===null?(G=te=ze,U=T):te=te.next=ze,en.lanes|=Se,Ur|=Se;ze=ve.action,Gl&&d(T,ze),T=ve.hasEagerState?ve.eagerState:d(T,ze)}else Se={lane:ze,revertLane:ve.revertLane,gesture:ve.gesture,action:ve.action,hasEagerState:ve.hasEagerState,eagerState:ve.eagerState,next:null},te===null?(G=te=Se,U=T):te=te.next=Se,en.lanes|=ze,Ur|=ze;ve=ve.next}while(ve!==null&&ve!==r);if(te===null?U=T:te.next=G,!ws(T,a.memoizedState)&&(Ui=!0,Le&&(d=Ra,d!==null)))throw d;a.memoizedState=T,a.baseState=U,a.baseQueue=te,m.lastRenderedState=T}return _===null&&(m.lanes=0),[a.memoizedState,m.dispatch]}function rm(a){var r=Ei(),d=r.queue;if(d===null)throw Error(i(311));d.lastRenderedReducer=a;var m=d.dispatch,_=d.pending,T=r.memoizedState;if(_!==null){d.pending=null;var U=_=_.next;do T=a(T,U.action),U=U.next;while(U!==_);ws(T,r.memoizedState)||(Ui=!0),r.memoizedState=T,r.baseQueue===null&&(r.baseState=T),d.lastRenderedState=T}return[T,m]}function ix(a,r,d){var m=en,_=Ei(),T=vn;if(T){if(d===void 0)throw Error(i(407));d=d()}else d=r();var U=!ws((Gn||_).memoizedState,d);if(U&&(_.memoizedState=d,Ui=!0),_=_.queue,pm(rx.bind(null,m,_,a),[a]),_.getSnapshot!==r||U||gn!==null&&gn.memoizedState.tag&1){if(m.flags|=2048,$o(9,{destroy:void 0},ax.bind(null,m,_,d,r),null),Wt===null)throw Error(i(349));T||(ai&127)!==0||sx(m,r,d)}return d}function sx(a,r,d){a.flags|=16384,a={getSnapshot:r,value:d},r=en.updateQueue,r===null?(r=kh(),en.updateQueue=r,r.stores=[a]):(d=r.stores,d===null?r.stores=[a]:d.push(a))}function ax(a,r,d,m){r.value=d,r.getSnapshot=m,ox(r)&&lx(a)}function rx(a,r,d){return d(function(){ox(r)&&lx(a)})}function ox(a){var r=a.getSnapshot;a=a.value;try{var d=r();return!ws(a,d)}catch{return!0}}function lx(a){var r=Ts(a,2);r!==null&&ln(r,a,2)}function om(a){var r=ki();if(typeof a=="function"){var d=a;if(a=d(),Gl){rt(!0);try{d()}finally{rt(!1)}}}return r.memoizedState=r.baseState=a,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:lo,lastRenderedState:a},r}function lm(a,r,d,m){return a.baseState=d,am(a,Gn,typeof m=="function"?m:lo)}function Cb(a,r,d,m,_){if(Xh(a))throw Error(i(485));if(a=r.action,a!==null){var T={payload:_,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(U){T.listeners.push(U)}};Y.T!==null?d(!0):T.isTransition=!1,m(T),d=r.pending,d===null?(T.next=r.pending=T,cx(r,T)):(T.next=d.next,r.pending=d.next=T)}}function cx(a,r){var d=r.action,m=r.payload,_=a.state;if(r.isTransition){var T=Y.T,U={};Y.T=U;try{var G=d(_,m),te=Y.S;te!==null&&te(U,G),ux(a,r,G)}catch(ve){cm(a,r,ve)}finally{T!==null&&U.types!==null&&(T.types=U.types),Y.T=T}}else try{T=d(_,m),ux(a,r,T)}catch(ve){cm(a,r,ve)}}function ux(a,r,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(m){dx(a,r,m)},function(m){return cm(a,r,m)}):dx(a,r,d)}function dx(a,r,d){r.status="fulfilled",r.value=d,hx(r),a.state=d,r
vendor: 5,677 bytes, line 8
8=a.pending,r!==null&&(d=r.next,d===r?a.pending=null:(d=d.next,r.next=d,cx(a,d)))}function cm(a,r,d){var m=a.pending;if(a.pending=null,m!==null){m=m.next;do r.status="rejected",r.reason=d,hx(r),r=r.next;while(r!==m)}a.action=null}function hx(a){a=a.listeners;for(var r=0;r<a.length;r++)(0,a[r])()}function um(a,r){return r}function dm(a,r){if(vn){var d=Wt.formState;if(d!==null){e:{var m=en;if(vn){if(Zn){t:{for(var _=Zn,T=sa;_.nodeType!==8;){if(!T){_=null;break t}if(_=Br(_.nextSibling),_===null){_=null;break t}}T=_.data,_=T==="F!"||T==="F"?_:null}if(_){Zn=Br(_.nextSibling),m=_.data==="F!";break e}}Mr(m)}m=!1}m&&(r=d[0])}}return d=ki(),d.memoizedState=d.baseState=r,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:um,lastRenderedState:r},d.queue=m,d=Nx.bind(null,en,m),m.dispatch=d,m=om(!1),T=vm.bind(null,en,!1,m.queue),m=ki(),_={state:r,dispatch:null,action:a,pending:null},m.queue=_,d=Cb.bind(null,en,_,T,d),_.dispatch=d,m.memoizedState=a,[r,d,!1]}function fx(a){var r=Ei();return hm(r,Gn,a)}function hm(a,r,d){if(r=am(a,r,um)[0],a=Hh(lo)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var m=od(r)}catch(U){throw U===zl?rn:U}else m=r;r=Ei();var _=r.queue,T=_.dispatch;return d!==r.memoizedState&&(en.flags|=2048,$o(9,{destroy:void 0},px.bind(null,_,d),null)),[m,T,a]}function px(a,r){a.action=r}function fm(a){var r=Ei(),d=Gn;if(d!==null)return hm(r,d,a);Ei(),r=r.memoizedState,d=Ei();var m=d.queue.dispatch;return d.memoizedState=a,[r,m,!1]}function $o(a,r,d,m){return a={tag:a,create:d,deps:m,inst:r,next:null},r=en.updateQueue,r===null&&(r=kh(),en.updateQueue=r),d=r.lastEffect,d===null?r.lastEffect=a.next=a:(m=d.next,d.next=a,a.next=m,r.lastEffect=a),a}function Gh(){return Ei().memoizedState}function jh(a,r,d,m){var _=ki();en.flags|=a,_.memoizedState=$o(1|r,{destroy:void 0},d,m===void 0?null:m)}function Wh(a,r,d,m){var _=Ei();m=m===void 0?null:m;var T=_.memoizedState.inst;Gn!==null&&m!==null&&em(m,Gn.memoizedState.deps)?_.memoizedState=$o(r,T,d,m):(en.flags|=a,_.memoizedState=$o(1|r,T,d,m))}function mx(a,r){jh(8390656,8,a,r)}function pm(a,r){Wh(2048,8,a,r)}function gx(a){en.flags|=4;var r=en.updateQueue;if(r===null)r=kh(),en.updateQueue=r,r.events=[a];else{var d=r.events;d===null?r.events=[a]:d.push(a)}}function xx(a){var r=Ei().memoizedState;return gx({ref:r,nextImpl:a}),function(){if((At&2)!==0)throw Error(i(440));return r.impl.apply(void 0,arguments)}}function yx(a,r){return Wh(4,2,a,r)}function vx(a,r){return Wh(4,4,a,r)}function bx(a,r){if(typeof r=="function"){a=a();var d=r(a);return function(){typeof d=="function"?d():r(null)}}if(r!=null)return a=a(),r.current=a,function(){r.current=null}}function _x(a,r,d){d=d!=null?d.concat([a]):null,Wh(4,4,bx.bind(null,r,a),d)}function mm(){}function Sx(a,r){var d=Ei();r=r===void 0?null:r;var m=d.memoizedState;return r!==null&&em(r,m[1])?m[0]:(d.memoizedState=[a,r],a)}function Mx(a,r){var d=Ei();r=r===void 0?null:r;var m=d.memoizedState;if(r!==null&&em(r,m[1]))return m[0];if(m=a(),Gl){rt(!0);try{a()}finally{rt(!1)}}return d.memoizedState=[m,r],m}function gm(a,r,d){return d===void 0||(ai&1073741824)!==0&&(an&261930)===0?a.memoizedState=r:(a.memoizedState=d,a=pn(),en.lanes|=a,Ur|=a,d)}function wx(a,r,d,m){return ws(d,r)?d:jc.current!==null?(a=gm(a,d,m),ws(a,r)||(Ui=!0),a):(ai&42)===0||(ai&1073741824)!==0&&(an&261930)===0?(Ui=!0,a.memoizedState=d):(a=pn(),en.lanes|=a,Ur|=a,r)}function Tx(a,r,d,m,_){var T=$.p;$.p=T!==0&&8>T?T:8;var U=Y.T,G={};Y.T=G,vm(a,!1,r,d);try{var te=_(),ve=Y.S;if(ve!==null&&ve(G,te),te!==null&&typeof te=="object"&&typeof te.then=="function"){var Le=qp(te,m);ld(a,r,Le,da(a))}else ld(a,r,m,da(a))}catch(ze){ld(a,r,{then:function(){},status:"rejected",reason:ze},da())}finally{$.p=T,U!==null&&G.types!==null&&(U.types=G.types),Y.T=U}}function Rb(){}function xm(a,r,d,m){if(a.tag!==5)throw Error(i(476));var _=Ex(a).queue;Tx(a,_,r,le,d===null?Rb:function(){return Ax(a),d(m)})}function Ex(a){var r=a.memoizedState;if(r!==null)return r;r={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:lo,lastRenderedState:le},next:null};var d={};return r.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:lo,lastRenderedState:d},next:null},a.memoizedState=r,a=a.alternate,a!==null&&(a.memoizedState=r),r}function Ax(a){var r=Ex(a);r.next===null&&(r=a.alternate.memoizedState),ld(a,r.next.queue,{},da())}function ym(){return Ft(Fm)}function Cx(){return Ei().memoizedState}function Rx(){return Ei().memoizedState}function Nb(a){for(var r=a.return;r!==null;){switch(r.tag){case 24:case 3:var d=da();a=ro(d);var m=Yo(r,a,d);m!==null&&(ln(m,r,d),Zo(m,r,d)),r={cache:jp()},a.payload=r;return}r=r.return}}function Db(a,r,d){var m=da();d={lane:m,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},Xh(a)?Dx(r,d):(d=Mh(a,r,d,m),d!==null&&(ln(d,a,m),Lx(d,r,m)))}function Nx(a,r,d){var m=da();ld(a,r,d,m)}function ld(a,r,d,m){var _={lane:m,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(Xh(a))Dx(r,_);else{var T=a.alternate;if(a.lanes===0&&(T===null||T.lanes===0)&&(T=r.lastRenderedReducer,T!==null))try{var U=r.lastRenderedState,G=T(U,d);if(_.hasEagerState=!0,_.eagerState=G,ws(G,U))return Ki(a,r,_,0),Wt===null&&$u(),!1}catch{}if(d=Mh(a,r,_,m),d!==null)return ln(d,a,m),Lx(d,r,m),!0}return!1}function vm(a,r,d,m){if(m={lane:2,revertLane:Me(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Xh(a)){if(r)throw Error(i(479))}else r=Mh(a,d,m,2),r!==null&&ln(r,a,2)}function Xh(a){var r=a.alternate;return a===en||r!==null&&r===en}function Dx(a,r){Wc=Da=!0;var d=a.pending;
vendor: 7,380 bytes, line 8
8d===null?r.next=r:(r.next=d.next,d.next=r),a.pending=r}function Lx(a,r,d){if((d&4194048)!==0){var m=r.lanes;m&=a.pendingLanes,d|=m,r.lanes=d,bs(a,d)}}var qc={readContext:Ft,use:Ko,useCallback:hi,useContext:hi,useEffect:hi,useImperativeHandle:hi,useLayoutEffect:hi,useInsertionEffect:hi,useMemo:hi,useReducer:hi,useRef:hi,useState:hi,useDebugValue:hi,useDeferredValue:hi,useTransition:hi,useSyncExternalStore:hi,useId:hi,useHostTransitionStatus:hi,useFormState:hi,useActionState:hi,useOptimistic:hi,useMemoCache:hi,useCacheRefresh:hi};qc.useEffectEvent=hi;var Ix={readContext:Ft,use:Ko,useCallback:function(a,r){return ki().memoizedState=[a,r===void 0?null:r],a},useContext:Ft,useEffect:mx,useImperativeHandle:function(a,r,d){d=d!=null?d.concat([a]):null,jh(4194308,4,bx.bind(null,r,a),d)},useLayoutEffect:function(a,r){return jh(4194308,4,a,r)},useInsertionEffect:function(a,r){jh(4,2,a,r)},useMemo:function(a,r){var d=ki();r=r===void 0?null:r;var m=a();if(Gl){rt(!0);try{a()}finally{rt(!1)}}return d.memoizedState=[m,r],m},useReducer:function(a,r,d){var m=ki();if(d!==void 0){var _=d(r);if(Gl){rt(!0);try{d(r)}finally{rt(!1)}}}else _=r;return m.memoizedState=m.baseState=_,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:_},m.queue=a,a=a.dispatch=Db.bind(null,en,a),[m.memoizedState,a]},useRef:function(a){var r=ki();return a={current:a},r.memoizedState=a},useState:function(a){a=om(a);var r=a.queue,d=Nx.bind(null,en,r);return r.dispatch=d,[a.memoizedState,d]},useDebugValue:mm,useDeferredValue:function(a,r){var d=ki();return gm(d,a,r)},useTransition:function(){var a=om(!1);return a=Tx.bind(null,en,a.queue,!0,!1),ki().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,r,d){var m=en,_=ki();if(vn){if(d===void 0)throw Error(i(407));d=d()}else{if(d=r(),Wt===null)throw Error(i(349));(an&127)!==0||sx(m,r,d)}_.memoizedState=d;var T={value:d,getSnapshot:r};return _.queue=T,mx(rx.bind(null,m,T,a),[a]),m.flags|=2048,$o(9,{destroy:void 0},ax.bind(null,m,T,d,r),null),d},useId:function(){var a=ki(),r=Wt.identifierPrefix;if(vn){var d=tr,m=di;d=(m&~(1<<32-lt(m)-1)).toString(32)+d,r="_"+r+"R_"+d,d=Vh++,0<d&&(r+="H"+d.toString(32)),r+="_"}else d=Jp++,r="_"+r+"r_"+d.toString(32)+"_";return a.memoizedState=r},useHostTransitionStatus:ym,useFormState:dm,useActionState:dm,useOptimistic:function(a){var r=ki();r.memoizedState=r.baseState=a;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=d,r=vm.bind(null,en,!0,d),d.dispatch=r,[a,r]},useMemoCache:sm,useCacheRefresh:function(){return ki().memoizedState=Nb.bind(null,en)},useEffectEvent:function(a){var r=ki(),d={impl:a};return r.memoizedState=d,function(){if((At&2)!==0)throw Error(i(440));return d.impl.apply(void 0,arguments)}}},bm={readContext:Ft,use:Ko,useCallback:Sx,useContext:Ft,useEffect:pm,useImperativeHandle:_x,useInsertionEffect:yx,useLayoutEffect:vx,useMemo:Mx,useReducer:Hh,useRef:Gh,useState:function(){return Hh(lo)},useDebugValue:mm,useDeferredValue:function(a,r){var d=Ei();return wx(d,Gn.memoizedState,a,r)},useTransition:function(){var a=Hh(lo)[0],r=Ei().memoizedState;return[typeof a=="boolean"?a:od(a),r]},useSyncExternalStore:ix,useId:Cx,useHostTransitionStatus:ym,useFormState:fx,useActionState:fx,useOptimistic:function(a,r){var d=Ei();return lm(d,Gn,a,r)},useMemoCache:sm,useCacheRefresh:Rx};bm.useEffectEvent=xx;var La={readContext:Ft,use:Ko,useCallback:Sx,useContext:Ft,useEffect:pm,useImperativeHandle:_x,useInsertionEffect:yx,useLayoutEffect:vx,useMemo:Mx,useReducer:rm,useRef:Gh,useState:function(){return rm(lo)},useDebugValue:mm,useDeferredValue:function(a,r){var d=Ei();return Gn===null?gm(d,a,r):wx(d,Gn.memoizedState,a,r)},useTransition:function(){var a=rm(lo)[0],r=Ei().memoizedState;return[typeof a=="boolean"?a:od(a),r]},useSyncExternalStore:ix,useId:Cx,useHostTransitionStatus:ym,useFormState:fm,useActionState:fm,useOptimistic:function(a,r){var d=Ei();return Gn!==null?lm(d,Gn,a,r):(d.baseState=a,[a,d.queue.dispatch])},useMemoCache:sm,useCacheRefresh:Rx};La.useEffectEvent=xx;function qh(a,r,d,m){r=a.memoizedState,d=d(m,r),d=d==null?r:y({},r,d),a.memoizedState=d,a.lanes===0&&(a.updateQueue.baseState=d)}var cd={enqueueSetState:function(a,r,d){a=a._reactInternals;var m=da(),_=ro(m);_.payload=r,d!=null&&(_.callback=d),r=Yo(a,_,m),r!==null&&(ln(r,a,m),Zo(r,a,m))},enqueueReplaceState:function(a,r,d){a=a._reactInternals;var m=da(),_=ro(m);_.tag=1,_.payload=r,d!=null&&(_.callback=d),r=Yo(a,_,m),r!==null&&(ln(r,a,m),Zo(r,a,m))},enqueueForceUpdate:function(a,r){a=a._reactInternals;var d=da(),m=ro(d);m.tag=2,r!=null&&(m.callback=r),r=Yo(a,m,d),r!==null&&(ln(r,a,d),Zo(r,a,d))}};function _m(a,r,d,m,_,T,U){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(m,T,U):r.prototype&&r.prototype.isPureReactComponent?!Rc(d,m)||!Rc(_,T):!0}function Sm(a,r,d,m){a=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(d,m),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(d,m),r.state!==a&&cd.enqueueReplaceState(r,r.state,null)}function Qo(a,r){var d=r;if("ref"in r){d={};for(var m in r)m!=="ref"&&(d[m]=r[m])}if(a=a.defaultProps){d===r&&(d=y({},d));for(var _ in a)d[_]===void 0&&(d[_]=a[_])}return d}function Px(a){Ku(a)}function Mm(a){console.error(a)}function wm(a){Ku(a)}function Yh(a,r){try{var d=a.onUncaughtError;d(r.value,{componentStack:r.stack})}catch(m){setTimeout(function(){throw m})}}function Ux(a,r,d){try{var m=a.onCaughtError;m(d.value,{componentStack:d.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(_){setTimeout(function(){throw _})}}function Tm(a,r,d){return d=ro(d),d.tag=3,d.payload={element:null},d.callback=function(){Yh(a,r)},d}function Em(a){return a=ro(a),a.tag=3,a}function Ox(a,r,d,m){var _=d.type.getDerivedStateFromError;if(typeof _=="function"){var T=m.value;a.payload=function(){return _(T)},a.callback=function(){Ux(r,d,m)}}var U=d.stateNode;U!==null&&typeof U.componentDidCatch=="function"&&(a.callback=function(){Ux(r,d,m),typeof _!="function"&&(Ri===null?Ri=new Set([this]):Ri.add(this));var G=m.stack;this.componentDidCatch(m.value,{componentStack:G!==null?G:""})})}function Hi(a,r,d,m,_){if(d.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(r=d.alternate,r!==null&&Ar(r,d,_,!0),d=Fs.current,d!==null){switch(d.tag){case 31:case 13:return As===null?eu():d.alternate===null&&fi===0&&(fi=3),d.flags&=-257,d.flags|=65536,d.lanes=_,m===Ph?d.flags|=16384:(r=d.updateQueue,r===null?d.updateQueue=new Set([m]):r.add(m),_d(a,m,_)),!1;case 22:return d.flags|=65536,m===Ph?d.flags|=16384:(r=d.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([m])},d.updateQueue=r):(d=r.retryQueue,d===null?r.retryQueue=new Set([m]):d.add(m)),_d(a,m,_)),!1}throw Error(i(435,d.tag))}return _d(a,m,_),eu(),!1}if(vn)return r=Fs.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=_,m!==zc&&(a=Error(i(422),{cause:m}),wr(ia(a,d)))):(m!==zc&&(r=Error(i(423),{cause:m}),wr(ia(r,d))),a=a.current.alternate,a.flags|=65536,_&=-_,a.lanes|=_,m=ia(m,d),_=Tm(a.stateNode,m,_),Lt(a,_),fi!==4&&(fi=2)),!1;var T=Error(i(520),{cause:m});if(T=ia(T,d),Jl===null?Jl=[T]:Jl.push(T),fi!==4&&(fi=2),r===null)return!0;m=ia(m,d),d=r;do{switch(d.tag){case 3:return d.flags|=65536,a=_&-_,d.lanes|=a,a=Tm(d.stateNode,m,a),Lt
vendor: 12,802 bytes, line 8
8(d,a),!1;case 1:if(r=d.type,T=d.stateNode,(d.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(Ri===null||!Ri.has(T))))return d.flags|=65536,_&=-_,d.lanes|=_,_=Em(_),Ox(_,a,d,m),Lt(d,_),!1}d=d.return}while(d!==null);return!1}var Zh=Error(i(461)),Ui=!1;function $i(a,r,d,m){r.child=a===null?zh(r,null,d,m):ao(r,a.child,d,m)}function Am(a,r,d,m,_){d=d.render;var T=r.ref;if("ref"in m){var U={};for(var G in m)G!=="ref"&&(U[G]=m[G])}else U=m;return Xo(r),m=Fh(a,r,d,U,T,_),G=tm(),a!==null&&!Ui?(nm(a,r,_),Ai(a,r,_)):(vn&&G&&Sr(r),r.flags|=1,$i(a,r,m,_),r.child)}function Xl(a,r,d,m,_){if(a===null){var T=d.type;return typeof T=="function"&&!wh(T)&&T.defaultProps===void 0&&d.compare===null?(r.tag=15,r.type=T,Kh(a,r,T,m,_)):(a=br(d.type,null,m,r,r.mode,_),a.ref=r.ref,a.return=r,r.child=a)}if(T=a.child,!nf(a,_)){var U=T.memoizedProps;if(d=d.compare,d=d!==null?d:Rc,d(U,m)&&a.ref===r.ref)return Ai(a,r,_)}return r.flags|=1,a=zs(T,m),a.ref=r.ref,a.return=r,r.child=a}function Kh(a,r,d,m,_){if(a!==null){var T=a.memoizedProps;if(Rc(T,m)&&a.ref===r.ref)if(Ui=!1,r.pendingProps=m=T,nf(a,_))(a.flags&131072)!==0&&(Ui=!0);else return r.lanes=a.lanes,Ai(a,r,_)}return Yc(a,r,d,m,_)}function ql(a,r,d,m){var _=m.children,T=a!==null?a.memoizedState:null;if(a===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((r.flags&128)!==0){if(T=T!==null?T.baseLanes|d:d,a!==null){for(m=r.child=a.child,_=0;m!==null;)_=_|m.lanes|m.childLanes,m=m.sibling;m=_&~T}else m=0,r.child=null;return Hs(a,r,T,d,m)}if((d&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},a!==null&&ed(r,T!==null?T.cachePool:null),T!==null?ex(r,T):$p(),tx(r);else return m=r.lanes=536870912,Hs(a,r,T!==null?T.baseLanes|d:d,d,m)}else T!==null?(ed(r,T.cachePool),ex(r,T),ks(),r.memoizedState=null):(a!==null&&ed(r,null),$p(),ks());return $i(a,r,_,d),r.child}function Rr(a,r){return a!==null&&a.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Hs(a,r,d,m,_){var T=Ih();return T=T===null?null:{parent:Pi._currentValue,pool:T},r.memoizedState={baseLanes:d,cachePool:T},a!==null&&ed(r,null),$p(),tx(r),a!==null&&Ar(a,r,m,!0),r.childLanes=_,null}function $h(a,r){return r=tf({mode:r.mode,children:r.children},a.mode),r.ref=a.ref,a.child=r,r.return=a,r}function zx(a,r,d){return ao(r,a.child,null,d),a=$h(r,r.pendingProps),a.flags|=2,Ti(r),r.memoizedState=null,a}function Qh(a,r,d){var m=r.pendingProps,_=(r.flags&128)!==0;if(r.flags&=-129,a===null){if(vn){if(m.mode==="hidden")return a=$h(r,m),r.lanes=536870912,Rr(null,a);if(Qp(r),(a=Zn)?(a=kT(a,sa),a=a!==null&&a.data==="&"?a:null,a!==null&&(r.memoizedState={dehydrated:a,treeContext:to!==null?{id:di,overflow:tr}:null,retryLane:536870912,hydrationErrors:null},d=Pc(a),d.return=r,r.child=d,_i=r,Zn=null)):a=null,a===null)throw Mr(r);return r.lanes=536870912,null}return $h(r,m)}var T=a.memoizedState;if(T!==null){var U=T.dehydrated;if(Qp(r),_)if(r.flags&256)r.flags&=-257,r=zx(a,r,d);else if(r.memoizedState!==null)r.child=a.child,r.flags|=128,r=null;else throw Error(i(558));else if(Ui||Ar(a,r,d,!1),_=(d&a.childLanes)!==0,Ui||_){if(m=Wt,m!==null&&(U=Us(m,d),U!==0&&U!==T.retryLane))throw T.retryLane=U,Ts(a,U),ln(m,a,U),Zh;eu(),r=zx(a,r,d)}else a=T.treeContext,Zn=Br(U.nextSibling),_i=r,vn=!0,no=null,sa=!1,a!==null&&Ch(r,a),r=$h(r,m),r.flags|=4096;return r}return a=zs(a.child,{mode:m.mode,children:m.children}),a.ref=r.ref,r.child=a,a.return=r,a}function Yl(a,r){var d=r.ref;if(d===null)a!==null&&a.ref!==null&&(r.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(i(284));(a===null||a.ref!==d)&&(r.flags|=4194816)}}function Yc(a,r,d,m,_){return Xo(r),d=Fh(a,r,d,m,void 0,_),m=tm(),a!==null&&!Ui?(nm(a,r,_),Ai(a,r,_)):(vn&&m&&Sr(r),r.flags|=1,$i(a,r,d,_),r.child)}function ud(a,r,d,m,_,T){return Xo(r),r.updateQueue=null,d=jl(r,m,d,_),nx(a),m=tm(),a!==null&&!Ui?(nm(a,r,T),Ai(a,r,T)):(vn&&m&&Sr(r),r.flags|=1,$i(a,r,d,T),r.child)}function Jh(a,r,d,m,_){if(Xo(r),r.stateNode===null){var T=Fo,U=d.contextType;typeof U=="object"&&U!==null&&(T=Ft(U)),T=new d(m,T),r.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,T.updater=cd,r.stateNode=T,T._reactInternals=r,T=r.stateNode,T.props=m,T.state=r.memoizedState,T.refs={},id(r),U=d.contextType,T.context=typeof U=="object"&&U!==null?Ft(U):Fo,T.state=r.memoizedState,U=d.getDerivedStateFromProps,typeof U=="function"&&(qh(r,d,U,m),T.state=r.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof T.getSnapshotBeforeUpdate=="function"||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(U=T.state,typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount(),U!==T.state&&cd.enqueueReplaceState(T,T.state,null),Hc(r,m,T,_),sd(),T.state=r.memoizedState),typeof T.componentDidMount=="function"&&(r.flags|=4194308),m=!0}else if(a===null){T=r.stateNode;var G=r.memoizedProps,te=Qo(d,G);T.props=te;var ve=T.context,Le=d.contextType;U=Fo,typeof Le=="object"&&Le!==null&&(U=Ft(Le));var ze=d.getDerivedStateFromProps;Le=typeof ze=="function"||typeof T.getSnapshotBeforeUpdate=="function",G=r.pendingProps!==G,Le||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(G||ve!==U)&&Sm(r,T,m,U),Es=!1;var Se=r.memoizedState;T.state=Se,Hc(r,m,T,_),sd(),ve=r.memoizedState,G||Se!==ve||Es?(typeof ze=="function"&&(qh(r,d,ze,m),ve=r.memoizedState),(te=Es||_m(r,d,te,m,Se,ve,U))?(Le||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount()),typeof T.componentDidMount=="function"&&(r.flags|=4194308)):(typeof T.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=m,r.memoizedState=ve),T.props=m,T.state=ve,T.context=U,m=te):(typeof T.componentDidMount=="function"&&(r.flags|=4194308),m=!1)}else{T=r.stateNode,Zp(a,r),U=r.memoizedProps,Le=Qo(d,U),T.props=Le,ze=r.pendingProps,Se=T.context,ve=d.contextType,te=Fo,typeof ve=="object"&&ve!==null&&(te=Ft(ve)),G=d.getDerivedStateFromProps,(ve=typeof G=="function"||typeof T.getSnapshotBeforeUpdate=="function")||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(U!==ze||Se!==te)&&Sm(r,T,m,te),Es=!1,Se=r.memoizedState,T.state=Se,Hc(r,m,T,_),sd();var Te=r.memoizedState;U!==ze||Se!==Te||Es||a!==null&&a.dependencies!==null&&Ju(a.dependencies)?(typeof G=="function"&&(qh(r,d,G,m),Te=r.memoizedState),(Le=Es||_m(r,d,Le,m,Se,Te,te)||a!==null&&a.dependencies!==null&&Ju(a.dependencies))?(ve||typeof T.UNSAFE_componentWillUpdate!="function"&&typeof T.componentWillUpdate!="function"||(typeof T.componentWillUpdate=="function"&&T.componentWillUpdate(m,Te,te),typeof T.UNSAFE_componentWillUpdate=="function"&&T.UNSAFE_componentWillUpdate(m,Te,te)),typeof T.componentDidUpdate=="function"&&(r.flags|=4),typeof T.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof T.componentDidUpdate!="function"||U===a.memoizedProps&&Se===a.memoizedState||(r.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||U===a.memoizedProps&&Se===a.memoizedState||(r.flags|=1024),r.memoizedProps=m,r.memoizedState=Te),T.props=m,T.state=Te,T.context=te,m=Le):(typeof T.componentDidUpdate!="function"||U===a.memoizedProps&&Se===a.memoizedState||(r.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||U===a.memoizedProps&&Se===a.memoizedState||(r.flags|=1024),m=!1)}return T=m,Yl(a,r),m=(r.flags&128)!==0,T||m?(T=r.stateNode,d=m&&typeof d.getDerivedStateFromError!="function"?null:T.render(),r.flags|=1,a!==null&&m?(r.child=ao(r,a.child,null,_),r.child=ao(r,null,d,_)):$i(a,r,d,_),r.memoizedState=T.state,a=r.child):a=Ai(a,r,_),a}function Bx(a,r,d,m){return jo(),r.flags|=256,$i(a,r,d,m),r.child}var Cm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ms(a){return{baseLanes:a,cachePool:Yp()}}function ef(a,r,d){return a=a!==null?a.childLanes&~d:0,r&&(a|=Ns),a}function Vx(a,r,d){var m=r.pendingProps,_=!1,T=(r.flags&128)!==0,U;if((U=T)||(U=a!==null&&a.memoizedState===null?!1:(bn.current&2)!==0),U&&(_=!0,r.flags&=-129),U=(r.flags&32)!==0,r.flags&=-33,a===null){if(vn){if(_?oo(r):ks(),(a=Zn)?(a=kT(a,sa),a=a!==null&&a.data!=="&"?a:null,a!==null&&(r.memoizedState={dehydrated:a,treeContext:to!==null?{id:di,overflow:tr}:null,retryLane:536870912,hydrationErrors:null},d=Pc(a),d.return=r,r.child=d,_i=r,Zn=null)):a=null,a===null)throw Mr(r);return Wb(a)?r.lanes=32:r.lanes=536870912,null}var G=m.children;return m=m.fallback,_?(ks(),_=r.mode,G=tf({mode:"hidden",children:G},_),m=ko(m,_,d,null),G.return=r,m.return=r,G.sibling=m,r.child=G,m=r.child,m.memoizedState=ms(d),m.childLanes=ef(a,U,d),r.memoizedState=Cm,Rr(null,m)):(oo(r),dd(r,G))}var te=a.memoizedState;if(te!==null&&(G=te.dehydrated,G!==null)){if(T)r.flags&256?(oo(r),r.flags&=-257,r=Rm(a,r,d)):r.memoizedState!==null?(ks(),r.child=a.child,r.flags|=128,r=null):(ks(),G=m.fallback,_=r.mode,m=tf({mode:"visible",children:m.children},_),G=ko(G,_,d,null),G.flags|=2,m.return=r,G.return=r,m.sibling=G,r.child=m,ao(r,a.child,null,d),m=r.child,m.memoizedState=ms(d),m.childLanes=ef(a,U,d),r.memoizedState=Cm,r=Rr(null,m));else if(oo(r),Wb(G)){if(U=G.nextSibling&&G.nextSibling.dataset,U)var ve=U.dgst;U=ve,m=Error(i(419)),m.stack="",m.digest=U,wr({value:m,source:null,stack:null}),r=Rm(a,r,d)}else if(Ui||Ar(a,r,d,!1),U=(d&a.childLanes)!==0,Ui||U){if(U=Wt,U!==null&&(m=Us(U,d),m!==0&&m!==te.retryLane))throw te.retryLane=m,Ts(a,m),ln(U,a,m),Zh;jb(G)||eu(),r=Rm(a,r,d)}else jb(G)?(r.flags|=192,r.child=a.child,r=null):(a=te.treeContext,Zn=Br(G.nextSibling),_i=r,vn=!0,no=null,sa=!1,a!==null&&Ch(r,a),r=dd(r,m.children),r.flags|=4096);return r}return _?(ks(),G=m.fallback,_=r.mode,te=a.child,ve=te.sibling,m=zs(te,{mode:"hidden",children:m.children}),m.subtreeFlags=te.subtreeFlags&65011712,ve!==null?G=zs(ve,G):(G=ko(G,_,d,null),G.flags|=2),G.return=r,m.return=r,m.sibling=G,r.child=m,Rr(null,m),m=r.child,G=a.child.memoizedState,G===null?G=ms(d):(_=G.cachePool,_!==null?(te=Pi._currentValue,_=_.parent!==te?{parent:te,pool:te}:_):_=Yp(),G={baseLanes:G.baseLanes|d,cachePool:_}),m.memoizedState=G,m.childLanes=ef(a,U,d),r.memoizedState=Cm,Rr(a.child,m)):(oo(r),d=a.child,a=d.sibling,d=zs(d,{mode:"visible",children:m.children}),d.return=r,d.sibling=null,a!==null&&(U=r.deletions,U===null?(r.deletions=[a],r.flags|=16):U.push(a)),r.child=d,r.memoizedState=null,d)}function dd(a,r){return r=tf({mode:"visible",children:r},a.mode),r.return=a,a.child=r}function tf(a,r){return a=ui(22,a,null,r),a.lanes=0,a}function Rm(a,r,d){return ao(r,a.child,null,d),a=dd(r,r.pendingProps.children),a.flags|=2,r.memoizedState=null,a}function Fx(a,r,d){a.lanes|=r;var m=a.alternate;m!==null&&(m.lanes|=r),Nh(a.return,r,d)}function Zl(a,r,d,m,_,T){var U=a.memoizedState;U===null?a.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:m,tail:d,tailMode:_,treeForkCount:T}:(U.isBackwards=r,U.rendering=null,U.renderingStartTime=0,U.last=m,U.tail=d,U.tailMode=_,U.treeForkCount=T)}function Gs(a,r,d){var m=r.pendingProps,_=m.revealOrder,T=m.tail;m=m.children;var U=bn.current,G=(U&2)!==0;if(G?(U=U&1|2,r.flags|=128):U&=1,Ae(bn,U),$i(a,r,m,d),m=vn?Oc:0,!G&&a!==null&&(a.flags&128)!==0)e:for(a=r.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&Fx(a,d,r);else if(a.tag===19)Fx(a,d,r);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break e;for(;a.sibling===null;){if(a.return===null||a.return===r)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(_){case"forwards":for(d=r.child,_=null;d!==null;)a=d.alternate,a!==null&&ra(a)===null&&(_=d),d=d.sibling;d=_,d===null?(_=r.child,r.child=null):(_=d.sibling,d.sibling=null),Zl(r,!1,_,d,T,m);break;case"backwards":case"unstable_legacy-backwards":for(d=null,_=r.child,r.child=null;_!==null;){if(a=_.alternate,a!==null&&ra(a)===null){r.child=_;break}a=_.sibling,_.sibling=d,d=_,_=a}Zl(r,!0,d,null,T,m);break;case"together":Zl(r,!1,null,null,void 0,m);break;default:r.memoizedState=null}return r.child}function Ai(a,r,d){if(a!==null&&(r.dependencies=a.dependencies),Ur|=r.lanes,(d&r.childLanes)===0)if(a!==null){if(Ar(a,r,d,!1),(d&r.childLanes)===0)return null}else return null;if(a!==null&&r.child!==a.child)throw Error(i(153));if(r.child!==null){for(a=r.child,d=zs(a,a.pendingProps),r.child=d,d.return=r;a.sibling!==null;)a=a.sibling,d=d.sibling=zs(a,a.pendingProps),d.return=r;d.sibling=null}return r.child}function nf(a,r){return(a.lanes&r)!==0?!0:(a=a.dependencies,!!(a!==null&&Ju(a)))}
vendor: 5,044 bytes, line 8
8function Lb(a,r,d){switch(r.tag){case 3:Ve(r,r.stateNode.containerInfo),io(r,Pi,a.memoizedState.cache),jo();break;case 27:case 5:Rt(r);break;case 4:Ve(r,r.stateNode.containerInfo);break;case 10:io(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,Qp(r),null;break;case 13:var m=r.memoizedState;if(m!==null)return m.dehydrated!==null?(oo(r),r.flags|=128,null):(d&r.child.childLanes)!==0?Vx(a,r,d):(oo(r),a=Ai(a,r,d),a!==null?a.sibling:null);oo(r);break;case 19:var _=(a.flags&128)!==0;if(m=(d&r.childLanes)!==0,m||(Ar(a,r,d,!1),m=(d&r.childLanes)!==0),_){if(m)return Gs(a,r,d);r.flags|=128}if(_=r.memoizedState,_!==null&&(_.rendering=null,_.tail=null,_.lastEffect=null),Ae(bn,bn.current),m)break;return null;case 22:return r.lanes=0,ql(a,r,d,r.pendingProps);case 24:io(r,Pi,a.memoizedState.cache)}return Ai(a,r,d)}function sf(a,r,d){if(a!==null)if(a.memoizedProps!==r.pendingProps)Ui=!0;else{if(!nf(a,d)&&(r.flags&128)===0)return Ui=!1,Lb(a,r,d);Ui=(a.flags&131072)!==0}else Ui=!1,vn&&(r.flags&1048576)!==0&&q0(r,Oc,r.index);switch(r.lanes=0,r.tag){case 16:e:{var m=r.pendingProps;if(a=Bl(r.elementType),r.type=a,typeof a=="function")wh(a)?(m=Qo(a,m),r.tag=1,r=Jh(null,r,a,m,d)):(r.tag=0,r=Yc(null,r,a,m,d));else{if(a!=null){var _=a.$$typeof;if(_===I){r.tag=11,r=Am(null,r,a,m,d);break e}else if(_===F){r.tag=14,r=Xl(null,r,a,m,d);break e}}throw r=ue(a)||a,Error(i(306,r,""))}}return r;case 0:return Yc(a,r,r.type,r.pendingProps,d);case 1:return m=r.type,_=Qo(m,r.pendingProps),Jh(a,r,m,_,d);case 3:e:{if(Ve(r,r.stateNode.containerInfo),a===null)throw Error(i(387));m=r.pendingProps;var T=r.memoizedState;_=T.element,Zp(a,r),Hc(r,m,null,d);var U=r.memoizedState;if(m=U.cache,io(r,Pi,m),m!==T.cache&&Dh(r,[Pi],d,!0),sd(),m=U.element,T.isDehydrated)if(T={element:m,isDehydrated:!1,cache:U.cache},r.updateQueue.baseState=T,r.memoizedState=T,r.flags&256){r=Bx(a,r,m,d);break e}else if(m!==_){_=ia(Error(i(424)),r),wr(_),r=Bx(a,r,m,d);break e}else for(a=r.stateNode.containerInfo,a.nodeType===9?a=a.body:a=a.nodeName==="HTML"?a.ownerDocument.body:a,Zn=Br(a.firstChild),_i=r,vn=!0,no=null,sa=!0,d=zh(r,null,m,d),r.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(jo(),m===_){r=Ai(a,r,d);break e}$i(a,r,m,d)}r=r.child}return r;case 26:return Yl(a,r),a===null?(d=qT(r.type,null,r.pendingProps,null))?r.memoizedState=d:vn||(d=r.type,a=r.pendingProps,m=jx(pe.current).createElement(d),m[ii]=r,m[Fi]=a,Ls(m,d,a),vi(m),r.stateNode=m):r.memoizedState=qT(r.type,a.memoizedProps,r.pendingProps,a.memoizedState),null;case 27:return Rt(r),a===null&&vn&&(m=r.stateNode=jT(r.type,r.pendingProps,pe.current),_i=r,sa=!0,_=Zn,su(r.type)?(Xb=_,Zn=Br(m.firstChild)):Zn=_),$i(a,r,r.pendingProps.children,d),Yl(a,r),a===null&&(r.flags|=4194304),r.child;case 5:return a===null&&vn&&((_=m=Zn)&&(m=WI(m,r.type,r.pendingProps,sa),m!==null?(r.stateNode=m,_i=r,Zn=Br(m.firstChild),sa=!1,_=!0):_=!1),_||Mr(r)),Rt(r),_=r.type,T=r.pendingProps,U=a!==null?a.memoizedProps:null,m=T.children,kb(_,T)?m=null:U!==null&&kb(_,U)&&(r.flags|=32),r.memoizedState!==null&&(_=Fh(a,r,Wl,null,null,d),Fm._currentValue=_),Yl(a,r),$i(a,r,m,d),r.child;case 6:return a===null&&vn&&((a=d=Zn)&&(d=XI(d,r.pendingProps,sa),d!==null?(r.stateNode=d,_i=r,Zn=null,a=!0):a=!1),a||Mr(r)),null;case 13:return Vx(a,r,d);case 4:return Ve(r,r.stateNode.containerInfo),m=r.pendingProps,a===null?r.child=ao(r,null,m,d):$i(a,r,m,d),r.child;case 11:return Am(a,r,r.type,r.pendingProps,d);case 7:return $i(a,r,r.pendingProps,d),r.child;case 8:return $i(a,r,r.pendingProps.children,d),r.child;case 12:return $i(a,r,r.pendingProps.children,d),r.child;case 10:return m=r.pendingProps,io(r,r.type,m.value),$i(a,r,m.children,d),r.child;case 9:return _=r.type._context,m=r.pendingProps.children,Xo(r),_=Ft(_),m=m(_),r.flags|=1,$i(a,r,m,d),r.child;case 14:return Xl(a,r,r.type,r.pendingProps,d);case 15:return Kh(a,r,r.type,r.pendingProps,d);case 19:return Gs(a,r,d);case 31:return Qh(a,r,d);case 22:return ql(a,r,d,r.pendingProps);case 24:return Xo(r),m=Ft(Pi),a===null?(_=Ih(),_===null&&(_=Wt,T=jp(),_.pooledCache=T,T.refCount++,T!==null&&(_.pooledCacheLanes|=d),_=T),r.memoizedState={parent:m,cache:_},id(r),io(r,Pi,_)):((a.lanes&d)!==0&&(Zp(a,r),Hc(r,null,null,d),sd()),_=a.memoizedState,T=r.memoizedState,_.parent!==m?(_={parent:m,cache:m},r.memoizedState=_,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=_),io(r,Pi,m)):(m=T.cache,io(r,Pi,m),m!==_.cache&&Dh(r,[Pi],d,!0))),$i(a,r,r.pendingProps.children,d),r.child;case 29:throw r.pendingProps}throw Error(i(156,r.tag))}function Nr(a){a.flags|=4}function hd(a,r,d,m,_){if((r=(a.mode&32)!==0)&&(r=!1),r){if(a.flags|=16777216,(_&335544128)===_)if(a.stateNode.complete)a.flags|=8192;else if(mi())a.flags|=8192;else throw Cr=Ph,td}else a.flags&=-16777217}function Nm(a,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!QT(r))if(mi())a.flags|=8192;else throw Cr=Ph,td}function co(a,r){r!==null&&(a.flags|=4),a.flags&16384&&(r=a.tag!==22?ke():536870912,a.lanes|=r,ei|=r)}
vendor: 8,001 bytes, line 8
8function Dr(a,r){if(!vn)switch(a.tailMode){case"hidden":r=a.tail;for(var d=null;r!==null;)r.alternate!==null&&(d=r),r=r.sibling;d===null?a.tail=null:d.sibling=null;break;case"collapsed":d=a.tail;for(var m=null;d!==null;)d.alternate!==null&&(m=d),d=d.sibling;m===null?r||a.tail===null?a.tail=null:a.tail.sibling=null:m.sibling=null}}function jn(a){var r=a.alternate!==null&&a.alternate.child===a.child,d=0,m=0;if(r)for(var _=a.child;_!==null;)d|=_.lanes|_.childLanes,m|=_.subtreeFlags&65011712,m|=_.flags&65011712,_.return=a,_=_.sibling;else for(_=a.child;_!==null;)d|=_.lanes|_.childLanes,m|=_.subtreeFlags,m|=_.flags,_.return=a,_=_.sibling;return a.subtreeFlags|=m,a.childLanes=d,r}function fd(a,r,d){var m=r.pendingProps;switch(Ah(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return jn(r),null;case 1:return jn(r),null;case 3:return d=r.stateNode,m=null,a!==null&&(m=a.memoizedState.cache),r.memoizedState.cache!==m&&(r.flags|=2048),Er(Pi),Ze(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(a===null||a.child===null)&&(Bc(r)?Nr(r):a===null||a.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Rh())),jn(r),null;case 26:var _=r.type,T=r.memoizedState;return a===null?(Nr(r),T!==null?(jn(r),Nm(r,T)):(jn(r),hd(r,_,null,m,d))):T?T!==a.memoizedState?(Nr(r),jn(r),Nm(r,T)):(jn(r),r.flags&=-16777217):(a=a.memoizedProps,a!==m&&Nr(r),jn(r),hd(r,_,a,m,d)),null;case 27:if(Ct(r),d=pe.current,_=r.type,a!==null&&r.stateNode!=null)a.memoizedProps!==m&&Nr(r);else{if(!m){if(r.stateNode===null)throw Error(i(166));return jn(r),null}a=Ie.current,Bc(r)?Y0(r):(a=jT(_,m,d),r.stateNode=a,Nr(r))}return jn(r),null;case 5:if(Ct(r),_=r.type,a!==null&&r.stateNode!=null)a.memoizedProps!==m&&Nr(r);else{if(!m){if(r.stateNode===null)throw Error(i(166));return jn(r),null}if(T=Ie.current,Bc(r))Y0(r);else{var U=jx(pe.current);switch(T){case 1:T=U.createElementNS("http://www.w3.org/2000/svg",_);break;case 2:T=U.createElementNS("http://www.w3.org/1998/Math/MathML",_);break;default:switch(_){case"svg":T=U.createElementNS("http://www.w3.org/2000/svg",_);break;case"math":T=U.createElementNS("http://www.w3.org/1998/Math/MathML",_);break;case"script":T=U.createElement("div"),T.innerHTML="<script><\/script>",T=T.removeChild(T.firstChild);break;case"select":T=typeof m.is=="string"?U.createElement("select",{is:m.is}):U.createElement("select"),m.multiple?T.multiple=!0:m.size&&(T.size=m.size);break;default:T=typeof m.is=="string"?U.createElement(_,{is:m.is}):U.createElement(_)}}T[ii]=r,T[Fi]=m;e:for(U=r.child;U!==null;){if(U.tag===5||U.tag===6)T.appendChild(U.stateNode);else if(U.tag!==4&&U.tag!==27&&U.child!==null){U.child.return=U,U=U.child;continue}if(U===r)break e;for(;U.sibling===null;){if(U.return===null||U.return===r)break e;U=U.return}U.sibling.return=U.return,U=U.sibling}r.stateNode=T;e:switch(Ls(T,_,m),_){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&Nr(r)}}return jn(r),hd(r,r.type,a===null?null:a.memoizedProps,r.pendingProps,d),null;case 6:if(a&&r.stateNode!=null)a.memoizedProps!==m&&Nr(r);else{if(typeof m!="string"&&r.stateNode===null)throw Error(i(166));if(a=pe.current,Bc(r)){if(a=r.stateNode,d=r.memoizedProps,m=null,_=_i,_!==null)switch(_.tag){case 27:case 5:m=_.memoizedProps}a[ii]=r,a=!!(a.nodeValue===d||m!==null&&m.suppressHydrationWarning===!0||IT(a.nodeValue,d)),a||Mr(r,!0)}else a=jx(a).createTextNode(m),a[ii]=r,r.stateNode=a}return jn(r),null;case 31:if(d=r.memoizedState,a===null||a.memoizedState!==null){if(m=Bc(r),d!==null){if(a===null){if(!m)throw Error(i(318));if(a=r.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(i(557));a[ii]=r}else jo(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;jn(r),a=!1}else d=Rh(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=d),a=!0;if(!a)return r.flags&256?(Ti(r),r):(Ti(r),null);if((r.flags&128)!==0)throw Error(i(558))}return jn(r),null;case 13:if(m=r.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(_=Bc(r),m!==null&&m.dehydrated!==null){if(a===null){if(!_)throw Error(i(318));if(_=r.memoizedState,_=_!==null?_.dehydrated:null,!_)throw Error(i(317));_[ii]=r}else jo(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;jn(r),_=!1}else _=Rh(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=_),_=!0;if(!_)return r.flags&256?(Ti(r),r):(Ti(r),null)}return Ti(r),(r.flags&128)!==0?(r.lanes=d,r):(d=m!==null,a=a!==null&&a.memoizedState!==null,d&&(m=r.child,_=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(_=m.alternate.memoizedState.cachePool.pool),T=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(T=m.memoizedState.cachePool.pool),T!==_&&(m.flags|=2048)),d!==a&&d&&(r.child.flags|=8192),co(r,r.updateQueue),jn(r),null);case 4:return Ze(),a===null&&Ob(r.stateNode.containerInfo),jn(r),null;case 10:return Er(r.type),jn(r),null;case 19:if(ae(bn),m=r.memoizedState,m===null)return jn(r),null;if(_=(r.flags&128)!==0,T=m.rendering,T===null)if(_)Dr(m,!1);else{if(fi!==0||a!==null&&(a.flags&128)!==0)for(a=r.child;a!==null;){if(T=ra(a),T!==null){for(r.flags|=128,Dr(m,!1),a=T.updateQueue,r.updateQueue=a,co(r,a),r.subtreeFlags=0,a=d,d=r.child;d!==null;)Ic(d,a),d=d.sibling;return Ae(bn,bn.current&1|2),vn&&_r(r,m.treeForkCount),r.child}a=a.sibling}m.tail!==null&&He()>Ci&&(r.flags|=128,_=!0,Dr(m,!1),r.lanes=4194304)}else{if(!_)if(a=ra(T),a!==null){if(r.flags|=128,_=!0,a=a.updateQueue,r.updateQueue=a,co(r,a),Dr(m,!0),m.tail===null&&m.tailMode==="hidden"&&!T.alternate&&!vn)return jn(r),null}else 2*He()-m.renderingStartTime>Ci&&d!==536870912&&(r.flags|=128,_=!0,Dr(m,!1),r.lanes=4194304);m.isBackwards?(T.sibling=r.child,r.child=T):(a=m.last,a!==null?a.sibling=T:r.child=T,m.last=T)}return m.tail!==null?(a=m.tail,m.rendering=a,m.tail=a.sibling,m.renderingStartTime=He(),a.sibling=null,d=bn.current,Ae(bn,_?d&1|2:d&1),vn&&_r(r,m.treeForkCount),a):(jn(r),null);case 22:case 23:return Ti(r),ad(),m=r.memoizedState!==null,a!==null?a.memoizedState!==null!==m&&(r.flags|=8192):m&&(r.flags|=8192),m?(d&536870912)!==0&&(r.flags&128)===0&&(jn(r),r.subtreeFlags&6&&(r.flags|=8192)):jn(r),d=r.updateQueue,d!==null&&co(r,d.retryQueue),d=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(d=a.memoizedState.cachePool.pool),m=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(m=r.memoizedState.cachePool.pool),m!==d&&(r.flags|=2048),a!==null&&ae(qo),null;case 24:return d=null,a!==null&&(d=a.memoizedState.cache),r.memoizedState.cache!==d&&(r.flags|=2048),Er(Pi),jn(r),null;case 25:return null;case 30:return null}throw Error(i(156,r.tag))}function Ia(a,r){switch(Ah(r),r.tag){case 1:return a=r.flags,a&65536?(r.flags=a&-65537|128,r):null;case 3:return Er(Pi),Ze(),a=r.flags,(a&65536)!==0&&(a&128)===0?(r.flags=a&-65537|128,r):null;case 26:case 27:case 5:return Ct(r),null;case 31:if(r.memoizedState!==null){if(Ti(r),r.alternate===null)throw Error(i(340));jo()}return a=r.flags,a&65536?(r.flags=a&-65537|128,r):null;case 13:if(Ti(r),a=r.memoizedState,a!==null&&a.dehydrated!==null){if(r.alternate===null)throw Error(i(340));jo()}return a=r.flags,a&65536?(r.flags=a&-65537|128,r):null;case 19:return ae(bn),null;case 4:return Ze(),null;case 10:return Er(r.type),null;case 22:case 23:return Ti(r),ad(),a!==null&&ae(qo),a=r.flags,a&65536?(r.flags=a&-65537|128,r):null;case 24:return Er(Pi),null;case 25:return null;default:return null}}function oa(a,r){switch(Ah(r),r.tag){case 3:Er(Pi),Ze();break;case 26:case 27:case 5:Ct(r);break;case 4:Ze();break;case 31:r.memoizedState!==null&&Ti(r);break;case 13:Ti(r);break;case 19:ae(bn);break;case 10:Er(r.type);break;case 22:case 23:Ti(r),ad(),a!==null&&ae(qo);break;case 24:Er(Pi)}}function Pa(a,r){try{var d=r.updateQueue,m=d!==null?d.lastEffect:null;if(m!==null){var _=m.next;d=_;do{if((d.tag&a)===a){m=void 0;var T=d.create,U=d.inst;m=T(),U.destroy=m}d=d.next}while(d!==_)}}
vendor: 19,031 bytes, line 8
8catch(G){Nn(r,r.return,G)}}function os(a,r,d){try{var m=r.updateQueue,_=m!==null?m.lastEffect:null;if(_!==null){var T=_.next;m=T;do{if((m.tag&a)===a){var U=m.inst,G=U.destroy;if(G!==void 0){U.destroy=void 0,_=r;var te=d,ve=G;try{ve()}catch(Le){Nn(_,te,Le)}}}m=m.next}while(m!==T)}}catch(Le){Nn(r,r.return,Le)}}function nr(a){var r=a.updateQueue;if(r!==null){var d=a.stateNode;try{J0(r,d)}catch(m){Nn(a,a.return,m)}}}function Qi(a,r,d){d.props=Qo(a.type,a.memoizedProps),d.state=a.memoizedState;try{d.componentWillUnmount()}catch(m){Nn(a,r,m)}}function uo(a,r){try{var d=a.ref;if(d!==null){switch(a.tag){case 26:case 27:case 5:var m=a.stateNode;break;case 30:m=a.stateNode;break;default:m=a.stateNode}typeof d=="function"?a.refCleanup=d(m):d.current=m}}catch(_){Nn(a,r,_)}}function ls(a,r){var d=a.ref,m=a.refCleanup;if(d!==null)if(typeof m=="function")try{m()}catch(_){Nn(a,r,_)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(_){Nn(a,r,_)}else d.current=null}function pd(a){var r=a.type,d=a.memoizedProps,m=a.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":d.autoFocus&&m.focus();break e;case"img":d.src?m.src=d.src:d.srcSet&&(m.srcset=d.srcSet)}}catch(_){Nn(a,a.return,_)}}function Gi(a,r,d){try{var m=a.stateNode;VI(m,a.type,d,r),m[Fi]=r}catch(_){Nn(a,a.return,_)}}function ri(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&su(a.type)||a.tag===4}function xn(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||ri(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&su(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function Lr(a,r,d){var m=a.tag;if(m===5||m===6)a=a.stateNode,r?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(a,r):(r=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,r.appendChild(a),d=d._reactRootContainer,d!=null||r.onclick!==null||(r.onclick=Qr));else if(m!==4&&(m===27&&su(a.type)&&(d=a.stateNode,r=null),a=a.child,a!==null))for(Lr(a,r,d),a=a.sibling;a!==null;)Lr(a,r,d),a=a.sibling}function Cs(a,r,d){var m=a.tag;if(m===5||m===6)a=a.stateNode,r?d.insertBefore(a,r):d.appendChild(a);else if(m!==4&&(m===27&&su(a.type)&&(d=a.stateNode),a=a.child,a!==null))for(Cs(a,r,d),a=a.sibling;a!==null;)Cs(a,r,d),a=a.sibling}function af(a){var r=a.stateNode,d=a.memoizedProps;try{for(var m=a.type,_=r.attributes;_.length;)r.removeAttributeNode(_[0]);Ls(r,m,d),r[ii]=a,r[Fi]=d}catch(T){Nn(a,a.return,T)}}var Ua=!1,Kn=!1,ir=!1,kx=typeof WeakSet=="function"?WeakSet:Set,Ji=null;function Ib(a,r){if(a=a.containerInfo,Vb=$x,a=G0(a),Vp(a)){if("selectionStart"in a)var d={start:a.selectionStart,end:a.selectionEnd};else e:{d=(d=a.ownerDocument)&&d.defaultView||window;var m=d.getSelection&&d.getSelection();if(m&&m.rangeCount!==0){d=m.anchorNode;var _=m.anchorOffset,T=m.focusNode;m=m.focusOffset;try{d.nodeType,T.nodeType}catch{d=null;break e}var U=0,G=-1,te=-1,ve=0,Le=0,ze=a,Se=null;t:for(;;){for(var Te;ze!==d||_!==0&&ze.nodeType!==3||(G=U+_),ze!==T||m!==0&&ze.nodeType!==3||(te=U+m),ze.nodeType===3&&(U+=ze.nodeValue.length),(Te=ze.firstChild)!==null;)Se=ze,ze=Te;for(;;){if(ze===a)break t;if(Se===d&&++ve===_&&(G=U),Se===T&&++Le===m&&(te=U),(Te=ze.nextSibling)!==null)break;ze=Se,Se=ze.parentNode}ze=Te}d=G===-1||te===-1?null:{start:G,end:te}}else d=null}d=d||{start:0,end:0}}else d=null;for(Fb={focusedElem:a,selectionRange:d},$x=!1,Ji=r;Ji!==null;)if(r=Ji,a=r.child,(r.subtreeFlags&1028)!==0&&a!==null)a.return=r,Ji=a;else for(;Ji!==null;){switch(r=Ji,T=r.alternate,a=r.flags,r.tag){case 0:if((a&4)!==0&&(a=r.updateQueue,a=a!==null?a.events:null,a!==null))for(d=0;d<a.length;d++)_=a[d],_.ref.impl=_.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&T!==null){a=void 0,d=r,_=T.memoizedProps,T=T.memoizedState,m=d.stateNode;try{var St=Qo(d.type,_);a=m.getSnapshotBeforeUpdate(St,T),m.__reactInternalSnapshotBeforeUpdate=a}catch(Vt){Nn(d,d.return,Vt)}}break;case 3:if((a&1024)!==0){if(a=r.stateNode.containerInfo,d=a.nodeType,d===9)Gb(a);else if(d===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Gb(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(i(163))}if(a=r.sibling,a!==null){a.return=r.return,Ji=a;break}Ji=r.return}}function oi(a,r,d){var m=d.flags;switch(d.tag){case 0:case 11:case 15:Ba(a,d),m&4&&Pa(5,d);break;case 1:if(Ba(a,d),m&4)if(a=d.stateNode,r===null)try{a.componentDidMount()}catch(U){Nn(d,d.return,U)}else{var _=Qo(d.type,r.memoizedProps);r=r.memoizedState;try{a.componentDidUpdate(_,r,a.__reactInternalSnapshotBeforeUpdate)}catch(U){Nn(d,d.return,U)}}m&64&&nr(d),m&512&&uo(d,d.return);break;case 3:if(Ba(a,d),m&64&&(a=d.updateQueue,a!==null)){if(r=null,d.child!==null)switch(d.child.tag){case 27:case 5:r=d.child.stateNode;break;case 1:r=d.child.stateNode}try{J0(a,r)}catch(U){Nn(d,d.return,U)}}break;case 27:r===null&&m&4&&af(d);case 26:case 5:Ba(a,d),r===null&&m&4&&pd(d),m&512&&uo(d,d.return);break;case 12:Ba(a,d);break;case 31:Ba(a,d),m&4&&Jo(a,d);break;case 13:Ba(a,d),m&4&&Zc(a,d),m&64&&(a=d.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(d=g.bind(null,d),qI(a,d))));break;case 22:if(m=d.memoizedState!==null||Ua,!m){r=r!==null&&r.memoizedState!==null||Kn,_=Ua;var T=Kn;Ua=m,(Kn=r)&&!T?Rs(a,d,(d.subtreeFlags&8772)!==0):Ba(a,d),Ua=_,Kn=T}break;case 30:break;default:Ba(a,d)}}function md(a){var r=a.alternate;r!==null&&(a.alternate=null,md(r)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(r=a.stateNode,r!==null&&Zr(r)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var Fn=null,gs=!1;function Oa(a,r,d){for(d=d.child;d!==null;)rf(a,r,d),d=d.sibling}function rf(a,r,d){if(Ne&&typeof Ne.onCommitFiberUnmount=="function")try{Ne.onCommitFiberUnmount(Ee,d)}catch{}switch(d.tag){case 26:Kn||ls(d,r),Oa(a,r,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:Kn||ls(d,r);var m=Fn,_=gs;su(d.type)&&(Fn=d.stateNode,gs=!1),Oa(a,r,d),zm(d.stateNode),Fn=m,gs=_;break;case 5:Kn||ls(d,r);case 6:if(m=Fn,_=gs,Fn=null,Oa(a,r,d),Fn=m,gs=_,Fn!==null)if(gs)try{(Fn.nodeType===9?Fn.body:Fn.nodeName==="HTML"?Fn.ownerDocument.body:Fn).removeChild(d.stateNode)}catch(T){Nn(d,r,T)}else try{Fn.removeChild(d.stateNode)}catch(T){Nn(d,r,T)}break;case 18:Fn!==null&&(gs?(a=Fn,VT(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,d.stateNode),pf(a)):VT(Fn,d.stateNode));break;case 4:m=Fn,_=gs,Fn=d.stateNode.containerInfo,gs=!0,Oa(a,r,d),Fn=m,gs=_;break;case 0:case 11:case 14:case 15:os(2,d,r),Kn||os(4,d,r),Oa(a,r,d);break;case 1:Kn||(ls(d,r),m=d.stateNode,typeof m.componentWillUnmount=="function"&&Qi(d,r,m)),Oa(a,r,d);break;case 21:Oa(a,r,d);break;case 22:Kn=(m=Kn)||d.memoizedState!==null,Oa(a,r,d),Kn=m;break;default:Oa(a,r,d)}}function Jo(a,r){if(r.memoizedState===null&&(a=r.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{pf(a)}catch(d){Nn(r,r.return,d)}}}function Zc(a,r){if(r.memoizedState===null&&(a=r.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{pf(a)}catch(d){Nn(r,r.return,d)}}function Dm(a){switch(a.tag){case 31:case 13:case 19:var r=a.stateNode;return r===null&&(r=a.stateNode=new kx),r;case 22:return a=a.stateNode,r=a._retryCache,r===null&&(r=a._retryCache=new kx),r;default:throw Error(i(435,a.tag))}}function ho(a,r){var d=Dm(a);r.forEach(function(m){if(!d.has(m)){d.add(m);var _=b.bind(null,a,m);m.then(_,_)}})}function ji(a,r){var d=r.deletions;if(d!==null)for(var m=0;m<d.length;m++){var _=d[m],T=a,U=r,G=U;e:for(;G!==null;){switch(G.tag){case 27:if(su(G.type)){Fn=G.stateNode,gs=!1;break e}break;case 5:Fn=G.stateNode,gs=!1;break e;case 3:case 4:Fn=G.stateNode.containerInfo,gs=!0;break e}G=G.return}if(Fn===null)throw Error(i(160));rf(T,U,_),Fn=null,gs=!1,T=_.alternate,T!==null&&(T.return=null),_.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)el(r,a),r=r.sibling}var za=null;function el(a,r){var d=a.alternate,m=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:ji(r,a),Wi(a),m&4&&(os(3,a,a.return),Pa(3,a),os(5,a,a.return));break;case 1:ji(r,a),Wi(a),m&512&&(Kn||d===null||ls(d,d.return)),m&64&&Ua&&(a=a.updateQueue,a!==null&&(m=a.callbacks,m!==null&&(d=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=d===null?m:d.concat(m))));break;case 26:var _=za;if(ji(r,a),Wi(a),m&512&&(Kn||d===null||ls(d,d.return)),m&4){var T=d!==null?d.memoizedState:null;if(m=a.memoizedState,d===null)if(m===null)if(a.stateNode===null){e:{m=a.type,d=a.memoizedProps,_=_.ownerDocument||_;t:switch(m){case"title":T=_.getElementsByTagName("title")[0],(!T||T[Sa]||T[ii]||T.namespaceURI==="http://www.w3.org/2000/svg"||T.hasAttribute("itemprop"))&&(T=_.createElement(m),_.head.insertBefore(T,_.querySelector("head > title"))),Ls(T,m,d),T[ii]=a,vi(T),m=T;break e;case"link":var U=KT("link","href",_).get(m+(d.href||""));if(U){for(var G=0;G<U.length;G++)if(T=U[G],T.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&T.getAttribute("rel")===(d.rel==null?null:d.rel)&&T.getAttribute("title")===(d.title==null?null:d.title)&&T.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){U.splice(G,1);break t}}T=_.createElement(m),Ls(T,m,d),_.head.appendChild(T);break;case"meta":if(U=KT("meta","content",_).get(m+(d.content||""))){for(G=0;G<U.length;G++)if(T=U[G],T.getAttribute("content")===(d.content==null?null:""+d.content)&&T.getAttribute("name")===(d.name==null?null:d.name)&&T.getAttribute("property")===(d.property==null?null:d.property)&&T.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&T.getAttribute("charset")===(d.charSet==null?null:d.charSet)){U.splice(G,1);break t}}T=_.createElement(m),Ls(T,m,d),_.head.appendChild(T);break;default:throw Error(i(468,m))}T[ii]=a,vi(T),m=T}a.stateNode=m}else $T(_,a.type,a.stateNode);else a.stateNode=ZT(_,m,a.memoizedProps);else T!==m?(T===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):T.count--,m===null?$T(_,a.type,a.stateNode):ZT(_,m,a.memoizedProps)):m===null&&a.stateNode!==null&&Gi(a,a.memoizedProps,d.memoizedProps)}break;case 27:ji(r,a),Wi(a),m&512&&(Kn||d===null||ls(d,d.return)),d!==null&&m&4&&Gi(a,a.memoizedProps,d.memoizedProps);break;case 5:if(ji(r,a),Wi(a),m&512&&(Kn||d===null||ls(d,d.return)),a.flags&32){_=a.stateNode;try{Os(_,"")}catch(St){Nn(a,a.return,St)}}m&4&&a.stateNode!=null&&(_=a.memoizedProps,Gi(a,_,d!==null?d.memoizedProps:_)),m&1024&&(ir=!0);break;case 6:if(ji(r,a),Wi(a),m&4){if(a.stateNode===null)throw Error(i(162));m=a.memoizedProps,d=a.stateNode;try{d.nodeValue=m}catch(St){Nn(a,a.return,St)}}break;case 3:if(qx=null,_=za,za=Wx(r.containerInfo),ji(r,a),za=_,Wi(a),m&4&&d!==null&&d.memoizedState.isDehydrated)try{pf(r.containerInfo)}catch(St){Nn(a,a.return,St)}ir&&(ir=!1,of(a));break;case 4:m=za,za=Wx(a.stateNode.containerInfo),ji(r,a),Wi(a),za=m;break;case 12:ji(r,a),Wi(a);break;case 31:ji(r,a),Wi(a),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,ho(a,m)));break;case 13:ji(r,a),Wi(a),a.child.flags&8192&&a.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(Kc=He()),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,ho(a,m)));break;case 22:_=a.memoizedState!==null;var te=d!==null&&d.memoizedState!==null,ve=Ua,Le=Kn;if(Ua=ve||_,Kn=Le||te,ji(r,a),Kn=Le,Ua=ve,Wi(a),m&8192)e:for(r=a.stateNode,r._visibility=_?r._visibility&-2:r._visibility|1,_&&(d===null||te||Ua||Kn||Ir(a)),d=null,r=a;;){if(r.tag===5||r.tag===26){if(d===null){te=d=r;try{if(T=te.stateNode,_)U=T.style,typeof U.setProperty=="function"?U.setProperty("display","none","important"):U.display="none";else{G=te.stateNode;var ze=te.memoizedProps.style,Se=ze!=null&&ze.hasOwnProperty("display")?ze.display:null;G.style.display=Se==null||typeof Se=="boolean"?"":(""+Se).trim()}}catch(St){Nn(te,te.return,St)}}}else if(r.tag===6){if(d===null){te=r;try{te.stateNode.nodeValue=_?"":te.memoizedProps}catch(St){Nn(te,te.return,St)}}}else if(r.tag===18){if(d===null){te=r;try{var Te=te.stateNode;_?FT(Te,!0):FT(te.stateNode,!1)}catch(St){Nn(te,te.return,St)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===a)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===a)break e;for(;r.sibling===null;){if(r.return===null||r.return===a)break e;d===r&&(d=null),r=r.return}d===r&&(d=null),r.sibling.return=r.return,r=r.sibling}m&4&&(m=a.updateQueue,m!==null&&(d=m.retryQueue,d!==null&&(m.retryQueue=null,ho(a,d))));break;case 19:ji(r,a),Wi(a),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,ho(a,m)));break;case 30:break;case 21:break;default:ji(r,a),Wi(a)}}function Wi(a){var r=a.flags;if(r&2){try{for(var d,m=a.return;m!==null;){if(ri(m)){d=m;break}m=m.return}if(d==null)throw Error(i(160));switch(d.tag){case 27:var _=d.stateNode,T=xn(a);Cs(a,T,_);break;case 5:var U=d.stateNode;d.flags&32&&(Os(U,""),d.flags&=-33);var G=xn(a);Cs(a,G,U);break;case 3:case 4:var te=d.stateNode.containerInfo,ve=xn(a);Lr(a,ve,te);break;default:throw Error(i(161))}}catch(Le){Nn(a,a.return,Le)}a.flags&=-3}r&4096&&(a.flags&=-4097)}function of(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var r=a;of(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),a=a.sibling}}function Ba(a,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)oi(a,r.alternate,r),r=r.sibling}function Ir(a){for(a=a.child;a!==null;){var r=a;switch(r.tag){case 0:case 11:case 14:case 15:os(4,r,r.return),Ir(r);break;case 1:ls(r,r.return);var d=r.stateNode;typeof d.componentWillUnmount=="function"&&Qi(r,r.return,d),Ir(r);break;case 27:zm(r.stateNode);case 26:case 5:ls(r,r.return),Ir(r);break;case 22:r.memoizedState===null&&Ir(r);break;case 30:Ir(r);break;default:Ir(r)}a=a.sibling}}function Rs(a,r,d){for(d=d&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var m=r.alternate,_=a,T=r,U=T.flags;switch(T.tag){case 0:case 11:case 15:Rs(_,T,d),Pa(4,T);break;case 1:if(Rs(_,T,d),m=T,_=m.stateNode,typeof _.componentDidMount=="function")try{_.componentDidMount()}catch(ve){Nn(m,m.return,ve)}if(m=T,_=m.updateQueue,_!==null){var G=m.stateNode;try{var te=_.shared.hiddenCallbacks;if(te!==null)for(_.shared.hiddenCallbacks=null,_=0;_<te.length;_++)Gc(te[_],G)}catch(ve){Nn(m,m.return,ve)}}d&&U&64&&nr(T),uo(T,T.return);break;case 27:af(T);case 26:case 5:Rs(_,T,d),d&&m===null&&U&4&&pd(T),uo(T,T.return);break;case 12:Rs(_,T,d);break;case 31:Rs(_,T,d),d&&U&4&&Jo(_,T);break;case 13:Rs(_,T,d),d&&U&4&&Zc(_,T);break;case 22:T.memoizedState===null&&Rs(_,T,d),uo(T,T.return);break;case 30:break;default:Rs(_,T,d)}r=r.sibling}}function tl(a,r){var d=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(d=a.memoizedState.cachePool.pool),a=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==d&&(a!=null&&a.refCount++,d!=null&&Ol(d))}function Kl(a,r){a=null,r.alternate!==null&&(a=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==a&&(r.refCount++,a!=null&&Ol(a))}function cs(a,r,d,m){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Lm(a,r,d,m),r=r.sibling}function Lm(a,r,d,m){var _=r.flags;switch(r.tag){case 0:case 11:case 15:cs(a,r,d,m),_&2048&&Pa(9,r);break;case 1:cs(a,r,d,m);break;case 3:cs(a,r,d,m),_&2048&&(a=null,r.alternate!==null&&(a=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==a&&(r.refCount++,a!=null&&Ol(a)));break;case 12:if(_&2048){cs(a,r,d,m),a=r.stateNode;try{var T=r.memoizedProps,U=T.id,G=T.onPostCommit;typeof G=="function"&&G(U,r.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(te){Nn(r,r.return,te)}}else cs(a,r,d,m);break;case 31:cs(a,r,d,m);break;case 13:cs(a,r,d,m);break;case 23:break;case 22:T=r.stateNode,U=r.alternate,r.memoizedState!==null?T._visibility&2?cs(a,r,d,m):Pr(a,r):T._visibility&2?cs(a,r,d,m):(T._visibility|=2,us(a,r,d,m,(r.subtreeFlags&10256)!==0||!1)),_&2048&&tl(U,r);break;case 24:cs(a,r,d,m),_&2048&&Kl(r.alternate,r);break;default:cs(a,r,d,m)}}function us(a,r,d,m,_){for(_=_&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var T=a,U=r,G=d,te=m,ve=U.flags;switch(U.tag){case 0:case 11:case 15:us(T,U,G,te,_),Pa(8,U);break;case 23:break;case 22:var Le=U.stateNode;U.memoizedState!==null?Le._visibility&2?us(T,U,G,te,_):Pr(T,U):(Le._visibility|=2,us(T,U,G,te,_)),_&&ve&2048&&tl(U.alternate,U);break;case 24:us(T,U,G,te,_),_&&ve&2048&&Kl(U.alternate,U);break;default:us(T,U,G,te,_)}r=r.sibling}}function Pr(a,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var d=a,m=r,_=m.flags;switch(m.tag){case 22:Pr(d,m),_&2048&&tl(m.alternate,m);break;case 24:Pr(d,m),_&2048&&Kl(m.alternate,m);break;default:Pr(d,m)}r=r.sibling}}var $l=8192;function la(a,r,d){if(a.subtreeFlags&$l)for(a=a.child;a!==null;)lf(a,r,d),a=a.sibling}function lf(a,r,d){switch(a.tag){case 26:la(a,r,d),a.flags&$l&&a.memoizedState!==null&&aP(d,za,a.memoizedState,a.memoizedProps);break;case 5:la(a,r,d);break;case 3:case 4:var m=za;za=Wx(a.stateNode.containerInfo),la(a,r,d),za=m;break;case 22:a.memoizedState===null&&(m=a.alternate,m!==null&&m.memoizedState!==null?(m=$l,$l=16777216,la(a,r,d),$l=m):la(a,r,d));break;default:la(a,r,d)}}function Ql(a){var r=a.alternate;if(r!==null&&(a=r.child,a!==null)){r.child=null;do r=a.sibling,a.sibling=null,a=r;while(a!==null)}}function nl(a){var r=a.deletions;if((a.flags&16)!==0){if(r!==null)for(var d=0;d<r.length;d++){var m=r[d];Ji=m,Si(m,a)}Ql(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)js(a),a=a.sibling}function js(a){switch(a.tag){case 0:case 11:case 15:nl(a),a.flags&2048&&os(9,a,a.return);break;case 3:nl(a);break;case 12:nl(a);break;case 22:var r=a.stateNode;a.memoizedState!==null&&r._visibility&2&&(a.return===null||a.return.tag!==13)?(r._visibility&=-3,Ws(a)):nl(a);break;default:nl(a)}}function Ws(a){var r=a.deletions;if((a.flags&16)!==0){if(r!==null)for(var d=0;d<r.length;d++){var m=r[d];Ji=m,Si(m,a)}Ql(a)}for(a=a.child;a!==null;){switch(r=a,r.tag){case 0:case 11:case 15:os(8,r,r.return),Ws(r);break;case 22:d=r.stateNode,d._visibility&2&&(d._visibility&=-3,Ws(r));break;default:Ws(r)}a=a.sibling}}function Si(a,r){for(;Ji!==null;){var d=Ji;switch(d.tag){case 0:case 11:case 15:os(8,d,r);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var m=d.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:Ol(d.memoizedState.cache)}if(m=d.child,m!==null)m.return=d,Ji=m;else e:for(d=a;Ji!==null;){m=Ji;var _=m.sibling,T=m.return;if(md(m),m===d){Ji=null;break e}if(_!==null){_.return=T,Ji=_;break e}Ji=T}}}var fo={getCacheForType:function(a){var r=Ft(Pi),d=r.data.get(a);return d===void 0&&(d=a(),r.data.set(a,d)),d},cacheSignal:function(){return Ft(Pi).controller.signal}},tn=typeof WeakMap=="function"?WeakMap:Map,At=0,Wt=null,on=null,an=0,Mn=0,xs=null,Va=!1,sr=!1,Im=!1,ca=0,fi=0,Ur=0,il=0,gd=0,Ns=0,ei=0,Jl=null,Mi=null,wi=!1,Kc=0,Pm=0,Ci=1/0,pi=null,Ri=null,kn=0,ua=null,$c=null,Fa=0,Qc=0,Jc=null,xd=null,sl=0,ec=null;
vendor: 24,942 bytes, lines 8-9
8function da(){return(At&2)!==0&&an!==0?an&-an:Y.T!==null?Me():Al()}function pn(){if(Ns===0)if((an&536870912)===0||vn){var a=un;un<<=1,(un&3932160)===0&&(un=262144),Ns=a}else Ns=536870912;return a=Fs.current,a!==null&&(a.flags|=32),Ns}function ln(a,r,d){(a===Wt&&(Mn===2||Mn===9)||a.cancelPendingCommit!==null)&&(rl(a,0),Oi(a,an,Ns,!1)),Bt(a,d),((At&2)===0||a!==Wt)&&(a===Wt&&((At&2)===0&&(il|=d),fi===4&&Oi(a,an,Ns,!1)),qe(a))}function mn(a,r,d){if((At&6)!==0)throw Error(i(327));var m=!d&&(r&127)===0&&(r&a.expiredLanes)===0||ut(a,r),_=m?yd(a,r):Ds(a,r,!0),T=m;do{if(_===0){sr&&!m&&Oi(a,r,0,!1);break}else{if(d=a.current.alternate,T&&!Hn(d)){_=Ds(a,r,!1),T=!1;continue}if(_===2){if(T=r,a.errorRecoveryDisabledLanes&T)var U=0;else U=a.pendingLanes&-536870913,U=U!==0?U:U&536870912?536870912:0;if(U!==0){r=U;e:{var G=a;_=Jl;var te=G.current.memoizedState.isDehydrated;if(te&&(rl(G,U).flags|=256),U=Ds(G,U,!1),U!==2){if(Im&&!te){G.errorRecoveryDisabledLanes|=T,il|=T,_=4;break e}T=Mi,Mi=_,T!==null&&(Mi===null?Mi=T:Mi.push.apply(Mi,T))}_=U}if(T=!1,_!==2)continue}}if(_===1){rl(a,0),Oi(a,r,0,!0);break}e:{switch(m=a,T=_,T){case 0:case 1:throw Error(i(345));case 4:if((r&4194048)!==r)break;case 6:Oi(m,r,Ns,!Va);break e;case 2:Mi=null;break;case 3:case 5:break;default:throw Error(i(329))}if((r&62914560)===r&&(_=Kc+300-He(),10<_)){if(Oi(m,r,Ns,!Va),De(m,0,!0)!==0)break e;Fa=r,m.timeoutHandle=zT(yn.bind(null,m,d,Mi,pi,wi,r,Ns,il,ei,Va,T,"Throttled",-0,0),_);break e}yn(m,d,Mi,pi,wi,r,Ns,il,ei,Va,T,null,-0,0)}}break}while(!0);qe(a)}function yn(a,r,d,m,_,T,U,G,te,ve,Le,ze,Se,Te){if(a.timeoutHandle=-1,ze=r.subtreeFlags,ze&8192||(ze&16785408)===16785408){ze={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Qr},lf(r,T,ze);var St=(T&62914560)===T?Kc-He():(T&4194048)===T?Pm-He():0;if(St=rP(ze,St),St!==null){Fa=T,a.cancelPendingCommit=St(mo.bind(null,a,r,T,d,m,_,U,G,te,Le,ze,null,Se,Te)),Oi(a,T,U,!ve);return}}mo(a,r,T,d,m,_,U,G,te)}function Hn(a){for(var r=a;;){var d=r.tag;if((d===0||d===11||d===15)&&r.flags&16384&&(d=r.updateQueue,d!==null&&(d=d.stores,d!==null)))for(var m=0;m<d.length;m++){var _=d[m],T=_.getSnapshot;_=_.value;try{if(!ws(T(),_))return!1}catch{return!1}}if(d=r.child,r.subtreeFlags&16384&&d!==null)d.return=r,r=d;else{if(r===a)break;for(;r.sibling===null;){if(r.return===null||r.return===a)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Oi(a,r,d,m){r&=~gd,r&=~il,a.suspendedLanes|=r,a.pingedLanes&=~r,m&&(a.warmLanes|=r),m=a.expirationTimes;for(var _=r;0<_;){var T=31-lt(_),U=1<<T;m[T]=-1,_&=~U}d!==0&&Sn(a,d,r)}function ar(){return(At&6)===0?(ft(0),!1):!0}function al(){if(on!==null){if(Mn===0)var a=on.return;else a=on,Tr=Wo=null,im(a),kl=null,Hl=0,a=on;for(;a!==null;)oa(a.alternate,a),a=a.return;on=null}}function rl(a,r){var d=a.timeoutHandle;d!==-1&&(a.timeoutHandle=-1,HI(d)),d=a.cancelPendingCommit,d!==null&&(a.cancelPendingCommit=null,d()),Fa=0,al(),Wt=a,on=d=zs(a.current,null),an=r,Mn=0,xs=null,Va=!1,sr=ut(a,r),Im=!1,ei=Ns=gd=il=Ur=fi=0,Mi=Jl=null,wi=!1,(r&8)!==0&&(r|=r&32);var m=a.entangledLanes;if(m!==0)for(a=a.entanglements,m&=r;0<m;){var _=31-lt(m),T=1<<_;r|=a[_],m&=~T}return ca=r,$u(),d}function Or(a,r){en=null,Y.H=qc,r===zl||r===rn?(r=Vl(),Mn=3):r===td?(r=Vl(),Mn=4):Mn=r===Zh?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,xs=r,on===null&&(fi=1,Yh(a,ia(r,a.current)))}function mi(){var a=Fs.current;return a===null?!0:(an&4194048)===an?As===null:(an&62914560)===an||(an&536870912)!==0?a===As:!1}function po(){var a=Y.H;return Y.H=qc,a===null?qc:a}function ol(){var a=Y.A;return Y.A=fo,a}function eu(){fi=4,Va||(an&4194048)!==an&&Fs.current!==null||(sr=!0),(Ur&134217727)===0&&(il&134217727)===0||Wt===null||Oi(Wt,an,Ns,!1)}function Ds(a,r,d){var m=At;At|=2;var _=po(),T=ol();(Wt!==a||an!==r)&&(pi=null,rl(a,r)),r=!1;var U=fi;e:do try{if(Mn!==0&&on!==null){var G=on,te=xs;switch(Mn){case 8:al(),U=6;break e;case 3:case 2:case 9:case 6:Fs.current===null&&(r=!0);var ve=Mn;if(Mn=0,xs=null,tc(a,G,te,ve),d&&sr){U=0;break e}break;default:ve=Mn,Mn=0,xs=null,tc(a,G,te,ve)}}tu(),U=fi;break}catch(Le){Or(a,Le)}while(!0);return r&&a.shellSuspendCounter++,Tr=Wo=null,At=m,Y.H=_,Y.A=T,on===null&&(Wt=null,an=0,$u()),U}function tu(){for(;on!==null;)cf(on)}function yd(a,r){var d=At;At|=2;var m=po(),_=ol();Wt!==a||an!==r?(pi=null,Ci=He()+500,rl(a,r)):sr=ut(a,r);e:do try{if(Mn!==0&&on!==null){r=on;var T=xs;t:switch(Mn){case 1:Mn=0,xs=null,tc(a,r,T,1);break;case 2:case 9:if(Vs(T)){Mn=0,xs=null,vd(r);break}r=function(){Mn!==2&&Mn!==9||Wt!==a||(Mn=7),qe(a)},T.then(r,r);break e;case 3:Mn=7;break e;case 4:Mn=5;break e;case 7:Vs(T)?(Mn=0,xs=null,vd(r)):(Mn=0,xs=null,tc(a,r,T,7));break;case 5:var U=null;switch(on.tag){case 26:U=on.memoizedState;case 5:case 27:var G=on;if(U?QT(U):G.stateNode.complete){Mn=0,xs=null;var te=G.sibling;if(te!==null)on=te;else{var ve=G.return;ve!==null?(on=ve,ll(ve)):on=null}break t}}Mn=0,xs=null,tc(a,r,T,5);break;case 6:Mn=0,xs=null,tc(a,r,T,6);break;case 8:al(),fi=6;break e;default:throw Error(i(462))}}Xs();break}catch(Le){Or(a,Le)}while(!0);return Tr=Wo=null,Y.H=m,Y.A=_,At=d,on!==null?0:(Wt=null,an=0,$u(),fi)}function Xs(){for(;on!==null&&!gt();)cf(on)}function cf(a){var r=sf(a.alternate,a,ca);a.memoizedProps=a.pendingProps,r===null?ll(a):on=r}function vd(a){var r=a,d=r.alternate;switch(r.tag){case 15:case 0:r=ud(d,r,r.pendingProps,r.type,void 0,an);break;case 11:r=ud(d,r,r.pendingProps,r.type.render,r.ref,an);break;case 5:im(r);default:oa(d,r),r=on=Ic(r,ca),r=sf(d,r,ca)}a.memoizedProps=a.pendingProps,r===null?ll(a):on=r}function tc(a,r,d,m){Tr=Wo=null,im(r),kl=null,Hl=0;var _=r.return;try{if(Hi(a,_,r,d,an)){fi=1,Yh(a,ia(d,a.current)),on=null;return}}catch(T){if(_!==null)throw on=_,T;fi=1,Yh(a,ia(d,a.current)),on=null;return}r.flags&32768?(vn||m===1?a=!0:sr||(an&536870912)!==0?a=!1:(Va=a=!0,(m===2||m===9||m===3||m===6)&&(m=Fs.current,m!==null&&m.tag===13&&(m.flags|=16384))),bd(r,a)):ll(r)}function ll(a){var r=a;do{if((r.flags&32768)!==0){bd(r,Va);return}a=r.return;var d=fd(r.alternate,r,ca);if(d!==null){on=d;return}if(r=r.sibling,r!==null){on=r;return}on=r=a}while(r!==null);fi===0&&(fi=5)}function bd(a,r){do{var d=Ia(a.alternate,a);if(d!==null){d.flags&=32767,on=d;return}if(d=a.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!r&&(a=a.sibling,a!==null)){on=a;return}on=a=d}while(a!==null);fi=6,on=null}function mo(a,r,d,m,_,T,U,G,te){a.cancelPendingCommit=null;do nu();while(kn!==0);if((At&6)!==0)throw Error(i(327));if(r!==null){if(r===a.current)throw Error(i(177));if(T=r.lanes|r.childLanes,T|=Zi,qn(a,d,T,U,G,te),a===Wt&&(on=Wt=null,an=0),$c=r,ua=a,Fa=d,Qc=T,Jc=_,xd=m,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,C(de,function(){return uf(),null})):(a.callbackNode=null,a.callbackPriority=0),m=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||m){m=Y.T,Y.T=null,_=$.p,$.p=2,U=At,At|=4;try{Ib(a,r,d)}finally{At=U,$.p=_,Y.T=m}}kn=1,zi(),go(),nc()}}function zi(){if(kn===1){kn=0;var a=ua,r=$c,d=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||d){d=Y.T,Y.T=null;var m=$.p;$.p=2;var _=At;At|=4;try{el(r,a);var T=Fb,U=G0(a.containerInfo),G=T.focusedElem,te=T.selectionRange;if(U!==G&&G&&G.ownerDocument&&Yn(G.ownerDocument.documentElement,G)){if(te!==null&&Vp(G)){var ve=te.start,Le=te.end;if(Le===void 0&&(Le=ve),"selectionStart"in G)G.selectionStart=ve,G.selectionEnd=Math.min(Le,G.value.length);else{var ze=G.ownerDocument||document,Se=ze&&ze.defaultView||window;if(Se.getSelection){var Te=Se.getSelection(),St=G.textContent.length,Vt=Math.min(te.start,St),Qn=te.end===void 0?Vt:Math.min(te.end,St);!Te.extend&&Vt>Qn&&(U=Qn,Qn=Vt,Vt=U);var ce=Nc(G,Vt),re=Nc(G,Qn);if(ce&&re&&(Te.rangeCount!==1||Te.anchorNode!==ce.node||Te.anchorOffset!==ce.offset||Te.focusNode!==re.node||Te.focusOffset!==re.offset)){var ye=ze.createRange();ye.setStart(ce.node,ce.offset),Te.removeAllRanges(),Vt>Qn?(Te.addRange(ye),Te.extend(re.node,re.offset)):(ye.setEnd(re.node,re.offset),Te.addRange(ye))}}}}for(ze=[],Te=G;Te=Te.parentNode;)Te.nodeType===1&&ze.push({element:Te,left:Te.scrollLeft,top:Te.scrollTop});for(typeof G.focus=="function"&&G.focus(),G=0;G<ze.length;G++){var Pe=ze[G];Pe.element.scrollLeft=Pe.left,Pe.element.scrollTop=Pe.top}}$x=!!Vb,Fb=Vb=null}finally{At=_,$.p=m,Y.T=d}}a.current=r,kn=2}}function go(){if(kn===2){kn=0;var a=ua,r=$c,d=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||d){d=Y.T,Y.T=null;var m=$.p;$.p=2;var _=At;At|=4;try{oi(a,r.alternate,r)}finally{At=_,$.p=m,Y.T=d}}kn=3}}function nc(){if(kn===4||kn===3){kn=0,vt();var a=ua,r=$c,d=Fa,m=xd;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?kn=5:(kn=0,$c=ua=null,zr(a,a.pendingLanes));var _=a.pendingLanes;if(_===0&&(Ri=null),Io(d),r=r.stateNode,Ne&&typeof Ne.onCommitFiberRoot=="function")try{Ne.onCommitFiberRoot(Ee,r,void 0,(r.current.flags&128)===128)}catch{}if(m!==null){r=Y.T,_=$.p,$.p=2,Y.T=null;try{for(var T=a.onRecoverableError,U=0;U<m.length;U++){var G=m[U];T(G.value,{componentStack:G.stack})}}finally{Y.T=r,$.p=_}}(Fa&3)!==0&&nu(),qe(a),_=a.pendingLanes,(d&261930)!==0&&(_&42)!==0?a===ec?sl++:(sl=0,ec=a):sl=0,ft(0)}}function zr(a,r){(a.pooledCacheLanes&=r)===0&&(r=a.pooledCache,r!=null&&(a.pooledCache=null,Ol(r)))}function nu(){return zi(),go(),nc(),uf()}function uf(){if(kn!==5)return!1;var a=ua,r=Qc;Qc=0;var d=Io(Fa),m=Y.T,_=$.p;try{$.p=32>d?32:d,Y.T=null,d=Jc,Jc=null;var T=ua,U=Fa;if(kn=0,$c=ua=null,Fa=0,(At&6)!==0)throw Error(i(331));var G=At;if(At|=4,js(T.current),Lm(T,T.current,U,d),At=G,ft(0,!1),Ne&&typeof Ne.onPostCommitFiberRoot=="function")try{Ne.onPostCommitFiberRoot(Ee,T)}catch{}return!0}finally{$.p=_,Y.T=m,zr(a,r)}}function Um(a,r,d){r=ia(d,r),r=Tm(a.stateNode,r,2),a=Yo(a,r,2),a!==null&&(Bt(a,2),qe(a))}function Nn(a,r,d){if(a.tag===3)Um(a,a,d);else for(;r!==null;){if(r.tag===3){Um(r,a,d);break}else if(r.tag===1){var m=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(Ri===null||!Ri.has(m))){a=ia(d,a),d=Em(2),m=Yo(r,d,2),m!==null&&(Ox(d,m,r,a),Bt(m,2),qe(m));break}}r=r.return}}function _d(a,r,d){var m=a.pingCache;if(m===null){m=a.pingCache=new tn;var _=new Set;m.set(r,_)}else _=m.get(r),_===void 0&&(_=new Set,m.set(r,_));_.has(d)||(Im=!0,_.add(d),a=l.bind(null,a,r,d),r.then(a,a))}function l(a,r,d){var m=a.pingCache;m!==null&&m.delete(r),a.pingedLanes|=a.suspendedLanes&d,a.warmLanes&=~d,Wt===a&&(an&d)===d&&(fi===4||fi===3&&(an&62914560)===an&&300>He()-Kc?(At&2)===0&&rl(a,0):gd|=d,ei===an&&(ei=0)),qe(a)}function u(a,r){r===0&&(r=ke()),a=Ts(a,r),a!==null&&(Bt(a,r),qe(a))}function g(a){var r=a.memoizedState,d=0;r!==null&&(d=r.retryLane),u(a,d)}function b(a,r){var d=0;switch(a.tag){case 31:case 13:var m=a.stateNode,_=a.memoizedState;_!==null&&(d=_.retryLane);break;case 19:m=a.stateNode;break;case 22:m=a.stateNode._retryCache;break;default:throw Error(i(314))}m!==null&&m.delete(r),u(a,d)}function C(a,r){return J(a,r)}var D=null,k=null,ne=!1,we=!1,Ge=!1,nt=0;function qe(a){a!==k&&a.next===null&&(k===null?D=k=a:k=k.next=a),we=!0,ne||(ne=!0,he())}function ft(a,r){if(!Ge&&we){Ge=!0;do for(var d=!1,m=D;m!==null;){if(a!==0){var _=m.pendingLanes;if(_===0)var T=0;else{var U=m.suspendedLanes,G=m.pingedLanes;T=(1<<31-lt(42|a)+1)-1,T&=_&~(U&~G),T=T&201326741?T&201326741|1:T?T|2:0}T!==0&&(d=!0,_e(m,T))}else T=an,T=De(m,m===Wt?T:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(T&3)===0||ut(m,T)||(d=!0,_e(m,T));m=m.next}while(d);Ge=!1}}function $t(){Ni()}function Ni(){we=ne=!1;var a=0;nt!==0&&kI()&&(a=nt);for(var r=He(),d=null,m=D;m!==null;){var _=m.next,T=iu(m,r);T===0?(m.next=null,d===null?D=_:d.next=_,_===null&&(k=d)):(d=m,(a!==0||(T&3)!==0)&&(we=!0)),m=_}kn!==0&&kn!==5||ft(a),nt!==0&&(nt=0)}function iu(a,r){for(var d=a.suspendedLanes,m=a.pingedLanes,_=a.expirationTimes,T=a.pendingLanes&-62914561;0<T;){var U=31-lt(T),G=1<<U,te=_[U];te===-1?((G&d)===0||(G&m)!==0)&&(_[U]=it(G,r)):te<=r&&(a.expiredLanes|=G),T&=~G}if(r=Wt,d=an,d=De(a,a===r?d:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),m=a.callbackNode,d===0||a===r&&(Mn===2||Mn===9)||a.cancelPendingCommit!==null)return m!==null&&m!==null&&Ot(m),a.callbackNode=null,a.callbackPriority=0;if((d&3)===0||ut(a,d)){if(r=d&-d,r===a.callbackPriority)return r;switch(m!==null&&Ot(m),Io(d)){case 2:case 8:d=z;break;case 32:d=de;break;case 268435456:d=Fe;break;default:d=de}return m=cl.bind(null,a),d=J(d,m),a.callbackPriority=r,a.callbackNode=d,r}return m!==null&&m!==null&&Ot(m),a.callbackPriority=2,a.callbackNode=null,2}function cl(a,r){if(kn!==0&&kn!==5)return a.callbackNode=null,a.callbackPriority=0,null;var d=a.callbackNode;if(nu()&&a.callbackNode!==d)return null;var m=an;return m=De(a,a===Wt?m:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),m===0?null:(mn(a,m,r),iu(a,He()),a.callbackNode!=null&&a.callbackNode===d?cl.bind(null,a):null)}function _e(a,r){if(nu())return null;mn(a,r,!0)}function he(){GI(function(){(At&6)!==0?J(X,$t):Ni()})}function Me(){if(nt===0){var a=so;a===0&&(a=jt,jt<<=1,(jt&261888)===0&&(jt=256)),nt=a}return nt}function Qe(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:Uo(""+a)}function Ut(a,r){var d=r.ownerDocument.createElement("input");return d.name=r.name,d.value=r.value,a.id&&d.setAttribute("form",a.id),r.parentNode.insertBefore(d,r),a=new FormData(a),d.parentNode.removeChild(d),a}function gi(a,r,d,m,_){if(r==="submit"&&d&&d.stateNode===_){var T=Qe((_[Fi]||null).action),U=m.submitter;U&&(r=(r=U[Fi]||null)?Qe(r.formAction):U.getAttribute("formAction"),r!==null&&(T=r,U=null));var G=new Fu("action","action",null,m,_);a.push({event:G,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(nt!==0){var te=U?Ut(_,U):new FormData(_);xm(d,{pending:!0,data:te,method:_.method,action:T},null,te)}}else typeof T=="function"&&(G.preventDefault(),te=U?Ut(_,U):new FormData(_),xm(d,{pending:!0,data:te,method:_.method,action:T},T,te))},currentTarget:_}]})}}for(var zt=0;zt<Zu.length;zt++){var En=Zu[zt],es=En.toLowerCase(),Ln=En[0].toUpperCase()+En.slice(1);Ea(es,"on"+Ln)}Ea(Sh,"onAnimationEnd"),Ea(Yu,"onAnimationIteration"),Ea(kp,"onAnimationStart"),Ea("dblclick","onDoubleClick"),Ea("focusin","onFocus"),Ea("focusout","onBlur"),Ea(W0,"onTransitionRun"),Ea(Tb,"onTransitionStart"),Ea(X0,"onTransitionCancel"),Ea(Hp,"onTransitionEnd"),xe("onMouseEnter",["mouseout","mouseover"]),xe("onMouseLeave",["mouseout","mouseover"]),xe("onPointerEnter",["pointerout","pointerover"]),xe("onPointerLeave",["pointerout","pointerover"]),oe("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),oe("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),oe("onBeforeInput",["compositionend","keypress","textInput","paste"]),oe("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),oe("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),oe("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ka="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Pb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ka));function RT(a,r){r=(r&4)!==0;for(var d=0;d<a.length;d++){var m=a[d],_=m.event;m=m.listeners;e:{var T=void 0;if(r)for(var U=m.length-1;0<=U;U--){var G=m[U],te=G.instance,ve=G.currentTarget;if(G=G.listener,te!==T&&_.isPropagationStopped())break e;T=G,_.currentTarget=ve;try{T(_)}catch(Le){Ku(Le)}_.currentTarget=null,T=te}else for(U=0;U<m.length;U++){if(G=m[U],te=G.instance,ve=G.currentTarget,G=G.listener,te!==T&&_.isPropagationStopped())break e;T=G,_.currentTarget=ve;try{T(_)}catch(Le){Ku(Le)}_.currentTarget=null,T=te}}}}function wn(a,r){var d=r[_s];d===void 0&&(d=r[_s]=new Set);var m=a+"__bubble";d.has(m)||(NT(r,a,2,!1),d.add(m))}function Ub(a,r,d){var m=0;r&&(m|=4),NT(d,a,m,r)}var Hx="_reactListening"+Math.random().toString(36).slice(2);function Ob(a){if(!a[Hx]){a[Hx]=!0,Ja.forEach(function(d){d!=="selectionchange"&&(Pb.has(d)||Ub(d,!1,a),Ub(d,!0,a))});var r=a.nodeType===9?a:a.ownerDocument;r===null||r[Hx]||(r[Hx]=!0,Ub("selectionchange",!1,r))}}function NT(a,r,d,m){switch(aE(r)){case 2:var _=cP;break;case 8:_=uP;break;default:_=$b}d=_.bind(null,r,d,a),_=void 0,!Mp||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(_=!0),m?_!==void 0?a.addEventListener(r,d,{capture:!0,passive:_}):a.addEventListener(r,d,!0):_!==void 0?a.addEventListener(r,d,{passive:_}):a.addEventListener(r,d,!1)}function zb(a,r,d,m,_){var T=m;if((r&1)===0&&(r&2)===0&&m!==null)e:for(;;){if(m===null)return;var U=m.tag;if(U===3||U===4){var G=m.stateNode.containerInfo;if(G===_)break;if(U===4)for(U=m.return;U!==null;){var te=U.tag;if((te===3||te===4)&&U.stateNode.containerInfo===_)return;U=U.return}for(;G!==null;){if(U=Kr(G),U===null)return;if(te=U.tag,te===5||te===6||te===26||te===27){m=T=U;continue e}G=G.parentNode}}m=m.return}Sp(function(){var ve=T,Le=ch(d),ze=[];e:{var Se=Ta.get(a);if(Se!==void 0){var Te=Fu,St=a;switch(a){case"keypress":if(Vu(d)===0)break e;case"keydown":case"keyup":Te=Dl;break;case"focusin":St="focus",Te=fh;break;case"focusout":St="blur",Te=fh;break;case"beforeblur":case"afterblur":Te=fh;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Te=wp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Te=T0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Te=D0;break;case Sh:case Yu:case kp:Te=Sb;break;case Hp:Te=wb;break;case"scroll":case"scrollend":Te=M0;break;case"wheel":Te=I0;break;case"copy":case"cut":case"paste":Te=A0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Te=Ap;break;case"toggle":case"beforetoggle":Te=U0}var Vt=(r&4)!==0,Qn=!Vt&&(a==="scroll"||a==="scrollend"),ce=Vt?Se!==null?Se+"Capture":null:Se;Vt=[];for(var re=ve,ye;re!==null;){var Pe=re;if(ye=Pe.stateNode,Pe=Pe.tag,Pe!==5&&Pe!==26&&Pe!==27||ye===null||ce===null||(Pe=_c(re,ce),Pe!=null&&Vt.push(Om(re,Pe,ye))),Qn)break;re=re.return}0<Vt.length&&(Se=new Te(Se,St,null,d,Le),ze.push({event:Se,listeners:Vt}))}}if((r&7)===0){e:{if(Se=a==="mouseover"||a==="pointerover",Te=a==="mouseout"||a==="pointerout",Se&&d!==lh&&(St=d.relatedTarget||d.fromElement)&&(Kr(St)||St[$a]))break e;if((Te||Se)&&(Se=Le.window===Le?Le:(Se=Le.ownerDocument)?Se.defaultView||Se.parentWindow:window,Te?(St=d.relatedTarget||d.toElement,Te=ve,St=St?Kr(St):null,St!==null&&(Qn=o(St),Vt=St.tag,St!==Qn||Vt!==5&&Vt!==27&&Vt!==6)&&(St=null)):(Te=null,St=ve),Te!==St)){if(Vt=wp,Pe="onMouseLeave",ce="onMouseEnter",re="mouse",(a==="pointerout"||a==="pointerover")&&(Vt=Ap,Pe="onPointerLeave",ce="onPointerEnter",re="pointer"),Qn=Te==null?Se:Po(Te),ye=St==null?Se:Po(St),Se=new Vt(Pe,re+"leave",Te,d,Le),Se.target=Qn,Se.relatedTarget=ye,Pe=null,Kr(Le)===ve&&(Vt=new Vt(ce,re+"enter",St,d,Le),Vt.target=ye,Vt.relatedTarget=Qn,Pe=Vt),Qn=Pe,Te&&St)t:{for(Vt=OI,ce=Te,re=St,ye=0,Pe=ce;Pe;Pe=Vt(Pe))ye++;Pe=0;for(var It=re;It;It=Vt(It))Pe++;for(;0<ye-Pe;)ce=Vt(ce),ye--;for(;0<Pe-ye;)re=Vt(re),Pe--;for(;ye--;){if(ce===re||re!==null&&ce===re.alternate){Vt=ce;break t}ce=Vt(ce),re=Vt(re)}Vt=null}else Vt=null;Te!==null&&DT(ze,Se,Te,Vt,!1),St!==null&&Qn!==null&&DT(ze,Qn,St,Vt,!0)}}e:{if(Se=ve?Po(ve):window,Te=Se.nodeName&&Se.nodeName.toLowerCase(),Te==="select"||Te==="input"&&Se.type==="file")var zn=Pp;else if(Ip(Se))if(xr)zn=H0;else{zn=zp;var Tt=F0}else Te=Se.nodeName,!Te||Te.toLowerCase()!=="input"||Se.type!=="checkbox"&&Se.type!=="radio"?ve&&In(ve.elementType)&&(zn=Pp):zn=k0;if(zn&&(zn=zn(a,ve))){bh(ze,zn,d,Le);break e}Tt&&Tt(a,Se,ve),a==="focusout"&&ve&&Se.type==="number"&&ve.memoizedProps.value!=null&&qt(Se,"number",Se.value)}switch(Tt=ve?Po(ve):window,a){case"focusin":(Ip(Tt)||Tt.contentEditable==="true")&&(yr=Tt,vr=ve,Dc=null);break;case"focusout":Dc=vr=yr=null;break;case"mousedown":_h=!0;break;case"contextmenu":case"mouseup":case"dragend":_h=!1,Lc(ze,d,Le);break;case"selectionchange":if(j0)break;case"keydown":case"keyup":Lc(ze,d,Le)}var dn;if(Ll)e:{switch(a){case"compositionstart":var An="onCompositionStart";break e;case"compositionend":An="onCompositionEnd";break e;case"compositionupdate":An="onCompositionUpdate";break e}An=void 0}else Il?vh(a,d)&&(An="onCompositionEnd"):a==="keydown"&&d.keyCode===229&&(An="onCompositionStart");An&&(Rp&&d.locale!=="ko"&&(Il||An!=="onCompositionStart"?An==="onCompositionEnd"&&Il&&(dn=Bu()):(na=Le,dh="value"in na?na.value:na.textContent,Il=!0)),Tt=Gx(ve,An),0<Tt.length&&(An=new ph(An,a,null,d,Le),ze.push({event:An,listeners:Tt}),dn?An.data=dn:(dn=Np(d),dn!==null&&(An.data=dn)))),(dn=yh?B0(a,d):Dp(a,d))&&(An=Gx(ve,"onBeforeInput"),0<An.length&&(Tt=new ph("onBeforeInput","beforeinput",null,d,Le),ze.push({event:Tt,listeners:An}),Tt.data=dn)),gi(ze,a,ve,d,Le)}RT(ze,r)})}function Om(a,r,d){return{instance:a,listener:r,currentTarget:d}}function Gx(a,r){for(var d=r+"Capture",m=[];a!==null;){var _=a,T=_.stateNode;if(_=_.tag,_!==5&&_!==26&&_!==27||T===null||(_=_c(a,d),_!=null&&m.unshift(Om(a,_,T)),_=_c(a,r),_!=null&&m.push(Om(a,_,T))),a.tag===3)return m;a=a.return}return[]}function OI(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function DT(a,r,d,m,_){for(var T=r._reactName,U=[];d!==null&&d!==m;){var G=d,te=G.alternate,ve=G.stateNode;if(G=G.tag,te!==null&&te===m)break;G!==5&&G!==26&&G!==27||ve===null||(te=ve,_?(ve=_c(d,T),ve!=null&&U.unshift(Om(d,ve,te))):_||(ve=_c(d,T),ve!=null&&U.push(Om(d,ve,te)))),d=d.return}U.length!==0&&a.push({event:r,listeners:U})}var zI=/\r\n?/g,BI=/\u0000|\uFFFD/g;function LT(a){return(typeof a=="string"?a:""+a).replace(zI,` 9`).replace(BI,"")}function IT(a,r){return r=LT(r),LT(a)===r}function $n(a,r,d,m,_,T){switch(d){case"children":typeof m=="string"?r==="body"||r==="textarea"&&m===""||Os(a,m):(typeof m=="number"||typeof m=="bigint")&&r!=="body"&&Os(a,""+m);break;case"className":yt(a,"class",m);break;case"tabIndex":yt(a,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":yt(a,d,m);break;case"style":Ma(a,m,T);break;case"data":if(r!=="object"){yt(a,"data",m);break}case"src":case"href":if(m===""&&(r!=="a"||d!=="href")){a.removeAttribute(d);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){a.removeAttribute(d);break}m=Uo(""+m),a.setAttribute(d,m);break;case"action":case"formAction":if(typeof m=="function"){a.setAttribute(d,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof T=="function"&&(d==="formAction"?(r!=="input"&&$n(a,r,"name",_.name,_,null),$n(a,r,"formEncType",_.formEncType,_,null),$n(a,r,"formMethod",_.formMethod,_,null),$n(a,r,"formTarget",_.formTarget,_,null)):($n(a,r,"encType",_.encType,_,null),$n(a,r,"method",_.method,_,null),$n(a,r,"target",_.target,_,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){a.removeAttribute(d);break}m=Uo(""+m),a.setAttribute(d,m);break;case"onClick":m!=null&&(a.onclick=Qr);break;case"onScroll":m!=null&&wn("scroll",a);break;case"onScrollEnd":m!=null&&wn("scrollend",a);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(i(61));if(d=m.__html,d!=null){if(_.children!=null)throw Error(i(60));a.innerHTML=d}}break;case"multiple":a.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":a.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){a.removeAttribute("xlink:href");break}d=Uo(""+m),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(d,""+m):a.removeAttribute(d);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
9ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":m&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(d,""):a.removeAttribute(d);break;case"capture":case"download":m===!0?a.setAttribute(d,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(d,m):a.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?a.setAttribute(d,m):a.removeAttribute(d);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?a.removeAttribute(d):a.setAttribute(d,m);break;case"popover":wn("beforetoggle",a),wn("toggle",a),ot(a,"popover",m);break;case"xlinkActuate":xt(a,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":xt(a,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":xt(a,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":xt(a,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":xt(a,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":xt(a,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":xt(a,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":xt(a,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":xt(a,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":ot(a,"is",m);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=er.get(d)||d,ot(a,d,m))}}function Bb(a,r,d,m,_,T){switch(d){case"style":Ma(a,m,T);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(i(61));if(d=m.__html,d!=null){if(_.children!=null)throw Error(i(60));a.innerHTML=d}}break;case"children":typeof m=="string"?Os(a,m):(typeof m=="number"||typeof m=="bigint")&&Os(a,""+m);break;case"onScroll":m!=null&&wn("scroll",a);break;case"onScrollEnd":m!=null&&wn("scrollend",a);break;case"onClick":m!=null&&(a.onclick=Qr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!H.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(_=d.endsWith("Capture"),r=d.slice(2,_?d.length-7:void 0),T=a[Fi]||null,T=T!=null?T[d]:null,typeof T=="function"&&a.removeEventListener(r,T,_),typeof m=="function")){typeof T!="function"&&T!==null&&(d in a?a[d]=null:a.hasAttribute(d)&&a.removeAttribute(d)),a.addEventListener(r,m,_);break e}d in a?a[d]=m:m===!0?a.setAttribute(d,""):ot(a,d,m)}}}function Ls(a,r,d){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":wn("error",a),wn("load",a);var m=!1,_=!1,T;for(T in d)if(d.hasOwnProperty(T)){var U=d[T];if(U!=null)switch(T){case"src":m=!0;break;case"srcSet":_=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,r));default:$n(a,r,T,U,d,null)}}_&&$n(a,r,"srcSet",d.srcSet,d,null),m&&$n(a,r,"src",d.src,d,null);return;case"input":wn("invalid",a);var G=T=U=_=null,te=null,ve=null;for(m in d)if(d.hasOwnProperty(m)){var Le=d[m];if(Le!=null)switch(m){case"name":_=Le;break;case"type":U=Le;break;case"checked":te=Le;break;case"defaultChecked":ve=Le;break;case"value":T=Le;break;case"defaultValue":G=Le;break;case"children":case"dangerouslySetInnerHTML":if(Le!=null)throw Error(i(137,r));break;default:$n(a,r,m,Le,d,null)}}Yi(a,T,G,te,ve,U,_,!1);return;case"select":wn("invalid",a),m=U=T=null;for(_ in d)if(d.hasOwnProperty(_)&&(G=d[_],G!=null))switch(_){case"value":T=G;break;case"defaultValue":U=G;break;case"multiple":m=G;default:$n(a,r,_,G,d,null)}r=T,d=U,a.multiple=!!m,r!=null?bi(a,!!m,r,!1):d!=null&&bi(a,!!m,d,!0);return;case"textarea":wn("invalid",a),T=_=m=null;for(U in d)if(d.hasOwnProperty(U)&&(G=d[U],G!=null))switch(U){case"value":m=G;break;case"defaultValue":_=G;break;case"children":T=G;break;case"dangerouslySetInnerHTML":if(G!=null)throw Error(i(91));break;default:$n(a,r,U,G,d,null)}ta(a,m,_,T);return;case"option":for(te in d)d.hasOwnProperty(te)&&(m=d[te],m!=null)&&(te==="selected"?a.selected=m&&typeof m!="function"&&typeof m!="symbol":$n(a,r,te,m,d,null));return;case"dialog":wn("beforetoggle",a),wn("toggle",a),wn("cancel",a),wn("close",a);break;case"iframe":case"object":wn("load",a);break;case"video":case"audio":for(m=0;m<ka.length;m++)wn(ka[m],a);break;case"image":wn("error",a),wn("load",a);break;case"details":wn("toggle",a);break;case"embed":case"source":case"link":wn("error",a),wn("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ve in d)if(d.hasOwnProperty(ve)&&(m=d[ve],m!=null))switch(ve){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,r));default:$n(a,r,ve,m,d,null)}return;default:if(In(r)){for(Le in d)d.hasOwnProperty(Le)&&(m=d[Le],m!==void 0&&Bb(a,r,Le,m,d,void 0));return}}for(G in d)d.hasOwnProperty(G)&&(m=d[G],m!=null&&$n(a,r,G,m,d,null))}function VI(a,r,d,m){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var _=null,T=null,U=null,G=null,te=null,ve=null,Le=null;for(Te in d){var ze=d[Te];if(d.hasOwnProperty(Te)&&ze!=null)switch(Te){case"checked":break;case"value":break;case"defaultValue":te=ze;default:m.hasOwnProperty(Te)||$n(a,r,Te,null,m,ze)}}for(var Se in m){var Te=m[Se];if(ze=d[Se],m.hasOwnProperty(Se)&&(Te!=null||ze!=null))switch(Se){case"type":T=Te;break;case"name":_=Te;break;case"checked":ve=Te;break;case"defaultChecked":Le=Te;break;case"value":U=Te;break;case"defaultValue":G=Te;break;case"children":case"dangerouslySetInnerHTML":if(Te!=null)throw Error(i(137,r));break;default:Te!==ze&&$n(a,r,Se,Te,m,ze)}}dt(a,U,G,te,ve,Le,T,_);return;case"select":Te=U=G=Se=null;for(T in d)if(te=d[T],d.hasOwnProperty(T)&&te!=null)switch(T){case"value":break;case"multiple":Te=te;default:m.hasOwnProperty(T)||$n(a,r,T,null,m,te)}for(_ in m)if(T=m[_],te=d[_],m.hasOwnProperty(_)&&(T!=null||te!=null))switch(_){case"value":Se=T;break;case"defaultValue":G=T;break;case"multiple":U=T;default:T!==te&&$n(a,r,_,T,m,te)}r=G,d=U,m=Te,Se!=null?bi(a,!!d,Se,!1):!!m!=!!d&&(r!=null?bi(a,!!d,r,!0):bi(a,!!d,d?[]:"",!1));return;case"textarea":Te=Se=null;for(G in d)if(_=d[G],d.hasOwnProperty(G)&&_!=null&&!m.hasOwnProperty(G))switch(G){case"value":break;case"children":break;default:$n(a,r,G,null,m,_)}for(U in m)if(_=m[U],T=d[U],m.hasOwnProperty(U)&&(_!=null||T!=null))switch(U){case"value":Se=_;break;case"defaultValue":Te=_;break;case"children":break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(i(91));break;default:_!==T&&$n(a,r,U,_,m,T)}Ss(a,Se,Te);return;case"option":for(var St in d)Se=d[St],d.hasOwnProperty(St)&&Se!=null&&!m.hasOwnProperty(St)&&(St==="selected"?a.selected=!1:$n(a,r,St,null,m,Se));for(te in m)Se=m[te],Te=d[te],m.hasOwnProperty(te)&&Se!==Te&&(Se!=null||Te!=null)&&(te==="selected"?a.selected=Se&&typeof Se!="function"&&typeof Se!="symbol":$n(a,r,te,Se,m,Te));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Vt in d)Se=d[Vt],d.hasOwnProperty(Vt)&&Se!=null&&!m.hasOwnProperty(Vt)&&$n(a,r,Vt,null,m,Se);for(ve in m)if(Se=m[ve],Te=d[ve],m.hasOwnProperty(ve)&&Se!==Te&&(Se!=null||Te!=null))switch(ve){case"children":case"dangerouslySetInnerHTML":if(Se!=null)throw Error(i(137,r));break;default:$n(a,r,ve,Se,m,Te)}return;default:if(In(r)){for(var Qn in d)Se=d[Qn],d.hasOwnProperty(Qn)&&Se!==void 0&&!m.hasOwnProperty(Qn)&&Bb(a,r,Qn,void 0,m,Se);for(Le in m)Se=m[Le],Te=d[Le],!m.hasOwnProperty(Le)||Se===Te||Se===void 0&&Te===void 0||Bb(a,r,Le,Se,m,Te);return}}for(var ce in d)Se=d[ce],d.hasOwnProperty(ce)&&Se!=null&&!m.hasOwnProperty(ce)&&$n(a,r,ce,null,m,Se);for(ze in m)Se=m[ze],Te=d[ze],!m.hasOwnProperty(ze)||Se===Te||Se==null&&Te==null||$n(a,r,ze,Se,m,Te)}
vendor: 13,063 bytes, line 9
9function PT(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function FI(){if(typeof performance.getEntriesByType=="function"){for(var a=0,r=0,d=performance.getEntriesByType("resource"),m=0;m<d.length;m++){var _=d[m],T=_.transferSize,U=_.initiatorType,G=_.duration;if(T&&G&&PT(U)){for(U=0,G=_.responseEnd,m+=1;m<d.length;m++){var te=d[m],ve=te.startTime;if(ve>G)break;var Le=te.transferSize,ze=te.initiatorType;Le&&PT(ze)&&(te=te.responseEnd,U+=Le*(te<G?1:(G-ve)/(te-ve)))}if(--m,r+=8*(T+U)/(_.duration/1e3),a++,10<a)break}}if(0<a)return r/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Vb=null,Fb=null;function jx(a){return a.nodeType===9?a:a.ownerDocument}function UT(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function OT(a,r){if(a===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&r==="foreignObject"?0:a}function kb(a,r){return a==="textarea"||a==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var Hb=null;function kI(){var a=window.event;return a&&a.type==="popstate"?a===Hb?!1:(Hb=a,!0):(Hb=null,!1)}var zT=typeof setTimeout=="function"?setTimeout:void 0,HI=typeof clearTimeout=="function"?clearTimeout:void 0,BT=typeof Promise=="function"?Promise:void 0,GI=typeof queueMicrotask=="function"?queueMicrotask:typeof BT<"u"?function(a){return BT.resolve(null).then(a).catch(jI)}:zT;function jI(a){setTimeout(function(){throw a})}function su(a){return a==="head"}function VT(a,r){var d=r,m=0;do{var _=d.nextSibling;if(a.removeChild(d),_&&_.nodeType===8)if(d=_.data,d==="/$"||d==="/&"){if(m===0){a.removeChild(_),pf(r);return}m--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")m++;else if(d==="html")zm(a.ownerDocument.documentElement);else if(d==="head"){d=a.ownerDocument.head,zm(d);for(var T=d.firstChild;T;){var U=T.nextSibling,G=T.nodeName;T[Sa]||G==="SCRIPT"||G==="STYLE"||G==="LINK"&&T.rel.toLowerCase()==="stylesheet"||d.removeChild(T),T=U}}else d==="body"&&zm(a.ownerDocument.body);d=_}while(d);pf(r)}function FT(a,r){var d=a;a=0;do{var m=d.nextSibling;if(d.nodeType===1?r?(d._stashedDisplay=d.style.display,d.style.display="none"):(d.style.display=d._stashedDisplay||"",d.getAttribute("style")===""&&d.removeAttribute("style")):d.nodeType===3&&(r?(d._stashedText=d.nodeValue,d.nodeValue=""):d.nodeValue=d._stashedText||""),m&&m.nodeType===8)if(d=m.data,d==="/$"){if(a===0)break;a--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||a++;d=m}while(d)}function Gb(a){var r=a.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var d=r;switch(r=r.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":Gb(d),Zr(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}a.removeChild(d)}}function WI(a,r,d,m){for(;a.nodeType===1;){var _=d;if(a.nodeName.toLowerCase()!==r.toLowerCase()){if(!m&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(m){if(!a[Sa])switch(r){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(T=a.getAttribute("rel"),T==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(T!==_.rel||a.getAttribute("href")!==(_.href==null||_.href===""?null:_.href)||a.getAttribute("crossorigin")!==(_.crossOrigin==null?null:_.crossOrigin)||a.getAttribute("title")!==(_.title==null?null:_.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(T=a.getAttribute("src"),(T!==(_.src==null?null:_.src)||a.getAttribute("type")!==(_.type==null?null:_.type)||a.getAttribute("crossorigin")!==(_.crossOrigin==null?null:_.crossOrigin))&&T&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(r==="input"&&a.type==="hidden"){var T=_.name==null?null:""+_.name;if(_.type==="hidden"&&a.getAttribute("name")===T)return a}else return a;if(a=Br(a.nextSibling),a===null)break}return null}function XI(a,r,d){if(r==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!d||(a=Br(a.nextSibling),a===null))return null;return a}function kT(a,r){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!r||(a=Br(a.nextSibling),a===null))return null;return a}function jb(a){return a.data==="$?"||a.data==="$~"}function Wb(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function qI(a,r){var d=a.ownerDocument;if(a.data==="$~")a._reactRetry=r;else if(a.data!=="$?"||d.readyState!=="loading")r();else{var m=function(){r(),d.removeEventListener("DOMContentLoaded",m)};d.addEventListener("DOMContentLoaded",m),a._reactRetry=m}}function Br(a){for(;a!=null;a=a.nextSibling){var r=a.nodeType;if(r===1||r===3)break;if(r===8){if(r=a.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return a}var Xb=null;function HT(a){a=a.nextSibling;for(var r=0;a;){if(a.nodeType===8){var d=a.data;if(d==="/$"||d==="/&"){if(r===0)return Br(a.nextSibling);r--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||r++}a=a.nextSibling}return null}function GT(a){a=a.previousSibling;for(var r=0;a;){if(a.nodeType===8){var d=a.data;if(d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"){if(r===0)return a;r--}else d!=="/$"&&d!=="/&"||r++}a=a.previousSibling}return null}function jT(a,r,d){switch(r=jx(d),a){case"html":if(a=r.documentElement,!a)throw Error(i(452));return a;case"head":if(a=r.head,!a)throw Error(i(453));return a;case"body":if(a=r.body,!a)throw Error(i(454));return a;default:throw Error(i(451))}}function zm(a){for(var r=a.attributes;r.length;)a.removeAttributeNode(r[0]);Zr(a)}var Vr=new Map,WT=new Set;function Wx(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var ic=$.d;$.d={f:YI,r:ZI,D:KI,C:$I,L:QI,m:JI,X:tP,S:eP,M:nP};function YI(){var a=ic.f(),r=ar();return a||r}function ZI(a){var r=$r(a);r!==null&&r.tag===5&&r.type==="form"?Ax(r):ic.r(a)}var df=typeof document>"u"?null:document;function XT(a,r,d){var m=df;if(m&&typeof r=="string"&&r){var _=Rn(r);_='link[rel="'+a+'"][href="'+_+'"]',typeof d=="string"&&(_+='[crossorigin="'+d+'"]'),WT.has(_)||(WT.add(_),a={rel:a,crossOrigin:d,href:r},m.querySelector(_)===null&&(r=m.createElement("link"),Ls(r,"link",a),vi(r),m.head.appendChild(r)))}}function KI(a){ic.D(a),XT("dns-prefetch",a,null)}function $I(a,r){ic.C(a,r),XT("preconnect",a,r)}function QI(a,r,d){ic.L(a,r,d);var m=df;if(m&&a&&r){var _='link[rel="preload"][as="'+Rn(r)+'"]';r==="image"&&d&&d.imageSrcSet?(_+='[imagesrcset="'+Rn(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(_+='[imagesizes="'+Rn(d.imageSizes)+'"]')):_+='[href="'+Rn(a)+'"]';var T=_;switch(r){case"style":T=hf(a);break;case"script":T=ff(a)}Vr.has(T)||(a=y({rel:"preload",href:r==="image"&&d&&d.imageSrcSet?void 0:a,as:r},d),Vr.set(T,a),m.querySelector(_)!==null||r==="style"&&m.querySelector(Bm(T))||r==="script"&&m.querySelector(Vm(T))||(r=m.createElement("link"),Ls(r,"link",a),vi(r),m.head.appendChild(r)))}}function JI(a,r){ic.m(a,r);var d=df;if(d&&a){var m=r&&typeof r.as=="string"?r.as:"script",_='link[rel="modulepreload"][as="'+Rn(m)+'"][href="'+Rn(a)+'"]',T=_;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":T=ff(a)}if(!Vr.has(T)&&(a=y({rel:"modulepreload",href:a},r),Vr.set(T,a),d.querySelector(_)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(Vm(T)))return}m=d.createElement("link"),Ls(m,"link",a),vi(m),d.head.appendChild(m)}}}function eP(a,r,d){ic.S(a,r,d);var m=df;if(m&&a){var _=pr(m).hoistableStyles,T=hf(a);r=r||"default";var U=_.get(T);if(!U){var G={loading:0,preload:null};if(U=m.querySelector(Bm(T)))G.loading=5;else{a=y({rel:"stylesheet",href:a,"data-precedence":r},d),(d=Vr.get(T))&&qb(a,d);var te=U=m.createElement("link");vi(te),Ls(te,"link",a),te._p=new Promise(function(ve,Le){te.onload=ve,te.onerror=Le}),te.addEventListener("load",function(){G.loading|=1}),te.addEventListener("error",function(){G.loading|=2}),G.loading|=4,Xx(U,r,m)}U={type:"stylesheet",instance:U,count:1,state:G},_.set(T,U)}}}function tP(a,r){ic.X(a,r);var d=df;if(d&&a){var m=pr(d).hoistableScripts,_=ff(a),T=m.get(_);T||(T=d.querySelector(Vm(_)),T||(a=y({src:a,async:!0},r),(r=Vr.get(_))&&Yb(a,r),T=d.createElement("script"),vi(T),Ls(T,"link",a),d.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},m.set(_,T))}}function nP(a,r){ic.M(a,r);var d=df;if(d&&a){var m=pr(d).hoistableScripts,_=ff(a),T=m.get(_);T||(T=d.querySelector(Vm(_)),T||(a=y({src:a,async:!0,type:"module"},r),(r=Vr.get(_))&&Yb(a,r),T=d.createElement("script"),vi(T),Ls(T,"link",a),d.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},m.set(_,T))}}function qT(a,r,d,m){var _=(_=pe.current)?Wx(_):null;if(!_)throw Error(i(446));switch(a){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(r=hf(d.href),d=pr(_).hoistableStyles,m=d.get(r),m||(m={type:"style",instance:null,count:0,state:null},d.set(r,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){a=hf(d.href);var T=pr(_).hoistableStyles,U=T.get(a);if(U||(_=_.ownerDocument||_,U={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},T.set(a,U),(T=_.querySelector(Bm(a)))&&!T._p&&(U.instance=T,U.state.loading=5),Vr.has(a)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},Vr.set(a,d),T||iP(_,a,d,U.state))),r&&m===null)throw Error(i(528,""));return U}if(r&&m!==null)throw Error(i(529,""));return null;case"script":return r=d.async,d=d.src,typeof d=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=ff(d),d=pr(_).hoistableScripts,m=d.get(r),m||(m={type:"script",instance:null,count:0,state:null},d.set(r,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,a))}}function hf(a){return'href="'+Rn(a)+'"'}function Bm(a){return'link[rel="stylesheet"]['+a+"]"}function YT(a){return y({},a,{"data-precedence":a.precedence,precedence:null})}function iP(a,r,d,m){a.querySelector('link[rel="preload"][as="style"]['+r+"]")?m.loading=1:(r=a.createElement("link"),m.preload=r,r.addEventListener("load",function(){return m.loading|=1}),r.addEventListener("error",function(){return m.loading|=2}),Ls(r,"link",d),vi(r),a.head.appendChild(r))}function ff(a){return'[src="'+Rn(a)+'"]'}function Vm(a){return"script[async]"+a}function ZT(a,r,d){if(r.count++,r.instance===null)switch(r.type){case"style":var m=a.querySelector('style[data-href~="'+Rn(d.href)+'"]');if(m)return r.instance=m,vi(m),m;var _=y({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return m=(a.ownerDocument||a).createElement("style"),vi(m),Ls(m,"style",_),Xx(m,d.precedence,a),r.instance=m;case"stylesheet":_=hf(d.href);var T=a.querySelector(Bm(_));if(T)return r.state.loading|=4,r.instance=T,vi(T),T;m=YT(d),(_=Vr.get(_))&&qb(m,_),T=(a.ownerDocument||a).createElement("link"),vi(T);var U=T;return U._p=new Promise(function(G,te){U.onload=G,U.onerror=te}),Ls(T,"link",m),r.state.loading|=4,Xx(T,d.precedence,a),r.instance=T;case"script":return T=ff(d.src),(_=a.querySelector(Vm(T)))?(r.instance=_,vi(_),_):(m=d,(_=Vr.get(T))&&(m=y({},d),Yb(m,_)),a=a.ownerDocument||a,_=a.createElement("script"),vi(_),Ls(_,"link",m),a.head.appendChild(_),r.instance=_);case"void":return null;default:throw Error(i(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(m=r.instance,r.state.loading|=4,Xx(m,d.precedence,a));return r.instance}function Xx(a,r,d){for(var m=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),_=m.length?m[m.length-1]:null,T=_,U=0;U<m.length;U++){var G=m[U];if(G.dataset.precedence===r)T=G;else if(T!==_)break}T?T.parentNode.insertBefore(a,T.nextSibling):(r=d.nodeType===9?d.head:d,r.insertBefore(a,r.firstChild))}function qb(a,r){a.crossOrigin==null&&(a.crossOrigin=r.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=r.referrerPolicy),a.title==null&&(a.title=r.title)}function Yb(a,r){a.crossOrigin==null&&(a.crossOrigin=r.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=r.referrerPolicy),a.integrity==null&&(a.integrity=r.integrity)}var qx=null;function KT(a,r,d){if(qx===null){var m=new Map,_=qx=new Map;_.set(d,m)}else _=qx,m=_.get(d),m||(m=new Map,_.set(d,m));if(m.has(a))return m;for(m.set(a,null),d=d.getElementsByTagName(a),_=0;_<d.length;_++){var T=d[_];if(!(T[Sa]||T[ii]||a==="link"&&T.getAttribute("rel")==="stylesheet")&&T.namespaceURI!=="http://www.w3.org/2000/svg"){var U=T.getAttribute(r)||"";U=a+U;var G=m.get(U);
vendor: 4,450 bytes, line 9
9G?G.push(T):m.set(U,[T])}}return m}function $T(a,r,d){a=a.ownerDocument||a,a.head.insertBefore(d,r==="title"?a.querySelector("head > title"):null)}function sP(a,r,d){if(d===1||r.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;return r.rel==="stylesheet"?(a=r.disabled,typeof r.precedence=="string"&&a==null):!0;case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function QT(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function aP(a,r,d,m){if(d.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var _=hf(m.href),T=r.querySelector(Bm(_));if(T){r=T._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(a.count++,a=Yx.bind(a),r.then(a,a)),d.state.loading|=4,d.instance=T,vi(T);return}T=r.ownerDocument||r,m=YT(m),(_=Vr.get(_))&&qb(m,_),T=T.createElement("link"),vi(T);var U=T;U._p=new Promise(function(G,te){U.onload=G,U.onerror=te}),Ls(T,"link",m),d.instance=T}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(d,r),(r=d.state.preload)&&(d.state.loading&3)===0&&(a.count++,d=Yx.bind(a),r.addEventListener("load",d),r.addEventListener("error",d))}}var Zb=0;function rP(a,r){return a.stylesheets&&a.count===0&&Kx(a,a.stylesheets),0<a.count||0<a.imgCount?function(d){var m=setTimeout(function(){if(a.stylesheets&&Kx(a,a.stylesheets),a.unsuspend){var T=a.unsuspend;a.unsuspend=null,T()}},6e4+r);0<a.imgBytes&&Zb===0&&(Zb=62500*FI());var _=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&Kx(a,a.stylesheets),a.unsuspend)){var T=a.unsuspend;a.unsuspend=null,T()}},(a.imgBytes>Zb?50:800)+r);return a.unsuspend=d,function(){a.unsuspend=null,clearTimeout(m),clearTimeout(_)}}:null}function Yx(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Kx(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var Zx=null;function Kx(a,r){a.stylesheets=null,a.unsuspend!==null&&(a.count++,Zx=new Map,r.forEach(oP,a),Zx=null,Yx.call(a))}function oP(a,r){if(!(r.state.loading&4)){var d=Zx.get(a);if(d)var m=d.get(null);else{d=new Map,Zx.set(a,d);for(var _=a.querySelectorAll("link[data-precedence],style[data-precedence]"),T=0;T<_.length;T++){var U=_[T];(U.nodeName==="LINK"||U.getAttribute("media")!=="not all")&&(d.set(U.dataset.precedence,U),m=U)}m&&d.set(null,m)}_=r.instance,U=_.getAttribute("data-precedence"),T=d.get(U)||m,T===m&&d.set(null,_),d.set(U,_),this.count++,m=Yx.bind(this),_.addEventListener("load",m),_.addEventListener("error",m),T?T.parentNode.insertBefore(_,T.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(_,a.firstChild)),r.state.loading|=4}}var Fm={$$typeof:L,Provider:null,Consumer:null,_currentValue:le,_currentValue2:le,_threadCount:0};function lP(a,r,d,m,_,T,U,G,te){this.tag=1,this.containerInfo=a,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=_t(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_t(0),this.hiddenUpdates=_t(null),this.identifierPrefix=m,this.onUncaughtError=_,this.onCaughtError=T,this.onRecoverableError=U,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=te,this.incompleteTransitions=new Map}function JT(a,r,d,m,_,T,U,G,te,ve,Le,ze){return a=new lP(a,r,d,U,te,ve,Le,ze,G),r=1,T===!0&&(r|=24),T=ui(3,null,null,r),a.current=T,T.stateNode=a,r=jp(),r.refCount++,a.pooledCache=r,r.refCount++,T.memoizedState={element:m,isDehydrated:d,cache:r},id(T),a}function eE(a){return a?(a=Fo,a):Fo}function tE(a,r,d,m,_,T){_=eE(_),m.context===null?m.context=_:m.pendingContext=_,m=ro(r),m.payload={element:d},T=T===void 0?null:T,T!==null&&(m.callback=T),d=Yo(a,m,r),d!==null&&(ln(d,a,r),Zo(d,a,r))}function nE(a,r){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var d=a.retryLane;a.retryLane=d!==0&&d<r?d:r}}function Kb(a,r){nE(a,r),(a=a.alternate)&&nE(a,r)}
vendor: 8,887 bytes, line 9
9function iE(a){if(a.tag===13||a.tag===31){var r=Ts(a,67108864);r!==null&&ln(r,a,67108864),Kb(a,67108864)}}function sE(a){if(a.tag===13||a.tag===31){var r=da();r=hr(r);var d=Ts(a,r);d!==null&&ln(d,a,r),Kb(a,r)}}var $x=!0;function cP(a,r,d,m){var _=Y.T;Y.T=null;var T=$.p;try{$.p=2,$b(a,r,d,m)}finally{$.p=T,Y.T=_}}function uP(a,r,d,m){var _=Y.T;Y.T=null;var T=$.p;try{$.p=8,$b(a,r,d,m)}finally{$.p=T,Y.T=_}}function $b(a,r,d,m){if($x){var _=Qb(m);if(_===null)zb(a,r,m,Qx,d),rE(a,m);else if(hP(_,a,r,d,m))m.stopPropagation();else if(rE(a,m),r&4&&-1<dP.indexOf(a)){for(;_!==null;){var T=$r(_);if(T!==null)switch(T.tag){case 3:if(T=T.stateNode,T.current.memoizedState.isDehydrated){var U=Ke(T.pendingLanes);if(U!==0){var G=T;for(G.pendingLanes|=2,G.entangledLanes|=2;U;){var te=1<<31-lt(U);G.entanglements[1]|=te,U&=~te}qe(T),(At&6)===0&&(Ci=He()+500,ft(0))}}break;case 31:case 13:G=Ts(T,2),G!==null&&ln(G,T,2),ar(),Kb(T,2)}if(T=Qb(m),T===null&&zb(a,r,m,Qx,d),T===_)break;_=T}_!==null&&m.stopPropagation()}else zb(a,r,m,null,d)}}function Qb(a){return a=ch(a),Jb(a)}var Qx=null;function Jb(a){if(Qx=null,a=Kr(a),a!==null){var r=o(a);if(r===null)a=null;else{var d=r.tag;if(d===13){if(a=c(r),a!==null)return a;a=null}else if(d===31){if(a=h(r),a!==null)return a;a=null}else if(d===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;a=null}else r!==a&&(a=null)}}return Qx=a,null}function aE(a){switch(a){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Cn()){case X:return 2;case z:return 8;case de:case Re:return 32;case Fe:return 268435456;default:return 32}default:return 32}}var e_=!1,au=null,ru=null,ou=null,km=new Map,Hm=new Map,lu=[],dP="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function rE(a,r){switch(a){case"focusin":case"focusout":au=null;break;case"dragenter":case"dragleave":ru=null;break;case"mouseover":case"mouseout":ou=null;break;case"pointerover":case"pointerout":km.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hm.delete(r.pointerId)}}function Gm(a,r,d,m,_,T){return a===null||a.nativeEvent!==T?(a={blockedOn:r,domEventName:d,eventSystemFlags:m,nativeEvent:T,targetContainers:[_]},r!==null&&(r=$r(r),r!==null&&iE(r)),a):(a.eventSystemFlags|=m,r=a.targetContainers,_!==null&&r.indexOf(_)===-1&&r.push(_),a)}function hP(a,r,d,m,_){switch(r){case"focusin":return au=Gm(au,a,r,d,m,_),!0;case"dragenter":return ru=Gm(ru,a,r,d,m,_),!0;case"mouseover":return ou=Gm(ou,a,r,d,m,_),!0;case"pointerover":var T=_.pointerId;return km.set(T,Gm(km.get(T)||null,a,r,d,m,_)),!0;case"gotpointercapture":return T=_.pointerId,Hm.set(T,Gm(Hm.get(T)||null,a,r,d,m,_)),!0}return!1}function oE(a){var r=Kr(a.target);if(r!==null){var d=o(r);if(d!==null){if(r=d.tag,r===13){if(r=c(d),r!==null){a.blockedOn=r,Ka(a.priority,function(){sE(d)});return}}else if(r===31){if(r=h(d),r!==null){a.blockedOn=r,Ka(a.priority,function(){sE(d)});return}}else if(r===3&&d.stateNode.current.memoizedState.isDehydrated){a.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}a.blockedOn=null}function Jx(a){if(a.blockedOn!==null)return!1;for(var r=a.targetContainers;0<r.length;){var d=Qb(a.nativeEvent);if(d===null){d=a.nativeEvent;var m=new d.constructor(d.type,d);lh=m,d.target.dispatchEvent(m),lh=null}else return r=$r(d),r!==null&&iE(r),a.blockedOn=d,!1;r.shift()}return!0}function lE(a,r,d){Jx(a)&&d.delete(r)}function fP(){e_=!1,au!==null&&Jx(au)&&(au=null),ru!==null&&Jx(ru)&&(ru=null),ou!==null&&Jx(ou)&&(ou=null),km.forEach(lE),Hm.forEach(lE)}function ey(a,r){a.blockedOn===r&&(a.blockedOn=null,e_||(e_=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,fP)))}var ty=null;function cE(a){ty!==a&&(ty=a,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){ty===a&&(ty=null);for(var r=0;r<a.length;r+=3){var d=a[r],m=a[r+1],_=a[r+2];if(typeof m!="function"){if(Jb(m||d)===null)continue;break}var T=$r(d);T!==null&&(a.splice(r,3),r-=3,xm(T,{pending:!0,data:_,method:d.method,action:m},m,_))}}))}function pf(a){function r(te){return ey(te,a)}au!==null&&ey(au,a),ru!==null&&ey(ru,a),ou!==null&&ey(ou,a),km.forEach(r),Hm.forEach(r);for(var d=0;d<lu.length;d++){var m=lu[d];m.blockedOn===a&&(m.blockedOn=null)}for(;0<lu.length&&(d=lu[0],d.blockedOn===null);)oE(d),d.blockedOn===null&&lu.shift();if(d=(a.ownerDocument||a).$$reactFormReplay,d!=null)for(m=0;m<d.length;m+=3){var _=d[m],T=d[m+1],U=_[Fi]||null;if(typeof T=="function")U||cE(d);else if(U){var G=null;if(T&&T.hasAttribute("formAction")){if(_=T,U=T[Fi]||null)G=U.formAction;else if(Jb(_)!==null)continue}else G=U.action;typeof G=="function"?d[m+1]=G:(d.splice(m,3),m-=3),cE(d)}}}function uE(){function a(T){T.canIntercept&&T.info==="react-transition"&&T.intercept({handler:function(){return new Promise(function(U){return _=U})},focusReset:"manual",scroll:"manual"})}function r(){_!==null&&(_(),_=null),m||setTimeout(d,20)}function d(){if(!m&&!navigation.transition){var T=navigation.currentEntry;T&&T.url!=null&&navigation.navigate(T.url,{state:T.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,_=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(d,100),function(){m=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),_!==null&&(_(),_=null)}}}function t_(a){this._internalRoot=a}ny.prototype.render=t_.prototype.render=function(a){var r=this._internalRoot;if(r===null)throw Error(i(409));var d=r.current,m=da();tE(d,m,a,r,null,null)},ny.prototype.unmount=t_.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var r=a.containerInfo;tE(a.current,2,null,a,null,null),ar(),r[$a]=null}};function ny(a){this._internalRoot=a}ny.prototype.unstable_scheduleHydration=function(a){if(a){var r=Al();a={blockedOn:null,target:a,priority:r};for(var d=0;d<lu.length&&r!==0&&r<lu[d].priority;d++);lu.splice(d,0,a),d===0&&oE(a)}};var dE=e.version;if(dE!=="19.2.3")throw Error(i(527,dE,"19.2.3"));$.findDOMNode=function(a){var r=a._reactInternals;if(r===void 0)throw typeof a.render=="function"?Error(i(188)):(a=Object.keys(a).join(","),Error(i(268,a)));return a=p(r),a=a!==null?x(a):null,a=a===null?null:a.stateNode,a};var pP={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:Y,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var iy=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!iy.isDisabled&&iy.supportsFiber)try{Ee=iy.inject(pP),Ne=iy}catch{}}return Wm.createRoot=function(a,r){if(!s(a))throw Error(i(299));var d=!1,m="",_=Px,T=Mm,U=wm;return r!=null&&(r.unstable_strictMode===!0&&(d=!0),r.identifierPrefix!==void 0&&(m=r.identifierPrefix),r.onUncaughtError!==void 0&&(_=r.onUncaughtError),r.onCaughtError!==void 0&&(T=r.onCaughtError),r.onRecoverableError!==void 0&&(U=r.onRecoverableError)),r=JT(a,1,!1,null,null,d,m,null,_,T,U,uE),a[$a]=r.current,Ob(a),new t_(r)},Wm.hydrateRoot=function(a,r,d){if(!s(a))throw Error(i(299));var m=!1,_="",T=Px,U=Mm,G=wm,te=null;return d!=null&&(d.unstable_strictMode===!0&&(m=!0),d.identifierPrefix!==void 0&&(_=d.identifierPrefix),d.onUncaughtError!==void 0&&(T=d.onUncaughtError),d.onCaughtError!==void 0&&(U=d.onCaughtError),d.onRecoverableError!==void 0&&(G=d.onRecoverableError),d.formState!==void 0&&(te=d.formState)),r=JT(a,1,!0,r,d??null,m,_,te,T,U,G,uE),r.context=eE(null),d=r.current,m=da(),m=hr(m),_=ro(m),_.callback=null,Yo(d,_,m),d=m,r.current.lanes=d,Bt(r,d),qe(r),a[$a
9]=r.current,Ob(a),new ny(r)},Wm.version="19.2.3",Wm}var _E;function MP(){if(_E)return i_.exports;_E=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),i_.exports=SP(),i_.exports}var wP=MP(),K=a0();const $C=BM(K);var SE="popstate";function ME(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function TP(n={}){function e(s,o){let{pathname:c="/",search:h="",hash:f=""}=nh(s.location.hash.substring(1));return!c.startsWith("/")&&!c.startsWith(".")&&(c="/"+c),US("",{pathname:c,search:h,hash:f},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function t(s,o){let c=s.document.querySelector("base"),h="";if(c&&c.getAttribute("href")){let f=s.location.href,p=f.indexOf("#");h=p===-1?f:f.slice(0,p)}return h+"#"+(typeof o=="string"?o:Pg(o))}function i(s,o){Ro(s.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(o)})`)}return AP(e,t,i,n)}function Li(n,e){if(n===!1||n===null||typeof n>"u")throw new Error(e)}function Ro(n,e){if(!n){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function EP(){return Math.random().toString(36).substring(2,10)}function wE(n,e){return{usr:n.state,key:n.key,idx:e,masked:n.unstable_mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function US(n,e,t=null,i,s){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof e=="string"?nh(e):e,state:t,key:e&&e.key||i||EP(),unstable_mask:s}}function Pg({pathname:n="/",search:e="",hash:t=""}){return e&&e!=="?"&&(n+=e.charAt(0)==="?"?e:"?"+e),t&&t!=="#"&&(n+=t.charAt(0)==="#"?t:"#"+t),n}function nh(n){let e={};if(n){let t=n.indexOf("#");t>=0&&(e.hash=n.substring(t),n=n.substring(0,t));let i=n.indexOf("?");i>=0&&(e.search=n.substring(i),n=n.substring(0,i)),n&&(e.pathname=n)}return e}function AP(n,e,t,i={}){let{window:s=document.defaultView,v5Compat:o=!1}=i,c=s.history,h="POP",f=null,p=x();p==null&&(p=0,c.replaceState({...c.state,idx:p},""));function x(){return(c.state||{idx:null}).idx}function y(){h="POP";let A=x(),w=A==null?null:A-p;p=A,f&&f({action:h,location:R.location,delta:w})}function v(A,w){h="PUSH";let N=ME(A)?A:US(R.location,A,w);t&&t(N,A),p=x()+1;let L=wE(N,p),I=R.createHref(N.unstable_mask||N);try{c.pushState(L,"",I)}catch(B){if(B instanceof DOMException&&B.name==="DataCloneError")throw B;s.location.assign(I)}o&&f&&f({action:h,location:R.location,delta:1})}function S(A,w){h="REPLACE";let N=ME(A)?A:US(R.location,A,w);t&&t(N,A),p=x();let L=wE(N,p),I=R.createHref(N.unstable_mask||N);c.replaceState(L,"",I),o&&f&&f({action:h,location:R.location,delta:0})}function M(A){return CP(A)}let R={get action(){return h},get location(){return n(s,c)},listen(A){if(f)throw new Error("A history only accepts one active listener");return s.addEventListener(SE,y),f=A,()=>{s.removeEventListener(SE,y),f=null}},createHref(A){return e(s,A)},createURL:M,encodeLocation(A){let w=M(A);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:v,replace:S,go(A){return c.go(A)}};return R}function CP(n,e=!1){let t="http://localhost";
9typeof window<"u"&&(t=window.location.origin!=="null"?window.location.origin:window.location.href),Li(t,"No window.location.(origin|href) available to create URL");let i=typeof n=="string"?n:Pg(n);return i=i.replace(/ $/,"%20"),!e&&i.startsWith("//")&&(i=t+i),new URL(i,t)}function QC(n,e,t="/"){return RP(n,e,t,!1)}function RP(n,e,t,i){let s=typeof e=="string"?nh(e):e,o=gc(s.pathname||"/",t);if(o==null)return null;let c=JC(n);NP(c);let h=null;for(let f=0;h==null&&f<c.length;++f){let p=kP(o);h=VP(c[f],p,i)}return h}function JC(n,e=[],t=[],i="",s=!1){let o=(c,h,f=s,p)=>{let x={relativePath:p===void 0?c.path||"":p,caseSensitive:c.caseSensitive===!0,childrenIndex:h,route:c};if(x.relativePath.startsWith("/")){if(!x.relativePath.startsWith(i)&&f)return;Li(x.relativePath.startsWith(i),`Absolute route path "${x.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),x.relativePath=x.relativePath.slice(i.length)}let y=Eo([i,x.relativePath]),v=t.concat(x);c.children&&c.children.length>0&&(Li(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),JC(c.children,e,v,y,f)),!(c.path==null&&!c.index)&&e.push({path:y,score:zP(y,c.index),routesMeta:v})};return n.forEach((c,h)=>{if(c.path===""||!c.path?.includes("?"))o(c,h);else for(let f of eR(c.path))o(c,h,!0,f)}),e}function eR(n){let e=n.split("/");if(e.length===0)return[];let[t,...i]=e,s=t.endsWith("?"),o=t.replace(/\?$/,"");if(i.length===0)return s?[o,""]:[o];let c=eR(i.join("/")),h=[];return h.push(...c.map(f=>f===""?o:[o,f].join("/"))),s&&h.push(...c),h.map(f=>n.startsWith("/")&&f===""?"/":f)}function NP(n){n.sort((e,t)=>e.score!==t.score?t.score-e.score:BP(e.routesMeta.map(i=>i.childrenIndex),t.routesMeta.map(i=>i.childrenIndex)))}var DP=/^:[\w-]+$/,LP=3,IP=2,PP=1,UP=10,OP=-2,TE=n=>n==="*";function zP(n,e){let t=n.split("/"),i=t.length;return t.some(TE)&&(i+=OP),e&&(i+=IP),t.filter(s=>!TE(s)).reduce((s,o)=>s+(DP.test(o)?LP:o===""?PP:UP),i)}function BP(n,e){return n.length===e.length&&n.slice(0,-1).every((i,s)=>i===e[s])?n[n.length-1]-e[e.length-1]:0}function VP(n,e,t=!1){let{routesMeta:i}=n,s={},o="/",c=[];for(let h=0;h<i.length;++h){let f=i[h],p=h===i.length-1,x=o==="/"?e:e.slice(o.length)||"/",y=vv({path:f.relativePath,caseSensitive:f.caseSensitive,end:p},x),v=f.route;if(!y&&p&&t&&!i[i.length-1].route.index&&(y=vv({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},x)),!y)return null;
9Object.assign(s,y.params),c.push({params:s,pathname:Eo([o,y.pathname]),pathnameBase:WP(Eo([o,y.pathnameBase])),route:v}),y.pathnameBase!=="/"&&(o=Eo([o,y.pathnameBase]))}return c}function vv(n,e){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[t,i]=FP(n.path,n.caseSensitive,n.end),s=e.match(t);if(!s)return null;let o=s[0],c=o.replace(/(.)\/+$/,"$1"),h=s.slice(1);return{params:i.reduce((p,{paramName:x,isOptional:y},v)=>{if(x==="*"){let M=h[v]||"";c=o.slice(0,o.length-M.length).replace(/(.)\/+$/,"$1")}const S=h[v];return y&&!S?p[x]=void 0:p[x]=(S||"").replace(/%2F/g,"/"),p},{}),pathname:o,pathnameBase:c,pattern:n}}function FP(n,e=!1,t=!0){Ro(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=[],s="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,h,f,p,x)=>{if(i.push({paramName:h,isOptional:f!=null}),f){let y=x.charAt(p+c.length);return y&&y!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(i.push({paramName:"*"}),s+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?s+="\\/*$":n!==""&&n!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),i]}function kP(n){try{return n.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Ro(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),n}}function gc(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)||"/"}var HP=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function GP(n,e="/"){let{pathname:t,search:i="",hash:s=""}=typeof n=="string"?nh(n):n,o;return t?(t=nR(t),t.startsWith("/")?o=EE(t.substring(1),"/"):o=EE(t,e)):o=e,{pathname:o,search:XP(i),hash:qP(s)}}function EE(n,e){let t=bv(e).split("/");return n.split("/").forEach(s=>{s===".."?t.length>1&&t.pop():s!=="."&&t.push(s)}),t.length>1?t.join("/"):"/"}function l_(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 <Link to="..."> and the router will parse it for you.`}function jP(n){return n.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function tR(n){let e=jP(n);return e.map((t,i)=>i===e.length-1?t.pathname:t.pathnameBase)}function VM(n,e,t,i=!1){let s;typeof n=="string"?s=nh(n):(s={...n},Li(!s.pathname||!s.pathname.includes("?"),l_("?","pathname","search",s)),Li(!s.pathname||!s.pathname.includes("#"),l_("#","pathname","hash",s)),Li(!s.search||!s.search.includes("#"),l_("#","search","hash",s)));let o=n===""||s.pathname==="",c=o?"/":s.pathname,h;if(c==null)h=t;else{let y=e.length-1;if(!i&&c.startsWith("..")){let v=c.split("/");for(;v[0]==="..";)v.shift(),y-=1;s.pathname=v.join("/")}h=y>=0?e[y]:"/"}let f=GP(s,h),p=c&&c!=="/"&&c.endsWith("/"),x=(o||c===".")&&t.endsWith("/");return!f.pathname.endsWith("/")&&(p||x)&&(f.pathname+="/"),f}var nR=n=>n.replace(/\/\/+/g,"/"),Eo=n=>nR(n.join("/")),bv=n=>n.replace(/\/+$/,""),WP=n=>bv(n).replace(/^\/*/,"/"),XP=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,qP=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,YP=class{constructor(n,e,t,i=!1){this.status=n,this.statusText=e||"",this.internal=i,t instanceof Error?(this.data=t.toString(),this.error=t):this.data=t}};function ZP(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function KP(n){let e=n.map(t=>t.route.path).filter(Boolean);return Eo(e)||"/"}var iR=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function sR(n,e){let t=n;if(typeof t!="string"||!HP.test(t))return{absoluteURL:void 0,isExternal:!1,to:t};let i=t,s=!1;if(iR)try{let o=new URL(window.location.href),c=t.startsWith("//")?new URL(o.protocol+t):new URL(t),h=gc(c.pathname,e);c.origin===o.origin&&h!=null?t=h+c.search+c.hash:s=!0}catch{Ro(!1,`<Link to="${t}">
9 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:s,to:t}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var aR=["POST","PUT","PATCH","DELETE"];new Set(aR);var $P=["GET",...aR];new Set($P);var op=K.createContext(null);op.displayName="DataRouter";var E1=K.createContext(null);E1.displayName="DataRouterState";var rR=K.createContext(!1);function QP(){return K.useContext(rR)}var oR=K.createContext({isTransitioning:!1});oR.displayName="ViewTransition";var JP=K.createContext(new Map);JP.displayName="Fetchers";var e4=K.createContext(null);e4.displayName="Await";var qr=K.createContext(null);qr.displayName="Navigation";var r0=K.createContext(null);r0.displayName="Location";var bc=K.createContext({outlet:null,matches:[],isDataRoute:!1});bc.displayName="Route";var FM=K.createContext(null);FM.displayName="RouteError";var lR="REACT_ROUTER_ERROR",t4="REDIRECT",n4="ROUTE_ERROR_RESPONSE";function i4(n){if(n.startsWith(`${lR}:${t4}:{`))try{let e=JSON.parse(n.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function s4(n){if(n.startsWith(`${lR}:${n4}:{`))try{let e=JSON.parse(n.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new YP(e.status,e.statusText,e.data)}catch{}}function a4(n,{relative:e}={}){Li(o0(),"useHref() may be used only in the context of a <Router> component.");let{basename:t,navigator:i}=K.useContext(qr),{hash:s,pathname:o,search:c}=l0(n,{relative:e}),h=o;return t!=="/"&&(h=o==="/"?t:Eo([t,o])),i.createHref({pathname:h,search:c,hash:s})}function o0(){return K.useContext(r0)!=null}function Tl(){return Li(o0(),"useLocation() may be used only in the context of a <Router> component."),K.useContext(r0).location}var cR="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function uR(n){K.useContext(qr).static||K.useLayoutEffect(n)}function r4(){let{isDataRoute:n}=K.useContext(bc);return n?v4():o4()}function o4(){Li(o0(),"useNavigate() may be used only in the context of a <Router> component.");let n=K.useContext(op),{basename:e,navigator:t}=K.useContext(qr),{matches:i}=K.useContext(bc),{pathname:s}=Tl(),o=JSON.stringify(tR(i)),c=K.useRef(!1);return uR(()=>{c.current=!0}),K.useCallback((f,p={})=>{if(Ro(c.current,cR),!c.current)return;if(typeof f=="number"){t.go(f);return}let x=VM(f,JSON.parse(o),s,p.relative==="path");n==null&&e!=="/"&&(x.pathname=x.pathname==="/"?e:Eo([e,x.pathname])),(p.replace?t.replace:t.push)(x,p.state,p)},[e,t,o,s,n])}K.createContext(null);function l0(n,{relative:e}={}){let{matches:t}=K.useContext(bc),{pathname:i}=Tl(),s=JSON.stringify(tR(t));return K.useMemo(()=>VM(n,JSON.parse(s),i,e==="path"),[n,s,i,e])}function l4(n,e){return dR(n,e)}function dR(n,e,t){Li(o0(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=K.useContext(qr),{matches:s}=K.useContext(bc),o=s[s.length-1],c=o?o.params:{},h=o?o.pathname:"/",f=o?o.pathnameBase:"/",p=o&&o.route;{let A=p&&p.path||"";fR(h,!p||A.endsWith("*")||A.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${A}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. 10 11Please change the parent <Route path="${A}"> to <Route path="${A==="/"?"*":`${A}/*`}">.`)}let x=Tl(),y;if(e){let A=typeof e=="string"?nh(e):e;Li(f==="/"||A.pathname?.startsWith(f),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${A.pathname}" was given in the \`location\` prop.`),y=A}else y=x;let v=y.pathname||"/",S=v;if(f!=="/"){let A=f.replace(/^\//,"").split("/");S="/"+v.replace(/^\//,"").split("/").slice(A.length).join("/")}let M=QC(n,{pathname:S});Ro(p||M!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),Ro(M==null||M[M.length-1].route.element!==void 0||M[M.length-1].route.Component!==void 0||M[M.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let R=f4(M&&M.map(A=>Object.assign({},A,{params:Object.assign({},c,A.params),pathname:Eo([f,i.encodeLocation?i.encodeLocation(A.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?f:Eo([f,i.encodeLocation?i.encodeLocation(A.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathnameBase])})),s,t);return e&&R?K.createElement(r0.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...y},navigationType:"POP"}},R):R}function c4(){let n=y4(),e=ZP(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),t=n instanceof Error?n.stack:null,i="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:i},o={padding:"2px 4px",backgroundColor:i},c=null;return console.error("Error handled by React Router default ErrorBoundary:",n),c=K.createElement(K.Fragment,null,K.createElement("p",null,"ð¿ Hey developer ð"),K.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",K.createElement("code",{style:o},"ErrorBoundary")," or"," ",K.createElement("code",{style:o},"errorElement")," prop on your route.")),K.createElement(K.Fragment,null,K.createElement("h2",null,"Unexpected Application
11Error!"),K.createElement("h3",{style:{fontStyle:"italic"}},e),t?K.createElement("pre",{style:s},t):null,c)}var u4=K.createElement(c4,null),hR=class extends K.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,e){return e.location!==n.location||e.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:e.error,location:e.location,revalidation:n.revalidation||e.revalidation}}componentDidCatch(n,e){this.props.onError?this.props.onError(n,e):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const t=s4(n.digest);t&&(n=t)}let e=n!==void 0?K.createElement(bc.Provider,{value:this.props.routeContext},K.createElement(FM.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?K.createElement(d4,{error:n},e):e}};hR.contextType=rR;var c_=new WeakMap;function d4({children:n,error:e}){let{basename:t}=K.useContext(qr);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let i=i4(e.digest);if(i){let s=c_.get(e);if(s)throw s;let o=sR(i.location,t);if(iR&&!c_.get(e))if(o.isExternal||i.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:i.replace}));throw c_.set(e,c),c}return K.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return n}function h4({routeContext:n,match:e,children:t}){let i=K.useContext(op);return i&&i.static&&i.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=e.route.id),K.createElement(bc.Provider,{value:n},t)}function f4(n,e=[],t){let i=t?.state;if(n==null){if(!i)return null;if(i.errors)n=i.matches;else if(e.length===0&&!i.initialized&&i.matches.length>0)n=i.matches;else return null}let s=n,o=i?.errors;if(o!=null){let x=s.findIndex(y=>y.route.id&&o?.[y.route.id]!==void 0);Li(x>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),s=s.slice(0,Math.min(s.length,x+1))}let c=!1,h=-1;if(t&&i){c=i.renderFallback;for(let x=0;x<s.length;x++){let y=s[x];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(h=x),y.route.id){let{loaderData:v,errors:S}=i,M=y.route.loader&&!v.hasOwnProperty(y.route.id)&&(!S||S[y.route.id]===void 0);if(y.route.lazy||M){t.isStatic&&(c=!0),h>=0?s=s.slice(0,h+1):s=[s[0]];break}}}}let f=t?.onError,p=i&&f?(x,y)=>{f(x,{location:i.location,params:i.matches?.[0]?.params??{},unstable_pattern:KP(i.matches),errorInfo:y})}:void 0;return s.reduceRight((x,y,v)=>{let S,M=!1,R=null,A=null;i&&(S=o&&y.route.id?o[y.route.id]:void 0,R=y.route.errorElement||u4,c&&(h<0&&v===0?(fR("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),M=!0,A=null):h===v&&(M=!0,A=y.route.hydrateFallbackElement||null)));let w=e.concat(s.slice(0,v+1)),N=()=>{let L;return S?L=R:M?L=A:y.route.Component?L=K.createElement(y.route.Component,null):y.route.element?L=y.route.element:L=x,K.createElement(h4,{match:y,routeContext:{outlet:x,matches:w,isDataRoute:i!=null},children:L})};return i&&(y.route.ErrorBoundary||y.route.errorElement||v===0)?K.createElement(hR,{location:i.location,revalidation:i.revalidation,component:R,error:S,children:N(),routeC
11ontext:{outlet:null,matches:w,isDataRoute:!0},onError:p}):N()},null)}function kM(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function p4(n){let e=K.useContext(op);return Li(e,kM(n)),e}function m4(n){let e=K.useContext(E1);return Li(e,kM(n)),e}function g4(n){let e=K.useContext(bc);return Li(e,kM(n)),e}function HM(n){let e=g4(n),t=e.matches[e.matches.length-1];return Li(t.route.id,`${n} can only be used on routes that contain a unique "id"`),t.route.id}function x4(){return HM("useRouteId")}function y4(){let n=K.useContext(FM),e=m4("useRouteError"),t=HM("useRouteError");return n!==void 0?n:e.errors?.[t]}function v4(){let{router:n}=p4("useNavigate"),e=HM("useNavigate"),t=K.useRef(!1);return uR(()=>{t.current=!0}),K.useCallback(async(s,o={})=>{Ro(t.current,cR),t.current&&(typeof s=="number"?await n.navigate(s):await n.navigate(s,{fromRouteId:e,...o}))},[n,e])}var AE={};function fR(n,e,t){!e&&!AE[n]&&(AE[n]=!0,Ro(!1,t))}K.memo(b4);function b4({routes:n,future:e,state:t,isStatic:i,onError:s}){return dR(n,void 0,{state:t,isStatic:i,onError:s})}function xu(n){Li(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function _4({basename:n="/",children:e=null,location:t,navigationType:i="POP",navigator:s,static:o=!1,unstable_useTransitions:c}){Li(!o0(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=n.replace(/^\/*/,"/"),f=K.useMemo(()=>({basename:h,navigator:s,static:o,unstable_useTransitions:c,future:{}}),[h,s,o,c]);typeof t=="string"&&(t=nh(t));let{pathname:p="/",search:x="",hash:y="",state:v=null,key:S="default",unstable_mask:M}=t,R=K.useMemo(()=>{let A=gc(p,h);return A==null?null:{location:{pathname:A,search:x,hash:y,state:v,key:S,unstable_mask:M},navigationType:i}},[h,p,x,y,v,S,i,M]);return Ro(R!=null,`<Router basename="${h}"> is not able to match the URL "${p}${x}${y}" because it does not start with the basename, so the <Router> won't render anything.`),R==null?null:K.createElement(qr.Provider,{value:f},K.createElement(r0.Provider,{children:e,value:R}))}function S4({children:n,location:e}){return l4(OS(n),e)}function OS(n,e=[]){let t=[];return K.Children.forEach(n,(i,s)=>{if(!K.isValidElement(i))return;let o=[...e,s];if(i.type===K.Fragment){t.push.apply(t,OS(i.props.children,o));return}Li(i.type===xu,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Li(!i.props.index||!i.props.children,"An index route cannot have child routes.");let c={id:i.props.id||o.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(c.children=OS(i.props.children,o)),t.push(c)}),t}var av="get",rv="application/x-www-form-urlencoded";function A1(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function M4(n){return A1(n)&&n.tagName.toLowerCase()==="button"}function w4(n){return A1(n)&&n.tagName.toLowerCase()==="form"}function T4(n){return A1(n)&&n.tagName.toLowerCase()==="input"}function E4(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function A4(n,e){return n.button===0&&(!e||e==="_self")&&!E4(n)}var sy=null;function C4(){if(sy===null)try{new FormData(document.createElement("form"),0),sy=!1}catch{sy=!0}return sy}var R4=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function u_(n){return n!=null&&!R4.has(n)?(Ro(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${rv}"`),null):n}function N4(n,e){let t,i,s,o,c;if(w4(n)){let h=n.getAttribute("action");i=h?gc(h,e):null,t=n.getAttribute("method")||av,s=u_(n.getAttribute("enctype"))||rv,o=new FormData(n)}else if(M4(n)||T4(n)&&(n.type==="submit"||n.type==="image")){let h=n.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=n.getAttribute("formaction")||h.getAttribute("action");if(i=f?gc(f,e):null,t=n.getAttribute("formmethod")||h.getAttribute("method")||av,s=u_(n.getAttribute("formenctype"))||u_(h.getAttribute("enctype"))||rv,o=new FormData(h,n),!C4()){let{name:p,type:x,value:y}=n;if(x==="image"){let v=p?`${p}.`:"";o.append(`${v}x`,"0"),o.append(`${v}y`,"0")}
11else p&&o.append(p,y)}}else{if(A1(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');t=av,i=null,s=rv,c=n}return o&&s==="text/plain"&&(c=o,o=void 0),{action:i,method:t.toLowerCase(),encType:s,formData:o,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function GM(n,e){if(n===!1||n===null||typeof n>"u")throw new Error(e)}function pR(n,e,t,i){let s=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return t?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${i}`:s.pathname=`${s.pathname}.${i}`:s.pathname==="/"?s.pathname=`_root.${i}`:e&&gc(s.pathname,e)==="/"?s.pathname=`${bv(e)}/_root.${i}`:s.pathname=`${bv(s.pathname)}.${i}`,s}async function D4(n,e){if(n.id in e)return e[n.id];try{let t=await import(n.module);return e[n.id]=t,t}catch(t){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function L4(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function I4(n,e,t){let i=await Promise.all(n.map(async s=>{let o=e.routes[s.route.id];if(o){let c=await D4(o,t);return c.links?c.links():[]}return[]}));return z4(i.flat(1).filter(L4).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function CE(n,e,t,i,s,o){let c=(f,p)=>t[p]?f.route.id!==t[p].route.id:!0,h=(f,p)=>t[p].pathname!==f.pathname||t[p].route.path?.endsWith("*")&&t[p].params["*"]!==f.params["*"];return o==="assets"?e.filter((f,p)=>c(f,p)||h(f,p)):o==="data"?e.filter((f,p)=>{let x=i.routes[f.route.id];if(!x||!x.hasLoader)return!1;if(c(f,p)||h(f,p))return!0;if(f.route.shouldRevalidate){let y=f.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:t[0]?.params||{},nextUrl:new URL(n,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function P4(n,e,{includeHydrateFallback:t}={}){return U4(n.map(i=>{let s=e.routes[i.route.id];if(!s)return[];let o=[s.module];return s.clientActionModule&&(o=o.concat(s.clientActionModule)),s.clientLoaderModule&&(o=o.concat(s.clientLoaderModule)),t&&s.hydrateFallbackModule&&(o=o.concat(s.hydrateFallbackModule)),s.imports&&(o=o.concat(s.imports)),o}).flat(1))}function U4(n){return[...new Set(n)]}function O4(n){let e={},t=Object.keys(n).sort();for(let i of t)e[i]=n[i];return e}function z4(n,e){let t=new Set;return new Set(e),n.reduce((i,s)=>{let o=JSON.stringify(O4(s));return t.has(o)||(t.add(o),i.push({key:o,link:s})),i},[])}function jM(){let n=K.useContext(op);return GM(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function B4(){let n=K.useContext(E1);return GM(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var WM=K.createContext(void 0);WM.displayName="FrameworkContext";function XM(){let n=K.useContext(WM);return GM(n,"You must render this element inside a <HydratedRouter> element"),n}function V4(n,e){let t=K.useContext(WM),[i,s]=K.useState(!1),[o,c]=K.useState(!1),{onFocus:h,onBlur:f,onMouseEnter:p,onMouseLeave:x,onTouchStart:y}=e,v=K.useRef(null);K.useEffect(()=>{if(n==="render"&&c(!0),n==="viewport"){let R=w=>{w.forEach(N=>{c(N.isIntersecting)})},A=new IntersectionObserver(R,{threshold:.5});return v.current&&A.observe(v.current),()=>{A.disconnect()}}},[n]),K.useEffect(()=>{if(i){let R=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(R)}}},[i]);let S=()=>{s(!0)},M=()=>{s(!1),c(!1)};return t?n!=="intent"?[o,v,{}]:[o,v,{onFocus:Xm(h,S),onBlur:Xm(f,M),onMouseEnter:Xm(p,S),onMouseLeave:Xm(x,M),onTouchStart:Xm(y,S)}]:[!1,v,{}]}function Xm(n,e){return t=>{n&&n(t),t.defaultPrevented||e(t)}}function F4({page:n,...e}){let t=QP(),{router:i}=jM(),s=K.useMemo(()=>QC(i.routes,n,i.basename),[i.routes,n,i.basename]);return s?t?K.createElement(H4,{page:n,matches:s,...e}):K.createElement(G4,{page:n,matches:s,...e}):null}function k4(n){let{manifest:e,routeModules:t}=XM(),[i,s]=K.useState([]);return K.useEffect(()=>{let o=!1;return I4(n,e,t).then(c=>{o||s(c)}),()=>{o=!0}},[n,e,t]),i}function H4({page:n,matches:e,...t}){let i=Tl(),{future:s}=XM(),{basename:o}=jM(),c=K.useMemo(()=>
11{if(n===i.pathname+i.search+i.hash)return[];let h=pR(n,o,s.unstable_trailingSlashAwareDataRequests,"rsc"),f=!1,p=[];for(let x of e)typeof x.route.shouldRevalidate=="function"?f=!0:p.push(x.route.id);return f&&p.length>0&&h.searchParams.set("_routes",p.join(",")),[h.pathname+h.search]},[o,s.unstable_trailingSlashAwareDataRequests,n,i,e]);return K.createElement(K.Fragment,null,c.map(h=>K.createElement("link",{key:h,rel:"prefetch",as:"fetch",href:h,...t})))}function G4({page:n,matches:e,...t}){let i=Tl(),{future:s,manifest:o,routeModules:c}=XM(),{basename:h}=jM(),{loaderData:f,matches:p}=B4(),x=K.useMemo(()=>CE(n,e,p,o,i,"data"),[n,e,p,o,i]),y=K.useMemo(()=>CE(n,e,p,o,i,"assets"),[n,e,p,o,i]),v=K.useMemo(()=>{if(n===i.pathname+i.search+i.hash)return[];let R=new Set,A=!1;if(e.forEach(N=>{let L=o.routes[N.route.id];!L||!L.hasLoader||(!x.some(I=>I.route.id===N.route.id)&&N.route.id in f&&c[N.route.id]?.shouldRevalidate||L.hasClientLoader?A=!0:R.add(N.route.id))}),R.size===0)return[];let w=pR(n,h,s.unstable_trailingSlashAwareDataRequests,"data");return A&&R.size>0&&w.searchParams.set("_routes",e.filter(N=>R.has(N.route.id)).map(N=>N.route.id).join(",")),[w.pathname+w.search]},[h,s.unstable_trailingSlashAwareDataRequests,f,i,o,x,e,n,c]),S=K.useMemo(()=>P4(y,o),[y,o]),M=k4(y);return K.createElement(K.Fragment,null,v.map(R=>K.createElement("link",{key:R,rel:"prefetch",as:"fetch",href:R,...t})),S.map(R=>K.createElement("link",{key:R,rel:"modulepreload",href:R,...t})),M.map(({key:R,link:A})=>K.createElement("link",{key:R,nonce:t.nonce,...A,crossOrigin:A.crossOrigin??t.crossOrigin})))}function j4(...n){return e=>{n.forEach(t=>{typeof t=="function"?t(e):t!=null&&(t.current=e)})}}var W4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{W4&&(window.__reactRouterVersion="7.14.2")}catch{}function X4({basename:n,children:e,unstable_useTransitions:t,window:i}){let s=K.useRef();s.current==null&&(s.current=TP({window:i,v5Compat:!0}));let o=s.current,[c,h]=K.useState({action:o.action,location:o.location}),f=K.useCallback(p=>{t===!1?h(p):K.startTransition(()=>h(p))},[t]);return K.useLayoutEffect(()=>o.listen(f),[o,f]),K.createElement(_4,{basename:n,children:e,location:c.location,navigationType:c.action,navigator:o,unstable_useTransitions:t})}var mR=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ti=K.forwardRef(function({onClick:e,discover:t="render",prefetch:i="none",relative:s,reloadDocument:o,replace:c,unstable_mask:h,state:f,target:p,to:x,preventScrollReset:y,viewTransition:v,unstable_defaultShouldRevalidate:S,...M},R){let{basename:A,navigator:w,unstable_useTransitions:N}=K.useContext(qr),L=typeof x=="string"&&mR.test(x),I=sR(x,A);x=I.to;let B=a4(x,{relative:s}),O=Tl(),F=null;if(h){let Q=VM(h,[],O.unstable_mask?O.unstable_mask.pathname:"/",!0);A!=="/"&&(Q.pathname=Q.pathname==="/"?A:Eo([A,Q.pathname])),F=w.createHref(Q)}let[P,V,j]=V4(i,M),W=K4(x,{replace:c,unstable_mask:h,state:f,target:p,preventScrollReset:y,relative:s,viewTransition:v,unstable_defaultShouldRevalidate:S,unstable_useTransitions:N});function ee(Q){e&&e(Q),Q.defaultPrevented||W(Q)}let ie=!(I.isExternal||o),ue=K.createElement("a",{...M,...j,href:(ie?F:void 0)||I.absoluteURL||B,onClick:ie?ee:e,ref:j4(R,V),target:p,"data-discover":!L&&t==="render"?"true":void 0});return P&&!L?K.createElement(K.Fragment,null,ue,K.createElement(F4,{page:B})):ue});ti.displayName="Link";var q4=K.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:i="",end:s=!1,style:o,to:c,viewTransition:h,children:f,...p},x){let y=l0(c,{relative:p.relative}),v=Tl(),S=K.useContext(E1),{navigator:M,basename:R}=K.useContext(qr),A=S!=null&&t5(y)&&h===!0,w=M.encodeLocation?M.encodeLocation(y).pathname:y.pathname,N=v.pathname,L=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;t||(N=N.toLowerCase(),L=L?L.toLowerCase():null,w=w.toLowerCase()),L&&R&&(L=gc(L,R)||L);const I=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let B=N===w||!s&&N.startsWith(w)&&N.charAt(I)==="/",O=L!=null&&(L===w||!s&&L.startsWith(w)&&L.charAt(w.length)==="/"),F={isActive:B,isPending:O,isTransitioning:A},P=B?e:void 0,V;typeof i=="function"?V=i(F):V=[i,B?"active":null,O?"pending":null,A?"transitioning":null].filter(
11Boolean).join(" ");let j=typeof o=="function"?o(F):o;return K.createElement(ti,{...p,"aria-current":P,className:V,ref:x,style:j,to:c,viewTransition:h},typeof f=="function"?f(F):f)});q4.displayName="NavLink";var Y4=K.forwardRef(({discover:n="render",fetcherKey:e,navigate:t,reloadDocument:i,replace:s,state:o,method:c=av,action:h,onSubmit:f,relative:p,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:v,...S},M)=>{let{unstable_useTransitions:R}=K.useContext(qr),A=J4(),w=e5(h,{relative:p}),N=c.toLowerCase()==="get"?"get":"post",L=typeof h=="string"&&mR.test(h),I=B=>{if(f&&f(B),B.defaultPrevented)return;B.preventDefault();let O=B.nativeEvent.submitter,F=O?.getAttribute("formmethod")||c,P=()=>A(O||B.currentTarget,{fetcherKey:e,method:F,navigate:t,replace:s,state:o,relative:p,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:v});R&&t!==!1?K.startTransition(()=>P()):P()};return K.createElement("form",{ref:M,method:N,action:w,onSubmit:i?f:I,...S,"data-discover":!L&&n==="render"?"true":void 0})});Y4.displayName="Form";function Z4(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function gR(n){let e=K.useContext(op);return Li(e,Z4(n)),e}function K4(n,{target:e,replace:t,unstable_mask:i,state:s,preventScrollReset:o,relative:c,viewTransition:h,unstable_defaultShouldRevalidate:f,unstable_useTransitions:p}={}){let x=r4(),y=Tl(),v=l0(n,{relative:c}
11);return K.useCallback(S=>{if(A4(S,e)){S.preventDefault();let M=t!==void 0?t:Pg(y)===Pg(v),R=()=>x(n,{replace:M,unstable_mask:i,state:s,preventScrollReset:o,relative:c,viewTransition:h,unstable_defaultShouldRevalidate:f});p?K.startTransition(()=>R()):R()}},[y,x,v,t,i,s,e,n,o,c,h,f,p])}var $4=0,Q4=()=>`__${String(++$4)}__`;function J4(){let{router:n}=gR("useSubmit"),{basename:e}=K.useContext(qr),t=x4(),i=n.fetch,s=n.navigate;return K.useCallback(async(o,c={})=>{let{action:h,method:f,encType:p,formData:x,body:y}=N4(o,e);if(c.navigate===!1){let v=c.fetcherKey||Q4();await i(v,t,c.action||h,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:x,body:y,formMethod:c.method||f,formEncType:c.encType||p,flushSync:c.flushSync})}else await s(c.action||h,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:x,body:y,formMethod:c.method||f,formEncType:c.encType||p,replace:c.replace,state:c.state,fromRouteId:t,flushSync:c.flushSync,viewTransition:c.viewTransition})},[i,s,e,t])}function e5(n,{relative:e}={}){let{basename:t}=K.useContext(qr),i=K.useContext(bc);Li(i,"useFormAction must be used inside a RouteContext");let[s]=i.matches.slice(-1),o={...l0(n||".",{relative:e})},c=Tl();if(n==null){o.search=c.search;let h=new URLSearchParams(o.search),f=h.getAll("index");if(f.some(x=>x==="")){h.delete("index"),f.filter(y=>y).forEach(y=>h.append("index",y));let x=h.toString();o.search=x?`?${x}`:""}}return(!n||n===".")&&s.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),t!=="/"&&(o.pathname=o.pathname==="/"?t:Eo([t,o.pathname])),Pg(o)}function t5(n,{relative:e}={}){let t=K.useContext(oR);Li(t!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=gR("useViewTransitionState"),s=l0(n,{relative:e});if(!t.isTransitioning)return!1;let o=gc(t.currentLocation.pathname,i)||t.currentLocation.pathname,c=gc(t.nextLocation.pathname,i)||t.nextLocation.pathname;return vv(s.pathname,c)!=null||vv(s.pathname,o)!=null}const n5={nav:{home:"é¦é ",games:"éæ²",shortVideo:"çè¦é »",vrSpace:"VR大空é",about:"éæ¼æå",contact:"è¯çµ¡æå",gallery:"ä½åé",cta:"éå§åä½"},hero:{headline:"çæå¼ AIï¼é塿¸ç¢¼å¨æ¨",subheadline:"åç´ åå â 300+ åµä½è
ï¼20å¹´æ¸ç¢¼å
容积æ·ï¼AIGC é©
åéæ²ãçè¦é »ãVR 大空éçæªæ¥",ctaPrimary:"æ¢ç´¢è§£æ±ºæ¹æ¡",ctaSecondary:"æ¥çæ¡ä¾",scrollIndicator:"å䏿»¾å"},stats:{label:"ç£æ¥å½±é¿å",gaming:{number:"779.1",suffix:"亿å
â ç§å¹»éæ²ç£æ¥çæ¶",context:"å½ç£ç§å¹»éæ²æµ·å¤è¡¨ç¾äº®ç¼"},video:{number:"81.6",suffix:"亿å
â ç§å¹»å½±è§ç£æ¥çæ¶",context:"忝å¢é· 21.6%"},vr:{number:"277.7",suffix:"亿å
â ç§å¹»ææ
ç£æ¥çæ¶",context:"忝å¢é· 13.8%ï¼VR 大空éå¿«éå¢é·"}},services:{label:"AIGC è§£æ±ºæ¹æ¡",headline:"ä¸å¤§é åï¼ç¡éå¯è½",description:"ä»éæ²è³ç¢å°æ²æµ¸å¼ VR é«é©ï¼AIGC æ£å¨éæ°å®ä¹æ¸ç¢¼å
容åµä½çè¾¹ç",gaming:{title:"AIGC + éæ²",description:"AI é©
åè§è²è¨è¨ã3D è³ç¢çæãæºè½ NPCãç¨åºåå
³å¡çæï¼çºéæ²å¼ç¼å
¨é¾è·¯èµè½",link:"äºè§£æ´å¤ â"},shortVideo:{title:"AIGC + çè¦é »",description:"ææ¬å°è¦é »çæãèæ¬æ¸ç¢¼äººãèªååªè¾ãé¢¨æ ¼åè½æã2D 转 VRï¼éå¡è¦é »åµä½æµç¨",link:"äºè§£æ´å¤ â"},vrSpace:{title:"AIGC + VR 大空é",description:"æ²æµ¸å¼ VR é«é©é
ç®ãé«ç²¾åº¦ç©ºé´å®ä½ãå¤äººå¯¦æäºåãå
¨èº«åæï¼æé ä¸ä¸ä»£ç·ä¸å¨æ¨",link:"äºè§£æ´å¤ â"}},projects:{label:"ç²¾é¸é
ç®",headline:"AIGC é©
åçç¾å¯¦ä¸çé«é©",deepSea:{category:"VR 大空é",title:"深海å¥é",description:"æµ·æ´ä¸»é¢ VR æ²æµ¸é«é©ï¼æ¢ç´¢æ·±æµ·å¥è§ï¼ä¸å·¨åçç©å
±è",link:"æ¥çé
ç® â"},pyramid:{category:"VR 大空é",title:"æ°¸æçéåå¡",description:"çé
æææ¢ç´¢ä¹æ
ï¼å½±è§ç´äºååäºï¼æå¼å¤æææªè§£ä¹è°",link:"æ¥çé
ç® â"},panda:{category:"VR 大空é",title:"çç«çä¸ç",description:"大çç«åä¸ä»ççæ¢ç´¢ä¹æ
ï¼å¯æäºä¹ç亲å VR é«é©",link:"æ¥çé
ç® â"}},technology:{label:"æè¡å¯¦å",headline:"仿¦å¿µå°ç¾å¯¦ç宿´ AIGC 管ç·",description:"æåæ´å MidjourneyãStable DiffusionãSoraãRunwayãLuma AIãUE5 çè¡æ¥é å
å·¥å
·ï¼æå»ºä»åµæçæå°æçµäº¤ä»çä¸ç«å¼æ¸ç¢¼å
容çç£å¹³å°",steps:{concept:"AI æ¦å¿µçæ",assets:"æºè½è³ç¢çæ",integration:"éæä¸æ¸¬è©¦",deploy:"å
¨çé¨ç½²"}},partners:{label:"ä¿¡ä»»åä½",headline:"ä¸å
¨çé å
åçå
±å»ºæ¸ç¢¼æªæ¥"},languageBanner:{headline:"æåå
¨çåµä½è
ï¼æ¯æ 5 ç§èªè¨",cta:"åæèªè¨"},footerCta:{headline:"æºå好å¼å¯ AIGC 乿
äºåï¼",description:"è¯çµ¡æåçåéï¼æ¢è®¨ AIGC å¦ä½çºæ¨çé
ç®èµè½",ctaPrimary:"è¯çµ¡æå",ctaSecondary:"äºè§£æ´å¤éæ¼æå â"},footer:{tagline:"AIGC æ¸ç¢¼å¶ä½",services:"æå",languages:"èªè¨",social:"社交åªé«",contact:"è¯çµ¡æå",email:"[email protected]",phone:"+852 9210 1616 (WhatsApp)",address:"馿¸¯ / æ·±å³",copyright:"© 2004-2025 Pixeland Digital Production. All rights reserved."},languageNames:{"zh-HK":"ç¹é«ä¸æ",en:"English"}},i5={nav:{home:"Home",games:"Games",shortVideo:"Short Video",vrSpace:"VR Space",about:"About",contact:"Contact",gallery:"Gallery",cta:"Get Started"},hero:{headline:"Generative AI, Reimagining Digital Entertainment",subheadline:"Pixeland â 300+ creators, 20 years of digital content expertise, powering the future of gaming, short video, and immersive VR experiences with AIGC",ctaPrimary:"Explore Our Solutions",ctaSecondary:"View Our Work",scrollIndicator:"Scroll down"},stats:{label:"INDUSTRY IMPACT",gaming:{number:"779.1",suffix:"B RMB â Sci-Fi Gaming Revenue",context:"Domestic sci-fi games shining globally"},video:{number:"81.6",suffix:"B RMB â Sci-Fi Film & Video Revenue",context:"YoY growth of 21.6%"},vr:{number:"277.7",suffix:"B RMB â Sci-Fi Tourism Revenue",context:"YoY growth 13.8%, VR large space market booming"}},services:{label:"AIGC SOLUTIONS",headline:"Three Domains, Infinite Possibilities",description:"From game assets to immersive VR experiences, AIGC is redefining the boundaries of digital content creation",gaming:{title:"AIGC + Gaming",description:"AI-powered character design, 3D asset generation, smart NPCs, and procedural level generation â empowering the entire game development pipeline",link:"Learn more â"}
11,shortVideo:{title:"AIGC + Short Video",description:"Text-to-video generation, virtual digital humans, auto-editing, style transfer, and 2D-to-VR conversion â reshaping the video creation workflow",link:"Learn more â"},vrSpace:{title:"AIGC + VR Large Space",description:"Immersive VR experiences, high-precision spatial positioning, multi-user real-time interaction, and full-body motion capture â building next-gen location-based entertainment",link:"Learn more â"}},projects:{label:"FEATURED PROJECTS",headline:"Real-World Experiences Powered by AIGC",deepSea:{category:"VR Large Space",title:"Deep Sea Adventure",description:"Ocean-themed VR immersion â explore deep-sea wonders and swim alongside massive creatures",link:"View Project â"},pyramid:{category:"VR Large Space",title:"Eternal Pyramid",description:"Journey into Mayan civilization with cinematic interactive storytelling, uncovering ancient mysteries",link:"View Project â"},panda:{category:"VR Large Space",title:"Panda World",description:"Explore the past and present of giant pandas in an educational, family-friendly VR experience",link:"View Project â"}},technology:{label:"TECHNOLOGY",headline:"The Complete AIGC Pipeline, From Concept to Reality",description:"We integrate industry-leading tools â Midjourney, Stable Diffusion, Sora, Runway, Luma AI, UE5 â building an end-to-e
11nd digital content production platform from creative generation to final delivery",steps:{concept:"AI Concept Generation",assets:"Smart Asset Production",integration:"Integration & Testing",deploy:"Global Deployment"}},partners:{label:"TRUSTED BY",headline:"Building the Digital Future with Global Leaders"},languageBanner:{headline:"Serving Creators Worldwide, in 5 Languages",cta:"Switch Language"},footerCta:{headline:"Ready to Start Your AIGC Journey?",description:"Contact our team to explore how AIGC can power your next project",ctaPrimary:"Contact Us",ctaSecondary:"Learn more about us â"},footer:{tagline:"AIGC Digital Production",services:"Services",languages:"Languages",social:"Social",contact:"Contact Us",email:"[email protected]",phone:"+852 9210 1616 (WhatsApp)",address:"Hong Kong / Shenzhen",copyright:"© 2004-2025 Pixeland Digital Production. All rights reserved."},languageNames:{"zh-HK":"ç¹é«ä¸æ",en:"English"}},_v={"zh-HK":n5,en:i5},xR="pixeland-language",gg="zh-HK",Yf=["zh-HK","en"];function s5(){if(typeof window<"u"){const n=localStorage.getItem(xR);return n&&Yf.includes(n)?n:navigator.language.startsWith("zh")?"zh-HK":gg}return gg}const yR=K.createContext({language:gg,setLanguage:()=>{},t:_v[gg],allLanguages:Yf,languageNames:_v[gg].languageNames});function a5({children:n}){const[e,t]=K.useState(s5),i=K.useCallback(o=>{t(o),typeof window<"u"&&(localStorage.setItem(xR,o),document.documentElement.lang=o)},[]);K.useEffect(()=>{document.documentElement.lang=e},[e]);const s={language:e,setLanguage:i,t:_v[e],allLanguages:Yf,languageNames:_v[e].languageNames};return E.jsx(yR.Provider,{"code-path":"src/i18n/LanguageContext.tsx:71:5",value:s,children:n})}function ci(){return K.useContext(yR)}const r5=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),o5=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,i)=>i?i.toUpperCase():t.toLowerCase()),RE=n=>{const e=o5(n);return e.charAt(0).toUpperCase()+e.slice(1)},vR=(...n)=>n.filter((e,t,i)=>!!e&&e.trim()!==""&&i.indexOf(e)===t).join(" ").trim(),l5=n=>{for(const e in n)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var c5={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const u5=K.forwardRef(({color:n="currentColor",size:e=24,strokeWidth:t=2,absoluteStrokeWidth:i,className:s="",children:o,iconNode:c,...h},f)=>K.createElement("svg",{ref:f,...c5,width:e,height:e,stroke:n,strokeWidth:i?Number(t)*24/Number(e):t,className:vR("lucide",s),...!o&&!l5(h)&&{"aria-hidden":"true"},...h},[...c.map(([p,x])=>K.createElement(p,x)),...Array.isArray(o)?o:[o]]));const Xt=(n,e)=>{const t=K.forwardRef(({className:i,...s},o)=>K.createElement(u5,{ref:o,iconNode:e,className:vR(`lucide-${r5(RE(n))}`,`lucide-${n}`,i),...s}));return t.displayName=RE(n),t};const d5=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],C1=Xt("arrow-right",d5);const h5=[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]],f5=Xt("award",h5);const p5=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],NE=Xt("building-2",p5);const m5=[["path",{d:"M10 5V3",key:"1y54qe"}],["path",{d:"M14 5V3",key:"m6isi"}],["path",{d:"M15 21v-3a3 3 0 0 0-6 0v3",key:"lbp5hj"}],["path",{d:"M18 3v8",key:"2ollhf"}],["path",{d:"M18 5H6",key:"98imr9"}],["path",{d:"M22 11H2",key:"1lmjae"}],["path",{d:"M22 9v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9",key:"1rly83"}],["path",{d:"M6 3v8",key:"csox7g"}]],g5=Xt("castle",m5);const x5=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],R1=Xt("chart-column",x5);const y5=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],v5=Xt("check",y5);const b5=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],bR=Xt("chevron-down",b5);const _5=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Eu=Xt("chevron-right",_5);
11const S5=[["path",{d:"M10 9h4",key:"u4k05v"}],["path",{d:"M12 7v5",key:"ma6bk"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"m18 9 3.52 2.147a1 1 0 0 1 .48.854V19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-6.999a1 1 0 0 1 .48-.854L6 9",key:"flvdwo"}],["path",{d:"M6 21V7a1 1 0 0 1 .376-.782l5-3.999a1 1 0 0 1 1.249.001l5 4A1 1 0 0 1 18 7v14",key:"a5i0n2"}]],DE=Xt("church",S5);const M5=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],w5=Xt("cpu",M5);const T5=[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]],E5=Xt("facebook",T5);const A5=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],C5=Xt("file-text",A5);const R5=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]],N5=Xt("film",R5);const D5=[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]],LE=Xt("flame",D5);const L5=[["line",{x1:"6",x2:"10",y1:"11",y2:"11",key:"1gktln"}],["line",{x1:"8",x2:"8",y1:"9",y2:"13",key:"qnk9ow"}],["line",{x1:"15",x2:"15.01",y1:"12",y2:"12",key:"krot7o"}],["line",{x1:"18",x2:"18.01",y1:"10",y2:"10",key:"1lcuu1"}],["path",{d:"M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z",key:"mfqc10"}]],Ug=Xt("gamepad-2",L5);const I5=[["circle",{cx:"6",cy:"15",r:"4",key:"vux9w4"}],["circle",{cx:"18",cy:"15",r:"4",key:"18o8ve"}],["path",{d:"M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2",key:"1ag4bs"}],["path",{d:"M2.5 13 5 7c.7-1.3 1.4-2 3-2",key:"1hm1gs"}],["path",{d:"M21.5 13 19 7c-.7-1.3-1.5-2-3-2",key:"1r31ai"}]],P5=Xt("glasses",I5);const U5=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],zS=Xt("globe",U5);const O5=[["path",{d:"M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2",key:"1fvzgz"}],["path",{d:"M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2",key:"1kc0my"}],["path",{d:"M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8",key:"10h0bg"}],["path",{d:"M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15",key:"1s1gnw"}]],z5=Xt("hand",O5);const B5=[["path",{d:"M3 11h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5Zm0 0a9 9 0 1 1 18 0m0 0v5a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3Z",key:"12oyoe"}],["path",{d:"M21 16v2a4 4 0 0 1-4 4h-5",key:"1x7m43"}]],_R=Xt("headset",B5);const V5=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],SR=Xt("heart",V5);const F5=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],k5=Xt("house",F5);const H5=[["path",{d:"M10 18v-7",key:"wt116b"}],["path",{d:"M11.12 2.198a2 2 0 0 1 1.76.006l7.866 3.847c.476.233.31.949-.22.949H3.474c-.53 0-.695-.716-.22-.949z",key:"1m329m"}],["path",{d:"M14 18v-7",key:"vav6t3"}],["path",{d:"M18 18v-7",key:"aexdmj"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M6 18v-7",key:"1ivflk"}]],BS=Xt("landmark",H5);const G5=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],j5=Xt("lightbulb",G5);const W5=[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]],X5=Xt("linkedin",W5);const q5=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],Y5=Xt("mail",q5);const Z5=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],qM=Xt("map-pin",Z5);const K5=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],$5=Xt("menu",K5);const Q5=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],J5=Xt("message-circle",Q5);const eU=[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]],VS=Xt("mountain",eU);const tU=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],nU=Xt("network",tU);const iU=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],sU=Xt("palette",iU);const aU=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2
110 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],rU=Xt("phone",aU);const oU=[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]],MR=Xt("scissors",oU);const lU=[["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],cU=Xt("scroll",lU);const uU=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],dU=Xt("send",uU);const hU=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],fU=Xt("share-2",hU);const pU=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}
11],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],fc=Xt("sparkles",pU);const mU=[["path",{d:"m17 14 3 3.3a1 1 0 0 1-.7 1.7H4.7a1 1 0 0 1-.7-1.7L7 14h-.3a1 1 0 0 1-.7-1.7L9 9h-.2A1 1 0 0 1 8 7.3L12 3l4 4.3a1 1 0 0 1-.8 1.7H15l3 3.3a1 1 0 0 1-.7 1.7H17Z",key:"cpyugq"}],["path",{d:"M12 22v-3",key:"kmzjlo"}]],IE=Xt("tree-pine",mU);const gU=[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]],xU=Xt("twitter",gU);const yU=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],vU=Xt("user",yU);const bU=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],_U=Xt("users",bU);const SU=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],MU=Xt("video",SU);const wU=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]],TU=Xt("volume-2",wU);const EU=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]],AU=Xt("volume-x",EU);const CU=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],RU=Xt("wand-sparkles",CU);const NU=[["path",{d:"M2 6c.6.5 1.2 1 2.5 1C7 7 7 5 9.5 5c2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"knzxuh"}],["path",{d:"M2 12c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"2jd2cc"}],["path",{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"rd2r6e"}]],Sv=Xt("waves",NU);const DU=[["path",{d:"M12.8 19.6A2 2 0 1 0 14 16H2",key:"148xed"}],["path",{d:"M17.5 8a2.5 2.5 0 1 1 2 4H2",key:"1u4tom"}],["path",{d:"M9.8 4.4A2 2 0 1 1 11 8H2",key:"75valh"}]],LU=Xt("wind",DU);const IU=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],PU=Xt("x",IU),d_={"/":"home","/games":"games","/short-video":"shortVideo","/vr-space":"vrSpace","/about":"about","/contact":"contact","/gallery":"gallery"};function UU(){const{t:n,language:e,setLanguage:t,languageNames:i}=ci(),[s,o]=K.useState(!1),[c,h]=K.useState(!1),[f,p]=K.useState(!1),x=Tl();K.useEffect(()=>{const R=()=>o(window.scrollY>50);return window.addEventListener("scroll",R,{passive:!0}),()=>window.removeEventListener("scroll",R)},[]),K.useEffect(()=>{h(!1),p(!1)},[x.pathname]),K.useEffect(()=>{const R=A=>{A.target.closest(".lang-dropdown")||p(!1)};return document.addEventListener("click",R),()=>document.removeEventListener("click",R)},[]);const y=K.useCallback(R=>{t(R),p(!1)},[t]),v=["home","games","shortVideo","vrSpace","gallery","about","contact"],S=["/","/games","/short-video","/vr-space","/gallery","/about","/contact"],M={"zh-HK":"å
¨çç«",en:"Global"};return E.jsxs("header",{"code-path":"src/components/Navbar.tsx:58:5",className:`fixed top-0 left-0 right-0 z-50 transition-all duration-300 ${s?"bg-[rgba(10,14,26,0.95)] shadow-md":"bg-[rgba(10,14,26,0.85)]"}`,style:{backdropFilter:"blur(16px)",WebkitBackdropFilter:"blur(16px)"},children:[E.jsx("div",{"code-path":"src/components/Navbar.tsx:66:7",className:"max-w-[1280px] mx-auto px-6 lg:px-12 xl:px-20",children:E.jsxs("div",{"code-path":"src/components/Navbar.tsx:67:9",className:"flex items-center justify-between h-[72px]",children:[E.jsx(ti,{"code-path":"src/components/Navbar.tsx:69:11",to:"/",className:"flex items-center h-10",children:E.jsx("img",{"code-path":"src/components/Navbar.tsx:70:13",src:"/pixeland-logo.png",alt:"Pixeland",className:"h-full w-auto object-contain brightness-110"})}),E.jsxs("nav",{"code-path":"src/components/Navbar.tsx:78:11",className:"hidden lg:flex items-center gap-8",children:[v.map((R,A)=>E.jsxs(ti,{"code-path":"src/components/Navbar.tsx:80:15",to:S[A],className:`relative text-sm font-medium uppercase tracking-[0.05em] transition-colors duration-200 ${d_[x.pathname]===R?"text-accent-cyan":"text-text-secondary hover:text-accent-cyan"}`,children:[n.nav[R],E.jsx("span",{"code-path":"src/components/Navbar.tsx:90:17",className:`absolute -bottom-1 left-0 h-[2px] bg-accent-cyan transition-all duration-200 ${d_[x.pathname]===R?"w-full":"w-0 group-hover:w-full"}`})]},R)),E.jsxs("a",{"code-path":"src/components/Navbar.tsx:97:13",href:"https://global.pixeland.hk/sim/",target:"_blank",rel:"noopener noreferrer",className:"relative text-sm font-medium uppercase tracking-[0.05em] text-text-secondary hover:text-accent-cyan transition-colors duration-200",children:[M[e],E.jsx("span",{"code-path":"src/components/Navbar.tsx:104:15",className:"absolute -top-1 -right-2 w-1.5 h-1.5 rounded-full bg-accent-cyan animate-pulse"})]})]}),E.jsxs("div",{"code-path":"src/components/Navbar.tsx:109:11",className:"hidden lg:flex items-center gap-4",children:[E.jsxs("div",{"code-path":"src/components/Navbar.tsx:111:13",className:"lang-dropdown relative",children:[E.jsxs("button",{"code-path":"src/components/Navbar.tsx:112:15",onClick:()=>
11p(!f),className:"flex items-center gap-2 text-sm text-text-secondary hover:text-accent-cyan transition-colors px-3 py-2 rounded-md hover:bg-[rgba(0,229,255,0.08)]",children:[E.jsx(zS,{"code-path":"src/components/Navbar.tsx:116:17",size:18}),E.jsx("span",{"code-path":"src/components/Navbar.tsx:117:17",className:"font-medium",children:e==="zh-HK"?"ç¹":"EN"}),E.jsx(bR,{"code-path":"src/components/Navbar.tsx:120:17",size:14,className:`transition-transform ${f?"rotate-180":""}`})]}),f&&E.jsx("div",{"code-path":"src/components/Navbar.tsx:123:17",className:"absolute right-0 top-full mt-2 w-52 bg-bg-elevated rounded-lg border border-glass-border shadow-lg overflow-hidden z-50",children:Yf.map(R=>E.jsxs("button",{"code-path":"src/components/Navbar.tsx:125:21",onClick:()=>y(R),className:`w-full text-left px-4 py-3 text-sm transition-colors flex items-center gap-3 ${e===R?"text-accent-cyan bg-[rgba(0,229,255,0.08)] border-l-2 border-accent-cyan":"text-text-secondary hover:bg-[rgba(0,229,255,0.08)] hover:text-text-primary"}`,children:[E.jsx("span",{"code-path":"src/components/Navbar.tsx:134:23",className:"font-medium",children:i[R]}),E.jsx("span",{"code-path":"src/components/Navbar.tsx:135:23",className:"text-text-muted text-xs",children:R.toUpperCase()})]},R))})]}),E.jsx(ti,{"code-path":"src/components/Navbar.tsx:142:13",to:"/contact",className:"gradient-accent text-white text-sm font-semibold uppercase tracking-[0.05em] px-6 py-3 rounded-md transition-all duration-200 hover:shadow-glow-cyan hover:scale-[1.03] active:scale-[0.98]",children:n.nav.cta})]}),E.jsx("button",{"code-path":"src/components/Navbar.tsx:151:11",className:"lg:hidden text-text-primary p-2",onClick:()=>h(!c),"aria-label":"Toggle menu",children:c?E.jsx(PU,{"code-path":"src/components/Navbar.tsx:156:27",size:24}):E.jsx($5,{"code-path":"src/components/Navbar.tsx:156:45",size:24})})]})}),c&&E.jsx("div",{"code-path":"src/components/Navbar.tsx:163:9",className:"lg:hidden fixed inset-0 top-[72px] bg-bg-primary z-40",children:E.jsxs("nav",{"code-path":"src/components/Navbar.tsx:164:11",className:"flex flex-col items-center gap-6 pt-12",children:[v.map((R,A)=>E.jsx(ti,{"code-path":"src/components/Navbar.tsx:166:15",to:S[A],onClick:()=>h(!1),className:`text-lg font-medium uppercase tracking-[0.05em] ${d_[x.pathname]===R?"text-accent-cyan":"text-text-secondary"}`,children:n.nav[R]},R)),E.jsxs("a",{"code-path":"src/components/Navbar.tsx:178:13",href:"https://global.pixeland.hk/sim/",target:"_blank",rel:"noopener noreferrer",onClick:()=>h(!1),className:"text-lg font-medium uppercase tracking-[0.05em] text-text-secondary hover:text-accent-cyan transition-colors",children:[M[e],E.jsx("span",{"code-path":"src/components/Navbar.tsx:186:15",className:"inline-block ml-1 w-1.5 h-1.5 rounded-full bg-accent-cyan animate-pulse"})]}),E.jsx("div",{"code-path":"src/components/Navbar.tsx:189:13",className:"flex flex-wrap justify-center gap-3 mt-6",children:Yf.map(R=>E.jsx("button",{"code-path":"src/components/Navbar.tsx:191:17",onClick:()=>y(R),className:`px-3 py-2 rounded-full text-sm border ${e===R?"border-accent-cyan text-accent-cyan bg-[rgba(0,229,255,0.08)]":"border-glass-border text-text-secondary"}`,children:i[R]},R))}),E.jsx(ti,{"code-path":"src/components/Navbar.tsx:205:13",to:"/contact",onClick:()=>h(!1),className:"gradient-accent text-white text-sm font-semibold uppercase tracking-[0.05em] px-8 py-3 rounded-md mt-4",children:n.nav.cta})]})})]})}function OU(){const{t:n,language:e,setLanguage:t,languageNames:i}=ci(),s=[{key:"games",path:"/games"},{key:"shortVideo",path:"/short-video"},{key:"vrSpace",path:"/vr-space"},{key:"about",path:"/about"},{key:"contact",path:"/contact"}];return E.jsx("footer",{"code-path":"src/components/Footer.tsx:17:5",className:"bg-bg-primary border-t border-[rgba(0,229,255,0.1)]",children:E.jsxs("div",{"code-path":"src/components/Footer.tsx:18:7",className:"max-w-[1280px] mx-auto px-6 lg:px-12 xl:px-20 pt-16 pb-8",children:[E.jsxs("div",{"code-path":"src/components/Footer.tsx:19:9",className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-12 mb-12",children:[E.jsxs("div",{"code-path":"src/components/Footer.tsx:21:11",children:[E.jsx(ti,{"code-path":"src/components/Footer.tsx:22:13",to:"/",className:"flex items-center h-10 mb-4",children:E.jsx("img",{"code-path":"src/components/Footer.tsx:23:15",src:"/pixeland-logo.png",alt:"Pixeland",className:"h-full w-auto object-contain brightness-110"})}),E.jsx("p",{"code-path":"src/components/Footer.tsx:29:13",className:"text-text-secondary text-sm",children:n.footer.tagline})]}),E.jsxs("div",{"code-path":"src/components/Footer.tsx:33:11",children:[E.jsx("h4",{"code-path":"src/components/Footer.tsx:34:13",className:"text-text-primary font-display text-sm font-semibold uppercase tracking-[0.05em] mb-4",children:n.footer.services}),E.jsx("ul",{"code-path":"src/components/Footer.tsx:37:13",className:"space-y-3",children:s.map(o=>E.jsx("li",{"code-path":"src/components/Footer.tsx:39:17",children:E.jsx(ti,{"code-path":"src/components/Footer.tsx:40:19",to:o.path,className:"text-text-secondary text-sm hover:text-accent-cyan transition-colors",children:n.nav[o.key]})},o.key))})]}),E.jsxs("div",{"code-path":"src/components/Footer.tsx:52:11",children:[E.jsx("h4",{"code-path":"src/components/Footer.tsx:53:13",className:"text-text-primary font-display text-sm font-semibold uppercase tracking-[0.05em] mb-4",children:n.footer.languages}),E.jsx("ul",{"code-path":"src/components/Footer.tsx:56:13",className:"space-y-3",children:Yf.map(o=>E.jsx("li",{"code-path":"src/components/Footer.tsx:58:17",children:E.jsx("button",{"code-path":"src/components/Footer.tsx:59:19",onClick:()=>t(o),className:`text-sm transition-colors ${e===o?"text-accent-cyan":"text-text-secondary hover:text-accent-cyan"}`,children:i[o]})},o))})]}),E.jsxs("div",{"code-path":"src/components/Footer.tsx:73:11",children:[E.jsx("h4",{"code-path":"src/components/Footer.tsx:74:13",className:"text-text-primary font-display text-sm font-semibold uppercase tracking-[0.05em] mb-4",children:n.footer.contact}),E.jsxs("div",{"code-path":"src/components/Footer.tsx:77:13",className:"space-y-3",children:[E.jsx("a",{"code-path":"src/components/Footer.tsx:78:15",href:`mailto:${n.footer.email}`,className:"block text-text-secondary text-sm hover:text-accent-cyan transition-colors",children:n.footer.email}),E.jsx("a",{"code-path":"src/components/Footer.tsx:84:15",href:"https://wa.me/85292101616",target:"_blank",rel:"noopener noreferrer",className:"block text-text-secondary text-sm hover:text-accent-cyan transition-colors",children:n.footer.phone}),E.jsx("p",{"code-path":"src/components/Footer.tsx:92:15",className:"text-text-secondary text-sm",children:n.footer.address})]}),E.jsxs("div",{"code-path":"src/components/Footer.tsx:96:13",className:"flex items-center gap-4 mt-4",children:[E.jsx("a",{"code-path":"src/components/Footer.tsx:97:15",href:"https://twitter.com",target:"_blank",rel:"noopener noreferrer",className:"text-text-muted hover:text-accent-cyan transition-colors","aria-label":"Twitter",children:E.jsx(xU,{"code-path":"src/components/Footer.tsx:104:17",size:20})}),E.jsx("a",{"code-path":"src/components/Footer.tsx:106:15",href:"https://linkedin.com",target:"_blank",rel:"noopener noreferrer",className:"text-text-muted hover:text-accent-cyan transition-colors","aria-label":"LinkedIn",children:E.jsx(X5,{"code-path":"src/components/Footer.tsx:113:17",size:20})}),E.jsx("a",{"code-path":"src/components/Footer.tsx:115:15",href:"https://facebook.com",target:"_blank",rel:"noopener noreferrer",className:"text-text-muted hover:text-accent-cyan transition-colors","aria-label":"Facebook",children:E.jsx(E5,{"code-path":"src/components/Footer.tsx:122:17",size:20})})]})]})]}),E.jsxs("div",{"code-path":"src/components/Footer.tsx:129:9",className:"border-t border-[rgba(0,229,255,0.1)] pt-6 flex flex-col md:flex-row justify-between items-center gap-4",children:[E.jsx("p",{"code-path":"src/components/Footer.tsx:130:11",className:"text-text-muted text-xs",children:n.footer.copyright}),E.jsx("p",{"code-path":"src/components/Footer.tsx:131:11",className:"text-text-muted text-xs",children:"京ICPå¤XXXXXXXXå·"})]})]})})}function zU(){const[n,e]=K.useState(!1),[t,i]=K.useState(!1),s=K.useRef(null);K.useEffect(()=>{const c=new Audio("/scifi-ambient.mp3");c.loop=!0,c.volume=.3,s.current=c;const h=()=>{s.current&&!n&&(s.current.play().catch(()=>{}),e(!0)),document.removeEventListener("click",h),document.removeEventListener("touchstart",h)};return document.addEventListener("click",h),document.addEventListener("touchstart",h),()=>{c.pause(),c.src="",document.removeEventListener("click",h),document.removeEventListener("touchstart",h)}},[]);const o=()=>{s.current&&(s.current.muted=!t,i(!t),n||(s.current.play().catch(()=>{}),e(!0)))};return E.jsxs("button",{"code-path":"src/components/MusicPlayer.tsx:47:5",onClick:o,className:"fixed bottom-6 right-6 z-50 w-12 h-12 rounded-full bg-bg-elevated/90 border border-glass-border backdrop-blur-sm flex items-center justify-center hover:border-accent-cyan/50 hover:shadow-glow-cyan transition-all duration-300 group","aria-label":t?"Unmute music":"Mute music",children:[t?E.jsx(AU,{"code-path":"src/components/MusicPlayer.tsx:53:9",size:20,className:"text-text-muted group-hover:text-accent-cyan transition-colors"}):E.jsx(TU,{"code-path":"src/components/MusicPlayer.tsx:55:9",size:20,className:"text-accent-cyan animate-pulse"}),n&&!t&&E.jsx("span",{"code-path":"src/components/MusicPlayer.tsx:58:9",className:"absolute -top-1 -right-1 w-3 h-3 rounded-full bg-accent-cyan",children:E.jsx("span",{"code-path":"src/components/MusicPlayer.tsx:59:11",className:"absolute inset-0 rounded-full bg-accent-cyan animate-ping opacity-75"})})]})}function BU({children:n}
vendor: 122,919 bytes, line 11
11){return E.jsxs("div",{"code-path":"src/components/Layout.tsx:12:5",className:"min-h-[100dvh] flex flex-col",children:[E.jsx(UU,{"code-path":"src/components/Layout.tsx:13:7"}),E.jsx("main",{"code-path":"src/components/Layout.tsx:14:7",className:"flex-1 pt-[72px]",children:n}),E.jsx(OU,{"code-path":"src/components/Layout.tsx:15:7"}),E.jsx(zU,{"code-path":"src/components/Layout.tsx:16:7"})]})}const wR=K.createContext({});function YM(n){const e=K.useRef(null);return e.current===null&&(e.current=n()),e.current}const VU=typeof window<"u",TR=VU?K.useLayoutEffect:K.useEffect,ZM=K.createContext(null);function KM(n,e){n.indexOf(e)===-1&&n.push(e)}function Zf(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}const _l=(n,e,t)=>t>e?e:t<n?n:t;let $M=()=>{};const Au={},ER=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n);function AR(n){return typeof n=="object"&&n!==null}const CR=n=>/^0[^.\s]+$/u.test(n);function RR(n){let e;return()=>(e===void 0&&(e=n()),e)}const Gr=n=>n,FU=(n,e)=>t=>e(n(t)),c0=(...n)=>n.reduce(FU),Kf=(n,e,t)=>{const i=e-n;return i===0?1:(t-n)/i};class QM{constructor(){this.subscriptions=[]}add(e){return KM(this.subscriptions,e),()=>Zf(this.subscriptions,e)}notify(e,t,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,t,i);else for(let o=0;o<s;o++){const c=this.subscriptions[o];c&&c(e,t,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ya=n=>n*1e3,kr=n=>n/1e3;function NR(n,e){return e?n*(1e3/e):0}const kU=(n,e,t)=>{const i=e-n;return((t-n)%i+i)%i+n},DR=(n,e,t)=>(((1-3*t+3*e)*n+(3*t-6*e))*n+3*e)*n,HU=1e-7,GU=12;function jU(n,e,t,i,s){let o,c,h=0;do c=e+(t-e)/2,o=DR(c,i,s)-n,o>0?t=c:e=c;while(Math.abs(o)>HU&&++h<GU);return c}function u0(n,e,t,i){if(n===e&&t===i)return Gr;const s=o=>jU(o,0,1,n,t);return o=>o===0||o===1?o:DR(s(o),e,i)}const LR=n=>e=>e<=.5?n(2*e)/2:(2-n(2*(1-e)))/2,IR=n=>e=>1-n(1-e),PR=u0(.33,1.53,.69,.99),JM=IR(PR),UR=LR(JM),OR=n=>n>=1?1:(n*=2)<1?.5*JM(n):.5*(2-Math.pow(2,-10*(n-1))),ew=n=>1-Math.sin(Math.acos(n)),zR=IR(ew),BR=LR(ew),WU=u0(.42,0,1,1),XU=u0(0,0,.58,1),VR=u0(.42,0,.58,1),FR=n=>Array.isArray(n)&&typeof n[0]!="number";function kR(n,e){return FR(n)?n[kU(0,n.length,e)]:n}const HR=n=>Array.isArray(n)&&typeof n[0]=="number",qU={linear:Gr,easeIn:WU,easeInOut:VR,easeOut:XU,circIn:ew,circInOut:BR,circOut:zR,backIn:JM,backInOut:UR,backOut:PR,anticipate:OR},YU=n=>typeof n=="string",PE=n=>{if(HR(n)){$M(n.length===4);const[e,t,i,s]=n;return u0(e,t,i,s)}else if(YU(n))return qU[n];return n},ay=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ZU(n,e){let t=new Set,i=new Set,s=!1,o=!1;const c=new WeakSet;let h={delta:0,timestamp:0,isProcessing:!1};function f(x){c.has(x)&&(p.schedule(x),n()),x(h)}const p={schedule:(x,y=!1,v=!1)=>{const M=v&&s?t:i;return y&&c.add(x),M.add(x),x},cancel:x=>{i.delete(x),c.delete(x)},process:x=>{if(h=x,s){o=!0;return}s=!0;const y=t;t=i,i=y,t.forEach(f),t.clear(),s=!1,o&&(o=!1,p.process(x))}};return p}const KU=40;function GR(n,e){let t=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>t=!0,c=ay.reduce((L,I)=>(L[I]=ZU(o),L),{}),{setup:h,read:f,resolveKeyframes:p,preUpdate:x,update:y,preRender:v,render:S,postRender:M}=c,R=()=>{const L=Au.useManualTiming,I=L?s.timestamp:performance.now();t=!1,L||(s.delta=i?1e3/60:Math.max(Math.min(I-s.timestamp,KU),1)),s.timestamp=I,s.isProcessing=!0,h.process(s),f.process(s),p.process(s),x.process(s),y.process(s),v.process(s),S.process(s),M.process(s),s.isProcessing=!1,t&&e&&(i=!1,n(R))},A=()=>{t=!0,i=!0,s.isProcessing||n(R)};return{schedule:ay.reduce((L,I)=>{const B=c[I];return L[I]=(O,F=!1,P=!1)=>(t||A(),B.schedule(O,F,P)),L},{}),cancel:L=>{for(let I=0;I<ay.length;I++)c[ay[I]].cancel(L)},state:s,steps:c}}const{schedule:ni,cancel:Cu,state:Is,steps:h_}=GR(typeof requestAnimationFrame<"u"?requestAnimationFrame:Gr,!0);let ov;function $U(){ov=void 0}const ga={now:()=>(ov===void 0&&ga.set(Is.isProcessing||Au.useManualTiming?Is.timestamp:performance.now()),ov),set:n=>{ov=n,queueMicrotask($U)}},jR=n=>e=>typeof e=="string"&&e.startsWith(n),WR=jR("--"),QU=jR("var(--"),tw=n=>QU(n)?JU.test(n.split("/*")[0].trim()):!1,JU=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function UE(n){return typeof n!="string"?!1:n.split("/*")[0].includes("var(--")}const lp={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},Og={...lp,transform:n=>_l(0,1,n)},ry={...lp,default:1},xg=n=>Math.round(n*1e5)/1e5,nw=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function eO(n){return n==null}const tO=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,iw=(n,e)=>t=>!!(typeof t=="string"&&tO.test(t)&&t.startsWith(n)||e&&!eO(t)&&Object.prototype.hasOwnProperty.call(t,e)),XR=(n,e,t)=>i=>{if(typeof i!="string")return i;const[s,o,c,h]=i.match(nw);return{[n]:parseFloat(s),[e]:parseFloat(o),[t]:parseFloat(c),alpha:h!==void 0?parseFloat(h):1}},nO=n=>_l(0,255,n),f_={...lp,transform:n=>Math.round(nO(n))},Bd={test:iw("rgb","red"),parse:XR("red","green","blue"),transform:({red:n,green:e,blue:t,alpha:i=1})=>"rgba("+f_.transform(n)+", "+f_.transform(e)+", "+f_.transform(t)+", "+xg(Og.transform(i))+")"};function iO(n){let e="",t="",i="",s="";return n.length>5?(e=n.substring(1,3),t=n.substring(3,5),i=n.substring(5,7),s=n.substring(7,9)):(e=n.substring(1,2),t=n.substring(2,3),i=n.substring(3,4),s=n.substring(4,5),e+=e,t+=t,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const FS={test:iw("#"),parse:iO,transform:Bd.transform},d0=n=>({test:e=>typeof e=="string"&&e.endsWith(n)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${n}`}),yu=d0("deg"),vl=d0("%"),Mt=d0("px"),sO=d0("vh"),aO=d0("vw"),OE={...vl,parse:n=>vl.parse(n)/100,transform:n=>vl.transform(n*100)},Ff={test:iw("hsl","hue"),parse:XR("hue","saturation","lightness"),transform:({hue:n,saturation:e,lightness:t,alpha:i=1})=>"hsla("+Math.round(n)+", "+vl.transform(xg(e))+", "+vl.transform(xg(t))+", "+xg(Og.transform(i))+")"},is={test:n=>Bd.test(n)||FS.test(n)||Ff.test(n),parse:n=>Bd.test(n)?Bd.parse(n):Ff.test(n)?Ff.parse(n):FS.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?Bd.transform(n):Ff.transform(n),getAnimatableNone:n=>{const e=is.parse(n);return e.alpha=0,is.transform(e)}},rO=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function oO(n){return isNaN(n)&&typeof n=="string"&&(n.match(nw)?.length||0)+(n.match(rO)?.length||0)>0}const qR="number",YR="color",lO="var",cO="var(",zE="${}",uO=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function $f(n){const e=n.toString(),t=[],i={color:[],number:[],var:[]},s=[];let o=0;const h=e.replace(uO,f=>(is.test(f)?(i.color.push(o),s.push(YR),t.push(is.parse(f))):f.startsWith(cO)?(i.var.push(o),s.push(lO),t.push(f)):(i.number.push(o),s.push(qR),t.push(parseFloat(f))),++o,zE)).split(zE);return{values:t,split:h,indexes:i,types:s}}function dO(n){return $f(n).values}function ZR({split:n,types:e}){const t=n.length;return i=>{let s="";for(let o=0;o<t;o++)if(s+=n[o],i[o]!==void 0){const c=e[o];c===qR?s+=xg(i[o]):c===YR?s+=is.transform(i[o]):s+=i[o]}return s}}function hO(n){return ZR($f(n))}const fO=n=>typeof n=="number"?0:is.test(n)?is.getAnimatableNone(n):n,pO=(n,e)=>typeof n=="number"?e?.trim().endsWith("/")?n:0:fO(n);function mO(n){const e=$f(n);return ZR(e)(e.values.map((i,s)=>pO(i,e.split[s])))}const Ao={test:oO,parse:dO,createTransformer:hO,getAnimatableNone:mO};function p_(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 gO({hue:n,saturation:e,lightness:t,alpha:i}){n/=360,e/=100,t/=100;let s=0,o=0,c=0;if(!e)s=o=c=t;else{const h=t<.5?t*(1+e):t+e-t*e,f=2*t-h;s=p_(f,h,n+1/3),o=p_(f,h,n),c=p_(f,h,n-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(c*255),alpha:i}}function Mv(n,e){return t=>t>0?e:n}const li=(n,e,t)=>n+(e-n)*t,m_=(n,e,t)=>{const i=n*n,s=t*(e*e-i)+i;return s<0?0:Math.sqrt(s)},xO=[FS,Bd,Ff],yO=n=>xO.find(e=>e.test(n));function BE(n){const e=yO(n);if(!e)return!1;let t=e.parse(n);return e===Ff&&(t=gO(t)),t}const VE=(n,e)=>{const t=BE(n),i=BE(e);if(!t||!i)return Mv(n,e);const s={...t};return o=>(s.red=m_(t.red,i.red,o),s.green=m_(t.green,i.green,o),s.blue=m_(t.blue,i.blue,o),s.alpha=li(t.alpha,i.alpha,o),Bd.transform(s))},kS=new Set(["none","hidden"]);function vO(n,e){return kS.has(n)?t=>t<=0?n:e:t=>t>=1?e:n}function bO(n,e){return t=>li(n,e,t)}function sw(n){return typeof n=="number"?bO:typeof n=="string"?tw(n)?Mv:is.test(n)?VE:MO:Array.isArray(n)?KR:typeof n=="object"?is.test(n)?VE:_O:Mv}function KR(n,e){const t=[...n],i=t.length,s=n.map((o,c)=>sw(o)(o,e[c]));return o=>{for(let c=0;c<i;c++)t[c]=s[c](o);return t}}function _O(n,e){const t={...n,...e},i={};for(const s in t)n[s]!==void 0&&e[s]!==void 0&&(i[s]=sw(n[s])(n[s],e[s]));return s=>{for(const o in i)t[o]=i[o](s);return t}}function SO(n,e){const t=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],c=n.indexes[o][i[o]],h=n.values[c]??0;t[s]=h,i[o]++}return t}const MO=(n,e)=>{const t=Ao.createTransformer(e),i=$f(n),s=$f(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?kS.has(n)&&!s.values.length||kS.has(e)&&!i.values.length?vO(n,e):c0(KR(SO(i,s),s.values),t):Mv(n,e)};function $R(n,e,t){return typeof n=="number"&&typeof e=="number"&&typeof t=="number"?li(n,e,t):sw(n)(n,e)}const wO=n=>{const e=({timestamp:t})=>n(t);return{start:(t=!0)=>ni.update(e,t),stop:()=>Cu(e),now:()=>Is.isProcessing?Is.timestamp:ga.now()}},QR=(n,e,t=10)=>{let i="";const s=Math.max(Math.round(e/t),2);for(let o=0;o<s;o++)i+=Math.round(n(o/(s-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},wv=2e4;function aw(n){let e=0;const t=50;let i=n.next(e);for(;!i.done&&e<wv;)e+=t,i=n.next(e);return e>=wv?1/0:e}function JR(n,e=100,t){const i=t({...n,keyframes:[0,e]}),s=Math.min(aw(i),wv);return{type:"keyframes",ease:o=>i.next(s*o).value/e,duration:kr(s)}}const Vi={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function HS(n,e){return n*Math.sqrt(1-e*e)}const TO=12;function EO(n,e,t){let i=t;for(let s=1;s<TO;s++)i=i-n(i)/e(i);return i}const g_=.001;function AO({duration:n=Vi.duration,bounce:e=Vi.bounce,velocity:t=Vi.velocity,mass:i=Vi.mass}){let s,o,c=1-e;c=_l(Vi.minDamping,Vi.maxDamping,c),n=_l(Vi.minDuration,Vi.maxDuration,kr(n)),c<1?(s=p=>{const x=p*c,y=x*n,v=x-t,S=HS(p,c),M=Math.exp(-y);return g_-v/S*M},o=p=>{const y=p*c*n,v=y*t+t,S=Math.pow(c,2)*Math.pow(p,2)*n,M=Math.exp(-y),R=HS(Math.pow(p,2),c);return(-s(p)+g_>0?-1:1)*((v-S)*M)/R}):(s=p=>{const x=Math.exp(-p*n),y=(p-t)*n+1;return-g_+x*y},o=p=>{const x=Math.exp(-p*n),y=(t-p)*(n*n);return x*y});const h=5/n,f=EO(s,o,h);if(n=Ya(n),isNaN(f))return{stiffness:Vi.stiffness,damping:Vi.damping,duration:n};{const p=Math.pow(f,2)*i;return{stiffness:p,damping:c*2*Math.sqrt(i*p),duration:n}}}const CO=["duration","bounce"],RO=["stiffness","damping","mass"];function FE(n,e){return e.some(t=>n[t]!==void 0)}function NO(n){let e={velocity:Vi.velocity,stiffness:Vi.stiffness,damping:Vi.damping,mass:Vi.mass,isResolvedFromDuration:!1,...n};if(!FE(n,RO)&&FE(n,CO))if(e.velocity=0,n.visualDuration){const t=n.visualDuration,i=2*Math.PI/(t*1.2),s=i*i,o=2*_l(.05,1,1-(n.bounce||0))*Math.sqrt(s);e={...e,mass:Vi.mass,stiffness:s,damping:o}}else{const t=AO({...n,velocity:0});e={...e,...t,mass:Vi.mass},e.isResolvedFromDuration=!0}return e}function zg(n=Vi.visualDuration,e=Vi.bounce){const t=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:e}:n;let{restSpeed:i,restDelta:s}=t;const o=t.keyframes[0],c=t.keyframes[t.keyframes.length-1],h={done:!1,value:o},{stiffness:f,damping:p,mass:x,duration:y,velocity:v,isResolvedFromDuration:S}=NO({...t,velocity:-kr(t.velocity||0)}),M=v||0,R=p/(2*Math.sqrt(f*x)),A=c-o,w=kr(Math.sqrt(f/x)),N=Math.abs(A)<5;i||(i=N?Vi.restSpeed.granular:Vi.restSpeed.default),s||(s=N?Vi.restDelta.granular:Vi.restDelta.default);let L,I,B,O,F,P;if(R<1)B=HS(w,R),O=(M+R*w*A)/B,L=j=>{const W=Math.exp(-R*w*j);return c-W*(O*Math.sin(B*j)+A*Math.cos(B*j))},F=R*w*O+A*B,P=R*w*A-O*B,I=j=>Math.exp(-R*w*j)*(F*Math.sin(B*j)+P*Math.cos(B*j));else if(R===1){L=W=>c-Math.exp(-w*W)*(A+(M+w*A)*W);const j=M+w*A;I=W=>Math.exp(-w*W)*(w*j*W-M)}else{const j=w*Math.sqrt(R*R-1);L=ue=>{const Q=Math.exp(-R*w*ue),Y=Math.min(j*ue,300);return c-Q*((M+R*w*A)*Math.sinh(Y)+j*A*Math.cosh(Y))/j};const W=(M+R*w*A)/j,ee=R*w*W-A*j,ie=R*w*A-W*j;I=ue=>{const Q=Math.exp(-R*w*ue),Y=Math.min(j*ue,300);return Q*(ee*Math.sinh(Y)+ie*Math.cosh(Y))}}const V={calculatedDuration:S&&y||null,velocity:j=>Ya(I(j)),next:j=>{if(!S&&R<1){const ee=Math.exp(-R*w*j),ie=Math.sin(B*j),ue=Math.cos(B*j),Q=c-ee*(O*ie+A*ue),Y=Ya(ee*(F*ie+P*ue));return h.done=Math.abs(Y)<=i&&Math.abs(c-Q)<=s,h.value=h.done?c:Q,h}const W=L(j);if(S)h.done=j>=y;else{const ee=Ya(I(j));h.done=Math.abs(ee)<=i&&Math.abs(c-W)<=s}return h.value=h.done?c:W,h},toString:()=>{const j=Math.min(aw(V),wv),W=QR(ee=>V.next(j*ee).value,j,30);return j+"ms "+W},toTransition:()=>{}};return V}zg.applyToOptions=n=>{const e=JR(n,100,zg);return n.ease=e.ease,n.duration=Ya(e.duration),n.type="keyframes",n};const DO=5;function eN(n,e,t){const i=Math.max(e-DO,0);return NR(t-n(i),e-i)}function GS({keyframes:n,velocity:e=0,power:t=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:c,min:h,max:f,restDelta:p=.5,restSpeed:x}){const y=n[0],v={done:!1,value:y},S=P=>h!==void 0&&P<h||f!==void 0&&P>f,M=P=>h===void 0?f:f===void 0||Math.abs(h-P)<Math.abs(f-P)?h:f;let R=t*e;const A=y+R,w=c===void 0?A:c(A);w!==A&&(R=w-y);const N=P=>-R*Math.exp(-P/i),L=P=>w+N(P),I=P=>{const V=N(P),j=L(P);v.done=Math.abs(V)<=p,v.value=v.done?w:j};let B,O;const F=P=>{S(v.value)&&(B=P,O=zg({keyframes:[v.value,M(v.value)],velocity:eN(L,P,v.value),damping:s,stiffness:o,restDelta:p,restSpeed:x}))};return F(0),{calculatedDuration:null,next:P=>{let V=!1;return!O&&B===void 0&&(V=!0,I(P),F(P)),B!==void 0&&P>=B?O.next(P-B):(!V&&I(P),v)}}}function LO(n,e,t){const i=[],s=t||Au.mix||$R,o=n.length-1;for(let c=0;c<o;c++){let h=s(n[c],n[c+1]);if(e){const f=Array.isArray(e)?e[c]||Gr:e;h=c0(f,h)}i.push(h)}return i}function IO(n,e,{clamp:t=!0,ease:i,mixer:s}={}){const o=n.length;if($M(o===e.length),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const c=n[0]===n[1];n[0]>n[o-1]&&(n=[...n].reverse(),e=[...e].reverse());const h=LO(e,i,s),f=h.length,p=x=>{if(c&&x<n[0])return e[0];let y=0;if(f>1)for(;y<n.length-2&&!(x<n[y+1]);y++);const v=Kf(n[y],n[y+1],x);return h[y](v)};return t?x=>p(_l(n[0],n[o-1],x)):p}function tN(n,e){const t=n[n.length-1];for(let i=1;i<=e;i++){const s=Kf(0,e,i);n.push(li(t,1,s))}}function nN(n){const e=[0];return tN(e,n.length-1),e}function PO(n,e){return n.map(t=>t*e)}function UO(n,e){return n.map(()=>e||VR).splice(0,n.length-1)}function yg({duration:n=300,keyframes:e,times:t,ease:i="easeInOut"}){const s=FR(i)?i.map(PE):PE(i),o={done:!1,value:e[0]},c=PO(t&&t.length===e.length?t:nN(e),n),h=IO(c,e,{ease:Array.isArray(s)?s:UO(e,s)});return{calculatedDuration:n,next:f=>(o.value=h(f),o.done=f>=n,o)}}const OO=n=>n!==null;function N1(n,{repeat:e,repeatType:t="loop"},i,s=1){const o=n.filter(OO),h=s<0||e&&t!=="loop"&&e%2===1?0:o.length-1;return!h||i===void 0?o[h]:i}const zO={decay:GS,inertia:GS,tween:yg,keyframes:yg,spring:zg};function iN(n){typeof n.type=="string"&&(n.type=zO[n.type])}class rw{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const BO=n=>n/100;class Tv extends rw{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==ga.now()&&this.tick(ga.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;iN(e);const{type:t=yg,repeat:i=0,repeatDelay:s=0,repeatType:o,velocity:c=0}=e;let{keyframes:h}=e;const f=t||yg;f!==yg&&typeof h[0]!="number"&&(this.mixKeyframes=c0(BO,$R(h[0],h[1])),h=[0,100]);const p=f({...e,keyframes:h});o==="mirror"&&(this.mirroredGenerator=f({...e,keyframes:[...h].reverse(),velocity:-c})),p.calculatedDuration===null&&(p.calculatedDuration=aw(p));const{calculatedDuration:x}=p;this.calculatedDuration=x,this.resolvedDuration=x+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=p}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:i,totalDuration:s,mixKeyframes:o,mirroredGenerator:c,resolvedDuration:h,calculatedDuration:f}=this;if(this.startTime===null)return i.next(0);const{delay:p=0,keyframes:x,repeat:y,repeatType:v,repeatDelay:S,type:M,onUpdate:R,finalKeyframe:A}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-s/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const w=this.currentTime-p*(this.playbackSpeed>=0?1:-1),N=this.playbackSpeed>=0?w<0:w>s;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let L=this.currentTime,I=i;if(y){const P=Math.min(this.currentTime,s)/h;let V=Math.floor(P),j=P%1;!j&&P>=1&&(j=1),j===1&&V--,V=Math.min(V,y+1),V%2&&(v==="reverse"?(j=1-j,S&&(j-=S/h)):v==="mirror"&&(I=c)),L=_l(0,1,j)*h}let B;N?(this.delayState.value=x[0],B=this.delayState):B=I.next(L),o&&!N&&(B.value=o(B.value));let{done:O}=B;!N&&f!==null&&(O=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const F=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&O);return F&&M!==GS&&(B.value=N1(x,this.options,A,this.speed)),R&&R(B.value),F&&this.finish(),B}then(e,t){return this.finished.then(e,t)}get duration(){return kr(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+kr(e)}get time(){return kr(this.currentTime)}set time(e){e=Ya(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const t=this.generator.next(e).value;return eN(i=>this.generator.next(i).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(ga.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=kr(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=wO,startTime:t}=this.options;this.driver||(this.driver=e(s=>this.tick(s))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=t??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ga.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function VO(n){for(let e=1;e<n.length;e++)n[e]??(n[e]=n[e-1])}const Vd=n=>n*180/Math.PI,jS=n=>{const e=Vd(Math.atan2(n[1],n[0]));return WS(e)},FO={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:n=>(Math.abs(n[0])+Math.abs(n[3]))/2,rotate:jS,rotateZ:jS,skewX:n=>Vd(Math.atan(n[1])),skewY:n=>Vd(Math.atan(n[2])),skew:n=>(Math.abs(n[1])+Math.abs(n[2]))/2},WS=n=>(n=n%360,n<0&&(n+=360),n),kE=jS,HE=n=>Math.sqrt(n[0]*n[0]+n[1]*n[1]),GE=n=>Math.sqrt(n[4]*n[4]+n[5]*n[5]),kO={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:HE,scaleY:GE,scale:n=>(HE(n)+GE(n))/2,rotateX:n=>WS(Vd(Math.atan2(n[6],n[5]))),rotateY:n=>WS(Vd(Math.atan2(-n[2],n[0]))),rotateZ:kE,rotate:kE,skewX:n=>Vd(Math.atan(n[4])),skewY:n=>Vd(Math.atan(n[1])),skew:n=>(Math.abs(n[1])+Math.abs(n[4]))/2};function XS(n){return n.includes("scale")?1:0}function qS(n,e){if(!n||n==="none")return XS(e);const t=n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(t)i=kO,s=t;else{const h=n.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=FO,s=h}if(!s)return XS(e);const o=i[e],c=s[1].split(",").map(GO);return typeof o=="function"?o(c):c[o]}const HO=(n,e)=>{const{transform:t="none"}=getComputedStyle(n);return qS(t,e)};function GO(n){return parseFloat(n.trim())}const cp=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],up=new Set(cp),jE=n=>n===lp||n===Mt,jO=new Set(["x","y","z"]),WO=cp.filter(n=>!jO.has(n));function XO(n){const e=[];return WO.forEach(t=>{const i=n.getValue(t);i!==void 0&&(e.push([t,i.get()]),i.set(t.startsWith("scale")?1:0))}),e}const Su={width:({x:n},{paddingLeft:e="0",paddingRight:t="0",boxSizing:i})=>{const s=n.max-n.min;return i==="border-box"?s:s-parseFloat(e)-parseFloat(t)},height:({y:n},{paddingTop:e="0",paddingBottom:t="0",boxSizing:i})=>{const s=n.max-n.min;return i==="border-box"?s:s-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:(n,{transform:e})=>qS(e,"x"),y:(n,{transform:e})=>qS(e,"y")};Su.translateX=Su.x;Su.translateY=Su.y;const Wd=new Set;let YS=!1,ZS=!1,KS=!1;function sN(){if(ZS){const n=Array.from(Wd).filter(i=>i.needsMeasurement),e=new Set(n.map(i=>i.element)),t=new Map;e.forEach(i=>{const s=XO(i);s.length&&(t.set(i,s),i.render())}),n.forEach(i=>i.measureInitialState()),e.forEach(i=>{i.render();const s=t.get(i);s&&s.forEach(([o,c])=>{i.getValue(o)?.set(c)})}),n.forEach(i=>i.measureEndState()),n.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}ZS=!1,YS=!1,Wd.forEach(n=>n.complete(KS)),Wd.clear()}function aN(){Wd.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(ZS=!0)})}function qO(){KS=!0,aN(),sN(),KS=!1}class ow{constructor(e,t,i,s,o,c=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=i,this.motionValue=s,this.element=o,this.isAsync=c}scheduleResolve(){this.state="scheduled",this.isAsync?(Wd.add(this),YS||(YS=!0,ni.read(aN),ni.resolveKeyframes(sN))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:i,motionValue:s}=this;if(e[0]===null){const o=s?.get(),c=e[e.length-1];if(o!==void 0)e[0]=o;else if(i&&t){const h=i.readValue(t,c);h!=null&&(e[0]=h)}e[0]===void 0&&(e[0]=c),s&&o===void 0&&s.set(e[0])}VO(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Wd.delete(this)}cancel(){this.state==="scheduled"&&(Wd.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const YO=n=>n.startsWith("--");function rN(n,e,t){YO(e)?n.style.setProperty(e,t):n.style[e]=t}const ZO={};function oN(n,e){const t=RR(n);return()=>ZO[e]??t()}const KO=oN(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),lN=oN(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ug=([n,e,t,i])=>`cubic-bezier(${n}, ${e}, ${t}, ${i})`,WE={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ug([0,.65,.55,1]),circOut:ug([.55,0,1,.45]),backIn:ug([.31,.01,.66,-.59]),backOut:ug([.33,1.53,.69,.99])};function cN(n,e){if(n)return typeof n=="function"?lN()?QR(n,e):"ease-out":HR(n)?ug(n):Array.isArray(n)?n.map(t=>cN(t,e)||WE.easeOut):WE[n]}function $O(n,e,t,{delay:i=0,duration:s=300,repeat:o=0,repeatType:c="loop",ease:h="easeOut",times:f}={},p=void 0){const x={[e]:t};f&&(x.offset=f);const y=cN(h,s);Array.isArray(y)&&(x.easing=y);const v={delay:i,duration:s,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:o+1,direction:c==="reverse"?"alternate":"normal"};return p&&(v.pseudoElement=p),n.animate(x,v)}function lw(n){return typeof n=="function"&&"applyToOptions"in n}function QO({type:n,...e}){return lw(n)&&lN()?n.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class uN extends rw{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:i,keyframes:s,pseudoElement:o,allowFlatten:c=!1,finalKeyframe:h,onComplete:f}=e;this.isPseudoElement=!!o,this.allowFlatten=c,this.options=e,$M(typeof e.type!="string");const p=QO(e);this.animation=$O(t,i,s,p,o),p.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const x=N1(s,this.options,h,this.speed);this.updateMotionValue&&this.updateMotionValue(x),rN(t,i,x),this.animation.cancel()}f?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return kr(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+kr(e)}get time(){return kr(Number(this.animation.currentTime)||0)}set time(e){const t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ya(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:i,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&KO()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),i&&(this.animation.rangeEnd=i),Gr):s(this)}}const dN={anticipate:OR,backInOut:UR,circInOut:BR};function JO(n){return n in dN}function e2(n){typeof n.ease=="string"&&JO(n.ease)&&(n.ease=dN[n.ease])}const x_=10;class t2 extends uN{constructor(e){e2(e),iN(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:i,onComplete:s,element:o,...c}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}const h=new Tv({...c,autoplay:!1}),f=Math.max(x_,ga.now()-this.startTime),p=_l(0,x_,f-x_),x=h.sample(f).value,{name:y}=this.options;o&&y&&rN(o,y,x),t.setWithVelocity(h.sample(Math.max(0,f-p)).value,x,p),h.stop()}}const XE=(n,e)=>e==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(Ao.test(n)||n==="0")&&!n.startsWith("url("));function n2(n){const e=n[0];if(n.length===1)return!0;for(let t=0;t<n.length;t++)if(n[t]!==e)return!0}function i2(n,e,t,i){const s=n[0];if(s===null)return!1;if(e==="display"||e==="visibility")return!0;const o=n[n.length-1],c=XE(s,e),h=XE(o,e);return!c||!h?!1:n2(n)||(t==="spring"||lw(t))&&i}function $S(n){n.duration=0,n.type="keyframes"}const hN=new Set(["opacity","clipPath","filter","transform"]),s2=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function a2(n){for(let e=0;e<n.length;e++)if(typeof n[e]=="string"&&s2.test(n[e]))return!0;return!1}const r2=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),o2=RR(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function l2(n){const{motionValue:e,name:t,repeatDelay:i,repeatType:s,damping:o,type:c,keyframes:h}=n;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:p,transformTemplate:x}=e.owner.getProps();return o2()&&t&&(hN.has(t)||r2.has(t)&&a2(h))&&(t!=="transform"||!x)&&!p&&!i&&s!=="mirror"&&o!==0&&c!=="inertia"}const c2=40;class u2 extends rw{constructor({autoplay:e=!0,delay:t=0,type:i="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:c="loop",keyframes:h,name:f,motionValue:p,element:x,...y}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ga.now();const v={autoplay:e,delay:t,type:i,repeat:s,repeatDelay:o,repeatType:c,name:f,motionValue:p,element:x,...y},S=x?.KeyframeResolver||ow;this.keyframeResolver=new S(h,(M,R,A)=>this.onKeyframesResolved(M,R,v,!A),f,p,x),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,i,s){this.keyframeResolver=void 0;const{name:o,type:c,velocity:h,delay:f,isHandoff:p,onUpdate:x}=i;this.resolvedAt=ga.now();let y=!0;i2(e,o,c,h)||(y=!1,(Au.instantAnimations||!f)&&x?.(N1(e,i,t)),e[0]=e[e.length-1],$S(i),i.repeat=0);const S={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>c2?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:t,...i,keyframes:e},M=y&&!p&&l2(S),R=S.motionValue?.owner?.current;let A;if(M)try{A=new t2({...S,element:R})}catch{A=new Tv(S)}else A=new Tv(S);A.finished.then(()=>{this.notifyFinished()}).catch(Gr),this.pendingTimeline&&(this.stopTimeline=A.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=A}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),qO()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class d2{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let i=0;i<this.animations.length;i++)this.animations[i][e]=t}attachTimeline(e){const t=this.animations.map(i=>i.attachTimeline(e));return()=>{t.forEach((i,s)=>{i&&i(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return qE(this.animations,"duration")}get iterationDuration(){return qE(this.animations,"iterationDuration")}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function qE(n,e){let t=0;for(let i=0;i<n.length;i++){const s=n[i][e];s!==null&&s>t&&(t=s)}return t}class h2 extends d2{then(e,t){return this.finished.finally(e).then(()=>{})}}function fN(n,e,t,i=0,s=1){const o=Array.from(n).sort((p,x)=>p.sortNodePosition(x)).indexOf(e),c=n.size,h=(c-1)*i;return typeof t=="function"?t(o,c):s===1?o*i:h-o*i}const f2=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function p2(n){const e=f2.exec(n);if(!e)return[,];const[,t,i,s]=e;return[`--${t??i}`,s]}function pN(n,e,t=1){const[i,s]=p2(n);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const c=o.trim();return ER(c)?parseFloat(c):c}return tw(s)?pN(s,e,t+1):s}const m2={type:"spring",stiffness:500,damping:25,restSpeed:10},g2=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),x2={type:"keyframes",duration:.8},y2={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},v2=(n,{keyframes:e})=>e.length>2?x2:up.has(n)?n.startsWith("scale")?g2(e[1]):m2:y2;function mN(n,e){if(n?.inherit&&e){const{inherit:t,...i}=n;return{...e,...i}}return n}function cw(n,e){const t=n?.[e]??n?.default??n;return t!==n?mN(t,n):t}const b2=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function _2(n){for(const e in n)if(!b2.has(e))return!0;return!1}const uw=(n,e,t,i={},s,o)=>c=>{const h=cw(i,n)||{},f=h.delay||i.delay||0;let{elapsed:p=0}=i;p=p-Ya(f);const x={keyframes:Array.isArray(t)?t:[null,t],ease:"easeOut",velocity:e.getVelocity(),...h,delay:-p,onUpdate:v=>{e.set(v),h.onUpdate&&h.onUpdate(v)},onComplete:()=>{c(),h.onComplete&&h.onComplete()},name:n,motionValue:e,element:o?void 0:s};_2(h)||Object.assign(x,v2(n,x)),x.duration&&(x.duration=Ya(x.duration)),x.repeatDelay&&(x.repeatDelay=Ya(x.repeatDelay)),x.from!==void 0&&(x.keyframes[0]=x.from);let y=!1;if((x.type===!1||x.duration===0&&!x.repeatDelay)&&($S(x),x.delay===0&&(y=!0)),(Au.instantAnimations||Au.skipAnimations||s?.shouldSkipAnimations)&&(y=!0,$S(x),x.delay=0),x.allowFlatten=!h.type&&!h.ease,y&&!o&&e.get()!==void 0){const v=N1(x.keyframes,h);if(v!==void 0){ni.update(()=>{x.onUpdate(v),x.onComplete()});return}}return h.isSync?new Tv(x):new u2(x)};function YE(n){const e=[{},{}];return n?.values.forEach((t,i)=>{e[0][i]=t.get(),e[1][i]=t.getVelocity()}),e}function dw(n,e,t,i){if(typeof e=="function"){const[s,o]=YE(i);e=e(t!==void 0?t:n.custom,s,o)}if(typeof e=="string"&&(e=n.variants&&n.variants[e]),typeof e=="function"){const[s,o]=YE(i);e=e(t!==void 0?t:n.custom,s,o)}return e}function Xd(n,e,t){const i=n.getProps();return dw(i,e,t!==void 0?t:i.custom,n)}const gN=new Set(["width","height","top","left","right","bottom",...cp]),ZE=30,S2=n=>!isNaN(parseFloat(n));class M2{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const s=ga.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=ga.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=S2(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new QM);const i=this.events[e].add(t);return e==="change"?()=>{i(),ni.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){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,i){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=ga.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>ZE)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,ZE);return NR(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ru(n,e){return new M2(n,e)}const QS=n=>Array.isArray(n);function w2(n,e,t){n.hasValue(e)?n.getValue(e).set(t):n.addValue(e,Ru(t))}function T2(n){return QS(n)?n[n.length-1]||0:n}function hw(n,e){const t=Xd(n,e);let{transitionEnd:i={},transition:s={},...o}=t||{};o={...o,...i};for(const c in o){const h=T2(o[c]);w2(n,c,h)}}const ds=n=>!!(n&&n.getVelocity);function E2(n){return!!(ds(n)&&n.add)}function JS(n,e){const t=n.getValue("willChange");if(E2(t))return t.add(e);if(!t&&Au.WillChange){const i=new Au.WillChange("auto");n.addValue("willChange",i),i.add(e)}}function fw(n){return n.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const A2="framerAppearId",xN="data-"+fw(A2);function yN(n){return n.props[xN]}function C2({protectedKeys:n,needsAnimating:e},t){const i=n.hasOwnProperty(t)&&e[t]!==!0;return e[t]=!1,i}function pw(n,e,{delay:t=0,transitionOverride:i,type:s}={}){let{transition:o,transitionEnd:c,...h}=e;const f=n.getDefaultTransition();o=o?mN(o,f):f;const p=o?.reduceMotion;i&&(o=i);const x=[],y=s&&n.animationState&&n.animationState.getState()[s];for(const v in h){const S=n.getValue(v,n.latestValues[v]??null),M=h[v];if(M===void 0||y&&C2(y,v))continue;const R={delay:t,...cw(o||{},v)},A=S.get();if(A!==void 0&&!S.isAnimating()&&!Array.isArray(M)&&M===A&&!R.velocity){ni.update(()=>S.set(M));continue}let w=!1;if(window.MotionHandoffAnimation){const I=yN(n);if(I){const B=window.MotionHandoffAnimation(I,v,ni);B!==null&&(R.startTime=B,w=!0)}}JS(n,v);const N=p??n.shouldReduceMotion;S.start(uw(v,S,M,N&&gN.has(v)?{type:!1}:R,n,w));const L=S.animation;L&&x.push(L)}if(c){const v=()=>ni.update(()=>{c&&hw(n,c)});x.length?Promise.all(x).then(v):v()}return x}function eM(n,e,t={}){const i=Xd(n,e,t.type==="exit"?n.presenceContext?.custom:void 0);let{transition:s=n.getDefaultTransition()||{}}=i||{};t.transitionOverride&&(s=t.transitionOverride);const o=i?()=>Promise.all(pw(n,i,t)):()=>Promise.resolve(),c=n.variantChildren&&n.variantChildren.size?(f=0)=>{const{delayChildren:p=0,staggerChildren:x,staggerDirection:y}=s;return R2(n,e,f,p,x,y,t)}:()=>Promise.resolve(),{when:h}=s;if(h){const[f,p]=h==="beforeChildren"?[o,c]:[c,o];return f().then(()=>p())}else return Promise.all([o(),c(t.delay)])}function R2(n,e,t=0,i=0,s=0,o=1,c){const h=[];for(const f of n.variantChildren)f.notify("AnimationStart",e),h.push(eM(f,e,{...c,delay:t+(typeof i=="function"?0:i)+fN(n.variantChildren,f,i,s,o)}).then(()=>f.notify("AnimationComplete",e)));return Promise.all(h)}function vN(n,e,t={}){n.notify("AnimationStart",e);let i;if(Array.isArray(e)){const s=e.map(o=>eM(n,o,t));i=Promise.all(s)}else if(typeof e=="string")i=eM(n,e,t);else{const s=typeof e=="function"?Xd(n,e,t.custom):e;i=Promise.all(pw(n,s,t))}return i.then(()=>{n.notify("AnimationComplete",e)})}const N2={test:n=>n==="auto",parse:n=>n},bN=n=>e=>e.test(n),_N=[lp,Mt,vl,yu,aO,sO,N2],KE=n=>_N.find(bN(n));function D2(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||CR(n):!0}const L2=new Set(["brightness","contrast","saturate","opacity"]);function I2(n){const[e,t]=n.slice(0,-1).split("(");if(e==="drop-shadow")return n;const[i]=t.match(nw)||[];if(!i)return n;const s=t.replace(i,"");let o=L2.has(e)?1:0;return i!==t&&(o*=100),e+"("+o+s+")"}const P2=/\b([a-z-]*)\(.*?\)/gu,tM={...Ao,getAnimatableNone:n=>{const e=n.match(P2);return e?e.map(I2).join(" "):n}},nM={...Ao,getAnimatableNone:n=>{const e=Ao.parse(n);return Ao.createTransformer(n)(e.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},$E={...lp,transform:Math.round},U2={rotate:yu,rotateX:yu,rotateY:yu,rotateZ:yu,scale:ry,scaleX:ry,scaleY:ry,scaleZ:ry,skew:yu,skewX:yu,skewY:yu,distance:Mt,translateX:Mt,translateY:Mt,translateZ:Mt,x:Mt,y:Mt,z:Mt,perspective:Mt,transformPerspective:Mt,opacity:Og,originX:OE,originY:OE,originZ:Mt},mw={borderWidth:Mt,borderTopWidth:Mt,borderRightWidth:Mt,borderBottomWidth:Mt,borderLeftWidth:Mt,borderRadius:Mt,borderTopLeftRadius:Mt,borderTopRightRadius:Mt,borderBottomRightRadius:Mt,borderBottomLeftRadius:Mt,width:Mt,maxWidth:Mt,height:Mt,maxHeight:Mt,top:Mt,right:Mt,bottom:Mt,left:Mt,inset:Mt,insetBlock:Mt,insetBlockStart:Mt,insetBlockEnd:Mt,insetInline:Mt,insetInlineStart:Mt,insetInlineEnd:Mt,padding:Mt,paddingTop:Mt,paddingRight:Mt,paddingBottom:Mt,paddingLeft:Mt,paddingBlock:Mt,paddingBlockStart:Mt,paddingBlockEnd:Mt,paddingInline:Mt,paddingInlineStart:Mt,paddingInlineEnd:Mt,margin:Mt,marginTop:Mt,marginRight:Mt,marginBottom:Mt,marginLeft:Mt,marginBlock:Mt,marginBlockStart:Mt,marginBlockEnd:Mt,marginInline:Mt,marginInlineStart:Mt,marginInlineEnd:Mt,fontSize:Mt,backgroundPositionX:Mt,backgroundPositionY:Mt,...U2,zIndex:$E,fillOpacity:Og,strokeOpacity:Og,numOctaves:$E},O2={...mw,color:is,backgroundColor:is,outlineColor:is,fill:is,stroke:is,borderColor:is,borderTopColor:is,borderRightColor:is,borderBottomColor:is,borderLeftColor:is,filter:tM,WebkitFilter:tM,mask:nM,WebkitMask:nM},SN=n=>O2[n],z2=new Set([tM,nM]);function MN(n,e){let t=SN(n);return z2.has(t)||(t=Ao),t.getAnimatableNone?t.getAnimatableNone(e):void 0}const B2=new Set(["auto","none","0"]);function V2(n,e,t){let i=0,s;for(;i<n.length&&!s;){const o=n[i];typeof o=="string"&&!B2.has(o)&&$f(o).values.length&&(s=n[i]),i++}if(s&&t)for(const o of e)n[o]=MN(t,s)}class F2 extends ow{constructor(e,t,i,s,o){super(e,t,i,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:i}=this;if(!t||!t.current)return;super.readKeyframes();for(let x=0;x<e.length;x++){let y=e[x];if(typeof y=="string"&&(y=y.trim(),tw(y))){const v=pN(y,t.current);v!==void 0&&(e[x]=v),x===e.length-1&&(this.finalKeyframe=y)}}if(this.resolveNoneKeyframes(),!gN.has(i)||e.length!==2)return;const[s,o]=e,c=KE(s),h=KE(o),f=UE(s),p=UE(o);if(f!==p&&Su[i]){this.needsMeasurement=!0;return}if(c!==h)if(jE(c)&&jE(h))for(let x=0;x<e.length;x++){const y=e[x];typeof y=="string"&&(e[x]=parseFloat(y))}else Su[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,i=[];for(let s=0;s<e.length;s++)(e[s]===null||D2(e[s]))&&i.push(s);i.length&&V2(e,i,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:i}=this;if(!e||!e.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Su[i](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const s=t[t.length-1];s!==void 0&&e.getValue(i,s).jump(s,!1)}measureEndState(){const{element:e,name:t,unresolvedKeyframes:i}=this;if(!e||!e.current)return;const s=e.getValue(t);s&&s.jump(this.measuredOrigin,!1);const o=i.length-1,c=i[o];i[o]=Su[t](e.measureViewportBox(),window.getComputedStyle(e.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),this.removedTransforms?.length&&this.removedTransforms.forEach(([h,f])=>{e.getValue(h).set(f)}),this.resolveNoneKeyframes()}}function D1(n,e,t){if(n==null)return[];if(n instanceof EventTarget)return[n];if(typeof n=="string"){let i=document;e&&(i=e.current);const s=t?.[n]??i.querySelectorAll(n);return s?Array.from(s):[]}return Array.from(n).filter(i=>i!=null)}const wN=(n,e)=>e&&typeof n=="number"?e.transform(n):n;function k2(n){return AR(n)&&"offsetHeight"in n&&!("ownerSVGElement"in n)}const{schedule:gw}=GR(queueMicrotask,!1),So={x:!1,y:!1};function TN(){return So.x||So.y}function H2(n){return n==="x"||n==="y"?So[n]?null:(So[n]=!0,()=>{So[n]=!1}):So.x||So.y?null:(So.x=So.y=!0,()=>{So.x=So.y=!1})}function EN(n,e){const t=D1(n),i=new AbortController,s={passive:!0,...e,signal:i.signal};return[t,s,()=>i.abort()]}function G2(n){return!(n.pointerType==="touch"||TN())}function j2(n,e,t={}){const[i,s,o]=EN(n,t);return i.forEach(c=>{let h=!1,f=!1,p;const x=()=>{c.removeEventListener("pointerleave",M)},y=A=>{p&&(p(A),p=void 0),x()},v=A=>{h=!1,window.removeEventListener("pointerup",v),window.removeEventListener("pointercancel",v),f&&(f=!1,y(A))},S=()=>{h=!0,window.addEventListener("pointerup",v,s),window.addEventListener("pointercancel",v,s)},M=A=>{if(A.pointerType!=="touch"){if(h){f=!0;return}y(A)}},R=A=>{if(!G2(A))return;f=!1;const w=e(c,A);typeof w=="function"&&(p=w,c.addEventListener("pointerleave",M,s))};c.addEventListener("pointerenter",R,s),c.addEventListener("pointerdown",S,s)}),o}const AN=(n,e)=>e?n===e?!0:AN(n,e.parentElement):!1,xw=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1,W2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function X2(n){return W2.has(n.tagName)||n.isContentEditable===!0}const q2=new Set(["INPUT","SELECT","TEXTAREA"]);function Y2(n){return q2.has(n.tagName)||n.isContentEditable===!0}const lv=new WeakSet;function QE(n){return e=>{e.key==="Enter"&&n(e)}}function y_(n,e){n.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Z2=(n,e)=>{const t=n.currentTarget;if(!t)return;const i=QE(()=>{if(lv.has(t))return;y_(t,"down");const s=QE(()=>{y_(t,"up")}),o=()=>y_(t,"cancel");t.addEventListener("keyup",s,e),t.addEventListener("blur",o,e)});t.addEventListener("keydown",i,e),t.addEventListener("blur",()=>t.removeEventListener("keydown",i),e)};function JE(n){return xw(n)&&!TN()}const eA=new WeakSet;function K2(n,e,t={}){const[i,s,o]=EN(n,t),c=h=>{const f=h.currentTarget;if(!JE(h)||eA.has(h))return;lv.add(f),t.stopPropagation&&eA.add(h);const p=e(f,h),x=(S,M)=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",v),lv.has(f)&&lv.delete(f),JE(S)&&typeof p=="function"&&p(S,{success:M})},y=S=>{x(S,f===window||f===document||t.useGlobalTarget||AN(f,S.target))},v=S=>{x(S,!1)};window.addEventListener("pointerup",y,s),window.addEventListener("pointercancel",v,s)};return i.forEach(h=>{(t.useGlobalTarget?window:h).addEventListener("pointerdown",c,s),k2(h)&&(h.addEventListener("focus",p=>Z2(p,s)),!X2(h)&&!h.hasAttribute("tabindex")&&(h.tabIndex=0))}),o}function L1(n){return AR(n)&&"ownerSVGElement"in n}const cv=new WeakMap;let uv;const CN=(n,e,t)=>(i,s)=>s&&s[0]?s[0][n+"Size"]:L1(i)&&"getBBox"in i?i.getBBox()[e]:i[t],$2=CN("inline","width","offsetWidth"),Q2=CN("block","height","offsetHeight");function J2({target:n,borderBoxSize:e}){cv.get(n)?.forEach(t=>{t(n,{get width(){return $2(n,e)},get height(){return Q2(n,e)}})})}function ez(n){n.forEach(J2)}function tz(){typeof ResizeObserver>"u"||(uv=new ResizeObserver(ez))}function nz(n,e){uv||tz();const t=D1(n);return t.forEach(i=>{let s=cv.get(i);s||(s=new Set,cv.set(i,s)),s.add(e),uv?.observe(i)}),()=>{t.forEach(i=>{const s=cv.get(i);s?.delete(e),s?.size||uv?.unobserve(i)})}}const dv=new Set;let kf;function iz(){kf=()=>{const n={get width(){return window.innerWidth},get height(){return window.innerHeight}};dv.forEach(e=>e(n))},window.addEventListener("resize",kf)}function sz(n){return dv.add(n),kf||iz(),()=>{dv.delete(n),!dv.size&&typeof kf=="function"&&(window.removeEventListener("resize",kf),kf=void 0)}}function tA(n,e){return typeof n=="function"?sz(n):nz(n,e)}function RN(n){return L1(n)&&n.tagName==="svg"}const az=[..._N,is,Ao],rz=n=>az.find(bN(n)),nA=()=>({translate:0,scale:1,origin:0,originPoint:0}),Hf=()=>({x:nA(),y:nA()}),iA=()=>({min:0,max:0}),ns=()=>({x:iA(),y:iA()}),Bg=new WeakMap;function I1(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}function Vg(n){return typeof n=="string"||Array.isArray(n)}const yw=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],vw=["initial",...yw];function P1(n){return I1(n.animate)||vw.some(e=>Vg(n[e]))}function NN(n){return!!(P1(n)||n.variants)}function oz(n,e,t){for(const i in e){const s=e[i],o=t[i];if(ds(s))n.addValue(i,s);else if(ds(o))n.addValue(i,Ru(s,{owner:n}));else if(o!==s)if(n.hasValue(i)){const c=n.getValue(i);c.liveStyle===!0?c.jump(s):c.hasAnimated||c.set(s)}else{const c=n.getStaticValue(i);n.addValue(i,Ru(c!==void 0?c:s,{owner:n}))}}for(const i in t)e[i]===void 0&&n.removeValue(i);return e}const iM={current:null},DN={current:!1},lz=typeof window<"u";function cz(){if(DN.current=!0,!!lz)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),e=()=>iM.current=n.matches;n.addEventListener("change",e),e()}else iM.current=!1}const sA=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Ev={};function LN(n){Ev=n}function uz(){return Ev}class IN{scrapeMotionValuesFromProps(e,t,i){return{}}constructor({parent:e,props:t,presenceContext:i,reducedMotionConfig:s,skipAnimations:o,blockInitialAnimation:c,visualState:h},f={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=ow,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const S=ga.now();this.renderScheduledAt<S&&(this.renderScheduledAt=S,ni.render(this.render,!1,!0))};const{latestValues:p,renderState:x}=h;this.latestValues=p,this.baseTarget={...p},this.initialValues=t.initial?{...p}:{},this.renderState=x,this.parent=e,this.props=t,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=o,this.options=f,this.blockInitialAnimation=!!c,this.isControllingVariants=P1(t),this.isVariantNode=NN(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:y,...v}=this.scrapeMotionValuesFromProps(t,{},this);for(const S in v){const M=v[S];p[S]!==void 0&&ds(M)&&M.set(p[S])}}mount(e){if(this.hasBeenMounted)for(const t in this.initialValues)this.values.get(t)?.jump(this.initialValues[t]),this.latestValues[t]=this.initialValues[t];this.current=e,Bg.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,i)=>this.bindToMotionValue(i,t)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(DN.current||cz(),this.shouldReduceMotion=iM.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Cu(this.notifyUpdate),Cu(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&hN.has(e)&&this.current instanceof HTMLElement){const{factory:c,keyframes:h,times:f,ease:p,duration:x}=t.accelerate,y=new uN({element:this.current,name:e,keyframes:h,times:f,ease:p,duration:Ya(x)}),v=c(y);this.valueSubscriptions.set(e,()=>{v(),y.cancel()});return}const i=up.has(e);i&&this.onBindTransform&&this.onBindTransform();const s=t.on("change",c=>{this.latestValues[e]=c,this.props.onUpdate&&ni.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{s(),o&&o(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Ev){const t=Ev[e];if(!t)continue;const{isEnabled:i,Feature:s}=t;if(!this.features[e]&&s&&i(this.props)&&(this.features[e]=new s(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ns()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let i=0;i<sA.length;i++){const s=sA[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,c=e[o];c&&(this.propEventSubscriptions[s]=this.on(s,c))}this.prevMotionValues=oz(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const i=this.values.get(e);t!==i&&(i&&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=Ru(t===null?void 0:t,{owner:this}),this.addValue(e,i)),i}readValue(e,t){let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(ER(i)||CR(i))?i=parseFloat(i):!rz(i)&&Ao.test(t)&&(i=MN(e,t)),this.setBaseTarget(e,ds(i)?i.get():i)),ds(i)?i.get():i}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){const{initial:t}=this.props;let i;if(typeof t=="string"||typeof t=="object"){const o=dw(this.props,t,this.presenceContext?.custom);o&&(i=o[e])}if(t&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!ds(s)?s:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new QM),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){gw.render(this.render)}}class PN extends IN{constructor(){super(...arguments),this.KeyframeResolver=F2}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){const i=e.style;return i?i[t]:void 0}removeValueFromRenderState(e,{vars:t,style:i}){delete t[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;ds(e)&&(this.childSubscription=e.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}class Pu{constructor(e){this.isMounted=!1,this.node=e}update(){}}function UN({top:n,left:e,right:t,bottom:i}){return{x:{min:e,max:t},y:{min:n,max:i}}}function dz({x:n,y:e}){return{top:e.min,right:n.max,bottom:e.max,left:n.min}}function hz(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 v_(n){return n===void 0||n===1}function sM({scale:n,scaleX:e,scaleY:t}){return!v_(n)||!v_(e)||!v_(t)}function Ud(n){return sM(n)||ON(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function ON(n){return aA(n.x)||aA(n.y)}function aA(n){return n&&n!=="0%"}function Av(n,e,t){const i=n-t,s=e*i;return t+s}function rA(n,e,t,i,s){return s!==void 0&&(n=Av(n,s,i)),Av(n,t,i)+e}function aM(n,e=0,t=1,i,s){n.min=rA(n.min,e,t,i,s),n.max=rA(n.max,e,t,i,s)}function zN(n,{x:e,y:t}){aM(n.x,e.translate,e.scale,e.originPoint),aM(n.y,t.translate,t.scale,t.originPoint)}const oA=.999999999999,lA=1.0000000000001;function fz(n,e,t,i=!1){const s=t.length;if(!s)return;e.x=e.y=1;let o,c;for(let h=0;h<s;h++){o=t[h],c=o.projectionDelta;const{visualElement:f}=o.options;f&&f.props.style&&f.props.style.display==="contents"||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&(ml(n.x,-o.scroll.offset.x),ml(n.y,-o.scroll.offset.y)),c&&(e.x*=c.x.scale,e.y*=c.y.scale,zN(n,c)),i&&Ud(o.latestValues)&&hv(n,o.latestValues,o.layout?.layoutBox))}e.x<lA&&e.x>oA&&(e.x=1),e.y<lA&&e.y>oA&&(e.y=1)}function ml(n,e){n.min+=e,n.max+=e}function cA(n,e,t,i,s=.5){const o=li(n.min,n.max,s);aM(n,e,t,o,i)}function uA(n,e){return typeof n=="string"?parseFloat(n)/100*(e.max-e.min):n}function hv(n,e,t){const i=t??n;cA(n.x,uA(e.x,i.x),e.scaleX,e.scale,e.originX),cA(n.y,uA(e.y,i.y),e.scaleY,e.scale,e.originY)}function BN(n,e){return UN(hz(n.getBoundingClientRect(),e))}function pz(n,e,t){const i=BN(n,t),{scroll:s}=e;return s&&(ml(i.x,s.offset.x),ml(i.y,s.offset.y)),i}const mz={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},gz=cp.length;function xz(n,e,t){let i="",s=!0;for(let o=0;o<gz;o++){const c=cp[o],h=n[c];if(h===void 0)continue;let f=!0;if(typeof h=="number")f=h===(c.startsWith("scale")?1:0);else{const p=parseFloat(h);f=c.startsWith("scale")?p===1:p===0}if(!f||t){const p=wN(h,mw[c]);if(!f){s=!1;const x=mz[c]||c;i+=`${x}(${p}) `}t&&(e[c]=p)}}return i=i.trim(),t?i=t(e,s?"":i):s&&(i="none"),i}function bw(n,e,t){const{style:i,vars:s,transformOrigin:o}=n;let c=!1,h=!1;for(const f in e){const p=e[f];if(up.has(f)){c=!0;continue}else if(WR(f)){s[f]=p;continue}else{const x=wN(p,mw[f]);f.startsWith("origin")?(h=!0,o[f]=x):i[f]=x}}if(e.transform||(c||t?i.transform=xz(e,n.transform,t):i.transform&&(i.transform="none")),h){const{originX:f="50%",originY:p="50%",originZ:x=0}=o;i.transformOrigin=`${f} ${p} ${x}`}}function VN(n,{style:e,vars:t},i,s){const o=n.style;let c;for(c in e)o[c]=e[c];s?.applyProjectionStyles(o,i);for(c in t)o.setProperty(c,t[c])}function dA(n,e){return e.max===e.min?0:n/(e.max-e.min)*100}const qm={correct:(n,e)=>{if(!e.target)return n;if(typeof n=="string")if(Mt.test(n))n=parseFloat(n);else return n;const t=dA(n,e.target.x),i=dA(n,e.target.y);return`${t}% ${i}%`}},yz={correct:(n,{treeScale:e,projectionDelta:t})=>{const i=n,s=Ao.parse(n);if(s.length>5)return i;const o=Ao.createTransformer(n),c=typeof s[0]!="number"?1:0,h=t.x.scale*e.x,f=t.y.scale*e.y;s[0+c]/=h,s[1+c]/=f;const p=li(h,f,.5);return typeof s[2+c]=="number"&&(s[2+c]/=p),typeof s[3+c]=="number"&&(s[3+c]/=p),o(s)}},rM={borderRadius:{...qm,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:qm,borderTopRightRadius:qm,borderBottomLeftRadius:qm,borderBottomRightRadius:qm,boxShadow:yz};function FN(n,{layout:e,layoutId:t}){return up.has(n)||n.startsWith("origin")||(e||t!==void 0)&&(!!rM[n]||n==="opacity")}function _w(n,e,t){const i=n.style,s=e?.style,o={};if(!i)return o;for(const c in i)(ds(i[c])||s&&ds(s[c])||FN(c,n)||t?.getValue(c)?.liveStyle!==void 0)&&(o[c]=i[c]);return o}function vz(n){return window.getComputedStyle(n)}class kN extends PN{constructor(){super(...arguments),this.type="html",this.renderInstance=VN}readValueFromInstance(e,t){if(up.has(t))return this.projection?.isProjecting?XS(t):HO(e,t);{const i=vz(e),s=(WR(t)?i.getPropertyValue(t):i[t])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:t}){return BN(e,t)}build(e,t,i){bw(e,t,i.transformTemplate)}scrapeMotionValuesFromProps(e,t,i){return _w(e,t,i)}}function bz(n,e){return n in e}class _z extends IN{constructor(){super(...arguments),this.type="object"}readValueFromInstance(e,t){if(bz(t,e)){const i=e[t];if(typeof i=="string"||typeof i=="number")return i}}getBaseTargetFromProps(){}removeValueFromRenderState(e,t){delete t.output[e]}measureInstanceViewportBox(){return ns()}build(e,t){Object.assign(e.output,t)}renderInstance(e,{output:t}){Object.assign(e,t)}sortInstanceNodePosition(){return 0}}const Sz={offset:"stroke-dashoffset",array:"stroke-dasharray"},Mz={offset:"strokeDashoffset",array:"strokeDasharray"};function wz(n,e,t=1,i=0,s=!0){n.pathLength=1;const o=s?Sz:Mz;n[o.offset]=`${-i}`,n[o.array]=`${e} ${t}`}const Tz=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function HN(n,{attrX:e,attrY:t,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:c=0,...h},f,p,x){if(bw(n,h,p),f){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:y,style:v}=n;y.transform&&(v.transform=y.transform,delete y.transform),(v.transform||y.transformOrigin)&&(v.transformOrigin=y.transformOrigin??"50% 50%",delete y.transformOrigin),v.transform&&(v.transformBox=x?.transformBox??"fill-box",delete y.transformBox);for(const S of Tz)y[S]!==void 0&&(v[S]=y[S],delete y[S]);e!==void 0&&(y.x=e),t!==void 0&&(y.y=t),i!==void 0&&(y.scale=i),s!==void 0&&wz(y,s,o,c,!1)}const GN=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"]),jN=n=>typeof n=="string"&&n.toLowerCase()==="svg";function Ez(n,e,t,i){VN(n,e,void 0,i);for(const s in e.attrs)n.setAttribute(GN.has(s)?s:fw(s),e.attrs[s])}function WN(n,e,t){const i=_w(n,e,t);for(const s in n)if(ds(n[s])||ds(e[s])){const o=cp.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[o]=n[s]}return i}class XN extends PN{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ns}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(up.has(t)){const i=SN(t);return i&&i.default||0}return t=GN.has(t)?t:fw(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,i){return WN(e,t,i)}build(e,t,i){HN(e,t,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(e,t,i,s){Ez(e,t,i,s)}mount(e){this.isSVGTag=jN(e.tagName),super.mount(e)}}const Az=vw.length;function qN(n){if(!n)return;if(!n.isControllingVariants){const t=n.parent?qN(n.parent)||{}:{};return n.props.initial!==void 0&&(t.initial=n.props.initial),t}const e={};for(let t=0;t<Az;t++){const i=vw[t],s=n.props[i];(Vg(s)||s===!1)&&(e[i]=s)}return e}function YN(n,e){if(!Array.isArray(e))return!1;const t=e.length;if(t!==n.length)return!1;for(let i=0;i<t;i++)if(e[i]!==n[i])return!1;return!0}const Cz=[...yw].reverse(),Rz=yw.length;function Nz(n){return e=>Promise.all(e.map(({animation:t,options:i})=>vN(n,t,i)))}function Dz(n){let e=Nz(n),t=hA(),i=!0,s=!1;const o=p=>(x,y)=>{const v=Xd(n,y,p==="exit"?n.presenceContext?.custom:void 0);if(v){const{transition:S,transitionEnd:M,...R}=v;x={...x,...R,...M}}return x};function c(p){e=p(n)}function h(p){const{props:x}=n,y=qN(n.parent)||{},v=[],S=new Set;let M={},R=1/0;for(let w=0;w<Rz;w++){const N=Cz[w],L=t[N],I=x[N]!==void 0?x[N]:y[N],B=Vg(I),O=N===p?L.isActive:null;O===!1&&(R=w);let F=I===y[N]&&I!==x[N]&&B;if(F&&(i||s)&&n.manuallyAnimateOnMount&&(F=!1),L.protectedKeys={...M},!L.isActive&&O===null||!I&&!L.prevProp||I1(I)||typeof I=="boolean")continue;if(N==="exit"&&L.isActive&&O!==!0){L.prevResolvedValues&&(M={...M,...L.prevResolvedValues});continue}const P=Lz(L.prevProp,I);let V=P||N===p&&L.isActive&&!F&&B||w>R&&B,j=!1;const W=Array.isArray(I)?I:[I];let ee=W.reduce(o(N),{});O===!1&&(ee={});const{prevResolvedValues:ie={}}=L,ue={...ie,...ee},Q=le=>{V=!0,S.has(le)&&(j=!0,S.delete(le)),L.needsAnimating[le]=!0;const ge=n.getValue(le);ge&&(ge.liveStyle=!1)};for(const le in ue){const ge=ee[le],Ce=ie[le];if(M.hasOwnProperty(le))continue;let q=!1;QS(ge)&&QS(Ce)?q=!YN(ge,Ce):q=ge!==Ce,q?ge!=null?Q(le):S.add(le):ge!==void 0&&S.has(le)?Q(le):L.protectedKeys[le]=!0}L.prevProp=I,L.prevResolvedValues=ee,L.isActive&&(M={...M,...ee}),(i||s)&&n.blockInitialAnimation&&(V=!1);const Y=F&&P;V&&(!Y||j)&&v.push(...W.map(le=>{const ge={type:N};if(typeof le=="string"&&(i||s)&&!Y&&n.manuallyAnimateOnMount&&n.parent){const{parent:Ce}=n,q=Xd(Ce,le);if(Ce.enteringChildren&&q){const{delayChildren:ae}=q.transition||{};ge.delay=fN(Ce.enteringChildren,n,ae)}}return{animation:le,options:ge}}))}if(S.size){const w={};if(typeof x.initial!="boolean"){const N=Xd(n,Array.isArray(x.initial)?x.initial[0]:x.initial);N&&N.transition&&(w.transition=N.transition)}S.forEach(N=>{const L=n.getBaseTarget(N),I=n.getValue(N);I&&(I.liveStyle=!0),w[N]=L??null}),v.push({animation:w})}let A=!!v.length;return i&&(x.initial===!1||x.initial===x.animate)&&!n.manuallyAnimateOnMount&&(A=!1),i=!1,s=!1,A?e(v):Promise.resolve()}function f(p,x){if(t[p].isActive===x)return Promise.resolve();n.variantChildren?.forEach(v=>v.animationState?.setActive(p,x)),t[p].isActive=x;const y=h(p);for(const v in t)t[v].protectedKeys={};return y}return{animateChanges:h,setActive:f,setAnimateFunction:c,getState:()=>t,reset:()=>{t=hA(),s=!0}}}function Lz(n,e){return typeof e=="string"?e!==n:Array.isArray(e)?!YN(e,n):!1}function Sd(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function hA(){return{animate:Sd(!0),whileInView:Sd(),whileHover:Sd(),whileTap:Sd(),whileDrag:Sd(),whileFocus:Sd(),exit:Sd()}}function oM(n,e){n.min=e.min,n.max=e.max}function xo(n,e){oM(n.x,e.x),oM(n.y,e.y)}function fA(n,e){n.translate=e.translate,n.scale=e.scale,n.originPoint=e.originPoint,n.origin=e.origin}const ZN=1e-4,Iz=1-ZN,Pz=1+ZN,KN=.01,Uz=0-KN,Oz=0+KN;function xa(n){return n.max-n.min}function zz(n,e,t){return Math.abs(n-e)<=t}function pA(n,e,t,i=.5){n.origin=i,n.originPoint=li(e.min,e.max,n.origin),n.scale=xa(t)/xa(e),n.translate=li(t.min,t.max,n.origin)-n.originPoint,(n.scale>=Iz&&n.scale<=Pz||isNaN(n.scale))&&(n.scale=1),(n.translate>=Uz&&n.translate<=Oz||isNaN(n.translate))&&(n.translate=0)}function vg(n,e,t,i){pA(n.x,e.x,t.x,i?i.originX:void 0),pA(n.y,e.y,t.y,i?i.originY:void 0)}function mA(n,e,t,i=0){const s=i?li(t.min,t.max,i):t.min;n.min=s+e.min,n.max=n.min+xa(e)}function Bz(n,e,t,i){mA(n.x,e.x,t.x,i?.x),mA(n.y,e.y,t.y,i?.y)}function gA(n,e,t,i=0){const s=i?li(t.min,t.max,i):t.min;n.min=e.min-s,n.max=n.min+xa(e)}function Cv(n,e,t,i){gA(n.x,e.x,t.x,i?.x),gA(n.y,e.y,t.y,i?.y)}function xA(n,e,t,i,s){return n-=e,n=Av(n,1/t,i),s!==void 0&&(n=Av(n,1/s,i)),n}function Vz(n,e=0,t=1,i=.5,s,o=n,c=n){if(vl.test(e)&&(e=parseFloat(e),e=li(c.min,c.max,e/100)-c.min),typeof e!="number")return;let h=li(o.min,o.max,i);n===o&&(h-=e),n.min=xA(n.min,e,t,h,s),n.max=xA(n.max,e,t,h,s)}function yA(n,e,[t,i,s],o,c){Vz(n,e[t],e[i],e[s],e.scale,o,c)}const Fz=["x","scaleX","originX"],kz=["y","scaleY","originY"];function vA(n,e,t,i){yA(n.x,e,Fz,t?t.x:void 0,i?i.x:void 0),yA(n.y,e,kz,t?t.y:void 0,i?i.y:void 0)}function bA(n){return n.translate===0&&n.scale===1}function $N(n){return bA(n.x)&&bA(n.y)}function _A(n,e){return n.min===e.min&&n.max===e.max}function Hz(n,e){return _A(n.x,e.x)&&_A(n.y,e.y)}function SA(n,e){return Math.round(n.min)===Math.round(e.min)&&Math.round(n.max)===Math.round(e.max)}function QN(n,e){return SA(n.x,e.x)&&SA(n.y,e.y)}function MA(n){return xa(n.x)/xa(n.y)}function wA(n,e){return n.translate===e.translate&&n.scale===e.scale&&n.originPoint===e.originPoint}function pl(n){return[n("x"),n("y")]}function Gz(n,e,t){let i="";const s=n.x.translate/e.x,o=n.y.translate/e.y,c=t?.z||0;if((s||o||c)&&(i=`translate3d(${s}px, ${o}px, ${c}px) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),t){const{transformPerspective:p,rotate:x,rotateX:y,rotateY:v,skewX:S,skewY:M}=t;p&&(i=`perspective(${p}px) ${i}`),x&&(i+=`rotate(${x}deg) `),y&&(i+=`rotateX(${y}deg) `),v&&(i+=`rotateY(${v}deg) `),S&&(i+=`skewX(${S}deg) `),M&&(i+=`skewY(${M}deg) `)}const h=n.x.scale*e.x,f=n.y.scale*e.y;return(h!==1||f!==1)&&(i+=`scale(${h}, ${f})`),i||"none"}const JN=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],jz=JN.length,TA=n=>typeof n=="string"?parseFloat(n):n,EA=n=>typeof n=="number"||Mt.test(n);function Wz(n,e,t,i,s,o){s?(n.opacity=li(0,t.opacity??1,Xz(i)),n.opacityExit=li(e.opacity??1,0,qz(i))):o&&(n.opacity=li(e.opacity??1,t.opacity??1,i));for(let c=0;c<jz;c++){const h=JN[c];let f=AA(e,h),p=AA(t,h);if(f===void 0&&p===void 0)continue;f||(f=0),p||(p=0),f===0||p===0||EA(f)===EA(p)?(n[h]=Math.max(li(TA(f),TA(p),i),0),(vl.test(p)||vl.test(f))&&(n[h]+="%")):n[h]=p}(e.rotate||t.rotate)&&(n.rotate=li(e.rotate||0,t.rotate||0,i))}function AA(n,e){return n[e]!==void 0?n[e]:n.borderRadius}const Xz=eD(0,.5,zR),qz=eD(.5,.95,Gr);function eD(n,e,t){return i=>i<n?0:i>e?1:t(Kf(n,e,i))}function tD(n,e,t){const i=ds(n)?n:Ru(n);return i.start(uw("",i,e,t)),i.animation}function Fg(n,e,t,i={passive:!0}){return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t)}const Yz=(n,e)=>n.depth-e.depth;class Zz{constructor(){this.children=[],this.isDirty=!1}add(e){KM(this.children,e),this.isDirty=!0}remove(e){Zf(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Yz),this.isDirty=!1,this.children.forEach(e)}}function Kz(n,e){const t=ga.now(),i=({timestamp:s})=>{const o=s-t;o>=e&&(Cu(i),n(o-e))};return ni.setup(i,!0),()=>Cu(i)}function fv(n){return ds(n)?n.get():n}class $z{constructor(){this.members=[]}add(e){KM(this.members,e);for(let t=this.members.length-1;t>=0;t--){const i=this.members[t];if(i===e||i===this.lead||i===this.prevLead)continue;const s=i.instance;(!s||s.isConnected===!1)&&!i.snapshot&&(Zf(this.members,i),i.unmount())}e.scheduleRender()}remove(e){if(Zf(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){for(let t=this.members.indexOf(e)-1;t>=0;t--){const i=this.members[t];if(i.isPresent!==!1&&i.instance?.isConnected!==!1)return this.promote(i),!0}return!1}promote(e,t){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.updateSnapshot(),e.scheduleRender();const{layoutDependency:s}=i.options,{layoutDependency:o}=e.options;(s===void 0||s!==o)&&(e.resumeFrom=i,t&&(i.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const pv={hasAnimatedSinceResize:!0,hasEverUpdated:!1},b_=["","X","Y","Z"],Qz=1e3;let Jz=0;function __(n,e,t,i){const{latestValues:s}=e;s[n]&&(t[n]=s[n],e.setStaticValue(n,0),i&&(i[n]=0))}function nD(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:e}=n.options;if(!e)return;const t=yN(e);if(window.MotionHasOptimisedAnimation(t,"transform")){const{layout:s,layoutId:o}=n.options;window.MotionCancelOptimisedAnimation(t,"transform",ni,!(s||o))}const{parent:i}=n;i&&!i.hasCheckedOptimisedAppear&&nD(i)}function iD({attachResizeListener:n,defaultParent:e,measureScroll:t,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(c={},h=e?.()){this.id=Jz++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(nB),this.nodes.forEach(lB),this.nodes.forEach(cB),this.nodes.forEach(iB)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=c,this.root=h?h.root||h:this,this.path=h?[...h.path,h]:[],this.parent=h,this.depth=h?h.depth+1:0;for(let f=0;f<this.path.length;f++)this.path[f].shouldResetTransform=!0;this.root===this&&(this.nodes=new Zz)}addEventListener(c,h){return this.eventHandlers.has(c)||this.eventHandlers.set(c,new QM),this.eventHandlers.get(c).add(h)}notifyListeners(c,...h){const f=this.eventHandlers.get(c);f&&f.notify(...h)}hasListeners(c){return this.eventHandlers.has(c)}mount(c){if(this.instance)return;this.isSVG=L1(c)&&!RN(c),this.instance=c;const{layoutId:h,layout:f,visualElement:p}=this.options;if(p&&!p.current&&p.mount(c),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(f||h)&&(this.isLayoutDirty=!0),n){let x,y=0;const v=()=>this.root.updateBlockedByResize=!1;ni.read(()=>{y=window.innerWidth}),n(c,()=>{const S=window.innerWidth;S!==y&&(y=S,this.root.updateBlockedByResize=!0,x&&x(),x=Kz(v,250),pv.hasAnimatedSinceResize&&(pv.hasAnimatedSinceResize=!1,this.nodes.forEach(NA)))})}h&&this.root.registerSharedNode(h,this),this.options.animate!==!1&&p&&(h||f)&&this.addEventListener("didUpdate",({delta:x,hasLayoutChanged:y,hasRelativeLayoutChanged:v,layout:S})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const M=this.options.transition||p.getDefaultTransition()||pB,{onLayoutAnimationStart:R,onLayoutAnimationComplete:A}=p.getProps(),w=!this.targetLayout||!QN(this.targetLayout,S),N=!y&&v;if(this.options.layoutRoot||this.resumeFrom||N||y&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const L={...cw(M,"layout"),onPlay:R,onComplete:A};(p.shouldReduceMotion||this.options.layoutRoot)&&(L.delay=0,L.type=!1),this.startAnimation(L),this.setAnimationOrigin(x,N)}else y||NA(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=S})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const c=this.getStack();c&&c.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Cu(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(uB),this.animationId++)}getTransformTemplate(){const{visualElement:c}=this.options;return c&&c.getProps().transformTemplate}willUpdate(c=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&nD(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let x=0;x<this.path.length;x++){const y=this.path[x];y.shouldResetTransform=!0,(typeof y.latestValues.x=="string"||typeof y.latestValues.y=="string")&&(y.isLayoutDirty=!0),y.updateScroll("snapshot"),y.options.layoutRoot&&y.willUpdate(!1)}const{layoutId:h,layout:f}=this.options;if(h===void 0&&!f)return;const p=this.getTransformTemplate();this.prevTransformTemplateValue=p?p(this.latestValues,""):void 0,this.updateSnapshot(),c&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const f=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),f&&this.nodes.forEach(aB),this.nodes.forEach(CA);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(RA);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(rB),this.nodes.forEach(oB),this.nodes.forEach(eB),this.nodes.forEach(tB)):this.nodes.forEach(RA),this.clearAllSnapshots();const h=ga.now();Is.delta=_l(0,1e3/60,h-Is.timestamp),Is.timestamp=h,Is.isProcessing=!0,h_.update.process(Is),h_.preRender.process(Is),h_.render.process(Is),Is.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,gw.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(sB),this.sharedNodes.forEach(dB)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ni.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ni.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!xa(this.snapshot.measuredBox.x)&&!xa(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let f=0;f<this.path.length;f++)this.path[f].updateScroll();const c=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=ns()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:h}=this.options;h&&h.notify("LayoutMeasure",this.layout.layoutBox,c?c.layoutBox:void 0)}updateScroll(c="measure"){let h=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===c&&(h=!1),h&&this.instance){const f=i(this.instance);this.scroll={animationId:this.root.animationId,phase:c,isRoot:f,offset:t(this.instance),wasRoot:this.scroll?this.scroll.isRoot:f}}}resetTransform(){if(!s)return;const c=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,h=this.projectionDelta&&!$N(this.projectionDelta),f=this.getTransformTemplate(),p=f?f(this.latestValues,""):void 0,x=p!==this.prevTransformTemplateValue;c&&this.instance&&(h||Ud(this.latestValues)||x)&&(s(this.instance,p),this.shouldResetTransform=!1,this.scheduleRender())}measure(c=!0){const h=this.measurePageBox();let f=this.removeElementScroll(h);return c&&(f=this.removeTransform(f)),mB(f),{animationId:this.root.animationId,measuredBox:h,layoutBox:f,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:c}=this.options;if(!c)return ns();const h=c.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(gB))){const{scroll:p}=this.root;p&&(ml(h.x,p.offset.x),ml(h.y,p.offset.y))}return h}removeElementScroll(c){const h=ns();if(xo(h,c),this.scroll?.wasRoot)return h;for(let f=0;f<this.path.length;f++){const p=this.path[f],{scroll:x,options:y}=p;p!==this.root&&x&&y.layoutScroll&&(x.wasRoot&&xo(h,c),ml(h.x,x.offset.x),ml(h.y,x.offset.y))}return h}applyTransform(c,h=!1,f){const p=f||ns();xo(p,c);for(let x=0;x<this.path.length;x++){const y=this.path[x];!h&&y.options.layoutScroll&&y.scroll&&y!==y.root&&(ml(p.x,-y.scroll.offset.x),ml(p.y,-y.scroll.offset.y)),Ud(y.latestValues)&&hv(p,y.latestValues,y.layout?.layoutBox)}return Ud(this.latestValues)&&hv(p,this.latestValues,this.layout?.layoutBox),p}removeTransform(c){const h=ns();xo(h,c);for(let f=0;f<this.path.length;f++){const p=this.path[f];if(!Ud(p.latestValues))continue;let x;p.instance&&(sM(p.latestValues)&&p.updateSnapshot(),x=ns(),xo(x,p.measurePageBox())),vA(h,p.latestValues,p.snapshot?.layoutBox,x)}return Ud(this.latestValues)&&vA(h,this.latestValues),h}setTargetDelta(c){this.targetDelta=c,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(c){this.options={...this.options,...c,crossfade:c.crossfade!==void 0?c.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Is.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(c=!1){const h=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=h.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=h.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=h.isSharedProjectionDirty);const f=!!this.resumingFrom||this!==h;if(!(c||f&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:x,layoutId:y}=this.options;if(!this.layout||!(x||y))return;this.resolvedRelativeTargetAt=Is.timestamp;const v=this.getClosestProjectingParent();v&&this.linkedParentVersion!==v.layoutVersion&&!v.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&v&&v.layout?this.createRelativeTarget(v,this.layout.layoutBox,v.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ns(),this.targetWithTransforms=ns()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Bz(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):xo(this.target,this.layout.layoutBox),zN(this.target,this.targetDelta)):xo(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&v&&!!v.resumingFrom==!!this.resumingFrom&&!v.options.layoutScroll&&v.target&&this.animationProgress!==1?this.createRelativeTarget(v,this.target,v.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||sM(this.parent.latestValues)||ON(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(c,h,f){this.relativeParent=c,this.linkedParentVersion=c.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ns(),this.relativeTargetOrigin=ns(),Cv(this.relativeTargetOrigin,h,f,this.options.layoutAnchor||void 0),xo(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const c=this.getLead(),h=!!this.resumingFrom||this!==c;let f=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(f=!1),h&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(f=!1),this.resolvedRelativeTargetAt===Is.timestamp&&(f=!1),f)return;const{layout:p,layoutId:x}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(p||x))return;xo(this.layoutCorrected,this.layout.layoutBox);const y=this.treeScale.x,v=this.treeScale.y;fz(this.layoutCorrected,this.treeScale,this.path,h),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=ns());const{target:S}=c;if(!S){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(fA(this.prevProjectionDelta.x,this.projectionDelta.x),fA(this.prevProjectionDelta.y,this.projectionDelta.y)),vg(this.projectionDelta,this.layoutCorrected,S,this.latestValues),(this.treeScale.x!==y||this.treeScale.y!==v||!wA(this.projectionDelta.x,this.prevProjectionDelta.x)||!wA(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",S))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(c=!0){if(this.options.visualElement?.scheduleRender(),c){const h=this.getStack();h&&h.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Hf(),this.projectionDelta=Hf(),this.projectionDeltaWithTransform=Hf()}setAnimationOrigin(c,h=!1){const f=this.snapshot,p=f?f.latestValues:{},x={...this.latestValues},y=Hf();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!h;const v=ns(),S=f?f.source:void 0,M=this.layout?this.layout.source:void 0,R=S!==M,A=this.getStack(),w=!A||A.members.length<=1,N=!!(R&&!w&&this.options.crossfade===!0&&!this.path.some(fB));this.animationProgress=0;let L;this.mixTargetDelta=I=>{const B=I/1e3;DA(y.x,c.x,B),DA(y.y,c.y,B),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Cv(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),hB(this.relativeTarget,this.relativeTargetOrigin,v,B),L&&Hz(this.relativeTarget,L)&&(this.isProjectionDirty=!1),L||(L=ns()),xo(L,this.relativeTarget)),R&&(this.animationValues=x,Wz(x,p,this.latestValues,B,N,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=B},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(c){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Cu(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ni.update(()=>{pv.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ru(0)),this.motionValue.jump(0,!1),this.currentAnimation=tD(this.motionValue,[0,1e3],{...c,velocity:0,isSync:!0,onUpdate:h=>{this.mixTargetDelta(h),c.onUpdate&&c.onUpdate(h)},onStop:()=>{},onComplete:()=>{c.onComplete&&c.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 c=this.getStack();c&&c.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Qz),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const c=this.getLead();let{targetWithTransforms:h,target:f,layout:p,latestValues:x}=c;if(!(!h||!f||!p)){if(this!==c&&this.layout&&p&&sD(this.options.animationType,this.layout.layoutBox,p.layoutBox)){f=this.target||ns();const y=xa(this.layout.layoutBox.x);f.x.min=c.target.x.min,f.x.max=f.x.min+y;const v=xa(this.layout.layoutBox.y);f.y.min=c.target.y.min,f.y.max=f.y.min+v}xo(h,f),hv(h,x),vg(this.projectionDeltaWithTransform,this.layoutCorrected,h,x)}}registerSharedNode(c,h){this.sharedNodes.has(c)||this.sharedNodes.set(c,new $z),this.sharedNodes.get(c).add(h);const p=h.options.initialPromotionConfig;h.promote({transition:p?p.transition:void 0,preserveFollowOpacity:p&&p.shouldPreserveFollowOpacity?p.shouldPreserveFollowOpacity(h):void 0})}isLead(){const c=this.getStack();return c?c.lead===this:!0}getLead(){const{layoutId:c}=this.options;return c?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:c}=this.options;return c?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:c}=this.options;if(c)return this.root.sharedNodes.get(c)}promote({needsReset:c,transition:h,preserveFollowOpacity:f}={}){const p=this.getStack();p&&p.promote(this,f),c&&(this.projectionDelta=void 0,this.needsReset=!0),h&&this.setOptions({transition:h})}relegate(){const c=this.getStack();return c?c.relegate(this):!1}resetSkewAndRotation(){const{visualElement:c}=this.options;if(!c)return;let h=!1;const{latestValues:f}=c;if((f.z||f.rotate||f.rotateX||f.rotateY||f.rotateZ||f.skewX||f.skewY)&&(h=!0),!h)return;const p={};f.z&&__("z",c,p,this.animationValues);for(let x=0;x<b_.length;x++)__(`rotate${b_[x]}`,c,p,this.animationValues),__(`skew${b_[x]}`,c,p,this.animationValues);c.render();for(const x in p)c.setStaticValue(x,p[x]),this.animationValues&&(this.animationValues[x]=p[x]);c.scheduleRender()}applyProjectionStyles(c,h){if(!this.instance||this.isSVG)return;if(!this.isVisible){c.visibility="hidden";return}const f=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,c.visibility="",c.opacity="",c.pointerEvents=fv(h?.pointerEvents)||"",c.transform=f?f(this.latestValues,""):"none";return}const p=this.getLead();if(!this.projectionDelta||!this.layout||!p.target){this.options.layoutId&&(c.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,c.pointerEvents=fv(h?.pointerEvents)||""),this.hasProjected&&!Ud(this.latestValues)&&(c.transform=f?f({},""):"none",this.hasProjected=!1);return}c.visibility="";const x=p.animationValues||p.latestValues;this.applyTransformsToTarget();let y=Gz(this.projectionDeltaWithTransform,this.treeScale,x);f&&(y=f(x,y)),c.transform=y;const{x:v,y:S}=this.projectionDelta;c.transformOrigin=`${v.origin*100}% ${S.origin*100}% 0`,p.animationValues?c.opacity=p===this?x.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:x.opacityExit:c.opacity=p===this?x.opacity!==void 0?x.opacity:"":x.opacityExit!==void 0?x.opacityExit:0;for(const M in rM){if(x[M]===void 0)continue;const{correct:R,applyTo:A,isCSSVariable:w}=rM[M],N=y==="none"?x[M]:R(x[M],p);if(A){const L=A.length;for(let I=0;I<L;I++)c[A[I]]=N}else w?this.options.visualElement.renderState.vars[M]=N:c[M]=N}this.options.layoutId&&(c.pointerEvents=p===this?fv(h?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(c=>c.currentAnimation?.stop()),this.root.nodes.forEach(CA),this.root.sharedNodes.clear()}}}function eB(n){n.updateLayout()}function tB(n){const e=n.resumeFrom?.snapshot||n.snapshot;if(n.isLead()&&n.layout&&e&&n.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:i}=n.layout,{animationType:s}=n.options,o=e.source!==n.layout.source;if(s==="size")pl(x=>{const y=o?e.measuredBox[x]:e.layoutBox[x],v=xa(y);y.min=t[x].min,y.max=y.min+v});else if(s==="x"||s==="y"){const x=s==="x"?"y":"x";oM(o?e.measuredBox[x]:e.layoutBox[x],t[x])}else sD(s,e.layoutBox,t)&&pl(x=>{const y=o?e.measuredBox[x]:e.layoutBox[x],v=xa(t[x]);y.max=y.min+v,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[x].max=n.relativeTarget[x].min+v)});const c=Hf();vg(c,t,e.layoutBox);const h=Hf();o?vg(h,n.applyTransform(i,!0),e.measuredBox):vg(h,t,e.layoutBox);const f=!$N(c);let p=!1;if(!n.resumeFrom){const x=n.getClosestProjectingParent();if(x&&!x.resumeFrom){const{snapshot:y,layout:v}=x;if(y&&v){const S=n.options.layoutAnchor||void 0,M=ns();Cv(M,e.layoutBox,y.layoutBox,S);const R=ns();Cv(R,t,v.layoutBox,S),QN(M,R)||(p=!0),x.options.layoutRoot&&(n.relativeTarget=R,n.relativeTargetOrigin=M,n.relativeParent=x)}}}n.notifyListeners("didUpdate",{layout:t,snapshot:e,delta:h,layoutDelta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:p})}else if(n.isLead()){const{onExitComplete:t}=n.options;t&&t()}n.options.transition=void 0}function nB(n){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 iB(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function sB(n){n.clearSnapshot()}function CA(n){n.clearMeasurements()}function aB(n){n.isLayoutDirty=!0,n.updateLayout()}function RA(n){n.isLayoutDirty=!1}function rB(n){n.isAnimationBlocked&&n.layout&&!n.isLayoutDirty&&(n.snapshot=n.layout,n.isLayoutDirty=!0)}function oB(n){const{visualElement:e}=n.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),n.resetTransform()}function NA(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function lB(n){n.resolveTargetDelta()}function cB(n){n.calcProjection()}function uB(n){n.resetSkewAndRotation()}function dB(n){n.removeLeadSnapshot()}function DA(n,e,t){n.translate=li(e.translate,0,t),n.scale=li(e.scale,1,t),n.origin=e.origin,n.originPoint=e.originPoint}function LA(n,e,t,i){n.min=li(e.min,t.min,i),n.max=li(e.max,t.max,i)}function hB(n,e,t,i){LA(n.x,e.x,t.x,i),LA(n.y,e.y,t.y,i)}function fB(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const pB={duration:.45,ease:[.4,0,.1,1]},IA=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),PA=IA("applewebkit/")&&!IA("chrome/")?Math.round:Gr;function UA(n){n.min=PA(n.min),n.max=PA(n.max)}function mB(n){UA(n.x),UA(n.y)}function sD(n,e,t){return n==="position"||n==="preserve-aspect"&&!zz(MA(e),MA(t),.2)}function gB(n){return n!==n.root&&n.scroll?.wasRoot}const xB=iD({attachResizeListener:(n,e)=>Fg(n,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),S_={current:void 0},aD=iD({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!S_.current){const n=new xB({});n.mount(window),n.setOptions({layoutScroll:!0}),S_.current=n}return S_.current},resetTransform:(n,e)=>{n.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),Sw=K.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});function yB(n=!0){const e=K.useContext(ZM);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:i,register:s}=e,o=K.useId();K.useEffect(()=>{if(n)return s(o)},[n]);const c=K.useCallback(()=>n&&i&&i(o),[o,i,n]);return!t&&i?[!1,c]:[!0]}const rD=K.createContext({strict:!1}),OA={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"]};let zA=!1;function vB(){if(zA)return;const n={};for(const e in OA)n[e]={isEnabled:t=>OA[e].some(i=>!!t[i])};LN(n),zA=!0}function oD(){return vB(),uz()}function bB(n){const e=oD();for(const t in n)e[t]={...e[t],...n[t]};LN(e)}const _B=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Rv(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||_B.has(n)}let lD=n=>!Rv(n);function SB(n){typeof n=="function"&&(lD=e=>e.startsWith("on")?!Rv(e):n(e))}try{SB(require("@emotion/is-prop-valid").default)}catch{}function MB(n,e,t){const i={};for(const s in n)s==="values"&&typeof n.values=="object"||ds(n[s])||(lD(s)||t===!0&&Rv(s)||!e&&!Rv(s)||n.draggable&&s.startsWith("onDrag"))&&(i[s]=n[s]);return i}const U1=K.createContext({});function wB(n,e){if(P1(n)){const{initial:t,animate:i}=n;return{initial:t===!1||Vg(t)?t:void 0,animate:Vg(i)?i:void 0}}return n.inherit!==!1?e:{}}function TB(n){const{initial:e,animate:t}=wB(n,K.useContext(U1));return K.useMemo(()=>({initial:e,animate:t}),[BA(e),BA(t)])}function BA(n){return Array.isArray(n)?n.join(" "):n}const Mw=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function cD(n,e,t){for(const i in e)!ds(e[i])&&!FN(i,t)&&(n[i]=e[i])}function EB({transformTemplate:n},e){return K.useMemo(()=>{const t=Mw();return bw(t,e,n),Object.assign({},t.vars,t.style)},[e])}function AB(n,e){const t=n.style||{},i={};return cD(i,t,n),Object.assign(i,EB(n,e)),i}function CB(n,e){const t={},i=AB(n,e);return n.drag&&n.dragListener!==!1&&(t.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(t.tabIndex=0),t.style=i,t}const uD=()=>({...Mw(),attrs:{}});function RB(n,e,t,i){const s=K.useMemo(()=>{const o=uD();return HN(o,e,jN(i),n.transformTemplate,n.style),{...o.attrs,style:{...o.style}}},[e]);if(n.style){const o={};cD(o,n.style,n),s.style={...o,...s.style}}return s}const NB=["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 ww(n){return typeof n!="string"||n.includes("-")?!1:!!(NB.indexOf(n)>-1||/[A-Z]/u.test(n))}function DB(n,e,t,{latestValues:i},s,o=!1,c){const f=(c??ww(n)?RB:CB)(e,i,s,n),p=MB(e,typeof n=="string",o),x=n!==K.Fragment?{...p,...f,ref:t}:{},{children:y}=e,v=K.useMemo(()=>ds(y)?y.get():y,[y]);return K.createElement(n,{...x,children:v})}function LB({scrapeMotionValuesFromProps:n,createRenderState:e},t,i,s){return{latestValues:IB(t,i,s,n),renderState:e()}}function IB(n,e,t,i){const s={},o=i(n,{});for(const v in o)s[v]=fv(o[v]);let{initial:c,animate:h}=n;const f=P1(n),p=NN(n);e&&p&&!f&&n.inherit!==!1&&(c===void 0&&(c=e.initial),h===void 0&&(h=e.animate));let x=t?t.initial===!1:!1;x=x||c===!1;const y=x?h:c;if(y&&typeof y!="boolean"&&!I1(y)){const v=Array.isArray(y)?y:[y];for(let S=0;S<v.length;S++){const M=dw(n,v[S]);if(M){const{transitionEnd:R,transition:A,...w}=M;for(const N in w){let L=w[N];if(Array.isArray(L)){const I=x?L.length-1:0;L=L[I]}L!==null&&(s[N]=L)}for(const N in R)s[N]=R[N]}}}return s}const dD=n=>(e,t)=>{const i=K.useContext(U1),s=K.useContext(ZM),o=()=>LB(n,e,i,s);return t?o():YM(o)},PB=dD({scrapeMotionValuesFromProps:_w,createRenderState:Mw}),UB=dD({scrapeMotionValuesFromProps:WN,createRenderState:uD}),OB=Symbol.for("motionComponentSymbol");function zB(n,e,t){const i=K.useRef(t);K.useInsertionEffect(()=>{i.current=t});const s=K.useRef(null);return K.useCallback(o=>{o&&n.onMount?.(o);const c=i.current;if(typeof c=="function")if(o){const h=c(o);typeof h=="function"&&(s.current=h)}else s.current?(s.current(),s.current=null):c(o);else c&&(c.current=o);e&&(o?e.mount(o):e.unmount())},[e])}const hD=K.createContext({});function Vf(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function BB(n,e,t,i,s,o){const{visualElement:c}=K.useContext(U1),h=K.useContext(rD),f=K.useContext(ZM),p=K.useContext(Sw),x=p.reducedMotion,y=p.skipAnimations,v=K.useRef(null),S=K.useRef(!1);i=i||h.renderer,!v.current&&i&&(v.current=i(n,{visualState:e,parent:c,props:t,presenceContext:f,blockInitialAnimation:f?f.initial===!1:!1,reducedMotionConfig:x,skipAnimations:y,isSVG:o}),S.current&&v.current&&(v.current.manuallyAnimateOnMount=!0));const M=v.current,R=K.useContext(hD);M&&!M.projection&&s&&(M.type==="html"||M.type==="svg")&&VB(v.current,t,s,R);const A=K.useRef(!1);K.useInsertionEffect(()=>{M&&A.current&&M.update(t,f)});const w=t[xN],N=K.useRef(!!w&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(w)&&window.MotionHasOptimisedAnimation?.(w));return TR(()=>{S.current=!0,M&&(A.current=!0,window.MotionIsMounted=!0,M.updateFeatures(),M.scheduleRenderMicrotask(),N.current&&M.animationState&&M.animationState.animateChanges())}),K.useEffect(()=>{M&&(!N.current&&M.animationState&&M.animationState.animateChanges(),N.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(w)}),N.current=!1),M.enteringChildren=void 0)}),M}function VB(n,e,t,i){const{layoutId:s,layout:o,drag:c,dragConstraints:h,layoutScroll:f,layoutRoot:p,layoutAnchor:x,layoutCrossfade:y}=e;n.projection=new t(n.latestValues,e["data-framer-portal-id"]?void 0:fD(n.parent)),n.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!c||h&&Vf(h),visualElement:n,animationType:typeof o=="string"?o:"both",initialPromotionConfig:i,crossfade:y,layoutScroll:f,layoutRoot:p,layoutAnchor:x})}function fD(n){if(n)return n.options.allowProjection!==!1?n.projection:fD(n.parent)}function M_(n,{forwardMotionProps:e=!1,type:t}={},i,s){i&&bB(i);const o=t?t==="svg":ww(n),c=o?UB:PB;function h(p,x){let y;const v={...K.useContext(Sw),...p,layoutId:FB(p)},{isStatic:S}=v,M=TB(p),R=c(p,S);if(!S&&typeof window<"u"){kB();const A=HB(v);y=A.MeasureLayout,M.visualElement=BB(n,R,v,s,A.ProjectionNode,o)}return E.jsxs(U1.Provider,{value:M,children:[y&&M.visualElement?E.jsx(y,{visualElement:M.visualElement,...v}):null,DB(n,p,zB(R,M.visualElement,x),R,S,e,o)]})}h.displayName=`motion.${typeof n=="string"?n:`create(${n.displayName??n.name??""})`}`;const f=K.forwardRef(h);return f[OB]=n,f}function FB({layoutId:n}){const e=K.useContext(wR).id;return e&&n!==void 0?e+"-"+n:n}function kB(n,e){K.useContext(rD).strict}function HB(n){const e=oD(),{drag:t,layout:i}=e;if(!t&&!i)return{};const s={...t,...i};return{MeasureLayout:t?.isEnabled(n)||i?.isEnabled(n)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function GB(n,e){if(typeof Proxy>"u")return M_;const t=new Map,i=(o,c)=>M_(o,c,n,e),s=(o,c)=>i(o,c);return new Proxy(s,{get:(o,c)=>c==="create"?i:(t.has(c)||t.set(c,M_(c,void 0,n,e)),t.get(c))})}const jB=(n,e)=>e.isSVG??ww(n)?new XN(e):new kN(e,{allowProjection:n!==K.Fragment});class WB extends Pu{constructor(e){super(e),e.animationState||(e.animationState=Dz(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();I1(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let XB=0;class qB extends Pu{constructor(){super(...arguments),this.id=XB++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;if(e&&i===!1){if(this.isExitComplete){const{initial:o,custom:c}=this.node.getProps();if(typeof o=="string"){const h=Xd(this.node,o,c);if(h){const{transition:f,transitionEnd:p,...x}=h;for(const y in x)this.node.getValue(y)?.jump(x[y])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!e);t&&!e&&s.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const YB={animation:{Feature:WB},exit:{Feature:qB}};function h0(n){return{point:{x:n.pageX,y:n.pageY}}}const ZB=n=>e=>xw(e)&&n(e,h0(e));function bg(n,e,t,i){return Fg(n,e,ZB(t),i)}const pD=({current:n})=>n?n.ownerDocument.defaultView:null,VA=(n,e)=>Math.abs(n-e);function KB(n,e){const t=VA(n.x,e.x),i=VA(n.y,e.y);return Math.sqrt(t**2+i**2)}const FA=new Set(["auto","scroll"]);class mD{constructor(e,t,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:o=!1,distanceThreshold:c=3,element:h}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=S=>{this.handleScroll(S.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=oy(this.lastRawMoveEventInfo,this.transformPagePoint));const S=w_(this.lastMoveEventInfo,this.history),M=this.startEvent!==null,R=KB(S.offset,{x:0,y:0})>=this.distanceThreshold;if(!M&&!R)return;const{point:A}=S,{timestamp:w}=Is;this.history.push({...A,timestamp:w});const{onStart:N,onMove:L}=this.handlers;M||(N&&N(this.lastMoveEvent,S),this.startEvent=this.lastMoveEvent),L&&L(this.lastMoveEvent,S)},this.handlePointerMove=(S,M)=>{this.lastMoveEvent=S,this.lastRawMoveEventInfo=M,this.lastMoveEventInfo=oy(M,this.transformPagePoint),ni.update(this.updatePoint,!0)},this.handlePointerUp=(S,M)=>{this.end();const{onEnd:R,onSessionEnd:A,resumeAnimation:w}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const N=w_(S.type==="pointercancel"?this.lastMoveEventInfo:oy(M,this.transformPagePoint),this.history);this.startEvent&&R&&R(S,N),A&&A(S,N)},!xw(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=i,this.distanceThreshold=c,this.contextWindow=s||window;const f=h0(e),p=oy(f,this.transformPagePoint),{point:x}=p,{timestamp:y}=Is;this.history=[{...x,timestamp:y}];const{onSessionStart:v}=t;v&&v(e,w_(p,this.history)),this.removeListeners=c0(bg(this.contextWindow,"pointermove",this.handlePointerMove),bg(this.contextWindow,"pointerup",this.handlePointerUp),bg(this.contextWindow,"pointercancel",this.handlePointerUp)),h&&this.startScrollTracking(h)}startScrollTracking(e){let t=e.parentElement;for(;t;){const i=getComputedStyle(t);(FA.has(i.overflowX)||FA.has(i.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const t=this.scrollPositions.get(e);if(!t)return;const i=e===window,s=i?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},o={x:s.x-t.x,y:s.y-t.y};o.x===0&&o.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(e,s),ni.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Cu(this.updatePoint)}}function oy(n,e){return e?{point:e(n.point)}:n}function kA(n,e){return{x:n.x-e.x,y:n.y-e.y}}function w_({point:n},e){return{point:n,delta:kA(n,gD(e)),offset:kA(n,$B(e)),velocity:QB(e,.1)}}function $B(n){return n[0]}function gD(n){return n[n.length-1]}function QB(n,e){if(n.length<2)return{x:0,y:0};let t=n.length-1,i=null;const s=gD(n);for(;t>=0&&(i=n[t],!(s.timestamp-i.timestamp>Ya(e)));)t--;if(!i)return{x:0,y:0};i===n[0]&&n.length>2&&s.timestamp-i.timestamp>Ya(e)*2&&(i=n[1]);const o=kr(s.timestamp-i.timestamp);if(o===0)return{x:0,y:0};const c={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function JB(n,{min:e,max:t},i){return e!==void 0&&n<e?n=i?li(e,n,i.min):Math.max(n,e):t!==void 0&&n>t&&(n=i?li(t,n,i.max):Math.min(n,t)),n}function HA(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 eV(n,{top:e,left:t,bottom:i,right:s}){return{x:HA(n.x,t,s),y:HA(n.y,e,i)}}function GA(n,e){let t=e.min-n.min,i=e.max-n.max;return e.max-e.min<n.max-n.min&&([t,i]=[i,t]),{min:t,max:i}}function tV(n,e){return{x:GA(n.x,e.x),y:GA(n.y,e.y)}}function nV(n,e){let t=.5;const i=xa(n),s=xa(e);return s>i?t=Kf(e.min,e.max-i,n.min):i>s&&(t=Kf(n.min,n.max-s,e.min)),_l(0,1,t)}function iV(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 lM=.35;function sV(n=lM){return n===!1?n=0:n===!0&&(n=lM),{x:jA(n,"left","right"),y:jA(n,"top","bottom")}}function jA(n,e,t){return{min:WA(n,e),max:WA(n,t)}}function WA(n,e){return typeof n=="number"?n:n[e]||0}const aV=new WeakMap;class rV{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ns(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:i}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=y=>{t&&this.snapToCursor(h0(y).point),this.stopAnimation()},c=(y,v)=>{const{drag:S,dragPropagation:M,onDragStart:R}=this.getProps();if(S&&!M&&(this.openDragLock&&this.openDragLock(),this.openDragLock=H2(S),!this.openDragLock))return;this.latestPointerEvent=y,this.latestPanInfo=v,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),pl(w=>{let N=this.getAxisMotionValue(w).get()||0;if(vl.test(N)){const{projection:L}=this.visualElement;if(L&&L.layout){const I=L.layout.layoutBox[w];I&&(N=xa(I)*(parseFloat(N)/100))}}this.originPoint[w]=N}),R&&ni.update(()=>R(y,v),!1,!0),JS(this.visualElement,"transform");const{animationState:A}=this.visualElement;A&&A.setActive("whileDrag",!0)},h=(y,v)=>{this.latestPointerEvent=y,this.latestPanInfo=v;const{dragPropagation:S,dragDirectionLock:M,onDirectionLock:R,onDrag:A}=this.getProps();if(!S&&!this.openDragLock)return;const{offset:w}=v;if(M&&this.currentDirection===null){this.currentDirection=lV(w),this.currentDirection!==null&&R&&R(this.currentDirection);return}this.updateAxis("x",v.point,w),this.updateAxis("y",v.point,w),this.visualElement.render(),A&&ni.update(()=>A(y,v),!1,!0)},f=(y,v)=>{this.latestPointerEvent=y,this.latestPanInfo=v,this.stop(y,v),this.latestPointerEvent=null,this.latestPanInfo=null},p=()=>{const{dragSnapToOrigin:y}=this.getProps();(y||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:x}=this.getProps();this.panSession=new mD(e,{onSessionStart:o,onStart:c,onMove:h,onSessionEnd:f,resumeAnimation:p},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:x,distanceThreshold:i,contextWindow:pD(this.visualElement),element:this.visualElement.current})}stop(e,t){const i=e||this.latestPointerEvent,s=t||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!i)return;const{velocity:c}=s;this.startAnimation(c);const{onDragEnd:h}=this.getProps();h&&ni.postRender(()=>h(i,s))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,i){const{drag:s}=this.getProps();if(!i||!ly(e,s,this.currentDirection))return;const o=this.getAxisMotionValue(e);let c=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(c=JB(c,this.constraints[e],this.elastic[e])),o.set(c)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;e&&Vf(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&i?this.constraints=eV(i.layoutBox,e):this.constraints=!1,this.elastic=sV(t),s!==this.constraints&&!Vf(e)&&i&&this.constraints&&!this.hasMutatedConstraints&&pl(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=iV(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Vf(e))return!1;const i=e.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=pz(i,s.root,this.visualElement.getTransformPagePoint());let c=tV(s.layout.layoutBox,o);if(t){const h=t(dz(c));this.hasMutatedConstraints=!!h,h&&(c=UN(h))}return c}startAnimation(e){const{drag:t,dragMomentum:i,dragElastic:s,dragTransition:o,dragSnapToOrigin:c,onDragTransitionEnd:h}=this.getProps(),f=this.constraints||{},p=pl(x=>{if(!ly(x,t,this.currentDirection))return;let y=f&&f[x]||{};(c===!0||c===x)&&(y={min:0,max:0});const v=s?200:1e6,S=s?40:1e7,M={type:"inertia",velocity:i?e[x]:0,bounceStiffness:v,bounceDamping:S,timeConstant:750,restDelta:1,restSpeed:10,...o,...y};return this.startAxisValueAnimation(x,M)});return Promise.all(p).then(h)}startAxisValueAnimation(e,t){const i=this.getAxisMotionValue(e);return JS(this.visualElement,e),i.start(uw(e,i,0,t,this.visualElement,!1))}stopAnimation(){pl(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps(),s=i[t];return s||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){pl(t=>{const{drag:i}=this.getProps();if(!ly(t,i,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(t);if(s&&s.layout){const{min:c,max:h}=s.layout.layoutBox[t],f=o.get()||0;o.set(e[t]-li(c,h,.5)+f)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:i}=this.visualElement;if(!Vf(t)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};pl(c=>{const h=this.getAxisMotionValue(c);if(h&&this.constraints!==!1){const f=h.get();s[c]=nV({min:f,max:f},this.constraints[c])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),pl(c=>{if(!ly(c,e,null))return;const h=this.getAxisMotionValue(c),{min:f,max:p}=this.constraints[c];h.set(li(f,p,s[c]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;aV.set(this.visualElement,this);const e=this.visualElement.current,t=bg(e,"pointerdown",p=>{const{drag:x,dragListener:y=!0}=this.getProps(),v=p.target,S=v!==e&&Y2(v);x&&y&&!S&&this.start(p)});let i;const s=()=>{const{dragConstraints:p}=this.getProps();Vf(p)&&p.current&&(this.constraints=this.resolveRefConstraints(),i||(i=oV(e,p.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,c=o.addEventListener("measure",s);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),ni.read(s);const h=Fg(window,"resize",()=>this.scalePositionWithinConstraints()),f=o.addEventListener("didUpdate",(({delta:p,hasLayoutChanged:x})=>{this.isDragging&&x&&(pl(y=>{const v=this.getAxisMotionValue(y);v&&(this.originPoint[y]+=p[y].translate,v.set(v.get()+p[y].translate))}),this.visualElement.render())}));return()=>{h(),t(),c(),f&&f(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:c=lM,dragMomentum:h=!0}=e;return{...e,drag:t,dragDirectionLock:i,dragPropagation:s,dragConstraints:o,dragElastic:c,dragMomentum:h}}}function XA(n){let e=!0;return()=>{if(e){e=!1;return}n()}}function oV(n,e,t){const i=tA(n,XA(t)),s=tA(e,XA(t));return()=>{i(),s()}}function ly(n,e,t){return(e===!0||e===n)&&(t===null||t===n)}function lV(n,e=10){let t=null;return Math.abs(n.y)>e?t="y":Math.abs(n.x)>e&&(t="x"),t}class cV extends Pu{constructor(e){super(e),this.removeGroupControls=Gr,this.removeListeners=Gr,this.controls=new rV(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Gr}update(){const{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const T_=n=>(e,t)=>{n&&ni.update(()=>n(e,t),!1,!0)};class uV extends Pu{constructor(){super(...arguments),this.removePointerDownListener=Gr}onPointerDown(e){this.session=new mD(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:pD(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:T_(e),onStart:T_(t),onMove:T_(i),onEnd:(o,c)=>{delete this.session,s&&ni.postRender(()=>s(o,c))}}}mount(){this.removePointerDownListener=bg(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let E_=!1;class dV extends K.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:i,layoutId:s}=this.props,{projection:o}=e;o&&(t.group&&t.group.add(o),i&&i.register&&s&&i.register(o),E_&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),pv.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:i,drag:s,isPresent:o}=this.props,{projection:c}=i;return c&&(c.isPresent=o,e.layoutDependency!==t&&c.setOptions({...c.options,layoutDependency:t}),E_=!0,s||e.layoutDependency!==t||t===void 0||e.isPresent!==o?c.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?c.promote():c.relegate()||ni.postRender(()=>{const h=c.getStack();(!h||!h.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:t}=this.props,{projection:i}=e;i&&(i.options.layoutAnchor=t,i.root.didUpdate(),gw.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:i}=this.props,{projection:s}=e;E_=!0,s&&(s.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function xD(n){const[e,t]=yB(),i=K.useContext(wR);return E.jsx(dV,{...n,layoutGroup:i,switchLayoutGroup:K.useContext(hD),isPresent:e,safeToRemove:t})}const hV={pan:{Feature:uV},drag:{Feature:cV,ProjectionNode:aD,MeasureLayout:xD}};function qA(n,e,t){const{props:i}=n;n.animationState&&i.whileHover&&n.animationState.setActive("whileHover",t==="Start");const s="onHover"+t,o=i[s];o&&ni.postRender(()=>o(e,h0(e)))}class fV extends Pu{mount(){const{current:e}=this.node;e&&(this.unmount=j2(e,(t,i)=>(qA(this.node,i,"Start"),s=>qA(this.node,s,"End"))))}unmount(){}}class pV extends Pu{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=c0(Fg(this.node.current,"focus",()=>this.onFocus()),Fg(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function YA(n,e,t){const{props:i}=n;if(n.current instanceof HTMLButtonElement&&n.current.disabled)return;n.animationState&&i.whileTap&&n.animationState.setActive("whileTap",t==="Start");const s="onTap"+(t==="End"?"":t),o=i[s];o&&ni.postRender(()=>o(e,h0(e)))}class mV extends Pu{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:i}=this.node.props;this.unmount=K2(e,(s,o)=>(YA(this.node,o,"Start"),(c,{success:h})=>YA(this.node,c,h?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:i?.tap===!1})}unmount(){}}const cM=new WeakMap,A_=new WeakMap,gV=n=>{const e=cM.get(n.target);e&&e(n)},xV=n=>
11{n.forEach(gV)};function yV({root:n,...e}){const t=n||document;A_.has(t)||A_.set(t,{});const i=A_.get(t),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(xV,{root:n,...e})),i[s]}function vV(n,e,t){const i=yV(e);return cM.set(n,t),i.observe(n),()=>{cM.delete(n),i.unobserve(n)}}const bV={some:0,all:1};class _V extends Pu{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:e={}}=this.node.getProps(),{root:t,margin:i,amount:s="some",once:o}=e,c={root:t?t.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:bV[s]},h=f=>{const{isIntersecting:p}=f;if(this.isInView===p||(this.isInView=p,o&&!p&&this.hasEnteredView))return;p&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",p);const{onViewportEnter:x,onViewportLeave:y}=this.node.getProps(),v=p?x:y;v&&v(f)};this.stopObserver=vV(this.node.current,c,h)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(SV(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function SV({viewport:n={}},{viewport:e={}}={}){return t=>n[t]!==e[t]}const MV={inView:{Feature:_V},tap:{Feature:mV},focus:{Feature:pV},hover:{Feature:fV}},wV={layout:{ProjectionNode:aD,MeasureLayout:xD}},TV={...YB,...MV,...hV,...wV},be=GB(TV,jB);function O1(n){const e=YM(()=>Ru(n)),{isStatic:t}=K.useContext(Sw);if(t){const[,i]=K.useState(n);K.useEffect(()=>e.on("change",i),[])}return e}function EV(n){n.values.forEach(e=>e.stop())}function uM(n,e){[...e].reverse().forEach(i=>{const s=n.getVariant(i);s&&hw(n,s),n.variantChildren&&n.variantChildren.forEach(o=>{uM(o,e)})})}function AV(n,e){if(Array.isArray(e))return uM(n,e);if(typeof e=="string")return uM(n,[e]);hw(n,e)}function CV(){const n=new Set,e={subscribe(t){return n.add(t),()=>{n.delete(t)}},start(t,i){const s=[];return n.forEach(o=>{s.push(vN(o,t,{transitionOverride:i}))}),Promise.all(s)},set(t){return n.forEach(i=>{AV(i,t)})},stop(){n.forEach(t=>{EV(t)})},mount(){return()=>{e.stop()}}};return e}function Tw(n){return typeof n=="object"&&!Array.isArray(n)}function yD(n,e,t,i){return n==null?[]:typeof n=="string"&&Tw(e)?D1(n,t,i):n instanceof NodeList?Array.from(n):Array.isArray(n)?n.filter(s=>s!=null):[n]}function RV(n,e,t){return n*(e+1)}function ZA(n,e,t,i){return typeof e=="number"?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,n+parseFloat(e)):e==="<"?t:e.startsWith("<")?Math.max(0,t+parseFloat(e.slice(1))):i.get(e)??n}function NV(n,e,t){for(let i=0;i<n.length;i++){const s=n[i];s.at>e&&s.at<t&&(Zf(n,s),i--)}}function DV(n,e,t,i,s,o){NV(n,s,o);for(let c=0;c<e.length;c++)n.push({value:e[c],at:li(s,o,i[c]),easing:kR(t,c)})}function LV(n,e){for(let t=0;t<n.length;t++)n[t]=n[t]/(e+1)}function IV(n,e){return n.at===e.at?n.value===null?1:e.value===null?-1:0:n.at-e.at}const PV="easeInOut";function UV(n,{defaultTransition:e={},...t}={},i,s){const o=e.duration||.3,c=new Map,h=new Map,f={},p=new Map;let x=0,y=0,v=0;for(let S=0;S<n.length;S++){const M=n[S];if(typeof M=="string"){p.set(M,y);continue}else if(!Array.isArray(M)){p.set(M.name,ZA(y,M.at,x,p));continue}let[R,A,w={}]=M;w.at!==void 0&&(y=ZA(y,w.at,x,p));let N=0;const L=(I,B,O,F=0,P=0)=>{const V=OV(I),{delay:j=0,times:W=nN(V),type:ee=e.type||"keyframes",repeat:ie,repeatType:ue,repeatDelay:Q=0,...Y}=B;let{ease:$=e.ease||"easeOut",duration:le}=B;const ge=typeof j=="function"?j(F,P):j,Ce=V.length,q=lw(ee)?ee:s?.[ee||"keyframes"];if(Ce<=2&&q){let We=100;if(Ce===2&&VV(V)){const Ve=V[1]-V[0];We=Math.abs(Ve)}const pe={...e,...Y};le!==void 0&&(pe.duration=Ya(le));const Be=JR(pe,We,q);$=Be.ease,le=Be.duration}le??(le=o);const ae=y+ge;W.length===1&&W[0]===0&&(W[1]=1);const Ae=W.length-V.length;if(Ae>0&&tN(W,Ae),V.length===1&&V.unshift(null),ie){le=RV(le,ie);const We=[...V],pe=[...W];$=Array.isArray($)?[...$]:[$];const Be=[...$];for(let Ve=0;Ve<ie;Ve++){V.push(...We);for(let Ze=0;Ze<We.length;Ze++)W.push(pe[Ze]+(Ve+1)),$.push(Ze===0?"linear":kR(Be,Ze-1))}LV(W,ie)}const Ie=ae+le;
11DV(O,V,$,W,ae,Ie),N=Math.max(ge+le,N),v=Math.max(Ie,v)};if(ds(R)){const I=KA(R,h);L(A,w,$A("default",I))}else{const I=yD(R,A,i,f),B=I.length;for(let O=0;O<B;O++){A=A,w=w;const F=I[O],P=KA(F,h);for(const V in A)L(A[V],zV(w,V),$A(V,P),O,B)}}x=y,y+=N}return h.forEach((S,M)=>{for(const R in S){const A=S[R];A.sort(IV);const w=[],N=[],L=[];for(let F=0;F<A.length;F++){const{at:P,value:V,easing:j}=A[F];w.push(V),N.push(Kf(0,v,P)),L.push(j||"easeOut")}N[0]!==0&&(N.unshift(0),w.unshift(w[0]),L.unshift(PV)),N[N.length-1]!==1&&(N.push(1),w.push(null)),c.has(M)||c.set(M,{keyframes:{},transition:{}});const I=c.get(M);I.keyframes[R]=w;const{type:B,...O}=e;I.transition[R]={...O,duration:v,ease:L,times:N,...t}}}),c}function KA(n,e){return!e.has(n)&&e.set(n,{}),e.get(n)}function $A(n,e){return e[n]||(e[n]=[]),e[n]}function OV(n){return Array.isArray(n)?n:[n]}function zV(n,e){return n&&n[e]?{...n,...n[e]}:{...n}}const BV=n=>typeof n=="number",VV=n=>n.every(BV);function FV(n){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},t=L1(n)&&!RN(n)?new XN(e):new kN(e);t.mount(n),Bg.set(n,t)}function kV(n){const e={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},t=new _z(e);t.mount(n),Bg.set(n,t)}function HV(n,e){return ds(n)||typeof n=="number"||typeof n=="string"&&!Tw(e)}function vD(n,e,t,i){const s=[];if(HV(n,e))s.push(tD(n,Tw(e)&&e.default||e,t&&(t.default||t)));else{if(n==null)return s;const o=yD(n,e,i),c=o.length;for(let h=0;h<c;h++){const f=o[h],p=f instanceof Element?FV:kV;Bg.has(f)||p(f);const x=Bg.get(f),y={...t};"delay"in y&&typeof y.delay=="function"&&(y.delay=y.delay(h,c)),s.push(...pw(x,{...e,transition:y},{}))}}return s}function GV(n,e,t){const i=[],s=n.map(c=>{if(Array.isArray(c)&&typeof c[0]=="function"){const h=c[0],f=Ru(0);return f.on("change",h),c.length===1?[f,[0,1]]:c.length===2?[f,[0,1],c[1]]:[f,c[1],c[2]]}return c});return UV(s,e,t,{spring:zg}).forEach(({keyframes:c,transition:h},f)=>{i.push(...vD(f,c,h))}),i}function jV(n){return Array.isArray(n)&&n.some(Array.isArray)}function WV(n={}){const{scope:e,reduceMotion:t}=n;function i(s,o,c){let h=[],f;if(jV(s)){const{onComplete:x,...y}=o||{};typeof x=="function"&&(f=x),h=GV(s,t!==void 0?{reduceMotion:t,...y}:y,e)}else{const{onComplete:x,...y}=c||{};typeof x=="function"&&(f=x),h=vD(s,o,t!==void 0?{reduceMotion:t,...y}:y,e)}const p=new h2(h);return f&&p.finished.then(f),e&&(e.animations.push(p),p.finished.then(()=>{Zf(e.animations,p)})),p}return i}const z1=WV();function XV(){const n=YM(CV);return TR(n.mount,[]),n}const qV=XV,YV={some:0,all:1};function ZV(n,e,{root:t,margin:i,amount:s="some"}={}){const o=D1(n),c=new WeakMap,h=p=>{p.forEach(x=>{const y=c.get(x.target);if(x.isIntersecting!==!!y)if(x.isIntersecting){const v=e(x.target,x);typeof v=="function"?c.set(x.target,v):f.unobserve(x.target)}else typeof y=="function"&&(y(x),c.delete(x.target))})},f=new IntersectionObserver(h,{root:t,rootMargin:i,threshold:typeof s=="number"?s:YV[s]});return o.forEach(p=>f.observe(p)),()=>f.disconnect()}function ih(n,{root:e,margin:t,amount:i,once:s=!1,initial:o=!1}={}){const[c,h]=K.useState(o);return K.useEffect(()=>{if(!n.current||s&&c)return;const f=()=>(h(!0),s?void 0:()=>h(!1)),p={root:e&&e.current||void 0,margin:t,amount:i};return ZV(n.current,f,p)},[e,n,t,s,i]),c}const B1="184",KV={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},$V={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},bD=0,dM=1,_D=2,QV=3,SD=0,Xf=1,_g=2,Fd=3,xc=0,va=1,gl=2,bl=0,qd=1,hM=2,fM=3,pM=4,MD=5,JV=6,bu=100,wD=101,TD=102,ED=103,AD=104,CD=200,RD=201,ND=202,DD=203,Nv=204,Dv=205,LD=206,ID=207,PD=208,UD=209,OD=210,zD=211,BD=212,VD=213,FD=214,Lv=0,Iv=1,Pv=2,Kd=3,Uv=4,Ov=5,zv=6,Bv=7,f0=0,kD=1,HD=2,jr=0,Ew=1,Aw=2,Cw=3,V1=4,Rw=5,Nw=6,Dw=7,mM="attached",GD="detached",F1=300,Sl=301,Nu=302,Sg=303,Mg=304,dp=306,kg=1e3,Xa=1001,Hg=1002,qi=1003,Lw=1004,eF=1004,Gf=1005,tF=1005,yi=1006,wg=1007,nF=1007,xl=1008,iF=1008,pa=1009,Iw=1010,Pw=1011,Qf=1012,k1=1013,Xr=1014,ya=1015,Ml=1016,H1=1017,G1=1018,Jf=1020,Uw=35902,Ow=35899,zw=1021,Bw=1022,Qs=1023,wl=1026,Mu=1027,j1=1028,p0=1029,Du=1030,W1=1031,sF=1032,X1=1033,Tg=33776,Eg=33777,Ag=33778,Cg=33779,Vv=35840,Fv=35841,kv=35842,Hv=35843,Gv=36196,jv=37492,Wv=37496,Xv=37488,qv=37489,Gg=37490,Yv=3749
111,Zv=37808,Kv=37809,$v=37810,Qv=37811,Jv=37812,e1=37813,t1=37814,n1=37815,i1=37816,s1=37817,a1=37818,r1=37819,o1=37820,l1=37821,c1=36492,u1=36494,d1=36495,h1=36283,f1=36284,jg=36285,p1=36286,jD=2200,WD=2201,XD=2202,Wg=2300,m1=2301,mv=2302,gM=2303,kd=2400,Hd=2401,Xg=2402,q1=2500,Vw=2501,aF=0,rF=1,oF=2,qD=3200,lF=3201,cF=3202,uF=3203,yc=0,YD=1,dc="",$s="srgb",ep="srgb-linear",qg="linear",Wn="srgb",dF="",hF="rg",fF="ga",pF=0,Od=7680,mF=7681,gF=7682,xF=7683,yF=34055,vF=34056,bF=5386,_F=512,SF=513,MF=514,wF=515,TF=516,EF=517,AF=518,xM=519,ZD=512,KD=513,$D=514,Y1=515,QD=516,JD=517,Z1=518,eL=519,Yg=35044,CF=35048,RF=35040,NF=35045,DF=35049,LF=35041,IF=35046,PF=35050,UF=35042,OF="100",yM="300 es",lr=2e3,$d=2001,zF={COMPUTE:"compute",RENDER:"render"},BF={PERSPECTIVE:"perspective",LINEAR:"linear",FLAT:"flat"},VF={NORMAL:"normal",CENTROID:"centroid",SAMPLE:"sample",FIRST:"first",EITHER:"either"},FF={TEXTURE_COMPARE:"depthTextureCompare"};function kF(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}const HF={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function jf(n,e){return new HF[n](e)}function tL(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function Zg(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function nL(){const n=Zg("canvas");return n.style.display="block",n}const QA={};let Lu=null;function GF(n){Lu=n}function jF(){return Lu}function Kg(...n){const e="THREE."+n.shift();Lu?Lu("log",e,...n):console.log(e,...n)}function iL(n){const e=n[0];if(typeof e=="string"&&e.startsWith("TSL:")){const t=n[1];t&&t.isStackTrace?n[0]+=" "+t.getLocation():n[1]='Stack trace not available. Enable "THREE.Node.captureStackTrace" to capture stack traces.'}return n}function ct(...n){n=iL(n);const e="THREE."+n.shift();if(Lu)Lu("warn",e,...n);else{const t=n[0];t&&t.isStackTrace?console.warn(t.getError(e)):console.warn(e,...n)}}function Et(...n){n=iL(n);const e="THREE."+n.shift();if(Lu)Lu("error",e,...n);else{const t=n[0];t&&t.isStackTrace?console.error(t.getError(e)):console.error(e,...n)}}function g1(...n){const e=n.join(" ");e in QA||(QA[e]=!0,ct(...n))}function WF(n,e,t){return new Promise(function(i,s){function o(){switch(n.clientWaitSync(e,n.SYNC_FLUSH_COMMANDS_BIT,0)){case n.WAIT_FAILED:s();break;case n.TIMEOUT_EXPIRED:setTimeout(o,t);break;default:i()}}setTimeout(o,t)})}const XF={[Lv]:Iv,[Pv]:zv,[Uv]:Bv,[Kd]:Ov,[Iv]:Lv,[zv]:Pv,[Bv]:Uv,[Ov]:Kd};class Do{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){const i=this._listeners;return i===void 0?!1:i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){const i=this._listeners;if(i===void 0)return;const s=i[e];if(s!==void 0){const o=s.indexOf(t);o!==-1&&s.splice(o,1)}}dispatchEvent(e){const t=this._listeners;if(t===void 0)return;const i=t[e.type];if(i!==void 0){e.target=this;const s=i.slice(0);for(let o=0,c=s.length;o<c;o++)s[o].call(this,e);e.target=null}}}const Ys=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let JA=1234567;const Yd=Math.PI/180,tp=180/Math.PI;function cr(){const n=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(Ys[n&255]+Ys[n>>8&255]+Ys[n>>16&255]+Ys[n>>24&255]+"-"+Ys[e&255]+Ys[e>>8&255]+"-"+Ys[e>>16&15|64]+Ys[e>>24&255]+"-"+Ys[t&63|128]+Ys[t>>8&255]+"-"+Ys[t>>16&255]+Ys[t>>24&255]+Ys[i&255]+Ys[i>>8&255]+Ys[i>>16&255]+Ys[i>>24&255]).toLowerCase()}function Gt(n,e,t){return Math.max(e,Math.min(t,n))}function Fw(n,e){return(n%e+e)%e}function qF(n,e,t,i,s){return i+(n-e)*(s-i)/(t-e)}
vendor: 4,265 bytes, line 11
11function YF(n,e,t){return n!==e?(t-n)/(e-n):0}function Rg(n,e,t){return(1-t)*n+t*e}function ZF(n,e,t,i){return Rg(n,e,1-Math.exp(-t*i))}function KF(n,e=1){return e-Math.abs(Fw(n,e*2)-e)}function $F(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function QF(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function JF(n,e){return n+Math.floor(Math.random()*(e-n+1))}function e6(n,e){return n+Math.random()*(e-n)}function t6(n){return n*(.5-Math.random())}function n6(n){n!==void 0&&(JA=n);let e=JA+=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 i6(n){return n*Yd}function s6(n){return n*tp}function a6(n){return(n&n-1)===0&&n!==0}function r6(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function o6(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function l6(n,e,t,i,s){const o=Math.cos,c=Math.sin,h=o(t/2),f=c(t/2),p=o((e+i)/2),x=c((e+i)/2),y=o((e-i)/2),v=c((e-i)/2),S=o((i-e)/2),M=c((i-e)/2);switch(s){case"XYX":n.set(h*x,f*y,f*v,h*p);break;case"YZY":n.set(f*v,h*x,f*y,h*p);break;case"ZXZ":n.set(f*y,f*v,h*x,h*p);break;case"XZX":n.set(h*x,f*M,f*S,h*p);break;case"YXY":n.set(f*S,h*x,f*M,h*p);break;case"ZYZ":n.set(f*M,f*S,h*x,h*p);break;default:ct("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+s)}}function ma(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return n/4294967295;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int32Array:return Math.max(n/2147483647,-1);case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function cn(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return Math.round(n*4294967295);case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int32Array:return Math.round(n*2147483647);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}const c6={DEG2RAD:Yd,RAD2DEG:tp,generateUUID:cr,clamp:Gt,euclideanModulo:Fw,mapLinear:qF,inverseLerp:YF,lerp:Rg,damp:ZF,pingpong:KF,smoothstep:$F,smootherstep:QF,randInt:JF,randFloat:e6,randFloatSpread:t6,seededRandom:n6,degToRad:i6,radToDeg:s6,isPowerOfTwo:a6,ceilPowerOfTwo:r6,floorPowerOfTwo:o6,setQuaternionFromProperEuler:l6,normalize:cn,denormalize:ma},wT=class wT{constructor(e=0,t=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,s=e.elements;return this.x=s[0]*t+s[3]*i+s[6],this.y=s[1]*t+s[4]*i+s[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=Gt(this.x,e.x,t.x),this.y=Gt(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=Gt(this.x,e,t),this.y=Gt(this.y,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Gt(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}
vendor: 8,581 bytes, line 11
11round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(Gt(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),s=Math.sin(t),o=this.x-e.x,c=this.y-e.y;return this.x=o*i-c*s+e.x,this.y=o*s+c*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}};wT.prototype.isVector2=!0;let je=wT;class ba{constructor(e=0,t=0,i=0,s=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=i,this._w=s}static slerpFlat(e,t,i,s,o,c,h){let f=i[s+0],p=i[s+1],x=i[s+2],y=i[s+3],v=o[c+0],S=o[c+1],M=o[c+2],R=o[c+3];if(y!==R||f!==v||p!==S||x!==M){let A=f*v+p*S+x*M+y*R;A<0&&(v=-v,S=-S,M=-M,R=-R,A=-A);let w=1-h;if(A<.9995){const N=Math.acos(A),L=Math.sin(N);w=Math.sin(w*N)/L,h=Math.sin(h*N)/L,f=f*w+v*h,p=p*w+S*h,x=x*w+M*h,y=y*w+R*h}else{f=f*w+v*h,p=p*w+S*h,x=x*w+M*h,y=y*w+R*h;const N=1/Math.sqrt(f*f+p*p+x*x+y*y);f*=N,p*=N,x*=N,y*=N}}e[t]=f,e[t+1]=p,e[t+2]=x,e[t+3]=y}static multiplyQuaternionsFlat(e,t,i,s,o,c){const h=i[s],f=i[s+1],p=i[s+2],x=i[s+3],y=o[c],v=o[c+1],S=o[c+2],M=o[c+3];return e[t]=h*M+x*y+f*S-p*v,e[t+1]=f*M+x*v+p*y-h*S,e[t+2]=p*M+x*S+h*v-f*y,e[t+3]=x*M-h*y-f*v-p*S,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,s){return this._x=e,this._y=t,this._z=i,this._w=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const i=e._x,s=e._y,o=e._z,c=e._order,h=Math.cos,f=Math.sin,p=h(i/2),x=h(s/2),y=h(o/2),v=f(i/2),S=f(s/2),M=f(o/2);switch(c){case"XYZ":this._x=v*x*y+p*S*M,this._y=p*S*y-v*x*M,this._z=p*x*M+v*S*y,this._w=p*x*y-v*S*M;break;case"YXZ":this._x=v*x*y+p*S*M,this._y=p*S*y-v*x*M,this._z=p*x*M-v*S*y,this._w=p*x*y+v*S*M;break;case"ZXY":this._x=v*x*y-p*S*M,this._y=p*S*y+v*x*M,this._z=p*x*M+v*S*y,this._w=p*x*y-v*S*M;break;case"ZYX":this._x=v*x*y-p*S*M,this._y=p*S*y+v*x*M,this._z=p*x*M-v*S*y,this._w=p*x*y+v*S*M;break;case"YZX":this._x=v*x*y+p*S*M,this._y=p*S*y+v*x*M,this._z=p*x*M-v*S*y,this._w=p*x*y-v*S*M;break;case"XZY":this._x=v*x*y-p*S*M,this._y=p*S*y-v*x*M,this._z=p*x*M+v*S*y,this._w=p*x*y+v*S*M;break;default:ct("Quaternion: .setFromEuler() encountered an unknown order: "+c)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,s=Math.sin(i);return this._x=e.x*s,this._y=e.y*s,this._z=e.z*s,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],s=t[4],o=t[8],c=t[1],h=t[5],f=t[9],p=t[2],x=t[6],y=t[10],v=i+h+y;if(v>0){const S=.5/Math.sqrt(v+1);this._w=.25/S,this._x=(x-f)*S,this._y=(o-p)*S,this._z=(c-s)*S}else if(i>h&&i>y){const S=2*Math.sqrt(1+i-h-y);this._w=(x-f)/S,this._x=.25*S,this._y=(s+c)/S,this._z=(o+p)/S}else if(h>y){const S=2*Math.sqrt(1+h-i-y);this._w=(o-p)/S,this._x=(s+c)/S,this._y=.25*S,this._z=(f+x)/S}else{const S=2*Math.sqrt(1+y-i-h);this._w=(c-s)/S,this._x=(o+p)/S,this._y=(f+x)/S,this._z=.25*S}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return i<1e-8?(i=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Gt(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(i===0)return this;const s=Math.min(1,t/i);return this.slerp(e,s),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,s=e._y,o=e._z,c=e._w,h=t._x,f=t._y,p=t._z,x=t._w;return this._x=i*x+c*h+s*p-o*f,this._y=s*x+c*f+o*h-i*p,this._z=o*x+c*p+i*f-s*h,this._w=c*x-i*h-s*f-o*p,this._onChangeCallback(),this}slerp(e,t){let i=e._x,s=e._y,o=e._z,c=e._w,h=this.dot(e);h<0&&(i=-i,s=-s,o=-o,c=-c,h=-h);let f=1-t;if(h<.9995){const p=Math.acos(h),x=Math.sin(p);f=Math.sin(f*p)/x,t=Math.sin(t*p)/x,this._x=this._x*f+i*t,this._y=this._y*f+s*t,this._z=this._z*f+o*t,this._w=this._w*f+c*t,this._onChangeCallback()}else this._x=this._x*f+i*t,this._y=this._y*f+s*t,this._z=this._z*f+o*t,this._w=this._w*f+c*t,this.normalize();return this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){const e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),i=Math.random(),s=Math.sqrt(1-i),o=Math.sqrt(i);return this.set(s*Math.sin(e),s*Math.cos(e),o*Math.sin(t),o*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}const TT=class TT{constructor(e=0,t=0,i=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(e3.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(e3.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,s=this.z,o=e.elements;
vendor: 5,957 bytes, line 11
11return this.x=o[0]*t+o[3]*i+o[6]*s,this.y=o[1]*t+o[4]*i+o[7]*s,this.z=o[2]*t+o[5]*i+o[8]*s,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,s=this.z,o=e.elements,c=1/(o[3]*t+o[7]*i+o[11]*s+o[15]);return this.x=(o[0]*t+o[4]*i+o[8]*s+o[12])*c,this.y=(o[1]*t+o[5]*i+o[9]*s+o[13])*c,this.z=(o[2]*t+o[6]*i+o[10]*s+o[14])*c,this}applyQuaternion(e){const t=this.x,i=this.y,s=this.z,o=e.x,c=e.y,h=e.z,f=e.w,p=2*(c*s-h*i),x=2*(h*t-o*s),y=2*(o*i-c*t);return this.x=t+f*p+c*y-h*x,this.y=i+f*x+h*p-o*y,this.z=s+f*y+o*x-c*p,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,s=this.z,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*s,this.y=o[1]*t+o[5]*i+o[9]*s,this.z=o[2]*t+o[6]*i+o[10]*s,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=Gt(this.x,e.x,t.x),this.y=Gt(this.y,e.y,t.y),this.z=Gt(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=Gt(this.x,e,t),this.y=Gt(this.y,e,t),this.z=Gt(this.z,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Gt(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,s=e.y,o=e.z,c=t.x,h=t.y,f=t.z;return this.x=s*f-o*h,this.y=o*c-i*f,this.z=i*h-s*c,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 C_.copy(this).projectOnVector(e),this.sub(C_)}reflect(e){return this.sub(C_.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(Gt(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,s=this.z-e.z;return t*t+i*i+s*s}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 s=Math.sin(t)*e;return this.x=s*Math.sin(i),this.y=Math.cos(t)*e,this.z=s*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(),s=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=s,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,t=Math.random()*2-1,i=Math.sqrt(1-t*t);return this.x=i*Math.cos(e),this.y=t,this.z=i*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}};TT.prototype.isVector3=!0;let Z=TT;const C_=new Z,e3=new ba,ET=class ET{constructor(e,t,i,s,o,c,h,f,p){this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,i,s,o,c,h,f,p)}set(e,t,i,s,o,c,h,f,p){const x=this.elements;return x[0]=e,x[1]=s,x[2]=h,x[3]=t,x[4]=o,x[5]=f,x[6]=i,x[7]=c,x[8]=p,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,s=t.elements,o=this.elements,c=i[0],h=i[3],f=i[6],p=i[1],x=i[4],y=i[7],v=i[2],S=i[5],M=i[8],R=s[0],A=s[3],w=s[6],N=s[1],L=s[4],I=s[7],B=s[2],O=s[5],F=s[8];return o[0]=c*R+h*N+f*B,o[3]=c*A+h*L+f*O,o[6]=c*w+h*I+f*F,o[1]=p*R+x*N+y*B,o[4]=p*A+
vendor: 25,547 bytes, line 11
11x*L+y*O,o[7]=p*w+x*I+y*F,o[2]=v*R+S*N+M*B,o[5]=v*A+S*L+M*O,o[8]=v*w+S*I+M*F,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],s=e[2],o=e[3],c=e[4],h=e[5],f=e[6],p=e[7],x=e[8];return t*c*x-t*h*p-i*o*x+i*h*f+s*o*p-s*c*f}invert(){const e=this.elements,t=e[0],i=e[1],s=e[2],o=e[3],c=e[4],h=e[5],f=e[6],p=e[7],x=e[8],y=x*c-h*p,v=h*f-x*o,S=p*o-c*f,M=t*y+i*v+s*S;if(M===0)return this.set(0,0,0,0,0,0,0,0,0);const R=1/M;return e[0]=y*R,e[1]=(s*p-x*i)*R,e[2]=(h*i-s*c)*R,e[3]=v*R,e[4]=(x*t-s*f)*R,e[5]=(s*o-h*t)*R,e[6]=S*R,e[7]=(i*f-p*t)*R,e[8]=(c*t-i*o)*R,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,s,o,c,h){const f=Math.cos(o),p=Math.sin(o);return this.set(i*f,i*p,-i*(f*c+p*h)+c+e,-s*p,s*f,-s*(-p*c+f*h)+h+t,0,0,1),this}scale(e,t){return this.premultiply(R_.makeScale(e,t)),this}rotate(e){return this.premultiply(R_.makeRotation(-e)),this}translate(e,t){return this.premultiply(R_.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,i=e.elements;for(let s=0;s<9;s++)if(t[s]!==i[s])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)}};ET.prototype.isMatrix3=!0;let Qt=ET;const R_=new Qt,t3=new Qt().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),n3=new Qt().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function u6(){const n={enabled:!0,workingColorSpace:ep,spaces:{},convert:function(s,o,c){return this.enabled===!1||o===c||!o||!c||(this.spaces[o].transfer===Wn&&(s.r=pc(s.r),s.g=pc(s.g),s.b=pc(s.b)),this.spaces[o].primaries!==this.spaces[c].primaries&&(s.applyMatrix3(this.spaces[o].toXYZ),s.applyMatrix3(this.spaces[c].fromXYZ)),this.spaces[c].transfer===Wn&&(s.r=qf(s.r),s.g=qf(s.g),s.b=qf(s.b))),s},workingToColorSpace:function(s,o){return this.convert(s,this.workingColorSpace,o)},colorSpaceToWorking:function(s,o){return this.convert(s,o,this.workingColorSpace)},getPrimaries:function(s){return this.spaces[s].primaries},getTransfer:function(s){return s===dc?qg:this.spaces[s].transfer},getToneMappingMode:function(s){return this.spaces[s].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(s,o=this.workingColorSpace){return s.fromArray(this.spaces[o].luminanceCoefficients)},define:function(s){Object.assign(this.spaces,s)},_getMatrix:function(s,o,c){return s.copy(this.spaces[o].toXYZ).multiply(this.spaces[c].fromXYZ)},_getDrawingBufferColorSpace:function(s){return this.spaces[s].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(s=this.workingColorSpace){return this.spaces[s].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(s,o){return g1("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),n.workingToColorSpace(s,o)},toWorkingColorSpace:function(s,o){return g1("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),n.colorSpaceToWorking(s,o)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],i=[.3127,.329];return n.define({[ep]:{primaries:e,whitePoint:i,transfer:qg,toXYZ:t3,fromXYZ:n3,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:$s},outputColorSpaceConfig:{drawingBufferColorSpace:$s}},[$s]:{primaries:e,whitePoint:i,transfer:Wn,toXYZ:t3,fromXYZ:n3,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:$s}}}),n}const _n=u6();function pc(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function qf(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}let mf;class sL{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let i;if(e instanceof HTMLCanvasElement)i=e;else{mf===void 0&&(mf=Zg("canvas")),mf.width=e.width,mf.height=e.height;const s=mf.getContext("2d");e instanceof ImageData?s.putImageData(e,0,0):s.drawImage(e,0,0,e.width,e.height),i=mf}return i.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=Zg("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const s=i.getImageData(0,0,e.width,e.height),o=s.data;for(let c=0;c<o.length;c++)o[c]=pc(o[c]/255)*255;return i.putImageData(s,0,0),t}else if(e.data){const t=e.data.slice(0);for(let i=0;i<t.length;i++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[i]=Math.floor(pc(t[i]/255)*255):t[i]=pc(t[i]);return{data:t,width:e.width,height:e.height}}else return ct("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let d6=0;class wu{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:d6++}),this.uuid=cr(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){const t=this.data;return typeof HTMLVideoElement<"u"&&t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight,0):typeof VideoFrame<"u"&&t instanceof VideoFrame?e.set(t.displayWidth,t.displayHeight,0):t!==null?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];const i={uuid:this.uuid,url:""},s=this.data;if(s!==null){let o;if(Array.isArray(s)){o=[];for(let c=0,h=s.length;c<h;c++)s[c].isDataTexture?o.push(N_(s[c].image)):o.push(N_(s[c]))}else o=N_(s);i.url=o}return t||(e.images[this.uuid]=i),i}}function N_(n){return typeof HTMLImageElement<"u"&&n instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&n instanceof ImageBitmap?sL.getDataURL(n):n.data?{data:Array.from(n.data),width:n.width,height:n.height,type:n.data.constructor.name}:(ct("Texture: Unable to serialize Texture."),{})}let h6=0;const D_=new Z;class Ii extends Do{constructor(e=Ii.DEFAULT_IMAGE,t=Ii.DEFAULT_MAPPING,i=Xa,s=Xa,o=yi,c=xl,h=Qs,f=pa,p=Ii.DEFAULT_ANISOTROPY,x=dc){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:h6++}),this.uuid=cr(),this.name="",this.source=new wu(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=i,this.wrapT=s,this.magFilter=o,this.minFilter=c,this.anisotropy=p,this.format=h,this.internalFormat=null,this.type=f,this.offset=new je(0,0),this.repeat=new je(1,1),this.center=new je(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Qt,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=x,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(e&&e.depth&&e.depth>1),this.pmremVersion=0,this.normalized=!1}get width(){return this.source.getSize(D_).x}get height(){return this.source.getSize(D_).y}get depth(){return this.source.getSize(D_).z}get image(){return this.source.data}set image(e){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.normalized=e.normalized,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(const t in e){const i=e[t];if(i===void 0){ct(`Texture.setValues(): parameter '${t}' has value of undefined.`);continue}const s=this[t];if(s===void 0){ct(`Texture.setValues(): property '${t}' does not exist.`);continue}s&&i&&s.isVector2&&i.isVector2||s&&i&&s.isVector3&&i.isVector3||s&&i&&s.isMatrix3&&i.isMatrix3?s.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const i={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,normalized:this.normalized,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==F1)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case kg:e.x=e.x-Math.floor(e.x);break;case Xa:e.x=e.x<0?0:1;break;case Hg: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 kg:e.y=e.y-Math.floor(e.y);break;case Xa:e.y=e.y<0?0:1;break;case Hg:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}Ii.DEFAULT_IMAGE=null;Ii.DEFAULT_MAPPING=F1;Ii.DEFAULT_ANISOTROPY=1;const AT=class AT{constructor(e=0,t=0,i=0,s=1){this.x=e,this.y=t,this.z=i,this.w=s}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,s){return this.x=e,this.y=t,this.z=i,this.w=s,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,s=this.z,o=this.w,c=e.elements;return this.x=c[0]*t+c[4]*i+c[8]*s+c[12]*o,this.y=c[1]*t+c[5]*i+c[9]*s+c[13]*o,this.z=c[2]*t+c[6]*i+c[10]*s+c[14]*o,this.w=c[3]*t+c[7]*i+c[11]*s+c[15]*o,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,s,o;const f=e.elements,p=f[0],x=f[4],y=f[8],v=f[1],S=f[5],M=f[9],R=f[2],A=f[6],w=f[10];if(Math.abs(x-v)<.01&&Math.abs(y-R)<.01&&Math.abs(M-A)<.01){if(Math.abs(x+v)<.1&&Math.abs(y+R)<.1&&Math.abs(M+A)<.1&&Math.abs(p+S+w-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const L=(p+1)/2,I=(S+1)/2,B=(w+1)/2,O=(x+v)/4,F=(y+R)/4,P=(M+A)/4;return L>I&&L>B?L<.01?(i=0,s=.707106781,o=.707106781):(i=Math.sqrt(L),s=O/i,o=F/i):I>B?I<.01?(i=.707106781,s=0,o=.707106781):(s=Math.sqrt(I),i=O/s,o=P/s):B<.01?(i=.707106781,s=.707106781,o=0):(o=Math.sqrt(B),i=F/o,s=P/o),this.set(i,s,o,t),this}let N=Math.sqrt((A-M)*(A-M)+(y-R)*(y-R)+(v-x)*(v-x));return Math.abs(N)<.001&&(N=1),this.x=(A-M)/N,this.y=(y-R)/N,this.z=(v-x)/N,this.w=Math.acos((p+S+w-1)/2),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Gt(this.x,e.x,t.x),this.y=Gt(this.y,e.y,t.y),this.z=Gt(this.z,e.z,t.z),this.w=Gt(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=Gt(this.x,e,t),this.y=Gt(this.y,e,t),this.z=Gt(this.z,e,t),this.w=Gt(this.w,e,t),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Gt(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}};AT.prototype.isVector4=!0;let Xn=AT;class kw extends Do{constructor(e=1,t=1,i={}){super(),i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:yi,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},i),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=i.depth,this.scissor=new Xn(0,0,e,t),this.scissorTest=!1,this.viewport=new Xn(0,0,e,t),this.textures=[];const s={width:e,height:t,depth:i.depth},o=new Ii(s),c=i.count;for(let h=0;h<c;h++)this.textures[h]=o.clone(),this.textures[h].isRenderTargetTexture=!0,this.textures[h].renderTarget=this;this._setTextureOptions(i),this.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.resolveDepthBuffer=i.resolveDepthBuffer,this.resolveStencilBuffer=i.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=i.depthTexture,this.samples=i.samples,this.multiview=i.multiview}_setTextureOptions(e={}){const t={minFilter:yi,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(t.mapping=e.mapping),e.wrapS!==void 0&&(t.wrapS=e.wrapS),e.wrapT!==void 0&&(t.wrapT=e.wrapT),e.wrapR!==void 0&&(t.wrapR=e.wrapR),e.magFilter!==void 0&&(t.magFilter=e.magFilter),e.minFilter!==void 0&&(t.minFilter=e.minFilter),e.format!==void 0&&(t.format=e.format),e.type!==void 0&&(t.type=e.type),e.anisotropy!==void 0&&(t.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(t.colorSpace=e.colorSpace),e.flipY!==void 0&&(t.flipY=e.flipY),e.generateMipmaps!==void 0&&(t.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(t.internalFormat=e.internalFormat);for(let i=0;i<this.textures.length;i++)this.textures[i].setValues(t)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,i=1){if(this.width!==e||this.height!==t||this.depth!==i){this.width=e,this.height=t,this.depth=i;for(let s=0,o=this.textures.length;s<o;s++)this.textures[s].image.width=e,this.textures[s].image.height=t,this.textures[s].image.depth=i,this.textures[s].isData3DTexture!==!0&&(this.textures[s].isArrayTexture=this.textures[s].image.depth>1);this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,i=e.textures.length;t<i;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;const s=Object.assign({},e.textures[t].image);this.textures[t].source=new wu(s)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this.multiview=e.multiview,this}dispose(){this.dispatchEvent({type:"dispose"})}}class ur extends kw{constructor(e=1,t=1,i={}){super(e,t,i),this.isWebGLRenderTarget=!0}}class K1 extends Ii{constructor(e=null,t=1,i=1,s=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:i,depth:s},this.magFilter=qi,this.minFilter=qi,this.wrapR=Xa,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class f6 extends ur{constructor(e=1,t=1,i=1,s={}){super(e,t,s),this.isWebGLArrayRenderTarget=!0,this.depth=i,this.texture=new K1(null,e,t,i),this._setTextureOptions(s),this.texture.isRenderTargetTexture=!0}}class $1 extends Ii{constructor(e=null,t=1,i=1,s=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:i,depth:s},this.magFilter=qi,this.minFilter=qi,this.wrapR=Xa,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class p6 extends ur{constructor(e=1,t=1,i=1,s={}){super(e,t,s),this.isWebGL3DRenderTarget=!0,this.depth=i,this.texture=new $1(null,e,t,i),this._setTextureOptions(s),this.texture.isRenderTargetTexture=!0}}const T1=class T1{constructor(e,t,i,s,o,c,h,f,p,x,y,v,S,M,R,A){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,i,s,o,c,h,f,p,x,y,v,S,M,R,A)}set(e,t,i,s,o,c,h,f,p,x,y,v,S,M,R,A){const w=this.elements;return w[0]=e,w[4]=t,w[8]=i,w[12]=s,w[1]=o,w[5]=c,w[9]=h,w[13]=f,w[2]=p,w[6]=x,w[10]=y,w[14]=v,w[3]=S,w[7]=M,w[11]=R,w[15]=A,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 T1().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 this.determinant()===0?(e.set(1,0,0),t.set(0,1,0),i.set(0,0,1),this):(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){if(e.determinant()===0)return this.identity();const t=this.elements,i=e.elements,s=1/gf.setFromMatrixColumn(e,0).length(),o=1/gf.setFromMatrixColumn(e,1).length(),c=1/gf.setFromMatrixColumn(e,2).length();return t[0]=i[0]*s,t[1]=i[1]*s,t[2]=i[2]*s,t[3]=0,t[4]=i[4]*o,t[5]=i[5]*o,t[6]=i[6]*o,t[7]=0,t[8]=i[8]*c,t[9]=i[9]*c,t[10]=i[10]*c,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,s=e.y,o=e.z,c=Math.cos(i),h=Math.sin(i),f=Math.cos(s),p=Math.sin(s),x=Math.cos(o),y=Math.sin(o);if(e.order==="XYZ"){const v=c*x,S=c*y,M=h*x,R=h*y;t[0]=f*x,t[4]=-f*y,t[8]=p,t[1]=S+M*p,t[5]=v-R*p,t[9]=-h*f,t[2]=R-v*p,t[6]=M+S*p,t[10]=c*f}else if(e.order==="YXZ"){const v=f*x,S=f*y,M=p*x,R=p*y;t[0]=v+R*h,t[4]=M*h-S,t[8]=c*p,t[1]=c*y,t[5]=c*x,t[9]=-h,t[2]=S*h-M,t[6]=R+v*h,t[10]=c*f}else if(e.order==="ZXY"){const v=f*x,S=f*y,M=p*x,R=p*y;t[0]=v-R*h,t[4]=-c*y,t[8]=M+S*h,t[1]=S+M*h,t[5]=c*x,t[9]=R-v*h,t[2]=-c*p,t[6]=h,t[10]=c*f}else if(e.order==="ZYX"){const v=c*x,S=c*y,M=h*x,R=h*y;t[0]=f*x,t[4]=M*p-S,t[8]=v*p+R,t[1]=f*y,t[5]=R*p+v,t[9]=S*p-M,t[2]=-p,t[6]=h*f,t[10]=c*f}else if(e.order==="YZX"){const v=c*f,S=c*p,M=h*f,R=h*p;t[0]=f*x,t[4]=R-v*y,t[8]=M*y+S,t[1]=y,t[5]=c*x,t[9]=-h*x,t[2]=-p*x,t[6]=S*y+M,t[10]=v-R*y}else if(e.order==="XZY"){const v=c*f,S=c*p,M=h*f,R=h*p;t[0]=f*x,t[4]=-y,t[8]=p*x,t[1]=v*y+R,t[5]=c*x,t[9]=S*y-M,t[2]=M*y-S,t[6]=h*x,t[10]=R*y+v}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(m6,e,g6)}lookAt(e,t,i){const s=this.elements;return rr.subVectors(e,t),rr.lengthSq()===0&&(rr.z=1),rr.normalize(),uu.crossVectors(i,rr),uu.lengthSq()===0&&(Math.abs(i.z)===1?rr.x+=1e-4:rr.z+=1e-4,rr.normalize(),uu.crossVectors(i,rr)),uu.normalize(),cy.crossVectors(rr,uu),s[0]=uu.x,s[4]=cy.x,s[8]=rr.x,s[1]=uu.y,s[5]=cy.y,s[9]=rr.y,s[2]=uu.z,s[6]=cy.z,s[10]=rr.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,s=t.elements,o=this.elements,c=i[0],h=i[4],f=i[8],p=i[12],x=i[1],y=i[5],v=i[9],S=i[13],M=i[2],R=i[6],A=i[10],w=i[14],N=i[3],L=i[7],I=i[11],B=i[15],O=s[0],F=s[4],P=s[8],V=s[12],j=s[1],W=s[5],ee=s[9],ie=s[13],ue=s[2],Q=s[6],Y=s[10],$=s[14],le=s[3],ge=s[7],Ce=s[11],q=s[15];return o[0]=c*O+h*j+f*ue+p*le,o[4]=c*F+h*W+f*Q+p*ge,o[8]=c*P+h*ee+f*Y+p*Ce,o[12]=c*V+h*ie+f*$+p*q,o[1]=x*O+y*j+v*ue+S*le,o[5]=x*F+y*W+v*Q+S*ge,o[9]=x*P+y*ee+v*Y+S*Ce,o[13]=x*V+y*ie+v*$+S*q,o[2]=M*O+R*j+A*ue+w*le,o[6]=M*F+R*W+A*Q+w*ge,o[10]=M*P+R*ee+A*Y+w*Ce,o[14]=M*V+R*ie+A*$+w*q,o[3]=N*O+L*j+I*ue+B*le,o[7]=N*F+L*W+I*Q+B*ge,o[11]=N*P+L*ee+I*Y+B*Ce,o[15]=N*V+L*ie+I*$+B*q,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],s=e[8],o=e[12],c=e[1],h=e[5],f=e[9],p=e[13],x=e[2],y=e[6],v=e[10],S=e[14],M=e[3],R=e[7],A=e[11],w=e[15],N=f*S-p*v,L=h*S-p*y,I=h*v-f*y,B=c*S-p*x,O=c*v-f*x,F=c*y-h*x;return t*(R*N-A*L+w*I)-i*(M*N-A*B+w*O)+s*(M*L-R*B+w*F)-o*(M*I-R*O+A*F)}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 s=this.elements;return e.isVector3?(s[12]=e.x,s[13]=e.y,s[14]=e.z):(s[12]=e,s[13]=t,s[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],s=e[2],o=e[3],c=e[4],h=e[5],f=e[6],p=e[7],x=e[8],y=e[9],v=e[10],S=e[11],M=e[12],R=e[13],A=e[14],w=e[15],N=t*h-i*c,L=t*f-s*c,I=t*p-o*c,B=i*f-s*h,O=i*p-o*h,F=s*p-o
vendor: 5,368 bytes, line 11
11*f,P=x*R-y*M,V=x*A-v*M,j=x*w-S*M,W=y*A-v*R,ee=y*w-S*R,ie=v*w-S*A,ue=N*ie-L*ee+I*W+B*j-O*V+F*P;if(ue===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const Q=1/ue;return e[0]=(h*ie-f*ee+p*W)*Q,e[1]=(s*ee-i*ie-o*W)*Q,e[2]=(R*F-A*O+w*B)*Q,e[3]=(v*O-y*F-S*B)*Q,e[4]=(f*j-c*ie-p*V)*Q,e[5]=(t*ie-s*j+o*V)*Q,e[6]=(A*I-M*F-w*L)*Q,e[7]=(x*F-v*I+S*L)*Q,e[8]=(c*ee-h*j+p*P)*Q,e[9]=(i*j-t*ee-o*P)*Q,e[10]=(M*O-R*I+w*N)*Q,e[11]=(y*I-x*O-S*N)*Q,e[12]=(h*V-c*W-f*P)*Q,e[13]=(t*W-i*V+s*P)*Q,e[14]=(R*L-M*B-A*N)*Q,e[15]=(x*B-y*L+v*N)*Q,this}scale(e){const t=this.elements,i=e.x,s=e.y,o=e.z;return t[0]*=i,t[4]*=s,t[8]*=o,t[1]*=i,t[5]*=s,t[9]*=o,t[2]*=i,t[6]*=s,t[10]*=o,t[3]*=i,t[7]*=s,t[11]*=o,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],s=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,s))}makeTranslation(e,t,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),s=Math.sin(t),o=1-i,c=e.x,h=e.y,f=e.z,p=o*c,x=o*h;return this.set(p*c+i,p*h-s*f,p*f+s*h,0,p*h+s*f,x*h+i,x*f-s*c,0,p*f-s*h,x*f+s*c,o*f*f+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,s,o,c){return this.set(1,i,o,0,e,1,c,0,t,s,1,0,0,0,0,1),this}compose(e,t,i){const s=this.elements,o=t._x,c=t._y,h=t._z,f=t._w,p=o+o,x=c+c,y=h+h,v=o*p,S=o*x,M=o*y,R=c*x,A=c*y,w=h*y,N=f*p,L=f*x,I=f*y,B=i.x,O=i.y,F=i.z;return s[0]=(1-(R+w))*B,s[1]=(S+I)*B,s[2]=(M-L)*B,s[3]=0,s[4]=(S-I)*O,s[5]=(1-(v+w))*O,s[6]=(A+N)*O,s[7]=0,s[8]=(M+L)*F,s[9]=(A-N)*F,s[10]=(1-(v+R))*F,s[11]=0,s[12]=e.x,s[13]=e.y,s[14]=e.z,s[15]=1,this}decompose(e,t,i){const s=this.elements;e.x=s[12],e.y=s[13],e.z=s[14];const o=this.determinant();if(o===0)return i.set(1,1,1),t.identity(),this;let c=gf.set(s[0],s[1],s[2]).length();const h=gf.set(s[4],s[5],s[6]).length(),f=gf.set(s[8],s[9],s[10]).length();o<0&&(c=-c),yo.copy(this);const p=1/c,x=1/h,y=1/f;return yo.elements[0]*=p,yo.elements[1]*=p,yo.elements[2]*=p,yo.elements[4]*=x,yo.elements[5]*=x,yo.elements[6]*=x,yo.elements[8]*=y,yo.elements[9]*=y,yo.elements[10]*=y,t.setFromRotationMatrix(yo),i.x=c,i.y=h,i.z=f,this}makePerspective(e,t,i,s,o,c,h=lr,f=!1){const p=this.elements,x=2*o/(t-e),y=2*o/(i-s),v=(t+e)/(t-e),S=(i+s)/(i-s);let M,R;if(f)M=o/(c-o),R=c*o/(c-o);else if(h===lr)M=-(c+o)/(c-o),R=-2*c*o/(c-o);else if(h===$d)M=-c/(c-o),R=-c*o/(c-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+h);return p[0]=x,p[4]=0,p[8]=v,p[12]=0,p[1]=0,p[5]=y,p[9]=S,p[13]=0,p[2]=0,p[6]=0,p[10]=M,p[14]=R,p[3]=0,p[7]=0,p[11]=-1,p[15]=0,this}makeOrthographic(e,t,i,s,o,c,h=lr,f=!1){const p=this.elements,x=2/(t-e),y=2/(i-s),v=-(t+e)/(t-e),S=-(i+s)/(i-s);let M,R;if(f)M=1/(c-o),R=c/(c-o);else if(h===lr)M=-2/(c-o),R=-(c+o)/(c-o);else if(h===$d)M=-1/(c-o),R=-o/(c-o);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+h);return p[0]=x,p[4]=0,p[8]=0,p[12]=v,p[1]=0,p[5]=y,p[9]=0,p[13]=S,p[2]=0,p[6]=0,p[10]=M,p[14]=R,p[3]=0,p[7]=0,p[11]=0,p[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let s=0;s<16;s++)if(t[s]!==i[s])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}};T1.prototype.isMatrix4=!0;let Yt=T1;const gf=new Z,yo=new Yt,m6=new Z(0,0,0),g6=new Z(1,1,1),uu=new Z,cy=new Z,rr=new Z,i3=new Yt,s3=new ba;class No{constructor(e=0,t=0,i=0,s=No.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=s}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,s=this._order){return this._x=e,this._y=t,this._z=i,this._order=s,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 s=e.elements,o=s[0],c=s[4],h=s[8],f=s[1],p=s[5],x=s[9],y=s[2],v=s[6],S=s[10];switch(t){case"XYZ":this._y=Math.asin(Gt(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(-x,S),this._z=Math.atan2(-c,o)):(this._x=Math.atan2(v,p),this._z=0);break;case"YXZ":this._x=Math.asin(-Gt(x,-1,1)),Math.abs(x)<.9999999?(this._y=Math.atan2(h,S),this._z=Math.atan2(f,p)):(this._y=Math.atan2(-y,o),this._z=0);break;case"ZXY":this._x=Math.asin(Gt(v,-1,1)),Math.abs(v)<.9999999?(this._y=Math.atan2(-y,S),this._z=Math.atan2(-c,p)):(this._y=0,this._z=Math.atan2(f,o));break;case"ZYX":this._y=Math.asin(-Gt(y,-1,1)),Math.abs(y)<.9999999?(this._x=Math.atan2(v,
vendor: 20,055 bytes, line 11
11S),this._z=Math.atan2(f,o)):(this._x=0,this._z=Math.atan2(-c,p));break;case"YZX":this._z=Math.asin(Gt(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(-x,p),this._y=Math.atan2(-y,o)):(this._x=0,this._y=Math.atan2(h,S));break;case"XZY":this._z=Math.asin(-Gt(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(v,p),this._y=Math.atan2(h,o)):(this._x=Math.atan2(-x,S),this._y=0);break;default:ct("Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return i3.makeRotationFromQuaternion(e),this.setFromRotationMatrix(i3,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return s3.setFromEuler(this),this.setFromQuaternion(s3,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}}No.DEFAULT_ORDER="XYZ";class np{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}}let x6=0;const a3=new Z,xf=new ba,sc=new Yt,uy=new Z,Ym=new Z,y6=new Z,v6=new ba,r3=new Z(1,0,0),o3=new Z(0,1,0),l3=new Z(0,0,1),c3={type:"added"},b6={type:"removed"},yf={type:"childadded",child:null},L_={type:"childremoved",child:null};class Un extends Do{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:x6++}),this.uuid=cr(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Un.DEFAULT_UP.clone();const e=new Z,t=new No,i=new ba,s=new Z(1,1,1);function o(){i.setFromEuler(t,!1)}function c(){t.setFromQuaternion(i,void 0,!1)}t._onChange(o),i._onChange(c),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:s},modelViewMatrix:{value:new Yt},normalMatrix:{value:new Qt}}),this.matrix=new Yt,this.matrixWorld=new Yt,this.matrixAutoUpdate=Un.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=Un.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new np,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.static=!1,this.userData={},this.pivot=null}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return xf.setFromAxisAngle(e,t),this.quaternion.multiply(xf),this}rotateOnWorldAxis(e,t){return xf.setFromAxisAngle(e,t),this.quaternion.premultiply(xf),this}rotateX(e){return this.rotateOnAxis(r3,e)}rotateY(e){return this.rotateOnAxis(o3,e)}rotateZ(e){return this.rotateOnAxis(l3,e)}translateOnAxis(e,t){return a3.copy(e).applyQuaternion(this.quaternion),this.position.add(a3.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(r3,e)}translateY(e){return this.translateOnAxis(o3,e)}translateZ(e){return this.translateOnAxis(l3,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(sc.copy(this.matrixWorld).invert())}lookAt(e,t,i){e.isVector3?uy.copy(e):uy.set(e,t,i);const s=this.parent;this.updateWorldMatrix(!0,!1),Ym.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?sc.lookAt(Ym,uy,this.up):sc.lookAt(uy,Ym,this.up),this.quaternion.setFromRotationMatrix(sc),s&&(sc.extractRotation(s.matrixWorld),xf.setFromRotationMatrix(sc),this.quaternion.premultiply(xf.invert()))}add(e){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(Et("Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(c3),yf.child=e,this.dispatchEvent(yf),yf.child=null):Et("Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let i=0;i<arguments.length;i++)this.remove(arguments[i]);return this}const t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(b6),L_.child=e,this.dispatchEvent(L_),L_.child=null),this}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),sc.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),sc.multiply(e.parent.matrixWorld)),e.applyMatrix4(sc),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(c3),yf.child=e,this.dispatchEvent(yf),yf.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let i=0,s=this.children.length;i<s;i++){const c=this.children[i].getObjectByProperty(e,t);if(c!==void 0)return c}}getObjectsByProperty(e,t,i=[]){this[e]===t&&i.push(this);const s=this.children;for(let o=0,c=s.length;o<c;o++)s[o].getObjectsByProperty(e,t,i);return i}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Ym,e,y6),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Ym,v6,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,s=t.length;i<s;i++)t[i].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const t=this.children;for(let i=0,s=t.length;i<s;i++)t[i].traverseVisible(e)}traverseAncestors(e){const t=this.parent;t!==null&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale);const e=this.pivot;if(e!==null){const t=e.x,i=e.y,s=e.z,o=this.matrix.elements;o[12]+=t-o[0]*t-o[4]*i-o[8]*s,o[13]+=i-o[1]*t-o[5]*i-o[9]*s,o[14]+=s-o[2]*t-o[6]*i-o[10]*s}this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let i=0,s=t.length;i<s;i++)t[i].updateMatrixWorld(e)}updateWorldMatrix(e,t){const i=this.parent;if(e===!0&&i!==null&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),t===!0){const s=this.children;for(let o=0,c=s.length;o<c;o++)s[o].updateWorldMatrix(!1,!0)}}toJSON(e){const t=e===void 0||typeof e=="string",i={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},i.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const s={};s.uuid=this.uuid,s.type=this.type,this.name!==""&&(s.name=this.name),this.castShadow===!0&&(s.castShadow=!0),this.receiveShadow===!0&&(s.receiveShadow=!0),this.visible===!1&&(s.visible=!1),this.frustumCulled===!1&&(s.frustumCulled=!1),this.renderOrder!==0&&(s.renderOrder=this.renderOrder),this.static!==!1&&(s.static=this.static),Object.keys(this.userData).length>0&&(s.userData=this.userData),s.layers=this.layers.mask,s.matrix=this.matrix.toArray(),s.up=this.up.toArray(),this.pivot!==null&&(s.pivot=this.pivot.toArray()),this.matrixAutoUpdate===!1&&(s.matrixAutoUpdate=!1),this.morphTargetDictionary!==void 0&&(s.morphTargetDictionary=Object.assign({},this.morphTargetDictionary)),this.morphTargetInfluences!==void 0&&(s.morphTargetInfluences=this.morphTargetInfluences.slice()),this.isInstancedMesh&&(s.type="InstancedMesh",s.count=this.count,s.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(s.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(s.type="BatchedMesh",s.perObjectFrustumCulled=this.perObjectFrustumCulled,s.sortObjects=this.sortObjects,s.drawRanges=this._drawRanges,s.reservedRanges=this._reservedRanges,s.geometryInfo=this._geometryInfo.map(h=>({...h,boundingBox:h.boundingBox?h.boundingBox.toJSON():void 0,boundingSphere:h.boundingSphere?h.boundingSphere.toJSON():void 0})),s.instanceInfo=this._instanceInfo.map(h=>({...h})),s.availableInstanceIds=this._availableInstanceIds.slice(),s.availableGeometryIds=this._availableGeometryIds.slice(),s.nextIndexStart=this._nextIndexStart,s.nextVertexStart=this._nextVertexStart,s.geometryCount=this._geometryCount,s.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.matricesTexture=this._matricesTexture.toJSON(e),s.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(s.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(s.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(s.boundingBox=this.boundingBox.toJSON()));function o(h,f){return h[f.uuid]===void 0&&(h[f.uuid]=f.toJSON(e)),f.uuid}if(this.isScene)this.background&&(this.background.isColor?s.background=this.background.toJSON():this.background.isTexture&&(s.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(s.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){s.geometry=o(e.geometries,this.geometry);const h=this.geometry.parameters;if(h!==void 0&&h.shapes!==void 0){const f=h.shapes;if(Array.isArray(f))for(let p=0,x=f.length;p<x;p++){const y=f[p];o(e.shapes,y)}else o(e.shapes,f)}}if(this.isSkinnedMesh&&(s.bindMode=this.bindMode,s.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(o(e.skeletons,this.skeleton),s.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const h=[];for(let f=0,p=this.material.length;f<p;f++)h.push(o(e.materials,this.material[f]));s.material=h}else s.material=o(e.materials,this.material);if(this.children.length>0){s.children=[];for(let h=0;h<this.children.length;h++)s.children.push(this.children[h].toJSON(e).object)}if(this.animations.length>0){s.animations=[];for(let h=0;h<this.animations.length;h++){const f=this.animations[h];s.animations.push(o(e.animations,f))}}if(t){const h=c(e.geometries),f=c(e.materials),p=c(e.textures),x=c(e.images),y=c(e.shapes),v=c(e.skeletons),S=c(e.animations),M=c(e.nodes);h.length>0&&(i.geometries=h),f.length>0&&(i.materials=f),p.length>0&&(i.textures=p),x.length>0&&(i.images=x),y.length>0&&(i.shapes=y),v.length>0&&(i.skeletons=v),S.length>0&&(i.animations=S),M.length>0&&(i.nodes=M)}return i.object=s,i;function c(h){const f=[];for(const p in h){const x=h[p];delete x.metadata,f.push(x)}return f}}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.pivot=e.pivot!==null?e.pivot.clone():null,this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.static=e.static,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let i=0;i<e.children.length;i++){const s=e.children[i];this.add(s.clone())}return this}}Un.DEFAULT_UP=new Z(0,1,0);Un.DEFAULT_MATRIX_AUTO_UPDATE=!0;Un.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;class Wf extends Un{constructor(){super(),this.isGroup=!0,this.type="Group"}}const _6={type:"move"};class gv{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Wf,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 Wf,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new Z,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new Z),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Wf,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new Z,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new Z,this._grip.eventsEnabled=!1),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 s=null,o=null,c=null;const h=this._targetRay,f=this._grip,p=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(p&&e.hand){c=!0;for(const R of e.hand.values()){const A=t.getJointPose(R,i),w=this._getHandJoint(p,R);A!==null&&(w.matrix.fromArray(A.transform.matrix),w.matrix.decompose(w.position,w.rotation,w.scale),w.matrixWorldNeedsUpdate=!0,w.jointRadius=A.radius),w.visible=A!==null}const x=p.joints["index-finger-tip"],y=p.joints["thumb-tip"],v=x.position.distanceTo(y.position),S=.02,M=.005;p.inputState.pinching&&v>S+M?(p.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!p.inputState.pinching&&v<=S-M&&(p.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else f!==null&&e.gripSpace&&(o=t.getPose(e.gripSpace,i),o!==null&&(f.matrix.fromArray(o.transform.matrix),f.matrix.decompose(f.position,f.rotation,f.scale),f.matrixWorldNeedsUpdate=!0,o.linearVelocity?(f.hasLinearVelocity=!0,f.linearVelocity.copy(o.linearVelocity)):f.hasLinearVelocity=!1,o.angularVelocity?(f.hasAngularVelocity=!0,f.angularVelocity.copy(o.angularVelocity)):f.hasAngularVelocity=!1,f.eventsEnabled&&f.dispatchEvent({type:"gripUpdated",data:e,target:this})));h!==null&&(s=t.getPose(e.targetRaySpace,i),s===null&&o!==null&&(s=o),s!==null&&(h.matrix.fromArray(s.transform.matrix),h.matrix.decompose(h.position,h.rotation,h.scale),h.matrixWorldNeedsUpdate=!0,s.linearVelocity?(h.hasLinearVelocity=!0,h.linearVelocity.copy(s.linearVelocity)):h.hasLinearVelocity=!1,s.angularVelocity?(h.hasAngularVelocity=!0,h.angularVelocity.copy(s.angularVelocity)):h.hasAngularVelocity=!1,this.dispatchEvent(_6)))}return h!==null&&(h.visible=s!==null),f!==null&&(f.visible=o!==null),p!==null&&(p.visible=c!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const i=new Wf;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}const aL={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},du={h:0,s:0,l:0},dy={h:0,s:0,l:0};function I_(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 mt{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(t===void 0&&i===void 0){const s=e;s&&s.isColor?this.copy(s):typeof s=="number"?this.setHex(s):typeof s=="string"&&this.setStyle(s)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=$s){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,_n.colorSpaceToWorking(this,t),this}setRGB(e,t,i,s=_n.workingColorSpace){return this.r=e,this.g=t,this.b=i,_n.colorSpaceToWorking(this,s),this}setHSL(e,t,i,s=_n.workingColorSpace){if(e=Fw(e,1),t=Gt(t,0,1),i=Gt(i,0,1),t===0)this.r=this.g=this.b=i;else{const o=i<=.5?i*(1+t):i+t-i*t,c=2*i-o;this.r=I_(c,o,e+1/3),this.g=I_(c,o,e),this.b=I_(c,o,e-1/3)}
vendor: 6,180 bytes, line 11
11return _n.colorSpaceToWorking(this,s),this}setStyle(e,t=$s){function i(o){o!==void 0&&parseFloat(o)<1&&ct("Color: Alpha component of "+e+" will be ignored.")}let s;if(s=/^(\w+)\(([^\)]*)\)/.exec(e)){let o;const c=s[1],h=s[2];switch(c){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(h))return i(o[4]),this.setRGB(Math.min(255,parseInt(o[1],10))/255,Math.min(255,parseInt(o[2],10))/255,Math.min(255,parseInt(o[3],10))/255,t);if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(h))return i(o[4]),this.setRGB(Math.min(100,parseInt(o[1],10))/100,Math.min(100,parseInt(o[2],10))/100,Math.min(100,parseInt(o[3],10))/100,t);break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(h))return i(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,t);break;default:ct("Color: Unknown color model "+e)}}else if(s=/^\#([A-Fa-f\d]+)$/.exec(e)){const o=s[1],c=o.length;if(c===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,t);if(c===6)return this.setHex(parseInt(o,16),t);ct("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=$s){const i=aL[e.toLowerCase()];return i!==void 0?this.setHex(i,t):ct("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=pc(e.r),this.g=pc(e.g),this.b=pc(e.b),this}copyLinearToSRGB(e){return this.r=qf(e.r),this.g=qf(e.g),this.b=qf(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=$s){return _n.workingToColorSpace(Zs.copy(this),e),Math.round(Gt(Zs.r*255,0,255))*65536+Math.round(Gt(Zs.g*255,0,255))*256+Math.round(Gt(Zs.b*255,0,255))}getHexString(e=$s){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=_n.workingColorSpace){_n.workingToColorSpace(Zs.copy(this),t);const i=Zs.r,s=Zs.g,o=Zs.b,c=Math.max(i,s,o),h=Math.min(i,s,o);let f,p;const x=(h+c)/2;if(h===c)f=0,p=0;else{const y=c-h;switch(p=x<=.5?y/(c+h):y/(2-c-h),c){case i:f=(s-o)/y+(s<o?6:0);break;case s:f=(o-i)/y+2;break;case o:f=(i-s)/y+4;break}f/=6}return e.h=f,e.s=p,e.l=x,e}getRGB(e,t=_n.workingColorSpace){return _n.workingToColorSpace(Zs.copy(this),t),e.r=Zs.r,e.g=Zs.g,e.b=Zs.b,e}getStyle(e=$s){_n.workingToColorSpace(Zs.copy(this),e);const t=Zs.r,i=Zs.g,s=Zs.b;return e!==$s?`color(${e} ${t.toFixed(3)} ${i.toFixed(3)} ${s.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(i*255)},${Math.round(s*255)})`}offsetHSL(e,t,i){return this.getHSL(du),this.setHSL(du.h+e,du.s+t,du.l+i)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,i){return this.r=e.r+(t.r-e.r)*i,this.g=e.g+(t.g-e.g)*i,this.b=e.b+(t.b-e.b)*i,this}lerpHSL(e,t){this.getHSL(du),e.getHSL(dy);const i=Rg(du.h,dy.h,t),s=Rg(du.s,dy.s,t),o=Rg(du.l,dy.l,t);return this.setHSL(i,s,o),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,i=this.g,s=this.b,o=e.elements;return this.r=o[0]*t+o[3]*i+o[6]*s,this.g=o[1]*t+o[4]*i+o[7]*s,this.b=o[2]*t+o[5]*i+o[8]*s,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const Zs=new mt;mt.NAMES=aL;class Q1{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new mt(e),this.density=t}clone(){return new Q1(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class J1{constructor(e,t=1,i=1e3){this.isFog=!0,this.name="",this.color=new mt(e),this.near=t,this.far=i}clone(){return new J1(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class Hw extends Un{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new No,this.environmentIntensity=1,this.environmentRotation=new No,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}}const vo=new Z,ac=new Z,P_=new Z,rc=new Z,vf=new Z,bf=new Z,u3=new Z,U_=new Z,O_=ne
vendor: 10,620 bytes, line 11
11w Z,z_=new Z,B_=new Xn,V_=new Xn,F_=new Xn;class Wa{constructor(e=new Z,t=new Z,i=new Z){this.a=e,this.b=t,this.c=i}static getNormal(e,t,i,s){s.subVectors(i,t),vo.subVectors(e,t),s.cross(vo);const o=s.lengthSq();return o>0?s.multiplyScalar(1/Math.sqrt(o)):s.set(0,0,0)}static getBarycoord(e,t,i,s,o){vo.subVectors(s,t),ac.subVectors(i,t),P_.subVectors(e,t);const c=vo.dot(vo),h=vo.dot(ac),f=vo.dot(P_),p=ac.dot(ac),x=ac.dot(P_),y=c*p-h*h;if(y===0)return o.set(0,0,0),null;const v=1/y,S=(p*f-h*x)*v,M=(c*x-h*f)*v;return o.set(1-S-M,M,S)}static containsPoint(e,t,i,s){return this.getBarycoord(e,t,i,s,rc)===null?!1:rc.x>=0&&rc.y>=0&&rc.x+rc.y<=1}static getInterpolation(e,t,i,s,o,c,h,f){return this.getBarycoord(e,t,i,s,rc)===null?(f.x=0,f.y=0,"z"in f&&(f.z=0),"w"in f&&(f.w=0),null):(f.setScalar(0),f.addScaledVector(o,rc.x),f.addScaledVector(c,rc.y),f.addScaledVector(h,rc.z),f)}static getInterpolatedAttribute(e,t,i,s,o,c){return B_.setScalar(0),V_.setScalar(0),F_.setScalar(0),B_.fromBufferAttribute(e,t),V_.fromBufferAttribute(e,i),F_.fromBufferAttribute(e,s),c.setScalar(0),c.addScaledVector(B_,o.x),c.addScaledVector(V_,o.y),c.addScaledVector(F_,o.z),c}static isFrontFacing(e,t,i,s){return vo.subVectors(i,t),ac.subVectors(e,t),vo.cross(ac).dot(s)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,s){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[s]),this}setFromAttributeAndIndices(e,t,i,s){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,s),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 vo.subVectors(this.c,this.b),ac.subVectors(this.a,this.b),vo.cross(ac).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Wa.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Wa.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,i,s,o){return Wa.getInterpolation(e,this.a,this.b,this.c,t,i,s,o)}containsPoint(e){return Wa.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Wa.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,s=this.b,o=this.c;let c,h;vf.subVectors(s,i),bf.subVectors(o,i),U_.subVectors(e,i);const f=vf.dot(U_),p=bf.dot(U_);if(f<=0&&p<=0)return t.copy(i);O_.subVectors(e,s);const x=vf.dot(O_),y=bf.dot(O_);if(x>=0&&y<=x)return t.copy(s);const v=f*y-x*p;if(v<=0&&f>=0&&x<=0)return c=f/(f-x),t.copy(i).addScaledVector(vf,c);z_.subVectors(e,o);const S=vf.dot(z_),M=bf.dot(z_);if(M>=0&&S<=M)return t.copy(o);const R=S*p-f*M;if(R<=0&&p>=0&&M<=0)return h=p/(p-M),t.copy(i).addScaledVector(bf,h);const A=x*M-S*y;if(A<=0&&y-x>=0&&S-M>=0)return u3.subVectors(o,s),h=(y-x)/(y-x+(S-M)),t.copy(s).addScaledVector(u3,h);const w=1/(A+R+v);return c=R*w,h=v*w,t.copy(i).addScaledVector(vf,c).addScaledVector(bf,h)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}class Js{constructor(e=new Z(1/0,1/0,1/0),t=new Z(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,i=e.length;t<i;t+=3)this.expandByPoint(bo.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,i=e.count;t<i;t++)this.expandByPoint(bo.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,i=e.length;t<i;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const i=bo.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(i),this.max.copy(e).add(i),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);const i=e.geometry;if(i!==void 0){const o=i.getAttribute("position");if(t===!0&&o!==void 0&&e.isInstancedMesh!==!0)for(let c=0,h=o.count;c<h;c++)e.isMesh===!0?e.getVertexPosition(c,bo):bo.fromBufferAttribute(o,c),bo.applyMatrix4(e.matrixWorld),this.expandByPoint(bo);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),hy.copy(e.boundingBox)):(i.boundingBox===null&&i.computeBoundingBox(),hy.copy(i.boundingBox)),hy.applyMatrix4(e.matrixWorld),this.union(hy)}const s=e.children;for(let o=0,c=s.length;o<c;o++)this.expandByObject(s[o],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,bo),bo.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(Zm),fy.subVectors(this.max,Zm),_f.subVectors(e.a,Zm),Sf.subVectors(e.b,Zm),Mf.subVectors(e.c,Zm),hu.subVectors(Sf,_f),fu.subVectors(Mf,Sf),Md.subVectors(_f,Mf);let t=[0,-hu.z,hu.y,0,-fu.z,fu.y,0,-Md.z,Md.y,hu.z,0,-hu.x,fu.z,0,-fu.x,Md.z,0,-Md.x,-hu.y,hu.x,0,-fu.y,fu.x,0,-Md.y,Md.x,0];return!k_(t,_f,Sf,Mf,fy)||(t=[1,0,0,0,1,0,0,0,1],!k_(t,_f,Sf,Mf,fy))?!1:(py.crossVectors(hu,fu),t=[py.x,py.y,py.z],k_(t,_f,Sf,Mf,fy))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,bo).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(bo).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:(oc[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),oc[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),oc[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),oc[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),oc[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),oc[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),oc[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),oc[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(oc),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}}const oc=[new Z,new Z,new Z,new Z,new Z,new Z,new Z,new Z],bo=new Z,hy=new Js,_f=new Z,Sf=new Z,Mf=new Z,hu=new Z,fu=new Z,Md=new Z,Zm=new Z,fy=new Z,py=new Z,wd=new Z;function k_(n,e,t,i,s){for(let o=0,c=n.length-3;o<=c;o+=3){wd.fromArray(n,o);const h=s.x*Math.abs(wd.x)+s.y*Math.abs(wd.y)+s.z*Math.abs(wd.z),f=e.dot(wd),p=t.dot(wd),x=i.dot(wd);if(Math.max(-Math.max(f,p,x),Math.min(f,p,x))>h)return!1}return!0}const hc=S6();function S6(){const n=new ArrayBuffer(4),e=new Float32Array(n),t=new Uint32Array(n),i=new Uint32Array(512),s=new Uint32Array(512);for(let f=0;f<256;++f){const p=f-127;p<-27?(i[f]=0,i[f|256]=32768,s[f]=24,s[f|256]=24):p<-14?(i[f]=1024>>-p-14,i[f|256]=1024>>-p-14|32768,s[f]=-p-1,s[f|256]=-p-1):p<=15?(i[f]=p+15<<10,i[f|256]=p+15<<10|32768,s[f]=13,s[f|256]=13):p<128?(i[f]=31744,i[f|256]=64512,s[f]=24,s[f|256]=24):(i[f]=31744,i[f|256]=64512,s[f]=13,s[f|256]=13)}const o=new Uint32Array(2048),c=new Uint32Array(64),h=new Uint32Array(64);for(let f=1;f<1024;++f){let p=f<<13,x=0;for(;(p&8388608)===0;)p<<=1,x-=8388608;p&=-8388609,x+=947912704,o[f]=p|x}for(let f=1024;f<2048;++f)o[f]=939524096+(f-1024<<13);for(let f=1;f<31;++f)c[f]=f<<23;c[31]=1199570944,c[32]=2147483648;for(let f=33;f<63;++f)c[f]=2147483648+(f-32<<23);c[63]=3347054592;for(let f=1;f<64;++f)f!==32&&(h[f]=1024);return{floatView:e,uint32View:t,baseTable:i,shiftTable:s,mantissaTable:o,exponentTable:c,offsetTable:h}}function Ga(n){Math.abs(n)>65504&&ct("DataUtils.toHalfFloat(): Value out of range."),n=Gt(n,-65504,65504),hc.floatView[0]=n;const e=hc.uint32View[0],t=e>>23&511;return hc.baseTable[t]+((e&8388607)>>hc.shiftTable[t])}function dg(n){const e=n>>10;return hc.uint32View[0]=hc.mantissaTable[hc.offsetTable[e]+(n&1023)]+hc.exponentTable[e],hc.floatView[0]}class M6{static toHalfFloat(e){return Ga(e)}static fromHalfFloat(e){return dg(e)}}const ts=new Z,my=new je;let w6=0;class Vn extends Do{constructor(e,t,i=!1){if(super(),Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:w6++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=Yg,this.updateRanges=[],this.gpuType=ya,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;
vendor: 5,948 bytes, line 11
11for(let s=0,o=this.itemSize;s<o;s++)this.array[e+s]=t.array[i+s];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,i=this.count;t<i;t++)my.fromBufferAttribute(this,t),my.applyMatrix3(e),this.setXY(t,my.x,my.y);else if(this.itemSize===3)for(let t=0,i=this.count;t<i;t++)ts.fromBufferAttribute(this,t),ts.applyMatrix3(e),this.setXYZ(t,ts.x,ts.y,ts.z);return this}applyMatrix4(e){for(let t=0,i=this.count;t<i;t++)ts.fromBufferAttribute(this,t),ts.applyMatrix4(e),this.setXYZ(t,ts.x,ts.y,ts.z);return this}applyNormalMatrix(e){for(let t=0,i=this.count;t<i;t++)ts.fromBufferAttribute(this,t),ts.applyNormalMatrix(e),this.setXYZ(t,ts.x,ts.y,ts.z);return this}transformDirection(e){for(let t=0,i=this.count;t<i;t++)ts.fromBufferAttribute(this,t),ts.transformDirection(e),this.setXYZ(t,ts.x,ts.y,ts.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let i=this.array[e*this.itemSize+t];return this.normalized&&(i=ma(i,this.array)),i}setComponent(e,t,i){return this.normalized&&(i=cn(i,this.array)),this.array[e*this.itemSize+t]=i,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=ma(t,this.array)),t}setX(e,t){return this.normalized&&(t=cn(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=ma(t,this.array)),t}setY(e,t){return this.normalized&&(t=cn(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=ma(t,this.array)),t}setZ(e,t){return this.normalized&&(t=cn(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=ma(t,this.array)),t}setW(e,t){return this.normalized&&(t=cn(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,i){return e*=this.itemSize,this.normalized&&(t=cn(t,this.array),i=cn(i,this.array)),this.array[e+0]=t,this.array[e+1]=i,this}setXYZ(e,t,i,s){return e*=this.itemSize,this.normalized&&(t=cn(t,this.array),i=cn(i,this.array),s=cn(s,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=s,this}setXYZW(e,t,i,s,o){return e*=this.itemSize,this.normalized&&(t=cn(t,this.array),i=cn(i,this.array),s=cn(s,this.array),o=cn(o,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=s,this.array[e+3]=o,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==Yg&&(e.usage=this.usage),e}dispose(){this.dispatchEvent({type:"dispose"})}}class T6 extends Vn{constructor(e,t,i){super(new Int8Array(e),t,i)}}class E6 extends Vn{constructor(e,t,i){super(new Uint8Array(e),t,i)}}class A6 extends Vn{constructor(e,t,i){super(new Uint8ClampedArray(e),t,i)}}class C6 extends Vn{constructor(e,t,i){super(new Int16Array(e),t,i)}}class Gw extends Vn{constructor(e,t,i){super(new Uint16Array(e),t,i)}}class R6 extends Vn{constructor(e,t,i){super(new Int32Array(e),t,i)}}class jw extends Vn{constructor(e,t,i){super(new Uint32Array(e),t,i)}}class N6 extends Vn{constructor(e,t,i){super(new Uint16Array(e),t,i),this.isFloat16BufferAttribute=!0}getX(e){let t=dg(this.array[e*this.itemSize]);return this.normalized&&(t=ma(t,this.array)),t}setX(e,t){return this.normalized&&(t=cn(t,this.array)),this.array[e*this.itemSize]=Ga(t),this}getY(e){let t=dg(this.array[e*this.itemSize+1]);return this.normalized&&(t=ma(t,this.array)),t}setY(e,t){return this.normalized&&(t=cn(t,this.array)),this.array[e*this.itemSize+1]=Ga(t),this}getZ(e){let t=dg(this.array[e*this.itemSize+2]);return this.normalized&&(t=ma(t,this.array)),t}setZ(e,t){return this.normalized&&(t=cn(t,this.array)),this.array[e*this.itemSize+2]=Ga(t),this}getW(e){let t=dg(this.array[e*this.itemSize+3]);return this.normalized&&(t=ma(t,this.array)),t}setW(e,t){return this.normalized&&(t=cn(t,this.array)),this.array[e*this.itemSize+3]=Ga(t),this}setXY(e,t,i){return e*=this.itemSize,this.normalized&&(t=cn(t,this.array),i=cn(i,this.array)),this.array[e+0]=Ga(t),this.array[e+1]=Ga(i),this}setXYZ(e,t,i,s){return e*=this.itemSize,this.normalized&&(t=cn(t,this.array),i=cn(i,this.array),s=cn(s,this.array)),this.array[e+0]=Ga(t),this.array[e+1]=Ga(i),this.array[e+2]=Ga(s),this}setXYZW(e,t,i,s,o){return e*=this.itemSize,this.normalized&&(t=cn(t,this.array),i=cn(i,this.array),s=cn(s,this.array),o=cn(o,this.array)),this.array[e+0]=Ga(t),this.array[e+1]=Ga(i),this.array[e+2]=Ga(s),this.array[e+3]=Ga(o),this}}class bt extends Vn{constructor(e,t,i){super(new Float32Array(e),t,i)}}const D6=new Js,Km=new Z,H_=new Z;class Ps{constructor(e=new Z,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const i=this.center;t!==void 0?i.copy(t):D6.setFromPoints(e).getCenter(i);let s=0;for(let o=0,c=e.length;o<c;o++)s=Math.max(s,i.distanceToSquared(e[o]));return this.radius=Math.sqrt(s),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const i=this.center.distanceToSquared(e);return t.copy(e),i>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}
vendor: 18,256 bytes, line 11
11applyMatrix4(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;Km.subVectors(e,this.center);const t=Km.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),s=(i-this.radius)*.5;this.center.addScaledVector(Km,s/i),this.radius+=s}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):(H_.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Km.copy(e.center).add(H_)),this.expandByPoint(Km.copy(e.center).sub(H_))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}}let L6=0;const Fr=new Yt,G_=new Un,wf=new Z,or=new Js,$m=new Js,ys=new Z;class Kt extends Do{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:L6++}),this.uuid=cr(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(kF(e)?jw:Gw)(e,1):this.index=e,this}setIndirect(e,t=0){return this.indirect=e,this.indirectOffset=t,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,i=0){this.groups.push({start:e,count:t,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);const i=this.attributes.normal;if(i!==void 0){const o=new Qt().getNormalMatrix(e);i.applyNormalMatrix(o),i.needsUpdate=!0}const s=this.attributes.tangent;return s!==void 0&&(s.transformDirection(e),s.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return Fr.makeRotationFromQuaternion(e),this.applyMatrix4(Fr),this}rotateX(e){return Fr.makeRotationX(e),this.applyMatrix4(Fr),this}rotateY(e){return Fr.makeRotationY(e),this.applyMatrix4(Fr),this}rotateZ(e){return Fr.makeRotationZ(e),this.applyMatrix4(Fr),this}translate(e,t,i){return Fr.makeTranslation(e,t,i),this.applyMatrix4(Fr),this}scale(e,t,i){return Fr.makeScale(e,t,i),this.applyMatrix4(Fr),this}lookAt(e){return G_.lookAt(e),G_.updateMatrix(),this.applyMatrix4(G_.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(wf).negate(),this.translate(wf.x,wf.y,wf.z),this}setFromPoints(e){const t=this.getAttribute("position");if(t===void 0){const i=[];for(let s=0,o=e.length;s<o;s++){const c=e[s];i.push(c.x,c.y,c.z||0)}this.setAttribute("position",new bt(i,3))}else{const i=Math.min(e.length,t.count);for(let s=0;s<i;s++){const o=e[s];t.setXYZ(s,o.x,o.y,o.z||0)}e.length>t.count&&ct("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Js);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){Et("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new Z(-1/0,-1/0,-1/0),new Z(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let i=0,s=t.length;i<s;i++){const o=t[i];or.setFromBufferAttribute(o),this.morphTargetsRelative?(ys.addVectors(this.boundingBox.min,or.min),this.boundingBox.expandByPoint(ys),ys.addVectors(this.boundingBox.max,or.max),this.boundingBox.expandByPoint(ys)):(this.boundingBox.expandByPoint(or.min),this.boundingBox.expandByPoint(or.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&Et('BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Ps);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){Et("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new Z,1/0);return}if(e){const i=this.boundingSphere.center;if(or.setFromBufferAttribute(e),t)for(let o=0,c=t.length;o<c;o++){const h=t[o];$m.setFromBufferAttribute(h),this.morphTargetsRelative?(ys.addVectors(or.min,$m.min),or.expandByPoint(ys),ys.addVectors(or.max,$m.max),or.expandByPoint(ys)):(or.expandByPoint($m.min),or.expandByPoint($m.max))}or.getCenter(i);let s=0;for(let o=0,c=e.count;o<c;o++)ys.fromBufferAttribute(e,o),s=Math.max(s,i.distanceToSquared(ys));if(t)for(let o=0,c=t.length;o<c;o++){const h=t[o],f=this.morphTargetsRelative;for(let p=0,x=h.count;p<x;p++)ys.fromBufferAttribute(h,p),f&&(wf.fromBufferAttribute(e,p),ys.add(wf)),s=Math.max(s,i.distanceToSquared(ys))}this.boundingSphere.radius=Math.sqrt(s),isNaN(this.boundingSphere.radius)&&Et('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){Et("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const i=t.position,s=t.normal,o=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new Vn(new Float32Array(4*i.count),4));const c=this.getAttribute("tangent"),h=[],f=[];for(let P=0;P<i.count;P++)h[P]=new Z,f[P]=new Z;const p=new Z,x=new Z,y=new Z,v=new je,S=new je,M=new je,R=new Z,A=new Z;function w(P,V,j){p.fromBufferAttribute(i,P),x.fromBufferAttribute(i,V),y.fromBufferAttribute(i,j),v.fromBufferAttribute(o,P),S.fromBufferAttribute(o,V),M.fromBufferAttribute(o,j),x.sub(p),y.sub(p),S.sub(v),M.sub(v);const W=1/(S.x*M.y-M.x*S.y);isFinite(W)&&(R.copy(x).multiplyScalar(M.y).addScaledVector(y,-S.y).multiplyScalar(W),A.copy(y).multiplyScalar(S.x).addScaledVector(x,-M.x).multiplyScalar(W),h[P].add(R),h[V].add(R),h[j].add(R),f[P].add(A),f[V].add(A),f[j].add(A))}let N=this.groups;N.length===0&&(N=[{start:0,count:e.count}]);for(let P=0,V=N.length;P<V;++P){const j=N[P],W=j.start,ee=j.count;for(let ie=W,ue=W+ee;ie<ue;ie+=3)w(e.getX(ie+0),e.getX(ie+1),e.getX(ie+2))}const L=new Z,I=new Z,B=new Z,O=new Z;function F(P){B.fromBufferAttribute(s,P),O.copy(B);const V=h[P];L.copy(V),L.sub(B.multiplyScalar(B.dot(V))).normalize(),I.crossVectors(O,V);const W=I.dot(f[P])<0?-1:1;c.setXYZW(P,L.x,L.y,L.z,W)}for(let P=0,V=N.length;P<V;++P){const j=N[P],W=j.start,ee=j.count;for(let ie=W,ue=W+ee;ie<ue;ie+=3)F(e.getX(ie+0)),F(e.getX(ie+1)),F(e.getX(ie+2))}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(t!==void 0){let i=this.getAttribute("normal");if(i===void 0)i=new Vn(new Float32Array(t.count*3),3),this.setAttribute("normal",i);else for(let v=0,S=i.count;v<S;v++)i.setXYZ(v,0,0,0);const s=new Z,o=new Z,c=new Z,h=new Z,f=new Z,p=new Z,x=new Z,y=new Z;if(e)for(let v=0,S=e.count;v<S;v+=3){const M=e.getX(v+0),R=e.getX(v+1),A=e.getX(v+2);s.fromBufferAttribute(t,M),o.fromBufferAttribute(t,R),c.fromBufferAttribute(t,A),x.subVectors(c,o),y.subVectors(s,o),x.cross(y),h.fromBufferAttribute(i,M),f.fromBufferAttribute(i,R),p.fromBufferAttribute(i,A),h.add(x),f.add(x),p.add(x),i.setXYZ(M,h.x,h.y,h.z),i.setXYZ(R,f.x,f.y,f.z),i.setXYZ(A,p.x,p.y,p.z)}else for(let v=0,S=t.count;v<S;v+=3)s.fromBufferAttribute(t,v+0),o.fromBufferAttribute(t,v+1),c.fromBufferAttribute(t,v+2),x.subVectors(c,o),y.subVectors(s,o),x.cross(y),i.setXYZ(v+0,x.x,x.y,x.z),i.setXYZ(v+1,x.x,x.y,x.z),i.setXYZ(v+2,x.x,x.y,x.z);this.normalizeNormals(),i.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,i=e.count;t<i;t++)ys.fromBufferAttribute(e,t),ys.normalize(),e.setXYZ(t,ys.x,ys.y,ys.z)}toNonIndexed(){function e(h,f){const p=h.array,x=h.itemSize,y=h.normalized,v=new p.constructor(f.length*x);let S=0,M=0;for(let R=0,A=f.length;R<A;R++){h.isInterleavedBufferAttribute?S=f[R]*h.data.stride+h.offset:S=f[R]*x;for(let w=0;w<x;w++)v[M++]=p[S++]}return new Vn(v,x,y)}if(this.index===null)return ct("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new Kt,i=this.index.array,s=this.attributes;for(const h in s){const f=s[h],p=e(f,i);t.setAttribute(h,p)}const o=this.morphAttributes;for(const h in o){const f=[],p=o[h];for(let x=0,y=p.length;x<y;x++){const v=p[x],S=e(v,i);f.push(S)}t.morphAttributes[h]=f}t.morphTargetsRelative=this.morphTargetsRelative;const c=this.groups;for(let h=0,f=c.length;h<f;h++){const p=c[h];t.addGroup(p.start,p.count,p.materialIndex)}return t}toJSON(){const e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){const f=this.parameters;for(const p in f)f[p]!==void 0&&(e[p]=f[p]);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 f in i){const p=i[f];e.data.attributes[f]=p.toJSON(e.data)}const s={};let o=!1;for(const f in this.morphAttributes){const p=this.morphAttributes[f],x=[];for(let y=0,v=p.length;y<v;y++){const S=p[y];x.push(S.toJSON(e.data))}x.length>0&&(s[f]=x,o=!0)}o&&(e.data.morphAttributes=s,e.data.morphTargetsRelative=this.morphTargetsRelative);const c=this.groups;c.length>0&&(e.data.groups=JSON.parse(JSON.stringify(c)));const h=this.boundingSphere;return h!==null&&(e.data.boundingSphere=h.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone());const s=e.attributes;for(const p in s){const x=s[p];this.setAttribute(p,x.clone(t))}const o=e.morphAttributes;for(const p in o){const x=[],y=o[p];for(let v=0,S=y.length;v<S;v++)x.push(y[v].clone(t));this.morphAttributes[p]=x}this.morphTargetsRelative=e.morphTargetsRelative;const c=e.groups;for(let p=0,x=c.length;p<x;p++){const y=c[p];this.addGroup(y.start,y.count,y.materialIndex)}const h=e.boundingBox;h!==null&&(this.boundingBox=h.clone());const f=e.boundingSphere;return f!==null&&(this.boundingSphere=f.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}class eb{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=Yg,this.updateRanges=[],this.version=0,this.uuid=cr()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.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 s=0,o=this.stride;s<o;s++)this.array[e+s]=t.array[i+s];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=cr()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),i=new this.constructor(t,this.stride);return i.setUsage(this.usage),i}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=cr()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const ha=new Z;class Qd{constructor(e,t,i,s=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=i,this.normalized=s}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,i=this.data.count;t<i;t++)ha.fromBufferAttribute(this,t),ha.applyMatrix4(e),this.setXYZ(t,ha.x,ha.y,ha.z);return this}applyNormalMatrix(e){for(let t=0,i=this.count;t<i;t++)ha.fromBufferAttribute(this,t),ha.applyNormalMatrix(e),this.setXYZ(t,ha.x,ha.y,ha.z);return this}transformDirection(e){for(let t=0,i=this.count;t<i;t++)ha.fromBufferAttribute(this,t),ha.transformDirection(e),this.setXYZ(t,ha.x,ha.y,ha.z);return this}getComponent(e,t){let i=this.array[e*this.data.stride+this.offset+t];return this.normalized&&(i=ma(i,this.array)),i}setComponent(e,t,i){return this.normalized&&(i=cn(i,this.array)),this.data.array[e*this.data.stride+this.offset+t]=i,this}setX(e,t){return this.normalized&&(t=cn(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=cn(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=cn(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=cn(t,this.array)),this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){let t=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(t=ma(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=ma(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=ma(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=ma(t,this.array)),t}setXY(e,t,i){return e=e*this.data.stride+this.offset,this.normalized&&(t=cn(t,this.array),i=cn(i,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=i,this}setXYZ(e,t,i,s){return e=e*this.data.stride+this.offset,this.normalized&&(t=cn(t,this.array),i=cn(i,this.array),s=cn(s,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=i,this.data.array[e+2]=s,this}setXYZW(e,t,i,s,o){return e=e*this.data.stride+this.offset,this.normalized&&(t=cn(t,this.array),i=cn(i,this.array),s=cn(s,this.array),o=cn(o,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=i,this.data.array[e+2]=s,this.data.array[e+3]=o,this}clone(e){if(e===void 0){Kg("InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let i=0;i<this.count;i++){const s=i*this.data.stride+this.offset;for(let o=0;o<this.itemSize;o++)t.push(this.data.array[s+o])}return new Vn(new this.array.constructor(t),this.itemSize,this.normalized)}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new Qd(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){Kg("InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let i=0;i<this.count;i++){const s=i*this.data.stride+this.offset;for(let o=0;o<this.itemSize;o++)t.push(this.data.array[s+o])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:t,normalized:this.normalized}}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}let I6=0;class ea extends Do{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:I6++}),this.uuid=cr(),this.name="",this.type="Material",this.blending=qd,this.side=xc,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Nv,this.blendDst=Dv,this.blendEquation=bu,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new mt(0,0,0),this.blendAlpha=0,this.depthFunc=Kd,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=xM,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Od,this.stencilZFail=Od,this.stencilZPass=Od,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const i=e[t];if(i===void 0){ct(`Material: parameter '${t}' has value of undefined.`);continue}const s=this[t];if(s===void 0){ct(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}s&&s.isColor?s.set(i):s&&s.isVector3&&i&&i.isVector3?s.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const i={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};
vendor: 6,195 bytes, line 11
11i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(i.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(i.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(i.dispersion=this.dispersion),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapRotation!==void 0&&(i.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==qd&&(i.blending=this.blending),this.side!==xc&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==Nv&&(i.blendSrc=this.blendSrc),this.blendDst!==Dv&&(i.blendDst=this.blendDst),this.blendEquation!==bu&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==Kd&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==xM&&
vendor: 9,239 bytes, line 11
11(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Od&&(i.stencilFail=this.stencilFail),this.stencilZFail!==Od&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==Od&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.allowOverride===!1&&(i.allowOverride=!1),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function s(o){const c=[];for(const h in o){const f=o[h];delete f.metadata,c.push(f)}return c}if(t){const o=s(e.textures),c=s(e.images);o.length>0&&(i.textures=o),c.length>0&&(i.images=c)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let i=null;if(t!==null){const s=t.length;i=new Array(s);for(let o=0;o!==s;++o)i[o]=t[o].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class Ww extends ea{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new mt(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}let Tf;const Qm=new Z,Ef=new Z,Af=new Z,Cf=new je,Jm=new je,rL=new Yt,gy=new Z,eg=new Z,xy=new Z,d3=new je,j_=new je,h3=new je;class oL extends Un{constructor(e=new Ww){if(super(),this.isSprite=!0,this.type="Sprite",Tf===void 0){Tf=new Kt;const t=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),i=new eb(t,5);Tf.setIndex([0,1,2,0,2,3]),Tf.setAttribute("position",new Qd(i,3,0,!1)),Tf.setAttribute("uv",new Qd(i,2,3,!1))}this.geometry=Tf,this.material=e,this.center=new je(.5,.5),this.count=1}raycast(e,t){e.camera===null&&Et('Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),Ef.setFromMatrixScale(this.matrixWorld),rL.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),Af.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&Ef.multiplyScalar(-Af.z);const i=this.material.rotation;let s,o;i!==0&&(o=Math.cos(i),s=Math.sin(i));const c=this.center;yy(gy.set(-.5,-.5,0),Af,c,Ef,s,o),yy(eg.set(.5,-.5,0),Af,c,Ef,s,o),yy(xy.set(.5,.5,0),Af,c,Ef,s,o),d3.set(0,0),j_.set(1,0),h3.set(1,1);let h=e.ray.intersectTriangle(gy,eg,xy,!1,Qm);if(h===null&&(yy(eg.set(-.5,.5,0),Af,c,Ef,s,o),j_.set(0,1),h=e.ray.intersectTriangle(gy,xy,eg,!1,Qm),h===null))return;const f=e.ray.origin.distanceTo(Qm);f<e.near||f>e.far||t.push({distance:f,point:Qm.clone(),uv:Wa.getInterpolation(Qm,gy,eg,xy,d3,j_,h3,new je),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 yy(n,e,t,i,s,o){Cf.subVectors(n,t).addScalar(.5).multiply(i),s!==void 0?(Jm.x=o*Cf.x-s*Cf.y,Jm.y=s*Cf.x+o*Cf.y):Jm.copy(Cf),n.copy(e),n.x+=Jm.x,n.y+=Jm.y,n.applyMatrix4(rL)}const vy=new Z,f3=new Z;class lL extends Un{constructor(){super(),this.isLOD=!0,this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let i=0,s=t.length;i<s;i++){const o=t[i];this.addLevel(o.object.clone(),o.distance,o.hysteresis)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,t=0,i=0){t=Math.abs(t);const s=this.levels;let o;for(o=0;o<s.length&&!(t<s[o].distance);o++);return s.splice(o,0,{distance:t,hysteresis:i,object:e}),this.add(e),this}removeLevel(e){const t=this.levels;for(let i=0;i<t.length;i++)if(t[i].distance===e){const s=t.splice(i,1);return this.remove(s[0].object),!0}return!1}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const t=this.levels;if(t.length>0){let i,s;for(i=1,s=t.length;i<s;i++){let o=t[i].distance;if(t[i].object.visible&&(o-=o*t[i].hysteresis),e<o)break}return t[i-1].object}return null}raycast(e,t){if(this.levels.length>0){vy.setFromMatrixPosition(this.matrixWorld);const s=e.ray.origin.distanceTo(vy);this.getObjectForDistance(s).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){vy.setFromMatrixPosition(e.matrixWorld),f3.setFromMatrixPosition(this.matrixWorld);const i=vy.distanceTo(f3)/e.zoom;t[0].object.visible=!0;let s,o;for(s=1,o=t.length;s<o;s++){let c=t[s].distance;if(t[s].object.visible&&(c-=c*t[s].hysteresis),i>=c)t[s-1].object.visible=!1,t[s].object.visible=!0;else break}for(this._currentLevel=s-1;s<o;s++)t[s].object.visible=!1}}toJSON(e){const t=super.toJSON(e);this.autoUpdate===!1&&(t.object.autoUpdate=!1),t.object.levels=[];const i=this.levels;for(let s=0,o=i.length;s<o;s++){const c=i[s];t.object.levels.push({object:c.object.uuid,distance:c.distance,hysteresis:c.hysteresis})}return t}}const lc=new Z,W_=new Z,by=new Z,pu=new Z,X_=new Z,_y=new Z,q_=new Z;class hp{constructor(e=new Z,t=new Z(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,lc)),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=lc.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(lc.copy(this.origin).addScaledVector(this.direction,t),lc.distanceToSquared(e))}distanceSqToSegment(e,t,i,s){W_.copy(e).add(t).multiplyScalar(.5),by.copy(t).sub(e).normalize(),pu.copy(this.origin).sub(W_);const o=e.distanceTo(t)*.5,c=-this.direction.dot(by),h=pu.dot(this.direction),f=-pu.dot(by),p=pu.lengthSq(),x=Math.abs(1-c*c);let y,v,S,M;if(x>0)if(y=c*f-h,v=c*h-f,M=o*x,y>=0)if(v>=-M)if(v<=M){const R=1/x;y*=R,v*=R,S=y*(y+c*v+2*h)+v*(c*y+v+2*f)+p}else v=o,y=Math.max(0,-(c*v+h)),S=-y*y+v*(v+2*f)+p;else v=-o,y=Math.max(0,-(c*v+h)),S=-y*y+v*(v+2*f)+p;else v<=-M?(y=Math.max(0,-(-c*o+h)),v=y>0?-o:Math.min(Math.max(-o,-f),o),S=-y*y+v*(v+2*f)+p):v<=M?(y=0,v=Math.min(Math.max(-o,-f),o),S=v*(v+2*f)+p):(y=Math.max(0,-(c*o+h)),v=y>0?o:Math.min(Math.max(-o,-f),o),S=-y*y+v*(v+2*f)+p);else v=c>0?-o:o,y=Math.max(0,-(c*v+h)),S=-y*y+v*(v+2*f)+p;
vendor: 12,878 bytes, line 11
11return i&&i.copy(this.origin).addScaledVector(this.direction,y),s&&s.copy(W_).addScaledVector(by,v),S}intersectSphere(e,t){lc.subVectors(e.center,this.origin);const i=lc.dot(this.direction),s=lc.dot(lc)-i*i,o=e.radius*e.radius;if(s>o)return null;const c=Math.sqrt(o-s),h=i-c,f=i+c;return f<0?null:h<0?this.at(f,t):this.at(h,t)}intersectsSphere(e){return e.radius<0?!1: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,s,o,c,h,f;const p=1/this.direction.x,x=1/this.direction.y,y=1/this.direction.z,v=this.origin;return p>=0?(i=(e.min.x-v.x)*p,s=(e.max.x-v.x)*p):(i=(e.max.x-v.x)*p,s=(e.min.x-v.x)*p),x>=0?(o=(e.min.y-v.y)*x,c=(e.max.y-v.y)*x):(o=(e.max.y-v.y)*x,c=(e.min.y-v.y)*x),i>c||o>s||((o>i||isNaN(i))&&(i=o),(c<s||isNaN(s))&&(s=c),y>=0?(h=(e.min.z-v.z)*y,f=(e.max.z-v.z)*y):(h=(e.max.z-v.z)*y,f=(e.min.z-v.z)*y),i>f||h>s)||((h>i||i!==i)&&(i=h),(f<s||s!==s)&&(s=f),s<0)?null:this.at(i>=0?i:s,t)}intersectsBox(e){return this.intersectBox(e,lc)!==null}intersectTriangle(e,t,i,s,o){X_.subVectors(t,e),_y.subVectors(i,e),q_.crossVectors(X_,_y);let c=this.direction.dot(q_),h;if(c>0){if(s)return null;h=1}else if(c<0)h=-1,c=-c;else return null;pu.subVectors(this.origin,e);const f=h*this.direction.dot(_y.crossVectors(pu,_y));if(f<0)return null;const p=h*this.direction.dot(X_.cross(pu));if(p<0||f+p>c)return null;const x=-h*pu.dot(q_);return x<0?null:this.at(x/c,o)}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 Uu extends ea{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new mt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new No,this.combine=f0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const p3=new Yt,Td=new hp,Sy=new Ps,m3=new Z,My=new Z,wy=new Z,Ty=new Z,Y_=new Z,Ey=new Z,g3=new Z,Ay=new Z;class ss extends Un{constructor(e=new Kt,t=new Uu){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const s=t[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,c=s.length;o<c;o++){const h=s[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[h]=o}}}}getVertexPosition(e,t){const i=this.geometry,s=i.attributes.position,o=i.morphAttributes.position,c=i.morphTargetsRelative;t.fromBufferAttribute(s,e);const h=this.morphTargetInfluences;if(o&&h){Ey.set(0,0,0);for(let f=0,p=o.length;f<p;f++){const x=h[f],y=o[f];x!==0&&(Y_.fromBufferAttribute(y,e),c?Ey.addScaledVector(Y_,x):Ey.addScaledVector(Y_.sub(t),x))}t.add(Ey)}return t}raycast(e,t){const i=this.geometry,s=this.material,o=this.matrixWorld;s!==void 0&&(i.boundingSphere===null&&i.computeBoundingSphere(),Sy.copy(i.boundingSphere),Sy.applyMatrix4(o),Td.copy(e.ray).recast(e.near),!(Sy.containsPoint(Td.origin)===!1&&(Td.intersectSphere(Sy,m3)===null||Td.origin.distanceToSquared(m3)>(e.far-e.near)**2))&&(p3.copy(o).invert(),Td.copy(e.ray).applyMatrix4(p3),!(i.boundingBox!==null&&Td.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,Td)))}_computeIntersections(e,t,i){let s;const o=this.geometry,c=this.material,h=o.index,f=o.attributes.position,p=o.attributes.uv,x=o.attributes.uv1,y=o.attributes.normal,v=o.groups,S=o.drawRange;if(h!==null)if(Array.isArray(c))for(let M=0,R=v.length;M<R;M++){const A=v[M],w=c[A.materialIndex],N=Math.max(A.start,S.start),L=Math.min(h.count,Math.min(A.start+A.count,S.start+S.count));for(let I=N,B=L;I<B;I+=3){const O=h.getX(I),F=h.getX(I+1),P=h.getX(I+2);s=Cy(this,w,e,i,p,x,y,O,F,P),s&&(s.faceIndex=Math.floor(I/3),s.face.materialIndex=A.materialIndex,t.push(s))}}else{const M=Math.max(0,S.start),R=Math.min(h.count,S.start+S.count);for(let A=M,w=R;A<w;A+=3){const N=h.getX(A),L=h.getX(A+1),I=h.getX(A+2);s=Cy(this,c,e,i,p,x,y,N,L,I),s&&(s.faceIndex=Math.floor(A/3),t.push(s))}}else if(f!==void 0)if(Array.isArray(c))for(let M=0,R=v.length;M<R;M++){const A=v[M],w=c[A.materialIndex],N=Math.max(A.start,S.start),L=Math.min(f.count,Math.min(A.start+A.count,S.start+S.count));for(let I=N,B=L;I<B;I+=3){const O=I,F=I+1,P=I+2;s=Cy(this,w,e,i,p,x,y,O,F,P),s&&(s.faceIndex=Math.floor(I/3),s.face.materialIndex=A.materialIndex,t.push(s))}}else{const M=Math.max(0,S.start),R=Math.min(f.count,S.start+S.count);for(let A=M,w=R;A<w;A+=3){const N=A,L=A+1,I=A+2;s=Cy(this,c,e,i,p,x,y,N,L,I),s&&(s.faceIndex=Math.floor(A/3),t.push(s))}}}}function P6(n,e,t,i,s,o,c,h){let f;if(e.side===va?f=i.intersectTriangle(c,o,s,!0,h):f=i.intersectTriangle(s,o,c,e.side===xc,h),f===null)return null;Ay.copy(h),Ay.applyMatrix4(n.matrixWorld);const p=t.ray.origin.distanceTo(Ay);return p<t.near||p>t.far?null:{distance:p,point:Ay.clone(),object:n}}function Cy(n,e,t,i,s,o,c,h,f,p){n.getVertexPosition(h,My),n.getVertexPosition(f,wy),n.getVertexPosition(p,Ty);const x=P6(n,e,t,i,My,wy,Ty,g3);if(x){const y=new Z;Wa.getBarycoord(g3,My,wy,Ty,y),s&&(x.uv=Wa.getInterpolatedAttribute(s,h,f,p,y,new je)),o&&(x.uv1=Wa.getInterpolatedAttribute(o,h,f,p,y,new je)),c&&(x.normal=Wa.getInterpolatedAttribute(c,h,f,p,y,new Z),x.normal.dot(i.direction)>0&&x.normal.multiplyScalar(-1));const v={a:h,b:f,c:p,normal:new Z,materialIndex:0};Wa.getNormal(My,wy,Ty,v.normal),x.face=v,x.barycoord=y}return x}const tg=new Xn,x3=new Xn,y3=new Xn,U6=new Xn,v3=new Yt,Ry=new Z,Z_=new Ps,b3=new Yt,K_=new hp;class cL extends ss{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=mM,this.bindMatrix=new Yt,this.bindMatrixInverse=new Yt,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new Js),this.boundingBox.makeEmpty();const t=e.getAttribute("position");for(let i=0;i<t.count;i++)this.getVertexPosition(i,Ry),this.boundingBox.expandByPoint(Ry)}computeBoundingSphere(){const e=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new Ps),this.boundingSphere.makeEmpty();const t=e.getAttribute("position");for(let i=0;i<t.count;i++)this.getVertexPosition(i,Ry),this.boundingSphere.expandByPoint(Ry)}copy(e,t){return super.copy(e,t),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,t){const i=this.material,s=this.matrixWorld;i!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),Z_.copy(this.boundingSphere),Z_.applyMatrix4(s),e.ray.intersectsSphere(Z_)!==!1&&(b3.copy(s).invert(),K_.copy(e.ray).applyMatrix4(b3),!(this.boundingBox!==null&&K_.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(e,t,K_)))}getVertexPosition(e,t){return super.getVertexPosition(e,t),this.applyBoneTransform(e,t),t}bind(e,t){this.skeleton=e,t===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new Xn,t=this.geometry.attributes.skinWeight;for(let i=0,s=t.count;i<s;i++){e.fromBufferAttribute(t,i);const o=1/e.manhattanLength();o!==1/0?e.multiplyScalar(o):e.set(1,0,0,0),t.setXYZW(i,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===mM?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===GD?this.bindMatrixInverse.copy(this.bindMatrix).invert():ct("SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,t){const i=this.skeleton,s=this.geometry;x3.fromBufferAttribute(s.attributes.skinIndex,e),y3.fromBufferAttribute(s.attributes.skinWeight,e),t.isVector4?(tg.copy(t),t.set(0,0,0,0)):(tg.set(...t,1),t.set(0,0,0)),tg.applyMatrix4(this.bindMatrix);for(let o=0;o<4;o++){const c=y3.getComponent(o);if(c!==0){const h=x3.getComponent(o);v3.multiplyMatrices(i.bones[h].matrixWorld,i.boneInverses[h]),t.addScaledVector(U6.copy(tg).applyMatrix4(v3),c)}}return t.isVector4&&(t.w=tg.w),t.applyMatrix4(this.bindMatrixInverse)}}class Xw extends Un{constructor(){super(),this.isBone=!0,this.type="Bone"}}class Co extends Ii{constructor(e=null,t=1,i=1,s,o,c,h,f,p=qi,x=qi,y,v){super(null,c,h,f,p,x,s,o,y,v),this.isDataTexture=!0,this.image={data:e,width:t,height:i},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const _3=new Yt,O6=new Yt;class tb{constructor(e=[],t=[]){this.uuid=cr(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.previousBoneMatrices=null,this.boneTexture=null,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(e.length*16),t.length===0)this.calculateInverses();else if(e.length!==t.length){ct("Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let i=0,s=this.bones.length;i<s;i++)this.boneInverses.push(new Yt)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const i=new Yt;this.bones[e]&&i.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(i)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const i=this.bones[e];i&&i.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const i=this.bones[e];i&&(i.parent&&i.parent.isBone?(i.matrix.copy(i.parent.matrixWorld).invert(),i.matrix.multiply(i.matrixWorld)):i.matrix.copy(i.matrixWorld),i.matrix.decompose(i.position,i.quaternion,i.scale))}}update(){const e=this.bones,t=this.boneInverses,i=this.boneMatrices,s=this.boneTexture;for(let o=0,c=e.length;o<c;o++){const h=e[o]?e[o].matrixWorld:O6;_3.multiplyMatrices(h,t[o]),_3.toArray(i,o*16)}s!==null&&(s.needsUpdate=!0)}clone(){return new tb(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(this.bones.length*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const i=new Co(t,e,e,Qs,ya);return i.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=i,this}getBoneByName(e){for(let t=0,i=this.bones.length;t<i;t++){const s=this.bones[t];if(s.name===e)return s}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let i=0,s=e.bones.length;i<s;i++){const o=e.bones[i];let c=t[o];c===void 0&&(ct("Skeleton: No bone found with UUID:",o),c=new Xw),this.bones.push(c),this.boneInverses.push(new Yt().fromArray(e.boneInverses[i]))}return this.init(),this}toJSON(){const e={metadata:{version:4.7,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,i=this.boneInverses;for(let s=0,o=t.length;s<o;s++){const c=t[s];e.bones.push(c.uuid);const h=i[s];e.boneInverses.push(h.toArray())}return e}}class ip extends Vn{constructor(e,t,i,s=1){super(e,t,i),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=s}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}
11const Rf=new Yt,S3=new Yt,Ny=[],M3=new Js,z6=new Yt,ng=new ss,ig=new Ps;class uL extends ss{constructor(e,t,i){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new ip(new Float32Array(i*16),16),this.previousInstanceMatrix=null,this.instanceColor=null,this.morphTexture=null,this.count=i,this.boundingBox=null,this.boundingSphere=null;for(let s=0;s<i;s++)this.setMatrixAt(s,z6)}computeBoundingBox(){const e=this.geometry,t=this.count;this.boundingBox===null&&(this.boundingBox=new Js),e.boundingBox===null&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let i=0;i<t;i++)this.getMatrixAt(i,Rf),M3.copy(e.boundingBox).applyMatrix4(Rf),this.boundingBox.union(M3)}computeBoundingSphere(){const e=this.geometry,t=this.count;this.boundingSphere===null&&(this.boundingSphere=new Ps),e.boundingSphere===null&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let i=0;i<t;i++)this.getMatrixAt(i,Rf),ig.copy(e.boundingSphere).applyMatrix4(Rf),this.boundingSphere.union(ig)}copy(e,t){return super.copy(e,t),this.instanceMatrix.copy(e.instanceMatrix),e.previousInstanceMatrix!==null&&(this.previousInstanceMatrix=e.previousInstanceMatrix.clone()),e.morphTexture!==null&&(this.morphTexture=e.morphTexture.clone()),e.instanceColor!==null&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}getColorAt(e,t){return this.instanceColor===null?t.setRGB(1,1,1):t.fromArray(this.instanceColor.array,e*3)}getMatrixAt(e,t){return t.fromArray(this.instanceMatrix.array,e*16)}getMorphAt(e,t){const i=t.morphTargetInfluences,s=this.morphTexture.source.data.data,o=i.length+1,c=e*o+1;for(let h=0;h<i.length;h++)i[h]=s[c+h]}raycast(e,t){const i=this.matrixWorld,s=this.count;if(ng.geometry=this.geometry,ng.material=this.material,ng.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),ig.copy(this.boundingSphere),ig.applyMatrix4(i),e.ray.intersectsSphere(ig)!==!1))for(let o=0;o<s;o++){this.getMatrixAt(o,Rf),S3.multiplyMatrices(i,Rf),ng.matrixWorld=S3,ng.raycast(e,Ny);for(let c=0,h=Ny.length;c<h;c++){const f=Ny[c];f.instanceId=o,f.object=this,t.push(f)}Ny.length=0}}setColorAt(e,t){return this.instanceColor===null&&(this.instanceColor=new ip(new Float32Array(this.instanceMatrix.count*3).fill(1),3)),t.toArray(this.instanceColor.array,e*3),this}setMatrixAt(e,t){return t.toArray(this.instanceMatrix.array,e*16),this}setMorphAt(e,t){const i=t.morphTargetInfluences,s=i.length+1;this.morphTexture===null&&(this.morphTexture=new Co(new Float32Array(s*this.count),s,this.count,j1,ya));const o=this.morphTexture.source.data.data;let c=0;for(let p=0;p<i.length;p++)c+=i[p];const h=this.geometry.morphTargetsRelative?1:1-c,f=s*e;return o[f]=h,o.set(i,f+1),this}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"}),this.morphTexture!==null&&(this.morphTexture.dispose(),this.morphTexture=null)}}const $_=new Z,B6=new Z,V6=new Qt;class vu{constructor(e=new Z(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,s){return this.normal.set(e,t,i),this.constant=s,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){const s=$_.subVectors(i,t).cross(B6.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(s,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,i=!0){const s=e.delta($_),o=this.normal.dot(s);if(o===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;const c=-(e.start.dot(this.normal)+this.constant)/o;return i===!0&&(c<0||c>1)?null:t.copy(e.start).addScaledVector(s,c)}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||V6.getNormalMatrix(e),s=this.coplanarPoint($_).applyMatrix4(e),o=this.normal.applyM
vendor: 1,730 bytes, line 11
11atrix3(i).normalize();return this.constant=-s.dot(o),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 Ed=new Ps,F6=new je(.5,.5),Dy=new Z;class fp{constructor(e=new vu,t=new vu,i=new vu,s=new vu,o=new vu,c=new vu){this.planes=[e,t,i,s,o,c]}set(e,t,i,s,o,c){const h=this.planes;return h[0].copy(e),h[1].copy(t),h[2].copy(i),h[3].copy(s),h[4].copy(o),h[5].copy(c),this}copy(e){const t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,t=lr,i=!1){const s=this.planes,o=e.elements,c=o[0],h=o[1],f=o[2],p=o[3],x=o[4],y=o[5],v=o[6],S=o[7],M=o[8],R=o[9],A=o[10],w=o[11],N=o[12],L=o[13],I=o[14],B=o[15];if(s[0].setComponents(p-c,S-x,w-M,B-N).normalize(),s[1].setComponents(p+c,S+x,w+M,B+N).normalize(),s[2].setComponents(p+h,S+y,w+R,B+L).normalize(),s[3].setComponents(p-h,S-y,w-R,B-L).normalize(),i)s[4].setComponents(f,v,A,I).normalize(),s[5].setComponents(p-f,S-v,w-A,B-I).normalize();else if(s[4].setComponents(p-f,S-v,w-A,B-I).normalize(),t===lr)s[5].setComponents(p+f,S+v,w+A,B+I).normalize();else if(t===$d)s[5].setComponents(f,v,A,I).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Ed.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Ed.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Ed)}intersectsSprite(e){Ed.center.set(0,0,0);const t=F6.distanceTo(e.center);
vendor: 4,642 bytes, line 11
11return Ed.radius=.7071067811865476+t,Ed.applyMatrix4(e.matrixWorld),this.intersectsSphere(Ed)}intersectsSphere(e){const t=this.planes,i=e.center,s=-e.radius;for(let o=0;o<6;o++)if(t[o].distanceToPoint(i)<s)return!1;return!0}intersectsBox(e){const t=this.planes;for(let i=0;i<6;i++){const s=t[i];if(Dy.x=s.normal.x>0?e.max.x:e.min.x,Dy.y=s.normal.y>0?e.max.y:e.min.y,Dy.z=s.normal.z>0?e.max.z:e.min.z,s.distanceToPoint(Dy)<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)}}const ul=new Yt,dl=new fp;class nb{constructor(){this.coordinateSystem=lr}intersectsObject(e,t){if(!t.isArrayCamera||t.cameras.length===0)return!1;for(let i=0;i<t.cameras.length;i++){const s=t.cameras[i];if(ul.multiplyMatrices(s.projectionMatrix,s.matrixWorldInverse),dl.setFromProjectionMatrix(ul,s.coordinateSystem,s.reversedDepth),dl.intersectsObject(e))return!0}return!1}intersectsSprite(e,t){if(!t||!t.cameras||t.cameras.length===0)return!1;for(let i=0;i<t.cameras.length;i++){const s=t.cameras[i];if(ul.multiplyMatrices(s.projectionMatrix,s.matrixWorldInverse),dl.setFromProjectionMatrix(ul,s.coordinateSystem,s.reversedDepth),dl.intersectsSprite(e))return!0}return!1}intersectsSphere(e,t){if(!t||!t.cameras||t.cameras.length===0)return!1;for(let i=0;i<t.cameras.length;i++){const s=t.cameras[i];if(ul.multiplyMatrices(s.projectionMatrix,s.matrixWorldInverse),dl.setFromProjectionMatrix(ul,s.coordinateSystem,s.reversedDepth),dl.intersectsSphere(e))return!0}return!1}intersectsBox(e,t){if(!t||!t.cameras||t.cameras.length===0)return!1;for(let i=0;i<t.cameras.length;i++){const s=t.cameras[i];if(ul.multiplyMatrices(s.projectionMatrix,s.matrixWorldInverse),dl.setFromProjectionMatrix(ul,s.coordinateSystem,s.reversedDepth),dl.intersectsBox(e))return!0}return!1}containsPoint(e,t){if(!t||!t.cameras||t.cameras.length===0)return!1;for(let i=0;i<t.cameras.length;i++){const s=t.cameras[i];if(ul.multiplyMatrices(s.projectionMatrix,s.matrixWorldInverse),dl.setFromProjectionMatrix(ul,s.coordinateSystem,s.reversedDepth),dl.containsPoint(e))return!0}return!1}clone(){return new nb}}function Q_(n,e){return n-e}function k6(n,e){return n.z-e.z}function H6(n,e){return e.z-n.z}class G6{constructor(){this.index=0,this.pool=[],this.list=[]}push(e,t,i,s){const o=this.pool,c=this.list;this.index>=o.length&&o.push({start:-1,count:-1,z:-1,index:-1});const h=o[this.index];c.push(h),this.index++,h.start=e,h.count=t,h.z=i,h.index=s}reset(){this.list.length=0,this.index=0}}const Ha=new Yt,j6=new mt(1,1,1),w3=new fp,W6=new nb,Ly=new Js,Ad=new Ps,sg=new Z,T3=new Z,X6=new Z,J_=new G6,Ks=new ss,Iy=[];function q6(n,e,t=0){const i=e.itemSize;if(n.isInterleavedBufferAttribute||n.array.constructor!==e.array.constructor){const s=n.count;for(let o=0;o<s;o++)for(let c=0;c<i;c++)e.setComponent(o+t,c,n.getComponent(o,c))}else e.array.set(n.array,t*i);e.needsUpdate=!0}function Cd(n,e){if(n.constructor!==e.constructor){const t=Math.min(n.length,e.length);for(let i=0;i<t;i++)e[i]=n[i]}else{const t=Math.min(n.length,e.length);e.set(new n.constructor(n.buffer,0,t))}}class dL extends ss{constructor(e,t,i=t*2,s){super(new Kt,s),this.isBatchedMesh=!0,this.perObjectFrustumCulled=!0,this.sortObjects=!0,this.boundingBox=null,this.boundingSphere=null,this.customSort=null,this._instanceInfo=[],this._geometryInfo=[],this._availableInstanceIds=[],this._availableGeometryIds=[],this._nextIndexStart=0,this._nextVertexStart=0,this._geometryCount=0,this._visibilityChanged=!0,this._geometryInitialized=!1,this._maxInstanceCount=e,this._maxVertexCount=t,this._maxIndexCount=i,this._multiDrawCounts=new Int32Array(e),this._multiDrawStarts=new Int32Array(e),this._multiDrawCount=0,this._matricesTexture=null,this._indirectTexture=null,this._colorsTexture=null,this._initMatricesTexture(),this._initIndirectTexture()}get maxInstanceCount(){return this._maxInstanceCount}get instanceCount(){return this._instanceInfo.length-this._availableInstanceIds.length}get unusedVertexCount(){return this._maxVertexCount-this._nextVertexStart}get unusedIndexCount(){return this._maxIndexCount-this._nextIndexStart}_initMatricesTexture(){let e=Math.sqrt(this._maxInstanceCount*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const t=new Float32Array(e*e*4),i=new Co(t,e,e,Qs,ya);this._matricesTexture=i}_initIndirectTexture(){let e=Math.sqrt(this._maxInstanceCount);e=Math.ceil(e);const t=new Uint32Array(e*e),i=new Co(t,e,e,p0,Xr);this._indirectTexture=i}_initColorsTexture(){let e=Math.sqrt(this._maxInstanceCount);e=Math.ceil(e);const t=new Float32Array(e*e*4).fill(1),i=new Co(t,e,e,Qs,ya);
11i.colorSpace=_n.workingColorSpace,this._colorsTexture=i}_initializeGeometry(e){const t=this.geometry,i=this._maxVertexCount,s=this._maxIndexCount;if(this._geometryInitialized===!1){for(const o in e.attributes){const c=e.getAttribute(o),{array:h,itemSize:f,normalized:p}=c,x=new h.constructor(i*f),y=new Vn(x,f,p);t.setAttribute(o,y)}if(e.getIndex()!==null){const o=i>65535?new Uint32Array(s):new Uint16Array(s);t.setIndex(new Vn(o,1))}this._geometryInitialized=!0}}_validateGeometry(e){const t=this.geometry;if(!!e.getIndex()!=!!t.getIndex())throw new Error('THREE.BatchedMesh: All geometries must consistently have "index".');for(const i in t.attributes){if(!e.hasAttribute(i))throw new Error(`THREE.BatchedMesh: Added geometry missing "${i}". All geometries must have consistent attributes.`);const s=e.getAttribute(i),o=t.getAttribute(i);if(s.itemSize!==o.itemSize||s.normalized!==o.normalized)throw new Error("THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}validateInstanceId(e){const t=this._instanceInfo;if(e<0||e>=t.length||t[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid instanceId ${e}. Instance is either out of range or has been deleted.`)}validateGeometryId(e){const t=this._geometryInfo;if(e<0||e>=t.length||t[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid geometryId ${e}. Geometry is either out of range or has been deleted.`)}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Js);const e=this.boundingBox,t=this._instanceInfo;e.makeEmpty();for(let i=0,s=t.length;i<s;i++){if(t[i].active===!1)continue;const o=t[i].geometryIndex;this.getMatrixAt(i,Ha),this.getBoundingBoxAt(o,Ly).applyMatrix4(Ha),e.union(Ly)}}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Ps);const e=this.boundingSphere,t=this._instanceInfo;e.makeEmpty();for(let i=0,s=t.length;i<s;i++){if(t[i].active===!1)continue;const o=t[i].geometryIndex;this.getMatrixAt(i,Ha),this.getBoundingSphereAt(o,Ad).applyMatrix4(Ha),e.union(Ad)}}addInstance(e){if(this._instanceInfo.length>=this.maxInstanceCount&&this._availableInstanceIds.length===0)throw new Error("THREE.BatchedMesh: Maximum item count reached.");const i={visible:!0,active:!0,geometryIndex:e};let s=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(Q_),s=this._availableInstanceIds.shift(),this._instanceInfo[s]=i):(s=this._instanceInfo.length,this._instanceInfo.push(i));const o=this._matricesTexture;Ha.identity().toArray(o.image.data,s*16),o.needsUpdate=!0;const c=this._colorsTexture;return c&&(j6.toArray(c.image.data,s*4),c.needsUpdate=!0),this._visibilityChanged=!0,s}addGeometry(e,t=-1,i=-1){this._initializeGeometry(e),this._validateGeometry(e);const s={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},o=this._geometryInfo;s.vertexStart=this._nextVertexStart,s.reservedVertexCount=t===-1?e.getAttribute("position").count:t;const c=e.getIndex();if(c!==null&&(s.indexStart=this._nextIndexStart,s.reservedIndexCount=i===-1?c.count:i),s.indexStart!==-1&&s.indexStart+s.reservedIndexCount>this._maxIndexCount||s.vertexStart+s.reservedVertexCount>this._maxVertexCount)throw new Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.");let f;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(Q_),f=this._availableGeometryIds.shift(),o[f]=s):(f=this._geometryCount,this._geometryCount++,o.push(s)),this.setGeometryAt(f,e),this._nextIndexStart=s.indexStart+s.reservedIndexCount,this._nextVertexStart=s.vertexStart+s.reservedVertexCount,f}setGeometryAt(e,t){if(e>=this._geometryCount)throw new Error("THREE.BatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);const i=this.geometry,s=i.getIndex()!==null,o=i.getIndex(),c=t.getIndex(),h=this._geometryInfo[e];if(s&&c.count>h.reservedIndexCount||t.attributes.position.count>h.reservedVertexCount)throw new Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.");const f=h.vertexStart,p=h.reservedVertexCount;h.vertexCount=t.getAttribute("position").count;for(const x in i.attributes){const y=t.getAttribute(x),v=i.getAttribute(x);q6(y,v,f);const S=y.itemSize;
11for(let M=y.count,R=p;M<R;M++){const A=f+M;for(let w=0;w<S;w++)v.setComponent(A,w,0)}v.needsUpdate=!0,v.addUpdateRange(f*S,p*S)}if(s){const x=h.indexStart,y=h.reservedIndexCount;h.indexCount=t.getIndex().count;for(let v=0;v<c.count;v++)o.setX(x+v,f+c.getX(v));for(let v=c.count,S=y;v<S;v++)o.setX(x+v,f);o.needsUpdate=!0,o.addUpdateRange(x,h.reservedIndexCount)}return h.start=s?h.indexStart:h.vertexStart,h.count=s?h.indexCount:h.vertexCount,h.boundingBox=null,t.boundingBox!==null&&(h.boundingBox=t.boundingBox.clone()),h.boundingSphere=null,t.boundingSphere!==null&&(h.boundingSphere=t.boundingSphere.clone()),this._visibilityChanged=!0,e}deleteGeometry(e){const t=this._geometryInfo;if(e>=t.length||t[e].active===!1)return this;const i=this._instanceInfo;for(let s=0,o=i.length;s<o;s++)i[s].active&&i[s].geometryIndex===e&&this.deleteInstance(s);return t[e].active=!1,this._availableGeometryIds.push(e),this._visibilityChanged=!0,this}deleteInstance(e){return this.validateInstanceId(e),this._instanceInfo[e].active=!1,this._availableInstanceIds.push(e),this._visibilityChanged=!0,this}optimize(){let e=0,t=0;const i=this._geometryInfo,s=i.map((c,h)=>h).sort((c,h)=>i[c].vertexStart-i[h].vertexStart),o=this.geometry;for(let c=0,h=i.length;c<h;c++){const f=s[c],p=i[f];if(p.active!==!1){if(o.index!==null){if(p.indexStart!==t){const{indexStart:x,vertexStart:y,reservedIndexCount:v}=p,S=o.index,M=S.array,R=e-y;for(let A=x;A<x+v;A++)M[A]=M[A]+R;S.array.copyWithin(t,x,x+v),S.addUpdateRange(t,v),S.needsUpdate=!0,p.indexStart=t}t+=p.reservedIndexCount}if(p.vertexStart!==e){const{vertexStart:x,reservedVertexCount:y}=p,v=o.attributes;for(const S in v){const M=v[S],{array:R,itemSize:A}=M;R.copyWithin(e*A,x*A,(x+y)*A),M.addUpdateRange(e*A,y*A),M.needsUpdate=!0}p.vertexStart=e}e+=p.reservedVertexCount,p.start=o.index?p.indexStart:p.vertexStart}}return this._nextIndexStart=t,this._nextVertexStart=e,this._visibilityChanged=!0,this}getBoundingBoxAt(e,t){if(e>=this._geometryCount)return null;const i=this.geometry,s=this._geometryInfo[e];if(s.boundingBox===null){const o=new Js,c=i.index,h=i.attributes.position;for(let f=s.start,p=s.start+s.count;f<p;f++){let x=f;c&&(x=c.getX(x)),o.expandByPoint(sg.fromBufferAttribute(h,x))}s.boundingBox=o}return t.copy(s.boundingBox),t}getBoundingSphereAt(e,t){if(e>=this._geometryCount)return null;const i=this.geometry,s=this._geometryInfo[e];if(s.boundingSphere===null){const o=new Ps;this.getBoundingBoxAt(e,Ly),Ly.getCenter(o.center);const c=i.index,h=i.attributes.position;let f=0;for(let p=s.start,x=s.start+s.count;p<x;p++){let y=p;c&&(y=c.getX(y)),sg.fromBufferAttribute(h,y),f=Math.max(f,o.center.distanceToSquared(sg))}o.radius=Math.sqrt(f),s.boundingSphere=o}return t.copy(s.boundingSphere),t}setMatrixAt(e,t){this.validateInstanceId(e);const i=this._matricesTexture,s=this._matricesTexture.image.data;return t.toArray(s,e*16),i.needsUpdate=!0,this}getMatrixAt(e,t){return this.validateInstanceId(e),t.fromArray(this._matricesTexture.image.data,e*16)}setColorAt(e,t){return this.validateInstanceId(e),this._colorsTexture===null&&this._initColorsTexture(),t.toArray(this._colorsTexture.image.data,e*4),this._colorsTexture.needsUpdate=!0,this}getColorAt(e,t){return this.validateInstanceId(e),this._colorsTexture===null?t.isVector4?t.set(1,1,1,1):t.setRGB(1,1,1):t.fromArray(this._colorsTexture.image.data,e*4)}setVisibleAt(e,t){return this.validateInstanceId(e),this._instanceInfo[e].visible===t?this:(this._instanceInfo[e].visible=t,this._visibilityChanged=!0,this)}getVisibleAt(e){return this.validateInstanceId(e),this._instanceInfo[e].visible}setGeometryIdAt(e,t){return this.validateInstanceId(e),this.validateGeometryId(t),this._instanceInfo[e].geometryIndex=t,this}getGeometryIdAt(e){return this.validateInstanceId(e),this._instanceInfo[e].geometryIndex}getGeometryRangeAt(e,t={}){this.validateGeometryId(e);const i=this._geometryInfo[e];return t.vertexStart=i.vertexStart,t.vertexCount=i.vertexCount,t.reservedVertexCount=i.reservedVertexCount,t.indexStart=i.indexStart,t.indexCount=i.indexCount,t.reservedIndexCount=i.reservedIndexCount,t.start=i.start,t.count=i.count,t}setInstanceCount(e){const t=this._availableInstanceIds,i=this._instanceInfo;for(t.sort(Q_);t[t.length-1]===i.length-1;)i.pop(),t.pop();if(e<i.length)throw new Error(`BatchedMesh: Instance ids outside the range ${e} are being used. Cannot shrink instance count.`);const s=new Int32Array(e),o=new Int32Array(e);Cd(this._multiDrawCounts,s),Cd(this._multiDrawStarts,o),this._multiDrawCounts=s,this._multiDrawStarts=o,this._maxInstanceCount=e;const c=this._indirectTexture,h=this._matricesTexture,f=this._colorsTexture;c.dispose(),this._initIndirectTexture(),Cd(c.image.data,this._indirectTexture.image.data),h.dispose(),this._initMatricesTexture(),Cd(h.image.data,this._matricesTexture.image.data),f&&(f.dispose(),this._initColorsTexture(),Cd(f.image.data,this._colorsTexture.image.data))}setGeometrySize(e,t){const i=[...this._geometryInfo].filter(h=>h.active);if(Math.max(...i.map(h=>h.vertexStart+h.reservedVertexCount))>e)throw new Error(`BatchedMesh: Geometry vertex values are being used outside the range ${t}. Cannot shrink further.`);if(this.geometry.index&&Math.max(...i.map(f=>f.indexStart+f.reservedIndexCount))>t)throw new Error(`BatchedMesh: Geometry index values are being used outside the range ${t}. Cannot shrink further.`);const o=this.geometry;o.dispose(),this._maxVertexCount=e,this._maxIndexCount=t,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new Kt,this._initializeGeometry(o));const c=this.geometry;o.index&&Cd(o.index.array,c.index.array);for(const h in o.attributes)Cd(o.attributes[h].array,c.attributes[h].array)}raycast(e,t){const i=this._instanceInfo,s=this._geometryInfo,o=this.matrixWorld,c=this.geometry;Ks.material=this.material,Ks.geometry.index=c.index,Ks.geometry.attributes=c.attributes,Ks.geometry.boundingBox===null&&(Ks.geometry.boundingBox=new Js),Ks.geometry.boundingSphere===null&&(Ks.geometry.boundingSphere=new Ps);for(let h=0,f=i.length;h<f;h++){if(!i[h].visible||!i[h].active)continue;const p=i[h].geometryIndex,x=s[p];Ks.geometry.setDrawRange(x.start,x.count),this.getMatrixAt(h,Ks.matrixWorld).premultiply(o),this.getBoundingBoxAt(p,Ks.geometry.boundingBox),this.getBoundingSphereAt(p,Ks.geometry.boundingSphere),Ks.raycast(e,Iy);for(let y=0,v=Iy.length;y<v;y++){const S=Iy[y];S.object=this,S.batchId=h,t.push(S)}Iy.length=0}Ks.material=null,Ks.geometry.index=null,Ks.geometry.attributes={},Ks.geometry.setDrawRange(0,1/0)}copy(e){return super.copy(e),this.geometry=e.geometry.clone(),this.perObjectFrustumCulled=e.perObjectFrustumCulled,this.sortObjects=e.sortObjects,this.boundingBox=e.boundingBox!==null?e.boundingBox.clone():null,this.boundingSphere=e.boundingSphere!==null?e.boundingSphere.clone():null,this._geometryInfo=e._geometryInfo.map(t=>({...t,boundingBox:t.boundingBox!==null?t.boundingBox.clone():null,boundingSphere:t.boundingSphere!==null?t.boundingSphere.clone():null})),this._instanceInfo=e._instanceInfo.map(t=>({...t})),this._availableInstanceIds=e._availableInstanceIds.slice(),this._availableGeometryIds=e._availableGeometryIds.slice(),this._nextIndexStart=e._nextIndexStart,this._nextVertexStart=e._nextVertexStart,this._geometryCount=e._geometryCount,this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._indirectTexture=e._indirectTexture.clone(),this._indirectTexture.image.data=this._indirectTexture.image.data.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null)}onBeforeRender(e,t,i,s,o){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const c=s.getIndex();let h=c===null?1:c.array.BYTES_PER_ELEMENT,f=1;o.wireframe&&(f=2,h=s.attributes.position.count>65535?4:2);const p=this._instanceInfo,x=this._multiDrawStarts,y=this._multiDrawCounts,v=this._geometryInfo,S=this.perObjectFrustumCulled,M=this._indirectTexture,R=M.image.data,A=i.isArrayCamera?W6:w3;S&&!i.isArrayCamera&&(Ha.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse).multiply(this.matrixWorld),w3.setFromProjectionMatrix(Ha,i.coordinateSystem,i.reversedDepth));let w=0;
11if(this.sortObjects){Ha.copy(this.matrixWorld).invert(),sg.setFromMatrixPosition(i.matrixWorld).applyMatrix4(Ha),T3.set(0,0,-1).transformDirection(i.matrixWorld).transformDirection(Ha);for(let I=0,B=p.length;I<B;I++)if(p[I].visible&&p[I].active){const O=p[I].geometryIndex;this.getMatrixAt(I,Ha),this.getBoundingSphereAt(O,Ad).applyMatrix4(Ha);let F=!1;if(S&&(F=!A.intersectsSphere(Ad,i)),!F){const P=v[O],V=X6.subVectors(Ad.center,sg).dot(T3);J_.push(P.start,P.count,V,I)}}const N=J_.list,L=this.customSort;L===null?N.sort(o.transparent?H6:k6):L.call(this,N,i);for(let I=0,B=N.length;I<B;I++){const O=N[I];x[w]=O.start*h*f,y[w]=O.count*f,R[w]=O.index,w++}J_.reset()}else for(let N=0,L=p.length;N<L;N++)if(p[N].visible&&p[N].active){const I=p[N].geometryIndex;let B=!1;if(S&&(this.getMatrixAt(N,Ha),this.getBoundingSphereAt(I,Ad).applyMatrix4(Ha),B=!A.intersectsSphere(Ad,i)),!B){const O=v[I];x[w]=O.start*h*f,y[w]=O.count*f,R[w]=N,w++}}M.needsUpdate=!0,this._multiDrawCount=w,this._visibilityChanged=!1}onBeforeShadow(e,t,i,s,o,c){this.onBeforeRender(e,null,s,o,c)}}class _a extends ea{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new mt(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const x1=new Z,y1=new Z,E3=new Yt,ag=new hp,Py=new Ps,eS=new Z,A3=new Z;class Iu extends Un{constructor(e=new Kt,t=new _a){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,i=[0];for(let s=1,o=t.count;s<o;s++)x1.fromBufferAttribute(t,s-1),y1.fromBufferAttribute(t,s),i[s]=i[s-1],i[s]+=x1.distanceTo(y1);e.setAttribute("lineDistance",new bt(i,1))}else ct("Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){const i=this.geometry,s=this.matrixWorld,o=e.params.Line.threshold,c=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),Py.copy(i.boundingSphere),Py.applyMatrix4(s),Py.radius+=o,e.ray.intersectsSphere(Py)===!1)return;E3.copy(s).invert(),ag.copy(e.ray).applyMatrix4(E3);const h=o/((this.scale.x+this.scale.y+this.scale.z)/3),f=h*h,p=this.isLineSegments?2:1,x=i.index,v=i.attributes.position;if(x!==null){const S=Math.max(0,c.start),M=Math.min(x.count,c.start+c.count);for(let R=S,A=M-1;R<A;R+=p){const w=x.getX(R),N=x.getX(R+1),L=Uy(this,e,ag,f,w,N,R);L&&t.push(L)}if(this.isLineLoop){const R=x.getX(M-1),A=x.getX(S),w=Uy(this,e,ag,f,R,A,M-1);w&&t.push(w)}}else{const S=Math.max(0,c.start),M=Math.min(v.count,c.start+c.count);for(let R=S,A=M-1;R<A;R+=p){const w=Uy(this,e,ag,f,R,R+1,R);w&&t.push(w)}if(this.isLineLoop){const R=Uy(this,e,ag,f,M-1,S,M-1);R&&t.push(R)}}}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const s=t[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,c=s.length;o<c;o++){const h=s[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[h]=o}}}}}function Uy(n,e,t,i,s,o,c){const h=n.geometry.attributes.position;if(x1.fromBufferAttribute(h,s),y1.fromBufferAttribute(h,o),t.distanceSqToSegment(x1,y1,eS,A3)>i)return;eS.applyMatrix4(n.matrixWorld);const p=e.ray.origin.distanceTo(eS);if(!(p<e.near||p>e.far))return{distance:p,point:A3.clone().applyMatrix4(n.matrixWorld),index:c,face:null,faceIndex:null,barycoord:null,object:n}}const C3=new Z,R3=new Z;class El extends Iu{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,i=[];for(let s=0,o=t.count;s<o;s+=2)C3.fromBufferAttribute(t,s),R3.fromBufferAttribute(t,s+1),i[s]=s===0?0:i[s-1],i[s+1]=i[s]+C3.distanceTo(R3);e.setAttribute("lineDistance",new bt(i,1))}else ct("LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class hL extends Iu{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}}class qw extends ea{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new mt(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}const N3=new Yt,vM=new hp,Oy=new Ps,zy=new Z;class fL extends Un{constructor(e=new Kt,t=new qw){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,t){const i=this.geometry,s=this.matrixWorld,o=e.params.Points.threshold,c=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),Oy.copy(i.boundingSphere),Oy.applyMatrix4(s),Oy.radius+=o,e.ray.intersectsSphere(Oy)===!1)return;N3.copy(s).invert(),vM.copy(e.ray).applyMatrix4(N3);const h=o/((this.scale.x+this.scale.y+this.scale.z)/3),f=h*h,p=i.index,y=i.attributes.position;if(p!==null){const v=Math.max(0,c.start),S=Math.min(p.count,c.start+c.count);for(let M=v,R=S;M<R;M++){const A=p.getX(M);zy.fromBufferAttribute(y,A),D3(zy,A,f,s,e,t,this)}}else{const v=Math.max(0,c.start),S=Math.min(y.count,c.start+c.count);for(let M=v,R=S;M<R;M++)zy.fromBufferAttribute(y,M),D3(zy,M,f,s,e,t,this)}}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const s=t[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,c=s.length;o<c;o++){const h=s[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[h]=o}}}}}function D3(n,e,t,i,s,o,c){const h=vM.distanceSqToPoint(n);if(h<t){const f=new Z;
11vM.closestPointToPoint(n,f),f.applyMatrix4(i);const p=s.ray.origin.distanceTo(f);if(p<s.near||p>s.far)return;o.push({distance:p,distanceToRay:Math.sqrt(h),point:f,index:e,face:null,faceIndex:null,barycoord:null,object:c})}}class pL extends Ii{constructor(e,t,i,s,o=yi,c=yi,h,f,p){super(e,t,i,s,o,c,h,f,p),this.isVideoTexture=!0,this.generateMipmaps=!1,this._requestVideoFrameCallbackId=0;const x=this;function y(){x.needsUpdate=!0,x._requestVideoFrameCallbackId=e.requestVideoFrameCallback(y)}"requestVideoFrameCallback"in e&&(this._requestVideoFrameCallbackId=e.requestVideoFrameCallback(y))}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)}dispose(){this._requestVideoFrameCallbackId!==0&&(this.source.data.cancelVideoFrameCallback(this._requestVideoFrameCallbackId),this._requestVideoFrameCallbackId=0),super.dispose()}}class Y6 extends pL{constructor(e,t,i,s,o,c,h,f){super({},e,t,i,s,o,c,h,f),this.isVideoFrameTexture=!0}update(){}clone(){return new this.constructor().copy(this)}setFrame(e){this.image=e,this.needsUpdate=!0}}class Z6 extends Ii{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=qi,this.minFilter=qi,this.generateMipmaps=!1,this.needsUpdate=!0}}class ib extends Ii{constructor(e,t,i,s,o,c,h,f,p,x,y,v){super(null,c,h,f,p,x,s,o,y,v),this.isCompressedTexture=!0,this.image={width:t,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class K6 extends ib{constructor(e,t,i,s,o,c){super(e,t,i,o,c),this.isCompressedArrayTexture=!0,this.image.depth=s,this.wrapR=Xa,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class $6 extends ib{constructor(e,t,i){super(void 0,e[0].width,e[0].height,t,i,Sl),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class m0 extends Ii{constructor(e=[],t=Sl,i,s,o,c,h,f,p,x){super(e,t,i,s,o,c,h,f,p,x),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class Q6 extends Ii{constructor(e,t,i,s,o,c,h,f,p){super(e,t,i,s,o,c,h,f,p),this.isCanvasTexture=!0,this.needsUpdate=!0}}class J6 extends Ii{constructor(e,t,i,s,o,c,h,f,p){super(e,t,i,s,o,c,h,f,p),this.isHTMLTexture=!0,this.generateMipmaps=!1,this.needsUpdate=!0;const x=e?e.parentNode:null;x!==null&&"requestPaint"in x&&(x.onpaint=()=>{this.needsUpdate=!0},x.requestPaint())}dispose(){const e=this.image?this.image.parentNode:null;e!==null&&"onpaint"in e&&(e.onpaint=null),super.dispose()}}class Jd extends Ii{constructor(e,t,i=Xr,s,o,c,h=qi,f=qi,p,x=wl,y=1){if(x!==wl&&x!==Mu)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");const v={width:e,height:t,depth:y};super(v,s,o,c,h,f,x,i,p),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new wu(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}}class mL extends Jd{constructor(e,t=Xr,i=Sl,s,o,c=qi,h=qi,f,p=wl){const x={width:e,height:e,depth:1},y=[x,x,x,x,x,x];super(e,e,t,i,s,o,c,h,f,p),this.image=y,this.isCubeDepthTexture=!0,this.isCubeTexture=!0}get images(){return this.image}set images(e){this.image=e}}class Yw extends Ii{constructor(e=null){super(),this.sourceTexture=e,this.isExternalTexture=!0}copy(e){return super.copy(e),this.sourceTexture=e.sourceTexture,this}}class sh extends Kt{constructor(e=1,t=1,i=1,s=1,o=1,c=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:s,heightSegments:o,depthSegments:c};const h=this;s=Math.floor(s),o=Math.floor(o),c=Math.floor(c);const f=[],p=[],x=[],y=[];let v=0,S=0;M("z","y","x",-1,-1,i,t,e,c,o,0),M("z","y","x",1,-1,i,t,-e,c,o,1),M("x","z","y",1,1,e,i,t,s,c,2),M("x","z","y",1,-1,e,i,-t,s,c,3),M("x","y","z",1,-1,e,t,i,s,o,4),M("x","y","z",-1,-1,e,t,-i,s,o,5),this.setIndex(f),this.setAttribute("position",new bt(p,3)),this.setAttribute("normal",new bt(x,3)),this.setAttribute("uv",new bt(y,2));
11function M(R,A,w,N,L,I,B,O,F,P,V){const j=I/F,W=B/P,ee=I/2,ie=B/2,ue=O/2,Q=F+1,Y=P+1;let $=0,le=0;const ge=new Z;for(let Ce=0;Ce<Y;Ce++){const q=Ce*W-ie;for(let ae=0;ae<Q;ae++){const Ae=ae*j-ee;ge[R]=Ae*N,ge[A]=q*L,ge[w]=ue,p.push(ge.x,ge.y,ge.z),ge[R]=0,ge[A]=0,ge[w]=O>0?1:-1,x.push(ge.x,ge.y,ge.z),y.push(ae/F),y.push(1-Ce/P),$+=1}}for(let Ce=0;Ce<P;Ce++)for(let q=0;q<F;q++){const ae=v+q+Q*Ce,Ae=v+q+Q*(Ce+1),Ie=v+(q+1)+Q*(Ce+1),We=v+(q+1)+Q*Ce;f.push(ae,Ae,We),f.push(Ae,Ie,We),le+=6}h.addGroup(S,le,V),S+=le,v+=$}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new sh(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}class sb extends Kt{constructor(e=1,t=1,i=4,s=8,o=1){super(),this.type="CapsuleGeometry",this.parameters={radius:e,height:t,capSegments:i,radialSegments:s,heightSegments:o},t=Math.max(0,t),i=Math.max(1,Math.floor(i)),s=Math.max(3,Math.floor(s)),o=Math.max(1,Math.floor(o));const c=[],h=[],f=[],p=[],x=t/2,y=Math.PI/2*e,v=t,S=2*y+v,M=i*2+o,R=s+1,A=new Z,w=new Z;for(let N=0;N<=M;N++){let L=0,I=0,B=0,O=0;if(N<=i){const V=N/i,j=V*Math.PI/2;I=-x-e*Math.cos(j),B=e*Math.sin(j),O=-e*Math.cos(j),L=V*y}else if(N<=i+o){const V=(N-i)/o;I=-x+V*t,B=e,O=0,L=y+V*v}else{const V=(N-i-o)/i,j=V*Math.PI/2;I=x+e*Math.sin(j),B=e*Math.cos(j),O=e*Math.sin(j),L=y+v+V*y}const F=Math.max(0,Math.min(1,L/S));let P=0;N===0?P=.5/s:N===M&&(P=-.5/s);for(let V=0;V<=s;V++){const j=V/s,W=j*Math.PI*2,ee=Math.sin(W),ie=Math.cos(W);w.x=-B*ie,w.y=I,w.z=B*ee,h.push(w.x,w.y,w.z),A.set(-B*ie,O,B*ee),A.normalize(),f.push(A.x,A.y,A.z),p.push(j+P,F)}if(N>0){const V=(N-1)*R;for(let j=0;j<s;j++){const W=V+j,ee=V+j+1,ie=N*R+j,ue=N*R+j+1;c.push(W,ee,ie),c.push(ee,ue,ie)}}}this.setIndex(c),this.setAttribute("position",new bt(h,3)),this.setAttribute("normal",new bt(f,3)),this.setAttribute("uv",new bt(p,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new sb(e.radius,e.height,e.capSegments,e.radialSegments,e.heightSegments)}}class ab extends Kt{constructor(e=1,t=32,i=0,s=Math.PI*2){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:i,thetaLength:s},t=Math.max(3,t);const o=[],c=[],h=[],f=[],p=new Z,x=new je;c.push(0,0,0),h.push(0,0,1),f.push(.5,.5);for(let y=0,v=3;y<=t;y++,v+=3){const S=i+y/t*s;p.x=e*Math.cos(S),p.y=e*Math.sin(S),c.push(p.x,p.y,p.z),h.push(0,0,1),x.x=(c[v]/e+1)/2,x.y=(c[v+1]/e+1)/2,f.push(x.x,x.y)}for(let y=1;y<=t;y++)o.push(y,y+1,0);this.setIndex(o),this.setAttribute("position",new bt(c,3)),this.setAttribute("normal",new bt(h,3)),this.setAttribute("uv",new bt(f,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new ab(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class g0 extends Kt{constructor(e=1,t=1,i=1,s=32,o=1,c=!1,h=0,f=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:i,radialSegments:s,heightSegments:o,openEnded:c,thetaStart:h,thetaLength:f};const p=this;s=Math.floor(s),o=Math.floor(o);const x=[],y=[],v=[],S=[];let M=0;const R=[],A=i/2;let w=0;N(),c===!1&&(e>0&&L(!0),t>0&&L(!1)),this.setIndex(x),this.setAttribute("position",new bt(y,3)),this.setAttribute("normal",new bt(v,3)),this.setAttribute("uv",new bt(S,2));function N(){const I=new Z,B=new Z;let O=0;const F=(t-e)/i;for(let P=0;P<=o;P++){const V=[],j=P/o,W=j*(t-e)+e;for(let ee=0;ee<=s;ee++){const ie=ee/s,ue=ie*f+h,Q=Math.sin(ue),Y=Math.cos(ue);B.x=W*Q,B.y=-j*i+A,B.z=W*Y,y.push(B.x,B.y,B.z),I.set(Q,F,Y).normalize(),v.push(I.x,I.y,I.z),S.push(ie,1-j),V.push(M++)}R.push(V)}for(let P=0;P<s;P++)for(let V=0;V<o;V++){const j=R[V][P],W=R[V+1][P],ee=R[V+1][P+1],ie=R[V][P+1];(e>0||V!==0)&&(x.push(j,W,ie),O+=3),(t>0||V!==o-1)&&(x.push(W,ee,ie),O+=3)}p.addGroup(w,O,0),w+=O}function L(I){const B=M,O=new je,F=new Z;let P=0;const V=I===!0?e:t,j=I===!0?1:-1;for(let ee=1;ee<=s;ee++)y.push(0,A*j,0),v.push(0,j,0),S.push(.5,.5),M++;const W=M;for(let ee=0;ee<=s;ee++){const ue=ee/s*f+h,Q=Math.cos(ue),Y=Math.sin(ue);F.x=V*Y,F.y=A*j,F.z=V*Q,y.push(F.x,F.y,F.z),v.push(0,j,0),O.x=Q*.5+.5,O.y=Y*.5*j+.5,S.push(O.x,O.y),M++}for(let ee=0;ee<s;ee++){const ie=B+ee,ue=W+ee;I===!0?x.push(ue,ue+1,ie):x.push(ue+1,ue,ie),P+=3}p.addGroup(w,P,I===!0?1:2),w+=P}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new g0(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.o
vendor: 13,101 bytes, line 11
11penEnded,e.thetaStart,e.thetaLength)}}class x0 extends g0{constructor(e=1,t=1,i=32,s=1,o=!1,c=0,h=Math.PI*2){super(0,e,t,i,s,o,c,h),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:i,heightSegments:s,openEnded:o,thetaStart:c,thetaLength:h}}static fromJSON(e){return new x0(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Ou extends Kt{constructor(e=[],t=[],i=1,s=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:i,detail:s};const o=[],c=[];h(s),p(i),x(),this.setAttribute("position",new bt(o,3)),this.setAttribute("normal",new bt(o.slice(),3)),this.setAttribute("uv",new bt(c,2)),s===0?this.computeVertexNormals():this.normalizeNormals();function h(N){const L=new Z,I=new Z,B=new Z;for(let O=0;O<t.length;O+=3)S(t[O+0],L),S(t[O+1],I),S(t[O+2],B),f(L,I,B,N)}function f(N,L,I,B){const O=B+1,F=[];for(let P=0;P<=O;P++){F[P]=[];const V=N.clone().lerp(I,P/O),j=L.clone().lerp(I,P/O),W=O-P;for(let ee=0;ee<=W;ee++)ee===0&&P===O?F[P][ee]=V:F[P][ee]=V.clone().lerp(j,ee/W)}for(let P=0;P<O;P++)for(let V=0;V<2*(O-P)-1;V++){const j=Math.floor(V/2);V%2===0?(v(F[P][j+1]),v(F[P+1][j]),v(F[P][j])):(v(F[P][j+1]),v(F[P+1][j+1]),v(F[P+1][j]))}}function p(N){const L=new Z;for(let I=0;I<o.length;I+=3)L.x=o[I+0],L.y=o[I+1],L.z=o[I+2],L.normalize().multiplyScalar(N),o[I+0]=L.x,o[I+1]=L.y,o[I+2]=L.z}function x(){const N=new Z;for(let L=0;L<o.length;L+=3){N.x=o[L+0],N.y=o[L+1],N.z=o[L+2];const I=A(N)/2/Math.PI+.5,B=w(N)/Math.PI+.5;c.push(I,1-B)}M(),y()}function y(){for(let N=0;N<c.length;N+=6){const L=c[N+0],I=c[N+2],B=c[N+4],O=Math.max(L,I,B),F=Math.min(L,I,B);O>.9&&F<.1&&(L<.2&&(c[N+0]+=1),I<.2&&(c[N+2]+=1),B<.2&&(c[N+4]+=1))}}function v(N){o.push(N.x,N.y,N.z)}function S(N,L){const I=N*3;L.x=e[I+0],L.y=e[I+1],L.z=e[I+2]}function M(){const N=new Z,L=new Z,I=new Z,B=new Z,O=new je,F=new je,P=new je;for(let V=0,j=0;V<o.length;V+=9,j+=6){N.set(o[V+0],o[V+1],o[V+2]),L.set(o[V+3],o[V+4],o[V+5]),I.set(o[V+6],o[V+7],o[V+8]),O.set(c[j+0],c[j+1]),F.set(c[j+2],c[j+3]),P.set(c[j+4],c[j+5]),B.copy(N).add(L).add(I).divideScalar(3);const W=A(B);R(O,j+0,N,W),R(F,j+2,L,W),R(P,j+4,I,W)}}function R(N,L,I,B){B<0&&N.x===1&&(c[L]=N.x-1),I.x===0&&I.z===0&&(c[L]=B/2/Math.PI+.5)}function A(N){return Math.atan2(N.z,-N.x)}function w(N){return Math.atan2(-N.y,Math.sqrt(N.x*N.x+N.z*N.z))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Ou(e.vertices,e.indices,e.radius,e.detail)}}class rb extends Ou{constructor(e=1,t=0){const i=(1+Math.sqrt(5))/2,s=1/i,o=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-s,-i,0,-s,i,0,s,-i,0,s,i,-s,-i,0,-s,i,0,s,-i,0,s,i,0,-i,0,-s,i,0,-s,-i,0,s,i,0,s],c=[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9];super(o,c,e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new rb(e.radius,e.detail)}}const By=new Z,Vy=new Z,tS=new Z,Fy=new Wa;class gL extends Kt{constructor(e=null,t=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:t},e!==null){const s=Math.pow(10,4),o=Math.cos(Yd*t),c=e.getIndex(),h=e.getAttribute("position"),f=c?c.count:h.count,p=[0,0,0],x=["a","b","c"],y=new Array(3),v={},S=[];for(let M=0;M<f;M+=3){c?(p[0]=c.getX(M),p[1]=c.getX(M+1),p[2]=c.getX(M+2)):(p[0]=M,p[1]=M+1,p[2]=M+2);const{a:R,b:A,c:w}=Fy;if(R.fromBufferAttribute(h,p[0]),A.fromBufferAttribute(h,p[1]),w.fromBufferAttribute(h,p[2]),Fy.getNormal(tS),y[0]=`${Math.round(R.x*s)},${Math.round(R.y*s)},${Math.round(R.z*s)}`,y[1]=`${Math.round(A.x*s)},${Math.round(A.y*s)},${Math.round(A.z*s)}`,y[2]=`${Math.round(w.x*s)},${Math.round(w.y*s)},${Math.round(w.z*s)}`,!(y[0]===y[1]||y[1]===y[2]||y[2]===y[0]))for(let N=0;N<3;N++){const L=(N+1)%3,I=y[N],B=y[L],O=Fy[x[N]],F=Fy[x[L]],P=`${I}_${B}`,V=`${B}_${I}`;V in v&&v[V]?(tS.dot(v[V].normal)<=o&&(S.push(O.x,O.y,O.z),S.push(F.x,F.y,F.z)),v[V]=null):P in v||(v[P]={index0:p[N],index1:p[L],normal:tS.clone()})}}for(const M in v)if(v[M]){const{index0:R,index1:A}=v[M];By.fromBufferAttribute(h,R),Vy.fromBufferAttribute(h,A),S.push(By.x,By.y,By.z),S.push(Vy.x,Vy.y,Vy.z)}this.setAttribute("position",new bt(S,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}class Lo{constructor(){this.type="Curve",this.arcLengthDivisions=200,this.needsUpdate=!1,this.cacheArcLengths=null}getPoint(){ct("Curve: .getPoint() not implemented.")}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,s=this.getPoint(0),o=0;t.push(0);for(let c=1;c<=e;c++)i=this.getPoint(c/e),o+=i.distanceTo(s),t.push(o),s=i;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t=null){const i=this.getLengths();let s=0;const o=i.length;let c;t?c=t:c=e*i[o-1];let h=0,f=o-1,p;for(;h<=f;)if(s=Math.floor(h+(f-h)/2),p=i[s]-c,p<0)h=s+1;else if(p>0)f=s-1;else{f=s;break}if(s=f,i[s]===c)return s/(o-1);const x=i[s],v=i[s+1]-x,S=(c-x)/v;return(s+S)/(o-1)}getTangent(e,t){let s=e-1e-4,o=e+1e-4;s<0&&(s=0),o>1&&(o=1);const c=this.getPoint(s),h=this.getPoint(o),f=t||(c.isVector2?new je:new Z);return f.copy(h).sub(c).normalize(),f}getTangentAt(e,t){const i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t=!1){const i=new Z,s=[],o=[],c=[],h=new Z,f=new Yt;for(let S=0;S<=e;S++){const M=S/e;s[S]=this.getTangentAt(M,new Z)}o[0]=new Z,c[0]=new Z;let p=Number.MAX_VALUE;const x=Math.abs(s[0].x),y=Math.abs(s[0].y),v=Math.abs(s[0].z);x<=p&&(p=x,i.set(1,0,0)),y<=p&&(p=y,i.set(0,1,0)),v<=p&&i.set(0,0,1),h.crossVectors(s[0],i).normalize(),o[0].crossVectors(s[0],h),c[0].crossVectors(s[0],o[0]);for(let S=1;S<=e;S++){if(o[S]=o[S-1].clone(),c[S]=c[S-1].clone(),h.crossVectors(s[S-1],s[S]),h.length()>Number.EPSILON){h.normalize();const M=Math.acos(Gt(s[S-1].dot(s[S]),-1,1));o[S].applyMatrix4(f.makeRotationAxis(h,M))}c[S].crossVectors(s[S],o[S])}if(t===!0){let S=Math.acos(Gt(o[0].dot(o[e]),-1,1));S/=e,s[0].dot(h.crossVectors(o[0],o[e]))>0&&(S=-S);for(let M=1;M<=e;M++)o[M].applyMatrix4(f.makeRotationAxis(s[M],S*M)),c[M].crossVectors(s[M],o[M])}return{tangents:s,normals:o,binormals:c}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.7,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class ob extends Lo{constructor(e=0,t=0,i=1,s=1,o=0,c=Math.PI*2,h=!1,f=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=i,this.yRadius=s,this.aStartAngle=o,this.aEndAngle=c,this.aClockwise=h,this.aRotation=f}getPoint(e,t=new je){const i=t,s=Math.PI*2;let o=this.aEndAngle-this.aStartAngle;const c=Math.abs(o)<Number.EPSILON;for(;o<0;)o+=s;for(;o>s;)o-=s;o<Number.EPSILON&&(c?o=0:o=s),this.aClockwise===!0&&!c&&(o===s?o=-s:o=o-s);const h=this.aStartAngle+e*o;let f=this.aX+this.xRadius*Math.cos(h),p=this.aY+this.yRadius*Math.sin(h);if(this.aRotation!==0){const x=Math.cos(this.aRotation),y=Math.sin(this.aRotation),v=f-this.aX,S=p-this.aY;f=v*x-S*y+this.aX,p=v*y+S*x+this.aY}return i.set(f,p)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}class xL extends ob{constructor(e,t,i,s,o,c){super(e,t,i,i,s,o,c),this.isArcCurve=!0,this.type="ArcCurve"}}function Zw(){let n=0,e=0,t=0,i=0;function s(o,c,h,f){n=o,e=h,t=-3*o+3*c-2*h-f,i=2*o-2*c+h+f}return{initCatmullRom:function(o,c,h,f,p){s(c,h,p*(h-o),p*(f-c))},initNonuniformCatmullRom:function(o,c,h,f,p,x,y){let v=(c-o)/p-(h-o)/(p+x)+(h-c)/x,S=(h-c)/x-(f-c)/(x+y)+(f-h)/y;v*=x,S*=x,s(c,h,v,S)},calc:function(o){const c=o*o,h=c*o;return n+e*o+t*c+i*h}}}const L3=new Z,I3=new Z,nS=new Zw,iS=new Zw,sS=new Zw;class yL extends Lo{constructor(e=[],t=!1,i="centripetal",s=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=i,this.tension=s}getPoint(e,t=new Z){const i=t,s=this.points,o=s.length,c=(o-(this.closed?0:1))*e;let h=Math.floor(c),f=c-h;this.closed?h+=h>0?0:(Math.floor(Math.abs(h)/o)+1)*o:f===0&&h===o-1&&(h=o-2,f=1);let p,x;this.closed||h>0?p=s[(h-1)%o]:(I3.subVectors(s[0],s[1]).add(s[0]),p=I3);const y=s[h%o],v=s[(h+1)%o];if(this.closed||h+2<o?x=s[(h+2)%o]:(L3.subVectors(s[o-1],s[o-2]).add(s[o-1]),x=L3),this.curveType==="centripetal"||this.curveType==="chordal"){const S=this.curveType==="chordal"?.5:.25;let M=Math.pow(p.distanceToSquared(y),S),R=Math.pow(y.distanceToSquared(v),S),A=Math.pow(v.distanceToSquared(x),S);R<1e-4&&(R=1),M<1e-4&&(M=R),A<1e-4&&(A=R),nS.initNonuniformCatmullRom(p.x,y.x,v.x,x.x,M,R,A),iS.initNonuniformCatmullRom(p.y,y.y,v.y,x.y,M,R,A),sS.initNonuniformCatmullRom(p.z,y.z,v.z,x.z,M,R,A)}else this.curveType==="catmullrom"&&(nS.initCatmullRom(p.x,y.x,v.x,x.x,this.tension),iS.initCatmullRom(p.y,y.y,v.y,x.y,this.tension),sS.initCatmullRom(p.z,y.z,v.z,x.z,this.tension));return i.set(nS.calc(f),iS.calc(f),sS.calc(f)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t<i;t++){const s=e.points[t];this.points.push(s.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,i=this.points.length;t<i;t++){const s=this.points[t];e.points.push(s.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,i=e.points.length;t<i;t++){const s=e.points[t];this.points.push(new Z().fromArray(s))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function P3(n,e,t,i,s){const o=(i-e)*.5,c=(s-t)*.5,h=n*n,f=n*h;return(2*t-2*i+o+c)*f+(-3*t+3*i-2*o-c)*h+o*n+t}function ek(n,e){const t=1-n;return t*t*e}function tk(n,e){return 2*(1-n)*n*e}function nk(n,e){return n*n*e}function Ng(n,e,t,i){return ek(n,e)+tk(n,t)+nk(n,i)}function ik(n,e){const t=1-n;return t*t*t*e}function sk(n,e){const t=1-n;return 3*t*t*n*e}function ak(n,e){return 3*(1-n)*n*n*e}function rk(n,e){return n*n*n*e}function Dg(n,e,t,i,s){return ik(n,e)+sk(n,t)+ak(n,i)+rk(n,s)}class Kw extends Lo{constructor(e=new je,t=new je,i=new je,s=new je){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=i,this.v3=s}getPoint(e,t=new je){const i=t,s=this.v0,o=this.v1,c=this.v2,h=this.v3;return i.set(Dg(e,s.x,o.x,c.x,h.x),Dg(e,s.y,o.y,c.y,h.y)),i}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class vL extends Lo{constructor(e=new Z,t=new Z,i=new Z,s=new Z){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=i,this.v3=s}getPoint(e,t=new Z){const i=t,s=this.v0,o=this.v1,c=this.v2,h=this.v3;return i.set(Dg(e,s.x,o.x,c.x,h.x),Dg(e,s.y,o.y,c.y,h.y),Dg(e,s.z,o.z,c.z,h.z)),i}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class $w extends Lo{constructor(e=new je,t=new je){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new je){const i=t;return e===1?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(e).add(this.v1)),i}getPointAt(e,t){return this.getPoint(e,t)}
vendor: 13,952 bytes, line 11
11getTangent(e,t=new je){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class bL extends Lo{constructor(e=new Z,t=new Z){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}getPoint(e,t=new Z){const i=t;return e===1?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(e).add(this.v1)),i}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new Z){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Qw extends Lo{constructor(e=new je,t=new je,i=new je){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=i}getPoint(e,t=new je){const i=t,s=this.v0,o=this.v1,c=this.v2;return i.set(Ng(e,s.x,o.x,c.x),Ng(e,s.y,o.y,c.y)),i}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Jw extends Lo{constructor(e=new Z,t=new Z,i=new Z){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=i}getPoint(e,t=new Z){const i=t,s=this.v0,o=this.v1,c=this.v2;return i.set(Ng(e,s.x,o.x,c.x),Ng(e,s.y,o.y,c.y),Ng(e,s.z,o.z,c.z)),i}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class eT extends Lo{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,t=new je){const i=t,s=this.points,o=(s.length-1)*e,c=Math.floor(o),h=o-c,f=s[c===0?c:c-1],p=s[c],x=s[c>s.length-2?s.length-1:c+1],y=s[c>s.length-3?s.length-1:c+2];return i.set(P3(h,f.x,p.x,x.x,y.x),P3(h,f.y,p.y,x.y,y.y)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t<i;t++){const s=e.points[t];this.points.push(s.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,i=this.points.length;t<i;t++){const s=this.points[t];e.points.push(s.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,i=e.points.length;t<i;t++){const s=e.points[t];this.points.push(new je().fromArray(s))}return this}}var v1=Object.freeze({__proto__:null,ArcCurve:xL,CatmullRomCurve3:yL,CubicBezierCurve:Kw,CubicBezierCurve3:vL,EllipseCurve:ob,LineCurve:$w,LineCurve3:bL,QuadraticBezierCurve:Qw,QuadraticBezierCurve3:Jw,SplineCurve:eT});class _L extends Lo{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);if(!e.equals(t)){const i=e.isVector2===!0?"LineCurve":"LineCurve3";this.curves.push(new v1[i](t,e))}return this}getPoint(e,t){const i=e*this.getLength(),s=this.getCurveLengths();let o=0;for(;o<s.length;){if(s[o]>=i){const c=s[o]-i,h=this.curves[o],f=h.getLength(),p=f===0?0:1-c/f;return h.getPointAt(p,t)}o++}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,s=this.curves.length;i<s;i++)t+=this.curves[i].getLength(),e.push(t);return this.cacheLengths=e,e}getSpacedPoints(e=40){const t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){const t=[];let i;for(let s=0,o=this.curves;s<o.length;s++){const c=o[s],h=c.isEllipseCurve?e*2:c.isLineCurve||c.isLineCurve3?1:c.isSplineCurve?e*c.points.length:e,f=c.getPoints(h);for(let p=0;p<f.length;p++){const x=f[p];i&&i.equals(x)||(t.push(x),i=x)}}return this.autoClose&&t.length>1&&!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;t<i;t++){const s=e.curves[t];this.curves.push(s.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,i=this.curves.length;t<i;t++){const s=this.curves[t];e.curves.push(s.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,i=e.curves.length;t<i;t++){const s=e.curves[t];this.curves.push(new v1[s.type]().fromJSON(s))}return this}}class b1 extends _L{constructor(e){super(),this.type="Path",this.currentPoint=new je,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,i=e.length;t<i;t++)this.lineTo(e[t].x,e[t].y);return this}moveTo(e,t){return this.currentPoint.set(e,t),this}lineTo(e,t){const i=new $w(this.currentPoint.clone(),new je(e,t));return this.curves.push(i),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,i,s){const o=new Qw(this.currentPoint.clone(),new je(e,t),new je(i,s));return this.curves.push(o),this.currentPoint.set(i,s),this}bezierCurveTo(e,t,i,s,o,c){const h=new Kw(this.currentPoint.clone(),new je(e,t),new je(i,s),new je(o,c));return this.curves.push(h),this.currentPoint.set(o,c),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),i=new eT(t);return this.curves.push(i),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,i,s,o,c){const h=this.currentPoint.x,f=this.currentPoint.y;return this.absarc(e+h,t+f,i,s,o,c),this}absarc(e,t,i,s,o,c){return this.absellipse(e,t,i,i,s,o,c),this}ellipse(e,t,i,s,o,c,h,f){const p=this.currentPoint.x,x=this.currentPoint.y;return this.absellipse(e+p,t+x,i,s,o,c,h,f),this}absellipse(e,t,i,s,o,c,h,f){const p=new ob(e,t,i,s,o,c,h,f);if(this.curves.length>0){const y=p.getPoint(0);y.equals(this.currentPoint)||this.lineTo(y.x,y.y)}this.curves.push(p);const x=p.getPoint(1);return this.currentPoint.copy(x),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 Zd extends b1{constructor(e){super(e),this.uuid=cr(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let i=0,s=this.holes.length;i<s;i++)t[i]=this.holes[i].getPoints(e);return t}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let t=0,i=e.holes.length;t<i;t++){const s=e.holes[t];this.holes.push(s.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,i=this.holes.length;t<i;t++){const s=this.holes[t];e.holes.push(s.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,i=e.holes.length;t<i;t++){const s=e.holes[t];this.holes.push(new b1().fromJSON(s))}return this}}function ok(n,e,t=2){const i=e&&e.length,s=i?e[0]*t:n.length;let o=SL(n,0,s,t,!0);const c=[];if(!o||o.next===o.prev)return c;let h,f,p;if(i&&(o=hk(n,e,o,t)),n.length>80*t){h=n[0],f=n[1];let x=h,y=f;for(let v=t;v<s;v+=t){const S=n[v],M=n[v+1];S<h&&(h=S),M<f&&(f=M),S>x&&(x=S),M>y&&(y=M)}p=Math.max(x-h,y-f),p=p!==0?32767/p:0}return $g(o,c,t,h,f,p,0),c}function SL(n,e,t,i,s){let o;if(s===Mk(n,e,t,i)>0)for(let c=e;c<t;c+=i)o=U3(c/i|0,n[c],n[c+1],o);else for(let c=t-i;c>=e;c-=i)o=U3(c/i|0,n[c],n[c+1],o);return o&&sp(o,o.next)&&(Jg(o),o=o.next),o}function eh(n,e){if(!n)return n;e||(e=n);let t=n,i;do if(i=!1,!t.steiner&&(sp(t,t.next)||Di(t.prev,t,t.next)===0)){if(Jg(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function $g(n,e,t,i,s,o,c){if(!n)return;!c&&o&&xk(n,i,s,o);let h=n;for(;n.prev!==n.next;){const f=n.prev,p=n.next;if(o?ck(n,i,s,o):lk(n)){e.push(f.i,n.i,p.i),Jg(n),n=p.next,h=p.next;continue}if(n=p,n===h){c?c===1?(n=uk(eh(n),e),$g(n,e,t,i,s,o,2)):c===2&&dk(n,e,t,i,s,o):$g(eh(n),e,t,i,s,o,1);break}}}function lk(n){const e=n.prev,t=n,i=n.next;if(Di(e,t,i)>=0)return!1;const s=e.x,o=t.x,c=i.x,h=e.y,f=t.y,p=i.y,x=Math.min(s,o,c),y=Math.min(h,f,p),v=Math.max(s,o,c),S=Math.max(h,f,p);let M=i.next;for(;M!==e;){if(M.x>=x&&M.x<=v&&M.y>=y&&M.y<=S&&hg(s,h,o,f,c,p,M.x,M.y)&&Di(M.prev,M,M.next)>=0)return!1;M=M.next}return!0}function ck(n,e,t,i){const s=n.prev,o=n,c=n.next;if(Di(s,o,c)>=0)return!1;const h=s.x,f=o.x,p=c.x,x=s.y,y=o.y,v=c.y,S=Math.min(h,f,p),M=Math.min(x,y,v),R=Math.max(h,f,p),A=Math.max(x,y,v),w=bM(S,M,e,t,i),N=bM(R,A,e,t,i);let L=n.prevZ,I=n.nextZ;for(;L&&L.z>=w&&I&&I.z<=N;){if(L.x>=S&&L.x<=R&&L.y>=M&&L.y<=A&&L!==s&&L!==c&&hg(h,x,f,y,p,v,L.x,L.y)&&Di(L.prev,L,L.next)>=0||(L=L.prevZ,I.x>=S&&I.x<=R&&I.y>=M&&I.y<=A&&I!==s&&I!==c&&hg(h,x,f,y,p,v,I.x,I.y)&&Di(I.prev,I,I.next)>=0))return!1;I=I.nextZ}for(;L&&L.z>=w;){if(L.x>=S&&L.x<=R&&L.y>=M&&L.y<=A&&L!==s&&L!==c&&hg(h,x,f,y,p,v,L.x,L.y)&&Di(L.prev,L,L.next)>=0)return!1;L=L.prevZ}for(;I&&I.z<=N;){if(I.x>=S&&I.x<=R&&I.y>=M&&I.y<=A&&I!==s&&I!==c&&hg(h,x,f,y,p,v,I.x,I.y)&&Di(I.prev,I,I.next)>=0)return!1;I=I.nextZ}return!0}function uk(n,e){let t=n;do{const i=t.prev,s=t.next.next;!sp(i,s)&&wL(i,t,t.next,s)&&Qg(i,s)&&Qg(s,i)&&(e.push(i.i,t.i,s.i),Jg(t),Jg(t.next),t=n=s),t=t.next}while(t!==n);return eh(t)}function dk(n,e,t,i,s,o){let c=n;do{let h=c.next.next;for(;h!==c.prev;){if(c.i!==h.i&&bk(c,h)){let f=TL(c,h);c=eh(c,c.next),f=eh(f,f.next),$g(c,e,t,i,s,o,0),$g(f,e,t,i,s,o,0);return}h=h.next}c=c.next}while(c!==n)}function hk(n,e,t,i){const s=[];for(let o=0,c=e.length;o<c;o++){const h=e[o]*i,f=o<c-1?e[o+1]*i:n.length,p=SL(n,h,f,i,!1);p===p.next&&(p.steiner=!0),s.push(vk(p))}s.sort(fk);for(let o=0;o<s.length;o++)t=pk(s[o],t);return t}function fk(n,e){let t=n.x-e.x;if(t===0&&(t=n.y-e.y,t===0)){const i=(n.next.y-n.y)/(n.next.x-n.x),s=(e.next.y-e.y)/(e.next.x-e.x);t=i-s}return t}function pk(n,e){const t=mk(n,e);if(!t)return e;const i=TL(t,n);return eh(i,i.next),eh(t,t.next)}function mk(n,e){let t=e;const i=n.x,s=n.y;let o=-1/0,c;if(sp(n,t))return t;do{if(sp(n,t.next))return t.next;if(s<=t.y&&s>=t.next.y&&t.next.y!==t.y){const y=t.x+(s-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(y<=i&&y>o&&(o=y,c=t.x<t.next.x?t:t.next,y===i))return c}t=t.next}while(t!==e);if(!c)return null;const h=c,f=c.x,p=c.y;let x=1/0;t=c;do{if(i>=t.x&&t.x>=f&&i!==t.x&&ML(s<p?i:o,s,f,p,s<p?o:i,s,t.x,t.y)){const y=Math.abs(s-t.y)/(i-t.x);Qg(t,n)&&(y<x||y===x&&(t.x>c.x||t.x===c.x&&gk(c,t)))&&(c=t,x=y)}t=t.next}while(t!==h);return c}function gk(n,e){return Di(n.prev,n,e.prev)<0&&Di(e.next,n,n.next)<0}function xk(n,e,t,i){let s=n;do s.z===0&&(s.z=bM(s.x,s.y,e,t,i)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==n);s.prevZ.nextZ=null,s.prevZ=null,yk(s)}function yk(n){let e,t=1;do{let i=n,s;n=null;let o=null;for(e=0;i;){e++;let c=i,h=0;for(let p=0;p<t&&(h++,c=c.nextZ,!!c);p++);let f=t;for(;h>0||f>0&&c;)h!==0&&(f===0||!c||i.z<=c.z)?(s=i,i=i.nextZ,h--):(s=c,c=c.nextZ,f--),o?o.nextZ=s:n=s,s.prevZ=o,o=s;i=c}o.nextZ=null,t*=2}while(e>1);return n}function bM(n,e,t,i,s){return n=(n-t)*s|0,e=(e-i)*s|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 vk(n){let e=n,t=n;do(e.x<t.x||e.x===t.x&&e.y<t.y)&&(t=e),e=e.next;while(e!==n);return t}function ML(n,e,t,i,s,o,c,h){return(s-c)*(e-h)>=(n-c)*(o-h)&&(n-c)*(i-h)>=(t-c)*(e-h)&&(t-c)*(o-h)>=(s-c)*(i-h)}function hg(n,e,t,i,s,o,c,h){return!(n===c&&e===h)&&ML(n,e,t,i,s,o,c,h)}function bk(n,e){return n.next.i!==e.i&&n.prev.i!==e.i&&!_k(n,e)&&(Qg(n,e)&&Qg(e,n)&&Sk(n,e)&&(Di(n.prev,n,e.prev)||Di(n,e.prev,e))||sp(n,e)&&Di(n.prev,n,n.next)>0&&Di(e.prev,e,e.next)>0)}function Di(n,e,t){return(e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y)}function sp(n,e){return n.x===e.x&&n.y===e.y}function wL(n,e,t,i){const s=Hy(Di(n,e,t)),o=Hy(Di(n,e,i)),c=Hy(Di(t,i,n)),h=Hy(Di(t,i,e));return!!(s!==o&&c!==h||s===0&&ky(n,t,e)||o===0&&ky(n,i,e)||c===0&&ky(t,n,i)||h===0&&ky(t,e,i))}function ky(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 Hy(n){return n>0?1:n<0?-1:0}function _k(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&&wL(t,t.next,n,e))return!0;t=t.next}while(t!==n);return!1}function Qg(n,e){return Di(n.prev,n,n.next)<0?Di(n,e,n.next)>=0&&Di(n,n.prev,e)>=0:Di(n,e,n.prev)<0||Di(n,n.next,e)<0}function Sk(n,e){let t=n,i=!1;const s=(n.x+e.x)/2,o=(n.y+e.y)/2;do t.y>o!=t.next.y>o&&t.next.y!==t.y&&s<(t.next.x-t.x)*(o-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==n);return i}function TL(n,e){const t=_M(n.i,n.x,n.y),i=_M(e.i,e.x,e.y),s=n.next,o=e.prev;return n.next=e,e.prev=n,t.next=s,s.prev=t,i.next=t,t.prev=i,o.next=i,i.prev=o,i}function U3(n,e,t,i){const s=_M(n,e,t);return i?(s.next=i.next,s.prev=i,i.next.prev=s,i.next=s):(s.prev=s,s.next=s),s}function Jg(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){return{i:n,x:e,y:t,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function Mk(n,e,t,i){let s=0;for(let o=e,c=t-i;o<t;o+=i)s+=(n[c]-n[o])*(n[o+1]+n[c+1]),c=o;return s}class wk{static triangulate(e,t,i=2){return ok(e,t,i)}}class To{static area(e){const t=e.length;let i=0;for(let s=t-1,o=0;o<t;s=o++)i+=e[s].x*e[o].y-e[o].x*e[s].y;return i*.5}static isClockWise(e){return To.area(e)<0}
11static triangulateShape(e,t){const i=[],s=[],o=[];O3(e),z3(i,e);let c=e.length;t.forEach(O3);for(let f=0;f<t.length;f++)s.push(c),c+=t[f].length,z3(i,t[f]);const h=wk.triangulate(i,s);for(let f=0;f<h.length;f+=3)o.push(h.slice(f,f+3));return o}}function O3(n){const e=n.length;e>2&&n[e-1].equals(n[0])&&n.pop()}function z3(n,e){for(let t=0;t<e.length;t++)n.push(e[t].x),n.push(e[t].y)}class lb extends Kt{constructor(e=new Zd([new je(.5,.5),new je(-.5,.5),new je(-.5,-.5),new je(.5,-.5)]),t={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const i=this,s=[],o=[];for(let h=0,f=e.length;h<f;h++){const p=e[h];c(p)}this.setAttribute("position",new bt(s,3)),this.setAttribute("uv",new bt(o,2)),this.computeVertexNormals();function c(h){const f=[],p=t.curveSegments!==void 0?t.curveSegments:12,x=t.steps!==void 0?t.steps:1,y=t.depth!==void 0?t.depth:1;let v=t.bevelEnabled!==void 0?t.bevelEnabled:!0,S=t.bevelThickness!==void 0?t.bevelThickness:.2,M=t.bevelSize!==void 0?t.bevelSize:S-.1,R=t.bevelOffset!==void 0?t.bevelOffset:0,A=t.bevelSegments!==void 0?t.bevelSegments:3;const w=t.extrudePath,N=t.UVGenerator!==void 0?t.UVGenerator:Tk;let L,I=!1,B,O,F,P;if(w){L=w.getSpacedPoints(x),I=!0,v=!1;const Ue=w.isCatmullRomCurve3?w.closed:!1;B=w.computeFrenetFrames(x,Ue),O=new Z,F=new Z,P=new Z}v||(A=0,S=0,M=0,R=0);const V=h.extractPoints(p);let j=V.shape;const W=V.holes;if(!To.isClockWise(j)){j=j.reverse();for(let Ue=0,Xe=W.length;Ue<Xe;Ue++){const Oe=W[Ue];To.isClockWise(Oe)&&(W[Ue]=Oe.reverse())}}function ie(Ue){const Oe=10000000000000001e-36;let at=Ue[0];for(let st=1;st<=Ue.length;st++){const Pt=st%Ue.length,J=Ue[Pt],Ot=J.x-at.x,gt=J.y-at.y,vt=Ot*Ot+gt*gt,He=Math.max(Math.abs(J.x),Math.abs(J.y),Math.abs(at.x),Math.abs(at.y)),Cn=Oe*He*He;if(vt<=Cn){Ue.splice(Pt,1),st--;continue}at=J}}ie(j),W.forEach(ie);const ue=W.length,Q=j;for(let Ue=0;Ue<ue;Ue++){const Xe=W[Ue];j=j.concat(Xe)}function Y(Ue,Xe,Oe){return Xe||Et("ExtrudeGeometry: vec does not exist"),Ue.clone().addScaledVector(Xe,Oe)}const $=j.length;function le(Ue,Xe,Oe){let at,st,Pt;const J=Ue.x-Xe.x,Ot=Ue.y-Xe.y,gt=Oe.x-Ue.x,vt=Oe.y-Ue.y,He=J*J+Ot*Ot,Cn=J*vt-Ot*gt;if(Math.abs(Cn)>Number.EPSILON){const X=Math.sqrt(He),z=Math.sqrt(gt*gt+vt*vt),de=Xe.x-Ot/X,Re=Xe.y+J/X,Fe=Oe.x-vt/z,$e=Oe.y+gt/z,Je=((Fe-de)*vt-($e-Re)*gt)/(J*vt-Ot*gt);at=de+J*Je-Ue.x,st=Re+Ot*Je-Ue.y;const Ee=at*at+st*st;if(Ee<=2)return new je(at,st);Pt=Math.sqrt(Ee/2)}else{let X=!1;J>Number.EPSILON?gt>Number.EPSILON&&(X=!0):J<-Number.EPSILON?gt<-Number.EPSILON&&(X=!0):Math.sign(Ot)===Math.sign(vt)&&(X=!0),X?(at=-Ot,st=J,Pt=Math.sqrt(He)):(at=J,st=Ot,Pt=Math.sqrt(He/2))}return new je(at/Pt,st/Pt)}const ge=[];for(let Ue=0,Xe=Q.length,Oe=Xe-1,at=Ue+1;Ue<Xe;Ue++,Oe++,at++)Oe===Xe&&(Oe=0),at===Xe&&(at=0),ge[Ue]=le(Q[Ue],Q[Oe],Q[at]);const Ce=[];let q,ae=ge.concat();for(let Ue=0,Xe=ue;Ue<Xe;Ue++){const Oe=W[Ue];q=[];for(let at=0,st=Oe.length,Pt=st-1,J=at+1;at<st;at++,Pt++,J++)Pt===st&&(Pt=0),J===st&&(J=0),q[at]=le(Oe[at],Oe[Pt],Oe[J]);Ce.push(q),ae=ae.concat(q)}let Ae;if(A===0)Ae=To.triangulateShape(Q,W);else{const Ue=[],Xe=[];for(let Oe=0;Oe<A;Oe++){const at=Oe/A,st=S*Math.cos(at*Math.PI/2),Pt=M*Math.sin(at*Math.PI/2)+R;for(let J=0,Ot=Q.length;J<Ot;J++){const gt=Y(Q[J],ge[J],Pt);Ze(gt.x,gt.y,-st),at===0&&Ue.push(gt)}for(let J=0,Ot=ue;J<Ot;J++){const gt=W[J];q=Ce[J];const vt=[];for(let He=0,Cn=gt.length;He<Cn;He++){const X=Y(gt[He],q[He],Pt);Ze(X.x,X.y,-st),at===0&&vt.push(X)}at===0&&Xe.push(vt)}}Ae=To.triangulateShape(Ue,Xe)}const Ie=Ae.length,We=M+R;for(let Ue=0;Ue<$;Ue++){const Xe=v?Y(j[Ue],ae[Ue],We):j[Ue];I?(F.copy(B.normals[0]).multiplyScalar(Xe.x),O.copy(B.binormals[0]).multiplyScalar(Xe.y),P.copy(L[0]).add(F).add(O),Ze(P.x,P.y,P.z)):Ze(Xe.x,Xe.y,0)}for(let Ue=1;Ue<=x;Ue++)for(let Xe=0;Xe<$;Xe++){const Oe=v?Y(j[Xe],ae[Xe],We):j[Xe];I?(F.copy(B.normals[Ue]).multiplyScalar(Oe.x),O.copy(B.binormals[Ue]).multiplyScalar(Oe.y),P.copy(L[Ue]).add(F).add(O),Ze(P.x,P.y,P.z)):Ze(Oe.x,Oe.y,y/x*Ue)}for(let Ue=A-1;Ue>=0;Ue--){const Xe=Ue/A,Oe=S*Math.cos(Xe*Math.PI/2),at=M*Math.sin(Xe*Math.PI/2)+R;for(let st=0,Pt=Q.length;
vendor: 34,335 bytes, lines 11-15
11st<Pt;st++){const J=Y(Q[st],ge[st],at);Ze(J.x,J.y,y+Oe)}for(let st=0,Pt=W.length;st<Pt;st++){const J=W[st];q=Ce[st];for(let Ot=0,gt=J.length;Ot<gt;Ot++){const vt=Y(J[Ot],q[Ot],at);I?Ze(vt.x,vt.y+L[x-1].y,L[x-1].x+Oe):Ze(vt.x,vt.y,y+Oe)}}}pe(),Be();function pe(){const Ue=s.length/3;if(v){let Xe=0,Oe=$*Xe;for(let at=0;at<Ie;at++){const st=Ae[at];Rt(st[2]+Oe,st[1]+Oe,st[0]+Oe)}Xe=x+A*2,Oe=$*Xe;for(let at=0;at<Ie;at++){const st=Ae[at];Rt(st[0]+Oe,st[1]+Oe,st[2]+Oe)}}else{for(let Xe=0;Xe<Ie;Xe++){const Oe=Ae[Xe];Rt(Oe[2],Oe[1],Oe[0])}for(let Xe=0;Xe<Ie;Xe++){const Oe=Ae[Xe];Rt(Oe[0]+$*x,Oe[1]+$*x,Oe[2]+$*x)}}i.addGroup(Ue,s.length/3-Ue,0)}function Be(){const Ue=s.length/3;let Xe=0;Ve(Q,Xe),Xe+=Q.length;for(let Oe=0,at=W.length;Oe<at;Oe++){const st=W[Oe];Ve(st,Xe),Xe+=st.length}i.addGroup(Ue,s.length/3-Ue,1)}function Ve(Ue,Xe){let Oe=Ue.length;for(;--Oe>=0;){const at=Oe;let st=Oe-1;st<0&&(st=Ue.length-1);for(let Pt=0,J=x+A*2;Pt<J;Pt++){const Ot=$*Pt,gt=$*(Pt+1),vt=Xe+at+Ot,He=Xe+st+Ot,Cn=Xe+st+gt,X=Xe+at+gt;Ct(vt,He,Cn,X)}}}function Ze(Ue,Xe,Oe){f.push(Ue),f.push(Xe),f.push(Oe)}function Rt(Ue,Xe,Oe){Jt(Ue),Jt(Xe),Jt(Oe);const at=s.length/3,st=N.generateTopUV(i,s,at-3,at-2,at-1);Nt(st[0]),Nt(st[1]),Nt(st[2])}function Ct(Ue,Xe,Oe,at){Jt(Ue),Jt(Xe),Jt(at),Jt(Xe),Jt(Oe),Jt(at);const st=s.length/3,Pt=N.generateSideWallUV(i,s,st-6,st-3,st-2,st-1);Nt(Pt[0]),Nt(Pt[1]),Nt(Pt[3]),Nt(Pt[1]),Nt(Pt[2]),Nt(Pt[3])}function Jt(Ue){s.push(f[Ue*3+0]),s.push(f[Ue*3+1]),s.push(f[Ue*3+2])}function Nt(Ue){o.push(Ue.x),o.push(Ue.y)}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),t=this.parameters.shapes,i=this.parameters.options;return Ek(t,i,e)}static fromJSON(e,t){const i=[];for(let o=0,c=e.shapes.length;o<c;o++){const h=t[e.shapes[o]];i.push(h)}const s=e.options.extrudePath;return s!==void 0&&(e.options.extrudePath=new v1[s.type]().fromJSON(s)),new lb(i,e.options)}}const Tk={generateTopUV:function(n,e,t,i,s){const o=e[t*3],c=e[t*3+1],h=e[i*3],f=e[i*3+1],p=e[s*3],x=e[s*3+1];return[new je(o,c),new je(h,f),new je(p,x)]},generateSideWallUV:function(n,e,t,i,s,o){const c=e[t*3],h=e[t*3+1],f=e[t*3+2],p=e[i*3],x=e[i*3+1],y=e[i*3+2],v=e[s*3],S=e[s*3+1],M=e[s*3+2],R=e[o*3],A=e[o*3+1],w=e[o*3+2];return Math.abs(h-x)<Math.abs(c-p)?[new je(c,1-f),new je(p,1-y),new je(v,1-M),new je(R,1-w)]:[new je(h,1-f),new je(x,1-y),new je(S,1-M),new je(A,1-w)]}};function Ek(n,e,t){if(t.shapes=[],Array.isArray(n))for(let i=0,s=n.length;i<s;i++){const o=n[i];t.shapes.push(o.uuid)}else t.shapes.push(n.uuid);return t.options=Object.assign({},e),e.extrudePath!==void 0&&(t.options.extrudePath=e.extrudePath.toJSON()),t}class cb extends Ou{constructor(e=1,t=0){const i=(1+Math.sqrt(5))/2,s=[-1,i,0,1,i,0,-1,-i,0,1,-i,0,0,-1,i,0,1,i,0,-1,-i,0,1,-i,i,0,-1,i,0,1,-i,0,-1,-i,0,1],o=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1];super(s,o,e,t),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new cb(e.radius,e.detail)}}class ub extends Kt{constructor(e=[new je(0,-.5),new je(.5,0),new je(0,.5)],t=12,i=0,s=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:i,phiLength:s},t=Math.floor(t),s=Gt(s,0,Math.PI*2);const o=[],c=[],h=[],f=[],p=[],x=1/t,y=new Z,v=new je,S=new Z,M=new Z,R=new Z;let A=0,w=0;for(let N=0;N<=e.length-1;N++)switch(N){case 0:A=e[N+1].x-e[N].x,w=e[N+1].y-e[N].y,S.x=w*1,S.y=-A,S.z=w*0,R.copy(S),S.normalize(),f.push(S.x,S.y,S.z);break;case e.length-1:f.push(R.x,R.y,R.z);break;default:A=e[N+1].x-e[N].x,w=e[N+1].y-e[N].y,S.x=w*1,S.y=-A,S.z=w*0,M.copy(S),S.x+=R.x,S.y+=R.y,S.z+=R.z,S.normalize(),f.push(S.x,S.y,S.z),R.copy(M)}for(let N=0;N<=t;N++){const L=i+N*x*s,I=Math.sin(L),B=Math.cos(L);for(let O=0;O<=e.length-1;O++){y.x=e[O].x*I,y.y=e[O].y,y.z=e[O].x*B,c.push(y.x,y.y,y.z),v.x=N/t,v.y=O/(e.length-1),h.push(v.x,v.y);const F=f[3*O+0]*I,P=f[3*O+1],V=f[3*O+0]*B;p.push(F,P,V)}}for(let N=0;N<t;N++)for(let L=0;L<e.length-1;L++){const I=L+N*e.length,B=I,O=I+e.length,F=I+e.length+1,P=I+1;o.push(B,O,P),o.push(F,P,O)}this.setIndex(o),this.setAttribute("position",new bt(c,3)),this.setAttribute("uv",new bt(h,2)),this.setAttribute("normal",new bt(p,3))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new ub(e.points,e.segments,e.phiStart,e.phiLength)}}class y0 extends Ou{constructor(e=1,t=0){const i=[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],s=[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2];super(i,s,e,t),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new y0(e.radius,e.detail)}}class pp extends Kt{constructor(e=1,t=1,i=1,s=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:i,heightSegments:s};const o=e/2,c=t/2,h=Math.floor(i),f=Math.floor(s),p=h+1,x=f+1,y=e/h,v=t/f,S=[],M=[],R=[],A=[];for(let w=0;w<x;w++){const N=w*v-c;for(let L=0;L<p;L++){const I=L*y-o;M.push(I,-N,0),R.push(0,0,1),A.push(L/h),A.push(1-w/f)}}for(let w=0;w<f;w++)for(let N=0;N<h;N++){const L=N+p*w,I=N+p*(w+1),B=N+1+p*(w+1),O=N+1+p*w;S.push(L,I,O),S.push(I,B,O)}this.setIndex(S),this.setAttribute("position",new bt(M,3)),this.setAttribute("normal",new bt(R,3)),this.setAttribute("uv",new bt(A,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new pp(e.width,e.height,e.widthSegments,e.heightSegments)}}class db extends Kt{constructor(e=.5,t=1,i=32,s=1,o=0,c=Math.PI*2){super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:i,phiSegments:s,thetaStart:o,thetaLength:c},i=Math.max(3,i),s=Math.max(1,s);const h=[],f=[],p=[],x=[];let y=e;const v=(t-e)/s,S=new Z,M=new je;for(let R=0;R<=s;R++){for(let A=0;A<=i;A++){const w=o+A/i*c;S.x=y*Math.cos(w),S.y=y*Math.sin(w),f.push(S.x,S.y,S.z),p.push(0,0,1),M.x=(S.x/t+1)/2,M.y=(S.y/t+1)/2,x.push(M.x,M.y)}y+=v}for(let R=0;R<s;R++){const A=R*(i+1);for(let w=0;w<i;w++){const N=w+A,L=N,I=N+i+1,B=N+i+2,O=N+1;h.push(L,I,O),h.push(I,B,O)}}this.setIndex(h),this.setAttribute("position",new bt(f,3)),this.setAttribute("normal",new bt(p,3)),this.setAttribute("uv",new bt(x,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new db(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class hb extends Kt{constructor(e=new Zd([new je(0,.5),new je(-.5,-.5),new je(.5,-.5)]),t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const i=[],s=[],o=[],c=[];let h=0,f=0;if(Array.isArray(e)===!1)p(e);else for(let x=0;x<e.length;x++)p(e[x]),this.addGroup(h,f,x),h+=f,f=0;this.setIndex(i),this.setAttribute("position",new bt(s,3)),this.setAttribute("normal",new bt(o,3)),this.setAttribute("uv",new bt(c,2));function p(x){const y=s.length/3,v=x.extractPoints(t);let S=v.shape;const M=v.holes;To.isClockWise(S)===!1&&(S=S.reverse());for(let A=0,w=M.length;A<w;A++){const N=M[A];To.isClockWise(N)===!0&&(M[A]=N.reverse())}const R=To.triangulateShape(S,M);for(let A=0,w=M.length;A<w;A++){const N=M[A];S=S.concat(N)}for(let A=0,w=S.length;A<w;A++){const N=S[A];s.push(N.x,N.y,0),o.push(0,0,1),c.push(N.x,N.y)}for(let A=0,w=R.length;A<w;A++){const N=R[A],L=N[0]+y,I=N[1]+y,B=N[2]+y;i.push(L,I,B),f+=3}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),t=this.parameters.shapes;return Ak(t,e)}static fromJSON(e,t){const i=[];for(let s=0,o=e.shapes.length;s<o;s++){const c=t[e.shapes[s]];i.push(c)}return new hb(i,e.curveSegments)}}function Ak(n,e){if(e.shapes=[],Array.isArray(n))for(let t=0,i=n.length;t<i;t++){const s=n[t];e.shapes.push(s.uuid)}else e.shapes.push(n.uuid);return e}class v0 extends Kt{constructor(e=1,t=32,i=16,s=0,o=Math.PI*2,c=0,h=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:i,phiStart:s,phiLength:o,thetaStart:c,thetaLength:h},t=Math.max(3,Math.floor(t)),i=Math.max(2,Math.floor(i));const f=Math.min(c+h,Math.PI);let p=0;const x=[],y=new Z,v=new Z,S=[],M=[],R=[],A=[];for(let w=0;w<=i;w++){const N=[],L=w/i;let I=0;w===0&&c===0?I=.5/t:w===i&&f===Math.PI&&(I=-.5/t);for(let B=0;B<=t;B++){const O=B/t;y.x=-e*Math.cos(s+O*o)*Math.sin(c+L*h),y.y=e*Math.cos(c+L*h),y.z=e*Math.sin(s+O*o)*Math.sin(c+L*h),M.push(y.x,y.y,y.z),v.copy(y).normalize(),R.push(v.x,v.y,v.z),A.push(O+I,1-L),N.push(p++)}x.push(N)}for(let w=0;w<i;w++)for(let N=0;N<t;N++){const L=x[w][N+1],I=x[w][N],B=x[w+1][N],O=x[w+1][N+1];(w!==0||c>0)&&S.push(L,I,O),(w!==i-1||f<Math.PI)&&S.push(I,B,O)}this.setIndex(S),this.setAttribute("position",new bt(M,3)),this.setAttribute("normal",new bt(R,3)),this.setAttribute("uv",new bt(A,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new v0(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class fb extends Ou{constructor(e=1,t=0){const i=[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],s=[2,1,0,0,3,2,1,3,0,2,3,1];super(i,s,e,t),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new fb(e.radius,e.detail)}}class pb extends Kt{constructor(e=1,t=.4,i=12,s=48,o=Math.PI*2,c=0,h=Math.PI*2){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:i,tubularSegments:s,arc:o,thetaStart:c,thetaLength:h},i=Math.floor(i),s=Math.floor(s);const f=[],p=[],x=[],y=[],v=new Z,S=new Z,M=new Z;for(let R=0;R<=i;R++){const A=c+R/i*h;for(let w=0;w<=s;w++){const N=w/s*o;S.x=(e+t*Math.cos(A))*Math.cos(N),S.y=(e+t*Math.cos(A))*Math.sin(N),S.z=t*Math.sin(A),p.push(S.x,S.y,S.z),v.x=e*Math.cos(N),v.y=e*Math.sin(N),M.subVectors(S,v).normalize(),x.push(M.x,M.y,M.z),y.push(w/s),y.push(R/i)}}for(let R=1;R<=i;R++)for(let A=1;A<=s;A++){const w=(s+1)*R+A-1,N=(s+1)*(R-1)+A-1,L=(s+1)*(R-1)+A,I=(s+1)*R+A;f.push(w,N,I),f.push(N,L,I)}this.setIndex(f),this.setAttribute("position",new bt(p,3)),this.setAttribute("normal",new bt(x,3)),this.setAttribute("uv",new bt(y,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new pb(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class mb extends Kt{constructor(e=1,t=.4,i=64,s=8,o=2,c=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:i,radialSegments:s,p:o,q:c},i=Math.floor(i),s=Math.floor(s);const h=[],f=[],p=[],x=[],y=new Z,v=new Z,S=new Z,M=new Z,R=new Z,A=new Z,w=new Z;for(let L=0;L<=i;++L){const I=L/i*o*Math.PI*2;N(I,o,c,e,S),N(I+.01,o,c,e,M),A.subVectors(M,S),w.addVectors(M,S),R.crossVectors(A,w),w.crossVectors(R,A),R.normalize(),w.normalize();for(let B=0;B<=s;++B){const O=B/s*Math.PI*2,F=-t*Math.cos(O),P=t*Math.sin(O);y.x=S.x+(F*w.x+P*R.x),y.y=S.y+(F*w.y+P*R.y),y.z=S.z+(F*w.z+P*R.z),f.push(y.x,y.y,y.z),v.subVectors(y,S).normalize(),p.push(v.x,v.y,v.z),x.push(L/i),x.push(B/s)}}for(let L=1;L<=i;L++)for(let I=1;I<=s;I++){const B=(s+1)*(L-1)+(I-1),O=(s+1)*L+(I-1),F=(s+1)*L+I,P=(s+1)*(L-1)+I;h.push(B,O,P),h.push(O,F,P)}this.setIndex(h),this.setAttribute("position",new bt(f,3)),this.setAttribute("normal",new bt(p,3)),this.setAttribute("uv",new bt(x,2));function N(L,I,B,O,F){const P=Math.cos(L),V=Math.sin(L),j=B/I*L,W=Math.cos(j);F.x=O*(2+W)*.5*P,F.y=O*(2+W)*V*.5,F.z=O*Math.sin(j)*.5}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new mb(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}class gb extends Kt{constructor(e=new Jw(new Z(-1,-1,0),new Z(-1,1,0),new Z(1,1,0)),t=64,i=1,s=8,o=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:i,radialSegments:s,closed:o};const c=e.computeFrenetFrames(t,o);this.tangents=c.tangents,this.normals=c.normals,this.binormals=c.binormals;const h=new Z,f=new Z,p=new je;let x=new Z;const y=[],v=[],S=[],M=[];R(),this.setIndex(M),this.setAttribute("position",new bt(y,3)),this.setAttribute("normal",new bt(v,3)),this.setAttribute("uv",new bt(S,2));function R(){for(let L=0;L<t;L++)A(L);A(o===!1?t:0),N(),w()}function A(L){x=e.getPointAt(L/t,x);const I=c.normals[L],B=c.binormals[L];for(let O=0;O<=s;O++){const F=O/s*Math.PI*2,P=Math.sin(F),V=-Math.cos(F);f.x=V*I.x+P*B.x,f.y=V*I.y+P*B.y,f.z=V*I.z+P*B.z,f.normalize(),v.push(f.x,f.y,f.z),h.x=x.x+i*f.x,h.y=x.y+i*f.y,h.z=x.z+i*f.z,y.push(h.x,h.y,h.z)}}function w(){for(let L=1;L<=t;L++)for(let I=1;I<=s;I++){const B=(s+1)*(L-1)+(I-1),O=(s+1)*L+(I-1),F=(s+1)*L+I,P=(s+1)*(L-1)+I;M.push(B,O,P),M.push(O,F,P)}}function N(){for(let L=0;L<=t;L++)for(let I=0;I<=s;I++)p.x=L/t,p.y=I/s,S.push(p.x,p.y)}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new gb(new v1[e.path.type]().fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class EL extends Kt{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},e!==null){const t=[],i=new Set,s=new Z,o=new Z;if(e.index!==null){const c=e.attributes.position,h=e.index;let f=e.groups;f.length===0&&(f=[{start:0,count:h.count,materialIndex:0}]);for(let p=0,x=f.length;p<x;++p){const y=f[p],v=y.start,S=y.count;for(let M=v,R=v+S;M<R;M+=3)for(let A=0;A<3;A++){const w=h.getX(M+A),N=h.getX(M+(A+1)%3);s.fromBufferAttribute(c,w),o.fromBufferAttribute(c,N),B3(s,o,i)===!0&&(t.push(s.x,s.y,s.z),t.push(o.x,o.y,o.z))}}}else{const c=e.attributes.position;for(let h=0,f=c.count/3;h<f;h++)for(let p=0;p<3;p++){const x=3*h+p,y=3*h+(p+1)%3;s.fromBufferAttribute(c,x),o.fromBufferAttribute(c,y),B3(s,o,i)===!0&&(t.push(s.x,s.y,s.z),t.push(o.x,o.y,o.z))}}this.setAttribute("position",new bt(t,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}function B3(n,e,t){const i=`${n.x},${n.y},${n.z}-${e.x},${e.y},${e.z}`,s=`${e.x},${e.y},${e.z}-${n.x},${n.y},${n.z}`;return t.has(i)===!0||t.has(s)===!0?!1:(t.add(i),t.add(s),!0)}var V3=Object.freeze({__proto__:null,BoxGeometry:sh,CapsuleGeometry:sb,CircleGeometry:ab,ConeGeometry:x0,CylinderGeometry:g0,DodecahedronGeometry:rb,EdgesGeometry:gL,ExtrudeGeometry:lb,IcosahedronGeometry:cb,LatheGeometry:ub,OctahedronGeometry:y0,PlaneGeometry:pp,PolyhedronGeometry:Ou,RingGeometry:db,ShapeGeometry:hb,SphereGeometry:v0,TetrahedronGeometry:fb,TorusGeometry:pb,TorusKnotGeometry:mb,TubeGeometry:gb,WireframeGeometry:EL});class AL extends ea{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new mt(0),this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.fog=e.fog,this}}function ap(n){const e={};for(const t in n){e[t]={};for(const i in n[t]){const s=n[t][i];if(F3(s))s.isRenderTargetTexture?(ct("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][i]=null):e[t][i]=s.clone();else if(Array.isArray(s))if(F3(s[0])){const o=[];for(let c=0,h=s.length;c<h;c++)o[c]=s[c].clone();e[t][i]=o}else e[t][i]=s.slice();else e[t][i]=s}}return e}function fa(n){const e={};for(let t=0;t<n.length;t++){const i=ap(n[t]);for(const s in i)e[s]=i[s]}return e}function F3(n){return n&&(n.isColor||n.isMatrix3||n.isMatrix4||n.isVector2||n.isVector3||n.isVector4||n.isTexture||n.isQuaternion)}function Ck(n){const e=[];for(let t=0;t<n.length;t++)e.push(n[t].clone());return e}function CL(n){const e=n.getRenderTarget();return e===null?n.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:_n.workingColorSpace}const RL={clone:ap,merge:fa};var Rk=`void main() { 12 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 13}`,Nk=`void main() { 14 gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 ); 15}`;class dr extends ea{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=Rk,this.fragmentShader=Nk,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=ap(e.uniforms),this.uniformsGroups=Ck(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this.defaultAttributeValues=Object.assign({},e.defaultAttributeValues),this.index0AttributeName=e.index0AttributeName,this.uniformsNeedUpdate=e.uniformsNeedUpdate,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const s in this.uniforms){const c=this.uniforms[s].value;c&&c.isTexture?t.uniforms[s]={type:"t",value:c.toJSON(e).uuid}:c&&c.isColor?t.uniforms[s]={type:"c",value:c.getHex()}:c&&c.isVector2?t.uniforms[s]={type:"v2",value:c.toArray()}:c&&c.isVector3?t.uniforms[s]={type:"v3",value:c.toArray()}:c&&c.isVector4?t.uniforms[s]={type:"v4",value:c.toArray()}:c&&c.isMatrix3?t.uniforms[s]={type:"m3",value:c.toArray()}:c&&c.isMatrix4?t.uniforms[s]={type:"m4",value:c.toArray()}:t.uniforms[s]={value:c}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const i={};for(const s in this.extensions)this.extensions[s]===!0&&(i[s]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}}class tT extends dr{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class nT extends ea{constructor(e){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new mt(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new mt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=yc,this.normalScale=new je(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new No,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class NL extends nT{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new je(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return Gt(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(t){this.ior=(1+.4*t)/(1-.4*t)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new mt(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new mt(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new mt(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._dispersion=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class DL extends ea{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new mt(16777215),this.specular=new mt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new mt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=yc,this.normalScale=new je(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new No,this.combine=f0,this.reflectivity=1,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.envMapIntensity=e.envMapIntensity,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 LL extends ea{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new mt(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new mt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=yc,this.normalScale=new je(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 IL extends ea{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=yc,this.normalScale=new je(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 PL extends ea{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new mt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new mt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=yc,this.normalScale=new je(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new No,this.combine=f0,this.reflectivity=1,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.envMapIntensity=e.envMapIntensity,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 iT extends ea{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=qD,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 sT extends ea{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}class UL extends ea{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new mt(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=yc,this.normalScale=new je(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this.fog=e.fog,this}}class OL extends _a{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 Gd(n,e){return!n||n.constructor===e?n:typeof e.BYTES_PER_ELEMENT=="number"?new e(n):Array.prototype.slice.call(n)}function zL(n){function e(s,o){return n[s]-n[o]}const t=n.length,i=new Array(t);for(let s=0;s!==t;++s)i[s]=s;return i.sort(e),i}function SM(n,e,t){const i=n.length,s=new n.constructor(i);for(let o=0,c=0;c!==i;++o){const h=t[o]*e;for(let f=0;f!==e;++f)s[c++]=n[h+f]}return s}function aT(n,e,t,i){let s=1,o=n[0];for(;o!==void 0&&o[i]===void 0;)o=n[s++];if(o===void 0)return;let c=o[i];if(c!==void 0)if(Array.isArray(c))do c=o[i],c!==void 0&&(e.push(o.time),t.push(...c)),o=n[s++];while(o!==void 0);else if(c.toArray!==void 0)do c=o[i],c!==void 0&&(e.push(o.time),c.toArray(t,t.length)),o=n[s++];while(o!==void 0);else do c=o[i],c!==void 0&&(e.push(o.time),t.push(c)),o=n[s++];while(o!==void 0)}function Dk(n,e,t,i,s=30){const o=n.clone();o.name=e;const c=[];for(let f=0;f<o.tracks.length;++f){const p=o.tracks[f],x=p.getValueSize(),y=[],v=[];for(let S=0;S<p.times.length;++S){const M=p.times[S]*s;if(!(M<t||M>=i)){y.push(p.times[S]);for(let R=0;R<x;++R)v.push(p.values[S*x+R])}}y.length!==0&&(p.times=Gd(y,p.times.constructor),p.values=Gd(v,p.values.constructor),c.push(p))}o.tracks=c;let h=1/0;for(let f=0;f<o.tracks.length;++f)h>o.tracks[f].times[0]&&(h=o.tracks[f].times[0]);for(let f=0;f<o.tracks.length;++f)o.tracks[f].shift(-1*h);return o.resetDuration(),o}function Lk(n,e=0,t=n,i=30){i<=0&&(i=30);const s=t.tracks.length,o=e/i;for(let c=0;c<s;++c){const h=t.tracks[c],f=h.ValueTypeName;if(f==="bool"||f==="string")continue;const p=n.tracks.find(function(w){return w.name===h.name&&w.ValueTypeName===f});if(p===void 0)continue;let x=0;const y=h.getValueSize();h.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(x=y/3);let v=0;const S=p.getValueSize();p.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(v=S/3);const M=h.times.length-1;let R;if(o<=h.times[0]){const w=x,N=y-x;R=h.values.slice(w,N)}else if(o>=h.times[M]){const w=M*y+x,N=w+y-x;R=h.values.slice(w,N)}else{const w=h.createInterpolant(),N=x,L=y-x;w.evaluate(o),R=w.resultBuffer.slice(N,L)}f==="quaternion"&&new ba().fromArray(R).normalize().conjugate().toArray(R);const A=p.times.length;for(let w=0;w<A;++w){const N=w*S+v;if(f==="quaternion")ba.multiplyQuaternionsFlat(p.values,N,R,0,p.values,N);else{const L=S-v*2;for(let I=0;I<L;++I)p.values[N+I]-=R[I]}}}return n.blendMode=Vw,n}class Ik{static convertArray(e,t){return Gd(e,t)}static isTypedArray(e){return tL(e)}static getKeyframeOrder(e){return zL(e)}static sortedArray(e,t,i){return SM(e,t,i)}static flattenJSON(e,t,i,s){aT(e,t,i,s)}static subclip(e,t,i,s,o=30){return Dk(e,t,i,s,o)}static makeClipAdditive(e,t=0,i=e,s=30){return Lk(e,t,i,s)}}class mp{constructor(e,t,i,s){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=s!==void 0?s:new t.constructor(i),this.sampleValues=t,this.valueSize=i,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let i=this._cachedIndex,s=t[i],o=t[i-1];e:{t:{let c;n:{i:if(!(e<s)){for(let h=i+2;;
15){if(s===void 0){if(e<o)break i;return i=t.length,this._cachedIndex=i,this.copySampleValue_(i-1)}if(i===h)break;if(o=s,s=t[++i],e<s)break t}c=t.length;break n}if(!(e>=o)){const h=t[1];e<h&&(i=2,o=h);for(let f=i-2;;){if(o===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===f)break;if(s=o,o=t[--i-1],e>=o)break t}c=i,i=0;break n}break e}for(;i<c;){const h=i+c>>>1;e<t[h]?c=h:i=h+1}if(s=t[i],o=t[i-1],o===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(s===void 0)return i=t.length,this._cachedIndex=i,this.copySampleValue_(i-1)}this._cachedIndex=i,this.intervalChanged_(i,o,s)}return this.interpolate_(i,o,e,s)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,i=this.sampleValues,s=this.valueSize,o=e*s;for(let c=0;c!==s;++c)t[c]=i[o+c];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class BL extends mp{constructor(e,t,i,s){super(e,t,i,s),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:kd,endingEnd:kd}}intervalChanged_(e,t,i){const s=this.parameterPositions;let o=e-2,c=e+1,h=s[o],f=s[c];if(h===void 0)switch(this.getSettings_().endingStart){case Hd:o=e,h=2*t-i;break;case Xg:o=s.length-2,h=t+s[o]-s[o+1];break;default:o=e,h=i}if(f===void 0)switch(this.getSettings_().endingEnd){case Hd:c=e,f=2*i-t;break;case Xg:c=1,f=i+s[1]-s[0];break;default:c=e-1,f=t}const p=(i-t)*.5,x=this.valueSize;this._weightPrev=p/(t-h),this._weightNext=p/(f-i),this._offsetPrev=o*x,this._offsetNext=c*x}interpolate_(e,t,i,s){const o=this.resultBuffer,c=this.sampleValues,h=this.valueSize,f=e*h,p=f-h,x=this._offsetPrev,y=this._offsetNext,v=this._weightPrev,S=this._weightNext,M=(i-t)/(s-t),R=M*M,A=R*M,w=-v*A+2*v*R-v*M,N=(1+v)*A+(-1.5-2*v)*R+(-.5+v)*M+1,L=(-1-S)*A+(1.5+S)*R+.5*M,I=S*A-S*R;for(let B=0;B!==h;++B)o[B]=w*c[x+B]+N*c[p+B]+L*c[f+B]+I*c[y+B];return o}}class rT extends mp{constructor(e,t,i,s){super(e,t,i,s)}interpolate_(e,t,i,s){const o=this.resultBuffer,c=this.sampleValues,h=this.valueSize,f=e*h,p=f-h,x=(i-t)/(s-t),y=1-x;for(let v=0;v!==h;++v)o[v]=c[p+v]*y+c[f+v]*x;return o}}class VL extends mp{constructor(e,t,i,s){super(e,t,i,s)}interpolate_(e){return this.copySampleValue_(e-1)}}class FL extends mp{interpolate_(e,t,i,s){const o=this.resultBuffer,c=this.sampleValues,h=this.valueSize,f=e*h,p=f-h,x=this.settings||this.DefaultSettings_,y=x.inTangents,v=x.outTangents;if(!y||!v){const R=(i-t)/(s-t),A=1-R;for(let w=0;w!==h;++w)o[w]=c[p+w]*A+c[f+w]*R;return o}const S=h*2,M=e-1;for(let R=0;R!==h;++R){const A=c[p+R],w=c[f+R],N=M*S+R*2,L=v[N],I=v[N+1],B=e*S+R*2,O=y[B],F=y[B+1];let P=(i-t)/(s-t),V,j,W,ee,ie;for(let ue=0;ue<8;ue++){V=P*P,j=V*P,W=1-P,ee=W*W,ie=ee*W;const Y=ie*t+3*ee*P*L+3*W*V*O+j*s-i;if(Math.abs(Y)<1e-10)break;const $=3*ee*(L-t)+6*W*P*(O-L)+3*V*(s-O);if(Math.abs($)<1e-10)break;P=P-Y/$,P=Math.max(0,Math.min(1,P))}o[R]=ie*A+3*ee*P*I+3*W*V*F+j*w}return o}}class Yr{constructor(e,t,i,s){if(e===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(t===void 0||t.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=Gd(t,this.TimeBufferType),this.values=Gd(i,this.ValueBufferType),this.setInterpolation(s||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let i;if(t.toJSON!==this.toJSON)i=t.toJSON(e);else{i={name:e.name,times:Gd(e.times,Array),values:Gd(e.values,Array)};const s=e.getInterpolation();s!==e.DefaultInterpolation&&(i.interpolation=s)}return i.type=e.ValueTypeName,i}InterpolantFactoryMethodDiscrete(e){return new VL(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new rT(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new BL(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodBezier(e){const t=new FL(this.times,this.values,this.getValueSize(),e);return this.settings&&(t.settings=this.settings),t}setInterpolation(e){let t;switch(e){case Wg:t=this.InterpolantFactoryMethodDiscrete;break;case m1:t=this.InterpolantFactoryMethodLinear;break;case mv:t=this.InterpolantFactoryMethodSmooth;break;case gM:t=this.InterpolantFactoryMethodBezier;break}if(t===void 0){const i="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(i);
vendor: 9,971 bytes, line 15
15return ct("KeyframeTrack:",i),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Wg;case this.InterpolantFactoryMethodLinear:return m1;case this.InterpolantFactoryMethodSmooth:return mv;case this.InterpolantFactoryMethodBezier:return gM}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){const t=this.times;for(let i=0,s=t.length;i!==s;++i)t[i]+=e}return this}scale(e){if(e!==1){const t=this.times;for(let i=0,s=t.length;i!==s;++i)t[i]*=e}return this}trim(e,t){const i=this.times,s=i.length;let o=0,c=s-1;for(;o!==s&&i[o]<e;)++o;for(;c!==-1&&i[c]>t;)--c;if(++c,o!==0||c!==s){o>=c&&(c=Math.max(c,1),o=c-1);const h=this.getValueSize();this.times=i.slice(o,c),this.values=this.values.slice(o*h,c*h)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(Et("KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,s=this.values,o=i.length;o===0&&(Et("KeyframeTrack: Track is empty.",this),e=!1);let c=null;for(let h=0;h!==o;h++){const f=i[h];if(typeof f=="number"&&isNaN(f)){Et("KeyframeTrack: Time is not a valid number.",this,h,f),e=!1;break}if(c!==null&&c>f){Et("KeyframeTrack: Out of order keys.",this,h,f,c),e=!1;break}c=f}if(s!==void 0&&tL(s))for(let h=0,f=s.length;h!==f;++h){const p=s[h];if(isNaN(p)){Et("KeyframeTrack: Value is not a valid number.",this,h,p),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),i=this.getValueSize(),s=this.getInterpolation()===mv,o=e.length-1;let c=1;for(let h=1;h<o;++h){let f=!1;const p=e[h],x=e[h+1];if(p!==x&&(h!==1||p!==e[0]))if(s)f=!0;else{const y=h*i,v=y-i,S=y+i;for(let M=0;M!==i;++M){const R=t[y+M];if(R!==t[v+M]||R!==t[S+M]){f=!0;break}}}if(f){if(h!==c){e[c]=e[h];const y=h*i,v=c*i;for(let S=0;S!==i;++S)t[v+S]=t[y+S]}++c}}if(o>0){e[c]=e[o];for(let h=o*i,f=c*i,p=0;p!==i;++p)t[f+p]=t[h+p];++c}return c!==e.length?(this.times=e.slice(0,c),this.values=t.slice(0,c*i)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),i=this.constructor,s=new i(this.name,e,t);return s.createInterpolant=this.createInterpolant,s}}Yr.prototype.ValueTypeName="";Yr.prototype.TimeBufferType=Float32Array;Yr.prototype.ValueBufferType=Float32Array;Yr.prototype.DefaultInterpolation=m1;class ah extends Yr{constructor(e,t,i){super(e,t,i)}}ah.prototype.ValueTypeName="bool";ah.prototype.ValueBufferType=Array;ah.prototype.DefaultInterpolation=Wg;ah.prototype.InterpolantFactoryMethodLinear=void 0;ah.prototype.InterpolantFactoryMethodSmooth=void 0;class oT extends Yr{constructor(e,t,i,s){super(e,t,i,s)}}oT.prototype.ValueTypeName="color";class e0 extends Yr{constructor(e,t,i,s){super(e,t,i,s)}}e0.prototype.ValueTypeName="number";class kL extends mp{constructor(e,t,i,s){super(e,t,i,s)}interpolate_(e,t,i,s){const o=this.resultBuffer,c=this.sampleValues,h=this.valueSize,f=(i-t)/(s-t);let p=e*h;for(let x=p+h;p!==x;p+=4)ba.slerpFlat(o,0,c,p-h,c,p,f);return o}}class b0 extends Yr{constructor(e,t,i,s){super(e,t,i,s)}InterpolantFactoryMethodLinear(e){return new kL(this.times,this.values,this.getValueSize(),e)}}b0.prototype.ValueTypeName="quaternion";b0.prototype.InterpolantFactoryMethodSmooth=void 0;class rh extends Yr{constructor(e,t,i){super(e,t,i)}}rh.prototype.ValueTypeName="string";rh.prototype.ValueBufferType=Array;rh.prototype.DefaultInterpolation=Wg;rh.prototype.InterpolantFactoryMethodLinear=void 0;rh.prototype.InterpolantFactoryMethodSmooth=void 0;class t0 extends Yr{constructor(e,t,i,s){super(e,t,i,s)}}t0.prototype.ValueTypeName="vector";class n0{constructor(e="",t=-1,i=[],s=q1){this.name=e,this.tracks=i,this.duration=t,this.blendMode=s,this.uuid=cr(),this.userData={},this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,s=1/(e.fps||1);for(let c=0,h=i.length;c!==h;++c)t.push(Uk(i[c]).scale(s));const o=new this(e.name,e.duration,t,e.blendMode);return o.uuid=e.uuid,o.userData=JSON.parse(e.userData||"{}"),o}static toJSON(e){const t=[],i=e.tracks,s={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode,userData:JSON.stringify(e.userData)};for(let o=0,c=i.length;o!==c;++o)t.push(Yr.toJSON(i[o]));return s}static CreateFromMorphTargetSequence(e,t,i,s){const o=t.length,c=[];for(let h=0;h<o;h++){let f=[],p=[];f.push((h+o-1)%o,h,(h+1)%o),p.push(0,1,0);const x=zL(f);f=SM(f,1,x),p=SM(p,1,x),!s&&f[0]===0&&(f.push(o),p.push(p[0])),c.push(new e0(".morphTargetInfluences["+t[h].name+"]",f,p).scale(1/i))}return new this(e,-1,c)}static findByName(e,t){let i=e;if(!Array.isArray(e)){const s=e;i=s.geometry&&s.geometry.animations||s.animations}for(let s=0;s<i.length;s++)if(i[s].name===t)return i[s];return null}static CreateClipsFromMorphTargetSequences(e,t,i){const s={},o=/^([\w-]*?)([\d]+)$/;for(let h=0,f=e.length;h<f;h++){const p=e[h],x=p.name.match(o);if(x&&x.length>1){const y=x[1];let v=s[y];v||(s[y]=v=[]),v.push(p)}}const c=[];for(const h in s)c.push(this.CreateFromMorphTargetSequence(h,s[h],t,i));return c}static parseAnimation(e,t){if(ct("AnimationClip: parseAnimation() is deprecated and will be removed with r185"),!e)return Et("AnimationClip: No animation in JSONLoader data."),null;const i=function(y,v,S,M,R){if(S.length!==0){const A=[],w=[];aT(S,A,w,M),A.length!==0&&R.push(new y(v,A,w))}},s=[],o=e.name||"default",c=e.fps||30,h=e.blendMode;let f=e.length||-1;const p=e.hierarchy||[];for(let y=0;y<p.length;y++){const v=p[y].keys;if(!(!v||v.length===0))if(v[0].morphTargets){const S={};let M;for(M=0;M<v.length;M++)if(v[M].morphTargets)for(let R=0;R<v[M].morphTargets.length;R++)S[v[M].morphTargets[R]]=-1;for(const R in S){const A=[],w=[];for(let N=0;N!==v[M].morphTargets.length;++N){const L=v[M];A.push(L.time),w.push(L.morphTarget===R?1:0)}s.push(new e0(".morphTargetInfluence["+R+"]",A,w))}f=S.length*c}else{const S=".bones["+t[y].name+"]";i(t0,S+".position",v,"pos",s),i(b0,S+".quaternion",v,"rot",s),i(t0,S+".scale",v,"scl",s)}}return s.length===0?null:new this(o,f,s,h)}resetDuration(){const e=this.tracks;let t=0;for(let i=0,s=e.length;i!==s;++i){const o=this.tracks[i];t=Math.max(t,o.times[o.times.length-1])}return this.duration=t,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let i=0;i<this.tracks.length;i++)e.push(this.tracks[i].clone());const t=new this.constructor(this.name,this.duration,e,this.blendMode);return t.userData=JSON.parse(JSON.stringify(this.userData)),t}toJSON(){return this.constructor.toJSON(this)}}function Pk(n){switch(n.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return e0;case"vector":case"vector2":case"vector3":case"vector4":return t0;case"color":return oT;case"quaternion":return b0;case"bool":case"boolean":return ah;case"string":return rh}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+n)}function Uk(n){if(n.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=Pk(n.type);if(n.times===void 0){const t=[],i=[];aT(n.keys,t,i,"value"),n.times=t,n.values=i}return e.parse!==void 0?e.parse(n):new e(n.name,n.times,n.values,n.interpolation)}const yl={enabled:!1,files:{},add:function(n,e){this.enabled!==!1&&(k3(n)||(this.files[n]=e))},get:function(n){if(this.enabled!==!1&&!k3(n))return this.files[n]},remove:function(n){delete this.files[n]},clear:function(){this.files={}}};function k3(n){try{const e=n.slice(n.indexOf(":")+1);return new URL(e).protocol==="blob:"}catch{return!1}}class lT{constructor(e,t,i){const s=this;let o=!1,c=0,h=0,f;const p=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=i,this._abortController=null,this.itemStart=function(x){h++,o===!1&&s.onStart!==void 0&&s.onStart(x,c,h),o=!0},this.itemEnd=function(x){c++,s.onProgress!==void 0&&s.onProgress(x,c,h),c===h&&(o=!1,s.onLoad!==void 0&&s.onLoad())},this.itemError=function(x){s.onError!==void 0&&s.onError(x)},this.resolveURL=function(x){return f?f(x):x},this.setURLModifier=function(x){return f=x,this},this.addHandler=function(x,y){return p.push(x,y),this},this.removeHandler=function(x){const y=p.indexOf(x);return y!==-1&&p.splice(y,2),this},this.getHandler=function(x){for(let y=0,v=p.length;y<v;y+=2){const S=p[y],M=p[y+1];if(S.global&&(S.lastIndex=0),S.test(x))return M}return null},this.abort=function(){return this.abortController.abort(),this._abortController=null,this}}get abortController(){return this._abortController||(this._abortController=new AbortController),this._abortController}}const HL=new lT;class Za{constructor(e){this.manager=e!==void 0?e:HL,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}load(){}loadAsync(e,t){const i=this;return new Promise(function(s,o){i.load(e,s,t,o)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}abort(){return this}}Za.DEFAULT_MATERIAL_NAME="__DEFAULT";const cc={};class Ok extends Error{constructor(e,t){super(e),this.response=t}}class vc extends Za{constructor(e){super(e),this.mimeType="",this.responseType="",this._abortController=new AbortController}load(e,t,i,s){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=yl.get(`file:${e}`);if(o!==void 0){this.manager.itemStart(e),setTimeout(()=>{t&&t(o),this.manager.itemEnd(e)},0);return}if(cc[e]!==void 0){cc[e].push({onLoad:t,onProgress:i,onError:s});return}cc[e]=[],cc[e].push({onLoad:t,onProgress:i,onError:s});
15const c=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin",signal:typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal}),h=this.mimeType,f=this.responseType;fetch(c).then(p=>{if(p.status===200||p.status===0){if(p.status===0&&ct("FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||p.body===void 0||p.body.getReader===void 0)return p;const x=cc[e],y=p.body.getReader(),v=p.headers.get("X-File-Size")||p.headers.get("Content-Length"),S=v?parseInt(v):0,M=S!==0;let R=0;const A=new ReadableStream({start(w){N();function N(){y.read().then(({done:L,value:I})=>{if(L)w.close();else{R+=I.byteLength;const B=new ProgressEvent("progress",{lengthComputable:M,loaded:R,total:S});for(let O=0,F=x.length;O<F;O++){const P=x[O];P.onProgress&&P.onProgress(B)}w.enqueue(I),N()}},L=>{w.error(L)})}}});return new Response(A)}else throw new Ok(`fetch for "${p.url}" responded with ${p.status}: ${p.statusText}`,p)}).then(p=>{switch(f){case"arraybuffer":return p.arrayBuffer();case"blob":return p.blob();case"document":return p.text().then(x=>new DOMParser().parseFromString(x,h));case"json":return p.json();default:if(h==="")return p.text();{const y=/charset="?([^;"\s]*)"?/i.exec(h),v=y&&y[1]?y[1].toLowerCase():void 0,S=new TextDecoder(v);return p.arrayBuffer().then(M=>S.decode(M))}}}).then(p=>{yl.add(`file:${e}`,p);const x=cc[e];delete cc[e];for(let y=0,v=x.length;y<v;y++){const S=x[y];S.onLoad&&S.onLoad(p)}}).catch(p=>{const x=cc[e];if(x===void 0)throw this.manager.itemError(e),p;delete cc[e];for(let y=0,v=x.length;y<v;y++){const S=x[y];S.onError&&S.onError(p)}this.manager.itemError(e)}).finally(()=>{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}class zk extends Za{constructor(e){super(e)}load(e,t,i,s){const o=this,c=new vc(this.manager);c.setPath(this.path),c.setRequestHeader(this.requestHeader),c.setWithCredentials(this.withCredentials),c.load(e,function(h){try{t(o.parse(JSON.parse(h)))}catch(f){s?s(f):Et(f),o.manager.itemError(e)}},i,s)}parse(e){const t=[];for(let i=0;i<e.length;i++){const s=n0.parse(e[i]);t.push(s)}return t}}class Bk extends Za{constructor(e){super(e)}load(e,t,i,s){const o=this,c=[],h=new ib,f=new vc(this.manager);f.setPath(this.path),f.setResponseType("arraybuffer"),f.setRequestHeader(this.requestHeader),f.setWithCredentials(o.withCredentials);let p=0;function x(y){f.load(e[y],function(v){const S=o.parse(v,!0);c[y]={width:S.width,height:S.height,format:S.format,mipmaps:S.mipmaps},p+=1,p===6&&(S.mipmapCount===1&&(h.minFilter=yi),h.image=c,h.format=S.format,h.needsUpdate=!0,t&&t(h))},i,s)}if(Array.isArray(e))for(let y=0,v=e.length;y<v;++y)x(y);else f.load(e,function(y){const v=o.parse(y,!0);if(v.isCubemap){const S=v.mipmaps.length/v.mipmapCount;for(let M=0;M<S;M++){c[M]={mipmaps:[]};for(let R=0;R<v.mipmapCount;R++)c[M].mipmaps.push(v.mipmaps[M*v.mipmapCount+R]),c[M].format=v.format,c[M].width=v.width,c[M].height=v.height}h.image=c}else h.image.width=v.width,h.image.height=v.height,h.mipmaps=v.mipmaps;v.mipmapCount===1&&(h.minFilter=yi),h.format=v.format,h.needsUpdate=!0,t&&t(h)},i,s);return h}}const Nf=new WeakMap;class i0 extends Za{constructor(e){super(e)}load(e,t,i,s){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=this,c=yl.get(`image:${e}`);if(c!==void 0){if(c.complete===!0)o.manager.itemStart(e),setTimeout(function(){t&&t(c),o.manager.itemEnd(e)},0);else{let y=Nf.get(c);y===void 0&&(y=[],Nf.set(c,y)),y.push({onLoad:t,onError:s})}return c}const h=Zg("img");function f(){x(),t&&t(this);const y=Nf.get(this)||[];for(let v=0;v<y.length;v++){const S=y[v];S.onLoad&&S.onLoad(this)}Nf.delete(this),o.manager.itemEnd(e)}function p(y){x(),s&&s(y),yl.remove(`image:${e}`);const v=Nf.get(this)||[];for(let S=0;S<v.length;S++){const M=v[S];M.onError&&M.onError(y)}Nf.delete(this),o.manager.itemError(e),o.manager.itemEnd(e)}function x(){h.removeEventListener("load",f,!1),h.removeEventListener("error",p,!1)}return h.addEventListener("load",f,!1),h.addEventListener("error",p,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(h.crossOrigin=this.crossOrigin),yl.add(`image:${e}`,h),o.manager.itemStart(e),h.src=e,h}}class Vk extends Za{constructor(e){super(e)}load(e,t,i,s){const o=new m0;
vendor: 4,739 bytes, line 15
15o.colorSpace=$s;const c=new i0(this.manager);c.setCrossOrigin(this.crossOrigin),c.setPath(this.path);let h=0;function f(p){c.load(e[p],function(x){o.images[p]=x,h++,h===6&&(o.needsUpdate=!0,t&&t(o))},void 0,s)}for(let p=0;p<e.length;++p)f(p);return o}}class Fk extends Za{constructor(e){super(e)}load(e,t,i,s){const o=this,c=new Co,h=new vc(this.manager);return h.setResponseType("arraybuffer"),h.setRequestHeader(this.requestHeader),h.setPath(this.path),h.setWithCredentials(o.withCredentials),h.load(e,function(f){let p;try{p=o.parse(f)}catch(x){s!==void 0?s(x):Et(x);return}p.image!==void 0?c.image=p.image:p.data!==void 0&&(c.image.width=p.width,c.image.height=p.height,c.image.data=p.data),c.wrapS=p.wrapS!==void 0?p.wrapS:Xa,c.wrapT=p.wrapT!==void 0?p.wrapT:Xa,c.magFilter=p.magFilter!==void 0?p.magFilter:yi,c.minFilter=p.minFilter!==void 0?p.minFilter:yi,c.anisotropy=p.anisotropy!==void 0?p.anisotropy:1,p.colorSpace!==void 0&&(c.colorSpace=p.colorSpace),p.flipY!==void 0&&(c.flipY=p.flipY),p.format!==void 0&&(c.format=p.format),p.type!==void 0&&(c.type=p.type),p.mipmaps!==void 0&&(c.mipmaps=p.mipmaps,c.minFilter=xl),p.mipmapCount===1&&(c.minFilter=yi),p.generateMipmaps!==void 0&&(c.generateMipmaps=p.generateMipmaps),c.needsUpdate=!0,t&&t(c,p)},i,s),c}}class kk extends Za{constructor(e){super(e)}load(e,t,i,s){const o=new Ii,c=new i0(this.manager);return c.setCrossOrigin(this.crossOrigin),c.setPath(this.path),c.load(e,function(h){o.image=h,o.needsUpdate=!0,t!==void 0&&t(o)},i,s),o}}class zu extends Un{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new mt(e),this.intensity=t}dispose(){this.dispatchEvent({type:"dispose"})}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,t}}class GL extends zu{constructor(e,t,i){super(e,i),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(Un.DEFAULT_UP),this.updateMatrix(),this.groundColor=new mt(t)}copy(e,t){return super.copy(e,t),this.groundColor.copy(e.groundColor),this}toJSON(e){const t=super.toJSON(e);return t.object.groundColor=this.groundColor.getHex(),t}}const aS=new Yt,H3=new Z,G3=new Z;class cT{constructor(e){this.camera=e,this.intensity=1,this.bias=0,this.biasNode=null,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new je(512,512),this.mapType=pa,this.map=null,this.mapPass=null,this.matrix=new Yt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new fp,this._frameExtents=new je(1,1),this._viewportCount=1,this._viewports=[new Xn(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,i=this.matrix;H3.setFromMatrixPosition(e.matrixWorld),t.position.copy(H3),G3.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(G3),t.updateMatrixWorld(),aS.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(aS,t.coordinateSystem,t.reversedDepth),t.coordinateSystem===$d||t.reversedDepth?i.set(.5,0,0,.5,0,.5,0,.5,0,0,1,0,0,0,0,1):i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(aS)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.intensity=e.intensity,this.bias=e.bias,this.radius=e.radius,this.autoUpdate=e.autoUpdate,this.needsUpdate=e.needsUpdate,this.normalBias=e.normalBias,this.blurSamples=e.blurSamples,this.mapSize.copy(e.mapSize),this.biasNode=e.biasNode,this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.intensity!==1&&(e.intensity=this.intensity),this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}const Gy=new Z,jy=new ba,hl=new Z;class xb extends Un{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Yt,this.projectionMatrix=new Yt,this.projectionMatrixInverse=new Yt,this.coordinateSystem=lr,this._reversedDepth=!1}get reversedDepth(){return this._reversedDepth}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorld.decompose(Gy,jy,hl),hl.x===1&&hl.
vendor: 4,311 bytes, line 15
15y===1&&hl.z===1?this.matrixWorldInverse.copy(this.matrixWorld).invert():this.matrixWorldInverse.compose(Gy,jy,hl.set(1,1,1)).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorld.decompose(Gy,jy,hl),hl.x===1&&hl.y===1&&hl.z===1?this.matrixWorldInverse.copy(this.matrixWorld).invert():this.matrixWorldInverse.compose(Gy,jy,hl.set(1,1,1)).invert()}clone(){return new this.constructor().copy(this)}}const mu=new Z,j3=new je,W3=new je;class vs extends xb{constructor(e=50,t=1,i=.1,s=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=s,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=tp*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Yd*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return tp*2*Math.atan(Math.tan(Yd*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,i){mu.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(mu.x,mu.y).multiplyScalar(-e/mu.z),mu.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(mu.x,mu.y).multiplyScalar(-e/mu.z)}getViewSize(e,t){return this.getViewBounds(e,j3,W3),t.subVectors(W3,j3)}setViewOffset(e,t,i,s,o,c){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=s,this.view.width=o,this.view.height=c,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(Yd*.5*this.fov)/this.zoom,i=2*t,s=this.aspect*i,o=-.5*s;const c=this.view;if(this.view!==null&&this.view.enabled){const f=c.fullWidth,p=c.fullHeight;o+=c.offsetX*s/f,t-=c.offsetY*i/p,s*=c.width/f,i*=c.height/p}const h=this.filmOffset;h!==0&&(o+=e*h/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+s,t,t-i,e,this.far,this.coordinateSystem,this.reversedDepth),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}}class Hk extends cT{constructor(){super(new vs(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1,this.aspect=1}updateMatrices(e){const t=this.camera,i=tp*2*e.angle*this.focus,s=this.mapSize.width/this.mapSize.height*this.aspect,o=e.distance||t.far;(i!==t.fov||s!==t.aspect||o!==t.far)&&(t.fov=i,t.aspect=s,t.far=o,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class jL extends zu{constructor(e,t,i=0,s=Math.PI/3,o=0,c=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(Un.DEFAULT_UP),this.updateMatrix(),this.target=new Un,this.distance=i,this.angle=s,this.penumbra=o,this.decay=c,this.map=null,this.shadow=new Hk}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){super.dispose(),this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.map=e.map,this.shadow=e.shadow.clone(),this}toJSON(e){const t=super.toJSON(e);return t.object.distance=this.distance,t.object.angle=this.angle,t.object.decay=this.decay,t.object.penumbra=this.penumbra,t.object.target=this.target.uuid,this.map&&this.map.isTexture&&(t.object.map=this.map.toJSON(e).uuid),t.object.shadow=this.shadow.toJSON(),t}}class Gk extends cT{constructor(){super(new vs(90,1,.5,500)),this.isPointLightShadow=!0}
vendor: 22,802 bytes, line 15
15}class WL extends zu{constructor(e,t,i=0,s=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=i,this.decay=s,this.shadow=new Gk}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){super.dispose(),this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}toJSON(e){const t=super.toJSON(e);return t.object.distance=this.distance,t.object.decay=this.decay,t.object.shadow=this.shadow.toJSON(),t}}class gp extends xb{constructor(e=-1,t=1,i=1,s=-1,o=.1,c=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=s,this.near=o,this.far=c,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,s,o,c){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=s,this.view.width=o,this.view.height=c,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,s=(this.top+this.bottom)/2;let o=i-e,c=i+e,h=s+t,f=s-t;if(this.view!==null&&this.view.enabled){const p=(this.right-this.left)/this.view.fullWidth/this.zoom,x=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o+=p*this.view.offsetX,c=o+p*this.view.width,h-=x*this.view.offsetY,f=h-x*this.view.height}this.projectionMatrix.makeOrthographic(o,c,h,f,this.near,this.far,this.coordinateSystem,this.reversedDepth),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}}class jk extends cT{constructor(){super(new gp(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class XL extends zu{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Un.DEFAULT_UP),this.updateMatrix(),this.target=new Un,this.shadow=new jk}dispose(){super.dispose(),this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}toJSON(e){const t=super.toJSON(e);return t.object.shadow=this.shadow.toJSON(),t.object.target=this.target.uuid,t}}class qL extends zu{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class YL extends zu{constructor(e,t,i=10,s=10){super(e,t),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=i,this.height=s}get power(){return this.intensity*this.width*this.height*Math.PI}set power(e){this.intensity=e/(this.width*this.height*Math.PI)}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){const t=super.toJSON(e);return t.object.width=this.width,t.object.height=this.height,t}}class uT{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new Z)}set(e){for(let t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){const i=e.x,s=e.y,o=e.z,c=this.coefficients;return t.copy(c[0]).multiplyScalar(.282095),t.addScaledVector(c[1],.488603*s),t.addScaledVector(c[2],.488603*o),t.addScaledVector(c[3],.488603*i),t.addScaledVector(c[4],1.092548*(i*s)),t.addScaledVector(c[5],1.092548*(s*o)),t.addScaledVector(c[6],.315392*(3*o*o-1)),t.addScaledVector(c[7],1.092548*(i*o)),t.addScaledVector(c[8],.546274*(i*i-s*s)),t}getIrradianceAt(e,t){const i=e.x,s=e.y,o=e.z,c=this.coefficients;return t.copy(c[0]).multiplyScalar(.886227),t.addScaledVector(c[1],2*.511664*s),t.addScaledVector(c[2],2*.511664*o),t.addScaledVector(c[3],2*.511664*i),t.addScaledVector(c[4],2*.429043*i*s),t.addScaledVector(c[5],2*.429043*s*o),t.addScaledVector(c[6],.743125*o*o-.247708),t.addScaledVector(c[7],2*.429043*i*o),t.addScaledVector(c[8],.429043*(i*i-s*s)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let i=0;i<9;i++)this.coefficients[i].addScaledVector(e.coefficients[i],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let i=0;i<9;i++)this.coefficients[i].lerp(e.coefficients[i],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return new this.constructor().copy(this)}fromArray(e,t=0){const i=this.coefficients;for(let s=0;s<9;s++)i[s].fromArray(e,t+s*3);return this}toArray(e=[],t=0){const i=this.coefficients;for(let s=0;s<9;s++)i[s].toArray(e,t+s*3);return e}static getBasisAt(e,t){const i=e.x,s=e.y,o=e.z;t[0]=.282095,t[1]=.488603*s,t[2]=.488603*o,t[3]=.488603*i,t[4]=1.092548*i*s,t[5]=1.092548*s*o,t[6]=.315392*(3*o*o-1),t[7]=1.092548*i*o,t[8]=.546274*(i*i-s*s)}}class ZL extends zu{constructor(e=new uT,t=1){super(void 0,t),this.isLightProbe=!0,this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}toJSON(e){const t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}}class yb extends Za{constructor(e){super(e),this.textures={}}load(e,t,i,s){const o=this,c=new vc(o.manager);c.setPath(o.path),c.setRequestHeader(o.requestHeader),c.setWithCredentials(o.withCredentials),c.load(e,function(h){try{t(o.parse(JSON.parse(h)))}catch(f){s?s(f):Et(f),o.manager.itemError(e)}},i,s)}parse(e){const t=this.textures;function i(o){return t[o]===void 0&&ct("MaterialLoader: Undefined texture",o),t[o]}const s=this.createMaterialFromType(e.type);if(e.uuid!==void 0&&(s.uuid=e.uuid),e.name!==void 0&&(s.name=e.name),e.color!==void 0&&s.color!==void 0&&s.color.setHex(e.color),e.roughness!==void 0&&(s.roughness=e.roughness),e.metalness!==void 0&&(s.metalness=e.metalness),e.sheen!==void 0&&(s.sheen=e.sheen),e.sheenColor!==void 0&&(s.sheenColor=new mt().setHex(e.sheenColor)),e.sheenRoughness!==void 0&&(s.sheenRoughness=e.sheenRoughness),e.emissive!==void 0&&s.emissive!==void 0&&s.emissive.setHex(e.emissive),e.specular!==void 0&&s.specular!==void 0&&s.specular.setHex(e.specular),e.specularIntensity!==void 0&&(s.specularIntensity=e.specularIntensity),e.specularColor!==void 0&&s.specularColor!==void 0&&s.specularColor.setHex(e.specularColor),e.shininess!==void 0&&(s.shininess=e.shininess),e.clearcoat!==void 0&&(s.clearcoat=e.clearcoat),e.clearcoatRoughness!==void 0&&(s.clearcoatRoughness=e.clearcoatRoughness),e.dispersion!==void 0&&(s.dispersion=e.dispersion),e.iridescence!==void 0&&(s.iridescence=e.iridescence),e.iridescenceIOR!==void 0&&(s.iridescenceIOR=e.iridescenceIOR),e.iridescenceThicknessRange!==void 0&&(s.iridescenceThicknessRange=e.iridescenceThicknessRange),e.transmission!==void 0&&(s.transmission=e.transmission),e.thickness!==void 0&&(s.thickness=e.thickness),e.attenuationDistance!==void 0&&(s.attenuationDistance=e.attenuationDistance),e.attenuationColor!==void 0&&s.attenuationColor!==void 0&&s.attenuationColor.setHex(e.attenuationColor),e.anisotropy!==void 0&&(s.anisotropy=e.anisotropy),e.anisotropyRotation!==void 0&&(s.anisotropyRotation=e.anisotropyRotation),e.fog!==void 0&&(s.fog=e.fog),e.flatShading!==void 0&&(s.flatShading=e.flatShading),e.blending!==void 0&&(s.blending=e.blending),e.combine!==void 0&&(s.combine=e.combine),e.side!==void 0&&(s.side=e.side),e.shadowSide!==void 0&&(s.shadowSide=e.shadowSide),e.opacity!==void 0&&(s.opacity=e.opacity),e.transparent!==void 0&&(s.transparent=e.transparent),e.alphaTest!==void 0&&(s.alphaTest=e.alphaTest),e.alphaHash!==void 0&&(s.alphaHash=e.alphaHash),e.depthFunc!==void 0&&(s.depthFunc=e.depthFunc),e.depthTest!==void 0&&(s.depthTest=e.depthTest),e.depthWrite!==void 0&&(s.depthWrite=e.depthWrite),e.colorWrite!==void 0&&(s.colorWrite=e.colorWrite),e.blendSrc!==void 0&&(s.blendSrc=e.blendSrc),e.blendDst!==void 0&&(s.blendDst=e.blendDst),e.blendEquation!==void 0&&(s.blendEquation=e.blendEquation),e.blendSrcAlpha!==void 0&&(s.blendSrcAlpha=e.blendSrcAlpha),e.blendDstAlpha!==void 0&&(s.blendDstAlpha=e.blendDstAlpha),e.blendEquationAlpha!==void 0&&(s.blendEquationAlpha=e.blendEquationAlpha),e.blendColor!==void 0&&s.blendColor!==void 0&&s.blendColor.setHex(e.blendColor),e.blendAlpha!==void 0&&(s.blendAlpha=e.blendAlpha),e.stencilWriteMask!==void 0&&(s.stencilWriteMask=e.stencilWriteMask),e.stencilFunc!==void 0&&(s.stencilFunc=e.stencilFunc),e.stencilRef!==void 0&&(s.stencilRef=e.stencilRef),e.stencilFuncMask!==void 0&&(s.stencilFuncMask=e.stencilFuncMask),e.stencilFail!==void 0&&(s.stencilFail=e.stencilFail),e.stencilZFail!==void 0&&(s.stencilZFail=e.stencilZFail),e.stencilZPass!==void 0&&(s.stencilZPass=e.stencilZPass),e.stencilWrite!==void 0&&(s.stencilWrite=e.stencilWrite),e.wireframe!==void 0&&(s.wireframe=e.wireframe),e.wireframeLinewidth!==void 0&&(s.wireframeLinewidth=e.wireframeLinewidth),e.wireframeLinecap!==void 0&&(s.wireframeLinecap=e.wireframeLinecap),e.wireframeLinejoin!==void 0&&(s.wireframeLinejoin=e.wireframeLinejoin),e.rotation!==void 0&&(s.rotation=e.rotation),e.linewidth!==void 0&&(s.linewidth=e.linewidth),e.dashSize!==void 0&&(s.dashSize=e.dashSize),e.gapSize!==void 0&&(s.gapSize=e.gapSize),e.scale!==void 0&&(s.scale=e.scale),e.polygonOffset!==void 0&&(s.polygonOffset=e.polygonOffset),e.polygonOffsetFactor!==void 0&&(s.polygonOffsetFactor=e.polygonOffsetFactor),e.polygonOffsetUnits!==void 0&&(s.polygonOffsetUnits=e.polygonOffsetUnits),e.dithering!==void 0&&(s.dithering=e.dithering),e.alphaToCoverage!==void 0&&(s.alphaToCoverage=e.alphaToCoverage),e.premultipliedAlpha!==void 0&&(s.premultipliedAlpha=e.premultipliedAlpha),e.forceSinglePass!==void 0&&(s.forceSinglePass=e.forceSinglePass),e.allowOverride!==void 0&&(s.allowOverride=e.allowOverride),e.visible!==void 0&&(s.visible=e.visible),e.toneMapped!==void 0&&(s.toneMapped=e.toneMapped),e.userData!==void 0&&(s.userData=e.userData),e.vertexColors!==void 0&&(typeof e.vertexColors=="number"?s.vertexColors=e.vertexColors>0:s.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const o in e.uniforms){const c=e.uniforms[o];switch(s.uniforms[o]={},c.type){case"t":s.uniforms[o].value=i(c.value);break;case"c":s.uniforms[o].value=new mt().setHex(c.value);break;case"v2":s.uniforms[o].value=new je().fromArray(c.value);break;case"v3":s.uniforms[o].value=new Z().fromArray(c.value);break;case"v4":s.uniforms[o].value=new Xn().fromArray(c.value);break;case"m3":s.uniforms[o].value=new Qt().fromArray(c.value);break;case"m4":s.uniforms[o].value=new Yt().fromArray(c.value);break;default:s.uniforms[o].value=c.value}}if(e.defines!==void 0&&(s.defines=e.defines),e.vertexShader!==void 0&&(s.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(s.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(s.glslVersion=e.glslVersion),e.extensions!==void 0)for(const o in e.extensions)s.extensions[o]=e.extensions[o];if(e.lights!==void 0&&(s.lights=e.lights),e.clipping!==void 0&&(s.clipping=e.clipping),e.size!==void 0&&(s.size=e.size),e.sizeAttenuation!==void 0&&(s.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(s.map=i(e.map)),e.matcap!==void 0&&(s.matcap=i(e.matcap)),e.alphaMap!==void 0&&(s.alphaMap=i(e.alphaMap)),e.bumpMap!==void 0&&(s.bumpMap=i(e.bumpMap)),e.bumpScale!==void 0&&(s.bumpScale=e.bumpScale),e.normalMap!==void 0&&(s.normalMap=i(e.normalMap)),e.normalMapType!==void 0&&(s.normalMapType=e.normalMapType),e.normalScale!==void 0){let o=e.normalScale;Array.isArray(o)===!1&&(o=[o,o]),s.normalScale=new je().fromArray(o)}return e.displacementMap!==void 0&&(s.displacementMap=i(e.displacementMap)),e.displacementScale!==void 0&&(s.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(s.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(s.roughnessMap=i(e.roughnessMap)),e.metalnessMap!==void 0&&(s.metalnessMap=i(e.metalnessMap)),e.emissiveMap!==void 0&&(s.emissiveMap=i(e.emissiveMap)),e.emissiveIntensity!==void 0&&(s.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(s.specularMap=i(e.specularMap)),e.specularIntensityMap!==void 0&&(s.specularIntensityMap=i(e.specularIntensityMap)),e.specularColorMap!==void 0&&(s.specularColorMap=i(e.specularColorMap)),e.envMap!==void 0&&(s.envMap=i(e.envMap)),e.envMapRotation!==void 0&&s.envMapRotation.fromArray(e.envMapRotation),e.envMapIntensity!==void 0&&(s.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(s.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(s.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(s.lightMap=i(e.lightMap)),e.lightMapIntensity!==void 0&&(s.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(s.aoMap=i(e.aoMap)),e.aoMapIntensity!==void 0&&(s.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(s.gradientMap=i(e.gradientMap)),e.clearcoatMap!==void 0&&(s.clearcoatMap=i(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(s.clearcoatRoughnessMap=i(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(s.clearcoatNormalMap=i(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(s.clearcoatNormalScale=new je().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(s.iridescenceMap=i(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(s.iridescenceThicknessMap=i(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(s.transmissionMap=i(e.transmissionMap)),e.thicknessMap!==void 0&&(s.thicknessMap=i(e.thicknessMap)),e.anisotropyMap!==void 0&&(s.anisotropyMap=i(e.anisotropyMap)),e.sheenColorMap!==void 0&&(s.sheenColorMap=i(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(s.sheenRoughnessMap=i(e.sheenRoughnessMap)),s}setTextures(e){return this.textures=e,this}createMaterialFromType(e){return yb.createMaterialFromType(e)}static createMaterialFromType(e){const t={ShadowMaterial:AL,SpriteMaterial:Ww,RawShaderMaterial:tT,ShaderMaterial:dr,PointsMaterial:qw,MeshPhysicalMaterial:NL,MeshStandardMaterial:nT,MeshPhongMaterial:DL,MeshToonMaterial:LL,MeshNormalMaterial:IL,MeshLambertMaterial:PL,MeshDepthMaterial:iT,MeshDistanceMaterial:sT,MeshBasicMaterial:Uu,MeshMatcapMaterial:UL,LineDashedMaterial:OL,LineBasicMaterial:_a,Material:ea};return new t[e]}}class MM{static extractUrlBase(e){const t=e.lastIndexOf("/");return t===-1?"./":e.slice(0,t+1)}static resolveURL(e,t){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}class KL extends Kt{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){const e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}class $L extends Za{constructor(e){super(e)}load(e,t,i,s){const o=this,c=new vc(o.manager);c.setPath(o.path),c.setRequestHeader(o.requestHeader),c.setWithCredentials(o.withCredentials),c.load(e,function(h){try{t(o.parse(JSON.parse(h)))}catch(f){s?s(f):Et(f),o.manager.itemError(e)}},i,s)}parse(e){const t={},i={};function s(S,M){if(t[M]!==void 0)return t[M];const A=S.interleavedBuffers[M],w=o(S,A.buffer),N=jf(A.type,w),L=new eb(N,A.stride);return L.uuid=A.uuid,t[M]=L,L}function o(S,M){if(i[M]!==void 0)return i[M];const A=S.arrayBuffers[M],w=new Uint32Array(A).buffer;return i[M]=w,w}const c=e.isInstancedBufferGeometry?new KL:new Kt,h=e.data.index;if(h!==void 0){const S=jf(h.type,h.array);c.setIndex(new Vn(S,1))}const f=e.data.attributes;for(const S in f){const M=f[S];let R;if(M.isInterleavedBufferAttribute){const A=s(e.data,M.data);R=new Qd(A,M.itemSize,M.offset,M.normalized)}else{const A=jf(M.type,M.array),w=M.isInstancedBufferAttribute?ip:Vn;R=new w(A,M.itemSize,M.normalized)}M.name!==void 0&&(R.name=M.name),M.usage!==void 0&&R.setUsage(M.usage),c.setAttribute(S,R)}const p=e.data.morphAttributes;if(p)for(const S in p){const M=p[S],R=[];for(let A=0,w=M.length;A<w;A++){const N=M[A];let L;if(N.isInterleavedBufferAttribute){const I=s(e.data,N.data);L=new Qd(I,N.itemSize,N.offset,N.normalized)}else{const I=jf(N.type,N.array);L=new Vn(I,N.itemSize,N.normalized)}N.name!==void 0&&(L.name=N.name),R.push(L)}c.morphAttributes[S]=R}e.data.morphTargetsRelative&&(c.morphTargetsRelative=!0);const y=e.data.groups||e.data.drawcalls||e.data.offsets;if(y!==void 0)for(let S=0,M=y.length;S!==M;++S){const R=y[S];c.addGroup(R.start,R.count,R.materialIndex)}const v=e.data.boundingSphere;return v!==void 0&&(c.boundingSphere=new Ps().fromJSON(v)),e.name&&(c.name=e.name),e.userData&&(c.userData=e.userData),c}}const rS={};class Wk extends Za{constructor(e){super(e)}load(e,t,i,s){const o=this,c=this.path===""?MM.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||c;const h=new vc(this.manager);h.setPath(this.path),h.setRequestHeader(this.requestHeader),h.setWithCredentials(this.withCredentials),h.load(e,function(f){let p=null;try{p=JSON.parse(f)}catch(y){s!==void 0&&s(y),Et("ObjectLoader: Can't parse "+e+".",y.message);return}const x=p.metadata;if(x===void 0||x.type===void 0||x.type.toLowerCase()==="geometry"){s!==void 0&&s(new Error("THREE.ObjectLoader: Can't load "+e)),Et("ObjectLoader: Can't load "+e);return}o.parse(p,t)},i,s)}async loadAsync(e,t){const i=this,s=this.path===""?MM.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||s;const o=new vc(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials);const c=await o.loadAsync(e,t);let h;try{h=JSON.parse(c)}catch(p){throw new Error("ObjectLoader: Can't parse "+e+". "+p.message)}const f=h.metadata;if(f===void 0||f.type===void 0||f.type.toLowerCase()==="geometry")throw new Error("THREE.ObjectLoader: Can't load "+e);return await i.parseAsync(h)}parse(e,t){const i=this.parseAnimations(e.animations),s=this.parseShapes(e.shapes),o=this.parseGeometries(e.geometries,s),c=this.parseImages(e.images,function(){t!==void 0&&t(p)}),h=this.parseTextures(e.textures,c),f=this.parseMaterials(e.materials,h),p=this.parseObject(e.object,o,f,h,i),x=this.parseSkeletons(e.skeletons,p);if(this.bindSkeletons(p,x),this.bindLightTargets(p),t!==void 0){let y=!1;for(const v in c)if(c[v].data instanceof HTMLImageElement){y=!0;break}y===!1&&t(p)}return p}async parseAsync(e){const t=this.parseAnimations(e.animations),i=this.parseShapes(e.shapes),s=this.parseGeometries(e.geometries,i),o=await this.parseImagesAsync(e.images),c=this.parseTextures(e.textures,o),h=this.parseMaterials(e.materials,c),f=this.parseObject(e.object,s,h,c,t),p=this.parseSkeletons(e.skeletons,f);return this.bindSkeletons(f,p),this.bindLightTargets(f),f}static registerGeometry(e,t){rS[e]=t}parseShapes(e){const t={};if(e!==void 0)for(let i=0,s=e.length;i<s;i++){const o=new Zd().fromJSON(e[i]);t[o.uuid]=o}return t}parseSkeletons(e,t){const i={},s={};if(t.traverse(function(o){o.isBone&&(s[o.uuid]=o)}),e!==void 0)for(let o=0,c=e.length;o<c;o++){const h=new tb().fromJSON(e[o],s);i[h.uuid]=h}return i}parseGeometries(e,t){const i={};if(e!==void 0){const s=new $L;for(let o=0,c=e.length;o<c;o++){let h;const f=e[o];switch(f.type){case"BufferGeometry":case"InstancedBufferGeometry":h=s.parse(f);break;default:f.type in V3?h=V3[f.type].fromJSON(f,t):f.type in rS?h=rS[f.type].fromJSON(f,t):ct(`ObjectLoader: Unknown geometry type "${f.type}". Use .registerGeometry() before starting the deserialization process.`)}h.uuid=f.uuid,f.name!==void 0&&(h.name=f.name),f.userData!==void 0&&(h.userData=f.userData),i[f.uuid]=h}}return i}parseMaterials(e,t){const i={},s={};if(e!==void 0){const o=new yb;o.setTextures(t);for(let c=0,h=e.length;c<h;c++){const f=e[c];i[f.uuid]===void 0&&(i[f.uuid]=o.parse(f)),s[f.uuid]=i[f.uuid]}}return s}parseAnimations(e){const t={};if(e!==void 0)for(let i=0;i<e.length;i++){const s=e[i],o=n0.parse(s);t[o.uuid]=o}return t}parseImages(e,t){const i=this,s={};let o;function c(f){return i.manager.itemStart(f),o.load(f,function(){i.manager.itemEnd(f)},void 0,function(){i.manager.itemError(f),i.manager.itemEnd(f)})}function h(f){if(typeof f=="string"){const p=f,x=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(p)?p:i.resourcePath+p;return c(x)}else return f.data?{data:jf(f.type,f.data),width:f.width,height:f.height}:null}if(e!==void 0&&e.length>0){const f=new lT(t);o=new i0(f),o.setCrossOrigin(this.crossOrigin);for(let p=0,x=e.length;p<x;p++){const y=e[p],v=y.url;if(Array.isArray(v)){const S=[];for(let M=0,R=v.length;M<R;M++){const A=v[M],w=h(A);w!==null&&(w instanceof HTMLImageElement?S.push(w):S.push(new Co(w.data,w.width,w.height)))}s[y.uuid]=new wu(S)}else{const S=h(y.url);s[y.uuid]=new wu(S)}}}return s}async parseImagesAsync(e){const t=this,i={};let s;async function o(c){if(typeof c=="string"){const h=c,f=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(h)?h:t.resourcePath+h;return await s.loadAsync(f)}else return c.data?{data:jf(c.type,c.data),width:c.width,height:c.height}:null}if(e!==void 0&&e.length>0){s=new i0(this.manager),s.setCrossOrigin(this.crossOrigin);for(let c=0,h=e.length;c<h;c++){const f=e[c],p=f.url;if(Array.isArray(p)){const x=[];for(let y=0,v=p.length;y<v;y++){const S=p[y],M=await o(S);M!==null&&(M instanceof HTMLImageElement?x.push(M):x.push(new Co(M.data,M.width,M.height)))}i[f.uuid]=new wu(x)}else{const x=await o(f.url);i[f.uuid]=new wu(x)}}}return i}parseTextures(e,t){function i(o,c){return typeof o=="number"?o:(ct("ObjectLoader.parseTexture: Constant should be in numeric form.",o),c[o])}const s={};if(e!==void 0)for(let o=0,c=e.length;o<c;o++){const h=e[o];h.image===void 0&&ct('ObjectLoader: No "image" specified for',h.uuid),t[h.image]===void 0&&ct("ObjectLoader: Undefined image",h.image);const f=t[h.image],p=f.data;let x;Array.isArray(p)?(x=new m0,p.length===6&&(x.needsUpdate=!0)):(p&&p.data?x=new Co:x=new Ii,p&&(x.needsUpdate=!0)),x.source=f,x.uuid=h.uuid,h.name!==void 0&&(x.name=h.name),h.mapping!==void 0&&(x.mapping=i(h.mapping,Xk)),h.channel!==void 0&&(x.channel=h.channel),h.offset!==void 0&&x.offset.fromArray(h.offset),h.repeat!==void 0&&x.repeat.fromArray(h.repeat),h.center!==void 0&&x.center.fromArray(h.center),h.rotation!==void 0&&(x.rotation=h.rotation),h.wrap!==void 0&&(x.wrapS=i(h.wrap[0],X3),x.wrapT=i(h.wrap[1],X3)),h.format!==void 0&&(x.format=h.format),h.internalFormat!==void 0&&(x.internalFormat=h.internalFormat),h.type!==void 0&&(x.type=h.type),h.colorSpace!==void 0&&(x.colorSpace
vendor: 6,548 bytes, line 15
15=h.colorSpace),h.minFilter!==void 0&&(x.minFilter=i(h.minFilter,q3)),h.magFilter!==void 0&&(x.magFilter=i(h.magFilter,q3)),h.anisotropy!==void 0&&(x.anisotropy=h.anisotropy),h.flipY!==void 0&&(x.flipY=h.flipY),h.generateMipmaps!==void 0&&(x.generateMipmaps=h.generateMipmaps),h.premultiplyAlpha!==void 0&&(x.premultiplyAlpha=h.premultiplyAlpha),h.unpackAlignment!==void 0&&(x.unpackAlignment=h.unpackAlignment),h.compareFunction!==void 0&&(x.compareFunction=h.compareFunction),h.normalized!==void 0&&(x.normalized=h.normalized),h.userData!==void 0&&(x.userData=h.userData),s[h.uuid]=x}return s}parseObject(e,t,i,s,o){let c;function h(v){return t[v]===void 0&&ct("ObjectLoader: Undefined geometry",v),t[v]}function f(v){if(v!==void 0){if(Array.isArray(v)){const S=[];for(let M=0,R=v.length;M<R;M++){const A=v[M];i[A]===void 0&&ct("ObjectLoader: Undefined material",A),S.push(i[A])}return S}return i[v]===void 0&&ct("ObjectLoader: Undefined material",v),i[v]}}function p(v){return s[v]===void 0&&ct("ObjectLoader: Undefined texture",v),s[v]}let x,y;switch(e.type){case"Scene":c=new Hw,e.background!==void 0&&(Number.isInteger(e.background)?c.background=new mt(e.background):c.background=p(e.background)),e.environment!==void 0&&(c.environment=p(e.environment)),e.fog!==void 0&&(e.fog.type==="Fog"?c.fog=new J1(e.fog.color,e.fog.near,e.fog.far):e.fog.type==="FogExp2"&&(c.fog=new Q1(e.fog.color,e.fog.density)),e.fog.name!==""&&(c.fog.name=e.fog.name)),e.backgroundBlurriness!==void 0&&(c.backgroundBlurriness=e.backgroundBlurriness),e.backgroundIntensity!==void 0&&(c.backgroundIntensity=e.backgroundIntensity),e.backgroundRotation!==void 0&&c.backgroundRotation.fromArray(e.backgroundRotation),e.environmentIntensity!==void 0&&(c.environmentIntensity=e.environmentIntensity),e.environmentRotation!==void 0&&c.environmentRotation.fromArray(e.environmentRotation);break;case"PerspectiveCamera":c=new vs(e.fov,e.aspect,e.near,e.far),e.focus!==void 0&&(c.focus=e.focus),e.zoom!==void 0&&(c.zoom=e.zoom),e.filmGauge!==void 0&&(c.filmGauge=e.filmGauge),e.filmOffset!==void 0&&(c.filmOffset=e.filmOffset),e.view!==void 0&&(c.view=Object.assign({},e.view));break;case"OrthographicCamera":c=new gp(e.left,e.right,e.top,e.bottom,e.near,e.far),e.zoom!==void 0&&(c.zoom=e.zoom),e.view!==void 0&&(c.view=Object.assign({},e.view));break;case"AmbientLight":c=new qL(e.color,e.intensity);break;case"DirectionalLight":c=new XL(e.color,e.intensity),c.target=e.target||"";break;case"PointLight":c=new WL(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":c=new YL(e.color,e.intensity,e.width,e.height);break;case"SpotLight":c=new jL(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay),c.target=e.target||"";break;case"HemisphereLight":c=new GL(e.color,e.groundColor,e.intensity);break;case"LightProbe":const v=new uT().fromArray(e.sh);c=new ZL(v,e.intensity);break;case"SkinnedMesh":x=h(e.geometry),y=f(e.material),c=new cL(x,y),e.bindMode!==void 0&&(c.bindMode=e.bindMode),e.bindMatrix!==void 0&&c.bindMatrix.fromArray(e.bindMatrix),e.skeleton!==void 0&&(c.skeleton=e.skeleton);break;case"Mesh":x=h(e.geometry),y=f(e.material),c=new ss(x,y);break;case"InstancedMesh":x=h(e.geometry),y=f(e.material);const S=e.count,M=e.instanceMatrix,R=e.instanceColor;c=new uL(x,y,S),c.instanceMatrix=new ip(new Float32Array(M.array),16),R!==void 0&&(c.instanceColor=new ip(new Float32Array(R.array),R.itemSize));break;case"BatchedMesh":x=h(e.geometry),y=f(e.material),c=new dL(e.maxInstanceCount,e.maxVertexCount,e.maxIndexCount,y),c.geometry=x,c.perObjectFrustumCulled=e.perObjectFrustumCulled,c.sortObjects=e.sortObjects,c._drawRanges=e.drawRanges,c._reservedRanges=e.reservedRanges,c._geometryInfo=e.geometryInfo.map(A=>{let w=null,N=null;return A.boundingBox!==void 0&&(w=new Js().fromJSON(A.boundingBox)),A.boundingSphere!==void 0&&(N=new Ps().fromJSON(A.boundingSphere)),{...A,boundingBox:w,boundingSphere:N}}),c._instanceInfo=e.instanceInfo,c._availableInstanceIds=e._availableInstanceIds,c._availableGeometryIds=e._availableGeometryIds,c._nextIndexStart=e.nextIndexStart,c._nextVertexStart=e.nextVertexStart,c._geometryCount=e.geometryCount,c._maxInstanceCount=e.maxInstanceCount,c._maxVertexCount=e.maxVertexCount,c._maxIndexCount=e.maxIndexCount,c._geometryInitialized=e.geometryInitialized,c._matricesTexture=p(e.matricesTexture.uuid),c._indirectTexture=p(e.indirectTexture.uuid),e.colorsTexture!==void 0&&(c._colorsTexture=p(e.colorsTexture.uuid)),e.boundingSphere!==void 0&&(c.boundingSphere=new Ps().fromJSON(e.boundingSphere)),e.boundingBox!==void 0&&(c.boundingBox=new Js().fromJSON(e.boundingBox));break;case"LOD":c=new lL;break;case"Line":c=new Iu(h(e.geometry),f(e.material));break;case"LineLoop":c=new hL(h(e.geometry),f(e.material));break;case"LineSegments":c=new El(h(e.geometry),f(e.material));break;case"PointCloud":case"Points":c=new fL(h(e.geometry),f(e.material));break;case"Sprite":c=new oL(f(e.material));break;case"Group":c=new Wf;break;case"Bone":c=new Xw;break;default:c=new Un}if(c.uuid=e.uuid,e.name!==void 0&&(c.name=e.name),e.matrix!==void 0?(c.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(c.matrixAutoUpdate=e.matrixAutoUpdate),c.matrixAutoUpdate&&c.matrix.decompose(c.position,c.quaternion,c.scale)):(e.position!==void 0&&c.position.fromArray(e.position),e.rotation!==void 0&&c.rotation.fromArray(e.rotation),e.quaternion!==void 0&&c.quaternion.fromArray(e.quaternion),e.scale!==void 0&&c.scale.fromArray(e.scale)),e.up!==void 0&&c.up.fromArray(e.up),e.pivot!==void 0&&(c.pivot=new Z().fromArray(e.pivot)),e.morphTargetDictionary!==void 0&&(c.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),e.morphTargetInfluences!==void 0&&(c.morphTargetInfluences=e.morphTargetInfluences.slice()),e.castShadow!==void 0&&(c.castShadow=e.castShadow),e.receiveShadow!==void 0&&(c.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.intensity!==void 0&&(c.shadow.intensity=e.shadow.intensity),e.shadow.bias!==void 0&&(c.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(c.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(c.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&c.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(c.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(c.visible=e.visible),e.frustumCulled!==void 0&&(c.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(c.renderOrder=e.renderOrder),e.static!==void 0&&(c.static=e.static),e.userData!==void 0&&(c.userData=e.userData),e.layers!==void 0&&(c.layers.mask=e.layers
15),e.children!==void 0){const v=e.children;for(let S=0;S<v.length;S++)c.add(this.parseObject(v[S],t,i,s,o))}if(e.animations!==void 0){const v=e.animations;for(let S=0;S<v.length;S++){const M=v[S];c.animations.push(o[M])}}if(e.type==="LOD"){e.autoUpdate!==void 0&&(c.autoUpdate=e.autoUpdate);const v=e.levels;for(let S=0;S<v.length;S++){const M=v[S],R=c.getObjectByProperty("uuid",M.object);R!==void 0&&c.addLevel(R,M.distance,M.hysteresis)}}return c}bindSkeletons(e,t){Object.keys(t).length!==0&&e.traverse(function(i){if(i.isSkinnedMesh===!0&&i.skeleton!==void 0){const s=t[i.skeleton];s===void 0?ct("ObjectLoader: No skeleton found with UUID:",i.skeleton):i.bind(s,i.bindMatrix)}})}bindLightTargets(e){e.traverse(function(t){if(t.isDirectionalLight||t.isSpotLight){const i=t.target,s=e.getObjectByProperty("uuid",i);s!==void 0?t.target=s:t.target=new Un}})}}const Xk={UVMapping:F1,CubeReflectionMapping:Sl,CubeRefractionMapping:Nu,EquirectangularReflectionMapping:Sg,EquirectangularRefractionMapping:Mg,CubeUVReflectionMapping:dp},X3={RepeatWrapping:kg,ClampToEdgeWrapping:Xa,MirroredRepeatWrapping:Hg},q3={NearestFilter:qi,NearestMipmapNearestFilter:Lw,NearestMipmapLinearFilter:Gf,LinearFilter:yi,LinearMipmapNearestFilter:wg,LinearMipmapLinearFilter:xl},oS=new WeakMap;class qk extends Za{constructor(e){super(e),this.isImageBitmapLoader=!0,typeof createImageBitmap>"u"&&ct("ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&ct("ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"},this._abortController=new AbortController}setOptions(e){return this.options=e,this}load(e,t,i,s){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=this,c=yl.get(`image-bitmap:${e}`);if(c!==void 0){if(o.manager.itemStart(e),c.then){c.then(p=>{oS.has(c)===!0?(s&&s(oS.get(c)),o.manager.itemError(e),o.manager.itemEnd(e)):(t&&t(p),o.manager.itemEnd(e))});return}setTimeout(function(){t&&t(c),o.manager.itemEnd(e)},0);return}const h={};h.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",h.headers=this.requestHeader,h.signal=typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal;const f=fetch(e,h).then(function(p){return p.blob()}).then(function(p){return createImageBitmap(p,Object.assign(o.options,{colorSpaceConversion:"none"}))}).then(function(p){yl.add(`image-bitmap:${e}`,p),t&&t(p),o.manager.itemEnd(e)}).catch(function(p){s&&s(p),oS.set(f,p),yl.remove(`image-bitmap:${e}`),o.manager.itemError(e),o.manager.itemEnd(e)});yl.add(`image-bitmap:${e}`,f),o.manager.itemStart(e)}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}let Wy;class dT{static getContext(){return Wy===void 0&&(Wy=new(window.AudioContext||window.webkitAudioContext)),Wy}static setContext(e){Wy=e}}class Yk extends Za{constructor(e){super(e)}load(e,t,i,s){const o=this,c=new vc(this.manager);c.setResponseType("arraybuffer"),c.setPath(this.path),c.setRequestHeader(this.requestHeader),c.setWithCredentials(this.withCredentials),c.load(e,function(f){try{const p=f.slice(0),x=dT.getContext(),y=e+"#decode";o.manager.itemStart(y),x.decodeAudioData(p,function(v){t(v),o.manager.itemEnd(y)}).catch(function(v){h(v),o.manager.itemEnd(y)})}catch(p){h(p)}},i,s);function h(f){s?s(f):Et(f),o.manager.itemError(e)}}}const Y3=new Yt,Z3=new Yt,Rd=new Yt;class Zk{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new vs,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new vs,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,Rd.copy(e.projectionMatrix);const s=t.eyeSep/2,o=s*t.near/t.focus,c=t.near*Math.tan(Yd*t.fov*.5)/t.zoom;let h,f;Z3.elements[12]=-s,Y3.elements[12]=s,h=-c*t.aspect+o,f=c*t.aspect+o,Rd.elements[0]=2*t.near/(f-h),Rd.elements[8]=(f+h)/(f-h),this.cameraL.projectionMatrix.copy(Rd),h=-c*t.aspect-o,f=c*t.aspect-o,Rd.elements[0]=2*t.near/(f-h),Rd.elements[8]=(f+h)/(f-h),this.cameraR.projectionMatrix.copy(Rd)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(Z3),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(Y3)}}const Df=-90,Lf=1;class QL extends Un{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const s=new vs(Df,Lf,e,t);s.layers=this.layers,this.add(s);const o=new vs(Df,Lf,e,t);o.layers=this.layers,this.add(o);const c=new vs(Df,Lf,e,t);c.layers=this.layers,this.add(c);const h=new vs(Df,Lf,e,t);h.layers=this.layers,this.add(h);const f=new vs(Df,Lf,e,t);f.layers=this.layers,this.add(f);const p=new vs(Df,Lf,e,t);p.layers=this.layers,this.add(p)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[i,s,o,c,h,f]=t;for(const p of t)this.remove(p);if(e===lr)i.up.set(0,1,0),i.lookAt(1,0,0),s.up.set(0,1,0),s.lookAt(-1,0,0),o.up.set(0,0,-1),o.lookAt(0,1,0),c.up.set(0,0,1),c.lookAt(0,-1,0),h.up.set(0,1,0),h.lookAt(0,0,1),f.up.set(0,1,0),f.lookAt(0,0,-1);else if(e===$d)i.up.set(0,-1,0),i.lookAt(-1,0,0),s.up.set(0,-1,0),s.lookAt(1,0,0),o.up.set(0,0,1),o.lookAt(0,1,0),c.up.set(0,0,-1),c.lookAt(0,-1,0),h.up.set(0,-1,0),h.lookAt(0,0,1),f.up.set(0,-1,0),f.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const p of t)this.add(p),p.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();const{renderTarget:i,activeMipmapLevel:s}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[o,c,h,f,p,x]=this.children,y=e.getRenderTarget(),v=e.getActiveCubeFace(),S=e.getActiveMipmapLevel(),M=e.xr.enabled;e.xr.enabled=!1;const R=i.texture.generateMipmaps;i.texture.generateMipmaps=!1;let A=!1;e.isWebGLRenderer===!0?A=e.state.buffers.depth.getReversed():A=e.reversedDepthBuffer,e.setRenderTarget(i,0,s),A&&e.autoClear===!1&&e.clearDepth(),e.render(t,o),e.setRenderTarget(i,1,s),A&&e.autoClear===!1&&e.clearDepth(),e.render(t,c),e.setRenderTarget(i,2,s),A&&e.autoClear===!1&&e.clearDepth(),e.render(t,h),e.setRenderTarget(i,3,s),A&&e.autoClear===!1&&e.clearDepth(),e.render(t,f),e.setRenderTarget(i,4,s),A&&e.autoClear===!1&&e.clearDepth(),e.render(t,p),i.texture.generateMipmaps=R,e.setRenderTarget(i,5,s),A&&e.autoClear===!1&&e.clearDepth(),e.render(t,x),e.setRenderTarget(y,v,S),e.xr.enabled=M,i.texture.needsPMREMUpdate=!0}}class JL extends vs{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}}class eI{constructor(){this._previousTime=0,this._currentTime=0,this._startTime=performance.now(),this._delta=0,this._elapsed=0,this._timescale=1,this._document=null,this._pageVisibilityHandler=null}connect(e){this._document=e,e.hidden!==void 0&&(this._pageVisibilityHandler=Kk.bind(this),e.addEventListener("visibilitychange",this._pageVisibilityHandler,!1))}disconnect(){this._pageVisibilityHandler!==null&&(this._document.removeEventListener("visibilitychange",this._pageVisibilityHandler),this._pageVisibilityHandler=null),this._document=null}getDelta(){return this._delta/1e3}getElapsed(){return this._elapsed/1e3}getTimescale(){return this._timescale}setTimescale(e){return this._timescale=e,this}reset(){return this._currentTime=performance.now()-this._startTime,this}dispose(){this.disconnect()}update(e){return this._pageVisibilityHandler!==null&&this._document.hidden===!0?this._delta=0:(this._previousTime=this._currentTime,this._currentTime=(e!==void 0?e:performance.now())-this._startTime,this._delta=(this._currentTime-this._previousTime)*this._timescale,this._elapsed+=this._delta),this}}function Kk(){this._document.hidden===!1&&this.reset()}const Nd=new Z,lS=new ba,$k=new Z,Dd=new Z,Ld=new Z;class Qk extends Un{constructor(){super(),this.type="AudioListener",this.context=dT.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._timer=new eI}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),this._timer.update(
vendor: 4,322 bytes, line 15
15);const t=this.context.listener;if(this.timeDelta=this._timer.getDelta(),this.matrixWorld.decompose(Nd,lS,$k),Dd.set(0,0,-1).applyQuaternion(lS),Ld.set(0,1,0).applyQuaternion(lS),t.positionX){const i=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(Nd.x,i),t.positionY.linearRampToValueAtTime(Nd.y,i),t.positionZ.linearRampToValueAtTime(Nd.z,i),t.forwardX.linearRampToValueAtTime(Dd.x,i),t.forwardY.linearRampToValueAtTime(Dd.y,i),t.forwardZ.linearRampToValueAtTime(Dd.z,i),t.upX.linearRampToValueAtTime(Ld.x,i),t.upY.linearRampToValueAtTime(Ld.y,i),t.upZ.linearRampToValueAtTime(Ld.z,i)}else t.setPosition(Nd.x,Nd.y,Nd.z),t.setOrientation(Dd.x,Dd.y,Dd.z,Ld.x,Ld.y,Ld.z)}}let tI=class extends Un{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){ct("Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){ct("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){ct("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(e=0){if(this.hasPlaybackControl===!1){ct("Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(this.context.currentTime+e),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this._connected!==!1){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}}getFilters(){return this.filters}setFilters(e){return e||(e=[]),this._connected===!0?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this}setDetune(e){return this.detune=e,this.isPlaying===!0&&this.source.detune!==void 0&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(e){return this.setFilters(e?[e]:[])}setPlaybackRate(e){if(this.hasPlaybackControl===!1){ct("Audio: this Audio has no playback control.");return}return this.playbackRate=e,this.isPlaying===!0&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1,this._progress=0}
vendor: 9,302 bytes, line 15
15getLoop(){return this.hasPlaybackControl===!1?(ct("Audio: this Audio has no playback control."),!1):this.loop}setLoop(e){if(this.hasPlaybackControl===!1){ct("Audio: this Audio has no playback control.");return}return this.loop=e,this.isPlaying===!0&&(this.source.loop=this.loop),this}setLoopStart(e){return this.loopStart=e,this}setLoopEnd(e){return this.loopEnd=e,this}getVolume(){return this.gain.gain.value}setVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}copy(e,t){return super.copy(e,t),e.sourceType!=="buffer"?(ct("Audio: Audio source type cannot be copied."),this):(this.autoplay=e.autoplay,this.buffer=e.buffer,this.detune=e.detune,this.loop=e.loop,this.loopStart=e.loopStart,this.loopEnd=e.loopEnd,this.offset=e.offset,this.duration=e.duration,this.playbackRate=e.playbackRate,this.hasPlaybackControl=e.hasPlaybackControl,this.sourceType=e.sourceType,this.filters=e.filters.slice(),this)}clone(e){return new this.constructor(this.listener).copy(this,e)}};const Id=new Z,K3=new ba,Jk=new Z,Pd=new Z;class e8 extends tI{constructor(e){super(e),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}connect(){return super.connect(),this.panner.connect(this.gain),this}disconnect(){return super.disconnect(),this.panner.disconnect(this.gain),this}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(e){return this.panner.refDistance=e,this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(e){return this.panner.rolloffFactor=e,this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(e){return this.panner.distanceModel=e,this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(e){return this.panner.maxDistance=e,this}setDirectionalCone(e,t,i){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=t,this.panner.coneOuterGain=i,this}updateMatrixWorld(e){if(super.updateMatrixWorld(e),this.hasPlaybackControl===!0&&this.isPlaying===!1)return;this.matrixWorld.decompose(Id,K3,Jk),Pd.set(0,0,1).applyQuaternion(K3);const t=this.panner;if(t.positionX){const i=this.context.currentTime+this.listener.timeDelta;t.positionX.linearRampToValueAtTime(Id.x,i),t.positionY.linearRampToValueAtTime(Id.y,i),t.positionZ.linearRampToValueAtTime(Id.z,i),t.orientationX.linearRampToValueAtTime(Pd.x,i),t.orientationY.linearRampToValueAtTime(Pd.y,i),t.orientationZ.linearRampToValueAtTime(Pd.z,i)}else t.setPosition(Id.x,Id.y,Id.z),t.setOrientation(Pd.x,Pd.y,Pd.z)}}class t8{constructor(e,t=2048){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=t,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let e=0;const t=this.getFrequencyData();for(let i=0;i<t.length;i++)e+=t[i];return e/t.length}}class nI{constructor(e,t,i){this.binding=e,this.valueSize=i;let s,o,c;switch(t){case"quaternion":s=this._slerp,o=this._slerpAdditive,c=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(i*6),this._workIndex=5;break;case"string":case"bool":s=this._select,o=this._select,c=this._setAdditiveIdentityOther,this.buffer=new Array(i*5);break;default:s=this._lerp,o=this._lerpAdditive,c=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(i*5)}this._mixBufferRegion=s,this._mixBufferRegionAdditive=o,this._setIdentity=c,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,t){const i=this.buffer,s=this.valueSize,o=e*s+s;let c=this.cumulativeWeight;if(c===0){for(let h=0;h!==s;++h)i[o+h]=i[h];c=t}else{c+=t;const h=t/c;this._mixBufferRegion(i,o,0,h,s)}this.cumulativeWeight=c}accumulateAdditive(e){const t=this.buffer,i=this.valueSize,s=i*this._addIndex;this.cumulativeWeightAdditive===0&&this._setIdentity(),this._mixBufferRegionAdditive(t,s,0,e,i),this.cumulativeWeightAdditive+=e}apply(e){const t=this.valueSize,i=this.buffer,s=e*t+t,o=this.cumulativeWeight,c=this.cumulativeWeightAdditive,h=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,o<1){const f=t*this._origIndex;this._mixBufferRegion(i,s,f,1-o,t)}c>0&&this._mixBufferRegionAdditive(i,s,this._addIndex*t,1,t);for(let f=t,p=t+t;f!==p;++f)if(i[f]!==i[f+t]){h.setValue(i,s);break}}saveOriginalState(){const e=this.binding,t=this.buffer,i=this.valueSize,s=i*this._origIndex;e.getValue(t,s);for(let o=i,c=s;o!==c;++o)t[o]=t[s+o%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<t;i++)this.buffer[i]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize;for(let i=0;i<this.valueSize;i++)this.buffer[t+i]=this.buffer[e+i]}_select(e,t,i,s,o){if(s>=.5)for(let c=0;c!==o;++c)e[t+c]=e[i+c]}_slerp(e,t,i,s){ba.slerpFlat(e,t,e,t,e,i,s)}_slerpAdditive(e,t,i,s,o){const c=this._workIndex*o;ba.multiplyQuaternionsFlat(e,c,e,t,e,i),ba.slerpFlat(e,t,e,t,e,c,s)}_lerp(e,t,i,s,o){const c=1-s;for(let h=0;h!==o;++h){const f=t+h;e[f]=e[f]*c+e[i+h]*s}}_lerpAdditive(e,t,i,s,o){for(let c=0;c!==o;++c){const h=t+c;e[h]=e[h]+e[i+c]*s}}}const hT="\\[\\]\\.:\\/",n8=new RegExp("["+hT+"]","g"),fT="[^"+hT+"]",i8="[^"+hT.replace("\\.","")+"]",s8=/((?:WC+[\/:])*)/.source.replace("WC",fT),a8=/(WCOD+)?/.source.replace("WCOD",i8),r8=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",fT),o8=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",fT),l8=new RegExp("^"+s8+a8+r8+o8+"$"),c8=["material","materials","bones","map"];class u8{constructor(e,t,i){const s=i||Pn.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,s)}getValue(e,t){this.bind();const i=this._targetGroup.nCachedObjects_,s=this._bindings[i];s!==void 0&&s.getValue(e,t)}setValue(e,t){const i=this._bindings;for(let s=this._targetGroup.nCachedObjects_,o=i.length;s!==o;++s)i[s].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 Pn{constructor(e,t,i){this.path=t,this.parsedPath=i||Pn.parseTrackName(t),this.node=Pn.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 Pn.Composite(e,t,i):new Pn(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(n8,"")}static parseTrackName(e){const t=l8.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]},s=i.nodeName&&i.nodeName.lastIndexOf(".");if(s!==void 0&&s!==-1){const o=i.nodeName.substring(s+1);c8.indexOf(o)!==-1&&(i.nodeName=i.nodeName.substring(0,s),i.objectName=o)}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(o){for(let c=0;c<o.length;c++){const h=o[c];if(h.name===t||h.uuid===t)return h;const f=i(h.children);if(f)return f}return null},s=i(e.children);if(s)return s}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){const i=this.resolvedProperty;for(let s=0,o=i.length;s!==o;++s)e[t++]=i[s]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){const i=this.resolvedProperty;for(let s=0,o=i.length;s!==o;++s)i[s]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const i=this.resolvedProperty;for(let s=0,o=i.length;s!==o;++s)i[s]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const i=this.resolvedProperty;for(let s=0,o=i.length;s!==o;++s)i[s]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}
15_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node;const t=this.parsedPath,i=t.objectName,s=t.propertyName;let o=t.propertyIndex;if(e||(e=Pn.findNode(this.rootNode,t.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e){ct("PropertyBinding: No target node found for track: "+this.path+".");return}if(i){let p=t.objectIndex;switch(i){case"materials":if(!e.material){Et("PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.materials){Et("PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}e=e.material.materials;break;case"bones":if(!e.skeleton){Et("PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}e=e.skeleton.bones;for(let x=0;x<e.length;x++)if(e[x].name===p){p=x;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material){Et("PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.map){Et("PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}e=e.material.map;break;default:if(e[i]===void 0){Et("PropertyBinding: Can not bind to objectName of node undefined.",this);return}e=e[i]}if(p!==void 0){if(e[p]===void 0){Et("PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);return}e=e[p]}}const c=e[s];if(c===void 0){const p=t.nodeName;Et("PropertyBinding: Trying to update property for track: "+p+"."+s+" but it wasn't found.",e);return}let h=this.Versioning.None;this.targetObject=e,e.isMaterial===!0?h=this.Versioning.NeedsUpdate:e.isObject3D===!0&&(h=this.Versioning.MatrixWorldNeedsUpdate);let f=this.BindingType.Direct;if(o!==void 0){if(s==="morphTargetInfluences"){if(!e.geometry){Et("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!e.geometry.morphAttributes){Et("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}e.morphTargetDictionary[o]!==void 0&&(o=e.morphTargetDictionary[o])}f=this.BindingType.ArrayElement,this.resolvedProperty=c,this.propertyIndex=o}else c.fromArray!==void 0&&c.toArray!==void 0?(f=this.BindingType.HasFromToArray,this.resolvedProperty=c):Array.isArray(c)?(f=this.BindingType.EntireArray,this.resolvedProperty=c):this.propertyName=s;this.getValue=this.GetterByBindingType[f],this.setValue=this.SetterByBindingTypeAndVersioning[f][h]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Pn.Composite=u8;Pn.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};Pn.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};Pn.prototype.GetterByBindingType=[Pn.prototype._getValue_direct,Pn.prototype._getValue_array,Pn.prototype._getValue_arrayElement,Pn.prototype._getValue_toArray];Pn.prototype.SetterByBindingTypeAndVersioning=[[Pn.prototype._setValue_direct,Pn.prototype._setValue_direct_setNeedsUpdate,Pn.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Pn.prototype._setValue_array,Pn.prototype._setValue_array_setNeedsUpdate,Pn.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Pn.prototype._setValue_arrayElement,Pn.prototype._setValue_arrayElement_setNeedsUpdate,Pn.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Pn.prototype._setValue_fromArray,Pn.prototype._setValue_fromArray_setNeedsUpdate,Pn.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class d8{constructor(){this.isAnimationObjectGroup=!0,this.uuid=cr(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const e={};this._indicesByUUID=e;for(let i=0,s=arguments.length;i!==s;++i)e[arguments[i].uuid]=i;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const t=this;this.stats={objects:{get total(){return t._objects.length},get inUse(){return this.total-t.nCachedObjects_}},get bindingsPerObject(){return t._bindings.length}}}add(){const e=this._objects,t=this._indicesByUUID,i=this._paths,s=this._parsedPaths,o=this._bindings,c=o.length;let h,f=e.length,p=this.nCachedObjects_;for(let x=0,y=arguments.length;x!==y;++x){const v=arguments[x],S=v.uuid;let M=t[S];if(M===void 0){M=f++,t[S]=M,e.push(v);for(let R=0,A=c;R!==A;++R)o[R].push(new Pn(v,i[R],s[R]))}else if(M<p){h=e[M];const R=--p,A=e[R];t[A.uuid]=M,e[M]=A,t[S]=R,e[R]=v;for(let w=0,N=c;w!==N;++w){const L=o[w],I=L[R];let B=L[M];L[M]=I,B===void 0&&(B=new Pn(v,i[w],s[w])),L[R]=B}}else e[M]!==h&&Et("AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastru
15cture when reloading scenes.")}this.nCachedObjects_=p}remove(){const e=this._objects,t=this._indicesByUUID,i=this._bindings,s=i.length;let o=this.nCachedObjects_;for(let c=0,h=arguments.length;c!==h;++c){const f=arguments[c],p=f.uuid,x=t[p];if(x!==void 0&&x>=o){const y=o++,v=e[y];t[v.uuid]=x,e[x]=v,t[p]=y,e[y]=f;for(let S=0,M=s;S!==M;++S){const R=i[S],A=R[y],w=R[x];R[x]=A,R[y]=w}}}this.nCachedObjects_=o}uncache(){const e=this._objects,t=this._indicesByUUID,i=this._bindings,s=i.length;let o=this.nCachedObjects_,c=e.length;for(let h=0,f=arguments.length;h!==f;++h){const p=arguments[h],x=p.uuid,y=t[x];if(y!==void 0)if(delete t[x],y<o){const v=--o,S=e[v],M=--c,R=e[M];t[S.uuid]=y,e[y]=S,t[R.uuid]=v,e[v]=R,e.pop();for(let A=0,w=s;A!==w;++A){const N=i[A],L=N[v],I=N[M];N[y]=L,N[v]=I,N.pop()}}else{const v=--c,S=e[v];v>0&&(t[S.uuid]=y),e[y]=S,e.pop();for(let M=0,R=s;M!==R;++M){const A=i[M];A[y]=A[v],A.pop()}}}this.nCachedObjects_=o}subscribe_(e,t){const i=this._bindingsIndicesByPath;let s=i[e];const o=this._bindings;if(s!==void 0)return o[s];const c=this._paths,h=this._parsedPaths,f=this._objects,p=f.length,x=this.nCachedObjects_,y=new Array(p);s=o.length,i[e]=s,c.push(e),h.push(t),o.push(y);for(let v=x,S=f.length;v!==S;++v){const M=f[v];y[v]=new Pn(M,e,t)}return y}unsubscribe_(e){const t=this._bindingsIndicesByPath,i=t[e];if(i!==void 0){const s=this._paths,o=this._parsedPaths,c=this._bindings,h=c.length-1,f=c[h],p=e[h];t[p]=i,c[i]=f,c.pop(),o[i]=o[h],o.pop(),s[i]=s[h],s.pop()}}}class iI{constructor(e,t,i=null,s=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=i,this.blendMode=s;const o=t.tracks,c=o.length,h=new Array(c),f={endingStart:kd,endingEnd:kd};for(let p=0;p!==c;++p){const x=o[p].createInterpolant(null);h[p]=x,x.settings&&Object.assign(f,x.settings),x.settings=f}this._interpolantSettings=f,this._interpolants=h,this._propertyBindings=new Array(c),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=WD,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=!1){if(e.fadeOut(t),this.fadeIn(t),i===!0){const s=this._clip.duration,o=e._clip.duration,c=o/s,h=s/o;e.warp(1,c,t),this.warp(h,1,t)}return this}crossFadeTo(e,t,i=!1){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 s=this._mixer,o=s.time,c=this.timeScale;let h=this._timeScaleInterpolant;h===null&&(h=s._lendControlInterpolant(),this._timeScaleInterpolant=h);const f=h.parameterPositions,p=h.sampleValues;return f[0]=o,f[1]=o+i,p[0]=e/c,p[1]=t/c,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,s){if(!this.enabled){this._updateWeight(e);return}const o=this._startTime;if(o!==null){const f=(e-o)*i;f<0||i===0?t=0:(this._startTime=null,t=i*f)}t*=this._updateTimeScale(e);const c=this._updateTime(t),h=this._updateWeight(e);if(h>0){const f=this._interpolants,p=this._propertyBindings;switch(this.blendMode){case Vw:for(let x=0,y=f.length;x!==y;++x)f[x].evaluate(c),p[x].accumulateAdditive(h);break;case q1:default:for(let x=0,y=f.length;x!==y;++x)f[x].evaluate(c),p[x].accumulate(s,h)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const i=this._weightInterpolant;if(i!==null){const s=i.evaluate(e)[0];t*=s,e>i.parameterPositions[1]&&(this.stopFading(),s===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 s=i.evaluate(e)[0];t*=s,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 s=this.time+e,o=this._loopCount;const c=i===XD;if(e===0)return o===-1?s:c&&(o&1)===1?t-s:s;if(i===jD){o===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(s>=t)s=t;else if(s<0)s=0;else{this.time=s;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=s,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(o===-1&&(e>=0?(o=0,this._setEndings(!0,this.repetitions===0,c)):this._setEndings(this.repetitions===0,!0,c)),s>=t||s<0){const h=Math.floor(s/t);s-=t*h,o+=Math.abs(h);const f=this.repetitions-o;if(f<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,s=e>0?t:0,this.time=s,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(f===1){const p=e<0;
vendor: 9,289 bytes, line 15
15this._setEndings(p,!p,c)}else this._setEndings(!1,!1,c);this._loopCount=o,this.time=s,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:h})}}else this._loopCount=o,this.time=s;if(c&&(o&1)===1)return t-s}return s}_setEndings(e,t,i){const s=this._interpolantSettings;i?(s.endingStart=Hd,s.endingEnd=Hd):(e?s.endingStart=this.zeroSlopeAtStart?Hd:kd:s.endingStart=Xg,t?s.endingEnd=this.zeroSlopeAtEnd?Hd:kd:s.endingEnd=Xg)}_scheduleFading(e,t,i){const s=this._mixer,o=s.time;let c=this._weightInterpolant;c===null&&(c=s._lendControlInterpolant(),this._weightInterpolant=c);const h=c.parameterPositions,f=c.sampleValues;return h[0]=o,f[0]=t,h[1]=o+e,f[1]=i,this}}const h8=new Float32Array(1);class f8 extends Do{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}_bindAction(e,t){const i=e._localRoot||this._root,s=e._clip.tracks,o=s.length,c=e._propertyBindings,h=e._interpolants,f=i.uuid,p=this._bindingsByRootAndName;let x=p[f];x===void 0&&(x={},p[f]=x);for(let y=0;y!==o;++y){const v=s[y],S=v.name;let M=x[S];if(M!==void 0)++M.referenceCount,c[y]=M;else{if(M=c[y],M!==void 0){M._cacheIndex===null&&(++M.referenceCount,this._addInactiveBinding(M,f,S));continue}const R=t&&t._propertyBindings[y].binding.parsedPath;M=new nI(Pn.create(i,S,R),v.ValueTypeName,v.getValueSize()),++M.referenceCount,this._addInactiveBinding(M,f,S),c[y]=M}h[y].resultBuffer=M.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const i=(e._localRoot||this._root).uuid,s=e._clip.uuid,o=this._actionsByClip[s];this._bindAction(e,o&&o.knownActions[0]),this._addInactiveAction(e,s,i)}const t=e._propertyBindings;for(let i=0,s=t.length;i!==s;++i){const o=t[i];o.useCount++===0&&(this._lendBinding(o),o.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let i=0,s=t.length;i!==s;++i){const o=t[i];--o.useCount===0&&(o.restoreOriginalState(),this._takeBackBinding(o))}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<this._nActiveActions}_addInactiveAction(e,t,i){const s=this._actions,o=this._actionsByClip;let c=o[t];if(c===void 0)c={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,o[t]=c;else{const h=c.knownActions;e._byClipCacheIndex=h.length,h.push(e)}e._cacheIndex=s.length,s.push(e),c.actionByRoot[i]=e}_removeInactiveAction(e){const t=this._actions,i=t[t.length-1],s=e._cacheIndex;i._cacheIndex=s,t[s]=i,t.pop(),e._cacheIndex=null;const o=e._clip.uuid,c=this._actionsByClip,h=c[o],f=h.knownActions,p=f[f.length-1],x=e._byClipCacheIndex;p._byClipCacheIndex=x,f[x]=p,f.pop(),e._byClipCacheIndex=null;const y=h.actionByRoot,v=(e._localRoot||this._root).uuid;delete y[v],f.length===0&&delete c[o],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const t=e._propertyBindings;for(let i=0,s=t.length;i!==s;++i){const o=t[i];--o.referenceCount===0&&this._removeInactiveBinding(o)}}_lendAction(e){const t=this._actions,i=e._cacheIndex,s=this._nActiveActions++,o=t[s];e._cacheIndex=s,t[s]=e,o._cacheIndex=i,t[i]=o}_takeBackAction(e){const t=this._actions,i=e._cacheIndex,s=--this._nActiveActions,o=t[s];e._cacheIndex=s,t[s]=e,o._cacheIndex=i,t[i]=o}_addInactiveBinding(e,t,i){const s=this._bindingsByRootAndName,o=this._bindings;let c=s[t];c===void 0&&(c={},s[t]=c),c[i]=e,e._cacheIndex=o.length,o.push(e)}_removeInactiveBinding(e){const t=this._bindings,i=e.binding,s=i.rootNode.uuid,o=i.path,c=this._bindingsByRootAndName,h=c[s],f=t[t.length-1],p=e._cacheIndex;f._cacheIndex=p,t[p]=f,t.pop(),delete h[o],Object.keys(h).length===0&&delete c[s]}_lendBinding(e){const t=this._bindings,i=e._cacheIndex,s=this._nActiveBindings++,o=t[s];e._cacheIndex=s,t[s]=e,o._cacheIndex=i,t[i]=o}_takeBackBinding(e){const t=this._bindings,i=e._cacheIndex,s=--this._nActiveBindings,o=t[s];e._cacheIndex=s,t[s]=e,o._cacheIndex=i,t[i]=o}_lendControlInterpolant(){const e=this._controlInterpolants,t=this._nActiveControlInterpolants++;let i=e[t];return i===void 0&&(i=new rT(new Float32Array(2),new Float32Array(2),1,h8),i.__cacheIndex=t,e[t]=i),i}_takeBackControlInterpolant(e){const t=this._controlInterpolants,i=e.__cacheIndex,s=--this._nActiveControlInterpolants,o=t[s];e.__cacheIndex=s,t[s]=e,o.__cacheIndex=i,t[i]=o}clipAction(e,t,i){const s=t||this._root,o=s.uuid;let c=typeof e=="string"?n0.findByName(s,e):e;const h=c!==null?c.uuid:e,f=this._actionsByClip[h];let p=null;if(i===void 0&&(c!==null?i=c.blendMode:i=q1),f!==void 0){const y=f.actionByRoot[o];if(y!==void 0&&y.blendMode===i)return y;p=f.knownActions[0],c===null&&(c=p._clip)}if(c===null)return null;const x=new iI(this,c,t,i);return this._bindAction(x,p),this._addInactiveAction(x,h,o),x}existingAction(e,t){const i=t||this._root,s=i.uuid,o=typeof e=="string"?n0.findByName(i,e):e,c=o?o.uuid:e,h=this._actionsByClip[c];return h!==void 0&&h.actionByRoot[s]||null}stopAllAction(){const e=this._actions,t=this._nActiveActions;for(let i=t-1;i>=0;--i)e[i].stop();return this}update(e){e*=this.timeScale;const t=this._actions,i=this._nActiveActions,s=this.time+=e,o=Math.sign(e),c=this._accuIndex^=1;for(let p=0;p!==i;++p)t[p]._update(s,e,o,c);const h=this._bindings,f=this._nActiveBindings;for(let p=0;p!==f;++p)h[p].apply(c);return this}setTime(e){this.time=0;for(let t=0;t<this._actions.length;t++)this._actions[t].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){const t=this._actions,i=e.uuid,s=this._actionsByClip,o=s[i];if(o!==void 0){const c=o.knownActions;for(let h=0,f=c.length;h!==f;++h){const p=c[h];this._deactivateAction(p);const x=p._cacheIndex,y=t[t.length-1];p._cacheIndex=null,p._byClipCacheIndex=null,y._cacheIndex=x,t[x]=y,t.pop(),this._removeInactiveBindingsForAction(p)}delete s[i]}}uncacheRoot(e){const t=e.uuid,i=this._actionsByClip;for(const c in i){const h=i[c].actionByRoot,f=h[t];f!==void 0&&(this._deactivateAction(f),this._removeInactiveAction(f))}const s=this._bindingsByRootAndName,o=s[t];if(o!==void 0)for(const c in o){const h=o[c];h.restoreOriginalState(),this._removeInactiveBinding(h)}}uncacheAction(e,t){const i=this.existingAction(e,t);i!==null&&(this._deactivateAction(i),this._removeInactiveAction(i))}}class p8 extends kw{constructor(e=1,t=1,i=1,s={}){super(e,t,s),this.isRenderTarget3D=!0,this.depth=i,this.texture=new $1(null,e,t,i),this._setTextureOptions(s),this.texture.isRenderTargetTexture=!0}}class pT{constructor(e){this.value=e}clone(){return new pT(this.value.clone===void 0?this.value:this.value.clone())}}let m8=0;class g8 extends Do{constructor(){super(),this.isUniformsGroup=!0,Object.defineProperty(this,"id",{value:m8++}),this.name="",this.usage=Yg,this.uniforms=[]}add(e){return this.uniforms.push(e),this}remove(e){const t=this.uniforms.indexOf(e);return t!==-1&&this.uniforms.splice(t,1),this}setName(e){return this.name=e,this}setUsage(e){return this.usage=e,this}dispose(){this.dispatchEvent({type:"dispose"})}copy(e){this.name=e.name,this.usage=e.usage;const t=e.uniforms;this.uniforms.length=0;for(let i=0,s=t.length;i<s;i++){const o=Array.isArray(t[i])?t[i]:[t[i]];for(let c=0;c<o.length;c++)this.uniforms.push(o[c].clone())}return this}clone(){return new this.constructor().copy(this)}}class x8 extends eb{constructor(e,t,i=1){super(e,t),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=i}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const t=super.clone(e);return t.meshPerAttribute=this.meshPerAttribute,t}toJSON(e){const t=super.toJSON(e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}}class y8{constructor(e,t,i,s,o,c=!1){this.isGLBufferAttribute=!0,this.name="",this.buffer=e,this.type=t,this.itemSize=i,this.elementSize=s,this.count=o,this.normalized=c,this.version=0}set needsUpdate(e){e===!0&&this.version++}setBuffer(e){return this.buffer=e,this}setType(e,t){return this.type=e,this.elementSize=t,this}setItemSize(e){return this.itemSize=e,this}setCount(e){return this.count=e,this}}const $3=new Yt;class sI{constructor(e,t,i=0,s=1/0){this.ray=new hp(e,t),this.near=i,this.far=s,this.camera=null,this.layers=new np,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):Et("Raycaster:
15Unsupported camera type: "+t.type)}setFromXRController(e){return $3.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4($3),this}intersectObject(e,t=!0,i=[]){return wM(e,this,i,t),i.sort(Q3),i}intersectObjects(e,t=!0,i=[]){for(let s=0,o=e.length;s<o;s++)wM(e[s],this,i,t);return i.sort(Q3),i}}function Q3(n,e){return n.distance-e.distance}function wM(n,e,t,i){let s=!0;if(n.layers.test(e.layers)&&n.raycast(e,t)===!1&&(s=!1),s===!0&&i===!0){const o=n.children;for(let c=0,h=o.length;c<h;c++)wM(o[c],e,t,!0)}}class aI{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1,ct("Clock: This module has been deprecated. Please use THREE.Timer instead.")}start(){this.startTime=performance.now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=performance.now();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}class v8{constructor(e=1,t=0,i=0){this.radius=e,this.phi=t,this.theta=i}set(e,t,i){return this.radius=e,this.phi=t,this.theta=i,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=Gt(this.phi,1e-6,Math.PI-1e-6),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,i){return this.radius=Math.sqrt(e*e+t*t+i*i),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,i),this.phi=Math.acos(Gt(t/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}class b8{constructor(e=1,t=0,i=0){this.radius=e,this.theta=t,this.y=i}set(e,t,i){return this.radius=e,this.theta=t,this.y=i,this}copy(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,i){return this.radius=Math.sqrt(e*e+i*i),this.theta=Math.atan2(e,i),this.y=t,this}clone(){return new this.constructor().copy(this)}}const CT=class CT{constructor(e,t,i,s){this.elements=[1,0,0,1],e!==void 0&&this.set(e,t,i,s)}identity(){return this.set(1,0,0,1),this}fromArray(e,t=0){for(let i=0;i<4;i++)this.elements[i]=e[i+t];return this}set(e,t,i,s){const o=this.elements;return o[0]=e,o[2]=t,o[1]=i,o[3]=s,this}};CT.prototype.isMatrix2=!0;let TM=CT;const J3=new je;class _8{constructor(e=new je(1/0,1/0),t=new je(-1/0,-1/0)){this.isBox2=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromPoints(e){this.makeEmpty();for(let t=0,i=e.length;t<i;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const i=J3.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(i),this.max.copy(e).add(i),this}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(e){return this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,J3).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 eC=new Z,Xy=new Z,If=new Z,Pf=new Z,cS=new Z,S8=new Z,M8=new Z;class w8{constructor(e=new Z,t=new Z){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){eC.subVectors(e,this.start),Xy.subVectors(this.end,this.start);const i=Xy.dot(Xy);if(i===0)return 0;let o=Xy.dot(eC)/i;return t&&(o=Gt(o,0,1)),o}closestPointToPoint(e,t,i){const s=this.closestPointToPointParameter(e,t);return this.delta(i).multiplyScalar(s).add(this.start)}
15distanceSqToLine3(e,t=S8,i=M8){const s=10000000000000001e-32;let o,c;const h=this.start,f=e.start,p=this.end,x=e.end;If.subVectors(p,h),Pf.subVectors(x,f),cS.subVectors(h,f);const y=If.dot(If),v=Pf.dot(Pf),S=Pf.dot(cS);if(y<=s&&v<=s)return t.copy(h),i.copy(f),t.sub(i),t.dot(t);if(y<=s)o=0,c=S/v,c=Gt(c,0,1);else{const M=If.dot(cS);if(v<=s)c=0,o=Gt(-M/y,0,1);else{const R=If.dot(Pf),A=y*v-R*R;A!==0?o=Gt((R*S-M*v)/A,0,1):o=0,c=(R*o+S)/v,c<0?(c=0,o=Gt(-M/y,0,1)):c>1&&(c=1,o=Gt((R-M)/y,0,1))}}return t.copy(h).addScaledVector(If,o),i.copy(f).addScaledVector(Pf,c),t.distanceToSquared(i)}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 tC=new Z;class T8 extends Un{constructor(e,t){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const i=new Kt,s=[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 c=0,h=1,f=32;c<f;c++,h++){const p=c/f*Math.PI*2,x=h/f*Math.PI*2;s.push(Math.cos(p),Math.sin(p),1,Math.cos(x),Math.sin(x),1)}i.setAttribute("position",new bt(s,3));const o=new _a({fog:!1,toneMapped:!1});this.cone=new El(i,o),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),this.parent?(this.parent.updateWorldMatrix(!0),this.matrix.copy(this.parent.matrixWorld).invert().multiply(this.light.matrixWorld)):this.matrix.copy(this.light.matrixWorld),this.matrixWorld.copy(this.light.matrixWorld);const e=this.light.distance?this.light.distance:1e3,t=e*Math.tan(this.light.angle);this.cone.scale.set(t,t,e),tC.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(tC),this.color!==void 0?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}const gu=new Z,qy=new Yt,uS=new Yt;class E8 extends El{constructor(e){const t=rI(e),i=new Kt,s=[],o=[];for(let p=0;p<t.length;p++){const x=t[p];x.parent&&x.parent.isBone&&(s.push(0,0,0),s.push(0,0,0),o.push(0,0,0),o.push(0,0,0))}i.setAttribute("position",new bt(s,3)),i.setAttribute("color",new bt(o,3));const c=new _a({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});super(i,c),this.isSkeletonHelper=!0,this.type="SkeletonHelper",this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1;const h=new mt(255),f=new mt(65280);this.setColors(h,f)}updateMatrixWorld(e){const t=this.bones,i=this.geometry,s=i.getAttribute("position");uS.copy(this.root.matrixWorld).invert();for(let o=0,c=0;o<t.length;o++){const h=t[o];h.parent&&h.parent.isBone&&(qy.multiplyMatrices(uS,h.matrixWorld),gu.setFromMatrixPosition(qy),s.setXYZ(c,gu.x,gu.y,gu.z),qy.multiplyMatrices(uS,h.parent.matrixWorld),gu.setFromMatrixPosition(qy),s.setXYZ(c+1,gu.x,gu.y,gu.z),c+=2)}i.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}setColors(e,t){const s=this.geometry.getAttribute("color");for(let o=0;o<s.count;o+=2)s.setXYZ(o,e.r,e.g,e.b),s.setXYZ(o+1,t.r,t.g,t.b);return s.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}function rI(n){const e=[];n.isBone===!0&&e.push(n);for(let t=0;t<n.children.length;t++)e.push(...rI(n.children[t]));return e}class A8 extends ss{constructor(e,t,i){const s=new v0(t,4,2),o=new Uu({wireframe:!0,fog:!1,toneMapped:!1});super(s,o),this.light=e,this.color=i,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.color!==void 0?this.material.color.set(this.color):this.material.color.copy(this.light.color)}}const C8=new Z,nC=new mt,iC=new mt;class R8 extends Un{constructor(e,t,i){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,this.type="HemisphereLightHelper";const s=new y0(t);s.rotateY(Math.PI*.5),this.material=new Uu({wireframe:!0,fog:!1,toneMapped:!1}),this.color===void 0&&(this.material.vertexColors=!0);const o=s.getAttribute("position"),c=new Float32Array(o.count*3);s.setAttribute("color",new Vn(c,3)),this.add(new ss(s,this.material)),this.update()}dispose(){this.children[0].geometry.dispose(),this.children[0].material.dispose()}update(){const e=this.children[0];if(this.color!==void 0)this.material.color.set(this.color);else{const t=e.geometry.getAttribute("color");nC.copy(this.light.color),iC.copy(this.light.groundColor);for(let i=0,s=t.count;i<s;i++){const o=i<s/2?nC:iC;t.setXYZ(i,o.r,o.g,o.b)}t.needsUpdate=!0}this.light.updateWorldMatrix(!0,!1),e.lookAt(C8.setFromMatrixPosition(this.light.matrixWorld).negate())}}
vendor: 5,088 bytes, line 15
15class N8 extends El{constructor(e=10,t=10,i=4473924,s=8947848){i=new mt(i),s=new mt(s);const o=t/2,c=e/t,h=e/2,f=[],p=[];for(let v=0,S=0,M=-h;v<=t;v++,M+=c){f.push(-h,0,M,h,0,M),f.push(M,0,-h,M,0,h);const R=v===o?i:s;R.toArray(p,S),S+=3,R.toArray(p,S),S+=3,R.toArray(p,S),S+=3,R.toArray(p,S),S+=3}const x=new Kt;x.setAttribute("position",new bt(f,3)),x.setAttribute("color",new bt(p,3));const y=new _a({vertexColors:!0,toneMapped:!1});super(x,y),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}class D8 extends El{constructor(e=10,t=16,i=8,s=64,o=4473924,c=8947848){o=new mt(o),c=new mt(c);const h=[],f=[];if(t>1)for(let y=0;y<t;y++){const v=y/t*(Math.PI*2),S=Math.sin(v)*e,M=Math.cos(v)*e;h.push(0,0,0),h.push(S,0,M);const R=y&1?o:c;f.push(R.r,R.g,R.b),f.push(R.r,R.g,R.b)}for(let y=0;y<i;y++){const v=y&1?o:c,S=e-e/i*y;for(let M=0;M<s;M++){let R=M/s*(Math.PI*2),A=Math.sin(R)*S,w=Math.cos(R)*S;h.push(A,0,w),f.push(v.r,v.g,v.b),R=(M+1)/s*(Math.PI*2),A=Math.sin(R)*S,w=Math.cos(R)*S,h.push(A,0,w),f.push(v.r,v.g,v.b)}}const p=new Kt;p.setAttribute("position",new bt(h,3)),p.setAttribute("color",new bt(f,3));const x=new _a({vertexColors:!0,toneMapped:!1});super(p,x),this.type="PolarGridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}const sC=new Z,Yy=new Z,aC=new Z;class L8 extends Un{constructor(e,t,i){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,this.type="DirectionalLightHelper",t===void 0&&(t=1);let s=new Kt;s.setAttribute("position",new bt([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3));const o=new _a({fog:!1,toneMapped:!1});this.lightPlane=new Iu(s,o),this.add(this.lightPlane),s=new Kt,s.setAttribute("position",new bt([0,0,0,0,0,1],3)),this.targetLine=new Iu(s,o),this.add(this.targetLine),this.update()}dispose(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),sC.setFromMatrixPosition(this.light.matrixWorld),Yy.setFromMatrixPosition(this.light.target.matrixWorld),aC.subVectors(Yy,sC),this.lightPlane.lookAt(Yy),this.color!==void 0?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(Yy),this.targetLine.scale.z=aC.length()}}const Zy=new Z,Bi=new xb;class I8 extends El{constructor(e){const t=new Kt,i=new _a({color:16777215,vertexColors:!0,toneMapped:!1}),s=[],o=[],c={};h("n1","n2"),h("n2","n4"),h("n4","n3"),h("n3","n1"),h("f1","f2"),h("f2","f4"),h("f4","f3"),h("f3","f1"),h("n1","f1"),h("n2","f2"),h("n3","f3"),h("n4","f4"),h("p","n1"),h("p","n2"),h("p","n3"),h("p","n4"),h("u1","u2"),h("u2","u3"),h("u3","u1"),h("c","t"),h("p","c"),h("cn1","cn2"),h("cn3","cn4"),h("cf1","cf2"),h("cf3","cf4");function h(M,R){f(M),f(R)}function f(M){s.push(0,0,0),o.push(0,0,0),c[M]===void 0&&(c[M]=[]),c[M].push(s.length/3-1)}t.setAttribute("position",new bt(s,3)),t.setAttribute("color",new bt(o,3)),super(t,i),this.type="CameraHelper",this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=c,this.update();const p=new mt(16755200),x=new mt(16711680),y=new mt(43775),v=new mt(16777215),S=new mt(3355443);this.setColors(p,x,y,v,S)}setColors(e,t,i,s,o){const h=this.geometry.getAttribute("color");return h.setXYZ(0,e.r,e.g,e.b),h.setXYZ(1,e.r,e.g,e.b),h.setXYZ(2,e.r,e.g,e.b),h.setXYZ(3,e.r,e.g,e.b),h.setXYZ(4,e.r,e.g,e.b),h.setXYZ(5,e.r,e.g,e.b),h.setXYZ(6,e.r,e.g,e.b),h.setXYZ(7,e.r,e.g,e.b),h.setXYZ(8,e.r,e.g,e.b),h.setXYZ(9,e.r,e.g,e.b),h.setXYZ(10,e.r,e.g,e.b),h.setXYZ(11,e.r,e.g,e.b),h.setXYZ(12,e.r,e.g,e.b),h.setXYZ(13,e.r,e.g,e.b),h.setXYZ(14,e.r,e.g,e.b),h.setXYZ(15,e.r,e.g,e.b),h.setXYZ(16,e.r,e.g,e.b),h.setXYZ(17,e.r,e.g,e.b),h.setXYZ(18,e.r,e.g,e.b),h.setXYZ(19,e.r,e.g,e.b),h.setXYZ(20,e.r,e.g,e.b),h.setXYZ(21,e.r,e.g,e.b),h.setXYZ(22,e.r,e.g,e.b),h.setXYZ(23,e.r,e.g,e.b),h.setXYZ(24,t.r,t.g,t.b),h.setXYZ(25,t.r,t.g,t.b),h.setXYZ(26,t.r,t.g,t.b),h.setXYZ(27,t.r,t.g,t.b),h.setXYZ(28,t.r,t.g,t.b),h.setXYZ(29,t.r,t.g,t.b),h.setXYZ(30,t.r,t.g,t.b),h.setXYZ(31,t.r,t.g,t.b),h.setXYZ(32,i.r,i.g,i.b),h.setXYZ(33,i.r,i.g,i.b),h.setXYZ(34,i.r,i.g,i.b),h.setXYZ(35,i.r,i.g,i.b),h.setXYZ(36,i.r,i.g,i.b),h.setXYZ(37,i.r,i.g,i.b),h.setXYZ(38,s.r,s.g,s.b),h.setXYZ(39,s.r,s.g,s.b),h.setXYZ(40,o.r,o.g,o.b),h.setXYZ(41,o.r,o.g,o.b),h.setXYZ(42,o.r,o.g,o.b),h.setXYZ(43,o.r,o.g,o.b),h.setXYZ(44,o.r,o.g,o.b),h.setXYZ(45,o.r,o.g,o.b),h.setXYZ(46,o.r,o.g,o.b),h.setXYZ(47,o.r,o.g,o.b),h.setXYZ(48,o.r,o.g,o.b),h.setXYZ(49,o.r,o.g,o.b),h.needsUpdate=!0,this}update(){const e=this.geometry,t=this.pointMap,i=1,s=1;let o,c;if(Bi.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),this.camera.reversedDepth===!0)o=1,c=0;else if(this.camera.coordinateSystem===lr)o=-1,c=1;else if(this.camera.coordinateSystem===$d)o=0,c=1;
15else throw new Error("THREE.CameraHelper.update(): Invalid coordinate system: "+this.camera.coordinateSystem);Xi("c",t,e,Bi,0,0,o),Xi("t",t,e,Bi,0,0,c),Xi("n1",t,e,Bi,-i,-s,o),Xi("n2",t,e,Bi,i,-s,o),Xi("n3",t,e,Bi,-i,s,o),Xi("n4",t,e,Bi,i,s,o),Xi("f1",t,e,Bi,-i,-s,c),Xi("f2",t,e,Bi,i,-s,c),Xi("f3",t,e,Bi,-i,s,c),Xi("f4",t,e,Bi,i,s,c),Xi("u1",t,e,Bi,i*.7,s*1.1,o),Xi("u2",t,e,Bi,-i*.7,s*1.1,o),Xi("u3",t,e,Bi,0,s*2,o),Xi("cf1",t,e,Bi,-i,0,c),Xi("cf2",t,e,Bi,i,0,c),Xi("cf3",t,e,Bi,0,-s,c),Xi("cf4",t,e,Bi,0,s,c),Xi("cn1",t,e,Bi,-i,0,o),Xi("cn2",t,e,Bi,i,0,o),Xi("cn3",t,e,Bi,0,-s,o),Xi("cn4",t,e,Bi,0,s,o),e.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}}function Xi(n,e,t,i,s,o,c){Zy.set(s,o,c).unproject(i);const h=e[n];if(h!==void 0){const f=t.getAttribute("position");for(let p=0,x=h.length;p<x;p++)f.setXYZ(h[p],Zy.x,Zy.y,Zy.z)}}const Ky=new Js;class P8 extends El{constructor(e,t=16776960){const i=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),s=new Float32Array(24),o=new Kt;o.setIndex(new Vn(i,1)),o.setAttribute("position",new Vn(s,3)),super(o,new _a({color:t,toneMapped:!1})),this.object=e,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(){if(this.object!==void 0&&Ky.setFromObject(this.object),Ky.isEmpty())return;const e=Ky.min,t=Ky.max,i=this.geometry.attributes.position,s=i.array;s[0]=t.x,s[1]=t.y,s[2]=t.z,s[3]=e.x,s[4]=t.y,s[5]=t.z,s[6]=e.x,s[7]=e.y,s[8]=t.z,s[9]=t.x,s[10]=e.y,s[11]=t.z,s[12]=t.x,s[13]=t.y,s[14]=e.z,s[15]=e.x,s[16]=t.y,s[17]=e.z,s[18]=e.x,s[19]=e.y,s[20]=e.z,s[21]=t.x,s[22]=e.y,s[23]=e.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(e){return this.object=e,this.update(),this}copy(e,t){return super.copy(e,t),this.object=e.object,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class U8 extends El{constructor(e,t=16776960){const i=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),s=[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],o=new Kt;o.setIndex(new Vn(i,1)),o.setAttribute("position",new bt(s,3)),super(o,new _a({color:t,toneMapped:!1})),this.box=e,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(e){const t=this.box;t.isEmpty()||(t.getCenter(this.position),t.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(e))}dispose(){this.geometry.dispose(),this.material.dispose()}}class O8 extends Iu{constructor(e,t=1,i=16776960){const s=i,o=[1,-1,0,-1,1,0,-1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],c=new Kt;c.setAttribute("position",new bt(o,3)),c.computeBoundingSphere(),super(c,new _a({color:s,toneMapped:!1})),this.type="PlaneHelper",this.plane=e,this.size=t;const h=[1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],f=new Kt;f.setAttribute("position",new bt(h,3)),f.computeBoundingSphere(),this.add(new ss(f,new Uu({color:s,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}updateMatrixWorld(e){this.position.set(0,0,0),this.scale.set(.5*this.size,.5*this.size,1),this.lookAt(this.plane.normal),this.translateZ(-this.plane.constant),super.updateMatrixWorld(e)}dispose(){this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()}}const rC=new Z;let $y,dS;class z8 extends Un{constructor(e=new Z(0,0,1),t=new Z(0,0,0),i=1,s=16776960,o=i*.2,c=o*.2){super(),this.type="ArrowHelper",$y===void 0&&($y=new Kt,$y.setAttribute("position",new bt([0,0,0,0,1,0],3)),dS=new x0(.5,1,5,1),dS.translate(0,-.5,0)),this.position.copy(t),this.line=new Iu($y,new _a({color:s,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new ss(dS,new Uu({color:s,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(i,o,c)}setDirection(e){if(e.y>.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{rC.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(rC,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
15),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 B8 extends El{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],s=new Kt;s.setAttribute("position",new bt(t,3)),s.setAttribute("color",new bt(i,3));const o=new _a({vertexColors:!0,toneMapped:!1});super(s,o),this.type="AxesHelper"}setColors(e,t,i){const s=new mt,o=this.geometry.attributes.color.array;return s.set(e),s.toArray(o,0),s.toArray(o,3),s.set(t),s.toArray(o,6),s.toArray(o,9),s.set(i),s.toArray(o,12),s.toArray(o,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class V8{constructor(){this.type="ShapePath",this.color=new mt,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new b1,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,s){return this.currentPath.quadraticCurveTo(e,t,i,s),this}bezierCurveTo(e,t,i,s,o,c){return this.currentPath.bezierCurveTo(e,t,i,s,o,c),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(w){const N=[];for(let L=0,I=w.length;L<I;L++){const B=w[L],O=new Zd;O.curves=B.curves,N.push(O)}return N}function i(w,N){const L=N.length;let I=!1;for(let B=L-1,O=0;O<L;B=O++){let F=N[B],P=N[O],V=P.x-F.x,j=P.y-F.y;if(Math.abs(j)>Number.EPSILON){if(j<0&&(F=N[O],V=-V,P=N[B],j=-j),w.y<F.y||w.y>P.y)continue;if(w.y===F.y){if(w.x===F.x)return!0}else{const W=j*(w.x-F.x)-V*(w.y-F.y);if(W===0)return!0;if(W<0)continue;I=!I}}else{if(w.y!==F.y)continue;if(P.x<=w.x&&w.x<=F.x||F.x<=w.x&&w.x<=P.x)return!0}}return I}const s=To.isClockWise,o=this.subPaths;if(o.length===0)return[];let c,h,f;const p=[];if(o.length===1)return h=o[0],f=new Zd,f.curves=h.curves,p.push(f),p;let x=!s(o[0].getPoints());x=e?!x:x;const y=[],v=[];let S=[],M=0,R;v[M]=void 0,S[M]=[];for(let w=0,N=o.length;w<N;w++)h=o[w],R=h.getPoints(),c=s(R),c=e?!c:c,c?(!x&&v[M]&&M++,v[M]={s:new Zd,p:R},v[M].s.curves=h.curves,x&&M++,S[M]=[]):S[M].push({h,p:R[0]});if(!v[0])return t(o);if(v.length>1){let w=!1,N=0;for(let L=0,I=v.length;L<I;L++)y[L]=[];for(let L=0,I=v.length;L<I;L++){const B=S[L];for(let O=0;O<B.length;O++){const F=B[O];let P=!0;for(let V=0;V<v.length;V++)i(F.p,v[V].p)&&(L!==V&&N++,P?(P=!1,y[V].push(F)):w=!0);P&&y[L].push(F)}}N>0&&w===!1&&(S=y)}let A;for(let w=0,N=v.length;w<N;w++){f=v[w].s,p.push(f),A=S[w];for(let L=0,I=A.length;L<I;L++)f.holes.push(A[L].h)}return p}}class F8 extends Do{constructor(e,t=null){super(),this.object=e,this.domElement=t,this.enabled=!0,this.state=-1,this.keys={},this.mouseButtons={LEFT:null,MIDDLE:null,RIGHT:null},this.touches={ONE:null,TWO:null}}connect(e){if(e===void 0){ct("Controls: connect() now requires an element.");return}this.domElement!==null&&this.disconnect(),this.domElement=e}disconnect(){}dispose(){}update(){}}function k8(n,e){const t=n.image&&n.image.width?n.image.width/n.image.height:1;return t>e?(n.repeat.x=1,n.repeat.y=t/e,n.offset.x=0,n.offset.y=(1-n.repeat.y)/2):(n.repeat.x=e/t,n.repeat.y=1,n.offset.x=(1-n.repeat.x)/2,n.offset.y=0),n}function H8(n,e){const t=n.image&&n.image.width?n.image.width/n.image.height:1;return t>e?(n.repeat.x=e/t,n.repeat.y=1,n.offset.x=(1-n.repeat.x)/2,n.offset.y=0):(n.repeat.x=1,n.repeat.y=t/e,n.offset.x=0,n.offset.y=(1-n.repeat.y)/2),n}function G8(n){return n.repeat.x=1,n.repeat.y=1,n.offset.x=0,n.offset.y=0,n}function EM(n,e,t,i){const s=j8(i);switch(t){case zw:return n*e;case j1:return n*e/s.components*s.byteLength;case p0:return n*e/s.components*s.byteLength;case Du:return n*e*2/s.components*s.byteLength;case W1:return n*e*2/s.components*s.byteLength;case Bw:return n*e*3/s.components*s.byteLength;case Qs:return n*e*4/s.components*s.byteLength;case X1:return n*e*4/s.components*s.byteLength;case Tg:case Eg:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*8;case Ag:case Cg:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case Fv:case Hv:return Math.max(n,16)*Math.max(e,8)/4;case Vv:case kv:return Math.max(n,8)*Math.max(e,8)/2;case Gv:case jv:case Xv:case qv:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*8;case Wv:case Gg:case Yv:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case Zv:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case Kv:return Math.floor((n+4)/5)*Math.floor((e+3)/4)*16;case $v:return Math.floor((n+4)/5)*Math.floor((e+4)/5)*16;case Qv:return Math.floor((n+5)/6)*Math.floor((e+4)/5)*16;case Jv:return Math.floor((n+5)/6)*Math.floor((e+5)/6)*16;case e1:return Math.floor((n+7)/8)*Math.floor((e+4)/5)*16;case t1:return Math.floor((n+7)/8)*Math.floor((e+5)/6)*16;case n1:return Math.floor((n+7)/8)*Math.floor((e+7)/8)*16;case i1:return Math.floor((n+9)/10)*Math.floor((e+4)/5)*16;case s1:return Math.floor((n+9)/10)*Math.floor((e+5)/6)*16;case a1:return Math.floor((n+9)/10)*Math.floor((e+7)/8)*16;case r1:return Math.floor((n+9)/10)*Math.floor((e+9)/10)*16;case o1:return Math.floor((n+11)/12)*Math.floor((e+9)/10)*16;case l1:return Math.floor((n+11)/12)*Math.floor((e+11)/12)*16;case c1:case u1:case d1:return Math.ceil(n/4)*Math.ceil(e/4)*16;case h1:case f1:return Math.ceil(n/4)*Math.ceil(e/4)*8;case jg:case p1:return Math.ceil(n/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${t} format.`)}function j8(n){switch(n){case pa:case Iw:return{byteLength:1,components:1};case Qf:case Pw:case Ml:return{byteLength:2,components:1};case H1:case G1:return{byteLength:2,components:4};case Xr:case k1:case ya:return{byteLength:4,components:1};case Uw:case Ow:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${n}.`)}class W8{static contain(e,t){return k8(e,t)}static cover(e,t){return H8(e,t)}static fill(e){return G8(e)}static getByteLength(e,t,i,s){return EM(e,t,i,s)}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:B1}}));typeof window<"u"&&(window.__THREE__?ct("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=B1);function oI(){let n=null,e=!1,t=null,i=null;function s(o,c){t(o,c),i=n.requestAnimationFrame(s)}return{start:function(){e!==!0&&t!==null&&n!==null&&(i=n.requestAnimationFrame(s),e=!0)},stop:function(){n!==null&&n.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(o){t=o},setContext:function(o){n=o}}}function X8(n){const e=new WeakMap;function t(h,f){const p=h.array,x=h.usage,y=p.byteLength,v=n.createBuffer();n.bindBuffer(f,v),n.bufferData(f,p,x),h.onUploadCallback();let S;if(p instanceof Float32Array)S=n.FLOAT;else if(typeof Float16Array<"u"&&p instanceof Float16Array)S=n.HALF_FLOAT;else if(p instanceof Uint16Array)h.isFloat16BufferAttribute?S=n.HALF_FLOAT:S=n.UNSIGNED_SHORT;else if(p instanceof Int16Array)S=n.SHORT;else if(p instanceof Uint32Array)S=n.UNSIGNED_INT;else if(p instanceof Int32Array)S=n.INT;else if(p instanceof Int8Array)S=n.BYTE;else if(p instanceof Uint8Array)S=n.UNSIGNED_BYTE;else if(p instanceof Uint8ClampedArray)S=n.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+p);return{buffer:v,type:S,bytesPerElement:p.BYTES_PER_ELEMENT,version:h.version,size:y}}function i(h,f,p){const x=f.array,y=f.updateRanges;if(n.bindBuffer(p,h),y.length===0)n.bufferSubData(p,0,x);else{y.sort((S,M)=>S.start-M.start);let v=0;for(let S=1;S<y.length;S++){const M=y[v],R=y[S];
vendor: 5,158 bytes, lines 15-128
15R.start<=M.start+M.count+1?M.count=Math.max(M.count,R.start+R.count-M.start):(++v,y[v]=R)}y.length=v+1;for(let S=0,M=y.length;S<M;S++){const R=y[S];n.bufferSubData(p,R.start*x.BYTES_PER_ELEMENT,x,R.start,R.count)}f.clearUpdateRanges()}f.onUploadCallback()}function s(h){return h.isInterleavedBufferAttribute&&(h=h.data),e.get(h)}function o(h){h.isInterleavedBufferAttribute&&(h=h.data);const f=e.get(h);f&&(n.deleteBuffer(f.buffer),e.delete(h))}function c(h,f){if(h.isInterleavedBufferAttribute&&(h=h.data),h.isGLBufferAttribute){const x=e.get(h);(!x||x.version<h.version)&&e.set(h,{buffer:h.buffer,type:h.type,bytesPerElement:h.elementSize,version:h.version});return}const p=e.get(h);if(p===void 0)e.set(h,t(h,f));else if(p.version<h.version){if(p.size!==h.array.byteLength)throw new Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.");i(p.buffer,h,f),p.version=h.version}}return{get:s,remove:o,update:c}}var q8=`#ifdef USE_ALPHAHASH 16 if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard; 17#endif`,Y8=`#ifdef USE_ALPHAHASH 18 const float ALPHA_HASH_SCALE = 0.05; 19 float hash2D( vec2 value ) { 20 return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) ); 21 } 22 float hash3D( vec3 value ) { 23 return hash2D( vec2( hash2D( value.xy ), value.z ) ); 24 } 25 float getAlphaHashThreshold( vec3 position ) { 26 float maxDeriv = max( 27 length( dFdx( position.xyz ) ), 28 length( dFdy( position.xyz ) ) 29 ); 30 float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv ); 31 vec2 pixScales = vec2( 32 exp2( floor( log2( pixScale ) ) ), 33 exp2( ceil( log2( pixScale ) ) ) 34 ); 35 vec2 alpha = vec2( 36 hash3D( floor( pixScales.x * position.xyz ) ), 37 hash3D( floor( pixScales.y * position.xyz ) ) 38 ); 39 float lerpFactor = fract( log2( pixScale ) ); 40 float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y; 41 float a = min( lerpFactor, 1.0 - lerpFactor ); 42 vec3 cases = vec3( 43 x * x / ( 2.0 * a * ( 1.0 - a ) ), 44 ( x - 0.5 * a ) / ( 1.0 - a ), 45 1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) ) 46 ); 47 float threshold = ( x < ( 1.0 - a ) ) 48 ? ( ( x < a ) ? cases.x : cases.y ) 49 : cases.z; 50 return clamp( threshold , 1.0e-6, 1.0 ); 51 } 52#endif`,Z8=`#ifdef USE_ALPHAMAP 53 diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g; 54#endif`,K8=`#ifdef USE_ALPHAMAP 55 uniform sampler2D alphaMap; 56#endif`,$8=`#ifdef USE_ALPHATEST 57 #ifdef ALPHA_TO_COVERAGE 58 diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a ); 59 if ( diffuseColor.a == 0.0 ) discard; 60 #else 61 if ( diffuseColor.a < alphaTest ) discard; 62 #endif 63#endif`,Q8=`#ifdef USE_ALPHATEST 64 uniform float alphaTest; 65#endif`,J8=`#ifdef USE_AOMAP 66 float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0; 67 reflectedLight.indirectDiffuse *= ambientOcclusion; 68 #if defined( USE_CLEARCOAT ) 69 clearcoatSpecularIndirect *= ambientOcclusion; 70 #endif 71 #if defined( USE_SHEEN ) 72 sheenSpecularIndirect *= ambientOcclusion; 73 #endif 74 #if defined( USE_ENVMAP ) && defined( STANDARD ) 75 float dotNV = saturate( dot( geometryNormal, geometryViewDir ) ); 76 reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness ); 77 #endif 78#endif`,eH=`#ifdef USE_AOMAP 79 uniform sampler2D aoMap; 80 uniform float aoMapIntensity; 81#endif`,tH=`#ifdef USE_BATCHING 82 #if ! defined( GL_ANGLE_multi_draw ) 83 #define gl_DrawID _gl_DrawID 84 uniform int _gl_DrawID; 85 #endif 86 uniform highp sampler2D batchingTexture; 87 uniform highp usampler2D batchingIdTexture; 88 mat4 getBatchingMatrix( const in float i ) { 89 int size = textureSize( batchingTexture, 0 ).x; 90 int j = int( i ) * 4; 91 int x = j % size; 92 int y = j / size; 93 vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 ); 94 vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 ); 95 vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 ); 96 vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 ); 97 return mat4( v1, v2, v3, v4 ); 98 } 99 float getIndirectIndex( const in int i ) { 100 int size = textureSize( batchingIdTexture, 0 ).x; 101 int x = i % size; 102 int y = i / size; 103 return float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r ); 104 } 105#endif 106#ifdef USE_BATCHING_COLOR 107 uniform sampler2D batchingColorTexture; 108 vec4 getBatchingColor( const in float i ) { 109 int size = textureSize( batchingColorTexture, 0 ).x; 110 int j = int( i ); 111 int x = j % size; 112 int y = j / size; 113 return texelFetch( batchingColorTexture, ivec2( x, y ), 0 ); 114 } 115#endif`,nH=`#ifdef USE_BATCHING 116 mat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) ); 117#endif`,iH=`vec3 transformed = vec3( position ); 118#ifdef USE_ALPHAHASH 119 vPosition = vec3( position ); 120#endif`,sH=`vec3 objectNormal = vec3( normal ); 121#ifdef USE_TANGENT 122 vec3 objectTangent = vec3( tangent.xyz ); 123#endif`,aH=`float G_BlinnPhong_Implicit( ) { 124 return 0.25; 125} 126float D_BlinnPhong( const in float shininess, const in float dotNH ) { 127 return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess ); 128}
129vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) { 130 vec3 halfDir = normalize( lightDir + viewDir ); 131 float dotNH = saturate( dot( normal, halfDir ) ); 132 float dotVH = saturate( dot( viewDir, halfDir ) ); 133 vec3 F = F_Schlick( specularColor, 1.0, dotVH ); 134 float G = G_BlinnPhong_Implicit( ); 135 float D = D_BlinnPhong( shininess, dotNH ); 136 return F * ( G * D ); 137} // validated`,rH=`#ifdef USE_IRIDESCENCE 138 const mat3 XYZ_TO_REC709 = mat3( 139 3.2404542, -0.9692660, 0.0556434, 140 -1.5371385, 1.8760108, -0.2040259, 141 -0.4985314, 0.0415560, 1.0572252 142 ); 143 vec3 Fresnel0ToIor( vec3 fresnel0 ) { 144 vec3 sqrtF0 = sqrt( fresnel0 ); 145 return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 ); 146 } 147 vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) { 148 return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) ); 149 } 150 float IorToFresnel0( float transmittedIor, float incidentIor ) { 151 return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor )); 152 } 153 vec3 evalSensitivity( float OPD, vec3 shift ) { 154 float phase = 2.0 * PI * OPD * 1.0e-9; 155 vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 ); 156 vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 ); 157 vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 ); 158 vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var ); 159 xyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) ); 160 xyz /= 1.0685e-7; 161 vec3 rgb = XYZ_TO_REC709 * xyz; 162 return rgb; 163 } 164 vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) { 165 vec3 I; 166 float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) ); 167 float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) ); 168 float cosTheta2Sq = 1.0 - sinTheta2Sq; 169 if ( cosTheta2Sq < 0.0 ) { 170 return vec3( 1.0 ); 171 } 172 float cosTheta2 = sqrt( cosTheta2Sq ); 173 float R0 = IorToFresnel0( iridescenceIOR, outsideIOR ); 174 float R12 = F_Schlick( R0, 1.0, cosTheta1 );
175 float T121 = 1.0 - R12; 176 float phi12 = 0.0; 177 if ( iridescenceIOR < outsideIOR ) phi12 = PI; 178 float phi21 = PI - phi12; 179 vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR ); 180 vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 ); 181 vec3 phi23 = vec3( 0.0 ); 182 if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI; 183 if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI; 184 if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI; 185 float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2; 186 vec3 phi = vec3( phi21 ) + phi23; 187 vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 ); 188 vec3 r123 = sqrt( R123 ); 189 vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 ); 190 vec3 C0 = R12 + Rs; 191 I = C0; 192 vec3 Cm = Rs - T121; 193 for ( int m = 1; m <= 2; ++ m ) { 194 Cm *= r123; 195 vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi ); 196 I += Cm * Sm; 197 } 198 return max( I, vec3( 0.0 ) ); 199 } 200#endif`,oH=`#ifdef USE_BUMPMAP 201 uniform sampler2D bumpMap; 202 uniform float bumpScale; 203 vec2 dHdxy_fwd() { 204 vec2 dSTdx = dFdx( vBumpMapUv ); 205 vec2 dSTdy = dFdy( vBumpMapUv ); 206 float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x; 207 float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll; 208 float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll; 209 return vec2( dBx, dBy ); 210 } 211 vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) { 212 vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) ); 213 vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) ); 214 vec3 vN = surf_norm; 215 vec3 R1 = cross( vSigmaY, vN ); 216 vec3 R2 = cross( vN, vSigmaX ); 217 float fDet = dot( vSigmaX, R1 ) * faceDirection; 218 vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 ); 219 return normalize( abs( fDet ) * surf_norm - vGrad ); 220 } 221#endif`,lH=`#if NUM_CLIPPING_PLANES > 0 222 vec4 plane; 223 #ifdef ALPHA_TO_COVERAGE 224 float distanceToPlane, distanceGradient; 225 float clipOpacity = 1.0; 226 #pragma unroll_loop_start 227 for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { 228 plane = clippingPlanes[ i ]; 229 distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; 230 distanceGradient = fwidth( distanceToPlane ) / 2.0; 231 clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); 232 if ( clipOpacity == 0.0 ) discard; 233 } 234 #pragma unroll_loop_end 235 #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES 236 float unionClipOpacity = 1.0; 237 #pragma unroll_loop_start 238 for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { 239 plane = clippingPlanes[ i ]; 240 distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; 241 distanceGradient = fwidth( distanceToPlane ) / 2.0; 242 unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); 243 } 244 #pragma unroll_loop_end 245 clipOpacity *= 1.0 - unionClipOpacity; 246 #endif 247 diffuseColor.a *= clipOpacity; 248 if ( diffuseColor.a == 0.0 ) discard; 249 #else 250 #pragma unroll_loop_start 251 for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { 252 plane = clippingPlanes[ i ]; 253 if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; 254 } 255 #pragma unroll_loop_end 256 #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES 257 bool clipped = true; 258 #pragma unroll_loop_start 259 for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { 260 plane = clippingPlanes[ i ]; 261 clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; 262 } 263 #pragma unroll_loop_end 264 if ( clipped ) discard; 265 #endif 266 #endif 267#endif`,cH=`#if NUM_CLIPPING_PLANES > 0 268 varying vec3 vClipPosition; 269 uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; 270#endif`,uH=`#if NUM_CLIPPING_PLANES > 0 271 varying vec3 vClipPosition; 272#endif`,dH=`#if NUM_CLIPPING_PLANES > 0 273 vClipPosition = - mvPosition.xyz; 274#endif`,hH=`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) 275 diffuseColor *= vColor; 276#endif`,fH=`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) 277 varying vec4 vColor; 278#endif`,pH=`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) 279 varying vec4 vColor; 280#endif`,mH=`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) 281 vColor = vec4( 1.0 ); 282#endif 283#ifdef USE_COLOR_ALPHA 284 vColor *= color; 285#elif defined( USE_COLOR ) 286 vColor.rgb *= color; 287#endif 288#ifdef USE_INSTANCING_COLOR 289 vColor.rgb *= instanceColor.rgb; 290#endif 291#ifdef USE_BATCHING_COLOR 292 vColor *= getBatchingColor( getIndirectIndex( gl_DrawID ) ); 293#endif`,gH=`#define PI 3.141592653589793 294#define PI2 6.283185307179586 295#define PI_HALF 1.5707963267948966 296#define RECIPROCAL_PI 0.3183098861837907 297#define RECIPROCAL_PI2 0.15915494309189535 298#define EPSILON 1e-6 299#ifndef saturate 300#define saturate( a ) clamp( a, 0.0, 1.0 ) 301#endif 302#define whiteComplement( a ) ( 1.0 - saturate( a ) ) 303float pow2( const in float x ) { return x*x; } 304vec3 pow2( const in vec3 x ) { return x*x; } 305float pow3( const in float x ) { return x*x*x; } 306float pow4( const in float x ) { float x2 = x*x; return x2*x2; } 307float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } 308float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } 309highp float rand( const in vec2 uv ) { 310 const highp float a = 12.9898, b = 78.233, c = 43758.5453; 311 highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); 312 return fract( sin( sn ) * c ); 313} 314#ifdef HIGH_PRECISION 315 float precisionSafeLength( vec3 v ) { return length( v ); } 316#else 317 float precisionSafeLength( vec3 v ) { 318 float maxComponent = max3( abs( v ) ); 319 return length( v / maxComponent ) * maxComponent; 320 } 321#endif 322struct IncidentLight { 323 vec3 color; 324 vec3 direction; 325 bool visible; 326}; 327struct ReflectedLight { 328 vec3 directDiffuse; 329 vec3 directSpecular; 330 vec3 indirectDiffuse; 331 vec3 indirectSpecular; 332}; 333#ifdef USE_ALPHAHASH 334 varying vec3 vPosition; 335#endif 336vec3 transformDirection( in vec3 dir, in mat4 matrix ) { 337 return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); 338} 339vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { 340 return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); 341} 342bool isPerspectiveMatrix( mat4 m ) { 343 return m[ 2 ][ 3 ] == - 1.0; 344} 345vec2 equirectUv( in vec3 dir ) { 346 float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; 347 float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; 348 return vec2( u, v ); 349}
350vec3 BRDF_Lambert( const in vec3 diffuseColor ) { 351 return RECIPROCAL_PI * diffuseColor; 352} 353vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { 354 float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); 355 return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); 356} 357float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { 358 float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); 359 return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); 360} // validated`,xH=`#ifdef ENVMAP_TYPE_CUBE_UV 361 #define cubeUV_minMipLevel 4.0 362 #define cubeUV_minTileSize 16.0 363 float getFace( vec3 direction ) { 364 vec3 absDirection = abs( direction ); 365 float face = - 1.0; 366 if ( absDirection.x > absDirection.z ) { 367 if ( absDirection.x > absDirection.y ) 368 face = direction.x > 0.0 ? 0.0 : 3.0; 369 else 370 face = direction.y > 0.0 ? 1.0 : 4.0; 371 } else { 372 if ( absDirection.z > absDirection.y ) 373 face = direction.z > 0.0 ? 2.0 : 5.0; 374 else 375 face = direction.y > 0.0 ? 1.0 : 4.0; 376 } 377 return face; 378 } 379 vec2 getUV( vec3 direction, float face ) { 380 vec2 uv; 381 if ( face == 0.0 ) { 382 uv = vec2( direction.z, direction.y ) / abs( direction.x ); 383 } else if ( face == 1.0 ) { 384 uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); 385 } else if ( face == 2.0 ) { 386 uv = vec2( - direction.x, direction.y ) / abs( direction.z ); 387 } else if ( face == 3.0 ) { 388 uv = vec2( - direction.z, direction.y ) / abs( direction.x ); 389 } else if ( face == 4.0 ) { 390 uv = vec2( - direction.x, direction.z ) / abs( direction.y ); 391 } else { 392 uv = vec2( direction.x, direction.y ) / abs( direction.z ); 393 } 394 return 0.5 * ( uv + 1.0 ); 395 } 396 vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { 397 float face = getFace( direction ); 398 float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); 399 mipInt = max( mipInt, cubeUV_minMipLevel ); 400 float faceSize = exp2( mipInt ); 401 highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; 402 if ( face > 2.0 ) { 403 uv.y += faceSize; 404 face -= 3.0; 405 } 406 uv.x += face * faceSize; 407 uv.x += filterInt * 3.0 * cubeUV_minTileSize; 408 uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); 409 uv.x *= CUBEUV_TEXEL_WIDTH; 410 uv.y *= CUBEUV_TEXEL_HEIGHT; 411 #ifdef texture2DGradEXT 412 return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; 413 #else 414 return texture2D( envMap, uv ).rgb; 415 #endif 416 } 417 #define cubeUV_r0 1.0 418 #define cubeUV_m0 - 2.0 419 #define cubeUV_r1 0.8 420 #define cubeUV_m1 - 1.0 421 #define cubeUV_r4 0.4 422 #define cubeUV_m4 2.0 423 #define cubeUV_r5 0.305 424 #define cubeUV_m5 3.0 425 #define cubeUV_r6 0.21 426 #define cubeUV_m6 4.0 427 float roughnessToMip( float roughness ) { 428 float mip = 0.0; 429 if ( roughness >= cubeUV_r1 ) { 430 mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; 431 } else if ( roughness >= cubeUV_r4 ) { 432 mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; 433 } else if ( roughness >= cubeUV_r5 ) { 434 mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; 435 } else if ( roughness >= cubeUV_r6 ) { 436 mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; 437 } else { 438 mip = - 2.0 * log2( 1.16 * roughness ); } 439 return mip; 440 } 441 vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { 442 float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); 443 float mipF = fract( mip ); 444 float mipInt = floor( mip ); 445 vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); 446 if ( mipF == 0.0 ) { 447 return vec4( color0, 1.0 ); 448 } else { 449 vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); 450 return vec4( mix( color0, color1, mipF ), 1.0 ); 451 } 452 } 453#endif`,yH=`vec3 transformedNormal = objectNormal; 454#ifdef USE_TANGENT 455 vec3 transformedTangent = objectTangent; 456#endif 457#ifdef USE_BATCHING 458 mat3 bm = mat3( batchingMatrix ); 459 transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) ); 460 transformedNormal = bm * transformedNormal; 461 #ifdef USE_TANGENT 462 transformedTangent = bm * transformedTangent; 463 #endif 464#endif 465#ifdef USE_INSTANCING 466 mat3 im = mat3( instanceMatrix ); 467 transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) ); 468 transformedNormal = im * transformedNormal; 469 #ifdef USE_TANGENT 470 transformedTangent = im * transformedTangent; 471 #endif 472#endif 473transformedNormal = normalMatrix * transformedNormal; 474#ifdef FLIP_SIDED 475 transformedNormal = - transformedNormal; 476#endif 477#ifdef USE_TANGENT 478 transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz; 479 #ifdef FLIP_SIDED 480 transformedTangent = - transformedTangent; 481 #endif 482#endif`,vH=`#ifdef USE_DISPLACEMENTMAP 483 uniform sampler2D displacementMap; 484 uniform float displacementScale; 485 uniform float displacementBias; 486#endif`,bH=`#ifdef USE_DISPLACEMENTMAP 487 transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + dis
487placementBias ); 488#endif`,_H=`#ifdef USE_EMISSIVEMAP 489 vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); 490 #ifdef DECODE_VIDEO_TEXTURE_EMISSIVE 491 emissiveColor = sRGBTransferEOTF( emissiveColor ); 492 #endif 493 totalEmissiveRadiance *= emissiveColor.rgb; 494#endif`,SH=`#ifdef USE_EMISSIVEMAP 495 uniform sampler2D emissiveMap; 496#endif`,MH="gl_FragColor = linearToOutputTexel( gl_FragColor );",wH=`vec4 LinearTransferOETF( in vec4 value ) { 497 return value; 498} 499vec4 sRGBTransferEOTF( in vec4 value ) { 500 return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a ); 501} 502vec4 sRGBTransferOETF( in vec4 value ) { 503 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 ); 504}`,TH=`#ifdef USE_ENVMAP 505 #ifdef ENV_WORLDPOS 506 vec3 cameraToFrag; 507 if ( isOrthographic ) { 508 cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); 509 } else { 510 cameraToFrag = normalize( vWorldPosition - cameraPosition ); 511 } 512 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 513 #ifdef ENVMAP_MODE_REFLECTION 514 vec3 reflectVec = reflect( cameraToFrag, worldNormal ); 515 #else 516 vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); 517 #endif 518 #else 519 vec3 reflectVec = vReflect; 520 #endif 521 #ifdef ENVMAP_TYPE_CUBE 522 vec4 envColor = textureCube( envMap, envMapRotation * reflectVec ); 523 #ifdef ENVMAP_BLENDING_MULTIPLY 524 outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); 525 #elif defined( ENVMAP_BLENDING_MIX ) 526 outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); 527 #elif defined( ENVMAP_BLENDING_ADD ) 528 outgoingLight += envColor.xyz * specularStrength * reflectivity; 529 #endif 530 #endif 531#endif`,EH=`#ifdef USE_ENVMAP 532 uniform float envMapIntensity; 533 uniform mat3 envMapRotation; 534 #ifdef ENVMAP_TYPE_CUBE 535 uniform samplerCube envMap; 536 #else 537 uniform sampler2D envMap; 538 #endif 539#endif`,AH=`#ifdef USE_ENVMAP 540 uniform float reflectivity; 541 #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) 542 #define ENV_WORLDPOS 543 #endif 544 #ifdef ENV_WORLDPOS 545 varying vec3 vWorldPosition; 546 uniform float refractionRatio; 547 #else 548 varying vec3 vReflect; 549 #endif 550#endif`,CH=`#ifdef USE_ENVMAP 551 #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) 552 #define ENV_WORLDPOS 553 #endif 554 #ifdef ENV_WORLDPOS 555 556 varying vec3 vWorldPosition; 557 #else 558 varying vec3 vReflect; 559 uniform float refractionRatio; 560 #endif 561#endif`,RH=`#ifdef USE_ENVMAP 562 #ifdef ENV_WORLDPOS 563 vWorldPosition = worldPosition.xyz; 564 #else 565 vec3 cameraToVertex; 566 if ( isOrthographic ) { 567 cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); 568 } else {
569 cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); 570 } 571 vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); 572 #ifdef ENVMAP_MODE_REFLECTION 573 vReflect = reflect( cameraToVertex, worldNormal ); 574 #else 575 vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); 576 #endif 577 #endif 578#endif`,NH=`#ifdef USE_FOG 579 vFogDepth = - mvPosition.z; 580#endif`,DH=`#ifdef USE_FOG 581 varying float vFogDepth; 582#endif`,LH=`#ifdef USE_FOG 583 #ifdef FOG_EXP2 584 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); 585 #else 586 float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); 587 #endif 588 gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); 589#endif`,IH=`#ifdef USE_FOG 590 uniform vec3 fogColor; 591 varying float vFogDepth; 592 #ifdef FOG_EXP2 593 uniform float fogDensity; 594 #else 595 uniform float fogNear; 596 uniform float fogFar; 597 #endif 598#endif`,PH=`#ifdef USE_GRADIENTMAP 599 uniform sampler2D gradientMap; 600#endif 601vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { 602 float dotNL = dot( normal, lightDirection ); 603 vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); 604 #ifdef USE_GRADIENTMAP 605 return vec3( texture2D( gradientMap, coord ).r ); 606 #else 607 vec2 fw = fwidth( coord ) * 0.5; 608 return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); 609 #endif 610}`,UH=`#ifdef USE_LIGHTMAP 611 uniform sampler2D lightMap; 612 uniform float lightMapIntensity; 613#endif`,OH=`LambertMaterial material; 614material.diffuseColor = diffuseColor.rgb; 615material.specularStrength = specularStrength;`,zH=`varying vec3 vViewPosition; 616struct LambertMaterial { 617 vec3 diffuseColor; 618 float specularStrength; 619}; 620void RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { 621 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 622 vec3 irradiance = dotNL * directLight.color; 623 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 624} 625void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { 626 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 627} 628#define RE_Direct RE_Direct_Lambert 629#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,BH=`uniform bool receiveShadow; 630uniform vec3 ambientLightColor; 631#if defined( USE_LIGHT_PROBES ) 632 uniform vec3 lightProbe[ 9 ]; 633#endif 634vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { 635 float x = normal.x, y = normal.y, z = normal.z; 636 vec3 result = shCoefficients[ 0 ] * 0.886227; 637 result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; 638 result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; 639 result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; 640 result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; 641 result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; 642 result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); 643 result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; 644 result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); 645 return result; 646} 647vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { 648 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 649 vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); 650 return irradiance; 651} 652vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { 653 vec3 irradiance = ambientLightColor; 654 return irradiance; 655} 656float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { 657 float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); 658 if ( cutoffDistance > 0.0 ) { 659 distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); 660 } 661 return distanceFalloff; 662} 663float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { 664 return smoothstep( coneCosine, penumbraCosine, angleCosine ); 665} 666#if NUM_DIR_LIGHTS > 0 667 struct DirectionalLight { 668 vec3 direction; 669 vec3 color; 670 }; 671 uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; 672 void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) { 673 light.color = directionalLight.color; 674 light.direction = directionalLight.direction; 675 light.visible = true; 676 } 677#endif 678#if NUM_POINT_LIGHTS > 0 679 struct PointLight { 680 vec3 position; 681 vec3 color; 682 float distance; 683 float decay; 684 }; 685 uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; 686 void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) { 687 vec3 lVector = pointLight.position - geometryPosition; 688 light.direction = normalize( lVector ); 689 float lightDistance = length( lVector ); 690 light.color = pointLight.color; 691 light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); 692 light.visible = ( light.color != vec3( 0.0 ) ); 693 } 694#endif
695#if NUM_SPOT_LIGHTS > 0 696 struct SpotLight { 697 vec3 position; 698 vec3 direction; 699 vec3 color; 700 float distance; 701 float decay; 702 float coneCos; 703 float penumbraCos; 704 }; 705 uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; 706 void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) { 707 vec3 lVector = spotLight.position - geometryPosition; 708 light.direction = normalize( lVector ); 709 float angleCos = dot( light.direction, spotLight.direction ); 710 float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); 711 if ( spotAttenuation > 0.0 ) { 712 float lightDistance = length( lVector ); 713 light.color = spotLight.color * spotAttenuation; 714 light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); 715 light.visible = ( light.color != vec3( 0.0 ) ); 716 } else { 717 light.color = vec3( 0.0 ); 718 light.visible = false; 719 } 720 } 721#endif 722#if NUM_RECT_AREA_LIGHTS > 0 723 struct RectAreaLight { 724 vec3 color; 725 vec3 position; 726 vec3 halfWidth; 727 vec3 halfHeight; 728 }; 729 uniform sampler2D ltc_1; uniform sampler2D ltc_2; 730 uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; 731#endif 732#if NUM_HEMI_LIGHTS > 0 733 struct HemisphereLight { 734 vec3 direction; 735 vec3 skyColor; 736 vec3 groundColor; 737 }; 738 uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; 739 vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { 740 float dotNL = dot( normal, hemiLight.direction ); 741 float hemiDiffuseWeight = 0.5 * dotNL + 0.5; 742 vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); 743 return irradiance; 744 } 745#endif 746#include <lightprobes_pars_fragment>`,VH=`#ifdef USE_ENVMAP 747 vec3 getIBLIrradiance( const in vec3 normal ) { 748 #ifdef ENVMAP_TYPE_CUBE_UV 749 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 750 vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 ); 751 return PI * envMapColor.rgb * envMapIntensity; 752 #else 753 return vec3( 0.0 ); 754 #endif 755 } 756 vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { 757 #ifdef ENVMAP_TYPE_CUBE_UV 758 vec3 reflectVec = reflect( - viewDir, normal ); 759 reflectVec = normalize( mix( reflectVec, normal, pow4( roughness ) ) ); 760 reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); 761 vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness ); 762 return envMapColor.rgb * envMapIntensity; 763 #else 764 return vec3( 0.0 ); 765 #endif 766 } 767 #ifdef USE_ANISOTROPY 768 vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) { 769 #ifdef ENVMAP_TYPE_CUBE_UV 770 vec3 bentNormal = cross( bitangent, viewDir ); 771 bentNormal = normalize( cross( bentNormal, bitangent ) ); 772 bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) ); 773 return getIBLRadiance( viewDir, bentNormal, roughness ); 774 #else 775 return vec3( 0.0 ); 776 #endif 777 } 778 #endif 779#endif`,FH=`ToonMaterial material; 780material.diffuseColor = diffuseColor.rgb;`,kH=`varying vec3 vViewPosition; 781struct ToonMaterial { 782 vec3 diffuseColor; 783}; 784void RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { 785 vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color; 786 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 787} 788void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { 789 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 790} 791#define RE_Direct RE_Direct_Toon 792#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,HH=`BlinnPhongMaterial material; 793material.diffuseColor = diffuseColor.rgb; 794material.specularColor = specular; 795material.specularShininess = shininess; 796material.specularStrength = specularStrength;`,GH=`varying vec3 vViewPosition; 797struct BlinnPhongMaterial { 798 vec3 diffuseColor; 799 vec3 specularColor; 800 float specularShininess; 801 float specularStrength; 802}; 803void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {
804 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 805 vec3 irradiance = dotNL * directLight.color; 806 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 807 reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength; 808} 809void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { 810 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 811} 812#define RE_Direct RE_Direct_BlinnPhong 813#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,jH=`PhysicalMaterial material; 814material.diffuseColor = diffuseColor.rgb; 815material.diffuseContribution = diffuseColor.rgb * ( 1.0 - metalnessFactor ); 816material.metalness = metalnessFactor; 817vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); 818float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); 819material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; 820material.roughness = min( material.roughness, 1.0 ); 821#ifdef IOR 822 material.ior = ior; 823 #ifdef USE_SPECULAR 824 float specularIntensityFactor = specularIntensity; 825 vec3 specularColorFactor = specularColor; 826 #ifdef USE_SPECULAR_COLORMAP 827 specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb; 828 #endif 829 #ifdef USE_SPECULAR_INTENSITYMAP 830 specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a; 831 #endif 832 material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); 833 #else 834 float specularIntensityFactor = 1.0; 835 vec3 specularColorFactor = vec3( 1.0 ); 836 material.specularF90 = 1.0; 837 #endif 838 material.specularColor = min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor; 839 material.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor ); 840#else 841 material.specularColor = vec3( 0.04 ); 842 material.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor ); 843 material.specularF90 = 1.0; 844#endif 845#ifdef USE_CLEARCOAT 846 material.clearcoat = clearcoat; 847 material.clearcoatRoughness = clearcoatRoughness; 848 material.clearcoatF0 = vec3( 0.04 ); 849 material.clearcoatF90 = 1.0; 850 #ifdef USE_CLEARCOATMAP 851 material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x; 852 #endif 853 #ifdef USE_CLEARCOAT_ROUGHNESSMAP 854 material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y; 855 #endif 856 material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); 857 material.clearcoatRoughness += geometryRoughness; 858 material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); 859#endif 860#ifdef USE_DISPERSION 861 material.dispersion = dispersion; 862#endif 863#ifdef USE_IRIDESCENCE 864 material.iridescence = iridescence; 865 material.iridescenceIOR = iridescenceIOR; 866 #ifdef USE_IRIDESCENCEMAP 867 material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r; 868 #endif 869 #ifdef USE_IRIDESCENCE_THICKNESSMAP 870 material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum; 871 #else 872 material.iridescenceThickness = iridescenceThicknessMaximum; 873 #endif 874#endif 875#ifdef USE_SHEEN 876 material.sheenColor = sheenColor; 877 #ifdef USE_SHEEN_COLORMAP 878 material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb; 879 #endif 880 material.sheenRoughness = clamp( sheenRoughness, 0.0001, 1.0 ); 881 #ifdef USE_SHEEN_ROUGHNESSMAP 882 material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; 883 #endif 884#endif 885#ifdef USE_ANISOTROPY 886 #ifdef USE_ANISOTROPYMAP 887 mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x ); 888 vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb; 889 vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b; 890 #else 891 vec2 anisotropyV = anisotropyVector; 892 #endif 893 material.anisotropy = length( anisotropyV ); 894 if( material.anisotropy == 0.0 ) { 895 anisotropyV = vec2( 1.0, 0.0 ); 896 } else { 897 anisotropyV /= material.anisotropy; 898 material.anisotropy = saturate( material.anisotropy ); 899 } 900 material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );
901 material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; 902 material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; 903#endif`,WH=`uniform sampler2D dfgLUT; 904struct PhysicalMaterial { 905 vec3 diffuseColor; 906 vec3 diffuseContribution; 907 vec3 specularColor; 908 vec3 specularColorBlended; 909 float roughness; 910 float metalness; 911 float specularF90; 912 float dispersion; 913 #ifdef USE_CLEARCOAT 914 float clearcoat; 915 float clearcoatRoughness; 916 vec3 clearcoatF0; 917 float clearcoatF90; 918 #endif 919 #ifdef USE_IRIDESCENCE 920 float iridescence; 921 float iridescenceIOR; 922 float iridescenceThickness; 923 vec3 iridescenceFresnel; 924 vec3 iridescenceF0; 925 vec3 iridescenceFresnelDielectric; 926 vec3 iridescenceFresnelMetallic; 927 #endif 928 #ifdef USE_SHEEN 929 vec3 sheenColor; 930 float sheenRoughness; 931 #endif 932 #ifdef IOR 933 float ior; 934 #endif 935 #ifdef USE_TRANSMISSION 936 float transmission; 937 float transmissionAlpha; 938 float thickness; 939 float attenuationDistance; 940 vec3 attenuationColor; 941 #endif 942 #ifdef USE_ANISOTROPY 943 float anisotropy; 944 float alphaT; 945 vec3 anisotropyT; 946 vec3 anisotropyB; 947 #endif 948}; 949vec3 clearcoatSpecularDirect = vec3( 0.0 ); 950vec3 clearcoatSpecularIndirect = vec3( 0.0 ); 951vec3 sheenSpecularDirect = vec3( 0.0 ); 952vec3 sheenSpecularIndirect = vec3(0.0 ); 953vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { 954 float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); 955 float x2 = x * x; 956 float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); 957 return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); 958} 959float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { 960 float a2 = pow2( alpha ); 961 float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); 962 float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); 963 return 0.5 / max( gv + gl, EPSILON ); 964} 965float D_GGX( const in float alpha, const in float dotNH ) { 966 float a2 = pow2( alpha ); 967 float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; 968 return RECIPROCAL_PI * a2 / pow2( denom ); 969} 970#ifdef USE_ANISOTROPY 971 float V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) { 972 float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) ); 973 float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) ); 974 return 0.5 / max( gv + gl, EPSILON )
vendor: 7,372 bytes, lines 974-1133
974; 975 } 976 float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) { 977 float a2 = alphaT * alphaB; 978 highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH ); 979 highp float v2 = dot( v, v ); 980 float w2 = a2 / v2; 981 return RECIPROCAL_PI * a2 * pow2 ( w2 ); 982 } 983#endif 984#ifdef USE_CLEARCOAT 985 vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) { 986 vec3 f0 = material.clearcoatF0; 987 float f90 = material.clearcoatF90; 988 float roughness = material.clearcoatRoughness; 989 float alpha = pow2( roughness ); 990 vec3 halfDir = normalize( lightDir + viewDir ); 991 float dotNL = saturate( dot( normal, lightDir ) ); 992 float dotNV = saturate( dot( normal, viewDir ) ); 993 float dotNH = saturate( dot( normal, halfDir ) ); 994 float dotVH = saturate( dot( viewDir, halfDir ) ); 995 vec3 F = F_Schlick( f0, f90, dotVH ); 996 float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); 997 float D = D_GGX( alpha, dotNH ); 998 return F * ( V * D ); 999 } 1000#endif 1001vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { 1002 vec3 f0 = material.specularColorBlended; 1003 float f90 = material.specularF90; 1004 float roughness = material.roughness; 1005 float alpha = pow2( roughness ); 1006 vec3 halfDir = normalize( lightDir + viewDir ); 1007 float dotNL = saturate( dot( normal, lightDir ) ); 1008 float dotNV = saturate( dot( normal, viewDir ) ); 1009 float dotNH = saturate( dot( normal, halfDir ) ); 1010 float dotVH = saturate( dot( viewDir, halfDir ) ); 1011 vec3 F = F_Schlick( f0, f90, dotVH ); 1012 #ifdef USE_IRIDESCENCE 1013 F = mix( F, material.iridescenceFresnel, material.iridescence ); 1014 #endif 1015 #ifdef USE_ANISOTROPY 1016 float dotTL = dot( material.anisotropyT, lightDir ); 1017 float dotTV = dot( material.anisotropyT, viewDir ); 1018 float dotTH = dot( material.anisotropyT, halfDir ); 1019 float dotBL = dot( material.anisotropyB, lightDir ); 1020 float dotBV = dot( material.anisotropyB, viewDir ); 1021 float dotBH = dot( material.anisotropyB, halfDir ); 1022 float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL ); 1023 float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH ); 1024 #else 1025 float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); 1026 float D = D_GGX( alpha, dotNH ); 1027 #endif 1028 return F * ( V * D ); 1029} 1030vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { 1031 const float LUT_SIZE = 64.0; 1032 const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; 1033 const float LUT_BIAS = 0.5 / LUT_SIZE; 1034 float dotNV = saturate( dot( N, V ) ); 1035 vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); 1036 uv = uv * LUT_SCALE + LUT_BIAS; 1037 return uv; 1038} 1039float LTC_ClippedSphereFormFactor( const in vec3 f ) { 1040 float l = length( f ); 1041 return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); 1042} 1043vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { 1044 float x = dot( v1, v2 ); 1045 float y = abs( x ); 1046 float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; 1047 float b = 3.4175940 + ( 4.1616724 + y ) * y; 1048 float v = a / b; 1049 float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; 1050 return cross( v1, v2 ) * theta_sintheta; 1051} 1052vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { 1053 vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; 1054 vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; 1055 vec3 lightNormal = cross( v1, v2 ); 1056 if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); 1057 vec3 T1, T2; 1058 T1 = normalize( V - N * dot( V, N ) ); 1059 T2 = - cross( N, T1 ); 1060 mat3 mat = mInv * transpose( mat3( T1, T2, N ) ); 1061 vec3 coords[ 4 ]; 1062 coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); 1063 coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); 1064 coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); 1065 coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); 1066 coords[ 0 ] = normalize( coords[ 0 ] ); 1067 coords[ 1 ] = normalize( coords[ 1 ] ); 1068 coords[ 2 ] = normalize( coords[ 2 ] ); 1069 coords[ 3 ] = normalize( coords[ 3 ] ); 1070 vec3 vectorFormFactor = vec3( 0.0 ); 1071 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); 1072 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); 1073 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); 1074 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); 1075 float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); 1076 return vec3( result ); 1077} 1078#if defined( USE_SHEEN ) 1079float D_Charlie( float roughness, float dotNH ) { 1080 float alpha = pow2( roughness ); 1081 float invAlpha = 1.0 / alpha; 1082 float cos2h = dotNH * dotNH; 1083 float sin2h = max( 1.0 - cos2h, 0.0078125 ); 1084 return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); 1085} 1086float V_Neubelt( float dotNV, float dotNL ) { 1087 return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); 1088} 1089vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { 1090 vec3 halfDir = normalize( lightDir + viewDir ); 1091 float dotNL = saturate( dot( normal, lightDir ) ); 1092 float dotNV = saturate( dot( normal, viewDir ) ); 1093 float dotNH = saturate( dot( normal, halfDir ) ); 1094 float D = D_Charlie( sheenRoughness, dotNH ); 1095 float V = V_Neubelt( dotNV, dotNL ); 1096 return sheenColor * ( D * V ); 1097} 1098#endif 1099float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { 1100 float dotNV = saturate( dot( normal, viewDir ) ); 1101 float r2 = roughness * roughness; 1102 float rInv = 1.0 / ( roughness + 0.1 ); 1103 float a = -1.9362 + 1.0678 * roughness + 0.4573 * r2 - 0.8469 * rInv; 1104 float b = -0.6014 + 0.5538 * roughness - 0.4670 * r2 - 0.1255 * rInv; 1105 float DG = exp( a * dotNV + b ); 1106 return saturate( DG ); 1107} 1108vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { 1109 float dotNV = saturate( dot( normal, viewDir ) ); 1110 vec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg; 1111 return specularColor * fab.x + specularF90 * fab.y; 1112} 1113#ifdef USE_IRIDESCENCE 1114void 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 ) { 1115#else 1116void 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 ) { 1117#endif 1118 float dotNV = saturate( dot( normal, viewDir ) ); 1119 vec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg; 1120 #ifdef USE_IRIDESCENCE 1121 vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); 1122 #else 1123 vec3 Fr = specularColor; 1124 #endif 1125 vec3 FssEss = Fr * fab.x + specularF90 * fab.y; 1126 float Ess = fab.x + fab.y; 1127 float Ems = 1.0 - Ess; 1128 vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); 1129 singleScatter += FssEss; 1130 multiScatter += Fms * Ems; 1131} 1132vec3 BRDF_GGX_Multiscatter( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { 1133 vec3 singleScatter = BRDF_GGX( lightDir, viewDir, normal, material );
vendor: 8,354 bytes, lines 1134-1263
1134 float dotNL = saturate( dot( normal, lightDir ) ); 1135 float dotNV = saturate( dot( normal, viewDir ) ); 1136 vec2 dfgV = texture2D( dfgLUT, vec2( material.roughness, dotNV ) ).rg; 1137 vec2 dfgL = texture2D( dfgLUT, vec2( material.roughness, dotNL ) ).rg; 1138 vec3 FssEss_V = material.specularColorBlended * dfgV.x + material.specularF90 * dfgV.y; 1139 vec3 FssEss_L = material.specularColorBlended * dfgL.x + material.specularF90 * dfgL.y; 1140 float Ess_V = dfgV.x + dfgV.y; 1141 float Ess_L = dfgL.x + dfgL.y; 1142 float Ems_V = 1.0 - Ess_V; 1143 float Ems_L = 1.0 - Ess_L; 1144 vec3 Favg = material.specularColorBlended + ( 1.0 - material.specularColorBlended ) * 0.047619; 1145 vec3 Fms = FssEss_V * FssEss_L * Favg / ( 1.0 - Ems_V * Ems_L * Favg + EPSILON ); 1146 float compensationFactor = Ems_V * Ems_L; 1147 vec3 multiScatter = Fms * compensationFactor; 1148 return singleScatter + multiScatter; 1149} 1150#if NUM_RECT_AREA_LIGHTS > 0 1151 void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { 1152 vec3 normal = geometryNormal; 1153 vec3 viewDir = geometryViewDir; 1154 vec3 position = geometryPosition; 1155 vec3 lightPos = rectAreaLight.position; 1156 vec3 halfWidth = rectAreaLight.halfWidth; 1157 vec3 halfHeight = rectAreaLight.halfHeight; 1158 vec3 lightColor = rectAreaLight.color; 1159 float roughness = material.roughness; 1160 vec3 rectCoords[ 4 ]; 1161 rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; 1162 rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; 1163 rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; 1164 vec2 uv = LTC_Uv( normal, viewDir, roughness ); 1165 vec4 t1 = texture2D( ltc_1, uv ); 1166 vec4 t2 = texture2D( ltc_2, uv ); 1167 mat3 mInv = mat3( 1168 vec3( t1.x, 0, t1.y ), 1169 vec3( 0, 1, 0 ), 1170 vec3( t1.z, 0, t1.w ) 1171 ); 1172 vec3 fresnel = ( material.specularColorBlended * t2.x + ( material.specularF90 - material.specularColorBlended ) * t2.y ); 1173 reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); 1174 reflectedLight.directDiffuse += lightColor * material.diffuseContribution * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); 1175 #ifdef USE_CLEARCOAT 1176 vec3 Ncc = geometryClearcoatNormal; 1177 vec2 uvClearcoat = LTC_Uv( Ncc, viewDir, material.clearcoatRoughness ); 1178 vec4 t1Clearcoat = texture2D( ltc_1, uvClearcoat ); 1179 vec4 t2Clearcoat = texture2D( ltc_2, uvClearcoat ); 1180 mat3 mInvClearcoat = mat3( 1181 vec3( t1Clearcoat.x, 0, t1Clearcoat.y ), 1182 vec3( 0, 1, 0 ), 1183 vec3( t1Clearcoat.z, 0, t1Clearcoat.w ) 1184 ); 1185 vec3 fresnelClearcoat = material.clearcoatF0 * t2Clearcoat.x + ( material.clearcoatF90 - material.clearcoatF0 ) * t2Clearcoat.y; 1186 clearcoatSpecularDirect += lightColor * fresnelClearcoat * LTC_Evaluate( Ncc, viewDir, position, mInvClearcoat, rectCoords ); 1187 #endif 1188 } 1189#endif 1190void RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { 1191 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 1192 vec3 irradiance = dotNL * directLight.color; 1193 #ifdef USE_CLEARCOAT 1194 float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) ); 1195 vec3 ccIrradiance = dotNLcc * directLight.color; 1196 clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material ); 1197 #endif 1198 #ifdef USE_SHEEN 1199 1200 sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness ); 1201 1202 float sheenAlbedoV = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); 1203 float sheenAlbedoL = IBLSheenBRDF( geometryNormal, directLight.direction, material.sheenRoughness ); 1204 1205 float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * max( sheenAlbedoV, sheenAlbedoL ); 1206 1207 irradiance *= sheenEnergyComp; 1208 1209 #endif 1210 reflectedLight.directSpecular += irradiance * BRDF_GGX_Multiscatter( directLight.direction, geometryViewDir, geometryNormal, material ); 1211 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseContribution ); 1212} 1213void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { 1214 vec3 diffuse = irradiance * BRDF_Lambert( material.diffuseContribution ); 1215 #ifdef USE_SHEEN 1216 float sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); 1217 float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo; 1218 diffuse *= sheenEnergyComp; 1219 #endif 1220 reflectedLight.indirectDiffuse += diffuse; 1221} 1222void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) { 1223 #ifdef USE_CLEARCOAT 1224 clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); 1225 #endif 1226 #ifdef USE_SHEEN 1227 sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ) * RECIPROCAL_PI; 1228 #endif 1229 vec3 singleScatteringDielectric = vec3( 0.0 ); 1230 vec3 multiScatteringDielectric = vec3( 0.0 ); 1231 vec3 singleScatteringMetallic = vec3( 0.0 ); 1232 vec3 multiScatteringMetallic = vec3( 0.0 ); 1233 #ifdef USE_IRIDESCENCE 1234 computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnelDielectric, material.roughness, singleScatteringDielectric, multiScatteringDielectric ); 1235 computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.iridescence, material.iridescenceFresnelMetallic, material.roughness, singleScatteringMetallic, multiScatteringMetallic ); 1236 #else 1237 computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScatteringDielectric, multiScatteringDielectric ); 1238 computeMultiscattering( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.roughness, singleScatteringMetallic, multiScatteringMetallic ); 1239 #endif 1240 vec3 singleScattering = mix( singleScatteringDielectric, singleScatteringMetallic, material.metalness ); 1241 vec3 multiScattering = mix( multiScatteringDielectric, multiScatteringMetallic, material.metalness ); 1242 vec3 totalScatteringDielectric = singleScatteringDielectric + multiScatteringDielectric; 1243 vec3 diffuse = material.diffuseContribution * ( 1.0 - totalScatteringDielectric ); 1244 vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; 1245 vec3 indirectSpecular = radiance * singleScattering; 1246 indirectSpecular += multiScattering * cosineWeightedIrradiance; 1247 vec3 indirectDiffuse = diffuse * cosineWeightedIrradiance; 1248 #ifdef USE_SHEEN 1249 float sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); 1250 float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo; 1251 indirectSpecular *= sheenEnergyComp; 1252 indirectDiffuse *= sheenEnergyComp; 1253 #endif 1254 reflectedLight.indirectSpecular += indirectSpecular; 1255 reflectedLight.indirectDiffuse += indirectDiffuse; 1256} 1257#define RE_Direct RE_Direct_Physical 1258#define RE_Direct_RectArea RE_Direct_RectArea_Physical 1259#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical 1260#define RE_IndirectSpecular RE_IndirectSpecular_Physical 1261float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { 1262 return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); 1263}`,
1263XH=` 1264vec3 geometryPosition = - vViewPosition; 1265vec3 geometryNormal = normal; 1266vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); 1267vec3 geometryClearcoatNormal = vec3( 0.0 ); 1268#ifdef USE_CLEARCOAT 1269 geometryClearcoatNormal = clearcoatNormal; 1270#endif 1271#ifdef USE_IRIDESCENCE 1272 float dotNVi = saturate( dot( normal, geometryViewDir ) ); 1273 if ( material.iridescenceThickness == 0.0 ) { 1274 material.iridescence = 0.0; 1275 } else { 1276 material.iridescence = saturate( material.iridescence ); 1277 } 1278 if ( material.iridescence > 0.0 ) { 1279 material.iridescenceFresnelDielectric = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); 1280 material.iridescenceFresnelMetallic = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.diffuseColor ); 1281 material.iridescenceFresnel = mix( material.iridescenceFresnelDielectric, material.iridescenceFresnelMetallic, material.metalness ); 1282 material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); 1283 } 1284#endif 1285IncidentLight directLight; 1286#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) 1287 PointLight pointLight; 1288 #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 1289 PointLightShadow pointLightShadow; 1290 #endif 1291 #pragma unroll_loop_start 1292 for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { 1293 pointLight = pointLights[ i ]; 1294 getPointLightInfo( pointLight, geometryPosition, directLight ); 1295 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) ) 1296 pointLightShadow = pointLightShadows[ i ]; 1297 directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; 1298 #endif 1299 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1300 } 1301 #pragma unroll_loop_end 1302#endif 1303#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) 1304 SpotLight spotLight; 1305 vec4 spotColor; 1306 vec3 spotLightCoord; 1307 bool inSpotLightMap; 1308 #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 1309 SpotLightShadow spotLightShadow; 1310 #endif 1311 #pragma unroll_loop_start 1312 for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { 1313 spotLight = spotLights[ i ]; 1314 getSpotLightInfo( spotLight, geometryPosition, directLight ); 1315 #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) 1316 #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX 1317 #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 1318 #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS 1319 #else 1320 #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) 1321 #endif 1322 #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) 1323 spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; 1324 inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); 1325 spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); 1326 directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; 1327 #endif 1328 #undef SPOT_LIGHT_MAP_INDEX 1329 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 1330 spotLightShadow = spotLightShadows[ i ]; 1331 directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; 1332 #endif 1333 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1334 } 1335 #pragma unroll_loop_end 1336#endif 1337#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) 1338 DirectionalLight directionalLight; 1339 #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 1340 DirectionalLightShadow directionalLightShadow; 1341 #endif 1342 #pragma unroll_loop_start 1343 for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { 1344 directionalLight = directionalLights[ i ]; 1345 getDirectionalLightInfo( directionalLight, directLight ); 1346 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) 1347 directionalLightShadow = directionalLightShadows[ i ]; 1348 directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; 1349 #endif 1350 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1351 } 1352 #pragma unroll_loop_end 1353#endif 1354#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) 1355 RectAreaLight rectAreaLight; 1356 #pragma unroll_loop_start 1357 for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { 1358 rectAreaLight = rectAreaLights[ i ]; 1359 RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1360 } 1361 #pragma unroll_loop_end 1362#endif 1363#if defined( RE_IndirectDiffuse ) 1364 vec3 iblIrradiance = vec3( 0.0 ); 1365 vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); 1366 #if defined( USE_LIGHT_PROBES ) 1367 irradiance += getLightProbeIrradiance( lightProbe, geometryNormal ); 1368 #endif 1369 #if ( NUM_HEMI_LIGHTS > 0 ) 1370 #pragma unroll_loop_start 1371 for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { 1372 irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal ); 1373 } 1374 #pragma unroll_loop_end 1375 #endif 1376 #ifdef USE_LIGHT_PROBES_GRID 1377 vec3 probeWorldPos = ( ( vec4( geometryPosition, 1.0 ) - viewMatrix[ 3 ] ) * viewMatrix ).xyz; 1378 vec3 probeWorldNormal = inverseTransformDirection( geometryNormal, viewMatrix ); 1379 irradiance += getLightProbeGridIrradiance( probeWorldPos, probeWorldNormal ); 1380 #endif 1381#endif 1382#if defined( RE_IndirectSpecular ) 1383 vec3 radiance = vec3( 0.0 ); 1384 vec3 clearcoatRadiance = vec3( 0.0 ); 1385#endif`,qH=`#if defined( RE_IndirectDiffuse ) 1386 #ifdef USE_LIGHTMAP 1387 vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); 1388 vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; 1389 irradiance += lightMapIrradiance; 1390 #endif 1391 #if defined( USE_ENVMAP ) && defined( ENVMAP_TYPE_CUBE_UV ) 1392 #if defined( STANDARD ) || defined( LAMBERT ) || defined( PHONG ) 1393 iblIrradiance += getIBLIrradiance( geometryNormal ); 1394 #endif 1395 #endif 1396#endif 1397#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) 1398 #ifdef USE_ANISOTROPY 1399 radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy ); 1400 #else 1401 radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness ); 1402 #endif 1403 #ifdef USE_CLEARCOAT 1404 clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); 1405 #endif 1406#endif`,YH=`#if defined( RE_IndirectDiffuse ) 1407 #if defined( LAMBERT ) || defined( PHONG ) 1408 irradiance += iblIrradiance; 1409 #endif 1410 RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1411#endif 1412#if defined( RE_IndirectSpecular ) 1413 RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1414#endif`,ZH=`#ifdef USE_LIGHT_PROBES_GRID 1415uniform highp sampler3D probesSH; 1416uniform vec3 probesMin; 1417uniform vec3 probesMax; 1418uniform vec3 probesResolution; 1419vec3 getLightProbeGridIrradiance( vec3 worldPos, vec3 worldNormal ) { 1420 vec3 res = probesResolution; 1421 vec3 gridRange = probesMax - probesMin; 1422 vec3 resMinusOne = res - 1.0; 1423 vec3 probeSpacing = gridRange / resMinusOne; 1424 vec3 samplePos = worldPos + worldNormal * probeSpacing * 0.5; 1425 vec3 uvw = clamp( ( samplePos - probesMin ) / gridRange, 0.0, 1.0 ); 1426 uvw = uvw * resMinusOne / res + 0.5 / res; 1427 float nz = res.z; 1428 float paddedSlices = nz + 2.0; 1429 float atlasDepth = 7.0 * paddedSlices; 1430 float uvZBase = uvw.z * nz + 1.0; 1431 vec4 s0 = texture( probesSH, vec3( uvw.xy, ( uvZBase ) / atlasDepth ) ); 1432 vec4 s1 = texture( probesSH, vec3( uvw.xy, ( uvZBase + paddedSlices ) / atlasDepth ) ); 1433 vec4 s2 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 2.0 * paddedSlices ) / atlasDepth ) ); 1434 vec4 s3 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 3.0 * paddedSlices ) / atlasDepth ) ); 1435 vec4 s4 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 4.0 * paddedSlices ) / atlasDepth ) ); 1436 vec4 s5 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 5.0 * paddedSlices ) / atlasDepth ) ); 1437 vec4 s6 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 6.0 * paddedSlices ) / atlasDepth ) ); 1438 vec3 c0 = s0.xyz; 1439 vec3 c1 = vec3( s0.w, s1.xy ); 1440 vec3 c2 = vec3( s1.zw, s2.x ); 1441 vec3 c3 = s2.yzw; 1442 vec3 c4 = s3.xyz; 1443 vec3 c5 = vec3( s3.w, s4.xy ); 1444 vec3 c6 = vec3( s4.zw, s5.x ); 1445 vec3 c7 = s5.yzw; 1446 vec3 c8 = s6.xyz; 1447 float x = worldNormal.x, y = worldNormal.y, z = worldNormal.z; 1448 vec3 result = c0 * 0.886227; 1449 result += c1 * 2.0 * 0.511664 * y; 1450 result += c2 * 2.0 * 0.511664 * z; 1451 result += c3 * 2.0 * 0.511664 * x; 1452 result += c4 * 2.0 * 0.429043 * x * y; 1453 result += c5 * 2.0 * 0.429043 * y * z; 1454 result += c6 * ( 0.743125 * z * z - 0.247708 ); 1455 result += c7 * 2.0 * 0.429043 * x * z; 1456 result += c8 * 0.429043 * ( x * x - y * y ); 1457 return max( result, vec3( 0.0 ) ); 1458} 1459#endif`,KH=`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER ) 1460 gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; 1461#endif`,$H=`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER ) 1462 uniform float logDepthBufFC; 1463 varying float vFragDepth; 1464 varying float vIsPerspective; 1465#endif`,QH=`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER 1466 varying float vFragDepth; 1467 varying float vIsPerspective; 1468#endif`,JH=`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER 1469 vFragDepth = 1.0 + gl_Position.w; 1470 vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); 1471#endif`,eG=`#ifdef USE_MAP 1472 vec4 sampledDiffuseColor = texture2D( map, vMapUv ); 1473 #ifdef DECODE_VIDEO_TEXTURE 1474 sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor ); 1475 #endif 1476 diffuseColor *= sampledDiffuseColor; 1477#endif`,tG=`#ifdef USE_MAP 1478 uniform sampler2D map; 1479#endif`,nG=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) 1480 #if defined( USE_POINTS_UV ) 1481 vec2 uv = vUv; 1482 #else 1483 vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; 1484 #endif 1485#endif 1486#ifdef USE_MAP 1487 diffuseColor *= texture2D( map, uv ); 1488#endif 1489#ifdef USE_ALPHAMAP 1490 diffuseColor.a *= texture2D( alphaMap, uv ).g; 1491#endif`,iG=`#if defined( USE_POINTS_UV ) 1492 varying vec2 vUv; 1493#else 1494 #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) 1495 uniform mat3 uvTransform; 1496 #endif 1497#endif 1498#ifdef USE_MAP 1499 uniform sampler2D map; 1500#endif 1501#ifdef USE_ALPHAMAP 1502 uniform sampler2D alphaMap; 1503#endif`,sG=`float metalnessFactor = metalness; 1504#ifdef USE_METALNESSMAP 1505 vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); 1506 metalnessFactor *= texelMetalness.b; 1507#endif`,aG=`#ifdef USE_METALNESSMAP 1508 uniform sampler2D metalnessMap; 1509#endif`,rG=`#ifdef USE_INSTANCING_MORPH 1510 float morphTargetInfluences[ MORPHTARGETS_COUNT ]; 1511 float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r; 1512 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1513 morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r; 1514 } 1515#endif`,oG=`#if defined( USE_MORPHCOLORS ) 1516 vColor *= morphTargetBaseInfluence; 1517 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1518 #if defined( USE_COLOR_ALPHA ) 1519 if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; 1520 #elif defined( USE_COLOR ) 1521 if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; 1522 #endif 1523 } 1524#endif`,lG=`#ifdef USE_MORPHNORMALS 1525 objectNormal *= morphTargetBaseInfluence; 1526 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1527 if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; 1528 } 1529#endif`,cG=`#ifdef USE_MORPHTARGETS 1530 #ifndef USE_INSTANCING_MORPH 1531 uniform float morphTargetBaseInfluence; 1532 uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; 1533 #endif 1534 uniform sampler2DArray morphTargetsTexture; 1535 uniform ivec2 morphTargetsTextureSize; 1536 vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { 1537 int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; 1538 int y = texelIndex / morphTargetsTextureSize.x; 1539 int x = texelIndex - y * morphTargetsTextureSize.x; 1540 ivec3 morphUV = ivec3( x, y, morphTargetIndex ); 1541 return texelFetch( morphTargetsTexture, morphUV, 0 ); 1542 } 1543#endif`,uG=`#ifdef USE_MORPHTARGETS 1544 transformed *= morphTargetBaseInfluence; 1545 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1546 if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; 1547 } 1548#endif`,dG=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; 1549#ifdef FLAT_SHADED 1550 vec3 fdx = dFdx( vViewPosition ); 1551 vec3 fdy = dFdy( vViewPosition ); 1552 vec3 normal = normalize( cross( fdx, fdy ) ); 1553#else 1554 vec3 normal = normalize( vNormal ); 1555 #ifdef DOUBLE_SIDED 1556 normal *= faceDirection; 1557 #endif 1558#endif 1559#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) 1560 #ifdef USE_TANGENT 1561 mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); 1562 #else 1563 mat3 tbn = getTangentFrame( - vViewPosition, normal, 1564 #if defined( USE_NORMALMAP ) 1565 vNormalMapUv 1566 #elif defined( USE_CLEARCOAT_NORMALMAP ) 1567 vClearcoatNormalMapUv 1568 #else 1569 vUv 1570 #endif 1571 ); 1572 #endif 1573 #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) 1574 tbn[0] *= faceDirection; 1575 tbn[1] *= faceDirection; 1576 #endif 1577#endif 1578#ifdef USE_CLEARCOAT_NORMALMAP 1579 #ifdef USE_TANGENT 1580 mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); 1581 #else 1582 mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv ); 1583 #endif 1584 #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) 1585 tbn2[0] *= faceDirection; 1586 tbn2[1] *= faceDirection; 1587 #endif 1588#endif 1589vec3 nonPerturbedNormal = normal;`,hG=`#ifdef USE_NORMALMAP_OBJECTSPACE 1590 normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; 1591 #ifdef FLIP_SIDED 1592 normal = - normal; 1593 #endif 1594 #ifdef DOUBLE_SIDED 1595 normal = normal * faceDirection; 1596 #endif 1597 normal = normalize( normalMatrix * normal ); 1598#elif defined( USE_NORMALMAP_TANGENTSPACE ) 1599 vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; 1600 #if defined( USE_PACKED_NORMALMAP ) 1601 mapN = vec3( mapN.xy, sqrt( saturate( 1.0 - dot( mapN.xy, mapN.xy ) ) ) ); 1602 #endif 1603 mapN.xy *= normalScale; 1604 normal = normalize( tbn * mapN ); 1605#elif defined( USE_BUMPMAP )
1606 normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); 1607#endif`,fG=`#ifndef FLAT_SHADED 1608 varying vec3 vNormal; 1609 #ifdef USE_TANGENT 1610 varying vec3 vTangent; 1611 varying vec3 vBitangent; 1612 #endif 1613#endif`,pG=`#ifndef FLAT_SHADED 1614 varying vec3 vNormal; 1615 #ifdef USE_TANGENT 1616 varying vec3 vTangent; 1617 varying vec3 vBitangent; 1618 #endif 1619#endif`,mG=`#ifndef FLAT_SHADED 1620 vNormal = normalize( transformedNormal ); 1621 #ifdef USE_TANGENT 1622 vTangent = normalize( transformedTangent ); 1623 vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); 1624 #endif 1625#endif`,gG=`#ifdef USE_NORMALMAP 1626 uniform sampler2D normalMap; 1627 uniform vec2 normalScale; 1628#endif 1629#ifdef USE_NORMALMAP_OBJECTSPACE 1630 uniform mat3 normalMatrix; 1631#endif 1632#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) ) 1633 mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) { 1634 vec3 q0 = dFdx( eye_pos.xyz ); 1635 vec3 q1 = dFdy( eye_pos.xyz ); 1636 vec2 st0 = dFdx( uv.st ); 1637 vec2 st1 = dFdy( uv.st ); 1638 vec3 N = surf_norm; 1639 vec3 q1perp = cross( q1, N ); 1640 vec3 q0perp = cross( N, q0 ); 1641 vec3 T = q1perp * st0.x + q0perp * st1.x; 1642 vec3 B = q1perp * st0.y + q0perp * st1.y; 1643 float det = max( dot( T, T ), dot( B, B ) ); 1644 float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); 1645 return mat3( T * scale, B * scale, N ); 1646 } 1647#endif`,xG=`#ifdef USE_CLEARCOAT 1648 vec3 clearcoatNormal = nonPerturbedNormal; 1649#endif`,yG=`#ifdef USE_CLEARCOAT_NORMALMAP 1650 vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; 1651 clearcoatMapN.xy *= clearcoatNormalScale; 1652 clearcoatNormal = normalize( tbn2 * clearcoatMapN ); 1653#endif`,vG=`#ifdef USE_CLEARCOATMAP 1654 uniform sampler2D clearcoatMap; 1655#endif 1656#ifdef USE_CLEARCOAT_NORMALMAP 1657 uniform sampler2D clearcoatNormalMap; 1658 uniform vec2 clearcoatNormalScale; 1659#endif 1660#ifdef USE_CLEARCOAT_ROUGHNESSMAP 1661 uniform sampler2D clearcoatRoughnessMap; 1662#endif`,bG=`#ifdef USE_IRIDESCENCEMAP 1663 uniform sampler2D iridescenceMap; 1664#endif 1665#ifdef USE_IRIDESCENCE_THICKNESSMAP 1666 uniform sampler2D iridescenceThicknessMap; 1667#endif`,_G=`#ifdef OPAQUE 1668diffuseColor.a = 1.0; 1669#endif 1670#ifdef USE_TRANSMISSION 1671diffuseColor.a *= material.transmissionAlpha; 1672#endif 1673gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,SG=`vec3 packNormalToRGB( const in vec3 normal ) { 1674 return normalize( normal ) * 0.5 + 0.5; 1675} 1676vec3 unpackRGBToNormal( const in vec3 rgb ) { 1677 return 2.0 * rgb.xyz - 1.0; 1678} 1679const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.; 1680const float Inv255 = 1. / 255.; 1681const vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 ); 1682const vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g ); 1683const vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b ); 1684const vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a ); 1685vec4 packDepthToRGBA( const in float v ) { 1686 if( v <= 0.0 ) 1687 return vec4( 0., 0., 0., 0. ); 1688 if( v >= 1.0 ) 1689 return vec4( 1., 1., 1., 1. ); 1690 float vuf; 1691 float af = modf( v * PackFactors.a, vuf ); 1692 float bf = modf( vuf * ShiftRight8, vuf ); 1693 float gf = modf( vuf * ShiftRight8, vuf ); 1694 return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af ); 1695} 1696vec3 packDepthToRGB( const in float v ) { 1697 if( v <= 0.0 ) 1698 return vec3( 0., 0., 0. ); 1699 if( v >= 1.0 ) 1700 return vec3( 1., 1., 1. ); 1701 float vuf; 1702 float bf = modf( v * PackFactors.b, vuf ); 1703 float gf = modf( vuf * ShiftRight8, vuf ); 1704 return vec3( vuf * Inv255, gf * PackUpscale, bf ); 1705} 1706vec2 packDepthToRG( const in float v ) { 1707 if( v <= 0.0 ) 1708 return vec2( 0., 0. ); 1709 if( v >= 1.0 ) 1710 return vec2( 1., 1. ); 1711 float vuf; 1712 float gf = modf( v * 256., vuf ); 1713 return vec2( vuf * Inv255, gf ); 1714} 1715float unpackRGBAToDepth( const in vec4 v ) { 1716 return dot( v, UnpackFactors4 ); 1717} 1718float unpackRGBToDepth( const in vec3 v ) { 1719 return dot( v, UnpackFactors3 ); 1720} 1721float unpackRGToDepth( const in vec2 v ) { 1722 return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g; 1723} 1724vec4 pack2HalfToRGBA( const in vec2 v ) {
1725 vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); 1726 return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); 1727} 1728vec2 unpackRGBATo2Half( const in vec4 v ) { 1729 return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); 1730} 1731float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { 1732 return ( viewZ + near ) / ( near - far ); 1733} 1734float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) { 1735 #ifdef USE_REVERSED_DEPTH_BUFFER 1736 1737 return depth * ( far - near ) - far; 1738 #else 1739 return depth * ( near - far ) - near; 1740 #endif 1741} 1742float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { 1743 return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); 1744} 1745float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { 1746 1747 #ifdef USE_REVERSED_DEPTH_BUFFER 1748 return ( near * far ) / ( ( near - far ) * depth - near ); 1749 #else 1750 return ( near * far ) / ( ( far - near ) * depth - far ); 1751 #endif 1752}`,MG=`#ifdef PREMULTIPLIED_ALPHA 1753 gl_FragColor.rgb *= gl_FragColor.a; 1754#endif`,wG=`vec4 mvPosition = vec4( transformed, 1.0 ); 1755#ifdef USE_BATCHING 1756 mvPosition = batchingMatrix * mvPosition; 1757#endif 1758#ifdef USE_INSTANCING 1759 mvPosition = instanceMatrix * mvPosition; 1760#endif 1761mvPosition = modelViewMatrix * mvPosition; 1762gl_Position = projectionMatrix * mvPosition;`,TG=`#ifdef DITHERING 1763 gl_FragColor.rgb = dithering( gl_FragColor.rgb ); 1764#endif`,EG=`#ifdef DITHERING 1765 vec3 dithering( vec3 color ) { 1766 float grid_position = rand( gl_FragCoord.xy ); 1767 vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); 1768 dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); 1769 return color + dither_shift_RGB; 1770 } 1771#endif`,AG=`float roughnessFactor = roughness; 1772#ifdef USE_ROUGHNESSMAP 1773 vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); 1774 roughnessFactor *= texelRoughness.g; 1775#endif`,CG=`#ifdef USE_ROUGHNESSMAP 1776 uniform sampler2D roughnessMap; 1777#endif`,RG=`#if NUM_SPOT_LIGHT_COORDS > 0 1778 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; 1779#endif 1780#if NUM_SPOT_LIGHT_MAPS > 0 1781 uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; 1782#endif 1783#ifdef USE_SHADOWMAP 1784 #if NUM_DIR_LIGHT_SHADOWS > 0 1785 #if defined( SHADOWMAP_TYPE_PCF ) 1786 uniform sampler2DShadow directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; 1787 #else 1788 uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; 1789 #endif 1790 varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; 1791 struct DirectionalLightShadow { 1792 float shadowIntensity; 1793 float shadowBias; 1794 float shadowNormalBias; 1795 float shadowRadius; 1796 vec2 shadowMapSize; 1797 }; 1798 uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; 1799 #endif 1800 #if NUM_SPOT_LIGHT_SHADOWS > 0 1801 #if defined( SHADOWMAP_TYPE_PCF ) 1802 uniform sampler2DShadow spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; 1803 #else 1804 uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; 1805 #endif 1806 struct SpotLightShadow { 1807 float shadowIntensity; 1808 float shadowBias; 1809 float shadowNormalBias; 1810 float shadowRadius; 1811 vec2 shadowMapSize; 1812 }; 1813 uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; 1814 #endif 1815 #if NUM_POINT_LIGHT_SHADOWS > 0 1816 #if defined( SHADOWMAP_TYPE_PCF ) 1817 uniform samplerCubeShadow pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; 1818 #elif defined( SHADOWMAP_TYPE_BASIC ) 1819 uniform samplerCube pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; 1820 #endif 1821 varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; 1822 struct PointLightShadow { 1823 float shadowIntensity; 1824 float shadowBias; 1825 float shadowNormalBias; 1826 float shadowRadius; 1827 vec2 shadowMapSize; 1828 float shadowCameraNear; 1829 float shadowCameraFar; 1830 }; 1831 uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; 1832 #endif 1833 #if defined( SHADOWMAP_TYPE_PCF ) 1834 float interleavedGradientNoise( vec2 position ) { 1835 return fract( 52.9829189 * fract( dot( position, vec2( 0.06711056, 0.00583715 ) ) ) ); 1836 } 1837 vec2 vogelDiskSample( int sampleIndex, int samplesCount, float phi ) { 1838 const float goldenAngle = 2.399963229728653; 1839 float r = sqrt( ( float( sampleIndex ) + 0.5 ) / float( samplesCount ) ); 1840 float theta = float( sampleIndex ) * goldenAngle + phi; 1841 return vec2( cos( theta ), sin( theta ) ) * r; 1842 } 1843 #endif 1844 #if defined( SHADOWMAP_TYPE_PCF ) 1845 float getShadow( sampler2DShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { 1846 float shadow = 1.0; 1847 shadowCoord.xyz /= shadowCoord.w; 1848 shadowCoord.z += shadowBias; 1849 bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; 1850 bool frustumTest = inFrustum && shadowCoord.z <= 1.0; 1851 if ( frustumTest ) { 1852 vec2 texelSize = vec2( 1.0 ) / shadowMapSize; 1853 float radius = shadowRadius * texelSize.x; 1854 float phi = interleavedGradientNoise( gl_FragCoord.xy ) * PI2; 1855 shadow = ( 1856 texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 0, 5, phi ) * radius, shadowCoord.z ) ) + 1857 texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 1, 5, phi ) * radius, shadowCoord.z ) ) + 1858 texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 2, 5, phi ) * radius, shadowCoord.z ) ) + 1859 texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 3, 5, phi ) * radius, shadowCoord.z ) ) + 1860 texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 4, 5, phi ) * radius, shadowCoord.z ) ) 1861 ) * 0.2; 1862 } 1863 return mix( 1.0, shadow, shadowIntensity ); 1864 } 1865 #elif defined( SHADOWMAP_TYPE_VSM ) 1866 float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { 1867 float shadow = 1.0; 1868 shadowCoord.xyz /= shadowCoord.w; 1869 #ifdef USE_REVERSED_DEPTH_BUFFER 1870 shadowCoord.z -= shadowBias; 1871 #else 1872 shadowCoord.z += shadowBias; 1873 #endif 1874 bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; 1875 bool frustumTest = inFrustum && shadowCoord.z <= 1.0; 1876 if ( frustumTest ) { 1877 vec2 distribution = texture2D( shadowMap, shadowCoord.xy ).rg; 1878 float mean = distribution.x; 1879 float variance = distribution.y * distribution.y; 1880 #ifdef USE_REVERSED_DEPTH_BUFFER 1881 float hard_shadow = step( mean, shadowCoord.z ); 1882 #else 1883 float hard_shadow = step( shadowCoord.z, mean ); 1884 #endif 1885 1886 if ( hard_shadow == 1.0 ) { 1887 shadow = 1.0; 1888 } else { 1889 variance = max( variance, 0.0000001 ); 1890 float d = shadowCoord.z - mean; 1891 float p_max = variance / ( variance + d * d ); 1892 p_max = clamp( ( p_max - 0.3 ) / 0.65, 0.0, 1.0 ); 1893 shadow = max( hard_shadow, p_max ); 1894 } 1895 } 1896 return mix( 1.0, shadow, shadowIntensity ); 1897 } 1898 #else 1899 float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { 1900 float shadow = 1.0; 1901 shadowCoord.xyz /= shadowCoord.w; 1902 #ifdef USE_REVERSED_DEPTH_BUFFER 1903 shadowCoord.z -= shadowBias; 1904 #else 1905 shadowCoord.z += shadowBias; 1906 #endif 1907 bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; 1908 bool frustumTest = inFrustum && shadowCoord.z <= 1.0; 1909 if ( frustumTest ) { 1910 float depth = texture2D( shadowMap, shadowCoord.xy ).r; 1911 #ifdef USE_REVERSED_DEPTH_BUFFER 1912 shadow = step( depth, shadowCoord.z ); 1913 #else 1914 shadow = step( shadowCoord.z, depth ); 1915 #endif 1916 } 1917 return mix( 1.0, shadow, shadowIntensity ); 1918 } 1919 #endif 1920 #if NUM_POINT_LIGHT_SHADOWS > 0 1921 #if defined( SHADOWMAP_TYPE_PCF ) 1922 float getPointShadow( samplerCubeShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { 1923 float shadow = 1.0; 1924 vec3 lightToPosition = shadowCoord.xyz; 1925 vec3 bd3D = normalize( lightToPosition ); 1926 vec3 absVec = abs( lightToPosition ); 1927 float viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z ); 1928 if ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) { 1929 #ifdef USE_REVERSED_DEPTH_BUFFER 1930 float dp = ( shadowCameraNear * ( shadowCameraFar - viewSpaceZ ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) );
1931 dp -= shadowBias; 1932 #else 1933 float dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) ); 1934 dp += shadowBias; 1935 #endif 1936 float texelSize = shadowRadius / shadowMapSize.x; 1937 vec3 absDir = abs( bd3D ); 1938 vec3 tangent = absDir.x > absDir.z ? vec3( 0.0, 1.0, 0.0 ) : vec3( 1.0, 0.0, 0.0 ); 1939 tangent = normalize( cross( bd3D, tangent ) ); 1940 vec3 bitangent = cross( bd3D, tangent ); 1941 float phi = interleavedGradientNoise( gl_FragCoord.xy ) * PI2; 1942 vec2 sample0 = vogelDiskSample( 0, 5, phi ); 1943 vec2 sample1 = vogelDiskSample( 1, 5, phi ); 1944 vec2 sample2 = vogelDiskSample( 2, 5, phi ); 1945 vec2 sample3 = vogelDiskSample( 3, 5, phi ); 1946 vec2 sample4 = vogelDiskSample( 4, 5, phi ); 1947 shadow = ( 1948 texture( shadowMap, vec4( bd3D + ( tangent * sample0.x + bitangent * sample0.y ) * texelSize, dp ) ) + 1949 texture( shadowMap, vec4( bd3D + ( tangent * sample1.x + bitangent * sample1.y ) * texelSize, dp ) ) + 1950 texture( shadowMap, vec4( bd3D + ( tangent * sample2.x + bitangent * sample2.y ) * texelSize, dp ) ) + 1951 texture( shadowMap, vec4( bd3D + ( tangent * sample3.x + bitangent * sample3.y ) * texelSize, dp ) ) + 1952 texture( shadowMap, vec4( bd3D + ( tangent * sample4.x + bitangent * sample4.y ) * texelSize, dp ) ) 1953 ) * 0.2; 1954 } 1955 return mix( 1.0, shadow, shadowIntensity ); 1956 } 1957 #elif defined( SHADOWMAP_TYPE_BASIC ) 1958 float getPointShadow( samplerCube shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { 1959 float shadow = 1.0; 1960 vec3 lightToPosition = shadowCoord.xyz; 1961 vec3 absVec = abs( lightToPosition ); 1962 float viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z ); 1963 if ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) { 1964 float dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) ); 1965 dp += shadowBias; 1966 vec3 bd3D = normalize( lightToPosition ); 1967 float depth = textureCube( shadowMap, bd3D ).r; 1968 #ifdef USE_REVERSED_DEPTH_BUFFER 1969 depth = 1.0 - depth; 1970 #endif 1971 shadow = step( dp, depth ); 1972 } 1973 return mix( 1.0, shadow, shadowIntensity ); 1974 } 1975 #endif 1976 #endif 1977#endif`,NG=`#if NUM_SPOT_LIGHT_COORDS > 0 1978 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; 1979 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; 1980#endif 1981#ifdef USE_SHADOWMAP 1982 #if NUM_DIR_LIGHT_SHADOWS > 0 1983 uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; 1984 varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; 1985 struct DirectionalLightShadow { 1986 float shadowIntensity; 1987 float shadowBias; 1988 float shadowNormalBias; 1989 float shadowRadius; 1990 vec2 shadowMapSize; 1991 }; 1992 uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; 1993 #endif 1994 #if NUM_SPOT_LIGHT_SHADOWS > 0 1995 struct SpotLightShadow { 1996 float shadowIntensity; 1997 float shadowBias; 1998 float shadowNormalBias; 1999 float shadowRadius; 2000 vec2 shadowMapSize; 2001 }; 2002 uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; 2003 #endif 2004 #if NUM_POINT_LIGHT_SHADOWS > 0 2005 uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; 2006 varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; 2007 struct PointLightShadow { 2008 float shadowIntensity; 2009 float shadowBias; 2010 float shadowNormalBias; 2011 float shadowRadius; 2012 vec2 shadowMapSize; 2013 float shadowCameraNear; 2014 float shadowCameraFar; 2015 }; 2016 uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; 2017 #endif 2018#endif`,DG=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) 2019 #ifdef HAS_NORMAL 2020 vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); 2021 #else 2022 vec3 shadowWorldNormal = vec3( 0.0 ); 2023 #endif 2024 vec4 shadowWorldPosition; 2025#endif 2026#if defined( USE_SHADOWMAP ) 2027 #if NUM_DIR_LIGHT_SHADOWS > 0 2028 #pragma unroll_loop_start 2029 for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { 2030 shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); 2031 vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; 2032 } 2033 #pragma unroll_loop_end 2034 #endif 2035 #if NUM_POINT_LIGHT_SHADOWS > 0 2036 #pragma unroll_loop_start 2037 for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { 2038 shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); 2039 vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; 2040 } 2041 #pragma unroll_loop_end 2042 #endif 2043#endif
2044#if NUM_SPOT_LIGHT_COORDS > 0 2045 #pragma unroll_loop_start 2046 for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { 2047 shadowWorldPosition = worldPosition; 2048 #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 2049 shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; 2050 #endif 2051 vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; 2052 } 2053 #pragma unroll_loop_end 2054#endif`,LG=`float getShadowMask() { 2055 float shadow = 1.0; 2056 #ifdef USE_SHADOWMAP 2057 #if NUM_DIR_LIGHT_SHADOWS > 0 2058 DirectionalLightShadow directionalLight; 2059 #pragma unroll_loop_start 2060 for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { 2061 directionalLight = directionalLightShadows[ i ]; 2062 shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; 2063 } 2064 #pragma unroll_loop_end 2065 #endif 2066 #if NUM_SPOT_LIGHT_SHADOWS > 0 2067 SpotLightShadow spotLight; 2068 #pragma unroll_loop_start 2069 for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { 2070 spotLight = spotLightShadows[ i ]; 2071 shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; 2072 } 2073 #pragma unroll_loop_end 2074 #endif 2075 #if NUM_POINT_LIGHT_SHADOWS > 0 && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) ) 2076 PointLightShadow pointLight; 2077 #pragma unroll_loop_start 2078 for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { 2079 pointLight = pointLightShadows[ i ]; 2080 shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; 2081 } 2082 #pragma unroll_loop_end 2083 #endif 2084 #endif 2085 return shadow; 2086}`,IG=`#ifdef USE_SKINNING 2087 mat4 boneMatX = getBoneMatrix( skinIndex.x ); 2088 mat4 boneMatY = getBoneMatrix( skinIndex.y ); 2089 mat4 boneMatZ = getBoneMatrix( skinIndex.z ); 2090 mat4 boneMatW = getBoneMatrix( skinIndex.w ); 2091#endif`,PG=`#ifdef USE_SKINNING 2092 uniform mat4 bindMatrix; 2093 uniform mat4 bindMatrixInverse; 2094 uniform highp sampler2D boneTexture; 2095 mat4 getBoneMatrix( const in float i ) { 2096 int size = textureSize( boneTexture, 0 ).x; 2097 int j = int( i ) * 4; 2098 int x = j % size; 2099 int y = j / size; 2100 vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 ); 2101 vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 ); 2102 vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 ); 2103 vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); 2104 return mat4( v1, v2, v3, v4 ); 2105 } 2106#endif`,UG=`#ifdef USE_SKINNING 2107 vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); 2108 vec4 skinned = vec4( 0.0 ); 2109 skinned += boneMatX * skinVertex * skinWeight.x; 2110 skinned += boneMatY * skinVertex * skinWeight.y; 2111 skinned += boneMatZ * skinVertex * skinWeight.z; 2112 skinned += boneMatW * skinVertex * skinWeight.w; 2113 transformed = ( bindMatrixInverse * skinned ).xyz; 2114#endif`,OG=`#ifdef USE_SKINNING 2115 mat4 skinMatrix = mat4( 0.0 ); 2116 skinMatrix += skinWeight.x * boneMatX; 2117 skinMatrix += skinWeight.y * boneMatY; 2118 skinMatrix += skinWeight.z * boneMatZ; 2119 skinMatrix += skinWeight.w * boneMatW; 2120 skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; 2121 objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; 2122 #ifdef USE_TANGENT 2123 objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; 2124 #endif 2125#endif`,zG=`float specularStrength; 2126#ifdef USE_SPECULARMAP 2127 vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); 2128 specularStrength = texelSpecular.r; 2129#else 2130 specularStrength = 1.0; 2131#endif`,BG=`#ifdef USE_SPECULARMAP 2132 uniform sampler2D specularMap; 2133#endif`,VG=`#if defined( TONE_MAPPING ) 2134 gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); 2135#endif`,FG=`#ifndef saturate 2136#define saturate( a ) clamp( a, 0.0, 1.0 ) 2137#endif 2138uniform float toneMappingExposure; 2139vec3 LinearToneMapping( vec3 color ) { 2140 return saturate( toneMappingExposure * color ); 2141} 2142vec3 ReinhardToneMapping( vec3 color ) { 2143 color *= toneMappingExposure; 2144 return saturate( color / ( vec3( 1.0 ) + color ) ); 2145} 2146vec3 CineonToneMapping( vec3 color ) { 2147 color *= toneMappingExposure; 2148 color = max( vec3( 0.0 ), color - 0.004 ); 2149 return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); 2150} 2151vec3 RRTAndODTFit( vec3 v ) { 2152 vec3 a = v * ( v + 0.0245786 ) - 0.000090537; 2153 vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; 2154 return a / b; 2155} 2156vec3 ACESFilmicToneMapping( vec3 color ) { 2157 const mat3 ACESInputMat = mat3( 2158 vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), 2159 vec3( 0.04823, 0.01566, 0.83777 ) 2160 ); 2161 const mat3 ACESOutputMat = mat3( 2162 vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), 2163 vec3( -0.07367, -0.00605, 1.07602 ) 2164 ); 2165 color *= toneMappingExposure / 0.6; 2166 color = ACESInputMat * color; 2167 color = RRTAndODTFit( color ); 2168 color = ACESOutputMat * color; 2169 return saturate( color ); 2170} 2171const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3( 2172 vec3( 1.6605, - 0.1246, - 0.0182 ), 2173 vec3( - 0.5876, 1.1329, - 0.1006 ), 2174 vec3( - 0.0728, - 0.0083, 1.1187 ) 2175); 2176const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3( 2177 vec3( 0.6274, 0.0691, 0.0164 ), 2178 vec3( 0.3293, 0.9195, 0.0880 ), 2179 vec3( 0.0433, 0.0113, 0.8956 ) 2180); 2181vec3 agxDefaultContrastApprox( vec3 x ) { 2182 vec3 x2 = x * x; 2183 vec3 x4 = x2 * x2; 2184 return + 15.5 * x4 * x2 2185 - 40.14 * x4 * x 2186 + 31.96 * x4 2187 - 6.868 * x2 * x 2188 + 0.4298 * x2 2189 + 0.1191 * x 2190 - 0.00232; 2191} 2192vec3 AgXToneMapping( vec3 color ) { 2193 const mat3 AgXInsetMatrix = mat3( 2194 vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ), 2195 vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ), 2196 vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 ) 2197 );
2198 const mat3 AgXOutsetMatrix = mat3( 2199 vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ), 2200 vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ), 2201 vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 ) 2202 ); 2203 const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069; 2204 color *= toneMappingExposure; 2205 color = LINEAR_SRGB_TO_LINEAR_REC2020 * color; 2206 color = AgXInsetMatrix * color; 2207 color = max( color, 1e-10 ); color = log2( color ); 2208 color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv ); 2209 color = clamp( color, 0.0, 1.0 ); 2210 color = agxDefaultContrastApprox( color ); 2211 color = AgXOutsetMatrix * color; 2212 color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) ); 2213 color = LINEAR_REC2020_TO_LINEAR_SRGB * color; 2214 color = clamp( color, 0.0, 1.0 ); 2215 return color; 2216} 2217vec3 NeutralToneMapping( vec3 color ) { 2218 const float StartCompression = 0.8 - 0.04; 2219 const float Desaturation = 0.15; 2220 color *= toneMappingExposure; 2221 float x = min( color.r, min( color.g, color.b ) ); 2222 float offset = x < 0.08 ? x - 6.25 * x * x : 0.04; 2223 color -= offset; 2224 float peak = max( color.r, max( color.g, color.b ) ); 2225 if ( peak < StartCompression ) return color; 2226 float d = 1. - StartCompression; 2227 float newPeak = 1. - d * d / ( peak + d - StartCompression ); 2228 color *= newPeak / peak; 2229 float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. ); 2230 return mix( color, vec3( newPeak ), g ); 2231} 2232vec3 CustomToneMapping( vec3 color ) { return color; }`,kG=`#ifdef USE_TRANSMISSION 2233 material.transmission = transmission; 2234 material.transmissionAlpha = 1.0; 2235 material.thickness = thickness; 2236 material.attenuationDistance = attenuationDistance; 2237 material.attenuationColor = attenuationColor; 2238 #ifdef USE_TRANSMISSIONMAP 2239 material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r; 2240 #endif 2241 #ifdef USE_THICKNESSMAP 2242 material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g; 2243 #endif 2244 vec3 pos = vWorldPosition; 2245 vec3 v = normalize( cameraPosition - pos ); 2246 vec3 n = inverseTransformDirection( normal, viewMatrix ); 2247 vec4 transmitted = getIBLVolumeRefraction( 2248 n, v, material.roughness, material.diffuseContribution, material.specularColorBlended, material.specularF90, 2249 pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness, 2250 material.attenuationColor, material.attenuationDistance ); 2251 material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); 2252 totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); 2253#endif`,HG=`#ifdef USE_TRANSMISSION 2254 uniform float transmission; 2255 uniform float thickness; 2256 uniform float attenuationDistance; 2257 uniform vec3 attenuationColor; 2258 #ifdef USE_TRANSMISSIONMAP 2259 uniform sampler2D transmissionMap; 2260 #endif 2261 #ifdef USE_THICKNESSMAP 2262 uniform sampler2D thicknessMap; 2263 #endif 2264 uniform vec2 transmissionSamplerSize; 2265 uniform sampler2D transmissionSamplerMap; 2266 uniform mat4 modelMatrix; 2267 uniform mat4 projectionMatrix; 2268 varying vec3 vWorldPosition; 2269 float w0( float a ) { 2270 return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 ); 2271 } 2272 float w1( float a ) { 2273 return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 ); 2274 } 2275 float w2( float a ){ 2276 return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 ); 2277 } 2278 float w3( float a ) { 2279 return ( 1.0 / 6.0 ) * ( a * a * a ); 2280 } 2281 float g0( float a ) { 2282 return w0( a ) + w1( a ); 2283 } 2284 float g1( float a ) { 2285 return w2( a ) + w3( a ); 2286 } 2287 float h0( float a ) { 2288 return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) ); 2289 } 2290 float h1( float a ) { 2291 return 1.0 + w3( a ) / ( w2( a ) + w3( a ) ); 2292 } 2293 vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) { 2294 uv = uv * texelSize.zw + 0.5; 2295 vec2 iuv = floor( uv ); 2296 vec2 fuv = fract( uv ); 2297 float g0x = g0( fuv.x ); 2298 float g1x = g1( fuv.x ); 2299 float h0x = h0( fuv.x ); 2300 float h1x = h1( fuv.x ); 2301 float h0y = h0( fuv.y ); 2302 float h1y = h1( fuv.y ); 2303 vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; 2304 vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; 2305 vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; 2306 vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; 2307 return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + 2308 g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); 2309 } 2310 vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) { 2311 vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) ); 2312 vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) ); 2313 vec2 fLodSizeInv = 1.0 / fLodSize; 2314 vec2 cLodSizeInv = 1.0 / cLodSize; 2315 vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) ); 2316 vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) ); 2317 return mix( fSample, cSample, fract( lod ) ); 2318 } 2319 vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { 2320 vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); 2321 vec3 modelScale; 2322 modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); 2323 modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); 2324 modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); 2325 return normalize( refractionVector ) * thickness * modelScale; 2326 } 2327 float applyIorToRoughness( const in float roughness, const in float ior ) { 2328 return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); 2329 } 2330 vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { 2331 float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); 2332 return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod ); 2333 } 2334 vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { 2335 if ( isinf( attenuationDistance ) ) { 2336 return vec3( 1.0 ); 2337 } else { 2338 vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; 2339 vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance; 2340 } 2341 } 2342 vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, 2343 const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, 2344 const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness, 2345 const in vec3 attenuationColor, const in float attenuationDistance ) { 2346 vec4 transmittedLight; 2347 vec3 transmittance; 2348 #ifdef USE_DISPERSION 2349 float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion; 2350 vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread ); 2351 for ( int i = 0; i < 3; i ++ ) { 2352 vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix ); 2353 vec3 refractedRayExit = position + transmissionRay; 2354 vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); 2355 vec2 refractionCoords = ndcPos.xy / ndcPos.w; 2356 refractionCoords += 1.0; 2357 refractionCoords /= 2.0; 2358 vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] ); 2359 transmittedLight[ i ] = transmissionSample[ i ]; 2360 transmittedLight.a += transmissionSample.a; 2361 transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ]; 2362 } 2363 transmittedLight.a /= 3.0; 2364 #else 2365 vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); 2366 vec3 refractedRayExit = position + transmissionRay; 2367 vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); 2368 vec2 refractionCoords = ndcPos.xy / ndcPos.w; 2369 refractionCoords += 1.0; 2370 refractionCoords /= 2.0; 2371 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); 2372 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance ); 2373 #endif 2374 vec3 attenuatedColor = transmittance * transmittedLight.rgb; 2375 vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); 2376 float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; 2377 return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); 2378 } 2379#endif`,GG=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2380 varying vec2 vUv; 2381#endif 2382#ifdef USE_MAP 2383 varying vec2 vMapUv; 2384#endif 2385#ifdef USE_ALPHAMAP
2386 varying vec2 vAlphaMapUv; 2387#endif 2388#ifdef USE_LIGHTMAP 2389 varying vec2 vLightMapUv; 2390#endif 2391#ifdef USE_AOMAP 2392 varying vec2 vAoMapUv; 2393#endif 2394#ifdef USE_BUMPMAP 2395 varying vec2 vBumpMapUv; 2396#endif 2397#ifdef USE_NORMALMAP 2398 varying vec2 vNormalMapUv; 2399#endif 2400#ifdef USE_EMISSIVEMAP 2401 varying vec2 vEmissiveMapUv; 2402#endif 2403#ifdef USE_METALNESSMAP 2404 varying vec2 vMetalnessMapUv; 2405#endif 2406#ifdef USE_ROUGHNESSMAP 2407 varying vec2 vRoughnessMapUv; 2408#endif 2409#ifdef USE_ANISOTROPYMAP 2410 varying vec2 vAnisotropyMapUv; 2411#endif 2412#ifdef USE_CLEARCOATMAP 2413 varying vec2 vClearcoatMapUv; 2414#endif 2415#ifdef USE_CLEARCOAT_NORMALMAP 2416 varying vec2 vClearcoatNormalMapUv; 2417#endif 2418#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2419 varying vec2 vClearcoatRoughnessMapUv; 2420#endif 2421#ifdef USE_IRIDESCENCEMAP 2422 varying vec2 vIridescenceMapUv; 2423#endif 2424#ifdef USE_IRIDESCENCE_THICKNESSMAP 2425 varying vec2 vIridescenceThicknessMapUv; 2426#endif 2427#ifdef USE_SHEEN_COLORMAP 2428 varying vec2 vSheenColorMapUv; 2429#endif 2430#ifdef USE_SHEEN_ROUGHNESSMAP 2431 varying vec2 vSheenRoughnessMapUv; 2432#endif 2433#ifdef USE_SPECULARMAP 2434 varying vec2 vSpecularMapUv; 2435#endif 2436#ifdef USE_SPECULAR_COLORMAP 2437 varying vec2 vSpecularColorMapUv; 2438#endif 2439#ifdef USE_SPECULAR_INTENSITYMAP 2440 varying vec2 vSpecularIntensityMapUv; 2441#endif 2442#ifdef USE_TRANSMISSIONMAP 2443 uniform mat3 transmissionMapTransform; 2444 varying vec2 vTransmissionMapUv; 2445#endif 2446#ifdef USE_THICKNESSMAP 2447 uniform mat3 thicknessMapTransform; 2448 varying vec2 vThicknessMapUv; 2449#endif`,jG=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2450 varying vec2 vUv; 2451#endif 2452#ifdef USE_MAP 2453 uniform mat3 mapTransform; 2454 varying vec2 vMapUv; 2455#endif 2456#ifdef USE_ALPHAMAP 2457 uniform mat3 alphaMapTransform; 2458 varying vec2 vAlphaMapUv; 2459#endif 2460#ifdef USE_LIGHTMAP 2461 uniform mat3 lightMapTransform; 2462 varying vec2 vLightMapUv; 2463#endif 2464#ifdef USE_AOMAP 2465 uniform mat3 aoMapTransform; 2466 varying vec2 vAoMapUv; 2467#endif 2468#ifdef USE_BUMPMAP 2469 uniform mat3 bumpMapTransform; 2470 varying vec2 vBumpMapUv; 2471#endif 2472#ifdef USE_NORMALMAP 2473 uniform mat3 normalMapTransform; 2474 varying vec2 vNormalMapUv; 2475#endif 2476#ifdef USE_DISPLACEMENTMAP 2477 uniform mat3 displacementMapTransform; 2478 varying vec2 vDisplacementMapUv; 2479#endif 2480#ifdef USE_EMISSIVEMAP 2481 uniform mat3 emissiveMapTransform; 2482 varying vec2 vEmissiveMapUv; 2483#endif 2484#ifdef USE_METALNESSMAP 2485 uniform mat3 metalnessMapTransform; 2486 varying vec2 vMetalnessMapUv; 2487#endif 2488#ifdef USE_ROUGHNESSMAP 2489 uniform mat3 roughnessMapTransform; 2490 varying vec2 vRoughnessMapUv; 2491#endif 2492#ifdef USE_ANISOTROPYMAP 2493 uniform mat3 anisotropyMapTransform; 2494 varying vec2 vAnisotropyMapUv; 2495#endif 2496#ifdef USE_CLEARCOATMAP 2497 uniform mat3 clearcoatMapTransform; 2498 varying vec2 vClearcoatMapUv; 2499#endif 2500#ifdef USE_CLEARCOAT_NORMALMAP 2501 uniform mat3 clearcoatNormalMapTransform; 2502 varying vec2 vClearcoatNormalMapUv; 2503#endif 2504#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2505 uniform mat3 clearcoatRoughnessMapTransform; 2506 varying vec2 vClearcoatRoughnessMapUv; 2507#endif 2508#ifdef USE_SHEEN_COLORMAP 2509 uniform mat3 sheenColorMapTransform; 2510 varying vec2 vSheenColorMapUv; 2511#endif 2512#ifdef USE_SHEEN_ROUGHNESSMAP 2513 uniform mat3 sheenRoughnessMapTransform; 2514 varying vec2 vSheenRoughnessMapUv; 2515#endif 2516#ifdef USE_IRIDESCENCEMAP 2517 uniform mat3 iridescenceMapTransform; 2518 varying vec2 vIridescenceMapUv; 2519#endif 2520#ifdef USE_IRIDESCENCE_THICKNESSMAP 2521 uniform mat3 iridescenceThicknessMapTransform; 2522 varying vec2 vIridescenceThicknessMapUv; 2523#endif 2524#ifdef USE_SPECULARMAP 2525 uniform mat3 specularMapTransform; 2526 varying vec2 vSpecularMapUv; 2527#endif 2528#ifdef USE_SPECULAR_COLORMAP 2529 uniform mat3 specularColorMapTransform; 2530 varying vec2 vSpecularColorMapUv; 2531#endif 2532#ifdef USE_SPECULAR_INTENSITYMAP 2533 uniform mat3 specularIntensityMapTransform; 2534 varying vec2 vSpecularIntensityMapUv; 2535#endif 2536#ifdef USE_TRANSMISSIONMAP 2537 uniform mat3 transmissionMapTransform; 2538 varying vec2 vTransmissionMapUv; 2539#endif 2540#ifdef USE_THICKNESSMAP 2541 uniform mat3 thicknessMapTransform; 2542 varying vec2 vThicknessMapUv; 2543#endif`,WG=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2544 vUv = vec3( uv, 1 ).xy; 2545#endif 2546#ifdef USE_MAP 2547 vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy; 2548#endif 2549#ifdef USE_ALPHAMAP 2550 vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy; 2551#endif 2552#ifdef USE_LIGHTMAP 2553 vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy; 2554#endif 2555#ifdef USE_AOMAP 2556 vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy; 2557#endif 2558#ifdef USE_BUMPMAP 2559 vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy; 2560#endif 2561#ifdef USE_NORMALMAP 2562 vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy; 2563#endif 2564#ifdef USE_DISPLACEMENTMAP 2565 vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy; 2566#endif 2567#ifdef USE_EMISSIVEMAP 2568 vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy; 2569#endif 2570#ifdef USE_METALNESSMAP 2571 vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy; 2572#endif 2573#ifdef USE_ROUGHNESSMAP 2574 vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy; 2575#endif 2576#ifdef USE_ANISOTROPYMAP 2577 vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy; 2578#endif 2579#ifdef USE_CLEARCOATMAP 2580 vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy; 2581#endif 2582#ifdef USE_CLEARCOAT_NORMALMAP 2583 vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy; 2584#endif 2585#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2586 vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy; 2587#endif
2588#ifdef USE_IRIDESCENCEMAP 2589 vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy; 2590#endif 2591#ifdef USE_IRIDESCENCE_THICKNESSMAP 2592 vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy; 2593#endif 2594#ifdef USE_SHEEN_COLORMAP 2595 vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy; 2596#endif 2597#ifdef USE_SHEEN_ROUGHNESSMAP 2598 vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy; 2599#endif 2600#ifdef USE_SPECULARMAP 2601 vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy; 2602#endif 2603#ifdef USE_SPECULAR_COLORMAP 2604 vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy; 2605#endif 2606#ifdef USE_SPECULAR_INTENSITYMAP 2607 vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy; 2608#endif 2609#ifdef USE_TRANSMISSIONMAP 2610 vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy; 2611#endif 2612#ifdef USE_THICKNESSMAP 2613 vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; 2614#endif`,XG=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 2615 vec4 worldPosition = vec4( transformed, 1.0 ); 2616 #ifdef USE_BATCHING 2617 worldPosition = batchingMatrix * worldPosition; 2618 #endif 2619 #ifdef USE_INSTANCING 2620 worldPosition = instanceMatrix * worldPosition; 2621 #endif 2622 worldPosition = modelMatrix * worldPosition; 2623#endif`;const qG=`varying vec2 vUv; 2624uniform mat3 uvTransform; 2625void main() { 2626 vUv = ( uvTransform * vec3( uv, 1 ) ).xy; 2627 gl_Position = vec4( position.xy, 1.0, 1.0 ); 2628}`,YG=`uniform sampler2D t2D; 2629uniform float backgroundIntensity; 2630varying vec2 vUv; 2631void main() { 2632 vec4 texColor = texture2D( t2D, vUv ); 2633 #ifdef DECODE_VIDEO_TEXTURE 2634 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 ); 2635 #endif 2636 texColor.rgb *= backgroundIntensity; 2637 gl_FragColor = texColor; 2638 #include <tonemapping_fragment> 2639 #include <colorspace_fragment> 2640}`,ZG=`varying vec3 vWorldDirection; 2641#include <common> 2642void main() { 2643 vWorldDirection = transformDirection( position, modelMatrix ); 2644 #include <begin_vertex> 2645 #include <project_vertex> 2646 gl_Position.z = gl_Position.w; 2647}`,KG=`#ifdef ENVMAP_TYPE_CUBE 2648 uniform samplerCube envMap; 2649#elif defined( ENVMAP_TYPE_CUBE_UV ) 2650 uniform sampler2D envMap; 2651#endif 2652uniform float backgroundBlurriness; 2653uniform float backgroundIntensity; 2654uniform mat3 backgroundRotation; 2655varying vec3 vWorldDirection; 2656#include <cube_uv_reflection_fragment> 2657void main() { 2658 #ifdef ENVMAP_TYPE_CUBE 2659 vec4 texColor = textureCube( envMap, backgroundRotation * vWorldDirection ); 2660 #elif defined( ENVMAP_TYPE_CUBE_UV ) 2661 vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness ); 2662 #else 2663 vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); 2664 #endif 2665 texColor.rgb *= backgroundIntensity; 2666 gl_FragColor = texColor; 2667 #include <tonemapping_fragment> 2668 #include <colorspace_fragment> 2669}`,$G=`varying vec3 vWorldDirection; 2670#include <common> 2671void main() { 2672 vWorldDirection = transformDirection( position, modelMatrix ); 2673 #include <begin_vertex> 2674 #include <project_vertex> 2675 gl_Position.z = gl_Position.w; 2676}`,QG=`uniform samplerCube tCube; 2677uniform float tFlip; 2678uniform float opacity; 2679varying vec3 vWorldDirection; 2680void main() { 2681 vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); 2682 gl_FragColor = texColor; 2683 gl_FragColor.a *= opacity; 2684 #include <tonemapping_fragment> 2685 #include <colorspace_fragment> 2686}`,JG=`#include <common> 2687#include <batching_pars_vertex> 2688#include <uv_pars_vertex> 2689#include <displacementmap_pars_vertex> 2690#include <morphtarget_pars_vertex> 2691#include <skinning_pars_vertex> 2692#include <logdepthbuf_pars_vertex> 2693#include <clipping_planes_pars_vertex> 2694varying vec2 vHighPrecisionZW; 2695void main() { 2696 #include <uv_vertex> 2697 #include <batching_vertex> 2698 #include <skinbase_vertex> 2699 #include <morphinstance_vertex> 2700 #ifdef USE_DISPLACEMENTMAP 2701 #include <beginnormal_vertex> 2702 #include <morphnormal_vertex> 2703 #include <skinnormal_vertex> 2704 #endif 2705 #include <begin_vertex> 2706 #include <morphtarget_vertex> 2707 #include <skinning_vertex> 2708 #include <displacementmap_vertex> 2709 #include <project_vertex> 2710 #include <logdepthbuf_vertex> 2711 #include <clipping_planes_vertex> 2712 vHighPrecisionZW = gl_Position.zw; 2713}`,e7=`#if DEPTH_PACKING == 3200 2714 uniform float opacity; 2715#endif 2716#include <common> 2717#include <packing> 2718#include <uv_pars_fragment> 2719#include <map_pars_fragment> 2720#include <alphamap_pars_fragment> 2721#include <alphatest_pars_fragment> 2722#include <alphahash_pars_fragment> 2723#include <logdepthbuf_pars_fragment> 2724#include <clipping_planes_pars_fragment> 2725varying vec2 vHighPrecisionZW; 2726void main() { 2727 vec4 diffuseColor = vec4( 1.0 ); 2728 #include <clipping_planes_fragment> 2729 #if DEPTH_PACKING == 3200 2730 diffuseColor.a = opacity; 2731 #endif 2732 #include <map_fragment> 2733 #include <alphamap_fragment> 2734 #include <alphatest_fragment> 2735 #include <alphahash_fragment> 2736 #include <logdepthbuf_fragment> 2737 #ifdef USE_REVERSED_DEPTH_BUFFER 2738 float fragCoordZ = vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ]; 2739 #else 2740 float fragCoordZ = 0.5 * vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ] + 0.5; 2741 #endif 2742 #if DEPTH_PACKING == 3200 2743 gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); 2744 #elif DEPTH_PACKING == 3201 2745 gl_FragColor = packDepthToRGBA( fragCoordZ ); 2746 #elif DEPTH_PACKING == 3202 2747 gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 ); 2748 #elif DEPTH_PACKING == 3203 2749 gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 ); 2750 #endif 2751}`,t7=`#define DISTANCE 2752varying vec3 vWorldPosition; 2753#include <common> 2754#include <batching_pars_vertex> 2755#include <uv_pars_vertex> 2756#include <displacementmap_pars_vertex> 2757#include <morphtarget_pars_vertex> 2758#include <skinning_pars_vertex> 2759#include <clipping_planes_pars_vertex> 2760void main() { 2761 #include <uv_vertex> 2762 #include <batching_vertex> 2763 #include <skinbase_vertex> 2764 #include <morphinstance_vertex> 2765 #ifdef USE_DISPLACEMENTMAP 2766 #include <beginnormal_vertex> 2767 #include <morphnormal_vertex> 2768 #include <skinnormal_vertex> 2769 #endif 2770 #include <begin_vertex> 2771 #include <morphtarget_vertex> 2772 #include <skinning_vertex> 2773 #include <displacementmap_vertex> 2774 #include <project_vertex> 2775 #include <worldpos_vertex> 2776 #include <clipping_planes_vertex> 2777 vWorldPosition = worldPosition.xyz; 2778}`,n7=`#define DISTANCE 2779uniform vec3 referencePosition; 2780uniform float nearDistance; 2781uniform float farDistance; 2782varying vec3 vWorldPosition; 2783#include <common> 2784#include <uv_pars_fragment> 2785#include <map_pars_fragment> 2786#include <alphamap_pars_fragment> 2787#include <alphatest_pars_fragment> 2788#include <alphahash_pars_fragment> 2789#include <clipping_planes_pars_fragment> 2790void main () { 2791 vec4 diffuseColor = vec4( 1.0 ); 2792 #include <clipping_planes_fragment> 2793 #include <map_fragment> 2794 #include <alphamap_fragment> 2795 #include <alphatest_fragment> 2796 #include <alphahash_fragment> 2797 float dist = length( vWorldPosition - referencePosition ); 2798 dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); 2799 dist = saturate( dist ); 2800 gl_FragColor = vec4( dist, 0.0, 0.0, 1.0 ); 2801}`,i7=`varying vec3 vWorldDirection; 2802#include <common> 2803void main() { 2804 vWorldDirection = transformDirection( position, modelMatrix ); 2805 #include <begin_vertex> 2806 #include <project_vertex> 2807}`,s7=`uniform sampler2D tEquirect; 2808varying vec3 vWorldDirection; 2809#include <common> 2810void main() { 2811 vec3 direction = normalize( vWorldDirection ); 2812 vec2 sampleUV = equirectUv( direction ); 2813 gl_FragColor = texture2D( tEquirect, sampleUV ); 2814 #include <tonemapping_fragment> 2815 #include <colorspace_fragment> 2816}`,a7=`uniform float scale; 2817attribute float lineDistance; 2818varying float vLineDistance; 2819#include <common> 2820#include <uv_pars_vertex> 2821#include <color_pars_vertex> 2822#include <fog_pars_vertex> 2823#include <morphtarget_pars_vertex> 2824#include <logdepthbuf_pars_vertex> 2825#include <clipping_planes_pars_vertex> 2826void main() { 2827 vLineDistance = scale * lineDistance; 2828 #include <uv_vertex> 2829 #include <color_vertex> 2830 #include <morphinstance_vertex> 2831 #include <morphcolor_vertex> 2832 #include <begin_vertex> 2833 #include <morphtarget_vertex> 2834 #include <project_vertex> 2835 #include <logdepthbuf_vertex> 2836 #include <clipping_planes_vertex> 2837 #include <fog_vertex> 2838}`,r7=`uniform vec3 diffuse; 2839uniform float opacity; 2840uniform float dashSize; 2841uniform float totalSize; 2842varying float vLineDistance; 2843#include <common> 2844#include <color_pars_fragment> 2845#include <uv_pars_fragment> 2846#include <map_pars_fragment> 2847#include <fog_pars_fragment> 2848#include <logdepthbuf_pars_fragment> 2849#include <clipping_planes_pars_fragment> 2850void main() { 2851 vec4 diffuseColor = vec4( diffuse, opacity ); 2852 #include <clipping_planes_fragment> 2853 if ( mod( vLineDistance, totalSize ) > dashSize ) { 2854 discard; 2855 } 2856 vec3 outgoingLight = vec3( 0.0 ); 2857 #include <logdepthbuf_fragment> 2858 #include <map_fragment> 2859 #include <color_fragment> 2860 outgoingLight = diffuseColor.rgb; 2861 #include <opaque_fragment> 2862 #include <tonemapping_fragment> 2863 #include <colorspace_fragment> 2864 #include <fog_fragment> 2865 #include <premultiplied_alpha_fragment> 2866}`,o7=`#include <common> 2867#include <batching_pars_vertex> 2868#include <uv_pars_vertex> 2869#include <envmap_pars_vertex> 2870#include <color_pars_vertex> 2871#include <fog_pars_vertex> 2872#include <morphtarget_pars_vertex> 2873#include <skinning_pars_vertex> 2874#include <logdepthbuf_pars_vertex> 2875#include <clipping_planes_pars_vertex> 2876void main() { 2877 #include <uv_vertex> 2878 #include <color_vertex> 2879 #include <morphinstance_vertex> 2880 #include <morphcolor_vertex> 2881 #include <batching_vertex> 2882 #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) 2883 #include <beginnormal_vertex> 2884 #include <morphnormal_vertex> 2885 #include <skinbase_vertex> 2886 #include <skinnormal_vertex> 2887 #include <defaultnormal_vertex> 2888 #endif 2889 #include <begin_vertex> 2890 #include <morphtarget_vertex> 2891 #include <skinning_vertex> 2892 #include <project_vertex> 2893 #include <logdepthbuf_vertex> 2894 #include <clipping_planes_vertex> 2895 #include <worldpos_vertex> 2896 #include <envmap_vertex> 2897 #include <fog_vertex> 2898}`,l7=`uniform vec3 diffuse; 2899uniform float opacity; 2900#ifndef FLAT_SHADED 2901 varying vec3 vNormal; 2902#endif 2903#include <common> 2904#include <dithering_pars_fragment> 2905#include <color_pars_fragment> 2906#include <uv_pars_fragment> 2907#include <map_pars_fragment> 2908#include <alphamap_pars_fragment> 2909#include <alphatest_pars_fragment> 2910#include <alphahash_pars_fragment> 2911#include <aomap_pars_fragment> 2912#include <lightmap_pars_fragment> 2913#include <envmap_common_pars_fragment> 2914#include <envmap_pars_fragment> 2915#include <fog_pars_fragment> 2916#include <specularmap_pars_fragment> 2917#include <logdepthbuf_pars_fragment> 2918#include <clipping_planes_pars_fragment> 2919void main() { 2920 vec4 diffuseColor = vec4( diffuse, opacity ); 2921 #include <clipping_planes_fragment> 2922 #include <logdepthbuf_fragment> 2923 #include <map_fragment> 2924 #include <color_fragment> 2925 #include <alphamap_fragment> 2926 #include <alphatest_fragment> 2927 #include <alphahash_fragment> 2928 #include <specularmap_fragment> 2929 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 2930 #ifdef USE_LIGHTMAP 2931 vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); 2932 reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; 2933 #else 2934 reflectedLight.indirectDiffuse += vec3( 1.0 ); 2935 #endif 2936 #include <aomap_fragment> 2937 reflectedLight.indirectDiffuse *= diffuseColor.rgb; 2938 vec3 outgoingLight = reflectedLight.indirectDiffuse; 2939 #include <envmap_fragment> 2940 #include <opaque_fragment> 2941 #include <tonemapping_fragment> 2942 #include <colorspace_fragment> 2943 #include <fog_fragment> 2944 #include <premultiplied_alpha_fragment> 2945 #include <dithering_fragment> 2946}`,c7=`#define LAMBERT 2947varying vec3 vViewPosition; 2948#include <common> 2949#include <batching_pars_vertex> 2950#include <uv_pars_vertex> 2951#include <displacementmap_pars_vertex> 2952#include <envmap_pars_vertex> 2953#include <color_pars_vertex> 2954#include <fog_pars_vertex> 2955#include <normal_pars_vertex> 2956#include <morphtarget_pars_vertex> 2957#include <skinning_pars_vertex> 2958#include <shadowmap_pars_vertex> 2959#include <logdepthbuf_pars_vertex> 2960#include <clipping_planes_pars_vertex> 2961void main() { 2962 #include <uv_vertex> 2963 #include <color_vertex> 2964 #include <morphinstance_vertex> 2965 #include <morphcolor_vertex> 2966 #include <batching_vertex> 2967 #include <beginnormal_vertex> 2968 #include <morphnormal_vertex> 2969 #include <skinbase_vertex> 2970 #include <skinnormal_vertex> 2971 #include <defaultnormal_vertex> 2972 #include <normal_vertex> 2973 #include <begin_vertex> 2974 #include <morphtarget_vertex> 2975 #include <skinning_vertex> 2976 #include <displacementmap_vertex> 2977 #include <project_vertex> 2978 #include <logdepthbuf_vertex> 2979 #include <clipping_planes_vertex> 2980 vViewPosition = - mvPosition.xyz; 2981 #include <worldpos_vertex> 2982 #include <envmap_vertex> 2983 #include <shadowmap_vertex> 2984 #include <fog_vertex> 2985}`,u7=`#define LAMBERT 2986uniform vec3 diffuse; 2987uniform vec3 emissive; 2988uniform float opacity; 2989#include <common> 2990#include <dithering_pars_fragment> 2991#include <color_pars_fragment> 2992#include <uv_pars_fragment> 2993#include <map_pars_fragment> 2994#include <alphamap_pars_fragment> 2995#include <alphatest_pars_fragment> 2996#include <alphahash_pars_fragment> 2997#include <aomap_pars_fragment> 2998#include <lightmap_pars_fragment> 2999#include <emissivemap_pars_fragment> 3000#include <cube_uv_reflection_fragment> 3001#include <envmap_common_pars_fragment> 3002#include <envmap_pars_fragment> 3003#include <envmap_physical_pars_fragment> 3004#include <fog_pars_fragment> 3005#include <bsdfs> 3006#include <lights_pars_begin> 3007#include <normal_pars_fragment> 3008#include <lights_lambert_pars_fragment> 3009#include <shadowmap_pars_fragment> 3010#include <bumpmap_pars_fragment> 3011#include <normalmap_pars_fragment> 3012#include <specularmap_pars_fragment> 3013#include <logdepthbuf_pars_fragment> 3014#include <clipping_planes_pars_fragment> 3015void main() { 3016 vec4 diffuseColor = vec4( diffuse, opacity ); 3017 #include <clipping_planes_fragment> 3018 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3019 vec3 totalEmissiveRadiance = emissive; 3020 #include <logdepthbuf_fragment> 3021 #include <map_fragment> 3022 #include <color_fragment> 3023 #include <alphamap_fragment> 3024 #include <alphatest_fragment> 3025 #include <alphahash_fragment> 3026 #include <specularmap_fragment> 3027 #include <normal_fragment_begin> 3028 #include <normal_fragment_maps> 3029 #include <emissivemap_fragment> 3030 #include <lights_lambert_fragment> 3031 #include <lights_fragment_begin> 3032 #include <lights_fragment_maps> 3033 #include <lights_fragment_end> 3034 #include <aomap_fragment> 3035 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; 3036 #include <envmap_fragment> 3037 #include <opaque_fragment> 3038 #include <tonemapping_fragment> 3039 #include <colorspace_fragment> 3040 #include <fog_fragment> 3041 #include <premultiplied_alpha_fragment> 3042 #include <dithering_fragment> 3043}`,d7=`#define MATCAP 3044varying vec3 vViewPosition; 3045#include <common> 3046#include <batching_pars_vertex> 3047#include <uv_pars_vertex> 3048#include <color_pars_vertex> 3049#include <displacementmap_pars_vertex> 3050#include <fog_pars_vertex> 3051#include <normal_pars_vertex> 3052#include <morphtarget_pars_vertex> 3053#include <skinning_pars_vertex> 3054#include <logdepthbuf_pars_vertex> 3055#include <clipping_planes_pars_vertex> 3056void main() { 3057 #include <uv_vertex> 3058 #include <color_vertex> 3059 #include <morphinstance_vertex> 3060 #include <morphcolor_vertex> 3061 #include <batching_vertex> 3062 #include <beginnormal_vertex> 3063 #include <morphnormal_vertex> 3064 #include <skinbase_vertex> 3065 #include <skinnormal_vertex> 3066 #include <defaultnormal_vertex> 3067 #include <normal_vertex> 3068 #include <begin_vertex> 3069 #include <morphtarget_vertex> 3070 #include <skinning_vertex> 3071 #include <displacementmap_vertex> 3072 #include <project_vertex> 3073 #include <logdepthbuf_vertex> 3074 #include <clipping_planes_vertex> 3075 #include <fog_vertex> 3076 vViewPosition = - mvPosition.xyz; 3077}`,h7=`#define MATCAP 3078uniform vec3 diffuse; 3079uniform float opacity; 3080uniform sampler2D matcap; 3081varying vec3 vViewPosition; 3082#include <common> 3083#include <dithering_pars_fragment> 3084#include <color_pars_fragment> 3085#include <uv_pars_fragment> 3086#include <map_pars_fragment> 3087#include <alphamap_pars_fragment> 3088#include <alphatest_pars_fragment> 3089#include <alphahash_pars_fragment> 3090#include <fog_pars_fragment> 3091#include <normal_pars_fragment> 3092#include <bumpmap_pars_fragment> 3093#include <normalmap_pars_fragme
3093nt> 3094#include <logdepthbuf_pars_fragment> 3095#include <clipping_planes_pars_fragment> 3096void main() { 3097 vec4 diffuseColor = vec4( diffuse, opacity ); 3098 #include <clipping_planes_fragment> 3099 #include <logdepthbuf_fragment> 3100 #include <map_fragment> 3101 #include <color_fragment> 3102 #include <alphamap_fragment> 3103 #include <alphatest_fragment> 3104 #include <alphahash_fragment> 3105 #include <normal_fragment_begin> 3106 #include <normal_fragment_maps> 3107 vec3 viewDir = normalize( vViewPosition ); 3108 vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); 3109 vec3 y = cross( viewDir, x ); 3110 vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; 3111 #ifdef USE_MATCAP 3112 vec4 matcapColor = texture2D( matcap, uv ); 3113 #else 3114 vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); 3115 #endif 3116 vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; 3117 #include <opaque_fragment> 3118 #include <tonemapping_fragment> 3119 #include <colorspace_fragment> 3120 #include <fog_fragment> 3121 #include <premultiplied_alpha_fragment> 3122 #include <dithering_fragment> 3123}`,f7=`#define NORMAL 3124#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3125 varying vec3 vViewPosition; 3126#endif 3127#include <common> 3128#include <batching_pars_vertex> 3129#include <uv_pars_vertex> 3130#include <displacementmap_pars_vertex> 3131#include <normal_pars_vertex> 3132#include <morphtarget_pars_vertex> 3133#include <skinning_pars_vertex> 3134#include <logdepthbuf_pars_vertex> 3135#include <clipping_planes_pars_vertex> 3136void main() { 3137 #include <uv_vertex> 3138 #include <batching_vertex> 3139 #include <beginnormal_vertex> 3140 #include <morphinstance_vertex> 3141 #include <morphnormal_vertex> 3142 #include <skinbase_vertex> 3143 #include <skinnormal_vertex> 3144 #include <defaultnormal_vertex> 3145 #include <normal_vertex> 3146 #include <begin_vertex> 3147 #include <morphtarget_vertex> 3148 #include <skinning_vertex> 3149 #include <displacementmap_vertex> 3150 #include <project_vertex> 3151 #include <logdepthbuf_vertex> 3152 #include <clipping_planes_vertex> 3153#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3154 vViewPosition = - mvPosition.xyz; 3155#endif 3156}`,p7=`#define NORMAL 3157uniform float opacity; 3158#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3159 varying vec3 vViewPosition; 3160#endif 3161#include <uv_pars_fragment> 3162#include <normal_pars_fragment> 3163#include <bumpmap_pars_fragment> 3164#include <normalmap_pars_fragment> 3165#include <logdepthbuf_pars_fragment> 3166#include <clipping_planes_pars_fragment> 3167void main() { 3168 vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity ); 3169 #include <clipping_planes_fragment> 3170 #include <logdepthbuf_fragment> 3171 #include <normal_fragment_begin> 3172 #include <normal_fragment_maps> 3173 gl_FragColor = vec4( normalize( normal ) * 0.5 + 0.5, diffuseColor.a ); 3174 #ifdef OPAQUE 3175 gl_FragColor.a = 1.0; 3176 #endif 3177}`,m7=`#define PHONG 3178varying vec3 vViewPosition; 3179#include <common> 3180#include <batching_pars_vertex> 3181#include <uv_pars_vertex> 3182#include <displacementmap_pars_vertex> 3183#include <envmap_pars_vertex> 3184#include <color_pars_vertex> 3185#include <fog_pars_vertex> 3186#include <normal_pars_vertex> 3187#include <morphtarget_pars_vertex> 3188#include <skinning_pars_vertex> 3189#include <shadowmap_pars_vertex> 3190#include <logdepthbuf_pars_vertex> 3191#include <clipping_planes_pars_vertex> 3192void main() { 3193 #include <uv_vertex> 3194 #include <color_vertex> 3195 #include <morphcolor_vertex> 3196 #include <batching_vertex> 3197 #include <beginnormal_vertex> 3198 #include <morphinstance_vertex> 3199 #include <morphnormal_vertex> 3200 #include <skinbase_vertex> 3201 #include <skinnormal_vertex> 3202 #include <defaultnormal_vertex> 3203 #include <normal_vertex> 3204 #include <begin_vertex> 3205 #include <morphtarget_vertex> 3206 #include <skinning_vertex> 3207 #include <displacementmap_vertex> 3208 #include <project_vertex> 3209 #include <logdepthbuf_vertex> 3210 #include <clipping_planes_vertex> 3211 vViewPosition = - mvPosition.xyz; 3212 #include <worldpos_vertex> 3213 #include <envmap_vertex> 3214 #include <shadowmap_vertex> 3215 #include <fog_vertex> 3216}`,g7=`#define PHONG 3217uniform vec3 diffuse; 3218uniform vec3 emissive; 3219uniform vec3 specular; 3220uniform float shininess; 3221uniform float opacity; 3222#include <common> 3223#include <dithering_pars_fragment> 3224#include <color_pars_fragment> 3225#include <uv_pars_fragment> 3226#include <map_pars_fragment> 3227#include <alphamap_pars_fragment> 3228#include <alphatest_pars_fragment> 3229#include <alphahash_pars_fragment> 3230#include <aomap_pars_fragment> 3231#include <lightmap_pars_fragment> 3232#include <emissivemap_pars_fragment> 3233#include <cube_uv_reflection_fragment> 3234#include <envmap_common_pars_fragment> 3235#include <envmap_pars_fragment> 3236#include <envmap_physical_pars_fragment> 3237#include <fog_pars_fragment> 3238#include <bsdfs> 3239#include <lights_pars_begin> 3240#include <normal_pars_fragment> 3241#include <lights_phong_pars_fragment> 3242#include <shadowmap_pars_fragment> 3243#include <bumpmap_pars_fragment> 3244#include <normalmap_pars_fragment> 3245#include <specularmap_pars_fragment> 3246#include <logdepthbuf_pars_fragment> 3247#include <clipping_planes_pars_fragment> 3248void main() { 3249 vec4 diffuseColor = vec4( diffuse, opacity ); 3250 #include <clipping_planes_fragment> 3251 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3252 vec3 totalEmissiveRadiance = emissive; 3253 #include <logdepthbuf_fragment> 3254 #include <map_fragment> 3255 #include <color_fragment> 3256 #include <alphamap_fragment> 3257 #include <alphatest_fragment> 3258 #include <alphahash_fragment> 3259 #include <specularmap_fragment> 3260 #include <normal_fragment_begin> 3261 #include <normal_fragment_maps> 3262 #include <emissivemap_fragment> 3263 #include <lights_phong_fragment> 3264 #include <lights_fragment_begin> 3265 #include <lights_fragment_maps> 3266 #include <lights_fragment_end> 3267 #include <aomap_fragment> 3268 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; 3269 #include <envmap_fragment> 3270 #include <opaque_fragment> 3271 #include <tonemapping_fragment> 3272 #include <colorspace_fragment> 3273 #include <fog_fragment> 3274 #include <premultiplied_alpha_fragment> 3275 #include <dithering_fragment> 3276}`,x7=`#define STANDARD 3277varying vec3 vViewPosition; 3278#ifdef USE_TRANSMISSION 3279 varying vec3 vWorldPosition; 3280#endif 3281#include <common> 3282#include <batching_pars_vertex> 3283#include <uv_pars_vertex> 3284#include <displacementmap_pars_vertex> 3285#include <color_pars_vertex> 3286#include <fog_pars_vertex> 3287#include <normal_pars_vertex> 3288#include <morphtarget_pars_vertex> 3289#include <skinning_pars_vertex> 3290#include <shadowmap_pars_vertex> 3291#include <logdepthbuf_pars_vertex> 3292#include <clipping_planes_pars_vertex> 3293void main() { 3294 #include <uv_vertex> 3295 #include <color_vertex> 3296 #include <morphinstance_vertex> 3297 #include <morphcolor_vertex> 3298 #include <batching_vertex> 3299 #include <beginnormal_vertex> 3300 #include <morphnormal_vertex> 3301 #include <skinbase_vertex> 3302 #include <skinnormal_vertex> 3303 #include <defaultnormal_vertex> 3304 #include <normal_vertex> 3305 #include <begin_vertex> 3306 #include <morphtarget_vertex> 3307 #include <skinning_vertex> 3308 #include <displacementmap_vertex> 3309 #include <project_vertex> 3310 #include <logdepthbuf_vertex> 3311 #include <clipping_planes_vertex> 3312 vViewPosition = - mvPosition.xyz; 3313 #include <worldpos_vertex> 3314 #include <shadowmap_vertex> 3315 #include <fog_vertex> 3316#ifdef USE_TRANSMISSION 3317 vWorldPosition = worldPosition.xyz; 3318#endif 3319}`,y7=`#define STANDARD 3320#ifdef PHYSICAL 3321 #define IOR 3322 #define USE_SPECULAR 3323#endif 3324uniform vec3 diffuse; 3325uniform vec3 emissive; 3326uniform float roughness; 3327uniform float metalness; 3328uniform float opacity; 3329#ifdef IOR 3330 uniform float ior; 3331#endif 3332#ifdef USE_SPECULAR 3333 uniform float specularIntensity; 3334 uniform vec3 specularColor; 3335 #ifdef USE_SPECULAR_COLORMAP 3336 uniform sampler2D specularColorMap; 3337 #endif 3338 #ifdef USE_SPECULAR_INTENSITYMAP 3339 uniform sampler2D specularIntensityMap; 3340 #endif 3341#endif 3342#ifdef USE_CLEARCOAT 3343 uniform float clearcoat; 3344 uniform float clearcoatRoughness; 3345#endif 3346#ifdef USE_DISPERSION 3347 uniform float dispersion; 3348#endif
3349#ifdef USE_IRIDESCENCE 3350 uniform float iridescence; 3351 uniform float iridescenceIOR; 3352 uniform float iridescenceThicknessMinimum; 3353 uniform float iridescenceThicknessMaximum; 3354#endif 3355#ifdef USE_SHEEN 3356 uniform vec3 sheenColor; 3357 uniform float sheenRoughness; 3358 #ifdef USE_SHEEN_COLORMAP 3359 uniform sampler2D sheenColorMap; 3360 #endif 3361 #ifdef USE_SHEEN_ROUGHNESSMAP 3362 uniform sampler2D sheenRoughnessMap; 3363 #endif 3364#endif 3365#ifdef USE_ANISOTROPY 3366 uniform vec2 anisotropyVector; 3367 #ifdef USE_ANISOTROPYMAP 3368 uniform sampler2D anisotropyMap; 3369 #endif 3370#endif 3371varying vec3 vViewPosition; 3372#include <common> 3373#include <dithering_pars_fragment> 3374#include <color_pars_fragment> 3375#include <uv_pars_fragment> 3376#include <map_pars_fragment> 3377#include <alphamap_pars_fragment> 3378#include <alphatest_pars_fragment> 3379#include <alphahash_pars_fragment> 3380#include <aomap_pars_fragment> 3381#include <lightmap_pars_fragment> 3382#include <emissivemap_pars_fragment> 3383#include <iridescence_fragment> 3384#include <cube_uv_reflection_fragment> 3385#include <envmap_common_pars_fragment> 3386#include <envmap_physical_pars_fragment> 3387#include <fog_pars_fragment> 3388#include <lights_pars_begin> 3389#include <normal_pars_fragment> 3390#include <lights_physical_pars_fragment> 3391#include <transmission_pars_fragment> 3392#include <shadowmap_pars_fragment> 3393#include <bumpmap_pars_fragment> 3394#include <normalmap_pars_fragment> 3395#include <clearcoat_pars_fragment> 3396#include <iridescence_pars_fragment> 3397#include <roughnessmap_pars_fragment> 3398#include <metalnessmap_pars_fragment> 3399#include <logdepthbuf_pars_fragment> 3400#include <clipping_planes_pars_fragment> 3401void main() { 3402 vec4 diffuseColor = vec4( diffuse, opacity ); 3403 #include <clipping_planes_fragment> 3404 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3405 vec3 totalEmissiveRadiance = emissive; 3406 #include <logdepthbuf_fragment> 3407 #include <map_fragment> 3408 #include <color_fragment> 3409 #include <alphamap_fragment> 3410 #include <alphatest_fragment> 3411 #include <alphahash_fragment> 3412 #include <roughnessmap_fragment> 3413 #include <metalnessmap_fragment> 3414 #include <normal_fragment_begin> 3415 #include <normal_fragment_maps> 3416 #include <clearcoat_normal_fragment_begin> 3417 #include <clearcoat_normal_fragment_maps> 3418 #include <emissivemap_fragment> 3419 #include <lights_physical_fragment> 3420 #include <lights_fragment_begin> 3421 #include <lights_fragment_maps> 3422 #include <lights_fragment_end> 3423 #include <aomap_fragment> 3424 vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; 3425 vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; 3426 #include <transmission_fragment> 3427 vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; 3428 #ifdef USE_SHEEN 3429 3430 outgoingLight = outgoingLight + sheenSpecularDirect + sheenSpecularIndirect; 3431 3432 #endif 3433 #ifdef USE_CLEARCOAT 3434 float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) ); 3435 vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); 3436 outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat; 3437 #endif 3438 #include <opaque_fragment> 3439 #include <tonemapping_fragment> 3440 #include <colorspace_fragment> 3441 #include <fog_fragment> 3442 #include <premultiplied_alpha_fragment> 3443 #include <dithering_fragment> 3444}`,v7=`#define TOON 3445varying vec3 vViewPosition; 3446#include <common> 3447#include <batching_pars_vertex> 3448#include <uv_pars_vertex> 3449#include <displacementmap_pars_vertex> 3450#include <color_pars_vertex> 3451#include <fog_pars_vertex> 3452#include <normal_pars_vertex> 3453#include <morphtarget_pars_vertex> 3454#include <skinning_pars_vertex> 3455#include <shadowmap_pars_vertex> 3456#include <logdepthbuf_pars_vertex> 3457#include <clipping_planes_pars_vertex> 3458void main() { 3459 #include <uv_vertex> 3460 #include <color_vertex> 3461 #include <morphinstance_vertex> 3462 #include <morphcolor_vertex> 3463 #include <batching_vertex> 3464 #include <beginnormal_vertex> 3465 #include <morphnormal_vertex> 3466 #include <skinbase_vertex> 3467 #include <skinnormal_vertex> 3468 #include <defaultnormal_vertex> 3469 #include <normal_vertex> 3470 #include <begin_vertex> 3471 #include <morphtarget_vertex> 3472 #include <skinning_vertex> 3473 #include <displacementmap_vertex> 3474 #include <project_vertex> 3475 #include <logdepthbuf_vertex> 3476 #include <clipping_planes_vertex> 3477 vViewPosition = - mvPosition.xyz; 3478 #include <worldpos_vertex> 3479 #include <shadowmap_vertex> 3480 #include <fog_vertex> 3481}`,b7=`#define TOON 3482uniform vec3 diffuse; 3483uniform vec3 emissive; 3484uniform float opacity; 3485#include <common> 3486#include <dithering_pars_fragment> 3487#include <color_pars_fragment> 3488#include <uv_pars_fragment> 3489#include <map_pars_fragment> 3490#include <alphamap_pars_fragment> 3491#include <alphatest_pars_fragment> 3492#include <alphahash_pars_fragment> 3493#include <aomap_pars_fragment> 3494#include <lightmap_pars_fragment> 3495#include <emissivemap_pars_fragment> 3496#include <gradientmap_pars_fragment> 3497#include <fog_pars_fragment> 3498#include <bsdfs> 3499#include <lights_pars_begin> 3500#include <normal_pars_fragment> 3501#include <lights_toon_pars_fragment> 3502#include <shadowmap_pars_fragment> 3503#include <bumpmap_pars_fragment> 3504#include <normalmap_pars_fragment> 3505#include <logdepthbuf_pars_fragment> 3506#include <clipping_planes_pars_fragment> 3507void main() { 3508 vec4 diffuseColor = vec4( diffuse, opacity ); 3509 #include <clipping_planes_fragment> 3510 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3511 vec3 totalEmissiveRadiance = emissive; 3512 #include <logdepthbuf_fragment> 3513 #include <map_fragment> 3514 #include <color_fragment> 3515 #include <alphamap_fragment> 3516 #include <alphatest_fragment> 3517 #include <alphahash_fragment> 3518 #include <normal_fragment_begin> 3519 #include <normal_fragment_maps> 3520 #include <emissivemap_fragment> 3521 #include <lights_toon_fragment> 3522 #include <lights_fragment_begin> 3523 #include <lights_fragment_maps> 3524 #include <lights_fragment_end> 3525 #include <aomap_fragment> 3526 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; 3527 #include <opaque_fragment> 3528 #include <tonemapping_fragment> 3529 #include <colorspace_fragment> 3530 #include <fog_fragment> 3531 #include <premultiplied_alpha_fragment> 3532 #include <dithering_fragment> 3533}`,_7=`uniform float size; 3534uniform float scale; 3535#include <common> 3536#include <color_pars_vertex> 3537#include <fog_pars_vertex> 3538#include <morphtarget_pars_vertex> 3539#include <logdepthbuf_pars_vertex> 3540#include <clipping_planes_pars_vertex> 3541#ifdef USE_POINTS_UV 3542 varying vec2 vUv; 3543 uniform mat3 uvTransform; 3544#endif 3545void main() { 3546 #ifdef USE_POINTS_UV 3547 vUv = ( uvTransform * vec3( uv, 1 ) ).xy; 3548 #endif 3549 #include <color_vertex> 3550 #include <morphinstance_vertex> 3551 #include <morphcolor_vertex> 3552 #include <begin_vertex> 3553 #include <morphtarget_vertex> 3554 #include <project_vertex> 3555 gl_PointSize = size; 3556 #ifdef USE_SIZEATTENUATION 3557 bool isPerspective = isPerspectiveMatrix( projectionMatrix ); 3558 if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); 3559 #endif 3560 #include <logdepthbuf_vertex> 3561 #include <clipping_planes_vertex> 3562 #include <worldpos_vertex> 3563 #include <fog_vertex> 3564}`,S7=`uniform vec3 diffuse; 3565uniform float opacity; 3566#include <common> 3567#include <color_pars_fragment> 3568#include <map_particle_pars_fragment> 3569#include <alphatest_pars_fragment> 3570#include <alphahash_pars_fragment> 3571#include <fog_pars_fragment> 3572#include <logdepthbuf_pars_fragment> 3573#include <clipping_planes_pars_fragment> 3574void main() { 3575 vec4 diffuseColor = vec4( diffuse, opacity ); 3576 #include <clipping_planes_fragment> 3577 vec3 outgoingLight = vec3( 0.0 ); 3578 #include <logdepthbuf_fragment> 3579 #include <map_particle_fragment> 3580 #include <color_fragment> 3581 #include <alphatest_fragment> 3582 #include <alphahash_fragment> 3583 outgoingLight = diffuseColor.rgb; 3584 #include <opaque_fragment> 3585 #include <tonemapping_fragment> 3586 #include <colorspace_fragment> 3587 #include <fog_fragment> 3588 #include <premultiplied_alpha_fragment> 3589}`,M7=`#include <common> 3590#include <batching_pars_vertex> 3591#include <fog_pars_vertex> 3592#include <morphtarget_pars_vertex> 3593#include <skinning_pars_vertex> 3594#include <logdepthbuf_pars_vertex> 3595#include <shadowmap_pars_vertex> 3596void main() { 3597 #include <batching_vertex> 3598 #include <beginnormal_vertex> 3599 #include <morphinstance_vertex> 3600 #include <morphnormal_vertex> 3601 #include <skinbase_vertex> 3602 #include <skinnormal_vertex> 3603 #include <defaultnormal_vertex> 3604 #include <begin_vertex> 3605 #include <morphtarget_vertex> 3606 #include <skinning_vertex> 3607 #include <project_vertex> 3608 #include <logdepthbuf_vertex> 3609 #include <worldpos_vertex> 3610 #include <shadowmap_vertex> 3611 #include <fog_vertex> 3612}`,w7=`uniform vec3 color; 3613uniform float opacity; 3614#include <common> 3615#include <fog_pars_fragment> 3616#include <bsdfs> 3617#include <lights_pars_begin> 3618#include <logdepthbuf_pars_fragment> 3619#include <shadowmap_pars_fragment> 3620#include <shadowmask_pars_fragment> 3621void main() { 3622 #include <logdepthbuf_fragment> 3623 gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); 3624 #include <tonemapping_fragment> 3625 #include <colorspace_fragment> 3626 #include <fog_fragment> 3627 #include <premultiplied_alpha_fragment> 3628}`,T7=`uniform float rotation; 3629uniform vec2 center; 3630#include <common> 3631#include <uv_pars_vertex> 3632#include <fog_pars_vertex> 3633#include <logdepthbuf_pars_vertex> 3634#include <clipping_planes_pars_vertex> 3635void main() { 3636 #include <uv_vertex> 3637 vec4 mvPosition = modelViewMatrix[ 3 ]; 3638 vec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) ); 3639 #ifndef USE_SIZEATTENUATION 3640 bool isPerspective = isPerspectiveMatrix( projectionMatrix ); 3641 if ( isPerspective ) scale *= - mvPosition.z; 3642 #endif 3643 vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; 3644 vec2 rotatedPosition; 3645 rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; 3646 rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; 3647 mvPosition.xy += rotatedPosition; 3648 gl_Position = projectionMatrix * mvPosition; 3649 #include <logdepthbuf_vertex> 3650 #include <clipping_planes_vertex> 3651 #include <fog_vertex> 3652}`,E7=`uniform vec3 diffuse; 3653uniform float opacity; 3654#include <common> 3655#include <uv_pars_fragment> 3656#include <map_pars_fragment> 3657#include <alphamap_pars_fragment> 3658#include <alphatest_pars_fragment> 3659#include <alphahash_pars_fragment> 3660#include <fog_pars_fragment> 3661#include <logdepthbuf_pars_fragment> 3662#include <clipping_planes_pars_fragment> 3663void main() { 3664 vec4 diffuseColor = vec4( diffuse, opacity ); 3665 #include <clipping_planes_fragment> 3666 vec3 outgoingLight = vec3( 0.0 ); 3667 #include <logdepthbuf_fragment> 3668 #include <map_fragment> 3669 #include <alphamap_fragment> 3670 #include <alphatest_fragment> 3671 #include <alphahash_fragment> 3672 outgoingLight = diffuseColor.rgb; 3673 #include <opaque_fragment> 3674 #include <tonemapping_fragment> 3675 #include <colorspace_fragment> 3676 #include <fog_fragment> 3677}`,hn={alphahash_fragment:q8,alphahash_pars_fragment:Y8,alphamap_fragment:Z8,alphamap_pars_fragment:K8,alphatest_fragment:$8,alphatest_pars_fragment:Q8,aomap_fragment:J8,aomap_pars_fragment:eH,batching_pars_vertex:tH,batching_vertex:nH,begin_vertex:iH,beginnormal_vertex:sH,bsdfs:aH,iridescence_fragment:rH,bumpmap_pars_fragment:oH,clipping_planes_fragment:lH,clipping_planes_pars_fragment:cH,clipping_planes_pars_vertex:uH,clipping_planes_vertex:dH,color_fragment:hH,color_pars_fragment:fH,color_pars_vertex:pH,color_vertex:mH,common:gH,cube_uv_reflection_fragment:xH,defaultnormal_vertex:yH,displacementmap_pars_vertex:vH,displacementmap_vertex:bH,emissivemap_fragment:_H,emissivemap_pars_fragment:SH,colorspace_fragment:MH,colorspace_pars_fragment:wH,envmap_fragment:TH,envmap_common_pars_fragment:EH,envmap_pars_fragment:AH,envmap_pars_vertex:CH,envmap_physical_pars_fragment:VH,envmap_vertex:RH,fog_vertex:NH,fog_pars_vertex:DH,fog_fragment:LH,fog_pars_fragment:IH,gradientmap_pars_fragment:PH,lightmap_pars_fragment:UH,lights_lambert_fragment:OH,lights_lambert_pars_fragment:zH,lights_pars_begin:BH,lights_toon_fragment:FH,lights_toon_pars_fragment:kH,lights_phong_fragment:HH,lights_phong_pars_fragment:GH,lights_physical_fragment:jH,lights_physical_pars_fragment:WH,lights_fragment_begin:XH,lights_fragment_maps:qH,lights_fragment_end:YH,lightprobes_pars_fragment:ZH,logdepthbuf_fragment:KH,logdepthbuf_pars_fragment:$H,logdepthbuf_pars_vertex:QH,logdepthbuf_vertex:JH,map_fragment:eG,map_pars_fragment:tG,map_particle_fragment:nG,map_particle_pars_fragment:iG,metalnessmap_fragment:sG,metalnessmap_pars_fragment:aG,morphinstance_vertex:rG,morphcolor_vertex:oG,morphnormal_vertex:lG,morphtarget_pars_vertex:cG,morphtarget_vertex:uG,normal_fragment_begin:dG,normal_fragment_maps:hG,normal_pars_fragment:fG,normal_pars_vertex:pG,normal_vertex:mG,normalmap_pars_fragment:gG,clearcoat_normal_fragment_begin:xG,clearcoat_normal_fragment_maps:yG,clearcoat_pars_fragment:vG,iridescence_pars_fragment:bG,opaque_fragment:_G,packing:SG,premultiplied_alpha_fragment:MG,project_vertex:wG,dithering_fragment:TG,dithering_pars_fragment:EG,roughnessmap_fragment:AG,roughnessmap_pars_fragment:CG,
vendor: 10,494 bytes, line 3677
3677shadowmap_pars_fragment:RG,shadowmap_pars_vertex:NG,shadowmap_vertex:DG,shadowmask_pars_fragment:LG,skinbase_vertex:IG,skinning_pars_vertex:PG,skinning_vertex:UG,skinnormal_vertex:OG,specularmap_fragment:zG,specularmap_pars_fragment:BG,tonemapping_fragment:VG,tonemapping_pars_fragment:FG,transmission_fragment:kG,transmission_pars_fragment:HG,uv_pars_fragment:GG,uv_pars_vertex:jG,uv_vertex:WG,worldpos_vertex:XG,background_vert:qG,background_frag:YG,backgroundCube_vert:ZG,backgroundCube_frag:KG,cube_vert:$G,cube_frag:QG,depth_vert:JG,depth_frag:e7,distance_vert:t7,distance_frag:n7,equirect_vert:i7,equirect_frag:s7,linedashed_vert:a7,linedashed_frag:r7,meshbasic_vert:o7,meshbasic_frag:l7,meshlambert_vert:c7,meshlambert_frag:u7,meshmatcap_vert:d7,meshmatcap_frag:h7,meshnormal_vert:f7,meshnormal_frag:p7,meshphong_vert:m7,meshphong_frag:g7,meshphysical_vert:x7,meshphysical_frag:y7,meshtoon_vert:v7,meshtoon_frag:b7,points_vert:_7,points_frag:S7,shadow_vert:M7,shadow_frag:w7,sprite_vert:T7,sprite_frag:E7},ht={common:{diffuse:{value:new mt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Qt},alphaMap:{value:null},alphaMapTransform:{value:new Qt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Qt}},envmap:{envMap:{value:null},envMapRotation:{value:new Qt},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98},dfgLUT:{value:null}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Qt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Qt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Qt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Qt},normalScale:{value:new je(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Qt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Qt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Qt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Qt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new mt(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null},probesSH:{value:null},probesMin:{value:new Z},probesMax:{value:new Z},probesResolution:{value:new Z}},points:{diffuse:{value:new mt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Qt},alphaTest:{value:0},uvTransform:{value:new Qt}},sprite:{diffuse:{value:new mt(16777215)},opacity:{value:1},center:{value:new je(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Qt},alphaMap:{value:null},alphaMapTransform:{value:new Qt},alphaTest:{value:0}}},Mo={basic:{uniforms:fa([ht.common,ht.specularmap,ht.envmap,ht.aomap,ht.lightmap,ht.fog]),vertexShader:hn.meshbasic_vert,fragmentShader:hn.meshbasic_frag},lambert:{uniforms:fa([ht.common,ht.specularmap,ht.envmap,ht.aomap,ht.lightmap,ht.emissivemap,ht.bumpmap,ht.normalmap,ht.displacementmap,ht.fog,ht.lights,{emissive:{value:new mt(0)},envMapIntensity:{value:1}}]),vertexShader:hn.meshlambert_vert,fragmentShader:hn.meshlambert_frag},phong:{uniforms:fa([ht.common,ht.specularmap,ht.envmap,ht.aomap,ht.lightmap,ht.emissivemap,ht.bumpmap,ht.normalmap,ht.displacementmap,ht.fog,ht.lights,{emissive:{value:new mt(0)},specular:{value:new mt(1118481)},shininess:{value:30},envMapIntensity:{value:1}}]),vertexShader:hn.meshphong_vert,fragmentShader:hn.meshphong_frag},standard:{uniforms:fa([ht.common,ht.envmap,ht.aomap,ht.lightmap,ht.emissivemap,ht.bumpmap,ht.normalmap,ht.displacementmap,ht.roughnessmap,ht.metalnessmap,ht.fog,ht.lights,{emissive:{value:new mt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:hn.meshphysical_vert,fragmentShader:hn.meshphysical_frag},toon:{uniforms:fa([ht.common,ht.aomap,ht.lightmap,ht.emissivemap,ht.bumpmap,ht.normalmap,ht.displacementmap,ht.gradientmap,ht.fog,ht.lights,{emissive:{value:new mt(0)}}]),vertexShader:hn.meshtoon_vert,fragmentShader:hn.meshtoon_frag},matcap:{uniforms:fa([ht.common,ht.bumpmap,ht.normalmap,ht.displacementmap,ht.fog,{matcap:{value:null}}]),vertexShader:hn.meshmatcap_vert,fragmentShader:hn.meshmatcap_frag},points:{uniforms:fa([ht.points,ht.fog]),vertexShader:hn.points_vert,fragmentShader:hn.points_frag},dashed:{uniforms:fa([ht.common,ht.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:hn.linedashed_vert,fragmentShader:hn.linedashed_frag},depth:{uniforms:fa([ht.common,ht.displacementmap]),vertexShader:hn.depth_vert,fragmentShader:hn.depth_frag},normal:{uniforms:fa([ht.common,ht.bumpmap,ht.normalmap,ht.displacementmap,{opacity:{value:1}}]),vertexShader:hn.meshnormal_vert,fragmentShader:hn.meshnormal_frag},sprite:{uniforms:fa([ht.sprite,ht.fog]),vertexShader:hn.sprite_vert,fragmentShader:hn.sprite_frag},background:{uniforms:{uvTransform:{value:new Qt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:hn.background_vert,fragmentShader:hn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Qt}},vertexShader:hn.backgroundCube_vert,fragmentShader:hn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:hn.cube_vert,fragmentShader:hn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:hn.equirect_vert,fragmentShader:hn.equirect_frag},distance:{uniforms:fa([ht.common,ht.displacementmap,{referencePosition:{value:new Z},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:hn.distance_vert,fragmentShader:hn.distance_frag},shadow:{uniforms:fa([ht.lights,ht.fog,{color:{value:new mt(0)},opacity:{value:1}}]),vertexShader:hn.shadow_vert,fragmentShader:hn.shadow_frag}};Mo.physical={uniforms:fa([Mo.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Qt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Qt},clearcoatNormalScale:{value:new je(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Qt},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Qt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Qt},sheen:{value:0},sheenColor:{value:new mt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Qt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Qt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Qt},transmissionSamplerSize:{value:new je},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Qt},attenuationDistance:{value:0},attenuationColor:{value:new mt(0)},specularColor:{value:new mt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Qt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Qt},anisotropyVector:{value:new je},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Qt}}]),vertexShader:hn.meshphysical_vert,fragmentShader:hn.meshphysical_frag};const Qy={r:0,b:0,g:0},A7=new Yt,lI=new Qt;lI.set(-1,0,0,0,1,0,0,0,1);function C7(n,e,t,i,s,o){const c=new mt(0);let h=s===!0?0:1,f,p,x=null,y=0,v=null;function S(N){let L=N.isScene===!0?N.background:null;if(L&&L.isTexture){const I=N.backgroundBlurriness>0;L=e.get(L,I)}return L}function M(N){let L=!1;const I=S(N);I===null?A(c,h):I&&I.isColor&&(A(I,1),L=!0);const B=n.xr.getEnvironmentBlendMode();B==="additive"?t.buffers.color.setClear(0,0,0,1,o):B==="alpha-blend"&&t.buffers.color.setClear(0,0,0,0,o),(n.autoClear||L)&&(t.buffers.depth.setTest(!0),t.buffers.depth.setMask(!0),t.buffers.color.setMask(!0),n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil))}function R(N,L){const I=S(L);I&&(I.isCubeTexture||I.mapping===dp)?(p===void 0&&(p=new ss(new sh(1,1,1),new dr({name:"BackgroundCubeMaterial",uniforms:ap(Mo.backgroundCube.uniforms),vertexShader:Mo.backgroundCube.vertexShader,fragmentShader:Mo.backgroundCube.fragmentShader,side:va,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),p.geometry.deleteAttribute("normal"),p.geometry.deleteAttribute("uv"),p.onBeforeRender=function(B,O,F){this.matrixWorld.copyPosition(F.matrixWorld)},Object.defineProperty(p.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(p)),p.material.uniforms.envMap.value=I,p.material.uniforms.backgroundBlurriness.value=L.backgroundBlurriness,p.material.uniforms.backgroundIntensity.value=L.backgroundIntensity,p.material.uniforms.backgroundRotation.value.setFromMatrix4(A7.makeRotationFromEuler(L.backgroundRotation)).transpose(),I.isCubeTexture&&I.isRenderTargetTexture===!1&&p.material.uniforms.backgroundRotation.value.premultiply(lI),p.material.toneMapped=_n.getTransfer(I.colorSpace)!==Wn,(x!==I||y!==I.version||v!==n.toneMapping)&&(p.material.needsUpdate=!0,x=I,y=I.version,v=n.toneMapping),p.layers.enableAll(),N.unshift(p,p.geometry,p.material,0,0,null)):I&&I.isTexture&&(f===void 0&&(f=new ss(new pp(2,2),new dr
vendor: 13,329 bytes, line 3677
3677({name:"BackgroundMaterial",uniforms:ap(Mo.background.uniforms),vertexShader:Mo.background.vertexShader,fragmentShader:Mo.background.fragmentShader,side:xc,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),f.geometry.deleteAttribute("normal"),Object.defineProperty(f.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(f)),f.material.uniforms.t2D.value=I,f.material.uniforms.backgroundIntensity.value=L.backgroundIntensity,f.material.toneMapped=_n.getTransfer(I.colorSpace)!==Wn,I.matrixAutoUpdate===!0&&I.updateMatrix(),f.material.uniforms.uvTransform.value.copy(I.matrix),(x!==I||y!==I.version||v!==n.toneMapping)&&(f.material.needsUpdate=!0,x=I,y=I.version,v=n.toneMapping),f.layers.enableAll(),N.unshift(f,f.geometry,f.material,0,0,null))}function A(N,L){N.getRGB(Qy,CL(n)),t.buffers.color.setClear(Qy.r,Qy.g,Qy.b,L,o)}function w(){p!==void 0&&(p.geometry.dispose(),p.material.dispose(),p=void 0),f!==void 0&&(f.geometry.dispose(),f.material.dispose(),f=void 0)}return{getClearColor:function(){return c},setClearColor:function(N,L=1){c.set(N),h=L,A(c,h)},getClearAlpha:function(){return h},setClearAlpha:function(N){h=N,A(c,h)},render:M,addToRenderList:R,dispose:w}}function R7(n,e){const t=n.getParameter(n.MAX_VERTEX_ATTRIBS),i={},s=v(null);let o=s,c=!1;function h(W,ee,ie,ue,Q){let Y=!1;const $=y(W,ue,ie,ee);o!==$&&(o=$,p(o.object)),Y=S(W,ue,ie,Q),Y&&M(W,ue,ie,Q),Q!==null&&e.update(Q,n.ELEMENT_ARRAY_BUFFER),(Y||c)&&(c=!1,I(W,ee,ie,ue),Q!==null&&n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,e.get(Q).buffer))}function f(){return n.createVertexArray()}function p(W){return n.bindVertexArray(W)}function x(W){return n.deleteVertexArray(W)}function y(W,ee,ie,ue){const Q=ue.wireframe===!0;let Y=i[ee.id];Y===void 0&&(Y={},i[ee.id]=Y);const $=W.isInstancedMesh===!0?W.id:0;let le=Y[$];le===void 0&&(le={},Y[$]=le);let ge=le[ie.id];ge===void 0&&(ge={},le[ie.id]=ge);let Ce=ge[Q];return Ce===void 0&&(Ce=v(f()),ge[Q]=Ce),Ce}function v(W){const ee=[],ie=[],ue=[];for(let Q=0;Q<t;Q++)ee[Q]=0,ie[Q]=0,ue[Q]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:ee,enabledAttributes:ie,attributeDivisors:ue,object:W,attributes:{},index:null}}function S(W,ee,ie,ue){const Q=o.attributes,Y=ee.attributes;let $=0;const le=ie.getAttributes();for(const ge in le)if(le[ge].location>=0){const q=Q[ge];let ae=Y[ge];if(ae===void 0&&(ge==="instanceMatrix"&&W.instanceMatrix&&(ae=W.instanceMatrix),ge==="instanceColor"&&W.instanceColor&&(ae=W.instanceColor)),q===void 0||q.attribute!==ae||ae&&q.data!==ae.data)return!0;$++}return o.attributesNum!==$||o.index!==ue}function M(W,ee,ie,ue){const Q={},Y=ee.attributes;let $=0;const le=ie.getAttributes();for(const ge in le)if(le[ge].location>=0){let q=Y[ge];q===void 0&&(ge==="instanceMatrix"&&W.instanceMatrix&&(q=W.instanceMatrix),ge==="instanceColor"&&W.instanceColor&&(q=W.instanceColor));const ae={};ae.attribute=q,q&&q.data&&(ae.data=q.data),Q[ge]=ae,$++}o.attributes=Q,o.attributesNum=$,o.index=ue}function R(){const W=o.newAttributes;for(let ee=0,ie=W.length;ee<ie;ee++)W[ee]=0}function A(W){w(W,0)}function w(W,ee){const ie=o.newAttributes,ue=o.enabledAttributes,Q=o.attributeDivisors;ie[W]=1,ue[W]===0&&(n.enableVertexAttribArray(W),ue[W]=1),Q[W]!==ee&&(n.vertexAttribDivisor(W,ee),Q[W]=ee)}function N(){const W=o.newAttributes,ee=o.enabledAttributes;for(let ie=0,ue=ee.length;ie<ue;ie++)ee[ie]!==W[ie]&&(n.disableVertexAttribArray(ie),ee[ie]=0)}function L(W,ee,ie,ue,Q,Y,$){$===!0?n.vertexAttribIPointer(W,ee,ie,Q,Y):n.vertexAttribPointer(W,ee,ie,ue,Q,Y)}function I(W,ee,ie,ue){R();const Q=ue.attributes,Y=ie.getAttributes(),$=ee.defaultAttributeValues;for(const le in Y){const ge=Y[le];if(ge.location>=0){let Ce=Q[le];if(Ce===void 0&&(le==="instanceMatrix"&&W.instanceMatrix&&(Ce=W.instanceMatrix),le==="instanceColor"&&W.instanceColor&&(Ce=W.instanceColor)),Ce!==void 0){const q=Ce.normalized,ae=Ce.itemSize,Ae=e.get(Ce);if(Ae===void 0)continue;const Ie=Ae.buffer,We=Ae.type,pe=Ae.bytesPerElement,Be=We===n.INT||We===n.UNSIGNED_INT||Ce.gpuType===k1;if(Ce.isInterleavedBufferAttribute){const Ve=Ce.data,Ze=Ve.stride,Rt=Ce.offset;if(Ve.isInstancedInterleavedBuffer){for(let Ct=0;Ct<ge.locationSize;Ct++)w(ge.location+Ct,Ve.meshPerAttribute);W.isInstancedMesh!==!0&&ue._maxInstanceCount===void 0&&(ue._maxInstanceCount=Ve.meshPerAttribute*Ve.count)}else for(let Ct=0;Ct<ge.locationSize;Ct++)A(ge.location+Ct);n.bindBuffer(n.ARRAY_BUFFER,Ie);for(let Ct=0;Ct<ge.locationSize;Ct++)L(ge.location+Ct,ae/ge.locationSize,We,q,Ze*pe,(Rt+ae/ge.locationSize*Ct)*pe,Be)}else{if(Ce.isInstancedBufferAttribute){for(let Ve=0;Ve<ge.locationSize;Ve++)w(ge.location+Ve,Ce.meshPerAttribute);W.isInstancedMesh!==!0&&ue._maxInstanceCount===void 0&&(ue._maxInstanceCount=Ce.meshPerAttribute*Ce.count)}else for(let Ve=0;Ve<ge.locationSize;Ve++)A(ge.location+Ve);n.bindBuffer(n.ARRAY_BUFFER,Ie);for(let Ve=0;Ve<ge.locationSize;Ve++)L(ge.location+Ve,ae/ge.locationSize,We,q,ae*pe,ae/ge.locationSize*Ve*pe,Be)}}else if($!==void 0){const q=$[le];if(q!==void 0)switch(q.length){case 2:n.vertexAttrib2fv(ge.location,q);break;case 3:n.vertexAttrib3fv(ge.location,q);break;case 4:n.vertexAttrib4fv(ge.location,q);break;default:n.vertexAttrib1fv(ge.location,q)}}}}N()}function B(){V();for(const W in i){const ee=i[W];for(const ie in ee){const ue=ee[ie];for(const Q in ue){const Y=ue[Q];for(const $ in Y)x(Y[$].object),delete Y[$];delete ue[Q]}}delete i[W]}}function O(W){if(i[W.id]===void 0)return;const ee=i[W.id];for(const ie in ee){const ue=ee[ie];for(const Q in ue){const Y=ue[Q];for(const $ in Y)x(Y[$].object),delete Y[$];delete ue[Q]}}delete i[W.id]}function F(W){for(const ee in i){const ie=i[ee];for(const ue in ie){const Q=ie[ue];if(Q[W.id]===void 0)continue;const Y=Q[W.id];for(const $ in Y)x(Y[$].object),delete Y[$];delete Q[W.id]}}}function P(W){for(const ee in i){const ie=i[ee],ue=W.isInstancedMesh===!0?W.id:0,Q=ie[ue];if(Q!==void 0){for(const Y in Q){const $=Q[Y];for(const le in $)x($[le].object),delete $[le];delete Q[Y]}delete ie[ue],Object.keys(ie).length===0&&delete i[ee]}}}function V(){j(),c=!0,o!==s&&(o=s,p(o.object))}function j(){s.geometry=null,s.program=null,s.wireframe=!1}return{setup:h,reset:V,resetDefaultState:j,dispose:B,releaseStatesOfGeometry:O,releaseStatesOfObject:P,releaseStatesOfProgram:F,initAttributes:R,enableAttribute:A,disableUnusedAttributes:N}}function N7(n,e,t){let i;function s(f){i=f}function o(f,p){n.drawArrays(i,f,p),t.update(p,i,1)}function c(f,p,x){x!==0&&(n.drawArraysInstanced(i,f,p,x),t.update(p,i,x))}function h(f,p,x){if(x===0)return;e.get("WEBGL_multi_draw").multiDrawArraysWEBGL(i,f,0,p,0,x);let v=0;for(let S=0;S<x;S++)v+=p[S];t.update(v,i,1)}this.setMode=s,this.render=o,this.renderInstances=c,this.renderMultiDraw=h}function D7(n,e,t,i){let s;function o(){if(s!==void 0)return s;if(e.has("EXT_texture_filter_anisotropic")===!0){const F=e.get("EXT_texture_filter_anisotropic");s=n.getParameter(F.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else s=0;return s}function c(F){return!(F!==Qs&&i.convert(F)!==n.getParameter(n.IMPLEMENTATION_COLOR_READ_FORMAT))}function h(F){const P=F===Ml&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(F!==pa&&i.convert(F)!==n.getParameter(n.IMPLEMENTATION_COLOR_READ_TYPE)&&F!==ya&&!P)}function f(F){if(F==="highp"){if(n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";F="mediump"}return F==="mediump"&&n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let p=t.precision!==void 0?t.precision:"highp";const x=f(p);x!==p&&(ct("WebGLRenderer:",p,"not supported, using",x,"instead."),p=x);const y=t.logarithmicDepthBuffer===!0,v=t.reversedDepthBuffer===!0&&e.has("EXT_clip_control");t.reversedDepthBuffer===!0&&v===!1&&ct("WebGLRenderer: Unable to use reversed depth buffer due to missing EXT_clip_control extension. Fallback to default depth buffer.");const S=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),M=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS),R=n.getParameter(n.MAX_TEXTURE_SIZE),A=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),w=n.getParameter(n.MAX_VERTEX_ATTRIBS),N=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),L=n.getParameter(n.MAX_VARYING_VECTORS),I=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),B=n.getParameter(n.MAX_SAMPLES),O=n.getParameter(n.SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:o,getMaxPrecision:f,textureFormatReadable:c,textureTypeReadable:h,precision:p,logarithmicDepthBuffer:y,reversedDepthBuffer:v,maxTextures:S,maxVertexTextures:M,maxTextureSize:R,maxCubemapSize:A,maxAttributes:w,maxVertexUniforms:N,maxVaryings:L,maxFragmentUniforms:I,maxSamples:B,samples:O}}function L7(n){const e=this;let t=null,i=0,s=!1,o=!1;const c=new vu,h=new Qt,f={value:null,needsUpdate:!1};this.uniform=f,this.numPlanes=0,this.numIntersection=0,this.init=function(y,v){const S=y.length!==0||v||i!==0||s;return s=v,i=y.length,S},this.beginShadows=function(){o=!0,x(null)},this.endShadows=function(){o=!1},this.setGlobalState=function(y,v){t=x(y,v,0)},this.setState=function(y,v,S){const M=y.clippingPlanes,R=y.clipIntersection,A=y.clipShadows,w=n.get(y);if(!s||M===null||M.length===0||o&&!A)o?x(null):p();else{const N=o?0:i,L=N*4;let I=w.clippingState||null;f.value=I,I=x(M,v,L,S);for(let B=0;B!==L;++B)I[B]=t[B];w.clippingState=I,this.numIntersection=R?this.numPlanes:0,this.numPlanes+=N}};function p(){f.value!==t&&(f.value=t,f.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function x(y,v,S,M){const R=y!==null?y.length:0;let A=null;if(R!==0){if(A=f.value,M!==!0||A===null){const w=S+R*4,N=v.matrixWorldInverse;h.getNormalMatrix(N),(A===null||A.length<w)&&(A=new Float32Array(w));for(let L=0,I=S;L!==R;++L,I+=4)c.copy(y[L]).applyMatrix4(N,h),c.normal.toArray(A,I),A[I+3]=c.constant}f.value=A,f.needsUpdate=!0}return e.numPlanes=R,e.numIntersection=0,A}}const Tu=4,oC=[.125,.215,.35,.446,.526,.582],zd=20,I7=256,rg=new gp,lC=new mt;let hS=null,fS=0,pS=0,mS=!1;const P7=new Z;class AM{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._sizeLods=[],this._sigmas=[],this._lodMeshes=[],this._backgroundBox=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._blurMaterial=null,this._ggxMaterial=null}fromScene(e,t=0,i=.1,s=100,o={}){const{size:c=256,position:h=P7}=o;hS=this._renderer.getRenderTarget(),fS=this._renderer.getActiveCubeFace(),pS=this._renderer.getActiveMipmapLevel(),mS=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(c);const f=this._allocateTargets();return f.depthBuffer=!0,this._sceneToCubeUV(e,i,s,f,h),t>0&&this._blur(f,0,0,t),this._applyPMREM(f),this._cleanup(f),f}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=dC(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=uC(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose(),this._backgroundBox!==null&&(this._backgroundBox.geometry.dispose(),this._backgroundBox.material.dispose())}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._ggxMaterial!==null&&this._ggxMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodMeshes.length;e++)this._lodMeshes[e].geometry.dispose()}_cleanup(e){this._renderer.setRenderTarget(hS,fS,pS),this._renderer.xr.enabled=mS,e.scissorTest=!1,Uf(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===Sl||e.mapping===Nu?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),hS=this._renderer.getRenderTarget(),fS=this._renderer.getActiveCubeFace(),pS=this._renderer.getActiveMipmapLevel(),mS=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;const i=t||this._allocateTargets();return this._textureToCubeUV(e,i),this._applyPMREM(i),this._cleanup(i),i}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,i={magFilter:yi,minFilter:yi,generateMipmaps:!1,type:Ml,format:Qs,colorSpace:ep,depthBuffer:!1},s=cC(e,t,i);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=cC(e,t,i);const{_lodMax:o}=this;({lodMeshes:this._lodMeshes,sizeLods:this._sizeLods,sigmas:this._sigmas}=U7(o)),this._blurMaterial=z7(o,e,t),this._ggxMaterial=O7(o,e,t)}return s}_compileMaterial(e){const t=new ss(new Kt,e);this._renderer.compile(t,rg)}_sceneToCubeUV(e,t,i,s,o){const f=new vs(90,1,t,i),p=[1,-1,1,1,1,1],x=[1,1,1,-1,-1,-1],y=this._renderer,v=y.autoClear,S=y.toneMapping;y.getClearColor(lC),y.toneMapping=jr,y.autoClear=!1,y.state.buffers.depth.getReversed()&&(y.setRenderTarget(s),y.clearDepth(),y.setRenderTarget(null)),this._backgroundBox===null&&(this._backgroundBox=new ss(new sh,new Uu({name:"PMREM.Backgroun
3677d",side:va,depthWrite:!1,depthTest:!1})));const R=this._backgroundBox,A=R.material;let w=!1;const N=e.background;N?N.isColor&&(A.color.copy(N),e.background=null,w=!0):(A.color.copy(lC),w=!0);for(let L=0;L<6;L++){const I=L%3;I===0?(f.up.set(0,p[L],0),f.position.set(o.x,o.y,o.z),f.lookAt(o.x+x[L],o.y,o.z)):I===1?(f.up.set(0,0,p[L]),f.position.set(o.x,o.y,o.z),f.lookAt(o.x,o.y+x[L],o.z)):(f.up.set(0,p[L],0),f.position.set(o.x,o.y,o.z),f.lookAt(o.x,o.y,o.z+x[L]));const B=this._cubeSize;Uf(s,I*B,L>2?B:0,B,B),y.setRenderTarget(s),w&&y.render(R,f),y.render(e,f)}y.toneMapping=S,y.autoClear=v,e.background=N}_textureToCubeUV(e,t){const i=this._renderer,s=e.mapping===Sl||e.mapping===Nu;s?(this._cubemapMaterial===null&&(this._cubemapMaterial=dC()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=uC());const o=s?this._cubemapMaterial:this._equirectMaterial,c=this._lodMeshes[0];c.material=o;const h=o.uniforms;h.envMap.value=e;const f=this._cubeSize;Uf(t,0,0,3*f,2*f),i.setRenderTarget(t),i.render(c,rg)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;const s=this._lodMeshes.length;for(let o=1;o<s;o++)this._applyGGXFilter(e,o-1,o);t.autoClear=i}_applyGGXFilter(e,t,i){const s=this._renderer,o=this._pingPongRenderTarget,c=this._ggxMaterial,h=this._lodMeshes[i];h.material=c;const f=c.uniforms,p=i/(this._lodMeshes.length-1),x=t/(this._lodMeshes.length-1),y=Math.sqrt(p*p-x*x),v=0+p*1.25,S=y*v,{_lodMax:M}=this,R=this._sizeLods[i],A=3*R*(i>M-Tu?i-M+Tu:0),w=4*(this._cubeSize-R);f.envMap.value=e.texture,f.roughness.value=S,f.mipInt.value=M-t,Uf(o,A,w,3*R,2*R),s.setRenderTarget(o),s.render(h,rg),f.envMap.value=o.texture,f.roughness.value=0,f.mipInt.value=M-i,Uf(e,A,w,3*R,2*R),s.setRenderTarget(e),s.render(h,rg)}_blur(e,t,i,s,o){const c=this._pingPongRenderTarget;this._halfBlur(e,c,t,i,s,"latitudinal",o),this._halfBlur(c,e,i,i,s,"longitudinal",o)}_halfBlur(e,t,i,s,o,c,h){const f=this._renderer,p=this._blurMaterial;c!=="latitudinal"&&c!=="longitudinal"&&Et("blur direction must be either latitudinal or longitudinal!");const x=3,y=this._lodMeshes[s];y.material=p;const v=p.uniforms,S=this._sizeLods[i]-1,M=isFinite(o)?Math.PI/(2*S):2*Math.PI/(2*zd-1),R=o/M,A=isFinite(o)?1+Math.floor(x*R):zd;A>zd&&ct(`sigmaRadians, ${o}, is too large and will clip, as it requested ${A} samples when the maximum is set to ${zd}`);const w=[];let N=0;for(let F=0;F<zd;++F){const P=F/R,V=Math.exp(-P*P/2);w.push(V),F===0?N+=V:F<A&&(N+=2*V)}for(let F=0;F<w.length;F++)w[F]=w[F]/N;v.envMap.value=e.texture,v.samples.value=A,v.weights.value=w,v.latitudinal.value=c==="latitudinal",h&&(v.poleAxis.value=h);const{_lodMax:L}=this;v.dTheta.value=M,v.mipInt.value=L-i;const I=this._sizeLods[s],B=3*I*(s>L-Tu?s-L+Tu:0),O=4*(this._cubeSize-I);Uf(t,B,O,3*I,2*I),f.setRenderTarget(t),f.render(y,rg)}}function U7(n){const e=[],t=[],i=[];let s=n;const o=n-Tu+1+oC.length;for(let c=0;c<o;c++){const h=Math.pow(2,s);e.push(h);let f=1/h;c>n-Tu?f=oC[c-n+Tu-1]:c===0&&(f=0),t.push(f);const p=1/(h-2),x=-p,y=1+p,v=[x,x,y,x,y,y,x,x,y,y,x,y],S=6,M=6,R=3,A=2,w=1,N=new Float32Array(R*M*S),L=new Float32Array(A*M*S),I=new Float32Array(w*M*S);for(let O=0;O<S;O++){const F=O%3*2/3-1,P=O>2?0:-1,V=[F,P,0,F+2/3,P,0,F+2/3,P+1,0,F,P,0,F+2/3,P+1,0,F,P+1,0];N.set(V,R*M*O),L.set(v,A*M*O);const j=[O,O,O,O,O,O];I.set(j,w*M*O)}const B=new Kt;B.setAttribute("position",new Vn(N,R)),B.setAttribute("uv",new Vn(L,A)),B.setAttribute("faceIndex",new Vn(I,w)),i.push(new ss(B,null)),s>Tu&&s--}return{lodMeshes:i,sizeLods:e,sigmas:t}}function cC(n,e,t){const i=new ur(n,e,t);return i.texture.mapping=dp,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function Uf(n,e,t,i,s){n.viewport.set(e,t,i,s),n.scissor.set(e,t,i,s)}function O7(n,e,t){return new dr({name:"PMREMGGXConvolution",defines:{GGX_SAMPLES:I7,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${n}.0`},uniforms:{envMap:{value:null},roughness:{value:0},mipInt:{value:0}},vertexShader:vb(),fragmentShader:` 3678 3679 precision highp float; 3680 precision highp int; 3681 3682 varying vec3 vOutputDirection; 3683 3684 uniform sampler2D envMap; 3685 uniform float roughness; 3686 uniform float mipInt; 3687 3688 #define ENVMAP_TYPE_CUBE_UV 3689 #include <cube_uv_reflection_fragment> 3690 3691 #define PI 3.14159265359 3692 3693 // Van der Corput radical inverse 3694 float radicalInverse_VdC(uint bits) { 3695 bits = (bits << 16u) | (bits >> 16u); 3696 bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u); 3697 bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u); 3698 bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u); 3699 bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u); 3700 return float(bits) * 2.3283064365386963e-10; // / 0x100000000 3701 } 3702 3703 // Hammersley sequence 3704 vec2 hammersley(uint i, uint N) { 3705 return vec2(float(i) / float(N), radicalInverse_VdC(i)); 3706 } 3707 3708 // GGX VNDF importance sampling (Eric Heitz 2018) 3709 // "Sampling the GGX Distribution of Visible Normals" 3710 // https://jcgt.org/published/0007/04/01/ 3711 vec3 importanceSampleGGX_VNDF(vec2 Xi, vec3 V, float roughness) { 3712 float alpha = roughness * roughness; 3713 3714 // Section 4.1: Orthonormal basis 3715 vec3 T1 = vec3(1.0, 0.0, 0.0); 3716 vec3 T2 = cross(V, T1); 3717 3718 // Section 4.2: Parameterization of projected area 3719 float r = sqrt(Xi.x); 3720 float phi = 2.0 * PI * Xi.y; 3721 float t1 = r * cos(phi); 3722 float t2 = r * sin(phi); 3723 float s = 0.5 * (1.0 + V.z); 3724 t2 = (1.0 - s) * sqrt(1.0 - t1 * t1) + s * t2; 3725 3726 // Section 4.3: Reprojection onto hemisphere 3727 vec3 Nh = t1 * T1 + t2 * T2 + sqrt(max(0.0, 1.0 - t1 * t1 - t2 * t2)) * V; 3728 3729 // Section 3.4: Transform back to ellipsoid configuration 3730 return normalize(vec3(alpha * Nh.x, alpha * Nh.y, max(0.0, Nh.z))); 3731 } 3732 3733 void main() { 3734 vec3 N = normalize(vOutputDirection); 3735 vec3 V = N; // Assume view direction equals normal for pre-filtering 3736 3737 vec3 prefilteredColor = vec3(0.0); 3738 float totalWeight = 0.0; 3739 3740 // For very low roughness, just sample the environment directly 3741 if (roughness < 0.001) { 3742 gl_FragColor = vec4(bilinearCubeUV(envMap, N, mipInt), 1.0); 3743 return; 3744 } 3745 3746 // Tangent space basis for VNDF sampling 3747 vec3 up = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0); 3748 vec3 tangent = normalize(cross(up, N)); 3749 vec3 bitangent = cross(N, tangent); 3750
3751 for(uint i = 0u; i < uint(GGX_SAMPLES); i++) { 3752 vec2 Xi = hammersley(i, uint(GGX_SAMPLES)); 3753 3754 // For PMREM, V = N, so in tangent space V is always (0, 0, 1) 3755 vec3 H_tangent = importanceSampleGGX_VNDF(Xi, vec3(0.0, 0.0, 1.0), roughness); 3756 3757 // Transform H back to world space 3758 vec3 H = normalize(tangent * H_tangent.x + bitangent * H_tangent.y + N * H_tangent.z); 3759 vec3 L = normalize(2.0 * dot(V, H) * H - V); 3760 3761 float NdotL = max(dot(N, L), 0.0); 3762 3763 if(NdotL > 0.0) { 3764 // Sample environment at fixed mip level 3765 // VNDF importance sampling handles the distribution filtering 3766 vec3 sampleColor = bilinearCubeUV(envMap, L, mipInt); 3767 3768 // Weight by NdotL for the split-sum approximation 3769 // VNDF PDF naturally accounts for the visible microfacet distribution 3770 prefilteredColor += sampleColor * NdotL; 3771 totalWeight += NdotL; 3772 } 3773 } 3774 3775 if (totalWeight > 0.0) { 3776 prefilteredColor = prefilteredColor / totalWeight; 3777 } 3778 3779 gl_FragColor = vec4(prefilteredColor, 1.0); 3780 } 3781 `,blending:bl,depthTest:!1,depthWrite:!1})}function z7(n,e,t){const i=new Float32Array(zd),s=new Z(0,1,0);return new dr({name:"SphericalGaussianBlur",defines:{n:zd,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:s}},vertexShader:vb(),fragmentShader:` 3782 3783 precision mediump float; 3784 precision mediump int; 3785 3786 varying vec3 vOutputDirection; 3787 3788 uniform sampler2D envMap; 3789 uniform int samples; 3790 uniform float weights[ n ]; 3791 uniform bool latitudinal; 3792 uniform float dTheta; 3793 uniform float mipInt; 3794 uniform vec3 poleAxis; 3795 3796 #define ENVMAP_TYPE_CUBE_UV 3797 #include <cube_uv_reflection_fragment> 3798 3799 vec3 getSample( float theta, vec3 axis ) { 3800 3801 float cosTheta = cos( theta ); 3802 // Rodrigues' axis-angle rotation 3803 vec3 sampleDirection = vOutputDirection * cosTheta 3804 + cross( axis, vOutputDirection ) * sin( theta ) 3805 + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); 3806 3807 return bilinearCubeUV( envMap, sampleDirection, mipInt ); 3808 3809 } 3810 3811 void main() { 3812 3813 vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); 3814 3815 if ( all( equal( axis, vec3( 0.0 ) ) ) ) { 3816 3817 axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); 3818 3819 } 3820 3821 axis = normalize( axis ); 3822 3823 gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); 3824 gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); 3825 3826 for ( int i = 1; i < n; i++ ) { 3827 3828 if ( i >= samples ) { 3829 3830 break; 3831 3832 } 3833 3834 float theta = dTheta * float( i ); 3835 gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); 3836 gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); 3837 3838 } 3839 3840 } 3841 `,blending:bl,depthTest:!1,depthWrite:!1})}function uC(){return new dr({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:vb(),fragmentShader:` 3842 3843 precision mediump float; 3844 precision mediump int; 3845 3846 varying vec3 vOutputDirection; 3847 3848 uniform sampler2D envMap; 3849 3850 #include <common> 3851 3852 void main() { 3853 3854 vec3 outputDirection = normalize( vOutputDirection ); 3855 vec2 uv = equirectUv( outputDirection ); 3856 3857 gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); 3858 3859 } 3860 `,blending:bl,depthTest:!1,depthWrite:!1})}function dC(){return new dr({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:vb(),fragmentShader:` 3861 3862 precision mediump float; 3863 precision mediump int; 3864 3865 uniform float flipEnvMap; 3866 3867 varying vec3 vOutputDirection; 3868 3869 uniform samplerCube envMap; 3870 3871 void main() { 3872 3873 gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); 3874 3875 } 3876 `,blending:bl,depthTest:!1,depthWrite:!1})}function vb(){return` 3877 3878 precision mediump float; 3879 precision mediump int; 3880 3881 attribute float faceIndex; 3882 3883 varying vec3 vOutputDirection; 3884 3885 // RH coordinate system; PMREM face-indexing convention 3886 vec3 getDirection( vec2 uv, float face ) { 3887 3888 uv = 2.0 * uv - 1.0; 3889 3890 vec3 direction = vec3( uv, 1.0 ); 3891 3892 if ( face == 0.0 ) { 3893 3894 direction = direction.zyx; // ( 1, v, u ) pos x 3895 3896 } else if ( face == 1.0 ) { 3897 3898 direction = direction.xzy; 3899 direction.xz *= -1.0; // ( -u, 1, -v ) pos y 3900 3901 } else if ( face == 2.0 ) { 3902 3903 direction.x *= -1.0; // ( -u, v, 1 ) pos z 3904 3905 } else if ( face == 3.0 ) { 3906 3907 direction = direction.zyx; 3908 direction.xz *= -1.0; // ( -1, v, -u ) neg x 3909 3910 } else if ( face == 4.0 ) { 3911 3912 direction = direction.xzy; 3913 direction.xy *= -1.0; // ( -u, -1, v ) neg y 3914 3915 } else if ( face == 5.0 ) { 3916 3917 direction.z *= -1.0; // ( u, v, -1 ) neg z 3918 3919 } 3920 3921 return direction; 3922 3923 } 3924 3925 void main() { 3926 3927 vOutputDirection = getDirection( uv, faceIndex ); 3928 gl_Position = vec4( position, 1.0 ); 3929 3930 } 3931 `}class mT extends ur{constructor(e=1,t={}
vendor: 25,769 bytes, lines 3931-4047
3931){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},s=[i,i,i,i,i,i];this.texture=new m0(s),this._setTextureOptions(t),this.texture.isRenderTargetTexture=!0}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:` 3932 3933 varying vec3 vWorldDirection; 3934 3935 vec3 transformDirection( in vec3 dir, in mat4 matrix ) { 3936 3937 return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); 3938 3939 } 3940 3941 void main() { 3942 3943 vWorldDirection = transformDirection( position, modelMatrix ); 3944 3945 #include <begin_vertex> 3946 #include <project_vertex> 3947 3948 } 3949 `,fragmentShader:` 3950 3951 uniform sampler2D tEquirect; 3952 3953 varying vec3 vWorldDirection; 3954 3955 #include <common> 3956 3957 void main() { 3958 3959 vec3 direction = normalize( vWorldDirection ); 3960 3961 vec2 sampleUV = equirectUv( direction ); 3962 3963 gl_FragColor = texture2D( tEquirect, sampleUV ); 3964 3965 } 3966 `},s=new sh(5,5,5),o=new dr({name:"CubemapFromEquirect",uniforms:ap(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:va,blending:bl});o.uniforms.tEquirect.value=t;const c=new ss(s,o),h=t.minFilter;return t.minFilter===xl&&(t.minFilter=yi),new QL(1,10,this).update(e,c),t.minFilter=h,c.geometry.dispose(),c.material.dispose(),this}clear(e,t=!0,i=!0,s=!0){const o=e.getRenderTarget();for(let c=0;c<6;c++)e.setRenderTarget(this,c),e.clear(t,i,s);e.setRenderTarget(o)}}function B7(n){let e=new WeakMap,t=new WeakMap,i=null;function s(v,S=!1){return v==null?null:S?c(v):o(v)}function o(v){if(v&&v.isTexture){const S=v.mapping;if(S===Sg||S===Mg)if(e.has(v)){const M=e.get(v).texture;return h(M,v.mapping)}else{const M=v.image;if(M&&M.height>0){const R=new mT(M.height);return R.fromEquirectangularTexture(n,v),e.set(v,R),v.addEventListener("dispose",p),h(R.texture,v.mapping)}else return null}}return v}function c(v){if(v&&v.isTexture){const S=v.mapping,M=S===Sg||S===Mg,R=S===Sl||S===Nu;if(M||R){let A=t.get(v);const w=A!==void 0?A.texture.pmremVersion:0;if(v.isRenderTargetTexture&&v.pmremVersion!==w)return i===null&&(i=new AM(n)),A=M?i.fromEquirectangular(v,A):i.fromCubemap(v,A),A.texture.pmremVersion=v.pmremVersion,t.set(v,A),A.texture;if(A!==void 0)return A.texture;{const N=v.image;return M&&N&&N.height>0||R&&N&&f(N)?(i===null&&(i=new AM(n)),A=M?i.fromEquirectangular(v):i.fromCubemap(v),A.texture.pmremVersion=v.pmremVersion,t.set(v,A),v.addEventListener("dispose",x),A.texture):null}}}return v}function h(v,S){return S===Sg?v.mapping=Sl:S===Mg&&(v.mapping=Nu),v}function f(v){let S=0;const M=6;for(let R=0;R<M;R++)v[R]!==void 0&&S++;return S===M}function p(v){const S=v.target;S.removeEventListener("dispose",p);const M=e.get(S);M!==void 0&&(e.delete(S),M.dispose())}function x(v){const S=v.target;S.removeEventListener("dispose",x);const M=t.get(S);M!==void 0&&(t.delete(S),M.dispose())}function y(){e=new WeakMap,t=new WeakMap,i!==null&&(i.dispose(),i=null)}return{get:s,dispose:y}}function V7(n){const e={};function t(i){if(e[i]!==void 0)return e[i];const s=n.getExtension(i);return e[i]=s,s}return{has:function(i){return t(i)!==null},init:function(){t("EXT_color_buffer_float"),t("WEBGL_clip_cull_distance"),t("OES_texture_float_linear"),t("EXT_color_buffer_half_float"),t("WEBGL_multisampled_render_to_texture"),t("WEBGL_render_shared_exponent")},get:function(i){const s=t(i);return s===null&&g1("WebGLRenderer: "+i+" extension not supported."),s}}}function F7(n,e,t,i){const s={},o=new WeakMap;function c(y){const v=y.target;v.index!==null&&e.remove(v.index);for(const M in v.attributes)e.remove(v.attributes[M]);v.removeEventListener("dispose",c),delete s[v.id];const S=o.get(v);S&&(e.remove(S),o.delete(v)),i.releaseStatesOfGeometry(v),v.isInstancedBufferGeometry===!0&&delete v._maxInstanceCount,t.memory.geometries--}function h(y,v){return s[v.id]===!0||(v.addEventListener("dispose",c),s[v.id]=!0,t.memory.geometries++),v}function f(y){const v=y.attributes;for(const S in v)e.update(v[S],n.ARRAY_BUFFER)}function p(y){const v=[],S=y.index,M=y.attributes.position;let R=0;if(M===void 0)return;if(S!==null){const N=S.array;R=S.version;for(let L=0,I=N.length;L<I;L+=3){const B=N[L+0],O=N[L+1],F=N[L+2];v.push(B,O,O,F,F,B)}}else{const N=M.array;R=M.version;for(let L=0,I=N.length/3-1;L<I;L+=3){const B=L+0,O=L+1,F=L+2;v.push(B,O,O,F,F,B)}}const A=new(M.count>=65535?jw:Gw)(v,1);A.version=R;const w=o.get(y);w&&e.remove(w),o.set(y,A)}function x(y){const v=o.get(y);if(v){const S=y.index;S!==null&&v.version<S.version&&p(y)}else p(y);return o.get(y)}return{get:h,update:f,getWireframeAttribute:x}}function k7(n,e,t){let i;function s(y){i=y}let o,c;function h(y){o=y.type,c=y.bytesPerElement}function f(y,v){n.drawElements(i,v,o,y*c),t.update(v,i,1)}function p(y,v,S){S!==0&&(n.drawElementsInstanced(i,v,o,y*c,S),t.update(v,i,S))}function x(y,v,S){if(S===0)return;e.get("WEBGL_multi_draw").multiDrawElementsWEBGL(i,v,0,o,y,0,S);let R=0;for(let A=0;A<S;A++)R+=v[A];t.update(R,i,1)}this.setMode=s,this.setIndex=h,this.render=f,this.renderInstances=p,this.renderMultiDraw=x}function H7(n){const e={geometries:0,textures:0},t={frame:0,calls:0,triangles:0,points:0,lines:0};function i(o,c,h){switch(t.calls++,c){case n.TRIANGLES:t.triangles+=h*(o/3);break;case n.LINES:t.lines+=h*(o/2);break;case n.LINE_STRIP:t.lines+=h*(o-1);break;case n.LINE_LOOP:t.lines+=h*o;break;case n.POINTS:t.points+=h*o;break;default:Et("WebGLInfo: Unknown draw mode:",c);break}}function s(){t.calls=0,t.triangles=0,t.points=0,t.lines=0}return{memory:e,render:t,programs:null,autoReset:!0,reset:s,update:i}}function G7(n,e,t){const i=new WeakMap,s=new Xn;function o(c,h,f){const p=c.morphTargetInfluences,x=h.morphAttributes.position||h.morphAttributes.normal||h.morphAttributes.color,y=x!==void 0?x.length:0;let v=i.get(h);if(v===void 0||v.count!==y){let j=function(){P.dispose(),i.delete(h),h.removeEventListener("dispose",j)};var S=j;v!==void 0&&v.texture.dispose();const M=h.morphAttributes.position!==void 0,R=h.morphAttributes.normal!==void 0,A=h.morphAttributes.color!==void 0,w=h.morphAttributes.position||[],N=h.morphAttributes.normal||[],L=h.morphAttributes.color||[];let I=0;M===!0&&(I=1),R===!0&&(I=2),A===!0&&(I=3);let B=h.attributes.position.count*I,O=1;B>e.maxTextureSize&&(O=Math.ceil(B/e.maxTextureSize),B=e.maxTextureSize);const F=new Float32Array(B*O*4*y),P=new K1(F,B,O,y);P.type=ya,P.needsUpdate=!0;const V=I*4;for(let W=0;W<y;W++){const ee=w[W],ie=N[W],ue=L[W],Q=B*O*4*W;for(let Y=0;Y<ee.count;Y++){const $=Y*V;M===!0&&(s.fromBufferAttribute(ee,Y),F[Q+$+0]=s.x,F[Q+$+1]=s.y,F[Q+$+2]=s.z,F[Q+$+3]=0),R===!0&&(s.fromBufferAttribute(ie,Y),F[Q+$+4]=s.x,F[Q+$+5]=s.y,F[Q+$+6]=s.z,F[Q+$+7]=0),A===!0&&(s.fromBufferAttribute(ue,Y),F[Q+$+8]=s.x,F[Q+$+9]=s.y,F[Q+$+10]=s.z,F[Q+$+11]=ue.itemSize===4?s.w:1)}}v={count:y,texture:P,size:new je(B,O)},i.set(h,v),h.addEventListener("dispose",j)}if(c.isInstancedMesh===!0&&c.morphTexture!==null)f.getUniforms().setValue(n,"morphTexture",c.morphTexture,t);else{let M=0;for(let A=0;A<p.length;A++)M+=p[A];const R=h.morphTargetsRelative?1:1-M;f.getUniforms().setValue(n,"morphTargetBaseInfluence",R),f.getUniforms().setValue(n,"morphTargetInfluences",p)}f.getUniforms().setValue(n,"morphTargetsTexture",v.texture,t),f.getUniforms().setValue(n,"morphTargetsTextureSize",v.size)}return{update:o}}function j7(n,e,t,i,s){let o=new WeakMap;function c(p){const x=s.render.frame,y=p.geometry,v=e.get(p,y);if(o.get(v)!==x&&(e.update(v),o.set(v,x)),p.isInstancedMesh&&(p.hasEventListener("dispose",f)===!1&&p.addEventListener("dispose",f),o.get(p)!==x&&(t.update(p.instanceMatrix,n.ARRAY_BUFFER),p.instanceColor!==null&&t.update(p.instanceColor,n.ARRAY_BUFFER),o.set(p,x))),p.isSkinnedMesh){const S=p.skeleton;o.get(S)!==x&&(S.update(),o.set(S,x))}return v}function h(){o=new WeakMap}function f(p){const x=p.target;x.removeEventListener("dispose",f),i.releaseStatesOfObject(x),t.remove(x.instanceMatrix),x.instanceColor!==null&&t.remove(x.instanceColor)}return{update:c,dispose:h}}const W7={[Ew]:"LINEAR_TONE_MAPPING",[Aw]:"REINHARD_TONE_MAPPING",[Cw]:"CINEON_TONE_MAPPING",[V1]:"ACES_FILMIC_TONE_MAPPING",[Nw]:"AGX_TONE_MAPPING",[Dw]:"NEUTRAL_TONE_MAPPING",[Rw]:"CUSTOM_TONE_MAPPING"};function X7(n,e,t,i,s){const o=new ur(e,t,{type:n,depthBuffer:i,stencilBuffer:s,depthTexture:i?new Jd(e,t):void 0}),c=new ur(e,t,{type:Ml,depthBuffer:!1,stencilBuffer:!1}),h=new Kt;h.setAttribute("position",new bt([-1,3,0,-1,-1,0,3,-1,0],3)),h.setAttribute("uv",new bt([0,2,0,0,2,0],2));const f=new tT({uniforms:{tDiffuse:{value:null}},vertexShader:` 3967 precision highp float; 3968 3969 uniform mat4 modelViewMatrix; 3970 uniform mat4 projectionMatrix; 3971 3972 attribute vec3 position; 3973 attribute vec2 uv; 3974 3975 varying vec2 vUv; 3976 3977 void main() { 3978 vUv = uv; 3979 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 3980 }`,fragmentShader:` 3981 precision highp float; 3982 3983 uniform sampler2D tDiffuse; 3984 3985 varying vec2 vUv; 3986 3987 #include <tonemapping_pars_fragment> 3988 #include <colorspace_pars_fragment> 3989 3990 void main() { 3991 gl_FragColor = texture2D( tDiffuse, vUv ); 3992 3993 #ifdef LINEAR_TONE_MAPPING 3994 gl_FragColor.rgb = LinearToneMapping( gl_FragColor.rgb ); 3995 #elif defined( REINHARD_TONE_MAPPING ) 3996 gl_FragColor.rgb = ReinhardToneMapping( gl_FragColor.rgb ); 3997 #elif defined( CINEON_TONE_MAPPING ) 3998 gl_FragColor.rgb = CineonToneMapping( gl_FragColor.rgb ); 3999 #elif defined( ACES_FILMIC_TONE_MAPPING ) 4000 gl_FragColor.rgb = ACESFilmicToneMapping( gl_FragColor.rgb ); 4001 #elif defined( AGX_TONE_MAPPING ) 4002 gl_FragColor.rgb = AgXToneMapping( gl_FragColor.rgb ); 4003 #elif defined( NEUTRAL_TONE_MAPPING ) 4004 gl_FragColor.rgb = NeutralToneMapping( gl_FragColor.rgb ); 4005 #elif defined( CUSTOM_TONE_MAPPING ) 4006 gl_FragColor.rgb = CustomToneMapping( gl_FragColor.rgb ); 4007 #endif 4008 4009 #ifdef SRGB_TRANSFER 4010 gl_FragColor = sRGBTransferOETF( gl_FragColor ); 4011 #endif 4012 }`,depthTest:!1,depthWrite:!1}),p=new ss(h,f),x=new gp(-1,1,1,-1,0,1);let y=null,v=null,S=!1,M,R=null,A=[],w=!1;this.setSize=function(N,L){o.setSize(N,L),c.setSize(N,L);for(let I=0;I<A.length;I++){const B=A[I];B.setSize&&B.setSize(N,L)}},this.setEffects=function(N){A=N,w=A.length>0&&A[0].isRenderPass===!0;const L=o.width,I=o.height;for(let B=0;B<A.length;B++){const O=A[B];O.setSize&&O.setSize(L,I)}},this.begin=function(N,L){if(S||N.toneMapping===jr&&A.length===0)return!1;if(R=L,L!==null){const I=L.width,B=L.height;(o.width!==I||o.height!==B)&&this.setSize(I,B)}return w===!1&&N.setRenderTarget(o),M=N.toneMapping,N.toneMapping=jr,!0},this.hasRenderPass=function(){return w},this.end=function(N,L){N.toneMapping=M,S=!0;let I=o,B=c;for(let O=0;O<A.length;O++){const F=A[O];if(F.enabled!==!1&&(F.render(N,B,I,L),F.needsSwap!==!1)){const P=I;I=B,B=P}}if(y!==N.outputColorSpace||v!==N.toneMapping){y=N.outputColorSpace,v=N.toneMapping,f.defines={},_n.getTransfer(y)===Wn&&(f.defines.SRGB_TRANSFER="");const O=W7[v];O&&(f.defines[O]=""),f.needsUpdate=!0}f.uniforms.tDiffuse.value=I.texture,N.setRenderTarget(R),N.render(p,x),R=null,S=!1},this.isCompositing=function(){return S},this.dispose=function(){o.depthTexture&&o.depthTexture.dispose(),o.dispose(),c.dispose(),h.dispose(),f.dispose()}}const cI=new Ii,CM=new Jd(1,1),uI=new K1,dI=new $1,hI=new m0,hC=[],fC=[],pC=new Float32Array(16),mC=new Float32Array(9),gC=new Float32Array(4);function xp(n,e,t){const i=n[0];if(i<=0||i>0)return n;const s=e*t;let o=hC[s];if(o===void 0&&(o=new Float32Array(s),hC[s]=o),e!==0){i.toArray(o,0);for(let c=1,h=0;c!==e;++c)h+=t,n[c].toArray(o,h)}return o}function hs(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t<i;t++)if(n[t]!==e[t])return!1;return!0}function fs(n,e){for(let t=0,i=e.length;t<i;t++)n[t]=e[t]}function bb(n,e){let t=fC[e];t===void 0&&(t=new Int32Array(e),fC[e]=t);for(let i=0;i!==e;++i)t[i]=n.allocateTextureUnit();return t}function q7(n,e){const t=this.cache;t[0]!==e&&(n.uniform1f(this.addr,e),t[0]=e)}function Y7(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(n.uniform2f(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(hs(t,e))return;n.uniform2fv(this.addr,e),fs(t,e)}}function Z7(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(n.uniform3f(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else if(e.r!==void 0)(t[0]!==e.r||t[1]!==e.g||t[2]!==e.b)&&(n.uniform3f(this.addr,e.r,e.g,e.b),t[0]=e.r,t[1]=e.g,t[2]=e.b);else{if(hs(t,e))return;n.uniform3fv(this.addr,e),fs(t,e)}}function K7(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(n.uniform4f(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(hs(t,e))return;n.uniform4fv(this.addr,e),fs(t,e)}}function $7(n,e){const t=this.cache,i=e.elements;if(i===void 0){if(hs(t,e))return;n.uniformMatrix2fv(this.addr,!1,e),fs(t,e)}else{if(hs(t,i))return;gC.set(i),n.uniformMatrix2fv(this.addr,!1,gC),fs(t,i)}}function Q7(n,e){const t=this.cache,i=e.elements;if(i===void 0){if(hs(t,e))return;n.uniformMatrix3fv(this.addr,!1,e),fs(t,e)}else{if(hs(t,i))return;mC.set(i),n.uniformMatrix3fv(this.addr,!1,mC),fs(t,i)}}function J7(n,e){const t=this.cache,i=e.elements;if(i===void 0){if(hs(t,e))return;n.uniformMatrix4fv(this.addr,!1,e),fs(t,e)}else{if(hs(t,i))return;pC.set(i),n.uniformMatrix4fv(this.addr,!1,pC),fs(t,i)}}function e9(n,e){const t=this.cache;t[0]!==e&&(n.uniform1i(this.addr,e),t[0]=e)}function t9(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(n.uniform2i(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(hs(t,e))return;n.uniform2iv(this.addr,e),fs(t,e)}}function n9(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(n.uniform3i(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(hs(t,e))return;n.uniform3iv(this.addr,e),fs(t,e)}}function i9(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(n.uniform4i(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(hs(t,e))return;n.uniform4iv(this.addr,e),fs(t,e)}}function s9(n,e){const t=this.cache;t[0]!==e&&(n.uniform1ui(this.addr,e),t[0]=e)}function a9(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(n.uniform2ui(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(hs(t,e))return;n.uniform2uiv(this.addr,e),fs(t,e)}}function r9(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(n.uniform3ui(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(hs(t,e))return;n.uniform3uiv(this.addr,e),fs(t,e)}}function o9(n,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(n.uniform4ui(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(hs(t,e))return;n.uniform4uiv(this.addr,e),fs(t,e)}}function l9(n,e,t){const i=this.cache,s=t.allocateTextureUnit();i[0]!==s&&(n.uniform1i(this.addr,s),i[0]=s);let o;this.type===n.SAMPLER_2D_SHADOW?(CM.compareFunction=t.isReversedDepthBuffer()?Z1:Y1,o=CM):o=cI,t.setTexture2D(e||o,s)}function c9(n,e,t){const i=this.cache,s=t.allocateTextureUnit();i[0]!==s&&(n.uniform1i(this.addr,s),i[0]=s),t.setTexture3D(e||dI,s)}function u9(n,e,t){const i=this.cache,s=t.allocateTextureUnit();i[0]!==s&&(n.uniform1i(this.addr,s),i[0]=s),t.setTextureCube(e||hI,s)}function d9(n,e,t){const i=this.cache,s=t.allocateTextureUnit();i[0]!==s&&(n.uniform1i(this.addr,s),i[0]=s),t.setTexture2DArray(e||uI,s)}function h9(n){switch(n){case 5126:return q7;case 35664:return Y7;case 35665:return Z7;case 35666:return K7;case 35674:return $7;case 35675:return Q7;case 35676:return J7;case 5124:case 35670:return e9;case 35667:case 35671:return t9;case 35668:case 35672:return n9;case 35669:case 35673:return i9;case 5125:return s9;case 36294:return a9;case 36295:return r9;case 36296:return o9;case 35678:case 36198:case 36298:case 36306:case 35682:return l9;case 35679:case 36299:case 36307:return c9;case 35680:case 36300:case 36308:case 36293:return u9;case 36289:case 36303:case 36311:case 36292:return d9}}function f9(n,e){n.uniform1fv(this.addr,e)}function p9(n,e){const t=xp(e,this.size,2);n.uniform2fv(this.addr,t)}function m9(n,e){const t=xp(e,this.size,3);n.uniform3fv(this.addr,t)}function g9(n,e){const t=xp(e,this.size,4);n.uniform4fv(this.addr,t)}function x9(n,e){const t=xp(e,this.size,4);n.uniformMatrix2fv(this.addr,!1,t)}function y9(n,e){const t=xp(e,this.size,9);n.uniformMatrix3fv(this.addr,!1,t)}function v9(n,e){const t=xp(e,this.size,16);n.uniformMatrix4fv(this.addr,!1,t)}function b9(n,e){n.uniform1iv(this.addr,e)}function _9(n,e){n.uniform2iv(this.addr,e)}function S9(n,e){n.uniform3iv(this.addr,e)}function M9(n,e){n.uniform4iv(this.addr,e)}function w9(n,e){n.uniform1uiv(this.addr,e)}function T9(n,e){n.uniform2uiv(this.addr,e)}function E9(n,e){n.uniform3uiv(this.addr,e)}function A9(n,e){n.uniform4uiv(this.addr,e)}function C9(n,e,t){const i=this.cache,s=e.length,o=bb(t,s);hs(i,o)||(n.uniform1iv(this.addr,o),fs(i,o));let c;this.type===n.SAMPLER_2D_SHADOW?c=CM:c=cI;for(let h=0;h!==s;++h)t.setTexture2D(e[h]||c,o[h])}function R9(n,e,t){const i=this.cache,s=e.length,o=bb(t,s);hs(i,o)||(n.uniform1iv(this.addr,o),fs(i,o));for(let c=0;c!==s;++c)t.setTexture3D(e[c]||dI,o[c])}function N9(n,e,t){const i=this.cache,s=e.length,o=bb(t,s);hs(i,o)||(n.uniform1iv(this.addr,o),fs(i,o));for(let c=0;c!==s;++c)t.setTextureCube(e[c]||hI,o[c])}function D9(n,e,t){const i=this.cache,s=e.length,o=bb(t,s);hs(i,o)||(n.uniform1iv(this.addr,o),fs(i,o));for(let c=0;c!==s;++c)t.setTexture2DArray(e[c]||uI,o[c])}function L9(n){switch(n){case 5126:return f9;case 35664:return p9;case 35665:return m9;case 35666:return g9;case 35674:return x9;case 35675:return y9;case 35676:return v9;case 5124:case 35670:return b9;case 35667:case 35671:return _9;case 35668:case 35672:return S9;case 35669:case 35673:return M9;case 5125:return w9;case 36294:return T9;case 36295:return E9;case 36296:return A9;case 35678:case 36198:case 36298:case 36306:case 35682:return C9;case 35679:case 36299:case 36307:return R9;case 35680:case 36300:case 36308:case 36293:return N9;case 36289:case 36303:case 36311:case 36292:return D9}}class I9{constructor(e,t,i){this.id=e,this.addr=i,this.cache=[],this.type=t.type,this.setValue=h9(t.type)}}class P9{constructor(e,t,i){this.id=e,this.addr=i,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=L9(t.type)}}class U9{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,i){const s=this.seq;for(let o=0,c=s.length;o!==c;++o){const h=s[o];h.setValue(e,t[h.id],i)}}}const gS=/(\w+)(\])?(\[|\.)?/g;function xC(n,e){n.seq.push(e),n.map[e.id]=e}function O9(n,e,t){const i=n.name,s=i.length;for(gS.lastIndex=0;;){const o=gS.exec(i),c=gS.lastIndex;let h=o[1];const f=o[2]==="]",p=o[3];if(f&&(h=h|0),p===void 0||p==="["&&c+2===s){xC(t,p===void 0?new I9(h,n,e):new P9(h,n,e));break}else{let y=t.map[h];y===void 0&&(y=new U9(h),xC(t,y)),t=y}}}class xv{constructor(e,t){this.seq=[],this.map={};const i=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let c=0;c<i;++c){const h=e.getActiveUniform(t,c),f=e.getUniformLocation(t,h.name);O9(h,f,this)}const s=[],o=[];for(const c of this.seq)c.type===e.SAMPLER_2D_SHADOW||c.type===e.SAMPLER_CUBE_SHADOW||c.type===e.SAMPLER_2D_ARRAY_SHADOW?s.push(c):o.push(c);s.length>0&&(this.seq=s.concat(o))}setValue(e,t,i,s){const o=this.map[t];o!==void 0&&o.setValue(e,i,s)}setOptional(e,t,i){const s=t[i];s!==void 0&&this.setValue(e,i,s)}static upload(e,t,i,s){for(let o=0,c=t.length;o!==c;++o){const h=t[o],f=i[h.id];f.needsUpdate!==!1&&h.setValue(e,f.value,s)}}static seqWithValue(e,t){const i=[];for(let s=0,o=e.length;s!==o;++s){const c=e[s];c.id in t&&i.push(c)}return i}}function yC(n,e,t){const i=n.createShader(e);return n.shaderSource(i,t),n.compileShader(i),i}const z9=37297;let B9=0;function V9(n,e){const t=n.split(` 4013`),i=[],s=Math.max(e-6,0),o=Math.min(e+6,t.length);for(let c=s;c<o;c++){const h=c+1;i.push(`${h===e?">":" "} ${h}: ${t[c]}`)}return i.join(` 4014`)}const vC=new Qt;function F9(n){_n._getMatrix(vC,_n.workingColorSpace,n);const e=`mat3( ${vC.elements.map(t=>t.toFixed(4))} )`;switch(_n.getTransfer(n)){case qg:return[e,"LinearTransferOETF"];case Wn:return[e,"sRGBTransferOETF"];default:return ct("WebGLProgram: Unsupported color space: ",n),[e,"LinearTransferOETF"]}}function bC(n,e,t){const i=n.getShaderParameter(e,n.COMPILE_STATUS),o=(n.getShaderInfoLog(e)||"").trim();if(i&&o==="")return"";const c=/ERROR: 0:(\d+)/.exec(o);if(c){const h=parseInt(c[1]);return t.toUpperCase()+` 4015 4016`+o+` 4017 4018`+V9(n.getShaderSource(e),h)}else return o}function k9(n,e){const t=F9(e);return[`vec4 ${n}( vec4 value ) {`,` return ${t[1]}( vec4( value.rgb * ${t[0]}, value.a ) );`,"}"].join(` 4019`)}const H9={[Ew]:"Linear",[Aw]:"Reinhard",[Cw]:"Cineon",[V1]:"ACESFilmic",[Nw]:"AgX",[Dw]:"Neutral",[Rw]:"Custom"};function G9(n,e){const t=H9[e];return t===void 0?(ct("WebGLProgram: Unsupported toneMapping:",e),"vec3 "+n+"( vec3 color ) { return LinearToneMapping( color ); }"):"vec3 "+n+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}const Jy=new Z;function j9(){_n.getLuminanceCoefficients(Jy);const n=Jy.x.toFixed(4),e=Jy.y.toFixed(4),t=Jy.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",` const vec3 weights = vec3( ${n}, ${e}, ${t} );`," return dot( weights, rgb );","}"].join(` 4020`)}function W9(n){return[n.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",n.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(fg).join(` 4021`)}function X9(n){const e=[];for(const t in n){const i=n[t];i!==!1&&e.push("#define "+t+" "+i)}return e.join(` 4022`)}function q9(n,e){const t={},i=n.getProgramParameter(e,n.ACTIVE_ATTRIBUTES);for(let s=0;s<i;s++){const o=n.getActiveAttrib(e,s),c=o.name;let h=1;o.type===n.FLOAT_MAT2&&(h=2),o.type===n.FLOAT_MAT3&&(h=3),o.type===n.FLOAT_MAT4&&(h=4),t[c]={type:o.type,location:n.getAttribLocation(e,c),locationSize:h}}return t}function fg(n){return n!==""}function _C(n,e){const t=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return n.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,t).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function SC(n,e){return n.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const Y9=/^[ \t]*#include +<([\w\d./]+)>/gm;function RM(n){return n.replace(Y9,K9)}const Z9=new Map;function K9(n,e){let t=hn[e];if(t===void 0){const i=Z9.get(e);if(i!==void 0)t=hn[i],ct('WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,i);else throw new Error("Can not resolve #include <"+e+">")}return RM(t)}const $9=/#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 MC(n){return n.replace($9,Q9)}function Q9(n,e,t,i){let s="";for(let o=parseInt(e);o<parseInt(t);o++)s+=i.replace(/\[\s*i\s*\]/g,"[ "+o+" ]").replace(/UNROLLED_LOOP_INDEX/g,o);return s}function wC(n){let e=`precision ${n.precision} float; 4023 precision ${n.precision} int; 4024 precision ${n.precision} sampler2D; 4025 precision ${n.precision} samplerCube; 4026 precision ${n.precision} sampler3D; 4027 precision ${n.precision} sampler2DArray; 4028 precision ${n.precision} sampler2DShadow; 4029 precision ${n.precision} samplerCubeShadow; 4030 precision ${n.precision} sampler2DArrayShadow; 4031 precision ${n.precision} isampler2D; 4032 precision ${n.precision} isampler3D; 4033 precision ${n.precision} isamplerCube; 4034 precision ${n.precision} isampler2DArray; 4035 precision ${n.precision} usampler2D; 4036 precision ${n.precision} usampler3D; 4037 precision ${n.precision} usamplerCube; 4038 precision ${n.precision} usampler2DArray; 4039 `;return n.precision==="highp"?e+=` 4040#define HIGH_PRECISION`:n.precision==="mediump"?e+=` 4041#define MEDIUM_PRECISION`:n.precision==="lowp"&&(e+=` 4042#define LOW_PRECISION`),e}const J9={[Xf]:"SHADOWMAP_TYPE_PCF",[Fd]:"SHADOWMAP_TYPE_VSM"};function ej(n){return J9[n.shadowMapType]||"SHADOWMAP_TYPE_BASIC"}const tj={[Sl]:"ENVMAP_TYPE_CUBE",[Nu]:"ENVMAP_TYPE_CUBE",[dp]:"ENVMAP_TYPE_CUBE_UV"};function nj(n){return n.envMap===!1?"ENVMAP_TYPE_CUBE":tj[n.envMapMode]||"ENVMAP_TYPE_CUBE"}const ij={[Nu]:"ENVMAP_MODE_REFRACTION"};function sj(n){return n.envMap===!1?"ENVMAP_MODE_REFLECTION":ij[n.envMapMode]||"ENVMAP_MODE_REFLECTION"}const aj={[f0]:"ENVMAP_BLENDING_MULTIPLY",[kD]:"ENVMAP_BLENDING_MIX",[HD]:"ENVMAP_BLENDING_ADD"};function rj(n){return n.envMap===!1?"ENVMAP_BLENDING_NONE":aj[n.combine]||"ENVMAP_BLENDING_NONE"}function oj(n){const e=n.envMapCubeUVHeight;if(e===null)return null;const t=Math.log2(e)-2,i=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,t),112)),texelHeight:i,maxMip:t}}function lj(n,e,t,i){const s=n.getContext(),o=t.defines;let c=t.vertexShader,h=t.fragmentShader;const f=ej(t),p=nj(t),x=sj(t),y=rj(t),v=oj(t),S=W9(t),M=X9(o),R=s.createProgram();let A,w,N=t.glslVersion?"#version "+t.glslVersion+` 4043`:"";t.isRawShaderMaterial?(A=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,M].filter(fg).join(` 4044`),A.length>0&&(A+=` 4045`),w=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,M].filter(fg).join(` 4046`),w.length>0&&(w+=` 4047`)):(A=[wC(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,M,t.extensionCl
vendor: 6,566 bytes, lines 4047-4049
4047ipCullDistance?"#define USE_CLIP_DISTANCE":"",t.batching?"#define USE_BATCHING":"",t.batchingColor?"#define USE_BATCHING_COLOR":"",t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.instancingMorph?"#define USE_INSTANCING_MORPH":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+x:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+t.anisotropyMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexNormals?"#define HAS_NORMAL":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphColors?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+f:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",t.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH"," uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` 4048`].filter(fg).join(` 4049`),w=[wC(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,M,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+p:"",t.envMap?"#define "+x:"",t.envMap?"#define "+y:"",v?"#define CUBEUV_TEXEL_WIDTH "+v.texelWidth:"",v?"#define CUBEUV_TEXEL_HEIGHT "+v.texelHeight:"",v?"#define CUBEUV_MAX_MIP "+v.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.packedNormalMap?"#define USE_PACKED_NORMALMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.dispersion?"#define USE_DISPERSION":"",t.iridescence?"#define USE_IR
4049IDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas||t.batchingColor?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+f:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.numLightProbeGrids>0?"#define USE_LIGHT_PROBES_GRID":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",t.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",t.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==jr?"#define TONE_MAPPING":"",t.toneMapping!==jr?hn.tonemapping_pars_fragment:"",t.toneMapping!==jr?G9("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",hn.colorspace_pars_fragment,k9("linearToOutputTexel",t.outputColorSpace),j9(),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` 4050`].filter(fg).join(` 4051`)),c=RM(c),c=_C(c,t),c=SC(c,t),h=RM(h),h=_C(h,t),h=SC(h,t),c=MC(c),h=MC(h),t.isRawShaderMaterial!==!0&&(N=`#version 300 es 4052`,A=[S,"#define attribute in","#define varying out","#define texture2D texture"].join(` 4053`)+` 4054`+A,w=["#define varying in",t.glslVersion===yM?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===yM?"":"#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(` 4055`)+` 4056`+w);const L=N+A+c,I=N+w+h,B=yC(s,s.VERTEX_SHADER,L),O=yC(s,s.FRAGMENT_SHADER,I);s.attachShader(R,B),s.attachShader(R,O),t.index0AttributeName!==void 0?s.bindAttribLocation(R,0,t.index0AttributeName):t.morphTargets===!0&&s.bindAttribLocation(R,0,"position"),s.linkProgram(R);function F(W){if(n.debug.checkShaderErrors){const ee=s.getProgramInfoLog(R)||"",ie=s.getShaderInfoLog(B)||"",ue=s.getShaderInfoLog(O)||"",Q=ee.trim(),Y=ie.trim(),$=ue.trim();let le=!0,ge=!0;if(s.getProgramParameter(R,s.LINK_STATUS)===!1)if(le=!1,typeof n.debug.onShaderError=="function")n.debug.onShaderError(s,R,B,O);else{const Ce=bC(s,B,"vertex"),q=bC(s,O,"fragment");Et("THREE.WebGLProgram: Shader Error "+s.getError()+" - VALIDATE_STATUS "+s.getProgramParameter(R,s.VALIDATE_STATUS)+` 4057 4058Material Name: `+W.name+` 4059Material Type: `+W.type+` 4060 4061Program Info Log: `+Q+` 4062`+Ce+` 4063`+q)}else Q!==""?ct("WebGLProgram: Program Info Log:",Q):(Y===""||$==="")&&(ge=!1);ge&&(W.diagnostics={runnable:le,programLog:Q,vertexShader:{log:Y,prefix:A},fragmentShader:{log:$,prefix:w}})}s.deleteShader(B),s.deleteShader(O),P=new xv(s,R),V=q9(s,R)}let P;this.getUniforms=function(){return P===void 0&&F(this),P};let V;this.getAttributes=function(){return V===void 0&&F(this),V};let j=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return j===!1&&(j=s.getProgramParameter(R,z9)),j},this.destroy=function(){i.releaseStatesOfProgram(this),s.deleteProgram(R),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=B9++,this.cacheKey=e,this.usedTimes=1,this.program=R,this.vertexShader=B,this.fragmentShader=O,this}let cj=0;class uj{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,i=e.fragmentShader,s=this._getShaderStage(t),o=this._getShaderStage(i),c=this._getShaderCacheForMaterial(e);return c.has(s)===!1&&(c.add(s),s.usedTimes++),c.has(o)===!1&&(c.add(o),o.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 dj(e),t.set(e,i)),i}}class dj{constructor(e){this.id=cj++,this.code=e,this.usedTimes=0}}function hj(n){return n===Du||n===Gg||n===jg}function fj(n,e,t,i,s,o){const c=new np,h=new uj,f=new Set,p=[],x=new Map,y=i.logarithmicDepthBuffer;let v=i.precision;const S={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distance",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function M(P){return f.add(P),P===0?"uv":`uv${P}`}function R(P,V,j,W,ee,ie){const ue=W.fog,Q=ee.geometry,Y=P.isMeshStandardMaterial||P.isMeshLambertMaterial||P.isMeshPhongMaterial?W.environment:null,$=P.isMeshStandardMaterial||P.isMeshLambertMaterial&&!P.envMap||P.isMeshPhongMaterial&&!P.envMap,le=e.get(P.envMap||Y,$),ge=le&&le.mapping===dp?le.image.height:null,Ce=S[P.type];P.precision!==null&&(v=i.getMaxPrecision(P.precision),v!==P.precision&&ct("WebGLProgram.getParameters:",P.precision,"not supported, using",v,"instead."));const q=Q.morphAttributes.position||Q.morphAttributes.normal||Q.morphAttributes.color,ae=q!==void 0?q.length:0;let Ae=0;Q.morphAttributes.position!==void 0&&(Ae=1),Q.morphAttributes.normal!==void 0&&(Ae=2),Q.morphAttributes.color!==void 0&&(Ae=3);let Ie,We,pe,Be;if(Ce){const Bt=Mo[Ce];Ie=Bt.vertexShader,We=Bt.fragmentShader}else Ie=P.vertexShader,We=P.fragmentShader,h.update(P),pe=h.getVertexShaderID(P),Be=h.getFragmentShaderID(P);const Ve=n.getRenderTarget(),Ze=n.state.buffers.depth.getReversed(),Rt=ee.isInstancedMesh===!0,Ct=ee.isBatchedMesh===!0,Jt=!!P.map,Nt=!!P.matcap,Ue=!!le,Xe=!!P.aoMap,Oe=!!P.lightMap,at=!!P.bumpMap,st=!!P.normalMap,Pt=!!P.displacementMap,J=!!P.emissiveMap,Ot=!!P.metalnessMap,gt=!!P.roughnessMap,vt=P.anisotropy>0,He=P.clearcoat>0,Cn=P.dispersion>0,X=P.iridescence>0,z=P.sheen>0,de=P.transmission>0,Re=vt&&!!P.anisotropyMap,Fe=He&&!!P.clearcoatMap,$e=He&&!!P.clearcoatNormalMap,Je=He&&!!P.clearcoatRoughnessMap,Ee=X&&!!P.iridescenceMap,Ne=X&&!!P.iridescenceThicknessMap,rt=z&&!!P.sheenColorMap,lt=z&&!!P.sheenRoughnessMap,tt=!!P.specularMap,et=!!P.specularColorMap,kt=!!P.specularIntensityMap,jt=de&&!!P.transmissionMap,un=de&&!!P.thicknessMap,se=!!P.gradientMap,Ke=!!P.alphaMap,De=P.alphaTest>0,ut=!!P.alphaHash,it=!!P.extensions;let ke=jr;P.toneMapped&&(Ve===null||Ve.isXRRenderTarget===!0)&&(ke=n.toneMapping);const _t={shaderID:Ce,shaderType:P.type,shaderName:P.name,vertexShader:Ie,fragmentShader:We,defines:P.defines,customVertexShaderID:pe,customFragmentShaderID:Be,isRawShaderMaterial:P.isRawShaderMaterial===!0,glslVersion:P.glslVersion,precision:v,batching:Ct,batchingColor:Ct&&ee._colorsTexture!==null,instancing:Rt,instancingColor:Rt&&ee.instanceColor!==null,instancingMorph:Rt&&ee.morphTexture!==null,outputColorSpace:Ve===null?n.outputColorSpace:Ve.isXRRenderTarget===!0?Ve.texture.colorSpace:_n.workingColorSpace,alphaToCoverage:!!P.alphaToCoverage,map:Jt,matcap:Nt,envMap:Ue,envMapMode:Ue&&le.mapping,envMapCubeUVHeight:ge,aoMap:Xe,lightMap:Oe,bumpMap:at,normalMap:st,displacementMap:Pt,emissiveMap:J,normalMapObjectSpace:st&&P.normalMapType===YD,normalMapTangentSpace:st&&P.normalMapType===yc,packedNormalMap:st&&P.normalMapType===yc&&hj(P.normalMap.format),metalnessMap:Ot,roughnessMap:gt,anisotropy:vt,anisotropyMap:Re,clearcoat:He,clearcoatMap:Fe,clearcoatNormalMap:$e,clearcoatRoughnessMap:Je,dispersion:Cn,iridescence:X,iridescenceMap:Ee,iridescenceThicknessMap:Ne,sheen:z,sheenColorMap:rt,sheenRoughnessMap:lt,specularMap:tt,specularColorMap:et,specularIntensityMap:kt,transmission:de,transmissionMap:jt,thicknessMap:un,gradientMap:se,opaque:P.transparent===!1&&P.blending===qd&&P.alphaToCoverage===!1,alphaMap:Ke,alphaTest:De,alphaHash:ut,combine:P.combine,mapUv:Jt&&M(P.map.channel),aoMapUv:Xe&&M(P.aoMap.channel),lightMapUv:Oe&&M(P.lightMap.channel),bumpMapUv:at&&M(P.bumpMap.channel),normalMapUv:st&&M(P.normalMap.channel),displacementMapUv:Pt&&M(P.displacementMap.channel),emissiveMapUv:J&&M(P.emissiveMap.channel),metalnessMapUv:Ot&&M(P.metalnessMap.channel),roughnessMapUv:gt&&M(P.roughnessMap.channel),anisotropyMapUv:Re&&M(P.anisotropyMap.channel),clearcoatMapUv:Fe&&M(P.clearcoatMap.channel),clearcoatNormalMapUv:$e&&M(P.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Je&&M(P.clearcoatRoughnessMap.channel),iridescenceMapUv:Ee&&M(P.iridescenceMap.channel),iridescenceThicknessMapUv:Ne&&M(P.iridescenceThicknessMap.channel),sheenColorMapUv:rt&&M(P.sheenColorMap.channel),sheenRoughnessMapUv:lt&&M(P.sheenRoughnessMap.channel),specularMapUv:tt&&M(P.specularMap.channel),specularColorMapUv:et&&M(P.specularColorMap.channel),specularIntensityMapUv:kt&&M(P.specularIntensityMap.channel),transmissionMapUv:jt&&M(P.transmissionMap.channel),thicknessMapUv:un&&M(P.thicknessMap.channel),alphaMapUv:Ke&&M(P.alphaMap.channel),vertexTangents:!!Q.attributes.tangent&&(st||vt),vertexNormals:!!Q.attributes.normal,vertexColors:P.vertexColors,vertexAlphas:P.vertexColors===!0&&!!Q.attributes.color&&Q.attributes.color.itemSize===4,pointsUvs:ee.isPoints===!0&&!!Q.attributes.uv&&(Jt||Ke),fog:!!ue,useFog:P.fog===!0,fogExp2:!!ue&&ue.isFogExp2,flatShading:P.wireframe===!1&&(P.flatShading===!0||Q.attributes.normal===void 0&&st===!1&&(P.isMeshLambertMaterial||P.isMeshPhongMaterial||P.isMeshStandardMaterial||P.isMeshPhysicalMaterial)),sizeAttenuation:P.sizeAttenuation===!0,logarithmicDepthBuffer:y,reversedDepthBuffer:Ze,skinning:ee.isSkinnedMesh===!0,morphTargets:Q.morphAttributes.position!==void 0,morphNormals:Q.morphAttributes.normal!==void 0,morphColors:Q.morphAttributes.color!==void 0,morphTargetsCount:ae,morphTextureStride:Ae,numDirLights:V.directional.length,numPointLights:V.point.length,numSpotLights:V.spot.length,numSpotLightMaps:V.spotLightMap.length,numRectAreaLights:V.rectArea.length,numHemiLights:V.hemi.length,numDirLightShadows:V.directionalShadowMap.length,numPointLightShadows:V.pointShadowMap.length,numSpotLightShadows:V.spotShadowMap.length,numSpotLightShadowsWithMaps:V.numSpotLightShadowsWithMaps,numLightProbes:V.numLightProbes,numLightProbeGrids:ie.length,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:P.dithering,shadowMapEnabled:n.shadowMap.enabled&&j.length>0,shadowMapType:n.shadowMap.type,toneMapping:ke,decodeVideoTexture:Jt&&P.map.isVideoTexture===!0&&_n.getTransfer(P.map.colorSpace)===Wn,decodeVideoTextureEmissive:J&&P.emissiveMap.isVideoTexture===!0&&_n.getTransfer(P.emissiveMap.colorSpace)===Wn,premultipliedAlpha:P.premultipliedAlpha,doubleSided:P.side===gl,flipSided:P.side===va,useDepthPacking:P.depthPacking>=0,depthPacking:P.depthPacking||0,index0AttributeName:P.index0AttributeName,extensionCl
vendor: 1,506 bytes, line 4063
4063ipCullDistance:it&&P.extensions.clipCullDistance===!0&&t.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(it&&P.extensions.multiDraw===!0||Ct)&&t.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:t.has("KHR_parallel_shader_compile"),customProgramCacheKey:P.customProgramCacheKey()};return _t.vertexUv1s=f.has(1),_t.vertexUv2s=f.has(2),_t.vertexUv3s=f.has(3),f.clear(),_t}function A(P){const V=[];if(P.shaderID?V.push(P.shaderID):(V.push(P.customVertexShaderID),V.push(P.customFragmentShaderID)),P.defines!==void 0)for(const j in P.defines)V.push(j),V.push(P.defines[j]);return P.isRawShaderMaterial===!1&&(w(V,P),N(V,P),V.push(n.outputColorSpace)),V.push(P.customProgramCacheKey),V.join()}function w(P,V){P.push(V.precision),P.push(V.outputColorSpace),P.push(V.envMapMode),P.push(V.envMapCubeUVHeight),P.push(V.mapUv),P.push(V.alphaMapUv),P.push(V.lightMapUv),P.push(V.aoMapUv),P.push(V.bumpMapUv),P.push(V.normalMapUv),P.push(V.displacementMapUv),P.push(V.emissiveMapUv),P.push(V.metalnessMapUv),P.push(V.roughnessMapUv),P.push(V.anisotropyMapUv),P.push(V.clearcoatMapUv),P.push(V.clearcoatNormalMapUv),P.push(V.clearcoatRoughnessMapUv),P.push(V.iridescenceMapUv),P.push(V.iridescenceThicknessMapUv),P.push(V.sheenColorMapUv),P.push(V.sheenRoughnessMapUv),P.push(V.specularMapUv),P.push(V.specularColorMapUv),P.push(V.specularIntensityMapUv),P.push(V.transmissionMapUv),P.push(V.thicknessMapUv),P.push(V.combine),P.push(V.fogExp2),P.push(V.sizeAttenuation),P.push(V.morphTargetsCount),P.pu
vendor: 11,405 bytes, line 4063
4063sh(V.morphAttributeCount),P.push(V.numDirLights),P.push(V.numPointLights),P.push(V.numSpotLights),P.push(V.numSpotLightMaps),P.push(V.numHemiLights),P.push(V.numRectAreaLights),P.push(V.numDirLightShadows),P.push(V.numPointLightShadows),P.push(V.numSpotLightShadows),P.push(V.numSpotLightShadowsWithMaps),P.push(V.numLightProbes),P.push(V.shadowMapType),P.push(V.toneMapping),P.push(V.numClippingPlanes),P.push(V.numClipIntersection),P.push(V.depthPacking)}function N(P,V){c.disableAll(),V.instancing&&c.enable(0),V.instancingColor&&c.enable(1),V.instancingMorph&&c.enable(2),V.matcap&&c.enable(3),V.envMap&&c.enable(4),V.normalMapObjectSpace&&c.enable(5),V.normalMapTangentSpace&&c.enable(6),V.clearcoat&&c.enable(7),V.iridescence&&c.enable(8),V.alphaTest&&c.enable(9),V.vertexColors&&c.enable(10),V.vertexAlphas&&c.enable(11),V.vertexUv1s&&c.enable(12),V.vertexUv2s&&c.enable(13),V.vertexUv3s&&c.enable(14),V.vertexTangents&&c.enable(15),V.anisotropy&&c.enable(16),V.alphaHash&&c.enable(17),V.batching&&c.enable(18),V.dispersion&&c.enable(19),V.batchingColor&&c.enable(20),V.gradientMap&&c.enable(21),V.packedNormalMap&&c.enable(22),V.vertexNormals&&c.enable(23),P.push(c.mask),c.disableAll(),V.fog&&c.enable(0),V.useFog&&c.enable(1),V.flatShading&&c.enable(2),V.logarithmicDepthBuffer&&c.enable(3),V.reversedDepthBuffer&&c.enable(4),V.skinning&&c.enable(5),V.morphTargets&&c.enable(6),V.morphNormals&&c.enable(7),V.morphColors&&c.enable(8),V.premultipliedAlpha&&c.enable(9),V.shadowMapEnabled&&c.enable(10),V.doubleSided&&c.enable(11),V.flipSided&&c.enable(12),V.useDepthPacking&&c.enable(13),V.dithering&&c.enable(14),V.transmission&&c.enable(15),V.sheen&&c.enable(16),V.opaque&&c.enable(17),V.pointsUvs&&c.enable(18),V.decodeVideoTexture&&c.enable(19),V.decodeVideoTextureEmissive&&c.enable(20),V.alphaToCoverage&&c.enable(21),V.numLightProbeGrids>0&&c.enable(22),P.push(c.mask)}function L(P){const V=S[P.type];let j;if(V){const W=Mo[V];j=RL.clone(W.uniforms)}else j=P.uniforms;return j}function I(P,V){let j=x.get(V);return j!==void 0?++j.usedTimes:(j=new lj(n,V,P,s),p.push(j),x.set(V,j)),j}function B(P){if(--P.usedTimes===0){const V=p.indexOf(P);p[V]=p[p.length-1],p.pop(),x.delete(P.cacheKey),P.destroy()}}function O(P){h.remove(P)}function F(){h.dispose()}return{getParameters:R,getProgramCacheKey:A,getUniforms:L,acquireProgram:I,releaseProgram:B,releaseShaderCache:O,programs:p,dispose:F}}function pj(){let n=new WeakMap;function e(c){return n.has(c)}function t(c){let h=n.get(c);return h===void 0&&(h={},n.set(c,h)),h}function i(c){n.delete(c)}function s(c,h,f){n.get(c)[h]=f}function o(){n=new WeakMap}return{has:e,get:t,remove:i,update:s,dispose:o}}function mj(n,e){return n.groupOrder!==e.groupOrder?n.groupOrder-e.groupOrder:n.renderOrder!==e.renderOrder?n.renderOrder-e.renderOrder:n.material.id!==e.material.id?n.material.id-e.material.id:n.materialVariant!==e.materialVariant?n.materialVariant-e.materialVariant:n.z!==e.z?n.z-e.z:n.id-e.id}function TC(n,e){return n.groupOrder!==e.groupOrder?n.groupOrder-e.groupOrder:n.renderOrder!==e.renderOrder?n.renderOrder-e.renderOrder:n.z!==e.z?e.z-n.z:n.id-e.id}function EC(){const n=[];let e=0;const t=[],i=[],s=[];function o(){e=0,t.length=0,i.length=0,s.length=0}function c(v){let S=0;return v.isInstancedMesh&&(S+=2),v.isSkinnedMesh&&(S+=1),S}function h(v,S,M,R,A,w){let N=n[e];return N===void 0?(N={id:v.id,object:v,geometry:S,material:M,materialVariant:c(v),groupOrder:R,renderOrder:v.renderOrder,z:A,group:w},n[e]=N):(N.id=v.id,N.object=v,N.geometry=S,N.material=M,N.materialVariant=c(v),N.groupOrder=R,N.renderOrder=v.renderOrder,N.z=A,N.group=w),e++,N}function f(v,S,M,R,A,w){const N=h(v,S,M,R,A,w);M.transmission>0?i.push(N):M.transparent===!0?s.push(N):t.push(N)}function p(v,S,M,R,A,w){const N=h(v,S,M,R,A,w);M.transmission>0?i.unshift(N):M.transparent===!0?s.unshift(N):t.unshift(N)}function x(v,S){t.length>1&&t.sort(v||mj),i.length>1&&i.sort(S||TC),s.length>1&&s.sort(S||TC)}function y(){for(let v=e,S=n.length;v<S;v++){const M=n[v];if(M.id===null)break;M.id=null,M.object=null,M.geometry=null,M.material=null,M.group=null}}return{opaque:t,transmissive:i,transparent:s,init:o,push:f,unshift:p,finish:y,sort:x}}function gj(){let n=new WeakMap;function e(i,s){const o=n.get(i);let c;return o===void 0?(c=new EC,n.set(i,[c])):s>=o.length?(c=new EC,o.push(c)):c=o[s],c}function t(){n=new WeakMap}return{get:e,dispose:t}}function xj(){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 Z,color:new mt};break;case"SpotLight":t={position:new Z,direction:new Z,color:new mt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new Z,color:new mt,distance:0,decay:0};break;case"HemisphereLight":t={direction:new Z,skyColor:new mt,groundColor:new mt};break;case"RectAreaLight":t={color:new mt,position:new Z,halfWidth:new Z,halfHeight:new Z};break}return n[e.id]=t,t}}}function yj(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new je};break;case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new je};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new je,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}let vj=0;function bj(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function _j(n){const e=new xj,t=yj(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let p=0;p<9;p++)i.probe.push(new Z);const s=new Z,o=new Yt,c=new Yt;function h(p){let x=0,y=0,v=0;for(let V=0;V<9;V++)i.probe[V].set(0,0,0);let S=0,M=0,R=0,A=0,w=0,N=0,L=0,I=0,B=0,O=0,F=0;p.sort(bj);for(let V=0,j=p.length;V<j;V++){const W=p[V],ee=W.color,ie=W.intensity,ue=W.distance;let Q=null;if(W.shadow&&W.shadow.map&&(W.shadow.map.texture.format===Du?Q=W.shadow.map.texture:Q=W.shadow.map.depthTexture||W.shadow.map.texture),W.isAmbientLight)x+=ee.r*ie,y+=ee.g*ie,v+=ee.b*ie;else if(W.isLightProbe){for(let Y=0;Y<9;Y++)i.probe[Y].addScaledVector(W.sh.coefficients[Y],ie);F++}else if(W.isDirectionalLight){const Y=e.get(W);if(Y.color.copy(W.color).multiplyScalar(W.intensity),W.castShadow){const $=W.shadow,le=t.get(W);le.shadowIntensity=$.intensity,le.shadowBias=$.bias,le.shadowNormalBias=$.normalBias,le.shadowRadius=$.radius,le.shadowMapSize=$.mapSize,i.directionalShadow[S]=le,i.directionalShadowMap[S]=Q,i.directionalShadowMatrix[S]=W.shadow.matrix,N++}i.directional[S]=Y,S++}else if(W.isSpotLight){const Y=e.get(W);Y.position.setFromMatrixPosition(W.matrixWorld),Y.color.copy(ee).multiplyScalar(ie),Y.distance=ue,Y.coneCos=Math.cos(W.angle),Y.penumbraCos=Math.cos(W.angle*(1-W.penumbra)),Y.decay=W.decay,i.spot[R]=Y;const $=W.shadow;if(W.map&&(i.spotLightMap[B]=W.map,B++,$.updateMatrices(W),W.castShadow&&O++),i.spotLightMatrix[R]=$.matrix,W.castShadow){const le=t.get(W);le.shadowIntensity=$.intensity,le.shadowBias=$.bias,le.shadowNormalBias=$.normalBias,le.shadowRadius=$.radius,le.shadowMapSize=$.mapSize,i.spotShadow[R]=le,i.spotShadowMap[R]=Q,I++}R++}else if(W.isRectAreaLight){const Y=e.get(W);Y.color.copy(ee).multiplyScalar(ie),Y.halfWidth.set(W.width*.5,0,0),Y.halfHeight.set(0,W.height*.5,0),i.rectArea[A]=Y,A++}else if(W.isPointLight){const Y=e.get(W);if(Y.color.copy(W.color).multiplyScalar(W.intensity),Y.distance=W.distance,Y.decay=W.decay,W.castShadow){const $=W.shadow,le=t.get(W);le.shadowIntensity=$.intensity,le.shadowBias=$.bias,le.shadowNormalBias=$.normalBias,le.shadowRadius=$.radius,le.shadowMapSize=$.mapSize,le.shadowCameraNear=$.camera.near,le.shadowCameraFar=$.camera.far,i.pointShadow[M]=le,i.pointShadowMap[M]=Q,i.pointShadowMatrix[M]=W.shadow.matrix,L++}i.point[M]=Y,M++}else if(W.isHemisphereLight){const Y=e.get(W);Y.skyColor.copy(W.color).multiplyScalar(ie),Y.groundColor.copy(W.groundColor).multiplyScalar(ie),i.hemi[w]=Y,w++}}A>0&&(n.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=ht.LTC_FLOAT_1,i.rectAreaLTC2=ht.LTC_FLOAT_2):(i.rectAreaLTC1=ht.LTC_HALF_1,i.rectAreaLTC2=ht.LTC_HALF_2)),i.ambient[0]=x,i.ambient[1]=y,i.ambient[2]=v;const P=i.hash;(P.directionalLength!==S||P.pointLength!==M||P.spotLength!==R||P.rectAreaLength!==A||P.hemiLength!==w||P.numDirectionalShadows!==N||P.numPointShadows!==L||P.numSpotShadows!==I||P.numSpotMaps!==B||P.numLightProbes!==F)&&(i.directional.length=S,i.spot.length=R,i.rectArea.length=A,i.point.length=M,i.hemi.length=w,i.directionalShadow.length=N,i.directionalShadowMap.length=N,i.pointShadow.length=L,i.pointShadowMap.length=L,i.spotShadow.length=I,i.spotShadowMap.length=I,i.directionalShadowMatrix.length=N,i.pointShadowMatrix.length=L,i.spotLightMatrix.length=I+B-O,i.spotLightMap.length=B,i.numSpotLightShadowsWithMaps=O,i.numLightProbes=F,P.directionalLength=S,P.pointLength=M,P.spotLength=R,P.rectAreaLength=A,P.hemiLength=w,P.numDirectionalShadows=N,P.numPointShadows=L,P.numSpotShadows=I,P.numSpotMaps=B,P.numLightProbes=F,i.version=vj++)}function f(p,x){let y=0,v=0,S=0,M=0,R=0;const A=x.matrixWorldInverse;for(let w=0,N=p.length;w<N;w++){const L=p[w];if(L.isDirectionalLight){const I=i.directional[y];I.direction.setFromMatrixPosition(L.matrixWorld),s.setFromMatrixPosition(L.target.matrixWorld),I.direction.sub(s),I.direction.transformDirection(A),y++}else if(L.isSpotLight){const I=i.spot[S];I.position.setFromMatrixPosition(L.matrixWorld),I.position.applyMatrix4(A),I.direction.setFromMatrixPosition(L.matrixWorld),s.setFromMatrixPosition(L.target.matrixWorld),I.direction.sub(s),I.direction.transformDirection(A),S++}else if(L.isRectAreaLight){const I=i.rectArea[M];I.position.setFromMatrixPosition(L.matrixWorld),I.position.applyMatrix4(A),c.identity(),o.copy(L.matrixWorld),o.premultiply(A),c.extractRotation(o),I.halfWidth.set(L.width*.5,0,0),I.halfHeight.set(0,L.height*.5,0),I.halfWidth.applyMatrix4(c),I.halfHeight.applyMatrix4(c),M++}else if(L.isPointLight){const I=i.point[v];I.position.setFromMatrixPosition(L.matrixWorld),I.position.applyMatrix4(A),v++}else if(L.isHemisphereLight){const I=i.hemi[R];I.direction.setFromMatrixPosition(L.matrixWorld),I.direction.transformDirection(A),R++}}}return{setup:h,setupView:f,state:i}}function AC(n){const e=new _j(n),t=[],i=[],s=[];function o(v){y.camera=v,t.length=0,i.length=0,s.length=0}function c(v){t.push(v)}function h(v){i.push(v)}function f(v){s.push(v)}function p(){e.setup(t)}function x(v){e.setupView(t,v)}const y={lightsArray:t,shadowsArray:i,lightProbeGridArray:s,camera:null,lights:e,transmissionRenderTarget:{},textureUnits:0};return{init:o,state:y,setupLights:p,setupLightsView:x,pushLight:c,pushShadow:h,pushLightProbeGrid:f}}function Sj(n){let e=new WeakMap;function t(s,o=0){const c=e.get(s);let h;return c===void 0?(h=new AC(n),e.set(s,[h])):o>=c.length?(h=new AC(n),c.push(h)):h=c[o],h}
vendor: 4,095 bytes, lines 4063-4090
4063function i(){e=new WeakMap}return{get:t,dispose:i}}const Mj=`void main() { 4064 gl_Position = vec4( position, 1.0 ); 4065}`,wj=`uniform sampler2D shadow_pass; 4066uniform vec2 resolution; 4067uniform float radius; 4068void main() { 4069 const float samples = float( VSM_SAMPLES ); 4070 float mean = 0.0; 4071 float squared_mean = 0.0; 4072 float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); 4073 float uvStart = samples <= 1.0 ? 0.0 : - 1.0; 4074 for ( float i = 0.0; i < samples; i ++ ) { 4075 float uvOffset = uvStart + i * uvStride; 4076 #ifdef HORIZONTAL_PASS 4077 vec2 distribution = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ).rg; 4078 mean += distribution.x; 4079 squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; 4080 #else 4081 float depth = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ).r; 4082 mean += depth; 4083 squared_mean += depth * depth; 4084 #endif 4085 } 4086 mean = mean / samples; 4087 squared_mean = squared_mean / samples; 4088 float std_dev = sqrt( max( 0.0, squared_mean - mean * mean ) ); 4089 gl_FragColor = vec4( mean, std_dev, 0.0, 1.0 ); 4090}`,Tj=[new Z(1,0,0),new Z(-1,0,0),new Z(0,1,0),new Z(0,-1,0),new Z(0,0,1),new Z(0,0,-1)],Ej=[new Z(0,-1,0),new Z(0,-1,0),new Z(0,0,1),new Z(0,0,-1),new Z(0,-1,0),new Z(0,-1,0)],CC=new Yt,og=new Z,xS=new Z;function Aj(n,e,t){let i=new fp;const s=new je,o=new je,c=new Xn,h=new iT,f=new sT,p={},x=t.maxTextureSize,y={[xc]:va,[va]:xc,[gl]:gl},v=new dr({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new je},radius:{value:4}},vertexShader:Mj,fragmentShader:wj}),S=v.clone();S.defines.HORIZONTAL_PASS=1;const M=new Kt;M.setAttribute("position",new Vn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const R=new ss(M,v),A=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Xf;let w=this.type;this.render=function(O,F,P){if(A.enabled===!1||A.autoUpdate===!1&&A.needsUpdate===!1||O.length===0)return;this.type===_g&&(ct("WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead."),this.type=Xf);const V=n.getRenderTarget(),j=n.getActiveCubeFace(),W=n.getActiveMipmapLevel(),ee=n.state;ee.setBlending(bl),ee.buffers.depth.getReversed()===!0?ee.buffers.color.setClear(0,0,0,0):ee.buffers.color.setClear(1,1,1,1),ee.buffers.depth.setTest(!0),ee.setScissorTest(!1);const ie=w!==this.type;ie&&F.traverse(function(ue){ue.material&&(Array.isArray(ue.material)?ue.material.forEach(Q=>Q.needsUpdate=!0):ue.material.needsUpdate=!0)});for(let ue=0,Q=O.length;ue<Q;ue++){const Y=O[ue],$=Y.shadow;if($===void 0){ct("WebGLShadowMap:",Y,"has no shadow.");continue}if($.autoUpdate===!1&&$.needsUpdate===!1)continue;s.copy($.mapSize);const le=$.getFrameExtents();s.multiply(le),o.copy($.mapSize),(s.x>x||s.y>x)&&(s.x>x&&(o.x=Math.floor(x/le.x),s.x=o.x*le.x,$.mapSize.x=o.x),s.y>x&&(o.y=Math.floor(x/le.y),s.y=o.y*le.y,$.mapSize.y=o.y));const ge=n.state.buffers.depth.getReversed();if($.camera._reversedDepth=ge,$.map===null||ie===!0){if($.map!==null&&($.map.depthTexture!==null&&($.map.depthTexture.dispose(),$.map.depthTexture=null),$.map.dispose()),this.type===Fd){if(Y.isPointLight){ct("WebGLShadowMap: VSM shadow maps are not supported for PointLights. Use PCF or BasicShadowMap instead.");continue}$.map=new ur(s.x,s.y,{format:Du,type:Ml,minFilter:yi,magFilter:yi,generateMipmaps:!1}),$.map.texture.name=Y.name+".shadowMap",$.map.depthTexture=new Jd(s.x,s.y,ya),$.map.depthTexture.name=Y.name+".shadowMapDepth",$.map.depthTexture.format=wl,$.map.depthTexture.compareFunction=null,$.map.depthTexture.minFilter=qi,$.map.depthTexture.magFilter=qi}else Y.isPointLight?($.map=new mT(s.x),$.map.depthTexture=new mL(s.x,Xr)):($.map=new ur(s.x,s.y),$.map.depthTexture=new Jd(s.x,s.y,Xr)),$.map.depthTexture.name=Y.name+".shadowMap",$.map.depthTexture.format=wl,this.type===Xf?($.map.depthTexture.compareFunction=ge?Z1:Y1,$.map.depthTexture.minFilter=yi,$.map.depthTexture.magFilter=yi):($.map.depthTexture.compareFunction=null,$.map.depthTexture.minFilter=qi,$.map.depthTexture.magFilter=qi);$.camera.updateProjectionMatrix()}
vendor: 9,306 bytes, line 4090
4090const Ce=$.map.isWebGLCubeRenderTarget?6:1;for(let q=0;q<Ce;q++){if($.map.isWebGLCubeRenderTarget)n.setRenderTarget($.map,q),n.clear();else{q===0&&(n.setRenderTarget($.map),n.clear());const ae=$.getViewport(q);c.set(o.x*ae.x,o.y*ae.y,o.x*ae.z,o.y*ae.w),ee.viewport(c)}if(Y.isPointLight){const ae=$.camera,Ae=$.matrix,Ie=Y.distance||ae.far;Ie!==ae.far&&(ae.far=Ie,ae.updateProjectionMatrix()),og.setFromMatrixPosition(Y.matrixWorld),ae.position.copy(og),xS.copy(ae.position),xS.add(Tj[q]),ae.up.copy(Ej[q]),ae.lookAt(xS),ae.updateMatrixWorld(),Ae.makeTranslation(-og.x,-og.y,-og.z),CC.multiplyMatrices(ae.projectionMatrix,ae.matrixWorldInverse),$._frustum.setFromProjectionMatrix(CC,ae.coordinateSystem,ae.reversedDepth)}else $.updateMatrices(Y);i=$.getFrustum(),I(F,P,$.camera,Y,this.type)}$.isPointLightShadow!==!0&&this.type===Fd&&N($,P),$.needsUpdate=!1}w=this.type,A.needsUpdate=!1,n.setRenderTarget(V,j,W)};function N(O,F){const P=e.update(R);v.defines.VSM_SAMPLES!==O.blurSamples&&(v.defines.VSM_SAMPLES=O.blurSamples,S.defines.VSM_SAMPLES=O.blurSamples,v.needsUpdate=!0,S.needsUpdate=!0),O.mapPass===null&&(O.mapPass=new ur(s.x,s.y,{format:Du,type:Ml})),v.uniforms.shadow_pass.value=O.map.depthTexture,v.uniforms.resolution.value=O.mapSize,v.uniforms.radius.value=O.radius,n.setRenderTarget(O.mapPass),n.clear(),n.renderBufferDirect(F,null,P,v,R,null),S.uniforms.shadow_pass.value=O.mapPass.texture,S.uniforms.resolution.value=O.mapSize,S.uniforms.radius.value=O.radius,n.setRenderTarget(O.map),n.clear(),n.renderBufferDirect(F,null,P,S,R,null)}function L(O,F,P,V){let j=null;const W=P.isPointLight===!0?O.customDistanceMaterial:O.customDepthMaterial;if(W!==void 0)j=W;else if(j=P.isPointLight===!0?f:h,n.localClippingEnabled&&F.clipShadows===!0&&Array.isArray(F.clippingPlanes)&&F.clippingPlanes.length!==0||F.displacementMap&&F.displacementScale!==0||F.alphaMap&&F.alphaTest>0||F.map&&F.alphaTest>0||F.alphaToCoverage===!0){const ee=j.uuid,ie=F.uuid;let ue=p[ee];ue===void 0&&(ue={},p[ee]=ue);let Q=ue[ie];Q===void 0&&(Q=j.clone(),ue[ie]=Q,F.addEventListener("dispose",B)),j=Q}if(j.visible=F.visible,j.wireframe=F.wireframe,V===Fd?j.side=F.shadowSide!==null?F.shadowSide:F.side:j.side=F.shadowSide!==null?F.shadowSide:y[F.side],j.alphaMap=F.alphaMap,j.alphaTest=F.alphaToCoverage===!0?.5:F.alphaTest,j.map=F.map,j.clipShadows=F.clipShadows,j.clippingPlanes=F.clippingPlanes,j.clipIntersection=F.clipIntersection,j.displacementMap=F.displacementMap,j.displacementScale=F.displacementScale,j.displacementBias=F.displacementBias,j.wireframeLinewidth=F.wireframeLinewidth,j.linewidth=F.linewidth,P.isPointLight===!0&&j.isMeshDistanceMaterial===!0){const ee=n.properties.get(j);ee.light=P}return j}function I(O,F,P,V,j){if(O.visible===!1)return;if(O.layers.test(F.layers)&&(O.isMesh||O.isLine||O.isPoints)&&(O.castShadow||O.receiveShadow&&j===Fd)&&(!O.frustumCulled||i.intersectsObject(O))){O.modelViewMatrix.multiplyMatrices(P.matrixWorldInverse,O.matrixWorld);const ie=e.update(O),ue=O.material;if(Array.isArray(ue)){const Q=ie.groups;for(let Y=0,$=Q.length;Y<$;Y++){const le=Q[Y],ge=ue[le.materialIndex];if(ge&&ge.visible){const Ce=L(O,ge,V,j);O.onBeforeShadow(n,O,F,P,ie,Ce,le),n.renderBufferDirect(P,null,ie,Ce,O,le),O.onAfterShadow(n,O,F,P,ie,Ce,le)}}}else if(ue.visible){const Q=L(O,ue,V,j);O.onBeforeShadow(n,O,F,P,ie,Q,null),n.renderBufferDirect(P,null,ie,Q,O,null),O.onAfterShadow(n,O,F,P,ie,Q,null)}}const ee=O.children;for(let ie=0,ue=ee.length;ie<ue;ie++)I(ee[ie],F,P,V,j)}function B(O){O.target.removeEventListener("dispose",B);for(const P in p){const V=p[P],j=O.target.uuid;j in V&&(V[j].dispose(),delete V[j])}}}function Cj(n,e){function t(){let se=!1;const Ke=new Xn;let De=null;const ut=new Xn(0,0,0,0);return{setMask:function(it){De!==it&&!se&&(n.colorMask(it,it,it,it),De=it)},setLocked:function(it){se=it},setClear:function(it,ke,_t,Bt,qn){qn===!0&&(it*=Bt,ke*=Bt,_t*=Bt),Ke.set(it,ke,_t,Bt),ut.equals(Ke)===!1&&(n.clearColor(it,ke,_t,Bt),ut.copy(Ke))},reset:function(){se=!1,De=null,ut.set(-1,0,0,0)}}}function i(){let se=!1,Ke=!1,De=null,ut=null,it=null;return{setReversed:function(ke){if(Ke!==ke){const _t=e.get("EXT_clip_control");ke?_t.clipControlEXT(_t.LOWER_LEFT_EXT,_t.ZERO_TO_ONE_EXT):_t.clipControlEXT(_t.LOWER_LEFT_EXT,_t.NEGATIVE_ONE_TO_ONE_EXT),Ke=ke;const Bt=it;it=null,this.setClear(Bt)}},getReversed:function(){return Ke},setTest:function(ke){ke?Ve(n.DEPTH_TEST):Ze(n.DEPTH_TEST)},setMask:function(ke){De!==ke&&!se&&(n.depthMask(ke),De=ke)},setFunc:function(ke){if(Ke&&(ke=XF[ke]),ut!==ke){switch(ke){case Lv:n.depthFunc(n.NEVER);break;case Iv:n.depthFunc(n.ALWAYS);break;case Pv:n.depthFunc(n.LESS);break;case Kd:n.depthFunc(n.LEQUAL);break;case Uv:n.depthFunc(n.EQUAL);break;case Ov:n.depthFunc(n.GEQUAL);break;case zv:n.depthFunc(n.GREATER);break;case Bv:n.depthFunc(n.NOTEQUAL);break;default:n.depthFunc(n.LEQUAL)}ut=ke}},setLocked:function(ke){se=ke},setClear:function(ke){it!==ke&&(it=ke,Ke&&(ke=1-ke),n.clearDepth(ke))},reset:function(){se=!1,De=null,ut=null,it=null,Ke=!1}}}function s(){let se=!1,Ke=null,De=null,ut=null,it=null,ke=null,_t=null,Bt=null,qn=null;return{setTest:function(Sn){se||(Sn?Ve(n.STENCIL_TEST):Ze(n.STENCIL_TEST))},setMask:function(Sn){Ke!==Sn&&!se&&(n.stencilMask(Sn),Ke=Sn)},setFunc:function(Sn,bs,Us){(De!==Sn||ut!==bs||it!==Us)&&(n.stencilFunc(Sn,bs,Us),De=Sn,ut=bs,it=Us)},setOp:function(Sn,bs,Us){(ke!==Sn||_t!==bs||Bt!==Us)&&(n.stencilOp(Sn,bs,Us),ke=Sn,_t=bs,Bt=Us)},setLocked:function(Sn){se=Sn},setClear:function(Sn){qn!==Sn&&(n.clearStencil(Sn),qn=Sn)},reset:function(){se=!1,Ke=null,De=null,ut=null,it=null,ke=null,_t=null,Bt=null,qn=null}}}const o=new t,c=new i,h=new s,f=new WeakMap,p=new WeakMap;let x={},y={},v={},S=new WeakMap,M=[],R=null,A=!1,w=null,N=null,L=null,I=null,B=null,O=null,F=null,P=new mt(0,0,0),V=0,j=!1,W=null,ee=null,ie=null,ue=null,Q=null;const Y=n.getParameter(n.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let $=!1,le=0;const ge=n.getParameter(n.VERSION);ge.indexOf("WebGL")!==-1?(le=parseFloat(/^WebGL (\d)/.exec(ge)[1]),$=le>=1):ge.indexOf("OpenGL ES")!==-1&&(le=parseFloat(/^OpenGL ES (\d)/.exec(ge)[1]),$=le>=2);let Ce=null,q={};const ae=n.getParameter(n.SCISSOR_BOX),Ae=n.getParameter(n.VIEWPORT),Ie=new Xn().fromArray(ae),We=new Xn().fromArray(Ae);function pe(se,Ke,De,ut){const it=new Uint8Array(4),ke=n.createTexture();n.bindTexture(se,ke),n.texParameteri(se,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(se,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let _t=0;_t<De;_t++)se===n.TEXTURE_3D||se===n.TEXTURE_2D_ARRAY?n.texImage3D(Ke,0,n.RGBA,1,1,ut,0,n.RGBA,n.UNSIGNED_BYTE,it):n.texImage2D(Ke+_t,0,n.RGBA,1,1,0,n.RGBA,n.UNSIGNED_BYTE,it);return ke}const Be={};Be[n.TEXTURE_2D]=pe(n.TEXTURE_2D,n.TEXTURE_2D,1),Be[n.TEXTURE_CUBE_MAP]=pe(n.TEXTURE_CUBE_MAP,n.TEXTURE_CUBE_MAP_POSITIVE_X,6),Be[n.TEXTURE_2D_ARRAY]=pe(n.TEXTURE_2D_ARRAY,n.TEXTURE_2D_ARRAY,1,1),Be[n.TEXTURE_3D]=pe(n.TEXTURE_3D,n.TEXTURE_3D,1,1),o.setClear(0,0,0,1),c.setClear(1),h.setClear(0),Ve(n.DEPTH_TEST),c.setFunc(Kd),at(!1),st(dM),Ve(n.CULL_FACE),Xe(bl);function Ve(se){x[se]!==!0&&(n.enable(se),x[se]=!0)}function Ze(se){x[se]!==!1&&(n.disable(se),x[se]=!1)}function Rt(se,Ke){return v[se]!==Ke?(n.bindFramebuffer(se,Ke),v[se]=Ke,se===n.DRAW_FRAMEBUFFER&&(v[n.FRAMEBUFFER]=Ke),se===n.FRAMEBUFFER&&(v[n.DRAW_FRAMEBUFFER]=Ke),!0):!1}function Ct(se,Ke){let De=M,ut=!1;if(se){De=S.get(Ke),De===void 0&&(De=[],S.set(Ke,De));const it=se.textures;if(De.length!==it.length||De[0]!==n.COLOR_ATTACHMENT0){for(let ke=0,_t=it.length;ke<_t;ke++)De[ke]=n.COLOR_ATTACHMENT0+ke;De.length=it.length,ut=!0}}else De[0]!==n.BACK&&(De[0]=n.BACK,ut=!0);ut&&n.drawBuffers(De)}function Jt(se){return R!==se?(n.useProgram(se),R=se,!0):!1}const Nt={[bu]:n.FUNC_ADD,[wD]:n.FUNC_SUBTRACT,[TD]:n.FUNC_REVERSE_SUBTRACT};Nt[ED]=n.MIN,Nt[AD]=n.MAX;const Ue={[CD]:n.ZERO,[RD]:n.ONE,[ND]:n.SRC_COLOR,[Nv]:n.SRC_ALPHA,[OD]:n.SRC_ALPHA_SATURATE,[PD]:n.DST_COLOR,[LD]:n.DST_ALPHA,[DD]:n.ONE_MINUS_SRC_COLOR,[Dv]:n.ONE_MINUS_SRC_ALPHA,[UD]:n.ONE_MINUS_DST_COLOR,[ID]:n.ONE_MINUS_DST_ALPHA,[zD]:n.CONSTANT_COLOR,[BD]:n.ONE_MINUS_CONSTANT_COLOR,[VD]:n.CONSTANT_ALPHA,[FD]:n.ONE_MINUS_CONSTANT_ALPHA};function Xe(se,Ke,De,ut,it,ke,_t,Bt,qn,Sn){if(se===bl){A===!0&&(Ze(n.BLEND),A=!1);return}if(A===!1&&(Ve(n.BLEND),A=!0),se!==MD){if(se!==w||Sn!==j){if((N!==bu||B!==bu)&&(n.blendEquation(n.FUNC_ADD),N=bu,B=bu),Sn)switch(se){case qd:n.blendFuncSeparate(n.ONE,n.ONE_MINUS_SRC_ALPHA,n.ONE,n.ONE_MINUS_SRC_ALPHA);break;case hM:n.blendFunc(n.ONE,n.ONE);break;case fM:n.blendFuncSeparate(n.ZERO,n.ONE_MINUS_SRC_COLOR,n.ZERO,n.ONE);break;case pM:n.blendFuncSeparate(n.DST_COLOR,n.ONE_MINUS_SRC_ALPHA,n.ZERO,n.ONE);break;default:Et("WebGLState: Invalid blending: ",se);break}else switch(se){case qd:n.blendFuncSeparate(n.SRC_ALPHA,n.ONE_MINUS_SRC_ALPHA,n.ONE,n.ONE_MINUS_SRC_ALPHA);break;case hM:n.blendFuncSeparate(n.SRC_ALPHA,n.ONE,n.ONE,n.ONE);break;case fM:Et("WebGLState: SubtractiveBlending requires material.premultipliedAlpha = true");break;case pM:Et("WebGLState: MultiplyBlending requires material.premultipliedAlpha = true");break;default:Et("WebGLState: Invalid blending: ",se);break}L=null,I=null,O=null,F=null,P.set(0,0,0),V=0,w=se,j=Sn}return}it=it||Ke,ke=ke||De,_t=_t||ut,(Ke!==N||it!==B)&&(n.blendEquationSeparate(Nt[Ke],Nt[it]),N=Ke,B=it),(De!==L||ut!==I||ke!==O||_t!==F
vendor: 10,217 bytes, line 4090
4090)&&(n.blendFuncSeparate(Ue[De],Ue[ut],Ue[ke],Ue[_t]),L=De,I=ut,O=ke,F=_t),(Bt.equals(P)===!1||qn!==V)&&(n.blendColor(Bt.r,Bt.g,Bt.b,qn),P.copy(Bt),V=qn),w=se,j=!1}function Oe(se,Ke){se.side===gl?Ze(n.CULL_FACE):Ve(n.CULL_FACE);let De=se.side===va;Ke&&(De=!De),at(De),se.blending===qd&&se.transparent===!1?Xe(bl):Xe(se.blending,se.blendEquation,se.blendSrc,se.blendDst,se.blendEquationAlpha,se.blendSrcAlpha,se.blendDstAlpha,se.blendColor,se.blendAlpha,se.premultipliedAlpha),c.setFunc(se.depthFunc),c.setTest(se.depthTest),c.setMask(se.depthWrite),o.setMask(se.colorWrite);const ut=se.stencilWrite;h.setTest(ut),ut&&(h.setMask(se.stencilWriteMask),h.setFunc(se.stencilFunc,se.stencilRef,se.stencilFuncMask),h.setOp(se.stencilFail,se.stencilZFail,se.stencilZPass)),J(se.polygonOffset,se.polygonOffsetFactor,se.polygonOffsetUnits),se.alphaToCoverage===!0?Ve(n.SAMPLE_ALPHA_TO_COVERAGE):Ze(n.SAMPLE_ALPHA_TO_COVERAGE)}function at(se){W!==se&&(se?n.frontFace(n.CW):n.frontFace(n.CCW),W=se)}function st(se){se!==bD?(Ve(n.CULL_FACE),se!==ee&&(se===dM?n.cullFace(n.BACK):se===_D?n.cullFace(n.FRONT):n.cullFace(n.FRONT_AND_BACK))):Ze(n.CULL_FACE),ee=se}function Pt(se){se!==ie&&($&&n.lineWidth(se),ie=se)}function J(se,Ke,De){se?(Ve(n.POLYGON_OFFSET_FILL),(ue!==Ke||Q!==De)&&(ue=Ke,Q=De,c.getReversed()&&(Ke=-Ke),n.polygonOffset(Ke,De))):Ze(n.POLYGON_OFFSET_FILL)}function Ot(se){se?Ve(n.SCISSOR_TEST):Ze(n.SCISSOR_TEST)}function gt(se){se===void 0&&(se=n.TEXTURE0+Y-1),Ce!==se&&(n.activeTexture(se),Ce=se)}function vt(se,Ke,De){De===void 0&&(Ce===null?De=n.TEXTURE0+Y-1:De=Ce);let ut=q[De];ut===void 0&&(ut={type:void 0,texture:void 0},q[De]=ut),(ut.type!==se||ut.texture!==Ke)&&(Ce!==De&&(n.activeTexture(De),Ce=De),n.bindTexture(se,Ke||Be[se]),ut.type=se,ut.texture=Ke)}function He(){const se=q[Ce];se!==void 0&&se.type!==void 0&&(n.bindTexture(se.type,null),se.type=void 0,se.texture=void 0)}function Cn(){try{n.compressedTexImage2D(...arguments)}catch(se){Et("WebGLState:",se)}}function X(){try{n.compressedTexImage3D(...arguments)}catch(se){Et("WebGLState:",se)}}function z(){try{n.texSubImage2D(...arguments)}catch(se){Et("WebGLState:",se)}}function de(){try{n.texSubImage3D(...arguments)}catch(se){Et("WebGLState:",se)}}function Re(){try{n.compressedTexSubImage2D(...arguments)}catch(se){Et("WebGLState:",se)}}function Fe(){try{n.compressedTexSubImage3D(...arguments)}catch(se){Et("WebGLState:",se)}}function $e(){try{n.texStorage2D(...arguments)}catch(se){Et("WebGLState:",se)}}function Je(){try{n.texStorage3D(...arguments)}catch(se){Et("WebGLState:",se)}}function Ee(){try{n.texImage2D(...arguments)}catch(se){Et("WebGLState:",se)}}function Ne(){try{n.texImage3D(...arguments)}catch(se){Et("WebGLState:",se)}}function rt(se){return y[se]!==void 0?y[se]:n.getParameter(se)}function lt(se,Ke){y[se]!==Ke&&(n.pixelStorei(se,Ke),y[se]=Ke)}function tt(se){Ie.equals(se)===!1&&(n.scissor(se.x,se.y,se.z,se.w),Ie.copy(se))}function et(se){We.equals(se)===!1&&(n.viewport(se.x,se.y,se.z,se.w),We.copy(se))}function kt(se,Ke){let De=p.get(Ke);De===void 0&&(De=new WeakMap,p.set(Ke,De));let ut=De.get(se);ut===void 0&&(ut=n.getUniformBlockIndex(Ke,se.name),De.set(se,ut))}function jt(se,Ke){const ut=p.get(Ke).get(se);f.get(Ke)!==ut&&(n.uniformBlockBinding(Ke,ut,se.__bindingPointIndex),f.set(Ke,ut))}function un(){n.disable(n.BLEND),n.disable(n.CULL_FACE),n.disable(n.DEPTH_TEST),n.disable(n.POLYGON_OFFSET_FILL),n.disable(n.SCISSOR_TEST),n.disable(n.STENCIL_TEST),n.disable(n.SAMPLE_ALPHA_TO_COVERAGE),n.blendEquation(n.FUNC_ADD),n.blendFunc(n.ONE,n.ZERO),n.blendFuncSeparate(n.ONE,n.ZERO,n.ONE,n.ZERO),n.blendColor(0,0,0,0),n.colorMask(!0,!0,!0,!0),n.clearColor(0,0,0,0),n.depthMask(!0),n.depthFunc(n.LESS),c.setReversed(!1),n.clearDepth(1),n.stencilMask(4294967295),n.stencilFunc(n.ALWAYS,0,4294967295),n.stencilOp(n.KEEP,n.KEEP,n.KEEP),n.clearStencil(0),n.cullFace(n.BACK),n.frontFace(n.CCW),n.polygonOffset(0,0),n.activeTexture(n.TEXTURE0),n.bindFramebuffer(n.FRAMEBUFFER,null),n.bindFramebuffer(n.DRAW_FRAMEBUFFER,null),n.bindFramebuffer(n.READ_FRAMEBUFFER,null),n.useProgram(null),n.lineWidth(1),n.scissor(0,0,n.canvas.width,n.canvas.height),n.viewport(0,0,n.canvas.width,n.canvas.height),n.pixelStorei(n.PACK_ALIGNMENT,4),n.pixelStorei(n.UNPACK_ALIGNMENT,4),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,!1),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,n.BROWSER_DEFAULT_WEBGL),n.pixelStorei(n.PACK_ROW_LENGTH,0),n.pixelStorei(n.PACK_SKIP_PIXELS,0),n.pixelStorei(n.PACK_SKIP_ROWS,0),n.pixelStorei(n.UNPACK_ROW_LENGTH,0),n.pixelStorei(n.UNPACK_IMAGE_HEIGHT,0),n.pixelStorei(n.UNPACK_SKIP_PIXELS,0),n.pixelStorei(n.UNPACK_SKIP_ROWS,0),n.pixelStorei(n.UNPACK_SKIP_IMAGES,0),x={},y={},Ce=null,q={},v={},S=new WeakMap,M=[],R=null,A=!1,w=null,N=null,L=null,I=null,B=null,O=null,F=null,P=new mt(0,0,0),V=0,j=!1,W=null,ee=null,ie=null,ue=null,Q=null,Ie.set(0,0,n.canvas.width,n.canvas.height),We.set(0,0,n.canvas.width,n.canvas.height),o.reset(),c.reset(),h.reset()}return{buffers:{color:o,depth:c,stencil:h},enable:Ve,disable:Ze,bindFramebuffer:Rt,drawBuffers:Ct,useProgram:Jt,setBlending:Xe,setMaterial:Oe,setFlipSided:at,setCullFace:st,setLineWidth:Pt,setPolygonOffset:J,setScissorTest:Ot,activeTexture:gt,bindTexture:vt,unbindTexture:He,compressedTexImage2D:Cn,compressedTexImage3D:X,texImage2D:Ee,texImage3D:Ne,pixelStorei:lt,getParameter:rt,updateUBOMapping:kt,uniformBlockBinding:jt,texStorage2D:$e,texStorage3D:Je,texSubImage2D:z,texSubImage3D:de,compressedTexSubImage2D:Re,compressedTexSubImage3D:Fe,scissor:tt,viewport:et,reset:un}}function Rj(n,e,t,i,s,o,c){const h=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,f=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),p=new je,x=new WeakMap,y=new Set;let v;const S=new WeakMap;let M=!1;try{M=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function R(X,z){return M?new OffscreenCanvas(X,z):Zg("canvas")}function A(X,z,de){let Re=1;const Fe=Cn(X);if((Fe.width>de||Fe.height>de)&&(Re=de/Math.max(Fe.width,Fe.height)),Re<1)if(typeof HTMLImageElement<"u"&&X instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&X instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&X instanceof ImageBitmap||typeof VideoFrame<"u"&&X instanceof VideoFrame){const $e=Math.floor(Re*Fe.width),Je=Math.floor(Re*Fe.height);v===void 0&&(v=R($e,Je));const Ee=z?R($e,Je):v;return Ee.width=$e,Ee.height=Je,Ee.getContext("2d").drawImage(X,0,0,$e,Je),ct("WebGLRenderer: Texture has been resized from ("+Fe.width+"x"+Fe.height+") to ("+$e+"x"+Je+")."),Ee}else return"data"in X&&ct("WebGLRenderer: Image in DataTexture is too big ("+Fe.width+"x"+Fe.height+")."),X;return X}function w(X){return X.generateMipmaps}function N(X){n.generateMipmap(X)}function L(X){return X.isWebGLCubeRenderTarget?n.TEXTURE_CUBE_MAP:X.isWebGL3DRenderTarget?n.TEXTURE_3D:X.isWebGLArrayRenderTarget||X.isCompressedArrayTexture?n.TEXTURE_2D_ARRAY:n.TEXTURE_2D}function I(X,z,de,Re,Fe,$e=!1){if(X!==null){if(n[X]!==void 0)return n[X];ct("WebGLRenderer: Attempt to use non-existing WebGL internal format '"+X+"'")}let Je;Re&&(Je=e.get("EXT_texture_norm16"),Je||ct("WebGLRenderer: Unable to use normalized textures without EXT_texture_norm16 extension"));let Ee=z;if(z===n.RED&&(de===n.FLOAT&&(Ee=n.R32F),de===n.HALF_FLOAT&&(Ee=n.R16F),de===n.UNSIGNED_BYTE&&(Ee=n.R8),de===n.UNSIGNED_SHORT&&Je&&(Ee=Je.R16_EXT),de===n.SHORT&&Je&&(Ee=Je.R16_SNORM_EXT)),z===n.RED_INTEGER&&(de===n.UNSIGNED_BYTE&&(Ee=n.R8UI),de===n.UNSIGNED_SHORT&&(Ee=n.R16UI),de===n.UNSIGNED_INT&&(Ee=n.R32UI),de===n.BYTE&&(Ee=n.R8I),de===n.SHORT&&(Ee=n.R16I),de===n.INT&&(Ee=n.R32I)),z===n.RG&&(de===n.FLOAT&&(Ee=n.RG32F),de===n.HALF_FLOAT&&(Ee=n.RG16F),de===n.UNSIGNED_BYTE&&(Ee=n.RG8),de===n.UNSIGNED_SHORT&&Je&&(Ee=Je.RG16_EXT),de===n.SHORT&&Je&&(Ee=Je.RG16_SNORM_EXT)),z===n.RG_INTEGER&&(de===n.UNSIGNED_BYTE&&(Ee=n.RG8UI),de===n.UNSIGNED_SHORT&&(Ee=n.RG16UI),de===n.UNSIGNED_INT&&(Ee=n.RG32UI),de===n.BYTE&&(Ee=n.RG8I),de===n.SHORT&&(Ee=n.RG16I),de===n.INT&&(Ee=n.RG32I)),z===n.RGB_INTEGER&&(de===n.UNSIGNED_BYTE&&(Ee=n.RGB8UI),de===n.UNSIGNED_SHORT&&(Ee=n.RGB16UI),de===n.UNSIGNED_INT&&(Ee=n.RGB32UI),de===n.BYTE&&(Ee=n.RGB8I),de===n.SHORT&&(Ee=n.RGB16I),de===n.INT&&(Ee=n.RGB32I)),z===n.RGBA_INTEGER&&(de===n.UNSIGNED_BYTE&&(Ee=n.RGBA8UI),de===n.UNSIGNED_SHORT&&(Ee=n.RGBA16UI),de===n.UNSIGNED_INT&&(Ee=n.RGBA32UI),de===n.BYTE&&(Ee=n.RGBA8I),de===n.SHORT&&(Ee=n.RGBA16I),de===n.INT&&(Ee=n.RGBA32I)),z===n.RGB&&(de===n.UNSIGNED_SHORT&&Je&&(Ee=Je.RGB16_EXT),de===n.SHORT&&Je&&(Ee=Je.RGB16_SNORM_EXT),de===n.UNSIGNED_INT_5_9_9_9_REV&&(Ee=n.RGB9_E5),de===n.UNSIGNED_INT_10F_11F_11F_REV&&(Ee=n.R11F_G11F_B10F)),z===n.RGBA){const Ne=$e?qg:_n.getTransfer(Fe);de===n.FLOAT&&(Ee=n.RGBA32F),de===n.HALF_FLOAT&&(Ee=n.RGBA16F),de===n.UNSIGNED_BYTE&&(Ee=Ne===Wn?n.SRGB8_ALPHA8:n.RGBA8),de===n.UNSIGNED_SHORT&&Je&&(Ee=Je.RGBA16_EXT),de===n.SHORT&&Je&&(Ee=Je.RGBA16_SNORM_EXT),de===n.UNSIGNED_SHORT_4_4_4_4&&(Ee=n.RGBA4),de===n.UNSIGNED_SHORT_5_5_5_1&&(Ee=n.RGB5_A1)}return(Ee===n.R16F||Ee===n.R32F||Ee===n.RG16F||Ee===n.RG32F||Ee===n.RGBA16F||Ee===n.RGBA32F)&&e.get("EXT_color_buffer_float"),Ee}function B(X,z){let de;return X?z===null||z===Xr||z===Jf?de=n.DEPTH24_STENCIL8:z===ya?de=n.DEPTH32F_STENCIL8:z===Qf&&(de=n.DEPTH24_STENCIL8,ct("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):z===null||z===Xr||z===Jf?de=n.DEPTH_COMPONENT24:z===ya?de=n.DEPTH_COMPONENT32F:z===Qf&&(de=n.DEPTH_COMPONENT16),de}function O(X,z){return w(X)===!0||X.isFramebufferTexture&&X.minFilter!==qi&&X.minFilter!==yi?Math.log2(Math.max(z.width,z.height))+1:X.mipmaps!==void 0&&X.mipmaps.length>0?X.mipmaps.length:X.isCompressedTexture&&Array.isArray(X.image)?z.mipmaps.length:1}function F(X){const z=X.target;z.removeEventListener("dispose",F),V(z),z.isVideoTexture&&x.delete(z),z.isHTMLTexture&&y.delete(z)}function P(X){const z=X.target;z.removeEventListener("dispose",P),W(z)}function V(X){const z=i.get(X);if(z.__webglInit===void 0)return;const de=X.source,Re=S.get(de);if(Re){const Fe=Re[z.__cacheKey];Fe.usedTimes--,Fe.usedTimes===0&&j(X),Object.keys(Re).length===0&&S.delete(
vendor: 9,972 bytes, line 4090
4090de)}i.remove(X)}function j(X){const z=i.get(X);n.deleteTexture(z.__webglTexture);const de=X.source,Re=S.get(de);delete Re[z.__cacheKey],c.memory.textures--}function W(X){const z=i.get(X);if(X.depthTexture&&(X.depthTexture.dispose(),i.remove(X.depthTexture)),X.isWebGLCubeRenderTarget)for(let Re=0;Re<6;Re++){if(Array.isArray(z.__webglFramebuffer[Re]))for(let Fe=0;Fe<z.__webglFramebuffer[Re].length;Fe++)n.deleteFramebuffer(z.__webglFramebuffer[Re][Fe]);else n.deleteFramebuffer(z.__webglFramebuffer[Re]);z.__webglDepthbuffer&&n.deleteRenderbuffer(z.__webglDepthbuffer[Re])}else{if(Array.isArray(z.__webglFramebuffer))for(let Re=0;Re<z.__webglFramebuffer.length;Re++)n.deleteFramebuffer(z.__webglFramebuffer[Re]);else n.deleteFramebuffer(z.__webglFramebuffer);if(z.__webglDepthbuffer&&n.deleteRenderbuffer(z.__webglDepthbuffer),z.__webglMultisampledFramebuffer&&n.deleteFramebuffer(z.__webglMultisampledFramebuffer),z.__webglColorRenderbuffer)for(let Re=0;Re<z.__webglColorRenderbuffer.length;Re++)z.__webglColorRenderbuffer[Re]&&n.deleteRenderbuffer(z.__webglColorRenderbuffer[Re]);z.__webglDepthRenderbuffer&&n.deleteRenderbuffer(z.__webglDepthRenderbuffer)}const de=X.textures;for(let Re=0,Fe=de.length;Re<Fe;Re++){const $e=i.get(de[Re]);$e.__webglTexture&&(n.deleteTexture($e.__webglTexture),c.memory.textures--),i.remove(de[Re])}i.remove(X)}let ee=0;function ie(){ee=0}function ue(){return ee}function Q(X){ee=X}function Y(){const X=ee;return X>=s.maxTextures&&ct("WebGLTextures: Trying to use "+X+" texture units while this GPU supports only "+s.maxTextures),ee+=1,X}function $(X){const z=[];return z.push(X.wrapS),z.push(X.wrapT),z.push(X.wrapR||0),z.push(X.magFilter),z.push(X.minFilter),z.push(X.anisotropy),z.push(X.internalFormat),z.push(X.format),z.push(X.type),z.push(X.generateMipmaps),z.push(X.premultiplyAlpha),z.push(X.flipY),z.push(X.unpackAlignment),z.push(X.colorSpace),z.join()}function le(X,z){const de=i.get(X);if(X.isVideoTexture&&vt(X),X.isRenderTargetTexture===!1&&X.isExternalTexture!==!0&&X.version>0&&de.__version!==X.version){const Re=X.image;if(Re===null)ct("WebGLRenderer: Texture marked for update but no image data found.");else if(Re.complete===!1)ct("WebGLRenderer: Texture marked for update but image is incomplete");else{Ze(de,X,z);return}}else X.isExternalTexture&&(de.__webglTexture=X.sourceTexture?X.sourceTexture:null);t.bindTexture(n.TEXTURE_2D,de.__webglTexture,n.TEXTURE0+z)}function ge(X,z){const de=i.get(X);if(X.isRenderTargetTexture===!1&&X.version>0&&de.__version!==X.version){Ze(de,X,z);return}else X.isExternalTexture&&(de.__webglTexture=X.sourceTexture?X.sourceTexture:null);t.bindTexture(n.TEXTURE_2D_ARRAY,de.__webglTexture,n.TEXTURE0+z)}function Ce(X,z){const de=i.get(X);if(X.isRenderTargetTexture===!1&&X.version>0&&de.__version!==X.version){Ze(de,X,z);return}t.bindTexture(n.TEXTURE_3D,de.__webglTexture,n.TEXTURE0+z)}function q(X,z){const de=i.get(X);if(X.isCubeDepthTexture!==!0&&X.version>0&&de.__version!==X.version){Rt(de,X,z);return}t.bindTexture(n.TEXTURE_CUBE_MAP,de.__webglTexture,n.TEXTURE0+z)}const ae={[kg]:n.REPEAT,[Xa]:n.CLAMP_TO_EDGE,[Hg]:n.MIRRORED_REPEAT},Ae={[qi]:n.NEAREST,[Lw]:n.NEAREST_MIPMAP_NEAREST,[Gf]:n.NEAREST_MIPMAP_LINEAR,[yi]:n.LINEAR,[wg]:n.LINEAR_MIPMAP_NEAREST,[xl]:n.LINEAR_MIPMAP_LINEAR},Ie={[ZD]:n.NEVER,[eL]:n.ALWAYS,[KD]:n.LESS,[Y1]:n.LEQUAL,[$D]:n.EQUAL,[Z1]:n.GEQUAL,[QD]:n.GREATER,[JD]:n.NOTEQUAL};function We(X,z){if(z.type===ya&&e.has("OES_texture_float_linear")===!1&&(z.magFilter===yi||z.magFilter===wg||z.magFilter===Gf||z.magFilter===xl||z.minFilter===yi||z.minFilter===wg||z.minFilter===Gf||z.minFilter===xl)&&ct("WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),n.texParameteri(X,n.TEXTURE_WRAP_S,ae[z.wrapS]),n.texParameteri(X,n.TEXTURE_WRAP_T,ae[z.wrapT]),(X===n.TEXTURE_3D||X===n.TEXTURE_2D_ARRAY)&&n.texParameteri(X,n.TEXTURE_WRAP_R,ae[z.wrapR]),n.texParameteri(X,n.TEXTURE_MAG_FILTER,Ae[z.magFilter]),n.texParameteri(X,n.TEXTURE_MIN_FILTER,Ae[z.minFilter]),z.compareFunction&&(n.texParameteri(X,n.TEXTURE_COMPARE_MODE,n.COMPARE_REF_TO_TEXTURE),n.texParameteri(X,n.TEXTURE_COMPARE_FUNC,Ie[z.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(z.magFilter===qi||z.minFilter!==Gf&&z.minFilter!==xl||z.type===ya&&e.has("OES_texture_float_linear")===!1)return;if(z.anisotropy>1||i.get(z).__currentAnisotropy){const de=e.get("EXT_texture_filter_anisotropic");n.texParameterf(X,de.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(z.anisotropy,s.getMaxAnisotropy())),i.get(z).__currentAnisotropy=z.anisotropy}}}function pe(X,z){let de=!1;X.__webglInit===void 0&&(X.__webglInit=!0,z.addEventListener("dispose",F));const Re=z.source;let Fe=S.get(Re);Fe===void 0&&(Fe={},S.set(Re,Fe));const $e=$(z);if($e!==X.__cacheKey){Fe[$e]===void 0&&(Fe[$e]={texture:n.createTexture(),usedTimes:0},c.memory.textures++,de=!0),Fe[$e].usedTimes++;const Je=Fe[X.__cacheKey];Je!==void 0&&(Fe[X.__cacheKey].usedTimes--,Je.usedTimes===0&&j(z)),X.__cacheKey=$e,X.__webglTexture=Fe[$e].texture}return de}function Be(X,z,de){return Math.floor(Math.floor(X/de)/z)}function Ve(X,z,de,Re){const $e=X.updateRanges;if($e.length===0)t.texSubImage2D(n.TEXTURE_2D,0,0,0,z.width,z.height,de,Re,z.data);else{$e.sort((lt,tt)=>lt.start-tt.start);let Je=0;for(let lt=1;lt<$e.length;lt++){const tt=$e[Je],et=$e[lt],kt=tt.start+tt.count,jt=Be(et.start,z.width,4),un=Be(tt.start,z.width,4);et.start<=kt+1&&jt===un&&Be(et.start+et.count-1,z.width,4)===jt?tt.count=Math.max(tt.count,et.start+et.count-tt.start):(++Je,$e[Je]=et)}$e.length=Je+1;const Ee=t.getParameter(n.UNPACK_ROW_LENGTH),Ne=t.getParameter(n.UNPACK_SKIP_PIXELS),rt=t.getParameter(n.UNPACK_SKIP_ROWS);t.pixelStorei(n.UNPACK_ROW_LENGTH,z.width);for(let lt=0,tt=$e.length;lt<tt;lt++){const et=$e[lt],kt=Math.floor(et.start/4),jt=Math.ceil(et.count/4),un=kt%z.width,se=Math.floor(kt/z.width),Ke=jt,De=1;t.pixelStorei(n.UNPACK_SKIP_PIXELS,un),t.pixelStorei(n.UNPACK_SKIP_ROWS,se),t.texSubImage2D(n.TEXTURE_2D,0,un,se,Ke,De,de,Re,z.data)}X.clearUpdateRanges(),t.pixelStorei(n.UNPACK_ROW_LENGTH,Ee),t.pixelStorei(n.UNPACK_SKIP_PIXELS,Ne),t.pixelStorei(n.UNPACK_SKIP_ROWS,rt)}}function Ze(X,z,de){let Re=n.TEXTURE_2D;(z.isDataArrayTexture||z.isCompressedArrayTexture)&&(Re=n.TEXTURE_2D_ARRAY),z.isData3DTexture&&(Re=n.TEXTURE_3D);const Fe=pe(X,z),$e=z.source;t.bindTexture(Re,X.__webglTexture,n.TEXTURE0+de);const Je=i.get($e);if($e.version!==Je.__version||Fe===!0){if(t.activeTexture(n.TEXTURE0+de),(typeof ImageBitmap<"u"&&z.image instanceof ImageBitmap)===!1){const De=_n.getPrimaries(_n.workingColorSpace),ut=z.colorSpace===dc?null:_n.getPrimaries(z.colorSpace),it=z.colorSpace===dc||De===ut?n.NONE:n.BROWSER_DEFAULT_WEBGL;t.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,z.flipY),t.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,z.premultiplyAlpha),t.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,it)}t.pixelStorei(n.UNPACK_ALIGNMENT,z.unpackAlignment);let Ne=A(z.image,!1,s.maxTextureSize);Ne=He(z,Ne);const rt=o.convert(z.format,z.colorSpace),lt=o.convert(z.type);let tt=I(z.internalFormat,rt,lt,z.normalized,z.colorSpace,z.isVideoTexture);We(Re,z);let et;const kt=z.mipmaps,jt=z.isVideoTexture!==!0,un=Je.__version===void 0||Fe===!0,se=$e.dataReady,Ke=O(z,Ne);if(z.isDepthTexture)tt=B(z.format===Mu,z.type),un&&(jt?t.texStorage2D(n.TEXTURE_2D,1,tt,Ne.width,Ne.height):t.texImage2D(n.TEXTURE_2D,0,tt,Ne.width,Ne.height,0,rt,lt,null));else if(z.isDataTexture)if(kt.length>0){jt&&un&&t.texStorage2D(n.TEXTURE_2D,Ke,tt,kt[0].width,kt[0].height);for(let De=0,ut=kt.length;De<ut;De++)et=kt[De],jt?se&&t.texSubImage2D(n.TEXTURE_2D,De,0,0,et.width,et.height,rt,lt,et.data):t.texImage2D(n.TEXTURE_2D,De,tt,et.width,et.height,0,rt,lt,et.data);z.generateMipmaps=!1}else jt?(un&&t.texStorage2D(n.TEXTURE_2D,Ke,tt,Ne.width,Ne.height),se&&Ve(z,Ne,rt,lt)):t.texImage2D(n.TEXTURE_2D,0,tt,Ne.width,Ne.height,0,rt,lt,Ne.data);else if(z.isCompressedTexture)if(z.isCompressedArrayTexture){jt&&un&&t.texStorage3D(n.TEXTURE_2D_ARRAY,Ke,tt,kt[0].width,kt[0].height,Ne.depth);for(let De=0,ut=kt.length;De<ut;De++)if(et=kt[De],z.format!==Qs)if(rt!==null)if(jt){if(se)if(z.layerUpdates.size>0){const it=EM(et.width,et.height,z.format,z.type);for(const ke of z.layerUpdates){const _t=et.data.subarray(ke*it/et.data.BYTES_PER_ELEMENT,(ke+1)*it/et.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,De,0,0,ke,et.width,et.height,1,rt,_t)}z.clearLayerUpdates()}else t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,De,0,0,0,et.width,et.height,Ne.depth,rt,et.data)}else t.compressedTexImage3D(n.TEXTURE_2D_ARRAY,De,tt,et.width,et.height,Ne.depth,0,et.data,0,0);else ct("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else jt?se&&t.texSubImage3D(n.TEXTURE_2D_ARRAY,De,0,0,0,et.width,et.height,Ne.depth,rt,lt,et.data):t.texImage3D(n.TEXTURE_2D_ARRAY,De,tt,et.width,et.height,Ne.depth,0,rt,lt,et.data)}else{jt&&un&&t.texStorage2D(n.TEXTURE_2D,Ke,tt,kt[0].width,kt[0].height);for(let De=0,ut=kt.length;De<ut;De++)et=kt[De],z.format!==Qs?rt!==null?jt?se&&t.compressedTexSubImage2D(n.TEXTURE_2D,De,0,0,et.width,et.height,rt,et.data):t.compressedTexImage2D(n.TEXTURE_2D,De,tt,et.width,et.height,0,et.data):ct("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):jt?se&&t.texSubImage2D(n.TEXTURE_2D,De,0,0,et.width,et.height,rt,lt,et.data):t.texImage2D(n.TEXTURE_2D,De,tt,et.width,et.height,0,rt,lt,et.data)}else if(z.isDataArrayTexture)if(jt){if(un&&t.texStorage3D(n.TEXTURE_2D_ARRAY,Ke,tt,Ne.width,Ne.height,Ne.depth),se)if(z.layerUpdates.size>0){const De=EM(Ne.width,Ne.height,z.format,z.type);for(const ut of z.layerUpdates){const it=Ne.data.subarray(ut*De/Ne.data.BYTES_PER_ELEMENT,(ut+1)*De/Ne.data.BYTES_PER_ELEMENT);t.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,ut,Ne.width,Ne.height,1,rt,lt,it)}z.clearLayerUpdates()}else t.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,0,Ne.width,Ne.height,Ne.depth,rt,lt,Ne.data)}
4090else t.texImage3D(n.TEXTURE_2D_ARRAY,0,tt,Ne.width,Ne.height,Ne.depth,0,rt,lt,Ne.data);else if(z.isData3DTexture)jt?(un&&t.texStorage3D(n.TEXTURE_3D,Ke,tt,Ne.width,Ne.height,Ne.depth),se&&t.texSubImage3D(n.TEXTURE_3D,0,0,0,0,Ne.width,Ne.height,Ne.depth,rt,lt,Ne.data)):t.texImage3D(n.TEXTURE_3D,0,tt,Ne.width,Ne.height,Ne.depth,0,rt,lt,Ne.data);else if(z.isFramebufferTexture){if(un)if(jt)t.texStorage2D(n.TEXTURE_2D,Ke,tt,Ne.width,Ne.height);else{let De=Ne.width,ut=Ne.height;for(let it=0;it<Ke;it++)t.texImage2D(n.TEXTURE_2D,it,tt,De,ut,0,rt,lt,null),De>>=1,ut>>=1}}else if(z.isHTMLTexture){if("texElementImage2D"in n){const De=n.canvas;if(De.hasAttribute("layoutsubtree")||De.setAttribute("layoutsubtree","true"),Ne.parentNode!==De){De.appendChild(Ne),y.add(z),De.onpaint=Bt=>{const qn=Bt.changedElements;for(const Sn of y)qn.includes(Sn.image)&&(Sn.needsUpdate=!0)},De.requestPaint();return}const ut=0,it=n.RGBA,ke=n.RGBA,_t=n.UNSIGNED_BYTE;n.texElementImage2D(n.TEXTURE_2D,ut,it,ke,_t,Ne),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.L
vendor: 31,547 bytes, lines 4090-4114
4090INEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE)}}else if(kt.length>0){if(jt&&un){const De=Cn(kt[0]);t.texStorage2D(n.TEXTURE_2D,Ke,tt,De.width,De.height)}for(let De=0,ut=kt.length;De<ut;De++)et=kt[De],jt?se&&t.texSubImage2D(n.TEXTURE_2D,De,0,0,rt,lt,et):t.texImage2D(n.TEXTURE_2D,De,tt,rt,lt,et);z.generateMipmaps=!1}else if(jt){if(un){const De=Cn(Ne);t.texStorage2D(n.TEXTURE_2D,Ke,tt,De.width,De.height)}se&&t.texSubImage2D(n.TEXTURE_2D,0,0,0,rt,lt,Ne)}else t.texImage2D(n.TEXTURE_2D,0,tt,rt,lt,Ne);w(z)&&N(Re),Je.__version=$e.version,z.onUpdate&&z.onUpdate(z)}X.__version=z.version}function Rt(X,z,de){if(z.image.length!==6)return;const Re=pe(X,z),Fe=z.source;t.bindTexture(n.TEXTURE_CUBE_MAP,X.__webglTexture,n.TEXTURE0+de);const $e=i.get(Fe);if(Fe.version!==$e.__version||Re===!0){t.activeTexture(n.TEXTURE0+de);const Je=_n.getPrimaries(_n.workingColorSpace),Ee=z.colorSpace===dc?null:_n.getPrimaries(z.colorSpace),Ne=z.colorSpace===dc||Je===Ee?n.NONE:n.BROWSER_DEFAULT_WEBGL;t.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,z.flipY),t.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,z.premultiplyAlpha),t.pixelStorei(n.UNPACK_ALIGNMENT,z.unpackAlignment),t.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,Ne);const rt=z.isCompressedTexture||z.image[0].isCompressedTexture,lt=z.image[0]&&z.image[0].isDataTexture,tt=[];for(let ke=0;ke<6;ke++)!rt&&!lt?tt[ke]=A(z.image[ke],!0,s.maxCubemapSize):tt[ke]=lt?z.image[ke].image:z.image[ke],tt[ke]=He(z,tt[ke]);const et=tt[0],kt=o.convert(z.format,z.colorSpace),jt=o.convert(z.type),un=I(z.internalFormat,kt,jt,z.normalized,z.colorSpace),se=z.isVideoTexture!==!0,Ke=$e.__version===void 0||Re===!0,De=Fe.dataReady;let ut=O(z,et);We(n.TEXTURE_CUBE_MAP,z);let it;if(rt){se&&Ke&&t.texStorage2D(n.TEXTURE_CUBE_MAP,ut,un,et.width,et.height);for(let ke=0;ke<6;ke++){it=tt[ke].mipmaps;for(let _t=0;_t<it.length;_t++){const Bt=it[_t];z.format!==Qs?kt!==null?se?De&&t.compressedTexSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ke,_t,0,0,Bt.width,Bt.height,kt,Bt.data):t.compressedTexImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ke,_t,un,Bt.width,Bt.height,0,Bt.data):ct("WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):se?De&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ke,_t,0,0,Bt.width,Bt.height,kt,jt,Bt.data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ke,_t,un,Bt.width,Bt.height,0,kt,jt,Bt.data)}}}else{if(it=z.mipmaps,se&&Ke){it.length>0&&ut++;const ke=Cn(tt[0]);t.texStorage2D(n.TEXTURE_CUBE_MAP,ut,un,ke.width,ke.height)}for(let ke=0;ke<6;ke++)if(lt){se?De&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ke,0,0,0,tt[ke].width,tt[ke].height,kt,jt,tt[ke].data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ke,0,un,tt[ke].width,tt[ke].height,0,kt,jt,tt[ke].data);for(let _t=0;_t<it.length;_t++){const qn=it[_t].image[ke].image;se?De&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ke,_t+1,0,0,qn.width,qn.height,kt,jt,qn.data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ke,_t+1,un,qn.width,qn.height,0,kt,jt,qn.data)}}else{se?De&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ke,0,0,0,kt,jt,tt[ke]):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ke,0,un,kt,jt,tt[ke]);for(let _t=0;_t<it.length;_t++){const Bt=it[_t];se?De&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ke,_t+1,0,0,kt,jt,Bt.image[ke]):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ke,_t+1,un,kt,jt,Bt.image[ke])}}}w(z)&&N(n.TEXTURE_CUBE_MAP),$e.__version=Fe.version,z.onUpdate&&z.onUpdate(z)}X.__version=z.version}function Ct(X,z,de,Re,Fe,$e){const Je=o.convert(de.format,de.colorSpace),Ee=o.convert(de.type),Ne=I(de.internalFormat,Je,Ee,de.normalized,de.colorSpace),rt=i.get(z),lt=i.get(de);if(lt.__renderTarget=z,!rt.__hasExternalTextures){const tt=Math.max(1,z.width>>$e),et=Math.max(1,z.height>>$e);Fe===n.TEXTURE_3D||Fe===n.TEXTURE_2D_ARRAY?t.texImage3D(Fe,$e,Ne,tt,et,z.depth,0,Je,Ee,null):t.texImage2D(Fe,$e,Ne,tt,et,0,Je,Ee,null)}t.bindFramebuffer(n.FRAMEBUFFER,X),gt(z)?h.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,Re,Fe,lt.__webglTexture,0,Ot(z)):(Fe===n.TEXTURE_2D||Fe>=n.TEXTURE_CUBE_MAP_POSITIVE_X&&Fe<=n.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&n.framebufferTexture2D(n.FRAMEBUFFER,Re,Fe,lt.__webglTexture,$e),t.bindFramebuffer(n.FRAMEBUFFER,null)}function Jt(X,z,de){if(n.bindRenderbuffer(n.RENDERBUFFER,X),z.depthBuffer){const Re=z.depthTexture,Fe=Re&&Re.isDepthTexture?Re.type:null,$e=B(z.stencilBuffer,Fe),Je=z.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT;gt(z)?h.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,Ot(z),$e,z.width,z.height):de?n.renderbufferStorageMultisample(n.RENDERBUFFER,Ot(z),$e,z.width,z.height):n.renderbufferStorage(n.RENDERBUFFER,$e,z.width,z.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,Je,n.RENDERBUFFER,X)}else{const Re=z.textures;for(let Fe=0;Fe<Re.length;Fe++){const $e=Re[Fe],Je=o.convert($e.format,$e.colorSpace),Ee=o.convert($e.type),Ne=I($e.internalFormat,Je,Ee,$e.normalized,$e.colorSpace);gt(z)?h.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,Ot(z),Ne,z.width,z.height):de?n.renderbufferStorageMultisample(n.RENDERBUFFER,Ot(z),Ne,z.width,z.height):n.renderbufferStorage(n.RENDERBUFFER,Ne,z.width,z.height)}}n.bindRenderbuffer(n.RENDERBUFFER,null)}function Nt(X,z,de){const Re=z.isWebGLCubeRenderTarget===!0;if(t.bindFramebuffer(n.FRAMEBUFFER,X),!(z.depthTexture&&z.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");const Fe=i.get(z.depthTexture);if(Fe.__renderTarget=z,(!Fe.__webglTexture||z.depthTexture.image.width!==z.width||z.depthTexture.image.height!==z.height)&&(z.depthTexture.image.width=z.width,z.depthTexture.image.height=z.height,z.depthTexture.needsUpdate=!0),Re){if(Fe.__webglInit===void 0&&(Fe.__webglInit=!0,z.depthTexture.addEventListener("dispose",F)),Fe.__webglTexture===void 0){Fe.__webglTexture=n.createTexture(),t.bindTexture(n.TEXTURE_CUBE_MAP,Fe.__webglTexture),We(n.TEXTURE_CUBE_MAP,z.depthTexture);const rt=o.convert(z.depthTexture.format),lt=o.convert(z.depthTexture.type);let tt;z.depthTexture.format===wl?tt=n.DEPTH_COMPONENT24:z.depthTexture.format===Mu&&(tt=n.DEPTH24_STENCIL8);for(let et=0;et<6;et++)n.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+et,0,tt,z.width,z.height,0,rt,lt,null)}}else le(z.depthTexture,0);const $e=Fe.__webglTexture,Je=Ot(z),Ee=Re?n.TEXTURE_CUBE_MAP_POSITIVE_X+de:n.TEXTURE_2D,Ne=z.depthTexture.format===Mu?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT;if(z.depthTexture.format===wl)gt(z)?h.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,Ne,Ee,$e,0,Je):n.framebufferTexture2D(n.FRAMEBUFFER,Ne,Ee,$e,0);else if(z.depthTexture.format===Mu)gt(z)?h.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,Ne,Ee,$e,0,Je):n.framebufferTexture2D(n.FRAMEBUFFER,Ne,Ee,$e,0);else throw new Error("Unknown depthTexture format")}function Ue(X){const z=i.get(X),de=X.isWebGLCubeRenderTarget===!0;if(z.__boundDepthTexture!==X.depthTexture){const Re=X.depthTexture;if(z.__depthDisposeCallback&&z.__depthDisposeCallback(),Re){const Fe=()=>{delete z.__boundDepthTexture,delete z.__depthDisposeCallback,Re.removeEventListener("dispose",Fe)};Re.addEventListener("dispose",Fe),z.__depthDisposeCallback=Fe}z.__boundDepthTexture=Re}if(X.depthTexture&&!z.__autoAllocateDepthBuffer)if(de)for(let Re=0;Re<6;Re++)Nt(z.__webglFramebuffer[Re],X,Re);else{const Re=X.texture.mipmaps;Re&&Re.length>0?Nt(z.__webglFramebuffer[0],X,0):Nt(z.__webglFramebuffer,X,0)}else if(de){z.__webglDepthbuffer=[];for(let Re=0;Re<6;Re++)if(t.bindFramebuffer(n.FRAMEBUFFER,z.__webglFramebuffer[Re]),z.__webglDepthbuffer[Re]===void 0)z.__webglDepthbuffer[Re]=n.createRenderbuffer(),Jt(z.__webglDepthbuffer[Re],X,!1);else{const Fe=X.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,$e=z.__webglDepthbuffer[Re];n.bindRenderbuffer(n.RENDERBUFFER,$e),n.framebufferRenderbuffer(n.FRAMEBUFFER,Fe,n.RENDERBUFFER,$e)}}else{const Re=X.texture.mipmaps;if(Re&&Re.length>0?t.bindFramebuffer(n.FRAMEBUFFER,z.__webglFramebuffer[0]):t.bindFramebuffer(n.FRAMEBUFFER,z.__webglFramebuffer),z.__webglDepthbuffer===void 0)z.__webglDepthbuffer=n.createRenderbuffer(),Jt(z.__webglDepthbuffer,X,!1);else{const Fe=X.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,$e=z.__webglDepthbuffer;n.bindRenderbuffer(n.RENDERBUFFER,$e),n.framebufferRenderbuffer(n.FRAMEBUFFER,Fe,n.RENDERBUFFER,$e)}}t.bindFramebuffer(n.FRAMEBUFFER,null)}function Xe(X,z,de){const Re=i.get(X);z!==void 0&&Ct(Re.__webglFramebuffer,X,X.texture,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,0),de!==void 0&&Ue(X)}function Oe(X){const z=X.texture,de=i.get(X),Re=i.get(z);X.addEventListener("dispose",P);const Fe=X.textures,$e=X.isWebGLCubeRenderTarget===!0,Je=Fe.length>1;if(Je||(Re.__webglTexture===void 0&&(Re.__webglTexture=n.createTexture()),Re.__version=z.version,c.memory.textures++),$e){de.__webglFramebuffer=[];for(let Ee=0;Ee<6;Ee++)if(z.mipmaps&&z.mipmaps.length>0){de.__webglFramebuffer[Ee]=[];for(let Ne=0;Ne<z.mipmaps.length;Ne++)de.__webglFramebuffer[Ee][Ne]=n.createFramebuffer()}else de.__webglFramebuffer[Ee]=n.createFramebuffer()}else{if(z.mipmaps&&z.mipmaps.length>0){de.__webglFramebuffer=[];for(let Ee=0;Ee<z.mipmaps.length;Ee++)de.__webglFramebuffer[Ee]=n.createFramebuffer()}else de.__webglFramebuffer=n.createFramebuffer();if(Je)for(let Ee=0,Ne=Fe.length;Ee<Ne;Ee++){const rt=i.get(Fe[Ee]);rt.__webglTexture===void 0&&(rt.__webglTexture=n.createTexture(),c.memory.textures++)}if(X.samples>0&>(X)===!1){de.__webglMultisampledFramebuffer=n.createFramebuffer(),de.__webglColorRenderbuffer=[],t.bindFramebuffer(n.FRAMEBUFFER,de.__webglMultisampledFramebuffer);for(let Ee=0;Ee<Fe.length;Ee++){const Ne=Fe[Ee];de.__webglColorRenderbuffer[Ee]=n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,de.__webglColorRenderbuffer[Ee]);const rt=o.convert(Ne.format,Ne.colorSpace),lt=o.convert(Ne.type),tt=I(Ne.internalFormat,rt,lt,Ne.normalized,Ne.colorSpace,X.isXRRenderTarget===!0),et=Ot(X);n.renderbufferStorageMultisample(n.RENDERBUFFER,et,tt,X.width,X.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+Ee,n.RENDERBUFFER,de.__webglColorRenderbuffer[Ee])}n.bindRenderbuffer(n.RENDERBUFFER,null),X.depthBuffer&&(de.__webglDepthRenderbuffer=n.createRenderbuffer(),Jt(de.__webglDepthRenderbuffer,X,!0)),t.bindFramebuffer(n.FRAMEBUFFER,null)}}if($e){t.bindTexture(n.TEXTURE_CUBE_MAP,Re.__webglTexture),We(n.TEXTURE_CUBE_MAP,z);for(let Ee=0;Ee<6;Ee++)if(z.mipmaps&&z.mipmaps.length>0)for(let Ne=0;Ne<z.mipmaps.length;Ne++)Ct(de.__webglFramebuffer[Ee][Ne],X,z,n.COLOR_ATTACHMENT0,n.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,Ne);else Ct(de.__webglFramebuffer[Ee],X,z,n.COLOR_ATTACHMENT0,n.TEXTURE_CUBE_MAP_POSITIVE_X+Ee,0);w(z)&&N(n.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(Je){for(let Ee=0,Ne=Fe.length;Ee<Ne;Ee++){const rt=Fe[Ee],lt=i.get(rt);let tt=n.TEXTURE_2D;(X.isWebGL3DRenderTarget||X.isWebGLArrayRenderTarget)&&(tt=X.isWebGL3DRenderTarget?n.TEXTURE_3D:n.TEXTURE_2D_ARRAY),t.bindTexture(tt,lt.__webglTexture),We(tt,rt),Ct(de.__webglFramebuffer,X,rt,n.COLOR_ATTACHMENT0+Ee,tt,0),w(rt)&&N(tt)}t.unbindTexture()}else{let Ee=n.TEXTURE_2D;if((X.isWebGL3DRenderTarget||X.isWebGLArrayRenderTarget)&&(Ee=X.isWebGL3DRenderTarget?n.TEXTURE_3D:n.TEXTURE_2D_ARRAY),t.bindTexture(Ee,Re.__webglTexture),We(Ee,z),z.mipmaps&&z.mipmaps.length>0)for(let Ne=0;Ne<z.mipmaps.length;Ne++)Ct(de.__webglFramebuffer[Ne],X,z,n.COLOR_ATTACHMENT0,Ee,Ne);else Ct(de.__webglFramebuffer,X,z,n.COLOR_ATTACHMENT0,Ee,0);w(z)&&N(Ee),t.unbindTexture()}X.depthBuffer&&Ue(X)}function at(X){const z=X.textures;for(let de=0,Re=z.length;de<Re;de++){const Fe=z[de];if(w(Fe)){const $e=L(X),Je=i.get(Fe).__webglTexture;t.bindTexture($e,Je),N($e),t.unbindTexture()}}}const st=[],Pt=[];function J(X){if(X.samples>0){if(gt(X)===!1){const z=X.textures,de=X.width,Re=X.height;let Fe=n.COLOR_BUFFER_BIT;const $e=X.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,Je=i.get(X),Ee=z.length>1;if(Ee)for(let rt=0;rt<z.length;rt++)t.bindFramebuffer(n.FRAMEBUFFER,Je.__webglMultisampledFramebuffer),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+rt,n.RENDERBUFFER,null),t.bindFramebuffer(n.FRAMEBUFFER,Je.__webglFramebuffer),n.framebufferTexture2D(n.DRAW_FRAMEBUFFER,n.COLOR_ATTACHMENT0+rt,n.TEXTURE_2D,null,0);t.bindFramebuffer(n.READ_FRAMEBUFFER,Je.__webglMultisampledFramebuffer);const Ne=X.texture.mipmaps;Ne&&Ne.length>0?t.bindFramebuffer(n.DRAW_FRAMEBUFFER,Je.__webglFramebuffer[0]):t.bindFramebuffer(n.DRAW_FRAMEBUFFER,Je.__webglFramebuffer);for(let rt=0;rt<z.length;rt++){if(X.resolveDepthBuffer&&(X.depthBuffer&&(Fe|=n.DEPTH_BUFFER_BIT),X.stencilBuffer&&X.resolveStencilBuffer&&(Fe|=n.STENCIL_BUFFER_BIT)),Ee){n.framebufferRenderbuffer(n.READ_FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,Je.__webglColorRenderbuffer[rt]);const lt=i.get(z[rt]).__webglTexture;n.framebufferTexture2D(n.DRAW_FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,lt,0)}n.blitFramebuffer(0,0,de,Re,0,0,de,Re,Fe,n.NEAREST),f===!0&&(st.length=0,Pt.length=0,st.push(n.COLOR_ATTACHMENT0+rt),X.depthBuffer&&X.resolveDepthBuffer===!1&&(st.push($e),Pt.push($e),n.invalidateFramebuffer(n.DRAW_FRAMEBUFFER,Pt)),n.invalidateFramebuffer(n.READ_FRAMEBUFFER,st))}if(t.bindFramebuffer(n.READ_FRAMEBUFFER,null),t.bindFramebuffer(n.DRAW_FRAMEBUFFER,null),Ee)for(let rt=0;rt<z.length;rt++){t.bindFramebuffer(n.FRAMEBUFFER,Je.__webglMultisampledFramebuffer),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+rt,n.RENDERBUFFER,Je.__webglColorRenderbuffer[rt]);const lt=i.get(z[rt]).__webglTexture;t.bindFramebuffer(n.FRAMEBUFFER,Je.__webglFramebuffer),n.framebufferTexture2D(n.DRAW_FRAMEBUFFER,n.COLOR_ATTACHMENT0+rt,n.TEXTURE_2D,lt,0)}t.bindFramebuffer(n.DRAW_FRAMEBUFFER,Je.__webglMultisampledFramebuffer)}else if(X.depthBuffer&&X.resolveDepthBuffer===!1&&f){const z=X.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT;n.invalidateFramebuffer(n.DRAW_FRAMEBUFFER,[z])}}}function Ot(X){return Math.min(s.maxSamples,X.samples)}function gt(X){const z=i.get(X);return X.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&z.__useRenderToTexture!==!1}function vt(X){const z=c.render.frame;x.get(X)!==z&&(x.set(X,z),X.update())}function He(X,z){const de=X.colorSpace,Re=X.format,Fe=X.type;return X.isCompressedTexture===!0||X.isVideoTexture===!0||de!==ep&&de!==dc&&(_n.getTransfer(de)===Wn?(Re!==Qs||Fe!==pa)&&ct("WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):Et("WebGLTextures: Unsupported texture color space:",de)),z}function Cn(X){return typeof HTMLImageElement<"u"&&X instanceof HTMLImageElement?(p.width=X.naturalWidth||X.width,p.height=X.naturalHeight||X.height):typeof VideoFrame<"u"&&X instanceof VideoFrame?(p.width=X.displayWidth,p.height=X.displayHeight):(p.width=X.width,p.height=X.height),p}this.allocateTextureUnit=Y,this.resetTextureUnits=ie,this.getTextureUnits=ue,this.setTextureUnits=Q,this.setTexture2D=le,this.setTexture2DArray=ge,this.setTexture3D=Ce,this.setTextureCube=q,this.rebindTextures=Xe,this.setupRenderTarget=Oe,this.updateRenderTargetMipmap=at,this.updateMultisampleRenderTarget=J,this.setupDepthRenderbuffer=Ue,this.setupFrameBufferTexture=Ct,this.useMultisampledRTT=gt,this.isReversedDepthBuffer=function(){return t.buffers.depth.getReversed()}}function fI(n,e){function t(i,s=dc){let o;const c=_n.getTransfer(s);if(i===pa)return n.UNSIGNED_BYTE;if(i===H1)return n.UNSIGNED_SHORT_4_4_4_4;if(i===G1)return n.UNSIGNED_SHORT_5_5_5_1;if(i===Uw)return n.UNSIGNED_INT_5_9_9_9_REV;if(i===Ow)return n.UNSIGNED_INT_10F_11F_11F_REV;if(i===Iw)return n.BYTE;if(i===Pw)return n.SHORT;if(i===Qf)return n.UNSIGNED_SHORT;if(i===k1)return n.INT;if(i===Xr)return n.UNSIGNED_INT;if(i===ya)return n.FLOAT;if(i===Ml)return n.HALF_FLOAT;if(i===zw)return n.ALPHA;if(i===Bw)return n.RGB;if(i===Qs)return n.RGBA;if(i===wl)return n.DEPTH_COMPONENT;if(i===Mu)return n.DEPTH_STENCIL;if(i===j1)return n.RED;if(i===p0)return n.RED_INTEGER;if(i===Du)return n.RG;if(i===W1)return n.RG_INTEGER;if(i===X1)return n.RGBA_INTEGER;if(i===Tg||i===Eg||i===Ag||i===Cg)if(c===Wn)if(o=e.get("WEBGL_compressed_texture_s3tc_srgb"),o!==null){if(i===Tg)return o.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(i===Eg)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(i===Ag)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(i===Cg)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(o=e.get("WEBGL_compressed_texture_s3tc"),o!==null){if(i===Tg)return o.COMPRESSED_RGB_S3TC_DXT1_EXT;if(i===Eg)return o.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(i===Ag)return o.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(i===Cg)return o.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(i===Vv||i===Fv||i===kv||i===Hv)if(o=e.get("WEBGL_compressed_texture_pvrtc"),o!==null){if(i===Vv)return o.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(i===Fv)return o.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(i===kv)return o.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(i===Hv)return o.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(i===Gv||i===jv||i===Wv||i===Xv||i===qv||i===Gg||i===Yv)if(o=e.get("WEBGL_compressed_texture_etc"),o!==null){if(i===Gv||i===jv)return c===Wn?o.COMPRESSED_SRGB8_ETC2:o.COMPRESSED_RGB8_ETC2;if(i===Wv)return c===Wn?o.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:o.COMPRESSED_RGBA8_ETC2_EAC;if(i===Xv)return o.COMPRESSED_R11_EAC;if(i===qv)return o.COMPRESSED_SIGNED_R11_EAC;if(i===Gg)return o.COMPRESSED_RG11_EAC;if(i===Yv)return o.COMPRESSED_SIGNED_RG11_EAC}else return null;if(i===Zv||i===Kv||i===$v||i===Qv||i===Jv||i===e1||i===t1||i===n1||i===i1||i===s1||i===a1||i===r1||i===o1||i===l1)if(o=e.get("WEBGL_compressed_texture_astc"),o!==null){if(i===Zv)return c===Wn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:o.COMPRESSED_RGBA_ASTC_4x4_KHR;if(i===Kv)return c===Wn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:o.COMPRESSED_RGBA_ASTC_5x4_KHR;if(i===$v)return c===Wn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:o.COMPRESSED_RGBA_ASTC_5x5_KHR;if(i===Qv)return c===Wn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:o.COMPRESSED_RGBA_ASTC_6x5_KHR;if(i===Jv)return c===Wn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:o.COMPRESSED_RGBA_ASTC_6x6_KHR;if(i===e1)return c===Wn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:o.COMPRESSED_RGBA_ASTC_8x5_KHR;if(i===t1)return c===Wn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:o.COMPRESSED_RGBA_ASTC_8x6_KHR;if(i===n1)return c===Wn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:o.COMPRESSED_RGBA_ASTC_8x8_KHR;if(i===i1)return c===Wn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:o.COMPRESSED_RGBA_ASTC_10x5_KHR;if(i===s1)return c===Wn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:o.COMPRESSED_RGBA_ASTC_10x6_KHR;if(i===a1)return c===Wn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:o.COMPRESSED_RGBA_ASTC_10x8_KHR;if(i===r1)return c===Wn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:o.COMPRESSED_RGBA_ASTC_10x10_KHR;if(i===o1)return c===Wn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:o.COMPRESSED_RGBA_ASTC_12x10_KHR;if(i===l1)return c===Wn?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:o.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(i===c1||i===u1||i===d1)if(o=e.get("EXT_texture_compression_bptc"),o!==null){if(i===c1)return c===Wn?o.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:o.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(i===u1)return o.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(i===d1)return o.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(i===h1||i===f1||i===jg||i===p1)if(o=e.get("EXT_texture_compression_rgtc"),o!==null){if(i===h1)return o.COMPRESSED_RED_RGTC1_EXT;if(i===f1)return o.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(i===jg)return o.COMPRESSED_RED_GREEN_RGTC2_EXT;if(i===p1)return o.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return i===Jf?n.UNSIGNED_INT_24_8:n[i]!==void 0?n[i]:null}return{convert:t}}const Nj=` 4091void main() { 4092 4093 gl_Position = vec4( position, 1.0 ); 4094 4095}`,Dj=` 4096uniform sampler2DArray depthColor; 4097uniform float depthWidth; 4098uniform float depthHeight; 4099 4100void main() { 4101 4102 vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight ); 4103 4104 if ( coord.x >= 1.0 ) { 4105 4106 gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r; 4107 4108 } else { 4109 4110 gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r; 4111 4112 } 4113 4114}`;class Lj{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t){if(this.texture===null){const i=new Yw(e.texture);(e.depthNear!==t.depthNear||e.depthFar!==t.depthFar)&&(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=i}}getMesh(e){if(this.texture!==null&&this.mesh===null){const t=e.cameras[0].viewport,i=new dr({vertexShader:Nj,fragmentShader:Dj,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new ss(new pp(20,20),i)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class Ij extends Do{constructor(e,t){super();const i=this;let s=null,o=1,c=null,h="local-floor",f=1,p=null,x=null,y=null,v=null,S=null,M=null;const R=typeof XRWebGLBinding<"u",A=new Lj,w={},N=t.getContextAttributes();let L=null,I=null;const B=[],O=[],F=new je;let P=null;const V=new vs;V.viewport=new Xn;const j=new vs;j.viewport=new Xn;const W=[V,j],ee=new JL;let ie=null,ue=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(pe){let Be=B[pe];return Be===void 0&&(Be=new gv,B[pe]=Be),Be.getTargetRaySpace()},this.getControllerGrip=function(pe){let Be=B[pe];return Be===void 0&&(Be=new gv,B[pe]=Be),Be.getGripSpace()},this.getHand=function(pe){let Be=B[pe];return Be===void 0&&(Be=new gv,B[pe]=Be),Be.getHandSpace()};function Q(pe){const Be=O.indexOf(pe.inputSource);if(Be===-1)return;const Ve=B[Be];Ve!==void 0&&(Ve.update(pe.inputSource,pe.frame,p||c),Ve.dispatchEvent({type:pe.type,data:pe.inputSource}))}function Y(){s.removeEventListener("select",Q),s.removeEventListener("selectstart",Q),s.removeEventListener("selectend",Q),s.removeEventListener("squeeze",Q),s.removeEventListener("squeezestart",Q),s.removeEventListener("squeezeend",Q),s.removeEventListener("end",Y),s.removeEventListener("inputsourceschange",$);for(let pe=0;pe<B.length;pe++){const Be=O[pe];Be!==null&&(O[pe]=null,B[pe].disconnect(Be))}ie=null,ue=null,A.reset();for(const pe in w)delete w[pe];e.setRenderTarget(L),S=null,v=null,y=null,s=null,I=null,We.stop(),i.isPresenting=!1,e.setPixelRatio(P),e.setSize(F.width,F.height,!1),i.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(pe){o=pe,i.isPresenting===!0&&ct("WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(pe){h=pe,i.isPresenting===!0&&ct("WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return p||c},this.setReferenceSpace=function(pe){p=pe},this.getBaseLayer=function(){return v!==null?v:S},this.getBinding=function(){return y===null&&R&&(y=new XRWebGLBinding(s,t)),y},this.getFrame=function(){return M},this.getSession=function(){return s},this.setSession=async function(pe){if(s=pe,s!==null){if(L=e.getRenderTarget(),s.addEventListener("select",Q),s.addEventListener("selectstart",Q),s.addEventListener("selectend",Q),s.addEventListener("squeeze",Q),s.addEventListener("squeezestart",Q),s.addEventListener("squeezeend",Q),s.addEventListener("end",Y),s.addEventListener("inputsourceschange",$),N.xrCompatible!==!0&&await t.makeXRCompatible(),P=e.getPixelRatio(),e.getSize(F),R&&"createProjectionLayer"in XRWebGLBinding.prototype){let Ve=null,Ze=null,Rt=null;N.depth&&(Rt=N.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,Ve=N.stencil?Mu:wl,Ze=N.stencil?Jf:Xr);const Ct={colorFormat:t.RGBA8,depthFormat:Rt,scaleFactor:o};y=this.getBinding(),v=y.createProjectionLayer(Ct),s.updateRenderState({layers:[v]}),e.setPixelRatio(1),e.setSize(v.textureWidth,v.textureHeight,!1),I=new ur(v.textureWidth,v.textureHeight,{format:Qs,type:pa,depthTexture:new Jd(v.textureWidth,v.textureHeight,Ze,void 0,void 0,void 0,void 0,void 0,void 0,Ve),stencilBuffer:N.stencil,colorSpace:e.outputColorSpace,samples:N.antialias?4:0,resolveDepthBuffer:v.ignoreDepthValues===!1,resolveStencilBuffer:v.ignoreDepthValues===!1})}else{const Ve={antialias:N.antialias,alpha:!0,depth:N.depth,stencil:N.stencil,framebufferScaleFactor:o};S=new XRWebGLLayer(s,t,Ve),s.updateRenderState({baseLayer:S}),e.setPixelRatio(1),e.setSize(S.framebufferWidth,S.framebufferHeight,!1),I=new ur(S.framebufferWidth,S.framebufferHeight,{format:Qs,type:pa,colorSpace:e.outputColorSpace,stencilBuffer:N.stencil,resolveDepthBuffer:S.ignoreDepthValues===!1,resolveStencilBuffer:S.ignoreDepthValues===!1})}I.isXRRenderTarget=!0,this.setFoveation(f),p=null,c=await s.requestReferenceSpace(h),We.setContext(s),We.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(s!==null)return s.environmentBlendMode},this.getDepthTexture=function(){return A.getDepthTexture()};function $(pe){for(let Be=0;Be<pe.removed.length;Be++){const Ve=pe.removed[Be],Ze=O.indexOf(Ve);Ze>=0&&(O[Ze]=null,B[Ze].disconnect(Ve))}for(let Be=0;Be<pe.added.length;Be++){const Ve=pe.added[Be];let Ze=O.indexOf(Ve);if(Ze===-1){for(let Ct=0;Ct<B.length;Ct++)if(Ct>=O.length){O.push(Ve),Ze=Ct;break}else if(O[Ct]===null){O[Ct]=Ve,Ze=Ct;break}if(Ze===-1)break}const Rt=B[Ze];Rt&&Rt.connect(Ve)}}const le=new Z,ge=new Z;function Ce(pe,Be,Ve){le.setFromMatrixPosition(Be.matrixWorld),ge.setFromMatrixPosition(Ve.matrixWorld);const Ze=le.distanceTo(ge),Rt=Be.projectionMatrix.elements,Ct=Ve.projectionMatrix.elements,Jt=Rt[14]/(Rt[10]-1),Nt=Rt[14]/(Rt[10]+1),Ue=(Rt[9]+1)/Rt[5],Xe=(Rt[9]-1)/Rt[5],Oe=(Rt[8]-1)/Rt[0],at=(Ct[8]+1)/Ct[0],st=Jt*Oe,Pt=Jt*at,J=Ze/(-Oe+at),Ot=J*-Oe;if(Be.matrixWorld.decompose(pe.position,pe.quaternion,pe.scale),pe.translateX(Ot),pe.translateZ(J),pe.matrixWorld.compose(pe.position,pe.quaternion,pe.scale),pe.matrixWorldInverse.copy(pe.matrixWorld).invert(),Rt[10]===-1)pe.projectionMatrix.copy(Be.projectionMatrix),pe.projectionMatrixInverse.copy(Be.projectionMatrixInverse);else{const gt=Jt+J,vt=Nt+J,He=st-Ot,Cn=Pt+(Ze-Ot),X=Ue*Nt/vt*gt,z=Xe*Nt/vt*gt;pe.projectionMatrix.makePerspective(He,Cn,X,z,gt,vt),pe.projectionMatrixInverse.copy(pe.projectionMatrix).invert()}}function q(pe,Be){Be===null?pe.matrixWorld.copy(pe.matrix):pe.matrixWorld.multiplyMatrices(Be.matrixWorld,pe.matrix),pe.matrixWorldInverse.copy(pe.matrixWorld).invert()}this.updateCamera=function(pe){if(s===null)return;let Be=pe.near,Ve=pe.far;A.texture!==null&&(A.depthNear>0&&(Be=A.depthNear),A.depthFar>0&&(Ve=A.depthFar)),ee.near=j.near=V.near=Be,ee.far=j.far=V.far=Ve,(ie!==ee.near||ue!==ee.far)&&(s.updateRenderState({depthNear:ee.near,depthFar:ee.far}),ie=ee.near,ue=ee.far),ee.layers.mask=pe.layers.mask|6,V.layers.mask=ee.layers.mask&-5,j.layers.mask=ee.layers.mask&-3;const Ze=pe.parent,Rt=ee.cameras;q(ee,Ze);for(let Ct=0;Ct<Rt.length;Ct++)q(Rt[Ct],Ze);Rt.length===2?Ce(ee,V,j):ee.projectionMatrix.copy(V.projectionMatrix),ae(pe,ee,Ze)};function ae(pe,Be,Ve){Ve===null?pe.matrix.copy(Be.matrixWorld):(pe.matrix.copy(Ve.matrixWorld),pe.matrix.invert(),pe.matrix.multiply(Be.matrixWorld)),pe.matrix.decompose(pe.position,pe.quaternion,pe.scale),pe.updateMatrixWorld(!0),pe.projectionMatrix.copy(Be.projectionMatrix),pe.projectionMatrixInverse.copy(Be.projectionMatrixInverse),pe.isPerspectiveCamera&&(pe.fov=tp*2*Math.atan(1/pe.projectionMatrix.elements[5]),pe.zoom=1)}this.getCamera=function(){return ee},this.getFoveation=function(){if(!(v===null&&S===null))return f},this.setFoveation=function(pe){f=pe,v!==null&&(v.fixedFoveation=pe),S!==null&&S.fixedFoveation!==void 0&&(S.fixedFoveation=pe)},this.hasDepthSensing=function(){return A.texture!==null},this.getDepthSensingMesh=function(){return A.getMesh(ee)},this.getCameraTexture=function(pe){return w[pe]};let Ae=null;function Ie(pe,Be){if(x=Be.getViewerPose(p||c),M=Be,x!==null){const Ve=x.views;S!==null&&(e.setRenderTargetFramebuffer(I,S.framebuffer),e.setRenderTarget(I));let Ze=!1;Ve.length!==ee.cameras.length&&(ee.cameras.length=0,Ze=!0);for(let Nt=0;Nt<Ve.length;Nt++){const Ue=Ve[Nt];let Xe=null;if(S!==null)Xe=S.getViewport(Ue);else{const at=y.getViewSubImage(v,Ue);Xe=at.viewport,Nt===0&&(e.setRenderTargetTextures(I,at.colorTexture,at.depthStencilTexture),e.setRenderTarget(I))}let Oe=W[Nt];Oe===void 0&&(Oe=new vs,Oe.layers.enable(Nt),Oe.viewport=new Xn,W[Nt]=Oe),Oe.matrix.fromArray(Ue.transform.matrix),Oe.matrix.decompose(Oe.position,Oe.quaternion,Oe.scale),Oe.projectionMatrix.fromArray(Ue.projectionMatrix),Oe.projectionMatrixInverse.copy(Oe.projectionMatrix).invert(),Oe.viewport.set(Xe.x,Xe.y,Xe.width,Xe.height),Nt===0&&(ee.matrix.copy(Oe.matrix),ee.matrix.decompose(ee.position,ee.quaternion,ee.scale)),Ze===!0&&ee.cameras.push(Oe)}const Rt=s.enabledFeatures;if(Rt&&Rt.includes("depth-sensing")&&s.depthUsage=="gpu-optimized"&&R){y=i.getBinding();const Nt=y.getDepthInformation(Ve[0]);Nt&&Nt.isValid&&Nt.texture&&A.init(Nt,s.renderState)}if(Rt&&Rt.includes("camera-access")&&R){e.state.unbindTexture(),y=i.getBinding();for(let Nt=0;Nt<Ve.length;Nt++){const Ue=Ve[Nt].camera;if(Ue){let Xe=w[Ue];Xe||(Xe=new Yw,w[Ue]=Xe);const Oe=y.getCameraImage(Ue);Xe.sourceTexture=Oe}}}}for(let Ve=0;Ve<B.length;Ve++){const Ze=O[Ve],Rt=B[Ve];Ze!==null&&Rt!==void 0&&Rt.update(Ze,Be,p||c)}Ae&&Ae(pe,Be),Be.detectedPlanes&&i.dispatchEvent({type:"planesdetected",data:Be}),M=null}const We=new oI;We.setAnimationLoop(Ie),this.setAnimationLoop=function(pe){Ae=pe},this.dispose=function(){}}}const Pj=new Yt,pI=new Qt;pI.set(-1,0,0,0,1,0,0,0,1);function Uj(n,e){function t(A,w){A.matrixAutoUpdate===!0&&A.updateMatrix(),w.value.copy(A.matrix)}function i(A,w){w.color.getRGB(A.fogColor.value,CL(n)),w.isFog?(A.fogNear.value=w.near,A.fogFar.value=w.far):w.isFogExp2&&(A.fogDensity.value=w.density)}function s(A,w,N,L,I){w.isNodeMaterial?w.uniformsNeedUpdate=!1:w.isMeshBasicMaterial?o(A,w):w.isMeshLambertMaterial?(o(A,w),w.envMap&&(A.envMapIntensity.value=w.envMapIntensity)):w.isMeshToonMaterial?(o(A,w),y(A,w)):w.isMeshPhongMaterial?(o(A,w),x(A,w),w.envMap&&(A.envMapIntensity.value=w.envMapIntensity)):w.isMeshStandardMaterial?(o(A,w),v(A,w),w.isMeshPhysicalMaterial&&S(A,w,I)):w.isMeshMatcapMaterial?(o(A,w),M(A,w)):w.isMeshDepthMaterial?o(A,w):w.isMeshDistanceMaterial?(o(A,w),R(A,w)):w.isMeshNormalMaterial?o(A,w):w.isLineBasicMaterial?(c(A,w),w.isLineDashedMaterial&&h(A,w)):w.isPointsMaterial?f(A,w,N,L):w.isSpriteMaterial?p(A,w):w.isShadowMaterial?(A.color.value.copy(w.color),A.opacity.value=w.opacity):w.isShaderMaterial&&(w.uniformsNeedUpdate=!1)}function o(A,w){A.opacity.value=w.opacity,w.color&&A.diffuse.value.copy(w.color),w.emissive&&A.emissive.value.copy(w.emissive).multiplyScalar(w.emissiveIntensity),w.map&&(A.map.value=w.map,t(w.map,A.mapTransform)),w.alphaMap&&(A.alphaMap.value=w.alphaMap,t(w.alphaMap,A.alphaMapTransform)),w.bumpMap&&(A.bumpMap.value=w.bumpMap,t(w.bumpMap,A.bumpMapTransform),A.bumpScale.value=w.bumpScale,w.side===va&&(A.bumpScale.value*=-1)),w.normalMap&&(A.normalMap.value=w.normalMap,t(w.normalMap,A.normalMapTransform),A.normalScale.value.copy(w.normalScale),w.side===va&&A.normalScale.value.negate()),w.displacementMap&&(A.displacementMap.value=w.displacementMap,t(w.displacementMap,A.displacementMapTransform),A.displacementScale.value=w.displacementScale,A.displacementBias.value=w.displacementBias),w.emissiveMap&&(A.emissiveMap.value=w.emissiveMap,t(w.emissiveMap,A.emissiveMapTransform)),w.specularMap&&(A.specularMap.value=w.specularMap,t(w.specularMap,A.specularMapTransform)),w.alphaTest>0&&(A.alphaTest.value=w.alphaTest);const N=e.get(w),L=N.envMap,I=N.envMapRotation;L&&(A.envMap.value=L,A.envMapRotation.value.setFromMatrix4(Pj.makeRotationFromEuler(I)).transpose(),L.isCubeTexture&&L.isRenderTargetTexture===!1&&A.envMapRotation.value.premultiply(
vendor: 4,141 bytes, line 4114
4114pI),A.reflectivity.value=w.reflectivity,A.ior.value=w.ior,A.refractionRatio.value=w.refractionRatio),w.lightMap&&(A.lightMap.value=w.lightMap,A.lightMapIntensity.value=w.lightMapIntensity,t(w.lightMap,A.lightMapTransform)),w.aoMap&&(A.aoMap.value=w.aoMap,A.aoMapIntensity.value=w.aoMapIntensity,t(w.aoMap,A.aoMapTransform))}function c(A,w){A.diffuse.value.copy(w.color),A.opacity.value=w.opacity,w.map&&(A.map.value=w.map,t(w.map,A.mapTransform))}function h(A,w){A.dashSize.value=w.dashSize,A.totalSize.value=w.dashSize+w.gapSize,A.scale.value=w.scale}function f(A,w,N,L){A.diffuse.value.copy(w.color),A.opacity.value=w.opacity,A.size.value=w.size*N,A.scale.value=L*.5,w.map&&(A.map.value=w.map,t(w.map,A.uvTransform)),w.alphaMap&&(A.alphaMap.value=w.alphaMap,t(w.alphaMap,A.alphaMapTransform)),w.alphaTest>0&&(A.alphaTest.value=w.alphaTest)}function p(A,w){A.diffuse.value.copy(w.color),A.opacity.value=w.opacity,A.rotation.value=w.rotation,w.map&&(A.map.value=w.map,t(w.map,A.mapTransform)),w.alphaMap&&(A.alphaMap.value=w.alphaMap,t(w.alphaMap,A.alphaMapTransform)),w.alphaTest>0&&(A.alphaTest.value=w.alphaTest)}function x(A,w){A.specular.value.copy(w.specular),A.shininess.value=Math.max(w.shininess,1e-4)}function y(A,w){w.gradientMap&&(A.gradientMap.value=w.gradientMap)}function v(A,w){A.metalness.value=w.metalness,w.metalnessMap&&(A.metalnessMap.value=w.metalnessMap,t(w.metalnessMap,A.metalnessMapTransform)),A.roughness.value=w.roughness,w.roughnessMap&&(A.roughnessMap.value=w.roughnessMap,t(w.roughnessMap,A.roughnessMapTransform)),w.envMap&&(A.envMapIntensity.value=w.envMapIntensity)}function S(A,w,N){A.ior.value=w.ior,w.sheen>0&&(A.sheenColor.value.copy(w.sheenColor).multiplyScalar(w.sheen),A.sheenRoughness.value=w.sheenRoughness,w.sheenColorMap&&(A.sheenColorMap.value=w.sheenColorMap,t(w.sheenColorMap,A.sheenColorMapTransform)),w.sheenRoughnessMap&&(A.sheenRoughnessMap.value=w.sheenRoughnessMap,t(w.sheenRoughnessMap,A.sheenRoughnessMapTransform))),w.clearcoat>0&&(A.clearcoat.value=w.clearcoat,A.clearcoatRoughness.value=w.clearcoatRoughness,w.clearcoatMap&&(A.clearcoatMap.value=w.clearcoatMap,t(w.clearcoatMap,A.clearcoatMapTransform)),w.clearcoatRoughnessMap&&(A.clearcoatRoughnessMap.value=w.clearcoatRoughnessMap,t(w.clearcoatRoughnessMap,A.clearcoatRoughnessMapTransform)),w.clearcoatNormalMap&&(A.clearcoatNormalMap.value=w.clearcoatNormalMap,t(w.clearcoatNormalMap,A.clearcoatNormalMapTransform),A.clearcoatNormalScale.value.copy(w.clearcoatNormalScale),w.side===va&&A.clearcoatNormalScale.value.negate())),w.dispersion>0&&(A.dispersion.value=w.dispersion),w.iridescence>0&&(A.iridescence.value=w.iridescence,A.iridescenceIOR.value=w.iridescenceIOR,A.iridescenceThicknessMinimum.value=w.iridescenceThicknessRange[0],A.iridescenceThicknessMaximum.value=w.iridescenceThicknessRange[1],w.iridescenceMap&&(A.iridescenceMap.value=w.iridescenceMap,t(w.iridescenceMap,A.iridescenceMapTransform)),w.iridescenceThicknessMap&&(A.iridescenceThicknessMap.value=w.iridescenceThicknessMap,t(w.iridescenceThicknessMap,A.iridescenceThicknessMapTransform))),w.transmission>0&&(A.transmission.value=w.transmission,A.transmissionSamplerMap.value=N.texture,A.transmissionSamplerSize.value.set(N.width,N.height),w.transmissionMap&&(A.transmissionMap.value=w.transmissionMap,t(w.transmissionMap,A.transmissionMapTransform)),A.thickness.value=w.thickness,w.thicknessMap&&(A.thicknessMap.value=w.thicknessMap,t(w.thicknessMap,A.thicknessMapTransform)),A.attenuationDistance.value=w.attenuationDistance,A.attenuationColor.value.copy(w.attenuationColor)),w.anisotropy>0&&(A.anisotropyVector.value.set(w.anisotropy*Math.cos(w.anisotropyRotation),w.anisotropy*Math.sin(w.anisotropyRotation)),w.anisotropyMap&&(A.anisotropyMap.value=w.anisotropyMap,t(w.anisotropyMap,A.anisotropyMapTransform))),A.specularIntensity.value=w.specularIntensity,A.specularColor.value.copy(w.specularColor),w.specularColorMap&&(A.specularColorMap.value=w.specularColorMap,t(w.specularColorMap,A.specularColorMapTransform)),w.specularIntensityMap&&(A.specularIntensityMap.value=w.specularIntensityMap,t(w.specularIntensityMap,A.specularIntensityMapTransform))}
4114function M(A,w){w.matcap&&(A.matcap.value=w.matcap)}function R(A,w){const N=e.get(w).light;A.referencePosition.value.setFromMatrixPosition(N.matrixWorld),A.nearDistance.value=N.shadow.camera.near,A.farDistance.value=N.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:s}}function Oj(n,e,t,i){let s={},o={},c=[];const h=n.getParameter(n.MAX_UNIFORM_BUFFER_BINDINGS);function f(N,L){const I=L.program;i.uniformBlockBinding(N,I)}function p(N,L){let I=s[N.id];I===void 0&&(M(N),I=x(N),s[N.id]=I,N.addEventListener("dispose",A));const B=L.program;i.updateUBOMapping(N,B);const O=e.render.frame;o[N.id]!==O&&(v(N),o[N.id]=O)}function x(N){const L=y();N.__bindingPointIndex=L;const I=n.createBuffer(),B=N.__size,O=N.usage;return n.bindBuffer(n.UNIFORM_BUFFER,I),n.bufferData(n.UNIFORM_BUFFER,B,O),n.bindBuffer(n.UNIFORM_BUFFER,null),n.bindBufferBase(n.UNIFORM_BUFFER,L,I),I}function y(){for(let N=0;N<h;N++)if(c.indexOf(N)===-1)return c.push(N),N;return Et("WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function v(N){const L=s[N.id],I=N.uniforms,B=N.__cache;n.bindBuffer(n.UNIFORM_BUFFER,L);for(let O=0,F=I.length;O<F;O++){const P=Array.isArray(I[O])?I[O]:[I[O]];for(let V=0,j=P.length;V<j;V++){const W=P[V];if(S(W,O,V,B)===!0){const ee=W.__offset,ie=Array.isArray(W.value)?W.value:[W.value];let ue=0;for(let Q=0;Q<ie.length;Q++){const Y=ie[Q],$=R(Y);typeof Y=="number"||typeof Y=="boolean"?(W.__data[0]=Y,n.bufferSubData(n.UNIFORM_BUFFER,ee+ue,W.__data)):Y.isMatrix3?(W.__data[0]=Y.elements[0],W.__data[1]=Y.elements[1],W.__data[2]=Y.elements[2],W.__data[3]=0,W.__data[4]=Y.elements[3],W.__data[5]=Y.elements[4],W.__data[6]=Y.elements[5],W.__data[7]=0,W.__data[8]=Y.elements[6],W.__data[9]=Y.elements[7],W.__data[10]=Y.elements[8],W.__data[11]=0):ArrayBuffer.isView(Y)?W.__data.set(new Y.constructor(Y.buffer,Y.byteOffset,W.__data.length)):(Y.toArray(W.__data,ue),ue+=$.storage/Float32Array.BYTES_PER_ELEMENT)}n.bufferSubData(n.UNIFORM_BUFFER,ee,W.__data)}}}n.bindBuffer(n.UNIFORM_BUFFER,null)}function S(N,L,I,B){const O=N.value,F=L+"_"+I;if(B[F]===void 0)return typeof O=="number"||typeof O=="boolean"?B[F]=O:ArrayBuffer.isView(O)?B[F]=O.slice():B[F]=O.clone(),!0;{const P=B[F];if(typeof O=="number"||typeof O=="boolean"){if(P!==O)return B[F]=O,!0}else{if(ArrayBuffer.isView(O))return!0;if(P.equals(O)===!1)return P.copy(O),!0}}return!1}function M(N){const L=N.uniforms;let I=0;const B=16;for(let F=0,P=L.length;F<P;F++){const V=Array.isArray(L[F])?L[F]:[L[F]];for(let j=0,W=V.length;j<W;j++){const ee=V[j],ie=Array.isArray(ee.value)?ee.value:[ee.value];for(let ue=0,Q=ie.length;ue<Q;ue++){const Y=ie[ue],$=R(Y),le=I%B,ge=le%$.boundary,Ce=le+ge;I+=ge,Ce!==0&&B-Ce<$.storage&&(I+=B-Ce),ee.__data=new Float32Array($.storage/Float32Array.BYTES_PER_ELEMENT),ee.__offset=I,I+=$.storage}}}const O=I%B;return O>0&&(I+=B-O),N.__size=I,N.__cache={},this}function R(N){const L={boundary:0,storage:0};return typeof N=="number"||typeof N=="boolean"?(L.boundary=4,L.storage=4):N.isVector2?(L.boundary=8,L.storage=8):N.isVector3||N.isColor?(L.boundary=16,L.storage=12):N.isVector4?(L.boundary=16,L.storage=16):N.isMatrix3?(L.boundary=48,L.storage=48):N.isMatrix4?(L.boundary=64,L.storage=64):N.isTexture?ct("WebGLRenderer: Texture samplers can not be part of an uniforms group."):ArrayBuffer.isView(N)?(L.boundary=16,L.storage=N.byteLength):ct("WebGLRenderer: Unsupported uniform value type.",N),L}function A(N){const L=N.target;L.removeEventListener("dispose",A);const I=c.indexOf(L.__bindingPointIndex);c.splice(I,1),n.deleteBuffer(s[L.id]),delete s[L.id],delete o[L.id]}function w(){for(const N in s)n.deleteBuffer(s[N]);c=[],s={},o={}}return{bind:f,update:p,dispose:w}}const zj=new Uint16Array([12469,15057,12620,14925,13266,14620,13807,14376,14323,13990,14545,13625,14713,13328,14840,12882,14931,12528,14996,12233,15039,11829,15066,11525,15080,11295,15085,10976,15082,10705,15073,10495,13880,14564,13898,14542,13977,14430,14158,14124,14393,13732,14556,13410,14702,12996,14814,12596,14891,12291,14937,11834,14957,11489,14958,11194,14943,10803,14921,10506,14893,10278,14858,9960,14484,14039,14487,14025,14499,13941,14524,13740,14574,13468,14654,13106,14743,12678,14818,12344,14867,11893,14889,11509,14893,11180,14881,10
vendor: 5,817 bytes, line 4114
4114751,14852,10428,14812,10128,14765,9754,14712,9466,14764,13480,14764,13475,14766,13440,14766,13347,14769,13070,14786,12713,14816,12387,14844,11957,14860,11549,14868,11215,14855,10751,14825,10403,14782,10044,14729,9651,14666,9352,14599,9029,14967,12835,14966,12831,14963,12804,14954,12723,14936,12564,14917,12347,14900,11958,14886,11569,14878,11247,14859,10765,14828,10401,14784,10011,14727,9600,14660,9289,14586,8893,14508,8533,15111,12234,15110,12234,15104,12216,15092,12156,15067,12010,15028,11776,14981,11500,14942,11205,14902,10752,14861,10393,14812,9991,14752,9570,14682,9252,14603,8808,14519,8445,14431,8145,15209,11449,15208,11451,15202,11451,15190,11438,15163,11384,15117,11274,15055,10979,14994,10648,14932,10343,14871,9936,14803,9532,14729,9218,14645,8742,14556,8381,14461,8020,14365,7603,15273,10603,15272,10607,15267,10619,15256,10631,15231,10614,15182,10535,15118,10389,15042,10167,14963,9787,14883,9447,14800,9115,14710,8665,14615,8318,14514,7911,14411,7507,14279,7198,15314,9675,15313,9683,15309,9712,15298,9759,15277,9797,15229,9773,15166,9668,15084,9487,14995,9274,14898,8910,14800,8539,14697,8234,14590,7790,14479,7409,14367,7067,14178,6621,15337,8619,15337,8631,15333,8677,15325,8769,15305,8871,15264,8940,15202,8909,15119,8775,15022,8565,14916,8328,14804,8009,14688,7614,14569,7287,14448,6888,14321,6483,14088,6171,15350,7402,15350,7419,15347,7480,15340,7613,15322,7804,15287,7973,15229,8057,15148,8012,15046,7846,14933,7611,14810,7357,14682,7069,14552,6656,14421,6316,14251,5948,14007,5528,15356,5942,15356,5977,15353,6119,15348,6294,15332,6551,15302,6824,15249,7044,15171,7122,15070,7050,14949,6861,14818,6611,14679,6349,14538,6067,14398,5651,14189,5311,13935,4958,15359,4123,15359,4153,15356,4296,15353,4646,15338,5160,15311,5508,15263,5829,15188,6042,15088,6094,14966,6001,14826,5796,14678,5543,14527,5287,14377,4985,14133,4586,13869,4257,15360,1563,15360,1642,15358,2076,15354,2636,15341,3350,15317,4019,15273,4429,15203,4732,15105,4911,14981,4932,14836,4818,14679,4621,14517,4386,14359,4156,14083,3795,13808,3437,15360,122,15360,137,15358,285,15355,636,15344,1274,15322,2177,15281,2765,15215,3223,15120,3451,14995,3569,14846,3567,14681,3466,14511,3305,14344,3121,14037,2800,13753,2467,15360,0,15360,1,15359,21,15355,89,15346,253,15325,479,15287,796,15225,1148,15133,1492,15008,1749,14856,1882,14685,1886,14506,1783,14324,1608,13996,1398,13702,1183]);let fl=null;function Bj(){return fl===null&&(fl=new Co(zj,16,16,Du,Ml),fl.name="DFG_LUT",fl.minFilter=yi,fl.magFilter=yi,fl.wrapS=Xa,fl.wrapT=Xa,fl.generateMipmaps=!1,fl.needsUpdate=!0),fl}class mI{constructor(e={}){const{canvas:t=nL(),context:i=null,depth:s=!0,stencil:o=!1,alpha:c=!1,antialias:h=!1,premultipliedAlpha:f=!0,preserveDrawingBuffer:p=!1,powerPreference:x="default",failIfMajorPerformanceCaveat:y=!1,reversedDepthBuffer:v=!1,outputBufferType:S=pa}=e;this.isWebGLRenderer=!0;let M;if(i!==null){if(typeof WebGLRenderingContext<"u"&&i instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");M=i.getContextAttributes().alpha}else M=c;const R=S,A=new Set([X1,W1,p0]),w=new Set([pa,Xr,Qf,Jf,H1,G1]),N=new Uint32Array(4),L=new Int32Array(4),I=new Z;let B=null,O=null;const F=[],P=[];let V=null;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.toneMapping=jr,this.toneMappingExposure=1,this.transmissionResolutionScale=1;const j=this;let W=!1,ee=null;this._outputColorSpace=$s;let ie=0,ue=0,Q=null,Y=-1,$=null;const le=new Xn,ge=new Xn;let Ce=null;const q=new mt(0);let ae=0,Ae=t.width,Ie=t.height,We=1,pe=null,Be=null;const Ve=new Xn(0,0,Ae,Ie),Ze=new Xn(0,0,Ae,Ie);let Rt=!1;const Ct=new fp;let Jt=!1,Nt=!1;const Ue=new Yt,Xe=new Z,Oe=new Xn,at={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let st=!1;function Pt(){return Q===null?We:1}let J=i;function Ot(H,oe){return t.getContext(H,oe)}try{const H={alpha:!0,depth:s,stencil:o,antialias:h,premultipliedAlpha:f,preserveDrawingBuffer:p,powerPreference:x,failIfMajorPerformanceCaveat:y};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${B1}`),t.addEventListener("webglcontextlost",ke,!1),t.addEventListener("webglcontextrestored",_t,!1),t.addEventListener("webglcontextcreationerror",Bt,!1),J===null){const oe="webgl2";if(J=Ot(oe,H),J===null)throw Ot(oe)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(H){throw Et("WebGLRenderer: "+H.message),H}let gt,vt,He,Cn,X,z,de,Re,Fe,$e,Je,Ee,Ne,rt,lt,tt,et,kt,jt,un,se,Ke,De;function ut(){gt=new V7(J),gt.init(),se=new fI(J,gt),vt=new D7(J,gt,e,se),He=new Cj(J,gt),vt.reversedDepthBuffer&&v&&He.buffers.depth.setReversed(!0),Cn=new H7(J),X=new pj,z=new Rj(J,gt,He,X,vt,se,Cn),de=new B7(j),Re=new X8(J),Ke=new R7(J,Re),Fe=new F7(J,Re,Cn,Ke),$e=new j7(J,Fe,Re,Ke,Cn),kt=new G7(J,vt,z),lt=new L7(X),Je=new fj(j,de,gt,vt,Ke,lt),Ee=new Uj(j,X),Ne=new gj,rt=new Sj(gt),et=new C7(j,de,He,$e,M,f),tt=new Aj(j,$e,vt),De=new Oj(J,Cn,vt,He),jt=new N7(J,gt,Cn),un=new k7(J,gt,Cn),Cn.programs=Je.programs,j.capabilities=vt,j.extensions=gt,j.properties=X,j.renderLists=Ne,j.shadowMap=tt,j.state=He,j.info=Cn}ut(),R!==pa&&(V=new X7(R,t.width,t.height,s,o));const it=new Ij(j,J);this.xr=it,this.getContext=function(){return J},this.getContextAttributes=function(){return J.getContextAttributes()},this.forceContextLoss=function(){const H=gt.get("WEBGL_lose_context");H&&H.loseContext()},this.forceContextRestore=function(){const H=gt.get("WEBGL_lose_context");H&&H.restoreContext()},this.getPixelRatio=function(){return We},this.setPixelRatio=function(H){H!==void 0&&(We=H,this.setSize(Ae,Ie,!1))}
vendor: 5,638 bytes, line 4114
4114,this.getSize=function(H){return H.set(Ae,Ie)},this.setSize=function(H,oe,xe=!0){if(it.isPresenting){ct("WebGLRenderer: Can't change size while VR device is presenting.");return}Ae=H,Ie=oe,t.width=Math.floor(H*We),t.height=Math.floor(oe*We),xe===!0&&(t.style.width=H+"px",t.style.height=oe+"px"),V!==null&&V.setSize(t.width,t.height),this.setViewport(0,0,H,oe)},this.getDrawingBufferSize=function(H){return H.set(Ae*We,Ie*We).floor()},this.setDrawingBufferSize=function(H,oe,xe){Ae=H,Ie=oe,We=xe,t.width=Math.floor(H*xe),t.height=Math.floor(oe*xe),this.setViewport(0,0,H,oe)},this.setEffects=function(H){if(R===pa){Et("THREE.WebGLRenderer: setEffects() requires outputBufferType set to HalfFloatType or FloatType.");return}if(H){for(let oe=0;oe<H.length;oe++)if(H[oe].isOutputPass===!0){ct("THREE.WebGLRenderer: OutputPass is not needed in setEffects(). Tone mapping and color space conversion are applied automatically.");break}}V.setEffects(H||[])},this.getCurrentViewport=function(H){return H.copy(le)},this.getViewport=function(H){return H.copy(Ve)},this.setViewport=function(H,oe,xe,fe){H.isVector4?Ve.set(H.x,H.y,H.z,H.w):Ve.set(H,oe,xe,fe),He.viewport(le.copy(Ve).multiplyScalar(We).round())},this.getScissor=function(H){return H.copy(Ze)},this.setScissor=function(H,oe,xe,fe){H.isVector4?Ze.set(H.x,H.y,H.z,H.w):Ze.set(H,oe,xe,fe),He.scissor(ge.copy(Ze).multiplyScalar(We).round())},this.getScissorTest=function(){return Rt},this.setScissorTest=function(H){He.setScissorTest(Rt=H)},this.setOpaqueSort=function(H){pe=H},this.setTransparentSort=function(H){Be=H},this.getClearColor=function(H){return H.copy(et.getClearColor())},this.setClearColor=function(){et.setClearColor(...arguments)},this.getClearAlpha=function(){return et.getClearAlpha()},this.setClearAlpha=function(){et.setClearAlpha(...arguments)},this.clear=function(H=!0,oe=!0,xe=!0){let fe=0;if(H){let me=!1;if(Q!==null){const Ye=Q.texture.format;me=A.has(Ye)}if(me){const Ye=Q.texture.type,pt=w.has(Ye),ot=et.getClearColor(),yt=et.getClearAlpha(),xt=ot.r,Dt=ot.g,Zt=ot.b;pt?(N[0]=xt,N[1]=Dt,N[2]=Zt,N[3]=yt,J.clearBufferuiv(J.COLOR,0,N)):(L[0]=xt,L[1]=Dt,L[2]=Zt,L[3]=yt,J.clearBufferiv(J.COLOR,0,L))}else fe|=J.COLOR_BUFFER_BIT}oe&&(fe|=J.DEPTH_BUFFER_BIT,this.state.buffers.depth.setMask(!0)),xe&&(fe|=J.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),fe!==0&&J.clear(fe)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.setNodesHandler=function(H){H.setRenderer(this),ee=H},this.dispose=function(){t.removeEventListener("webglcontextlost",ke,!1),t.removeEventListener("webglcontextrestored",_t,!1),t.removeEventListener("webglcontextcreationerror",Bt,!1),et.dispose(),Ne.dispose(),rt.dispose(),X.dispose(),de.dispose(),$e.dispose(),Ke.dispose(),De.dispose(),Je.dispose(),it.dispose(),it.removeEventListener("sessionstart",Al),it.removeEventListener("sessionend",Ka),as.stop()};function ke(H){H.preventDefault(),Kg("WebGLRenderer: Context Lost."),W=!0}function _t(){Kg("WebGLRenderer: Context Restored."),W=!1;const H=Cn.autoReset,oe=tt.enabled,xe=tt.autoUpdate,fe=tt.needsUpdate,me=tt.type;ut(),Cn.autoReset=H,tt.enabled=oe,tt.autoUpdate=xe,tt.needsUpdate=fe,tt.type=me}function Bt(H){Et("WebGLRenderer: A WebGL context could not be created. Reason: ",H.statusMessage)}function qn(H){const oe=H.target;oe.removeEventListener("dispose",qn),Sn(oe)}function Sn(H){bs(H),X.remove(H)}function bs(H){const oe=X.get(H).programs;oe!==void 0&&(oe.forEach(function(xe){Je.releaseProgram(xe)}),H.isShaderMaterial&&Je.releaseShaderCache(H))}this.renderBufferDirect=function(H,oe,xe,fe,me,Ye){oe===null&&(oe=at);const pt=me.isMesh&&me.matrixWorld.determinant()<0,ot=Kr(H,oe,xe,fe,me);He.setMaterial(fe,pt);let yt=xe.index,xt=1;if(fe.wireframe===!0){if(yt=Fe.getWireframeAttribute(xe),yt===void 0)return;xt=2}const Dt=xe.drawRange,Zt=xe.attributes.position;let wt=Dt.start*xt,Tn=(Dt.start+Dt.count)*xt;Ye!==null&&(wt=Math.max(wt,Ye.start*xt),Tn=Math.min(Tn,(Ye.start+Ye.count)*xt)),yt!==null?(wt=Math.max(wt,0),Tn=Math.min(Tn,yt.count)):Zt!=null&&(wt=Math.max(wt,0),Tn=Math.min(Tn,Zt.count));const fn=Tn-wt;if(fn<0||fn===1/0)return;Ke.setup(me,fe,ot,xe,yt);let Ht,Dn=jt;if(yt!==null&&(Ht=Re.get(yt),Dn=un,Dn.setIndex(Ht)),me.isMesh)fe.wireframe===!0?(He.setLineWidth(fe.wireframeLinewidth*Pt()),Dn.setMode(J.LINES)):Dn.setMode(J.TRIANGLES);else if(me.isLine){let Rn=fe.linewidth;Rn===void 0&&(Rn=1),He.setLineWidth(Rn*Pt()),me.isLineSegments?Dn.setMode(J.LINES):me.isLineLoop?Dn.setMode(J.LINE_LOOP):Dn.setMode(J.LINE_STRIP)}else me.isPoints?Dn.setMode(J.POINTS):me.isSprite&&Dn.setMode(J.TRIANGLES);if(me.isBatchedMesh)if(gt.get("WEBGL_multi_draw"))Dn.renderMultiDraw(me._multiDrawStarts,me._multiDrawCounts,me._multiDrawCount);else{const Rn=me._multiDrawStarts,dt=me._multiDrawCounts,Yi=me._multiDrawCount,qt=yt?Re.get(yt).bytesPerElement:1,bi=X.get(fe).currentProgram.getUniforms();for(let Ss=0;Ss<Yi;Ss++)bi.setValue(J,"_gl_DrawID",Ss),Dn.render(Rn[Ss]/qt,dt[Ss])}else if(me.isInstancedMesh)Dn.renderInstances(wt,fn,me.count);else if(xe.isInstancedBufferGeometry){const Rn=xe._maxInstanceCount!==void 0?xe._maxInstanceCount:1/0,dt=Math.min(xe.instanceCount,Rn);Dn.renderInstances(wt,fn,dt)}else Dn.render(wt,fn)};function Us(H,oe,xe){H.transparent===!0&&H.side===gl&&H.forceSinglePass===!1?(H.side=va,H.needsUpdate=!0,fr(H,oe,xe),H.side=xc,H.needsUpdate=!0,fr(H,oe,xe),H.side=gl):fr(H,oe,xe)}this.compile=function(H,oe,xe=null){xe===null&&(xe=H),O=rt.get(xe),O.init(oe),P.push(O),xe.traverseVisible(function(me){me.isLight&&me.layers.test(oe.layers
vendor: 6,490 bytes, line 4114
4114)&&(O.pushLight(me),me.castShadow&&O.pushShadow(me))}),H!==xe&&H.traverseVisible(function(me){me.isLight&&me.layers.test(oe.layers)&&(O.pushLight(me),me.castShadow&&O.pushShadow(me))}),O.setupLights();const fe=new Set;return H.traverse(function(me){if(!(me.isMesh||me.isPoints||me.isLine||me.isSprite))return;const Ye=me.material;if(Ye)if(Array.isArray(Ye))for(let pt=0;pt<Ye.length;pt++){const ot=Ye[pt];Us(ot,xe,me),fe.add(ot)}else Us(Ye,xe,me),fe.add(Ye)}),O=P.pop(),fe},this.compileAsync=function(H,oe,xe=null){const fe=this.compile(H,oe,xe);return new Promise(me=>{function Ye(){if(fe.forEach(function(pt){X.get(pt).currentProgram.isReady()&&fe.delete(pt)}),fe.size===0){me(H);return}setTimeout(Ye,10)}gt.get("KHR_parallel_shader_compile")!==null?Ye():setTimeout(Ye,10)})};let hr=null;function Io(H){hr&&hr(H)}function Al(){as.stop()}function Ka(){as.start()}const as=new oI;as.setAnimationLoop(Io),typeof self<"u"&&as.setContext(self),this.setAnimationLoop=function(H){hr=H,it.setAnimationLoop(H),H===null?as.stop():as.start()},it.addEventListener("sessionstart",Al),it.addEventListener("sessionend",Ka),this.render=function(H,oe){if(oe!==void 0&&oe.isCamera!==!0){Et("WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(W===!0)return;ee!==null&&ee.renderStart(H,oe);const xe=it.enabled===!0&&it.isPresenting===!0,fe=V!==null&&(Q===null||xe)&&V.begin(j,Q);if(H.matrixWorldAutoUpdate===!0&&H.updateMatrixWorld(),oe.parent===null&&oe.matrixWorldAutoUpdate===!0&&oe.updateMatrixWorld(),it.enabled===!0&&it.isPresenting===!0&&(V===null||V.isCompositing()===!1)&&(it.cameraAutoUpdate===!0&&it.updateCamera(oe),oe=it.getCamera()),H.isScene===!0&&H.onBeforeRender(j,H,oe,Q),O=rt.get(H,P.length),O.init(oe),O.state.textureUnits=z.getTextureUnits(),P.push(O),Ue.multiplyMatrices(oe.projectionMatrix,oe.matrixWorldInverse),Ct.setFromProjectionMatrix(Ue,lr,oe.reversedDepth),Nt=this.localClippingEnabled,Jt=lt.init(this.clippingPlanes,Nt),B=Ne.get(H,F.length),B.init(),F.push(B),it.enabled===!0&&it.isPresenting===!0){const pt=j.xr.getDepthSensingMesh();pt!==null&&ii(pt,oe,-1/0,j.sortObjects)}ii(H,oe,0,j.sortObjects),B.finish(),j.sortObjects===!0&&B.sort(pe,Be),st=it.enabled===!1||it.isPresenting===!1||it.hasDepthSensing()===!1,st&&et.addToRenderList(B,H),this.info.render.frame++,Jt===!0&<.beginShadows();const me=O.state.shadowsArray;if(tt.render(me,H,oe),Jt===!0&<.endShadows(),this.info.autoReset===!0&&this.info.reset(),(fe&&V.hasRenderPass())===!1){const pt=B.opaque,ot=B.transmissive;if(O.setupLights(),oe.isArrayCamera){const yt=oe.cameras;if(ot.length>0)for(let xt=0,Dt=yt.length;xt<Dt;xt++){const Zt=yt[xt];$a(pt,ot,H,Zt)}st&&et.render(H);for(let xt=0,Dt=yt.length;xt<Dt;xt++){const Zt=yt[xt];Fi(B,H,Zt,Zt.viewport)}}else ot.length>0&&$a(pt,ot,H,oe),st&&et.render(H),Fi(B,H,oe)}Q!==null&&ue===0&&(z.updateMultisampleRenderTarget(Q),z.updateRenderTargetMipmap(Q)),fe&&V.end(j),H.isScene===!0&&H.onAfterRender(j,H,oe),Ke.resetDefaultState(),Y=-1,$=null,P.pop(),P.length>0?(O=P[P.length-1],z.setTextureUnits(O.state.textureUnits),Jt===!0&<.setGlobalState(j.clippingPlanes,O.state.camera)):O=null,F.pop(),F.length>0?B=F[F.length-1]:B=null,ee!==null&&ee.renderEnd()};function ii(H,oe,xe,fe){if(H.visible===!1)return;if(H.layers.test(oe.layers)){if(H.isGroup)xe=H.renderOrder;else if(H.isLOD)H.autoUpdate===!0&&H.update(oe);else if(H.isLightProbeGrid)O.pushLightProbeGrid(H);else if(H.isLight)O.pushLight(H),H.castShadow&&O.pushShadow(H);else if(H.isSprite){if(!H.frustumCulled||Ct.intersectsSprite(H)){fe&&Oe.setFromMatrixPosition(H.matrixWorld).applyMatrix4(Ue);const pt=$e.update(H),ot=H.material;ot.visible&&B.push(H,pt,ot,xe,Oe.z,null)}}else if((H.isMesh||H.isLine||H.isPoints)&&(!H.frustumCulled||Ct.intersectsObject(H))){const pt=$e.update(H),ot=H.material;if(fe&&(H.boundingSphere!==void 0?(H.boundingSphere===null&&H.computeBoundingSphere(),Oe.copy(H.boundingSphere.center)):(pt.boundingSphere===null&&pt.computeBoundingSphere(),Oe.copy(pt.boundingSphere.center)),Oe.applyMatrix4(H.matrixWorld).applyMatrix4(Ue)),Array.isArray(ot)){const yt=pt.groups;for(let xt=0,Dt=yt.length;xt<Dt;xt++){const Zt=yt[xt],wt=ot[Zt.materialIndex];wt&&wt.visible&&B.push(H,pt,wt,xe,Oe.z,Zt)}}else ot.visible&&B.push(H,pt,ot,xe,Oe.z,null)}}const Ye=H.children;for(let pt=0,ot=Ye.length;pt<ot;pt++)ii(Ye[pt],oe,xe,fe)}function Fi(H,oe,xe,fe){const{opaque:me,transmissive:Ye,transparent:pt}=H;O.setupLightsView(xe),Jt===!0&<.setGlobalState(j.clippingPlanes,xe),fe&&He.viewport(le.copy(fe)),me.length>0&&_s(me,oe,xe),Ye.length>0&&_s(Ye,oe,xe),pt.length>0&&_s(pt,oe,xe),He.buffers.depth.setTest(!0),He.buffers.depth.setMask(!0),He.buffers.color.setMask(!0),He.setPolygonOffset(!1)}function $a(H,oe,xe,fe){if((xe.isScene===!0?xe.overrideMaterial:null)!==null)return;if(O.state.transmissionRenderTarget[fe.id]===void 0){const wt=gt.has("EXT_color_buffer_half_float")||gt.has("EXT_color_buffer_float");O.state.transmissionRenderTarget[fe.id]=new ur(1,1,{generateMipmaps:!0,type:wt?Ml:pa,minFilter:xl,samples:Math.max(4,vt.samples),stencilBuffer:o,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:_n.workingColorSpace})}const Ye=O.state.transmissionRenderTarget[fe.id],pt=fe.viewport||le;Ye.setSize(pt.z*j.transmissionResolutionScale,pt.w*j.transmissionResolutionScale);const ot=j.getRenderTarget(),yt=j.getActiveCubeFace(),xt=j.getActiveMipmapLevel();j.setRenderTarget(Ye),j.getClearColor(q),ae=j.getClearAlpha(),ae<1&&j.setClearColor(16777215,.5),j.clear(),st&&et.render(xe);const Dt=j.toneMapping;j.toneMapping=jr;const Zt=fe.viewport;if(fe.viewport!==void 0&&(fe.viewport=void 0),O.setupLightsView(fe),Jt===!0&<.setGlobalState(j.clippingPlanes,fe),_s(H,xe,fe),z.updateMultisampleRenderTarget(Ye),z.updateRenderTargetMipmap(Ye),gt.has("WEBGL_multisampled_render_to_texture")===!1){let wt=!1;for(let Tn=0,fn=oe.length;Tn<fn;Tn++){const Ht=oe[Tn],{object:Dn,geometry:Rn,material:dt,group:Yi}=Ht;if(dt.side===gl&&Dn.layers.test(fe.layers)){const qt=dt.side;dt.side=va,dt.needsUpdate=!0,Qa(Dn,xe,fe,Rn,dt,Yi),dt.side=qt,dt.needsUpdate=!0,wt=!0}}wt===!0&&(z.updateMultisampleRenderTarget(Ye),z.updateRenderTargetMipmap(Ye))}j.setRenderTarget(ot,yt,xt),j.setClearColor(q,ae),Zt!==void 0&&(fe.viewport=Zt),j.toneMapping=Dt}function _s(H,oe,xe){const fe=oe.isScene===!0?oe.overrideMaterial:null;for(let me=0,Ye=H.length;me<Ye;me++){const pt=H[me],{object:ot,geometry:yt,group:xt}=pt;let Dt=pt.material;Dt.allowOverride===!0&&fe!==null&&(Dt=fe),ot.layers.test(xe.layers
4114)&&Qa(ot,oe,xe,yt,Dt,xt)}}function Qa(H,oe,xe,fe,me,Ye){H.onBeforeRender(j,oe,xe,fe,me,Ye),H.modelViewMatrix.multiplyMatrices(xe.matrixWorldInverse,H.matrixWorld),H.normalMatrix.getNormalMatrix(H.modelViewMatrix),me.onBeforeRender(j,oe,xe,fe,H,Ye),me.transparent===!0&&me.side===gl&&me.forceSinglePass===!1?(me.side=va,me.needsUpdate=!0,j.renderBufferDirect(xe,oe,fe,me,H,Ye),me.side=xc,me.needsUpdate=!0,j.renderBufferDirect(xe,oe,fe,me,H,Ye),me.side=gl):j.renderBufferDirect(xe,oe,fe,me,H,Ye),H.onAfterRender(j,oe,xe,fe,me,Ye)}function fr(H,oe,xe){oe.isScene!==!0&&(oe=at);const fe=X.get(H),me=O.state.lights,Ye=O.state.shadowsArray,pt=me.state.version,ot=Je.getParameters(H,me.state,Ye,oe,xe,O.state.lightProbeGridArray),yt=Je.getProgramCacheKey(ot);let xt=fe.programs;fe.environment=H.isMeshStandardMaterial||H.isMeshLambertMaterial||H.isMeshPhongMaterial?oe.environment:null,fe.fog=oe.fog;const Dt=H.isMeshStandardMaterial||H.isMeshLambertMaterial&&!H.envMap||H.isMeshPhongMaterial&&!H.envMap;fe.envMap=de.get(H.envMap||fe.environment,Dt),fe.envMapRotation=fe.environment!==null&&H.envMap===null?oe.environmentRotation:H.envMapRotation,xt===void 0&&(H.addEventListener("dispose",qn),xt=new Map,fe.programs=xt);let Zt=xt.get(yt);if(Zt!==void 0){if(fe.currentProgram===Zt&&fe.lightsStateVersion===pt)return Sa(H,ot),Zt}else ot.uniforms=Je.getUniforms(H),ee!==null&&H.isNodeMaterial&&ee.build(H,xe,ot),H.onBeforeCompile(ot,j),Zt=Je.acquireProgram(ot,yt),xt.set(yt,Zt),fe.uniforms=ot.uniforms;const wt=fe.uniforms;return(!H.isShaderMaterial&&!H.isRawShaderMaterial||H.clipping===!0)&&(wt.clippingPlanes=lt.uniform),Sa(H,ot),fe.needsLights=Po(H),fe.lightsStateVersion=pt,fe.needsLights&&(wt.ambientLightColor.value=me.state.ambient,wt.lightProbe.value=me.state.probe,wt.directionalLights.value=me.state.directional,wt.directionalLightShadows.value=me.state.directionalShadow,wt.spotLights.value=me.state.spot,wt.spotLightShadows.value=me.state.spotShadow,wt.rectAreaLights.value=me.state.rectArea,wt.ltc_1.value=me.state.rectAreaLTC1,wt.ltc_2.value=me.state.rectAreaLTC2,wt.pointLights.value=me.state.point,wt.pointLightShadows.value=me.state.pointShadow,wt.hemisphereLights.value=me.state.hemi,wt.directionalShadowMatrix.value=me.state.directionalShadowMatrix,wt.spotLightMatrix.value=me.state.spotLightMatrix,wt.spotLightMap.value=me.state.spotLightMap,wt.pointShadowMatrix.value=me.state.pointShadowMatrix),fe.lightProbeGrid=O.state.lightProbeGridArray.length>0,fe.currentProgram=Zt,fe.uniformsList=null,Zt}function Cl(H){if(H.uniformsList===null){const oe=H.currentProgram.getUniforms();H.uniformsList=xv.seqWithValue(oe.seq,H.uniforms)}return H.uniformsList}function Sa(H,oe){const xe=X.get(H);xe.outputColorSpace=oe.outputColorSpace,xe.batching=oe.batching,xe.batchingColor=oe.batchingColor,xe.instancing=oe.instancing,xe.instancingColor=oe.instancingColor,xe.instancingMorph=oe.instancingMorph,xe.skinning=oe.skinning,xe.morphTargets=oe.morphTargets,xe.morphNormals=oe.morphNormals,xe.morphColors=oe.morphColors,xe.morphTargetsCount=oe.morphTargetsCount,xe.numClippingPlanes=oe.numClippingPlanes,xe.numIntersection=oe.numClipIntersection,xe.vertexAlphas=oe.vertexAlphas,xe.vertexTangents=oe.vertexTangents,xe.toneMapping=oe.toneMapping}function Zr(H,oe){if(H.length===0)return null;if(H.length===1)return H[0].texture!==null?H[0]:null;I.setFromMatrixPosition(oe.matrixWorld);for(let xe=0,fe=H.length;xe<fe;xe++){const me=H[xe];if(me.texture!==null&&me.boundingBox.containsPoint(I))return me}return null}function Kr(H,oe,xe,fe,me){oe.isScene!==!0&&(oe=at),z.resetTextureUnits();const Ye=oe.fog,pt=fe.isMeshStandardMaterial||fe.isMeshLambertMaterial||fe.isMeshPhongMaterial?oe.environment:null,ot=Q===null?j.outputColorSpace:Q.isXRRenderTarget===!0?Q.texture.colorSpace:_n.workingColorSpace,yt=fe.isMeshStandardMaterial||fe.isMeshLambertMaterial&&!fe.envMap||fe.isMeshPhongMaterial&&!fe.envMap,xt=de.get(fe.envMap||pt,yt),Dt=fe.vertexColors===!0&&!!xe.attributes.color&&xe.attributes.color.itemSize===4,Zt=!!xe.attributes.tangent&&(!!fe.normalMap||fe.anisotropy>0),wt=!!xe.morphAttributes.position,Tn=!!xe.morphAttributes.normal,fn=!!xe.morphAttributes.color;let Ht=jr;fe.toneMapped&&(Q===null||Q.isXRRenderTarget===!0)&&(Ht=j.toneMapping);const Dn=xe.morphAttributes.position||xe.morphAttributes.normal||xe.morphAttributes.color,Rn=Dn!==void 0?Dn.length:0,dt=X.get(fe),Yi=O.state.lights;if(Jt===!0&&(Nt===!0||H!==$)){const In=H===$&&fe.id===Y;lt.setState(fe,H,In)}let qt=!1;fe.version===dt.__version?(dt.needsLights&&dt.lightsStateVersion!==Yi.state.ver
vendor: 6,388 bytes, line 4114
4114sion||dt.outputColorSpace!==ot||me.isBatchedMesh&&dt.batching===!1||!me.isBatchedMesh&&dt.batching===!0||me.isBatchedMesh&&dt.batchingColor===!0&&me.colorTexture===null||me.isBatchedMesh&&dt.batchingColor===!1&&me.colorTexture!==null||me.isInstancedMesh&&dt.instancing===!1||!me.isInstancedMesh&&dt.instancing===!0||me.isSkinnedMesh&&dt.skinning===!1||!me.isSkinnedMesh&&dt.skinning===!0||me.isInstancedMesh&&dt.instancingColor===!0&&me.instanceColor===null||me.isInstancedMesh&&dt.instancingColor===!1&&me.instanceColor!==null||me.isInstancedMesh&&dt.instancingMorph===!0&&me.morphTexture===null||me.isInstancedMesh&&dt.instancingMorph===!1&&me.morphTexture!==null||dt.envMap!==xt||fe.fog===!0&&dt.fog!==Ye||dt.numClippingPlanes!==void 0&&(dt.numClippingPlanes!==lt.numPlanes||dt.numIntersection!==lt.numIntersection)||dt.vertexAlphas!==Dt||dt.vertexTangents!==Zt||dt.morphTargets!==wt||dt.morphNormals!==Tn||dt.morphColors!==fn||dt.toneMapping!==Ht||dt.morphTargetsCount!==Rn||!!dt.lightProbeGrid!=O.state.lightProbeGridArray.length>0)&&(qt=!0):(qt=!0,dt.__version=fe.version);let bi=dt.currentProgram;qt===!0&&(bi=fr(fe,oe,me),ee&&fe.isNodeMaterial&&ee.onUpdateProgram(fe,bi,dt));let Ss=!1,ta=!1,Os=!1;const On=bi.getUniforms(),Jn=dt.uniforms;if(He.useProgram(bi.program)&&(Ss=!0,ta=!0,Os=!0),fe.id!==Y&&(Y=fe.id,ta=!0),dt.needsLights){const In=Zr(O.state.lightProbeGridArray,me);dt.lightProbeGrid!==In&&(dt.lightProbeGrid=In,ta=!0)}if(Ss||$!==H){He.buffers.depth.getReversed()&&H.reversedDepth!==!0&&(H._reversedDepth=!0,H.updateProjectionMatrix()),On.setValue(J,"projectionMatrix",H.projectionMatrix),On.setValue(J,"viewMatrix",H.matrixWorldInverse);const er=On.map.cameraPosition;er!==void 0&&er.setValue(J,Xe.setFromMatrixPosition(H.matrixWorld)),vt.logarithmicDepthBuffer&&On.setValue(J,"logDepthBufFC",2/(Math.log(H.far+1)/Math.LN2)),(fe.isMeshPhongMaterial||fe.isMeshToonMaterial||fe.isMeshLambertMaterial||fe.isMeshBasicMaterial||fe.isMeshStandardMaterial||fe.isShaderMaterial)&&On.setValue(J,"isOrthographic",H.isOrthographicCamera===!0),$!==H&&($=H,ta=!0,Os=!0)}if(dt.needsLights&&(Yi.state.directionalShadowMap.length>0&&On.setValue(J,"directionalShadowMap",Yi.state.directionalShadowMap,z),Yi.state.spotShadowMap.length>0&&On.setValue(J,"spotShadowMap",Yi.state.spotShadowMap,z),Yi.state.pointShadowMap.length>0&&On.setValue(J,"pointShadowMap",Yi.state.pointShadowMap,z)),me.isSkinnedMesh){On.setOptional(J,me,"bindMatrix"),On.setOptional(J,me,"bindMatrixInverse");const In=me.skeleton;In&&(In.boneTexture===null&&In.computeBoneTexture(),On.setValue(J,"boneTexture",In.boneTexture,z))}me.isBatchedMesh&&(On.setOptional(J,me,"batchingTexture"),On.setValue(J,"batchingTexture",me._matricesTexture,z),On.setOptional(J,me,"batchingIdTexture"),On.setValue(J,"batchingIdTexture",me._indirectTexture,z),On.setOptional(J,me,"batchingColorTexture"),me._colorsTexture!==null&&On.setValue(J,"batchingColorTexture",me._colorsTexture,z));const Ma=xe.morphAttributes;if((Ma.position!==void 0||Ma.normal!==void 0||Ma.color!==void 0)&&kt.update(me,xe,bi),(ta||dt.receiveShadow!==me.receiveShadow)&&(dt.receiveShadow=me.receiveShadow,On.setValue(J,"receiveShadow",me.receiveShadow)),(fe.isMeshStandardMaterial||fe.isMeshLambertMaterial||fe.isMeshPhongMaterial)&&fe.envMap===null&&oe.environment!==null&&(Jn.envMapIntensity.value=oe.environmentIntensity),Jn.dfgLUT!==void 0&&(Jn.dfgLUT.value=Bj()),ta){if(On.setValue(J,"toneMappingExposure",j.toneMappingExposure),dt.needsLights&&$r(Jn,Os),Ye&&fe.fog===!0&&Ee.refreshFogUniforms(Jn,Ye),Ee.refreshMaterialUniforms(Jn,fe,We,Ie,O.state.transmissionRenderTarget[H.id]),dt.needsLights&&dt.lightProbeGrid){const In=dt.lightProbeGrid;Jn.probesSH.value=In.texture,Jn.probesMin.value.copy(In.boundingBox.min),Jn.probesMax.value.copy(In.boundingBox.max),Jn.probesResolution.value.copy(In.resolution)}xv.upload(J,Cl(dt),Jn,z)}if(fe.isShaderMaterial&&fe.uniformsNeedUpdate===!0&&(xv.upload(J,Cl(dt),Jn,z),fe.uniformsNeedUpdate=!1),fe.isSpriteMaterial&&On.setValue(J,"center",me.center),On.setValue(J,"modelViewMatrix",me.modelViewMatrix),On.setValue(J,"normalMatrix",me.normalMatrix),On.setValue(J,"modelMatrix",me.matrixWorld),fe.uniformsGroups!==void 0){const In=fe.uniformsGroups;for(let er=0,mr=In.length;er<mr;er++){const Uo=In[er];De.update(Uo,bi),De.bind(Uo,bi)}}return bi}function $r(H,oe){H.ambientLightColor.needsUpdate=oe,H.lightProbe.needsUpdate=oe,H.directionalLights.needsUpdate=oe,H.directionalLightShadows.needsUpdate=oe,H.pointLights.needsUpdate=oe,H.pointLightShadows.needsUpdate=oe,H.spotLights.needsUpdate=oe,H.spotLightShadows.needsUpdate=oe,H.rectAreaLights.needsUpdate=oe,H.hemisphereLights.needsUpdate=oe}function Po(H){return H.isMeshLambertMaterial||H.isMeshToonMaterial||H.isMeshPhongMaterial||H.isMeshStandardMaterial||H.isShadowMaterial||H.isShaderMaterial&&H.lights===!0}this.getActiveCubeFace=function(){return ie},this.getActiveMipmapLevel=function(){return ue},this.getRenderTarget=function(){return Q},this.setRenderTargetTextures=function(H,oe,xe){const fe=X.get(H);fe.__autoAllocateDepthBuffer=H.resolveDepthBuffer===!1,fe.__autoAllocateDepthBuffer===!1&&(fe.__useRenderToTexture=!1),X.get(H.texture).__webglTexture=oe,X.get(H.depthTexture).__webglTexture=fe.__autoAllocateDepthBuffer?void 0:xe,fe.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(H,oe){const xe=X.get(H);xe.__webglFramebuffer=oe,xe.__useDefaultFramebuffer=oe===void 0};const pr=J.createFramebuffer();this.setRenderTarget=function(H,oe=0,xe=0){Q=H,ie=oe,ue=xe;let fe=null,me=!1,Ye=!1;if(H){const ot=X.get(H);if(ot.__useDefaultFramebuffer!==void 0){He.bindFramebuffer(J.FRAMEBUFFER,ot.__webglFramebuffer),le.copy(H.viewport),ge.copy(H.scissor),Ce=H.scissorTest,He.viewport(le),He.scissor(ge),He.setScissorTest(Ce),Y=-1;return}else if(ot.__webglFramebuffer===void 0)z.setupRenderTarget(H);else if(ot.__hasExternalTextures)z.rebindTextures(H,X.get(H.texture).__webglTexture,X.get(H.depthTexture).__webglTexture);else if(H.depthBuffer){const Dt=H.depthTexture;if(ot.__boundDepthTexture!==Dt){if(Dt!==null&&X.has(Dt)&&(H.width!==Dt.image.width||H.height!==Dt.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");z.setupDepthRenderbuffer(H)}}const yt=H.texture;(yt.isData3DTexture||yt.isDataArrayTexture||yt.isCompressedArrayTexture)&&(Ye=!0);const xt=X.get(H).__webglFramebuffer;
vendor: 7,915 bytes, line 4114
4114H.isWebGLCubeRenderTarget?(Array.isArray(xt[oe])?fe=xt[oe][xe]:fe=xt[oe],me=!0):H.samples>0&&z.useMultisampledRTT(H)===!1?fe=X.get(H).__webglMultisampledFramebuffer:Array.isArray(xt)?fe=xt[xe]:fe=xt,le.copy(H.viewport),ge.copy(H.scissor),Ce=H.scissorTest}else le.copy(Ve).multiplyScalar(We).floor(),ge.copy(Ze).multiplyScalar(We).floor(),Ce=Rt;if(xe!==0&&(fe=pr),He.bindFramebuffer(J.FRAMEBUFFER,fe)&&He.drawBuffers(H,fe),He.viewport(le),He.scissor(ge),He.setScissorTest(Ce),me){const ot=X.get(H.texture);J.framebufferTexture2D(J.FRAMEBUFFER,J.COLOR_ATTACHMENT0,J.TEXTURE_CUBE_MAP_POSITIVE_X+oe,ot.__webglTexture,xe)}else if(Ye){const ot=oe;for(let yt=0;yt<H.textures.length;yt++){const xt=X.get(H.textures[yt]);J.framebufferTextureLayer(J.FRAMEBUFFER,J.COLOR_ATTACHMENT0+yt,xt.__webglTexture,xe,ot)}}else if(H!==null&&xe!==0){const ot=X.get(H.texture);J.framebufferTexture2D(J.FRAMEBUFFER,J.COLOR_ATTACHMENT0,J.TEXTURE_2D,ot.__webglTexture,xe)}Y=-1},this.readRenderTargetPixels=function(H,oe,xe,fe,me,Ye,pt,ot=0){if(!(H&&H.isWebGLRenderTarget)){Et("WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let yt=X.get(H).__webglFramebuffer;if(H.isWebGLCubeRenderTarget&&pt!==void 0&&(yt=yt[pt]),yt){He.bindFramebuffer(J.FRAMEBUFFER,yt);try{const xt=H.textures[ot],Dt=xt.format,Zt=xt.type;if(H.textures.length>1&&J.readBuffer(J.COLOR_ATTACHMENT0+ot),!vt.textureFormatReadable(Dt)){Et("WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!vt.textureTypeReadable(Zt)){Et("WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}oe>=0&&oe<=H.width-fe&&xe>=0&&xe<=H.height-me&&J.readPixels(oe,xe,fe,me,se.convert(Dt),se.convert(Zt),Ye)}finally{const xt=Q!==null?X.get(Q).__webglFramebuffer:null;He.bindFramebuffer(J.FRAMEBUFFER,xt)}}},this.readRenderTargetPixelsAsync=async function(H,oe,xe,fe,me,Ye,pt,ot=0){if(!(H&&H.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let yt=X.get(H).__webglFramebuffer;if(H.isWebGLCubeRenderTarget&&pt!==void 0&&(yt=yt[pt]),yt)if(oe>=0&&oe<=H.width-fe&&xe>=0&&xe<=H.height-me){He.bindFramebuffer(J.FRAMEBUFFER,yt);const xt=H.textures[ot],Dt=xt.format,Zt=xt.type;if(H.textures.length>1&&J.readBuffer(J.COLOR_ATTACHMENT0+ot),!vt.textureFormatReadable(Dt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!vt.textureTypeReadable(Zt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");const wt=J.createBuffer();J.bindBuffer(J.PIXEL_PACK_BUFFER,wt),J.bufferData(J.PIXEL_PACK_BUFFER,Ye.byteLength,J.STREAM_READ),J.readPixels(oe,xe,fe,me,se.convert(Dt),se.convert(Zt),0);const Tn=Q!==null?X.get(Q).__webglFramebuffer:null;He.bindFramebuffer(J.FRAMEBUFFER,Tn);const fn=J.fenceSync(J.SYNC_GPU_COMMANDS_COMPLETE,0);return J.flush(),await WF(J,fn,4),J.bindBuffer(J.PIXEL_PACK_BUFFER,wt),J.getBufferSubData(J.PIXEL_PACK_BUFFER,0,Ye),J.deleteBuffer(wt),J.deleteSync(fn),Ye}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(H,oe=null,xe=0){const fe=Math.pow(2,-xe),me=Math.floor(H.image.width*fe),Ye=Math.floor(H.image.height*fe),pt=oe!==null?oe.x:0,ot=oe!==null?oe.y:0;z.setTexture2D(H,0),J.copyTexSubImage2D(J.TEXTURE_2D,xe,0,0,pt,ot,me,Ye),He.unbindTexture()};const vi=J.createFramebuffer(),Ja=J.createFramebuffer();this.copyTextureToTexture=function(H,oe,xe=null,fe=null,me=0,Ye=0){let pt,ot,yt,xt,Dt,Zt,wt,Tn,fn;const Ht=H.isCompressedTexture?H.mipmaps[Ye]:H.image;if(xe!==null)pt=xe.max.x-xe.min.x,ot=xe.max.y-xe.min.y,yt=xe.isBox3?xe.max.z-xe.min.z:1,xt=xe.min.x,Dt=xe.min.y,Zt=xe.isBox3?xe.min.z:0;else{const Jn=Math.pow(2,-me);pt=Math.floor(Ht.width*Jn),ot=Math.floor(Ht.height*Jn),H.isDataArrayTexture?yt=Ht.depth:H.isData3DTexture?yt=Math.floor(Ht.depth*Jn):yt=1,xt=0,Dt=0,Zt=0}fe!==null?(wt=fe.x,Tn=fe.y,fn=fe.z):(wt=0,Tn=0,fn=0);const Dn=se.convert(oe.format),Rn=se.convert(oe.type);let dt;oe.isData3DTexture?(z.setTexture3D(oe,0),dt=J.TEXTURE_3D):oe.isDataArrayTexture||oe.isCompressedArrayTexture?(z.setTexture2DArray(oe,0),dt=J.TEXTURE_2D_ARRAY):(z.setTexture2D(oe,0),dt=J.TEXTURE_2D),He.activeTexture(J.TEXTURE0),He.pixelStorei(J.UNPACK_FLIP_Y_WEBGL,oe.flipY),He.pixelStorei(J.UNPACK_PREMULTIPLY_ALPHA_WEBGL,oe.premultiplyAlpha),He.pixelStorei(J.UNPACK_ALIGNMENT,oe.unpackAlignment);const Yi=He.getParameter(J.UNPACK_ROW_LENGTH),qt=He.getParameter(J.UNPACK_IMAGE_HEIGHT),bi=He.getParameter(J.UNPACK_SKIP_PIXELS),Ss=He.getParameter(J.UNPACK_SKIP_ROWS),ta=He.getParameter(J.UNPACK_SKIP_IMAGES);He.pixelStorei(J.UNPACK_ROW_LENGTH,Ht.width),He.pixelStorei(J.UNPACK_IMAGE_HEIGHT,Ht.height),He.pixelStorei(J.UNPACK_SKIP_PIXELS,xt),He.pixelStorei(J.UNPACK_SKIP_ROWS,Dt),He.pixelStorei(J.UNPACK_SKIP_IMAGES,Zt);const Os=H.isDataArrayTexture||H.isData3DTexture,On=oe.isDataArrayTexture||oe.isData3DTexture;if(H.isDepthTexture){const Jn=X.get(H),Ma=X.get(oe),In=X.get(Jn.__renderTarget),er=X.get(Ma.__renderTarget);He.bindFramebuffer(J.READ_FRAMEBUFFER,In.__webglFramebuffer),He.bindFramebuffer(J.DRAW_FRAMEBUFFER,er.__webglFramebuffer);for(let mr=0;mr<yt;mr++)Os&&(J.framebufferTextureLayer(J.READ_FRAMEBUFFER,J.COLOR_ATTACHMENT0,X.get(H).__webglTexture,me,Zt+mr),J.framebufferTextureLayer(J.DRAW_FRAMEBUFFER,J.COLOR_ATTACHMENT0,X.get(oe).__webglTexture,Ye,fn+mr)),J.blitFramebuffer(xt,Dt,pt,ot,wt,Tn,pt,ot,J.DEPTH_BUFFER_BIT,J.NEAREST);He.bindFramebuffer(J.READ_FRAMEBUFFER,null),He.bindFramebuffer(J.DRAW_FRAMEBUFFER,null)}else if(me!==0||H.isRenderTargetTexture||X.has(H)){const Jn=X.get(H),Ma=X.get(oe);He.bindFramebuffer(J.READ_FRAMEBUFFER,vi),He.bindFramebuffer(J.DRAW_FRAMEBUFFER,Ja);for(let In=0;In<yt;In++)Os?J.framebufferTextureLayer(J.READ_FRAMEBUFFER,J.COLOR_ATTACHMENT0,Jn.__webglTexture,me,Zt+In):J.framebufferTexture2D(J.READ_FRAMEBUFFER,J.COLOR_ATTACHMENT0,J.TEXTURE_2D,Jn.__webglTexture,me),On?J.framebufferTextureLayer(J.DRAW_FRAMEBUFFER,J.COLOR_ATTACHMENT0,Ma.__webglTexture,Ye,fn+In):J.framebufferTexture2D(J.DRAW_FRAMEBUFFER,J.COLOR_ATTACHMENT0,J.TEXTURE_2D,Ma.__webglTexture,Ye),me!==0?J.blitFramebuffer(xt,Dt,pt,ot,wt,Tn,pt,ot,J.COLOR_BUFFER_BIT,J.NEAREST):On?J.copyTexSubImage3D(dt,Ye,wt,Tn,fn+In,xt,Dt,pt,ot):J.copyTexSubImage2D(dt,Ye,wt,Tn,xt,Dt,pt,ot);He.bindFramebuffer(J.READ_FRAMEBUFFER,null),He.bindFramebuffer(J.DRAW_FRAMEBUFFER,null)}else On?H.isDataTexture||H.isData3DTexture?J.texSubImage3D(dt,Ye,wt,Tn,fn,pt,ot,yt,Dn,Rn,Ht.data):oe.isCompressedArrayTexture?J.compressedTexSubImage3D(dt,Ye,wt,Tn,fn,pt,ot,yt,Dn,Ht.data):J.texSubImage3D(dt,Ye,wt,Tn,fn,pt,ot,yt,Dn,Rn,Ht):H.isDataTexture?J.texSubImage2D(J.TEXTURE_2D,Ye,wt,Tn,pt,ot,Dn,Rn,Ht.data):H.isCompressedTexture?J.compressedTexSubImage2D(J.TEXTURE_2D,Ye,wt,Tn,Ht.width,Ht.height,Dn,Ht.data):J.texSubImage2D(J.TEXTURE_2D,Ye,wt,Tn,pt,ot,Dn,Rn,Ht);He.pixelStorei(J.UNPACK_ROW_LENGTH,Yi),He.pixelStorei(J.UNPACK_IMAGE_HEIGHT,qt),He.pixelStorei(J.UNPACK_SKIP_PIXELS,bi),He.pixelStorei(J.UNPACK_SKIP_ROWS,Ss),He.pixelStorei(J.UNPACK_SKIP_IMAGES,ta),Ye===0&&oe.generateMipmaps&&J.generateMipmap(dt),He.unbindTexture()},this.initRenderTarget=function(H){X.get(H).__webglFramebuffer===void 0&&z.setupRenderTarget(H)},this.initTexture=function(H){H.isCubeTexture?z.setTextureCube(H,0):H.isData3DTexture?z.setTexture3D(H,0):H.isDataArrayTexture||H.isCompressedArrayTexture?z.setTexture2DArray(H,0):z.setTexture2D(H,0),He.unbindTexture()},this.resetState=function(){ie=0,ue=0,Q=null,He.reset(),Ke.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return lr}get outputColorSpace(){return this._outputColorSpace}
4114set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=_n._getDrawingBufferColorSpace(e),t.unpackColorSpace=_n._getUnpackColorSpace()}}const Vj=Object.freeze(Object.defineProperty({__proto__:null,ACESFilmicToneMapping:V1,AddEquation:bu,AddOperation:HD,AdditiveAnimationBlendMode:Vw,AdditiveBlending:hM,AgXToneMapping:Nw,AlphaFormat:zw,AlwaysCompare:eL,AlwaysDepth:Iv,AlwaysStencilFunc:xM,AmbientLight:qL,AnimationAction:iI,AnimationClip:n0,AnimationLoader:zk,AnimationMixer:f8,AnimationObjectGroup:d8,AnimationUtils:Ik,ArcCurve:xL,ArrayCamera:JL,ArrowHelper:z8,AttachedBindMode:mM,Audio:tI,AudioAnalyser:t8,AudioContext:dT,AudioListener:Qk,AudioLoader:Yk,AxesHelper:B8,BackSide:va,BasicDepthPacking:qD,BasicShadowMap:SD,BatchedMesh:dL,BezierInterpolant:FL,Bone:Xw,BooleanKeyframeTrack:ah,Box2:_8,Box3:Js,Box3Helper:U8,BoxGeometry:sh,BoxHelper:P8,BufferAttribute:Vn,BufferGeometry:Kt,BufferGeometryLoader:$L,ByteType:Iw,Cache:yl,Camera:xb,CameraHelper:I8,CanvasTexture:Q6,CapsuleGeometry:sb,CatmullRomCurve3:yL,CineonToneMapping:Cw,CircleGeometry:ab,ClampToEdgeWrapping:Xa,Clock:aI,Color:mt,ColorKeyframeTrack:oT,ColorManagement:_n,Compatibility:FF,CompressedArrayTexture:K6,CompressedCubeTexture:$6,CompressedTexture:ib,CompressedTextureLoader:Bk,ConeGeometry:x0,ConstantAlphaFactor:VD,ConstantColorFactor:zD,Controls:F8,CubeCamera:QL,CubeDepthTexture:mL,CubeReflectionMapping:Sl,CubeRefractionMapping:Nu,CubeTexture:m0,CubeTextureLoader:Vk,CubeUVReflectionMapping:dp,CubicBezierCurve:Kw,CubicBezierCurve3:vL,CubicInterpolant:BL,CullFaceBack:dM,CullFaceFront:_D,CullFaceFrontBack:QV,CullFaceNone:bD,Curve:Lo,CurvePath:_L,CustomBlending:MD,CustomToneMapping:Rw,CylinderGeometry:g0,Cylindrical:b8,Data3DTexture:$1,DataArrayTexture:K1,DataTexture:Co,DataTextureLoader:Fk,DataUtils:M6,DecrementStencilOp:xF,DecrementWrapStencilOp:vF,DefaultLoadingManager:HL,DepthFormat:wl,DepthStencilFormat:Mu,DepthTexture:Jd,DetachedBindMode:GD,DirectionalLight:XL,DirectionalLightHelper:L8,DiscreteInterpolant:VL,DodecahedronGeometry:rb,DoubleSide:gl,DstAlphaFactor:LD,DstColorFactor:PD,DynamicCopyUsage:PF,DynamicDrawUsage:CF,DynamicReadUsage:DF,EdgesGeometry:gL,EllipseCurve:ob,EqualCompare:$D,EqualDepth:Uv,EqualStencilFunc:MF,EquirectangularReflectionMapping:Sg,EquirectangularRefractionMapping:Mg,Euler:No,EventDispatcher:Do,ExternalTexture:Yw,ExtrudeGeometry:lb,FileLoader:vc,Float16BufferAttribute:N6,Float32BufferAttribute:bt,FloatType:ya,Fog:J1,FogExp2:Q1,FramebufferTexture:Z6,FrontSide:xc,Frustum:fp,FrustumArray:nb,GLBufferAttribute:y8,GLSL1:OF,GLSL3:yM,GreaterCompare:QD,GreaterDepth:zv,GreaterEqualCompare:Z1,GreaterEqualDepth:Ov,GreaterEqualStencilFunc:AF,GreaterStencilFunc:TF,GridHelper:N8,Group:Wf,HTMLTexture:J6,HalfFloatType:Ml,HemisphereLight:GL,HemisphereLightHelper:R8,IcosahedronGeometry:cb,ImageBitmapLoader:qk,ImageLoader:i0,ImageUtils:sL,IncrementStencilOp:gF,IncrementWrapStencilOp:yF,InstancedBufferAttribute:ip,InstancedBufferGeometry:KL,InstancedInterleavedBuffer:x8,InstancedMesh:uL,Int16BufferAttribute:C6,Int32BufferAttribute:R6,Int8BufferAttribute:T6,IntType:k1,InterleavedBuffer:eb,InterleavedBufferAttribute:Qd,Interpolant:mp,InterpolateBezier:gM,InterpolateDiscrete:Wg,InterpolateLinear:m1,InterpolateSmooth:mv,InterpolationSamplingMode:VF,InterpolationSamplingType:BF,InvertStencilOp:bF,KeepStencilOp:Od,KeyframeTrack:Yr,LOD:lL,LatheGeometry:ub,Layers:np,LessCompare:KD,LessDepth:Pv,LessEqualCompare:Y1,LessEqualDepth:Kd,LessEqualStencilFunc:wF,LessStencilFunc:SF,Light:zu,LightProbe:ZL,Line:Iu,Line3:w8,LineBasicMaterial:_a,LineCurve:$w,LineCurve3:bL,LineDashedMaterial:OL,LineLoop:hL,LineSegments:El,LinearFilter:yi,LinearInterpolant:rT,LinearMipMapLinearFilter:iF,LinearMipMapNearestFilter:nF,LinearMipmapLinearFilter:xl,LinearMipmapNearestFilter:wg,LinearSRGBColorSpace:ep,LinearToneMapping:Ew,LinearTransfer:qg,Loader:Za,LoaderUtils:MM,LoadingManager:lT,LoopOnce:jD,LoopPingPong:XD,LoopRepeat:WD,MOUSE:KV,Material:ea,MaterialBlending:JV,MaterialLoader:yb,MathUtils:c6,Matrix2:TM,Matrix3:Qt,Matrix4:Yt,MaxEquation:AD,Mesh:ss,MeshBasicMaterial:Uu,MeshDepthMaterial:iT,MeshDistanceMaterial:sT,MeshLambertMaterial:PL,MeshMatcapMaterial:UL,MeshNormalMaterial:IL,MeshPhongMaterial:DL,MeshPhysicalMaterial:NL,MeshStandardMaterial:nT,MeshToonMaterial:LL,MinEquation:ED,MirroredRepeatWrapping:Hg,MixOperation:kD,MultiplyBlending:pM,MultiplyOperation:f0,NearestFilter:qi,NearestMipMapLinearFilter:tF,NearestMipMapNearestFilter:eF,NearestMipmapLinearFilter:Gf,NearestMipmapNearestFilter:Lw,NeutralToneMapping:Dw,NeverCompare:ZD,NeverDepth:Lv,NeverStencilFunc:_F,NoBlending:bl,NoColorSpace:dc,NoNormalPacking:dF,NoToneMapping:jr,NormalAnimationBlendMode:q1,NormalBlending:qd,NormalGAPacking:fF,NormalRGPacking:hF,NotEqualCompare:JD,NotEqualDepth:Bv,NotEqualStencilFunc:EF,NumberKeyframeTrack:e0,Ob
4114ject3D:Un,ObjectLoader:Wk,ObjectSpaceNormalMap:YD,OctahedronGeometry:y0,OneFactor:RD,OneMinusConstantAlphaFactor:FD,OneMinusConstantColorFactor:BD,OneMinusDstAlphaFactor:ID,OneMinusDstColorFactor:UD,OneMinusSrcAlphaFactor:Dv,OneMinusSrcColorFactor:DD,OrthographicCamera:gp,PCFShadowMap:Xf,PCFSoftShadowMap:_g,PMREMGenerator:AM,Path:b1,PerspectiveCamera:vs,Plane:vu,PlaneGeometry:pp,PlaneHelper:O8,PointLight:WL,PointLightHelper:A8,Points:fL,PointsMaterial:qw,PolarGridHelper:D8,PolyhedronGeometry:Ou,PositionalAudio:e8,PropertyBinding:Pn,PropertyMixer:nI,QuadraticBezierCurve:Qw,QuadraticBezierCurve3:Jw,Quaternion:ba,QuaternionKeyframeTrack:b0,QuaternionLinearInterpolant:kL,R11_EAC_Format:Xv,RED_GREEN_RGTC2_Format:jg,RED_RGTC1_Format:h1,REVISION:B1,RG11_EAC_Format:Gg,RGBADepthPacking:lF,RGBAFormat:Qs,RGBAIntegerFormat:X1,RGBA_ASTC_10x10_Format:r1,RGBA_ASTC_10x5_Format:i1,RGBA_ASTC_10x6_Format:s1,RGBA_ASTC_10x8_Format:a1,RGBA_ASTC_12x10_Format:o1,RGBA_ASTC_12x12_Format:l1,RGBA_ASTC_4x4_Format:Zv,RGBA_ASTC_5x4_Format:Kv,RGBA_ASTC_5x5_Format:$v,RGBA_ASTC_6x5_Format:Qv,RGBA_ASTC_6x6_Format:Jv,RGBA_ASTC_8x5_Format:e1,RGBA_ASTC_8x6_Format:t1,RGBA_ASTC_8x8_Format:n1,RGBA_BPTC_Format:c1,RGBA_ETC2_EAC_Format:Wv,RGBA_PVRTC_2BPPV1_Format:Hv,RGBA_PVRTC_4BPPV1_Format:kv,RGBA_S3TC_DXT1_Format:Eg,RGBA_S3TC_DXT3_Format:Ag,RGBA_S3TC_DXT5_Format:Cg,RGBDepthPacking:cF,RGBFormat:Bw,RGBIntegerFormat:sF,RGB_BPTC_SIGNED_Format:u1,RGB_BPTC_UNSIGNED_Format:d1,RGB_ETC1_Format:Gv,RGB_ETC2_Format:jv,RGB_PVRTC_2BPPV1_Format:Fv,RGB_PVRTC_4BPPV1_Format:Vv,RGB_S3TC_DXT1_Format:Tg,RGDepthPacking:uF,RGFormat:Du,RGIntegerFormat:W1,RawShaderMaterial:tT,Ray:hp,Raycaster:sI,RectAreaLight:YL,RedFormat:j1,RedIntegerFormat:p0,ReinhardToneMapping:Aw,RenderTarget:kw,RenderTarget3D:p8,RepeatWrapping:kg,ReplaceStencilOp:mF,ReverseSubtractEquation:TD,RingGeometry:db,SIGNED_R11_EAC_Format:qv,SIGNED_RED_GREEN_RGTC2_Format:p1,SIGNED_RED_RGTC1_Format:f1,SIGNED_RG11_EAC_Format:Yv,SRGBColorSpace:$s,SRGBTransfer:Wn,Scene:Hw,ShaderChunk:hn,ShaderLib:Mo,ShaderMaterial:dr,ShadowMaterial:AL,Shape:Zd,ShapeGeometry:hb,ShapePath:V8,ShapeUtils:To,ShortType:Pw,Skeleton:tb,SkeletonHelper:E8,SkinnedMesh:cL,Source:wu,Sphere:Ps,SphereGeometry:v0,Spherical:v8,SphericalHarmonics3:uT,SplineCurve:eT,SpotLight:jL,SpotLightHelper:T8,Sprite:oL,SpriteMaterial:Ww,SrcAlphaFactor:Nv,SrcAlphaSaturateFactor:OD,SrcColorFactor:ND,StaticCopyUsage:IF,StaticDrawUsage:Yg,StaticReadUsage:NF,StereoCamera:Zk,StreamCopyUsage:UF,StreamDrawUsage:RF,StreamReadUsage:LF,StringKeyframeTrack:rh,SubtractEquation:wD,SubtractiveBlending:fM,TOUCH:$V,TangentSpaceNormalMap:yc,TetrahedronGeometry:fb,Texture:Ii,TextureLoader:kk,TextureUtils:W8,Timer:eI,TimestampQuery:zF,TorusGeometry:pb,TorusKnotGeometry:mb,Triangle:Wa,TriangleFanDrawMode:oF,TriangleStripDrawMode:rF,TrianglesDrawMode:aF,TubeGeometry:gb,UVMapping:F1,Uint16BufferAttribute:Gw,Uint32BufferAttribute:jw,Uint8BufferAttribute:E6,Uint8ClampedBufferAttribute:A6,Uniform:pT,UniformsGroup:g8,UniformsLib:ht,UniformsUtils:RL,UnsignedByteType:pa,UnsignedInt101111Type:Ow,UnsignedInt248Type:Jf,UnsignedInt5999Type:Uw,UnsignedIntType:Xr,UnsignedShort4444Type:H1,UnsignedShort5551Type:G1,UnsignedShortType:Qf,VSMShadowMap:Fd,Vector2:je,Vector3:Z,Vector4:Xn,VectorKeyframeTrack:t0,VideoFrameTexture:Y6,VideoTexture:pL,WebGL3DRenderTarget:p6,WebGLArrayRenderTarget:f6,WebGLCoordinateSystem:lr,WebGLCubeRenderTarget:mT,WebGLRenderTarget:ur,WebGLRenderer:mI,WebGLUtils:fI,WebGPUCoordinateSystem:$d,WebXRController:gv,WireframeGeometry:EL,WrapAroundEnding:Xg,ZeroCurvatureEnding:kd,ZeroFactor:CD,ZeroSlopeEnding:Hd,ZeroStencilOp:pF,createCanvasElement:nL,error:Et,getConsoleFunction:jF,log:Kg,setConsoleFunction:GF,warn:ct,warnOnce:g1},Symbol.toStringTag,{value:"Module"}));var yS={exports:{}},vS={},bS={exports:{}},_S={};var RC;function Fj(){if(RC)return _S;RC=1;var n=a0();function e(y,v){return y===v&&(y!==0||1/y===1/v)||y!==y&&v!==v}var t=typeof Object.is=="function"?Object.is:e,i=n.useState,s=n.useEffect,o=n.useLayoutEffect,c=n.useDebugValue;function h(y,v){var S=v(),M=i({inst:{value:S,getSnapshot:v}}),R=M[0].inst,A=M[1];return o(function(){R.value=S,R.getSnapshot=v,f(R)&&A({inst:R})},[y,S,v]),s(function(){return f(R)&&A({inst:R}),y(function(){f(R)&&A({inst:R})})},[y]),c(S),S}function f(y){var v=y.getSnapshot;y=y.value;try{var S=v();return!t(y,S)}catch{return!0}}function p(y,v){return v()}var x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:h;return _S.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:x,_S}var NC;function kj(){return NC||(NC=1,bS.exports=Fj()),bS.exports}var DC;function Hj(){if(DC)return vS;DC=1;var n=a0(),e=kj();function t(p,x){return p===x&&(p!==0||1/p===1/x)||p!==p&&x!==x}var i=typeof Object.is=="function"?Object.is:t,s=e.useSyncExternalStore,o=n.useRef,c=n.useEffect,h=n.useMemo,f=n.useDebugValue;return vS.useSyncExternalStoreWithSelector=function(p,x,y,v,S){var M=o(null);if(M.current===null){var R={hasValue:!1,value:null};M.current=R}else R=M.current;M=h(function(){function w(O){if(!N){if(N=!0,L=O,O=v(O),S!==void 0&&R.hasValue){var F=R.value;if(S(F,O))return I=F}return I=O}if(F=I,i(L,O))return F;var P=v(O);return S!==void 0&&S(F,P)?(L=O,F):(L=O,I=P)}var N=!1,L,I,B=y===void 0?null:y;return[function(){return w(x())},B===null?void 0:function(){return w(B())}]},[x,y,v,S]);var A=s(p,M[0],M[1]);return c(function(){R.hasValue=!0,R.value=A},[A]),f(A),A},vS}var LC;function Gj(){return LC||(LC=1,yS.exports=Hj()),yS.exports}var jj=Gj();const Wj=BM(jj),IC=n=>{let e;const t=new Set,i=(p,x)=>{const y=typeof p=="function"?p(e):p;if(!Object.is(y,e)){const v=e;e=x??(typeof y!="object"||y===null)?y:Object.assign({},e,y),t.forEach(S=>S(e,v))}},s=()=>e,h={setState:i,getState:s,getInitialState:()=>f,subscribe:p=>(t.add(p),()=>t.delete(p))},f=e=n(i,s,h);return h},Xj=(n=>n?IC(n):IC),{useSyncExternalStoreWithSelector:qj}=Wj,Yj=n=>n;function Zj(n,e=Yj,t){const i=qj(n.subscribe,n.getState,n.getInitialState,e,t);return $C.useDebugValue(i),i}const PC=(n,e)=>{const t=Xj(n),i=(s,o=e)=>Zj(t,s,o);return Object.assign(i,t),i},Kj=((n,e)=>n?PC(n,e):PC);var NM=KC();
4114const $j=BM(NM);function gT(n,e,t){if(!n)return;if(t(n)===!0)return n;let i=e?n.return:n.child;for(;i;){const s=gT(i,e,t);if(s)return s;i=e?null:i.sibling}}function gI(n){try{return Object.defineProperties(n,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return n}}const xT=gI(K.createContext(null));class xI extends K.Component{render(){return K.createElement(xT.Provider,{value:this._reactInternals},this.props.children)}}function yI(){const n=K.useContext(xT);if(n===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const e=K.useId();return K.useMemo(()=>{for(const t of[n,n?.alternate]){if(!t)continue;const i=gT(t,!1,s=>{let o=s.memoizedState;for(;o;){if(o.memoizedState===e)return!0;o=o.next}});if(i)return i}},[n,e])}const Qj=Symbol.for("react.context"),Jj=n=>n!==null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===Qj;function eW(){const n=yI(),[e]=K.useState(()=>new Map);e.clear();let t=n;for(;t;){const i=t.type;Jj(i)&&i!==xT&&!e.has(i)&&e.set(i,K.use(gI(i))),t=t.return}return e}function tW(){const n=eW();return K.useMemo(()=>Array.from(n.keys()).reduce((e,t)=>i=>K.createElement(e,null,K.createElement(t.Provider,{...i,value:n.get(t)})),e=>K.createElement(xI,{...e})),[n])}function yT(n){let e=n.root;for(;e.getState().previousRoot;)e=e.getState().previousRoot;return e}const vI=n=>n&&n.isOrthographicCamera,nW=n=>n&&n.hasOwnProperty("current"),iW=n=>n!=null&&(typeof n=="string"||typeof n=="number"||n.isColor),_0=((n,e)=>typeof window<"u"&&(((n=window.document)==null?void 0:n.createElement)||((e=window.navigator)==null?void 0:e.product)==="ReactNative"))()?K.useLayoutEffect:K.useEffect;function bI(n){const e=K.useRef(n);return _0(()=>{e.current=n},[n]),e}function sW(){const n=yI(),e=tW();return K.useMemo(()=>({children:t})=>{const s=!!gT(n,!0,o=>o.type===K.StrictMode)?K.StrictMode:K.Fragment;return E.jsx(s,{children:E.jsx(e,{children:t})})},[n,e])}function aW({set:n}){return _0(()=>(n(new Promise(()=>null)),()=>n(!1)),[n]),null}const rW=(n=>(n=class extends K.Component{constructor(...t){super(...t),this.state={error:!1}}componentDidCatch(t){this.props.set(t)}render(){return this.state.error?null:this.props.children}},n.getDerivedStateFromError=()=>({error:!0}),n))();function _I(n){var e;const t=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(n)?Math.min(Math.max(n[0],t),n[1]):n}function Of(n){var e;return(e=n.__r3f)==null?void 0:e.root.getState()}const xi={obj:n=>n===Object(n)&&!xi.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,nul:n=>n===null,arr:n=>Array.isArray(n),equ(n,e,{arrays:t="shallow",objects:i="reference",strict:s=!0}={}){if(typeof n!=typeof e||!!n!=!!e)return!1;if(xi.str(n)||xi.num(n)||xi.boo(n))return n===e;const o=xi.obj(n);if(o&&i==="reference")return n===e;const c=xi.arr(n);if(c&&t==="reference")return n===e;if((c||o)&&n===e)return!0;let h;for(h in n)if(!(h in e))return!1;if(o&&t==="shallow"&&i==="shallow"){for(h in s?e:n)if(!xi.equ(n[h],e[h],{strict:s,objects:"reference"}))return!1}else for(h in s?e:n)if(n[h]!==e[h])return!1;if(xi.und(h)){if(c&&n.length===0&&e.length===0||o&&Object.keys(n).length===0&&Object.keys(e).length===0)return!0;if(n!==e)return!1}return!0}};function oW(n){n.type!=="Scene"&&(n.dispose==null||n.dispose());for(const e in n){const t=n[e];t?.type!=="Scene"&&(t==null||t.dispose==null||t.dispose())}}const SI=["children","key","ref"];function lW(n){const e={};for(const t in n)SI.includes(t)||(e[t]=n[t]);return e}function _1(n,e,t,i){const s=n;let o=s?.__r3f;return o||(o={root:e,type:t,parent:null,children:[],props:lW(i),object:s,eventCount:0,handlers:{},isHidden:!1},s&&(s.__r3f=o)),o}function s0(n,e){if(!e.includes("-"))return{root:n,key:e,target:n[e]};if(e in n)return{root:n,key:e,target:n[e]};let t=n;const i=e.split("-");for(const s of i){if(typeof t!="object"||t===null){if(t!==void 0){const o=i.slice(i.indexOf(s)).join("-");return{root:t,key:o,target:void 0}}return{root:n,key:e,target:void 0}}e=s,n=t,t=t[e]}return{root:n,key:e,target:t}}const UC=/-\d+$/;function S1(n,e){if(xi.str(e.props.attach)){if(UC.test(e.props.attach)){const s=e.props.attach.replace(UC,""),{root:o,key:c}=s0(n.object,s);
4114Array.isArray(o[c])||(o[c]=[])}const{root:t,key:i}=s0(n.object,e.props.attach);e.previousAttach=t[i],t[i]=e.object}else xi.fun(e.props.attach)&&(e.previousAttach=e.props.attach(n.object,e.object))}function M1(n,e){if(xi.str(e.props.attach)){const{root:t,key:i}=s0(n.object,e.props.attach),s=e.previousAttach;s===void 0?delete t[i]:t[i]=s}else e.previousAttach==null||e.previousAttach(n.object,e.object);delete e.previousAttach}const DM=[...SI,"args","dispose","attach","object","onUpdate","dispose"],OC=new Map;function cW(n){let e=OC.get(n.constructor);try{e||(e=new n.constructor,OC.set(n.constructor,e))}catch{}return e}function uW(n,e){const t={};for(const i in e)if(!DM.includes(i)&&!xi.equ(e[i],n.props[i])){t[i]=e[i];for(const s in e)s.startsWith(`${i}-`)&&(t[s]=e[s])}for(const i in n.props){if(DM.includes(i)||e.hasOwnProperty(i))continue;const{root:s,key:o}=s0(n.object,i);if(s.constructor&&s.constructor.length===0){const c=cW(s);xi.und(c)||(t[o]=c[o])}else t[o]=0}return t}const dW=["map","emissiveMap","sheenColorMap","specularColorMap","envMap"],hW=/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/;function _u(n,e){var t;const i=n.__r3f,s=i&&yT(i).getState(),o=i?.eventCount;for(const h in e){let f=e[h];if(DM.includes(h))continue;if(i&&hW.test(h)){typeof f=="function"?i.handlers[h]=f:delete i.handlers[h],i.eventCount=Object.keys(i.handlers).length;continue}if(f===void 0)continue;let{root:p,key:x,target:y}=s0(n,h);if(y===void 0&&(typeof p!="object"||p===null))throw Error(`R3F: Cannot set "${h}". Ensure it is an object before setting "${x}".`);if(y instanceof np&&f instanceof np)y.mask=f.mask;else if(y instanceof mt&&iW(f))y.set(f);else if(y!==null&&typeof y=="object"&&typeof y.set=="function"&&typeof y.copy=="function"&&f!=null&&f.constructor&&y.constructor===f.constructor)y.copy(f);else if(y!==null&&typeof y=="object"&&typeof y.set=="function"&&Array.isArray(f))typeof y.fromArray=="function"?y.fromArray(f):y.set(...f);else if(y!==null&&typeof y=="object"&&typeof y.set=="function"&&typeof f=="number")typeof y.setScalar=="function"?y.setScalar(f):y.set(f);else if(p instanceof dr&&x==="uniforms"&&xi.obj(f)){xi.obj(p.uniforms)||(p.uniforms={});const v=p.uniforms,S=f;for(const M in S){const R=S[M],A=v[M];A?Object.assign(A,R):v[M]={...R}}}else{var c;p[x]=f,s&&!s.linear&&dW.includes(x)&&(c=p[x])!=null&&c.isTexture&&p[x].format===Qs&&p[x].type===pa&&(p[x].colorSpace
4114=$s)}}if(i!=null&&i.parent&&s!=null&&s.internal&&(t=i.object)!=null&&t.isObject3D&&o!==i.eventCount){const h=i.object,f=s.internal.interaction.indexOf(h);f>-1&&s.internal.interaction.splice(f,1),i.eventCount&&h.raycast!==null&&s.internal.interaction.push(h)}return i&&i.props.attach===void 0&&(i.object.isBufferGeometry?i.props.attach="geometry":i.object.isMaterial&&(i.props.attach="material")),i&&yp(i),n}function yp(n){var e;if(!n.parent)return;n.props.onUpdate==null||n.props.onUpdate(n.object);const t=(e=n.root)==null||e.getState==null?void 0:e.getState();t&&t.internal.frames===0&&t.invalidate()}function fW(n,e){n.manual||(vI(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())}const ja=n=>n?.isObject3D;function pg(n){return(n.eventObject||n.object).uuid+"/"+n.index+n.instanceId}function MI(n,e,t,i){const s=t.get(e);s&&(t.delete(e),t.size===0&&(n.delete(i),s.target.releasePointerCapture(i)))}function pW(n,e,t){const{internal:i}=n.getState();for(let s=0;s<i.interaction.length;s++)i.interaction[s]===e&&(i.interaction[s]=t);for(let s=0;s<i.initialHits.length;s++)i.initialHits[s]===e&&(i.initialHits[s]=t);i.hovered.forEach((s,o)=>{if(s.eventObject===e||s.object===e){i.hovered.delete(o);const c={...s,eventObject:s.eventObject===e?t:s.eventObject,object:s.object===e?t:s.object};i.hovered.set(pg(c),c)}}),i.capturedMap.forEach(s=>{const o=s.get(e);o&&(s.delete(e),s.set(t,o))})}function mW(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,s)=>{(i.eventObject===e||i.object===e)&&t.hovered.delete(s)}),t.capturedMap.forEach((i,s)=>{MI(t.capturedMap,e,i,s)})}function gW(n){function e(f){const{internal:p}=n.getState(),x=f.offsetX-p.initialClick[0],y=f.offsetY-p.initialClick[1];return Math.round(Math.sqrt(x*x+y*y))}function t(f){return f.filter(p=>["Move","Over","Enter","Out","Leave"].some(x=>{var y;return(y=p.__r3f)==null?void 0:y.handlers["onPointer"+x]}))}function i(f,p){const x=n.getState(),y=new Set,v=[],S=p?p(x.internal.interaction):x.internal.interaction;for(let w=0;w<S.length;w++){const N=Of(S[w]);N&&(N.raycaster.camera=void 0)}x.previousRoot||x.events.compute==null||x.events.compute(f,x);function M(w){const N=Of(w);if(!N||!N.events.enabled||N.raycaster.camera===null)return[];if(N.raycaster.camera===void 0){var L;N.events.compute==null||N.events.compute(f,N,(L=N.previousRoot)==null?void 0:L.getState()),N.raycaster.camera===void 0&&(N.raycaster.camera=null)}return N.raycaster.camera?N.raycaster.intersectObject(w,!0):[]}let R=S.flatMap(M).sort((w,N)=>{const L=Of(w.object),I=Of(N.object);return!L||!I?w.distance-N.distance:I.events.priority-L.events.priority||w.distance-N.distance}).filter(w=>{const N=pg(w);return y.has(N)?!1:(y.add(N),!0)});x.events.filter&&(R=x.events.filter(R,x));for(const w of R){let N=w.object;for(;N;){var A;(A=N.__r3f)!=null&&A.eventCount&&v.push({...w,eventObject:N}),N=N.parent}}if("pointerId"in f&&x.internal.capturedMap.has(f.pointerId))for(let w of x.internal.capturedMap.get(f.pointerId).values())y.has(pg(w.intersection))||v.push(w.intersection);return v}function s(f,p,x,y){if(f.length){const v={stopped:!1};for(const S of f){let M=Of(S.object);if(M||S.object.traverseAncestors(R=>{const A=Of(R);if(A)return M=A,!1}),M){const{raycaster:R,pointer:A,camera:w,internal:N}=M,L=new Z(A.x,A.y,0).unproject(w),I=V=>{var j,W;return(j=(W=N.capturedMap.get(V))==null?void 0:W.has(S.eventObject))!=null?j:!1},B=V=>{const j={intersection:S,target:p.target};N.capturedMap.has(V)?N.capturedMap.get(V).set(S.eventObject,j):N.capturedMap.set(V,new Map([[S.eventObject,j]])),p.target.setPointerCapture(V)},O=V=>{const j=N.capturedMap.get(V);j&&MI(N.capturedMap,S.eventObject,j,V)};let F={};for(let V in p){let j=p[V];typeof j!="function"&&(F[V]=j)}let P={...S,...F,pointer:A,intersections:f,stopped:v.stopped,delta:x,unprojectedPoint:L,ray:R.ray,camera:w,stopPropagation(){const V="pointerId"in p&&N.capturedMap.get(p.pointerId);if((!V||V.has(S.eventObject))&&(P.stopped=v.stopped=!0,N.hovered.size&&Array.from(N.hovered.values()).find(j=>j.eventObject===S.eventObject))){const j=f.slice(0,f.indexOf(S));o([...j,S])}},target:{hasPointerCapture:I,setPointerCapture:B,releasePointerCapture:O},currentTarget:{hasPointerCapture:I,setPointerCapture:B,releasePointerCapture:O},nativeEvent:p};if(y(P),v.stopped===!0)break}}}return f}function o(f){const{internal:p}=n.getState();for(const x of p.hovered.values())if(!f.length||!f.find(y=>y.object===x.object&&y.index===x.index&&y.instanceId===x.instanceId)){const v=
4114x.eventObject.__r3f;if(p.hovered.delete(pg(x)),v!=null&&v.eventCount){const S=v.handlers,M={...x,intersections:f};S.onPointerOut==null||S.onPointerOut(M),S.onPointerLeave==null||S.onPointerLeave(M)}}}function c(f,p){for(let x=0;x<p.length;x++){const y=p[x].__r3f;y==null||y.handlers.onPointerMissed==null||y.handlers.onPointerMissed(f)}}function h(f){switch(f){case"onPointerLeave":case"onPointerCancel":return()=>o([]);case"onLostPointerCapture":return p=>{const{internal:x}=n.getState();"pointerId"in p&&x.capturedMap.has(p.pointerId)&&requestAnimationFrame(()=>{x.capturedMap.has(p.pointerId)&&(x.capturedMap.delete(p.pointerId),o([]))})}}return function(x){const{onPointerMissed:y,internal:v}=n.getState();v.lastEvent.current=x;const S=f==="onPointerMove",M=f==="onClick"||f==="onContextMenu"||f==="onDoubleClick",A=i(x,S?t:void 0),w=M?e(x):0;f==="onPointerDown"&&(v.initialClick=[x.offsetX,x.offsetY],v.initialHits=A.map(L=>L.eventObject)),M&&!A.length&&w<=2&&(c(x,v.interaction),y&&y(x)),S&&o(A);function N(L){const I=L.eventObject,B=I.__r3f;if(!(B!=null&&B.eventCount))return;const O=B.handlers;if(S){if(O.onPointerOver||O.onPointerEnter||O.onPointerOut||O.onPointerLeave){const F=pg(L),P=v.hovered.get(F);P?P.stopped&&L.stopPropagation():(v.hovered.set(F,L),O.onPointerOver==null||O.onPointerOver(L),O.onPointerEnter==null||O.onPointerEnter(L))}O.onPointerMove==null||O.onPointerMove(L)}else{const F=O[f];F?(!M||v.initialHits.includes(I))&&(c(x,v.interaction.filter(P=>!v.initialHits.includes(P))),F(L)):M&&v.initialHits.includes(I)&&c(x,v.interaction.filter(P=>!v.initialHits.includes(P)))}}s(A,x,w,N)}}return{handlePointer:h}}const zC=n=>!!(n!=null&&n.render),wI=K.createContext(null),xW=(n,e)=>{const t=Kj((h,f)=>{const p=new Z,x=new Z,y=new Z;function v(w=f().camera,N=x,L=f().size){const{width:I,height:B,top:O,left:F}=L,P=I/B;N.isVector3?y.copy(N):y.set(...N);const V=w.getWorldPosition(p).distanceTo(y);if(vI(w))return{width:I/w.zoom,height:B/w.zoom,top:O,left:F,factor:1,distance:V,aspect:P};{const j=w.fov*Math.PI/180,W=2*Math.tan(j/2)*V,ee=W*(I/B);return{width:ee,height:W,top:O,left:F,factor:I/ee,distance:V,aspect:P}}}let S;const M=w=>h(N=>({performance:{...N.performance,current:w}})),R=new je;return{set:h,get:f,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},scene:null,xr:null,invalidate:(w=1)=>n(f(),w),advance:(w,N)=>e(w,N,f()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new aI,pointer:R,mouse:R,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const w=f();S&&clearTimeout(S),w.performance.current!==w.performance.min&&M(w.performance.min),S=setTimeout(()=>M(f().performance.max),w.performance.debounce)}},size:{width:0,height:0,top:0,left:0},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:v},setEvents:w=>h(N=>({...N,events:{...N.events,...w}})),setSize:(w,N,L=0,I=0)=>{const B=f().camera,O={width:w,height:N,top:L,left:I};h(F=>({size:O,viewport:{...F.viewport,...v(B,x,O)}}))},setDpr:w=>h(N=>{const L=_I(w);return{viewport:{...N.viewport,dpr:L,initialDpr:N.viewport.initialDpr||L}}}),setFrameloop:(w="always")=>{const N=f().clock;N.stop(),N.elapsedTime=0,w!=="never"&&(N.start(),N.elapsedTime=0),h(()=>({frameloop:w}))},previousRoot:void 0,internal:{interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,lastEvent:K.createRef(),active:!1,frames:0,priority:0,subscribe:(w,N,L)=>{const I=f().internal;return I.priority=I.priority+(N>0?1:0),I.subscribers.push({ref:w,priority:N,store:L}),I.subscribers=I.subscribers.sort((B,O)=>B.priority-O.priority),()=>{const B=f().internal;B!=null&&B.subscribers&&(B.priority=B.priority-(N>0?1:0),B.subscribers=B.subscribers.filter(O=>O.ref!==w))}}}}}),i=t.getState();let s=i.size,o=i.viewport.dpr,c=i.camera;return t.subscribe(()=>{const{camera:h,size:f,viewport:p,gl:x,set:y}=t.getState();if(f.width!==s.width||f.height!==s.height||p.dpr!==o){s=f,o=p.dpr,fW(h,f),p.dpr>0&&x.setPixelRatio(p.dpr);const v=typeof HTMLCanvasElement<"u"&&x.domElement instanceof HTMLCanvasElement;x.setSize(f.width,f.height,v)}h!==c&&(c=h,y(v=>({viewport:{...v.viewport,...v.viewport.getCurrentViewport(h)}})))}),t.subscribe(h=>n(h)),t};function TI(){const n=K.useContext(wI);if(!n)throw new Error("R3F: Hooks can only be used within the Canvas component!");return n}function yW(n=t=>t,e){return TI()(n,e)}function vW(n,e=0){const t=TI(),i=t.getState().internal.subscribe,s=bI(n);return _0(()=>i(s,e,t),[e,i,t]),null}const bW=1,_W=8,SW=32,MW=2;var wW={version:"9.6.1"};function TW(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var BC={exports:{}},VC={exports:{}},FC;function EW(){return FC||(FC=1,(function(n){n.exports=function(e){function t(l,u,g,b){return new jp(l,u,g,b)}function i(){}function s(l){var u="https://react.dev/errors/"+l;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)u+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+l+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(l){var u=l,g=l;if(l.alternate)for(;u.return;)u=u.return;else{l=u;do u=l,(u.flags&4098)!==0&&(g=u.return),l=u.return;while(l)}return u.tag===3?g:null}function c(l){if(o(l)!==l)throw Error(s(188))}function h(l){var u=l.alternate;if(!u){if(u=o(l),u===null)throw Error(s(188));return u!==l?null:l}for(var g=l,b=u;;){var C=g.return;if(C===null)break;var D=C.alternate;if(D===null){if(b=C.return,b!==null){g=b;continue}break}if(C.child===D.child){for(D=C.child;D;){if(D===g)return c(C),l;if(D===b)return c(C),u;D=D.sibling}throw Error(s(188))}if(g.return!==b.return)g=C,b=D;else{for(var k=!1,ne=C.child;ne;){if(ne===g){k=!0,g=C,b=D;break}if(ne===b){k=!0,b=C,g=D;break}ne=ne.sibling}if(!k){for(ne=D.child;ne;){if(ne===g){k=!0,g=D,b=C;break}if(ne===b){k=!0,b=D,g=C;break}ne=ne.sibling}if(!k)throw Error(s(189))}}if(g.alternate!==b)throw Error(s(190))}if(g.tag!==3)throw Error(s(188));return g.stateNode.current===g?l:u}function f(l){var u=l.tag;if(u===5||u===26||u===27||u===6)return l;for(l=l.child;l!==null;){if(u=f(l),u!==null)return u;l=l.sibling}return null}function p(l){var u=l.tag;if(u===5||u===26||u===27||u===6)return l;for(l=l.child;l!==null;){if(l.tag!==4&&(u=p(l),u!==null))return u;l=l.sibling}return null}function x(l){return l===null||typeof l!="object"?null:(l=ro&&l[ro]||l["@@iterator"],typeof l=="function"?l:null)}function y(l){if(l==null)return null;if(typeof l=="function")return l.$$typeof===Yo?null:l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case Fl:return"Fragment";case Hl:return"Profiler";case kl:return"StrictMode";case Oh:return"Suspense";case ao:return"SuspenseList";case id:return"Activity"}if(typeof l=="object")switch(l.$$typeof){case Vl:return"Portal";case Na:return l.displayName||"Context";case nd:return(l._context.displayName||"Context")+".Consumer";case kc:var u=l.render;return l=l.displayName,l||(l=u.displayName||u.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case zh:return u=l.displayName||null,u!==null?u:y(l.type)||"Memo";case Es:u=l._payload,l=l._init;try{return y(l(u))}catch{}}return null}function v(l){return{current:l}}function S(l){0>ql||(l.current=Kh[ql],Kh[ql]=null,ql--)}function M(l,u){ql++,Kh[ql]=l.current,l.current=u}function R(l){return l>>>=0,l===0?32:31-($h(l)/zx|0)|0}function A(l){var u=l&42;if(u!==0)return u;switch(l&-l){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return l&261888;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;
vendor: 1,041 bytes, line 4114
4114case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function w(l,u,g){var b=l.pendingLanes;if(b===0)return 0;var C=0,D=l.suspendedLanes,k=l.pingedLanes;l=l.warmLanes;var ne=b&134217727;return ne!==0?(b=ne&~D,b!==0?C=A(b):(k&=ne,k!==0?C=A(k):g||(g=ne&~l,g!==0&&(C=A(g))))):(ne=b&~D,ne!==0?C=A(ne):k!==0?C=A(k):g||(g=b&~l,g!==0&&(C=A(g)))),C===0?0:u!==0&&u!==C&&(u&D)===0&&(D=C&-C,g=u&-u,D>=g||D===32&&(g&4194048)!==0)?u:C}function N(l,u){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&u)===0}function L(l,u){switch(l){case 1:case 2:case 4:case 8:case 64:return u+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function I(){var l=Yc;
vendor: 5,203 bytes, lines 4114-4121
4114return Yc<<=1,(Yc&62914560)===0&&(Yc=4194304),l}function B(l){for(var u=[],g=0;31>g;g++)u.push(l);return u}function O(l,u){l.pendingLanes|=u,u!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function F(l,u,g,b,C,D){var k=l.pendingLanes;l.pendingLanes=g,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=g,l.entangledLanes&=g,l.errorRecoveryDisabledLanes&=g,l.shellSuspendCounter=0;var ne=l.entanglements,we=l.expirationTimes,Ge=l.hiddenUpdates;for(g=k&~g;0<g;){var nt=31-Hs(g),qe=1<<nt;ne[nt]=0,we[nt]=-1;var ft=Ge[nt];if(ft!==null)for(Ge[nt]=null,nt=0;nt<ft.length;nt++){var $t=ft[nt];$t!==null&&($t.lane&=-536870913)}g&=~qe}b!==0&&P(l,b,0),D!==0&&C===0&&l.tag!==0&&(l.suspendedLanes|=D&~(k&~u))}function P(l,u,g){l.pendingLanes|=u,l.suspendedLanes&=~u;var b=31-Hs(u);l.entangledLanes|=u,l.entanglements[b]=l.entanglements[b]|1073741824|g&261930}function V(l,u){var g=l.entangledLanes|=u;for(l=l.entanglements;g;){var b=31-Hs(g),C=1<<b;C&u|l[b]&u&&(l[b]|=u),g&=~C}}function j(l,u){var g=u&-u;return g=(g&42)!==0?1:W(g),(g&(l.suspendedLanes|u))!==0?0:g}function W(l){switch(l){case 2:l=1;break;case 8:l=4;break;case 32:l=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:l=128;break;case 268435456:l=134217728;break;default:l=0}return l}function ee(l){return l&=-l,2<l?8<l?(l&134217727)!==0?32:268435456:8:2}function ie(l){if(typeof Rm=="function"&&Fx(l),Gs&&typeof Gs.setStrictMode=="function")try{Gs.setStrictMode(Zl,l)}catch{}}function ue(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}function Q(l){if(sf===void 0)try{throw Error()}catch(g){var u=g.stack.trim().match(/\n( *(at )?)/);sf=u&&u[1]||"",Nr=-1<g.stack.indexOf(` 4115 at`)?" (<anonymous>)":-1<g.stack.indexOf("@")?"@unknown:0:0":""}return` 4116`+sf+l+Nr}function Y(l,u){if(!l||hd)return"";hd=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var b={DetermineComponentFrameRoot:function(){try{if(u){var qe=function(){throw Error()};if(Object.defineProperty(qe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(qe,[])}catch($t){var ft=$t}Reflect.construct(l,[],qe)}else{try{qe.call()}catch($t){ft=$t}l.call(qe.prototype)}}else{try{throw Error()}catch($t){ft=$t}(qe=l())&&typeof qe.catch=="function"&&qe.catch(function(){})}}catch($t){if($t&&ft&&typeof $t.stack=="string")return[$t.stack,ft.stack]}return[null,null]}};b.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var C=Object.getOwnPropertyDescriptor(b.DetermineComponentFrameRoot,"name");C&&C.configurable&&Object.defineProperty(b.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var D=b.DetermineComponentFrameRoot(),k=D[0],ne=D[1];if(k&&ne){var we=k.split(` 4117`),Ge=ne.split(` 4118`);for(C=b=0;b<we.length&&!we[b].includes("DetermineComponentFrameRoot");)b++;for(;C<Ge.length&&!Ge[C].includes("DetermineComponentFrameRoot");)C++;if(b===we.length||C===Ge.length)for(b=we.length-1,C=Ge.length-1;1<=b&&0<=C&&we[b]!==Ge[C];)C--;for(;1<=b&&0<=C;b--,C--)if(we[b]!==Ge[C]){if(b!==1||C!==1)do if(b--,C--,0>C||we[b]!==Ge[C]){var nt=` 4119`+we[b].replace(" at new "," at ");return l.displayName&&nt.includes("<anonymous>")&&(nt=nt.replace("<anonymous>",l.displayName)),nt}while(1<=b&&0<=C);break}}}finally{hd=!1,Error.prepareStackTrace=g}return(g=l?l.displayName||l.name:"")?Q(g):""}function $(l,u){switch(l.tag){case 26:case 27:case 5:return Q(l.type);case 16:return Q("Lazy");case 13:return l.child!==u&&u!==null?Q("Suspense Fallback"):Q("Suspense");case 19:return Q("SuspenseList");case 0:case 15:return Y(l.type,!1);case 11:return Y(l.type.render,!1);case 1:return Y(l.type,!0);case 31:return Q("Activity");default:return""}}function le(l){try{var u="",g=null;do u+=$(l,g),g=l,l=l.return;while(l);return u}catch(b){return` 4120Error generating stack: `+b.message+` 4121`+b.stack}}function ge(l,u){if(typeof l=="object"&&l!==null){var g=Nm.get(l);return g!==void 0?g:(u={value:l,source:u,stack:le(u)},Nm.set(l,u),u)}return{value:l,source:u,stack:le(u)}}function Ce(l,u){co[Dr++]=fd,co[Dr++]=jn,jn=l,fd=u}function q(l,u,g){Ia[oa++]=os,Ia[oa++]=nr,Ia[oa++]=Pa,Pa=l;var b=os;l=nr;var C=32-Hs(b)-1;b&=~(1<<C),g+=1;var D=32-Hs(u)+C;if(30<D){var k=C-C%5;D=(b&(1<<k)-1).toString(32),b>>=k,C-=k,os=1<<32-Hs(u)+C|g<<C|b,nr=D+l}else os=1<<D|g<<C|b,nr=l}function ae(l){l.return!==null&&(Ce(l,1),q(l,1,0))}function Ae(l){for(;l===jn;)jn=co[--Dr],co[Dr]=null,fd=co[--Dr],co[Dr]=null;for(;l===Pa;)Pa=Ia[--oa],Ia[oa]=null,nr=Ia[--oa],Ia[oa]=null,os=Ia[--oa],Ia[oa]=null}function Ie(l,u){Ia[oa++]=os,Ia[oa++]=nr,Ia[oa++]=Pa,os=u.id,nr=u.overflow,Pa=l}function We(l,u){M(ls,u),M(uo,l),M(Qi,null),l=J0(u),S(Qi),M(Qi,l)}function pe(){S(Qi),S(uo),S(ls)}function Be(l){l.memoizedState!==null&&M(pd,l);var u=Qi.current,g=jc(u,l.type);u!==g&&(M(uo,l),M(Qi,g))}function Ve(l){uo.current===l&&(S(Qi),S(uo)),pd.current===l&&(S(pd),Ti?Wl._currentValue=jl:Wl._currentValue2=jl)}function Ze(l){var u=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Xe(ge(u,l)),af}
4121function Rt(l,u){if(!ai)throw Error(s(175));Tx(l.stateNode,l.type,l.memoizedProps,u,l)||Ze(l,!0)}function Ct(l){for(Gi=l.return;Gi;)switch(Gi.tag){case 5:case 31:case 13:Cs=!1;return;case 27:case 3:Cs=!0;return;default:Gi=Gi.return}}function Jt(l){if(!ai||l!==Gi)return!1;if(!xn)return Ct(l),xn=!0,!1;var u=l.tag;if(Hi?u!==3&&u!==27&&(u!==5||qc(l.type)&&!As(l.type,l.memoizedProps))&&ri&&Ze(l):u!==3&&(u!==5||qc(l.type)&&!As(l.type,l.memoizedProps))&&ri&&Ze(l),Ct(l),u===13){if(!ai)throw Error(s(316));if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(s(317));ri=ym(l)}else if(u===31){if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(s(317));ri=Ax(l)}else ri=Hi&&u===27?xx(l.type,ri):Gi?gx(l.stateNode):null;return!0}function Nt(){ai&&(ri=Gi=null,xn=!1)}function Ue(){var l=Lr;return l!==null&&(Xs===null?Xs=l:Xs.push.apply(Xs,l),Lr=null),l}function Xe(l){Lr===null?Lr=[l]:Lr.push(l)}function Oe(l,u,g){Ti?(M(Ua,u._currentValue),u._currentValue=g):(M(Ua,u._currentValue2),u._currentValue2=g)}function at(l){var u=Ua.current;Ti?l._currentValue=u:l._currentValue2=u,S(Ua)}function st(l,u,g){for(;l!==null;){var b=l.alternate;if((l.childLanes&u)!==u?(l.childLanes|=u,b!==null&&(b.childLanes|=u)):b!==null&&(b.childLanes&u)!==u&&(b.childLanes|=u),l===g)break;l=l.return}}function Pt(l,u,g,b){var C=l.child;for(C!==null&&(C.return=l);C!==null;){var D=C.dependencies;if(D!==null){var k=C.child;D=D.firstContext;e:for(;D!==null;){var ne=D;D=C;for(var we=0;we<u.length;we++)if(ne.context===u[we]){D.lanes|=g,ne=D.alternate,ne!==null&&(ne.lanes|=g),st(D.return,g,l),b||(k=null);break e}D=ne.next}}else if(C.tag===18){if(k=C.return,k===null)throw Error(s(341));k.lanes|=g,D=k.alternate,D!==null&&(D.lanes|=g),st(k,g,l),k=null}else k=C.child;if(k!==null)k.return=C;else for(k=C;k!==null;){if(k===l){k=null;break}if(C=k.sibling,C!==null){C.return=k.return,k=C;break}k=k.return}C=k}}function J(l,u,g,b){l=null;for(var C=u,D=!1;C!==null;){if(!D){if((C.flags&524288)!==0)D=!0;else if((C.flags&262144)!==0)break}if(C.tag===10){var k=C.alternate;if(k===null)throw Error(s(387));if(k=k.memoizedProps,k!==null){var ne=C.type;Ai(C.pendingProps.value,k.value)||(l!==null?l.push(ne):l=[ne])}}else if(C===pd.current){if(k=C.alternate,k===null)throw Error(s(387));k.memoizedState.memoizedState!==C.memoizedState.memoizedState&&(l!==null?l.push(Wl):l=[Wl])}C=C.return}l!==null&&Pt(u,l,g,b),u.flags|=262144}function Ot(l){for(l=l.firstContext;l!==null;){var u=l.context;if(!Ai(Ti?u._currentValue:u._currentValue2,l.memoizedValue))return!0;l=l.next}return!1}function gt(l){Kn=l,ir=null,l=l.dependencies,l!==null&&(l.firstContext=null)}function vt(l){return Cn(Kn,l)}function He(l,u){return Kn===null&>(l),Cn(l,u)}function Cn(l,u){var g=Ti?u._currentValue:u._currentValue2;if(u={context:u,memoizedValue:g,next:null},ir===null){if(l===null)throw Error(s(308));ir=u,l.dependencies={lanes:0,firstContext:u},l.flags|=524288}else ir=ir.next=u;return g}function X(){return{controller:new kx,data:new Map,refCount:0}}function z(l){l.refCount--,l.refCount===0&&Ji(Ib,function(){l.controller.abort()})}function de(){}function Re(l){l!==Fn&&l.next===null&&(Fn===null?md=Fn=l:Fn=Fn.next=l),Oa=!0,gs||(gs=!0,lt())}function Fe(l,u){if(!rf&&Oa){rf=!0;do for(var g=!1,b=md;b!==null;){if(l!==0){var C=b.pendingLanes;if(C===0)var D=0;else{var k=b.suspendedLanes,ne=b.pingedLanes;D=(1<<31-Hs(42|l)+1)-1,D&=C&~(k&~ne),D=D&201326741?D&201326741|1:D?D|2:0}D!==0&&(g=!0,rt(b,D))}else D=yn,D=w(b,b===ln?D:0,b.cancelPendingCommit!==null||b.timeoutHandle!==ks),(D&3)===0||N(b,D)||(g=!0,rt(b,D));b=b.next}
vendor: 4,879 bytes, line 4121
4121while(g);rf=!1}}function $e(){Je()}function Je(){Oa=gs=!1;var l=0;Jo!==0&&Gl()&&(l=Jo);for(var u=ms(),g=null,b=md;b!==null;){var C=b.next,D=Ee(b,u);D===0?(b.next=null,g===null?md=C:g.next=C,C===null&&(Fn=g)):(g=b,(l!==0||(D&3)!==0)&&(Oa=!0)),b=C}zi!==0&&zi!==5||Fe(l),Jo!==0&&(Jo=0)}function Ee(l,u){for(var g=l.suspendedLanes,b=l.pingedLanes,C=l.expirationTimes,D=l.pendingLanes&-62914561;0<D;){var k=31-Hs(D),ne=1<<k,we=C[k];we===-1?((ne&g)===0||(ne&b)!==0)&&(C[k]=L(ne,u)):we<=u&&(l.expiredLanes|=ne),D&=~ne}if(u=ln,g=yn,g=w(l,l===u?g:0,l.cancelPendingCommit!==null||l.timeoutHandle!==ks),b=l.callbackNode,g===0||l===u&&(Hn===2||Hn===9)||l.cancelPendingCommit!==null)return b!==null&&b!==null&&Jh(b),l.callbackNode=null,l.callbackPriority=0;if((g&3)===0||N(l,g)){if(u=g&-g,u===l.callbackPriority)return u;switch(b!==null&&Jh(b),ee(g)){case 2:case 8:g=Vx;break;case 32:g=dd;break;case 268435456:g=tf;break;default:g=dd}return b=Ne.bind(null,l),g=ud(g,b),l.callbackPriority=u,l.callbackNode=g,u}return b!==null&&b!==null&&Jh(b),l.callbackPriority=2,l.callbackNode=null,2}function Ne(l,u){if(zi!==0&&zi!==5)return l.callbackNode=null,l.callbackPriority=0,null;var g=l.callbackNode;if(Ar()&&l.callbackNode!==g)return null;var b=yn;return b=w(l,l===ln?b:0,l.cancelPendingCommit!==null||l.timeoutHandle!==ks),b===0?null:(tr(l,b,u),Ee(l,ms()),l.callbackNode!=null&&l.callbackNode===g?Ne.bind(null,l):null)}function rt(l,u){if(Ar())return null;tr(l,u,!0)}function lt(){nm?im(function(){(pn&6)!==0?ud(ef,$e):Je()}):ud(ef,$e)}function tt(){if(Jo===0){var l=ho;l===0&&(l=Qh,Qh<<=1,(Qh&261888)===0&&(Qh=256)),Jo=l}return Jo}function et(l,u){if(Zc===null){var g=Zc=[];Dm=0,ho=tt(),ji={status:"pending",value:void 0,then:function(b){g.push(b)}}}return Dm++,u.then(kt,kt),u}function kt(){if(--Dm===0&&Zc!==null){ji!==null&&(ji.status="fulfilled");var l=Zc;Zc=null,ho=0,ji=null;for(var u=0;u<l.length;u++)(0,l[u])()}}function jt(l,u){var g=[],b={status:"pending",value:null,reason:null,then:function(C){g.push(C)}};return l.then(function(){b.status="fulfilled",b.value=u;for(var C=0;C<g.length;C++)(0,g[C])(u)},function(C){for(b.status="rejected",b.reason=C,C=0;C<g.length;C++)(0,g[C])(void 0)}),b}function un(){var l=el.current;return l!==null?l:ln.pooledCache}function se(l,u){u===null?M(el,el.current):M(el,u.pool)}function Ke(){var l=un();return l===null?null:{parent:Ti?oi._currentValue:oi._currentValue2,pool:l}}function De(l,u){if(Ai(l,u))return!0;if(typeof l!="object"||l===null||typeof u!="object"||u===null)return!1;var g=Object.keys(l),b=Object.keys(u);if(g.length!==b.length)return!1;for(b=0;b<g.length;b++){var C=g[b];if(!Lb.call(u,C)||!Ai(l[C],u[C]))return!1}return!0}function ut(l){return l=l.status,l==="fulfilled"||l==="rejected"}function it(l,u,g){switch(g=l[g],g===void 0?l.push(u):g!==u&&(u.then(de,de),u=g),u.status){case"fulfilled":return u.value;case"rejected":throw l=u.reason,Bt(l),l;default:if(typeof u.status=="string")u.then(de,de);else{if(l=ln,l!==null&&100<l.shellSuspendCounter)throw Error(s(482));l=u,l.status="pending",l.then(function(b){if(u.status==="pending"){var C=u;C.status="fulfilled",C.value=b}},function(b){if(u.status==="pending"){var C=u;C.status="rejected",C.reason=b}})}switch(u.status){case"fulfilled":return u.value;case"rejected":throw l=u.reason,Bt(l),l}throw Rs=u,Wi}}function ke(l){try{var u=l._init;return u(l._payload)}catch(g){throw g!==null&&typeof g=="object"&&typeof g.then=="function"?(Rs=g,Wi):g}}function _t(){if(Rs===null)throw Error(s(459));var l=Rs;return Rs=null,l}function Bt(l){if(l===Wi||l===Ba)throw Error(s(483))}function qn(l){var u=Kl;return Kl+=1,tl===null&&(tl=[]),it(tl,l,u)}function Sn(l,u){u=u.props.ref,l.ref=u!==void 0?u:null}function bs(l,u){throw u.$$typeof===Bl?Error(s(525)):(l=Object.prototype.toString.call(u),Error(s(31,l==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":l)))}function Us(l){function u(_e,he){if(l){var Me=_e.deletions;Me===null?(_e.deletions=[he],_e.flags|=16):Me.push(he)}}function g(_e,he){if(!l)return null;for(;he!==null;)u(_e,he),he=he.sibling;return null}function b(_e){for(var he=new Map;_e!==null;)_e.key!==null?he.set(_e.key,_e):he.set(_e.index,_e),_e=_e.sibling;return he}function C(_e,he){return _e=aa(_e,he),_e.index=0,_e.sibling=null,_e}function D(_e,he,Me){return _e.index=Me,l?(Me=_e.alternate,Me!==null?(Me=Me.index,Me<he?(_e.flags|=67108866,he):Me):(_e.flags|=67108866,he)):(_e.flags|=1048576,he)}function k(_e){return l&&_e.alternate===null&&(_e.flags|=67108866),_e}function ne(_e,he,Me,Qe){return he===null||he.tag!==6?(he=Wp(Me,_e.mode,Qe),he.return=_e,he):(he=C(he,Me),he.return=_e,he)}function we(_e,he,Me,Qe){var Ut=Me.type;return Ut===Fl?nt(_e,he,Me.props.children,Qe,Me.key):he!==null&&(he.elementType===Ut||typeof Ut=="object"&&Ut!==null&&Ut.$$typeof===Es&&ke(Ut)===he.type)?(he=C(he,Me.props),Sn(he,Me),he.return=_e,he):(he=so(Me.type,Me.ke
vendor: 8,760 bytes, line 4121
4121y,Me.props,null,_e.mode,Qe),Sn(he,Me),he.return=_e,he)}function Ge(_e,he,Me,Qe){return he===null||he.tag!==4||he.stateNode.containerInfo!==Me.containerInfo||he.stateNode.implementation!==Me.implementation?(he=qp(Me,_e.mode,Qe),he.return=_e,he):(he=C(he,Me.children||[]),he.return=_e,he)}function nt(_e,he,Me,Qe,Ut){return he===null||he.tag!==7?(he=Ra(Me,_e.mode,Qe,Ut),he.return=_e,he):(he=C(he,Me),he.return=_e,he)}function qe(_e,he,Me){if(typeof he=="string"&&he!==""||typeof he=="number"||typeof he=="bigint")return he=Wp(""+he,_e.mode,Me),he.return=_e,he;if(typeof he=="object"&&he!==null){switch(he.$$typeof){case Cr:return Me=so(he.type,he.key,he.props,null,_e.mode,Me),Sn(Me,he),Me.return=_e,Me;case Vl:return he=qp(he,_e.mode,Me),he.return=_e,he;case Es:return he=ke(he),qe(_e,he,Me)}if(Zo(he)||x(he))return he=Ra(he,_e.mode,Me,null),he.return=_e,he;if(typeof he.then=="function")return qe(_e,qn(he),Me);if(he.$$typeof===Na)return qe(_e,He(_e,he),Me);bs(_e,he)}return null}function ft(_e,he,Me,Qe){var Ut=he!==null?he.key:null;if(typeof Me=="string"&&Me!==""||typeof Me=="number"||typeof Me=="bigint")return Ut!==null?null:ne(_e,he,""+Me,Qe);if(typeof Me=="object"&&Me!==null){switch(Me.$$typeof){case Cr:return Me.key===Ut?we(_e,he,Me,Qe):null;case Vl:return Me.key===Ut?Ge(_e,he,Me,Qe):null;case Es:return Me=ke(Me),ft(_e,he,Me,Qe)}if(Zo(Me)||x(Me))return Ut!==null?null:nt(_e,he,Me,Qe,null);if(typeof Me.then=="function")return ft(_e,he,qn(Me),Qe);if(Me.$$typeof===Na)return ft(_e,he,He(_e,Me),Qe);bs(_e,Me)}return null}function $t(_e,he,Me,Qe,Ut){if(typeof Qe=="string"&&Qe!==""||typeof Qe=="number"||typeof Qe=="bigint")return _e=_e.get(Me)||null,ne(he,_e,""+Qe,Ut);if(typeof Qe=="object"&&Qe!==null){switch(Qe.$$typeof){case Cr:return _e=_e.get(Qe.key===null?Me:Qe.key)||null,we(he,_e,Qe,Ut);case Vl:return _e=_e.get(Qe.key===null?Me:Qe.key)||null,Ge(he,_e,Qe,Ut);case Es:return Qe=ke(Qe),$t(_e,he,Me,Qe,Ut)}if(Zo(Qe)||x(Qe))return _e=_e.get(Me)||null,nt(he,_e,Qe,Ut,null);if(typeof Qe.then=="function")return $t(_e,he,Me,qn(Qe),Ut);if(Qe.$$typeof===Na)return $t(_e,he,Me,He(he,Qe),Ut);bs(he,Qe)}return null}function Ni(_e,he,Me,Qe){for(var Ut=null,gi=null,zt=he,En=he=0,es=null;zt!==null&&En<Me.length;En++){zt.index>En?(es=zt,zt=null):es=zt.sibling;var Ln=ft(_e,zt,Me[En],Qe);if(Ln===null){zt===null&&(zt=es);break}l&&zt&&Ln.alternate===null&&u(_e,zt),he=D(Ln,he,En),gi===null?Ut=Ln:gi.sibling=Ln,gi=Ln,zt=es}if(En===Me.length)return g(_e,zt),xn&&Ce(_e,En),Ut;if(zt===null){for(;En<Me.length;En++)zt=qe(_e,Me[En],Qe),zt!==null&&(he=D(zt,he,En),gi===null?Ut=zt:gi.sibling=zt,gi=zt);return xn&&Ce(_e,En),Ut}for(zt=b(zt);En<Me.length;En++)es=$t(zt,_e,En,Me[En],Qe),es!==null&&(l&&es.alternate!==null&&zt.delete(es.key===null?En:es.key),he=D(es,he,En),gi===null?Ut=es:gi.sibling=es,gi=es);return l&&zt.forEach(function(ka){return u(_e,ka)}),xn&&Ce(_e,En),Ut}function iu(_e,he,Me,Qe){if(Me==null)throw Error(s(151));for(var Ut=null,gi=null,zt=he,En=he=0,es=null,Ln=Me.next();zt!==null&&!Ln.done;En++,Ln=Me.next()){zt.index>En?(es=zt,zt=null):es=zt.sibling;var ka=ft(_e,zt,Ln.value,Qe);if(ka===null){zt===null&&(zt=es);break}l&&zt&&ka.alternate===null&&u(_e,zt),he=D(ka,he,En),gi===null?Ut=ka:gi.sibling=ka,gi=ka,zt=es}if(Ln.done)return g(_e,zt),xn&&Ce(_e,En),Ut;if(zt===null){for(;!Ln.done;En++,Ln=Me.next())Ln=qe(_e,Ln.value,Qe),Ln!==null&&(he=D(Ln,he,En),gi===null?Ut=Ln:gi.sibling=Ln,gi=Ln);return xn&&Ce(_e,En),Ut}for(zt=b(zt);!Ln.done;En++,Ln=Me.next())Ln=$t(zt,_e,En,Ln.value,Qe),Ln!==null&&(l&&Ln.alternate!==null&&zt.delete(Ln.key===null?En:Ln.key),he=D(Ln,he,En),gi===null?Ut=Ln:gi.sibling=Ln,gi=Ln);return l&&zt.forEach(function(Pb){return u(_e,Pb)}),xn&&Ce(_e,En),Ut}function cl(_e,he,Me,Qe){if(typeof Me=="object"&&Me!==null&&Me.type===Fl&&Me.key===null&&(Me=Me.props.children),typeof Me=="object"&&Me!==null){switch(Me.$$typeof){case Cr:e:{for(var Ut=Me.key;he!==null;){if(he.key===Ut){if(Ut=Me.type,Ut===Fl){if(he.tag===7){g(_e,he.sibling),Qe=C(he,Me.props.children),Qe.return=_e,_e=Qe;break e}}else if(he.elementType===Ut||typeof Ut=="object"&&Ut!==null&&Ut.$$typeof===Es&&ke(Ut)===he.type){g(_e,he.sibling),Qe=C(he,Me.props),Sn(Qe,Me),Qe.return=_e,_e=Qe;break e}g(_e,he);break}else u(_e,he);he=he.sibling}Me.type===Fl?(Qe=Ra(Me.props.children,_e.mode,Qe,Me.key),Qe.return=_e,_e=Qe):(Qe=so(Me.type,Me.key,Me.props,null,_e.mode,Qe),Sn(Qe,Me),Qe.return=_e,_e=Qe)}return k(_e);case Vl:e:{for(Ut=Me.key;he!==null;){if(he.key===Ut)if(he.tag===4&&he.stateNode.containerInfo===Me.containerInfo&&he.stateNode.implementation===Me.implementation){g(_e,he.sibling),Qe=C(he,Me.children||[]),Qe.return=_e,_e=Qe;break e}else{g(_e,he);break}else u(_e,he);he=he.sibling}Qe=qp(Me,_e.mode,Qe),Qe.return=_e,_e=Qe}return k(_e);case Es:return Me=ke(Me),cl(_e,he,Me,Qe)}if(Zo(Me))return Ni(_e,he,Me,Qe);if(x(Me)){if(Ut=x(Me),typeof Ut!="function")throw Error(s(150));return Me=Ut.call(Me),iu(_e,he,Me,Qe)}if(typeof Me.then=="function")return cl(_e,he,qn(Me),Qe);if(Me.$$typeof===Na)return cl(_e,he,He(_e,Me),Qe);bs(_e,Me)}return typeof Me=="string"&&Me!==""||typeof Me=="number"||typeof Me=="bigint"?(Me=""+Me,he!==null&&he.tag===6?(g(_e,he.sibling),Qe=C(he,Me),Qe.return=_e,_e=Qe):(g(_e,he),Qe=Wp(Me,_e.mode,Qe),Qe.return=_e,_e=Qe),k(_e)):g(_e,he)}return function(_e,he,Me,Qe){try{Kl=0;var Ut=cl(_e,he,Me,Qe);return tl=null,Ut}catch(zt){if(zt===Wi||zt===Ba)throw zt;var gi=t(29,zt,null,_e.mode);return gi.lanes=Qe,gi.return=_e,gi}}}function hr(){for(var l=Pr,u=$l=Pr=0;u<l;){var g=us[u];us[u++]=null;var b=us[u];us[u++]=null;var C=us[u];us[u++]=null;var D=us[u];if(us[u++]=null,b!==null&&C!==null){var k=b.pending;k===null?C.next=C:(C.next=k.next,k.next=C),b.pending=C}D!==0&&as(g,C,D)}}function Io(l,u,g,b){us[Pr++]=l,us[Pr++]=u,us[Pr++]=g,us[Pr++]=b,$l|=b,l.lanes|=b,l=l.alternate,l!==null&&(l.lanes|=b)}function Al(l,u,g,b){return Io(l,u,g,b),ii(l)}function Ka(l,u){return Io(l,null,null,u),ii(l)}function as(l,u,g){l.lanes|=g;var b=l.alternate;b!==null&&(b.lanes|=g);for(var C=!1,D=l.return;D!==null;)D.childLanes|=g,b=D.alternate,b!==null&&(b.childLanes|=g),D.tag===22&&(l=D.stateNode,l===null||l._visibility&1||(C=!0)),l=D,D=D.return;return l.tag===3?(D=l.stateNode,C&&u!==null&&(C=31-Hs(g),l=D.hiddenUpdates,b=l[C],b===null?l[C]=[u]:b.push(u),u.lane=g|536870912),D):null}function ii(l){if(50<Nn)throw Nn=0,_d=null,Error(s(185));for(var u=l.return;u!==null;)l=u,u=l.return;return l.tag===3?l.stateNode:null}function Fi(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function $a(l,u){l=l.updateQueue,u.updateQueue===l&&(u.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function _s(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function Qa(l,u,g){var b=l.updateQueue;if(b===null)return null;if(b=b.shared,(pn&2)!==0){var C=b.pending;return C===null?u.next=u:(u.next=C.next,C.next=u),b.pending=u,u=ii(l),as(l,null,g),u}return Io(l,b,u,g),ii(l)}function fr(l,u,g){if(u=u.updateQueue,u!==null&&(u=u.shared,(g&4194048)!==0)){var b=u.lanes;b&=l.pendingLanes,g|=b,u.lanes=g,V(l,g)}}function Cl(l,u){var g=l.updateQueue,b=l.alternate;if(b!==null&&(b=b.updateQueue,g===b)){var C=null,D=null;if(g=g.firstBaseUpdate,g!==null){do{var k={lane:g.lane,tag:g.tag,payload:g.payload,callback:null,next:null};D===null?C=D=k:D=D.next=k,g=g.next}while(g!==null);D===null?C=D=u:D=D.next=u}else C=D=u;g={baseState:b.baseState,firstBaseUpdate:C,lastBaseUpdate:D,shared:b.shared,callbacks:b.callbacks},l.updateQueue=g;return}l=g.lastBaseUpdate,l===null?g.firstBaseUpdate=u:l.next=u,g.lastBaseUpdate=u}function Sa(){if(lf){var l=ji;if(l!==null)throw l}}function Zr(l,u,g,b){lf=!1;var C=l.updateQueue;la=!1;var D=C.firstBaseUpdate,k=C.lastBaseUpdate,ne=C.shared.pending;if(ne!==null){C.shared.pending=null;var we=ne,Ge=we.next;we.next=null,k===null?D=Ge:k.next=Ge,k=we;var nt=l.alternate;nt!==null&&(nt=nt.updateQueue,ne=nt.lastBaseUpdate,ne!==k&&(ne===null?nt.firstBaseUpdate=Ge:ne.next=Ge,nt.lastBaseUpdate=we))}if(D!==null){var qe=C.baseState;k=0,nt=Ge=we=null,ne=D;do{var ft=ne.lane&-536870913,$t=ft!==ne.lane;if($t?(yn&ft)===ft:(b&ft)===ft){ft!==0&&ft===ho&&(lf=!0),nt!==null&&(nt=nt.next={lane:0,tag:ne.tag,payload:ne.payload,callback:null,next:null});e:{var Ni=l,iu=ne;ft=u;var cl=g;switch(iu.tag){case 1:if(Ni=iu.payload,typeof Ni=="function"){qe=Ni.call(cl,qe,ft);break e}qe=Ni;break e;case 3:Ni.flags=Ni.flags&-65537|128;case 0:if(Ni=iu.payload,ft=typeof Ni=="function"?Ni.call(cl,qe,ft):Ni,ft==null)break e;qe=Uh({},qe,ft);break e;case 2:la=!0}}ft=ne.callback,ft!==null&&(l.flags|=64,$t&&(l.flags|=8192),$t=C.callbacks,$t===null?C.callbacks=[ft]:$t.push(ft))}
vendor: 4,887 bytes, line 4121
4121else $t={lane:ft,tag:ne.tag,payload:ne.payload,callback:ne.callback,next:null},nt===null?(Ge=nt=$t,we=qe):nt=nt.next=$t,k|=ft;if(ne=ne.next,ne===null){if(ne=C.shared.pending,ne===null)break;$t=ne,ne=$t.next,$t.next=null,C.lastBaseUpdate=$t,C.shared.pending=null}}while(!0);nt===null&&(we=qe),C.baseState=we,C.firstBaseUpdate=Ge,C.lastBaseUpdate=nt,D===null&&(C.shared.lanes=0),po|=k,l.lanes=k,l.memoizedState=qe}}function Kr(l,u){if(typeof l!="function")throw Error(s(191,l));l.call(u)}function $r(l,u){var g=l.callbacks;if(g!==null)for(l.callbacks=null,l=0;l<g.length;l++)Kr(g[l],u)}function Po(l,u){l=Or,M(nl,l),M(Ql,u),Or=l|u.baseLanes}function pr(){M(nl,Or),M(Ql,Ql.current)}function vi(){Or=nl.current,S(Ql),S(nl)}function Ja(l){var u=l.alternate;M(Si,Si.current&1),M(js,l),Ws===null&&(u===null||Ql.current!==null||u.memoizedState!==null)&&(Ws=l)}function H(l){M(Si,Si.current),M(js,l),Ws===null&&(Ws=l)}function oe(l){l.tag===22?(M(Si,Si.current),M(js,l),Ws===null&&(Ws=l)):xe()}function xe(){M(Si,Si.current),M(js,js.current)}function fe(l){S(js),Ws===l&&(Ws=null),S(Si)}function me(l){for(var u=l;u!==null;){if(u.tag===13){var g=u.memoizedState;if(g!==null&&(g=g.dehydrated,g===null||$o(g)||Gh(g)))return u}else if(u.tag===19&&(u.memoizedProps.revealOrder==="forwards"||u.memoizedProps.revealOrder==="backwards"||u.memoizedProps.revealOrder==="unstable_legacy-backwards"||u.memoizedProps.revealOrder==="together")){if((u.flags&128)!==0)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===l)break;for(;u.sibling===null;){if(u.return===null||u.return===l)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}function Ye(){throw Error(s(321))}function pt(l,u){if(u===null)return!1;for(var g=0;g<u.length&&g<l.length;g++)if(!Ai(l[g],u[g]))return!1;return!0}function ot(l,u,g,b,C,D){return fo=D,tn=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,Lt.H=l===null||l.memoizedState===null?fi:Ur,Mn=!1,D=g(b,C),Mn=!1,an&&(D=xt(u,g,b,C)),yt(l),D}function yt(l){Lt.H=ca;var u=At!==null&&At.next!==null;if(fo=0,Wt=At=tn=null,on=!1,Va=0,sr=null,u)throw Error(s(300));l===null||ei||(l=l.dependencies,l!==null&&Ot(l)&&(ei=!0))}function xt(l,u,g,b){tn=l;var C=0;do{if(an&&(sr=null),Va=0,an=!1,25<=C)throw Error(s(301));if(C+=1,Wt=At=null,l.updateQueue!=null){var D=l.updateQueue;D.lastEffect=null,D.events=null,D.stores=null,D.memoCache!=null&&(D.memoCache.index=0)}Lt.H=il,D=u(g,b)}while(an);return D}function Dt(){var l=Lt.H,u=l.useState()[0];return u=typeof u.then=="function"?Rn(u):u,l=l.useState()[0],(At!==null?At.memoizedState:null)!==l&&(tn.flags|=1024),u}function Zt(){var l=xs!==0;return xs=0,l}function wt(l,u,g){u.updateQueue=l.updateQueue,u.flags&=-2053,l.lanes&=~g}function Tn(l){if(on){for(l=l.memoizedState;l!==null;){var u=l.queue;u!==null&&(u.pending=null),l=l.next}on=!1}fo=0,Wt=At=tn=null,an=!1,Va=xs=0,sr=null}function fn(){var l={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Wt===null?tn.memoizedState=Wt=l:Wt=Wt.next=l,Wt}function Ht(){if(At===null){var l=tn.alternate;l=l!==null?l.memoizedState:null}else l=At.next;var u=Wt===null?tn.memoizedState:Wt.next;if(u!==null)Wt=u,At=l;else{if(l===null)throw tn.alternate===null?Error(s(467)):Error(s(310));At=l,l={memoizedState:At.memoizedState,baseState:At.baseState,baseQueue:At.baseQueue,queue:At.queue,next:null},Wt===null?tn.memoizedState=Wt=l:Wt=Wt.next=l}return Wt}function Dn(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Rn(l){var u=Va;return Va+=1,sr===null&&(sr=[]),l=it(sr,l,u),u=tn,(Wt===null?u.memoizedState:Wt.next)===null&&(u=u.alternate,Lt.H=u===null||u.memoizedState===null?fi:Ur),l}function dt(l){if(l!==null&&typeof l=="object"){if(typeof l.then=="function")return Rn(l);if(l.$$typeof===Na)return vt(l)}throw Error(s(438,String(l)))}function Yi(l){var u=null,g=tn.updateQueue;if(g!==null&&(u=g.memoCache),u==null){var b=tn.alternate;b!==null&&(b=b.updateQueue,b!==null&&(b=b.memoCache,b!=null&&(u={data:b.data.map(function(C){return C.slice()}),index:0})))}if(u==null&&(u={data:[],index:0}),g===null&&(g=Dn(),tn.updateQueue=g),g.memoCache=u,g=u.data[u.index],g===void 0)for(g=u.data[u.index]=Array(l),b=0;b<l;b++)g[b]=Zp;return u.index++,g}function qt(l,u){return typeof u=="function"?u(l):u}function bi(l){var u=Ht();return Ss(u,At,l)}function Ss(l,u,g){var b=l.queue;if(b===null)throw Error(s(311));b.lastRenderedReducer=g;var C=l.baseQueue,D=b.pending;if(D!==null){if(C!==null){var k=C.next;C.next=D.next,D.next=k}u.baseQueue=C=D,b.pending=null}if(D=l.baseState,C===null)l.memoizedState=D;else{u=C.next;var ne=k=null,we=null,Ge=u,nt=!1;do{var qe=Ge.lane&-536870913;if(qe!==Ge.lane?(yn&qe)===qe:(fo&qe)===qe){var ft=Ge.revertLane;if(ft===0)we!==null&&(we=we.next={lane:0,revertLane:0,gesture:null,action:Ge.action,hasEagerState:Ge.hasEagerState,eagerState:Ge.eagerState,next:null}),qe===ho&&(nt=!0);
vendor: 4,671 bytes, line 4121
4121else if((fo&ft)===ft){Ge=Ge.next,ft===ho&&(nt=!0);continue}else qe={lane:0,revertLane:Ge.revertLane,gesture:null,action:Ge.action,hasEagerState:Ge.hasEagerState,eagerState:Ge.eagerState,next:null},we===null?(ne=we=qe,k=D):we=we.next=qe,tn.lanes|=ft,po|=ft;qe=Ge.action,Mn&&g(D,qe),D=Ge.hasEagerState?Ge.eagerState:g(D,qe)}else ft={lane:qe,revertLane:Ge.revertLane,gesture:Ge.gesture,action:Ge.action,hasEagerState:Ge.hasEagerState,eagerState:Ge.eagerState,next:null},we===null?(ne=we=ft,k=D):we=we.next=ft,tn.lanes|=qe,po|=qe;Ge=Ge.next}while(Ge!==null&&Ge!==u);if(we===null?k=D:we.next=ne,!Ai(D,l.memoizedState)&&(ei=!0,nt&&(g=ji,g!==null)))throw g;l.memoizedState=D,l.baseState=k,l.baseQueue=we,b.lastRenderedState=D}return C===null&&(b.lanes=0),[l.memoizedState,b.dispatch]}function ta(l){var u=Ht(),g=u.queue;if(g===null)throw Error(s(311));g.lastRenderedReducer=l;var b=g.dispatch,C=g.pending,D=u.memoizedState;if(C!==null){g.pending=null;var k=C=C.next;do D=l(D,k.action),k=k.next;while(k!==C);Ai(D,u.memoizedState)||(ei=!0),u.memoizedState=D,u.baseQueue===null&&(u.baseState=D),g.lastRenderedState=D}return[D,b]}function Os(l,u,g){var b=tn,C=Ht(),D=xn;if(D){if(g===void 0)throw Error(s(407));g=g()}else g=u();var k=!Ai((At||C).memoizedState,g);if(k&&(C.memoizedState=g,ei=!0),C=C.queue,Mc(Ma.bind(null,b,C,l),[l]),C.getSnapshot!==u||k||Wt!==null&&Wt.memoizedState.tag&1){if(b.flags|=2048,na(9,{destroy:void 0},Jn.bind(null,b,C,g,u),null),ln===null)throw Error(s(349));D||(fo&127)!==0||On(b,u,g)}return g}function On(l,u,g){l.flags|=16384,l={getSnapshot:u,value:g},u=tn.updateQueue,u===null?(u=Dn(),tn.updateQueue=u,u.stores=[l]):(g=u.stores,g===null?u.stores=[l]:g.push(l))}function Jn(l,u,g,b){u.value=g,u.getSnapshot=b,In(u)&&er(l)}function Ma(l,u,g){return g(function(){In(u)&&er(l)})}function In(l){var u=l.getSnapshot;l=l.value;try{var g=u();return!Ai(l,g)}catch{return!0}}function er(l){var u=Ka(l,2);u!==null&&di(u,l,2)}function mr(l){var u=fn();if(typeof l=="function"){var g=l;if(l=g(),Mn){ie(!0);try{g()}finally{ie(!1)}}}return u.memoizedState=u.baseState=l,u.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qt,lastRenderedState:l},u}function Uo(l,u,g,b){return l.baseState=g,Ss(l,At,typeof b=="function"?b:qt)}function Qr(l,u,g,b,C){if(mh(l))throw Error(s(485));if(l=u.action,l!==null){var D={payload:C,action:l,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(k){D.listeners.push(k)}};Lt.T!==null?g(!0):D.isTransition=!1,b(D),g=u.pending,g===null?(D.next=u.pending=D,lh(u,D)):(D.next=g.next,u.pending=g.next=D)}}function lh(l,u){var g=u.action,b=u.payload,C=l.state;if(u.isTransition){var D=Lt.T,k={};Lt.T=k;try{var ne=g(C,b),we=Lt.S;we!==null&&we(k,ne),ch(l,u,ne)}catch(Ge){Oo(l,u,Ge)}finally{D!==null&&k.types!==null&&(D.types=k.types),Lt.T=D}}else try{D=g(C,b),ch(l,u,D)}catch(Ge){Oo(l,u,Ge)}}function ch(l,u,g){g!==null&&typeof g=="object"&&typeof g.then=="function"?g.then(function(b){Rl(l,u,b)},function(b){return Oo(l,u,b)}):Rl(l,u,g)}function Rl(l,u,g){u.status="fulfilled",u.value=g,_p(u),l.state=g,u=l.pending,u!==null&&(g=u.next,g===u?l.pending=null:(g=g.next,u.next=g,lh(l,g)))}function Oo(l,u,g){var b=l.pending;if(l.pending=null,b!==null){b=b.next;do u.status="rejected",u.reason=g,_p(u),u=u.next;while(u!==b)}l.action=null}function _p(l){l=l.listeners;for(var u=0;u<l.length;u++)(0,l[u])()}function uh(l,u){return u}function Sp(l,u){if(xn){var g=ln.formState;if(g!==null){e:{var b=tn;if(xn){if(ri){var C=mx(ri,Cs);if(C){ri=gx(C),b=pm(C);break e}}Ze(b)}b=!1}b&&(u=g[0])}}g=fn(),g.memoizedState=g.baseState=u,b={pending:null,lanes:0,dispatch:null,lastRenderedReducer:uh,lastRenderedState:u},g.queue=b,g=A0.bind(null,tn,b),b.dispatch=g,b=mr(!1);var D=ph.bind(null,tn,!1,b.queue);return b=fn(),C={state:u,dispatch:null,action:l,pending:null},b.queue=C,g=Qr.bind(null,tn,C,D,g),C.dispatch=g,b.memoizedState=l,[u,g,!1]}function _c(l){var u=Ht();return gr(u,At,l)}function gr(l,u,g){if(u=Ss(l,u,uh)[0],l=bi(qt)[0],typeof u=="object"&&u!==null&&typeof u.then=="function")try{var b=Rn(u)}catch(k){throw k===Wi?Ba:k}else b=u;u=Ht();var C=u.queue,D=C.dispatch;return g!==u.memoizedState&&(tn.flags|=2048,na(9,{destroy:void 0},Mp.bind(null,C,g),null)),[b,D,l]}function Mp(l,u){l.action=u}function Sc(l){var u=Ht(),g=At;if(g!==null)return gr(u,g,l);Ht(),u=u.memoizedState,g=Ht();var b=g.queue.dispatch;return g.memoizedState=l,[u,b,!1]}function na(l,u,g,b){return l={tag:l,create:g,deps:b,inst:u,next:null},u=tn.updateQueue,u===null&&(u=Dn(),tn.updateQueue=u),g=u.lastEffect,g===null?u.lastEffect=l.next=l:(b=g.next,g.next=l,l.next=b,u.lastEffect=l),l}function dh(){return Ht().memoizedState}
vendor: 16,863 bytes, line 4121
4121function Nl(l,u,g,b){var C=fn();tn.flags|=l,C.memoizedState=na(1|u,{destroy:void 0},g,b===void 0?null:b)}function Bu(l,u,g,b){var C=Ht();b=b===void 0?null:b;var D=C.memoizedState.inst;At!==null&&b!==null&&pt(b,At.memoizedState.deps)?C.memoizedState=na(u,D,g,b):(tn.flags|=l,C.memoizedState=na(1|u,D,g,b))}function Vu(l,u){Nl(8390656,8,l,u)}function Mc(l,u){Bu(2048,8,l,u)}function S0(l){tn.flags|=4;var u=tn.updateQueue;if(u===null)u=Dn(),tn.updateQueue=u,u.events=[l];else{var g=u.events;g===null?u.events=[l]:g.push(l)}}function Ms(l){var u=Ht().memoizedState;return S0({ref:u,nextImpl:l}),function(){if((pn&2)!==0)throw Error(s(440));return u.impl.apply(void 0,arguments)}}function zo(l,u){return Bu(4,2,l,u)}function Fu(l,u){return Bu(4,4,l,u)}function wc(l,u){if(typeof u=="function"){l=l();var g=u(l);return function(){typeof g=="function"?g():u(null)}}if(u!=null)return l=l(),u.current=l,function(){u.current=null}}function M0(l,u,g){g=g!=null?g.concat([l]):null,Bu(4,4,wc.bind(null,u,l),g)}function ku(){}function hh(l,u){var g=Ht();u=u===void 0?null:u;var b=g.memoizedState;return u!==null&&pt(u,b[1])?b[0]:(g.memoizedState=[l,u],l)}function Tc(l,u){var g=Ht();u=u===void 0?null:u;var b=g.memoizedState;if(u!==null&&pt(u,b[1]))return b[0];if(b=l(),Mn){ie(!0);try{l()}finally{ie(!1)}}return g.memoizedState=[b,u],b}function Ec(l,u,g){return g===void 0||(fo&1073741824)!==0&&(yn&261930)===0?l.memoizedState=u:(l.memoizedState=g,l=to(),tn.lanes|=l,po|=l,g)}function wp(l,u,g,b){return Ai(g,u)?g:Ql.current!==null?(l=Ec(l,g,b),Ai(l,u)||(ei=!0),l):(fo&42)===0||(fo&1073741824)!==0&&(yn&261930)===0?(ei=!0,l.memoizedState=g):(l=to(),tn.lanes|=l,po|=l,u)}function w0(l,u,g,b,C){var D=Da();gn(D!==0&&8>D?D:8);var k=Lt.T,ne={};Lt.T=ne,ph(l,!1,u,g);try{var we=C(),Ge=Lt.S;if(Ge!==null&&Ge(ne,we),we!==null&&typeof we=="object"&&typeof we.then=="function"){var nt=jt(we,b);Hu(l,u,nt,si(l))}else Hu(l,u,b,si(l))}catch(qe){Hu(l,u,{then:function(){},status:"rejected",reason:qe},si())}finally{gn(D),k!==null&&ne.types!==null&&(k.types=ne.types),Lt.T=k}}function T0(l){var u=l.memoizedState;if(u!==null)return u;u={memoizedState:jl,baseState:jl,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qt,lastRenderedState:jl},next:null};var g={};return u.next={memoizedState:g,baseState:g,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qt,lastRenderedState:g},next:null},l.memoizedState=u,l=l.alternate,l!==null&&(l.memoizedState=u),u}function Tp(){return vt(Wl)}function fh(){return Ht().memoizedState}function E0(){return Ht().memoizedState}function Sb(l){for(var u=l.return;u!==null;){switch(u.tag){case 24:case 3:var g=si();l=_s(g);var b=Qa(u,l,g);b!==null&&(di(b,u,g),fr(b,u,g)),u={cache:X()},l.payload=u;return}u=u.return}}function Mb(l,u,g){var b=si();g={lane:b,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},mh(l)?C0(u,g):(g=Al(l,u,g,b),g!==null&&(di(g,l,b),R0(g,u,b)))}function A0(l,u,g){var b=si();Hu(l,u,g,b)}function Hu(l,u,g,b){var C={lane:b,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null};if(mh(l))C0(u,C);else{var D=l.alternate;if(l.lanes===0&&(D===null||D.lanes===0)&&(D=u.lastRenderedReducer,D!==null))try{var k=u.lastRenderedState,ne=D(k,g);if(C.hasEagerState=!0,C.eagerState=ne,Ai(ne,k))return Io(l,u,C,0),ln===null&&hr(),!1}catch{}if(g=Al(l,u,C,b),g!==null)return di(g,l,b),R0(g,u,b),!0}return!1}function ph(l,u,g,b){if(b={lane:2,revertLane:tt(),gesture:null,action:b,hasEagerState:!1,eagerState:null,next:null},mh(l)){if(u)throw Error(s(479))}else u=Al(l,g,b,2),u!==null&&di(u,l,2)}function mh(l){var u=l.alternate;return l===tn||u!==null&&u===tn}function C0(l,u){an=on=!0;var g=l.pending;g===null?u.next=u:(u.next=g.next,g.next=u),l.pending=u}function R0(l,u,g){if((g&4194048)!==0){var b=u.lanes;b&=l.pendingLanes,g|=b,u.lanes=g,V(l,g)}}function Ep(l,u,g,b){u=l.memoizedState,g=g(b,u),g=g==null?u:Uh({},u,g),l.memoizedState=g,l.lanes===0&&(l.updateQueue.baseState=g)}function gh(l,u,g,b,C,D,k){return l=l.stateNode,typeof l.shouldComponentUpdate=="function"?l.shouldComponentUpdate(b,D,k):u.prototype&&u.prototype.isPureReactComponent?!De(g,b)||!De(C,D):!0}function N0(l,u,g,b){l=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(g,b),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(g,b),u.state!==l&&gd.enqueueReplaceState(u,u.state,null)}function Dl(l,u){var g=u;if("ref"in u){g={};for(var b in u)b!=="ref"&&(g[b]=u[b])}if(l=l.defaultProps){g===u&&(g=Uh({},g));for(var C in l)g[C]===void 0&&(g[C]=l[C])}return g}function xh(l,u){try{var g=l.onUncaughtError;g(u.value,{componentStack:u.stack})}catch(b){setTimeout(function(){throw b})}}function Ap(l,u,g){try{var b=l.onCaughtError;b(g.value,{componentStack:g.stack,errorBoundary:u.tag===1?u.stateNode:null})}catch(C){setTimeout(function(){throw C})}}function Cp(l,u,g){return g=_s(g),g.tag=3,g.payload={element:null},g.callback=function(){xh(l,u)},g}function D0(l){return l=_s(l),l.tag=3,l}function L0(l,u,g,b){var C=g.type.getDerivedStateFromError;if(typeof C=="function"){var D=b.value;l.payload=function(){return C(D)},l.callback=function(){Ap(u,g,b)}}var k=g.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(l.callback=function(){Ap(u,g,b),typeof C!="function"&&(mo===null?mo=new Set([this]):mo.add(this));var ne=b.stack;this.componentDidCatch(b.value,{componentStack:ne!==null?ne:""})})}function wb(l,u,g,b,C){if(g.flags|=32768,b!==null&&typeof b=="object"&&typeof b.then=="function"){if(u=g.alternate,u!==null&&J(u,g,C,!0),g=js.current,g!==null){switch(g.tag){case 31:case 13:return Ws===null?zc():g.alternate===null&&mi===0&&(mi=3),g.flags&=-257,g.flags|=65536,g.lanes=C,b===Ir?g.flags|=16384:(u=g.updateQueue,u===null?g.updateQueue=new Set([b]):u.add(b),Fc(l,b,C)),!1;case 22:return g.flags|=65536,b===Ir?g.flags|=16384:(u=g.updateQueue,u===null?(u={transitions:null,markerInstances:null,retryQueue:new Set([b])},g.updateQueue=u):(g=u.retryQueue,g===null?u.retryQueue=new Set([b]):g.add(b)),Fc(l,b,C)),!1}throw Error(s(435,g.tag))}return Fc(l,b,C),zc(),!1}if(xn)return u=js.current,u!==null?((u.flags&65536)===0&&(u.flags|=256),u.flags|=65536,u.lanes=C,b!==af&&(l=Error(s(422),{cause:b}),Xe(ge(l,g)))):(b!==af&&(u=Error(s(423),{cause:b}),Xe(ge(u,g))),l=l.current.alternate,l.flags|=65536,C&=-C,l.lanes|=C,b=ge(b,g),C=Cp(l.stateNode,b,C),Cl(l,C),mi!==4&&(mi=2)),!1;var D=Error(s(520),{cause:b});if(D=ge(D,g),yd===null?yd=[D]:yd.push(D),mi!==4&&(mi=2),u===null)return!0;b=ge(b,g),g=u;do{switch(g.tag){case 3:return g.flags|=65536,l=C&-C,g.lanes|=l,l=Cp(g.stateNode,b,l),Cl(g,l),!1;case 1:if(u=g.type,D=g.stateNode,(g.flags&128)===0&&(typeof u.getDerivedStateFromError=="function"||D!==null&&typeof D.componentDidCatch=="function"&&(mo===null||!mo.has(D))))return g.flags|=65536,C&=-C,g.lanes|=C,C=D0(C),L0(C,l,g,b),Cl(g,C),!1}g=g.return}while(g!==null);return!1}function rs(l,u,g,b){u.child=l===null?Lm(u,null,g,b):cs(u,l.child,g,b)}function I0(l,u,g,b,C){g=g.render;var D=u.ref;if("ref"in b){var k={};for(var ne in b)ne!=="ref"&&(k[ne]=b[ne])}else k=b;return gt(u),b=ot(l,u,g,k,D,C),ne=Zt(),l!==null&&!ei?(wt(l,u,C),xr(l,u,C)):(xn&&ne&&ae(u),u.flags|=1,rs(l,u,b,C),u.child)}function P0(l,u,g,b,C){if(l===null){var D=g.type;return typeof D=="function"&&!Ol(D)&&D.defaultProps===void 0&&g.compare===null?(u.tag=15,u.type=D,U0(l,u,D,b,C)):(l=so(g.type,null,b,u,u.mode,C),l.ref=u.ref,l.return=u,u.child=l)}if(D=l.child,!ju(l,C)){var k=D.memoizedProps;if(g=g.compare,g=g!==null?g:De,g(k,b)&&l.ref===u.ref)return xr(l,u,C)}return u.flags|=1,l=aa(D,b),l.ref=u.ref,l.return=u,u.child=l}function U0(l,u,g,b,C){if(l!==null){var D=l.memoizedProps;if(De(D,b)&&l.ref===u.ref)if(ei=!1,u.pendingProps=b=D,ju(l,C))(l.flags&131072)!==0&&(ei=!0);else return u.lanes=l.lanes,xr(l,u,C)}return vh(l,u,g,b,C)}function O0(l,u,g,b){var C=b.children,D=l!==null?l.memoizedState:null;if(l===null&&u.stateNode===null&&(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),b.mode==="hidden"){if((u.flags&128)!==0){if(D=D!==null?D.baseLanes|g:g,l!==null){for(b=u.child=l.child,C=0;b!==null;)C=C|b.lanes|b.childLanes,b=b.sibling;b=C&~D}else b=0,u.child=null;return Ac(l,u,D,g,b)}if((g&536870912)!==0)u.memoizedState={baseLanes:0,cachePool:null},l!==null&&se(u,D!==null?D.cachePool:null),D!==null?Po(u,D):pr(),oe(u);else return b=u.lanes=536870912,Ac(l,u,D!==null?D.baseLanes|g:g,g,b)}else D!==null?(se(u,D.cachePool),Po(u,D),xe(),u.memoizedState=null):(l!==null&&se(u,null),pr(),xe());return rs(l,u,C,g),u.child}function Ll(l,u){return l!==null&&l.tag===22||u.stateNode!==null||(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.sibling}function Ac(l,u,g,b,C){var D=un();return D=D===null?null:{parent:Ti?oi._currentValue:oi._currentValue2,pool:D},u.memoizedState={baseLanes:g,cachePool:D},l!==null&&se(u,null),pr(),oe(u),l!==null&&J(l,u,b,!0),u.childLanes=C,null}function yh(l,u){return u=Bo({mode:u.mode,children:u.children},l.mode),u.ref=l.ref,l.child=u,u.return=l,u}function Rp(l,u,g){return cs(u,l.child,null,g),l=yh(u,u.pendingProps),l.flags|=2,fe(u),u.memoizedState=null,l}function z0(l,u,g){var b=u.pendingProps,C=(u.flags&128)!==0;if(u.flags&=-129,l===null){if(xn){if(b.mode==="hidden")return l=yh(u,b),u.lanes=536870912,Ll(null,l);if(H(u),(l=ri)?(l=gm(l,Cs),l!==null&&(u.memoizedState={dehydrated:l,treeContext:Pa!==null?{id:os,overflow:nr}:null,retryLane:536870912,hydrationErrors:null},g=Xp(l),g.return=u,u.child=g,Gi=u,ri=null)):l=null,l===null)throw Ze(u);return u.lanes=536870912,null}return yh(u,b)}var D=l.memoizedState;if(D!==null){var k=D.dehydrated;if(H(u),C)if(u.flags&256)u.flags&=-257,u=Rp(l,u,g);else if(u.memoizedState!==null)u.child=l.child,u.flags|=128,u=null;else throw Error(s(558));else if(ei||J(l,u,g,!1),C=(g&l.childLanes)!==0,ei||C){if(b=ln,b!==null&&(k=j(b,g),k!==0&&k!==D.retryLane))throw D.retryLane=k,Ka(l,k),di(b,l,k),Ns;zc(),u=Rp(l,u,g)}else l=D.treeContext,ai&&(ri=bx(k),Gi=u,xn=!0,Lr=null,Cs=!1,l!==null&&Ie(u,l)),u=yh(u,b),u.flags|=4096;return u}return l=aa(l.child,{mode:b.mode,children:b.children}),l.ref=u.ref,u.child=l,l.return=u,l}function Gu(l,u){var g=u.ref;if(g===null)l!==null&&l.ref!==null&&(u.flags|=4194816);else{if(typeof g!="function"&&typeof g!="object")throw Error(s(284));(l===null||l.ref!==g)&&(u.flags|=4194816)}}function vh(l,u,g,b,C){return gt(u),g=ot(l,u,g,b,void 0,C),b=Zt(),l!==null&&!ei?(wt(l,u,C),xr(l,u,C)):(xn&&b&&ae(u),u.flags|=1,rs(l,u,g,C),u.child)}function Np(l,u,g,b,C,D){return gt(u),u.updateQueue=null,g=xt(u,b,g,C),yt(l),b=Zt(),l!==null&&!ei?(wt(l,u,D),xr(l,u,D)):(xn&&b&&ae(u),u.flags|=1,rs(l,u,g,D),u.child)}function Il(l,u,g,b,C){if(gt(u),u.stateNode===null){var D=Rr,k=g.contextType;typeof k=="object"&&k!==null&&(D=vt(k)),D=new g(b,D),u.memoizedState=D.state!==null&&D.state!==void 0?D.state:null,D.updater=gd,u.stateNode=D,D._reactInternals=u,D=u.stateNode,D.props=b,D.state=u.memoizedState,D.refs={},Fi(u),k=g.contextType,D.context=typeof k=="object"&&k!==null?vt(k):Rr,D.state=u.memoizedState,k=g.getDerivedStateFromProps,typeof k=="function"&&(Ep(u,g,k,b),D.state=u.memoizedState),typeof g.getDerivedStateFromProps=="function"||typeof D.getSnapshotBeforeUpdate=="function"||typeof D.UNSAFE_componentWillMount!="function"&&typeof D.componentWillMount!="function"||(k=D.state,typeof D.componentWillMount=="function"&&D.componentWillMount(),typeof D.UNSAFE_componentWillMount=="function"&&D.UNSAFE_componentWillMount(),k!==D.state&&gd.enqueueReplaceState(D,D.state,null),Zr(u,b,D,C),Sa(),D.state=u.memoizedState),typeof D.componentDidMount=="function"&&(u.flags|=4194308),b=!0}else if(l===null){D=u.stateNode;var ne=u.memoizedProps,we=Dl(g,ne);D.props=we;var Ge=D.context,nt=g.contextType;k=Rr,typeof nt=="object"&&nt!==null&&(k=vt(nt));var qe=g.getDerivedStateFromProps;nt=typeof qe=="function"||typeof D.getSnapshotBeforeUpdate=="function",ne=u.pendingProps!==ne,nt||typeof D.UNSAFE_componentWillReceiveProps!="function"&&typeof D.componentWillReceiveProps!="function"||(ne||Ge!==k)&&N0(u,D,b,k),la=!1;var ft=u.memoizedState;D.state=ft,Zr(u,b,D,C),Sa(),Ge=u.memoizedState,ne||ft!==Ge||la?(typeof qe=="function"&&(Ep(u,g,qe,b),Ge=u.memoizedState),(we=la||gh(u,g,we,b,ft,Ge,k))?(nt||typeof D.UNSAFE_componentWillMount!="function"&&typeof D.componentWillMount!="function"||(typeof D.componentWillMount=="function"&&D.componentWillMount(),typeof D.UNSAFE_componentWillMount=="function"&&D.UNSAFE_componentWillMount()),typeof D.componentDidMount=="function"&&(u.flags|=4194308)):(typeof D.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=b,u.memoizedState=Ge),D.props=b,D.state=Ge,D.context=k,b=we):(typeof D.componentDidMount=="function"&&(u.flags|=4194308),b=!1)}else{D=u.stateNode,$a(l,u),k=u.memoizedProps,nt=Dl(g,k),D.props=nt,qe=u.pendingProps,ft=D.context,Ge=g.contextType,we=Rr,typeof Ge=="object"&&Ge!==null&&(we=vt(Ge)),ne=g.getDerivedStateFromProps,(Ge=typeof ne=="function"||typeof D.getSnapshotBeforeUpdate=="function")||typeof D.UNSAFE_componentWillReceiveProps!="function"&&typeof D.componentWillReceiveProps!="function"||(k!==qe||ft!==we)&&N0(u,D,b,we),la=!1,ft=u.memoizedState,D.state=ft,Zr(u,b,D,C),Sa();var $t=u.memoizedState;k!==qe||ft!==$t||la||l!==null&&l.dependencies!==null&&Ot(l.dependencies)?(typeof ne=="function"&&(Ep(u,g,ne,b),$t=u.memoizedState),(nt=la||gh(u,g,nt,b,ft,$t,we)||l!==null&&l.dependencies!==null&&Ot(l.dependencies))?(Ge||typeof D.UNSAFE_componentWillUpdate!="function"&&typeof D.componentWillUpdate!="function"||(typeof D.componentWillUpdate=="function"&&D.componentWillUpdate(b,$t,we),typeof D.UNSAFE_componentWillUpdate=="function"&&D.UNSAFE_componentWillUpdate(b,$t,we)),typeof D.componentDidUpdate=="function"&&(u.flags|=4),typeof D.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof D.componentDidUpdate!="function"||k===l.memoizedProps&&ft===l.memoizedState||(u.flags|=4),typeof D.getSnapshotBeforeUpdate!="function"||k===l.memoizedProps&&ft===l.memoizedState||(u.flags|=1024),u.memoizedProps=b,u.memoizedState=$t),D.props=b,D.state=$t,D.context=we,b=nt):(typeof D.componentDidUpdate!="function"||k===l.memoizedProps&&ft===l.memoizedState||(u.flags|=4),typeof D.getSnapshotBeforeUpdate!="function"||k===l.memoizedProps&&ft===l.memoizedState||(u.flags|=1024),b=!1)}return D=b,Gu(l,u),b=(u.flags&128)!==0,D||b?(D=u.stateNode,g=b&&typeof g.getDerivedStateFromError!="function"?null:D.render(),u.flags|=1,l!==null&&b?(u.child=cs(u,l.child,null,C),u.child=cs(u,null,g,C)):rs(l,u,g,C),u.memoizedState=D.state,l=u.child):l=xr(l,u,C),l}function B0(l,u,g,b){return Nt(),u.flags|=256,rs(l,u,g,b),u.child}function Dp(l){return{baseLanes:l,cachePool:Ke()}}function Lp(l,u,g){return l=l!==null?l.childLanes&~g:0,u&&(l|=Ds),l}function Ip(l,u,g){var b=u.pendingProps,C=!1,D=(u.flags&128)!==0,k;if((k=D)||(k=l!==null&&l.memoizedState===null?!1:(Si.current&2)!==0),k&&(C=!0,u.flags&=-129),k=(u.flags&32)!==0,u.flags&=-33,l===null){if(xn){if(C?Ja(u):xe(),(l=ri)?(l=wx(l,Cs),l!==null&&(u.memoizedState={dehydrated:l,treeContext:Pa!==null?{id:os,overflow:nr}:null,retryLane:536870912,hydrationErrors:null},g=Xp(l),g.return=u,u.child=g,Gi=u,ri=null)):l=null,l===null)throw Ze(u);return Gh(l)?u.lanes=32:u.lanes=536870912,null}var ne=b.children;return b=b.fallback,C?(xe(),C=u.mode,ne=Bo({mode:"hidden",children:ne},C),b=Ra(b,C,g,null),ne.return=u,b.return=u,ne.sibling=b,u.child=ne,b=u.child,b.memoizedState=Dp(g),b.childLanes=Lp(l,k,g),u.memoizedState=Jl,Ll(null,b)):(Ja(u),bh(u,ne))}var we=l.memoizedState;if(we!==null&&(ne=we.dehydrated,ne!==null)){if(D)u.flags&256?(Ja(u),u.flags&=-257,u=Pl(l,u,g)):u.memoizedState!==null?(xe(),u.child=l.child,u.flags|=128,u=null):(xe(),ne=b.fallback,C=u.mode,b=Bo({mode:"visible",children:b.children},C),ne=Ra(ne,C,g,null),ne.flags|=2,b.return=u,ne.return=u,b.sibling=ne,u.child=b,cs(u,l.child,null,g),b=u.child,b.memoizedState=Dp(g),b.childLanes=Lp(l,k,g),u.memoizedState=Jl,u=Ll(null,b));else if(Ja(u),Gh(ne))k=jh(ne).digest,b=Error(s(419)),b.stack="",b.digest=k,Xe({value:b,source:null,stack:null}),u=Pl(l,u,g);else if(ei||J(l,u,g,!1),k=(g&l.childLanes)!==0,ei||k){if(k=ln,k!==null&&(b=j(k,g),b!==0&&b!==we.retryLane))throw we.retryLane=b,Ka(l,b),di(k,l,b),Ns;$o(ne)||zc(),u=Pl(l,u,g)}else $o(ne)?(u.flags|=192,u.child=l.child,u=null):(l=we.treeContext,ai&&(ri=_x(ne),Gi=u,xn=!0,Lr=null,Cs=!1,l!==null&&Ie(u,l)),u=bh(u,b.children),u.flags|=4096);return u}return C?(xe(),ne=b.fallback,C=u.mode,we=l.child,D=we.sibling,b=aa(we,{mode:"hidden",children:b.children}),b.subtreeFlags=we.subtreeFlags&65011712,D!==null?ne=aa(D,ne):(ne=Ra(ne,C,g,null),ne.flags|=2),ne.return=u,b.return=u,b.sibling=ne,u.child=b,Ll(null,b),b=u.child,ne=l.child.memoizedState,ne===null?ne=Dp(g):(C=ne.cachePool,C!==null?(we=Ti?oi._currentValue:oi._currentValue2,C=C.parent!==we?{parent:we,pool:we}
vendor: 4,067 bytes, line 4121
4121:C):C=Ke(),ne={baseLanes:ne.baseLanes|g,cachePool:C}),b.memoizedState=ne,b.childLanes=Lp(l,k,g),u.memoizedState=Jl,Ll(l.child,b)):(Ja(u),g=l.child,l=g.sibling,g=aa(g,{mode:"visible",children:b.children}),g.return=u,g.sibling=null,l!==null&&(k=u.deletions,k===null?(u.deletions=[l],u.flags|=16):k.push(l)),u.child=g,u.memoizedState=null,g)}function bh(l,u){return u=Bo({mode:"visible",children:u},l.mode),u.return=l,l.child=u}function Bo(l,u){return l=t(22,l,null,u),l.lanes=0,l}function Pl(l,u,g){return cs(u,l.child,null,g),l=bh(u,u.pendingProps.children),l.flags|=2,u.memoizedState=null,l}function V0(l,u,g){l.lanes|=u;var b=l.alternate;b!==null&&(b.lanes|=u),st(l.return,u,g)}function Cc(l,u,g,b,C,D){var k=l.memoizedState;k===null?l.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:b,tail:g,tailMode:C,treeForkCount:D}:(k.isBackwards=u,k.rendering=null,k.renderingStartTime=0,k.last=b,k.tail=g,k.tailMode=C,k.treeForkCount=D)}function Pp(l,u,g){var b=u.pendingProps,C=b.revealOrder,D=b.tail;b=b.children;var k=Si.current,ne=(k&2)!==0;if(ne?(k=k&1|2,u.flags|=128):k&=1,M(Si,k),rs(l,u,b,g),b=xn?fd:0,!ne&&l!==null&&(l.flags&128)!==0)e:for(l=u.child;l!==null;){if(l.tag===13)l.memoizedState!==null&&V0(l,g,u);else if(l.tag===19)V0(l,g,u);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===u)break e;for(;l.sibling===null;){if(l.return===null||l.return===u)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}switch(C){case"forwards":for(g=u.child,C=null;g!==null;)l=g.alternate,l!==null&&me(l)===null&&(C=g),g=g.sibling;g=C,g===null?(C=u.child,u.child=null):(C=g.sibling,g.sibling=null),Cc(u,!1,C,g,D,b);break;case"backwards":case"unstable_legacy-backwards":for(g=null,C=u.child,u.child=null;C!==null;){if(l=C.alternate,l!==null&&me(l)===null){u.child=C;break}l=C.sibling,C.sibling=g,g=C,C=l}Cc(u,!0,g,null,D,b);break;case"together":Cc(u,!1,null,null,void 0,b);break;default:u.memoizedState=null}return u.child}function xr(l,u,g){if(l!==null&&(u.dependencies=l.dependencies),po|=u.lanes,(g&u.childLanes)===0)if(l!==null){if(J(l,u,g,!1),(g&u.childLanes)===0)return null}else return null;if(l!==null&&u.child!==l.child)throw Error(s(153));if(u.child!==null){for(l=u.child,g=aa(l,l.pendingProps),u.child=g,g.return=u;l.sibling!==null;)l=l.sibling,g=g.sibling=aa(l,l.pendingProps),g.return=u;g.sibling=null}return u.child}function ju(l,u){return(l.lanes&u)!==0?!0:(l=l.dependencies,!!(l!==null&&Ot(l)))}function Up(l,u,g){switch(u.tag){case 3:We(u,u.stateNode.containerInfo),Oe(u,oi,l.memoizedState.cache),Nt();break;case 27:case 5:Be(u);break;case 4:We(u,u.stateNode.containerInfo);break;case 10:Oe(u,u.type,u.memoizedProps.value);break;case 31:if(u.memoizedState!==null)return u.flags|=128,H(u),null;break;case 13:var b=u.memoizedState;if(b!==null)return b.dehydrated!==null?(Ja(u),u.flags|=128,null):(g&u.child.childLanes)!==0?Ip(l,u,g):(Ja(u),l=xr(l,u,g),l!==null?l.sibling:null);Ja(u);break;case 19:var C=(l.flags&128)!==0;if(b=(g&u.childLanes)!==0,b||(J(l,u,g,!1),b=(g&u.childLanes)!==0),C){if(b)return Pp(l,u,g);u.flags|=128}if(C=u.memoizedState,C!==null&&(C.rendering=null,C.tail=null,C.lastEffect=null),M(Si,Si.current),b)break;return null;case 22:return u.lanes=0,O0(l,u,g,u.pendingProps);case 24:Oe(u,oi,l.memoizedState.cache)}return xr(l,u,g)}function Op(l,u,g){if(l!==null)if(l.memoizedProps!==u.pendingProps)ei=!0;else{if(!ju(l,g)&&(u.flags&128)===0)return ei=!1,Up(l,u,g);ei=(l.flags&131072)!==0}else ei=!1,xn&&(u.flags&1048576)!==0&&q(u,fd,u.index);switch(u.lanes=0,u.tag){case 16:e:{var b=u.pendingProps;if(l=ke(u.elementType),u.type=l,typeof l=="function")Ol(l)?(b=Dl(l,b),u.tag=1,u=Il(null,u,l,b,g)):(u.tag=0,u=vh(null,u,l,b,g));else{if(l!=null){var C=l.$$typeof;if(C===kc){u.tag=11,u=I0(null,u,l,b,g);break e}else if(C===zh){u.tag=14,u=P0(null,u,l,b,g);break e}}throw u=y(l)||l,Error(s(306,u,""))}}return u;case 0:return vh(l,u,u.type,u.pendingProps,g);case 1:return b=u.type,C=Dl(b,u.pendingProps),Il(l,u,b,C,g);case 3:e:{if(We(u,u.stateNode.containerInfo),l===null)throw Error(s(387));var D=u.pendingProps;
4121C=u.memoizedState,b=C.element,$a(l,u),Zr(u,D,null,g);var k=u.memoizedState;if(D=k.cache,Oe(u,oi,D),D!==C.cache&&Pt(u,[oi],g,!0),Sa(),D=k.element,ai&&C.isDehydrated)if(C={element:D,isDehydrated:!1,cache:k.cache},u.updateQueue.baseState=C,u.memoizedState=C,u.flags&256){u=B0(l,u,D,g);break e}else if(D!==b){b=ge(Error(s(424)),u),Xe(b),u=B0(l,u,D,g);break e}else for(ai&&(ri=vx(u.stateNode.containerInfo),Gi=u,xn=!0,Lr=null,Cs=!0),g=Lm(u,null,D,g),u.child=g;g;)g.flags=g.flags&-3|4096,g=g.sibling;else{if(Nt(),D===b){u=xr(l,u,g);break e}rs(l,u,D,g)}u=u.child}return u;case 26:if(La)return Gu(l,u),l===null?(g=_m(u.type,null,u.pendingProps,null))?u.memoizedState=g:xn||(u.stateNode=Yh(u.type,u.pendingProps,ls.current,u)):u.memoizedState=_m(u.type,l.memoizedProps,u.pendingProps,l.memoizedState),null;case 27:if(Hi)return Be(u),l===null&&Hi&&xn&&(b=u.stateNode=Zh(u.type,u.pendingProps,ls.current,Qi.current,!1),Gi=u,Cs=!0,ri=mm(u.type,b,ri)),rs(l,u,u.pendingProps.children,g),Gu(l,u),l===null&&(u.flags|=4194304),u.child;case 5:return l===null&&xn&&(Ix(u.type,u.pendingProps,Qi.current),(C=b=ri)&&(b=Sx(b,u.type,u.pendingProps,Cs),b!==null?(u.stateNode=b,Gi=u,ri=yx(b),Cs=!1,C=!0):C=!1),C||Ze(u)),Be(u),C=u.type,D=u.pendingProps,k=l!==null?l.memoizedProps:null,b=D.children,As(C,D)?b=null:k!==null&&As(C,k)&&(u.flags|=32),u.memoizedState!==null&&(C=ot(l,u,Dt,null,null,g),Ti?Wl._currentValue=C:Wl._currentValue2=C),Gu(l,u),rs(l,u,b,g),u.child;case 6:return l===null&&xn&&(bm(u.pendingProps,Qi.current),(l=g=ri)&&(g=Mx(g,u.pendingProps,Cs),g!==null?(u.stateNode=g,Gi=u,ri=null,l=!0):l=!1),l||Ze(u)),null;case 13:return Ip(l,u,g);case 4:return We(u,u.stateNode.containerInfo),b=u.pendingProps,l===null?u.child=cs(u,null,b,g):rs(l,u,b,g),u.child;case 11:return I0(l,u,u.type,u.pendingProps,g);case 7:return rs(l,u,u.pendingProps,g),u.child;case 8:return rs(l,u,u.pendingProps.children,g),u.child;case 12:return rs(l,u,u.pendingProps.children,g),u.child;case 10:return b=u.pendingProps,Oe(u,u.type,b.value),rs(l,u,b.children,g),u.child;case 9:return C=u.type._context,b=u.pendingProps.children,gt(u),C=vt(C),b=b(C),u.flags|=1,rs(l,u,b,g),u.child;case 14:return P0(l,u,u.type,u.pendingProps,g);case 15:return U0(l,u,u.type,u.pendingProps,g);case 19:return Pp(l,u,g);case 31:return z0(l,u,g);case 22:return O0(l,u,g,u.pendingProps);case 24:return gt(u),b=vt(oi),l===null?(C=un(),C===null&&(C=ln,D=X(),C.pooledCache=D,D.refCount++,D!==null&&(C.pooledCacheLanes|=g),C=D),u.memoizedState={parent:b,cache:C},Fi(u),Oe(u,oi,C)):((l.lanes&g)!==0&&($a(l,u),Zr(u,null,null,g),Sa()),C=l.memoizedState,D=u.memoizedState,C.parent!==b?(C={parent:b,cache:b},u.memoizedState=C,u.lanes===0&&(u.memoizedState=u.updateQueue.baseState=C),Oe(u,oi,b)):(b=D.cache,Oe(u,oi,b),b!==C.cache&&Pt(u,[oi],g,!0))),rs(l,u,u.pendingProps.children,g),u.child;case 29:throw u.pendingProps}throw Error(s(156,u.tag))}function wa(l){l.flags|=4}function Wu(l){ra&&(l.flags|=8)}function F0(l,u){if(l!==null&&l.child===u.child)return!1;if((u.flags&16)!==0)return!0;for(l=u.child;l!==null;){if((l.flags&8218)!==0||(l.subtreeFlags&8218)!==0)return!0;l=l.sibling}return!1}function zp(l,u,g,b){if(bn)for(g=u.child;g!==null;){if(g.tag===5||g.tag===6)ad(l,g.stateNode);else if(!(g.tag===4||Hi&&g.tag===27)&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===u)break;for(;g.sibling===null;){if(g.return===null||g.return===u)return;g=g.return}g.sibling.return=g.return,g=g.sibling}else if(ra)for(var C=u.child;C!==null;){if(C.tag===5){var D=C.stateNode;g&&b&&(D=px(D,C.type,C.memoizedProps)),ad(l,D)}else if(C.tag===6)D=C.stateNode,g&&b&&(D=fm(D,C.memoizedProps)),ad(l,D);else if(C.tag!==4){if(C.tag===22&&C.memoizedState!==null)D=C.child,D!==null&&(D.return=C),zp(l,C,!0,!0);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;C=C.return}C.sibling.return=C.return,C=C.sibling}}function k0(l,u,g,b){var C=!1;if(ra)for(var D=u.child;D!==null;){if(D.tag===5){var k=D.stateNode;g&&b&&(k=px(k,D.type,D.memoizedProps)),dm(l,k)}else if(D.tag===6)k=D.stateNode,g&&b&&(k=fm(k,D.memoizedProps)),dm(l,k);else if(D.tag!==4){if(D.tag===22&&D.memoizedState!==null)C=D.child,C!==null&&(C.return=D),k0(l,D,!0,!0),C=!0;else if(D.child!==null){D.child.return=D,D=D.child;continue}}if(D===u)break;for(;D.sibling===null;){if(D.return===null||D.return===u)return C;D=D.return}D.sibling.return=D.return,D=D.sibling}return C}function H0(l,u){if(ra&&F0(l,u)){l=u.stateNode;var g=l.containerInfo,b=um();k0(b,u,!1,!1),l.pendingChildren=b,wa(u),fx(g,b)}}function Bp(l,u,g,b){if(bn)l.memoizedProps!==b&&wa(u);else if(ra){var C=l.stateNode,D=l.memoizedProps;if((l=F0(l,u))||D!==b){var k=Qi.current;D=hx(C,g,D,b,!l,null),D===C?u.stateNode=C:(Wu(u),Fs(D,g,b,k)&&wa(u),u.stateNode=D,l&&zp(D,u,!1,!1))}else u.stateNode=C}}function ws(l,u,g,b,C){if((l.mode&32)!==0&&(g===null?rd(u,b):Xc(u,g,b))){if(l.flags|=16777216,(C&335544128)===C||Jp(u,b))if(hi(l.stateNode,u,b))l.flags|=8192;else if(vn())l.flags|=8192;else throw Rs=Ir,of}else l.flags&=-16777217}function Rc(l,u){if(Tm(u)){if(l.flags|=16777216,!Em(u))if(vn())l.flags|=8192;else throw Rs=Ir,of}else l.flags&=-16777217}function Xu(l,u){u!==null&&(l.flags|=4),l.flags&16384&&(u=l.tag!==22?I():536870912,l.lanes|=u,tu|=u)}function Nc(l,u){if(!xn)switch(l.tailMode){case"hidden":u=l.tail;for(var g=null;u!==null;)u.alternate!==null&&(g=u),u=u.sibling;g===null?l.tail=null:g.sibling=null;break;case"collapsed":g=l.tail;for(var b=null;g!==null;)g.alternate!==null&&(b=g),g=g.sibling;b===null?u||l.tail===null?l.tail=null:l.tail.sibling=null:b.sibling=null}}function Yn(l){var u=l.alternate!==null&&l.alternate.child===l.child,g=0,b=0;if(u)for(var C=l.child;C!==null;)g|=C.lanes|C.childLanes,b|=C.subtreeFlags&65011712,b|=C.flags&65011712,C.return=l,C=C.sibling;else for(C=l.child;C!==null;)g|=C.lanes|C.childLanes,b|=C.subtreeFlags,b|=C.flags,C.return=l,C=C.sibling;return l.subtreeFlags|=b,l.childLanes=g,u}function G0(l,u,g){var b=u.pendingProps;switch(Ae(u),u.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Yn(u),null;case 1:return Yn(u),null;case 3:return g=u.stateNode,b=null,l!==null&&(b=l.memoizedState.cache),u.memoizedState.cache!==b&&(u.flags|=2048),at(oi),pe(),g.pendingContext&&(g.context=g.pen
4121dingContext,g.pendingContext=null),(l===null||l.child===null)&&(Jt(u)?wa(u):l===null||l.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,Ue())),H0(l,u),Yn(u),null;case 26:if(La){var C=u.type,D=u.memoizedState;return l===null?(wa(u),D!==null?(Yn(u),Rc(u,D)):(Yn(u),ws(u,C,null,b,g))):D?D!==l.memoizedState?(wa(u),Yn(u),Rc(u,D)):(Yn(u),u.flags&=-16777217):(D=l.memoizedProps,bn?D!==b&&wa(u):Bp(l,u,C,b),Yn(u),ws(u,C,D,b,g)),null}case 27:if(Hi){if(Ve(u),g=ls.current,C=u.type,l!==null&&u.stateNode!=null)bn?l.memoizedProps!==b&&wa(u):Bp(l,u,C,b);else{if(!b){if(u.stateNode===null)throw Error(s(166));return Yn(u),null}l=Qi.current,Jt(u)?Rt(u,l):(l=Zh(C,b,g,l,!0),u.stateNode=l,wa(u))}return Yn(u),null}case 5:if(Ve(u),C=u.type,l!==null&&u.stateNode!=null)Bp(l,u,C,b);else{if(!b){if(u.stateNode===null)throw Error(s(166));return Yn(u),null}if(D=Qi.current,Jt(u))Rt(u,D),Nx(u.stateNode,C,b,D)&&(u.flags|=64);else{var k=$p(C,b,ls.current,D,u);Wu(u),zp(k,u,!1,!1),u.stateNode=k,Fs(k,C,b,D)&&wa(u)}}return Yn(u),ws(u,u.type,l===null?null:l.memoizedProps,u.pendingProps,g),null;case 6:if(l&&u.stateNode!=null)g=l.memoizedProps,bn?g!==b&&wa(u):ra&&(g!==b?(l=ls.current,g=Qi.current,Wu(u),u.stateNode=oo(b,l,g,u)):u.stateNode=l.stateNode);else{if(typeof b!="string"&&u.stateNode===null)throw Error(s(166));if(l=ls.current,g=Qi.current,Jt(u)){if(!ai)throw Error(s(176));if(l=u.stateNode,g=u.memoizedProps,b=null,C=Gi,C!==null)switch(C.tag){case 27:case 5:b=C.memoizedProps}Rb(l,g,u,b)||Ze(u,!0)}else Wu(u),u.stateNode=oo(b,l,g,u)}return Yn(u),null;case 31:if(g=u.memoizedState,l===null||l.memoizedState!==null){if(b=Jt(u),g!==null){if(l===null){if(!b)throw Error(s(318));if(!ai)throw Error(s(556));if(l=u.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(s(557));xm(l,u)}else Nt(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Yn(u),l=!1}else g=Ue(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=g),l=!0;if(!l)return u.flags&256?(fe(u),u):(fe(u),null);if((u.flags&128)!==0)throw Error(s(558))}return Yn(u),null;case 13:if(b=u.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(C=Jt(u),b!==null&&b.dehydrated!==null){if(l===null){if(!C)throw Error(s(318));if(!ai)throw Error(s(344));if(C=u.memoizedState,C=C!==null?C.dehydrated:null,!C)throw Error(s(317));Ex(C,u)}else Nt(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Yn(u),C=!1}else C=Ue(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=C),C=!0;if(!C)return u.flags&256?(fe(u),u):(fe(u),null)}return fe(u),(u.flags&128)!==0?(u.lanes=g,u):(g=b!==null,l=l!==null&&l.memoizedState!==null,g&&(b=u.child,C=null,b.alternate!==null&&b.alternate.memoizedState!==null&&b.alternate.memoizedState.cachePool!==null&&(C=b.alternate.memoizedState.cachePool.pool),D=null,b.memoizedState!==null&&b.memoizedState.cachePool!==null&&(D=b.memoizedState.cachePool.pool),D!==C&&(b.flags|=2048)),g!==l&&g&&(u.child.flags|=8192),Xu(u,u.updateQueue),Yn(u),null);case 4:return pe(),H0(l,u),l===null&&Gn(u.stateNode.containerInfo),Yn(u),null;case 10:return at(u.type),Yn(u),null;
vendor: 6,331 bytes, line 4121
4121case 19:if(S(Si),b=u.memoizedState,b===null)return Yn(u),null;if(C=(u.flags&128)!==0,D=b.rendering,D===null)if(C)Nc(b,!1);else{if(mi!==0||l!==null&&(l.flags&128)!==0)for(l=u.child;l!==null;){if(D=me(l),D!==null){for(u.flags|=128,Nc(b,!1),l=D.updateQueue,u.updateQueue=l,Xu(u,l),u.subtreeFlags=0,l=g,g=u.child;g!==null;)Lh(g,l),g=g.sibling;return M(Si,Si.current&1|2),xn&&Ce(u,b.treeForkCount),u.child}l=l.sibling}b.tail!==null&&ms()>ll&&(u.flags|=128,C=!0,Nc(b,!1),u.lanes=4194304)}else{if(!C)if(l=me(D),l!==null){if(u.flags|=128,C=!0,l=l.updateQueue,u.updateQueue=l,Xu(u,l),Nc(b,!0),b.tail===null&&b.tailMode==="hidden"&&!D.alternate&&!xn)return Yn(u),null}else 2*ms()-b.renderingStartTime>ll&&g!==536870912&&(u.flags|=128,C=!0,Nc(b,!1),u.lanes=4194304);b.isBackwards?(D.sibling=u.child,u.child=D):(l=b.last,l!==null?l.sibling=D:u.child=D,b.last=D)}return b.tail!==null?(l=b.tail,b.rendering=l,b.tail=l.sibling,b.renderingStartTime=ms(),l.sibling=null,g=Si.current,M(Si,C?g&1|2:g&1),xn&&Ce(u,b.treeForkCount),l):(Yn(u),null);case 22:case 23:return fe(u),vi(),b=u.memoizedState!==null,l!==null?l.memoizedState!==null!==b&&(u.flags|=8192):b&&(u.flags|=8192),b?(g&536870912)!==0&&(u.flags&128)===0&&(Yn(u),u.subtreeFlags&6&&(u.flags|=8192)):Yn(u),g=u.updateQueue,g!==null&&Xu(u,g.retryQueue),g=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(g=l.memoizedState.cachePool.pool),b=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(b=u.memoizedState.cachePool.pool),b!==g&&(u.flags|=2048),l!==null&&S(el),null;case 24:return g=null,l!==null&&(g=l.memoizedState.cache),u.memoizedState.cache!==g&&(u.flags|=2048),at(oi),Yn(u),null;case 25:return null;case 30:return null}throw Error(s(156,u.tag))}function Vp(l,u){switch(Ae(u),u.tag){case 1:return l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 3:return at(oi),pe(),l=u.flags,(l&65536)!==0&&(l&128)===0?(u.flags=l&-65537|128,u):null;case 26:case 27:case 5:return Ve(u),null;case 31:if(u.memoizedState!==null){if(fe(u),u.alternate===null)throw Error(s(340));Nt()}return l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 13:if(fe(u),l=u.memoizedState,l!==null&&l.dehydrated!==null){if(u.alternate===null)throw Error(s(340));Nt()}return l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 19:return S(Si),null;case 4:return pe(),null;case 10:return at(u.type),null;case 22:case 23:return fe(u),vi(),l!==null&&S(el),l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 24:return at(oi),null;case 25:return null;default:return null}}function j0(l,u){switch(Ae(u),u.tag){case 3:at(oi),pe();break;case 26:case 27:case 5:Ve(u);break;case 4:pe();break;case 31:u.memoizedState!==null&&fe(u);break;case 13:fe(u);break;case 19:S(Si);break;case 10:at(u.type);break;case 22:case 23:fe(u),vi(),l!==null&&S(el);break;case 24:at(oi)}}function yr(l,u){try{var g=u.updateQueue,b=g!==null?g.lastEffect:null;if(b!==null){var C=b.next;g=C;do{if((g.tag&l)===l){b=void 0;var D=g.create,k=g.inst;b=D(),k.destroy=b}g=g.next}while(g!==C)}}catch(ne){Ft(u,u.return,ne)}}function vr(l,u,g){try{var b=u.updateQueue,C=b!==null?b.lastEffect:null;if(C!==null){var D=C.next;b=D;do{if((b.tag&l)===l){var k=b.inst,ne=k.destroy;if(ne!==void 0){k.destroy=void 0,C=u;var we=g,Ge=ne;try{Ge()}catch(nt){Ft(C,we,nt)}}}b=b.next}while(b!==D)}}catch(nt){Ft(u,u.return,nt)}}function Dc(l){var u=l.updateQueue;if(u!==null){var g=l.stateNode;try{$r(u,g)}catch(b){Ft(l,l.return,b)}}}function _h(l,u,g){g.props=Dl(l.type,l.memoizedProps),g.state=l.memoizedState;try{g.componentWillUnmount()}catch(b){Ft(l,u,b)}}function Lc(l,u){try{var g=l.ref;if(g!==null){switch(l.tag){case 26:case 27:case 5:var b=Gc(l.stateNode);break;case 30:b=l.stateNode;break;default:b=l.stateNode}typeof g=="function"?l.refCleanup=g(b):g.current=b}}catch(C){Ft(l,u,C)}}function ps(l,u){var g=l.ref,b=l.refCleanup;if(g!==null)if(typeof b=="function")try{b()}catch(C){Ft(l,u,C)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof g=="function")try{g(null)}catch(C){Ft(l,u,C)}else g.current=null}function Ul(l){var u=l.type,g=l.memoizedProps,b=l.stateNode;try{sx(b,u,g,l)}catch(C){Ft(l,l.return,C)}}function qu(l,u,g){try{ax(l.stateNode,l.type,g,u,l)}catch(b){Ft(l,l.return,b)}}function Fp(l){return l.tag===5||l.tag===3||(La?l.tag===26:!1)||(Hi?l.tag===27&&Xl(l.type):!1)||l.tag===4}function Jr(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||Fp(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(Hi&&l.tag===27&&Xl(l.type)||l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function Sh(l,u,g){var b=l.tag;if(b===5||b===6)l=l.stateNode,u?ox(g,l,u):rm(g,l);else if(b!==4&&(Hi&&b===27&&Xl(l.type)&&(g=l.stateNode,u=null),l=l.child,l!==null))for(Sh(l,u,g),l=l.sibling;l!==null;)Sh(l,u,g),l=l.sibling}function Yu(l,u,g){var b=l.tag;if(b===5||b===6)l=l.stateNode,u?rx(g,l,u):am(g,l);else if(b!==4&&(Hi&&b===27&&Xl(l.type)&&(g=l.stateNode),l=l.child,l!==null))for(Yu(l,u,g),l=l.sibling;l!==null;)Yu(l,u,g),l=l.sibling}function kp(l,u,g){l=l.containerInfo;try{hm(l,g)}catch(b){Ft(u,u.return,b)}}function W0(l){var u=l.stateNode,g=l.memoizedProps;try{Ui(l.type,g,u,l)}catch(b){Ft(l,l.return,b)}}function Tb(l,u){for(Bh(l.containerInfo),Ci=u;Ci!==null;)if(l=Ci,u=l.child,(l.subtreeFlags&1028)!==0&&u!==null)u.return=l,Ci=u;else for(;Ci!==null;){l=Ci;var g=l.alternate;switch(u=l.flags,l.tag){case 0:if((u&4)!==0&&(u=l.updateQueue,u=u!==null?u.events:null,u!==null))for(var b=0;b<u.length;b++){var C=u[b];C.ref.impl=C.nextImpl}break;case 11:case 15:break;case 1:if((u&1024)!==0&&g!==null){u=void 0,b=l,C=g.memoizedProps,g=g.memoizedState;var D=b.stateNode;try{var k=Dl(b.type,C);u=D.getSnapshotBeforeUpdate(k,g),D.__reactInternalSnapshotBeforeUpdate=u}catch(ne){Ft(b,b.return,ne)}}break;case 3:(u&1024)!==0&&bn&&cm(l.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((u&1024)!==0)throw Error(s(163))}if(u=l.sibling,u!==null){u.return=l.return,Ci=u;break}Ci=l.return}}function X0(l,u,g){var b=g.flags;switch(g.tag){case 0:case 11:case 15:Ts(l,g),b&4&&yr(5,g);break;case 1:if(Ts(l,g),b&4)if(l=g.stateNode,u===null)try{l.componentDidMount()}catch(k){Ft(g,g.return,k)}else{var C=Dl(g.type,u.memoizedProps);u=u.memoizedState;
4121try{l.componentDidUpdate(C,u,l.__reactInternalSnapshotBeforeUpdate)}catch(k){Ft(g,g.return,k)}}b&64&&Dc(g),b&512&&Lc(g,g.return);break;case 3:if(Ts(l,g),b&64&&(b=g.updateQueue,b!==null)){if(l=null,g.child!==null)switch(g.child.tag){case 27:case 5:l=Gc(g.child.stateNode);break;case 1:l=g.child.stateNode}try{$r(b,l)}catch(k){Ft(g,g.return,k)}}break;case 27:Hi&&u===null&&b&4&&W0(g);case 26:case 5:if(Ts(l,g),u===null){if(b&4)Ul(g);else if(b&64){l=g.type,u=g.memoizedProps,C=g.stateNode;try{Cx(C,l,u,g)}catch(k){Ft(g,g.return,k)}}}b&512&&Lc(g,g.return);break;case 12:Ts(l,g);break;case 31:Ts(l,g),b&4&&Ea(l,g);break;case 13:Ts(l,g),b&4&&Ku(l,g),b&64&&(b=g.memoizedState,b!==null&&(b=b.dehydrated,b!==null&&(g=Eb.bind(null,g),Wh(b,g))));break;case 22:if(b=g.memoizedState!==null||Mi,!b){u=u!==null&&u.memoizedState!==null||wi,C=Mi;var D=wi;Mi=b,(wi=u)&&!D?Ca(l,g,(g.subtreeFlags&8772)!==0):Ts(l,g),Mi=C,wi=D}break;case 30:break;default:Ts(l,g)}}function Hp(l){var u=l.alternate;u!==null&&(l.alternate=null,Hp(u)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(u=l.stateNode,u!==null&&Vh(u)),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}function Ta(l,u,g){for(g=g.child;g!==null;)Zu(l,u,g),g=g.sibling}function Zu(l,u,g){if(Gs&&typeof Gs.onCommitFiberUnmount=="function")try{Gs.onCommitFiberUnmount(Zl,g)}catch{}switch(g.tag){case 26:if(La){wi||ps(g,u),Ta(l,u,g),g.memoizedState?Qo(g.memoizedState):g.stateNode&&wm(g.stateNode);break}case 27:if(Hi){wi||ps(g,u);var b=pi,C=Ri;Xl(g.type)&&(pi=g.stateNode,Ri=!1),Ta(l,u,g),$i(g.stateNode),pi=b,Ri=C;break}case 5:wi||ps(g,u);case 6:if(bn){if(b=pi,C=Ri,pi=null,Ta(l,u,g),pi=b,Ri=C,pi!==null)if(Ri)try{om(pi,g.stateNode)}catch(D){Ft(g,u,D)}else try{lx(pi,g.stateNode)}catch(D){Ft(g,u,D)}}else Ta(l,u,g);break;case 18:bn&&pi!==null&&(Ri?Xh(pi,g.stateNode):vm(pi,g.stateNode));break;case 4:bn?(b=pi,C=Ri,pi=g.stateNode.containerInfo,Ri=!0,Ta(l,u,g),pi=b,Ri=C):(ra&&kp(g.stateNode,g,um()),Ta(l,u,g));break;case 0:case 11:case 14:case 15:vr(2,g,u),wi||vr(4,g,u),Ta(l,u,g);break;case 1:wi||(ps(g,u),b=g.stateNode,typeof b.componentWillUnmount=="function"&&_h(g,u,b)),Ta(l,u,g);break;case 21:Ta(l,u,g);break;case 22:wi=(b=wi)||g.memoizedState!==null,Ta(l,u,g),wi=b;break;default:Ta(l,u,g)}}function Ea(l,u){if(ai&&u.memoizedState===null&&(l=u.alternate,l!==null&&(l=l.memoizedState,l!==null))){l=l.dehydrated;try{Nb(l)}catch(g){Ft(u,u.return,g)}}}function Ku(l,u){if(ai&&u.memoizedState===null&&(l=u.alternate,l!==null&&(l=l.memoizedState,l!==null&&(l=l.dehydrated,l!==null))))try{Db(l)}catch(g){Ft(u,u.return,g)}}function Aa(l){switch(l.tag){case 31:case 13:case 19:var u=l.stateNode;return u===null&&(u=l.stateNode=new Pm),u;case 22:return l=l.stateNode,u=l._retryCache,u===null&&(u=l._retryCache=new Pm),u;default:throw Error(s(435,l.tag))}}function eo(l,u){var g=Aa(l);u.forEach(function(b){if(!g.has(b)){g.add(b);var C=Ab.bind(null,l,b);b.then(C,C)}})}function Zi(l,u){var g=u.deletions;if(g!==null)for(var b=0;b<g.length;b++){var C=g[b],D=l,k=u;if(bn){var ne=k;e:for(;ne!==null;){switch(ne.tag){case 27:if(Hi){if(Xl(ne.type)){pi=ne.stateNode,Ri=!1;break e}break}case 5:pi=ne.stateNode,Ri=!1;break e;case 3:case 4:pi=ne.stateNode.containerInfo,Ri=!0;break e}ne=ne.return}if(pi===null)throw Error(s(160));Zu(D,k,C),pi=null,Ri=!1}else Zu(D,k,C);D=C.alternate,D!==null&&(D.return=null),C.return=null}if(u.subtreeFlags&13886)for(u=u.child;u!==null;)$u(u,l),u=u.sibling}function $u(l,u){var g=l.alternate,b=l.flags;switch(l.tag){case 0:case 11:case 14:case 15:Zi(u,l),Ki(l),b&4&&(vr(3,l,l.return),yr(3,l),vr(5,l,l.return));break;case 1:Zi(u,l),Ki(l),b&512&&(wi||g===null||ps(g,g.return)),b&64&&Mi&&(l=l.updateQueue,l!==null&&(b=l.callbacks,b!==null&&(g=l.shared.hiddenCallbacks,l.shared.hiddenCallbacks=g===null?b:g.concat(b))));break;case 26:if(La){var C=kn;if(Zi(u,l),Ki(l),b&512&&(wi||g===null||ps(g,g.return)),b&4){b=g!==null?g.memoizedState:null;var D=l.memoizedState;g===null?D===null?l.stateNode===null?l.stateNode=Px(C,l.type,l.memoizedProps,l):Mm(C,l.type,l.stateNode):l.stateNode=Sm(C,D,l.memoizedProps):b!==D?(b===null?g.stateNode!==null&&wm(g.stateNode):Qo(b),D===null?Mm(C,l.type,l.stateNode):Sm(C,D,l.memoizedProps)):D===null&&l.stateNode!==null&&qu(l,l.memoizedProps,g.memoizedProps)}break}case 27:if(Hi){Zi(u,l),Ki(l),b&512&&(wi||g===null||ps(g,g.return)),g!==null&&b&4&&qu(l,l.memoizedProps,g.memoizedProps);break}case 5:if(Zi(u,l),Ki(l),b&512&&(wi||g===null||ps(g,g.return)),bn){if(l.flags&32){C=l.stateNode;try{lm(C)}catch(qe){Ft(l,l.return,qe)}}b&4&&l.stateNode!=null&&(C=l.memoizedProps,qu(l,C,g!==null?g.memoizedProps:C)),b&1024&&(Kc=!0)}else ra&&l.alternate!==null&&(l.alternate.stateNode=l.stateNode);break;case 6:if(Zi(u,l),Ki(l),b&4&&bn){if(l.stateNode===null)throw Error(s(162));b=l.memoizedProps,g=g!==null?g.memoizedProps:b,C=l.stateNode;try{ix(C,g,b)}catch(qe){Ft(l,l.return,qe)}}break;case 3:if(La?(Ux(),C=kn,kn=cd(u.containerInfo),Zi(u,l),kn=C):Zi(u,l),Ki(l),b&4){if(bn&&ai&&g!==null&&g.memoizedState.isDehydrated)try{Rx(u.containerInfo)}catch(qe){Ft(l,l.return,qe)}if(ra){b=u.containerInfo,g=u.pendingChildren;try{hm(b,g)}catch(qe){Ft(l,l.return,qe)}}}Kc&&(Kc=!1,Mh(l));break;case 4:La?(g=kn,kn=cd(l.stateNode.containerInfo),Zi(u,l),Ki(l),kn=g):(Zi(u,l),Ki(l)),b&4&&ra&&kp(l.stateNode,l,l.stateNode.pendingChildren);break;case 12:Zi(u,l),Ki(l);break;case 31:Zi(u,l),Ki(l),b&4&&(b=l.updateQueue,b!==null&&(l.updateQueue=null,eo(l,b)));break;case 13:Zi(u,l),Ki(l),l.child.flags&8192&&l.memoizedState!==null!=(g!==null&&g.memoizedState!==null)&&(vd=ms()),b&4&&(b=l.updateQueue,b!==null&&(l.updateQueue=null,eo(l,b)));break;case 22:C=l.memoizedState!==null;var k=g!==null&&g.memoizedState!==null,ne=Mi,we=wi;if(Mi=ne||C,wi=we||k,Zi(u,l),wi=we,Mi=ne,Ki(l),b&8192&&(u=l.stateNode,u._visibility=C?u._visibility&-2:u._visibility|1,C&&(g===null||k||Mi||wi||Vo(l)),bn)){e:if(g=null,bn)for(u=l;;
4121){if(u.tag===5||La&&u.tag===26){if(g===null){k=g=u;try{D=k.stateNode,C?Cb(D):ux(k.stateNode,k.memoizedProps)}catch(qe){Ft(k,k.return,qe)}}}else if(u.tag===6){if(g===null){k=u;try{var Ge=k.stateNode;C?cx(Ge):dx(Ge,k.memoizedProps)}catch(qe){Ft(k,k.return,qe)}}}else if(u.tag===18){if(g===null){k=u;try{var nt=k.stateNode;C?Dx(nt):Lx(k.stateNode)}catch(qe){Ft(k,k.return,qe)}}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===l)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===l)break e;for(;u.sibling===null;){if(u.return===null||u.return===l)break e;g===u&&(g=null),u=u.return}g===u&&(g=null),u.sibling.return=u.return,u=u.sibling}}b&4&&(b=l.updateQueue,b!==null&&(g=b.retryQueue,g!==null&&(b.retryQueue=null,eo(l,g))));break;case 19:Zi(u,l),Ki(l),b&4&&(b=l.updateQueue,b!==null&&(l.updateQueue=null,eo(l,b)));break;case 30:break;case 21:break;default:Zi(u,l),Ki(l)}}function Ki(l){var u=l.flags;if(u&2){try{for(var g,b=l.return;b!==null;){if(Fp(b)){g=b;break}b=b.return}if(bn){if(g==null)throw Error(s(160));switch(g.tag){case 27:if(Hi){var C=g.stateNode,D=Jr(l);Yu(l,D,C);break}case 5:var k=g.stateNode;g.flags&32&&(lm(k),g.flags&=-33);var ne=Jr(l);Yu(l,ne,k);break;case 3:case 4:var we=g.stateNode.containerInfo,Ge=Jr(l);Sh(l,Ge,we);break;default:throw Error(s(161))}}}catch(nt){Ft(l,l.return,nt)}l.flags&=-3}u&4096&&(l.flags&=-4097)}function Mh(l){if(l.subtreeFlags&1024)for(l=l.child;l!==null;){var u=l;Mh(u),u.tag===5&&u.flags&1024&&tm(u.stateNode),l=l.sibling}}function Ts(l,u){if(u.subtreeFlags&8772)for(u=u.child;u!==null;)X0(l,u.alternate,u),u=u.sibling}function Vo(l){for(l=l.child;l!==null;){var u=l;switch(u.tag){case 0:case 11:case 14:case 15:vr(4,u,u.return),Vo(u);break;case 1:ps(u,u.return);var g=u.stateNode;typeof g.componentWillUnmount=="function"&&_h(u,u.return,g),Vo(u);break;case 27:Hi&&$i(u.stateNode);case 26:case 5:ps(u,u.return),Vo(u);break;case 22:u.memoizedState===null&&Vo(u);break;case 30:Vo(u);break;default:Vo(u)}l=l.sibling}}function Ca(l,u,g){for(g=g&&(u.subtreeFlags&8772)!==0,u=u.child;u!==null;){var b=u.alternate,C=l,D=u,k=D.flags;switch(D.tag){case 0:case 11:case 15:Ca(C,D,g),yr(4,D);break;case 1:if(Ca(C,D,g),b=D,C=b.stateNode,typeof C.componentDidMount=="function")try{C.componentDidMount()}catch(Ge){Ft(b,b.return,Ge)}if(b=D,C=b.updateQueue,C!==null){var ne=b.stateNode;try{var we=C.shared.hiddenCallbacks;if(we!==null)for(C.shared.hiddenCallbacks=null,C=0;C<we.length;C++)Kr(we[C],ne)}catch(Ge){Ft(b,b.return,Ge)}}g&&k&64&&Dc(D),Lc(D,D.return);break;case 27:Hi&&W0(D);case 26:case 5:Ca(C,D,g),g&&b===null&&k&4&&Ul(D),Lc(D,D.return);break;case 12:Ca(C,D,g);break;case 31:Ca(C,D,g),g&&k&4&&Ea(C,D);break;case 13:Ca(C,D,g),g&&k&4&&Ku(C,D);break;case 22:D.memoizedState===null&&Ca(C,D,g),Lc(D,D.return);break;case 30:break;default:Ca(C,D,g)}u=u.sibling}}function Fo(l,u){var g=null;l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(g=l.memoizedState.cachePool.pool),l=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(l=u.memoizedState.cachePool.pool),l!==g&&(l!=null&&l.refCount++,g!=null&&z(g))}function Gp(l,u){l=null,u.alternate!==null&&(l=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==l&&(u.refCount++,l!=null&&z(l))}function ui(l,u,g,b){if(u.subtreeFlags&10256)for(u=u.child;u!==null;)wh(l,u,g,b),u=u.sibling}function wh(l,u,g,b){var C=u.flags;switch(u.tag){case 0:case 11:case 15:ui(l,u,g,b),C&2048&&yr(9,u);break;case 1:ui(l,u,g,b);break;case 3:ui(l,u,g,b),C&2048&&(l=null,u.alternate!==null&&(l=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==l&&(u.refCount++,l!=null&&z(l)));break;case 12:if(C&2048){ui(l,u,g,b),l=u.stateNode;try{var D=u.memoizedProps,k=D.id,ne=D.onPostCommit;typeof ne=="function"&&ne(k,u.alternate===null?"mount":"update",l.passiveEffectDuration,-0)}catch(we){Ft(u,u.return,we)}}else ui(l,u,g,b);break;case 31:ui(l,u,g,b);break;case 13:ui(l,u,g,b);break;case 23:break;case 22:D=u.stateNode,k=u.alternate,u.memoizedState!==null?D._visibility&2?ui(l,u,g,b):Ic(l,u):D._visibility&2?ui(l,u,g,b):(D._visibility|=2,zs(l,u,g,b,(u.subtreeFlags&10256)!==0||!1)),C&2048&&Fo(k,u);break;case 24:ui(l,u,g,b),C&2048&&Gp(u.alternate,u);break;default:ui(l,u,g,b)}}function zs(l,u,g,b,C){for(C=C&&((u.subtreeFlags&10256)!==0||!1),u=u.child;u!==null;){var D=l,k=u,ne=g,we=b,Ge=k.flags;switch(k.tag){case 0:case 11:case 15:zs(D,k,ne,we,C),yr(8,k);break;case 23:break;case 22:var nt=k.stateNode;k.memoizedState!==null?nt._visibility&2?zs(D,k,ne,we,C):Ic(D,k):(nt._visibility|=2,zs(D,k,ne,we,C)),C&&Ge&2048&&Fo(k.alternate,k);break;case 24:zs(D,k,ne,we,C),C&&Ge&2048&&Gp(k.alternate,k);break;default:zs(D,k,ne,we,C)}u=u.sibling}}function Ic(l,u){if(u.subtreeFlags&10256)for(u=u.child;u!==null;){var g=l,b=u,C=b.flags;switch(b.tag){case 22:Ic(g,b),C&2048&&Fo(b.alternate,b);break;case 24:Ic(g,b),C&2048&&Gp(b.alternate,b);break;default:Ic(g,b)}u=u.sibling}}function br(l,u,g){if(l.subtreeFlags&ua)for(l=l.child;l!==null;)ko(l,u,g),l=l.sibling}function ko(l,u,g){switch(l.tag){case 26:if(br(l,u,g),l.flags&ua)if(l.memoizedState!==null)Ox(g,kn,l.memoizedState,l.memoizedProps);else{var b=l.stateNode,C=l.type;l=l.memoizedProps,((u&335544128)===u||Jp(C,l))&&Fh(g,b,C,l)}break;case 5:br(l,u,g),l.flags&ua&&(b=l.stateNode,C=l.type,l=l.memoizedProps,((u&335544128)===u||Jp(C,l))&&Fh(g,b,C,l));break;case 3:case 4:La?(b=kn,kn=cd(l.stateNode.containerInfo),br(l,u,g),kn=b):br(l,u,g);break;case 22:l.memoizedState===null&&(b=l.alternate,b!==null&&b.memoizedState!==null?(b=ua,ua=16777216,br(l,u,g),ua=b):br(l,u,g));break;default:br(l,u,g)}}function Th(l){var u=l.alternate;if(u!==null&&(l=u.child,l!==null)){u.child=null;do u=l.sibling,l.sibling=null,l=u;while(l!==null)}}function Pc(l){var u=l.deletions;if((l.flags&16)!==0){if(u!==null)for(var g=0;g<u.length;g++){var b=u[g];Ci=b,ia(b,l)}Th(l)}if(l.subtreeFlags&10256)for(l=l.child;l!==null;)Eh(l),l=l.sibling}function Eh(l){switch(l.tag){case 0:case 11:case 15:Pc(l),l.flags&2048&&vr(9,l,l.return);break;case 3:Pc(l);break;case 12:Pc(l);break;case 22:var u=l.stateNode;l.memoizedState!==null&&u._visibility&2&&(l.return===null||l.return.tag!==13)?(u._visibility&=-3,Qu(l)):Pc(l);break;default:Pc(l)}}function Qu(l){var u=l.deletions;if((l.flags&16)!==0){if(u!==null)for(var g=0;g<u.length;g++){var b=u[g];Ci=b,ia(b,l)}Th(l)}for(l=l.child;l!==null;){switch(u=l,u.tag){case 0:case 11:case 15:vr(8,u,u.return),Qu(u);break;case 22:g=u.stateNode,g._visibility&2&&(g._visibility&=-3,Qu(u));break;default:Qu(u)}l=l.sibling}}function ia(l,u){for(;Ci!==null;){var g=Ci;switch(g.tag){case 0:case 11:case 15:vr(8,g,u);break;case 23:case 22:if(g.memoizedState!==null&&g.memoizedState.cachePool!==null){var b=g.memoizedState.cachePool.pool;b!=null&&b.refCount++}break;case 24:z(g.memoizedState.cache)}if(b=g.child,b!==null)b.return=g,Ci=b;else e:for(g=l;Ci!==null;){b=Ci;var C=b.sibling,D=b.return;if(Hp(b),b===g){Ci=null;break e}if(C!==null){C.return=D,Ci=C;break e}Ci=D}}}function Ho(l){var u=en(l);if(u!=null){if(typeof u.memoizedProps["data-testname"]!="string")throw Error(s(364));return u}if(l=Ei(l),l===null)throw Error(s(362));return l.stateNode.current}function Go(l,u){var g=l.tag;switch(u.$$typeof){case Fa:if(l.type===u.value)return!0;break;case Qc:e:{for(u=u.value,l=[l,0],g=0;g<l.length;){var b=l[g++],C=b.tag,D=l[g++],k=u[D];if(C!==5&&C!==26&&C!==27||!Ko(b)){for(;k!=null&&Go(b,k);)D++,k=u[D];if(D===u.length){u=!0;break e}else for(b=b.child;b!==null;)l.push(b,D),b=b.sibling}}u=!1}return u;case Jc:if((g===5||g===26||g===27)&&sm(l.stateNode,u.value))return!0;break;case sl:if((g===5||g===6||g===26||g===27)&&(l=od(l),l!==null&&0<=l.indexOf(u.value)))return!0;break;case xd:if((g===5||g===26||g===27)&&(l=l.memoizedProps["data-testname"],typeof l=="string"&&l.toLowerCase()===u.value.toLowerCase()))return!0;break;default:throw Error(s(365))}return!1}function Uc(l){switch(l.$$typeof){case Fa:return"<"+(y(l.value)||"Unknown")+">";case Qc:return":has("+(Uc(l)||"")+")";case Jc:return'[role="'+l.value+'"]';
4121case sl:return'"'+l.value+'"';case xd:return'[data-testname="'+l.value+'"]';default:throw Error(s(365))}}function Oc(l,u){var g=[];l=[l,0];for(var b=0;b<l.length;){var C=l[b++],D=C.tag,k=l[b++],ne=u[k];if(D!==5&&D!==26&&D!==27||!Ko(C)){for(;ne!=null&&Go(C,ne);)k++,ne=u[k];if(k===u.length)g.push(C);else for(C=C.child;C!==null;)l.push(C,k),C=C.sibling}}return g}function Bs(l,u){if(!ki)throw Error(s(363));l=Ho(l),l=Oc(l,u),u=[],l=Array.from(l);for(var g=0;g<l.length;){var b=l[g++],C=b.tag;if(C===5||C===26||C===27)Ko(b)||u.push(b.stateNode);else for(b=b.child;b!==null;)l.push(b),b=b.sibling}return u}function si(){return(pn&2)!==0&&yn!==0?yn&-yn:Lt.T!==null?tt():Wc()}function to(){if(Ds===0)if((yn&536870912)===0||xn){var l=Yl;Yl<<=1,(Yl&3932160)===0&&(Yl=262144),Ds=l}else Ds=536870912;return l=js.current,l!==null&&(l.flags|=32),Ds}function di(l,u,g){(l===ln&&(Hn===2||Hn===9)||l.cancelPendingCommit!==null)&&(_i(l,0),Sr(l,yn,Ds,!1)),O(l,g),((pn&2)===0||l!==ln)&&(l===ln&&((pn&2)===0&&(ol|=g),mi===4&&Sr(l,yn,Ds,!1)),Re(l))}function tr(l,u,g){if((pn&6)!==0)throw Error(s(327));var b=!g&&(u&127)===0&&(u&l.expiredLanes)===0||N(l,u),C=b?Z0(l,u):Mr(l,u,!0),D=b;do{if(C===0){al&&!b&&Sr(l,u,0,!1);break}else{if(g=l.current.alternate,D&&!q0(g)){C=Mr(l,u,!1),D=!1;continue}if(C===2){if(D=u,l.errorRecoveryDisabledLanes&D)var k=0;else k=l.pendingLanes&-536870913,k=k!==0?k:k&536870912?536870912:0;if(k!==0){u=k;e:{var ne=l;C=yd;var we=ai&&ne.current.memoizedState.isDehydrated;if(we&&(_i(ne,k).flags|=256),k=Mr(ne,k,!1),k!==2){if(rl&&!we){ne.errorRecoveryDisabledLanes|=D,ol|=D,C=4;break e}D=Xs,Xs=C,D!==null&&(Xs===null?Xs=D:Xs.push.apply(Xs,D))}C=k}if(D=!1,C!==2)continue}}if(C===1){_i(l,0),Sr(l,u,0,!0);break}e:{switch(b=l,D=C,D){case 0:case 1:throw Error(s(345));case 4:if((u&4194048)!==u)break;case 6:Sr(b,u,Ds,!ar);break e;case 2:Xs=null;break;case 3:case 5:break;default:throw Error(s(329))}if((u&62914560)===u&&(C=vd+300-ms(),10<C)){if(Sr(b,u,Ds,!ar),w(b,0,!0)!==0)break e;zr=u,b.timeoutHandle=Qp(_r.bind(null,b,g,Xs,bd,cf,u,Ds,ol,tu,ar,D,"Throttled",-0,0),C);break e}_r(b,g,Xs,bd,cf,u,Ds,ol,tu,ar,D,null,-0,0)}}break}while(!0);Re(l)}function _r(l,u,g,b,C,D,k,ne,we,Ge,nt,qe,ft,$t){if(l.timeoutHandle=ks,qe=u.subtreeFlags,qe&8192||(qe&16785408)===16785408){qe=em(),ko(u,D,qe);
vendor: 2,724 bytes, line 4121
4121var Ni=(D&62914560)===D?vd-ms():(D&4194048)===D?tc-ms():0;if(Ni=nx(qe,Ni),Ni!==null){zr=D,l.cancelPendingCommit=Ni(Tr.bind(null,l,u,D,g,b,C,k,ne,we,nt,qe,null,ft,$t)),Sr(l,D,k,!Ge);return}}Tr(l,u,D,g,b,C,k,ne,we)}function q0(l){for(var u=l;;){var g=u.tag;if((g===0||g===11||g===15)&&u.flags&16384&&(g=u.updateQueue,g!==null&&(g=g.stores,g!==null)))for(var b=0;b<g.length;b++){var C=g[b],D=C.getSnapshot;C=C.value;try{if(!Ai(D(),C))return!1}catch{return!1}}if(g=u.child,u.subtreeFlags&16384&&g!==null)g.return=u,u=g;else{if(u===l)break;for(;u.sibling===null;){if(u.return===null||u.return===l)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function Sr(l,u,g,b){u&=~eu,u&=~ol,l.suspendedLanes|=u,l.pingedLanes&=~u,b&&(l.warmLanes|=u),b=l.expirationTimes;for(var C=u;0<C;){var D=31-Hs(C),k=1<<D;b[D]=-1,C&=~k}g!==0&&P(l,g,u)}function Ah(){return(pn&6)===0?(Fe(0),!1):!0}function Ch(){if(mn!==null){if(Hn===0)var l=mn.return;else l=mn,ir=Kn=null,Tn(l),tl=null,Kl=0,l=mn;for(;l!==null;)j0(l.alternate,l),l=l.return;mn=null}}function _i(l,u){var g=l.timeoutHandle;g!==ks&&(l.timeoutHandle=ks,tx(g)),g=l.cancelPendingCommit,g!==null&&(l.cancelPendingCommit=null,g()),zr=0,Ch(),ln=l,mn=g=aa(l.current,null),yn=u,Hn=0,Oi=null,ar=!1,al=N(l,u),rl=!1,tu=Ds=eu=ol=po=mi=0,Xs=yd=null,cf=!1,(u&8)!==0&&(u|=u&32);var b=l.entangledLanes;if(b!==0)for(l=l.entanglements,b&=u;0<b;){var C=31-Hs(b),D=1<<C;u|=l[C],b&=~D}return Or=u,hr(),g}function Zn(l,u){tn=null,Lt.H=ca,u===Wi||u===Ba?(u=_t(),Hn=3):u===of?(u=_t(),Hn=4):Hn=u===Ns?8:u!==null&&typeof u=="object"&&typeof u.then=="function"?6:1,Oi=u,mn===null&&(mi=1,xh(l,ge(u,l.current)))}function vn(){var l=js.current;return l===null?!0:(yn&4194048)===yn?Ws===null:(yn&62914560)===yn||(yn&536870912)!==0?l===Ws:!1}function no(){var l=Lt.H;return Lt.H=ca,l===null?ca:l}function sa(){var l=Lt.A;return Lt.A=$c,l}function zc(){mi=4,ar||(yn&4194048)!==yn&&js.current!==null||(al=!0),(po&134217727)===0&&(ol&134217727)===0||ln===null||Sr(ln,yn,Ds,!1)}function Mr(l,u,g){var b=pn;pn|=2;var C=no(),D=sa();(ln!==l||yn!==u)&&(bd=null,_i(l,u)),u=!1;var k=mi;e:do try{if(Hn!==0&&mn!==null){var ne=mn,we=Oi;switch(Hn){case 8:Ch(),k=6;break e;case 3:case 2:case 9:case 6:js.current===null&&(u=!0);var Ge=Hn;if(Hn=0,Oi=null,wr(l,ne,we,Ge),g&&al){k=0;break e}break;default:Ge=Hn,Hn=0,Oi=null,wr(l,ne,we,Ge)}}Y0(),k=mi;break}catch(nt){Zn(l,nt)}while(!0);return u&&l.shellSuspendCounter++,ir=Kn=null,pn=b,Lt.H=C,Lt.A=D,mn===null&&(ln=null,yn=0,hr()),k}function Y0(){for(;mn!==null;)jo(mn)}function Z0(l,u){var g=pn;pn|=2;var b=no(),C=sa();ln!==l||yn!==u?(bd=null,ll=ms()+500,_i(l,u)):al=N(l,u);e:do try{if(Hn!==0&&mn!==null){u=mn;var D=Oi;t:switch(Hn){case 1:Hn=0,Oi=null,wr(l,u,D,1);break;
vendor: 4,636 bytes, line 4121
4121case 2:case 9:if(ut(D)){Hn=0,Oi=null,Rh(u);break}u=function(){Hn!==2&&Hn!==9||ln!==l||(Hn=7),Re(l)},D.then(u,u);break e;case 3:Hn=7;break e;case 4:Hn=5;break e;case 7:ut(D)?(Hn=0,Oi=null,Rh(u)):(Hn=0,Oi=null,wr(l,u,D,7));break;case 5:var k=null;switch(mn.tag){case 26:k=mn.memoizedState;case 5:case 27:var ne=mn,we=ne.type,Ge=ne.pendingProps;if(k?Em(k):hi(ne.stateNode,we,Ge)){Hn=0,Oi=null;var nt=ne.sibling;if(nt!==null)mn=nt;else{var qe=ne.return;qe!==null?(mn=qe,Vc(qe)):mn=null}break t}}Hn=0,Oi=null,wr(l,u,D,5);break;case 6:Hn=0,Oi=null,wr(l,u,D,6);break;case 8:Ch(),mi=6;break e;default:throw Error(s(462))}}Bc();break}catch(ft){Zn(l,ft)}while(!0);return ir=Kn=null,Lt.H=b,Lt.A=C,pn=g,mn!==null?0:(ln=null,yn=0,hr(),mi)}function Bc(){for(;mn!==null&&!Bx();)jo(mn)}function jo(l){var u=Op(l.alternate,l,Or);l.memoizedProps=l.pendingProps,u===null?Vc(l):mn=u}function Rh(l){var u=l,g=u.alternate;switch(u.tag){case 15:case 0:u=Np(g,u,u.pendingProps,u.type,void 0,yn);break;case 11:u=Np(g,u,u.pendingProps,u.type.render,u.ref,yn);break;case 5:Tn(u);default:j0(g,u),u=mn=Lh(u,Or),u=Op(g,u,Or)}l.memoizedProps=l.pendingProps,u===null?Vc(l):mn=u}function wr(l,u,g,b){ir=Kn=null,Tn(u),tl=null,Kl=0;var C=u.return;try{if(wb(l,C,u,g,yn)){mi=1,xh(l,ge(g,l.current)),mn=null;return}}catch(D){if(C!==null)throw mn=C,D;mi=1,xh(l,ge(g,l.current)),mn=null;return}u.flags&32768?(xn||b===1?l=!0:al||(yn&536870912)!==0?l=!1:(ar=l=!0,(b===2||b===9||b===3||b===6)&&(b=js.current,b!==null&&b.tag===13&&(b.flags|=16384))),Wo(u,l)):Vc(u)}function Vc(l){var u=l;do{if((u.flags&32768)!==0){Wo(u,ar);return}l=u.return;var g=G0(u.alternate,u,Or);if(g!==null){mn=g;return}if(u=u.sibling,u!==null){mn=u;return}mn=u=l}while(u!==null);mi===0&&(mi=5)}function Wo(l,u){do{var g=Vp(l.alternate,l);if(g!==null){g.flags&=32767,mn=g;return}if(g=l.return,g!==null&&(g.flags|=32768,g.subtreeFlags=0,g.deletions=null),!u&&(l=l.sibling,l!==null)){mn=l;return}mn=l=g}while(l!==null);mi=6,mn=null}function Tr(l,u,g,b,C,D,k,ne,we){l.cancelPendingCommit=null;do Ar();while(zi!==0);if((pn&6)!==0)throw Error(s(327));if(u!==null){if(u===l.current)throw Error(s(177));if(D=u.lanes|u.childLanes,D|=$l,F(l,g,D,k,ne,we),l===ln&&(mn=ln=null,yn=0),nc=u,go=l,zr=g,nu=D,uf=C,Um=b,(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?(l.callbackNode=null,l.callbackPriority=0,Pi(dd,function(){return Ju(),null})):(l.callbackNode=null,l.callbackPriority=0),b=(u.flags&13878)!==0,(u.subtreeFlags&13878)!==0||b){b=Lt.T,Lt.T=null,C=Da(),gn(2),k=pn,pn|=4;try{Tb(l,u,g)}finally{pn=k,gn(C),Lt.T=b}}zi=1,io(),Er(),Nh()}}function io(){if(zi===1){zi=0;var l=go,u=nc,g=(u.flags&13878)!==0;if((u.subtreeFlags&13878)!==0||g){g=Lt.T,Lt.T=null;var b=Da();gn(2);var C=pn;pn|=4;try{$u(u,l),ex(l.containerInfo)}finally{pn=C,gn(b),Lt.T=g}}l.current=u,zi=2}}function Er(){if(zi===2){zi=0;var l=go,u=nc,g=(u.flags&8772)!==0;if((u.subtreeFlags&8772)!==0||g){g=Lt.T,Lt.T=null;var b=Da();gn(2);var C=pn;pn|=4;try{X0(l,u.alternate,u)}finally{pn=C,gn(b),Lt.T=g}}zi=3}}function Nh(){if(zi===4||zi===3){zi=0,Cm();var l=go,u=nc,g=zr,b=Um;(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?zi=5:(zi=0,nc=go=null,Dh(l,l.pendingLanes));var C=l.pendingLanes;if(C===0&&(mo=null),ee(g),u=u.stateNode,Gs&&typeof Gs.onCommitFiberRoot=="function")try{Gs.onCommitFiberRoot(Zl,u,void 0,(u.current.flags&128)===128)}catch{}if(b!==null){u=Lt.T,C=Da(),gn(2),Lt.T=null;try{for(var D=l.onRecoverableError,k=0;k<b.length;k++){var ne=b[k];D(ne.value,{componentStack:ne.stack})}}finally{Lt.T=u,gn(C)}}(zr&3)!==0&&Ar(),Re(l),C=l.pendingLanes,(g&261930)!==0&&(C&42)!==0?l===_d?Nn++:(Nn=0,_d=l):Nn=0,ai&&ld(),Fe(0)}}function Dh(l,u){(l.pooledCacheLanes&=u)===0&&(u=l.pooledCache,u!=null&&(l.pooledCache=null,z(u)))}function Ar(){return io(),Er(),Nh(),Ju()}function Ju(){if(zi!==5)return!1;var l=go,u=nu;nu=0;var g=ee(zr),b=32>g?32:g;g=Lt.T;var C=Da();try{gn(b),Lt.T=null,b=uf,uf=null;var D=go,k=zr;if(zi=0,nc=go=null,zr=0,(pn&6)!==0)throw Error(s(331));var ne=pn;if(pn|=4,Eh(D.current),wh(D,D.current,k,b),pn=ne,Fe(0,!1),Gs&&typeof Gs.onPostCommitFiberRoot=="function")try{Gs.onPostCommitFiberRoot(Zl,D)}catch{}return!0}finally{gn(C),Lt.T=g,Dh(l,u)}}function Xo(l,u,g){u=ge(g,u),u=Cp(l.stateNode,u,2),l=Qa(l,u,2),l!==null&&(O(l,2),Re(l))}function Ft(l,u,g){if(l.tag===3)Xo(l,l,g);else for(;u!==null;){if(u.tag===3){Xo(u,l,g);break}else if(u.tag===1){var b=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof b.componentDidCatch=="function"&&(mo===null||!mo.has(b))){l=ge(g,l),g=D0(2),b=Qa(u,g,2),b!==null&&(L0(g,b,u,l),O(b,2),Re(b));break}}u=u.return}}function Fc(l,u,g){var b=l.pingCache;if(b===null){b=l.pingCache=new da;
vendor: 6,077 bytes, line 4121
4121var C=new Set;b.set(u,C)}else C=b.get(u),C===void 0&&(C=new Set,b.set(u,C));C.has(g)||(rl=!0,C.add(g),l=K0.bind(null,l,u,g),u.then(l,l))}function K0(l,u,g){var b=l.pingCache;b!==null&&b.delete(u),l.pingedLanes|=l.suspendedLanes&g,l.warmLanes&=~g,ln===l&&(yn&g)===g&&(mi===4||mi===3&&(yn&62914560)===yn&&300>ms()-vd?(pn&2)===0&&_i(l,0):eu|=g,tu===yn&&(tu=0)),Re(l)}function $0(l,u){u===0&&(u=I()),l=Ka(l,u),l!==null&&(O(l,u),Re(l))}function Eb(l){var u=l.memoizedState,g=0;u!==null&&(g=u.retryLane),$0(l,g)}function Ab(l,u){var g=0;switch(l.tag){case 31:case 13:var b=l.stateNode,C=l.memoizedState;C!==null&&(g=C.retryLane);break;case 19:b=l.stateNode;break;case 22:b=l.stateNode._retryCache;break;default:throw Error(s(314))}b!==null&&b.delete(u),$0(l,g)}function Pi(l,u){return ud(l,u)}function jp(l,u,g,b){this.tag=l,this.key=g,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=b,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ol(l){return l=l.prototype,!(!l||!l.isReactComponent)}function aa(l,u){var g=l.alternate;return g===null?(g=t(l.tag,u,l.key,l.mode),g.elementType=l.elementType,g.type=l.type,g.stateNode=l.stateNode,g.alternate=l,l.alternate=g):(g.pendingProps=u,g.type=l.type,g.flags=0,g.subtreeFlags=0,g.deletions=null),g.flags=l.flags&65011712,g.childLanes=l.childLanes,g.lanes=l.lanes,g.child=l.child,g.memoizedProps=l.memoizedProps,g.memoizedState=l.memoizedState,g.updateQueue=l.updateQueue,u=l.dependencies,g.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},g.sibling=l.sibling,g.index=l.index,g.ref=l.ref,g.refCleanup=l.refCleanup,g}function Lh(l,u){l.flags&=65011714;var g=l.alternate;return g===null?(l.childLanes=0,l.lanes=u,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=g.childLanes,l.lanes=g.lanes,l.child=g.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=g.memoizedProps,l.memoizedState=g.memoizedState,l.updateQueue=g.updateQueue,l.type=g.type,u=g.dependencies,l.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),l}function so(l,u,g,b,C,D){var k=0;if(b=l,typeof l=="function")Ol(l)&&(k=1);else if(typeof l=="string")k=La&&Hi?qh(l,g,Qi.current)?26:Am(l)?27:5:La?qh(l,g,Qi.current)?26:5:Hi&&Am(l)?27:5;else e:switch(l){case id:return l=t(31,g,u,C),l.elementType=id,l.lanes=D,l;case Fl:return Ra(g.children,C,D,u);case kl:k=8,C|=24;break;case Hl:return l=t(12,g,u,C|2),l.elementType=Hl,l.lanes=D,l;case Oh:return l=t(13,g,u,C),l.elementType=Oh,l.lanes=D,l;case ao:return l=t(19,g,u,C),l.elementType=ao,l.lanes=D,l;default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case Na:k=10;break e;case nd:k=9;break e;case kc:k=11;break e;case zh:k=14;break e;case Es:k=16,b=null;break e}k=29,g=Error(s(130,l===null?"null":typeof l,"")),b=null}return u=t(k,g,u,C),u.elementType=l,u.type=b,u.lanes=D,u}function Ra(l,u,g,b){return l=t(7,l,b,u),l.lanes=g,l}function Wp(l,u,g){return l=t(6,l,null,u),l.lanes=g,l}function Xp(l){var u=t(18,null,null,0);return u.stateNode=l,u}function qp(l,u,g){return u=t(4,l.children!==null?l.children:[],l.key,u),u.lanes=g,u.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},u}function Q0(l,u,g,b,C,D,k,ne,we){this.tag=1,this.containerInfo=l,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=ks,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=B(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=B(0),this.hiddenUpdates=B(null),this.identifierPrefix=b,this.onUncaughtError=C,this.onCaughtError=D,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=we,this.incompleteTransitions=new Map}function qo(l,u,g,b,C,D,k,ne,we,Ge,nt,qe){return l=new Q0(l,u,g,k,we,Ge,nt,qe,ne),u=1,D===!0&&(u|=24),D=t(3,null,null,u),l.current=D,D.stateNode=l,u=X(),u.refCount++,l.pooledCache=u,u.refCount++,D.memoizedState={element:b,isDehydrated:g,cache:u},Fi(D),l}function Ih(l){return l?(l=Rr,l):Rr}function ed(l){var u=l._reactInternals;if(u===void 0)throw typeof l.render=="function"?Error(s(188)):(l=Object.keys(l).join(","),Error(s(268,l)));return l=h(u),l=l!==null?f(l):null,l===null?null:Gc(l.stateNode)}function Yp(l,u,g,b,C,D){C=Ih(C),b.context===null?b.context=C:b.pendingContext=C,b=_s(u),b.payload={element:g},D=D===void 0?null:D,D!==null&&(b.callback=D),g=Qa(l,b,u),g!==null&&(di(g,l,u),fr(g,l,u))}function zl(l,u){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var g=l.retryLane;l.retryLane=g!==0&&g<u?g:u}}function td(l,u){zl(l,u),(l=l.alternate)&&zl(l,u)}var rn={},Ph=$C,Vs=$j,Uh=Object.assign,Bl=Symbol.for("react.element"),Cr=Symbol.for("react.transitional.element"),Vl=Symbol.for("react.portal"),Fl=Symbol.for("react.fragment"),kl=Symbol.for("react.strict_mode"),Hl=Symbol.for("react.profiler"),nd=Symbol.for("react.consumer"),Na=Symbol.for("react.context"),kc=Symbol.for("react.forward_ref"),Oh=Symbol.for("react.suspense"),ao=Symbol.for("react.suspense_list"),zh=Symbol.for("react.memo"),Es=Symbol.for("react.lazy"),id=Symbol.for("react.activity"),Zp=Symbol.for("react.memo_cache_sentinel"),ro=Symbol.iterator,Yo=Symbol.for("react.client.reference"),Zo=Array.isArray,Lt=Ph.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Kp=e.rendererVersion,sd=e.rendererPackageName,Hc=e.extraDevToolsConfig,Gc=e.getPublicInstance,J0=e.getRootHostContext,jc=e.getChildHostContext,Bh=e.prepareForCommit,ex=e.resetAfterCommit,$p=e.createInstance;e.cloneMutableInstance;var ad=e.appendInitialChild,Fs=e.finalizeInitialChildren,As=e.shouldSetTextContent,oo=e.createTextInstance;e.cloneMutableTextInstance;
4121var Qp=e.scheduleTimeout,tx=e.cancelTimeout,ks=e.noTimeout,Ti=e.isPrimaryRenderer;e.warnsIfNotActing;var bn=e.supportsMutation,ra=e.supportsPersistence,ai=e.supportsHydration,en=e.getInstanceFromNode;e.beforeActiveInstanceBlur;var Gn=e.preparePortalMount;e.prepareScopeUpdate,e.getInstanceFromScope;var gn=e.setCurrentUpdatePriority,Da=e.getCurrentUpdatePriority,Wc=e.resolveUpdatePriority;e.trackSchedulerEvent,e.resolveEventType,e.resolveEventTimeStamp;var Gl=e.shouldAttemptEagerTransition,Vh=e.detachDeletedInstance;e.requestPostPaintCallback;var rd=e.maySuspendCommit,Xc=e.maySuspendCommitOnUpdate,Jp=e.maySuspendCommitInSyncRender,hi=e.preloadInstance,em=e.startSuspendingCommit,Fh=e.suspendInstance;e.suspendOnActiveViewTransition;var nx=e.waitForCommitToBeReady;e.getSuspendedCommitReason;var jl=e.NotPendingTransition,Wl=e.HostTransitionContext,tm=e.resetFormInstance;e.bindToConsole;var nm=e.supportsMicrotasks,im=e.scheduleMicrotask,ki=e.supportsTestSelectors,Ei=e.findFiberRoot,kh=e.getBoundingRect,od=e.getTextContent,Ko=e.isHiddenSubtree,sm=e.matchAccessibilityRole,lo=e.setFocusIfFocusable,Hh=e.setupIntersectionObserver,am=e.appendChild,rm=e.appendChildToContainer,ix=e.commitTextUpdate,sx=e.commitMount,ax=e.commitUpdate,rx=e.insertBefore,ox=e.insertInContainerBefore,lx=e.removeChild,om=e.removeChildFromContainer,lm=e.resetTextContent,Cb=e.hideInstance,cx=e.hideTextInstance,ux=e.unhideInstance,dx=e.unhideTextInstance;e.cancelViewTransitionName,e.cancelRootViewTransitionName,e.restoreRootViewTransitionName,e.cloneRootViewTransitionContainer,e.removeRootViewTransitionClone,e.measureClonedInstance,e.hasInstanceChanged,e.hasInstanceAffectedParent,e.startViewTransition,e.startGestureTransition,e.stopViewTransition,e.getCurrentGestureOffset,e.createViewTransitionInstance;var cm=e.clearContainer;e.createFragmentInstance,e.updateFragmentInstanceFiber,e.commitNewChildToFragmentInstance,e.deleteChildFromFragmentInstance;var hx=e.cloneInstance,um=e.createContainerChildSet,dm=e.appendChildToContainerChildSet,fx=e.finalizeContainerChildren,hm=e.replaceContainerChildren,px=e.cloneHiddenInstance,fm=e.cloneHiddenTextInstance,$o=e.isSuspenseInstancePending,Gh=e.isSuspenseInstanceFallback,jh=e.getSuspenseInstanceFallbackErrorDetails,Wh=e.registerSuspenseInstanceRetry,mx=e.canHydrateFormStateMarker,pm=e.isFormStateMarkerMatching,gx=e.getNextHydratableSibling,xx=e.getNextHydratableSiblingAfterSingleton,yx=e.getFirstHydratableChild,vx=e.getFirstHydratableChildWithinContainer,bx=e.getFirstHydratableChildWithinActivityInstance,_x=e.getFirstHydratableChildWithinSuspenseInstance,mm=e.getFirstHydratableChildWithinSingleton,Sx=e.canHydrateInstance,Mx=e.canHydrateTextInstance,gm=e.canHydrateActivityInstance,wx=e.canHydrateSuspenseInstance,Tx=e.hydrateInstance,Rb=e.hydrateTextInstance,xm=e.hydrateActivityInstance,Ex=e.hydrateSuspenseInstance,Ax=e.getNextHydratableInstanceAfterActivityInstance,ym=e.getNextHydratableInstanceAfterSuspenseInstance,Cx=e.commitHydratedInstance,Rx=e.commitHydratedContainer,Nb=e.commitHydratedActivityInstance,Db=e.commitHydratedSuspenseInstance,Nx=e.finalizeHydratedChildren,ld=e.flushHydrationEvents;e.clearActivityBoundary;var vm=e.clearSuspenseBoundary;e.clearActivityBoundaryFromContainer;var Xh=e.clearSuspenseBoundaryFromContainer,Dx=e.hideDehydratedBoundary,Lx=e.unhideDehydratedBoundary,qc=e.shouldDeleteUnhydratedTailInstances;e.diffHydratedPropsForDevWarnings,e.diffHydratedTextForDevWarnings,e.describeHydratableInstanceForDevWarnings;var Ix=e.validateHydratableInstance,bm=e.validateHydratableTextInstance,La=e.supportsResources,qh=e.isHostHoistableType,cd=e.getHoistableRoot,_m=e.getResource,Sm=e.acquireResource,Qo=e.releaseResource,Px=e.hydrateHoistable,Mm=e.mountHoistable,wm=e.unmountHoistable,Yh=e.createHoistableInstance,Ux=e.prepareToCommitHoistables,Tm=e.mayResourceSuspendCommit,Em=e.preloadResource,Ox=e.suspendResource,Hi=e.supportsSingletons,Zh=e.resolveSingletonInstance,Ui=e.acquireSingletonInstance,$i=e.releaseSingletonInstance,Am=e.isHostSingletonType,Xl=e.isSingletonScope,Kh=[],ql=-1,Rr={},Hs=Math.clz32?Math.clz32:R,$h=Math.log,zx=Math.LN2,Qh=256,Yl=262144,Yc=4194304,ud=Vs.unstable_scheduleCallback,Jh=Vs.unstable_cancelCallback,Bx=Vs.unstable_shouldYield,Cm=Vs.unstable_requestPaint,ms=Vs.unstable_now,ef=Vs.unstable_ImmediatePriority,Vx=Vs.unstable_UserBlockingPriority,dd=Vs.unstable_NormalPriority,tf=Vs.unstable_IdlePriority,Rm=Vs.log,Fx=Vs.unstable_setDisableYieldValue,Zl=null,Gs=null,Ai=typeof Object.is=="function"?Object.is:ue,nf=typeof reportError=="function"?reportError:function(l){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var u=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof l=="object"&&l!==null&&typeof l.message=="string"?String(l.message):String(l),error:l});if(!window.dispatchEvent(u))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",l);return}console.error(l)},Lb=Object.prototype.hasOwnProperty,sf,Nr,hd=!1,Nm=new WeakMap,co=[],Dr=0,jn=null,fd=0,Ia=[],oa=0,Pa=null,os=1,nr="",Qi=v(null),uo=v(null),ls=v(null),pd=v(null),Gi=null,ri=null,xn=!1,Lr=null,Cs=!1,af=Error(s(519)),Ua=v(null),Kn=null,ir=null,kx=typeof AbortController<"u"?AbortController:function(){var l=[],u=this.signal={aborted:!1,addEventListener:function(g,b){l.push(b)}};this.abort=function(){u.aborted=!0,l.forEach(function(g){return g()})}},Ji=Vs.unstable_scheduleCallback,Ib=Vs.unstable_NormalPriority,oi={$$typeof:Na,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0},md=null,Fn=null,gs=!1,Oa=!1,rf=!1,Jo=0,Zc=null,Dm=0,ho=0,ji=null,za=Lt.S;Lt.S=function(l,u){tc=ms(),typeof u=="object"&&u!==null&&typeof u.then=="function"&&et(l,u),za!==null&&za(l,u)};var el=v(null),Wi=Error(s(460)),of=Error(s(474)),Ba=Error(s(542)),Ir={then:function(){}},Rs=null,tl=null,Kl=0,cs=Us(!0),Lm=Us(!1),us=[],Pr=0,$l=0,la=!1,lf=!1,Ql
4121=v(null),nl=v(0),js=v(null),Ws=null,Si=v(0),fo=0,tn=null,At=null,Wt=null,on=!1,an=!1,Mn=!1,xs=0,Va=0,sr=null,Im=0,ca={readContext:vt,use:dt,useCallback:Ye,useContext:Ye,useEffect:Ye,useImperativeHandle:Ye,useLayoutEffect:Ye,useInsertionEffect:Ye,useMemo:Ye,useReducer:Ye,useRef:Ye,useState:Ye,useDebugValue:Ye,useDeferredValue:Ye,useTransition:Ye,useSyncExternalStore:Ye,useId:Ye,useHostTransitionStatus:Ye,useFormState:Ye,useActionState:Ye,useOptimistic:Ye,useMemoCache:Ye,useCacheRefresh:Ye};ca.useEffectEvent=Ye;var fi={readContext:vt,use:dt,useCallback:function(l,u){return fn().memoizedState=[l,u===void 0?null:u],l},useContext:vt,useEffect:Vu,useImperativeHandle:function(l,u,g){g=g!=null?g.concat([l]):null,Nl(4194308,4,wc.bind(null,u,l),g)},useLayoutEffect:function(l,u){return Nl(4194308,4,l,u)},useInsertionEffect:function(l,u){Nl(4,2,l,u)},useMemo:function(l,u){var g=fn();u=u===void 0?null:u;var b=l();if(Mn){ie(!0);try{l()}finally{ie(!1)}}return g.memoizedState=[b,u],b},useReducer:function(l,u,g){var b=fn();if(g!==void 0){var C=g(u);if(Mn){ie(!0);try{g(u)}finally{ie(!1)}}}else C=u;return b.memoizedState=b.baseState=C,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:C},b.queue=l,l=l.dispatch=Mb.bind(null,tn,l),[b.memoizedState,l]},useRef:function(l){var u=fn();return l={current:l},u.memoizedState=l},useState:function(l){l=mr(l);var u=l.queue,g=A0.bind(null,tn,u);return u.dispatch=g,[l.memoizedState,g]},useDebugValue:ku,useDeferredValue:function(l,u){var g=fn();return Ec(g,l,u)},useTransition:function(){var l=mr(!1);return l=w0.bind(null,tn,l.queue,!0,!1),fn().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,u,g){var b=tn,C=fn();if(xn){if(g===void 0)throw Error(s(407));g=g()}else{if(g=u(),ln===null)throw Error(s(349));(yn&127)!==0||On(b,u,g)}C.memoizedState=g;var D={value:g,getSnapshot:u};return C.queue=D,Vu(Ma.bind(null,b,D,l),[l]),b.flags|=2048,na(9,{destroy:void 0},Jn.bind(null,b,D,g,u),null),g},useId:function(){var l=fn(),u=ln.identifierPrefix;if(xn){var g=nr,b=os;g=(b&~(1<<32-Hs(b)-1)).toString(32)+g,u="_"+u+"R_"+g,g=xs++,0<g&&(u+="H"+g.toString(32)),u+="_"}else g=Im++,u="_"+u+"r_"+g.toString(32)+"_";return l.memoizedState=u},useHostTransitionStatus:Tp,useFormState:Sp,useActionState:Sp,useOptimistic:function(l){var u=fn();u.memoizedState=u.baseState=l;var g={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return u.queue=g,u=ph.bind(null,tn,!0,g),g.dispatch=u,[l,u]},useMemoCache:Yi,useCacheRefresh:function(){return fn().memoizedState=Sb.bind(null,tn)},useEffectEvent:function(l){var u=fn(),g={impl:l};return u.memoizedState=g,function(){if((pn&2)!==0)throw Error(s(440));return g.impl.apply(void 0,arguments)}}},Ur={readContext:vt,use:dt,useCallback:hh,useContext:vt,useEffect:Mc,useImperativeHandle:M0,useInsertionEffect:zo,useLayoutEffect:Fu,useMemo:Tc,useReducer:bi,useRef:dh,useState:function(){return bi(qt)},useDebugValue:ku,useDeferredValue:function(l,u){var g=Ht();return wp(g,At.memoizedState,l,u)},useTransition:function(){var l=bi(qt)[0],u=Ht().memoizedState;return[typeof l=="boolean"?l:Rn(l),u]},useSyncExternalStore:Os,useId:fh,useHostTransitionStatus:Tp,useFormState:_c,useActionState:_c,useOptimistic:function(l,u){var g=Ht();return Uo(g,At,l,u)},useMemoCache:Yi,useCacheRefresh:E0};Ur.useEffectEvent=Ms;var il={readContext:vt,use:dt,useCallback:hh,useContext:vt,useEffect:Mc,useImperativeHandle:M0,useInsertionEffect:zo,useLayoutEffect:Fu,useMemo:Tc,useReducer:ta,useRef:dh,useState:function(){return ta(qt)},useDebugValue:ku,useDeferredValue:function(l,u){var g=Ht();return At===null?Ec(g,l,u):wp(g,At.memoizedState,l,u)},useTransition:function(){var l=ta(qt)[0],u=Ht().memoizedState;return[typeof l=="boolean"?l:Rn(l),u]},useSyncExternalStore:Os,useId:fh,useHostTransitionStatus:Tp,useFormState:Sc,useActionState:Sc,useOptimistic:function(l,u){var g=Ht();return At!==null?Uo(g,At,l,u):(g.baseState=l,[l,g.queue.dispatch])},useMemoCache:Yi,useCacheRefresh:E0};il.useEffectEvent=Ms;var gd={enqueueSetState:function(l,u,g){l=l._reactInternals;var b=si(),C=_s(b);C.payload=u,g!=null&&(C.callback=g),u=Qa(l,C,b),u!==null&&(di(u,l,b),fr(u,l,b))},enqueueReplaceState:function(l,u,g){l=l._reactInternals;var b=si(),C=_s(b);C.tag=1,C.payload=u,g!=null&&(C.callback=g),u=Qa(l,C,b),u!==null&&(di(u,l,b),fr(u,l,b))},enqueueForceUpdate:function(l,u){l=l._reactInternals;var g=si(),b=_s(g);b.tag=2,u!=null&&(b.callback=u),u=Qa(l,b,g),u!==null&&(di(u,l,g),fr(u,l,g))}},Ns=Error(s(461)),ei=!1,Jl={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},Mi=!1,wi=!1,Kc=!1,Pm=typeof WeakSet=="function"?WeakSet:Set,Ci=null,pi=null,Ri=!1,kn=null,ua=8192,$c={getCacheForType:function(l){var u=vt(oi),g=u.data.get(l);return g===void 0&&(g=l(),u.data.set(l,g)),g},cacheSignal:function(){return vt(oi).controller.signal}},Fa=0,Qc=1,Jc=2,xd=3,sl=4;if(typeof Symbol=="function"&&Symbol.for){var ec=Symbol.for;Fa=ec("selector.component"),Qc=ec("selector.has_pseudo_class"),Jc=ec("selector.role"),xd=ec("selector.test_id"),sl=ec("selector.text")}var da=typeof WeakMap=="function"?WeakMap:Map,pn=0,ln=null,mn=null,yn=0,Hn=0,Oi=null,ar=!1,al=!1,rl=!1,Or=0,mi=0,po=0,ol=0,eu=0,Ds=0,tu=0,yd=null,Xs=null,cf=!1,vd=0,tc=0,ll=1/0,bd=null,mo=null,zi=0,go=null,nc=null,zr=0,nu=0,uf=null,Um=null,Nn=0,_d=null;return rn.attemptContinuousHydration=function(l){if(l.tag===13||l.tag===31){var u=Ka(l,67108864);u!==null&&di(u,l,67108864),td(l,67108864)}},rn.attemptHydrationAtCurrentPriority=function(l){if(l.tag===13||l.tag===31){var u=si();u=W(u);var g=Ka(l,u);g!==null&&di(g,l,u),td(l,u)}},rn.attemptSynchronousHydration=function(l){switch(l.tag){case 3:if(l=l.stateNode,l.current.memoizedState.isDehydrated){var u=A(l.pendingLanes);if(u!==0){for(l.pendingLanes|=2,l.entangledLanes|=2;u;){var g=1<<31-Hs(u);l.entanglements[1]|=g,u&=~g}Re(l),(pn&6)===0&&(ll=ms()+500,Fe(0))}}break;case 31:case 13:u=Ka(l,2),u!==null&&di(u,l,2),Ah(),td(l,2)}},rn.batchedUpdates=function(l,u){return l(u)},rn.createComponentSelector=function(l){return{$$typeof:Fa,value:l}},rn.createContainer=function(l,u,g,b,C,D,k,ne,we,Ge){return qo(l,u,!1,null,g,b,D,null,k,ne,we,Ge)},rn.createHasPseudoClassSelector=function(l){return{$$typeof:Qc,value:l}},rn.createHydrationContainer=function(l,u,g,b,C,D,k,ne,we,Ge,nt,qe,ft,$t){var Ni;return l=qo(g,b,!0,l,C,D,ne,$t,we,Ge,nt,qe),l.context=Ih(null),g=l.current,b=si(),b=W(b),C=_s(b),C.callback=(Ni=u)!=null?Ni:null,Qa(g,C,b),u=b,l.current.lanes=u,O(l,u),Re(l),l},rn.createPortal=function(l,u,g){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Vl,key:b==null?null:""+b,children:l,containerInfo:u,implementation:g}},rn.createRoleSelector=function(l){return{$$typeof:Jc,value:l}},rn.createTestNameSelector=function(l){return{$$typeof:xd,value:l}},rn.createTextSelector=function(l){return{$$typeof:sl,value:l}},rn.defaultOnCaughtError=function(l){console.error(l)},rn.defaultOnRecoverableError=function(l){nf(l)},rn.defaultOnUncaughtError=function(l){nf(l)},rn.deferredUpdates=function(l){var u=Lt.T,g=Da();try{return gn(32),Lt.T=null,l()}finally{gn(g),Lt.T=u}},rn.discreteUpdates=function(l,u,g,b,C){var D=Lt.T,k=Da();try{return gn(2),Lt.T=null,l(u,g,b,C)}
4121finally{gn(k),Lt.T=D,pn===0&&(ll=ms()+500)}},rn.findAllNodes=Bs,rn.findBoundingRects=function(l,u){if(!ki)throw Error(s(363));u=Bs(l,u),l=[];for(var g=0;g<u.length;g++)l.push(kh(u[g]));for(u=l.length-1;0<u;u--){g=l[u];for(var b=g.x,C=b+g.width,D=g.y,k=D+g.height,ne=u-1;0<=ne;ne--)if(u!==ne){var we=l[ne],Ge=we.x,nt=Ge+we.width,qe=we.y,ft=qe+we.height;if(b>=Ge&&D>=qe&&C<=nt&&k<=ft){l.splice(u,1);break}else if(b!==Ge||g.width!==we.width||ft<D||qe>k){if(!(D!==qe||g.height!==we.height||nt<b||Ge>C)){Ge>b&&(we.width+=Ge-b,we.x=b),nt<C&&(we.width=C-Ge),l.splice(u,1);break}}else{qe>D&&(we.height+=qe-D,we.y=D),ft<k&&(we.height=k-qe),l.splice(u,1);break}}}return l},rn.findHostInstance=ed,rn.findHostInstanceWithNoPortals=function(l){return l=h(l),l=l!==null?p(l):null,l===null?null:Gc(l.stateNode)},rn.findHostInstanceWithWarning=function(l){return ed(l)},rn.flushPassiveEffects=Ar,rn.flushSyncFromReconciler=function(l){var u=pn;pn|=1;var g=Lt.T,b=Da();try{if(gn(2),Lt.T=null,l)return l()}finally{gn(b),Lt.T=g,pn=u,(pn&6)===0&&Fe(0)}},rn.flushSyncWork=Ah,rn.focusWithin=function(l,u){if(!ki)throw Error(s(363));for(l=Ho(l),u=Oc(l,u),u=Array.from(u),l=0;l<u.length;){var g=u[l++],b=g.tag;if(!Ko(g)){if((b===5||b===26||b===27)&&lo(g.stateNode))return!0;for(g=g.child;g!==null;)u.push(g),g=g.sibling}}return!1},rn.getFindAllNodesFailureDescription=function(l,u){if(!ki)throw Error(s(363));var g=0,b=[];l=[Ho(l),0];for(var C=0;C<l.length;){var D=l[C++],k=D.tag,ne=l[C++],we=u[ne];if((k!==5&&k!==26&&k!==27||!Ko(D))&&(Go(D,we)&&(b.push(Uc(we)),ne++,ne>g&&(g=ne)),ne<u.length))for(D=D.child;D!==null;)l.push(D,ne),D=D.sibling}if(g<u.length){for(l=[];g<u.length;g++)l.push(Uc(u[g]));return`findAllNodes was able to match part of the selector: 4122 `+(b.join(" > ")+` 4123 4124No matching component was found for: 4125 `)+l.join(" > ")}return null},rn.getPublicRootInstance=function(l){if(l=l.current,!l.child)return null;switch(l.child.tag){case 27:case 5:return Gc(l.child.stateNode);default:return l.child.stateNode}},rn.injectIntoDevTools=function(){var l={bundleType:0,version:Kp,rendererPackageName:sd,currentDispatcherRef:Lt,reconcilerVersion:"19.2.0"};if(Hc!==null&&(l.rendererConfig=Hc),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")l=!1;else{var u=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(u.isDisabled||!u.supportsFiber)l=!0;else{try{Zl=u.inject(l),Gs=u}catch{}l=!!u.checkDCE}}return l},rn.isAlreadyRendering=function(){return(pn&6)!==0},rn.observeVisibleRects=function(l,u,g,b){if(!ki)throw Error(s(363));l=Bs(l,u);var C=Hh(l,g,b).disconnect;return{disconnect:function(){C()}}},rn.shouldError=function(){return null},rn.shouldSuspend=function(){return!1},rn.startHostTransition=function(l,u,g,b){if(l.tag!==5)throw Error(s(476));var C=T0(l).queue;w0(l,C,u,jl,g===null?i:function(){var D=T0(l);return D.next===null&&(D=l.alternate.memoizedState),Hu(l,D.next.queue,{},si()),g(b)})},rn.updateContainer=function(l,u,g,b){var C=u.current,D=si();return Yp(C,D,l,u,g,b),D},rn.updateContainerSync=function(l,u,g,b){return Yp(u.current,2,l,u,g,b),2},rn},n.exports.default=n.exports,Object.defineProperty(n.exports,"__esModule",{value:!0})})(VC)),VC.exports}var kC;function AW(){return kC||(kC=1,BC.exports=EW()),BC.exports}var CW=AW();const RW=TW(CW);function NW(n){const e=RW(n);return e.injectIntoDevTools(),e}const EI=0,rp={},DW=/^three(?=[A-Z])/,_b=n=>`${n[0].toUpperCase()}${n.slice(1)}`;let LW=0;const IW=n=>typeof n=="function";function PW(n){if(IW(n)){const e=`${LW++}`;return rp[e]=n,e}else Object.assign(rp,n)}function AI(n,e){const t=_b(n),i=rp[t];if(n!=="primitive"&&!i)throw new Error(`R3F: ${t} 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(n==="primitive"&&!e.object)throw new Error("R3F: Primitives without 'object' are invalid!");if(e.args!==void 0&&!Array.isArray(e.args))throw new Error("R3F: The args prop must be an array!")}function UW(n,e,t){var i;return n=_b(n)in rp?n:n.replace(DW,""),AI(n,e),n==="primitive"&&(i=e.object)!=null&&i.__r3f&&delete e.object.__r3f,_1(e.object,t,n,e)}function OW(n){if(!n.isHidden){var e;n.props.attach&&(e=n.parent)!=null&&e.object?M1(n.parent,n):ja(n.object)&&(n.object.visible=!1),n.isHidden=!0,yp(n)}}
4125function CI(n){if(n.isHidden){var e;n.props.attach&&(e=n.parent)!=null&&e.object?S1(n.parent,n):ja(n.object)&&n.props.visible!==!1&&(n.object.visible=!0),n.isHidden=!1,yp(n)}}function vT(n,e,t){const i=e.root.getState();if(!(!n.parent&&n.object!==i.scene)){if(!e.object){var s,o;const c=rp[_b(e.type)];e.object=(s=e.props.object)!=null?s:new c(...(o=e.props.args)!=null?o:[]),e.object.__r3f=e}if(_u(e.object,e.props),e.props.attach)S1(n,e);else if(ja(e.object)&&ja(n.object)){const c=n.object.children.indexOf(t?.object);if(t&&c!==-1){const h=n.object.children.indexOf(e.object);if(h!==-1){n.object.children.splice(h,1);const f=h<c?c-1:c;n.object.children.splice(f,0,e.object)}else e.object.parent=n.object,n.object.children.splice(c,0,e.object),e.object.dispatchEvent({type:"added"}),n.object.dispatchEvent({type:"childadded",child:e.object})}else n.object.add(e.object)}for(const c of e.children)vT(e,c);yp(e)}}function SS(n,e){e&&(e.parent=n,n.children.push(e),vT(n,e))}function HC(n,e,t){if(!e||!t)return;e.parent=n;const i=n.children.indexOf(t);i!==-1?n.children.splice(i,0,e):n.children.push(e),vT(n,e,t)}function RI(n){if(typeof n.dispose=="function"){const e=()=>{try{n.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT<"u"?e():NM.unstable_scheduleCallback(NM.unstable_IdlePriority,e)}}function LM(n,e,t){if(!e)return;e.parent=null;const i=n.children.indexOf(e);i!==-1&&n.children.splice(i,1),e.props.attach?M1(n,e):ja(e.object)&&ja(n.object)&&(n.object.remove(e.object),mW(yT(e),e.object));const s=e.props.dispose!==null&&t!==!1;for(let o=e.children.length-1;o>=0;o--){const c=e.children[o];LM(e,c,s)}e.children.length=0,delete e.object.__r3f,s&&e.type!=="primitive"&&e.object.type!=="Scene"&&RI(e.object),t===void 0&&yp(e)}function zW(n,e){for(const t of[n,n.alternate])if(t!==null)if(typeof t.ref=="function"){t.refCleanup==null||t.refCleanup();const i=t.ref(e);typeof i=="function"&&(t.refCleanup=i)}else t.ref&&(t.ref.current=e)}const yv=[];function BW(){for(const[t]of yv){const i=t.parent;if(i){t.props.attach?M1(i,t):ja(t.object)&&ja(i.object)&&i.object.remove(t.object);for(const s of t.children)s.props.attach?M1(t,s):ja(s.object)&&ja(t.object)&&t.object.remove(s.object)}t.isHidden&&CI(t),t.object.__r3f&&delete t.object.__r3f,t.type!=="primitive"&&RI(t.object)}for(const[t,i,s]of yv){t.props=i;const o=t.parent;if(o){var n,e;const c=rp[_b(t.type)],h=t.object;
4125t.object=(n=t.props.object)!=null?n:new c(...(e=t.props.args)!=null?e:[]),t.object.__r3f=t,zW(s,t.object),pW(yT(t),h,t.object),_u(t.object,t.props),t.props.attach?S1(o,t):ja(t.object)&&ja(o.object)&&o.object.add(t.object);for(const f of t.children)f.props.attach?S1(t,f):ja(f.object)&&ja(t.object)&&t.object.add(f.object);yp(t)}}yv.length=0}const MS=()=>{},GC={};let ev=EI;const VW=0,FW=4,IM=NW({isPrimaryRenderer:!1,warnsIfNotActing:!1,supportsMutation:!0,supportsPersistence:!1,supportsHydration:!1,createInstance:UW,removeChild:LM,appendChild:SS,appendInitialChild:SS,insertBefore:HC,appendChildToContainer(n,e){const t=n.getState().scene.__r3f;!e||!t||SS(t,e)},removeChildFromContainer(n,e){const t=n.getState().scene.__r3f;!e||!t||LM(t,e)},insertInContainerBefore(n,e,t){const i=n.getState().scene.__r3f;!e||!t||!i||HC(i,e,t)},getRootHostContext:()=>GC,getChildHostContext:()=>GC,commitUpdate(n,e,t,i,s){var o,c,h;AI(e,i);let f=!1;if((n.type==="primitive"&&t.object!==i.object||((o=i.args)==null?void 0:o.length)!==((c=t.args)==null?void 0:c.length)||(h=i.args)!=null&&h.some((x,y)=>{var v;return x!==((v=t.args)==null?void 0:v[y])}))&&(f=!0),f)yv.push([n,{...i},s]);else{const x=uW(n,i);Object.keys(x).length&&(Object.assign(n.props,x),_u(n.object,x))}(s.sibling===null||(s.flags&FW)===VW)&&BW()},finalizeInitialChildren:()=>!1,commitMount(){},getPublicInstance:n=>n?.object,prepareForCommit:()=>null,preparePortalMount:n=>_1(n.getState().scene,n,"",{}),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance:OW,unhideInstance:CI,createTextInstance:MS,hideTextInstance:MS,unhideTextInstance:MS,scheduleTimeout:typeof setTimeout=="function"?setTimeout:void 0,cancelTimeout:typeof clearTimeout=="function"?clearTimeout:void 0,noTimeout:-1,getInstanceFromNode:()=>null,beforeActiveInstanceBlur(){},afterActiveInstanceBlur(){},detachDeletedInstance(){},prepareScopeUpdate(){},getInstanceFromScope:()=>null,shouldAttemptEagerTransition:()=>!1,trackSchedulerEvent:()=>{},resolveEventType:()=>null,resolveEventTimeStamp:()=>-1.1,requestPostPaintCallback(){},maySuspendCommit:()=>!1,preloadInstance:()=>!0,suspendInstance(){},waitForCommitToBeReady:()=>null,NotPendingTransition:null,HostTransitionContext:K.createContext(null),setCurrentUpdatePriority(n){ev=n},getCurrentUpdatePriority(){return ev},resolveUpdatePriority(){var n;if(ev!==EI)return ev;switch(typeof window<"u"&&((n=window.event)==null?void 0:n.type)){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return MW;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return _W;default:return SW}},resetFormInstance(){},rendererPackageName:"@react-three/fiber",rendererVersion:wW.version,applyViewTransitionName(n,e,t){},restoreViewTransitionName(n,e){},cancelViewTransitionName(n,e,t){},cancelRootViewTransitionName(n){},restoreRootViewTransitionName(n){},InstanceMeasurement:null,measureInstance:n=>null,wasInstanceInViewport:n=>!0,hasInstanceChanged:(n,e)=>!1,hasInstanceAffectedParent:(n,e)=>!1,suspendOnActiveViewTransition(n,e){},startGestureTransition:()=>null,startViewTransition:()=>null,stopViewTransition(n){},createViewTransitionInstance:n=>null,getCurrentGestureOffset(n){throw new Error("startGestureTransition is not yet supported in react-three-fiber.")},cloneMutableInstance(n,e){return n},cloneMutableTextInstance(n){return n},cloneRootViewTransitionContainer(n){throw new Error("Not implemented.")},removeRootViewTransitionClone(n,e){throw new Error("Not implemented.")},createFragmentInstance:n=>null,updateFragmentInstanceFiber(n,e){},commitNewChildToFragmentInstance(n,e){},deleteChildFromFragmentInstance(n,e){},measureClonedInstance:n=>null,maySuspendCommitOnUpdate:(n,e,t)=>!1,maySuspendCommitInSyncRender:(n,e)=>!1,startSuspendingCommit:()=>null,getSuspendedCommitReason:(n,e)=>null}),th=new Map,zf={objects:"shallow",strict:!1};function kW(n,e){if(!e&&typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement&&n.parentElement){const{width:t,height:i,top:s,left:o}=n.parentElement.getBoundingClientRect();return{width:t,height:i,top:s,left:o}}else if(!e&&typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas)return{width:n.width,height:n.height,top:0,left:0};return{width:0,height:0,top:0,left:0,...e}}function HW(n){const e=th.get(n),t=e?.fiber,i=e?.store;e&&console.warn("R3F.createRoot should only be called once!");const s=typeof reportError=="function"?reportError:console.error,o=i||xW(OM,WC),c=t||IM.createContainer(o,bW,null,!1,null,"",s,s,s,null);e||th.set(n,{fiber:c,store:o});let h,f,p=!1,x=null;return{async configure(y={}){let v;x=new Promise(q=>v=q);let{gl:S,size:M,scene:R,events:A,onCreated:w,shadows:N=!1,linear:L=!1,flat:I=!1,legacy:B=!1,orthographic:O=!1,frameloop:F="always",dpr:P=[1,2],performance:V,raycaster:j,camera:W,onPointerMissed:ee}=y,ie=o.getState(),ue=ie.gl;if(!ie.gl){const q={canvas:n,powerPreference:"high-performance",antialias:!0,alpha:!0},ae=typeof S=="function"?await S(q):S;zC(ae)?ue=ae:ue=new mI({...q,...S}),ie.set({gl:ue})}let Q=ie.raycaster;Q||ie.set({raycaster:Q=new sI});const{params:Y,...$}=j||{};if(xi.equ($,Q,zf)||_u(Q,{...$}),xi.equ(Y,Q.params,zf)||_u(Q,{params:{...Q.params,...Y}}),!ie.camera||ie.camera===f&&!xi.equ(f,W,zf)){f=W;const q=W?.isCamera,ae=q?W:O?new gp(0,0,0,0,.1,1e3):new vs(75,0,.1,1e3);q||(ae.position.z=5,W&&(_u(ae,W),ae.manual||("aspect"in W||"left"in W||"right"in W||"bottom"in W||"top"in W)&&(ae.manual=!0,ae.updateProjectionMatrix())),!ie.camera&&!(W!=null&&W.rotation)&&ae.lookAt(0,0,0)),ie.set({camera:ae}),Q.camera=ae}if(!ie.scene){let q;R!=null&&R.isScene?(q=R,_1(q,o,"",{})):(q=new Hw,_1(q,o,"",{}),R&&_u(q,R)),ie.set({scene:q})}A&&!ie.events.handlers&&ie.set({events:A(o)});const le=kW(n,M);if(xi.equ(le,ie.size,zf)||ie.setSize(le.width,le.height,le.top,le.left),P&&ie.viewport.dpr!==_I(P)&&ie.setDpr(P),ie.frameloop!==F&&ie.setFrameloop(F
4125),ie.onPointerMissed||ie.set({onPointerMissed:ee}),V&&!xi.equ(V,ie.performance,zf)&&ie.set(q=>({performance:{...q.performance,...V}})),!ie.xr){var ge;const q=(Ie,We)=>{const pe=o.getState();pe.frameloop!=="never"&&WC(Ie,!0,pe,We)},ae=()=>{const Ie=o.getState();Ie.gl.xr.enabled=Ie.gl.xr.isPresenting,Ie.gl.xr.setAnimationLoop(Ie.gl.xr.isPresenting?q:null),Ie.gl.xr.isPresenting||OM(Ie)},Ae={connect(){const Ie=o.getState().gl;Ie.xr.addEventListener("sessionstart",ae),Ie.xr.addEventListener("sessionend",ae)},disconnect(){const Ie=o.getState().gl;Ie.xr.removeEventListener("sessionstart",ae),Ie.xr.removeEventListener("sessionend",ae)}};typeof((ge=ue.xr)==null?void 0:ge.addEventListener)=="function"&&Ae.connect(),ie.set({xr:Ae})}if(ue.shadowMap){const q=ue.shadowMap.enabled,ae=ue.shadowMap.type;if(ue.shadowMap.enabled=!!N,xi.boo(N))ue.shadowMap.type=_g;else if(xi.str(N)){var Ce;const Ae={basic:SD,percentage:Xf,soft:_g,variance:Fd};ue.shadowMap.type=(Ce=Ae[N])!=null?Ce:_g}else xi.obj(N)&&Object.assign(ue.shadowMap,N);(q!==ue.shadowMap.enabled||ae!==ue.shadowMap.type)&&(ue.shadowMap.needsUpdate=!0)}return _n.enabled=!B,p||(ue.outputColorSpace=L?ep:$s,ue.toneMapping=I?jr:V1),ie.legacy!==B&&ie.set(()=>({legacy:B})),ie.linear!==L&&ie.set(()=>({linear:L})),ie.flat!==I&&ie.set(()=>({flat:I})),S&&!xi.fun(S)&&!zC(S)&&!xi.equ(S,ue,zf)&&_u(ue,S),h=w,p=!0,v(),this},render(y){return!p&&!x&&this.configure(),x.then(()=>{IM.updateContainer(E.jsx(GW,{store:o,children:y,onCreated:h,rootElement:n}),c,null,()=>{})}),o},unmount(){NI(n)}}}function GW({store:n,children:e,onCreated:t,rootElement:i}){return _0(()=>{const s=n.getState();s.set(o=>({internal:{...o.internal,active:!0}})),t&&t(s),n.getState().events.connected||s.events.connect==null||s.events.connect(i)},[]),E.jsx(wI.Provider,{value:n,children:e})}function NI(n,e){const t=th.get(n),i=t?.fiber;if(i){const s=t?.store.getState();s&&(s.internal.active=!1),IM.updateContainer(null,i,null,()=>{s&&setTimeout(()=>{try{var o,c,h,f;s.events.disconnect==null||s.events.disconnect(),(o=s.gl)==null||(c=o.renderLists)==null||c.dispose==null||c.dispose(),(h=s.gl)==null||h.forceContextLoss==null||h.forceContextLoss(),(f=s.gl)!=null&&f.xr&&s.xr.disconnect(),oW(s.scene),th.delete(n)}catch{}},500)})}}const jW=new Set,WW=new Set,XW=new Set;function wS(n,e){if(n.size)for(const{callback:t}of n.values())t(e)}function Lg(n,e){switch(n){case"before":return wS(jW,e);case"after":return wS(WW,e);case"tail":return wS(XW,e)}}let TS,ES;function PM(n,e,t){let i=e.clock.getDelta();e.frameloop==="never"&&typeof n=="number"&&(i=n-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=n),TS=e.internal.subscribers;for(let s=0;s<TS.length;s++)ES=TS[s],ES.ref.current(ES.store.getState(),i,t);return!e.internal.priority&&e.gl.render&&e.gl.render(e.scene,e.camera),e.internal.frames=Math.max(0,e.internal.frames-1),e.frameloop==="always"?1:e.internal.frames}let w1=!1,UM=!1,AS,jC,Bf;function DI(n){jC=requestAnimationFrame(DI),w1=!0,AS=0,Lg("before",n),UM=!0;for(const t of th.values()){var e;Bf=t.store.getState(),Bf.internal.active&&(Bf.frameloop==="always"||Bf.internal.frames>0)&&!((e=Bf.gl.xr)!=null&&e.isPresenting)&&(AS+=PM(n,Bf))}if(UM=!1,Lg("after",n),AS===0)return Lg("tail",n),w1=!1,cancelAnimationFrame(jC)}function OM(n,e=1){var t;if(!n)return th.forEach(i=>OM(i.store.getState(),e));(t=n.gl.xr)!=null&&t.isPresenting||!n.internal.active||n.frameloop==="never"||(e>1?n.internal.frames=Math.min(60,n.internal.frames+e):UM?n.internal.frames=2:n.internal.frames=1,w1||(w1=!0,requestAnimationFrame(DI)))}function WC(n,e=!0,t,i){if(e&&Lg("before",n),t)PM(n,t,i);else for(const s of th.values())PM(n,s.store.getState());e&&Lg("after",n)}const CS={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 qW(n){const{handlePointer:e}=gW(n);return{priority:1,enabled:!0,compute(t,i,s){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(CS).reduce((t,i)=>({...t,[i]:e(i)}),{}),update:()=>{var t;const{events:i,internal:s}=n.getState();(t=s.lastEvent)!=null&&t.current&&i.handlers&&i.handlers.onPointerMove(s.lastEvent.current)},connect:t=>{const{set:i,events:s}=n.getState();if(s.disconnect==null||s.disconnect(),i(o=>({events:{...o.events,connected:t}})),s.handlers)for(const o in s.handlers){const c=s.handlers[o],[h,f]=CS[o];t.addEventListener(h,c,{passive:f})}},disconnect:()=>{const{set:t,events:i}=n.getState();if(i.connected){if(i.handlers)for(const s in i.handlers){const o=i.handlers[s],[c]=CS[s];i.connected.removeEventListener(c,o)}t(s=>({events:{...s.events,connected:void 0}}))}}}}function XC(n,e){let t;return(...i)=>{window.clearTimeout(t),t=window.setTimeout(()=>n(...i),e)}}function YW({debounce:n,scroll:e,polyfill:t,offsetSize:i}={debounce:0,scroll:!1,offsetSize:!1}){const s=t||(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,c]=K.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}
4125),h=K.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o,orientationHandler:null}),f=n?typeof n=="number"?n:n.scroll:null,p=n?typeof n=="number"?n:n.resize:null,x=K.useRef(!1);K.useEffect(()=>(x.current=!0,()=>{x.current=!1}));const[y,v,S]=K.useMemo(()=>{const w=()=>{if(!h.current.element)return;const{left:N,top:L,width:I,height:B,bottom:O,right:F,x:P,y:V}=h.current.element.getBoundingClientRect(),j={left:N,top:L,width:I,height:B,bottom:O,right:F,x:P,y:V};h.current.element instanceof HTMLElement&&i&&(j.height=h.current.element.offsetHeight,j.width=h.current.element.offsetWidth),Object.freeze(j),x.current&&!QW(h.current.lastBounds,j)&&c(h.current.lastBounds=j)};return[w,p?XC(w,p):w,f?XC(w,f):w]},[c,i,f,p]);function M(){h.current.scrollContainers&&(h.current.scrollContainers.forEach(w=>w.removeEventListener("scroll",S,!0)),h.current.scrollContainers=null),h.current.resizeObserver&&(h.current.resizeObserver.disconnect(),h.current.resizeObserver=null),h.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",h.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",h.current.orientationHandler))}function R(){h.current.element&&(h.current.resizeObserver=new s(S),h.current.resizeObserver.observe(h.current.element),e&&h.current.scrollContainers&&h.current.scrollContainers.forEach(w=>w.addEventListener("scroll",S,{capture:!0,passive:!0})),h.current.orientationHandler=()=>{S()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",h.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",h.current.orientationHandler))}const A=w=>{!w||w===h.current.element||(M(),h.current.element=w,h.current.scrollContainers=LI(w),R())};return KW(S,!!e),ZW(v),K.useEffect(()=>{M(),R()},[e,S,v]),K.useEffect(()=>M,[]),[A,o,y]}function ZW(n){K.useEffect(()=>{const e=n;return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[n])}function KW(n,e){K.useEffect(()=>{if(e){const t=n;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",t,!0)}}},[n,e])}function LI(n){const e=[];if(!n||n===document.body)return e;const{overflow:t,overflowX:i,overflowY:s}=window.getComputedStyle(n);return[t,i,s].some(o=>o==="auto"||o==="scroll")&&e.push(n),[...e,...LI(n.parentElement)]}const $W=["x","y","top","bottom","left","right","width","height"],QW=(n,e)=>$W.every(t=>n[t]===e[t]);function JW({ref:n,children:e,fallback:t,resize:i,style:s,gl:o,events:c=qW,eventSource:h,eventPrefix:f,shadows:p,linear:x,flat:y,legacy:v,orthographic:S,frameloop:M,dpr:R,performance:A,raycaster:w,camera:N,scene:L,onPointerMissed:I,onCreated:B,...O}){K.useMemo(()=>PW(Vj),[]);const F=sW(),[P,V]=YW({scroll:!0,debounce:{scroll:50,resize:0},...i}),j=K.useRef(null),W=K.useRef(null);K.useImperativeHandle(n,()=>j.current);const ee=bI(I),[ie,ue]=K.useState(!1),[Q,Y]=K.useState(!1);if(ie)throw ie;if(Q)throw Q;const $=K.useRef(null);_0(()=>{const ge=j.current;if(V.width>0&&V.height>0&&ge){$.current||($.current=HW(ge));async function Ce(){await $.current.configure({gl:o,scene:L,events:c,shadows:p,linear:x,flat:y,legacy:v,orthographic:S,frameloop:M,dpr:R,performance:A,raycaster:w,camera:N,size:V,onPointerMissed:(...q)=>ee.current==null?void 0:ee.current(...q),onCreated:q=>{q.events.connect==null||q.events.connect(h?nW(h)?h.current:h:W.current),f&&q.setEvents({compute:(ae,Ae)=>{const Ie=ae[f+"X"],We=ae[f+"Y"];Ae.pointer.set(Ie/Ae.size.width*2-1,-(We/Ae.size.height)*2+1),Ae.raycaster.setFromCamera(Ae.pointer,Ae.camera)}}),B?.(q)}}),$.current.render(E.jsx(F,{children:E.jsx(rW,{set:Y,children:E.jsx(K.Suspense,{fallback:E.jsx(aW,{set:ue}),children:e??null})})}))}Ce()}}),K.useEffect(()=>{const ge=j.current;if(ge)return()=>NI(ge)},[]);const le=h?"none":"auto";return E.jsx("div",{ref:W,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:le,...s},...O,children:E.jsx("div",{ref:P,style:{width:"100%",height:"100%"},children:E.jsx("canvas",{ref:j,style:{display:"block"},children:t})})})}function eX(n){return E.jsx(xI,{children:E.jsx(JW,{...n})})}const _o=800,tX=120,RS=80,qC=["#00E5FF","#7C3AED","#F472B6"];function nX(){const n=K.useRef(null),e=K.useRef(null),t=K.useRef({x:0,y:0,active:!1}),{size:i,viewport:s}=yW(),[o,c,h]=K.useMemo(()=>{const M=new Float32Array(_o*3),R=new Float32Array(_o*3),A=new Float32Array(_o*3);for(let w=0;w<_o;w++){M[w*3]=(Math.random()-.5)*s.width,M[w*3+1]=(Math.random()-.5)*s.height,M[w*3+2]=(Math.random()-.5)*2,R[w*3]=(Math.random()-.5)*5e-4,R[w*3+1]=(Math.random()-.5)*5e-4,R[w*3+2]=0;const N=qC[Math.floor(Math.random()*qC.length)],L=new mt(N);A[w*3]=L.r,A[w*3+1]=L.g,A[w*3+2]=L.b}return[M,R,A]},[s]),f=K.useMemo(()=>new Float32Array(_o*_o*6),[]),p=K.useMemo(()=>new Float32Array(_o*_o*6),[]),x=K.useCallback(M=>{const R=M.clientX/i.width*s.width-s.width/2,A=-(M.clientY/i.height)*s.height+s.height/2;t.current={x:R,y:A,active:!0}},[i,s]),y=K.useCallback(()=>{t.current.active=!1},[]);K.useEffect(()=>(window.addEventListener("pointermove",x),window.addEventListener("pointerleave",y),()=>{window.removeEventListener("pointermove",x),window.removeEventListener("pointerleave",y)}),[x,y]),vW(()=>{if(!n.current)return;const M=n.current.geometry.attributes.position,R=M.array,A=t.current;for(let w=0;w<_o;
4125w++){let N=R[w*3],L=R[w*3+1],I=R[w*3+2];if(N+=c[w*3],L+=c[w*3+1],A.active){const F=N-A.x,P=L-A.y,V=Math.sqrt(F*F+P*P);if(V<RS&&V>.1){const j=(RS-V)/RS*.02;N+=F/V*j,L+=P/V*j}}const B=s.width/2+50,O=s.height/2+50;N<-B&&(N=B),N>B&&(N=-B),L<-O&&(L=O),L>O&&(L=-O),R[w*3]=N,R[w*3+1]=L,R[w*3+2]=I}if(M.needsUpdate=!0,e.current){let w=0;const N=f,L=p;for(let O=0;O<_o&&w<N.length/6-1;O++)for(let F=O+1;F<_o;F++){const P=R[O*3]-R[F*3],V=R[O*3+1]-R[F*3+1];Math.sqrt(P*P+V*V)<tX&&(N[w*6]=R[O*3],N[w*6+1]=R[O*3+1],N[w*6+2]=R[O*3+2],N[w*6+3]=R[F*3],N[w*6+4]=R[F*3+1],N[w*6+5]=R[F*3+2],L[w*6]=0,L[w*6+1]=.9,L[w*6+2]=1,L[w*6+3]=0,L[w*6+4]=.9,L[w*6+5]=1,w++)}for(let O=w;O<N.length/6;O++)N[O*6]=0,N[O*6+1]=0,N[O*6+2]=0,N[O*6+3]=0,N[O*6+4]=0,N[O*6+5]=0;const I=e.current.geometry.attributes.position,B=e.current.geometry.attributes.color;I.needsUpdate=!0,B.needsUpdate=!0}});const v=K.useMemo(()=>{const M=new Kt;return M.setAttribute("position",new Vn(o,3)),M.setAttribute("color",new Vn(h,3)),M},[o,h]),S=K.useMemo(()=>{const M=new Kt;return M.setAttribute("position",new Vn(f,3)),M.setAttribute("color",new Vn(p,3)),M},[f,p]);return E.jsxs(E.Fragment,{children:[E.jsx("points",{"code-path":"src/components/ParticleBackground.tsx:156:7",ref:n,geometry:v,children:E.jsx("pointsMaterial",{"code-path":"src/components/ParticleBackground.tsx:157:9",size:2.5,vertexColors:!0,transparent:!0,opacity:.8,sizeAttenuation:!1})}),E.jsx("lineSegments",{"code-path":"src/components/ParticleBackground.tsx:159:7",ref:e,geometry:S,children:E.jsx("lineBasicMaterial",{"code-path":"src/components/ParticleBackground.tsx:160:9",vertexColors:!0,transparent:!0,opacity:.12})})]})}function iX(){const[n,e]=K.useState(!0),t=K.useRef(null);return K.useEffect(()=>{const i=t.current;if(!i)return;const s=new IntersectionObserver(([o])=>e(o.isIntersecting),{threshold:.05});return s.observe(i),()=>s.disconnect()},[]),E.jsx("div",{"code-path":"src/components/ParticleBackground.tsx:182:5",ref:t,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:1},children:n&&E.jsx(eX,{"code-path":"src/components/ParticleBackground.tsx:194:9",orthographic:!0,camera:{zoom:1,position:[0,0,10],near:.1,far:1e3},style:{width:"100%",height:"100%"},gl:{antialias:!1,alpha:!0},dpr:Math.min(window.devicePixelRatio,1.5),children:E.jsx(nX,{"code-path":"src/components/ParticleBackground.tsx:201:11"})})})}function sX(n,e=2,t=!0){const i=K.useRef(null),s=ih(i,{once:!0,amount:.5}),o=O1(0),[c,h]=K.useState("0.0");return K.useEffect(()=>{if(!t||s)return z1(o,n,{duration:e,ease:[.16,1,.3,1],onUpdate:p=>h(p.toFixed(1))}).stop},[s,o,n,e,t]),{ref:i,display:c}}const qa={hidden:{opacity:0,y:40},visible:(n=0)=>({opacity:1,y:0,transition:{duration:.7,delay:n,ease:[.16,1,.3,1]}})},bT={hidden:{},visible:{transition:{staggerChildren:.15}}};function aX(){const{t:n}=ci();return E.jsxs("section",{"code-path":"src/pages/Home.tsx:51:5",className:"relative min-h-[100dvh] flex items-center justify-center overflow-hidden",children:[E.jsx(iX,{"code-path":"src/pages/Home.tsx:52:7"}),E.jsxs("div",{"code-path":"src/pages/Home.tsx:53:7",className:"relative z-10 max-w-[960px] mx-auto px-6 text-center pt-[72px]",children:[E.jsx(be.h1,{"code-path":"src/pages/Home.tsx:54:9",initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.7,delay:.4,ease:[.16,1,.3,1]},className:"font-display text-[40px] md:text-[56px] lg:text-[72px] font-bold leading-[1.05] tracking-[-0.03em] gradient-text mb-6",children:n.hero.headline}),E.jsx(be.p,{"code-path":"src/pages/Home.tsx:63:9",initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6,delay:.7,ease:[.16,1,.3,1]},className:"text-text-secondary text-base md:text-xl max-w-[720px] mx-auto mb-8 leading-relaxed",children:n.hero.subheadline}),E.jsxs(be.div,{"code-path":"src/pages/Home.tsx:72:9",initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.5,delay:.9,ease:[.16,1,.3,1]},className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:[E.jsx("a",{"code-path":"src/pages/Home.tsx:78:11",href:"#services",className:"gradient-accent text-white text-sm font-semibold uppercase tracking-[0.05em] px-8 py-3.5 rounded-lg transition-all duration-200 hover:shadow-glow-cyan hover:scale-[1.03] active:scale-[0.98]",children:n.hero.ctaPrimary}),E.jsx("a",{"code-path":"src/pages/Home.tsx:84:11",href:"#projects",className:"border border-[rgba(0,229,255,0.4)] text-accent-cyan text-sm font-semibold uppercase tracking-[0.05em] px-8 py-3.5 rounded-lg transition-all duration-200 hover:bg-[rgba(0,229,255,0.1)] hover:border-[rgba(0,229,255,0.8)]",children:n.hero.ctaSecondary})]})]}),E.jsxs(be.a,{"code-path":"src/pages/Home.tsx:93:7",href:"#stats",initial:{opacity:0}
4125,animate:{opacity:1},transition:{delay:1.4,duration:.5},className:"absolute bottom-10 left-1/2 -translate-x-1/2 z-10 text-text-muted flex flex-col items-center gap-2 hover:text-accent-cyan transition-colors",children:[E.jsx("span",{"code-path":"src/pages/Home.tsx:100:9",className:"text-xs uppercase tracking-wider",children:n.hero.scrollIndicator}),E.jsx(bR,{"code-path":"src/pages/Home.tsx:101:9",size:24,className:"animate-bounce-scroll"})]})]})}function NS({number:n,suffix:e,context:t,delay:i}){const s=parseFloat(n),{ref:o,display:c}=sX(s,2);return E.jsxs(be.div,{"code-path":"src/pages/Home.tsx:123:5",variants:qa,initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.3},custom:i,className:"gradient-card border border-glass-border rounded-xl p-8 md:p-10 text-center hover:border-[rgba(0,229,255,0.3)] transition-all duration-300 hover:-translate-y-1 hover:shadow-glow-card-hover",children:[E.jsx("div",{"code-path":"src/pages/Home.tsx:131:7",className:"flex items-center justify-center w-10 h-10 rounded-lg gradient-accent mb-4 mx-auto",children:E.jsx(R1,{"code-path":"src/pages/Home.tsx:132:9",size:20,className:"text-white"})}),E.jsx("span",{"code-path":"src/pages/Home.tsx:134:7",ref:o,className:"font-mono text-[40px] md:text-[56px] font-bold text-accent-cyan leading-none block mb-2",children:c}),E.jsx("p",{"code-path":"src/pages/Home.tsx:137:7",className:"text-text-secondary text-sm mb-2",children:e}),E.jsx("p",{"code-path":"src/pages/Home.tsx:138:7",className:"text-text-muted text-sm",children:t})]})}function rX(){const{t:n}=ci();return E.jsxs("section",{"code-path":"src/pages/Home.tsx:147:5",id:"stats",className:"relative py-24 md:py-28 bg-bg-secondary",children:[E.jsx("div",{"code-path":"src/pages/Home.tsx:148:7",className:"absolute top-0 left-0 right-0 h-px bg-gradient-to-r from-transparent via-[rgba(0,229,255,0.3)] to-transparent"}),E.jsxs("div",{"code-path":"src/pages/Home.tsx:149:7",className:"max-w-[1280px] mx-auto px-6 lg:px-12 xl:px-20",children:[E.jsx(be.p,{"code-path":"src/pages/Home.tsx:150:9",variants:qa,initial:"hidden",whileInView:"visible",viewport:{once:!0},className:"text-accent-cyan text-xs uppercase tracking-[0.1em] text-center mb-12 font-medium",children:n.stats.label}),E.jsxs("div",{"code-path":"src/pages/Home.tsx:159:9",className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[E.jsx(NS,{"code-path":"src/pages/Home.tsx:160:11",number:n.stats.gaming.number,suffix:n.stats.gaming.suffix,context:n.stats.gaming.context,delay:0}),E.jsx(NS,{"code-path":"src/pages/Home.tsx:166:11",number:n.stats.video.number,suffix:n.stats.video.suffix,context:n.stats.video.context,delay:.15}),E.jsx(NS,{"code-path":"src/pages/Home.tsx:172:11",number:n.stats.vr.number,suffix:n.stats.vr.suffix,context:n.stats.vr.context,delay:.3})]})]})]})}const oX=[E.jsx(Ug,{"code-path":"src/pages/Home.tsx:186:3",size:24,className:"text-white"}),E.jsx(MU,{"code-path":"src/pages/Home.tsx:187:3",size:24,className:"text-white"}),E.jsx(_R,{"code-path":"src/pages/Home.tsx:188:3",size:24,className:"text-white"})],lX=["from-accent-cyan to-accent-purple","from-accent-purple to-accent-pink","from-accent-pink to-accent-cyan"],cX=["/game-character-design.jpg","/video-digital-human.jpg","/vr-deep-sea.jpg"];function uX(){const{t:n}=ci(),e=[n.services.gaming,n.services.shortVideo,n.services.vrSpace],t=["/games","/short-video","/vr-space"];return E.jsx("section",{"code-path":"src/pages/Home.tsx:205:5",id:"services",className:"py-28 md:py-32 bg-bg-primary",children:E.jsxs("div",{"code-path":"src/pages/Home.tsx:206:7",className:"max-w-[1280px] mx-auto px-6 lg:px-12 xl:px-20",children:[E.jsxs("div",{"code-path":"src/pages/Home.tsx:207:9",className:"text-center mb-16",children:[E.jsx(be.p,{"code-path":"src/pages/Home.tsx:208:11",variants:qa,initial:"hidden",whileInView:"visible",viewport:{once:!0},className:"text-accent-cyan text-xs uppercase tracking-[0.1em] mb-4 font-medium",children:n.services.label}),E.jsx(be.h2,{"code-path":"src/pages/Home.tsx:217:11",variants:qa,initial:"hidden",whileInView:"visible",viewport:{once:!0},custom:.1,className:"font-display text-[32px] md:text-[48px] lg:text-[56px] font-semibold text-text-primary tracking-[-0.02em] mb-6",children:n.services.headline}),E.jsx(be.p,{"code-path":"src/pages/Home.tsx:227:11",variants:qa,initial:"hidden",
4125whileInView:"visible",viewport:{once:!0},custom:.2,className:"text-text-secondary text-base md:text-lg max-w-[720px] mx-auto",children:n.services.description})]}),E.jsx(be.div,{"code-path":"src/pages/Home.tsx:239:9",variants:bT,initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.2},className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:e.map((i,s)=>E.jsxs(be.div,{"code-path":"src/pages/Home.tsx:247:13",variants:qa,className:"group relative gradient-card border border-glass-border rounded-2xl p-8 hover:border-[rgba(0,229,255,0.3)] transition-all duration-400 hover:-translate-y-2 overflow-hidden",children:[E.jsx("img",{"code-path":"src/pages/Home.tsx:252:15",src:cX[s],alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-0 group-hover:opacity-[0.08] transition-opacity duration-400"}),E.jsx("div",{"code-path":"src/pages/Home.tsx:257:15",className:`relative w-12 h-12 rounded-xl bg-gradient-to-br ${lX[s]} flex items-center justify-center mb-5`,children:oX[s]}),E.jsx("h4",{"code-path":"src/pages/Home.tsx:262:15",className:"font-display text-xl md:text-2xl font-semibold text-text-primary mb-3 relative",children:i.title}),E.jsx("p",{"code-path":"src/pages/Home.tsx:265:15",className:"text-text-secondary text-sm leading-relaxed mb-5 relative",children:i.description}),E.jsx(ti,{"code-path":"src/pages/Home.tsx:268:15",to:t[s],className:"text-accent-cyan text-sm font-medium inline-flex items-center gap-1 relative hover:gap-2 transition-all",children:i.link})]},s))})]})})}function dX(){const{t:n}=ci(),e=[{icon:E.jsx(fc,{"code-path":"src/pages/Home.tsx:286:13",size:20,className:"text-white"}),title:n.technology.steps.concept},{icon:E.jsx(Ug,{"code-path":"src/pages/Home.tsx:287:13",size:20,className:"text-white"}),title:n.technology.steps.assets},{icon:E.jsx(_R,{"code-path":"src/pages/Home.tsx:288:13",size:20,className:"text-white"}),title:n.technology.steps.integration},{icon:E.jsx(R1,{"code-path":"src/pages/Home.tsx:289:13",size:20,className:"text-white"}),title:n.technology.steps.deploy}];return E.jsx("section",{"code-path":"src/pages/Home.tsx:293:5",className:"py-28 md:py-32 bg-bg-primary",children:E.jsx("div",{"code-path":"src/pages/Home.tsx:294:7",className:"max-w-[1280px] mx-auto px-6 lg:px-12 xl:px-20",children:E.jsxs("div",{"code-path":"src/pages/Home.tsx:295:9",className:"grid grid-cols-1 lg:grid-cols-2 gap-16 items-center",children:[E.jsxs("div",{"code-path":"src/pages/Home.tsx:296:11",children:[E.jsx(be.p,{"code-path":"src/pages/Home.tsx:297:13",variants:qa,initial:"hidden",whileInView:"visible",viewport:{once:!0},className:"text-accent-cyan text-xs uppercase tracking-[0.1em] mb-4 font-medium",children:n.technology.label}),E.jsx(be.h2,{"code-path":"src/pages/Home.tsx:306:13",variants:qa,initial:"hidden",whileInView:"visible",viewport:{once:!0},custom:.1,className:"font-display text-[32px] md:text-[48px] lg:text-[56px] font-semibold text-text-primary tracking-[-0.02em] mb-6 leading-tight",children:n.technology.headline}),E.jsx(be.p,{"code-path":"src/pages/Home.tsx:316:13",variants:qa,initial:"hidden",whileInView:"visible",viewport:{once:!0},custom:.2,className:"text-text-secondary text-base md:text-lg leading-relaxed mb-10",children:n.technology.description}),E.jsx(be.div,{"code-path":"src/pages/Home.tsx:327:13",variants:bT,initial:"hidden",whileInView:"visible",viewport:{once:!0},className:"grid grid-cols-2 sm:grid-cols-4 gap-4",children:e.map((t,i)=>E.jsxs(be.div,{"code-path":"src/pages/Home.tsx:335:17",variants:qa,className:"flex flex-col items-center text-center gap-3",children:[E.jsx("div",{"code-path":"src/pages/Home.tsx:340:19",className:"w-10 h-10 rounded-xl gradient-accent flex items-center justify-center shadow-glow-cyan animate-pulse-glow",children:t.icon}),E.jsx("p",{"code-path":"src/pages/Home.tsx:343:19",className:"text-text-primary text-sm font-medium",children:t.title}),i<e.length-1&&E.jsx("div",{"code-path":"src/pages/Home.tsx:345:21",className:"hidden sm:block absolute right-[-30%] top-5 w-[60%] h-px border-t border-dashed border-[rgba(0,229,255,0.3)]"})]},i))})]}),E.jsx(be.div,{"code-path":"src/pages/Home.tsx:353:11",initial:{opacity:0,x:60},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.7,ease:[.16,1,.3,1]},className:"relative h-80 lg:h-96 flex items-center justify-center",children:E.jsxs("svg",{"code-path":"src/pages/Home.tsx:360:13",viewBox:"0 0 400 300",className:"w-full h-full",children:[E.jsxs("defs",{"code-path":"src/pages/Home.tsx:361:15",children:[E.jsxs("linearGradient",{"code-path":"src/pages/Home.tsx:362:17",id:"pipeGrad",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[E.jsx("stop",{"code-path":"src/pages/Home.tsx:363:19",offset:"0%",stopColor:"#00E5FF"}),E.jsx("stop",{"code-path":"src/pages/Home.tsx:364:19",offset:"50%",stopColor:"#7C3AED"}),E.jsx("stop",{"code-path":"src/pages/Home.tsx:365:19",offset:"100%",stopColor:"#F472B6"})]}),E.jsxs("filter",{"code-path":"src/pages/Home.tsx:367:17",id:"glow",children:[E.jsx("feGaussianBlur",{"code-path":"src/pages/Home.tsx:368:19",stdDeviation:"3",result:"coloredBlur"}),E.jsxs("feMerge",{"code-path":"src/pages/Home.tsx:369:19",children:[E.jsx("feMergeNode",{"code-path":"src/pages/Home.tsx:370:21",in:"coloredBlur"}),E.jsx("feMergeNode",{"code-path":"src/pages/Home.tsx:371:21",in:"SourceGraphic"})]})]})]}
4125),E.jsx("path",{"code-path":"src/pages/Home.tsx:376:15",d:"M60 150 L140 150 M180 150 L260 150 M300 150 L340 150",stroke:"url(#pipeGrad)",strokeWidth:"2",strokeDasharray:"6 4",fill:"none",opacity:"0.6",children:E.jsx("animate",{"code-path":"src/pages/Home.tsx:384:17",attributeName:"stroke-dashoffset",from:"0",to:"20",dur:"1s",repeatCount:"indefinite"})}),[60,160,260,340].map((t,i)=>E.jsxs("g",{"code-path":"src/pages/Home.tsx:388:17",children:[E.jsx("circle",{"code-path":"src/pages/Home.tsx:389:19",cx:t,cy:"150",r:"24",fill:"#1A2235",stroke:"url(#pipeGrad)",strokeWidth:"2",filter:"url(#glow)",children:E.jsx("animate",{"code-path":"src/pages/Home.tsx:390:21",attributeName:"r",values:"24;26;24",dur:`${2+i*.3}s`,repeatCount:"indefinite"})}),E.jsx("text",{"code-path":"src/pages/Home.tsx:392:19",x:t,y:"155",textAnchor:"middle",fill:"#F8FAFC",fontSize:"12",fontWeight:"600",children:i+1})]},i)),[{x:60,label:"Concept"},{x:160,label:"Assets"},{x:260,label:"Integrate"},{x:340,label:"Deploy"}].map(t=>E.jsx("text",{"code-path":"src/pages/Home.tsx:404:17",x:t.x,y:"200",textAnchor:"middle",fill:"#94A3B8",fontSize:"11",children:t.label},t.x))]})})]})})})}const hX=[{code:"zh-HK",label:"ç®ä½ä¸æ"},{code:"en",label:"English"}];function fX(){const{t:n,setLanguage:e,language:t}=ci();return E.jsx("section",{"code-path":"src/pages/Home.tsx:427:5",className:"py-16 md:py-20 gradient-accent animate-gradient-shift",style:{backgroundSize:"200% 200%"},children:E.jsxs("div",{"code-path":"src/pages/Home.tsx:428:7",className:"max-w-[1280px] mx-auto px-6 lg:px-12 xl:px-20 text-center",children:[E.jsx(be.h3,{"code-path":"src/pages/Home.tsx:429:9",variants:qa,initial:"hidden",whileInView:"visible",viewport:{once:!0},className:"font-display text-[24px] md:text-[32px] lg:text-[36px] font-semibold text-white mb-8",children:n.languageBanner.headline}),E.jsx(be.div,{"code-path":"src/pages/Home.tsx:439:9",variants:bT,initial:"hidden",whileInView:"visible",viewport:{once:!0},className:"flex flex-wrap items-center justify-center gap-3 mb-8",children:hX.map((i,s)=>E.jsxs(be.button,{"code-path":"src/pages/Home.tsx:447:13",variants:{hidden:{opacity:0,scale:.9},visible:{opacity:1,scale:1,transition:{duration:.4,delay:s*.1,ease:[.16,1,.3,1]}}},onClick:()=>e(i.code),className:`px-5 py-2 rounded-full text-xs md:text-sm font-medium transition-all ${t===i.code?"bg-white text-bg-primary":"bg-bg-primary text-white hover:bg-bg-elevated"}`,children:[i.label," · ",i.code.toUpperCase()]},i.code))})]})})}function pX(){const{t:n}=ci();return E.jsx("section",{"code-path":"src/pages/Home.tsx:478:5",className:"py-24 md:py-28 bg-bg-primary",children:E.jsxs("div",{"code-path":"src/pages/Home.tsx:479:7",className:"max-w-[960px] mx-auto px-6 text-center",children:[E.jsx(be.h2,{"code-path":"src/pages/Home.tsx:480:9",variants:qa,initial:"hidden",whileInView:"visible",viewport:{once:!0},className:"font-display text-[32px] md:text-[48px] lg:text-[56px] font-semibold text-text-primary tracking-[-0.02em] mb-6",children:n.footerCta.headline}),E.jsx(be.p,{"code-path":"src/pages/Home.tsx:489:9",variants:qa,initial:"hidden",whileInView:"visible",viewport:{once:!0},custom:.1,className:"text-text-secondary text-base md:text-lg mb-10 max-w-[600px] mx-auto",children:n.footerCta.description}),E.jsxs(be.div,{"code-path":"src/pages/Home.tsx:499:9",variants:qa,initial:"hidden",whileInView:"visible",viewport:{once:!0},custom:.2,className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:[E.jsx(ti,{"code-path":"src/pages/Home.tsx:507:11",to:"/contact",className:"gradient-accent text-white text-sm font-semibold uppercase tracking-[0.05em] px-8 py-3.5 rounded-lg transition-all duration-200 hover:shadow-glow-cyan hover:scale-[1.03] active:scale-[0.98]",children:n.footerCta.ctaPrimary}),E.jsx(ti,{"code-path":"src/pages/Home.tsx:513:11",to:"/about",className:"text-accent-cyan text-sm font-medium hover:text-text-primary transition-colors",children:n.footerCta.ctaSecondary})]})]})})}function mX(){return E.jsxs(E.Fragment,{children:[E.jsx(aX,{"code-path":"src/pages/Home.tsx:529:7"}),E.jsx(rX,{"code-path":"src/pages/Home.tsx:530:7"}),E.jsx(uX,{"code-path":"src/pages/Home.tsx:531:7"}),E.jsx(dX,{"code-path":"src/pages/Home.tsx:532:7"}),E.jsx(fX,{"code-path":"src/pages/Home.tsx:533:7"}),E.jsx(pX,{"code-path":"src/pages/Home.tsx:534:7"})]})}const vp={"zh-HK":{breadcrumbHome:"é¦é¡µ",breadcrumbSolutions:"AIGC è§£å³æ¹æ¡",breadcrumbGaming:"游æ",heroHeadline:"AIGC + 游æ",heroSubheadline:"AI æ£å¨é塿¸¸æå¼åçæ¯ä¸ä¸ªç¯è â ä»è§è²æ¦å¿µå° 3D èµäº§ï¼ä»æºè½ NPC å°ç¨åºåå
³å¡ï¼éæ¾æ éåæ",ctaPrimary:"æ¥çæ¸¸ææ¡ä¾",ctaSecondary:"ä¸å¢é交æµ",marketLabel:"å¸åºæ°æ®",marketHeadline:"ç§å¹»æ¸¸æäº§ä¸æç»é«éå¢é¿",marketBody:"2025 å¹´ç§å¹»æ¸¸æäº§ä¸è¥æ¶è¾¾ 779.1 亿å
ï¼å½äº§ç§å¹»æ¸¸æå¨æµ·å¤å¸åºè¡¨ç°äº®ç¼ãAIGC ææ¯æ£å¨æä¸ºæ¸¸æå¼åçæ ¸å¿é©±å¨åï¼ä»æ¦å¿µè®¾è®¡å°æç»äº¤ä»çå
¨é¾è·¯æ¸éã",stat1Number:"779.1",stat1Suffix:"亿å
â 2025 ç§å¹»æ¸¸æäº§ä¸è¥æ¶",stat2Number:"300",stat2Suffix:"AI è¾
å©åä½çåå·¥è§æ¨¡",servicesLabel:"AIGC 游ææå¡",servicesHeadline:"è¦ç游æå¼åå
¨é¾è·¯",service1Title:"è
4125§è²ä¸åºæ¯è®¾è®¡",service1Desc:"MidjourneyãStable Diffusion 驱卿¦å¿µèºæ¯ãè§è²è®¾è®¡å游æåºæ¯å¿«éè¿ä»£",service1Tools:"Midjourney · Stable Diffusion · DALL·E · Firefly",service2Title:"3D èµäº§çæ",service2Desc:"ææ¬/å¾åå° 3D 模åçæ â Luma AIãMeshyãNVIDIA Picasso å é 3D å
容ç产",service2Tools:"Luma AI · Meshy · NVIDIA Picasso · Tripo3D",service3Title:"æºè½ NPC",service3Desc:"NLP åæ·±åº¦å¦ä¹ èµäº NPC é¼ç对è¯è½åï¼æé 卿ãæè®°å¿ç游æè§è²",service3Tools:"GPT-4 · LLaMA · Character Engine · Inworld AI",service4Title:"ç¨åºåå
容çæ",service4Desc:"èªå¨çææ¸¸æå
³å¡ãå°å¾ãä»»å¡åå¨æåºæ¯ï¼æ ¹æ®ç©å®¶è¡ä¸ºå®æ¶çæç¯å¢",service4Tools:"PCG Framework · Wave Function Collapse · UE5 PCG · Unity ML-Agents",service5Title:"AI æµè¯ä¸ä¼å",service5Desc:"AI èªå¨åæµè¯ãæ§è½åæãBug æ£æµä¸ä¿®å¤ï¼ä¿é游æåè´¨ä¸ç¨³å®æ§",service5Tools:"GameDriver · Modl.ai · AI Dungeon · TestSprite",service6Title:"å
¨ç忬å°å",service6Desc:"å¤è¯è¨æ¬å°åãAI é
é³ä¸æåéé
ï¼å©å游æåºæµ·å
¨çå¸åº",service6Tools:"HeyGen · ElevenLabs · Transifex · Smartcat",processHeadline:"æä»¬ç AIGC 游æå¼åæµç¨",step1Num:"01",step1Title:"AI æ¦å¿µçæ",step1Desc:"å©ç¨çæå¼ AI å¿«é产åºè§è²ãåºæ¯ä¸å
³å¡æ¦å¿µ",step2Num:"02",step2Title:"æºè½é¢æ¼",step2Desc:"AI è¾
å©é¢æ¼ä¸æ
äºæ¿ï¼éä½åæè¯éææ¬",step3Num:"03",step3Title:"èµäº§çæ",step3Desc:"ææ¬/å¾åå° 3D 模åãè´´å¾ä¸å¨ç»çèªå¨ç产",step4Num:"04",step4Title:"弿éæ",step4Desc:"å° AI èµäº§æ ç¼å¯¼å
¥ UE5 / Unity å¹¶è¿è¡æ§è½ä¼å",step5Num:"05",step5Title:"宿¶è¿è¥",step5Desc:"åºäºç©å®¶æ°æ®ç AI 卿å
å®¹æ´æ°ä¸ liveops",caseLabel:"æ¡ä¾ç ç©¶",caseHeadline:"æç§å¹» MMOï¼AI è¾
å©è§è²è®¾è®¡ï¼æçæå 400%",caseBody:"éè¿æ´å Stable Diffusion å Midjourney å°æ¦å¿µè®¾è®¡ç®¡çº¿ï¼æä»¬å°è§è²æ¦å¿µäº§åºæ¶é´ä» 2 å¨ç¼©çè³ 2 天ãAI çæçæ¦å¿µå¾ç»èºæ¯å®¶ç²¾ä¿®åç´æ¥æå
¥ 3D å»ºæ¨¡ï¼æ´ä¸ªèµäº§çæé¾è·¯æçæå 4 åã",metric1Value:"400%",metric1Label:"æçæå",metric2Value:"2天",metric2Label:"æ¦å¿µäº§åºå¨æ",metric3Value:"200+",metric3Label:"AI è¾
å©è§è²æ°é",ctaHeadline:"让æ¨ç游æé¡¹ç®è¿å
¥ AIGC æ¶ä»£",ctaDescription:"æ 论æ¯ç¬ç«æ¸¸æè¿æ¯ 3A 大ä½ï¼æä»¬é½è½ä¸ºæ¨çå¢éæä¾ AIGC å¨è¯¢ä¸æ§è¡æå¡",ctaButton:"å¼å¯é¡¹ç®",ctaSecondaryFooter:"æ¥çå
¨é¨æå¡"},en:{breadcrumbHome:"Home",breadcrumbSolutions:"AIGC Solutions",breadcrumbGaming:"Gaming",heroHeadline:"AIGC + Gaming",heroSubheadline:"AI is reshaping every stage of game development â from character concepts to 3D assets, from intelligent NPCs to procedural levels, unleashing infinite creativity",ctaPrimary:"View Our Game Portfolio",ctaSecondary:"Talk to Our Team",marketLabel:"MARKET DATA",marketHeadline:"Sci-Fi Gaming Industry Continues Rapid Growth",marketBody:"In 2025, sci-fi gaming revenue reached 779.1 billion RMB, with domestic titles performing impressively overseas. AIGC technology is becoming the core driver of game development, penetrating the entire pipeline from concept to delivery.",stat1Number:"779.1",stat1Suffix:"B RMB â 2025 Sci-Fi Gaming Revenue",stat2Number:"300",stat2Suffix:"AI-assisted creative staff",servicesLabel:"AIGC GAME SERVICES",servicesHeadline:"Covering the Full Game Development Pipeline",service1Title:"Character & Scene Design",service1Desc:"Midjourney and Stable Diffusion power concept art, character design, and game scene rapid iteration",service1Tools:"Midjourney · Stable Diffusion · DALL·E · Firefly",service2Title:"3D Asset Generation",service2Desc:"Text/image to 3D model generation â Luma AI, Meshy, NVIDIA Picasso accelerating 3D content production",service2Tools:"Luma AI · Meshy · NVIDIA Picasso · Tripo3D",service3Title:"Intelligent NPCs",service3Desc:"NLP and deep learning give NPCs realistic dialogue capabilities, creating dynamic, memory-capable game characters",service3Tools:"GPT-4 · LLaMA · Character Engine · Inworld AI",service4Title:"Procedural Content Generation",service4Desc:"Auto-generate game levels, maps, quests, and dynamic scenes that react to player behavior in real-time",service4Tools:"PCG Framework · Wave Function Collapse · UE5 PCG · Unity ML-Agents",service5Title:"AI Testing & Optimization",service5Desc:"AI automated testing, performance analysis, bug detection and fixing to ensure game quality and stability",service5Tools:"GameDriver · Modl.ai · AI Dungeon · TestSprite",service6Title:"Global Localization",service6Desc:"Multi-language localization, AI dubbing and cultural adaptation to help games go global",service6Tools:"HeyGen · ElevenLabs · Transifex · Smartcat",processHeadline:"Our AIGC Game Development Process",step1Num:"01",step1Title:"AI Concept Generation",step1Desc:"Use generative AI to rapidly produce character, scene & level concepts",step2Num:"02",step2Title:"Smart Pre-production",step2Desc:"AI-assisted previs & storyboarding to cut early iteration costs",step3Num:"03",step3Title:"Asset Generation",step3Desc:"Text/image to 3D models, textures & animations at scale",step4Num:"04",step4Title:"Engine Integration",step4Desc:"Seamlessly import AI assets into UE5 / Unity with performance tuning",step5Num:"05",step5Title:"Live Operations",step5Desc:"Player-data-driven AI dynamic content updates & liveops",caseLabel:"CASE STUDY",caseHeadline:"Sci-Fi MMO Project: AI-Assisted Character Design, 400% Efficiency Boost",caseBody:"By integrating Stable Diffusion and Midjourney into the concept design pipeline, we reduced character concept output time from 2 weeks to 2 days. AI-generated concepts are refined by artists and directly fed into 3D modeling, increasing the entire asset production pipeline efficiency by 4Ã.",metric1Value:"400%",metric1Label:"Efficiency Gain",metric2Value:"2 Days",metric2Label:"Concept Cycle",metric3Value:"200+",metric3Label:"AI-Assisted Characters",ctaHeadline:"Bring Your Game Project into the AIGC Era",ctaDescription:"From indie games to AAA titles, we provide AIGC consulting and production services for teams of any size",ctaButton:"Start a Project",ctaSecondaryFooter:"View All Services"}},mc={hidden:{opacity:0,y:40},visible:(n=0)=>({opacity:1,y:0,transition:{duration:.7,delay:n,ease:[.16,1,.3,1]}})},gX={hidden:{opacity:0,scale:.95},visible:(n=0)=>({opacity:1,scale:1,transition:{duration:.8,delay:n,ease:[.16,1,.3,1]}})},xX={hidden:{opacity:0,x:-60},visible:(n=0)=>({opacity:1,x:0,transition:{duration:.7,delay:n,ease:[.16,1,.3,1]}})},Ig={hidden:{opacity:0,x:60},visible:(n=0)=>({opacity:1,x:0,transition:{duration:.7,delay:n,ease:[.16,1,.3,1]}})},_T={hidden:{},visible:{transition:{staggerChildren:.15}}};function zM(n,e=2,t=!0,i){const s=K.useRef(null),o=ih(s,{once:!0,amount:.5}
4125),c=O1(0),[h,f]=K.useState(i?i(0):"0");return K.useEffect(()=>{if(!t||o)return z1(c,n,{duration:e,ease:[.16,1,.3,1],onUpdate:x=>f(i?i(x):x.toFixed(1))}).stop},[o,c,n,e,t,i]),{ref:s,display:h}}function yX(){const{language:n}=ci(),e=vp[n];return E.jsxs("section",{"code-path":"src/pages/Games.tsx:320:5",className:"relative h-[70vh] min-h-[480px] flex items-center overflow-hidden",children:[E.jsx(be.div,{"code-path":"src/pages/Games.tsx:322:7",initial:{scale:1},animate:{scale:1.05},transition:{duration:20,repeat:1/0,repeatType:"reverse",ease:"linear"},className:"absolute inset-0 gradient-hero"}),E.jsx("div",{"code-path":"src/pages/Games.tsx:329:7",className:"absolute inset-0 bg-[rgba(10,14,26,0.6)]"}),E.jsx("div",{"code-path":"src/pages/Games.tsx:331:7",className:"relative z-10 max-w-[1280px] mx-auto px-6 lg:px-12 xl:px-20 w-full",children:E.jsxs("div",{"code-path":"src/pages/Games.tsx:332:9",className:"max-w-[640px]",children:[E.jsxs(be.nav,{"code-path":"src/pages/Games.tsx:334:11",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.5,delay:.2,ease:[.16,1,.3,1]},className:"flex items-center gap-2 text-text-muted text-xs mb-6",children:[E.jsx(ti,{"code-path":"src/pages/Games.tsx:340:13",to:"/",className:"hover:text-accent-cyan transition-colors",children:e.breadcrumbHome}),E.jsx(Eu,{"code-path":"src/pages/Games.tsx:343:13",size:12}),E.jsx("span",{"code-path":"src/pages/Games.tsx:344:13",children:e.breadcrumbSolutions}),E.jsx(Eu,{"code-path":"src/pages/Games.tsx:345:13",size:12}),E.jsx("span",{"code-path":"src/pages/Games.tsx:346:13",className:"text-accent-cyan",children:e.breadcrumbGaming})]}),E.jsx(be.h1,{"code-path":"src/pages/Games.tsx:350:11",initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6,delay:.4,ease:[.16,1,.3,1]},className:"font-display text-[36px] md:text-[56px] lg:text-[64px] font-bold text-text-primary leading-[1.05] tracking-[-0.03em] mb-5",children:e.heroHeadline}),E.jsx(be.p,{"code-path":"src/pages/Games.tsx:360:11",initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6,delay:.6,ease:[.16,1,.3,1]},className:"text-text-secondary text-base md:text-lg max-w-[560px] mb-8 leading-relaxed",children:e.heroSubheadline}),E.jsxs(be.div,{"code-path":"src/pages/Games.tsx:370:11",initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.5,delay:.8,ease:[.16,1,.3,1]},className:"flex flex-col sm:flex-row items-start gap-4",children:[E.jsx("a",{"code-path":"src/pages/Games.tsx:376:13",href:"#case-study",className:"gradient-accent text-white text-sm font-semibold uppercase tracking-[0.05em] px-8 py-3.5 rounded-lg transition-all duration-200 hover:shadow-glow-cyan hover:scale-[1.03] active:scale-[0.98]",children:e.ctaPrimary}),E.jsx(ti,{"code-path":"src/pages/Games.tsx:382:13",to:"/contact",className:"border border-[rgba(0,229,255,0.4)] text-accent-cyan text-sm font-semibold uppercase tracking-[0.05em] px-8 py-3.5 rounded-lg transition-all duration-200 hover:bg-[rgba(0,229,255,0.1)] hover:border-[rgba(0,229,255,0.8)]",children:e.ctaSecondary})]})]})})]})}function vX(){const{language:n}=ci(),e=vp[n],{ref:t,display:i}=zM(779.1,2),{ref:s,display:o}=zM(300,2,!0,c=>Math.floor(c).toString());return E.jsx("section",{"code-path":"src/pages/Games.tsx:407:5",className:"py-20 md:py-24 bg-bg-secondary",children:E.jsx("div",{"code-path":"src/pages/Games.tsx:408:7",className:"max-w-[1280px] mx-auto px-6 lg:px-12 xl:px-20",children:E.jsxs("div",{"code-path":"src/pages/Games.tsx:409:9",className:"grid grid-cols-1 lg:grid-cols-2 gap-12 lg:gap-16 items-center",children:[E.jsxs(be.div,{"code-path":"src/pages/Games.tsx:411:11",variants:xX,initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.3},children:[E.jsx("p",{"code-path":"src/pages/Games.tsx:417:13",className:"text-accent-cyan text-xs uppercase tracking-[0.1em] mb-4 font-medium",children:e.marketLabel}),E.jsx("h2",{"code-path":"src/pages/Games.tsx:420:13",className:"font-display text-[28px] md:text-[40px] lg:text-[48px] font-semibold text-text-primary tracking-[-0.02em] leading-tight mb-6",children:e.marketHeadline}),E.jsx("p",{"code-path":"src/pages/Games.tsx:423:13",className:"text-text-secondary text-base md:text-lg leading-relaxed",children:e.marketBody})]}),E.jsxs("div",{"code-path":"src/pages/Games.tsx:429:11",className:"flex flex-col gap-6",children:[E.jsxs(be.div,{"code-path":"src/pages/Games.tsx:430:13",variants:Ig,initial:"hidden",
4125whileInView:"visible",viewport:{once:!0,amount:.3},custom:0,className:"gradient-card border border-glass-border rounded-xl p-8 hover:border-[rgba(0,229,255,0.3)] transition-all duration-300 hover:-translate-y-1 hover:shadow-glow-card-hover",children:[E.jsx("span",{"code-path":"src/pages/Games.tsx:438:15",ref:t,className:"font-mono text-[40px] md:text-[56px] font-bold text-accent-cyan leading-none block mb-2",children:i}),E.jsx("p",{"code-path":"src/pages/Games.tsx:444:15",className:"text-text-secondary text-sm",children:e.stat1Suffix})]}),E.jsxs(be.div,{"code-path":"src/pages/Games.tsx:447:13",variants:Ig,initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.3},custom:.2,className:"gradient-card border border-glass-border rounded-xl p-8 hover:border-[rgba(0,229,255,0.3)] transition-all duration-300 hover:-translate-y-1 hover:shadow-glow-card-hover",children:[E.jsxs("span",{"code-path":"src/pages/Games.tsx:455:15",ref:s,className:"font-mono text-[40px] md:text-[56px] font-bold text-accent-cyan leading-none block mb-2",children:[o,"+"]}),E.jsx("p",{"code-path":"src/pages/Games.tsx:461:15",className:"text-text-secondary text-sm",children:e.stat2Suffix})]})]})]})})})}const bX=[{icon:E.jsx(fc,{"code-path":"src/pages/Games.tsx:476:11",size:24,className:"text-white"}),gradient:"from-accent-cyan to-accent-purple",image:"/game-character-design.jpg",keyPrefix:"service1"},{icon:E.jsx(Ug,{"code-path":"src/pages/Games.tsx:482:11",size:24,className:"text-white"}),gradient:"from-accent-purple to-accent-pink",image:"/game-3d-assets.jpg",keyPrefix:"service2"},{icon:E.jsx(fc,{"code-path":"src/pages/Games.tsx:488:11",size:24,className:"text-white"}),gradient:"from-accent-pink to-accent-cyan",image:"/game-smart-npc.jpg",keyPrefix:"service3"},{icon:E.jsx(R1,{"code-path":"src/pages/Games.tsx:494:11",size:24,className:"text-white"}),gradient:"from-accent-cyan to-accent-purple",image:"/game-3d-assets.jpg",keyPrefix:"service4"},{icon:E.jsx(fc,{"code-path":"src/pages/Games.tsx:500:11",size:24,className:"text-white"}),gradient:"from-accent-purple to-accent-pink",image:"/game-3d-assets.jpg",keyPrefix:"service5"},{icon:E.jsx(Ug,{"code-path":"src/pages/Games.tsx:506:11",size:24,className:"text-white"}),gradient:"from-accent-pink to-accent-cyan",image:"/game-3d-assets.jpg",keyPrefix:"service6"}];function _X(){const{language:n}=ci(),e=vp[n];return E.jsx("section",{"code-path":"src/pages/Games.tsx:518:5",className:"py-28 md:py-32 bg-bg-primary",children:E.jsxs("div",{"code-path":"src/pages/Games.tsx:519:7",className:"max-w-[1280px] mx-auto px-6 lg:px-12 xl:px-20",children:[E.jsxs("div",{"code-path":"src/pages/Games.tsx:521:9",className:"text-center mb-16",children:[E.jsx(be.p,{"code-path":"src/pages/Games.tsx:522:11",variants:mc,initial:"hidden",whileInView:"visible",viewport:{once:!0},className:"text-accent-cyan text-xs uppercase tracking-[0.1em] mb-4 font-medium",children:e.servicesLabel}),E.jsx(be.h2,{"code-path":"src/pages/Games.tsx:531:11",variants:mc,initial:"hidden",whileInView:"visible",viewport:{once:!0},custom:.1,className:"font-display text-[28px] md:text-[40px] lg:text-[48px] font-semibold text-text-primary tracking-[-0.02em]",children:e.servicesHeadline})]}),E.jsx(be.div,{"code-path":"src/pages/Games.tsx:544:9",variants:_T,initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.2},className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:bX.map((t,i)=>{const s=e[`${t.keyPrefix}Title`],o=e[`${t.keyPrefix}Desc`],c=e[`${t.keyPrefix}Tools`];return E.jsxs(be.div,{"code-path":"src/pages/Games.tsx:556:15",variants:mc,className:"group gradient-card border border-glass-border rounded-2xl overflow-hidden hover:border-[rgba(0,229,255,0.3)] transition-all duration-300 hover:-translate-y-1.5 hover:shadow-glow-card-hover",children:[E.jsxs("div",{"code-path":"src/pages/Games.tsx:562:17",className:"relative h-[200px] overflow-hidden",children:[E.jsx("img",{"code-path":"src/pages/Games.tsx:563:19",src:t.image,alt:s,className:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-105"}),E.jsx("div",{"code-path":"src/pages/Games.tsx:568:19",className:"absolute inset-0 bg-gradient-to-t from-[rgba(17,24,39,0.8)] to-transparent"}),E.jsx("div",{"code-path":"src/pages/Games.tsx:570:19",className:`absolute bottom-[-20px] left-6 w-12 h-12 rounded-xl bg-gradient-to-br ${t.gradient} flex items-center justify-center shadow-lg z-10`,children:t.icon})]}),E.jsxs("div",{"code-path":"src/pages/Games.tsx:578:17",className:"p-6 pt-8",children:[E.jsx("h4",{"code-path":"src/pages/Games.tsx:579:19",className:"font-display text-xl md:text-2xl font-semibold text-text-primary mb-3",children:s}),E.jsx("p",{"code-path":"src/pages/Games.tsx:582:19",className:"text-text-secondary text-sm leading-relaxed mb-4",children:o}),E.jsx("p",{"code-path":"src/pages/Games.tsx:585:19",className:"text-text-muted text-xs tracking-wide",children:c})]})]},i)})})]})})}const YC=[{num:"01",titleKey:"step1Title",descKey:"step1Desc",numKey:"step1Num"},{num:"02",titleKey:"step2Title",descKey:"step2Desc",numKey:"step2Num"},{num:"03",titleKey:"step3Title",descKey:"step3Desc",numKey:"step3Num"},{num:"04",titleKey:"step4Title",descKey:"step4Desc",numKey:"step4Num"},{num:"05",titleKey:"step5Title",descKey:"step5Desc",numKey:"step5Num"}];function SX(){const{language:n}=ci(),e=vp[n];return E.jsxs("section",{"code-path":"src/pages/Games.tsx:615:5",className:"relative py-28 md:py-32 bg-bg-secondary overflow-hidden",children:[E.jsx("div",{"code-path":"src/pages/Games.tsx:617:7",className:"absolute inset-0 opacity-[0.03]",style:{backgroundImage:"linear-gradient(rgba(0,229,255,0.5) 1px, transparent 1px), linear-gradient(90deg, rgba(0,229,255,0.5) 1px, transparent 1px)",backgroundSize:"60px 60px"}}),E.jsxs("div",{"code-path":"src/pages/Games.tsx:626:7",className:"relative max-w-[1280px] mx-auto px-6 lg:px-12 xl:px-20",children:[E.jsx(be.h2,{"code-path":"src/pages/Games.tsx:628:9",variants:mc,initial:"hidden",
4125whileInView:"visible",viewport:{once:!0},className:"font-display text-[28px] md:text-[40px] lg:text-[48px] font-semibold text-text-primary tracking-[-0.02em] text-center mb-16",children:e.processHeadline}),E.jsxs(be.div,{"code-path":"src/pages/Games.tsx:639:9",variants:_T,initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.2},className:"relative",children:[E.jsx("div",{"code-path":"src/pages/Games.tsx:647:11",className:"hidden lg:block absolute top-[28px] left-[10%] right-[10%] h-[2px]",children:E.jsx("div",{"code-path":"src/pages/Games.tsx:648:13",className:"w-full h-full bg-gradient-to-r from-accent-cyan via-accent-purple to-accent-pink opacity-40"})}),E.jsx("div",{"code-path":"src/pages/Games.tsx:651:11",className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-5 gap-8 lg:gap-4",children:YC.map((t,i)=>{const s=e[t.titleKey],o=e[t.descKey],c=e[t.numKey];return E.jsxs(be.div,{"code-path":"src/pages/Games.tsx:657:17",variants:mc,custom:i*.15,className:"relative flex flex-col items-center text-center",children:[E.jsx("div",{"code-path":"src/pages/Games.tsx:664:19",className:"relative z-10 w-14 h-14 rounded-full gradient-card border border-glass-border flex items-center justify-center mb-4 shadow-md",children:E.jsx("span",{"code-path":"src/pages/Games.tsx:665:21",className:"font-mono text-lg text-accent-cyan font-bold",children:c})}),E.jsx("h4",{"code-path":"src/pages/Games.tsx:671:19",className:"font-display text-lg font-semibold text-text-primary mb-2",children:s}),E.jsx("p",{"code-path":"src/pages/Games.tsx:676:19",className:"text-text-secondary text-sm leading-relaxed max-w-[220px]",children:o}),i<YC.length-1&&E.jsx("div",{"code-path":"src/pages/Games.tsx:682:21",className:"lg:hidden mt-6 w-[2px] h-8 bg-gradient-to-b from-accent-cyan to-accent-purple opacity-40"})]},i)})})]})]})]})}function MX(){const{language:n}=ci(),e=vp[n];return E.jsx("section",{"code-path":"src/pages/Games.tsx:703:5",id:"case-study",className:"py-28 md:py-32 bg-bg-primary",children:E.jsx("div",{"code-path":"src/pages/Games.tsx:704:7",className:"max-w-[1280px] mx-auto px-6 lg:px-12 xl:px-20",children:E.jsxs("div",{"code-path":"src/pages/Games.tsx:705:9",className:"grid grid-cols-1 lg:grid-cols-[55%_45%] gap-12 lg:gap-16 items-center",children:[E.jsxs(be.div,{"code-path":"src/pages/Games.tsx:707:11",variants:gX,initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.3},className:"relative h-[320px] md:h-[420px] rounded-2xl overflow-hidden shadow-lg",children:[E.jsx("div",{"code-path":"src/pages/Games.tsx:715:13",className:"absolute inset-0 bg-gradient-to-br from-[#1E1B4B] via-[#111827] to-[#0A0E1A]"}),E.jsx("div",{"code-path":"src/pages/Games.tsx:716:13",className:"absolute inset-0 bg-[radial-gradient(ellipse_at_top_right,rgba(0,229,255,0.15),transparent_60%)]"}),E.jsx("div",{"code-path":"src/pages/Games.tsx:717:13",className:"absolute inset-0 bg-[radial-gradient(ellipse_at_bottom_left,rgba(124,58,237,0.15),transparent_60%)]"}),E.jsxs("div",{"code-path":"src/pages/Games.tsx:719:13",className:"absolute inset-0 flex items-center justify-center",children:[E.jsx("div",{"code-path":"src/pages/Games.tsx:720:15",className:"w-32 h-32 rounded-full border border-[rgba(0,229,255,0.2)] animate-pulse-glow"}),E.jsx("div",{"code-path":"src/pages/Games.tsx:721:15",className:"absolute w-48 h-48 rounded-full border border-[rgba(124,58,237,0.15)] animate-pulse-glow",style:{animationDelay:"1s"}})]}),E.jsx("div",{"code-path":"src/pages/Games.tsx:724:13",className:"absolute bottom-0 left-0 right-0 p-6 bg-gradient-to-t from-[rgba(10,14,26,0.9)] to-transparent",children:E.jsx("p",{"code-path":"src/pages/Games.tsx:725:15",className:"text-accent-cyan text-xs uppercase tracking-[0.1em] font-medium",children:e.caseLabel})})]}),E.jsxs("div",{"code-path":"src/pages/Games.tsx:732:11",children:[E.jsx(be.p,{"code-path":"src/pages/Games.tsx:733:13",variants:Ig,initial:"hidden",whileInView:"visible",viewport:{once:!0},className:"text-accent-cyan text-xs uppercase tracking-[0.1em] mb-4 font-medium",children:e.caseLabel}),E.jsx(be.h3,{"code-path":"src/pages/Games.tsx:742:13",variants:Ig,initial:"hidden",
4125whileInView:"visible",viewport:{once:!0},custom:.1,className:"font-display text-[24px] md:text-[32px] lg:text-[36px] font-semibold text-text-primary tracking-[-0.01em] leading-tight mb-6",children:e.caseHeadline}),E.jsx(be.p,{"code-path":"src/pages/Games.tsx:752:13",variants:Ig,initial:"hidden",whileInView:"visible",viewport:{once:!0},custom:.2,className:"text-text-secondary text-base md:text-lg leading-relaxed mb-8",children:e.caseBody}),E.jsxs(be.div,{"code-path":"src/pages/Games.tsx:764:13",variants:_T,initial:"hidden",whileInView:"visible",viewport:{once:!0},className:"flex flex-wrap gap-6",children:[E.jsx(DS,{"code-path":"src/pages/Games.tsx:771:15",value:e.metric1Value,label:e.metric1Label,delay:0}),E.jsx(DS,{"code-path":"src/pages/Games.tsx:772:15",value:e.metric2Value,label:e.metric2Label,delay:.15}),E.jsx(DS,{"code-path":"src/pages/Games.tsx:773:15",value:e.metric3Value,label:e.metric3Label,delay:.3})]})]})]})})})}function DS({value:n,label:e,delay:t}){const i=/^[0-9.,]+/.test(n),s=n.match(/^([0-9.]+)/),o=n.replace(/^[0-9.,]+/,"");let c=n,h={current:null};if(i&&s){const f=parseFloat(s[1]),{ref:p,display:x}=zM(f,2,!0,y=>(Number.isInteger(f)?Math.floor(y).toString():y.toFixed(1))+o);h=p,c=x}return E.jsxs(be.div,{"code-path":"src/pages/Games.tsx:801:5",variants:mc,custom:t,className:"flex flex-col",children:[E.jsx("span",{"code-path":"src/pages/Games.tsx:806:7",ref:h,className:"font-mono text-[28px] md:text-[36px] font-bold text-accent-cyan leading-none mb-1",children:c}),E.jsx("span",{"code-path":"src/pages/Games.tsx:812:7",className:"text-text-muted text-xs uppercase tracking-wider",children:e})]})}function wX(){const{language:n}=ci(),e=vp[n];return E.jsxs("section",{"code-path":"src/pages/Games.tsx:828:5",className:"relative py-24 md:py-28 gradient-hero overflow-hidden",children:[E.jsx("div",{"code-path":"src/pages/Games.tsx:829:7",className:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,rgba(0,229,255,0.08)_0%,transparent_70%)]"}),E.jsxs("div",{"code-path":"src/pages/Games.tsx:830:7",className:"relative max-w-[960px] mx-auto px-6 text-center",children:[E.jsx(be.h2,{"code-path":"src/pages/Games.tsx:831:9",variants:mc,initial:"hidden",whileInView:"visible",viewport:{once:!0},className:"font-display text-[28px] md:text-[40px] lg:text-[48px] font-semibold text-text-primary tracking-[-0.02em] mb-6 text-shadow-glow",children:e.ctaHeadline}),E.jsx(be.p,{"code-path":"src/pages/Games.tsx:840:9",variants:mc,initial:"hidden",whileInView:"visible",viewport:{once:!0},custom:.1,className:"text-text-secondary text-base md:text-lg mb-10 max-w-[600px] mx-auto",children:e.ctaDescription}),E.jsxs(be.div,{"code-path":"src/pages/Games.tsx:850:9",variants:mc,initial:"hidden",whileInView:"visible",viewport:{once:!0},custom:.2,className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:[E.jsxs(ti,{"code-path":"src/pages/Games.tsx:858:11",to:"/contact",className:"gradient-accent text-white text-sm font-semibold uppercase tracking-[0.05em] px-8 py-3.5 rounded-lg transition-all duration-200 hover:shadow-glow-cyan hover:scale-[1.03] active:scale-[0.98] inline-flex items-center gap-2",children:[e.ctaButton,E.jsx(C1,{"code-path":"src/pages/Games.tsx:863:13",size:16})]}),E.jsx(ti,{"code-path":"src/pages/Games.tsx:865:11",to:"/",className:"text-accent-cyan text-sm font-medium hover:text-text-primary transition-colors",children:e.ctaSecondaryFooter})]})]})]})}function TX(){return E.jsxs(E.Fragment,{children:[E.jsx(yX,{"code-path":"src/pages/Games.tsx:884:7"}),E.jsx(vX,{"code-path":"src/pages/Games.tsx:885:7"}),E.jsx(_X,{"code-path":"src/pages/Games.tsx:886:7"}),E.jsx(SX,{"code-path":"src/pages/Games.tsx:887:7"}),E.jsx(MX,{"code-path":"src/pages/Games.tsx:888:7"}),E.jsx(wX,{"code-path":"src/pages/Games.tsx:889:7"})]})}const oh={en:{breadcrumbHome:"Home",breadcrumbShortVideo:"Short Video",heroHeadline:"AIGC + Short Video",heroSubheadline:"From text to video, from real to virtual â AI is redefining the speed, cost, and creative boundaries of video production",ctaExplore:"Explore Video Solutions",ctaContact:"Contact Us",marketLabel:"MARKET DATA",marketHeadline:"AIGC Short Video is Accelerating",marketBody:"Sci-fi film and video revenue hit 81.6 billion RMB, up 21.6% YoY. AIGC video tools â Sora, Runway, Pika â are compressing content creation cycles from days to minutes, letting creators focus on ideas.",stat1Number:"81.6",stat1Suffix:"B RMB â Sci-Fi Film & Video Revenue",stat1Context:"YoY growth of 21.6%",stat2Number:"45",stat2Suffix:"s â Generate 10s Stylized Video",stat2Context:"One-click style transfer",servicesLabel:"AIGC VIDEO SERVICES",servicesHeadline:"Reshaping the Entire Video Creation Pipeline",service1Title:"Text-to-Video Generation",service1Desc:"OpenAI Sora, Runway Gen-3, Pika Labs â transform text descriptions into high-quality video content",service1Tools:"Sora · Runway · Pika Labs · Stable Video Diffusion",service2Title:"Virtual Digital Humans",service2Desc:"HeyGen and similar tools support 60+ avatars, 120+ languages, and voice cloning for global digital presenters",service2Tools:"HeyGen · D-ID · Synthesia · Hour One",service3Title:"Automated Video E
4125diting",service3Desc:"VEED, GliaCloud, and other AI editing tools automate video production with intelligent asset matching, dubbing, and subtitling",service3Tools:"VEED · GliaCloud · Descript · CapCut",service4Title:"Style Transfer",service4Desc:"One-click conversion to Chinese ink, cartoon, oil painting and more â 10s video generated in 45s",service4Tools:"Runway · Kaiber · Gen-2 · DomoAI",service5Title:"2D to VR Conversion",service5Desc:"Optimize transitions, generate 30 frames of 1080P per second â transforming flat video into immersive VR experiences",service5Tools:"Insta360 · Adobe Immersive · Unity VR",ctaCardTitle:"Ready to Transform Your Video Workflow?",ctaCardDesc:"Contact our team to explore custom AIGC video solutions for your business.",ctaCardButton:"Get Started",workflowHeadline:"AI Video Production Workflow",step1Label:"Script Input",step2Label:"AI Generate Assets",step3Label:"Smart Edit",step4Label:"Style Transfer",step5Label:"Multi-Platform Publish",caseLabel:"CASE STUDY",caseHeadline:"Short Video Platform: AI Digital Human Hosts, 100 Videos/Day",caseBody:"By deploying HeyGen digital human systems, we created 60+ virtual host avatars for a short video client, supporting 120+ languages for real-time dubbing. AI auto-generates talking-head videos from script to final cut in just 15 minutes, increasing daily output by 10Ã.",metric1Value:"10Ã",metric1Label:"Daily Output Increase",metric2Value:"120+",metric2Label:"Languages Supported",metric3Value:"15min",metric3Label:"Per Video Production Time",samplesHeadline:"AI-Generated Short Film Samples",sample1Title:"Sci-Fi City Scene",sample1Desc:"Cyberpunk metropolis with flying vehicles and neon-lit streets",sample2Title:"Virtual Digital Human",sample2Desc:"AI presenter with natural expressions and multilingual capability",sample3Title:"Chinese Ink Wash Style",sample3Desc:"Traditional brush painting aesthetics brought to life through AI",ctaHeadline:"Turn Every Idea Into Video, Instantly",ctaButton:"Start Creating"},"zh-HK":{breadcrumbHome:"é¦é¡µ",breadcrumbShortVideo:"çè§é¢",heroHeadline:"AIGC + çè§é¢",heroSubheadline:"仿æ¬å°è§é¢ï¼ä»çå®å°èæ â AI æ£å¨éæ°å®ä¹è§é¢åä½çéåº¦ãææ¬åå¯è½æ§è¾¹ç",ctaExplore:"æ¢ç´¢è§é¢æ¹æ¡",ctaContact:"èç³»æä»¬",marketLabel:"å¸åºæ°æ®",marketHeadline:"AIGC çè§é¢å éå´èµ·",marketBody:"ç§å¹»å½±è§äº§ä¸è¥æ¶ 81.6 亿å
ï¼åæ¯å¢é¿ 21.6%ãAIGC è§é¢å·¥å
· â SoraãRunwayãPika â æ£å¨å°å
容åä½å¨æä»å¤©ç¼©çå°åéï¼è®©åä½è
䏿³¨äºåææ¬èº«ã",stat1Number:"81.6",stat1Suffix:"亿å
â ç§å¹»å½±è§äº§ä¸è¥æ¶",stat1Context:"忝å¢é¿ 21.6%",stat2Number:"45",stat2Suffix:"ç§ â çæ 10 ç§é£æ ¼åè§é¢",stat2Context:"ä¸é®é£æ ¼è½¬æ¢",servicesLabel:"AIGC è§é¢æå¡",servicesHeadline:"éå¡è§é¢åä½å
¨é¾è·¯",service1Title:"ææ¬å°è§é¢çæ",service1Desc:"OpenAI SoraãRunway Gen-3ãPika Labs â å°æåæè¿°è½¬å为é«è´¨éè§é¢å
容",service1Tools:"Sora · Runway · Pika Labs · Stable Video Diffusion",service2Title:"èææ°å人",service2Desc:"HeyGen çå·¥å
·æ¯æ 60+ 形象ã120+ è¯è¨ã声é³å
éï¼æé å
¨çåæ°å主æ",service2Tools:"HeyGen · D-ID · Synthesia · Hour One",service3Title:"èªå¨è§é¢åªè¾",service3Desc:"VEEDãGliaCloud ç AI åªè¾å·¥å
·èªå¨åè§é¢å¶ä½æµç¨ï¼æºè½å¹é
ç´ æãé
é³ååå¹",service3Tools:"VEED · GliaCloud · Descript · CapCut",service4Title:"飿 ¼å转æ¢",service4Desc:"ä¸å½é£ãå¡éãæ²¹ç»çå¤ç§é£æ ¼ä¸é®è½¬æ¢ï¼10 ç§è§é¢ 45 ç§çæ",service4Tools:"Runway · Kaiber · Gen-2 · DomoAI",service5Title:"2D 转 VR",service5Desc:"ä¼å转åºï¼1 ç§çæ 30 帧 1080Pï¼å°å¹³é¢è§é¢è½¬åä¸ºæ²æµ¸å¼ VR ä½éª",service5Tools:"Insta360 · Adobe Immersive · Unity VR",ctaCardTitle:"åå¤å¥½æ¹é æ¨çè§é¢å·¥ä½æµäºåï¼",ctaCardDesc:"èç³»æä»¬çå¢éï¼æ¢ç´¢ä¸ºæ¨çä¸å¡é身å®å¶ç AIGC è§é¢è§£å³æ¹æ¡ã",ctaCardButton:"å¼å§åä½",workflowHeadline:"AI è§é¢å¶ä½å·¥ä½æµ",step1Label:"èæ¬è¾å
¥",step2Label:"AI çæç´ æ",step3Label:"æºè½åªè¾",step4Label:"飿 ¼è½¬æ¢",step5Label:"å¤å¹³å°åå¸",caseLabel:"æ¡ä¾ç ç©¶",caseHeadline:"æçè§é¢å¹³å°ï¼AI æ°å人主æï¼æ¥æ´ 100 æ¡è§é¢",caseBody:"éè¿é¨ç½² HeyGen æ°å人系ç»ï¼æä»¬ä¸ºçè§é¢å®¢æ·æé äº 60+ èæä¸»æå½¢è±¡ï¼æ¯æ 120+ è¯è¨å®æ¶é
é³ãAI èªå¨çæå£æè§é¢ï¼ä»èæ¬å°æçä»
é 15 åéï¼æ¥äº§è½æå 10 åã",metric1Value:"10Ã",metric1Label:"æ¥äº§è½æå",metric2Value:"120+",metric2Label:"æ¯æè¯è¨æ°",metric3Value:"15min",metric3Label:"åæ¡è§é¢å¶ä½æ¶é´",samplesHeadline:"AI çæçè§é¢æ ·ç",sample1Title:"ç§å¹»åå¸åºæ¯",sample1Desc:"èµåæå
é½å¸ï¼é£è¡æ±½è½¦ä¸éè¹è¡é",sample2Title:"èææ°å人",sample2Desc:"å
·å¤èªç¶è¡¨æ
ä¸å¤è¯è¨è½åç AI 主æ",sample3Title:"ä¸å½æ°´å¢¨é£æ ¼",sample3Desc:"ä¼ ç»æ°´å¢¨ç¾å¦éè¿ AI ææ¯çåæ°ç",ctaHeadline:"让æ¯ä¸ä¸ªåæç¬é´å为è§é¢",ctaButton:"å¼å§åä½"}};function II(n,e=2,t=!0){const i=K.useRef(null),s=ih(i,{once:!0,amount:.5}
4125),o=O1(0),[c,h]=K.useState("0");return K.useEffect(()=>{if(!t||s)return z1(o,n,{duration:e,ease:[.16,1,.3,1],onUpdate:p=>h(p.toFixed(p%1===0?0:1))}).stop},[s,o,n,e,t]),{ref:i,display:c}}const bp={hidden:{opacity:0,y:40},visible:(n=0)=>({opacity:1,y:0,transition:{duration:.7,delay:n,ease:[.16,1,.3,1]}})},EX={hidden:{opacity:0,scale:.95},visible:(n=0)=>({opacity:1,scale:1,transition:{duration:.6,delay:n,ease:[.16,1,.3,1]}})},ST={hidden:{},visible:{transition:{staggerChildren:.12}}},jd={hidden:{opacity:0,y:40},visible:{opacity:1,y:0,transition:{duration:.7,ease:[.16,1,.3,1]}}};function AX(){const{language:n}=ci(),e=oh[n];return E.jsxs("section",{"code-path":"src/pages/ShortVideo.tsx:233:5",className:"relative h-[70vh] min-h-[520px] flex items-center overflow-hidden",children:[E.jsx("div",{"code-path":"src/pages/ShortVideo.tsx:235:7",className:"absolute inset-0 bg-cover bg-center animate-[ken-burns_20s_ease-in-out_infinite_alternate]",style:{backgroundImage:"url(/aigc-video-hero.jpg)"}}),E.jsx("div",{"code-path":"src/pages/ShortVideo.tsx:241:7",className:"absolute inset-0 bg-gradient-to-r from-[#0A0E1A]/90 via-[#0A0E1A]/70 to-[#0A0E1A]/40"}),E.jsxs("div",{"code-path":"src/pages/ShortVideo.tsx:243:7",className:"relative z-10 max-w-[1280px] mx-auto px-6 lg:px-12 xl:px-20 w-full",children:[E.jsxs(be.nav,{"code-path":"src/pages/ShortVideo.tsx:244:9",initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.5,delay:.2},className:"flex items-center gap-2 text-sm text-text-muted mb-8",children:[E.jsxs(ti,{"code-path":"src/pages/ShortVideo.tsx:250:11",to:"/",className:"hover:text-accent-cyan transition-colors flex items-center gap-1",children:[E.jsx(k5,{"code-path":"src/pages/ShortVideo.tsx:251:13",size:14}),e.breadcrumbHome]}),E.jsx(Eu,{"code-path":"src/pages/ShortVideo.tsx:254:11",size:14}),E.jsx("span",{"code-path":"src/pages/ShortVideo.tsx:255:11",className:"text-text-secondary",children:"AIGC"}),E.jsx(Eu,{"code-path":"src/pages/ShortVideo.tsx:256:11",size:14}),E.jsx("span",{"code-path":"src/pages/ShortVideo.tsx:257:11",className:"text-accent-cyan",children:e.breadcrumbShortVideo})]}),E.jsx(be.h1,{"code-path":"src/pages/ShortVideo.tsx:260:9",initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6,delay:.4,ease:[.16,1,.3,1]},className:"font-display text-[36px] md:text-[56px] lg:text-[64px] font-bold leading-[1.05] tracking-[-0.03em] text-white max-w-[640px] mb-6",children:e.heroHeadline}),E.jsx(be.p,{"code-path":"src/pages/ShortVideo.tsx:269:9",initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6,delay:.6,ease:[.16,1,.3,1]},className:"text-text-secondary text-base md:text-lg max-w-[560px] mb-8 leading-relaxed",children:e.heroSubheadline}),E.jsxs(be.div,{"code-path":"src/pages/ShortVideo.tsx:278:9",initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.5,delay:.8,ease:[.16,1,.3,1]},className:"flex flex-col sm:flex-row items-start gap-4",children:[E.jsx("a",{"code-path":"src/pages/ShortVideo.tsx:284:11",href:"#services",className:"gradient-accent text-white text-sm font-semibold uppercase tracking-[0.05em] px-8 py-3.5 rounded-lg transition-all duration-200 hover:shadow-glow-cyan hover:scale-[1.03] active:scale-[0.98]",children:e.ctaExplore}),E.jsx(ti,{"code-path":"src/pages/ShortVideo.tsx:290:11",to:"/contact",className:"border border-[rgba(0,229,255,0.4)] text-accent-cyan text-sm font-semibold uppercase tracking-[0.05em] px-8 py-3.5 rounded-lg transition-all duration-200 hover:bg-[rgba(0,229,255,0.1)] hover:border-[rgba(0,229,255,0.8)]",children:e.ctaContact})]})]}),E.jsx("style",{"code-path":"src/pages/ShortVideo.tsx:300:7",children:` 4126 @keyframes ken-burns { 4127 0% { transform: scale(1); } 4128 100% { transform: scale(1.05); } 4129 } 4130 `})]})}function ZC({number:n,suffix:e,context:t,delay:i,isNumeric:s=!0}){const o=s?parseFloat(n):0,{ref:c,display:h}=II(o,2);return E.jsxs(be.div,{"code-path":"src/pages/ShortVideo.tsx:330:5",variants:bp,initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.3},custom:i,className:"gradient-card border border-glass-border rounded-xl p-8 md:p-10 hover:border-[rgba(0,229,255,0.3)] transition-all duration-300 hover:-translate-y-1 hover:shadow-glow-card-hover",children:[E.jsx("span",{"code-path":"src/pages/Sh
4130ortVideo.tsx:338:7",ref:c,className:"font-mono text-[40px] md:text-[56px] font-bold text-accent-cyan leading-none block mb-2",children:s?h:n}),E.jsx("p",{"code-path":"src/pages/ShortVideo.tsx:344:7",className:"text-text-secondary text-sm mb-2",children:e}),E.jsx("p",{"code-path":"src/pages/ShortVideo.tsx:345:7",className:"text-text-muted text-sm",children:t})]})}function CX(){const{language:n}=ci(),e=oh[n];return E.jsxs("section",{"code-path":"src/pages/ShortVideo.tsx:355:5",className:"relative py-20 md:py-24 bg-bg-secondary",children:[E.jsx("div",{"code-path":"src/pages/ShortVideo.tsx:356:7",className:"absolute top-0 left-0 right-0 h-px bg-gradient-to-r from-transparent via-[rgba(0,229,255,0.3)] to-transparent"}),E.jsx("div",{"code-path":"src/pages/ShortVideo.tsx:357:7",className:"max-w-[1280px] mx-auto px-6 lg:px-12 xl:px-20",children:E.jsxs("div",{"code-path":"src/pages/ShortVideo.tsx:358:9",className:"grid grid-cols-1 lg:grid-cols-2 gap-12 lg:gap-16 items-center",children:[E.jsxs(be.div,{"code-path":"src/pages/ShortVideo.tsx:360:11",variants:bp,initial:"hidden",whileInView:"visible",viewport:{once:!0},custom:0,children:[E.jsx("p",{"code-path":"src/pages/ShortVideo.tsx:367:13",className:"text-accent-cyan text-xs uppercase tracking-[0.1em] mb-4 font-medium",children:e.marketLabel}),E.jsx("h2",{"code-path":"src/pages/ShortVideo.tsx:370:13",className:"font-display text-[28px] md:text-[40px] lg:text-[48px] font-bold text-white leading-[1.1] tracking-[-0.02em] mb-6",children:e.marketHeadline}),E.jsx("p",{"code-path":"src/pages/ShortVideo.tsx:373:13",className:"text-text-secondary text-base md:text-lg leading-relaxed",children:e.marketBody})]}),E.jsxs("div",{"code-path":"src/pages/ShortVideo.tsx:379:11",className:"grid grid-cols-1 sm:grid-cols-2 gap-6",children:[E.jsx(ZC,{"code-path":"src/pages/ShortVideo.tsx:380:13",number:e.stat1Number,suffix:e.stat1Suffix,context:e.stat1Context,delay:.2}),E.jsx(ZC,{"code-path":"src/pages/ShortVideo.tsx:386:13",number:e.stat2Number,suffix:e.stat2Suffix,context:e.stat2Context,delay:.4})]})]})})]})}const RX=[E.jsx(N5,{"code-path":"src/pages/ShortVideo.tsx:403:3",size:24,className:"text-white"}),E.jsx(vU,{"code-path":"src/pages/ShortVideo.tsx:404:3",size:24,className:"text-white"}),E.jsx(MR,{"code-path":"src/pages/ShortVideo.tsx:405:3",size:24,className:"text-white"}),E.jsx(sU,{"code-path":"src/pages/ShortVideo.tsx:406:3",size:24,className:"text-white"}),E.jsx(P5,{"code-path":"src/pages/ShortVideo.tsx:407:3",size:24,className:"text-white"})],NX=["from-accent-cyan to-accent-purple","from-accent-purple to-accent-pink","from-accent-pink to-accent-cyan","from-accent-cyan to-accent-pink","from-accent-purple to-accent-cyan"];function DX({icon:n,gradient:e,title:t,description:i,tools:s}){return E.jsxs(be.div,{"code-path":"src/pages/ShortVideo.tsx:432:5",variants:jd,className:"group gradient-card border border-glass-border rounded-xl p-6 md:p-8 hover:border-[rgba(0,229,255,0.3)] transition-all duration-300 hover:-translate-y-1.5 hover:shadow-glow-card-hover flex flex-col",children:[E.jsx("div",{"code-path":"src/pages/ShortVideo.tsx:436:7",className:`flex items-center justify-center w-12 h-12 rounded-xl bg-gradient-to-br ${e} mb-5 shadow-md`,children:n}),E.jsx("h4",{"code-path":"src/pages/ShortVideo.tsx:441:7",className:"font-display text-xl font-semibold text-white mb-3",children:t}),E.jsx("p",{"code-path":"src/pages/ShortVideo.tsx:442:7",className:"text-text-secondary text-sm leading-relaxed mb-4 flex-1",children:i}),E.jsx("div",{"code-path":"src/pages/ShortVideo.tsx:443:7",className:"pt-4 border-t border-glass-border",children:E.jsx("p",{"code-path":"src/pages/ShortVideo.tsx:444:9",className:"text-text-muted text-xs font-mono",children:s})})]})}function LX(){const{language:n}
4130=ci(),e=oh[n],t=[{title:e.service1Title,description:e.service1Desc,tools:e.service1Tools},{title:e.service2Title,description:e.service2Desc,tools:e.service2Tools},{title:e.service3Title,description:e.service3Desc,tools:e.service3Tools},{title:e.service4Title,description:e.service4Desc,tools:e.service4Tools},{title:e.service5Title,description:e.service5Desc,tools:e.service5Tools}];return E.jsx("section",{"code-path":"src/pages/ShortVideo.tsx:483:5",id:"services",className:"relative py-24 md:py-32 bg-bg-primary",children:E.jsxs("div",{"code-path":"src/pages/ShortVideo.tsx:484:7",className:"max-w-[1280px] mx-auto px-6 lg:px-12 xl:px-20",children:[E.jsxs(be.div,{"code-path":"src/pages/ShortVideo.tsx:485:9",variants:bp,initial:"hidden",whileInView:"visible",viewport:{once:!0},custom:0,className:"text-center mb-16",children:[E.jsx("p",{"code-path":"src/pages/ShortVideo.tsx:493:11",className:"text-accent-cyan text-xs uppercase tracking-[0.1em] mb-4 font-medium",children:e.servicesLabel}),E.jsx("h2",{"code-path":"src/pages/ShortVideo.tsx:496:11",className:"font-display text-[28px] md:text-[40px] lg:text-[48px] font-bold text-white leading-[1.1] tracking-[-0.02em]",children:e.servicesHeadline})]}),E.jsxs(be.div,{"code-path":"src/pages/ShortVideo.tsx:501:9",variants:ST,initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.15},className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:[t.map((i,s)=>E.jsx(DX,{"code-path":"src/pages/ShortVideo.tsx:509:13",icon:RX[s],gradient:NX[s],title:i.title,description:i.description,tools:i.tools},s)),E.jsxs(be.div,{"code-path":"src/pages/ShortVideo.tsx:520:11",variants:jd,className:"gradient-card border border-glass-border rounded-xl p-6 md:p-8 hover:border-[rgba(0,229,255,0.3)] transition-all duration-300 hover:-translate-y-1.5 hover:shadow-glow-card-hover flex flex-col items-center justify-center text-center",children:[E.jsx("div",{"code-path":"src/pages/ShortVideo.tsx:524:13",className:"flex items-center justify-center w-14 h-14 rounded-full gradient-accent mb-5 shadow-glow-cyan",children:E.jsx(C1,{"code-path":"src/pages/ShortVideo.tsx:525:15",size:24,className:"text-white"})}),E.jsx("h4",{"code-path":"src/pages/ShortVideo.tsx:527:13",className:"font-display text-xl font-semibold text-white mb-3",children:e.ctaCardTitle}),E.jsx("p",{"code-path":"src/pages/ShortVideo.tsx:528:13",className:"text-text-secondary text-sm leading-relaxed mb-6",children:e.ctaCardDesc}),E.jsx(ti,{"code-path":"src/pages/ShortVideo.tsx:529:13",to:"/contact",className:"gradient-accent text-white text-sm font-semibold uppercase tracking-[0.05em] px-6 py-3 rounded-lg transition-all duration-200 hover:shadow-glow-cyan hover:scale-[1.03] active:scale-[0.98]",children:e.ctaCardButton})]})]})]})})}const tv=[{icon:E.jsx(C5,{"code-path":"src/pages/ShortVideo.tsx:546:11",size:20,className:"text-white"}),labelKey:"step1Label"},{icon:E.jsx(fc,{"code-path":"src/pages/ShortVideo.tsx:547:11",size:20,className:"text-white"}),labelKey:"step2Label"},{icon:E.jsx(MR,{"code-path":"src/pages/ShortVideo.tsx:548:11",size:20,className:"text-white"}),labelKey:"step3Label"},{icon:E.jsx(RU,{"code-path":"src/pages/ShortVideo.tsx:549:11",size:20,className:"text-white"}),labelKey:"step4Label"},{icon:E.jsx(fU,{"code-path":"src/pages/ShortVideo.tsx:550:11",size:20,className:"text-white"}),labelKey:"step5Label"}];function IX(){const{language:n}=ci(),e=oh[n];return E.jsxs("section",{"code-path":"src/pages/ShortVideo.tsx:558:5",className:"relative py-24 md:py-32 bg-bg-secondary overflow-hidden",children:[E.jsx("div",{"code-path":"src/pages/ShortVideo.tsx:559:7",className:"absolute top-0 left-0 right-0 h-px bg-gradient-to-r from-transparent via-[rgba(0,229,255,0.3)] to-transparent"}),E.jsxs("div",{"code-path":"src/pages/ShortVideo.tsx:560:7",className:"max-w-[1280px] mx-auto px-6 lg:px-12 xl:px-20",children:[E.jsx(be.div,{"code-path":"src/pages/ShortVideo.tsx:561:9",variants:bp,initial:"hidden",whileInView:"visible",viewport:{once:!0},custom:0,className:"text-center mb-16",children:E.jsx("h2",{"code-path":"src/pages/ShortVideo.tsx:569:11",className:"font-display text-[28px] md:text-[40px] lg:text-[48px] font-bold text-white leading-[1.1] tracking-[-0.02em]",children:e.workflowHeadline})}
4130),E.jsx("div",{"code-path":"src/pages/ShortVideo.tsx:575:9",className:"hidden lg:flex items-center justify-between gap-4",children:tv.map((t,i)=>E.jsxs("div",{"code-path":"src/pages/ShortVideo.tsx:577:13",className:"flex items-center gap-4 flex-1",children:[E.jsxs(be.div,{"code-path":"src/pages/ShortVideo.tsx:578:15",initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0,amount:.5},transition:{duration:.6,delay:i*.15,ease:[.16,1,.3,1]},className:"flex-1 gradient-card border border-glass-border rounded-xl p-5 text-center hover:border-[rgba(0,229,255,0.3)] transition-all duration-300",children:[E.jsx("div",{"code-path":"src/pages/ShortVideo.tsx:589:17",className:"flex items-center justify-center w-10 h-10 rounded-lg gradient-accent mx-auto mb-3",children:t.icon}),E.jsx("p",{"code-path":"src/pages/ShortVideo.tsx:592:17",className:"text-white text-sm font-medium",children:e[t.labelKey]})]}),i<tv.length-1&&E.jsx(be.div,{"code-path":"src/pages/ShortVideo.tsx:598:17",initial:{opacity:0,scaleX:0},whileInView:{opacity:1,scaleX:1},viewport:{once:!0},transition:{duration:.5,delay:i*.15+.2},className:"relative w-8 h-1 flex-shrink-0",children:E.jsx("div",{"code-path":"src/pages/ShortVideo.tsx:605:19",className:"absolute inset-0 rounded-full overflow-hidden",children:E.jsx("div",{"code-path":"src/pages/ShortVideo.tsx:606:21",className:"w-full h-full animate-[flow-pulse_2s_linear_infinite] bg-gradient-to-r from-accent-cyan via-accent-purple to-accent-pink"})})})]},i))}),E.jsx("div",{"code-path":"src/pages/ShortVideo.tsx:615:9",className:"lg:hidden flex flex-col gap-4",children:tv.map((t,i)=>E.jsxs("div",{"code-path":"src/pages/ShortVideo.tsx:617:13",className:"flex items-center gap-4",children:[E.jsxs(be.div,{"code-path":"src/pages/ShortVideo.tsx:618:15",initial:{opacity:0,x:-30},whileInView:{opacity:1,x:0},viewport:{once:!0,amount:.5},transition:{duration:.6,delay:i*.15,ease:[.16,1,.3,1]},className:"flex-1 gradient-card border border-glass-border rounded-xl p-4 flex items-center gap-4 hover:border-[rgba(0,229,255,0.3)] transition-all duration-300",children:[E.jsx("div",{"code-path":"src/pages/ShortVideo.tsx:629:17",className:"flex items-center justify-center w-10 h-10 rounded-lg gradient-accent flex-shrink-0",children:t.icon}),E.jsx("p",{"code-path":"src/pages/ShortVideo.tsx:632:17",className:"text-white text-sm font-medium",children:e[t.labelKey]})]}),i<tv.length-1&&E.jsx(be.div,{"code-path":"src/pages/ShortVideo.tsx:636:17",initial:{opacity:0,scaleY:0},whileInView:{opacity:1,scaleY:1},viewport:{once:!0},transition:{duration:.4,delay:i*.15+.15},className:"w-1 h-6 rounded-full bg-gradient-to-b from-accent-cyan to-accent-purple self-center"})]},i))})]}),E.jsx("style",{"code-path":"src/pages/ShortVideo.tsx:649:7",children:` 4131 @keyframes flow-pulse { 4132 0% { transform: translateX(-100%); } 4133 100% { transform: translateX(100%); } 4134 } 4135 `})]})}function LS({value:n,label:e,delay:t}){const i=n.match(/^(\d+(?:\.\d+)?)/),s=i?parseFloat(i[1]):null,o=i?n.replace(i[1],""):"",{ref:c,display:h}=II(s??0,2);return E.jsxs(be.div,{"code-path":"src/pages/ShortVideo.tsx:677:5",variants:bp,initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.5},custom:t,className:"text-center",children:[E.jsx("span",{"code-path":"src/pages/ShortVideo.tsx:685:7",ref:c,className:"font-mono text-[32px] md:text-[40px] font-bold text-accent-cyan leading-none block mb-1",children:s!==null?`${h}${o}`:n}),E.jsx("p",{"code-path":"src/pages/ShortVideo.tsx:691:7",className:"text-text-muted text-xs uppercase tracking-wider",children:e})]})}function PX(){const{language:n}=ci(),e=oh[n];return E.jsx("section",{"code-path":"src/pages/ShortVideo.tsx:701:5",className:"relative py-24 md:py-32 bg-bg-primary",children:E.jsx("div",{"code-path":"src/pages/ShortVideo.tsx:702:7",className:"max-w-[1280px] mx-auto px-6 lg:px-12 xl:px-20",children:E.jsxs("div",{"code-path":"src/pages/ShortVideo.tsx:703:9",className:"grid grid-cols-1 lg:grid-cols-[45%_55%] gap-12 lg:gap-16 items-center",children:[E.jsxs(be.div,{"code-path":"src/pages/ShortVideo.tsx:705:11",variants:ST,initial:"hidden",
4135whileInView:"visible",viewport:{once:!0,amount:.3},className:"order-2 lg:order-1",children:[E.jsx(be.p,{"code-path":"src/pages/ShortVideo.tsx:712:13",variants:jd,className:"text-accent-cyan text-xs uppercase tracking-[0.1em] mb-4 font-medium",children:e.caseLabel}),E.jsx(be.h3,{"code-path":"src/pages/ShortVideo.tsx:718:13",variants:jd,className:"font-display text-[24px] md:text-[32px] lg:text-[36px] font-bold text-white leading-[1.2] tracking-[-0.01em] mb-6",children:e.caseHeadline}),E.jsx(be.p,{"code-path":"src/pages/ShortVideo.tsx:724:13",variants:jd,className:"text-text-secondary text-base md:text-lg leading-relaxed mb-10",children:e.caseBody}),E.jsxs(be.div,{"code-path":"src/pages/ShortVideo.tsx:732:13",variants:jd,className:"grid grid-cols-3 gap-4",children:[E.jsx(LS,{"code-path":"src/pages/ShortVideo.tsx:736:15",value:e.metric1Value,label:e.metric1Label,delay:.3}),E.jsx(LS,{"code-path":"src/pages/ShortVideo.tsx:737:15",value:e.metric2Value,label:e.metric2Label,delay:.45}),E.jsx(LS,{"code-path":"src/pages/ShortVideo.tsx:738:15",value:e.metric3Value,label:e.metric3Label,delay:.6})]})]}),E.jsx(be.div,{"code-path":"src/pages/ShortVideo.tsx:743:11",variants:EX,initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.3},custom:0,className:"order-1 lg:order-2",children:E.jsxs("div",{"code-path":"src/pages/ShortVideo.tsx:751:13",className:"relative rounded-2xl overflow-hidden shadow-lg border border-glass-border",children:[E.jsx("img",{"code-path":"src/pages/ShortVideo.tsx:752:15",src:"/video-digital-human.jpg",alt:e.caseHeadline,className:"w-full h-auto object-cover",loading:"lazy"}),E.jsx("div",{"code-path":"src/pages/ShortVideo.tsx:758:15",className:"absolute inset-0 bg-gradient-to-t from-[#0A0E1A]/60 via-trans
4135parent to-transparent pointer-events-none"})]})})]})})})}const UX=[{src:"/video-sample-scifi.mp4",titleKey:"sample1Title",descKey:"sample1Desc"},{src:"/video-sample-digitalhuman.mp4",titleKey:"sample2Title",descKey:"sample2Desc"},{src:"/video-sample-inkstyle.mp4",titleKey:"sample3Title",descKey:"sample3Desc"}];function OX({src:n,title:e,description:t}){return E.jsxs(be.div,{"code-path":"src/pages/ShortVideo.tsx:798:5",variants:jd,className:"group gradient-card border border-glass-border rounded-xl overflow-hidden hover:border-[rgba(0,229,255,0.35)] transition-all duration-300 hover:scale-[1.02] hover:shadow-glow-card-hover",children:[E.jsxs("div",{"code-path":"src/pages/ShortVideo.tsx:802:7",className:"relative aspect-video bg-bg-elevated overflow-hidden",children:[E.jsx("video",{"code-path":"src/pages/ShortVideo.tsx:803:9",src:n,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,className:"w-full h-full object-cover"}),E.jsx("div",{"code-path":"src/pages/ShortVideo.tsx:811:9",className:"absolute inset-0 bg-gradient-to-t from-[#0A0E1A]/40 via-transparent to-transparent pointer-events-none opacity-0 group-hover:opacity-100 transition-opacity duration-300"})]}),E.jsxs("div",{"code-path":"src/pages/ShortVideo.tsx:813:7",className:"p-5",children:[E.jsx("h4",{"code-path":"src/pages/ShortVideo.tsx:814:9",className:"font-display text-lg font-semibold text-white mb-2",children:e}),E.jsx("p",{"code-path":"src/pages/ShortVideo.tsx:815:9",className:"text-text-secondary text-sm leading-relaxed",children:t})]})]})}function zX(){const{language:n}=ci(),e=oh[n];return E.jsxs("section",{"code-path":"src/pages/ShortVideo.tsx:826:5",className:"relative py-24 md:py-32 bg-bg-secondary",children:[E.jsx("div",{"code-path":"src/pages/ShortVideo.tsx:827:7",className:"absolute top-0 left-0 right-0 h-px bg-gradient-to-r from-transparent via-[rgba(0,229,255,0.3)] to-transparent"}),E.jsxs("div",{"code-path":"src/pages/ShortVideo.tsx:828:7",className:"max-w-[1280px] mx-auto px-6 lg:px-12 xl:px-20",children:[E.jsx(be.div,{"code-path":"src/pages/ShortVideo.tsx:829:9",variants:bp,initial:"hidden",whileInView:"visible",viewport:{once:!0},custom:0,className:"text-center mb-16",children:E.jsx("h2",{"code-path":"src/pages/ShortVideo.tsx:837:11",className:"font-display text-[28px] md:text-[40px] lg:text-[48px] font-bold text-white leading-[1.1] tracking-[-0.02em]",children:e.samplesHeadline})}),E.jsx(be.div,{"code-path":"src/pages/ShortVideo.tsx:842:9",variants:ST,initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.15},className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:UX.map((t,i)=>E.jsx(OX,{"code-path":"src/pages/ShortVideo.tsx:850:13",src:t.src,title:e[t.titleKey],description:e[t.descKey]},i))})]})]})}function BX(){const{language:n}=ci(),e=oh[n];return E.jsxs("section",{"code-path":"src/pages/ShortVideo.tsx:871:5",className:"relative py-20 md:py-24 gradient-hero overflow-hidden",children:[E.jsx("div",{"code-path":"src/pages/ShortVideo.tsx:872:7",className:"absolute inset-0 gradient-glow opacity-50"}),E.jsxs("div",{"code-path":"src/pages/ShortVideo.tsx:873:7",className:"relative z-10 max-w-[1280px] mx-auto px-6 lg:px-12 xl:px-20 text-center",children:[E.jsx(be.h2,{"code-path":"src/pages/ShortVideo.tsx:874:9",initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7,ease:[.16,1,.3,1]},className:"font-display text-[28px] md:text-[40px] lg:text-[48px] font-bold text-white leading-[1.1] tracking-[-0.02em] mb-8",children:e.ctaHeadline}),E.jsx(be.div,{"code-path":"src/pages/ShortVideo.tsx:884:9",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.2,ease:[.16,1,.3,1]},children:E.jsx(ti,{"code-path":"src/pages/ShortVideo.tsx:890:11",to:"/contact",className:"inline-block gradient-accent text-white text-sm font-semibold uppercase tracking-[0.05em] px-10 py-4 rounded-lg transition-all duration-200 hover:shadow-glow-cyan hover:scale-[1.03] active:scale-[0.98]",children:e.ctaButton})})]})]})}function VX(){return E.jsxs("div",{"code-path":"src/pages/ShortVideo.tsx:907:5",children:[E.jsx(AX,{"code-path":"src/pages/Sh
4135ortVideo.tsx:908:7"}),E.jsx(CX,{"code-path":"src/pages/ShortVideo.tsx:909:7"}),E.jsx(LX,{"code-path":"src/pages/ShortVideo.tsx:910:7"}),E.jsx(IX,{"code-path":"src/pages/ShortVideo.tsx:911:7"}),E.jsx(PX,{"code-path":"src/pages/ShortVideo.tsx:912:7"}),E.jsx(zX,{"code-path":"src/pages/ShortVideo.tsx:913:7"}),E.jsx(BX,{"code-path":"src/pages/ShortVideo.tsx:914:7"})]})}const FX={hidden:{opacity:0,y:40},visible:(n=0)=>({opacity:1,y:0,transition:{duration:.7,delay:n,ease:[.16,1,.3,1]}})};function sn(n,e,t){const i=e.split(".");let s=n;for(const o of i){if(s==null)break;s=s[o]}return typeof s=="string"?s:t}function PI(n,e=2e3,t=""){const i=K.useRef(null),s=ih(i,{once:!0,margin:"-80px"}),[o,c]=K.useState("0");return K.useEffect(()=>{if(!s)return;const h=typeof n=="number",f=0,p=h?n:parseFloat(String(n).replace(/[^0-9.]/g,""));if(Number.isNaN(p)){c(String(n));return}let x;const y=performance.now(),v=S=>{const M=Math.min((S-y)/e,1),R=1-Math.pow(1-M,3),A=f+(p-f)*R;Number.isInteger(p)?c(Math.round(A).toLocaleString()+t):c(A.toFixed(1)+t),M<1&&(x=requestAnimationFrame(v))};return x=requestAnimationFrame(v),()=>cancelAnimationFrame(x)},[s,n,e,t]),{ref:i,display:o}}const kX={hidden:{opacity:0,y:40},visible:{opacity:1,y:0,transition:{duration:.7,ease:[.16,1,.3,1]}}},mg={hidden:{},visible:{transition:{staggerChildren:.1}}},MT={hidden:{opacity:0,y:40},visible:{opacity:1,y:0,transition:{duration:.7,ease:[.16,1,.3,1]}}},nv={hidden:{opacity:0,x:60},visible:{opacity:1,x:0,transition:{duration:.7,ease:[.16,1,.3,1]}}},HX={hidden:{opacity:0,scale:.95},visible:{opacity:1,scale:1,transition:{duration:.6,ease:[.16,1,.3,1]}}};function wo({children:n,className:e="",variants:t=kX}){const i=K.useRef(null),s=ih(i,{once:!0,margin:"-100px"}),o=qV();return K.useEffect(()=>{s&&o.start("visible")},[s,o]),E.jsx(be.div,{"code-path":"src/pages/VRSpace.tsx:161:5",ref:i,initial:"hidden",animate:o,variants:t,className:e,children:n})}function IS({value:n,suffix:e="",label:t,context:i,delay:s=0}){const{ref:o,display:c}=PI(n,2e3,e);return E.jsxs(be.div,{"code-path":"src/pages/VRSpace.tsx:189:5",variants:MT,className:"gradient-card glass-border rounded-2xl p-8 border text-center",style:{transitionDelay:`${s}ms`},children:[E.jsx("span",{"code-path":"src/pages/VRSpace.tsx:194:7",ref:o,className:"block font-mono text-4xl md:text-5xl font-bold text-accent-cyan mb-2",children:c}),E.jsx("p",{"code-path":"src/pages/VRSpace.tsx:200:7",className:"text-sm font-medium uppercase tracking-wider text-text-muted mb-1",children:t}),E.jsx("p",{"code-path":"src/pages/VRSpace.tsx:203:7",className:"text-sm text-text-secondary",children:i})]})}function GX({icon:n,title:e,description:t,tag:i,gradient:s="from-accent-cyan/20 to-accent-purple/20",image:o}){return E.jsxs(be.div,{"code-path":"src/pages/VRSpace.tsx:224:5",variants:MT,whileHover:{y:-6},transition:{duration:.3,ease:[.4,0,.2,1]},className:"group rounded-2xl border glass-border bg-bg-elevated overflow-hidden cursor-default",children:[E.jsxs("div",{"code-path":"src/pages/VRSpace.tsx:231:7",className:"relative h-[200px] overflow-hidden",children:[o?E.jsxs(E.Fragment,{children:[E.jsx("div",{"code-path":"src/pages/VRSpace.tsx:234:13",className:"absolute inset-0 bg-cover bg-center transition-transform duration-400 group-hover:scale-105",style:{backgroundImage:`url(${o})`}}),E.jsx("div",{"code-path":"src/pages/VRSpace.tsx:238:13",className:"absolute inset-0 bg-gradient-to-br from-accent-purple/10 to-accent-cyan/10"})]}):E.jsx("div",{"code-path":"src/pages/VRSpace.tsx:241:11",className:`absolute inset-0 bg-gradient-to-br ${s} flex items-center justify-center transition-transform duration-400 group-hover:scale-105`,children:E.jsx(n,{"code-path":"src/pages/VRSpace.tsx:244:13",className:"w-16 h-16 text-white/40",strokeWidth:1.2})}),E.jsx("div",{"code-path":"src/pages/VRSpace.tsx:247:9",className:"absolute inset-0 bg-gradient-to-t from-bg-elevated/60 to-transparent"})]}),E.jsxs("div",{"code-path":"src/pages/VRSpace.tsx:251:7",className:"p-5",children:[E.jsx("span",{"code-path":"src/pages/VRSpace.tsx:252:9",className:"inline-block px-3 py-1 rounded-full text-xs font-medium bg-accent-purple/10 text-accent-purple mb-3",children:i}),E.jsx("h4",{"code-path":"src/pages/VRSpace.tsx:255:9",className:"font-display text-xl font-semibold text-text-primary mb-2",children:e}),E.jsx("p",{"code-path":"src/pages/VRSpace.tsx:258:9",className:"text-sm text-text-secondary leading-relaxed line-clamp-2",children:t})]})]})}function jX({icon:n,title:e,items:t}){return E.jsxs(be.div,{"code-path":"src/pages/VRSpace.tsx:276:5",variants:MT,className:"gradient-card glass-border rounded-2xl p-8 border group hover:border-accent-cyan/30 transition-colors duration-300",children:[E.jsx("div",{"code-path":"src/pages/VRSpace.tsx:280:7",className:"w-12 h-12 rounded-xl gradient-accent flex items-center justify-center mb-5 shadow-glow-cyan",children:E.jsx(n,{"code-path":"src/pages/VRSpace.tsx:281:9",className:"w-6 h-6 text-white"})}),E.jsx("h4",{"code-path":"src/pages/VRSpace.tsx:283:7",className:"font-display text-xl font-semibold text-text-primary mb-4",children:e}),E.jsx("ul",{"code-path":"src/pages/VRSpace.tsx:286:7",className:"space-y-3",children:t.map((i,s)=>E.jsxs("li",{"code-path":"src/pages/VRSpace.tsx:288:11",className:"flex items-start gap-3 text-sm text-text-secondary",children:[E.jsx("span",{"code-path":"src/pages/VRSpace.tsx:289:13",className:"mt-1.5 w-1.5 h-1.5 rounded-full bg-accent-cyan shrink-0 shadow-glow-cyan"}),E.jsx("span",{"code-path":"src/pages/VRSpace.tsx:290:13",children:i})]},s))})]})}function WX(){const{t:n}=ci(),e={breadcrumb:[sn(n,"nav.home","Home"),sn(n,"nav.vrSpace","VR L
4135arge Space")],heroHeadline:sn(n,"vrSpacePage.heroHeadline","AIGC + VR Large Space"),heroSubheadline:sn(n,"vrSpacePage.heroSubheadline","A new era of location-based immersive entertainment â UE5 virtual production, high-precision spatial positioning, multi-user real-time interaction. AIGC brings virtual worlds within reach"),ctaPrimary:sn(n,"vrSpacePage.ctaPrimary","Explore Experiences"),ctaSecondary:sn(n,"vrSpacePage.ctaSecondary","Contact for LBE"),marketLabel:sn(n,"vrSpacePage.marketLabel","MARKET OVERVIEW"),marketHeadline:sn(n,"vrSpacePage.marketHeadline","VR Large Space Market Growing Rapidly"),marketDesc:sn(n,"vrSpacePage.marketDesc","VR Large Space (Location-Based Entertainment VR) is becoming the core engine of tourism industry upgrades. From 'Deep Sea Adventure' to 'Qingming Scroll 5.0', AIGC-powered content generation dramatically reduces development cost and timeline for large immersive projects."),stat1Label:sn(n,"vrSpacePage.stat1Label","B RMB â Sci-Fi Tourism Revenue"),stat1Context:sn(n,"vrSpacePage.stat1Context","YoY growth 13.8%"),stat2Label:sn(n,"vrSpacePage.stat2Label","Immersive Experience Projects"),stat2Context:sn(n,"vrSpacePage.stat2Context","Across multiple cities"),stat3Label:sn(n,"vrSpacePage.stat3Label","Avg Space Per Project"),stat3Context:sn(n,"vrSpacePage.stat3Context","Large-scale venues"),experiencesLabel:sn(n,"vrSpacePage.experiencesLabel","IMMERSIVE EXPERIENCES"),experiencesHeadline:sn(n,"vrSpacePage.experiencesHeadline","Explore the Boundary of Virtual and Reality"),tag:sn(n,"vrSpacePage.tag","VR Large Space"),techHeadline:sn(n,"vrSpacePage.techHeadline","Technology Stack & Core Capabilities"),techEngineTitle:sn(n,"vrSpacePage.techEngineTitle","Engine Tech"),techSpatialTitle:sn(n,"vrSpacePage.techSpatialTitle","Spatial Positioning"),techInteractionTitle:sn(n,"vrSpacePage.techInteractionTitle","Interaction Design"),techContentTitle:sn(n,"vrSpacePage.techContentTitle","Content Generation"),caseLabel:sn(n,"vrSpacePage.caseLabel","CASE STUDY"),caseHeadline:sn(n,"vrSpacePage.caseHeadline","'Deep Sea Adventure': 3000ã¡ Immersive Ocean Experience"),caseBody:sn(n,"vrSpacePage.caseBody","Using UE5 virtual production and AIGC content generation, we created China's largest ocean-themed VR large space experience. The 3000ã¡ space supports 50 simultaneous explorers, with high-precision full-body motion capture and real-time rendering delivering unprecedented immersion."),metric1Label:sn(n,"vrSpacePage.metric1Label","Experience Space"),metric2Label:sn(n,"vrSpacePage.metric2Label","Simultaneous Users"),metric3Label:sn(n,"vrSpacePage.metric3Label","Engine Tech"),ctaHeadline:sn(n,"vrSpacePage.ctaHeadline","Build Your Next VR Large Space Experience"),ctaDesc:sn(n,"vrSpacePage.ctaDesc","From concept design to technical implementation, from content generation to operational support â we provide end-to-end VR large space solutions"),ctaBtn:sn(n,"vrSpacePage.ctaBtn","Discuss Your Project")},t=[{icon:Sv,title:sn(n,"vrSpacePage.exp1Title","Deep Sea Adventure"),description:sn(n,"vrSpacePage.exp1Desc","Ocean-themed VR immersion, explore deep-sea wonders"),gradient:"from-cyan-500/20 to-blue-600/20"},{icon:SR,title:sn(n,"vrSpacePage.exp2Title","Panda World"),description:sn(n,"vrSpacePage.exp2Desc","Journey exploring the past and present of giant pandas"),gradient:"from-emerald-500/20 to-green-600/20"},{icon:BS,title:sn(n,"vrSpacePage.exp3Title","Eternal Pyramid"),description:sn(n,"vrSpacePage.exp3Desc","Mayan civilization exploration with cinematic interactive storytelling"),gradient:"from-amber-500/20 to-orange-600/20"},{icon:VS,title:sn(n,"vrSpacePage.exp4Title","Dunhuang: Sea of Sand"),description:sn(n,"vrSpacePage.exp4Desc","Cinematic interactive storytelling, digitally reviving Dunhuang cultural heritage"),gradient:"from-yellow-500/20 to-amber-700/20"},{icon:cU,title:sn(n,"vrSpacePage.exp5Title","Qingming Scroll 5.0"),description:sn(n,"vrSpacePage.exp5Desc","Murder mystery + escape room + VR, multi-layered gameplay fusion"),gradient:"from-rose-500/20 to-pink-600/20"},{icon:g5,title:sn(n,"vrSpacePage.exp6Title","Dream of Yuanmingyuan"),description:sn(n,"vrSpacePage.exp6Desc","AAA visual quality, 1:1 digital restoration of historic ruins"),gradient:"from-violet-500/20 to-purple-700/20"}],i=[{icon:w5,title:e.techEngineTitle,items:["Unreal Engine 5","Unity","Real-time ray tracing","Nanite virtualized geometry"]},{icon:qM,title:e.techSpatialTitle,items:["High-precision tracking","Multi-user sync","Inside-out tracking","Lighthouse 2.0"]},{icon:z5,title:e.techInteractionTitle,items:["Full-body motion capture","Haptic feedback","Eye tracking","Gesture recognition"]},{icon:fc,title:e.techContentTitle,items:["AIGC scene generation","Procedural environments","AI NPC dialogue","Dynamic lighting"]}];return E.jsxs("main",{"code-path":"src/pages/VRSpace.tsx:493:5",className:"overflow-hidden",children:[E.jsxs("section",{"code-path":"src/pages/VRSpace.tsx:497:7",className:"relative min-h-[80dvh] gradient-hero flex items-center justify-center",children:[E.jsx("div",{"code-path":"src/pages/VRSpace.tsx:499:9",className:"absolute inset-0 gradient-glow opacity-40 pointer-events-none"}),E.jsxs("div",{"code-path":"src/pages/VRSpace.tsx:501:9",className:"relative z-10 max-w-[800px] mx-auto px-6 text-center pt-20",children:[E.jsxs(be.div,{"code-path":"src/pages/VRSpace.tsx:503:11",initial:{opacity:0,y:20}
4135,animate:{opacity:1,y:0},transition:{duration:.6,ease:[.16,1,.3,1]},className:"flex items-center justify-center gap-2 text-sm text-text-muted mb-8",children:[E.jsx("span",{"code-path":"src/pages/VRSpace.tsx:509:13",children:e.breadcrumb[0]}),E.jsx(Eu,{"code-path":"src/pages/VRSpace.tsx:510:13",className:"w-4 h-4"}),E.jsx("span",{"code-path":"src/pages/VRSpace.tsx:511:13",className:"text-text-secondary",children:e.breadcrumb[1]})]}),E.jsx(be.h1,{"code-path":"src/pages/VRSpace.tsx:515:11",initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,delay:.1,ease:[.16,1,.3,1]},className:"font-display text-4xl md:text-6xl lg:text-7xl font-bold gradient-text mb-6 leading-tight",children:e.heroHeadline}),E.jsx(be.p,{"code-path":"src/pages/VRSpace.tsx:525:11",initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.7,delay:.3,ease:[.16,1,.3,1]},className:"text-lg md:text-xl text-text-secondary max-w-[640px] mx-auto mb-10 leading-relaxed",children:e.heroSubheadline}),E.jsxs(be.div,{"code-path":"src/pages/VRSpace.tsx:535:11",initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.7,delay:.5,ease:[.16,1,.3,1]},className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:[E.jsx("a",{"code-path":"src/pages/VRSpace.tsx:541:13",href:"#experiences",className:"gradient-accent px-8 py-3.5 rounded-lg text-white font-semibold text-sm uppercase tracking-wider hover:scale-[1.03] hover:shadow-glow-cyan transition-all duration-200",children:e.ctaPrimary}),E.jsx("a",{"code-path":"src/pages/VRSpace.tsx:547:13",href:"/contact",className:"px-8 py-3.5 rounded-lg border border-accent-cyan/40 text-accent-cyan font-semibold text-sm uppercase tracking-wider hover:bg-accent-cyan/10 hover:border-accent-cyan/80 transition-all duration-200",children:e.ctaSecondary})]})]})]}),E.jsx("section",{"code-path":"src/pages/VRSpace.tsx:560:7",className:"bg-bg-secondary py-24 md:py-32",children:E.jsxs("div",{"code-path":"src/pages/VRSpace.tsx:561:9",className:"max-w-7xl mx-auto px-6",children:[E.jsxs(wo,{"code-path":"src/pages/VRSpace.tsx:563:11",className:"text-center mb-16",children:[E.jsx("p",{"code-path":"src/pages/VRSpace.tsx:564:13",className:"text-xs font-medium uppercase tracking-[0.15em] text-accent-cyan mb-4",children:e.marketLabel}),E.jsx("h2",{"code-path":"src/pages/VRSpace.tsx:567:13",className:"font-display text-3xl md:text-5xl font-semibold text-text-primary max-w-3xl mx-auto",children:e.marketHeadline})]}),E.jsxs(be.div,{"code-path":"src/pages/VRSpace.tsx:573:11",initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-100px"},variants:mg,className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-12",children:[E.jsx(IS,{"code-path":"src/pages/VRSpace.tsx:580:13",value:277.7,suffix:"B",label:e.stat1Label,context:e.stat1Context}),E.jsx(IS,{"code-path":"src/pages/VRSpace.tsx:586:13",value:10,suffix:"+",label:e.stat2Label,context:e.stat2Context}),E.jsx(IS,{"code-path":"src/pages/VRSpace.tsx:592:13",value:1e3,suffix:"ã¡+",label:e.stat3Label,context:e.stat3Context})]}),E.jsx(wo,{"code-path":"src/pages/VRSpace.tsx:601:11",className:"max-w-3xl mx-auto text-center",children:E.jsx("p",{"code-path":"src/pages/VRSpace.tsx:602:13",className:"text-base md:text-lg text-text-secondary leading-relaxed",children:e.marketDesc})})]})}),E.jsx("section",{"code-path":"src/pages/VRSpace.tsx:612:7",id:"experiences",className:"bg-bg-primary py-28 md:py-36",children:E.jsxs("div",{"code-path":"src/pages/VRSpace.tsx:613:9",className:"max-w-7xl mx-auto px-6",children:[E.jsxs(wo,{"code-path":"src/pages/VRSpace.tsx:615:11",className:"text-center mb-16",children:[E.jsx("p",{"code-path":"src/pages/VRSpace.tsx:616:13",className:"text-xs font-medium uppercase tracking-[0.15em] text-accent-cyan mb-4",children:e.experiencesLabel}),E.jsx("h2",{"code-path":"src/pages/VRSpace.tsx:619:13",className:"font-display text-3xl md:text-5xl font-semibold text-text-primary max-w-3xl mx-auto",children:e.experiencesHeadline})]}),E.jsx(be.div,{"code-path":"src/pages/VRSpace.tsx:625:11",initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-80px"},variants:mg,className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:t.map((s,o)=>E.jsx(GX,{"code-path":"src/pages/VRSpace.tsx:633:15",icon:s.icon,title:s.title,de
4135scription:s.description,tag:e.tag,gradient:s.gradient},o))})]})}),E.jsx("section",{"code-path":"src/pages/VRSpace.tsx:649:7",className:"bg-bg-secondary py-28 md:py-36",children:E.jsxs("div",{"code-path":"src/pages/VRSpace.tsx:650:9",className:"max-w-7xl mx-auto px-6",children:[E.jsx(wo,{"code-path":"src/pages/VRSpace.tsx:652:11",className:"text-center mb-16",children:E.jsx("h2",{"code-path":"src/pages/VRSpace.tsx:653:13",className:"font-display text-3xl md:text-5xl font-semibold text-text-primary max-w-3xl mx-auto",children:e.techHeadline})}),E.jsx(be.div,{"code-path":"src/pages/VRSpace.tsx:659:11",initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-80px"},variants:mg,className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",children:i.map((s,o)=>E.jsx(jX,{"code-path":"src/pages/VRSpace.tsx:667:15",icon:s.icon,title:s.title,items:s.items},o))})]})}),E.jsx("section",{"code-path":"src/pages/VRSpace.tsx:681:7",className:"bg-bg-primary py-28 md:py-36",children:E.jsx("div",{"code-path":"src/pages/VRSpace.tsx:682:9",className:"max-w-7xl mx-auto px-6",children:E.jsxs("div",{"code-path":"src/pages/VRSpace.tsx:683:11",className:"grid grid-cols-1 lg:grid-cols-2 gap-12 items-center",children:[E.jsxs(be.div,{"code-path":"src/pages/VRSpace.tsx:685:13",initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-80px"},variants:HX,className:"relative aspect-[4/3] rounded-2xl overflow-hidden shadow-lg",children:[E.jsx("div",{"code-path":"src/pages/VRSpace.tsx:692:15",className:"absolute inset-0 bg-gradient-to-br from-cyan-900/60 via-blue-900/60 to-indigo-900/60 flex items-center justify-center",children:E.jsxs("div",{"code-path":"src/pages/VRSpace.tsx:693:17",className:"text-center",children:[E.jsx(Sv,{"code-path":"src/pages/VRSpace.tsx:694:19",className:"w-24 h-24 text-white/30 mx-auto mb-4",strokeWidth:1}),E.jsx("p",{"code-path":"src/pages/VRSpace.tsx:695:19",className:"text-white/50 text-sm font-medium uppercase tracking-wider",children:"Deep Sea Adventure"})]})}),E.jsx("div",{"code-path":"src/pages/VRSpace.tsx:700:15",className:"absolute inset-0 bg-gradient-to-t from-bg-primary/40 to-transparent"})]}),E.jsxs(be.div,{"code-path":"src/pages/VRSpace.tsx:704:13",initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-80px"},variants:mg,children:[E.jsx(be.p,{"code-path":"src/pages/VRSpace.tsx:710:15",variants:nv,className:"text-xs font-medium uppercase tracking-[0.15em] text-accent-cyan mb-4",children:e.caseLabel}),E.jsx(be.h3,{"code-path":"src/pages/VRSpace.tsx:716:15",variants:nv,className:"font-display text-2xl md:text-4xl font-semibold text-text-primary mb-6 leading-tight",children:e.caseHeadline}),E.jsx(be.p,{"code-path":"src/pages/VRSpace.tsx:722:15",variants:nv,className:"text-base md:text-lg text-text-secondary leading-relaxed mb-8",children:e.caseBody}),E.jsxs(be.div,{"code-path":"src/pages/VRSpace.tsx:730:15",variants:nv,className:"grid grid-cols-3 gap-6",children:[E.jsx(PS,{"code-path":"src/pages/VRSpace.tsx:734:17",value:"3000",suffix:"ã¡",label:e.metric1Label}),E.jsx(PS,{"code-path":"src/pages/VRSpace.tsx:735:17",value:"50",suffix:"",label:e.metric2Label}),E.jsx(PS,{"code-path":"src/pages/VRSpace.tsx:736:17",value:"UE5",suffix:"",label:e.metric3Label,isText:!0})]})]})]})})}),E.jsx(XX,{"code-path":"src/pages/VRSpace.tsx:746:7"}),E.jsxs("section",{"code-path":"src/pages/VRSpace.tsx:751:7",className:"gradient-hero py-24 md:py-32 relative",children:[E.jsx("div",{"code-path":"src/pages/VRSpace.tsx:752:9",className:"absolute inset-0 gradient-glow opacity-30 pointer-events-none"}),E.jsx("div",{"code-path":"src/pages/VRSpace.tsx:753:9",className:"relative z-10 max-w-3xl mx-auto px-6 text-center",children:E.jsxs(wo,{"code-path":"src/pages/VRSpace.tsx:754:11",children:[E.jsx("h2",{"code-path":"src/pages/VRSpace.tsx:755:13",className:"font-display text-3xl md:text-5xl font-semibold text-text-primary mb-6",children:e.ctaHeadline}),E.jsx("p",{"code-path":"src/pages/VRSpace.tsx:758:13",className:"text-base md:text-lg text-text-secondary leading-relaxed mb-10 max-w-2xl mx-auto",children:e.ctaDesc}),E.jsxs("a",{"code-path":"src/pages/VRSpace.tsx:761:13",href:"/contact",className:"inline-flex items-center gap-2 gradient-accent px-8 py-4 rounded-lg text-white font-semibold text-sm uppercase tracking-wider hover:scale-[1.03] hover:shadow-glow-cyan transition-all duration-200",children:[e.ctaBtn,E.jsx(C1,{"code-path":"src/pages/VRSpace.tsx:766:15",className:"w-4 h-4"})]})]})})]})]})}function PS({value:n,suffix:e,label:t,isText:i=!1}){const{ref:s,display:o}=PI(i?0:parseFloat(n),2e3,e);return E.jsxs("div",{"code-path":"src/pages/VRSpace.tsx:793:5",className:"text-center",children:[E.jsx("span",{"code-path":"src/pages/VRSpace.tsx:794:7",ref:s,className:"block font-mono text-2xl md:text-3xl font-bold text-accent-cyan mb-1",children:i?n:o}),E.jsx("span",{"code-path":"src/pages/VRSpace.tsx:800:7",className:"text-xs text-text-muted uppercase tracking-wider",children:t})]})}function XX(){const{language:n}=ci(),e=qX[n];return E.jsxs("section",{"code-path":"src/pages/VRSpace.tsx:815:5",className:"bg-bg-primary py-24 md:py-32 relative overflow-hidden",children:[E.jsx("div",{"code-path":"src/pages/VRSpace.tsx:817:7",className:"absolute inset-0 gradient-glow opacity-20 pointer-events-none"}),E.jsxs("div",{"code-path":"src/pages/VRSpace.tsx:820:7",className:"relative z-10 max-w-7xl mx-auto px-6 lg:px-12 xl:px-20",children:[E.jsx(wo,{"code-path":"src/pages/VRSpace.tsx:822:9",children:E.jsxs("div",{"code-path":"src/pages/VRSpace.tsx:823:11",className:"text-center mb-16",children:[E.jsx("p",{"code-path":"src/pages/VRSpace.tsx:824:13",className:"text-accent-cyan text-xs uppercase tracking-[0.1em] mb-4 font-medium",children:e.label}),E.jsx("h2",{"code-path":"src/pages/VRSpace.tsx:827:13",className:"font-display text-3xl md:text-5xl lg:text-6xl font-semibold text-text-primary mb-6 leading-tight",children:e.headline}),E.jsx("p",{"code-path":"src/pages/VRSpace.tsx:830:13",className:"text-base md:text-lg text-text-secondary max-w-3xl mx-auto leading-relaxed",children:e.subheadline})]})}),E.jsx(wo,{"code-path":"src/pages/VRSpace.tsx:837:9",children:E.jsxs("div",{"code-path":"src/pages/VRSpace.tsx:838:11",className:"bg-bg-elevated/50 border border-glass-border rounded-2xl p-6 md:p-10 mb-16 backdrop-blur-sm",children:[E.jsx("h3",{"code-path":"src/pages/VRSpace.tsx:839:13",className:"font-display text-xl md:text-2xl font-semibold text-text-primary mb-4",children:e.storyTitle}),E.jsx("p",{"code-path":"src/pages/VRSpace.tsx:842:13",className:"text-text-secondary leading-relaxed mb-4",children:e.storyBody}),E.jsx("div",{"code-path":"src/pages/VRSpace.tsx:845:13",className:"grid grid-cols-2 md:grid-cols-4 gap-4 mt-6",children:e.highlights.map((t,i)=>E.jsxs("div",{"code-path":"src/pages/VRSpace.tsx:847:17",className:"flex items-center gap-3 p-3 rounded-lg bg-bg-primary/60 border border-[rgba(0,229,255,0.1)]",children:[E.jsx("span",{"code-path":"src/pages/VRSpace.tsx:851:19",className:"w-8 h-8 rounded-full gradient-accent flex items-center justify-center text-white text-xs font-bold shrink-0",children:i+1}),E.jsx("span",{"code-path":"src/pages/VRSpace.tsx:854:19",className:"text-text-primary text-sm font-medium",children:t})]},i))})]})}),E.jsx(wo,{"code-path":"src/pages/VRSpace.tsx:862:9",children:E.jsx("h3",{"code-path":"src/pages/VRSpace.tsx:863:11",className:"font-display text-2xl md:text-3xl font-semibold text-text-primary mb-8 text-center",children:e.scenesTitle})}),E.jsx(be.div,{"code-path":"src/pages/VRSpace.tsx:867:9",variants:mg,initial:"hidden",
4135whileInView:"visible",viewport:{once:!0,amount:.1},className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-5 mb-16",children:e.scenes.map((t,i)=>E.jsxs(be.div,{"code-path":"src/pages/VRSpace.tsx:875:13",variants:FX,className:"group relative rounded-xl overflow-hidden border border-glass-border bg-bg-elevated hover:border-[rgba(0,229,255,0.3)] transition-all duration-300 hover:-translate-y-1",children:[E.jsxs("div",{"code-path":"src/pages/VRSpace.tsx:880:15",className:`relative h-40 overflow-hidden bg-gradient-to-br ${t.gradient} flex items-center justify-center`,children:[E.jsx(t.icon,{"code-path":"src/pages/VRSpace.tsx:881:17",className:"w-12 h-12 text-white/30",strokeWidth:1.2}),E.jsx("div",{"code-path":"src/pages/VRSpace.tsx:882:17",className:"absolute inset-0 bg-gradient-to-t from-bg-elevated/70 to-transparent"})]}),E.jsxs("div",{"code-path":"src/pages/VRSpace.tsx:884:15",className:"p-4",children:[E.jsx("h4",{"code-path":"src/pages/VRSpace.tsx:885:17",className:"font-display text-sm font-semibold text-text-primary mb-1",children:t.title}),E.jsx("p",{"code-path":"src/pages/VRSpace.tsx:886:17",className:"text-text-secondary text-xs leading-relaxed",children:t.desc})]})]},i))}),E.jsxs("div",{"code-path":"src/pages/VRSpace.tsx:893:9",className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-16",children:[E.jsx(wo,{"code-path":"src/pages/VRSpace.tsx:894:11",children:E.jsxs("div",{"code-path":"src/pages/VRSpace.tsx:895:13",className:"bg-bg-elevated/50 border border-glass-border rounded-2xl p-6 md:p-8 backdrop-blur-sm",children:[E.jsx("h3",{"code-path":"src/pages/VRSpace.tsx:896:15",className:"font-display text-xl font-semibold text-text-primary mb-3",children:e.avatarTitle}),E.jsx("p",{"code-path":"src/pages/VRSpace.tsx:897:15",className:"text-text-secondary text-sm leading-relaxed",children:e.avatarDesc})]})}),E.jsx(wo,{"code-path":"src/pages/VRSpace.tsx:900:11",children:E.jsxs("div",{"code-path":"src/pages/VRSpace.tsx:901:13",className:"bg-bg-elevated/50 border border-glass-border rounded-2xl p-6 md:p-8 backdrop-blur-sm",children:[E.jsx("h3",{"code-path":"src/pages/VRSpace.tsx:902:15",className:"font-display text-xl font-semibold text-text-primary mb-3",children:e.npcTitle}),E.jsx("p",{"code-path":"src/pages/VRSpace.tsx:903:15",className:"text-text-secondary text-sm leading-relaxed",children:e.npcDesc})]})})]}),E.jsx(wo,{"code-path":"src/pages/VRSpace.tsx:909:9",children:E.jsxs("div",{"code-path":"src/pages/VRSpace.tsx:910:11",className:"bg-bg-elevated/50 border border-glass-border rounded-2xl p-6 md:p-8 backdrop-blur-sm",children:[E.jsx("h3",{"code-path":"src/pages/VRSpace.tsx:911:13",className:"font-display text-xl font-semibold text-text-primary mb-4",children:e.specsTitle}),E.jsx("div",{"code-path":"src/pages/VRSpace.tsx:912:13",className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:e.specs.map((t,i)=>E.jsxs("div",{"code-path":"src/pages/VRSpace.tsx:914:17",className:"flex items-start gap-3",children:[E.jsx(fc,{"code-path":"src/pages/VRSpace.tsx:915:19",className:"w-4 h-4 text-accent-cyan mt-0.5 shrink-0"}),E.jsx("span",{"code-path":"src/pages/VRSpace.tsx:916:19",className:"text-text-secondary text-sm",children:t})]},i))})]})})]})]})}const qX={"zh-HK":{label:"VR 大空é´ä»£è¡¨ä½å",headline:"ç©¿è¶ AI éå¡çä¸ç»¸ä¹è·¯",subheadline:"2125 å¹´ï¼è¶
梦æ
è¡ææ¯å·²åæè§æ¨¡ãå©ç¨åå²èµæãèæºæ¥å£ä¸ AI ææ¯è¿è¡åçæ¨æ¼å¹¶å¯è§åï¼å¾ä»¥è®©ä¸åææçä»»ææ¶ç©ºéç°ãä½ å°å身ç¾åæå½±å®¶ï¼è§è¯å¼å½é£å
éä¼¼ç似幻çæåå¥è§ã",storyTitle:"æ
äºèæ¯",storyBody:"卿¬æ¬¡æ
è¡ä¸ï¼ä½ 们åéä½ä¸ºè¯¥ææ¯çæ©ææµè¯ç¨æ·ï¼ä»ä¸ç»¸ä¹è·¯çèµ·æºââ西å®å°ä¸ç¥ç§çå¯æç»ææç ç©¶æåºåï¼ç©¿è¶å¹¶åå¾è¥å¹²è¿æ¡è·¯çº¿çå½å®¶ä¸å°åºï¼å¯»è§
æå交èç产ç©ãè®°å½å¹¶æ¾å被åå²éè½çåé å产ç©ä¸äººæç°è±¡ï¼ä»¥å
±å»ºå°çæ´å ç¾å¥½çæªæ¥ã",highlights:["ç¨æ·ä¸»å¨è¾¹èµ°è¾¹æ","ç¬ä¸æ äºèæå身","å¤éåäºäº¤äºææ³","åºäºç宿ååå²"],scenesTitle:"å
«å¤§æ²æµ¸å¼ VR åºæ¯",scenes:[{title:"è¥¿å® Â· å¯æç»ææç ç©¶æ",desc:"ä»ä¸ç»¸ä¹è·¯çèµ·æºåºåï¼ç¥ç§çå°ä¸ç ç©¶æå°å¸¦ä½ å¼å¯è¶
梦æ
ç¨ã",gradient:"from-emerald-600/30 to-teal-800/30",icon:NE},{title:"æåæ¥å¯º",desc:"红å¢éé¡¶å¨é³å
ä¸ç ç çè¾ï¼äºå½©ç»å¹¡éé£ç¿»æ¶å¦æµªï¼è½¬ç»çæµè½¬é´è§¦æ¸ä¿¡ä»°ç温度ã",gradient:"from-
4135amber-600/30 to-yellow-800/30",icon:DE},{title:"å¨å°¼æ¯ · åå¤å£é©¬å¯",desc:"å¨å¨å°¼æ¯çåå¤ç¬äº«å£é©¬å¯å¹¿åºçå®éï¼ä¸ç¹å¤§æå çå丽ä¸åºä¸¥ã",gradient:"from-blue-600/30 to-indigo-800/30",icon:BS},{title:"å¨å°¼æ¯ · 广¯æ°´å··",desc:"å¨è´¡å¤æä¸æ¼«æ¸¸ï¼èå¬ä¸¤å²¸ççµéæ´çé¢å
·æ¼å±çå½çä¹ç« ï¼è§è¯å¹æ¯æ¡¥ä¸ç亡çµã",gradient:"from-cyan-600/30 to-blue-800/30",icon:Sv},{title:"å¨å°¼æ¯ · æå¤ç欢",desc:"卿°¸æä¸ççç¯å
ä¸è¿è¡ç¥ç¦ï¼åä¸å岿§çå¥å¹»ç欢èï¼æåç¾çµå¤è¡çé¢
å
髿½®ã",gradient:"from-purple-600/30 to-pink-800/30",icon:LE},{title:"å¾·æåºå°¤ · å°åç§å¢",desc:"æ¢ç´¢è¿å»åè³å
¶äººæ°ççæ´»ç迹ä¸ç¥ç§ä»ªå¼ï¼å¨å°ä¸18å±è§è¯æ´é«æºæ
§æææ¾ç»åå¨ççæ³ã",gradient:"from-slate-600/30 to-gray-800/30",icon:VS},{title:"å¡å¸å¤å¥äº · ç«ç°æ¥è½",desc:"ä¹åçæ°çå¨äºç«¯æåçè
峡谷è¬çç¥å¥å°è²ï¼å¨ç»ç¾æ¥è½ä¸è§è¯ç¬ä¸æ äºççæ°çå©ç¤¼ã",gradient:"from-rose-600/30 to-orange-800/30",icon:IE},{title:"çé¨å
³ · éåçæ",desc:'"ç¾ç¬ä½é¡»æ¨æ¨æ³ï¼æ¥é£ä¸åº¦çé¨å
³"ï¼ææä¸åå²å¨æ»æ»é»æ²ä¸ä»¥æ°çæ¹å¼ä¸ä½ æéé¢ã',gradient:"from-yellow-600/30 to-amber-800/30",icon:zS}],avatarTitle:"ç¨æ·èææ¿èº« · 驼éè¡è
",avatarDesc:"ä½éªè
å身为ç ç©¶æµè¯å©æââ驼éè¡è
ï¼è´è´£å¨ä¸æ¬¡æ¬¡æ¨¡ææ
ç¨ä¸ææå¹¶å¸¦å AI ç ç©¶æéè¦çç¹å®å¯è§åç´ æã身ä½è¢«æå¹³åä¸ç¬¦å·åï¼å¯æ ¹æ®ç¯å¢éè¦éåºæ§æ¹åèªå·±çæåå¤è§ï¼åç°åºå
¥ä¹¡éä¿çç¶æã",npcTitle:"ä¸»è¦ NPC · éªéª",npcDesc:"ä»¥å¼ éªä¸ºèº«ä»½æå°èåé çæ°åç ç©¶åï¼æ¯ä¸ä¸ªè½¯ä½æ°åçå½å AI ä¼´ä¾£ãå
¨ç¨ä½ä¸ºä½éªè
çå导ï¼å¸¦é¢å¤§å®¶å®æä½éªãä»èªå¸¦ç©ºé´è¯å«åå
¨æ¯åç°ææ¯ï¼å¯ä»¥å°ä¿¡æ¯ç©ºé´åãè§è§åï¼å¨æ¨¡ææ
ç¨ä¸æ¿æ´»åå¢å¼ºä¿¡æ¯ã",specsTitle:"å
容忰",specs:["å¼å弿ï¼Unity 3D","ç»ç«¯å¹
4135³å°ï¼ä¸»æµä¸ä½æº VR","ä½éªæ¶é¿ï¼25 - 30 åé","äºå¨æ¹å¼ï¼è¡èµ°ä½éªãæå¿äºå¨ã注æåè¯å«","åç»äººæ°ï¼1 - 4 人","ååºäººæ°ï¼20 - 100 人","ä½éªé¢ç§¯ï¼150 - 600 å¹³æ¹ç±³","æ ¸å¿ææ¯ï¼6DOF å¤äººå®ä½"]},en:{label:"VR LARGE SPACE FLAGSHIP",headline:"Journey Through the AI-Reimagined Silk Road",subheadline:"In 2125, hyper-dream travel technology has matured. Using historical data, brain-computer interfaces, and AI to visualize and recreate any civilization across time and space. You become a transformative photographer, witnessing surreal cultural wonders.",storyTitle:"Story Background",storyBody:"You are invited as an early test user of this technology. Starting from the mysterious Sustainable Civilization Research Institute beneath Xi'an â the origin of the Silk Road â you travel across multiple countries and regions along this ancient route, seeking the products of cultural fusion.",highlights:["Walk & Shoot Freely","Unique Virtual Avatar","Multi-layered Narrative","Real Cultural History"],scenesTitle:"Eight Immersive VR Scenes",scenes:[{title:"Xi'an · Research Institute",desc:"Begin your hyper-dream journey from the mysterious underground institute at the origin of the Silk Road.",gradient:"from-emerald-600/30 to-teal-800/30",icon:NE},{title:"Labrang Monastery",desc:"Red walls and golden roofs gleaming in sunlight, colorful prayer flags waving like waves, spinning prayer wheels.",gradient:"from-amber-600/30 to-yellow-800/30",icon:DE},{title:"Venice · Midnight St. Mark's",desc:"Enjoy the serenity of St. Mark's Square at midnight in Venice, witnessing the grandeur of the cathedral.",gradient:"from-blue-600/30 to-indigo-800/30",icon:BS},{title:"Venice · Bridge of Sighs",desc:"Roam in a gondola, listening to souls singing the music of life while wearing masks along the canals.",gradient:"from-cyan-600/30 to-blue-800/30",icon:Sv},{title:"Venice · Moonlight Carnival",desc:"Pray under eternal lights, participate in a historic fantasy carnival, experiencing the climax of All Hallows' Eve.",gradient:"from-purple-600/30 to-pink-800/30",icon:LE},{title:"Derinkuyu · Underground City",desc:"Explore traces of past Turkish life and mysterious rituals, witnessing theories of higher intelligence 13,000 years ago.",gradient:"from-slate-600/30 to-gray-800/30",icon:VS},{title:"Cappadocia · Rose Sunset",desc:"Ride a hot air balloon above clouds, feeling the magical landscape, and witness a unique balloon wedding at sunset.",gradient:"from-rose-600/30 to-orange-800/30",icon:IE},{title:"Yumen Pass · Ruins",desc:'"Why should the Qiang flute complain of willows? The spring breeze never crosses Yumen Pass." Civilizations reunite.',gradient:"from-yellow-600/30 to-amber-800/30",icon:zS}],avatarTitle:"User Avatar · Camel Bell Walker",avatarDesc:"Experience users transform into research test assistants â Camel Bell Walkers, responsible for shooting and bringing back specific visual materials needed by the AI research institute during simulated journeys.",npcTitle:"Main NPC · Qian Qian",npcDesc:"A digital researcher created based on the projection of Zhang Qian's identity, a soft-bodied digital life and AI companion. He serves as the guide throughout the experience, leading everyone to complete the journey.",specsTitle:"Technical Specifications",specs:["Engine: Unity 3D","Platform: Standalone VR Headsets","Duration: 25 - 30 minutes","Interaction: Walking, Gesture, Attention Tracking","Group Size: 1 - 4 people","Venue Capacity: 20 - 100 people","Space: 150 - 600 sqm","Core Tech: 6DOF Multi-user Tracking"]}},YX={breadcrumbHome:"Home",breadcrumbAbout:"About",heroHeadline:"About Pixeland",heroSubheadline:"Founded in 2004, 20 years of digital content expertise, 300+ creators â from traditional animation to an AIGC-powered future",ctaTeam:"Meet Our Team",ctaContact:"Contact Us",statsFounded:"2004",statsFoundedLabel:"Founded",statsTeam:"300+",statsTeamLabel:"Team Members",statsExperience:"20+",statsExperienceLabel:"Years Experience",statsBusiness:"3",statsBusinessLabel:"Core Business Areas",storyHeadline:"From Pixels to Infinity",storyBody:"Pixeland Digital Production was founded in 2004 as one of China's leading digital content production companies. From early traditional animation and art outsourcing to today's AIGC-powered gaming, short video, and VR large space content production, we have always stood at the forefront of digital entertainment technology. Our 300+ team members include digital artists, 3D modelers, AI researchers, engine developers, and project managers, distributed globally to deliver world-class content for clients.",timelineLabel:"OUR JOURNEY",timelineHeadline:"Two Decades, From Traditional to AIGC",milestones:[{year:"2004",title:"Founded",description:"Pixeland founded, focusing on digital animation and art outsourcing"},{year:"2008",title:"Game Art",description:"Expanded game art services for domestic and international studios"},{year:"2012",title:"3D Pipeline",description:"Established full 3D production pipeline, introduced motion capture"},{year:"2016",title:"VR Exploration",description:"Entered VR/AR content production, exploring immersive experiences"},{year:"2019",title:"Scale",description:"Team grew past 200, serving Tencent, NetEase, ByteDance and other leading clients"},{year:"2022",title:"AI Integration",description:"Fully integrated AIGC tools into production pipeline, major efficiency gains"},{year:"2024",title:"AIGC Era",description:"Launched next-gen AIGC-powered digital content services covering gaming, short video, and VR large space"}],teamHeadline:"A Global Creator Community",teamDescription:"300+ artists, engineers, and creatives from around the world",teamCards:[{title:"Digital Artists",description:"Concept art, character design, environment painting, animation â unleashing creativity with AI tools"},{title:"Technical Engineers",description:"Engine development, AI algorithms, VR systems, real-time rendering â building virtual worlds with technology"},{title:"Production & Operations",description:"Project management, client relations, quality control, global delivery â ensuring every project lands perfectly"}],valuesHeadline:"Our Values",valueCards:[{title:"01",subtitle:"Constant Innovation",description:"Embracing cutting-edge technologies like AIGC, never stopping exploration"},{title:"02",subtitle:"Quality First",description:"Every pixel pursued to perfection, every project delivered as premium"},{title:"03",subtitle:"Global Collaboration",description:"Seamless team collaboration across time zones, languages, and cultures"}
4135,{title:"04",subtitle:"Create Impact",description:"Empowering creators with AIGC, making digital entertainment accessible to more people"}],ctaHeadline:"Join Pixeland, Shape the Digital Future",ctaDescription:"We're always looking for creators who love technology and art",ctaButton:"Contact Us"},Hr=[.16,1,.3,1],Wr={hidden:{opacity:0,y:40},visible:(n=0)=>({opacity:1,y:0,transition:{duration:.7,delay:n,ease:Hr}})},ZX={hidden:{opacity:0,y:20},visible:(n=0)=>({opacity:1,y:0,transition:{duration:.6,delay:n,ease:Hr}})},UI={hidden:{},visible:{transition:{staggerChildren:.1}}},KX={hidden:{opacity:0,x:-60},visible:(n=0)=>({opacity:1,x:0,transition:{duration:.7,delay:n,ease:Hr}})},$X={hidden:{opacity:0,x:60},visible:(n=0)=>({opacity:1,x:0,transition:{duration:.7,delay:n,ease:Hr}})};function QX(n,e=2,t=!0){const i=K.useRef(null),s=ih(i,{once:!0,amount:.5}),o=O1(0),[c,h]=K.useState("0"),f=/^\d+$/.test(n),p=f?parseInt(n,10):NaN;return K.useEffect(()=>{if(!(!f||!t)&&s)return z1(o,p,{duration:e,ease:Hr,onUpdate:y=>h(Math.round(y).toString())}).stop},[s,o,p,e,t,f]),K.useEffect(()=>{f||h(n)},[f,n]),{ref:i,display:c}}function JX({about:n}){return E.jsxs("section",{"code-path":"src/pages/About.tsx:225:5",className:"relative min-h-[60vh] flex items-center gradient-hero overflow-hidden",children:[E.jsx("img",{"code-path":"src/pages/About.tsx:227:7",src:"/about-timeline.jpg",alt:"",className:"absolute inset-0 w-full h-full object-cover"}),E.jsx("div",{"code-path":"src/pages/About.tsx:232:7",className:"absolute inset-0 bg-gradient-to-b from-[rgba(11,14,25,0.75)] via-[rgba(11,14,25,0.6)] to-[rgba(11,14,25,0.85)]"}),E.jsx("div",{"code-path":"src/pages/About.tsx:233:7",className:"max-w-[1280px] mx-auto px-6 lg:px-12 xl:px-20 w-full pt-[72px] pb-16 relative z-10",children:E.jsxs(be.div,{"code-path":"src/pages/About.tsx:234:9",initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6,ease:Hr},className:"max-w-[720px]",children:[E.jsxs("nav",{"code-path":"src/pages/About.tsx:241:11",className:"flex items-center gap-2 text-sm text-text-muted mb-6",children:[E.jsx(ti,{"code-path":"src/pages/About.tsx:242:13",to:"/",className:"hover:text-accent-cyan transition-colors",children:n.breadcrumbHome}),E.jsx(Eu,{"code-path":"src/pages/About.tsx:245:13",size:14}),E.jsx("span",{"code-path":"src/pages/About.tsx:246:13",className:"text-accent-cyan",children:n.breadcrumbAbout})]}),E.jsx(be.h1,{"code-path":"src/pages/About.tsx:250:11",initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.7,delay:.1,ease:Hr},className:"font-display text-[32px] md:text-[48px] lg:text-[56px] font-bold text-text-primary leading-[1.05] tracking-[-0.03em] mb-6",children:n.heroHeadline}),E.jsx(be.p,{"code-path":"src/pages/About.tsx:260:11",initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6,delay:.3,ease:Hr},className:"text-text-secondary text-base md:text-lg lg:text-xl leading-relaxed mb-8 max-w-[640px]",children:n.heroSubheadline}),E.jsxs(be.div,{"code-path":"src/pages/About.tsx:270:11",initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.5,delay:.5,ease:Hr},className:"flex flex-col sm:flex-row items-start gap-4",children:[E.jsx("a",{"code-path":"src/pages/About.tsx:276:13",href:"#team",className:"gradient-accent text-white text-sm font-semibold uppercase tracking-[0.05em] px-8 py-3.5 rounded-lg transition-all duration-200 hover:shadow-glow-cyan hover:scale-[1.03] active:scale-[0.98]",children:n.ctaTeam}),E.jsx(ti,{"code-path":"src/pages/About.tsx:282:13",to:"/contact",className:"border border-[rgba(0,229,255,0.4)] text-accent-cyan text-sm font-semibold uppercase tracking-[0.05em] px-8 py-3.5 rounded-lg transition-all duration-200 hover:bg-[rgba(0,229,255,0.1)] hover:border-[rgba(0,229,255,0.8)]",children:n.ctaContact})]})]})})]})}function eq({value:n,label:e,delay:t}){const{ref:i,display:s}=QX(n,2);return E.jsxs(be.div,{"code-path":"src/pages/About.tsx:310:5",variants:Wr,initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.5},custom:t,className:"text-center md:text-left",children:[E.jsx("span",{"code-path":"src/pages/About.tsx:318:7",ref:i,className:"font-mono text-[40px] md:text-[48px] lg:text-[56px] font-bold text-accent-cyan leading-none block mb-1",children:s}),E.jsx("p",{"code-path":"src/pages/About.tsx:324:7",className:"text-text-muted text-sm uppercase tracking-[0.05em] font-medium",children:e})]})}function tq({about:n}){const e=[{value:n.statsFounded,label:n.statsFoundedLabel,delay:0},{value:n.statsTeam,label:n.statsTeamLabel,delay:.1},{value:n.statsExperience,label:n.statsExperienceLabel,delay:.2},{value:n.statsBusiness,label:n.statsBusinessLabel,delay:.3}];return E.jsx("section",{"code-path":"src/pages/About.tsx:340:5",className:"py-24 md:py-28 bg-bg-secondary",children:E.jsx("div",{"code-path":"src/pages/About.tsx:341:7",className:"max-w-[1280px] mx-auto px-6 lg:px-12 xl:px-20",children:E.jsxs("div",{"code-path":"src/pages/About.tsx:342:9",className:"grid grid-cols-1 lg:grid-cols-2 gap-16 lg:gap-24 items-center",children:[E.jsxs("div",{"code-path":"src/pages/About.tsx:344:11",className:"space-y-10",children:[E.jsx(be.div,{"code-path":"src/pages/About.tsx:345:13",variants:Wr,initial:"hidden",
4135whileInView:"visible",viewport:{once:!0,amount:.3},custom:0,className:"rounded-2xl overflow-hidden border border-glass-border",children:E.jsx("img",{"code-path":"src/pages/About.tsx:353:15",src:"/about-office.jpg",alt:"Pixeland office",className:"w-full h-auto object-cover"})}),E.jsx("div",{"code-path":"src/pages/About.tsx:359:13",className:"grid grid-cols-2 gap-10 md:gap-12",children:e.map((t,i)=>E.jsx(eq,{"code-path":"src/pages/About.tsx:361:17",value:t.value,label:t.label,delay:t.delay},i))})]}),E.jsxs(be.div,{"code-path":"src/pages/About.tsx:372:11",variants:Wr,initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.3},custom:.2,children:[E.jsx("h2",{"code-path":"src/pages/About.tsx:379:13",className:"font-display text-[28px] md:text-[36px] font-semibold text-text-primary tracking-[-0.02em] mb-6 leading-[1.2]",children:n.storyHeadline}),E.jsx("p",{"code-path":"src/pages/About.tsx:382:13",className:"text-text-secondary text-base md:text-lg leading-relaxed",children:n.storyBody})]})]})})})}function nq({about:n}){return E.jsxs("section",{"code-path":"src/pages/About.tsx:397:5",className:"relative py-28 md:py-32 bg-bg-primary overflow-hidden",children:[E.jsx("img",{"code-path":"src/pages/About.tsx:399:7",src:"/about-timeline.jpg",alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-[0.08] pointer-events-none"}),E.jsxs("div",{"code-path":"src/pages/About.tsx:404:7",className:"max-w-[1280px] mx-auto px-6 lg:px-12 xl:px-20 relative z-10",children:[E.jsxs("div",{"code-path":"src/pages/About.tsx:406:9",className:"text-center mb-20",children:[E.jsx(be.p,{"code-path":"src/pages/About.tsx:407:11",variants:ZX,initial:"hidden",whileInView:"visible",viewport:{once:!0},className:"text-accent-cyan text-xs uppercase tracking-[0.1em] mb-4 font-medium",children:n.timelineLabel}),E.jsx(be.h2,{"code-path":"src/pages/About.tsx:416:11",variants:Wr,initial:"hidden",whileInView:"visible",viewport:{once:!0},custom:.1,className:"font-display text-[32px] md:text-[48px] lg:text-[56px] font-semibold text-text-primary tracking-[-0.02em]",children:n.timelineHeadline})]}),E.jsxs("div",{"code-path":"src/pages/About.tsx:429:9",className:"relative",children:[E.jsx("div",{"code-path":"src/pages/About.tsx:431:11",className:"hidden lg:block absolute left-1/2 top-0 bottom-0 w-[2px] -translate-x-1/2",children:E.jsx(be.div,{"code-path":"src/pages/About.tsx:432:13",initial:{scaleY:0},whileInView:{scaleY:1},viewport:{once:!0,amount:.1},transition:{duration:1.5,ease:Hr},className:"w-full h-full origin-top",style:{background:"linear-gradient(to bottom, #00E5FF 0%, #7C3AED 50%, #F472B6 100%)"}})}),E.jsx("div",{"code-path":"src/pages/About.tsx:446:11",className:"lg:hidden absolute left-4 top-0 bottom-0 w-[2px]",children:E.jsx("div",{"code-path":"src/pages/About.tsx:447:13",className:"w-full h-full",style:{background:"linear-gradient(to bottom, #00E5FF 0%, #7C3AED 50%, #F472B6 100%)"}})}),E.jsx("div",{"code-path":"src/pages/About.tsx:456:11",className:"space-y-12 lg:space-y-0",children:n.milestones.map((e,t)=>{const i=t%2===0,s=t*.12;return E.jsxs("div",{"code-path":"src/pages/About.tsx:462:17",className:`relative flex flex-col lg:flex-row lg:items-center ${i?"lg:flex-row":"lg:flex-row-reverse"}`,children:[E.jsx(be.div,{"code-path":"src/pages/About.tsx:469:19",variants:i?KX:$X,initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.4},custom:s,className:`lg:w-[calc(50%-40px)] pl-12 lg:pl-0 ${i?"lg:pr-12 lg:text-right":"lg:pl-12 lg:text-left"}`,children:E.jsxs("div",{"code-path":"src/pages/About.tsx:479:21",className:"gradient-card border border-glass-border rounded-xl p-6 hover:border-[rgba(0,229,255,0.3)] transition-all duration-300 hover:-translate-y-1",children:[E.jsx("span",{"code-path":"src/pages/About.tsx:480:23",className:"font-mono text-lg font-bold text-accent-cyan block mb-2",children:e.year}),E.jsx("h4",{"code-path":"src/pages/About.tsx:483:23",className:"font-display text-lg md:text-xl font-semibold text-text-primary mb-2",children:e.title}),E.jsx("p",{"code-path":"src/pages/About.tsx:486:23",className:"text-text-secondary text-sm leading-relaxed",children:e.description})]})}),E.jsx(be.div,{"code-path":"src/pages/About.tsx:493:19",initial:{scale:0,opacity:0}
4135,whileInView:{scale:1,opacity:1},viewport:{once:!0,amount:.5},transition:{duration:.4,delay:s+.1,ease:Hr},className:"hidden lg:flex absolute left-1/2 -translate-x-1/2 w-4 h-4 rounded-full bg-accent-cyan shadow-[0_0_12px_rgba(0,229,255,0.5)] z-10"}),E.jsx(be.div,{"code-path":"src/pages/About.tsx:506:19",initial:{scale:0,opacity:0},whileInView:{scale:1,opacity:1},viewport:{once:!0,amount:.5},transition:{duration:.4,delay:s+.1,ease:Hr},className:"lg:hidden absolute left-4 -translate-x-1/2 w-3 h-3 rounded-full bg-accent-cyan shadow-[0_0_10px_rgba(0,229,255,0.5)] z-10"}),E.jsx("div",{"code-path":"src/pages/About.tsx:519:19",className:"hidden lg:block lg:w-[calc(50%-40px)]"})]},t)})})]})]})]})}const iq=[E.jsx(fc,{"code-path":"src/pages/About.tsx:534:3",size:24,className:"text-white"}),E.jsx(Ug,{"code-path":"src/pages/About.tsx:535:3",size:24,className:"text-white"}),E.jsx(R1,{"code-path":"src/pages/About.tsx:536:3",size:24,className:"text-white"})],sq=["from-accent-cyan to-accent-purple","from-accent-purple to-accent-pink","from-accent-pink to-accent-cyan"];function aq({about:n}){return E.jsxs("section",{"code-path":"src/pages/About.tsx:547:5",id:"team",className:"relative py-28 md:py-32 bg-bg-secondary overflow-hidden",children:[E.jsx("img",{"code-path":"src/pages/About.tsx:549:7",src:"/about-global.jpg",alt:"",className:"absolute inset-0 w-full h-full object-cover opacity-20"}),E.jsx("div",{"code-path":"src/pages/About.tsx:554:7",className:"absolute inset-0 bg-gradient-to-b from-[rgba(15,23,42,0.6)] via-[rgba(15,23,42,0.75)] to-[rgba(15,23,42,0.85)]"}),E.jsxs("div",{"code-path":"src/pages/About.tsx:555:7",className:"max-w-[1280px] mx-auto px-6 lg:px-12 xl:px-20 relative z-10",children:[E.jsxs("div",{"code-path":"src/pages/About.tsx:557:9",className:"text-center mb-16",children:[E.jsx(be.h2,{"code-path":"src/pages/About.tsx:558:11",variants:Wr,initial:"hidden",whileInView:"visible",viewport:{once:!0},custom:0,className:"font-display text-[32px] md:text-[48px] lg:text-[56px] font-semibold text-text-primary tracking-[-0.02em] mb-4",children:n.teamHeadline}),E.jsx(be.p,{"code-path":"src/pages/About.tsx:568:11",variants:Wr,initial:"hidden",whileInView:"visible",viewport:{once:!0},custom:.1,className:"text-text-secondary text-base md:text-lg",children:n.teamDescription})]}),E.jsx(be.div,{"code-path":"src/pages/About.tsx:581:9",variants:UI,initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.2},className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:n.teamCards.map((e,t)=>E.jsxs(be.div,{"code-path":"src/pages/About.tsx:589:13",variants:Wr,className:"gradient-card border border-glass-border rounded-2xl p-8 hover:border-[rgba(0,229,255,0.3)] transition-all duration-300 hover:-translate-y-1 hover:shadow-glow-card-hover",children:[E.jsx("div",{"code-path":"src/pages/About.tsx:594:15",className:`w-12 h-12 rounded-xl bg-gradient-to-br ${sq[t]} flex items-center justify-center mb-5`,children:iq[t]}),E.jsx("h4",{"code-path":"src/pages/About.tsx:599:15",className:"font-display text-xl md:text-2xl font-semibold text-text-primary mb-3",children:e.title}),E.jsx("p",{"code-path":"src/pages/About.tsx:602:15",className:"text-text-secondary text-sm leading-relaxed",children:e.description})]},t))})]})]})}function rq({about:n}){return E.jsx("section",{"code-path":"src/pages/About.tsx:618:5",className:"py-28 md:py-32 bg-bg-primary",children:E.jsxs("div",{"code-path":"src/pages/About.tsx:619:7",className:"max-w-[1280px] mx-auto px-6 lg:px-12 xl:px-20",children:[E.jsx(be.h2,{"code-path":"src/pages/About.tsx:621:9",variants:Wr,initial:"hidden",whileInView:"visible",viewport:{once:!0},className:"font-display text-[32px] md:text-[48px] lg:text-[56px] font-semibold text-text-primary tracking-[-0.02em] text-center mb-16",children:n.valuesHeadline}),E.jsx(be.div,{"code-path":"src/pages/About.tsx:632:9",variants:UI,initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.2},className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:n.valueCards.map((e,t)=>E.jsxs(be.div,{"code-path":"src/pages/About.tsx:640:13",variants:Wr,className:"group relative border-t border-[rgba(0,229,255,0.15)] bg-[rgba(26,34,53,0.4)] rounded-xl p-8 transition-all duration-300 hover:-translate-y-1 hover:border-t-[rgba(0,229,255,0.8)] hover:shadow-glow-card-hover",children:[E.jsx("span",{"code-path":"src/pages/About.tsx:645:15",className:"font-mono text-[40px] md:text-[48px] font-bold text-accent-cyan o
4135pacity-30 block mb-4",children:e.title}),E.jsx("h4",{"code-path":"src/pages/About.tsx:648:15",className:"font-display text-xl md:text-2xl font-semibold text-text-primary mb-3",children:e.subtitle}),E.jsx("p",{"code-path":"src/pages/About.tsx:651:15",className:"text-text-secondary text-sm leading-relaxed",children:e.description})]},t))})]})})}function oq({about:n}){return E.jsx("section",{"code-path":"src/pages/About.tsx:667:5",className:"py-24 md:py-28 gradient-hero",children:E.jsxs("div",{"code-path":"src/pages/About.tsx:668:7",className:"max-w-[720px] mx-auto px-6 lg:px-12 xl:px-20 text-center",children:[E.jsx(be.h2,{"code-path":"src/pages/About.tsx:669:9",variants:Wr,initial:"hidden",whileInView:"visible",viewport:{once:!0},custom:0,className:"font-display text-[28px] md:text-[40px] lg:text-[48px] font-semibold text-text-primary tracking-[-0.02em] mb-4 leading-[1.1]",children:n.ctaHeadline}),E.jsx(be.p,{"code-path":"src/pages/About.tsx:679:9",variants:Wr,initial:"hidden",whileInView:"visible",viewport:{once:!0},custom:.1,className:"text-text-secondary text-base md:text-lg mb-8",children:n.ctaDescription}),E.jsx(be.div,{"code-path":"src/pages/About.tsx:689:9",variants:Wr,initial:"hidden",whileInView:"visible",viewport:{once:!0},custom:.2,children:E.jsx(ti,{"code-path":"src/pages/About.tsx:696:11",to:"/contact",className:"inline-block gradient-accent text-white text-sm font-semibold uppercase tracking-[0.05em] px-8 py-3.5 rounded-lg transition-all duration-200 hover:shadow-glow-cyan hover:scale-[1.03] active:scale-[0.98]",children:n.ctaButton})})]})})}function lq(){const{t:n}=ci(),e=n.aboutPage||YX;return E.jsxs("div",{"code-path":"src/pages/About.tsx:716:5",className:"min-h-screen",children:[E.jsx(JX,{"code-path":"src/pages/About.tsx:717:7",about:e}),E.jsx(tq,{"code-path":"src/pages/About.tsx:718:7",about:e}),E.jsx(nq,{"code-path":"src/pages/About.tsx:719:7",about:e}),E.jsx(aq,{"code-path":"src/pages/About.tsx:720:7",about:e}),E.jsx(rq,{"code-path":"src/pages/About.tsx:721:7",about:e}),E.jsx(oq,{"code-path":"src/pages/About.tsx:722:7",about:e})]})}const cq={"zh-HK":{breadcrumbHome:"é¦é¡µ",breadcrumbContact:"èç³»æä»¬",headline:"èç³»æä»¬",subheadline:"æ è®ºæ¨æä»»ä½é¡¹ç®éæ±æå使åï¼æä»¬éæ¶ä¸ºæ¨æå¡ãéè¿é®ä»¶ãçµè¯æ WhatsApp èç³»æä»¬ã",emailLabel:"çµåé®ç®±",phoneLabel:"çµè¯å¨è¯¢",whatsappLabel:"WhatsApp",addressLabel:"åå
¬å°ç¹",address:"馿¸¯ / æ·±å³",formTitle:"åé询ç",formName:"æ¨çå§å",formEmail:"çµåé®ç®±",formSubject:"主é¢",formMessage:"项ç®è¯¦æ
",formSubmit:"åéæ¶æ¯",formSuccess:"æ¶æ¯å·²åéï¼æä»¬ä¼å°½å¿«ä¸æ¨èç³»ã",ctaHeadline:"åå¤å¥½å¼å§æ¨ç AIGC 项ç®äºåï¼",ctaDesc:"ç«å³èç³»æä»¬ï¼è·åå
è´¹å¨è¯¢å项ç®è¯ä¼°",services:["AIGC + 游æ","AIGC + çè§é¢","AIGC + VR 大空é´"]},en:{breadcrumbHome:"Home",breadcrumbContact:"Contact",headline:"Contact Us",subheadline:"Whether you have project needs or collaboration inquiries, we are always here for you. Reach us via email, phone, or WhatsApp.",emailLabel:"Email",phoneLabel:"Phone",whatsappLabel:"WhatsApp",addressLabel:"Office",address:"Hong Kong / Shenzhen",formTitle:"Send Inquiry",formName:"Your Name",formEmail:"Email Address",formSubject:"Subject",formMessage:"Project Details",formSubmit:"Send Message",formSuccess:"Message sent! We will get back to you soon.",ctaHeadline:"Ready to Start Your AIGC Project?",ctaDesc:"Contact us now for a free consultation and project assessment",services:["AIGC + Gaming","AIGC + Short Video","AIGC + VR Large Space"]}};function iv({icon:n,label:e,value:t,href:i}){return E.jsxs("a",{"code-path":"src/pages/Contact.tsx:91:5",href:i,target:i.startsWith("http")?"_blank":void 0,rel:i.startsWith("http")?"noopener noreferrer":void 0,className:"group flex items-start gap-4 p-5 rounded-xl border glass-border bg-bg-elevated/30 hover:border-accent-cyan/40 hover:bg-accent-cyan/5 transition-all duration-300",children:[E.jsx("div",{"code-path":"src/pages/Contact.tsx:97:7",className:"shrink-0 w-11 h-11 rounded-lg gradient-accent flex items-center justify-center",children:E.jsx(n,{"code-path":"src/pages/Contact.tsx:98:9",className:"w-5 h-5 text-white"})}),E.jsxs("div",{"code-path":"src/pages/Contact.tsx:100:7",children:[E.jsx("p",{"code-path":"src/pages/Contact.tsx:101:9",className:"text-xs font-medium uppercase tracking-wider text-text-muted mb-1",children:e}),E.jsx("p",{"code-path":"src/pages/Contact.tsx:104:9",className:"text-sm font-medium text-text-primary group-hover:text-accent-cyan transition-colors",children:t})]})]})}function uq({tx:n}){const[e,t]=K.useState(!1),i=s=>{s.preventDefault(),t(!0),setTimeout(()=>t(!1),5e3)};return E.jsxs("form",{"code-path":"src/pages/Contact.tsx:125:5",onSubmit:i,className:"space-y-5",children:[E.jsxs("div",{"code-path":"src/pages/Contact.tsx:126:7",className:"grid grid-cols-1 sm:grid-cols-2 gap-5",children:[E.jsxs("div",{"code-path":"src/pages/Contact.tsx:127:9",children:[E.jsx("label",{"code-path":"src/pages/Contact.tsx:128:11",className:"block text-xs font-medium uppercase tracking-wider text-text-muted mb-2",children:n.formName}),E.jsx("input",{"code-path":"src/pages/Contact.tsx:131:11",type:"text",required:!0,className:"w-full px-4 py-3 rounded-lg bg-bg-elevated border border-[rgba(0,229,255,0.15)] text-text-primary text-sm placeholder:text-text-muted focus:outline-none focus:border-accent-cyan/50 focus:ring-1 focus:ring-accent-cyan/20 transition-all",placeholder:"John Doe"})]}),E.jsxs("div",{"code-path":"src/pages/Contact.tsx:138:9",children:[E.jsx("label",{"code-path":"src/pages/Contact.tsx:139:11",className:"block text-xs font-medium uppercase tracking-wider text-text-muted mb-2",children:n.formEmail}),E.jsx("input",{"code-path":"src/pages/Contact.tsx:142:11",type:"email",required:!0,className:"w-full px-4 py-3 rounded-lg bg-bg-elevated border border-[rgba(0,229,255,0.15)] text-text-primary text-sm placeholder:text-text-muted focus:outline-none focus:border-accent-cyan/50 focus:ring-1 focus:ring-accent-cyan/20 transition-all",placeholder:"[email protected]"})]})]}),E.jsxs("div",{"code-path":"src/pages/Contact.tsx:151:7",children:[E.jsx("label",{"code-path":"src/pages/Contact.tsx:152:9",className:"block text-xs font-medium uppercase tracking-wider text-text-muted mb-2",children:n.formSubject}),E.jsxs("select",{"code-path":"src/pages/Contact.tsx:155:9",required:!0,className:"w-full px-4 py-3 rounded-lg bg-bg-elevated border border-[rgba(0,229,255,0.15)] text-text-primary text-sm focus:outline-none focus:border-accent-cyan/50 focus:ring-1 focus:ring-accent-cyan/20 transition-all",children:[E.jsx("option",{"code-path":"src/pages/Contact.tsx:159:11",value:"",children:n.formSubject}),n.services.map(s=>E.jsx("option",{"code-path":"src/pages/Contact.tsx:161:13",value:s,children:s},s))]})]}),E.jsxs("div",{"code-path":"src/pages/Contact.tsx:166:7",children:[E.jsx("label",{"code-path":"src/pages/Contact.tsx:167:9",className:"block text-xs font-medium uppercase tracking-wider text-text-muted mb-2",children:n.formMessage}),E.jsx("textarea",{"code-path":"src/pages/Contact.tsx:170:9",rows:5,required:!0,className:"w-full px-4 py-3 rounded-lg bg-bg-elevated border border-[rgba(0,229,255,0.15)] text-text-primary text-sm placeholder:text-text-muted focus:outline-none focus:border-accent-cyan/50 focus:ring-1 focus:ring-accent-cyan/20 transition-all resize-none",placeholder:"Tell us about your project..."})]}),E.jsx("button",{"code-path":"src/pages/Contact.tsx:178:7",type:"submit",disabled:e,className:"w-full gradient-accent px-6 py-3.5 rounded-lg text-white font-semibold text-sm uppercase tracking-wider hover:scale-[1.02] hover:shadow-glow-cyan transition-all duration-200 flex items-center justify-center gap-2 disabled:opacity-70",children:e?E.jsxs(E.Fragment,{children:[E.jsx(v5,{"code-path":"src/pages/Contact.tsx:185:13",className:"w-4 h-4"}),n.formSuccess]}):E.jsxs(E.Fragment,{children:[E.jsx(dU,{"code-path":"src/pages/Contact.tsx:190:13",className:"w-4 h-4"}),n.formSubmit]})})]})}function dq(){const{language:n}=ci(),e=cq[n],t={hidden:{opacity:0,y:40},visible:(i=0)=>({opacity:1,y:0,transition:{duration:.7,delay:i,ease:[.16,1,.3,1]}})};return E.jsxs("main",{"code-path":"src/pages/Contact.tsx:216:5",className:"min-h-screen",children:[E.jsxs("section",{"code-path":"src/pages/Contact.tsx:218:7",className:"relative min-h-[55vh] gradient-hero flex items-center",children:[E.jsx("div",{"code-path":"src/pages/Contact.tsx:219:9",className:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,rgba(0,229,255,0.08)_0%,transparent_70%)]"}),E.jsxs("div",{"code-path":"src/pages/Contact.tsx:220:9",className:"relative z-10 max-w-7xl mx-auto px-6 pt-24 pb-16 w-full",children:[E.jsxs(be.div,{"code-path":"src/pages/Contact.tsx:222:11",custom:0,initial:"hidden",animate:"visible",variants:t,className:"flex items-center gap-2 text-sm text-text-muted mb-8",children:[E.jsx(ti,{"code-path":"src/pages/Contact.tsx:229:13",to:"/",className:"hover:text-accent-cyan transition-colors",children:e.breadcrumbHome}),E.jsx(Eu,{"code-path":"src/pages/Contact.tsx:232:13",className:"w-4 h-4"}),E.jsx("span",{"code-path":"src/pages/Contact.tsx:233:13",className:"text-text-secondary",children:e.breadcrumbContact})]}),E.jsx(be.h1,{"code-path":"src/pages/Contact.tsx:236:11",custom:.1,initial:"hidden",animate:"visible",variants:t,className:"font-display text-4xl md:text-5xl lg:text-6xl font-bold text-text-primary mb-5 leading-tight",children:e.headline}),E.jsx(be.p,{"code-path":"src/pages/Contact.tsx:245:11",custom:.2,initial:"hidden",animate:"visible",variants:t,className:"text-lg md:text-xl text-text-secondary max-w-[640px] leading-relaxed",children:e.subheadline})]})]}),E.jsx("section",{"code-path":"src/pages/Contact.tsx:258:7",className:"bg-bg-secondary py-20 md:py-24",children:E.jsx("div",{"code-path":"src/pages/Contact.tsx:259:9",className:"max-w-7xl mx-auto px-6",children:E.jsxs("div",{"code-path":"src/pages/Contact.tsx:260:11",className:"grid grid-cols-1 lg:grid-cols-2 gap-12",children:[E.jsxs(be.div,{"code-path":"src/pages/Contact.tsx:262:13",initial:"hidden",
4135whileInView:"visible",viewport:{once:!0,margin:"-80px"},variants:{hidden:{},visible:{transition:{staggerChildren:.12}}},className:"space-y-4",children:[E.jsx(be.h2,{"code-path":"src/pages/Contact.tsx:272:15",variants:t,className:"font-display text-2xl md:text-3xl font-semibold text-text-primary mb-6",children:e.formTitle}),E.jsx(be.div,{"code-path":"src/pages/Contact.tsx:279:15",variants:t,children:E.jsx(iv,{"code-path":"src/pages/Contact.tsx:280:17",icon:Y5,label:e.emailLabel,value:"[email protected]",href:"mailto:[email protected]"})}),E.jsx(be.div,{"code-path":"src/pages/Contact.tsx:287:15",variants:t,children:E.jsx(iv,{"code-path":"src/pages/Contact.tsx:288:17",icon:rU,label:e.phoneLabel,value:"+852 9210 1616",href:"tel:+85292101616"})}),E.jsx(be.div,{"code-path":"src/pages/Contact.tsx:295:15",variants:t,children:E.jsx(iv,{"code-path":"src/pages/Contact.tsx:296:17",icon:J5,label:e.whatsappLabel,value:"+852 9210 1616",href:"https://wa.me/85292101616"})}),E.jsx(be.div,{"code-path":"src/pages/Contact.tsx:303:15",variants:t,children:E.jsx(iv,{"code-path":"src/pages/Contact.tsx:304:17",icon:qM,label:e.addressLabel,value:e.address,href:"#"})})]}),E.jsx(be.div,{"code-path":"src/pages/Contact.tsx:314:13",initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7,ease:[.16,1,.3,1]},className:"bg-bg-primary rounded-2xl border glass-border p-6 md:p-8",children:E.jsx(uq,{"code-path":"src/pages/Contact.tsx:321:15",tx:e})})]})})}),E.jsxs("section",{"code-path":"src/pages/Contact.tsx:328:7",className:"relative py-20 md:py-24 gradient-hero overflow-hidden",children:[E.jsx("div",{"code-path":"src/pages/Contact.tsx:329:9",className:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,rgba(0,229,255,0.08)_0%,transparent_70%)]"}),E.jsxs("div",{"code-path":"src/pages/Contact.tsx:330:9",className:"relative max-w-[960px] mx-auto px-6 text-center",children:[E.jsx(be.h2,{"code-path":"src/pages/Contact.tsx:331:11",initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7,ease:[.16,1,.3,1]},className:"font-display text-3xl md:text-4xl lg:text-5xl font-semibold text-text-primary mb-5 leading-tight",children:e.ctaHeadline}),E.jsx(be.p,{"code-path":"src/pages/Contact.tsx:340:11",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7,delay:.1,ease:[.16,1,.3,1]},className:"text-text-secondary text-lg max-w-[560px] mx-auto mb-8",children:e.ctaDesc}),E.jsxs(be.div,{"code-path":"src/pages/Contact.tsx:349:11",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7,delay:.2,ease:[.16,1,.3,1]},className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:[E.jsx("a",{"code-path":"src/pages/Contact.tsx:356:13",href:"mailto:[email protected]",className:"gradient-accent px-8 py-3.5 rounded-lg text-white font-semibold text-sm uppercase tracking-wider hover:scale-[1.03] hover:shadow-glow-cyan transition-all duration-200",children:e.formSubmit}),E.jsx(ti,{"code-path":"src/pages/Contact.tsx:362:13",to:"/gallery",className:"px-8 py-3.5 rounded-lg border border-accent-cyan/40 text-accent-cyan font-semibold text-sm uppercase tracking-wider hover:bg-accent-cyan/10 hover:border-accent-cyan/80 transition-all duration-200",children:"æ¥çä½åé"})]})]})]})]})}const hq={"zh-HK":{companyName:"Pixeland Digital",companyNameZh:"馿¸¯å½¼ç´¢æ°ç ç§æ",heroSubtitle:"Since 2004 · 300+ åä½è
· å
¨çæ°åå
å®¹è§£å³æ¹æ¡",heroCities:"æ·±å³ Â· å¹¿å· Â· æé½ · åæ Â· è¥¿å® Â· å
°å· · 馿¸¯ · ä¸äº¬ · 温å¥å · 迪æ
4135· é
å è¾¾",aboutTitle:"å
³äºå½¼ç´¢",aboutBody:"彼索æ°ç ï¼Pixeland Digitalï¼æç«äº2004å¹´ï¼æ»é¨ä½äºæ·±å³å馿¸¯ï¼æ¥æ300å¤ååå·¥ï¼æ·±èæ°åå
容é¢å20ä½å¹´ãå
¬å¸ä¸æ³¨äºæ¸¸æä¸å¨ç»æ°åå
容çå
¨æµç¨å¼åä¸å¶ä½ï¼æå¡æ¶µçæ¦å¿µè®¾è®¡ãç¾æ¯èµäº§å¶ä½ãå½±è§çº§å¨ç»ç产çå个ç¯èãåæ¶ï¼å
¬å¸ç§¯æå¸å±VR/ARçåæ²¿äº¤äºææ¯ï¼è´åäºæé ä¸ä¸ä»£æ²æµ¸å¼æ°åä½éªã",statFounded:"æç«å¹´ä»½",statTeam:"å¢éæå",statYears:"ä»ä¸å¹´é",statOffices:"å
¨çåå
¬ç¹",missionTitle:"使å½ä¸æ¿æ¯",missionLabel:"使å½",missionStatement:"让好ç XR å
容æ´å¹¿æ³å°å°è¾¾",missionDesc:"以èæç©ºé´ä¸ºåäºè½½ä½ï¼ä»¥æ°ä¸ä»£XRç»ç«¯ä¸ºäº¤äºåªä»ï¼æ¿åä¸ç¾ä¸ªåæå
容ï¼è¿æ¥æ°ä»¥äº¿è®¡çç¨æ·ãæéXR产ä¸ä¸ä¸æ¸¸ï¼æä¸ºæ°åå
容åä½é¢åçæ¡¥æ¢ä¸çº½å¸¦ã",pillar1Title:"æ¿ååæ",pillar1Desc:"以åé å驱å¨å
容çäº§ï¼æ¿åæ éå¯è½",pillar2Title:"è¿æ¥ç¨æ·",pillar2Desc:"以XRææ¯è¿æ¥å
¨ç亿ä¸ç¨æ·",pillar3Title:"è´¯é产ä¸",pillar3Desc:"æéXR产ä¸é¾ä¸ä¸æ¸¸åä½ä¼ä¼´",creativeTitle:"åæè°æ§",creativeCard1Title:"åæ° / åé å",creativeCard1Body:"ä»ç»è´å
¥å¾®çè§å¯å¼å§ï¼ä»¥æ´æåé åçç¨æ·è§è§æèææ¯ä¸å·¥å
·",creativeCard2Title:"ç©ºçµ / è½»ç",creativeCard2Body:"çè¡·äºåé è¶
è¶ç°å®è®¤ç¥çèæä½éªï¼å
³æ³¨æ¿åç¨æ·æ
æç交äºè®¾è®¡",creativeCard3Title:"çå® / çæ",creativeCard3Body:"æ¢ç´¢åºå±é»è¾ï¼ææä¼è´¨ä½éªçæå便®ï¼åé ææä¹ç坿ç»ä½éª",awardsTitle:"è£èªå¥é¡¹",clientsTitle:"客æ·ä¸åä½ä¼ä¼´",clientsDesc:"æå¡å½å
å¤ä¸çº¿ä¼ä¸ï¼æç项ç®éå¸å
¨å½",globalTitle:"å
¨çå¸å±",globalDesc:"åå
¬å®¤ä¸åä½ä¼ä¼´éåå
¨ç10座åå¸",ctaHeadline:"åå¤å¥½ä¸å½¼ç´¢ä¸èµ·åä½äºåï¼",ctaButton:"èç³»æä»¬"},en:{companyName:"Pixeland Digital",companyNameZh:"Pixeland Digital (Hong Kong)",heroSubtitle:"Since 2004 · 300+ Creators · Global Digital Content Solutions",heroCities:"Shenzhen · Guangzhou · Chengdu · Nanchang 'Xi'an · Lanzhou · Hong Kong · Tokyo · Vancouver · Dubai · Jakarta",aboutTitle:"About Pixeland",aboutBody:"Founded in 2004 and headquartered in Shenzhen and Hong Kong, Pixeland Digital employs 300+ professionals with 20+ years of experience in the digital content industry. We specialize in end-to-end game and animation digital content development, including concept design, art asset production, and cinematic animation. We are also actively investing in VR/AR technologies to create next-generation immersive experiences.",statFounded:"Year Founded",statTeam:"Team Members",statYears:"Years of Experience",statOffices:"Global Offices",missionTitle:"Mission & Vision",missionLabel:"Mission",missionStatement:"Making Great XR Content Reach Further",missionDesc:"Using virtual space as a narrative medium and next-generation XR terminals as the interactive interface, we inspire hundreds of creative works and connect billions of users. We bridge the upstream and downstream of the XR industry, serving as a link and bond in the digital content creation ecosystem.",pillar1Title:"Inspire Creation",pillar1Desc:"Drive content production with creativity, unlocking infinite possibilities",pillar2Title:"Connect Users",pillar2Desc:"Connect billions of users worldwide through XR technology",pillar3Title:"Bridge Industry",pillar3Desc:"Unite upstream and downstream partners across the XR industry chain",creativeTitle:"Creative Tone",creativeCard1Title:"Innovation / Creativity",creativeCard1Body:"Starting with meticulous observation, thinking about technology and tools from a more creative user perspective",creativeCard2Title:"Ethereality / Lightness",creativeCard2Body:"Passionate about creating virtual experiences beyond real-world cognition, focusing on interaction design that evokes user emotions",creativeCard3Title:"Authenticity / Truthfulness",creativeCard3Body:"Exploring underlying logic, uncovering the sensory foundations of quality experiences, creating meaningful and sustainable experiences",awardsTitle:"Awards & Honors",clientsTitle:"Clients & Partners",clientsDesc:"Serving top-tier enterprises domestically and internationally, with mature projects nationwide",globalTitle:"Global Presence",globalDesc:"Offices and partners across 10 cities worldwide",ctaHeadline:"Ready to Create with Pixeland?",ctaButton:"Contact Us"}},fq=[{year:"2017",title:"æ·±å³å¤§å¦æ ¡åä¼ â æ°å
´æ°åºä¼ä¸å¥"},{year:"2018",title:"ãæ·±åæ¯ãâ ä¼ç§åå项ç®å¥"},{year:"2018",title:"ã鿢¦æ¯ãâ ä¼ç§å¥"},{year:"2018",title:"å
¨çåä¸åä¸å¤§èµä¸å½ â ä¸çå¥"}
4135,{year:"2018",title:"æä½³å¤§ç©ºé´ç§æ â éVå¥"},{year:"2018",title:"伦æ¦Raindanceçµå½±è â æä½³å¤§ç©ºé´å¤äººä½éªå¥"},{year:"2019",title:"SIFæ²çæ²æµ¸å½±åå± â æä½³ä¸å½ä½åå¥"},{year:"2021",title:"ãå®è¿ªçä¸çãâ å
¥éFIVARSçµå½±èï¼æ´æç¶ï¼"},{year:"2022",title:"è
¾è®¯äºé³è§é¢ â V+çæåä½ä¼ä¼´"},{year:"2023",title:"ãä¸ç²¾ç¹æ°ãä¸å°ä¼ä¸"}],pq={2017:"Shenzhen University Alumni Association â Emerging Outstanding Enterprise Award","2018-1":'"Deep Innovation Cup" â Outstanding Dual Innovation Project Award',"2018-2":'"Chasing Dreams Cup" â Excellence Award',"2018-3":"Global Creative Business Cup China â First Prize","2018-4":"Best Large Space Technology â Golden V Award","2018-5":"London Raindance Film Festival â Best Large Space Multiplayer Experience Award",2019:"SIF Sandbox Immersive Image Exhibition â Best Chinese Work Award",2021:`"Andy's World" â Selected for FIVARS Film Festival (Los Angeles)`,2022:"Tencent Cloud Audio-Video â V+ Ecological Partner",2023:'"Specialized, Refined, Innovative" SME'},mq=[{name:"ä¸ç²®å¤§æ¦å",nameEn:"COFCO Joy City"},{name:"åæ¶¦ä¸è±¡å",nameEn:"China Resources MixC"},{name:"æ°ä¸çéå¢ K11",nameEn:"New World K11"},{name:"è壿åå±",nameEn:"Shekou China Merchants"},{name:"建çç§å¦ç ç©¶é¢",nameEn:"Building Science Research Institute"},{name:"åªå±±ç¾æ¯é¦",nameEn:"Pingshan Art Museum"},{name:"æ³å½ DSL åºéä¼",nameEn:"France DSL Foundation"},{name:"å®å®¶ IKEA",nameEn:"IKEA"},{name:"æé±¼ Douyu",nameEn:"Douyu"},{name:"è
¾è®¯äº",nameEn:"Tencent Cloud"}],gq=[{name:"æ·±å³",nameEn:"Shenzhen"},{name:"广å·",nameEn:"Guangzhou"},{name:"æé½",nameEn:"Chengdu"},{name:"åæ",nameEn:"Nanchang"},{name:"西å®",nameEn:"Xi'an"},{name:"å
°å·",nameEn:"Lanzhou"},{name:"馿¸¯",nameEn:"Hong Kong"},{name:"ä¸äº¬",nameEn:"Tokyo"},{name:"温å¥å",nameEn:"Vancouver"},{name:"迪æ",nameEn:"Dubai"},{name:"é
å è¾¾",nameEn:"Jakarta"}];function xq(n,e=2,t=!1){const[i,s]=K.useState(0);return K.useEffect(()=>{if(!t)return;let o=null,c;const h=f=>{o||(o=f);const p=Math.min((f-o)/(e*1e3),1),x=1-Math.pow(1-p,3);s(Math.floor(x*n)),p<1&&(c=requestAnimationFrame(h))};return c=requestAnimationFrame(h),()=>cancelAnimationFrame(c)},[n,e,t]),i}function sv({value:n,label:e,suffix:t="",delay:i=0}){const s=K.useRef(null),o=ih(s,{once:!0,margin:"-50px"}),c=xq(n,2,o);return E.jsxs(be.div,{"code-path":"src/pages/Gallery.tsx:236:5",ref:s,initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:i},className:"text-center",children:[E.jsxs("div",{"code-path":"src/pages/Gallery.tsx:244:7",className:"text-4xl md:text-5xl font-bold gradient-text font-display mb-2",children:[c,t]}),E.jsx("div",{"code-path":"src/pages/Gallery.tsx:248:7",className:"text-text-secondary text-sm",children:e})]})}const lg={hidden:{opacity:0,y:40},visible:(n=0)=>({opacity:1,y:0,transition:{duration:.7,delay:n,ease:[.16,1,.3,1]}})},cg={hidden:{},visible:{transition:{staggerChildren:.1}}},uc={hidden:{opacity:0,y:30},visible:{opacity:1,y:0,transition:{duration:.6,ease:[.16,1,.3,1]}}};function yq(){const{language:n}=ci(),e=hq[n],t=n==="zh-HK",i=(c,h)=>{if(t)return c.title;const f=c.year+(c.year==="2018"?`-${h+1}`:"");return pq[f]||c.title},s=c=>t?c.name:c.nameEn,o=c=>t?c.name:c.nameEn;return E.jsxs("main",{"code-path":"src/pages/Gallery.tsx:309:5",className:"min-h-screen",children:[E.jsxs("section",{"code-path":"src/pages/Gallery.tsx:313:7",className:"relative min-h-[70vh] flex items-center overflow-hidden",children:[E.jsx("div",{"code-path":"src/pages/Gallery.tsx:315:9",className:"absolute inset-0 bg-cover bg-center bg-no-repeat",style:{backgroundImage:"url(/company-mission.jpg)"}}),E.jsx("div",{"code-path":"src/pages/Gallery.tsx:320:9",className:"absolute inset-0 bg-gradient-to-b from-[#0A0E1A]/80 via-[#0A0E1A]/60 to-[#0A0E1A]/90"}),E.jsx("div",{"code-path":"src/pages/Gallery.tsx:322:9",className:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,rgba(0,229,255,0.08)_0%,transparent_70%)]"}),E.jsxs("div",{"code-path":"src/pages/Gallery.tsx:324:9",className:"relative z-10 max-w-7xl mx-auto px-6 pt-24 pb-16 w-full",children:[E.jsxs(be.div,{"code-path":"src/pages/Gallery.tsx:326:11",custom:0,initial:"hidden",animate:"visible",variants:lg,className:"flex items-center gap-2 text-sm text-text-muted mb-8",children:[E.jsx(ti,{"code-path":"src/pages/Gallery.tsx:333:13",to:"/",className:"hover:text-accent-cyan transition-colors",children:t?"é¦é ":"Home"}),E.jsx(Eu,{"code-path":"src/pages/Gallery.tsx:336:13",className:"w-4 h-4"}),E.jsx("span",{"code-path":"src/pages/Gallery.tsx:337:13",className:"text-text-secondary",children:t?"å
¬å¸å±ç¤º":"Company"})]}),E.jsx(be.h1,{"code-path":"src/pages/Gallery.tsx:343:11",custom:.1,initial:"hidden",animate:"visible",variants:lg,className:"font-display text-5xl md:text-6xl lg:text-7xl font-bold mb-4 leading-tight",children:E.jsx("span",{"code-path":"src/pages/Gallery.tsx:350:13",className:"gradient-text",children:e.companyName})}),E.jsx(be.p,{"code-path":"src/pages/Gallery.tsx:352:11",custom:.15,initial:"hidden",animate:"visible",variants:lg,className:"font-display text-2xl md:text-3xl text-text-secondary mb-6",children:e.companyNameZh}),E.jsx(be.p,{"code-path":"src/pages/Gallery.tsx:363:11",custom:.2,initial:"hidden",animate:"visible",variants:lg,className:"text-lg md:text-xl text-text-secondary max-w-[720px] leading-relaxed mb-8",children:e.heroSubtitle}),E.jsx(be.div,{"code-path":"src/pages/Gallery.tsx:374:11",custom:.3,initial:"hidden",animate:"visible",variants:lg,className:"flex flex-wrap gap-2",children:e.heroCities.split(" · ").map(c=>E.jsx("span",{"code-path":"src/pages/Gallery.tsx:382:15",className:"px-3 py-1.5 rounded-full text-xs md:text-sm text-text-secondary border glass-border bg-[rgba(0,229,255,0.05)] backdrop-blur-sm",children:c},c))})]})]}),E.jsx("section",{"code-path":"src/pages/Gallery.tsx:396:7",className:"bg-bg-secondary py-20 md:py-28",children:E.jsxs("div",{"code-path":"src/pages/Gallery.tsx:397:9",className:"max-w-7xl mx-auto px-6",children:[E.jsxs(be.div,{"code-path":"src/pages/Gallery.tsx:398:11",initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7,ease:[.16,1,.3,1]},className:"text-center mb-12",children:[E.jsx("h2",{"code-path":"src/pages/Gallery.tsx:405:13",className:"font-display text-3xl md:text-4xl font-bold text-text-primary mb-6",children:e.aboutTitle}),E.jsx("p",{"code-path":"src/pages/Gallery.tsx:408:13",className:"text-text-secondary max-w-3xl mx-auto leading-relaxed text-base md:text-lg",children:e.aboutBody})]}),E.jsxs("div",{"code-path":"src/pages/Gallery.tsx:414:11",className:"grid grid-cols-2 md:grid-cols-4 gap-8 md:gap-12 max-w-4xl mx-auto",children:[E.jsx(sv,{"code-path":"src/pages/Gallery.tsx:415:13",value:2004,label:e.statFounded,delay:0}),E.jsx(sv,{"code-path":"src/pages/Gallery.tsx:416:13",value:300,suffix:"+",label:e.statTeam,delay:.1}),E.jsx(sv,{"code-path":"src/pages/Gallery.tsx:417:13",value:20,suffix:"+",label:e.statYears,delay:.2}),E.jsx(sv,{"code-path":"src/pages/Gallery.tsx:418:13",value:10,suffix:"+",label:e.statOffices,delay:.3})]})]})}),E.jsxs("section",{"code-path":"src/pages/Gallery.tsx:426:7",className:"relative py-24 md:py-32 overflow-hidden",children:[E.jsx("div",{"code-path":"src/pages/Gallery.tsx:428:9",className:"absolute inset-0 bg-cover bg-center bg-no-repeat bg-fixed",style:{backgroundImage:"url(/company-mission.jpg)"}}),E.jsx("div",{"code-path":"src/pages/Gallery.tsx:432:9",className:"absolute inset-0 bg-[#0A0E1A]/70"}),E.jsx("div",{"code-path":"src/pages/Gallery.tsx:433:9",className:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,rgba(124,58,237,0.1)_0%,transparent_70%)]"}),E.jsxs("div",{"code-path":"src/pages/Gallery.tsx:435:9",className:"relative z-10 max-w-7xl mx-auto px-6",children:[E.jsxs(be.div,{"code-path":"src/pages/Gallery.tsx:436:11",initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7},className:"text-center mb-16",children:[E.jsx("h2",{"code-path":"src/pages/Gallery.tsx:443:13",className:"font-display text-3xl md:text-4xl font-bold text-text-primary mb-4",children:e.missionTitle}),E.jsx("div",{"code-path":"src/pages/Gallery.tsx:446:13",className:"inline-block px-4 py-1.5 rounded-full text-xs font-medium bg-accent-cyan/10 text-accent-cyan border border-accent-cyan/20 mb-6",children:e.missionLabel}),E.jsx("p",{"code-path":"src/pages/Gallery.tsx:449:13",className:"font-display text-2xl md:text-3xl font-bold gradient-text mb-6",children:e.missionStatement}),E.jsx("p",{"code-path":"src/pages/Gallery.tsx:452:13",className:"text-text-secondary max-w-3xl mx-auto leading-relaxed text-base md:text-lg",children:e.missionDesc})]}),E.jsxs(be.div,{"code-path":"src/pages/Gallery.tsx:458:11",variants:cg,initial:"hidden",
4135whileInView:"visible",viewport:{once:!0},className:"grid md:grid-cols-3 gap-8",children:[E.jsxs(be.div,{"code-path":"src/pages/Gallery.tsx:466:13",variants:uc,className:"gradient-card rounded-2xl p-8 border glass-border text-center group hover:border-accent-cyan/30 transition-colors duration-300",children:[E.jsx("div",{"code-path":"src/pages/Gallery.tsx:470:15",className:"w-16 h-16 rounded-2xl bg-gradient-to-br from-accent-cyan/20 to-accent-purple/20 flex items-center justify-center mx-auto mb-6 group-hover:scale-110 transition-transform duration-300",children:E.jsx(fc,{"code-path":"src/pages/Gallery.tsx:471:17",className:"w-8 h-8 text-accent-cyan"})}),E.jsx("h3",{"code-path":"src/pages/Gallery.tsx:473:15",className:"font-display text-xl font-bold text-text-primary mb-3",children:e.pillar1Title}),E.jsx("p",{"code-path":"src/pages/Gallery.tsx:476:15",className:"text-text-secondary text-sm leading-relaxed",children:e.pillar1Desc})]}),E.jsxs(be.div,{"code-path":"src/pages/Gallery.tsx:480:13",variants:uc,className:"gradient-card rounded-2xl p-8 border glass-border text-center group hover:border-accent-cyan/30 transition-colors duration-300",children:[E.jsx("div",{"code-path":"src/pages/Gallery.tsx:484:15",className:"w-16 h-16 rounded-2xl bg-gradient-to-br from-accent-purple/20 to-accent-pink/20 flex items-center justify-center mx-auto mb-6 group-hover:scale-110 transition-transform duration-300",children:E.jsx(_U,{"code-path":"src/pages/Gallery.tsx:485:17",className:"w-8 h-8 text-accent-purple"})}),E.jsx("h3",{"code-path":"src/pages/Gallery.tsx:487:15",className:"font-display text-xl font-bold text-text-primary mb-3",children:e.pillar2Title}),E.jsx("p",{"code-path":"src/pages/Gallery.tsx:490:15",className:"text-text-secondary text-sm leading-relaxed",children:e.pillar2Desc})]}),E.jsxs(be.div,{"code-path":"src/pages/Gallery.tsx:494:13",variants:uc,className:"gradient-card rounded-2xl p-8 border glass-border text-center group hover:border-accent-cyan/30 transition-colors duration-300",children:[E.jsx("div",{"code-path":"src/pages/Gallery.tsx:498:15",className:"w-16 h-16 rounded-2xl bg-gradient-to-br from-accent-pink/20 to-accent-cyan/20 flex items-center justify-center mx-auto mb-6 group-hover:scale-110 transition-transform duration-300",children:E.jsx(nU,{"code-path":"src/pages/Gallery.tsx:499:17",className:"w-8 h-8 text-accent-pink"})}),E.jsx("h3",{"code-path":"src/pages/Gallery.tsx:501:15",className:"font-display text-xl font-bold text-text-primary mb-3",children:e.pillar3Title}),E.jsx("p",{"code-path":"src/pages/Gallery.tsx:504:15",className:"text-text-secondary text-sm leading-relaxed",children:e.pillar3Desc})]})]})]})]}),E.jsx("section",{"code-path":"src/pages/Gallery.tsx:513:7",className:"bg-bg-secondary py-20 md:py-28",children:E.jsxs("div",{"code-path":"src/pages/Gallery.tsx:514:9",className:"max-w-7xl mx-auto px-6",children:[E.jsx(be.div,{"code-path":"src/pages/Gallery.tsx:515:11",initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7},className:"text-center mb-14",children:E.jsx("h2",{"code-path":"src/pages/Gallery.tsx:522:13",className:"font-display text-3xl md:text-4xl font-bold text-text-primary",children:e.creativeTitle})}),E.jsxs("div",{"code-path":"src/pages/Gallery.tsx:527:11",className:"grid lg:grid-cols-2 gap-10 items-center",children:[E.jsxs(be.div,{"code-path":"src/pages/Gallery.tsx:529:13",variants:cg,initial:"hidden",whileInView:"visible",viewport:{once:!0},className:"space-y-6",children:[E.jsxs(be.div,{"code-path":"src/pages/Gallery.tsx:537:15",variants:uc,className:"gradient-card rounded-2xl p-6 border glass-border flex gap-5 group hover:border-accent-cyan/30 transition-all duration-300",children:[E.jsx("div",{"code-path":"src/pages/Gallery.tsx:541:17",className:"w-14 h-14 rounded-xl bg-gradient-to-br from-amber-500/20 to-orange-500/20 flex items-center justify-center shrink-0 group-hover:scale-110 transition-transform duration-300",children:E.jsx(j5,{"code-path":"src/pages/Gallery.tsx:542:19",className:"w-7 h-7 text-amber-400"})}),E.jsxs("div",{"code-path":"src/pages/Gallery.tsx:544:17",children:[E.jsx("h3",{"code-path":"src/pages/Gallery.tsx:545:19",className:"font-display text-lg font-bold text-text-primary mb-2",children:e.creativeCard1Title}),E.jsx("p",{"code-path":"src/pages/Gallery.tsx:548:19",className:"text-text-secondary text-sm leading-relaxed",children:e.creativeCard1Body})]})]}),E.jsxs(be.div,{"code-path":"src/pages/Gallery.tsx:555:15",variants:uc,className:"gradient-card rounded-2xl p-6 border glass-border flex gap-5 group hover:border-accent-cyan/30 transition-all duration-300",children:[E.jsx("div",{"code-path":"src/pages/Gallery.tsx:559:17",className:"w-14 h-14 roun
4135ded-xl bg-gradient-to-br from-sky-500/20 to-cyan-500/20 flex items-center justify-center shrink-0 group-hover:scale-110 transition-transform duration-300",children:E.jsx(LU,{"code-path":"src/pages/Gallery.tsx:560:19",className:"w-7 h-7 text-sky-400"})}),E.jsxs("div",{"code-path":"src/pages/Gallery.tsx:562:17",children:[E.jsx("h3",{"code-path":"src/pages/Gallery.tsx:563:19",className:"font-display text-lg font-bold text-text-primary mb-2",children:e.creativeCard2Title}),E.jsx("p",{"code-path":"src/pages/Gallery.tsx:566:19",className:"text-text-secondary text-sm leading-relaxed",children:e.creativeCard2Body})]})]}),E.jsxs(be.div,{"code-path":"src/pages/Gallery.tsx:573:15",variants:uc,className:"gradient-card rounded-2xl p-6 border glass-border flex gap-5 group hover:border-accent-cyan/30 transition-all duration-300",children:[E.jsx("div",{"code-path":"src/pages/Gallery.tsx:577:17",className:"w-14 h-14 rounded-xl bg-gradient-to-br from-rose-500/20 to-pink-500/20 flex items-center justify-center shrink-0 group-hover:scale-110 transition-transform duration-300",children:E.jsx(SR,{"code-path":"src/pages/Gallery.tsx:578:19",className:"w-7 h-7 text-rose-400"})}),E.jsxs("div",{"code-path":"src/pages/Gallery.tsx:580:17",children:[E.jsx("h3",{"code-path":"src/pages/Gallery.tsx:581:19",className:"font-display text-lg font-bold text-text-primary mb-2",children:e.creativeCard3Title}),E.jsx("p",{"code-path":"src/pages/Gallery.tsx:584:19",className:"text-text-secondary text-sm leading-relaxed",children:e.creativeCard3Body})]})]})]}),E.jsxs(be.div,{"code-path":"src/pages/Gallery.tsx:592:13",initial:{opacity:0,scale:.95},whileInView:{opacity:1,scale:1},viewport:{once:!0},transition:{duration:.8,ease:[.16,1,.3,1]},className:"relative rounded-2xl overflow-hidden aspect-[4/3] lg:aspect-auto lg:h-full min-h-[300px]",children:[E.jsx("img",{"code-path":"src/pages/Gallery.tsx:599:15",src:"/company-creative.jpg",alt:"Creative",className:"w-full h-full object-cover rounded-2xl",loading:"lazy"}),E.jsx("div",{"code-path":"src/pages/Gallery.tsx:605:15",className:"absolute inset-0 bg-gradient-to-t from-[#0A0E1A]/40 to-transparent rounded-2xl"})]})]})]})}),E.jsxs("section",{"code-path":"src/pages/Gallery.tsx:614:7",className:"relative py-20 md:py-28 overflow-hidden",children:[E.jsx("div",{"code-path":"src/pages/Gallery.tsx:616:9",className:"absolute inset-0 bg-cover bg-center bg-no-repeat opacity-20",style:{backgroundImage:"url(/company-awards.jpg)"}}),E.jsx("div",{"code-path":"src/pages/Gallery.tsx:620:9",className:"absolute inset-0 bg-[#0A0E1A]/85"}),E.jsx("div",{"code-path":"src/pages/Gallery.tsx:621:9",className:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,rgba(0,229,255,0.06)_0%,transparent_70%)]"}),E.jsxs("div",{"code-path":"src/pages/Gallery.tsx:623:9",className:"relative z-10 max-w-7xl mx-auto px-6",children:[E.jsx(be.div,{"code-path":"src/pages/Gallery.tsx:624:11",initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7},className:"text-center mb-14",children:E.jsx("h2",{"code-path":"src/pages/Gallery.tsx:631:13",className:"font-display text-3xl md:text-4xl font-bold text-text-primary",children:e.awardsTitle})}),E.jsx(be.div,{"code-path":"src/pages/Gallery.tsx:637:11",variants:cg,initial:"hidden",whileInView:"visible",viewport:{once:!0},className:"grid sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:fq.map((c,h)=>E.jsxs(be.div,{"code-path":"src/pages/Gallery.tsx:645:15",variants:uc,className:"gradient-card rounded-xl p-5 border glass-border group hover:border-accent-cyan/30 transition-all duration-300",children:[E.jsxs("div",{"code-path":"src/pages/Gallery.tsx:650:17",className:"flex items-center gap-3 mb-3",children:[E.jsx("div",{"code-path":"src/pages/Gallery.tsx:651:19",className:"w-10 h-10 rounded-lg bg-gradient-to-br from-amber-500/20 to-yellow-500/20 flex items-center justify-center shrink-0",children:E.jsx(f5,{"code-path":"src/pages/Gallery.tsx:652:21",className:"w-5 h-5 text-amber-400"})}),E.jsx("span",{"code-path":"src/pages/Gallery.tsx:654:19",className:"text-accent-cyan font-display font-bold text-lg",children:c.year})]}),E.jsx("p",{"code-path":"src/pages/Gallery.tsx:658:17",className:"text-text-secondary text-sm leading-relaxed",children:i(c,h)})]},`${c.year}-${h}`))})]})]}),E.jsx("section",{"code-path":"src/pages/Gallery.tsx:670:7",className:"bg-bg-secondary py-20 md:py-28",children:E.jsxs("div",{"code-path":"src/pages/Gallery.tsx:671:9",className:"max-w-7xl mx-auto px-6",children:[E.jsxs(be.div,{"code-path":"src/pages/Gallery.tsx:672:11",initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7},className:"text-center mb-6",children:[E.jsx("h2",{"code-path":"src/pages/Gallery.tsx:679:13",className:"font-display text-3xl md:text-4xl font-bold text-text-primary mb-4",children:e.clientsTitle}),E.jsx("p",{"code-path":"src/pages/Gallery.tsx:682:13",className:"text-text-secondary max-w-2xl mx-auto",children:e.clientsDesc})]}),E.jsx(be.div,{"code-path":"src/pages/Gallery.tsx:686:11",variants:cg,initial:"hidden",
4135whileInView:"visible",viewport:{once:!0},className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-5 gap-4 mt-12",children:mq.map(c=>E.jsxs(be.div,{"code-path":"src/pages/Gallery.tsx:694:15",variants:uc,className:"gradient-card rounded-xl p-5 border glass-border text-center group hover:border-accent-cyan/30 hover:bg-accent-cyan/5 transition-all duration-300 cursor-default",children:[E.jsx("div",{"code-path":"src/pages/Gallery.tsx:699:17",className:"w-10 h-10 rounded-lg bg-bg-elevated flex items-center justify-center mx-auto mb-3 group-hover:bg-accent-cyan/10 transition-colors",children:E.jsx("span",{"code-path":"src/pages/Gallery.tsx:700:19",className:"text-accent-cyan font-display font-bold text-sm",children:c.nameEn.charAt(0)})}),E.jsx("p",{"code-path":"src/pages/Gallery.tsx:704:17",className:"text-text-primary text-sm font-medium leading-tight",children:s(c)})]},c.nameEn))})]})}),E.jsxs("section",{"code-path":"src/pages/Gallery.tsx:716:7",className:"relative py-20 md:py-28",children:[E.jsx("div",{"code-path":"src/pages/Gallery.tsx:717:9",className:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,rgba(124,58,237,0.06)_0%,transparent_70%)]"}),E.jsxs("div",{"code-path":"src/pages/Gallery.tsx:719:9",className:"relative z-10 max-w-7xl mx-auto px-6",children:[E.jsxs(be.div,{"code-path":"src/pages/Gallery.tsx:720:11",initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7},className:"text-center mb-6",children:[E.jsx("h2",{"code-path":"src/pages/Gallery.tsx:727:13",className:"font-display text-3xl md:text-4xl font-bold text-text-primary mb-4",children:e.globalTitle}),E.jsx("p",{"code-path":"src/pages/Gallery.tsx:730:13",className:"text-text-secondary max-w-2xl mx-auto",children:e.globalDesc})]}),E.jsx(be.div,{"code-path":"src/pages/Gallery.tsx:734:11",variants:cg,initial:"hidden",whileInView:"visible",viewport:{once:!0},className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 gap-4 mt-12",children:gq.map(c=>E.jsxs(be.div,{"code-path":"src/pages/Gallery.tsx:742:15",variants:uc,className:"gradient-card rounded-xl p-5 border glass-border text-center group hover:border-accent-cyan/30 hover:bg-accent-cyan/5 transition-all duration-300",children:[E.jsx("div",{"code-path":"src/pages/Gallery.tsx:747:17",className:"w-12 h-12 rounded-full bg-gradient-to-br from-accent-cyan/10 to-accent-purple/10 flex items-center justify-center mx-auto mb-3 group-hover:scale-110 transition-transform duration-300",children:E.jsx(qM,{"code-path":"src/pages/Gallery.tsx:748:19",className:"w-6 h-6 text-accent-cyan"})}),E.jsx("p",{"code-path":"src/pages/Gallery.tsx:750:17",className:"text-text-primary font-medium text-sm",children:o(c)})]},c.nameEn))})]})]}),E.jsxs("section",{"code-path":"src/pages/Gallery.tsx:762:7",className:"gradient-hero py-20 md:py-28 relative overflow-hidden",children:[E.jsx("div",{"code-path":"src/pages/Gallery.tsx:763:9",className:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,rgba(0,229,255,0.1)_0%,transparent_70%)]"}),E.jsx("div",{"code-path":"src/pages/Gallery.tsx:764:9",className:"absolute top-0 left-0 w-full h-px bg-gradient-to-r from-transparent via-accent-cyan/30 to-transparent"}),E.jsx("div",{"code-path":"src/pages/Gallery.tsx:765:9",className:"absolute bottom-0 left-0 w-full h-px bg-gradient-to-r from-transparent via-accent-purple/30 to-transparent"}),E.jsxs(be.div,{"code-path":"src/pages/Gallery.tsx:767:9",initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7},className:"relative z-10 max-w-4xl mx-auto px-6 text-center",children:[E.jsx("h2",{"code-path":"src/pages/Gallery.tsx:774:11",className:"font-display text-3xl md:text-4xl lg:text-5xl font-bold text-text-primary mb-6 text-shadow-glow",children:e.ctaHeadline}),E.jsx(be.div,{"code-path":"src/pages/Gallery.tsx:777:11",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:.2},children:E.jsxs(ti,{"code-path":"src/pages/Gallery.tsx:783:13",to:"/contact",className:"inline-flex items-center gap-2 px-8 py-4 rounded-full gradient-accent text-white font-semibold text-lg shadow-lg hover:shadow-glow-cyan transition-all duration-300 hover:scale-105",children:[e.ctaButton,E.jsx(C1,{"code-path":"src/pages/Gallery.tsx:788:15",className:"w-5 h-5"})]})})]})]})]})}function vq(){return E.jsx(a5,{"code-path":"src/App.tsx:14:5",children:E.jsx(BU,{"code-path":"src/App.tsx:15:7",children:E.jsxs(S4,{"code-path":"src/App.tsx:16:9",children:[E.jsx(xu,{"code-path":"src/App.tsx:17:11",path:"/",element:E.jsx(mX,{"code-path":"src/App.tsx:17:36"})}),E.jsx(xu,{"code-path":"src/App.tsx:18:11",path:"/games",element:E.jsx(TX,{"code-path":"src/App.tsx:18:41"})}),E.jsx(xu,{"code-path":"src/App.tsx:19:11",path:"/short-video",element:E.jsx(VX,{"code-path":"src/App.tsx:19:47"})}),E.jsx(xu,{"code-path":"src/App.tsx:20:11",path:"/vr-space",element:E.jsx(WX,{"code-path":"src/App.tsx:20:44"})}),E.jsx(xu,{"code-path":"src/App.tsx:21:11",path:"/about",element:E.jsx(lq,{"code-path":"src/App.tsx:21:41"})}),E.jsx(xu,{"code-path":"src/App.tsx:22:11",path:"/contact",element:E.jsx(dq,{"code-path":"src/App.tsx:22:43"})}),E.jsx(xu,{"code-path":"src/App.tsx:23:11",path:"/gallery",element:E.jsx(yq,{"code-path":"src/App.tsx:23:43"})})]})})})}wP.createRoot(document.getElementById("root")).render(E.jsx(X4,{"code-path":"src/main.tsx:7:3",children:E.jsx(vq,{"code-path":"src/main.tsx:8:5"})}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.