vendor: 5,271 bytes, lines 1-9
1(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function t(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(r){if(r.ep)return;r.ep=!0;const s=t(r);fetch(r.href,s)}})();function j3(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var W3={exports:{}},Py={},V3={exports:{}},en={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var km=Symbol.for("react.element"),YN=Symbol.for("react.portal"),JN=Symbol.for("react.fragment"),KN=Symbol.for("react.strict_mode"),qN=Symbol.for("react.profiler"),ZN=Symbol.for("react.provider"),QN=Symbol.for("react.context"),$N=Symbol.for("react.forward_ref"),ek=Symbol.for("react.suspense"),tk=Symbol.for("react.memo"),nk=Symbol.for("react.lazy"),IE=Symbol.iterator;function ik(i){return i===null||typeof i!="object"?null:(i=IE&&i[IE]||i["@@iterator"],typeof i=="function"?i:null)}var X3={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Y3=Object.assign,J3={};function rh(i,e,t){this.props=i,this.context=e,this.refs=J3,this.updater=t||X3}rh.prototype.isReactComponent={};rh.prototype.setState=function(i,e){if(typeof i!="object"&&typeof i!="function"&&i!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,i,e,"setState")};rh.prototype.forceUpdate=function(i){this.updater.enqueueForceUpdate(this,i,"forceUpdate")};function K3(){}K3.prototype=rh.prototype;function DM(i,e,t){this.props=i,this.context=e,this.refs=J3,this.updater=t||X3}var FM=DM.prototype=new K3;FM.constructor=DM;Y3(FM,rh.prototype);FM.isPureReactComponent=!0;var LE=Array.isArray,q3=Object.prototype.hasOwnProperty,NM={current:null},Z3={key:!0,ref:!0,__self:!0,__source:!0};function Q3(i,e,t){var n,r={},s=null,o=null;if(e!=null)for(n in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)q3.call(e,n)&&!Z3.hasOwnProperty(n)&&(r[n]=e[n]);var a=arguments.length-2;if(a===1)r.children=t;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];r.children=l}if(i&&i.defaultProps)for(n in a=i.defaultProps,a)r[n]===void 0&&(r[n]=a[n]);return{$$typeof:km,type:i,key:s,ref:o,props:r,_owner:NM.current}}function rk(i,e){return{$$typeof:km,type:i.type,key:e,ref:i.ref,props:i.props,_owner:i._owner}}function kM(i){return typeof i=="object"&&i!==null&&i.$$typeof===km}function sk(i){var e={"=":"=0",":":"=2"};return"$"+i.replace(/[=:]/g,function(t){return e[t]})}var BE=/\/+/g;function W_(i,e){return typeof i=="object"&&i!==null&&i.key!=null?sk(""+i.key):e.toString(36)}function Rx(i,e,t,n,r){var s=typeof i;(s==="undefined"||s==="boolean")&&(i=null);var o=!1;if(i===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(i.$$typeof){case km:case YN:o=!0}}if(o)return o=i,r=r(o),i=n===""?"."+W_(o,0):n,LE(r)?(t="",i!=null&&(t=i.replace(BE,"$&/")+"/"),Rx(r,e,t,"",function(c){return c})):r!=null&&(kM(r)&&(r=rk(r,t+(!r.key||o&&o.key===r.key?"":(""+r.key).replace(BE,"$&/")+"/")+i)),e.push(r)),1;if(o=0,n=n===""?".":n+":",LE(i))for(var a=0;a<i.length;a++){s=i[a];var l=n+W_(s,a);o+=Rx(s,e,t,l,r)}else if(l=ik(i),typeof l=="function")for(i=l.call(i),a=0;!(s=i.next()).done;)s=s.value,l=n+W_(s,a++),o+=Rx(s,e,t,l,r);else if(s==="object")throw e=String(i),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function K0(i,e,t){if(i==null)return i;var n=[],r=0;return Rx(i,n,"","",function(s){return e.call(t,s,r++)}),n}function ok(i){if(i._status===-1){var e=i._result;e=e(),e.then(function(t){(i._status===0||i._status===-1)&&(i._status=1,i._result=t)},function(t){(i._status===0||i._status===-1)&&(i._status=2,i._result=t)}),i._status===-1&&(i._status=0,i._result=e)}if(i._status===1)return i._result.default;throw i._result}var Kr={current:null},Px={transition:null},ak={ReactCurrentDispatcher:Kr,ReactCurrentBatchConfig:Px,ReactCurrentOwner:NM};function $3(){throw Error("act(...) is not supported in production builds of React.")}en.Children={map:K0,forEach:function(i,e,t){K0(i,function(){e.apply(this,arguments)},t)},count:function(i){var e=0;return K0(i,function(){e++}),e},toArray:function(i){return K0(i,function(e){return e})||[]},only:function(i){if(!kM(i))throw Error("React.Children.only expected to receive a single React element child.");return i}};en.Component=rh;en.Fragment=JN;en.Profiler=qN;
vendor: 5,093 bytes, lines 9-25
9en.PureComponent=DM;en.StrictMode=KN;en.Suspense=ek;en.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ak;en.act=$3;en.cloneElement=function(i,e,t){if(i==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+i+".");var n=Y3({},i.props),r=i.key,s=i.ref,o=i._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,o=NM.current),e.key!==void 0&&(r=""+e.key),i.type&&i.type.defaultProps)var a=i.type.defaultProps;for(l in e)q3.call(e,l)&&!Z3.hasOwnProperty(l)&&(n[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)n.children=t;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];n.children=a}return{$$typeof:km,type:i.type,key:r,ref:s,props:n,_owner:o}};en.createContext=function(i){return i={$$typeof:QN,_currentValue:i,_currentValue2:i,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},i.Provider={$$typeof:ZN,_context:i},i.Consumer=i};en.createElement=Q3;en.createFactory=function(i){var e=Q3.bind(null,i);return e.type=i,e};en.createRef=function(){return{current:null}};en.forwardRef=function(i){return{$$typeof:$N,render:i}};en.isValidElement=kM;en.lazy=function(i){return{$$typeof:nk,_payload:{_status:-1,_result:i},_init:ok}};en.memo=function(i,e){return{$$typeof:tk,type:i,compare:e===void 0?null:e}};en.startTransition=function(i){var e=Px.transition;Px.transition={};try{i()}finally{Px.transition=e}};en.unstable_act=$3;en.useCallback=function(i,e){return Kr.current.useCallback(i,e)};en.useContext=function(i){return Kr.current.useContext(i)};en.useDebugValue=function(){};en.useDeferredValue=function(i){return Kr.current.useDeferredValue(i)};en.useEffect=function(i,e){return Kr.current.useEffect(i,e)};en.useId=function(){return Kr.current.useId()};en.useImperativeHandle=function(i,e,t){return Kr.current.useImperativeHandle(i,e,t)};en.useInsertionEffect=function(i,e){return Kr.current.useInsertionEffect(i,e)};en.useLayoutEffect=function(i,e){return Kr.current.useLayoutEffect(i,e)};en.useMemo=function(i,e){return Kr.current.useMemo(i,e)};en.useReducer=function(i,e,t){return Kr.current.useReducer(i,e,t)};en.useRef=function(i){return Kr.current.useRef(i)};en.useState=function(i){return Kr.current.useState(i)};en.useSyncExternalStore=function(i,e,t){return Kr.current.useSyncExternalStore(i,e,t)};en.useTransition=function(){return Kr.current.useTransition()};en.version="18.3.1";V3.exports=en;var X=V3.exports;const eP=j3(X);/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var lk=X,ck=Symbol.for("react.element"),uk=Symbol.for("react.fragment"),dk=Object.prototype.hasOwnProperty,fk=lk.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,hk={key:!0,ref:!0,__self:!0,__source:!0};function tP(i,e,t){var n,r={},s=null,o=null;t!==void 0&&(s=""+t),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(n in e)dk.call(e,n)&&!hk.hasOwnProperty(n)&&(r[n]=e[n]);if(i&&i.defaultProps)for(n in e=i.defaultProps,e)r[n]===void 0&&(r[n]=e[n]);return{$$typeof:ck,type:i,key:s,ref:o,props:r,_owner:fk.current}}Py.Fragment=uk;Py.jsx=tP;Py.jsxs=tP;W3.exports=Py;var y=W3.exports,XS={},nP={exports:{}},Js={},iP={exports:{}},rP={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */(function(i){function e(G,Z){var O=G.length;G.push(Z);e:for(;0<O;){var ee=O-1>>>1,le=G[ee];if(0<r(le,Z))G[ee]=Z,G[O]=le,O=ee;else break e}}function t(G){return G.length===0?null:G[0]}function n(G){if(G.length===0)return null;var Z=G[0],O=G.pop();if(O!==Z){G[0]=O;e:for(var ee=0,le=G.length,ge=le>>>1;ee<ge;){var Se=2*(ee+1)-1,Ye=G[Se],K=Se+1,q=G[K];if(0>r(Ye,O))K<le&&0>r(q,Ye)?(G[ee]=q,G[K]=O,ee=K):(G[ee]=Ye,G[Se]=O,ee=Se);else if(K<le&&0>r(q,O))G[ee]=q,G[K]=O,ee=K;else break e}}return Z}function r(G,Z){var O=G.sortIndex-Z.sortIndex;return O!==0?O:G.id-Z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;i.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();i.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,d=null,p=3,m=!1,x=!1,v=!1,_=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(G){for(var Z=t(c);Z!==null;){if(Z.callback===null)n(c);else if(Z.startTime<=G)n(c),Z.sortIndex=Z.expirationTime,e(l,Z);else break;Z=t(c)}}function A(G){if(v=!1,b(G),!x)if(t(l)!==null)x=!0,W(w);else{var Z=t(c);Z!==null&&V(A,Z.startTime-G)}}function w(G,Z){x=!1,v&&(v=!1,g(B),B=-1),m=!0;var O=p;try{for(b(Z),d=t(l);d!==null&&(!(d.expirationTime>Z)||G&&!L());){var ee=d.callback;
vendor: 8,753 bytes, lines 25-34
25if(typeof ee=="function"){d.callback=null,p=d.priorityLevel;var le=ee(d.expirationTime<=Z);Z=i.unstable_now(),typeof le=="function"?d.callback=le:d===t(l)&&n(l),b(Z)}else n(l);d=t(l)}if(d!==null)var ge=!0;else{var Se=t(c);Se!==null&&V(A,Se.startTime-Z),ge=!1}return ge}finally{d=null,p=O,m=!1}}var C=!1,P=null,B=-1,R=5,E=-1;function L(){return!(i.unstable_now()-E<R)}function N(){if(P!==null){var G=i.unstable_now();E=G;var Z=!0;try{Z=P(!0,G)}finally{Z?k():(C=!1,P=null)}}else C=!1}var k;if(typeof S=="function")k=function(){S(N)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,z=Y.port2;Y.port1.onmessage=N,k=function(){z.postMessage(null)}}else k=function(){_(N,0)};function W(G){P=G,C||(C=!0,k())}function V(G,Z){B=_(function(){G(i.unstable_now())},Z)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(G){G.callback=null},i.unstable_continueExecution=function(){x||m||(x=!0,W(w))},i.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<G?Math.floor(1e3/G):5},i.unstable_getCurrentPriorityLevel=function(){return p},i.unstable_getFirstCallbackNode=function(){return t(l)},i.unstable_next=function(G){switch(p){case 1:case 2:case 3:var Z=3;break;default:Z=p}var O=p;p=Z;try{return G()}finally{p=O}},i.unstable_pauseExecution=function(){},i.unstable_requestPaint=function(){},i.unstable_runWithPriority=function(G,Z){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var O=p;p=G;try{return Z()}finally{p=O}},i.unstable_scheduleCallback=function(G,Z,O){var ee=i.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0<O?ee+O:ee):O=ee,G){case 1:var le=-1;break;case 2:le=250;break;case 5:le=1073741823;break;case 4:le=1e4;break;default:le=5e3}return le=O+le,G={id:u++,callback:Z,priorityLevel:G,startTime:O,expirationTime:le,sortIndex:-1},O>ee?(G.sortIndex=O,e(c,G),t(l)===null&&G===t(c)&&(v?(g(B),B=-1):v=!0,V(A,O-ee))):(G.sortIndex=le,e(l,G),x||m||(x=!0,W(w))),G},i.unstable_shouldYield=L,i.unstable_wrapCallback=function(G){var Z=p;return function(){var O=p;p=Z;try{return G.apply(this,arguments)}finally{p=O}}}})(rP);iP.exports=rP;var pk=iP.exports;/** 26 * @license React 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var mk=X,Ws=pk;function Ze(i){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+i,t=1;t<arguments.length;t++)e+="&args[]="+encodeURIComponent(arguments[t]);return"Minified React error #"+i+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var sP=new Set,Qp={};function Qu(i,e){Bf(i,e),Bf(i+"Capture",e)}function Bf(i,e){for(Qp[i]=e,i=0;i<e.length;i++)sP.add(e[i])}var tl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),YS=Object.prototype.hasOwnProperty,gk=/^[: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]*$/,DE={},FE={};function xk(i){return YS.call(FE,i)?!0:YS.call(DE,i)?!1:gk.test(i)?FE[i]=!0:(DE[i]=!0,!1)}function vk(i,e,t,n){if(t!==null&&t.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:t!==null?!t.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function yk(i,e,t,n){if(e===null||typeof e>"u"||vk(i,e,t,n))return!0;if(n)return!1;if(t!==null)switch(t.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function qr(i,e,t,n,r,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=r,this.mustUseProperty=t,this.propertyName=i,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var ar={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){ar[i]=new qr(i,0,!1,i,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var e=i[0];ar[e]=new qr(e,1,!1,i[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(i){ar[i]=new qr(i,2,!1,i.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){ar[i]=new qr(i,2,!1,i,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){ar[i]=new qr(i,3,!1,i.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(i){ar[i]=new qr(i,3,!0,i,null,!1,!1)});["capture","download"].forEach(function(i){ar[i]=new qr(i,4,!1,i,null,!1,!1)});["cols","rows","size","span"].forEach(function(i){ar[i]=new qr(i,6,!1,i,null,!1,!1)});["rowSpan","start"].forEach(function(i){ar[i]=new qr(i,5,!1,i.toLowerCase(),null,!1,!1)});var OM=/[\-:]([a-z])/g;function UM(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var e=i.replace(OM,UM);ar[e]=new qr(e,1,!1,i,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var e=i.replace(OM,UM);ar[e]=new qr(e,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(i){var e=i.replace(OM,UM);ar[e]=new qr(e,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(i){ar[i]=new qr(i,1,!1,i.toLowerCase(),null,!1,!1)});ar.xlinkHref=new qr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(i){ar[i]=new qr(i,1,!1,i.toLowerCase(),null,!0,!0)});function zM(i,e,t,n){var r=ar.hasOwnProperty(e)?ar[e]:null;(r!==null?r.type!==0:n||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(yk(e,t,r,n)&&(t=null),n||r===null?xk(e)&&(t===null?i.removeAttribute(e):i.setAttribute(e,""+t)):r.mustUseProperty?i[r.propertyName]=t===null?r.type===3?!1:"":t:(e=r.attributeName,n=r.attributeNamespace,t===null?i.removeAttribute(e):(r=r.type,t=r===3||r===4&&t===!0?"":""+t,n?i.setAttributeNS(n,e,t):i.setAttribute(e,t))))}var ul=mk.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,q0=Symbol.for("react.element"),Qd=Symbol.for("react.portal"),$d=Symbol.for("react.fragment"),HM=Symbol.for("react.strict_mode"),JS=Symbol.for("react.profiler"),oP=Symbol.for("react.provider"),aP=Symbol.for("react.context"),GM=Symbol.for("react.forward_ref"),KS=Symbol.for("react.suspense"),qS=Symbol.for("react.suspense_list"),jM=Symbol.for("react.memo"),Fl=Symbol.for("react.lazy"),lP=Symbol.for("react.offscreen"),NE=Symbol.iterator;function Bh(i){return i===null||typeof i!="object"?null:(i=NE&&i[NE]||i["@@iterator"],typeof i=="function"?i:null)}var $n=Object.assign,V_;function lp(i){if(V_===void 0)try{throw Error()}catch(t){var e=t.stack.trim().match(/\n( *(at )?)/);V_=e&&e[1]||""}return` 34`+V_+i}var X_=!1;
vendor: 7,914 bytes, lines 34-37
34function Y_(i,e){if(!i||X_)return"";X_=!0;var t=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(c){var n=c}Reflect.construct(i,[],e)}else{try{e.call()}catch(c){n=c}i.call(e.prototype)}else{try{throw Error()}catch(c){n=c}i()}}catch(c){if(c&&n&&typeof c.stack=="string"){for(var r=c.stack.split(` 35`),s=n.stack.split(` 36`),o=r.length-1,a=s.length-1;1<=o&&0<=a&&r[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(r[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||r[o]!==s[a]){var l=` 37`+r[o].replace(" at new "," at ");return i.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",i.displayName)),l}while(1<=o&&0<=a);break}}}finally{X_=!1,Error.prepareStackTrace=t}return(i=i?i.displayName||i.name:"")?lp(i):""}function _k(i){switch(i.tag){case 5:return lp(i.type);case 16:return lp("Lazy");case 13:return lp("Suspense");case 19:return lp("SuspenseList");case 0:case 2:case 15:return i=Y_(i.type,!1),i;case 11:return i=Y_(i.type.render,!1),i;case 1:return i=Y_(i.type,!0),i;default:return""}}function ZS(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case $d:return"Fragment";case Qd:return"Portal";case JS:return"Profiler";case HM:return"StrictMode";case KS:return"Suspense";case qS:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case aP:return(i.displayName||"Context")+".Consumer";case oP:return(i._context.displayName||"Context")+".Provider";case GM:var e=i.render;return i=i.displayName,i||(i=e.displayName||e.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case jM:return e=i.displayName||null,e!==null?e:ZS(i.type)||"Memo";case Fl:e=i._payload,i=i._init;try{return ZS(i(e))}catch{}}return null}function Sk(i){var e=i.type;switch(i.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=e.render,i=i.displayName||i.name||"",e.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ZS(e);case 8:return e===HM?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function dc(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function cP(i){var e=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function bk(i){var e=cP(i)?"checked":"value",t=Object.getOwnPropertyDescriptor(i.constructor.prototype,e),n=""+i[e];if(!i.hasOwnProperty(e)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var r=t.get,s=t.set;return Object.defineProperty(i,e,{configurable:!0,get:function(){return r.call(this)},set:function(o){n=""+o,s.call(this,o)}}),Object.defineProperty(i,e,{enumerable:t.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){i._valueTracker=null,delete i[e]}}}}function Z0(i){i._valueTracker||(i._valueTracker=bk(i))}function uP(i){if(!i)return!1;var e=i._valueTracker;if(!e)return!0;var t=e.getValue(),n="";return i&&(n=cP(i)?i.checked?"true":"false":i.value),i=n,i!==t?(e.setValue(i),!0):!1}function tv(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}function QS(i,e){var t=e.checked;return $n({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??i._wrapperState.initialChecked})}function kE(i,e){var t=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;t=dc(e.value!=null?e.value:t),i._wrapperState={initialChecked:n,initialValue:t,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function dP(i,e){e=e.checked,e!=null&&zM(i,"checked",e,!1)}function $S(i,e){dP(i,e);var t=dc(e.value),n=e.type;if(t!=null)n==="number"?(t===0&&i.value===""||i.value!=t)&&(i.value=""+t):i.value!==""+t&&(i.value=""+t);else if(n==="submit"||n==="reset"){i.removeAttribute("value");return}e.hasOwnProperty("value")?eb(i,e.type,t):e.hasOwnProperty("defaultValue")&&eb(i,e.type,dc(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(i.defaultChecked=!!e.defaultChecked)}function OE(i,e,t){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+i._wrapperState.initialValue,t||e===i.value||(i.value=e),i.defaultValue=e}t=i.name,t!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,t!==""&&(i.name=t)}function eb(i,e,t){(e!=="number"||tv(i.ownerDocument)!==i)&&(t==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+t&&(i.defaultValue=""+t))}var cp=Array.isArray;function xf(i,e,t,n){if(i=i.options,e){e={};for(var r=0;r<t.length;r++)e["$"+t[r]]=!0;for(t=0;t<i.length;t++)r=e.hasOwnProperty("$"+i[t].value),i[t].selected!==r&&(i[t].selected=r),r&&n&&(i[t].defaultSelected=!0)}else{for(t=""+dc(t),e=null,r=0;r<i.length;r++){if(i[r].value===t){i[r].selected=!0,n&&(i[r].defaultSelected=!0);return}e!==null||i[r].disabled||(e=i[r])}e!==null&&(e.selected=!0)}}function tb(i,e){if(e.dangerouslySetInnerHTML!=null)throw Error(Ze(91));return $n({},e,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function UE(i,e){var t=e.value;if(t==null){if(t=e.children,e=e.defaultValue,t!=null){if(e!=null)throw Error(Ze(92));if(cp(t)){if(1<t.length)throw Error(Ze(93));t=t[0]}e=t}e==null&&(e=""),t=e}i._wrapperState={initialValue:dc(t)}}function fP(i,e){var t=dc(e.value),n=dc(e.defaultValue);t!=null&&(t=""+t,t!==i.value&&(i.value=t),e.defaultValue==null&&i.defaultValue!==t&&(i.defaultValue=t)),n!=null&&(i.defaultValue=""+n)}function zE(i){var e=i.textContent;e===i._wrapperState.initialValue&&e!==""&&e!==null&&(i.value=e)}function hP(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function nb(i,e){return i==null||i==="http://www.w3.org/1999/xhtml"?hP(e):i==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Q0,pP=function(i){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return i(e,t,n,r)})}:i}(function(i,e){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=e;else{for(Q0=Q0||document.createElement("div"),Q0.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Q0.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;e.firstChild;)i.appendChild(e.firstChild)}});function $p(i,e){if(e){var t=i.firstChild;if(t&&t===i.lastChild&&t.nodeType===3){t.nodeValue=e;return}}i.textContent=e}var bp={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Mk=["Webkit","ms","Moz","O"];
vendor: 1,381 bytes, line 37
37Object.keys(bp).forEach(function(i){Mk.forEach(function(e){e=e+i.charAt(0).toUpperCase()+i.substring(1),bp[e]=bp[i]})});function mP(i,e,t){return e==null||typeof e=="boolean"||e===""?"":t||typeof e!="number"||e===0||bp.hasOwnProperty(i)&&bp[i]?(""+e).trim():e+"px"}function gP(i,e){i=i.style;for(var t in e)if(e.hasOwnProperty(t)){var n=t.indexOf("--")===0,r=mP(t,e[t],n);t==="float"&&(t="cssFloat"),n?i.setProperty(t,r):i[t]=r}}var Ak=$n({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ib(i,e){if(e){if(Ak[i]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Ze(137,i));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Ze(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Ze(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Ze(62))}}function rb(i,e){if(i.indexOf("-")===-1)return typeof e.is=="string";switch(i){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 sb=null;function WM(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var ob=null,vf=null,yf=null;
vendor: 9,324 bytes, line 37
37function HE(i){if(i=zm(i)){if(typeof ob!="function")throw Error(Ze(280));var e=i.stateNode;e&&(e=Fy(e),ob(i.stateNode,i.type,e))}}function xP(i){vf?yf?yf.push(i):yf=[i]:vf=i}function vP(){if(vf){var i=vf,e=yf;if(yf=vf=null,HE(i),e)for(i=0;i<e.length;i++)HE(e[i])}}function yP(i,e){return i(e)}function _P(){}var J_=!1;function SP(i,e,t){if(J_)return i(e,t);J_=!0;try{return yP(i,e,t)}finally{J_=!1,(vf!==null||yf!==null)&&(_P(),vP())}}function em(i,e){var t=i.stateNode;if(t===null)return null;var n=Fy(t);if(n===null)return null;t=n[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(i=i.type,n=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!n;break e;default:i=!1}if(i)return null;if(t&&typeof t!="function")throw Error(Ze(231,e,typeof t));return t}var ab=!1;if(tl)try{var Dh={};Object.defineProperty(Dh,"passive",{get:function(){ab=!0}}),window.addEventListener("test",Dh,Dh),window.removeEventListener("test",Dh,Dh)}catch{ab=!1}function wk(i,e,t,n,r,s,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{e.apply(t,c)}catch(u){this.onError(u)}}var Mp=!1,nv=null,iv=!1,lb=null,Tk={onError:function(i){Mp=!0,nv=i}};function Ek(i,e,t,n,r,s,o,a,l){Mp=!1,nv=null,wk.apply(Tk,arguments)}function Ck(i,e,t,n,r,s,o,a,l){if(Ek.apply(this,arguments),Mp){if(Mp){var c=nv;Mp=!1,nv=null}else throw Error(Ze(198));iv||(iv=!0,lb=c)}}function $u(i){var e=i,t=i;if(i.alternate)for(;e.return;)e=e.return;else{i=e;do e=i,e.flags&4098&&(t=e.return),i=e.return;while(i)}return e.tag===3?t:null}function bP(i){if(i.tag===13){var e=i.memoizedState;if(e===null&&(i=i.alternate,i!==null&&(e=i.memoizedState)),e!==null)return e.dehydrated}return null}function GE(i){if($u(i)!==i)throw Error(Ze(188))}function Rk(i){var e=i.alternate;if(!e){if(e=$u(i),e===null)throw Error(Ze(188));return e!==i?null:i}for(var t=i,n=e;;){var r=t.return;if(r===null)break;var s=r.alternate;if(s===null){if(n=r.return,n!==null){t=n;continue}break}if(r.child===s.child){for(s=r.child;s;){if(s===t)return GE(r),i;if(s===n)return GE(r),e;s=s.sibling}throw Error(Ze(188))}if(t.return!==n.return)t=r,n=s;else{for(var o=!1,a=r.child;a;){if(a===t){o=!0,t=r,n=s;break}if(a===n){o=!0,n=r,t=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===t){o=!0,t=s,n=r;break}if(a===n){o=!0,n=s,t=r;break}a=a.sibling}if(!o)throw Error(Ze(189))}}if(t.alternate!==n)throw Error(Ze(190))}if(t.tag!==3)throw Error(Ze(188));return t.stateNode.current===t?i:e}function MP(i){return i=Rk(i),i!==null?AP(i):null}function AP(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var e=AP(i);if(e!==null)return e;i=i.sibling}return null}var wP=Ws.unstable_scheduleCallback,jE=Ws.unstable_cancelCallback,Pk=Ws.unstable_shouldYield,Ik=Ws.unstable_requestPaint,fi=Ws.unstable_now,Lk=Ws.unstable_getCurrentPriorityLevel,VM=Ws.unstable_ImmediatePriority,TP=Ws.unstable_UserBlockingPriority,rv=Ws.unstable_NormalPriority,Bk=Ws.unstable_LowPriority,EP=Ws.unstable_IdlePriority,Iy=null,ga=null;function Dk(i){if(ga&&typeof ga.onCommitFiberRoot=="function")try{ga.onCommitFiberRoot(Iy,i,void 0,(i.current.flags&128)===128)}catch{}}var Ho=Math.clz32?Math.clz32:kk,Fk=Math.log,Nk=Math.LN2;function kk(i){return i>>>=0,i===0?32:31-(Fk(i)/Nk|0)|0}var $0=64,eg=4194304;function up(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function sv(i,e){var t=i.pendingLanes;if(t===0)return 0;var n=0,r=i.suspendedLanes,s=i.pingedLanes,o=t&268435455;if(o!==0){var a=o&~r;a!==0?n=up(a):(s&=o,s!==0&&(n=up(s)))}else o=t&~r,o!==0?n=up(o):s!==0&&(n=up(s));if(n===0)return 0;if(e!==0&&e!==n&&!(e&r)&&(r=n&-n,s=e&-e,r>=s||r===16&&(s&4194240)!==0))return e;if(n&4&&(n|=t&16),e=i.entangledLanes,e!==0)for(i=i.entanglements,e&=n;0<e;)t=31-Ho(e),r=1<<t,n|=i[t],e&=~r;return n}function Ok(i,e){switch(i){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Uk(i,e){for(var t=i.suspendedLanes,n=i.pingedLanes,r=i.expirationTimes,s=i.pendingLanes;0<s;){var o=31-Ho(s),a=1<<o,l=r[o];l===-1?(!(a&t)||a&n)&&(r[o]=Ok(a,e)):l<=e&&(i.expiredLanes|=a),s&=~a}}function cb(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function CP(){var i=$0;return $0<<=1,!($0&4194240)&&($0=64),i}function K_(i){for(var e=[],t=0;31>t;t++)e.push(i);return e}function Om(i,e,t){i.pendingLanes|=e,e!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,e=31-Ho(e),i[e]=t}function zk(i,e){var t=i.pendingLanes&~e;i.pendingLanes=e,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=e,i.mutableReadLanes&=e,i.entangledLanes&=e,e=i.entanglements;var n=i.eventTimes;for(i=i.expirationTimes;0<t;){var r=31-Ho(t),s=1<<r;e[r]=0,n[r]=-1,i[r]=-1,t&=~s}}function XM(i,e){var t=i.entangledLanes|=e;for(i=i.entanglements;t;){var n=31-Ho(t),r=1<<n;r&e|i[n]&e&&(i[n]|=e),t&=~r}}var Mn=0;function RP(i){return i&=-i,1<i?4<i?i&268435455?16:536870912:4:1}var PP,YM,IP,LP,BP,ub=!1,tg=[],Zl=null,Ql=null,$l=null,tm=new Map,nm=new Map,kl=[],Hk="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 submit".split(" ");function WE(i,e){switch(i){case"focusin":case"focusout":Zl=null;break;case"dragenter":case"dragleave":Ql=null;break;case"mouseover":case"mouseout":$l=null;break;case"pointerover":case"pointerout":tm.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":nm.delete(e.pointerId)}}function Fh(i,e,t,n,r,s){return i===null||i.nativeEvent!==s?(i={blockedOn:e,domEventName:t,eventSystemFlags:n,nativeEvent:s,targetContainers:[r]},e!==null&&(e=zm(e),e!==null&&YM(e)),i):(i.eventSystemFlags|=n,e=i.targetContainers,r!==null&&e.indexOf(r)===-1&&e.push(r),i)}function Gk(i,e,t,n,r){switch(e){case"focusin":return Zl=Fh(Zl,i,e,t,n,r),!0;case"dragenter":return Ql=Fh(Ql,i,e,t,n,r),!0;case"mouseover":return $l=Fh($l,i,e,t,n,r),!0;case"pointerover":var s=r.pointerId;return tm.set(s,Fh(tm.get(s)||null,i,e,t,n,r)),!0;case"gotpointercapture":return s=r.pointerId,nm.set(s,Fh(nm.get(s)||null,i,e,t,n,r)),!0}return!1}function DP(i){var e=fu(i.target);if(e!==null){var t=$u(e);if(t!==null){if(e=t.tag,e===13){if(e=bP(t),e!==null){i.blockedOn=e,BP(i.priority,function(){IP(t)});return}}else if(e===3&&t.stateNode.current.memoizedState.isDehydrated){i.blockedOn=t.tag===3?t.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Ix(i){if(i.blockedOn!==null)return!1;for(var e=i.targetContainers;0<e.length;){var t=db(i.domEventName,i.eventSystemFlags,e[0],i.nativeEvent);if(t===null){t=i.nativeEvent;var n=new t.constructor(t.type,t);sb=n,t.target.dispatchEvent(n),sb=null}else return e=zm(t),e!==null&&YM(e),i.blockedOn=t,!1;e.shift()}return!0}function VE(i,e,t){Ix(i)&&t.delete(e)}function jk(){ub=!1,Zl!==null&&Ix(Zl)&&(Zl=null),Ql!==null&&Ix(Ql)&&(Ql=null),$l!==null&&Ix($l)&&($l=null),tm.forEach(VE),nm.forEach(VE)}function Nh(i,e){i.blockedOn===e&&(i.blockedOn=null,ub||(ub=!0,Ws.unstable_scheduleCallback(Ws.unstable_NormalPriority,jk)))}function im(i){function e(r){return Nh(r,i)}if(0<tg.length){Nh(tg[0],i);for(var t=1;t<tg.length;t++){var n=tg[t];n.blockedOn===i&&(n.blockedOn=null)}}for(Zl!==null&&Nh(Zl,i),Ql!==null&&Nh(Ql,i),$l!==null&&Nh($l,i),tm.forEach(e),nm.forEach(e),t=0;t<kl.length;t++)n=kl[t],n.blockedOn===i&&(n.blockedOn=null);for(;0<kl.length&&(t=kl[0],t.blockedOn===null);)DP(t),t.blockedOn===null&&kl.shift()}var _f=ul.ReactCurrentBatchConfig,ov=!0;function Wk(i,e,t,n){var r=Mn,s=_f.transition;_f.transition=null;try{Mn=1,JM(i,e,t,n)}finally{Mn=r,_f.transition=s}}function Vk(i,e,t,n){var r=Mn,s=_f.transition;_f.transition=null;try{Mn=4,JM(i,e,t,n)}finally{Mn=r,_f.transition=s}}function JM(i,e,t,n){if(ov){var r=db(i,e,t,n);if(r===null)s2(i,e,n,av,t),WE(i,n);else if(Gk(r,i,e,t,n))n.stopPropagation();else if(WE(i,n),e&4&&-1<Hk.indexOf(i)){for(;r!==null;){var s=zm(r);if(s!==null&&PP(s),s=db(i,e,t,n),s===null&&s2(i,e,n,av,t),s===r)break;r=s}r!==null&&n.stopPropagation()}else s2(i,e,n,null,t)}}var av=null;function db(i,e,t,n){if(av=null,i=WM(n),i=fu(i),i!==null)if(e=$u(i),e===null)i=null;else if(t=e.tag,t===13){if(i=bP(e),i!==null)return i;i=null}else if(t===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;i=null}else e!==i&&(i=null);return av=i,null}
vendor: 10,081 bytes, line 37
37function FP(i){switch(i){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Lk()){case VM:return 1;case TP:return 4;case rv:case Bk:return 16;case EP:return 536870912;default:return 16}default:return 16}}var zl=null,KM=null,Lx=null;function NP(){if(Lx)return Lx;var i,e=KM,t=e.length,n,r="value"in zl?zl.value:zl.textContent,s=r.length;for(i=0;i<t&&e[i]===r[i];i++);var o=t-i;for(n=1;n<=o&&e[t-n]===r[s-n];n++);return Lx=r.slice(i,1<n?1-n:void 0)}function Bx(i){var e=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&e===13&&(i=13)):i=e,i===10&&(i=13),32<=i||i===13?i:0}function ng(){return!0}function XE(){return!1}function Ks(i){function e(t,n,r,s,o){this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in i)i.hasOwnProperty(a)&&(t=i[a],this[a]=t?t(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?ng:XE,this.isPropagationStopped=XE,this}return $n(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():typeof t.returnValue!="unknown"&&(t.returnValue=!1),this.isDefaultPrevented=ng)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():typeof t.cancelBubble!="unknown"&&(t.cancelBubble=!0),this.isPropagationStopped=ng)},persist:function(){},isPersistent:ng}),e}var sh={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qM=Ks(sh),Um=$n({},sh,{view:0,detail:0}),Xk=Ks(Um),q_,Z_,kh,Ly=$n({},Um,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ZM,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==kh&&(kh&&i.type==="mousemove"?(q_=i.screenX-kh.screenX,Z_=i.screenY-kh.screenY):Z_=q_=0,kh=i),q_)},movementY:function(i){return"movementY"in i?i.movementY:Z_}}),YE=Ks(Ly),Yk=$n({},Ly,{dataTransfer:0}),Jk=Ks(Yk),Kk=$n({},Um,{relatedTarget:0}),Q_=Ks(Kk),qk=$n({},sh,{animationName:0,elapsedTime:0,pseudoElement:0}),Zk=Ks(qk),Qk=$n({},sh,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),$k=Ks(Qk),eO=$n({},sh,{data:0}),JE=Ks(eO),tO={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},nO={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"},iO={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rO(i){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(i):(i=iO[i])?!!e[i]:!1}function ZM(){return rO}var sO=$n({},Um,{key:function(i){if(i.key){var e=tO[i.key]||i.key;if(e!=="Unidentified")return e}return i.type==="keypress"?(i=Bx(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?nO[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ZM,charCode:function(i){return i.type==="keypress"?Bx(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Bx(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),oO=Ks(sO),aO=$n({},Ly,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),KE=Ks(aO),lO=$n({},Um,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ZM}),cO=Ks(lO),uO=$n({},sh,{propertyName:0,elapsedTime:0,pseudoElement:0}),dO=Ks(uO),fO=$n({},Ly,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),hO=Ks(fO),pO=[9,13,27,32],QM=tl&&"CompositionEvent"in window,Ap=null;tl&&"documentMode"in document&&(Ap=document.documentMode);var mO=tl&&"TextEvent"in window&&!Ap,kP=tl&&(!QM||Ap&&8<Ap&&11>=Ap),qE=" ",ZE=!1;function OP(i,e){switch(i){case"keyup":return pO.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function UP(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var ef=!1;function gO(i,e){switch(i){case"compositionend":return UP(e);case"keypress":return e.which!==32?null:(ZE=!0,qE);case"textInput":return i=e.data,i===qE&&ZE?null:i;default:return null}}function xO(i,e){if(ef)return i==="compositionend"||!QM&&OP(i,e)?(i=NP(),Lx=KM=zl=null,ef=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return kP&&e.locale!=="ko"?null:e.data;default:return null}}var vO={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 QE(i){var e=i&&i.nodeName&&i.nodeName.toLowerCase();return e==="input"?!!vO[i.type]:e==="textarea"}function zP(i,e,t,n){xP(n),e=lv(e,"onChange"),0<e.length&&(t=new qM("onChange","change",null,t,n),i.push({event:t,listeners:e}))}var wp=null,rm=null;function yO(i){ZP(i,0)}function By(i){var e=rf(i);if(uP(e))return i}function _O(i,e){if(i==="change")return e}var HP=!1;if(tl){var $_;if(tl){var e2="oninput"in document;if(!e2){var $E=document.createElement("div");$E.setAttribute("oninput","return;"),e2=typeof $E.oninput=="function"}$_=e2}else $_=!1;HP=$_&&(!document.documentMode||9<document.documentMode)}function eC(){wp&&(wp.detachEvent("onpropertychange",GP),rm=wp=null)}function GP(i){if(i.propertyName==="value"&&By(rm)){var e=[];zP(e,rm,i,WM(i)),SP(yO,e)}}function SO(i,e,t){i==="focusin"?(eC(),wp=e,rm=t,wp.attachEvent("onpropertychange",GP)):i==="focusout"&&eC()}function bO(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return By(rm)}function MO(i,e){if(i==="click")return By(e)}function AO(i,e){if(i==="input"||i==="change")return By(e)}function wO(i,e){return i===e&&(i!==0||1/i===1/e)||i!==i&&e!==e}var Vo=typeof Object.is=="function"?Object.is:wO;function sm(i,e){if(Vo(i,e))return!0;if(typeof i!="object"||i===null||typeof e!="object"||e===null)return!1;var t=Object.keys(i),n=Object.keys(e);if(t.length!==n.length)return!1;for(n=0;n<t.length;n++){var r=t[n];if(!YS.call(e,r)||!Vo(i[r],e[r]))return!1}return!0}function tC(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function nC(i,e){var t=tC(i);i=0;for(var n;t;){if(t.nodeType===3){if(n=i+t.textContent.length,i<=e&&n>=e)return{node:t,offset:e-i};i=n}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=tC(t)}}function jP(i,e){return i&&e?i===e?!0:i&&i.nodeType===3?!1:e&&e.nodeType===3?jP(i,e.parentNode):"contains"in i?i.contains(e):i.compareDocumentPosition?!!(i.compareDocumentPosition(e)&16):!1:!1}function WP(){for(var i=window,e=tv();e instanceof i.HTMLIFrameElement;){try{var t=typeof e.contentWindow.location.href=="string"}catch{t=!1}if(t)i=e.contentWindow;else break;e=tv(i.document)}return e}function $M(i){var e=i&&i.nodeName&&i.nodeName.toLowerCase();return e&&(e==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||e==="textarea"||i.contentEditable==="true")}function TO(i){var e=WP(),t=i.focusedElem,n=i.selectionRange;if(e!==t&&t&&t.ownerDocument&&jP(t.ownerDocument.documentElement,t)){if(n!==null&&$M(t)){if(e=n.start,i=n.end,i===void 0&&(i=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(i,t.value.length);else if(i=(e=t.ownerDocument||document)&&e.defaultView||window,i.getSelection){i=i.getSelection();var r=t.textContent.length,s=Math.min(n.start,r);n=n.end===void 0?s:Math.min(n.end,r),!i.extend&&s>n&&(r=n,n=s,s=r),r=nC(t,s);var o=nC(t,n);r&&o&&(i.rangeCount!==1||i.anchorNode!==r.node||i.anchorOffset!==r.offset||i.focusNode!==o.node||i.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(r.node,r.offset),i.removeAllRanges(),s>n?(i.addRange(e),i.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),i.addRange(e)))}}for(e=[],i=t;i=i.parentNode;)i.nodeType===1&&e.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t<e.length;t++)i=e[t],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var EO=tl&&"documentMode"in document&&11>=document.documentMode,tf=null,fb=null,Tp=null,hb=!1;
vendor: 4,703 bytes, line 37
37function iC(i,e,t){var n=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;hb||tf==null||tf!==tv(n)||(n=tf,"selectionStart"in n&&$M(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Tp&&sm(Tp,n)||(Tp=n,n=lv(fb,"onSelect"),0<n.length&&(e=new qM("onSelect","select",null,e,t),i.push({event:e,listeners:n}),e.target=tf)))}function ig(i,e){var t={};return t[i.toLowerCase()]=e.toLowerCase(),t["Webkit"+i]="webkit"+e,t["Moz"+i]="moz"+e,t}var nf={animationend:ig("Animation","AnimationEnd"),animationiteration:ig("Animation","AnimationIteration"),animationstart:ig("Animation","AnimationStart"),transitionend:ig("Transition","TransitionEnd")},t2={},VP={};tl&&(VP=document.createElement("div").style,"AnimationEvent"in window||(delete nf.animationend.animation,delete nf.animationiteration.animation,delete nf.animationstart.animation),"TransitionEvent"in window||delete nf.transitionend.transition);function Dy(i){if(t2[i])return t2[i];if(!nf[i])return i;var e=nf[i],t;for(t in e)if(e.hasOwnProperty(t)&&t in VP)return t2[i]=e[t];return i}var XP=Dy("animationend"),YP=Dy("animationiteration"),JP=Dy("animationstart"),KP=Dy("transitionend"),qP=new Map,rC="abort auxClick 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(" ");function Sc(i,e){qP.set(i,e),Qu(e,[i])}for(var n2=0;n2<rC.length;n2++){var i2=rC[n2],CO=i2.toLowerCase(),RO=i2[0].toUpperCase()+i2.slice(1);Sc(CO,"on"+RO)}Sc(XP,"onAnimationEnd");Sc(YP,"onAnimationIteration");Sc(JP,"onAnimationStart");Sc("dblclick","onDoubleClick");Sc("focusin","onFocus");Sc("focusout","onBlur");Sc(KP,"onTransitionEnd");Bf("onMouseEnter",["mouseout","mouseover"]);Bf("onMouseLeave",["mouseout","mouseover"]);Bf("onPointerEnter",["pointerout","pointerover"]);Bf("onPointerLeave",["pointerout","pointerover"]);Qu("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Qu("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Qu("onBeforeInput",["compositionend","keypress","textInput","paste"]);Qu("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Qu("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Qu("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var dp="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(" "),PO=new Set("cancel close invalid load scroll toggle".split(" ").concat(dp));function sC(i,e,t){var n=i.type||"unknown-event";i.currentTarget=t,Ck(n,e,void 0,i),i.currentTarget=null}function ZP(i,e){e=(e&4)!==0;for(var t=0;t<i.length;t++){var n=i[t],r=n.event;n=n.listeners;e:{var s=void 0;if(e)for(var o=n.length-1;0<=o;o--){var a=n[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&r.isPropagationStopped())break e;sC(r,a,c),s=l}else for(o=0;o<n.length;o++){if(a=n[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&r.isPropagationStopped())break e;sC(r,a,c),s=l}}}if(iv)throw i=lb,iv=!1,lb=null,i}function Nn(i,e){var t=e[vb];t===void 0&&(t=e[vb]=new Set);var n=i+"__bubble";t.has(n)||(QP(e,i,2,!1),t.add(n))}function r2(i,e,t){var n=0;e&&(n|=4),QP(t,i,n,e)}var rg="_reactListening"+Math.random().toString(36).slice(2);function om(i){if(!i[rg]){i[rg]=!0,sP.forEach(function(t){t!=="selectionchange"&&(PO.has(t)||r2(t,!1,i),r2(t,!0,i))});var e=i.nodeType===9?i:i.ownerDocument;e===null||e[rg]||(e[rg]=!0,r2("selectionchange",!1,e))}}function QP(i,e,t,n){switch(FP(e)){case 1:var r=Wk;break;case 4:r=Vk;break;default:r=JM}t=r.bind(null,e,t,i),r=void 0,!ab||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(r=!0),n?r!==void 0?i.addEventListener(e,t,{capture:!0,passive:r}):i.addEventListener(e,t,!0):r!==void 0?i.addEventListener(e,t,{passive:r}):i.addEventListener(e,t,!1)}function s2(i,e,t,n,r){var s=n;
vendor: 10,998 bytes, lines 37-38
37if(!(e&1)&&!(e&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var a=n.stateNode.containerInfo;if(a===r||a.nodeType===8&&a.parentNode===r)break;if(o===4)for(o=n.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===r||l.nodeType===8&&l.parentNode===r))return;o=o.return}for(;a!==null;){if(o=fu(a),o===null)return;if(l=o.tag,l===5||l===6){n=s=o;continue e}a=a.parentNode}}n=n.return}SP(function(){var c=s,u=WM(t),d=[];e:{var p=qP.get(i);if(p!==void 0){var m=qM,x=i;switch(i){case"keypress":if(Bx(t)===0)break e;case"keydown":case"keyup":m=oO;break;case"focusin":x="focus",m=Q_;break;case"focusout":x="blur",m=Q_;break;case"beforeblur":case"afterblur":m=Q_;break;case"click":if(t.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=YE;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=Jk;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=cO;break;case XP:case YP:case JP:m=Zk;break;case KP:m=dO;break;case"scroll":m=Xk;break;case"wheel":m=hO;break;case"copy":case"cut":case"paste":m=$k;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=KE}var v=(e&4)!==0,_=!v&&i==="scroll",g=v?p!==null?p+"Capture":null:p;v=[];for(var S=c,b;S!==null;){b=S;var A=b.stateNode;if(b.tag===5&&A!==null&&(b=A,g!==null&&(A=em(S,g),A!=null&&v.push(am(S,A,b)))),_)break;S=S.return}0<v.length&&(p=new m(p,x,null,t,u),d.push({event:p,listeners:v}))}}if(!(e&7)){e:{if(p=i==="mouseover"||i==="pointerover",m=i==="mouseout"||i==="pointerout",p&&t!==sb&&(x=t.relatedTarget||t.fromElement)&&(fu(x)||x[nl]))break e;if((m||p)&&(p=u.window===u?u:(p=u.ownerDocument)?p.defaultView||p.parentWindow:window,m?(x=t.relatedTarget||t.toElement,m=c,x=x?fu(x):null,x!==null&&(_=$u(x),x!==_||x.tag!==5&&x.tag!==6)&&(x=null)):(m=null,x=c),m!==x)){if(v=YE,A="onMouseLeave",g="onMouseEnter",S="mouse",(i==="pointerout"||i==="pointerover")&&(v=KE,A="onPointerLeave",g="onPointerEnter",S="pointer"),_=m==null?p:rf(m),b=x==null?p:rf(x),p=new v(A,S+"leave",m,t,u),p.target=_,p.relatedTarget=b,A=null,fu(u)===c&&(v=new v(g,S+"enter",x,t,u),v.target=b,v.relatedTarget=_,A=v),_=A,m&&x)t:{for(v=m,g=x,S=0,b=v;b;b=_d(b))S++;for(b=0,A=g;A;A=_d(A))b++;for(;0<S-b;)v=_d(v),S--;for(;0<b-S;)g=_d(g),b--;for(;S--;){if(v===g||g!==null&&v===g.alternate)break t;v=_d(v),g=_d(g)}v=null}else v=null;m!==null&&oC(d,p,m,v,!1),x!==null&&_!==null&&oC(d,_,x,v,!0)}}e:{if(p=c?rf(c):window,m=p.nodeName&&p.nodeName.toLowerCase(),m==="select"||m==="input"&&p.type==="file")var w=_O;else if(QE(p))if(HP)w=AO;else{w=bO;var C=SO}else(m=p.nodeName)&&m.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(w=MO);if(w&&(w=w(i,c))){zP(d,w,t,u);break e}C&&C(i,p,c),i==="focusout"&&(C=p._wrapperState)&&C.controlled&&p.type==="number"&&eb(p,"number",p.value)}switch(C=c?rf(c):window,i){case"focusin":(QE(C)||C.contentEditable==="true")&&(tf=C,fb=c,Tp=null);break;case"focusout":Tp=fb=tf=null;break;case"mousedown":hb=!0;break;case"contextmenu":case"mouseup":case"dragend":hb=!1,iC(d,t,u);break;case"selectionchange":if(EO)break;case"keydown":case"keyup":iC(d,t,u)}var P;if(QM)e:{switch(i){case"compositionstart":var B="onCompositionStart";break e;case"compositionend":B="onCompositionEnd";break e;case"compositionupdate":B="onCompositionUpdate";break e}B=void 0}else ef?OP(i,t)&&(B="onCompositionEnd"):i==="keydown"&&t.keyCode===229&&(B="onCompositionStart");B&&(kP&&t.locale!=="ko"&&(ef||B!=="onCompositionStart"?B==="onCompositionEnd"&&ef&&(P=NP()):(zl=u,KM="value"in zl?zl.value:zl.textContent,ef=!0)),C=lv(c,B),0<C.length&&(B=new JE(B,i,null,t,u),d.push({event:B,listeners:C}),P?B.data=P:(P=UP(t),P!==null&&(B.data=P)))),(P=mO?gO(i,t):xO(i,t))&&(c=lv(c,"onBeforeInput"),0<c.length&&(u=new JE("onBeforeInput","beforeinput",null,t,u),d.push({event:u,listeners:c}),u.data=P))}ZP(d,e)})}function am(i,e,t){return{instance:i,listener:e,currentTarget:t}}function lv(i,e){for(var t=e+"Capture",n=[];i!==null;){var r=i,s=r.stateNode;r.tag===5&&s!==null&&(r=s,s=em(i,t),s!=null&&n.unshift(am(i,s,r)),s=em(i,e),s!=null&&n.push(am(i,s,r))),i=i.return}return n}function _d(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function oC(i,e,t,n,r){for(var s=e._reactName,o=[];t!==null&&t!==n;){var a=t,l=a.alternate,c=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&c!==null&&(a=c,r?(l=em(t,s),l!=null&&o.unshift(am(t,l,a))):r||(l=em(t,s),l!=null&&o.push(am(t,l,a)))),t=t.return}o.length!==0&&i.push({event:e,listeners:o})}var IO=/\r\n?/g,LO=/\u0000|\uFFFD/g;function aC(i){return(typeof i=="string"?i:""+i).replace(IO,` 38`).replace(LO,"")}function sg(i,e,t){if(e=aC(e),aC(i)!==e&&t)throw Error(Ze(425))}function cv(){}var pb=null,mb=null;function gb(i,e){return i==="textarea"||i==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var xb=typeof setTimeout=="function"?setTimeout:void 0,BO=typeof clearTimeout=="function"?clearTimeout:void 0,lC=typeof Promise=="function"?Promise:void 0,DO=typeof queueMicrotask=="function"?queueMicrotask:typeof lC<"u"?function(i){return lC.resolve(null).then(i).catch(FO)}:xb;function FO(i){setTimeout(function(){throw i})}function o2(i,e){var t=e,n=0;do{var r=t.nextSibling;if(i.removeChild(t),r&&r.nodeType===8)if(t=r.data,t==="/$"){if(n===0){i.removeChild(r),im(e);return}n--}else t!=="$"&&t!=="$?"&&t!=="$!"||n++;t=r}while(t);im(e)}function ec(i){for(;i!=null;i=i.nextSibling){var e=i.nodeType;if(e===1||e===3)break;if(e===8){if(e=i.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return i}function cC(i){i=i.previousSibling;for(var e=0;i;){if(i.nodeType===8){var t=i.data;if(t==="$"||t==="$!"||t==="$?"){if(e===0)return i;e--}else t==="/$"&&e++}i=i.previousSibling}return null}var oh=Math.random().toString(36).slice(2),ua="__reactFiber$"+oh,lm="__reactProps$"+oh,nl="__reactContainer$"+oh,vb="__reactEvents$"+oh,NO="__reactListeners$"+oh,kO="__reactHandles$"+oh;function fu(i){var e=i[ua];if(e)return e;for(var t=i.parentNode;t;){if(e=t[nl]||t[ua]){if(t=e.alternate,e.child!==null||t!==null&&t.child!==null)for(i=cC(i);i!==null;){if(t=i[ua])return t;i=cC(i)}return e}i=t,t=i.parentNode}return null}function zm(i){return i=i[ua]||i[nl],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function rf(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(Ze(33))}function Fy(i){return i[lm]||null}var yb=[],sf=-1;function bc(i){return{current:i}}function kn(i){0>sf||(i.current=yb[sf],yb[sf]=null,sf--)}function Ln(i,e){sf++,yb[sf]=i.current,i.current=e}var fc={},wr=bc(fc),ls=bc(!1),Nu=fc;function Df(i,e){var t=i.type.contextTypes;if(!t)return fc;var n=i.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var r={},s;for(s in t)r[s]=e[s];return n&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=e,i.__reactInternalMemoizedMaskedChildContext=r),r}function cs(i){return i=i.childContextTypes,i!=null}function uv(){kn(ls),kn(wr)}function uC(i,e,t){if(wr.current!==fc)throw Error(Ze(168));Ln(wr,e),Ln(ls,t)}function $P(i,e,t){var n=i.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return t;n=n.getChildContext();for(var r in n)if(!(r in e))throw Error(Ze(108,Sk(i)||"Unknown",r));return $n({},t,n)}function dv(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||fc,Nu=wr.current,Ln(wr,i),Ln(ls,ls.current),!0}function dC(i,e,t){var n=i.stateNode;if(!n)throw Error(Ze(169));t?(i=$P(i,e,Nu),n.__reactInternalMemoizedMergedChildContext=i,kn(ls),kn(wr),Ln(wr,i)):kn(ls),Ln(ls,t)}var Ga=null,Ny=!1,a2=!1;function eI(i){Ga===null?Ga=[i]:Ga.push(i)}function OO(i){Ny=!0,eI(i)}function Mc(){if(!a2&&Ga!==null){a2=!0;var i=0,e=Mn;try{var t=Ga;for(Mn=1;i<t.length;i++){var n=t[i];do n=n(!0);while(n!==null)}Ga=null,Ny=!1}catch(r){throw Ga!==null&&(Ga=Ga.slice(i+1)),wP(VM,Mc),r}finally{Mn=e,a2=!1}}return null}var of=[],af=0,fv=null,hv=0,co=[],uo=0,ku=null,Ya=1,Ja="";function ru(i,e){of[af++]=hv,of[af++]=fv,fv=i,hv=e}function tI(i,e,t){co[uo++]=Ya,co[uo++]=Ja,co[uo++]=ku,ku=i;var n=Ya;i=Ja;var r=32-Ho(n)-1;n&=~(1<<r),t+=1;var s=32-Ho(e)+r;if(30<s){var o=r-r%5;s=(n&(1<<o)-1).toString(32),n>>=o,r-=o,Ya=1<<32-Ho(e)+r|t<<r|n,Ja=s+i}else Ya=1<<s|t<<r|n,Ja=i}function eA(i){i.return!==null&&(ru(i,1),tI(i,1,0))}function tA(i){for(;i===fv;)fv=of[--af],of[af]=null,hv=of[--af],of[af]=null;for(;i===ku;)ku=co[--uo],co[uo]=null,Ja=co[--uo],co[uo]=null,Ya=co[--uo],co[uo]=null}var Os=null,Ls=null,zn=!1,ko=null;function nI(i,e){var t=po(5,null,null,0);t.elementType="DELETED",t.stateNode=e,t.return=i,e=i.deletions,e===null?(i.deletions=[t],i.flags|=16):e.push(t)}function fC(i,e){switch(i.tag){case 5:var t=i.type;return e=e.nodeType!==1||t.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(i.stateNode=e,Os=i,Ls=ec(e.firstChild),!0):!1;case 6:return e=i.pendingProps===""||e.nodeType!==3?null:e,e!==null?(i.stateNode=e,Os=i,Ls=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(t=ku!==null?{id:Ya,overflow:Ja}:null,i.memoizedState={dehydrated:e,treeContext:t,retryLane:1073741824},t=po(18,null,null,0),t.stateNode=e,t.return=i,i.child=t,Os=i,Ls=null,!0):!1;default:return!1}}function _b(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Sb(i){if(zn){var e=Ls;if(e){var t=e;if(!fC(i,e)){if(_b(i))throw Error(Ze(418));e=ec(t.nextSibling);var n=Os;e&&fC(i,e)?nI(n,t):(i.flags=i.flags&-4097|2,zn=!1,Os=i)}}else{if(_b(i))throw Error(Ze(418));i.flags=i.flags&-4097|2,zn=!1,Os=i}}}function hC(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Os=i}function og(i){if(i!==Os)return!1;if(!zn)return hC(i),zn=!0,!1;var e;if((e=i.tag!==3)&&!(e=i.tag!==5)&&(e=i.type,e=e!=="head"&&e!=="body"&&!gb(i.type,i.memoizedProps)),e&&(e=Ls)){if(_b(i))throw iI(),Error(Ze(418));for(;e;)nI(i,e),e=ec(e.nextSibling)}if(hC(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(Ze(317));e:{for(i=i.nextSibling,e=0;i;){if(i.nodeType===8){var t=i.data;if(t==="/$"){if(e===0){Ls=ec(i.nextSibling);break e}e--}else t!=="$"&&t!=="$!"&&t!=="$?"||e++}i=i.nextSibling}Ls=null}}else Ls=Os?ec(i.stateNode.nextSibling):null;return!0}function iI(){for(var i=Ls;i;)i=ec(i.nextSibling)}function Ff(){Ls=Os=null,zn=!1}function nA(i){ko===null?ko=[i]:ko.push(i)}var UO=ul.ReactCurrentBatchConfig;function Oh(i,e,t){if(i=t.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(t._owner){if(t=t._owner,t){if(t.tag!==1)throw Error(Ze(309));var n=t.stateNode}if(!n)throw Error(Ze(147,i));var r=n,s=""+i;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===s?e.ref:(e=function(o){var a=r.refs;o===null?delete a[s]:a[s]=o},e._stringRef=s,e)}
vendor: 5,151 bytes, line 38
38if(typeof i!="string")throw Error(Ze(284));if(!t._owner)throw Error(Ze(290,i))}return i}function ag(i,e){throw i=Object.prototype.toString.call(e),Error(Ze(31,i==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":i))}function pC(i){var e=i._init;return e(i._payload)}function rI(i){function e(g,S){if(i){var b=g.deletions;b===null?(g.deletions=[S],g.flags|=16):b.push(S)}}function t(g,S){if(!i)return null;for(;S!==null;)e(g,S),S=S.sibling;return null}function n(g,S){for(g=new Map;S!==null;)S.key!==null?g.set(S.key,S):g.set(S.index,S),S=S.sibling;return g}function r(g,S){return g=rc(g,S),g.index=0,g.sibling=null,g}function s(g,S,b){return g.index=b,i?(b=g.alternate,b!==null?(b=b.index,b<S?(g.flags|=2,S):b):(g.flags|=2,S)):(g.flags|=1048576,S)}function o(g){return i&&g.alternate===null&&(g.flags|=2),g}function a(g,S,b,A){return S===null||S.tag!==6?(S=p2(b,g.mode,A),S.return=g,S):(S=r(S,b),S.return=g,S)}function l(g,S,b,A){var w=b.type;return w===$d?u(g,S,b.props.children,A,b.key):S!==null&&(S.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Fl&&pC(w)===S.type)?(A=r(S,b.props),A.ref=Oh(g,S,b),A.return=g,A):(A=zx(b.type,b.key,b.props,null,g.mode,A),A.ref=Oh(g,S,b),A.return=g,A)}function c(g,S,b,A){return S===null||S.tag!==4||S.stateNode.containerInfo!==b.containerInfo||S.stateNode.implementation!==b.implementation?(S=m2(b,g.mode,A),S.return=g,S):(S=r(S,b.children||[]),S.return=g,S)}function u(g,S,b,A,w){return S===null||S.tag!==7?(S=Au(b,g.mode,A,w),S.return=g,S):(S=r(S,b),S.return=g,S)}function d(g,S,b){if(typeof S=="string"&&S!==""||typeof S=="number")return S=p2(""+S,g.mode,b),S.return=g,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case q0:return b=zx(S.type,S.key,S.props,null,g.mode,b),b.ref=Oh(g,null,S),b.return=g,b;case Qd:return S=m2(S,g.mode,b),S.return=g,S;case Fl:var A=S._init;return d(g,A(S._payload),b)}if(cp(S)||Bh(S))return S=Au(S,g.mode,b,null),S.return=g,S;ag(g,S)}return null}function p(g,S,b,A){var w=S!==null?S.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return w!==null?null:a(g,S,""+b,A);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case q0:return b.key===w?l(g,S,b,A):null;case Qd:return b.key===w?c(g,S,b,A):null;case Fl:return w=b._init,p(g,S,w(b._payload),A)}if(cp(b)||Bh(b))return w!==null?null:u(g,S,b,A,null);ag(g,b)}return null}function m(g,S,b,A,w){if(typeof A=="string"&&A!==""||typeof A=="number")return g=g.get(b)||null,a(S,g,""+A,w);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case q0:return g=g.get(A.key===null?b:A.key)||null,l(S,g,A,w);case Qd:return g=g.get(A.key===null?b:A.key)||null,c(S,g,A,w);case Fl:var C=A._init;return m(g,S,b,C(A._payload),w)}if(cp(A)||Bh(A))return g=g.get(b)||null,u(S,g,A,w,null);ag(S,A)}return null}function x(g,S,b,A){for(var w=null,C=null,P=S,B=S=0,R=null;P!==null&&B<b.length;B++){P.index>B?(R=P,P=null):R=P.sibling;var E=p(g,P,b[B],A);if(E===null){P===null&&(P=R);break}i&&P&&E.alternate===null&&e(g,P),S=s(E,S,B),C===null?w=E:C.sibling=E,C=E,P=R}if(B===b.length)return t(g,P),zn&&ru(g,B),w;if(P===null){for(;B<b.length;B++)P=d(g,b[B],A),P!==null&&(S=s(P,S,B),C===null?w=P:C.sibling=P,C=P);return zn&&ru(g,B),w}for(P=n(g,P);B<b.length;B++)R=m(P,g,B,b[B],A),R!==null&&(i&&R.alternate!==null&&P.delete(R.key===null?B:R.key),S=s(R,S,B),C===null?w=R:C.sibling=R,C=R);return i&&P.forEach(function(L){return e(g,L)}),zn&&ru(g,B),w}function v(g,S,b,A){var w=Bh(b);if(typeof w!="function")throw Error(Ze(150));if(b=w.call(b),b==null)throw Error(Ze(151));for(var C=w=null,P=S,B=S=0,R=null,E=b.next();P!==null&&!E.done;B++,E=b.next()){P.index>B?(R=P,P=null):R=P.sibling;var L=p(g,P,E.value,A);if(L===null){P===null&&(P=R);break}i&&P&&L.alternate===null&&e(g,P),S=s(L,S,B),C===null?w=L:C.sibling=L,C=L,P=R}if(E.done)return t(g,P),zn&&ru(g,B),w;if(P===null){for(;!E.done;B++,E=b.next())E=d(g,E.value,A),E!==null&&(S=s(E,S,B),C===null?w=E:C.sibling=E,C=E);return zn&&ru(g,B),w}for(P=n(g,P);!E.done;B++,E=b.next())E=m(P,g,B,E.value,A),E!==null&&(i&&E.alternate!==null&&P.delete(E.key===null?B:E.key),S=s(E,S,B),C===null?w=E:C.sibling=E,C=E);return i&&P.forEach(function(N){return e(g,N)}),zn&&ru(g,B),w}function _(g,S,b,A){if(typeof b=="object"&&b!==null&&b.type===$d&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case q0:e:{for(var w=b.key,C=S;C!==null;){if(C.key===w){if(w=b.type,w===$d){if(C.tag===7){t(g,C.sibling),S=r(C,b.props.children),S.return=g,g=S;break e}}else if(C.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Fl&&pC(w)===C.type){t(g,C.sibling),S=r(C,b.props),S.ref=Oh(g,C,b),S.return=g,g=S;break e}t(g,C);break}else e(g,C);C=C.sibling}b.type===$d?(S=Au(b.props.children,g.mode,A,b.key),S.return=g,g=S):(A=zx(b.type,b.key,b.props,null,g.mode,A),A.ref=Oh(g,S,b),A.return=g,g=A)}return o(g);case Qd:e:{for(C=b.key;S!==null;){if(S.key===C)if(S.tag===4&&S.stateNode.containerInfo===b.containerInfo&&S.stateNode.implementation===b.implementation){t(g,S.sibling),S=r(S,b.children||[]),S.return=g,g=S;break e}else{t(g,S);break}else e(g,S);S=S.sibling}S=m2(b,g.mode,A),S.return=g,g=S}return o(g);case Fl:return C=b._init,_(g,S,C(b._payload),A)}
vendor: 4,407 bytes, line 38
38if(cp(b))return x(g,S,b,A);if(Bh(b))return v(g,S,b,A);ag(g,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,S!==null&&S.tag===6?(t(g,S.sibling),S=r(S,b),S.return=g,g=S):(t(g,S),S=p2(b,g.mode,A),S.return=g,g=S),o(g)):t(g,S)}return _}var Nf=rI(!0),sI=rI(!1),pv=bc(null),mv=null,lf=null,iA=null;function rA(){iA=lf=mv=null}function sA(i){var e=pv.current;kn(pv),i._currentValue=e}function bb(i,e,t){for(;i!==null;){var n=i.alternate;if((i.childLanes&e)!==e?(i.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),i===t)break;i=i.return}}function Sf(i,e){mv=i,iA=lf=null,i=i.dependencies,i!==null&&i.firstContext!==null&&(i.lanes&e&&(os=!0),i.firstContext=null)}function yo(i){var e=i._currentValue;if(iA!==i)if(i={context:i,memoizedValue:e,next:null},lf===null){if(mv===null)throw Error(Ze(308));lf=i,mv.dependencies={lanes:0,firstContext:i}}else lf=lf.next=i;return e}var hu=null;function oA(i){hu===null?hu=[i]:hu.push(i)}function oI(i,e,t,n){var r=e.interleaved;return r===null?(t.next=t,oA(e)):(t.next=r.next,r.next=t),e.interleaved=t,il(i,n)}function il(i,e){i.lanes|=e;var t=i.alternate;for(t!==null&&(t.lanes|=e),t=i,i=i.return;i!==null;)i.childLanes|=e,t=i.alternate,t!==null&&(t.childLanes|=e),t=i,i=i.return;return t.tag===3?t.stateNode:null}var Nl=!1;function aA(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function aI(i,e){i=i.updateQueue,e.updateQueue===i&&(e.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function Za(i,e){return{eventTime:i,lane:e,tag:0,payload:null,callback:null,next:null}}function tc(i,e,t){var n=i.updateQueue;if(n===null)return null;if(n=n.shared,un&2){var r=n.pending;return r===null?e.next=e:(e.next=r.next,r.next=e),n.pending=e,il(i,t)}return r=n.interleaved,r===null?(e.next=e,oA(n)):(e.next=r.next,r.next=e),n.interleaved=e,il(i,t)}function Dx(i,e,t){if(e=e.updateQueue,e!==null&&(e=e.shared,(t&4194240)!==0)){var n=e.lanes;n&=i.pendingLanes,t|=n,e.lanes=t,XM(i,t)}}function mC(i,e){var t=i.updateQueue,n=i.alternate;if(n!==null&&(n=n.updateQueue,t===n)){var r=null,s=null;if(t=t.firstBaseUpdate,t!==null){do{var o={eventTime:t.eventTime,lane:t.lane,tag:t.tag,payload:t.payload,callback:t.callback,next:null};s===null?r=s=o:s=s.next=o,t=t.next}while(t!==null);s===null?r=s=e:s=s.next=e}else r=s=e;t={baseState:n.baseState,firstBaseUpdate:r,lastBaseUpdate:s,shared:n.shared,effects:n.effects},i.updateQueue=t;return}i=t.lastBaseUpdate,i===null?t.firstBaseUpdate=e:i.next=e,t.lastBaseUpdate=e}function gv(i,e,t,n){var r=i.updateQueue;Nl=!1;var s=r.firstBaseUpdate,o=r.lastBaseUpdate,a=r.shared.pending;if(a!==null){r.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var u=i.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(s!==null){var d=r.baseState;o=0,u=c=l=null,a=s;do{var p=a.lane,m=a.eventTime;if((n&p)===p){u!==null&&(u=u.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var x=i,v=a;switch(p=e,m=t,v.tag){case 1:if(x=v.payload,typeof x=="function"){d=x.call(m,d,p);break e}d=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=v.payload,p=typeof x=="function"?x.call(m,d,p):x,p==null)break e;d=$n({},d,p);break e;case 2:Nl=!0}}a.callback!==null&&a.lane!==0&&(i.flags|=64,p=r.effects,p===null?r.effects=[a]:p.push(a))}else m={eventTime:m,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=m,l=d):u=u.next=m,o|=p;if(a=a.next,a===null){if(a=r.shared.pending,a===null)break;p=a,a=p.next,p.next=null,r.lastBaseUpdate=p,r.shared.pending=null}}while(!0);if(u===null&&(l=d),r.baseState=l,r.firstBaseUpdate=c,r.lastBaseUpdate=u,e=r.shared.interleaved,e!==null){r=e;do o|=r.lane,r=r.next;while(r!==e)}else s===null&&(r.shared.lanes=0);Uu|=o,i.lanes=o,i.memoizedState=d}}function gC(i,e,t){if(i=e.effects,e.effects=null,i!==null)for(e=0;e<i.length;e++){var n=i[e],r=n.callback;if(r!==null){if(n.callback=null,n=t,typeof r!="function")throw Error(Ze(191,r));r.call(n)}}}var Hm={},xa=bc(Hm),cm=bc(Hm),um=bc(Hm);function pu(i){if(i===Hm)throw Error(Ze(174));return i}function lA(i,e){switch(Ln(um,e),Ln(cm,i),Ln(xa,Hm),i=e.nodeType,i){case 9:case 11:e=(e
vendor: 6,432 bytes, line 38
38=e.documentElement)?e.namespaceURI:nb(null,"");break;default:i=i===8?e.parentNode:e,e=i.namespaceURI||null,i=i.tagName,e=nb(e,i)}kn(xa),Ln(xa,e)}function kf(){kn(xa),kn(cm),kn(um)}function lI(i){pu(um.current);var e=pu(xa.current),t=nb(e,i.type);e!==t&&(Ln(cm,i),Ln(xa,t))}function cA(i){cm.current===i&&(kn(xa),kn(cm))}var Jn=bc(0);function xv(i){for(var e=i;e!==null;){if(e.tag===13){var t=e.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||t.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===i)break;for(;e.sibling===null;){if(e.return===null||e.return===i)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var l2=[];function uA(){for(var i=0;i<l2.length;i++)l2[i]._workInProgressVersionPrimary=null;l2.length=0}var Fx=ul.ReactCurrentDispatcher,c2=ul.ReactCurrentBatchConfig,Ou=0,Qn=null,Ii=null,Xi=null,vv=!1,Ep=!1,dm=0,zO=0;function hr(){throw Error(Ze(321))}function dA(i,e){if(e===null)return!1;for(var t=0;t<e.length&&t<i.length;t++)if(!Vo(i[t],e[t]))return!1;return!0}function fA(i,e,t,n,r,s){if(Ou=s,Qn=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Fx.current=i===null||i.memoizedState===null?WO:VO,i=t(n,r),Ep){s=0;do{if(Ep=!1,dm=0,25<=s)throw Error(Ze(301));s+=1,Xi=Ii=null,e.updateQueue=null,Fx.current=XO,i=t(n,r)}while(Ep)}if(Fx.current=yv,e=Ii!==null&&Ii.next!==null,Ou=0,Xi=Ii=Qn=null,vv=!1,e)throw Error(Ze(300));return i}function hA(){var i=dm!==0;return dm=0,i}function oa(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xi===null?Qn.memoizedState=Xi=i:Xi=Xi.next=i,Xi}function _o(){if(Ii===null){var i=Qn.alternate;i=i!==null?i.memoizedState:null}else i=Ii.next;var e=Xi===null?Qn.memoizedState:Xi.next;if(e!==null)Xi=e,Ii=i;else{if(i===null)throw Error(Ze(310));Ii=i,i={memoizedState:Ii.memoizedState,baseState:Ii.baseState,baseQueue:Ii.baseQueue,queue:Ii.queue,next:null},Xi===null?Qn.memoizedState=Xi=i:Xi=Xi.next=i}return Xi}function fm(i,e){return typeof e=="function"?e(i):e}function u2(i){var e=_o(),t=e.queue;if(t===null)throw Error(Ze(311));t.lastRenderedReducer=i;var n=Ii,r=n.baseQueue,s=t.pending;if(s!==null){if(r!==null){var o=r.next;r.next=s.next,s.next=o}n.baseQueue=r=s,t.pending=null}if(r!==null){s=r.next,n=n.baseState;var a=o=null,l=null,c=s;do{var u=c.lane;if((Ou&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:i(n,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,o=n):l=l.next=d,Qn.lanes|=u,Uu|=u}c=c.next}while(c!==null&&c!==s);l===null?o=n:l.next=a,Vo(n,e.memoizedState)||(os=!0),e.memoizedState=n,e.baseState=o,e.baseQueue=l,t.lastRenderedState=n}if(i=t.interleaved,i!==null){r=i;do s=r.lane,Qn.lanes|=s,Uu|=s,r=r.next;while(r!==i)}else r===null&&(t.lanes=0);return[e.memoizedState,t.dispatch]}function d2(i){var e=_o(),t=e.queue;if(t===null)throw Error(Ze(311));t.lastRenderedReducer=i;var n=t.dispatch,r=t.pending,s=e.memoizedState;if(r!==null){t.pending=null;var o=r=r.next;do s=i(s,o.action),o=o.next;while(o!==r);Vo(s,e.memoizedState)||(os=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),t.lastRenderedState=s}return[s,n]}function cI(){}function uI(i,e){var t=Qn,n=_o(),r=e(),s=!Vo(n.memoizedState,r);if(s&&(n.memoizedState=r,os=!0),n=n.queue,pA(hI.bind(null,t,n,i),[i]),n.getSnapshot!==e||s||Xi!==null&&Xi.memoizedState.tag&1){if(t.flags|=2048,hm(9,fI.bind(null,t,n,r,e),void 0,null),Yi===null)throw Error(Ze(349));Ou&30||dI(t,e,r)}return r}function dI(i,e,t){i.flags|=16384,i={getSnapshot:e,value:t},e=Qn.updateQueue,e===null?(e={lastEffect:null,stores:null},Qn.updateQueue=e,e.stores=[i]):(t=e.stores,t===null?e.stores=[i]:t.push(i))}function fI(i,e,t,n){e.value=t,e.getSnapshot=n,pI(e)&&mI(i)}function hI(i,e,t){return t(function(){pI(e)&&mI(i)})}function pI(i){var e=i.getSnapshot;i=i.value;try{var t=e();return!Vo(i,t)}catch{return!0}}function mI(i){var e=il(i,1);e!==null&&Go(e,i,1,-1)}function xC(i){var e=oa();return typeof i=="function"&&(i=i()),e.memoizedState=e.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:fm,lastRenderedState:i},e.queue=i,i=i.dispatch=jO.bind(null,Qn,i),[e.memoizedState,i]}function hm(i,e,t,n){return i={tag:i,create:e,destroy:t,deps:n,next:null},e=Qn.updateQueue,e===null?(e={lastEffect:null,stores:null},Qn.updateQueue=e,e.lastEffect=i.next=i):(t=e.lastEffect,t===null?e.lastEffect=i.next=i:(n=t.next,t.next=i,i.next=n,e.lastEffect=i)),i}function gI(){return _o().memoizedState}function Nx(i,e,t,n){var r=oa();Qn.flags|=i,r.memoizedState=hm(1|e,t,void 0,n===void 0?null:n)}function ky(i,e,t,n){var r=_o();n=n===void 0?null:n;var s=void 0;if(Ii!==null){var o=Ii.memoizedState;if(s=o.destroy,n!==null&&dA(n,o.deps)){r.memoizedState=hm(e,t,s,n);return}}Qn.flags|=i,r.memoizedState=hm(1|e,t,s,n)}function vC(i,e){return Nx(8390656,8,i,e)}function pA(i,e){return ky(2048,8,i,e)}function xI(i,e){return ky(4,2,i,e)}function vI(i,e){return ky(4,4,i,e)}function yI(i,e){if(typeof e=="function")return i=i(),e(i),function(){e(null)};if(e!=null)return i=i(),e.current=i,function(){e.current=null}}function _I(i,e,t){return t=t!=null?t.concat([i]):null,ky(4,4,yI.bind(null,e,i),t)}function mA(){}function SI(i,e){var t=_o();e=e===void 0?null:e;var n=t.memoizedState;return n!==null&&e!==null&&dA(e,n[1])?n[0]:(t.memoizedState=[i,e],i)}function bI(i,e){var t=_o();e=e===void 0?null:e;var n=t.memoizedState;return n!==null&&e!==null&&dA(e,n[1])?n[0]:(i=i(),t.memoizedState=[i,e],i)}function MI(i,e,t){return Ou&21?(Vo(t,e)||(t=CP(),Qn.lanes|=t,Uu|=t,i.baseState=!0),e):(i.baseState&&(i.baseState=!1,os=!0),i.memoizedState=t)}function HO(i,e){var t=Mn;Mn=t!==0&&4>t?t:4,i(!0);var n=c2.transition;c2.transition={};try{i(!1),e()}finally{Mn=t,c2.transition=n}}function AI(){return _o().memoizedState}function GO(i,e,t){var n=ic(i);if(t={lane:n,action:t,hasEagerState:!1,eagerState:null,next:null},wI(i))TI(e,t);else if(t=oI(i,e,t,n),t!==null){var r=Yr();Go(t,i,n,r),EI(t,e,n)}}function jO(i,e,t){var n=ic(i),r={lane:n,action:t,hasEagerState:!1,eagerState:null,next:null};if(wI(i))TI(e,r);else{var s=i.alternate;if(i.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,t);
vendor: 7,216 bytes, lines 38-40
38if(r.hasEagerState=!0,r.eagerState=a,Vo(a,o)){var l=e.interleaved;l===null?(r.next=r,oA(e)):(r.next=l.next,l.next=r),e.interleaved=r;return}}catch{}finally{}t=oI(i,e,r,n),t!==null&&(r=Yr(),Go(t,i,n,r),EI(t,e,n))}}function wI(i){var e=i.alternate;return i===Qn||e!==null&&e===Qn}function TI(i,e){Ep=vv=!0;var t=i.pending;t===null?e.next=e:(e.next=t.next,t.next=e),i.pending=e}function EI(i,e,t){if(t&4194240){var n=e.lanes;n&=i.pendingLanes,t|=n,e.lanes=t,XM(i,t)}}var yv={readContext:yo,useCallback:hr,useContext:hr,useEffect:hr,useImperativeHandle:hr,useInsertionEffect:hr,useLayoutEffect:hr,useMemo:hr,useReducer:hr,useRef:hr,useState:hr,useDebugValue:hr,useDeferredValue:hr,useTransition:hr,useMutableSource:hr,useSyncExternalStore:hr,useId:hr,unstable_isNewReconciler:!1},WO={readContext:yo,useCallback:function(i,e){return oa().memoizedState=[i,e===void 0?null:e],i},useContext:yo,useEffect:vC,useImperativeHandle:function(i,e,t){return t=t!=null?t.concat([i]):null,Nx(4194308,4,yI.bind(null,e,i),t)},useLayoutEffect:function(i,e){return Nx(4194308,4,i,e)},useInsertionEffect:function(i,e){return Nx(4,2,i,e)},useMemo:function(i,e){var t=oa();return e=e===void 0?null:e,i=i(),t.memoizedState=[i,e],i},useReducer:function(i,e,t){var n=oa();return e=t!==void 0?t(e):e,n.memoizedState=n.baseState=e,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:e},n.queue=i,i=i.dispatch=GO.bind(null,Qn,i),[n.memoizedState,i]},useRef:function(i){var e=oa();return i={current:i},e.memoizedState=i},useState:xC,useDebugValue:mA,useDeferredValue:function(i){return oa().memoizedState=i},useTransition:function(){var i=xC(!1),e=i[0];return i=HO.bind(null,i[1]),oa().memoizedState=i,[e,i]},useMutableSource:function(){},useSyncExternalStore:function(i,e,t){var n=Qn,r=oa();if(zn){if(t===void 0)throw Error(Ze(407));t=t()}else{if(t=e(),Yi===null)throw Error(Ze(349));Ou&30||dI(n,e,t)}r.memoizedState=t;var s={value:t,getSnapshot:e};return r.queue=s,vC(hI.bind(null,n,s,i),[i]),n.flags|=2048,hm(9,fI.bind(null,n,s,t,e),void 0,null),t},useId:function(){var i=oa(),e=Yi.identifierPrefix;if(zn){var t=Ja,n=Ya;t=(n&~(1<<32-Ho(n)-1)).toString(32)+t,e=":"+e+"R"+t,t=dm++,0<t&&(e+="H"+t.toString(32)),e+=":"}else t=zO++,e=":"+e+"r"+t.toString(32)+":";return i.memoizedState=e},unstable_isNewReconciler:!1},VO={readContext:yo,useCallback:SI,useContext:yo,useEffect:pA,useImperativeHandle:_I,useInsertionEffect:xI,useLayoutEffect:vI,useMemo:bI,useReducer:u2,useRef:gI,useState:function(){return u2(fm)},useDebugValue:mA,useDeferredValue:function(i){var e=_o();return MI(e,Ii.memoizedState,i)},useTransition:function(){var i=u2(fm)[0],e=_o().memoizedState;return[i,e]},useMutableSource:cI,useSyncExternalStore:uI,useId:AI,unstable_isNewReconciler:!1},XO={readContext:yo,useCallback:SI,useContext:yo,useEffect:pA,useImperativeHandle:_I,useInsertionEffect:xI,useLayoutEffect:vI,useMemo:bI,useReducer:d2,useRef:gI,useState:function(){return d2(fm)},useDebugValue:mA,useDeferredValue:function(i){var e=_o();return Ii===null?e.memoizedState=i:MI(e,Ii.memoizedState,i)},useTransition:function(){var i=d2(fm)[0],e=_o().memoizedState;return[i,e]},useMutableSource:cI,useSyncExternalStore:uI,useId:AI,unstable_isNewReconciler:!1};function Fo(i,e){if(i&&i.defaultProps){e=$n({},e),i=i.defaultProps;for(var t in i)e[t]===void 0&&(e[t]=i[t]);return e}return e}function Mb(i,e,t,n){e=i.memoizedState,t=t(n,e),t=t==null?e:$n({},e,t),i.memoizedState=t,i.lanes===0&&(i.updateQueue.baseState=t)}var Oy={isMounted:function(i){return(i=i._reactInternals)?$u(i)===i:!1},enqueueSetState:function(i,e,t){i=i._reactInternals;var n=Yr(),r=ic(i),s=Za(n,r);s.payload=e,t!=null&&(s.callback=t),e=tc(i,s,r),e!==null&&(Go(e,i,r,n),Dx(e,i,r))},enqueueReplaceState:function(i,e,t){i=i._reactInternals;var n=Yr(),r=ic(i),s=Za(n,r);s.tag=1,s.payload=e,t!=null&&(s.callback=t),e=tc(i,s,r),e!==null&&(Go(e,i,r,n),Dx(e,i,r))},enqueueForceUpdate:function(i,e){i=i._reactInternals;var t=Yr(),n=ic(i),r=Za(t,n);r.tag=2,e!=null&&(r.callback=e),e=tc(i,r,n),e!==null&&(Go(e,i,n,t),Dx(e,i,n))}};function yC(i,e,t,n,r,s,o){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(n,s,o):e.prototype&&e.prototype.isPureReactComponent?!sm(t,n)||!sm(r,s):!0}function CI(i,e,t){var n=!1,r=fc,s=e.contextType;return typeof s=="object"&&s!==null?s=yo(s):(r=cs(e)?Nu:wr.current,n=e.contextTypes,s=(n=n!=null)?Df(i,r):fc),e=new e(t,s),i.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=Oy,i.stateNode=e,e._reactInternals=i,n&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=r,i.__reactInternalMemoizedMaskedChildContext=s),e}function _C(i,e,t,n){i=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(t,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(t,n),e.state!==i&&Oy.enqueueReplaceState(e,e.state,null)}function Ab(i,e,t,n){var r=i.stateNode;r.props=t,r.state=i.memoizedState,r.refs={},aA(i);var s=e.contextType;typeof s=="object"&&s!==null?r.context=yo(s):(s=cs(e)?Nu:wr.current,r.context=Df(i,s)),r.state=i.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(Mb(i,e,s,t),r.state=i.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(e=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),e!==r.state&&Oy.enqueueReplaceState(r,r.state,null),gv(i,t,r,n),r.state=i.memoizedState),typeof r.componentDidMount=="function"&&(i.flags|=4194308)}function Of(i,e){try{var t="",n=e;do t+=_k(n),n=n.return;while(n);var r=t}catch(s){r=` 39Error generating stack: `+s.message+` 40`+s.stack}return{value:i,source:e,stack:r,digest:null}}function f2(i,e,t){return{value:i,source:null,stack:t??null,digest:e??null}}function wb(i,e){try{console.error(e.value)}catch(t){setTimeout(function(){throw t})}}var YO=typeof WeakMap=="function"?WeakMap:Map;function RI(i,e,t){t=Za(-1,t),t.tag=3,t.payload={element:null};var n=e.value;return t.callback=function(){Sv||(Sv=!0,Fb=n),wb(i,e)},t}function PI(i,e,t){t=Za(-1,t),t.tag=3;var n=i.type.getDerivedStateFromError;if(typeof n=="function"){var r=e.value;t.payload=function(){return n(r)},t.callback=function(){wb(i,e)}}var s=i.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(t.callback=function(){wb(i,e),typeof n!="function"&&(nc===null?nc=new Set([this]):nc.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),t}function SC(i,e,t){var n=i.pingCache;if(n===null){n=i.pingCache=new YO;var r=new Set;n.set(e,r)}else r=n.get(e),r===void 0&&(r=new Set,n.set(e,r));r.has(t)||(r.add(t),i=a4.bind(null,i,e,t),e.then(i,i))}function bC(i){do{var e;if((e=i.tag===13)&&(e=i.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return i;i=i.return}while(i!==null);return null}function MC(i,e,t,n,r){return i.mode&1?(i.flags|=65536,i.lanes=r,i):(i===e?i.flags|=65536:(i.flags|=128,t.flags|=131072,t.flags&=-52805,t.tag===1&&(t.alternate===null?t.tag=17:(e=Za(-1,1),e.tag=2,tc(t,e,1)
vendor: 9,702 bytes, line 40
40)),t.lanes|=1),i)}var JO=ul.ReactCurrentOwner,os=!1;function Or(i,e,t,n){e.child=i===null?sI(e,null,t,n):Nf(e,i.child,t,n)}function AC(i,e,t,n,r){t=t.render;var s=e.ref;return Sf(e,r),n=fA(i,e,t,n,s,r),t=hA(),i!==null&&!os?(e.updateQueue=i.updateQueue,e.flags&=-2053,i.lanes&=~r,rl(i,e,r)):(zn&&t&&eA(e),e.flags|=1,Or(i,e,n,r),e.child)}function wC(i,e,t,n,r){if(i===null){var s=t.type;return typeof s=="function"&&!MA(s)&&s.defaultProps===void 0&&t.compare===null&&t.defaultProps===void 0?(e.tag=15,e.type=s,II(i,e,s,n,r)):(i=zx(t.type,null,n,e,e.mode,r),i.ref=e.ref,i.return=e,e.child=i)}if(s=i.child,!(i.lanes&r)){var o=s.memoizedProps;if(t=t.compare,t=t!==null?t:sm,t(o,n)&&i.ref===e.ref)return rl(i,e,r)}return e.flags|=1,i=rc(s,n),i.ref=e.ref,i.return=e,e.child=i}function II(i,e,t,n,r){if(i!==null){var s=i.memoizedProps;if(sm(s,n)&&i.ref===e.ref)if(os=!1,e.pendingProps=n=s,(i.lanes&r)!==0)i.flags&131072&&(os=!0);else return e.lanes=i.lanes,rl(i,e,r)}return Tb(i,e,t,n,r)}function LI(i,e,t){var n=e.pendingProps,r=n.children,s=i!==null?i.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ln(uf,As),As|=t;else{if(!(t&1073741824))return i=s!==null?s.baseLanes|t:t,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:i,cachePool:null,transitions:null},e.updateQueue=null,Ln(uf,As),As|=i,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=s!==null?s.baseLanes:t,Ln(uf,As),As|=n}else s!==null?(n=s.baseLanes|t,e.memoizedState=null):n=t,Ln(uf,As),As|=n;return Or(i,e,r,t),e.child}function BI(i,e){var t=e.ref;(i===null&&t!==null||i!==null&&i.ref!==t)&&(e.flags|=512,e.flags|=2097152)}function Tb(i,e,t,n,r){var s=cs(t)?Nu:wr.current;return s=Df(e,s),Sf(e,r),t=fA(i,e,t,n,s,r),n=hA(),i!==null&&!os?(e.updateQueue=i.updateQueue,e.flags&=-2053,i.lanes&=~r,rl(i,e,r)):(zn&&n&&eA(e),e.flags|=1,Or(i,e,t,r),e.child)}function TC(i,e,t,n,r){if(cs(t)){var s=!0;dv(e)}else s=!1;if(Sf(e,r),e.stateNode===null)kx(i,e),CI(e,t,n),Ab(e,t,n,r),n=!0;else if(i===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,c=t.contextType;typeof c=="object"&&c!==null?c=yo(c):(c=cs(t)?Nu:wr.current,c=Df(e,c));var u=t.getDerivedStateFromProps,d=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||l!==c)&&_C(e,o,n,c),Nl=!1;var p=e.memoizedState;o.state=p,gv(e,n,o,r),l=e.memoizedState,a!==n||p!==l||ls.current||Nl?(typeof u=="function"&&(Mb(e,t,u,n),l=e.memoizedState),(a=Nl||yC(e,t,a,n,p,l,c))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=l),o.props=n,o.state=l,o.context=c,n=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{o=e.stateNode,aI(i,e),a=e.memoizedProps,c=e.type===e.elementType?a:Fo(e.type,a),o.props=c,d=e.pendingProps,p=o.context,l=t.contextType,typeof l=="object"&&l!==null?l=yo(l):(l=cs(t)?Nu:wr.current,l=Df(e,l));var m=t.getDerivedStateFromProps;(u=typeof m=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||p!==l)&&_C(e,o,n,l),Nl=!1,p=e.memoizedState,o.state=p,gv(e,n,o,r);var x=e.memoizedState;a!==d||p!==x||ls.current||Nl?(typeof m=="function"&&(Mb(e,t,m,n),x=e.memoizedState),(c=Nl||yC(e,t,c,n,p,x,l)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,x,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,x,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===i.memoizedProps&&p===i.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===i.memoizedProps&&p===i.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=x),o.props=n,o.state=x,o.context=l,n=c):(typeof o.componentDidUpdate!="function"||a===i.memoizedProps&&p===i.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===i.memoizedProps&&p===i.memoizedState||(e.flags|=1024),n=!1)}return Eb(i,e,t,n,s,r)}function Eb(i,e,t,n,r,s){BI(i,e);var o=(e.flags&128)!==0;if(!n&&!o)return r&&dC(e,t,!1),rl(i,e,s);n=e.stateNode,JO.current=e;var a=o&&typeof t.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,i!==null&&o?(e.child=Nf(e,i.child,null,s),e.child=Nf(e,null,a,s)):Or(i,e,a,s),e.memoizedState=n.state,r&&dC(e,t,!0),e.child}function DI(i){var e=i.stateNode;e.pendingContext?uC(i,e.pendingContext,e.pendingContext!==e.context):e.context&&uC(i,e.context,!1),lA(i,e.containerInfo)}function EC(i,e,t,n,r){return Ff(),nA(r),e.flags|=256,Or(i,e,t,n),e.child}var Cb={dehydrated:null,treeContext:null,retryLane:0};function Rb(i){return{baseLanes:i,cachePool:null,transitions:null}}function FI(i,e,t){var n=e.pendingProps,r=Jn.current,s=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=i!==null&&i.memoizedState===null?!1:(r&2)!==0),a?(s=!0,e.flags&=-129):(i===null||i.memoizedState!==null)&&(r|=1),Ln(Jn,r&1),i===null)return Sb(e),i=e.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?(e.mode&1?i.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=n.children,i=n.fallback,s?(n=e.mode,s=e.child,o={mode:"hidden",children:o},!(n&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=Hy(o,n,0,null),i=Au(i,n,t,null),s.return=e,i.return=e,s.sibling=i,e.child=s,e.child.memoizedState=Rb(t),e.memoizedState=Cb,i):gA(e,o));if(r=i.memoizedState,r!==null&&(a=r.dehydrated,a!==null))return KO(i,e,o,n,a,r,t);if(s){s=n.fallback,o=e.mode,r=i.child,a=r.sibling;var l={mode:"hidden",children:n.children};return!(o&1)&&e.child!==r?(n=e.child,n.childLanes=0,n.pendingProps=l,e.deletions=null):(n=rc(r,l),n.subtreeFlags=r.subtreeFlags&14680064),a!==null?s=rc(a,s):(s=Au(s,o,t,null),s.flags|=2),s.return=e,n.return=e,n.sibling=s,e.child=n,n=s,s=e.child,o=i.child.memoizedState,o=o===null?Rb(t):{baseLanes:o.baseLanes|t,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=i.childLanes&~t,e.memoizedState=Cb,n}return s=i.child,i=s.sibling,n=rc(s,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=t),n.return=e,n.sibling=null,i!==null&&(t=e.deletions,t===null?(e.deletions=[i],e.flags|=16):t.push(i)),e.child=n,e.memoizedState=null,n}function gA(i,e){return e=Hy({mode:"visible",children:e},i.mode,0,null),e.return=i,i.child=e}function lg(i,e,t,n){return n!==null&&nA(n),Nf(e,i.child,null,t),i=gA(e,e.pendingProps.children),i.flags|=2,e.memoizedState=null,i}function KO(i,e,t,n,r,s,o){if(t)return e.flags&256?(e.flags&=-257,n=f2(Error(Ze(422))),lg(i,e,o,n)):e.memoizedState!==null?(e.child=i.child,e.flags|=128,null):(s=n.fallback,r=e.mode,n=Hy({mode:"visible",children:n.children},r,0,null),s=Au(s,r,o,null),s.flags|=2,n.return=e,s.return=e,n.sibling=s,e.child=n,e.mode&1&&Nf(e,i.child,null,o),e.child.memoizedState=Rb(o),e.memoizedState=Cb,s);if(!(e.mode&1))return lg(i,e,o,null);if(r.data==="$!"){if(n=r.nextSibling&&r.nextSibling.dataset,n)var a=n.dgst;return n=a,s=Error(Ze(419)),n=f2(s,n,void 0),lg(i,e,o,n)}if(a=(o&i.childLanes)!==0,os||a){if(n=Yi,n!==null){switch(o&-o){case 4:r=2;break;case 16:r=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:r=32;break;case 536870912:r=268435456;break;default:r=0}r=r&(n.suspendedLanes|o)?0:r,r!==0&&r!==s.retryLane&&(s.retryLane=r,il(i,r),Go(n,i,r,-1))}return bA(),n=f2(Error(Ze(421))),lg(i,e,o,n)}return r.data==="$?"?(e.flags|=128,e.child=i.child,e=l4.bind(null,i),r._reactRetry=e,null):(i=s.treeContext,Ls=ec(r.nextSibling),Os=e,zn=!0,ko=null,i!==null&&(co[uo++]=Ya,co[uo++]=Ja,co[uo++]=ku,Ya=i.id,Ja=i.overflow,ku=e),e=gA(e,n.children),e.flags|=4096,e)}function CC(i,e,t){i.lanes|=e;var n=i.alternate;n!==null&&(n.lanes|=e),bb(i.return,e,t)}function h2(i,e,t,n,r){var s=i.memoizedState;s===null?i.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:t,tailMode:r}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=n,s.tail=t,s.tailMode=r)}function NI(i,e,t){var n=e.pendingProps,r=n.revealOrder,s=n.tail;if(Or(i,e,n.children,t),n=Jn.current,n&2)n=n&1|2,e.flags|=128;else{if(i!==null&&i.flags&128)e:for(i=e.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&CC(i,t,e);else if(i.tag===19)CC(i,t,e);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break e;for(;i.sibling===null;){if(i.return===null||i.return===e)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}n&=1}if(Ln(Jn,n),!(e.mode&1))e.memoizedState=null;else switch(r){case"forwards":for(t=e.child,r=null;t!==null;)i=t.alternate,i!==null&&xv(i)===null&&(r=t),t=t.sibling;t=r,t===null?(r=e.child,e.child=null):(r=t.sibling,t.sibling=null),h2(e,!1,r,t,s);break;case"backwards":for(t=null,r=e.child,e.child=null;r!==null;){if(i=r.alternate,i!==null&&xv(i)===null){e.child=r;break}i=r.sibling,r.sibling=t,t=r,r=i}h2(e,!0,t,null,s);break;case"together":h2(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function kx(i,e){!(e.mode&1)&&i!==null&&(i.alternate=null,e.alternate=null,e.flags|=2)}
vendor: 4,905 bytes, line 40
40function rl(i,e,t){if(i!==null&&(e.dependencies=i.dependencies),Uu|=e.lanes,!(t&e.childLanes))return null;if(i!==null&&e.child!==i.child)throw Error(Ze(153));if(e.child!==null){for(i=e.child,t=rc(i,i.pendingProps),e.child=t,t.return=e;i.sibling!==null;)i=i.sibling,t=t.sibling=rc(i,i.pendingProps),t.return=e;t.sibling=null}return e.child}function qO(i,e,t){switch(e.tag){case 3:DI(e),Ff();break;case 5:lI(e);break;case 1:cs(e.type)&&dv(e);break;case 4:lA(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,r=e.memoizedProps.value;Ln(pv,n._currentValue),n._currentValue=r;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(Ln(Jn,Jn.current&1),e.flags|=128,null):t&e.child.childLanes?FI(i,e,t):(Ln(Jn,Jn.current&1),i=rl(i,e,t),i!==null?i.sibling:null);Ln(Jn,Jn.current&1);break;case 19:if(n=(t&e.childLanes)!==0,i.flags&128){if(n)return NI(i,e,t);e.flags|=128}if(r=e.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),Ln(Jn,Jn.current),n)break;return null;case 22:case 23:return e.lanes=0,LI(i,e,t)}return rl(i,e,t)}var kI,Pb,OI,UI;kI=function(i,e){for(var t=e.child;t!==null;){if(t.tag===5||t.tag===6)i.appendChild(t.stateNode);else if(t.tag!==4&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return;t=t.return}t.sibling.return=t.return,t=t.sibling}};Pb=function(){};OI=function(i,e,t,n){var r=i.memoizedProps;if(r!==n){i=e.stateNode,pu(xa.current);var s=null;switch(t){case"input":r=QS(i,r),n=QS(i,n),s=[];break;case"select":r=$n({},r,{value:void 0}),n=$n({},n,{value:void 0}),s=[];break;case"textarea":r=tb(i,r),n=tb(i,n),s=[];break;default:typeof r.onClick!="function"&&typeof n.onClick=="function"&&(i.onclick=cv)}ib(t,n);var o;t=null;for(c in r)if(!n.hasOwnProperty(c)&&r.hasOwnProperty(c)&&r[c]!=null)if(c==="style"){var a=r[c];for(o in a)a.hasOwnProperty(o)&&(t||(t={}),t[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Qp.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in n){var l=n[c];if(a=r!=null?r[c]:void 0,n.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(t||(t={}),t[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(t||(t={}),t[o]=l[o])}else t||(s||(s=[]),s.push(c,t)),t=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Qp.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Nn("scroll",i),s||a===l||(s=[])):(s=s||[]).push(c,l))}t&&(s=s||[]).push("style",t);var c=s;(e.updateQueue=c)&&(e.flags|=4)}};UI=function(i,e,t,n){t!==n&&(e.flags|=4)};function Uh(i,e){if(!zn)switch(i.tailMode){case"hidden":e=i.tail;for(var t=null;e!==null;)e.alternate!==null&&(t=e),e=e.sibling;t===null?i.tail=null:t.sibling=null;break;case"collapsed":t=i.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e||i.tail===null?i.tail=null:i.tail.sibling=null:n.sibling=null}}function pr(i){var e=i.alternate!==null&&i.alternate.child===i.child,t=0,n=0;if(e)for(var r=i.child;r!==null;)t|=r.lanes|r.childLanes,n|=r.subtreeFlags&14680064,n|=r.flags&14680064,r.return=i,r=r.sibling;else for(r=i.child;r!==null;)t|=r.lanes|r.childLanes,n|=r.subtreeFlags,n|=r.flags,r.return=i,r=r.sibling;return i.subtreeFlags|=n,i.childLanes=t,e}function ZO(i,e,t){var n=e.pendingProps;switch(tA(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pr(e),null;case 1:return cs(e.type)&&uv(),pr(e),null;case 3:return n=e.stateNode,kf(),kn(ls),kn(wr),uA(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(i===null||i.child===null)&&(og(e)?e.flags|=4:i===null||i.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,ko!==null&&(Ob(ko),ko=null))),Pb(i,e),pr(e),null;case 5:cA(e);var r=pu(um.current);if(t=e.type,i!==null&&e.stateNode!=null)OI(i,e,t,n,r),i.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(Ze(166));return pr(e),null}if(i=pu(xa.current),og(e)){n=e.stateNode,t=e.type;var s=e.memoizedProps;switch(n[ua]=e,n[lm]=s,i=(e.mode&1)!==0,t){case"dialog":Nn("cancel",n),Nn("close",n);break;case"iframe":case"object":case"embed":Nn("load",n);break;case"video":case"audio":for(r=0;r<dp.length;r++)Nn(dp[r],n);break;case"source":Nn("error",n);break;case"img":case"image":case"link":Nn("error",n),Nn("load",n);break;case"details":Nn("toggle",n);break;case"input":kE(n,s),Nn("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!s.multiple},Nn("invalid",n);break;case"textarea":UE(n,s),Nn("invalid",n)}ib(t,s),r=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];
vendor: 8,491 bytes, line 40
40o==="children"?typeof a=="string"?n.textContent!==a&&(s.suppressHydrationWarning!==!0&&sg(n.textContent,a,i),r=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&sg(n.textContent,a,i),r=["children",""+a]):Qp.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&Nn("scroll",n)}switch(t){case"input":Z0(n),OE(n,s,!0);break;case"textarea":Z0(n),zE(n);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(n.onclick=cv)}n=r,e.updateQueue=n,n!==null&&(e.flags|=4)}else{o=r.nodeType===9?r:r.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=hP(t)),i==="http://www.w3.org/1999/xhtml"?t==="script"?(i=o.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof n.is=="string"?i=o.createElement(t,{is:n.is}):(i=o.createElement(t),t==="select"&&(o=i,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):i=o.createElementNS(i,t),i[ua]=e,i[lm]=n,kI(i,e,!1,!1),e.stateNode=i;e:{switch(o=rb(t,n),t){case"dialog":Nn("cancel",i),Nn("close",i),r=n;break;case"iframe":case"object":case"embed":Nn("load",i),r=n;break;case"video":case"audio":for(r=0;r<dp.length;r++)Nn(dp[r],i);r=n;break;case"source":Nn("error",i),r=n;break;case"img":case"image":case"link":Nn("error",i),Nn("load",i),r=n;break;case"details":Nn("toggle",i),r=n;break;case"input":kE(i,n),r=QS(i,n),Nn("invalid",i);break;case"option":r=n;break;case"select":i._wrapperState={wasMultiple:!!n.multiple},r=$n({},n,{value:void 0}),Nn("invalid",i);break;case"textarea":UE(i,n),r=tb(i,n),Nn("invalid",i);break;default:r=n}ib(t,r),a=r;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?gP(i,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&pP(i,l)):s==="children"?typeof l=="string"?(t!=="textarea"||l!=="")&&$p(i,l):typeof l=="number"&&$p(i,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Qp.hasOwnProperty(s)?l!=null&&s==="onScroll"&&Nn("scroll",i):l!=null&&zM(i,s,l,o))}switch(t){case"input":Z0(i),OE(i,n,!1);break;case"textarea":Z0(i),zE(i);break;case"option":n.value!=null&&i.setAttribute("value",""+dc(n.value));break;case"select":i.multiple=!!n.multiple,s=n.value,s!=null?xf(i,!!n.multiple,s,!1):n.defaultValue!=null&&xf(i,!!n.multiple,n.defaultValue,!0);break;default:typeof r.onClick=="function"&&(i.onclick=cv)}switch(t){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return pr(e),null;case 6:if(i&&e.stateNode!=null)UI(i,e,i.memoizedProps,n);else{if(typeof n!="string"&&e.stateNode===null)throw Error(Ze(166));if(t=pu(um.current),pu(xa.current),og(e)){if(n=e.stateNode,t=e.memoizedProps,n[ua]=e,(s=n.nodeValue!==t)&&(i=Os,i!==null))switch(i.tag){case 3:sg(n.nodeValue,t,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&sg(n.nodeValue,t,(i.mode&1)!==0)}s&&(e.flags|=4)}else n=(t.nodeType===9?t:t.ownerDocument).createTextNode(n),n[ua]=e,e.stateNode=n}return pr(e),null;case 13:if(kn(Jn),n=e.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(zn&&Ls!==null&&e.mode&1&&!(e.flags&128))iI(),Ff(),e.flags|=98560,s=!1;else if(s=og(e),n!==null&&n.dehydrated!==null){if(i===null){if(!s)throw Error(Ze(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(Ze(317));s[ua]=e}else Ff(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;pr(e),s=!1}else ko!==null&&(Ob(ko),ko=null),s=!0;if(!s)return e.flags&65536?e:null}return e.flags&128?(e.lanes=t,e):(n=n!==null,n!==(i!==null&&i.memoizedState!==null)&&n&&(e.child.flags|=8192,e.mode&1&&(i===null||Jn.current&1?Fi===0&&(Fi=3):bA())),e.updateQueue!==null&&(e.flags|=4),pr(e),null);case 4:return kf(),Pb(i,e),i===null&&om(e.stateNode.containerInfo),pr(e),null;case 10:return sA(e.type._context),pr(e),null;case 17:return cs(e.type)&&uv(),pr(e),null;case 19:if(kn(Jn),s=e.memoizedState,s===null)return pr(e),null;if(n=(e.flags&128)!==0,o=s.rendering,o===null)if(n)Uh(s,!1);else{if(Fi!==0||i!==null&&i.flags&128)for(i=e.child;i!==null;){if(o=xv(i),o!==null){for(e.flags|=128,Uh(s,!1),n=o.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),e.subtreeFlags=0,n=t,t=e.child;t!==null;)s=t,i=n,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=i,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,i=o.dependencies,s.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),t=t.sibling;return Ln(Jn,Jn.current&1|2),e.child}i=i.sibling}s.tail!==null&&fi()>Uf&&(e.flags|=128,n=!0,Uh(s,!1),e.lanes=4194304)}else{if(!n)if(i=xv(o),i!==null){if(e.flags|=128,n=!0,t=i.updateQueue,t!==null&&(e.updateQueue=t,e.flags|=4),Uh(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!zn)return pr(e),null}else 2*fi()-s.renderingStartTime>Uf&&t!==1073741824&&(e.flags|=128,n=!0,Uh(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(t=s.last,t!==null?t.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=fi(),e.sibling=null,t=Jn.current,Ln(Jn,n?t&1|2:t&1),e):(pr(e),null);case 22:case 23:return SA(),n=e.memoizedState!==null,i!==null&&i.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?As&1073741824&&(pr(e),e.subtreeFlags&6&&(e.flags|=8192)):pr(e),null;case 24:return null;case 25:return null}throw Error(Ze(156,e.tag))}function QO(i,e){switch(tA(e),e.tag){case 1:return cs(e.type)&&uv(),i=e.flags,i&65536?(e.flags=i&-65537|128,e):null;case 3:return kf(),kn(ls),kn(wr),uA(),i=e.flags,i&65536&&!(i&128)?(e.flags=i&-65537|128,e):null;case 5:return cA(e),null;case 13:if(kn(Jn),i=e.memoizedState,i!==null&&i.dehydrated!==null){if(e.alternate===null)throw Error(Ze(340));Ff()}return i=e.flags,i&65536?(e.flags=i&-65537|128,e):null;case 19:return kn(Jn),null;case 4:return kf(),null;case 10:return sA(e.type._context),null;case 22:case 23:return SA(),null;case 24:return null;default:return null}}var cg=!1,_r=!1,$O=typeof WeakSet=="function"?WeakSet:Set,mt=null;function cf(i,e){var t=i.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){ii(i,e,n)}else t.current=null}function Ib(i,e,t){try{t()}catch(n){ii(i,e,n)}}var RC=!1;function e4(i,e){if(pb=ov,i=WP(),$M(i)){if("selectionStart"in i)var t={start:i.selectionStart,end:i.selectionEnd};else e:{t=(t=i.ownerDocument)&&t.defaultView||window;var n=t.getSelection&&t.getSelection();if(n&&n.rangeCount!==0){t=n.anchorNode;var r=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{t.nodeType,s.nodeType}catch{t=null;break e}var o=0,a=-1,l=-1,c=0,u=0,d=i,p=null;t:for(;;){for(var m;d!==t||r!==0&&d.nodeType!==3||(a=o+r),d!==s||n!==0&&d.nodeType!==3||(l=o+n),d.nodeType===3&&(o+=d.nodeValue.length),(m=d.firstChild)!==null;)p=d,d=m;for(;;){if(d===i)break t;if(p===t&&++c===r&&(a=o),p===s&&++u===n&&(l=o),(m=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=m}t=a===-1||l===-1?null:{start:a,end:l}}else t=null}t=t||{start:0,end:0}}else t=null;for(mb={focusedElem:i,selectionRange:t},ov=!1,mt=e;mt!==null;)if(e=mt,i=e.child,(e.subtreeFlags&1028)!==0&&i!==null)i.return=e,mt=i;else for(;mt!==null;){e=mt;try{var x=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var v=x.memoizedProps,_=x.memoizedState,g=e.stateNode,S=g.getSnapshotBeforeUpdate(e.elementType===e.type?v:Fo(e.type,v),_);g.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var b=e.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ze(163))}}catch(A){ii(e,e.return,A)}if(i=e.sibling,i!==null){i.return=e.return,mt=i;break}mt=e.return}return x=RC,RC=!1,x}function Cp(i,e,t){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var r=n=n.next;do{if((r.tag&i)===i){var s=r.destroy;r.destroy=void 0,s!==void 0&&Ib(e,t,s)}r=r.next}while(r!==n)}}function Uy(i,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var t=e=e.next;do{if((t.tag&i)===i){var n=t.create;t.destroy=n()}t=t.next}while(t!==e)}}function Lb(i){var e=i.ref;if(e!==null){var t=i.stateNode;switch(i.tag){case 5:i=t;break;default:i=t}typeof e=="function"?e(i):e.current=i}}function zI(i){var e=i.alternate;
vendor: 1,080 bytes, line 40
40e!==null&&(i.alternate=null,zI(e)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(e=i.stateNode,e!==null&&(delete e[ua],delete e[lm],delete e[vb],delete e[NO],delete e[kO])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function HI(i){return i.tag===5||i.tag===3||i.tag===4}function PC(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||HI(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Bb(i,e,t){var n=i.tag;if(n===5||n===6)i=i.stateNode,e?t.nodeType===8?t.parentNode.insertBefore(i,e):t.insertBefore(i,e):(t.nodeType===8?(e=t.parentNode,e.insertBefore(i,t)):(e=t,e.appendChild(i)),t=t._reactRootContainer,t!=null||e.onclick!==null||(e.onclick=cv));else if(n!==4&&(i=i.child,i!==null))for(Bb(i,e,t),i=i.sibling;i!==null;)Bb(i,e,t),i=i.sibling}function Db(i,e,t){var n=i.tag;
vendor: 20,644 bytes, line 40
40if(n===5||n===6)i=i.stateNode,e?t.insertBefore(i,e):t.appendChild(i);else if(n!==4&&(i=i.child,i!==null))for(Db(i,e,t),i=i.sibling;i!==null;)Db(i,e,t),i=i.sibling}var $i=null,No=!1;function Ml(i,e,t){for(t=t.child;t!==null;)GI(i,e,t),t=t.sibling}function GI(i,e,t){if(ga&&typeof ga.onCommitFiberUnmount=="function")try{ga.onCommitFiberUnmount(Iy,t)}catch{}switch(t.tag){case 5:_r||cf(t,e);case 6:var n=$i,r=No;$i=null,Ml(i,e,t),$i=n,No=r,$i!==null&&(No?(i=$i,t=t.stateNode,i.nodeType===8?i.parentNode.removeChild(t):i.removeChild(t)):$i.removeChild(t.stateNode));break;case 18:$i!==null&&(No?(i=$i,t=t.stateNode,i.nodeType===8?o2(i.parentNode,t):i.nodeType===1&&o2(i,t),im(i)):o2($i,t.stateNode));break;case 4:n=$i,r=No,$i=t.stateNode.containerInfo,No=!0,Ml(i,e,t),$i=n,No=r;break;case 0:case 11:case 14:case 15:if(!_r&&(n=t.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){r=n=n.next;do{var s=r,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Ib(t,e,o),r=r.next}while(r!==n)}Ml(i,e,t);break;case 1:if(!_r&&(cf(t,e),n=t.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=t.memoizedProps,n.state=t.memoizedState,n.componentWillUnmount()}catch(a){ii(t,e,a)}Ml(i,e,t);break;case 21:Ml(i,e,t);break;case 22:t.mode&1?(_r=(n=_r)||t.memoizedState!==null,Ml(i,e,t),_r=n):Ml(i,e,t);break;default:Ml(i,e,t)}}function IC(i){var e=i.updateQueue;if(e!==null){i.updateQueue=null;var t=i.stateNode;t===null&&(t=i.stateNode=new $O),e.forEach(function(n){var r=c4.bind(null,i,n);t.has(n)||(t.add(n),n.then(r,r))})}}function Ro(i,e){var t=e.deletions;if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];try{var s=i,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:$i=a.stateNode,No=!1;break e;case 3:$i=a.stateNode.containerInfo,No=!0;break e;case 4:$i=a.stateNode.containerInfo,No=!0;break e}a=a.return}if($i===null)throw Error(Ze(160));GI(s,o,r),$i=null,No=!1;var l=r.alternate;l!==null&&(l.return=null),r.return=null}catch(c){ii(r,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)jI(e,i),e=e.sibling}function jI(i,e){var t=i.alternate,n=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(Ro(e,i),ea(i),n&4){try{Cp(3,i,i.return),Uy(3,i)}catch(v){ii(i,i.return,v)}try{Cp(5,i,i.return)}catch(v){ii(i,i.return,v)}}break;case 1:Ro(e,i),ea(i),n&512&&t!==null&&cf(t,t.return);break;case 5:if(Ro(e,i),ea(i),n&512&&t!==null&&cf(t,t.return),i.flags&32){var r=i.stateNode;try{$p(r,"")}catch(v){ii(i,i.return,v)}}if(n&4&&(r=i.stateNode,r!=null)){var s=i.memoizedProps,o=t!==null?t.memoizedProps:s,a=i.type,l=i.updateQueue;if(i.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&dP(r,s),rb(a,o);var c=rb(a,s);for(o=0;o<l.length;o+=2){var u=l[o],d=l[o+1];u==="style"?gP(r,d):u==="dangerouslySetInnerHTML"?pP(r,d):u==="children"?$p(r,d):zM(r,u,d,c)}switch(a){case"input":$S(r,s);break;case"textarea":fP(r,s);break;case"select":var p=r._wrapperState.wasMultiple;r._wrapperState.wasMultiple=!!s.multiple;var m=s.value;m!=null?xf(r,!!s.multiple,m,!1):p!==!!s.multiple&&(s.defaultValue!=null?xf(r,!!s.multiple,s.defaultValue,!0):xf(r,!!s.multiple,s.multiple?[]:"",!1))}r[lm]=s}catch(v){ii(i,i.return,v)}}break;case 6:if(Ro(e,i),ea(i),n&4){if(i.stateNode===null)throw Error(Ze(162));r=i.stateNode,s=i.memoizedProps;try{r.nodeValue=s}catch(v){ii(i,i.return,v)}}break;case 3:if(Ro(e,i),ea(i),n&4&&t!==null&&t.memoizedState.isDehydrated)try{im(e.containerInfo)}catch(v){ii(i,i.return,v)}break;case 4:Ro(e,i),ea(i);break;case 13:Ro(e,i),ea(i),r=i.child,r.flags&8192&&(s=r.memoizedState!==null,r.stateNode.isHidden=s,!s||r.alternate!==null&&r.alternate.memoizedState!==null||(yA=fi())),n&4&&IC(i);break;case 22:if(u=t!==null&&t.memoizedState!==null,i.mode&1?(_r=(c=_r)||u,Ro(e,i),_r=c):Ro(e,i),ea(i),n&8192){if(c=i.memoizedState!==null,(i.stateNode.isHidden=c)&&!u&&i.mode&1)for(mt=i,u=i.child;u!==null;){for(d=mt=u;mt!==null;){switch(p=mt,m=p.child,p.tag){case 0:case 11:case 14:case 15:Cp(4,p,p.return);break;case 1:cf(p,p.return);var x=p.stateNode;if(typeof x.componentWillUnmount=="function"){n=p,t=p.return;try{e=n,x.props=e.memoizedProps,x.state=e.memoizedState,x.componentWillUnmount()}catch(v){ii(n,t,v)}}break;case 5:cf(p,p.return);break;case 22:if(p.memoizedState!==null){BC(d);continue}}m!==null?(m.return=p,mt=m):BC(d)}u=u.sibling}e:for(u=null,d=i;;){if(d.tag===5){if(u===null){u=d;try{r=d.stateNode,c?(s=r.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=mP("display",o))}catch(v){ii(i,i.return,v)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(v){ii(i,i.return,v)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===i)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===i)break e;for(;d.sibling===null;){if(d.return===null||d.return===i)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Ro(e,i),ea(i),n&4&&IC(i);break;case 21:break;default:Ro(e,i),ea(i)}}function ea(i){var e=i.flags;if(e&2){try{e:{for(var t=i.return;t!==null;){if(HI(t)){var n=t;break e}t=t.return}throw Error(Ze(160))}switch(n.tag){case 5:var r=n.stateNode;n.flags&32&&($p(r,""),n.flags&=-33);var s=PC(i);Db(i,s,r);break;case 3:case 4:var o=n.stateNode.containerInfo,a=PC(i);Bb(i,a,o);break;default:throw Error(Ze(161))}}catch(l){ii(i,i.return,l)}i.flags&=-3}e&4096&&(i.flags&=-4097)}function t4(i,e,t){mt=i,WI(i)}function WI(i,e,t){for(var n=(i.mode&1)!==0;mt!==null;){var r=mt,s=r.child;if(r.tag===22&&n){var o=r.memoizedState!==null||cg;if(!o){var a=r.alternate,l=a!==null&&a.memoizedState!==null||_r;a=cg;var c=_r;if(cg=o,(_r=l)&&!c)for(mt=r;mt!==null;)o=mt,l=o.child,o.tag===22&&o.memoizedState!==null?DC(r):l!==null?(l.return=o,mt=l):DC(r);for(;s!==null;)mt=s,WI(s),s=s.sibling;mt=r,cg=a,_r=c}LC(i)}else r.subtreeFlags&8772&&s!==null?(s.return=r,mt=s):LC(i)}}function LC(i){for(;mt!==null;){var e=mt;if(e.flags&8772){var t=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:_r||Uy(5,e);break;case 1:var n=e.stateNode;if(e.flags&4&&!_r)if(t===null)n.componentDidMount();else{var r=e.elementType===e.type?t.memoizedProps:Fo(e.type,t.memoizedProps);n.componentDidUpdate(r,t.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&gC(e,s,n);break;case 3:var o=e.updateQueue;if(o!==null){if(t=null,e.child!==null)switch(e.child.tag){case 5:t=e.child.stateNode;break;case 1:t=e.child.stateNode}gC(e,o,t)}break;case 5:var a=e.stateNode;if(t===null&&e.flags&4){t=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&t.focus();break;case"img":l.src&&(t.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var c=e.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&im(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Ze(163))}_r||e.flags&512&&Lb(e)}catch(p){ii(e,e.return,p)}}if(e===i){mt=null;break}if(t=e.sibling,t!==null){t.return=e.return,mt=t;break}mt=e.return}}function BC(i){for(;mt!==null;){var e=mt;if(e===i){mt=null;break}var t=e.sibling;if(t!==null){t.return=e.return,mt=t;break}mt=e.return}}function DC(i){for(;mt!==null;){var e=mt;try{switch(e.tag){case 0:case 11:case 15:var t=e.return;try{Uy(4,e)}catch(l){ii(e,t,l)}break;case 1:var n=e.stateNode;if(typeof n.componentDidMount=="function"){var r=e.return;try{n.componentDidMount()}catch(l){ii(e,r,l)}}var s=e.return;try{Lb(e)}catch(l){ii(e,s,l)}break;case 5:var o=e.return;try{Lb(e)}catch(l){ii(e,o,l)}}}catch(l){ii(e,e.return,l)}if(e===i){mt=null;break}var a=e.sibling;if(a!==null){a.return=e.return,mt=a;break}mt=e.return}}var n4=Math.ceil,_v=ul.ReactCurrentDispatcher,xA=ul.ReactCurrentOwner,xo=ul.ReactCurrentBatchConfig,un=0,Yi=null,Mi=null,ir=0,As=0,uf=bc(0),Fi=0,pm=null,Uu=0,zy=0,vA=0,Rp=null,rs=null,yA=0,Uf=1/0,Ua=null,Sv=!1,Fb=null,nc=null,ug=!1,Hl=null,bv=0,Pp=0,Nb=null,Ox=-1,Ux=0;function Yr(){return un&6?fi():Ox!==-1?Ox:Ox=fi()}function ic(i){return i.mode&1?un&2&&ir!==0?ir&-ir:UO.transition!==null?(Ux===0&&(Ux=CP()),Ux):(i=Mn,i!==0||(i=window.event,i=i===void 0?16:FP(i.type)),i):1}function Go(i,e,t,n){if(50<Pp)throw Pp=0,Nb=null,Error(Ze(185));Om(i,t,n),(!(un&2)||i!==Yi)&&(i===Yi&&(!(un&2)&&(zy|=t),Fi===4&&Ol(i,ir)),us(i,n),t===1&&un===0&&!(e.mode&1)&&(Uf=fi()+500,Ny&&Mc()))}function us(i,e){var t=i.callbackNode;Uk(i,e);var n=sv(i,i===Yi?ir:0);if(n===0)t!==null&&jE(t),i.callbackNode=null,i.callbackPriority=0;else if(e=n&-n,i.callbackPriority!==e){if(t!=null&&jE(t),e===1)i.tag===0?OO(FC.bind(null,i)):eI(FC.bind(null,i)),DO(function(){!(un&6)&&Mc()}),t=null;else{switch(RP(n)){case 1:t=VM;break;case 4:t=TP;break;case 16:t=rv;break;case 536870912:t=EP;break;default:t=rv}t=QI(t,VI.bind(null,i))}i.callbackPriority=e,i.callbackNode=t}}function VI(i,e){if(Ox=-1,Ux=0,un&6)throw Error(Ze(327));var t=i.callbackNode;if(bf()&&i.callbackNode!==t)return null;var n=sv(i,i===Yi?ir:0);if(n===0)return null;if(n&30||n&i.expiredLanes||e)e=Mv(i,n);else{e=n;var r=un;un|=2;var s=YI();(Yi!==i||ir!==e)&&(Ua=null,Uf=fi()+500,Mu(i,e));do try{s4();break}catch(a){XI(i,a)}while(!0);rA(),_v.current=s,un=r,Mi!==null?e=0:(Yi=null,ir=0,e=Fi)}if(e!==0){if(e===2&&(r=cb(i),r!==0&&(n=r,e=kb(i,r))),e===1)throw t=pm,Mu(i,0),Ol(i,n),us(i,fi()),t;if(e===6)Ol(i,n);else{if(r=i.current.alternate,!(n&30)&&!i4(r)&&(e=Mv(i,n),e===2&&(s=cb(i),s!==0&&(n=s,e=kb(i,s))),e===1))throw t=pm,Mu(i,0),Ol(i,n),us(i,fi()),t;switch(i.finishedWork=r,i.finishedLanes=n,e){case 0:case 1:throw Error(Ze(345));case 2:su(i,rs,Ua);break;case 3:if(Ol(i,n),(n&130023424)===n&&(e=yA+500-fi(),10<e)){if(sv(i,0)!==0)break;if(r=i.suspendedLanes,(r&n)!==n){Yr(),i.pingedLanes|=i.suspendedLanes&r;break}i.timeoutHandle=xb(su.bind(null,i,rs,Ua),e);break}su(i,rs,Ua);break;case 4:if(Ol(i,n),(n&4194240)===n)break;for(e=i.eventTimes,r=-1;0<n;){var o=31-Ho(n);s=1<<o,o=e[o],o>r&&(r=o),n&=~s}if(n=r,n=fi()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*n4(n/1960))-n,10<n){i.timeoutHandle=xb(su.bind(null,i,rs,Ua),n);break}su(i,rs,Ua);break;case 5:su(i,rs,Ua);break;default:throw Error(Ze(329))}}}return us(i,fi()),i.callbackNode===t?VI.bind(null,i):null}function kb(i,e){var t=Rp;return i.current.memoizedState.isDehydrated&&(Mu(i,e).flags|=256),i=Mv(i,e),i!==2&&(e=rs,rs=t,e!==null&&Ob(e)),i}function Ob(i){rs===null?rs=i:rs.push.apply(rs,i)}function i4(i){for(var e=i;;){if(e.flags&16384){var t=e.updateQueue;if(t!==null&&(t=t.stores,t!==null))for(var n=0;n<t.length;n++){var r=t[n],s=r.getSnapshot;r=r.value;try{if(!Vo(s(),r))return!1}catch{return!1}}}if(t=e.child,e.subtreeFlags&16384&&t!==null)t.return=e,e=t;else{if(e===i)break;for(;e.sibling===null;){if(e.return===null||e.return===i)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Ol(i,e){for(e&=~vA,e&=~zy,i.suspendedLanes|=e,i.pingedLanes&=~e,i=i.expirationTimes;0<e;){var t=31-Ho(e),n=1<<t;i[t]=-1,e&=~n}}function FC(i){if(un&6)throw Error(Ze(327));bf();var e=sv(i,0);if(!(e&1))return us(i,fi()),null;var t=Mv(i,e);if(i.tag!==0&&t===2){var n=cb(i);n!==0&&(e=n,t=kb(i,n))}if(t===1)throw t=pm,Mu(i,0),Ol(i,e),us(i,fi()),t;if(t===6)throw Error(Ze(345));return i.finishedWork=i.current.alternate,i.finishedLanes=e,su(i,rs,Ua),us(i,fi()),null}function _A(i,e){var t=un;un|=1;try{return i(e)}finally{un=t,un===0&&(Uf=fi()+500,Ny&&Mc())}}function zu(i){Hl!==null&&Hl.tag===0&&!(un&6)&&bf();var e=un;un|=1;var t=xo.transition,n=Mn;try{if(xo.transition=null,Mn=1,i)return i()}finally{Mn=n,xo.transition=t,un=e,!(un&6)&&Mc()}}function SA(){As=uf.current,kn(uf)}function Mu(i,e){i.finishedWork=null,i.finishedLanes=0;var t=i.timeoutHandle;if(t!==-1&&(i.timeoutHandle=-1,BO(t)),Mi!==null)for(t=Mi.return;t!==null;){var n=t;switch(tA(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&uv();break;case 3:kf(),kn(ls),kn(wr),uA();break;case 5:cA(n);break;case 4:kf();break;case 13:kn(Jn);break;case 19:kn(Jn);break;case 10:sA(n.type._context);break;case 22:case 23:SA()}t=t.return}if(Yi=i,Mi=i=rc(i.current,null),ir=As=e,Fi=0,pm=null,vA=zy=Uu=0,rs=Rp=null,hu!==null){for(e=0;e<hu.length;e++)if(t=hu[e],n=t.interleaved,n!==null){t.interleaved=null;var r=n.next,s=t.pending;if(s!==null){var o=s.next;s.next=r,n.next=o}t.pending=n}hu=null}return i}function XI(i,e){do{var t=Mi;try{if(rA(),Fx.current=yv,vv){for(var n=Qn.memoizedState;n!==null;){var r=n.queue;r!==null&&(r.pending=null),n=n.next}vv=!1}if(Ou=0,Xi=Ii=Qn=null,Ep=!1,dm=0,xA.current=null,t===null||t.return===null){Fi=1,pm=e,Mi=null;break}e:{var s=i,o=t.return,a=t,l=e;if(e=ir,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,d=u.tag;if(!(u.mode&1)&&(d===0||d===11||d===15)){var p=u.alternate;p?(u.updateQueue=p.updateQueue,u.memoizedState=p.memoizedState,u.lanes=p.lanes):(u.updateQueue=null,u.memoizedState=null)}var m=bC(o);if(m!==null){m.flags&=-257,MC(m,o,a,s,e),m.mode&1&&SC(s,c,e),e=m,l=c;var x=e.updateQueue;if(x===null){var v=new Set;v.add(l),e.updateQueue=v}else x.add(l);break e}else{if(!(e&1)){SC(s,c,e),bA();break e}l=Error(Ze(426))}}else if(zn&&a.mode&1){var _=bC(o);if(_!==null){!(_.flags&65536)&&(_.flags|=256),MC(_,o,a,s,e),nA(Of(l,a));break e}}s=l=Of(l,a),Fi!==4&&(Fi=2),Rp===null?Rp=[s]:Rp.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var g=RI(s,l,e);mC(s,g);break e;case 1:a=l;var S=s.type,b=s.stateNode;if(!(s.flags&128)&&(typeof S.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(nc===null||!nc.has(b)))){s.flags|=65536,e&=-e,s.lanes|=e;var A=PI(s,a,e);mC(s,A);break e}}s=s.return}while(s!==null)}KI(t)}catch(w){e=w,Mi===t&&t!==null&&(Mi=t=t.return);continue}break}while(!0)}function YI(){var i=_v.current;return _v.current=yv,i===null?yv:i}function bA(){(Fi===0||Fi===3||Fi===2)&&(Fi=4),Yi===null||!(Uu&268435455)&&!(zy&268435455)||Ol(Yi,ir)}function Mv(i,e){var t=un;un|=2;var n=YI();(Yi!==i||ir!==e)&&(Ua=null,Mu(i,e));do try{r4();break}catch(r){XI(i,r)}while(!0);if(rA(),un=t,_v.current=n,Mi!==null)throw Error(Ze(261));return Yi=null,ir=0,Fi}function r4(){for(;Mi!==null;)JI(Mi)}function s4(){for(;Mi!==null&&!Pk();)JI(Mi)}function JI(i){var e=ZI(i.alternate,i,As);i.memoizedProps=i.pendingProps,e===null?KI(i):Mi=e,xA.current=null}function KI(i){var e=i;do{var t=e.alternate;if(i=e.return,e.flags&32768){if(t=QO(t,e),t!==null){t.flags&=32767,Mi=t;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Fi=6,Mi=null;return}}else if(t=ZO(t,e,As),t!==null){Mi=t;return}if(e=e.sibling,e!==null){Mi=e;return}Mi=e=i}while(e!==null);Fi===0&&(Fi=5)}function su(i,e,t){var n=Mn,r=xo.transition;try{xo.transition=null,Mn=1,o4(i,e,t,n)}finally{xo.transition=r,Mn=n}return null}function o4(i,e,t,n){do bf();while(Hl!==null);if(un&6)throw Error(Ze(327));t=i.finishedWork;var r=i.finishedLanes;if(t===null)return null;if(i.finishedWork=null,i.finishedLanes=0,t===i.current)throw Error(Ze(177));i.callbackNode=null,i.callbackPriority=0;var s=t.lanes|t.childLanes;if(zk(i,s),i===Yi&&(Mi=Yi=null,ir=0),!(t.subtreeFlags&2064)&&!(t.flags&2064)||ug||(ug=!0,QI(rv,function(){return bf(),null})),s=(t.flags&15990)!==0,t.subtreeFlags&15990||s){s=xo.transition,xo.transition=null;var o=Mn;Mn=1;var a=un;un|=4,xA.current=null,e4(i,t),jI(t,i),TO(mb),ov=!!pb,mb=pb=null,i.current=t,t4(t),Ik(),un=a,Mn=o,xo.transition=s}else i.current=t;if(ug&&(ug=!1,Hl=i,bv=r),s=i.pendingLanes,s===0&&(nc=null),Dk(t.stateNode),us(i,fi()),e!==null)for(n=i.onRecoverableError,t=0;t<e.length;t++)r=e[t],n(r.value,{componentStack:r.stack,digest:r.digest});if(Sv)throw Sv=!1,i=Fb,Fb=null,i;return bv&1&&i.tag!==0&&bf(),s=i.pendingLanes,s&1?i===Nb?Pp++:(Pp=0,Nb=i):Pp=0,Mc(),null}function bf(){if(Hl!==null){var i=RP(bv),e=xo.transition,t=Mn;try{if(xo.transition=null,Mn=16>i?16:i,Hl===null)var n=!1;else{if(i=Hl,Hl=null,bv=0,un&6)throw Error(Ze(331));var r=un;for(un|=4,mt=i.current;mt!==null;){var s=mt,o=s.child;if(mt.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(mt=c;mt!==null;){var u=mt;switch(u.tag){case 0:case 11:case 15:Cp(8,u,s)}var d=u.child;if(d!==null)d.return=u,mt=d;else for(;mt!==null;){u=mt;var p=u.sibling,m=u.return;if(zI(u),u===c){mt=null;break}if(p!==null){p.return=m,mt=p;break}mt=m}}}var x=s.alternate;if(x!==null){var v=x.child;if(v!==null){x.child=null;do{var _=v.sibling;v.sibling=null,v=_}while(v!==null)}}mt=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,mt=o;else e:for(;mt!==null;){if(s=mt,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Cp(9,s,s.return)}var g=s.sibling;if(g!==null){g.return=s.return,mt=g;break e}mt=s.return}}var S=i.current;for(mt=S;mt!==null;){o=mt;var b=o.child;if(o.subtreeFlags&2064&&b!==null)b.return=o,mt=b;else e:for(o=S;mt!==null;){if(a=mt,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Uy(9,a)}}catch(w){ii(a,a.return,w)}if(a===o){mt=null;break e}var A=a.sibling;if(A!==null){A.return=a.return,mt=A;break e}mt=a.return}}if(un=r,Mc(),ga&&typeof ga.onPostCommitFiberRoot=="function")try{ga.onPostCommitFiberRoot(Iy,i)}catch{}n=!0}return n}finally{Mn=t,xo.transition=e}}return!1}function NC(i,e,t){e=Of(t,e),e=RI(i,e,1),i=tc(i,e,1),e=Yr(),i!==null&&(Om(i,1,e),us(i,e))}function ii(i,e,t){if(i.tag===3)NC(i,i,t);else for(;e!==null;){if(e.tag===3){NC(e,i,t);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(nc===null||!nc.has(n))){i=Of(t,i),i=PI(e,i,1),e=tc(e,i,1),i=Yr(),e!==null&&(Om(e,1,i),us(e,i));break}}e=e.return}}function a4(i,e,t){var n=i.pingCache;n!==null&&n.delete(e),e=Yr(),i.pingedLanes|=i.suspendedLanes&t,Yi===i&&(ir&t)===t&&(Fi===4||Fi===3&&(ir&130023424)===ir&&500>fi()-yA?Mu(i,0):vA|=t),us(i,e)}function qI(i,e){e===0&&(i.mode&1?(e=eg,eg<<=1,!(eg&130023424)&&(eg=4194304)):e=1);var t=Yr();i=il(i,e),i!==null&&(Om(i,e,t),us(i,t))}function l4(i){var e=i.memoizedState,t=0;e!==null&&(t=e.retryLane),qI(i,t)}function c4(i,e){var t=0;switch(i.tag){case 13:var n=i.stateNode,r=i.memoizedState;r!==null&&(t=r.retryLane);break;case 19:n=i.stateNode;break;default:throw Error(Ze(314))}n!==null&&n.delete(e),qI(i,t)}var ZI;ZI=function(i,e,t){if(i!==null)if(i.memoizedProps!==e.pendingProps||ls.current)os=!0;else{if(!(i.lanes&t)&&!(e.flags&128))return os=!1,qO(i,e,t);os=!!(i.flags&131072)}else os=!1,zn&&e.flags&1048576&&tI(e,hv,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;kx(i,e),i=e.pendingProps;var r=Df(e,wr.current);Sf(e,t),r=fA(null,e,n,i,r,t);var s=hA();return e.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,cs(n)?(s=!0,dv(e)):s=!1,e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,aA(e),r.updater=Oy,e.stateNode=r,r._reactInternals=e,Ab(e,n,i,t),e=Eb(null,e,n,!0,s,t)):(e.tag=0,zn&&s&&eA(e),Or(null,e,r,t),e=e.child),e;case 16:n=e.elementType;e:{switch(kx(i,e),i=e.pendingProps,r=n._init,n=r(n._payload),e.type=n,r=e.tag=d4(n),i=Fo(n,i),r){case 0:e=Tb(null,e,n,i,t);break e;case 1:e=TC(null,e,n,i,t);break e;case 11:e=AC(null,e,n,i,t);break e;case 14:e=wC(null,e,n,Fo(n.type,i),t);break e}throw Error(Ze(306,n,""))}return e;case 0:return n=e.type,r=e.pendingProps,r=e.elementType===n?r:Fo(n,r),Tb(i,e,n,r,t);case 1:return n=e.type,r=e.pendingProps,r=e.elementType===n?r:Fo(n,r),TC(i,e,n,r,t);case 3:e:{if(DI(e),i===null)throw Error(Ze(387));n=e.pendingProps,s=e.memoizedState,r=s.element,aI(i,e),gv(e,n,null,t);var o=e.memoizedState;if(n=o.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){r=Of(Error(Ze(423)),e),e=EC(i,e,n,t,r);break e}else if(n!==r){r=Of(Error(Ze(424)),e),e=EC(i,e,n,t,r);break e}else for(Ls=ec(e.stateNode.containerInfo.firstChild),Os=e,zn=!0,ko=null,t=sI(e,null,n,t),e.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(Ff(),n===r){e=rl(i,e,t);break e}Or(i,e,n,t)}e=e.child}return e;case 5:return lI(e),i===null&&Sb(e),n=e.type,r=e.pendingProps,s=i!==null?i.memoizedProps:null,o=r.children,gb(n,r)?o=null:s!==null&&gb(n,s)&&(e.flags|=32),BI(i,e),Or(i,e,o,t),e.child;case 6:return i===null&&Sb(e),null;case 13:return FI(i,e,t);case 4:return lA(e,e.stateNode.containerInfo),n=e.pendingProps,i===null?e.child=Nf(e,null,n,t):Or(i,e,n,t),e.child;case 11:return n=e.type,r=e.pendingProps,r=e.elementType===n?r:Fo(n,r),AC(i,e,n,r,t);case 7:return Or(i,e,e.pendingProps,t),e.child;case 8:return Or(i,e,e.pendingProps.children,t),e.child;case 12:return Or(i,e,e.pendingProps.children,t),e.child;
vendor: 4,552 bytes, line 40
40case 10:e:{if(n=e.type._context,r=e.pendingProps,s=e.memoizedProps,o=r.value,Ln(pv,n._currentValue),n._currentValue=o,s!==null)if(Vo(s.value,o)){if(s.children===r.children&&!ls.current){e=rl(i,e,t);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(s.tag===1){l=Za(-1,t&-t),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}s.lanes|=t,l=s.alternate,l!==null&&(l.lanes|=t),bb(s.return,t,e),a.lanes|=t;break}l=l.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(Ze(341));o.lanes|=t,a=o.alternate,a!==null&&(a.lanes|=t),bb(o,t,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Or(i,e,r.children,t),e=e.child}return e;case 9:return r=e.type,n=e.pendingProps.children,Sf(e,t),r=yo(r),n=n(r),e.flags|=1,Or(i,e,n,t),e.child;case 14:return n=e.type,r=Fo(n,e.pendingProps),r=Fo(n.type,r),wC(i,e,n,r,t);case 15:return II(i,e,e.type,e.pendingProps,t);case 17:return n=e.type,r=e.pendingProps,r=e.elementType===n?r:Fo(n,r),kx(i,e),e.tag=1,cs(n)?(i=!0,dv(e)):i=!1,Sf(e,t),CI(e,n,r),Ab(e,n,r,t),Eb(null,e,n,!0,i,t);case 19:return NI(i,e,t);case 22:return LI(i,e,t)}throw Error(Ze(156,e.tag))};function QI(i,e){return wP(i,e)}function u4(i,e,t,n){this.tag=i,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function po(i,e,t,n){return new u4(i,e,t,n)}function MA(i){return i=i.prototype,!(!i||!i.isReactComponent)}function d4(i){if(typeof i=="function")return MA(i)?1:0;if(i!=null){if(i=i.$$typeof,i===GM)return 11;if(i===jM)return 14}return 2}function rc(i,e){var t=i.alternate;return t===null?(t=po(i.tag,e,i.key,i.mode),t.elementType=i.elementType,t.type=i.type,t.stateNode=i.stateNode,t.alternate=i,i.alternate=t):(t.pendingProps=e,t.type=i.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=i.flags&14680064,t.childLanes=i.childLanes,t.lanes=i.lanes,t.child=i.child,t.memoizedProps=i.memoizedProps,t.memoizedState=i.memoizedState,t.updateQueue=i.updateQueue,e=i.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},t.sibling=i.sibling,t.index=i.index,t.ref=i.ref,t}function zx(i,e,t,n,r,s){var o=2;if(n=i,typeof i=="function")MA(i)&&(o=1);else if(typeof i=="string")o=5;else e:switch(i){case $d:return Au(t.children,r,s,e);case HM:o=8,r|=8;break;case JS:return i=po(12,t,e,r|2),i.elementType=JS,i.lanes=s,i;case KS:return i=po(13,t,e,r),i.elementType=KS,i.lanes=s,i;case qS:return i=po(19,t,e,r),i.elementType=qS,i.lanes=s,i;case lP:return Hy(t,r,s,e);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case oP:o=10;break e;case aP:o=9;break e;case GM:o=11;break e;case jM:o=14;break e;case Fl:o=16,n=null;break e}throw Error(Ze(130,i==null?i:typeof i,""))}return e=po(o,t,e,r),e.elementType=i,e.type=n,e.lanes=s,e}function Au(i,e,t,n){return i=po(7,i,n,e),i.lanes=t,i}function Hy(i,e,t,n){return i=po(22,i,n,e),i.elementType=lP,i.lanes=t,i.stateNode={isHidden:!1},i}function p2(i,e,t){return i=po(6,i,null,e),i.lanes=t,i}function m2(i,e,t){return e=po(4,i.children!==null?i.children:[],i.key,e),e.lanes=t,e.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},e}function f4(i,e,t,n,r){this.tag=e,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=K_(0),this.expirationTimes=K_(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=K_(0),this.identifierPrefix=n,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function AA(i,e,t,n,r,s,o,a,l){return i=new f4(i,e,t,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=po(3,null,null,e),i.current=s,s.stateNode=i,s.memoizedState={element:n,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},aA(s),i}function h4(i,e,t){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;
vendor: 4,595 bytes, line 40
40return{$$typeof:Qd,key:n==null?null:""+n,children:i,containerInfo:e,implementation:t}}function $I(i){if(!i)return fc;i=i._reactInternals;e:{if($u(i)!==i||i.tag!==1)throw Error(Ze(170));var e=i;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(cs(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(Ze(171))}if(i.tag===1){var t=i.type;if(cs(t))return $P(i,t,e)}return e}function eL(i,e,t,n,r,s,o,a,l){return i=AA(t,n,!0,i,r,s,o,a,l),i.context=$I(null),t=i.current,n=Yr(),r=ic(t),s=Za(n,r),s.callback=e??null,tc(t,s,r),i.current.lanes=r,Om(i,r,n),us(i,n),i}function Gy(i,e,t,n){var r=e.current,s=Yr(),o=ic(r);return t=$I(t),e.context===null?e.context=t:e.pendingContext=t,e=Za(s,o),e.payload={element:i},n=n===void 0?null:n,n!==null&&(e.callback=n),i=tc(r,e,o),i!==null&&(Go(i,r,o,s),Dx(i,r,o)),o}function Av(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return i.child.stateNode;default:return i.child.stateNode}}function kC(i,e){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var t=i.retryLane;i.retryLane=t!==0&&t<e?t:e}}function wA(i,e){kC(i,e),(i=i.alternate)&&kC(i,e)}function p4(){return null}var tL=typeof reportError=="function"?reportError:function(i){console.error(i)};function TA(i){this._internalRoot=i}jy.prototype.render=TA.prototype.render=function(i){var e=this._internalRoot;if(e===null)throw Error(Ze(409));Gy(i,e,null,null)};jy.prototype.unmount=TA.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var e=i.containerInfo;zu(function(){Gy(null,i,null,null)}),e[nl]=null}};function jy(i){this._internalRoot=i}jy.prototype.unstable_scheduleHydration=function(i){if(i){var e=LP();i={blockedOn:null,target:i,priority:e};for(var t=0;t<kl.length&&e!==0&&e<kl[t].priority;t++);kl.splice(t,0,i),t===0&&DP(i)}};function EA(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Wy(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function OC(){}function m4(i,e,t,n,r){if(r){if(typeof n=="function"){var s=n;n=function(){var c=Av(o);s.call(c)}}var o=eL(e,n,i,0,null,!1,!1,"",OC);return i._reactRootContainer=o,i[nl]=o.current,om(i.nodeType===8?i.parentNode:i),zu(),o}for(;r=i.lastChild;)i.removeChild(r);if(typeof n=="function"){var a=n;n=function(){var c=Av(l);a.call(c)}}var l=AA(i,0,!1,null,null,!1,!1,"",OC);return i._reactRootContainer=l,i[nl]=l.current,om(i.nodeType===8?i.parentNode:i),zu(function(){Gy(e,l,t,n)}),l}function Vy(i,e,t,n,r){var s=t._reactRootContainer;if(s){var o=s;if(typeof r=="function"){var a=r;r=function(){var l=Av(o);a.call(l)}}Gy(e,o,i,r)}else o=m4(t,e,i,r,n);return Av(o)}PP=function(i){switch(i.tag){case 3:var e=i.stateNode;if(e.current.memoizedState.isDehydrated){var t=up(e.pendingLanes);t!==0&&(XM(e,t|1),us(e,fi()),!(un&6)&&(Uf=fi()+500,Mc()))}break;case 13:zu(function(){var n=il(i,1);if(n!==null){var r=Yr();Go(n,i,1,r)}}),wA(i,1)}};YM=function(i){if(i.tag===13){var e=il(i,134217728);if(e!==null){var t=Yr();Go(e,i,134217728,t)}wA(i,134217728)}};IP=function(i){if(i.tag===13){var e=ic(i),t=il(i,e);if(t!==null){var n=Yr();Go(t,i,e,n)}wA(i,e)}};LP=function(){return Mn};BP=function(i,e){var t=Mn;try{return Mn=i,e()}finally{Mn=t}};ob=function(i,e,t){switch(e){case"input":if($S(i,t),e=t.name,t.type==="radio"&&e!=null){for(t=i;t.parentNode;)t=t.parentNode;for(t=t.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<t.length;e++){var n=t[e];if(n!==i&&n.form===i.form){var r=Fy(n);if(!r)throw Error(Ze(90));uP(n),$S(n,r)}}}break;case"textarea":fP(i,t);break;case"select":e=t.value,e!=null&&xf(i,!!t.multiple,e,!1)}};yP=_A;_P=zu;var g4={usingClientEntryPoint:!1,Events:[zm,rf,Fy,xP,vP,_A]},zh={findFiberByHostInstance:fu,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},x4={bundleType:zh.bundleType,version:zh.version,rendererPackageName:zh.rendererPackageName,rendererConfig:zh.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ul.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=MP(i),i===null?null:i.stateNode},findFiberByHostInstance:zh.findFiberByHostInstance||p4,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
40if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var dg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!dg.isDisabled&&dg.supportsFiber)try{Iy=dg.inject(x4),ga=dg}catch{}}Js.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=g4;Js.createPortal=function(i,e){var t=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!EA(e))throw Error(Ze(200));return h4(i,e,null,t)};Js.createRoot=function(i,e){if(!EA(i))throw Error(Ze(299));var t=!1,n="",r=tL;return e!=null&&(e.unstable_strictMode===!0&&(t=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onRecoverableError!==void 0&&(r=e.onRecoverableError)),e=AA(i,1,!1,null,null,t,!1,n,r),i[nl]=e.current,om(i.nodeType===8?i.parentNode:i),new TA(e)};Js.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var e=i._reactInternals;if(e===void 0)throw typeof i.render=="function"?Error(Ze(188)):(i=Object.keys(i).join(","),Error(Ze(268,i)));return i=MP(e),i=i===null?null:i.stateNode,i};Js.flushSync=function(i){return zu(i)};Js.hydrate=function(i,e,t){if(!Wy(e))throw Error(Ze(200));return Vy(null,i,e,!0,t)};Js.hydrateRoot=function(i,e,t){if(!EA(i))throw Error(Ze(405));var n=t!=null&&t.hydratedSources||null,r=!1,s="",o=tL;if(t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),e=eL(e,null,i,1,t??null,r,!1,s,o),i[nl]=e.current,om(i),n)for(i=0;i<n.length;i++)t=n[i],r=t._getVersion,r=r(t._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[t,r]:e.mutableSourceEagerHydrationData.push(t,r);return new jy(e)};Js.render=function(i,e,t){if(!Wy(e))throw Error(Ze(200));return Vy(null,i,e,!1,t)};Js.unmountComponentAtNode=function(i){if(!Wy(i))throw Error(Ze(40));return i._reactRootContainer?(zu(function(){Vy(null,null,i,!1,function(){i._reactRootContainer=null,i[nl]=null})}),!0):!1};Js.unstable_batchedUpdates=_A;Js.unstable_renderSubtreeIntoContainer=function(i,e,t,n){if(!Wy(t))throw Error(Ze(200));if(i==null||i._reactInternals===void 0)throw Error(Ze(38));return Vy(i,e,t,!1,n)};Js.version="18.3.1-next-f1338f8080-20240426";function nL(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(nL)}catch(i){console.error(i)}}nL(),nP.exports=Js;var v4=nP.exports,iL,UC=v4;iL=XS.createRoot=UC.createRoot,XS.hydrateRoot=UC.hydrateRoot;var y4=()=>{window.va||(window.va=function(...e){window.vaq||(window.vaq=[]),window.vaq.push(e)})},_4="@vercel/analytics",S4="2.0.1";function rL(){return typeof window<"u"}function sL(){try{const i="production"}catch{}return"production"}function b4(i="auto"){if(i==="auto"){window.vam=sL();return}window.vam=i}function M4(){return(rL()?window.vam:sL())||"production"}function CA(){return M4()==="development"}function A4(i){return i.scriptSrc?df(i.scriptSrc):CA()?"https://va.vercel-scripts.com/v1/script.debug.js":i.basePath?df(`${i.basePath}/insights/script.js`):"/_vercel/insights/script.js"}function w4(i,e){var t;let n=i;if(e)try{n={...(t=JSON.parse(e))==null?void 0:t.analytics,...i}}catch{}b4(n.mode);const r={sdkn:_4+(n.framework?`/${n.framework}`:""),sdkv:S4};return n.disableAutoTrack&&(r.disableAutoTrack="1"),n.viewEndpoint&&(r.viewEndpoint=df(n.viewEndpoint)),n.eventEndpoint&&(r.eventEndpoint=df(n.eventEndpoint)),n.sessionEndpoint&&(r.sessionEndpoint=df(n.sessionEndpoint)),CA()&&n.debug===!1&&(r.debug="false"),n.dsn&&(r.dsn=n.dsn),n.endpoint?r.endpoint=n.endpoint:n.basePath&&(r.endpoint=df(`${n.basePath}/insights`)),{beforeSend:n.beforeSend,src:A4(n),dataset:r}}function df(i){return i.startsWith("http://")||i.startsWith("https://")||i.startsWith("/")?i:`/${i}`}function T4(i={debug:!0},e){var t;if(!rL())return;const{beforeSend:n,src:r,dataset:s}=w4(i,e);if(y4(),n&&((t=window.va)==null||t.call(window,"beforeSend",n)),document.head.querySelector(`script[src*="${r}"]`))return;const o=document.createElement("script");o.src=r;for(const[a,l]of Object.entries(s))o.dataset[a]=l;o.defer=!0,o.onerror=()=>{const a=CA()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log(`[Vercel Web Analytics] Failed to load script from ${r}. ${a}`)},document.head.appendChild(o)}function za(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function oL(i,e){i.prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e}/*! 41 * GSAP 3.14.2 42 * https://gsap.com 43 * 44 * @license Copyright 2008-2025, GreenSock. All rights reserved. 45 * Subject to the terms at https://gsap.com/standard-license 46 * @author: Jack Doyle, [email protected] 47*/var Us={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},zf={duration:.5,overwrite:!1,delay:0},RA,rr,Hn,mo=1e8,Rn=1/mo,Ub=Math.PI*2,E4=Ub/4,C4=0,aL=Math.sqrt,R4=Math.cos,P4=Math.sin,Ji=function(e){return typeof e=="string"},ri=function(e){return typeof e=="function"},sl=function(e){return typeof e=="number"},PA=function(e){return typeof e>"u"},ya=function(e){return typeof e=="object"},ds=function(e){return e!==!1},IA=function(){return typeof window<"u"},fg=function(e){return ri(e)||Ji(e)},lL=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},Ar=Array.isArray,I4=/random\([^)]+\)/g,L4=/,\s*/g,zC=/(?:-?\.?\d|\.)+/gi,cL=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,ff
vendor: 4,483 bytes, line 47
47=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,g2=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,uL=/[+-]=-?[.\d]+/,B4=/[^,'"\[\]\s]+/gi,D4=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Kn,la,zb,LA,Vs={},wv={},dL,fL=function(e){return(wv=Hf(e,Vs))&&ms},BA=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},mm=function(e,t){return!t&&console.warn(e)},hL=function(e,t){return e&&(Vs[e]=t)&&wv&&(wv[e]=t)||Vs},gm=function(){return 0},F4={suppressEvents:!0,isStart:!0,kill:!1},Hx={suppressEvents:!0,kill:!1},N4={suppressEvents:!0},DA={},sc=[],Hb={},pL,Ts={},x2={},HC=30,Gx=[],FA="",NA=function(e){var t=e[0],n,r;if(ya(t)||ri(t)||(e=[e]),!(n=(t._gsap||{}).harness)){for(r=Gx.length;r--&&!Gx[r].targetTest(t););n=Gx[r]}for(r=e.length;r--;)e[r]&&(e[r]._gsap||(e[r]._gsap=new OL(e[r],n)))||e.splice(r,1);return e},wu=function(e){return e._gsap||NA(go(e))[0]._gsap},mL=function(e,t,n){return(n=e[t])&&ri(n)?e[t]():PA(n)&&e.getAttribute&&e.getAttribute(t)||n},fs=function(e,t){return(e=e.split(",")).forEach(t)||e},di=function(e){return Math.round(e*1e5)/1e5||0},Yn=function(e){return Math.round(e*1e7)/1e7||0},Mf=function(e,t){var n=t.charAt(0),r=parseFloat(t.substr(2));return e=parseFloat(e),n==="+"?e+r:n==="-"?e-r:n==="*"?e*r:e/r},k4=function(e,t){for(var n=t.length,r=0;e.indexOf(t[r])<0&&++r<n;);return r<n},Tv=function(){var e=sc.length,t=sc.slice(0),n,r;for(Hb={},sc.length=0,n=0;n<e;n++)r=t[n],r&&r._lazy&&(r.render(r._lazy[0],r._lazy[1],!0)._lazy=0)},kA=function(e){return!!(e._initted||e._startAt||e.add)},gL=function(e,t,n,r){sc.length&&!rr&&Tv(),e.render(t,n,!!(rr&&t<0&&kA(e))),sc.length&&!rr&&Tv()},xL=function(e){var t=parseFloat(e);return(t||t===0)&&(e+"").match(B4).length<2?t:Ji(e)?e.trim():e},vL=function(e){return e},Xs=function(e,t){for(var n in t)n in e||(e[n]=t[n]);return e},O4=function(e){return function(t,n){for(var r in n)r in t||r==="duration"&&e||r==="ease"||(t[r]=n[r])}},Hf=function(e,t){for(var n in t)e[n]=t[n];return e},GC=function i(e,t){for(var n in t)n!=="__proto__"&&n!=="constructor"&&n!=="prototype"&&(e[n]=ya(t[n])?i(e[n]||(e[n]={}),t[n]):t[n]);return e},Ev=function(e,t){var n={},r;for(r in e)r in t||(n[r]=e[r]);return n},Ip=function(e){var t=e.parent||Kn,n=e.keyframes?O4(Ar(e.keyframes)):Xs;if(ds(e.inherit))for(;t;)n(e,t.vars.defaults),t=t.parent||t._dp;return e},U4=function(e,t){for(var n=e.length,r=n===t.length;r&&n--&&e[n]===t[n];);return n<0},yL=function(e,t,n,r,s){var o=e[r],a;if(s)for(a=t[s];o&&o[s]>a;)o=o._prev;return o?(t._next=o._next,o._next=t):(t._next=e[n],e[n]=t),t._next?t._next._prev=t:e[r]=t,t._prev=o,t.parent=t._dp=e,t},Xy=function(e,t,n,r){n===void 0&&(n="_first"),r===void 0&&(r="_last");var s=t._prev,o=t._next;s?s._next=o:e[n]===t&&(e[n]=o),o?o._prev=s:e[r]===t&&(e[r]=s),t._next=t._prev=t.parent=null},hc=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},Tu=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var n=e;n;)n._dirty=1,n=n.parent;return e},z4=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},Gb=function(e,t,n,r){return e._startAt&&(rr?e._startAt.revert(Hx):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,r))},H4=function i(e){return!e||e._ts&&i(e.parent)},jC=function(e){return e._repeat?Gf(e._tTime,e=e.duration()+e._rDelay)*e:0},Gf=function(e,t){var n=Math.floor(e=Yn(e/t));return e&&n===e?n-1:n},Cv=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},Yy=function(e){return e._end=Yn(e._start+(e._tDur/Math.abs(e._ts||e._rts||Rn)||0))},Jy=function(e,t){var n=e._dp;return n&&n.smoothChildTiming&&e._ts&&(e._start=Yn(n._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),Yy(e),n._dirty||Tu(n,e)),e},_L=function(e,t){var n;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(n=Cv(e.rawTime(),t),(!t._dur||Gm(0,t.totalDuration(),n)-t._tTime>Rn)&&t.render(n,!0)),Tu(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(n=e;n._dp;)n.rawTime()>=0&&n.totalTime(n._tTime),n=n._dp;e._zTime=-Rn}},da=function(e,t,n,r){return t.parent&&hc(t),t._start=Yn((sl(n)?n:n||e!==Kn?oo(e,n,t):e._time)+t._delay),t._end=Yn(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),yL(e,t,"_first","_last",e._sort?"_start":0),jb(t)||(e._recent=t),r||_L(e,t),e._ts<0&&Jy(e,e._tTime),e},SL=function(e,t){return(Vs.ScrollTrigger||BA("scrollTrigger",t))&&Vs.ScrollTrigger.create(t,e)}
vendor: 5,547 bytes, line 47
47,bL=function(e,t,n,r,s){if(UA(e,t,s),!e._initted)return 1;if(!n&&e._pt&&!rr&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&pL!==Ps.frame)return sc.push(e),e._lazy=[s,r],1},G4=function i(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||i(t))},jb=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},j4=function(e,t,n,r){var s=e.ratio,o=t<0||!t&&(!e._start&&G4(e)&&!(!e._initted&&jb(e))||(e._ts<0||e._dp._ts<0)&&!jb(e))?0:1,a=e._rDelay,l=0,c,u,d;if(a&&e._repeat&&(l=Gm(0,e._tDur,t),u=Gf(l,a),e._yoyo&&u&1&&(o=1-o),u!==Gf(e._tTime,a)&&(s=1-o,e.vars.repeatRefresh&&e._initted&&e.invalidate())),o!==s||rr||r||e._zTime===Rn||!t&&e._zTime){if(!e._initted&&bL(e,t,r,n,l))return;for(d=e._zTime,e._zTime=t||(n?Rn:0),n||(n=t&&!d),e.ratio=o,e._from&&(o=1-o),e._time=0,e._tTime=l,c=e._pt;c;)c.r(o,c.d),c=c._next;t<0&&Gb(e,t,n,!0),e._onUpdate&&!n&&Bs(e,"onUpdate"),l&&e._repeat&&!n&&e.parent&&Bs(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===o&&(o&&hc(e,1),!n&&!rr&&(Bs(e,o?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},W4=function(e,t,n){var r;if(n>t)for(r=e._first;r&&r._start<=n;){if(r.data==="isPause"&&r._start>t)return r;r=r._next}else for(r=e._last;r&&r._start>=n;){if(r.data==="isPause"&&r._start<t)return r;r=r._prev}},jf=function(e,t,n,r){var s=e._repeat,o=Yn(t)||0,a=e._tTime/e._tDur;return a&&!r&&(e._time*=o/e._dur),e._dur=o,e._tDur=s?s<0?1e10:Yn(o*(s+1)+e._rDelay*s):o,a>0&&!r&&Jy(e,e._tTime=e._tDur*a),e.parent&&Yy(e),n||Tu(e.parent,e),e},WC=function(e){return e instanceof Hr?Tu(e):jf(e,e._dur)},V4={_start:0,endTime:gm,totalDuration:gm},oo=function i(e,t,n){var r=e.labels,s=e._recent||V4,o=e.duration()>=mo?s.endTime(!1):e._dur,a,l,c;return Ji(t)&&(isNaN(t)||t in r)?(l=t.charAt(0),c=t.substr(-1)==="%",a=t.indexOf("="),l==="<"||l===">"?(a>=0&&(t=t.replace(/=/,"")),(l==="<"?s._start:s.endTime(s._repeat>=0))+(parseFloat(t.substr(1))||0)*(c?(a<0?s:n).totalDuration()/100:1)):a<0?(t in r||(r[t]=o),r[t]):(l=parseFloat(t.charAt(a-1)+t.substr(a+1)),c&&n&&(l=l/100*(Ar(n)?n[0]:n).totalDuration()),a>1?i(e,t.substr(0,a-1),n)+l:o+l)):t==null?o:+t},Lp=function(e,t,n){var r=sl(t[1]),s=(r?2:1)+(e<2?0:1),o=t[s],a,l;if(r&&(o.duration=t[1]),o.parent=n,e){for(a=o,l=n;l&&!("immediateRender"in a);)a=l.vars.defaults||{},l=ds(l.vars.inherit)&&l.parent;o.immediateRender=ds(a.immediateRender),e<2?o.runBackwards=1:o.startAt=t[s-1]}return new bi(t[0],o,t[s+1])},Ac=function(e,t){return e||e===0?t(e):t},Gm=function(e,t,n){return n<e?e:n>t?t:n},Sr=function(e,t){return!Ji(e)||!(t=D4.exec(e))?"":t[1]},X4=function(e,t,n){return Ac(n,function(r){return Gm(e,t,r)})},Wb=[].slice,ML=function(e,t){return e&&ya(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&ya(e[0]))&&!e.nodeType&&e!==la},Y4=function(e,t,n){return n===void 0&&(n=[]),e.forEach(function(r){var s;return Ji(r)&&!t||ML(r,1)?(s=n).push.apply(s,go(r)):n.push(r)})||n},go=function(e,t,n){return Hn&&!t&&Hn.selector?Hn.selector(e):Ji(e)&&!n&&(zb||!Wf())?Wb.call((t||LA).querySelectorAll(e),0):Ar(e)?Y4(e,n):ML(e)?Wb.call(e,0):e?[e]:[]},Vb=function(e){return e=go(e)[0]||mm("Invalid scope")||{},function(t){var n=e.current||e.nativeElement||e;return go(t,n.querySelectorAll?n:n===e?mm("Invalid scope")||LA.createElement("div"):e)}},AL=function(e){return e.sort(function(){return .5-Math.random()})},wL=function(e){if(ri(e))return e;var t=ya(e)?e:{each:e},n=Eu(t.ease),r=t.from||0,s=parseFloat(t.base)||0,o={},a=r>0&&r<1,l=isNaN(r)||a,c=t.axis,u=r,d=r;return Ji(r)?u=d={center:.5,edges:.5,end:1}[r]||0:!a&&l&&(u=r[0],d=r[1]),function(p,m,x){var v=(x||t).length,_=o[v],g,S,b,A,w,C,P,B,R;if(!_){if(R=t.grid==="auto"?0:(t.grid||[1,mo])[1],!R){for(P=-mo;P<(P=x[R++].getBoundingClientRect().left)&&R<v;);R<v&&R--}for(_=o[v]=[],g=l?Math.min(R,v)*u-.5:r%R,S=R===mo?0:l?v*d/R-.5:r/R|0,P=0,B=mo,C=0;C<v;C++)b=C%R-g,A=S-(C/R|0),_[C]=w=c?Math.abs(c==="y"?A:b):aL(b*b+A*A),w>P&&(P=w),w<B&&(B=w);r==="random"&&AL(_),_.max=P-B,_.min=B,_.v=v=(parseFloat(t.amount)||parseFloat(t.each)*(R>v?v-1:c?c==="y"?v/R:R:Math.max(R,v/R))||0)*(r==="edges"?-1:1),_.b=v<0?s-v:s,_.u=Sr(t.amount||t.each)||0,n=n&&v<0?FL(n):n}return v=(_[p]-_.min)/_.max||0,Yn(_.b+(n?n(v):v)*_.v)+_.u}},Xb=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(n){var r=Yn(Math.round(parseFloat(n)/e)*e*t);return(r-r%1)/t+(sl(n)?0:Sr(n))}},TL=function(e,t){var n=Ar(e),r,s;return!n&&ya(e)&&(r=n=e.radius||mo,e.values?(e=go(e.values),(s=!sl(e[0]))&&(r*=r)):e=Xb(e.increment)),Ac(t,n?ri(e)?function(o){return s=e(o),Math.abs(s-o)<=r?s:o}:function(o){for(var a=parseFloat(s?o.x:o),l=parseFloat(s?o.y:0),c=mo,u=0,d=e.length,p,m;d--;)s?(p=e[d].x-a,m=e[d].y-l,p=p*p+m*m):p=Math.abs(e[d]-a),p<c&&(c=p,u=d);return u=!r||c<=r?e[u]:o,s||u===o||sl(o)?u:u+Sr(o)}:Xb(e))},EL=function(e,t,n,r){return Ac(Ar(e)?!t:n===!0?!!(n=0):!r,function(){return Ar(e)?e[~~(Math.random()*e.length)]:(n=n||1e-5)&&(r=n<1?Math.pow(10,(n+"").length-2):1)&&Math.floor(Math.round((e-n/2+Math.random()*(t-e+n*.99))/n)*n*r)/r})},J4=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduce(function(s,o){return o(s)},r)}},K4=function(e,t){return function(n){return e(parseFloat(n))+(t||Sr(n))}},q4=function(e,t,n){return RL(e,t,0,1,n)},CL=function(e,t,n){return Ac(n,function(r){return e[~~t(r)]})},Z4=function i(e,t,n){var r=t-e;return Ar(e)?CL(e,i(0,e.length),t):Ac(n,function(s){return(r+(s-e)%r)%r+e})},Q4=function i(e,t,n){var r=t-e,s=r*2;return Ar(e)?CL(e,i(0,e.length-1),t):Ac(n,function(o){return o=(s+(o-e)%s)%s||
vendor: 4,578 bytes, line 47
470,e+(o>r?s-o:o)})},xm=function(e){return e.replace(I4,function(t){var n=t.indexOf("[")+1,r=t.substring(n||7,n?t.indexOf("]"):t.length-1).split(L4);return EL(n?r:+r[0],n?0:+r[1],+r[2]||1e-5)})},RL=function(e,t,n,r,s){var o=t-e,a=r-n;return Ac(s,function(l){return n+((l-e)/o*a||0)})},$4=function i(e,t,n,r){var s=isNaN(e+t)?0:function(m){return(1-m)*e+m*t};if(!s){var o=Ji(e),a={},l,c,u,d,p;if(n===!0&&(r=1)&&(n=null),o)e={p:e},t={p:t};else if(Ar(e)&&!Ar(t)){for(u=[],d=e.length,p=d-2,c=1;c<d;c++)u.push(i(e[c-1],e[c]));d--,s=function(x){x*=d;var v=Math.min(p,~~x);return u[v](x-v)},n=t}else r||(e=Hf(Ar(e)?[]:{},e));if(!u){for(l in t)OA.call(a,e,l,"get",t[l]);s=function(x){return GA(x,a)||(o?e.p:e)}}}return Ac(n,s)},VC=function(e,t,n){var r=e.labels,s=mo,o,a,l;for(o in r)a=r[o]-t,a<0==!!n&&a&&s>(a=Math.abs(a))&&(l=o,s=a);return l},Bs=function(e,t,n){var r=e.vars,s=r[t],o=Hn,a=e._ctx,l,c,u;if(s)return l=r[t+"Params"],c=r.callbackScope||e,n&&sc.length&&Tv(),a&&(Hn=a),u=l?s.apply(c,l):s.call(c),Hn=o,u},fp=function(e){return hc(e),e.scrollTrigger&&e.scrollTrigger.kill(!!rr),e.progress()<1&&Bs(e,"onInterrupt"),e},hf,PL=[],IL=function(e){if(e)if(e=!e.name&&e.default||e,IA()||e.headless){var t=e.name,n=ri(e),r=t&&!n&&e.init?function(){this._props=[]}:e,s={init:gm,render:GA,add:OA,kill:mU,modifier:pU,rawVars:0},o={targetTest:0,get:0,getSetter:HA,aliases:{},register:0};if(Wf(),e!==r){if(Ts[t])return;Xs(r,Xs(Ev(e,s),o)),Hf(r.prototype,Hf(s,Ev(e,o))),Ts[r.prop=t]=r,e.targetTest&&(Gx.push(r),DA[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}hL(t,r),e.register&&e.register(ms,r,hs)}else PL.push(e)},Cn=255,hp={aqua:[0,Cn,Cn],lime:[0,Cn,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Cn],navy:[0,0,128],white:[Cn,Cn,Cn],olive:[128,128,0],yellow:[Cn,Cn,0],orange:[Cn,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Cn,0,0],pink:[Cn,192,203],cyan:[0,Cn,Cn],transparent:[Cn,Cn,Cn,0]},v2=function(e,t,n){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(n-t)*e*6:e<.5?n:e*3<2?t+(n-t)*(2/3-e)*6:t)*Cn+.5|0},LL=function(e,t,n){var r=e?sl(e)?[e>>16,e>>8&Cn,e&Cn]:0:hp.black,s,o,a,l,c,u,d,p,m,x;if(!r){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),hp[e])r=hp[e];else if(e.charAt(0)==="#"){if(e.length<6&&(s=e.charAt(1),o=e.charAt(2),a=e.charAt(3),e="#"+s+s+o+o+a+a+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return r=parseInt(e.substr(1,6),16),[r>>16,r>>8&Cn,r&Cn,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),r=[e>>16,e>>8&Cn,e&Cn]}else if(e.substr(0,3)==="hsl"){if(r=x=e.match(zC),!t)l=+r[0]%360/360,c=+r[1]/100,u=+r[2]/100,o=u<=.5?u*(c+1):u+c-u*c,s=u*2-o,r.length>3&&(r[3]*=1),r[0]=v2(l+1/3,s,o),r[1]=v2(l,s,o),r[2]=v2(l-1/3,s,o);else if(~e.indexOf("="))return r=e.match(cL),n&&r.length<4&&(r[3]=1),r}else r=e.match(zC)||hp.transparent;r=r.map(Number)}return t&&!x&&(s=r[0]/Cn,o=r[1]/Cn,a=r[2]/Cn,d=Math.max(s,o,a),p=Math.min(s,o,a),u=(d+p)/2,d===p?l=c=0:(m=d-p,c=u>.5?m/(2-d-p):m/(d+p),l=d===s?(o-a)/m+(o<a?6:0):d===o?(a-s)/m+2:(s-o)/m+4,l*=60),r[0]=~~(l+.5),r[1]=~~(c*100+.5),r[2]=~~(u*100+.5)),n&&r.length<4&&(r[3]=1),r},BL=function(e){var t=[],n=[],r=-1;return e.split(oc).forEach(function(s){var o=s.match(ff)||[];t.push.apply(t,o),n.push(r+=o.length+1)}),t.c=n,t},XC=function(e,t,n){var r="",s=(e+r).match(oc),o=t?"hsla(":"rgba(",a=0,l,c,u,d;if(!s)return e;if(s=s.map(function(p){return(p=LL(p,t,1))&&o+(t?p[0]+","+p[1]+"%,"+p[2]+"%,"+p[3]:p.join(","))+")"}),n&&(u=BL(e),l=n.c,l.join(r)!==u.c.join(r)))for(c=e.replace(oc,"1").split(ff),d=c.length-1;a<d;a++)r+=c[a]+(~l.indexOf(a)?s.shift()||o+"0,0,0,0)":(u.length?u:s.length?s:n).shift());if(!c)for(c=e.split(oc),d=c.length-1;a<d;a++)r+=c[a]+s[a];return r+c[d]},oc=function(){var i="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in hp)i+="|"+e+"\\b";return new RegExp(i+")","gi")}(),eU=/hsl[a]?\(/,DL=function(e){var t=e.join(" "),n;if(oc.lastIndex=0,oc.test(t))return n=eU.test(t),e[1]=XC(e[1],n),e[0]=XC(e[0],n,BL(e[1])),!0},vm,Ps=function(){var i=Date.now,e=500,t=33,n=i(),r=n,s=1e3/240,o=s,a=[],l,c,u,d,p,m,x=function v(_){var g=i()-r,S=_===!0,b,A,w,C;if((g>e||g<0)&&(n+=g-t),r+=g,w=r-n,b=w-o,(b>0||S)&&(C=++d.frame,p=w-d.time*1e3,d.time=w=w/1e3,o+=b+(b>=s?4:s-b),A=1),S||(l=c(v)),A)for(m=0;m<a.length;m++)a[m](w,p,C,_)};return d={time:0,frame:0,tick:function(){x(!0)},deltaRatio:function(_){return p/(1e3/(_||60))},wake:function(){dL&&(!zb&&IA()&&(la=zb=window,LA=la.document||{},Vs.gsap=ms,(la.gsapVersions||(la.gsapVersions=[])).push(ms.version),fL(wv||la.GreenSockGlobals||!la.gsap&&la||{}
vendor: 4,875 bytes, line 47
47),PL.forEach(IL)),u=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&d.sleep(),c=u||function(_){return setTimeout(_,o-d.time*1e3+1|0)},vm=1,x(2))},sleep:function(){(u?cancelAnimationFrame:clearTimeout)(l),vm=0,c=gm},lagSmoothing:function(_,g){e=_||1/0,t=Math.min(g||33,e)},fps:function(_){s=1e3/(_||240),o=d.time*1e3+s},add:function(_,g,S){var b=g?function(A,w,C,P){_(A,w,C,P),d.remove(b)}:_;return d.remove(_),a[S?"unshift":"push"](b),Wf(),b},remove:function(_,g){~(g=a.indexOf(_))&&a.splice(g,1)&&m>=g&&m--},_listeners:a},d}(),Wf=function(){return!vm&&Ps.wake()},an={},tU=/^[\d.\-M][\d.\-,\s]/,nU=/["']/g,iU=function(e){for(var t={},n=e.substr(1,e.length-3).split(":"),r=n[0],s=1,o=n.length,a,l,c;s<o;s++)l=n[s],a=s!==o-1?l.lastIndexOf(","):l.length,c=l.substr(0,a),t[r]=isNaN(c)?c.replace(nU,"").trim():+c,r=l.substr(a+1).trim();return t},rU=function(e){var t=e.indexOf("(")+1,n=e.indexOf(")"),r=e.indexOf("(",t);return e.substring(t,~r&&r<n?e.indexOf(")",n+1):n)},sU=function(e){var t=(e+"").split("("),n=an[t[0]];return n&&t.length>1&&n.config?n.config.apply(null,~e.indexOf("{")?[iU(t[1])]:rU(e).split(",").map(xL)):an._CE&&tU.test(e)?an._CE("",e):n},FL=function(e){return function(t){return 1-e(1-t)}},NL=function i(e,t){for(var n=e._first,r;n;)n instanceof Hr?i(n,t):n.vars.yoyoEase&&(!n._yoyo||!n._repeat)&&n._yoyo!==t&&(n.timeline?i(n.timeline,t):(r=n._ease,n._ease=n._yEase,n._yEase=r,n._yoyo=t)),n=n._next},Eu=function(e,t){return e&&(ri(e)?e:an[e]||sU(e))||t},ed=function(e,t,n,r){n===void 0&&(n=function(l){return 1-t(1-l)}),r===void 0&&(r=function(l){return l<.5?t(l*2)/2:1-t((1-l)*2)/2});var s={easeIn:t,easeOut:n,easeInOut:r},o;return fs(e,function(a){an[a]=Vs[a]=s,an[o=a.toLowerCase()]=n;for(var l in s)an[o+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=an[a+"."+l]=s[l]}),s},kL=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},y2=function i(e,t,n){var r=t>=1?t:1,s=(n||(e?.3:.45))/(t<1?t:1),o=s/Ub*(Math.asin(1/r)||0),a=function(u){return u===1?1:r*Math.pow(2,-10*u)*P4((u-o)*s)+1},l=e==="out"?a:e==="in"?function(c){return 1-a(1-c)}:kL(a);return s=Ub/s,l.config=function(c,u){return i(e,c,u)},l},_2=function i(e,t){t===void 0&&(t=1.70158);var n=function(o){return o?--o*o*((t+1)*o+t)+1:0},r=e==="out"?n:e==="in"?function(s){return 1-n(1-s)}:kL(n);return r.config=function(s){return i(e,s)},r};fs("Linear,Quad,Cubic,Quart,Quint,Strong",function(i,e){var t=e<5?e+1:e;ed(i+",Power"+(t-1),e?function(n){return Math.pow(n,t)}:function(n){return n},function(n){return 1-Math.pow(1-n,t)},function(n){return n<.5?Math.pow(n*2,t)/2:1-Math.pow((1-n)*2,t)/2})});an.Linear.easeNone=an.none=an.Linear.easeIn;ed("Elastic",y2("in"),y2("out"),y2());(function(i,e){var t=1/e,n=2*t,r=2.5*t,s=function(a){return a<t?i*a*a:a<n?i*Math.pow(a-1.5/e,2)+.75:a<r?i*(a-=2.25/e)*a+.9375:i*Math.pow(a-2.625/e,2)+.984375};ed("Bounce",function(o){return 1-s(1-o)},s)})(7.5625,2.75);ed("Expo",function(i){return Math.pow(2,10*(i-1))*i+i*i*i*i*i*i*(1-i)});ed("Circ",function(i){return-(aL(1-i*i)-1)});ed("Sine",function(i){return i===1?1:-R4(i*E4)+1});ed("Back",_2("in"),_2("out"),_2());an.SteppedEase=an.steps=Vs.SteppedEase={config:function(e,t){e===void 0&&(e=1);var n=1/e,r=e+(t?0:1),s=t?1:0,o=1-Rn;return function(a){return((r*Gm(0,o,a)|0)+s)*n}}};zf.ease=an["quad.out"];fs("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(i){return FA+=i+","+i+"Params,"});var OL=function(e,t){this.id=C4++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:mL,this.set=t?t.getSetter:HA},ym=function(){function i(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,jf(this,+t.duration,1,1),this.data=t.data,Hn&&(this._ctx=Hn,Hn.data.push(this)),vm||Ps.wake()}var e=i.prototype;return e.delay=function(n){return n||n===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+n-this._delay),this._delay=n,this):this._delay},e.duration=function(n){return arguments.length?this.totalDuration(this._repeat>0?n+(n+this._rDelay)*this._repeat:n):this.totalDuration()&&this._dur},e.totalDuration=function(n){return arguments.length?(this._dirty=0,jf(this,this._repeat<0?n:(n-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(n,r){if(Wf(),!arguments.length)return this._tTime;var s=this._dp;if(s&&s.smoothChildTiming&&this._ts){for(Jy(this,n),!s._dp||s.parent||_L(s,this);s&&s.parent;)s.parent._time!==s._start+(s._ts>=0?s._tTime/s._ts:(s.totalDuration()-s._tTime)/-s._ts)&&s.totalTime(s._tTime,!0),s=s.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&n<this._tDur||this._ts<0&&n>0||!this._tDur&&!n)&&da(this._dp,this,this._start-this._delay)}return(this._tTime!==n||!this._dur&&!r||this._initted&&Math.abs(this._zTime)===Rn||!this._initted&&this._dur&&n||
vendor: 13,129 bytes, line 47
47!n&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=n),gL(this,n,r)),this},e.time=function(n,r){return arguments.length?this.totalTime(Math.min(this.totalDuration(),n+jC(this))%(this._dur+this._rDelay)||(n?this._dur:0),r):this._time},e.totalProgress=function(n,r){return arguments.length?this.totalTime(this.totalDuration()*n,r):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},e.progress=function(n,r){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-n:n)+jC(this),r):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(n,r){var s=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(n-1)*s,r):this._repeat?Gf(this._tTime,s)+1:1},e.timeScale=function(n,r){if(!arguments.length)return this._rts===-Rn?0:this._rts;if(this._rts===n)return this;var s=this.parent&&this._ts?Cv(this.parent._time,this):this._tTime;return this._rts=+n||0,this._ts=this._ps||n===-Rn?0:this._rts,this.totalTime(Gm(-Math.abs(this._delay),this.totalDuration(),s),r!==!1),Yy(this),z4(this)},e.paused=function(n){return arguments.length?(this._ps!==n&&(this._ps=n,n?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Wf(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==Rn&&(this._tTime-=Rn)))),this):this._ps},e.startTime=function(n){if(arguments.length){this._start=Yn(n);var r=this.parent||this._dp;return r&&(r._sort||!this.parent)&&da(r,this,this._start-this._delay),this}return this._start},e.endTime=function(n){return this._start+(ds(n)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(n){var r=this.parent||this._dp;return r?n&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Cv(r.rawTime(n),this):this._tTime:this._tTime},e.revert=function(n){n===void 0&&(n=N4);var r=rr;return rr=n,kA(this)&&(this.timeline&&this.timeline.revert(n),this.totalTime(-.01,n.suppressEvents)),this.data!=="nested"&&n.kill!==!1&&this.kill(),rr=r,this},e.globalTime=function(n){for(var r=this,s=arguments.length?n:r.rawTime();r;)s=r._start+s/(Math.abs(r._ts)||1),r=r._dp;return!this.parent&&this._sat?this._sat.globalTime(n):s},e.repeat=function(n){return arguments.length?(this._repeat=n===1/0?-2:n,WC(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(n){if(arguments.length){var r=this._time;return this._rDelay=n,WC(this),r?this.time(r):this}return this._rDelay},e.yoyo=function(n){return arguments.length?(this._yoyo=n,this):this._yoyo},e.seek=function(n,r){return this.totalTime(oo(this,n),ds(r))},e.restart=function(n,r){return this.play().totalTime(n?-this._delay:0,ds(r)),this._dur||(this._zTime=-Rn),this},e.play=function(n,r){return n!=null&&this.seek(n,r),this.reversed(!1).paused(!1)},e.reverse=function(n,r){return n!=null&&this.seek(n||this.totalDuration(),r),this.reversed(!0).paused(!1)},e.pause=function(n,r){return n!=null&&this.seek(n,r),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(n){return arguments.length?(!!n!==this.reversed()&&this.timeScale(-this._rts||(n?-Rn:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-Rn,this},e.isActive=function(){var n=this.parent||this._dp,r=this._start,s;return!!(!n||this._ts&&this._initted&&n.isActive()&&(s=n.rawTime(!0))>=r&&s<this.endTime(!0)-Rn)},e.eventCallback=function(n,r,s){var o=this.vars;return arguments.length>1?(r?(o[n]=r,s&&(o[n+"Params"]=s),n==="onUpdate"&&(this._onUpdate=r)):delete o[n],this):o[n]},e.then=function(n){var r=this,s=r._prom;return new Promise(function(o){var a=ri(n)?n:vL,l=function(){var u=r.then;r.then=null,s&&s(),ri(a)&&(a=a(r))&&(a.then||a===r)&&(r.then=u),o(a),r.then=u};r._initted&&r.totalProgress()===1&&r._ts>=0||!r._tTime&&r._ts<0?l():r._prom=l})},e.kill=function(){fp(this)},i}();Xs(ym.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-Rn,_prom:0,_ps:!1,_rts:1});var Hr=function(i){oL(e,i);function e(n,r){var s;return n===void 0&&(n={}),s=i.call(this,n)||this,s.labels={},s.smoothChildTiming=!!n.smoothChildTiming,s.autoRemoveChildren=!!n.autoRemoveChildren,s._sort=ds(n.sortChildren),Kn&&da(n.parent||Kn,za(s),r),n.reversed&&s.reverse(),n.paused&&s.paused(!0),n.scrollTrigger&&SL(za(s),n.scrollTrigger),s}var t=e.prototype;return t.to=function(r,s,o){return Lp(0,arguments,this),this},t.from=function(r,s,o){return Lp(1,arguments,this),this},t.fromTo=function(r,s,o,a){return Lp(2,arguments,this),this},t.set=function(r,s,o){return s.duration=0,s.parent=this,Ip(s).repeatDelay||(s.repeat=0),s.immediateRender=!!s.immediateRender,new bi(r,s,oo(this,o),1),this},t.call=function(r,s,o){return da(this,bi.delayedCall(0,r,s),o)},t.staggerTo=function(r,s,o,a,l,c,u){return o.duration=s,o.stagger=o.stagger||a,o.onComplete=c,o.onCompleteParams=u,o.parent=this,new bi(r,o,oo(this,l)),this},t.staggerFrom=function(r,s,o,a,l,c,u){return o.runBackwards=1,Ip(o).immediateRender=ds(o.immediateRender),this.staggerTo(r,s,o,a,l,c,u)},t.staggerFromTo=function(r,s,o,a,l,c,u,d){return a.startAt=o,Ip(a).immediateRender=ds(a.immediateRender),this.staggerTo(r,s,a,l,c,u,d)},t.render=function(r,s,o){var a=this._time,l=this._dirty?this.totalDuration():this._tDur,c=this._dur,u=r<=0?0:Yn(r),d=this._zTime<0!=r<0&&(this._initted||!c),p,m,x,v,_,g,S,b,A,w,C,P;if(this!==Kn&&u>l&&r>=0&&(u=l),u!==this._tTime||o||d){if(a!==this._time&&c&&(u+=this._time-a,r+=this._time-a),p=u,A=this._start,b=this._ts,g=!b,d&&(c||(a=this._zTime),(r||!s)&&(this._zTime=r)),this._repeat){if(C=this._yoyo,_=c+this._rDelay,this._repeat<-1&&r<0)return this.totalTime(_*100+r,s,o);if(p=Yn(u%_),u===l?(v=this._repeat,p=c):(w=Yn(u/_),v=~~w,v&&v===w&&(p=c,v--),p>c&&(p=c)),w=Gf(this._tTime,_),!a&&this._tTime&&w!==v&&this._tTime-w*_-this._dur<=0&&(w=v),C&&v&1&&(p=c-p,P=1),v!==w&&!this._lock){var B=C&&w&1,R=B===(C&&v&1);if(v<w&&(B=!B),a=B?0:u%c?c:u,this._lock=1,this.render(a||(P?0:Yn(v*_)),s,!c)._lock=0,this._tTime=u,!s&&this.parent&&Bs(this,"onRepeat"),this.vars.repeatRefresh&&!P&&(this.invalidate()._lock=1,w=v),a&&a!==this._time||g!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(c=this._dur,l=this._tDur,R&&(this._lock=2,a=B?c:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!P&&this.invalidate()),this._lock=0,!this._ts&&!g)return this;NL(this,P)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(S=W4(this,Yn(a),Yn(p)),S&&(u-=p-(p=S._start))),this._tTime=u,this._time=p,this._act=!b,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=r,a=0),!a&&u&&c&&!s&&!w&&(Bs(this,"onStart"),this._tTime!==u))return this;if(p>=a&&r>=0)for(m=this._first;m;){if(x=m._next,(m._act||p>=m._start)&&m._ts&&S!==m){if(m.parent!==this)return this.render(r,s,o);if(m.render(m._ts>0?(p-m._start)*m._ts:(m._dirty?m.totalDuration():m._tDur)+(p-m._start)*m._ts,s,o),p!==this._time||!this._ts&&!g){S=0,x&&(u+=this._zTime=-Rn);break}}m=x}else{m=this._last;for(var E=r<0?r:p;m;){if(x=m._prev,(m._act||E<=m._end)&&m._ts&&S!==m){if(m.parent!==this)return this.render(r,s,o);if(m.render(m._ts>0?(E-m._start)*m._ts:(m._dirty?m.totalDuration():m._tDur)+(E-m._start)*m._ts,s,o||rr&&kA(m)),p!==this._time||!this._ts&&!g){S=0,x&&(u+=this._zTime=E?-Rn:Rn);break}}m=x}}if(S&&!s&&(this.pause(),S.render(p>=a?0:-Rn)._zTime=p>=a?1:-1,this._ts))return this._start=A,Yy(this),this.render(r,s,o);this._onUpdate&&!s&&Bs(this,"onUpdate",!0),(u===l&&this._tTime>=this.totalDuration()||!u&&a)&&(A===this._start||Math.abs(b)!==Math.abs(this._ts))&&(this._lock||((r||!c)&&(u===l&&this._ts>0||!u&&this._ts<0)&&hc(this,1),!s&&!(r<0&&!a)&&(u||a||!l)&&(Bs(this,u===l&&r>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(u<l&&this.timeScale()>0)&&this._prom())))}return this},t.add=function(r,s){var o=this;if(sl(s)||(s=oo(this,s,r)),!(r instanceof ym)){if(Ar(r))return r.forEach(function(a){return o.add(a,s)}),this;if(Ji(r))return this.addLabel(r,s);if(ri(r))r=bi.delayedCall(0,r);else return this}return this!==r?da(this,r,s):this},t.getChildren=function(r,s,o,a){r===void 0&&(r=!0),s===void 0&&(s=!0),o===void 0&&(o=!0),a===void 0&&(a=-mo);for(var l=[],c=this._first;c;)c._start>=a&&(c instanceof bi?s&&l.push(c):(o&&l.push(c),r&&l.push.apply(l,c.getChildren(!0,s,o)))),c=c._next;return l},t.getById=function(r){for(var s=this.getChildren(1,1,1),o=s.length;o--;)if(s[o].vars.id===r)return s[o]},t.remove=function(r){return Ji(r)?this.removeLabel(r):ri(r)?this.killTweensOf(r):(r.parent===this&&Xy(this,r),r===this._recent&&(this._recent=this._last),Tu(this))},t.totalTime=function(r,s){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Yn(Ps.time-(this._ts>0?r/this._ts:(this.totalDuration()-r)/-this._ts))),i.prototype.totalTime.call(this,r,s),this._forcing=0,this):this._tTime},t.addLabel=function(r,s){return this.labels[r]=oo(this,s),this},t.removeLabel=function(r){return delete this.labels[r],this},t.addPause=function(r,s,o){var a=bi.delayedCall(0,s||gm,o);return a.data="isPause",this._hasPause=1,da(this,a,oo(this,r))},t.removePause=function(r){var s=this._first;for(r=oo(this,r);s;)s._start===r&&s.data==="isPause"&&hc(s),s=s._next},t.killTweensOf=function(r,s,o){for(var a=this.getTweensOf(r,o),l=a.length;l--;)Gl!==a[l]&&a[l].kill(r,s);return this},t.getTweensOf=function(r,s){for(var o=[],a=go(r),l=this._first,c=sl(s),u;l;)l instanceof bi?k4(l._targets,a)&&(c?(!Gl||l._initted&&l._ts)&&l.globalTime(0)<=s&&l.globalTime(l.totalDuration())>s:!s||l.isActive())&&o.push(l):(u=l.getTweensOf(a,s)).length&&o.push.apply(o,u),l=l._next;return o},t.tweenTo=function(r,s){s=s||{};var o=this,a=oo(o,r),l=s,c=l.startAt,u=l.onStart,d=l.onStartParams,p=l.immediateRender,m,x=bi.to(o,Xs({ease:s.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:s.duration||Math.abs((a-(c&&"time"in c?c.time:o._time))/o.timeScale())||Rn,onStart:function(){if(o.pause(),!m){var _=s.duration||Math.abs((a-(c&&"time"in c?c.time:o._time))/o.timeScale());x._dur!==_&&jf(x,_,0,1).render(x._time,!0,!0),m=1}u&&u.apply(x,d||[])}},s));return p?x.render(0):x},t.tweenFromTo=function(r,s,o){return this.tweenTo(s,Xs({startAt:{time:oo(this,r)}},o))},t.recent=function(){return this._recent},t.nextLabel=function(r){return r===void 0&&(r=this._time),VC(this,oo(this,r))},t.previousLabel=function(r){return r===void 0&&(r=this._time),VC(this,oo(this,r),1)},t.currentLabel=function(r){return arguments.length?this.seek(r,!0):this.previousLabel(this._time+Rn)},t.shiftChildren=function(r,s,o){o===void 0&&(o=0);var a=this._first,l=this.labels,c;for(r=Yn(r);a;)a._start>=o&&(a._start+=r,a._end+=r),a=a._next;if(s)for(c in l)l[c]>=o&&(l[c]+=r);return Tu(this)},t.invalidate=function(r){var s=this._first;for(this._lock=0;s;)s.invalidate(r),s=s._next;return i.prototype.invalidate.call(this,r)},t.clear=function(r){r===void 0&&(r=!0);for(var s=this._first,o;s;)o=s._next,this.remove(s),s=o;return this._dp&&(this._time=this._tTime=this._pTime=0),r&&(this.labels={}),Tu(this)},t.totalDuration=function(r){var s=0,o=this,a=o._last,l=mo,c,u,d;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-r:r));if(o._dirty){for(d=o.parent;a;)c=a._prev,a._dirty&&a.totalDuration(),u=a._start,u>l&&o._sort&&a._ts&&!o._lock?(o._lock=1,da(o,a,u-a._delay,1)._lock=0):l=u,u<0&&a._ts&&(s-=u,(!d&&!o._dp||d&&d.smoothChildTiming)&&(o._start+=Yn(u/o._ts),o._time-=u,o._tTime-=u),o.shiftChildren(-u,!1,-1/0),l=0),a._end>s&&a._ts&&(s=a._end),a=c;jf(o,o===Kn&&o._time>s?o._time:s,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(r){if(Kn._ts&&(gL(Kn,Cv(r,Kn)),pL=Ps.frame),Ps.frame>=HC){HC+=Us.autoSleep||120;var s=Kn._first;if((!s||!s._ts)&&Us.autoSleep&&Ps._listeners.length<2){for(;s&&!s._ts;)s=s._next;s||Ps.sleep()}}},e}(ym);Xs(Hr.prototype,{_lock:0,_hasPause:0,_forcing:0});var oU=function(e,t,n,r,s,o,a){var l=new hs(this._pt,e,t,0,1,WL,null,s),c=0,u=0,d,p,m,x,v,_,g,S;for(l.b=n,l.e=r,n+="",r+="",(g=~r.indexOf("random("))&&(r=xm(r)),o&&(S=[n,r],o(S,e,t),n=S[0],r=S[1]),p=n.match(g2)||[];d=g2.exec(r);)x=d[0],v=r.substring(c,d.index),m?m=(m+1)%5:v.substr(-5)==="rgba("&&(m=1),x!==p[u++]&&(_=parseFloat(p[u-1])||0,l._pt={_next:l._pt,p:v||u===1?v:",",s:_,c:x.charAt(1)==="="?Mf(_,x)-_:parseFloat(x)-_,m:m&&m<4?Math.round:0},c=g2.lastIndex);return l.c=c<r.length?r.substring(c,r.length):"",l.fp=a,(uL.test(r)||g)&&(l.e=0),this._pt=l,l},OA=function(e,t,n,r,s,o,a,l,c,u){ri(r)&&(r=r(s||0,e,o));var d=e[t],p=n!=="get"?n:ri(d)?c?e[t.indexOf("set")||!ri(e["get"+t.substr(3)])?t:"get"+t.substr(3)](c):e[t]():d,m=ri(d)?c?dU:GL:zA,x;if(Ji(r)&&(~r.indexOf("random(")&&(r=xm(r)),r.charAt(1)==="="&&(x=Mf(p,r)+(Sr(p)||0),(x||x===0)&&(r=x))),!u||p!==r||Yb)return!isNaN(p*r)&&r!==""?(x=new hs(this._pt,e,t,+p||0,r-(p||0),typeof d=="boolean"?hU:jL,0,m),c&&(x.fp=c),a&&x.modifier(a,this,e),this._pt=x):(!d&&!(t in e)&&BA(t,r),oU.call(this,e,t,p,r,m,l||Us.stringFilter,c))}
vendor: 4,655 bytes, line 47
47,aU=function(e,t,n,r,s){if(ri(e)&&(e=Bp(e,s,t,n,r)),!ya(e)||e.style&&e.nodeType||Ar(e)||lL(e))return Ji(e)?Bp(e,s,t,n,r):e;var o={},a;for(a in e)o[a]=Bp(e[a],s,t,n,r);return o},UL=function(e,t,n,r,s,o){var a,l,c,u;if(Ts[e]&&(a=new Ts[e]).init(s,a.rawVars?t[e]:aU(t[e],r,s,o,n),n,r,o)!==!1&&(n._pt=l=new hs(n._pt,s,e,0,1,a.render,a,0,a.priority),n!==hf))for(c=n._ptLookup[n._targets.indexOf(s)],u=a._props.length;u--;)c[a._props[u]]=l;return a},Gl,Yb,UA=function i(e,t,n){var r=e.vars,s=r.ease,o=r.startAt,a=r.immediateRender,l=r.lazy,c=r.onUpdate,u=r.runBackwards,d=r.yoyoEase,p=r.keyframes,m=r.autoRevert,x=e._dur,v=e._startAt,_=e._targets,g=e.parent,S=g&&g.data==="nested"?g.vars.targets:_,b=e._overwrite==="auto"&&!RA,A=e.timeline,w,C,P,B,R,E,L,N,k,Y,z,W,V;if(A&&(!p||!s)&&(s="none"),e._ease=Eu(s,zf.ease),e._yEase=d?FL(Eu(d===!0?s:d,zf.ease)):0,d&&e._yoyo&&!e._repeat&&(d=e._yEase,e._yEase=e._ease,e._ease=d),e._from=!A&&!!r.runBackwards,!A||p&&!r.stagger){if(N=_[0]?wu(_[0]).harness:0,W=N&&r[N.prop],w=Ev(r,DA),v&&(v._zTime<0&&v.progress(1),t<0&&u&&a&&!m?v.render(-1,!0):v.revert(u&&x?Hx:F4),v._lazy=0),o){if(hc(e._startAt=bi.set(_,Xs({data:"isStart",overwrite:!1,parent:g,immediateRender:!0,lazy:!v&&ds(l),startAt:null,delay:0,onUpdate:c&&function(){return Bs(e,"onUpdate")},stagger:0},o))),e._startAt._dp=0,e._startAt._sat=e,t<0&&(rr||!a&&!m)&&e._startAt.revert(Hx),a&&x&&t<=0&&n<=0){t&&(e._zTime=t);return}}else if(u&&x&&!v){if(t&&(a=!1),P=Xs({overwrite:!1,data:"isFromStart",lazy:a&&!v&&ds(l),immediateRender:a,stagger:0,parent:g},w),W&&(P[N.prop]=W),hc(e._startAt=bi.set(_,P)),e._startAt._dp=0,e._startAt._sat=e,t<0&&(rr?e._startAt.revert(Hx):e._startAt.render(-1,!0)),e._zTime=t,!a)i(e._startAt,Rn,Rn);else if(!t)return}for(e._pt=e._ptCache=0,l=x&&ds(l)||l&&!x,C=0;C<_.length;C++){if(R=_[C],L=R._gsap||NA(_)[C]._gsap,e._ptLookup[C]=Y={},Hb[L.id]&&sc.length&&Tv(),z=S===_?C:S.indexOf(R),N&&(k=new N).init(R,W||w,e,z,S)!==!1&&(e._pt=B=new hs(e._pt,R,k.name,0,1,k.render,k,0,k.priority),k._props.forEach(function(G){Y[G]=B}),k.priority&&(E=1)),!N||W)for(P in w)Ts[P]&&(k=UL(P,w,e,z,R,S))?k.priority&&(E=1):Y[P]=B=OA.call(e,R,P,"get",w[P],z,S,0,r.stringFilter);e._op&&e._op[C]&&e.kill(R,e._op[C]),b&&e._pt&&(Gl=e,Kn.killTweensOf(R,Y,e.globalTime(t)),V=!e.parent,Gl=0),e._pt&&l&&(Hb[L.id]=1)}E&&VL(e),e._onInit&&e._onInit(e)}e._onUpdate=c,e._initted=(!e._op||e._pt)&&!V,p&&t<=0&&A.render(mo,!0,!0)},lU=function(e,t,n,r,s,o,a,l){var c=(e._pt&&e._ptCache||(e._ptCache={}))[t],u,d,p,m;if(!c)for(c=e._ptCache[t]=[],p=e._ptLookup,m=e._targets.length;m--;){if(u=p[m][t],u&&u.d&&u.d._pt)for(u=u.d._pt;u&&u.p!==t&&u.fp!==t;)u=u._next;if(!u)return Yb=1,e.vars[t]="+=0",UA(e,a),Yb=0,l?mm(t+" not eligible for reset"):1;c.push(u)}for(m=c.length;m--;)d=c[m],u=d._pt||d,u.s=(r||r===0)&&!s?r:u.s+(r||0)+o*u.c,u.c=n-u.s,d.e&&(d.e=di(n)+Sr(d.e)),d.b&&(d.b=u.s+Sr(d.b))},cU=function(e,t){var n=e[0]?wu(e[0]).harness:0,r=n&&n.aliases,s,o,a,l;if(!r)return t;s=Hf({},t);for(o in r)if(o in s)for(l=r[o].split(","),a=l.length;a--;)s[l[a]]=s[o];return s},uU=function(e,t,n,r){var s=t.ease||r||"power1.inOut",o,a;if(Ar(t))a=n[e]||(n[e]=[]),t.forEach(function(l,c){return a.push({t:c/(t.length-1)*100,v:l,e:s})});else for(o in t)a=n[o]||(n[o]=[]),o==="ease"||a.push({t:parseFloat(e),v:t[o],e:s})},Bp=function(e,t,n,r,s){return ri(e)?e.call(t,n,r,s):Ji(e)&&~e.indexOf("random(")?xm(e):e},zL=FA+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",HL={};fs(zL+",id,stagger,delay,duration,paused,scrollTrigger",function(i){return HL[i]=1});var bi=function(i){oL(e,i);function e(n,r,s,o){var a;typeof r=="number"&&(s.duration=r,r=s,s=null),a=i.call(this,o?r:Ip(r))||this;var l=a.vars,c=l.duration,u=l.delay,d=l.immediateRender,p=l.stagger,m=l.overwrite,x=l.keyframes,v=l.defaults,_=l.scrollTrigger,g=l.yoyoEase,S=r.parent||Kn,b=(Ar(n)||lL(n)?sl(n[0]):"length"in r)?[n]:go(n),A,w,C,P,B,R,E,L;if(a._targets=b.length?NA(b):mm("GSAP target "+n+" not found. https://gsap.com",!Us.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=m,x||p||fg(c)||fg(u)){if(r=a.vars,A=a.timeline=new Hr({data:"nested",defaults:v||{},targets:S&&S.data==="nested"?S.vars.targets:b}),A.kill(),A.parent=A._dp=za(a),A._start=0,p||fg(c)||fg(u)){if(P=b.length,E=p&&wL(p),ya(p))for(B in p)~zL.indexOf(B)&&(L||(L={}),L[B]=p[B]);for(w=0;w<P;w++)C=Ev(r,HL),C.stagger=0,g&&(C.yoyoEase=g),L&&Hf(C,L),R=b[w],C.duration=+Bp(c,za(a),w,R,b),C.delay=(+Bp(u,za(a),w,R,b)||0)-a._delay,!p&&P===1&&C.delay&&(a._delay=u=C.delay,a._start+=u,C.delay=0),A.to(R,C,E?E(w,R,b):0),A._ease=an.none;A.duration()?c=u=0:a.timeline=0}else if(x){Ip(Xs(A.vars.defaults,{ease:"none"})),A._ease=Eu(x.ease||r.ease||"none");var N=0,k,Y,z;
vendor: 1,107 bytes, line 47
47if(Ar(x))x.forEach(function(W){return A.to(b,W,">")}),A.duration();else{C={};for(B in x)B==="ease"||B==="easeEach"||uU(B,x[B],C,x.easeEach);for(B in C)for(k=C[B].sort(function(W,V){return W.t-V.t}),N=0,w=0;w<k.length;w++)Y=k[w],z={ease:Y.e,duration:(Y.t-(w?k[w-1].t:0))/100*c},z[B]=Y.v,A.to(b,z,N),N+=z.duration;A.duration()<c&&A.to({},{duration:c-A.duration()})}}c||a.duration(c=A.duration())}else a.timeline=0;return m===!0&&!RA&&(Gl=za(a),Kn.killTweensOf(b),Gl=0),da(S,za(a),s),r.reversed&&a.reverse(),r.paused&&a.paused(!0),(d||!c&&!x&&a._start===Yn(S._time)&&ds(d)&&H4(za(a))&&S.data!=="nested")&&(a._tTime=-Rn,a.render(Math.max(0,-u)||0)),_&&SL(za(a),_),a}var t=e.prototype;return t.render=function(r,s,o){var a=this._time,l=this._tDur,c=this._dur,u=r<0,d=r>l-Rn&&!u?l:r<Rn?0:r,p,m,x,v,_,g,S,b,A;if(!c)j4(this,r,s,o);else if(d!==this._tTime||!r||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==u||this._lazy){if(p=d,b=this.timeline,this._repeat){if(v=c+this._rDelay,this._repeat<-1&&u)return this.totalTime(v*100+r,s,o);if(p=Yn(d%v),d===l?(x=this._repeat,p=c):(_=Yn(d/v),x=~~_,x&&x===_?
vendor: 5,691 bytes, line 47
47(p=c,x--):p>c&&(p=c)),g=this._yoyo&&x&1,g&&(A=this._yEase,p=c-p),_=Gf(this._tTime,v),p===a&&!o&&this._initted&&x===_)return this._tTime=d,this;x!==_&&(b&&this._yEase&&NL(b,g),this.vars.repeatRefresh&&!g&&!this._lock&&p!==v&&this._initted&&(this._lock=o=1,this.render(Yn(v*x),!0).invalidate()._lock=0))}if(!this._initted){if(bL(this,u?r:p,o,s,d))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&x!==_))return this;if(c!==this._dur)return this.render(r,s,o)}if(this._tTime=d,this._time=p,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=S=(A||this._ease)(p/c),this._from&&(this.ratio=S=1-S),!a&&d&&!s&&!_&&(Bs(this,"onStart"),this._tTime!==d))return this;for(m=this._pt;m;)m.r(S,m.d),m=m._next;b&&b.render(r<0?r:b._dur*b._ease(p/this._dur),s,o)||this._startAt&&(this._zTime=r),this._onUpdate&&!s&&(u&&Gb(this,r,s,o),Bs(this,"onUpdate")),this._repeat&&x!==_&&this.vars.onRepeat&&!s&&this.parent&&Bs(this,"onRepeat"),(d===this._tDur||!d)&&this._tTime===d&&(u&&!this._onUpdate&&Gb(this,r,!0,!0),(r||!c)&&(d===this._tDur&&this._ts>0||!d&&this._ts<0)&&hc(this,1),!s&&!(u&&!a)&&(d||a||g)&&(Bs(this,d===l?"onComplete":"onReverseComplete",!0),this._prom&&!(d<l&&this.timeScale()>0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(r){return(!r||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(r),i.prototype.invalidate.call(this,r)},t.resetTo=function(r,s,o,a,l){vm||Ps.wake(),this._ts||this.play();var c=Math.min(this._dur,(this._dp._time-this._start)*this._ts),u;return this._initted||UA(this,c),u=this._ease(c/this._dur),lU(this,r,s,o,a,u,c,l)?this.resetTo(r,s,o,a,1):(Jy(this,0),this.parent||yL(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(r,s){if(s===void 0&&(s="all"),!r&&(!s||s==="all"))return this._lazy=this._pt=0,this.parent?fp(this):this.scrollTrigger&&this.scrollTrigger.kill(!!rr),this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(r,s,Gl&&Gl.vars.overwrite!==!0)._first||fp(this),this.parent&&o!==this.timeline.totalDuration()&&jf(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,l=r?go(r):a,c=this._ptLookup,u=this._pt,d,p,m,x,v,_,g;if((!s||s==="all")&&U4(a,l))return s==="all"&&(this._pt=0),fp(this);for(d=this._op=this._op||[],s!=="all"&&(Ji(s)&&(v={},fs(s,function(S){return v[S]=1}),s=v),s=cU(a,s)),g=a.length;g--;)if(~l.indexOf(a[g])){p=c[g],s==="all"?(d[g]=s,x=p,m={}):(m=d[g]=d[g]||{},x=s);for(v in x)_=p&&p[v],_&&((!("kill"in _.d)||_.d.kill(v)===!0)&&Xy(this,_,"_pt"),delete p[v]),m!=="all"&&(m[v]=1)}return this._initted&&!this._pt&&u&&fp(this),this},e.to=function(r,s){return new e(r,s,arguments[2])},e.from=function(r,s){return Lp(1,arguments)},e.delayedCall=function(r,s,o,a){return new e(s,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:r,onComplete:s,onReverseComplete:s,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:a})},e.fromTo=function(r,s,o){return Lp(2,arguments)},e.set=function(r,s){return s.duration=0,s.repeatDelay||(s.repeat=0),new e(r,s)},e.killTweensOf=function(r,s,o){return Kn.killTweensOf(r,s,o)},e}(ym);Xs(bi.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});fs("staggerTo,staggerFrom,staggerFromTo",function(i){bi[i]=function(){var e=new Hr,t=Wb.call(arguments,0);return t.splice(i==="staggerFromTo"?5:4,0,0),e[i].apply(e,t)}});var zA=function(e,t,n){return e[t]=n},GL=function(e,t,n){return e[t](n)},dU=function(e,t,n,r){return e[t](r.fp,n)},fU=function(e,t,n){return e.setAttribute(t,n)},HA=function(e,t){return ri(e[t])?GL:PA(e[t])&&e.setAttribute?fU:zA},jL=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},hU=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},WL=function(e,t){var n=t._pt,r="";if(!e&&t.b)r=t.b;else if(e===1&&t.e)r=t.e;else{for(;n;)r=n.p+(n.m?n.m(n.s+n.c*e):Math.round((n.s+n.c*e)*1e4)/1e4)+r,n=n._next;r+=t.c}t.set(t.t,t.p,r,t)},GA=function(e,t){for(var n=t._pt;n;)n.r(e,n.d),n=n._next},pU=function(e,t,n,r){for(var s=this._pt,o;s;)o=s._next,s.p===r&&s.modifier(e,t,n),s=o},mU=function(e){for(var t=this._pt,n,r;t;)r=t._next,t.p===e&&!t.op||t.op===e?Xy(this,t,"_pt"):t.dep||(n=1),t=r;return!n},gU=function(e,t,n,r){r.mSet(e,t,r.m.call(r.tween,n,r.mt),r)},VL=function(e){for(var t=e._pt,n,r,s,o;t;){for(n=t._next,r=s;r&&r.pr>t.pr;)r=r._next;(t._prev=r?r._prev:o)?t._prev._next=t:s=t,(t._next=r)?r._prev=t:o=t,t=n}e._pt=s},hs=function(){function i(t,n,r,s,o,a,l,c,u){this.t=n,this.s=s,this.c=o,this.p=r,this.r=a||jL,this.d=l||this,this.set=c||zA,this.pr=u||0,this._next=t,t&&(t._prev=this)}var e=i.prototype;return e.modifier=function(n,r,s){this.mSet=this.mSet||this.set,this.set=gU,this.m=n,this.mt=s,this.tween=r},i}();fs(FA+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(i){return DA[i]=1});Vs.TweenMax=Vs.TweenLite=bi;Vs.TimelineLite=Vs.TimelineMax=Hr;Kn=new Hr({sortChildren:!1,defaults:zf,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});Us.stringFilter=DL;var Cu=[],jx={},xU=[],YC=0,vU=0,S2=function(e){return(jx[e]||xU).map(function(t){return t()})},Jb=function(){var e=Date.now(),t=[];e-YC>2&&(S2("matchMediaInit"),Cu.forEach(function(n){var r=n.queries,s=n.conditions,o,a,l,c;for(a in r)o=la.matchMedia(r[a]).matches,o&&(l=1),o!==s[a]&&(s[a]=o,c=1);c&&(n.revert(),l&&t.push(n))}),S2("matchMediaRevert"),t.forEach(function(n){return n.onMatch(n,function(r){return n.add(null,r)}
vendor: 2,160 bytes, line 47
47)}),YC=e,S2("matchMedia"))},XL=function(){function i(t,n){this.selector=n&&Vb(n),this.data=[],this._r=[],this.isReverted=!1,this.id=vU++,t&&this.add(t)}var e=i.prototype;return e.add=function(n,r,s){ri(n)&&(s=r,r=n,n=ri);var o=this,a=function(){var c=Hn,u=o.selector,d;return c&&c!==o&&c.data.push(o),s&&(o.selector=Vb(s)),Hn=o,d=r.apply(o,arguments),ri(d)&&o._r.push(d),Hn=c,o.selector=u,o.isReverted=!1,d};return o.last=a,n===ri?a(o,function(l){return o.add(null,l)}):n?o[n]=a:a},e.ignore=function(n){var r=Hn;Hn=null,n(this),Hn=r},e.getTweens=function(){var n=[];return this.data.forEach(function(r){return r instanceof i?n.push.apply(n,r.getTweens()):r instanceof bi&&!(r.parent&&r.parent.data==="nested")&&n.push(r)}),n},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(n,r){var s=this;if(n?function(){for(var a=s.getTweens(),l=s.data.length,c;l--;)c=s.data[l],c.data==="isFlip"&&(c.revert(),c.getChildren(!0,!0,!1).forEach(function(u){return a.splice(a.indexOf(u),1)}));for(a.map(function(u){return{g:u._dur||u._delay||u._sat&&!u._sat.vars.immediateRender?u.globalTime(0):-1/0,t:u}}).sort(function(u,d){return d.g-u.g||-1/0}).forEach(function(u){return u.t.revert(n)}),l=s.data.length;l--;)c=s.data[l],c instanceof Hr?c.data!=="nested"&&(c.scrollTrigger&&c.scrollTrigger.revert(),c.kill()):!(c instanceof bi)&&c.revert&&c.revert(n);s._r.forEach(function(u){return u(n,s)}),s.isReverted=!0}():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),r)for(var o=Cu.length;o--;)Cu[o].id===this.id&&Cu.splice(o,1)},e.revert=function(n){this.kill(n||{})},i}(),yU=function(){function i(t){this.contexts=[],this.scope=t,Hn&&Hn.data.push(this)}var e=i.prototype;return e.add=function(n,r,s){ya(n)||(n={matches:n});var o=new XL(0,s||this.scope),a=o.conditions={},l,c,u;Hn&&!o.selector&&(o.selector=Hn.selector),this.contexts.push(o),r=o.add("onMatch",r),o.queries=n;for(c in n)c==="all"?u=1:(l=la.matchMedia(n[c]),l&&(Cu.indexOf(o)<0&&Cu.push(o),(a[c]=l.matches)&&(u=1),l.addListener?l.addListener(Jb):l.addEventListener("change",Jb)));return u&&r(o,function(d){return o.add(null,d)}),this},e.revert=function(n){this.kill(n||{})}
vendor: 5,280 bytes, lines 47-54
47,e.kill=function(n){this.contexts.forEach(function(r){return r.kill(n,!0)})},i}(),Rv={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.forEach(function(r){return IL(r)})},timeline:function(e){return new Hr(e)},getTweensOf:function(e,t){return Kn.getTweensOf(e,t)},getProperty:function(e,t,n,r){Ji(e)&&(e=go(e)[0]);var s=wu(e||{}).get,o=n?vL:xL;return n==="native"&&(n=""),e&&(t?o((Ts[t]&&Ts[t].get||s)(e,t,n,r)):function(a,l,c){return o((Ts[a]&&Ts[a].get||s)(e,a,l,c))})},quickSetter:function(e,t,n){if(e=go(e),e.length>1){var r=e.map(function(u){return ms.quickSetter(u,t,n)}),s=r.length;return function(u){for(var d=s;d--;)r[d](u)}}e=e[0]||{};var o=Ts[t],a=wu(e),l=a.harness&&(a.harness.aliases||{})[t]||t,c=o?function(u){var d=new o;hf._pt=0,d.init(e,n?u+n:u,hf,0,[e]),d.render(1,d),hf._pt&&GA(1,hf)}:a.set(e,l);return o?c:function(u){return c(e,l,n?u+n:u,a,1)}},quickTo:function(e,t,n){var r,s=ms.to(e,Xs((r={},r[t]="+=0.1",r.paused=!0,r.stagger=0,r),n||{})),o=function(l,c,u){return s.resetTo(t,l,c,u)};return o.tween=s,o},isTweening:function(e){return Kn.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=Eu(e.ease,zf.ease)),GC(zf,e||{})},config:function(e){return GC(Us,e||{})},registerEffect:function(e){var t=e.name,n=e.effect,r=e.plugins,s=e.defaults,o=e.extendTimeline;(r||"").split(",").forEach(function(a){return a&&!Ts[a]&&!Vs[a]&&mm(t+" effect requires "+a+" plugin.")}),x2[t]=function(a,l,c){return n(go(a),Xs(l||{},s),c)},o&&(Hr.prototype[t]=function(a,l,c){return this.add(x2[t](a,ya(l)?l:(c=l)&&{},this),c)})},registerEase:function(e,t){an[e]=Eu(t)},parseEase:function(e,t){return arguments.length?Eu(e,t):an},getById:function(e){return Kn.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var n=new Hr(e),r,s;for(n.smoothChildTiming=ds(e.smoothChildTiming),Kn.remove(n),n._dp=0,n._time=n._tTime=Kn._time,r=Kn._first;r;)s=r._next,(t||!(!r._dur&&r instanceof bi&&r.vars.onComplete===r._targets[0]))&&da(n,r,r._start-r._delay),r=s;return da(Kn,n,0),n},context:function(e,t){return e?new XL(e,t):Hn},matchMedia:function(e){return new yU(e)},matchMediaRefresh:function(){return Cu.forEach(function(e){var t=e.conditions,n,r;for(r in t)t[r]&&(t[r]=!1,n=1);n&&e.revert()})||Jb()},addEventListener:function(e,t){var n=jx[e]||(jx[e]=[]);~n.indexOf(t)||n.push(t)},removeEventListener:function(e,t){var n=jx[e],r=n&&n.indexOf(t);r>=0&&n.splice(r,1)},utils:{wrap:Z4,wrapYoyo:Q4,distribute:wL,random:EL,snap:TL,normalize:q4,getUnit:Sr,clamp:X4,splitColor:LL,toArray:go,selector:Vb,mapRange:RL,pipe:J4,unitize:K4,interpolate:$4,shuffle:AL},install:fL,effects:x2,ticker:Ps,updateRoot:Hr.updateRoot,plugins:Ts,globalTimeline:Kn,core:{PropTween:hs,globals:hL,Tween:bi,Timeline:Hr,Animation:ym,getCache:wu,_removeLinkedListItem:Xy,reverting:function(){return rr},context:function(e){return e&&Hn&&(Hn.data.push(e),e._ctx=Hn),Hn},suppressOverwrites:function(e){return RA=e}}};fs("to,from,fromTo,delayedCall,set,killTweensOf",function(i){return Rv[i]=bi[i]});Ps.add(Hr.updateRoot);hf=Rv.to({},{duration:0});var _U=function(e,t){for(var n=e._pt;n&&n.p!==t&&n.op!==t&&n.fp!==t;)n=n._next;return n},SU=function(e,t){var n=e._targets,r,s,o;for(r in t)for(s=n.length;s--;)o=e._ptLookup[s][r],o&&(o=o.d)&&(o._pt&&(o=_U(o,r)),o&&o.modifier&&o.modifier(t[r],e,n[s],r))},b2=function(e,t){return{name:e,headless:1,rawVars:1,init:function(r,s,o){o._onInit=function(a){var l,c;if(Ji(s)&&(l={},fs(s,function(u){return l[u]=1}),s=l),t){l={};for(c in s)l[c]=t(s[c]);s=l}SU(a,s)}}}},ms=Rv.registerPlugin({name:"attr",init:function(e,t,n,r,s){var o,a,l;this.tween=n;for(o in t)l=e.getAttribute(o)||"",a=this.add(e,"setAttribute",(l||0)+"",t[o],r,s,0,0,o),a.op=o,a.b=l,this._props.push(o)},render:function(e,t){for(var n=t._pt;n;)rr?n.set(n.t,n.p,n.b,n):n.r(e,n.d),n=n._next}},{name:"endArray",headless:1,init:function(e,t){for(var n=t.length;n--;)this.add(e,n,e[n]||0,t[n],0,0,0,0,0,1)}},b2("roundProps",Xb),b2("modifiers"),b2("snap",TL))||Rv;bi.version=Hr.version=ms.version="3.14.2";dL=1;IA()&&Wf();an.Power0;an.Power1;an.Power2;an.Power3;an.Power4;an.Linear;an.Quad;an.Cubic;an.Quart;an.Quint;an.Strong;an.Elastic;an.Back;an.SteppedEase;an.Bounce;an.Sine;an.Expo;an.Circ;/*! 48 * CSSPlugin 3.14.2 49 * https://gsap.com 50 * 51 * Copyright 2008-2025, GreenSock. All rights reserved. 52 * Subject to the terms at https://gsap.com/standard-license 53 * @author: Jack Doyle, [email protected] 54*/var JC,jl,Af,jA,mu,KC,WA,bU=function(){return typeof window<"u"},ol={},ou=180/Math.PI,wf=Math.PI/180,Sd=Math.atan2,qC=1e8,VA=/([A-Z])/g,MU=/(left|right|width|margin|padding|x)/i,AU=/[\s,\(]\S/,ha={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},Kb=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},wU=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},TU=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},EU=function(e,t){return t.set(t.t,t.p,e===1?t.e:e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},CU=function(e,t){var n=t.s+t.c*e;t.set(t.t,t.p,~~(n+(n<0?-.5:.5))+t.u,t)},YL=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},JL=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},RU=function(e,t,n){return e.style[t]=n}
vendor: 4,632 bytes, line 54
54,PU=function(e,t,n){return e.style.setProperty(t,n)},IU=function(e,t,n){return e._gsap[t]=n},LU=function(e,t,n){return e._gsap.scaleX=e._gsap.scaleY=n},BU=function(e,t,n,r,s){var o=e._gsap;o.scaleX=o.scaleY=n,o.renderTransform(s,o)},DU=function(e,t,n,r,s){var o=e._gsap;o[t]=n,o.renderTransform(s,o)},qn="transform",ps=qn+"Origin",FU=function i(e,t){var n=this,r=this.target,s=r.style,o=r._gsap;if(e in ol&&s){if(this.tfm=this.tfm||{},e!=="transform")e=ha[e]||e,~e.indexOf(",")?e.split(",").forEach(function(a){return n.tfm[a]=ja(r,a)}):this.tfm[e]=o.x?o[e]:ja(r,e),e===ps&&(this.tfm.zOrigin=o.zOrigin);else return ha.transform.split(",").forEach(function(a){return i.call(n,a,t)});if(this.props.indexOf(qn)>=0)return;o.svg&&(this.svgo=r.getAttribute("data-svg-origin"),this.props.push(ps,t,"")),e=qn}(s||t)&&this.props.push(e,t,s[e])},KL=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},NU=function(){var e=this.props,t=this.target,n=t.style,r=t._gsap,s,o;for(s=0;s<e.length;s+=3)e[s+1]?e[s+1]===2?t[e[s]](e[s+2]):t[e[s]]=e[s+2]:e[s+2]?n[e[s]]=e[s+2]:n.removeProperty(e[s].substr(0,2)==="--"?e[s]:e[s].replace(VA,"-$1").toLowerCase());if(this.tfm){for(o in this.tfm)r[o]=this.tfm[o];r.svg&&(r.renderTransform(),t.setAttribute("data-svg-origin",this.svgo||"")),s=WA(),(!s||!s.isStart)&&!n[qn]&&(KL(n),r.zOrigin&&n[ps]&&(n[ps]+=" "+r.zOrigin+"px",r.zOrigin=0,r.renderTransform()),r.uncache=1)}},qL=function(e,t){var n={target:e,props:[],revert:NU,save:FU};return e._gsap||ms.core.getCache(e),t&&e.style&&e.nodeType&&t.split(",").forEach(function(r){return n.save(r)}),n},ZL,qb=function(e,t){var n=jl.createElementNS?jl.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):jl.createElement(e);return n&&n.style?n:jl.createElement(e)},Ds=function i(e,t,n){var r=getComputedStyle(e);return r[t]||r.getPropertyValue(t.replace(VA,"-$1").toLowerCase())||r.getPropertyValue(t)||!n&&i(e,Vf(t)||t,1)||""},ZC="O,Moz,ms,Ms,Webkit".split(","),Vf=function(e,t,n){var r=t||mu,s=r.style,o=5;if(e in s&&!n)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);o--&&!(ZC[o]+e in s););return o<0?null:(o===3?"ms":o>=0?ZC[o]:"")+e},Zb=function(){bU()&&window.document&&(JC=window,jl=JC.document,Af=jl.documentElement,mu=qb("div")||{style:{}},qb("div"),qn=Vf(qn),ps=qn+"Origin",mu.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",ZL=!!Vf("perspective"),WA=ms.core.reverting,jA=1)},QC=function(e){var t=e.ownerSVGElement,n=qb("svg",t&&t.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),r=e.cloneNode(!0),s;r.style.display="block",n.appendChild(r),Af.appendChild(n);try{s=r.getBBox()}catch{}return n.removeChild(r),Af.removeChild(n),s},$C=function(e,t){for(var n=t.length;n--;)if(e.hasAttribute(t[n]))return e.getAttribute(t[n])},QL=function(e){var t,n;try{t=e.getBBox()}catch{t=QC(e),n=1}return t&&(t.width||t.height)||n||(t=QC(e)),t&&!t.width&&!t.x&&!t.y?{x:+$C(e,["x","cx","x1"])||0,y:+$C(e,["y","cy","y1"])||0,width:0,height:0}:t},$L=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&QL(e))},pc=function(e,t){if(t){var n=e.style,r;t in ol&&t!==ps&&(t=qn),n.removeProperty?(r=t.substr(0,2),(r==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),n.removeProperty(r==="--"?t:t.replace(VA,"-$1").toLowerCase())):n.removeAttribute(t)}},Wl=function(e,t,n,r,s,o){var a=new hs(e._pt,t,n,0,1,o?JL:YL);return e._pt=a,a.b=r,a.e=s,e._props.push(n),a},e5={deg:1,rad:1,turn:1},kU={grid:1,flex:1},mc=function i(e,t,n,r){var s=parseFloat(n)||0,o=(n+"").trim().substr((s+"").length)||"px",a=mu.style,l=MU.test(t),c=e.tagName.toLowerCase()==="svg",u=(c?"client":"offset")+(l?"Width":"Height"),d=100,p=r==="px",m=r==="%",x,v,_,g;if(r===o||!s||e5[r]||e5[o])return s;if(o!=="px"&&!p&&(s=i(e,t,n,"px")),g=e.getCTM&&$L(e),(m||o==="%")&&(ol[t]||~t.indexOf("adius")))return x=g?e.getBBox()[l?"width":"height"]:e[u],di(m?s/x*d:s/100*x);if(a[l?"width":"height"]=d+(p?o:r),v=r!=="rem"&&~t.indexOf("adius")||r==="em"&&e.appendChild&&!c?e:e.parentNode,g&&(v=(e.ownerSVGElement||{}).parentNode),(!v||v===jl||!v.appendChild)&&(v=jl.body),_=v._gsap,_&&m&&_.width&&l&&_.time===Ps.time&&!_.uncache)return di(s/_.width*d);if(m&&(t==="height"||t==="width")){var S=e.style[t];e.style[t]=d+r,x=e[u],S?e.style[t]=S:pc(e,t)}else(m||o==="%")&&!kU[Ds(v,"display")]&&(a.position=Ds(e,"position")),v===e&&(a.position="static"),v.appendChild(mu),x=mu[u],v.removeChild(mu),a.position="absolute";return l&&m&&(_=wu(v),_.time=Ps.time,_.width=v[u]),di(p?x*s/d:x&&s?d/x*s:0)},ja=function(e,t,n,r){var s;return jA||Zb(),t in ha&&t!=="transform"&&(t=ha[t],~t.indexOf(",")&&(t=t.
vendor: 8,019 bytes, line 54
54split(",")[0])),ol[t]&&t!=="transform"?(s=Sm(e,r),s=t!=="transformOrigin"?s[t]:s.svg?s.origin:Iv(Ds(e,ps))+" "+s.zOrigin+"px"):(s=e.style[t],(!s||s==="auto"||r||~(s+"").indexOf("calc("))&&(s=Pv[t]&&Pv[t](e,t,n)||Ds(e,t)||mL(e,t)||(t==="opacity"?1:0))),n&&!~(s+"").trim().indexOf(" ")?mc(e,t,s,n)+n:s},OU=function(e,t,n,r){if(!n||n==="none"){var s=Vf(t,e,1),o=s&&Ds(e,s,1);o&&o!==n?(t=s,n=o):t==="borderColor"&&(n=Ds(e,"borderTopColor"))}var a=new hs(this._pt,e.style,t,0,1,WL),l=0,c=0,u,d,p,m,x,v,_,g,S,b,A,w;if(a.b=n,a.e=r,n+="",r+="",r.substring(0,6)==="var(--"&&(r=Ds(e,r.substring(4,r.indexOf(")")))),r==="auto"&&(v=e.style[t],e.style[t]=r,r=Ds(e,t)||r,v?e.style[t]=v:pc(e,t)),u=[n,r],DL(u),n=u[0],r=u[1],p=n.match(ff)||[],w=r.match(ff)||[],w.length){for(;d=ff.exec(r);)_=d[0],S=r.substring(l,d.index),x?x=(x+1)%5:(S.substr(-5)==="rgba("||S.substr(-5)==="hsla(")&&(x=1),_!==(v=p[c++]||"")&&(m=parseFloat(v)||0,A=v.substr((m+"").length),_.charAt(1)==="="&&(_=Mf(m,_)+A),g=parseFloat(_),b=_.substr((g+"").length),l=ff.lastIndex-b.length,b||(b=b||Us.units[t]||A,l===r.length&&(r+=b,a.e+=b)),A!==b&&(m=mc(e,t,v,b)||0),a._pt={_next:a._pt,p:S||c===1?S:",",s:m,c:g-m,m:x&&x<4||t==="zIndex"?Math.round:0});a.c=l<r.length?r.substring(l,r.length):""}else a.r=t==="display"&&r==="none"?JL:YL;return uL.test(r)&&(a.e=0),this._pt=a,a},t5={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},UU=function(e){var t=e.split(" "),n=t[0],r=t[1]||"50%";return(n==="top"||n==="bottom"||r==="left"||r==="right")&&(e=n,n=r,r=e),t[0]=t5[n]||n,t[1]=t5[r]||r,t.join(" ")},zU=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var n=t.t,r=n.style,s=t.u,o=n._gsap,a,l,c;if(s==="all"||s===!0)r.cssText="",l=1;else for(s=s.split(","),c=s.length;--c>-1;)a=s[c],ol[a]&&(l=1,a=a==="transformOrigin"?ps:qn),pc(n,a);l&&(pc(n,qn),o&&(o.svg&&n.removeAttribute("transform"),r.scale=r.rotate=r.translate="none",Sm(n,1),o.uncache=1,KL(r)))}},Pv={clearProps:function(e,t,n,r,s){if(s.data!=="isFromStart"){var o=e._pt=new hs(e._pt,t,n,0,0,zU);return o.u=r,o.pr=-10,o.tween=s,e._props.push(n),1}}},_m=[1,0,0,1,0,0],eB={},tB=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},n5=function(e){var t=Ds(e,qn);return tB(t)?_m:t.substr(7).match(cL).map(di)},XA=function(e,t){var n=e._gsap||wu(e),r=e.style,s=n5(e),o,a,l,c;return n.svg&&e.getAttribute("transform")?(l=e.transform.baseVal.consolidate().matrix,s=[l.a,l.b,l.c,l.d,l.e,l.f],s.join(",")==="1,0,0,1,0,0"?_m:s):(s===_m&&!e.offsetParent&&e!==Af&&!n.svg&&(l=r.display,r.display="block",o=e.parentNode,(!o||!e.offsetParent&&!e.getBoundingClientRect().width)&&(c=1,a=e.nextElementSibling,Af.appendChild(e)),s=n5(e),l?r.display=l:pc(e,"display"),c&&(a?o.insertBefore(e,a):o?o.appendChild(e):Af.removeChild(e))),t&&s.length>6?[s[0],s[1],s[4],s[5],s[12],s[13]]:s)},Qb=function(e,t,n,r,s,o){var a=e._gsap,l=s||XA(e,!0),c=a.xOrigin||0,u=a.yOrigin||0,d=a.xOffset||0,p=a.yOffset||0,m=l[0],x=l[1],v=l[2],_=l[3],g=l[4],S=l[5],b=t.split(" "),A=parseFloat(b[0])||0,w=parseFloat(b[1])||0,C,P,B,R;n?l!==_m&&(P=m*_-x*v)&&(B=A*(_/P)+w*(-v/P)+(v*S-_*g)/P,R=A*(-x/P)+w*(m/P)-(m*S-x*g)/P,A=B,w=R):(C=QL(e),A=C.x+(~b[0].indexOf("%")?A/100*C.width:A),w=C.y+(~(b[1]||b[0]).indexOf("%")?w/100*C.height:w)),r||r!==!1&&a.smooth?(g=A-c,S=w-u,a.xOffset=d+(g*m+S*v)-g,a.yOffset=p+(g*x+S*_)-S):a.xOffset=a.yOffset=0,a.xOrigin=A,a.yOrigin=w,a.smooth=!!r,a.origin=t,a.originIsAbsolute=!!n,e.style[ps]="0px 0px",o&&(Wl(o,a,"xOrigin",c,A),Wl(o,a,"yOrigin",u,w),Wl(o,a,"xOffset",d,a.xOffset),Wl(o,a,"yOffset",p,a.yOffset)),e.setAttribute("data-svg-origin",A+" "+w)},Sm=function(e,t){var n=e._gsap||new OL(e);if("x"in n&&!t&&!n.uncache)return n;var r=e.style,s=n.scaleX<0,o="px",a="deg",l=getComputedStyle(e),c=Ds(e,ps)||"0",u,d,p,m,x,v,_,g,S,b,A,w,C,P,B,R,E,L,N,k,Y,z,W,V,G,Z,O,ee,le,ge,Se,Ye;return u=d=p=v=_=g=S=b=A=0,m=x=1,n.svg=!!(e.getCTM&&$L(e)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(r[qn]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[qn]!=="none"?l[qn]:"")),r.scale=r.rotate=r.translate="none"),P=XA(e,n.svg),n.svg&&(n.uncache?(G=e.getBBox(),c=n.xOrigin-G.x+"px "+(n.yOrigin-G.y)+"px",V=""):V=!t&&e.getAttribute("data-svg-origin"),Qb(e,V||c,!!V||n.originIsAbsolute,n.smooth!==!1,P)),w=n.xOrigin||0,C=n.yOrigin||0,P!==_m&&(L=P[0],N=P[1],k=P[2],Y=P[3],u=z=P[4],d=W=P[5],P.length===6?(m=Math.sqrt(L*L+N*N),x=Math.sqrt(Y*Y+k*k),v=L||N?Sd(N,L)*ou:0,S=k||Y?Sd(k,Y)*ou+v:0,S&&(x*=Math.abs(Math.cos(S*wf))),n.svg&&(u-=w-(w*L+C*k),d-=C-(w*N+C*Y))):(Ye=P[6],ge=P[7],O=P[8],ee=P[9],le=P[10],Se=P[11],u=P[12],d=P[13],p=P[14],B=Sd(Ye,le),_=B*ou,B&&(R=Math.cos(-B),E=Math.sin(-B),V=z*R+O*E,G=W*R+ee*E,Z=Ye*R+le*E,O=z*-E+O*R,ee=W*-E+ee*R,le=Ye*-E+le*R,Se=ge*-E+Se*R,z=V,W=G,Ye=Z),B=Sd(-k,le),g=B*ou,B&&(R=Math.cos(-B),E=Math.sin(-B),V=L*R-O*E,G=N*R-ee*E,Z=k*R-le*E,Se=Y*E+Se*R,L=V,N=G,k=Z),B=Sd(N,L),v=B*ou,B&&(R=Math.cos(B),E=Math.sin(B),V=L*R+N*E,G=z*R+W*E,N=N*R-L*E,W=W*R-z*E,L=V,z=G),_&&Math.abs(_)+Math.abs(v)>359.9&&(_=v=0,g=180-g),m=di(Math.sqrt(L*L+N*N+k*k)),x=di(Math.sqrt(W*W+Ye*Ye)),B=Sd(z,W),S=Math.abs(B)>2e-4?B*ou:0,A=Se?1/(Se<0?-Se:Se):0),n.svg&&(V=e.getAttribute("transform"),n.forceCSS=e.setAttribute("transform","")||!tB(Ds(e,qn)),V&&e.setAttribute("transform",V))),Math.abs(S)>90&&Math.abs(S)<270&&(s?(m*=-1,S+=v<=0?180:-180,v+=v<=0?180:-180):(x*=-1,S+=S<=0?180:-180)),t=t||n.uncache,n.x=u-((n.xPercent=u&&(!t&&n.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-u)?-50:0)))?e.offsetWidth*n.xPercent/100:0)+o,n.y=d-((n.yPercent=d&&(!t&&n.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-d)?-50:0)))?e.offsetHeight*n.yPercent/100:0)+o,n.z=p+o,n.scaleX=di(m),n.scaleY=di(x),n.rotation=di(v)+a,n.rotationX=di(_)+a,n.rotationY=di(g)+a,n.skewX=S+a,n.skewY=b+a,n.transformPerspective=A+o,(n.zOrigin=parseFloat(c.split(" ")[2])||!t&&n.zOrigin||0)&&(r[ps]=Iv(c)),n.xOffset=n.yOffset=0,n.force3D=Us.force3D,n.renderTransform=n.svg?GU:ZL?nB:HU,n.uncache=0,n},Iv=function(e){return(e=e.split(" "))[0]+" "+e[1]},M2=function(e,t,n){var r=Sr(t);return di(parseFloat(t)+parseFloat(mc(e,"x",n+"px",r)))+r},HU=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,nB(e,t)},zc="0deg",Hh="0px",Hc=") ",nB=function(e,t){var n=t||this,r=n.xPercent,s=n.yPercent,o=n.x,a=n.y,l=n.z,c=n.rotation,u=n.rotationY,d=n.rotationX,p=n.skewX,m=n.skewY,x=n.scaleX,v=n.scaleY,_=n.transformPerspective,g=n.force3D,S=n.target,b=n.zOrigin,A="",w=g==="auto"&&e&&e!==1||g===!0;if(b&&(d!==zc||u!==zc)){var C=parseFloat(u)*wf,P=Math.sin(C),B=Math.cos(C),R;C=parseFloat(d)*wf,R=Math.cos(C),o=M2(S,o,P*R*-b),a=M2(S,a,-Math.sin(C)*-b),l=M2(S,l,B*R*-b+b)}_!==Hh&&(A+="perspective("+_+Hc),(r||s)&&(A+="translate("+r+"%, "+s+"%) "),(w||o!==Hh||a!==Hh||l!==Hh)&&(A+=l!==Hh||w?"translate3d("+o+", "+a+", "+l+") ":"translate("+o+", "+a+Hc),c!==zc&&(A+="rotate("+c+Hc),u!==zc&&(A+="rotateY("+u+Hc),d!==zc&&(A+="rotateX("+d+Hc),(p!==zc||m!==zc)&&(A+="skew("+p+", "+m+Hc),(x!==1||v!==1)&&(A+="scale("+x+", "+v+Hc),S.style[qn]=A||"translate(0, 0)"},GU=function(e,t){var n=t||this,r=n.xPercent,s=n.yPercent,o=n.x,a=n.y,l=n.rotation,c=n.skewX,u=n.skewY,d=n.scaleX,p=n.scaleY,m=n.target,x=n.xOrigin,v=n.yOrigin,_=n.xOffset,g=n.yOffset,S=n.forceCSS,b=parseFloat(o),A=parseFloat(a),w,C,P,B,R;l=parseFloat(l),c=parseFloat(c),u=parseFloat(u),u&&(u=parseFloat(u),c+=u,l+=u),l||c?(l*=wf,c*=wf,w=Math.cos(l)*d,C=Math.sin(l)*d,P=Math.sin(l-c)*-p,B=Math.cos(l-c)*p,c&&(u*=wf,R=Math.tan(c-u),R=Math.sqrt(1+R*R),P*=R,B*=R,u&&(R=Math.tan(u),R=Math.sqrt(1+R*R),w*=R,C*=R)),w=di(w),C=di(C),P=di(P),B=di(B)):(w=d,B=p,C=P=0),(b&&!~(o+"").indexOf("px")||A&&!~(a+"").indexOf("px"))&&(b=mc(m,"x",o,"px"),A=mc(m,"y",a,"px")),(x||v||_||g)&&(b=di(b+x-(x*w+v*P)+_),A=di(A+v-(x*C+v*B)+g)),(r||s)&&(R=m.getBBox(),b=di(b+r/100*R.width),A=di(A+s/100*R.height)),R="matrix("+w+","+C+","+P+","+B+","+b+","+A+")",m.setAttribute("transform",R),S&&(m.style[qn]=R)}
vendor: 5,208 bytes, line 54
54,jU=function(e,t,n,r,s){var o=360,a=Ji(s),l=parseFloat(s)*(a&&~s.indexOf("rad")?ou:1),c=l-r,u=r+c+"deg",d,p;return a&&(d=s.split("_")[1],d==="short"&&(c%=o,c!==c%(o/2)&&(c+=c<0?o:-o)),d==="cw"&&c<0?c=(c+o*qC)%o-~~(c/o)*o:d==="ccw"&&c>0&&(c=(c-o*qC)%o-~~(c/o)*o)),e._pt=p=new hs(e._pt,t,n,r,c,wU),p.e=u,p.u="deg",e._props.push(n),p},i5=function(e,t){for(var n in t)e[n]=t[n];return e},WU=function(e,t,n){var r=i5({},n._gsap),s="perspective,force3D,transformOrigin,svgOrigin",o=n.style,a,l,c,u,d,p,m,x;r.svg?(c=n.getAttribute("transform"),n.setAttribute("transform",""),o[qn]=t,a=Sm(n,1),pc(n,qn),n.setAttribute("transform",c)):(c=getComputedStyle(n)[qn],o[qn]=t,a=Sm(n,1),o[qn]=c);for(l in ol)c=r[l],u=a[l],c!==u&&s.indexOf(l)<0&&(m=Sr(c),x=Sr(u),d=m!==x?mc(n,l,c,x):parseFloat(c),p=parseFloat(u),e._pt=new hs(e._pt,a,l,d,p-d,Kb),e._pt.u=x||0,e._props.push(l));i5(a,r)};fs("padding,margin,Width,Radius",function(i,e){var t="Top",n="Right",r="Bottom",s="Left",o=(e<3?[t,n,r,s]:[t+s,t+n,r+n,r+s]).map(function(a){return e<2?i+a:"border"+a+i});Pv[e>1?"border"+i:i]=function(a,l,c,u,d){var p,m;if(arguments.length<4)return p=o.map(function(x){return ja(a,x,c)}),m=p.join(" "),m.split(p[0]).length===5?p[0]:m;p=(u+"").split(" "),m={},o.forEach(function(x,v){return m[x]=p[v]=p[v]||p[(v-1)/2|0]}),a.init(l,m,d)}});var iB={name:"css",register:Zb,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,n,r,s){var o=this._props,a=e.style,l=n.vars.startAt,c,u,d,p,m,x,v,_,g,S,b,A,w,C,P,B,R;jA||Zb(),this.styles=this.styles||qL(e),B=this.styles.props,this.tween=n;for(v in t)if(v!=="autoRound"&&(u=t[v],!(Ts[v]&&UL(v,t,n,r,e,s)))){if(m=typeof u,x=Pv[v],m==="function"&&(u=u.call(n,r,e,s),m=typeof u),m==="string"&&~u.indexOf("random(")&&(u=xm(u)),x)x(this,e,v,u,n)&&(P=1);else if(v.substr(0,2)==="--")c=(getComputedStyle(e).getPropertyValue(v)+"").trim(),u+="",oc.lastIndex=0,oc.test(c)||(_=Sr(c),g=Sr(u),g?_!==g&&(c=mc(e,v,c,g)+g):_&&(u+=_)),this.add(a,"setProperty",c,u,r,s,0,0,v),o.push(v),B.push(v,0,a[v]);else if(m!=="undefined"){if(l&&v in l?(c=typeof l[v]=="function"?l[v].call(n,r,e,s):l[v],Ji(c)&&~c.indexOf("random(")&&(c=xm(c)),Sr(c+"")||c==="auto"||(c+=Us.units[v]||Sr(ja(e,v))||""),(c+"").charAt(1)==="="&&(c=ja(e,v))):c=ja(e,v),p=parseFloat(c),S=m==="string"&&u.charAt(1)==="="&&u.substr(0,2),S&&(u=u.substr(2)),d=parseFloat(u),v in ha&&(v==="autoAlpha"&&(p===1&&ja(e,"visibility")==="hidden"&&d&&(p=0),B.push("visibility",0,a.visibility),Wl(this,a,"visibility",p?"inherit":"hidden",d?"inherit":"hidden",!d)),v!=="scale"&&v!=="transform"&&(v=ha[v],~v.indexOf(",")&&(v=v.split(",")[0]))),b=v in ol,b){if(this.styles.save(v),R=u,m==="string"&&u.substring(0,6)==="var(--"){if(u=Ds(e,u.substring(4,u.indexOf(")"))),u.substring(0,5)==="calc("){var E=e.style.perspective;e.style.perspective=u,u=Ds(e,"perspective"),E?e.style.perspective=E:pc(e,"perspective")}d=parseFloat(u)}if(A||(w=e._gsap,w.renderTransform&&!t.parseTransform||Sm(e,t.parseTransform),C=t.smoothOrigin!==!1&&w.smooth,A=this._pt=new hs(this._pt,a,qn,0,1,w.renderTransform,w,0,-1),A.dep=1),v==="scale")this._pt=new hs(this._pt,w,"scaleY",w.scaleY,(S?Mf(w.scaleY,S+d):d)-w.scaleY||0,Kb),this._pt.u=0,o.push("scaleY",v),v+="X";else if(v==="transformOrigin"){B.push(ps,0,a[ps]),u=UU(u),w.svg?Qb(e,u,0,C,0,this):(g=parseFloat(u.split(" ")[2])||0,g!==w.zOrigin&&Wl(this,w,"zOrigin",w.zOrigin,g),Wl(this,a,v,Iv(c),Iv(u)));continue}else if(v==="svgOrigin"){Qb(e,u,1,C,0,this);continue}else if(v in eB){jU(this,w,v,p,S?Mf(p,S+u):u);continue}else if(v==="smoothOrigin"){Wl(this,w,"smooth",w.smooth,u);continue}else if(v==="force3D"){w[v]=u;continue}else if(v==="transform"){WU(this,u,e);continue}}else v in a||(v=Vf(v)||v);if(b||(d||d===0)&&(p||p===0)&&!AU.test(u)&&v in a)_=(c+"").substr((p+"").length),d||(d=0),g=Sr(u)||(v in Us.units?Us.units[v]:_),_!==g&&(p=mc(e,v,c,g)),this._pt=new hs(this._pt,b?w:a,v,p,(S?Mf(p,S+d):d)-p,!b&&(g==="px"||v==="zIndex")&&t.autoRound!==!1?CU:Kb),this._pt.u=g||0,b&&R!==u?(this._pt.b=c,this._pt.e=R,this._pt.r=EU):_!==g&&g!=="%"&&(this._pt.b=c,this._pt.r=TU);else if(v in a)OU.call(this,e,v,c,S?S+u:u);else if(v in e)this.add(e,v,c||e[v],S?S+u:u,r,s);else if(v!=="parseTransform"){BA(v,u);continue}b||(v in a?B.push(v,0,a[v]):typeof e[v]=="function"?B.push(v,2,e[v]()):B.push(v,1,c||e[v])),o.push(v)}}P&&VL(this)},render:function(e,t){if(t.tween._time||!WA())for(var n=t._pt;n;)n.r(e,n.d),n=n._next;else t.styles.revert()},get:ja,aliases:ha,getSetter:function(e,t,n){var r=ha[t];return r&&r.indexOf(",")<0&&(t=r),t in ol&&t!==ps&&(e._gsap.x||ja(e,"x"))?n&&KC===n?t==="scale"?LU:IU:(KC=n||{})&&(t==="scale"?BU:DU):e.style&&!PA(e.style[t])?RU:~t.indexOf("-")?PU:HA(e,t)},core:{_removeProperty:pc,_getMatrix:XA}};ms.utils.checkPrefix=Vf;ms.core.getStyleSaver=qL;(function(i,e,t,n){var r=fs(i+","+e+","+t,function(s){ol[s]=1});fs(e,function(s){Us.units[s]="deg",eB[s]=1}),ha[r[13]]=i+","+e,fs(n,function(s){var o=s.split(":");ha[o[1]]=r[o[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");
vendor: 15,061 bytes, lines 54-68
54fs("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(i){Us.units[i]="px"});ms.registerPlugin(iB);var YA=ms.registerPlugin(iB)||ms;YA.core.Tween;function VU(i,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,n.key,n)}}function XU(i,e,t){return e&&VU(i.prototype,e),i}/*! 55 * Observer 3.14.2 56 * https://gsap.com 57 * 58 * @license Copyright 2008-2025, GreenSock. All rights reserved. 59 * Subject to the terms at https://gsap.com/standard-license 60 * @author: Jack Doyle, [email protected] 61*/var nr,Wx,Is,Vl,Xl,Tf,rB,au,Dp,sB,Ka,Bo,oB,aB=function(){return nr||typeof window<"u"&&(nr=window.gsap)&&nr.registerPlugin&&nr},lB=1,pf=[],Xt=[],va=[],Fp=Date.now,$b=function(e,t){return t},YU=function(){var e=Dp.core,t=e.bridge||{},n=e._scrollers,r=e._proxies;n.push.apply(n,Xt),r.push.apply(r,va),Xt=n,va=r,$b=function(o,a){return t[o](a)}},ac=function(e,t){return~va.indexOf(e)&&va[va.indexOf(e)+1][t]},Np=function(e){return!!~sB.indexOf(e)},Fr=function(e,t,n,r,s){return e.addEventListener(t,n,{passive:r!==!1,capture:!!s})},Br=function(e,t,n,r){return e.removeEventListener(t,n,!!r)},hg="scrollLeft",pg="scrollTop",eM=function(){return Ka&&Ka.isPressed||Xt.cache++},Lv=function(e,t){var n=function r(s){if(s||s===0){lB&&(Is.history.scrollRestoration="manual");var o=Ka&&Ka.isPressed;s=r.v=Math.round(s)||(Ka&&Ka.iOS?1:0),e(s),r.cacheID=Xt.cache,o&&$b("ss",s)}else(t||Xt.cache!==r.cacheID||$b("ref"))&&(r.cacheID=Xt.cache,r.v=e());return r.v+r.offset};return n.offset=0,e&&n},Gr={s:hg,p:"left",p2:"Left",os:"right",os2:"Right",d:"width",d2:"Width",a:"x",sc:Lv(function(i){return arguments.length?Is.scrollTo(i,Li.sc()):Is.pageXOffset||Vl[hg]||Xl[hg]||Tf[hg]||0})},Li={s:pg,p:"top",p2:"Top",os:"bottom",os2:"Bottom",d:"height",d2:"Height",a:"y",op:Gr,sc:Lv(function(i){return arguments.length?Is.scrollTo(Gr.sc(),i):Is.pageYOffset||Vl[pg]||Xl[pg]||Tf[pg]||0})},is=function(e,t){return(t&&t._ctx&&t._ctx.selector||nr.utils.toArray)(e)[0]||(typeof e=="string"&&nr.config().nullTargetWarn!==!1?console.warn("Element not found:",e):null)},JU=function(e,t){for(var n=t.length;n--;)if(t[n]===e||t[n].contains(e))return!0;return!1},gc=function(e,t){var n=t.s,r=t.sc;Np(e)&&(e=Vl.scrollingElement||Xl);var s=Xt.indexOf(e),o=r===Li.sc?1:2;!~s&&(s=Xt.push(e)-1),Xt[s+o]||Fr(e,"scroll",eM);var a=Xt[s+o],l=a||(Xt[s+o]=Lv(ac(e,n),!0)||(Np(e)?r:Lv(function(c){return arguments.length?e[n]=c:e[n]})));return l.target=e,a||(l.smooth=nr.getProperty(e,"scrollBehavior")==="smooth"),l},tM=function(e,t,n){var r=e,s=e,o=Fp(),a=o,l=t||50,c=Math.max(500,l*3),u=function(x,v){var _=Fp();v||_-o>l?(s=r,r=x,a=o,o=_):n?r+=x:r=s+(x-s)/(_-a)*(o-a)},d=function(){s=r=n?0:r,a=o=0},p=function(x){var v=a,_=s,g=Fp();return(x||x===0)&&x!==r&&u(x),o===a||g-a>c?0:(r+(n?_:-_))/((n?g:o)-v)*1e3};return{update:u,reset:d,getVelocity:p}},Gh=function(e,t){return t&&!e._gsapAllow&&e.preventDefault(),e.changedTouches?e.changedTouches[0]:e},r5=function(e){var t=Math.max.apply(Math,e),n=Math.min.apply(Math,e);return Math.abs(t)>=Math.abs(n)?t:n},cB=function(){Dp=nr.core.globals().ScrollTrigger,Dp&&Dp.core&&YU()},uB=function(e){return nr=e||aB(),!Wx&&nr&&typeof document<"u"&&document.body&&(Is=window,Vl=document,Xl=Vl.documentElement,Tf=Vl.body,sB=[Is,Vl,Xl,Tf],nr.utils.clamp,oB=nr.core.context||function(){},au="onpointerenter"in Tf?"pointer":"mouse",rB=hi.isTouch=Is.matchMedia&&Is.matchMedia("(hover: none), (pointer: coarse)").matches?1:"ontouchstart"in Is||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?2:0,Bo=hi.eventTypes=("ontouchstart"in Xl?"touchstart,touchmove,touchcancel,touchend":"onpointerdown"in Xl?"pointerdown,pointermove,pointercancel,pointerup":"mousedown,mousemove,mouseup,mouseup").split(","),setTimeout(function(){return lB=0},500),cB(),Wx=1),Wx};Gr.op=Li;Xt.cache=0;var hi=function(){function i(t){this.init(t)}var e=i.prototype;return e.init=function(n){Wx||uB(nr)||console.warn("Please gsap.registerPlugin(Observer)"),Dp||cB();var r=n.tolerance,s=n.dragMinimum,o=n.type,a=n.target,l=n.lineHeight,c=n.debounce,u=n.preventDefault,d=n.onStop,p=n.onStopDelay,m=n.ignore,x=n.wheelSpeed,v=n.event,_=n.onDragStart,g=n.onDragEnd,S=n.onDrag,b=n.onPress,A=n.onRelease,w=n.onRight,C=n.onLeft,P=n.onUp,B=n.onDown,R=n.onChangeX,E=n.onChangeY,L=n.onChange,N=n.onToggleX,k=n.onToggleY,Y=n.onHover,z=n.onHoverEnd,W=n.onMove,V=n.ignoreCheck,G=n.isNormalizer,Z=n.onGestureStart,O=n.onGestureEnd,ee=n.onWheel,le=n.onEnable,ge=n.onDisable,Se=n.onClick,Ye=n.scrollSpeed,K=n.capture,q=n.allowClicks,re=n.lockAxis,Ce=n.onLockAxis;this.target=a=is(a)||Xl,this.vars=n,m&&(m=nr.utils.toArray(m)),r=r||1e-9,s=s||0,x=x||1,Ye=Ye||1,o=o||"wheel,touch,pointer",c=c!==!1,l||(l=parseFloat(Is.getComputedStyle(Tf).lineHeight)||22);var Te,De,tt,Pe,me,Ee,be,$=this,J=0,Ue=0,Ne=n.passive||!u&&n.passive!==!1,ke=gc(a,Gr),Ae=gc(a,Li),U=ke(),F=Ae(),ne=~o.indexOf("touch")&&!~o.indexOf("pointer")&&Bo[0]==="pointerdown",se=Np(a),he=a.ownerDocument||Vl,de=[0,0,0],ze=[0,0,0],Be=0,Ke=function(){return Be=Fp()},$e=function(rt,Mt){return($.event=rt)&&m&&JU(rt.target,m)||Mt&&ne&&rt.pointerType!=="touch"||V&&V(rt,Mt)},Fe=function(){$._vx.reset(),$._vy.reset(),De.pause(),d&&d($)},Xe=function(){var rt=$.deltaX=r5(de),Mt=$.deltaY=r5(ze),nt=Math.abs(rt)>=r,yt=Math.abs(Mt)>=r;L&&(nt||yt)&&L($,rt,Mt,de,ze),nt&&(w&&$.deltaX>0&&w($),C&&$.deltaX<0&&C($),R&&R($),N&&$.deltaX<0!=J<0&&N($),J=$.deltaX,de[0]=de[1]=de[2]=0),yt&&(B&&$.deltaY>0&&B($),P&&$.deltaY<0&&P($),E&&E($),k&&$.deltaY<0!=Ue<0&&k($),Ue=$.deltaY,ze[0]=ze[1]=ze[2]=0),(Pe||tt)&&(W&&W($),tt&&(_&&tt===1&&_($),S&&S($),tt=0),Pe=!1),Ee&&!(Ee=!1)&&Ce&&Ce($),me&&(ee($),me=!1),Te=0},it=function(rt,Mt,nt){de[nt]+=rt,ze[nt]+=Mt,$._vx.update(rt),$._vy.update(Mt),c?Te||(Te=requestAnimationFrame(Xe)):Xe()},ie=function(rt,Mt){re&&!be&&($.axis=be=Math.abs(rt)>Math.abs(Mt)?"x":"y",Ee=!0),be!=="y"&&(de[2]+=rt,$._vx.update(rt,!0)),be!=="x"&&(ze[2]+=Mt,$._vy.update(Mt,!0)),c?Te||(Te=requestAnimationFrame(Xe)):Xe()},fe=function(rt){if(!$e(rt,1)){rt=Gh(rt,u);var Mt=rt.clientX,nt=rt.clientY,yt=Mt-$.x,ft=nt-$.y,Tt=$.isDragging;$.x=Mt,$.y=nt,(Tt||(yt||ft)&&(Math.abs($.startX-Mt)>=s||Math.abs($.startY-nt)>=s))&&(tt||(tt=Tt?2:1),Tt||($.isDragging=!0),ie(yt,ft))}},He=$.onPress=function(Qe){$e(Qe,1)||Qe&&Qe.button||($.axis=be=null,De.pause(),$.isPressed=!0,Qe=Gh(Qe),J=Ue=0,$.startX=$.x=Qe.clientX,$.startY=$.y=Qe.clientY,$._vx.reset(),$._vy.reset(),Fr(G?a:he,Bo[1],fe,Ne,!0),$.deltaX=$.deltaY=0,b&&b($))},Q=$.onRelease=function(Qe){if(!$e(Qe,1)){Br(G?a:he,Bo[1],fe,!0);var rt=!isNaN($.y-$.startY),Mt=$.isDragging,nt=Mt&&(Math.abs($.x-$.startX)>3||Math.abs($.y-$.startY)>3),yt=Gh(Qe);!nt&&rt&&($._vx.reset(),$._vy.reset(),u&&q&&nr.delayedCall(.08,function(){if(Fp()-Be>300&&!Qe.defaultPrevented){if(Qe.target.click)Qe.target.click();else if(he.createEvent){var ft=he.createEvent("MouseEvents");ft.initMouseEvent("click",!0,!0,Is,1,yt.screenX,yt.screenY,yt.clientX,yt.clientY,!1,!1,!1,!1,0,null),Qe.target.dispatchEvent(ft)}}})),$.isDragging=$.isGesturing=$.isPressed=!1,d&&Mt&&!G&&De.restart(!0),tt&&Xe(),g&&Mt&&g($),A&&A($,nt)}},je=function(rt){return rt.touches&&rt.touches.length>1&&($.isGesturing=!0)&&Z(rt,$.isDragging)},Re=function(){return($.isGesturing=!1)||O($)},Ge=function(rt){if(!$e(rt)){var Mt=ke(),nt=Ae();it((Mt-U)*Ye,(nt-F)*Ye,1),U=Mt,F=nt,d&&De.restart(!0)}},Le=function(rt){if(!$e(rt)){rt=Gh(rt,u),ee&&(me=!0);var Mt=(rt.deltaMode===1?l:rt.deltaMode===2?Is.innerHeight:1)*x;it(rt.deltaX*Mt,rt.deltaY*Mt,0),d&&!G&&De.restart(!0)}},Me=function(rt){if(!$e(rt)){var Mt=rt.clientX,nt=rt.clientY,yt=Mt-$.x,ft=nt-$.y;$.x=Mt,$.y=nt,Pe=!0,d&&De.restart(!0),(yt||ft)&&ie(yt,ft)}},Oe=function(rt){$.event=rt,Y($)},lt=function(rt){$.event=rt,z($)},Pt=function(rt){return $e(rt)||Gh(rt,u)&&Se($)};De=$._dc=nr.delayedCall(p||.25,Fe).pause(),$.deltaX=$.deltaY=0,$._vx=tM(0,50,!0),$._vy=tM(0,50,!0),$.scrollX=ke,$.scrollY=Ae,$.isDragging=$.isGesturing=$.isPressed=!1,oB(this),$.enable=function(Qe){return $.isEnabled||(Fr(se?he:a,"scroll",eM),o.indexOf("scroll")>=0&&Fr(se?he:a,"scroll",Ge,Ne,K),o.indexOf("wheel")>=0&&Fr(a,"wheel",Le,Ne,K),(o.indexOf("touch")>=0&&rB||o.indexOf("pointer")>=0)&&(Fr(a,Bo[0],He,Ne,K),Fr(he,Bo[2],Q),Fr(he,Bo[3],Q),q&&Fr(a,"click",Ke,!0,!0),Se&&Fr(a,"click",Pt),Z&&Fr(he,"gesturestart",je),O&&Fr(he,"gestureend",Re),Y&&Fr(a,au+"enter",Oe),z&&Fr(a,au+"leave",lt),W&&Fr(a,au+"move",Me)),$.isEnabled=!0,$.isDragging=$.isGesturing=$.isPressed=Pe=tt=!1,$._vx.reset(),$._vy.reset(),U=ke(),F=Ae(),Qe&&Qe.type&&He(Qe),le&&le($)),$},$.disable=function(){$.isEnabled&&(pf.filter(function(Qe){return Qe!==$&&Np(Qe.target)}).length||Br(se?he:a,"scroll",eM),$.isPressed&&($._vx.reset(),$._vy.reset(),Br(G?a:he,Bo[1],fe,!0)),Br(se?he:a,"scroll",Ge,K),Br(a,"wheel",Le,K),Br(a,Bo[0],He,K),Br(he,Bo[2],Q),Br(he,Bo[3],Q),Br(a,"click",Ke,!0),Br(a,"click",Pt),Br(he,"gesturestart",je),Br(he,"gestureend",Re),Br(a,au+"enter",Oe),Br(a,au+"leave",lt),Br(a,au+"move",Me),$.isEnabled=$.isPressed=$.isDragging=!1,ge&&ge($))},$.kill=$.revert=function(){$.disable();var Qe=pf.indexOf($);Qe>=0&&pf.splice(Qe,1),Ka===$&&(Ka=0)},pf.push($),G&&Np(a)&&(Ka=$),$.enable(v)},XU(i,[{key:"velocityX",get:function(){return this._vx.getVelocity()}},{key:"velocityY",get:function(){return this._vy.getVelocity()}}]),i}();hi.version="3.14.2";hi.create=function(i){return new hi(i)};hi.register=uB;hi.getAll=function(){return pf.slice()};hi.getById=function(i){return pf.filter(function(e){return e.vars.id===i})[0]};aB()&&nr.registerPlugin(hi);/*! 62 * ScrollTrigger 3.14.2 63 * https://gsap.com 64 * 65 * @license Copyright 2008-2025, GreenSock. All rights reserved. 66 * Subject to the terms at https://gsap.com/standard-license 67 * @author: Jack Doyle, [email protected] 68*/var vt,Jd,Vt,Pn,Es,_n,JA,Bv,bm,kp,pp,mg,vr,Ky,nM,Ur,s5,o5,Kd,dB,A2,fB,kr,iM,hB,pB,Dl,rM,KA,Ef,qA,Op,sM,w2,gg=1,yr=Date.now,T2=yr(),vo=0,mp=0,a5=function(e,t,n){var r=ws(e)&&(e.substr(0,6)==="clamp("||e.indexOf("max")>-1);return n["_"+t+"Clamp"]=r,r?e.substr(6,e.length-7):e},l5=function(e,t){return t&&(!ws(e)||e.substr(0,6)!=="clamp(")?"clamp("+e+")":e},KU=function i(){return mp&&requestAnimationFrame(i)},c5=function(){return Ky=1},u5=function(){return Ky=0},ca=function(e){return e},gp=function(e){return Math.round(e*1e5)/1e5||0},mB=function(){return typeof window<"u"},gB=function(){return vt||mB()&&(vt=window.gsap)&&vt.registerPlugin&&vt},Hu=function(e){return!!~JA.indexOf(e)},xB=function(e){return(e==="Height"?qA:Vt["inner"+e])||Es["client"+e]||_n["client"+e]},vB=function(e){return ac(e,"getBoundingClientRect")||(Hu(e)?function(){return Kx.width=Vt.innerWidth,Kx.height=qA,Kx}:function(){return Wa(e)})},qU=function(e,t,n){var r=n.d,s=n.d2,o=n.a;return(o=ac(e,"getBoundingClientRect"))?function(){return o()[r]}:function(){return(t?xB(s):e["client"+s])||0}},ZU=function(e,t){return!t||~va.indexOf(e)?vB(e):function(){return Kx}},pa=function(e,t){var n=t.s,r=t.d2,s=t.d,o=t.a;return Math.max(0,(n="scroll"+r)&&(o=ac(e,n))?o()-vB(e)()[s]:Hu(e)?(Es[n]||_n[n])-xB(r):e[n]-e["offset"+r])},xg=function(e,t){for(var n=0;n<Kd.length;n+=3)(!t||~t.indexOf(Kd[n+1]))&&e(Kd[n],Kd[n+1],Kd[n+2])},ws=function(e){return typeof e=="string"},br=function(e){return typeof e=="function"},xp=function(e){return typeof e=="number"},lu=function(e){return typeof e=="object"},jh=function(e,t,n){return e&&e.progress(t?0:1)&&n&&e.pause()},E2=function(e,t){if(e.enabled){var n=e._ctx?e._ctx.add(function(){return t(e)}):t(e);n&&n.totalTime&&(e.callbackAnimation=n)}},bd=Math.abs,yB="left",_B="top",ZA="right",QA="bottom",Ru="width",Pu="height",Up="Right",zp="Left",Hp="Top",Gp="Bottom",Si="padding",fo="margin",Xf="Width",$A="Height",Pi="px",ho=function(e){return Vt.getComputedStyle(e)},QU=function(e){var t=ho(e).position;e.style.position=t==="absolute"||t==="fixed"?t:"relative"},d5=function(e,t){for(var n in t)n in e||(e[n]=t[n]);return e},Wa=function(e,t){var n=t&&ho(e)[nM]!=="matrix(1, 0, 0, 1, 0, 0)"&&vt.to(e,{x:0,y:0,xPercent:0,yPercent:0,rotation:0,rotationX:0,rotationY:0,scale:1,skewX:0,skewY:0}).progress(1),r=e.getBoundingClientRect();return n&&n.progress(0).kill(),r},Dv=function(e,t){var n=t.d2;return e["offset"+n]||e["client"+n]||0},SB=function(e){var t=[],n=e.labels,r=e.duration(),s;for(s in n)t.push(n[s]/r);return t},$U=function(e){return function(t){return vt.utils.snap(SB(e),t)}},ew=function(e){var t=vt.utils.snap(e),n=Array.isArray(e)&&e.slice(0).sort(function(r,s){return r-s});return n?function(r,s,o){o===void 0&&(o=.001);var a;if(!s)return t(r);if(s>0){for(r-=o,a=0;a<n.length;a++)if(n[a]>=r)return n[a];return n[a-1]}else for(a=n.length,r+=o;a--;)if(n[a]<=r)return n[a];return n[0]}:function(r,s,o){o===void 0&&(o=.001);var a=t(r);return!s||Math.abs(a-r)<o||a-r<0==s<0?a:t(s<0?r-e:r+e)}},ez=function(e){return function(t,n){return ew(SB(e))(t,n.direction)}},vg=function(e,t,n,r){return n.split(",").forEach(function(s){return e(t,s,r)})},Vi=function(e,t,n,r,s){return e.addEventListener(t,n,{passive:!r,capture:!!s})},Wi=function(e,t,n,r){return e.removeEventListener(t,n,!!r)},yg=function(e,t,n){n=n&&n.wheelHandler,n&&(e(t,"wheel",n),e(t,"touchmove",n))},f5={startColor:"green",endColor:"red",indent:0,fontSize:"16px",fontWeight:"normal"},_g={toggleActions:"play",anticipatePin:0},Fv={top:0,left:0,center:.5,bottom:1,right:1},Vx=function(e,t){if(ws(e)){var n=e.indexOf("="),r=~n?+(e.charAt(n-1)+1)*parseFloat(e.substr(n+1)):0;~n&&(e.indexOf("%")>n&&(r*=t/100),e=e.substr(0,n-1)),e=r+(e in Fv?Fv[e]*t:~e.indexOf("%")?parseFloat(e)*t/100:parseFloat(e)||0)}return e},Sg=function(e,t,n,r,s,o,a,l){var c=s.startColor,u=s.endColor,d=s.fontSize,p=s.indent,m=s.fontWeight,x=Pn.createElement("div"),v=Hu(n)||ac(n,"pinType")==="fixed",_=e.indexOf("scroller")!==-1,g=v?_n:n,S=e.indexOf("start")!==-1,b=S?c:u,A="border-color:"+b+";font-size:"+d+";color:"+b+";font-weight:"+m+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";return A+="position:"+((_||l)&&v?"fixed;":"absolute;"),(_||l||!v)&&(A+=(r===Li?ZA:QA)+":"+(o+parseFloat(p))+"px;"),a&&(A+="box-sizing:border-box;text-align:left;width:"+a.offsetWidth+"px;"),x._isStart=S,x.setAttribute("class","gsap-marker-"+e+(t?" marker-"+t:"")),x.style.cssText=A,x.innerText=t||t===0?e+"-"+t:e,g.children[0]?g.insertBefore(x,g.children[0]):g.appendChild(x),x._offset=x["offset"+r.op.d2],Xx(x,0,r,S),x},Xx=function(e,t,n,r){var s={display:"block"},o=n[r?"os2":"p2"],a=n[r?"p2":"os2"];e._isFlipped=r,s[n.a+"Percent"]=r?-100:0,s[n.a]=r?"1px":0,s["border"+o+Xf]=1,s["border"+a+Xf]=0,s[n.p]=t+"px",vt.set(e,s)},Gt=[],oM={},Mm,h5=function(){return yr()-vo>34&&(Mm||(Mm=requestAnimationFrame(Qa)))},Md=function(){(!kr||!kr.isPressed||kr.startX>_n.clientWidth)&&(Xt.cache++,kr?Mm||(Mm=requestAnimationFrame(Qa)):Qa(),vo||ju("scrollStart"),vo=yr())},C2=function(){pB=Vt.innerWidth,hB=Vt.innerHeight},vp=function(e){Xt.cache++,(e===!0||!vr&&!fB&&!Pn.fullscreenElement&&!Pn.webkitFullscreenElement&&(!iM||pB!==Vt.innerWidth||Math.abs(Vt.innerHeight-hB)>
vendor: 8,561 bytes, line 68
68Vt.innerHeight*.25))&&Bv.restart(!0)},Gu={},tz=[],bB=function i(){return Wi(Jt,"scrollEnd",i)||gu(!0)},ju=function(e){return Gu[e]&&Gu[e].map(function(t){return t()})||tz},Ms=[],MB=function(e){for(var t=0;t<Ms.length;t+=5)(!e||Ms[t+4]&&Ms[t+4].query===e)&&(Ms[t].style.cssText=Ms[t+1],Ms[t].getBBox&&Ms[t].setAttribute("transform",Ms[t+2]||""),Ms[t+3].uncache=1)},AB=function(){return Xt.forEach(function(e){return br(e)&&++e.cacheID&&(e.rec=e())})},tw=function(e,t){var n;for(Ur=0;Ur<Gt.length;Ur++)n=Gt[Ur],n&&(!t||n._ctx===t)&&(e?n.kill(1):n.revert(!0,!0));Op=!0,t&&MB(t),t||ju("revert")},wB=function(e,t){Xt.cache++,(t||!zr)&&Xt.forEach(function(n){return br(n)&&n.cacheID++&&(n.rec=0)}),ws(e)&&(Vt.history.scrollRestoration=KA=e)},zr,Iu=0,p5,nz=function(){if(p5!==Iu){var e=p5=Iu;requestAnimationFrame(function(){return e===Iu&&gu(!0)})}},TB=function(){_n.appendChild(Ef),qA=!kr&&Ef.offsetHeight||Vt.innerHeight,_n.removeChild(Ef)},m5=function(e){return bm(".gsap-marker-start, .gsap-marker-end, .gsap-marker-scroller-start, .gsap-marker-scroller-end").forEach(function(t){return t.style.display=e?"none":"block"})},gu=function(e,t){if(Es=Pn.documentElement,_n=Pn.body,JA=[Vt,Pn,Es,_n],vo&&!e&&!Op){Vi(Jt,"scrollEnd",bB);return}TB(),zr=Jt.isRefreshing=!0,Op||AB();var n=ju("refreshInit");dB&&Jt.sort(),t||tw(),Xt.forEach(function(r){br(r)&&(r.smooth&&(r.target.style.scrollBehavior="auto"),r(0))}),Gt.slice(0).forEach(function(r){return r.refresh()}),Op=!1,Gt.forEach(function(r){if(r._subPinOffset&&r.pin){var s=r.vars.horizontal?"offsetWidth":"offsetHeight",o=r.pin[s];r.revert(!0,1),r.adjustPinSpacing(r.pin[s]-o),r.refresh()}}),sM=1,m5(!0),Gt.forEach(function(r){var s=pa(r.scroller,r._dir),o=r.vars.end==="max"||r._endClamp&&r.end>s,a=r._startClamp&&r.start>=s;(o||a)&&r.setPositions(a?s-1:r.start,o?Math.max(a?s:r.start+1,s):r.end,!0)}),m5(!1),sM=0,n.forEach(function(r){return r&&r.render&&r.render(-1)}),Xt.forEach(function(r){br(r)&&(r.smooth&&requestAnimationFrame(function(){return r.target.style.scrollBehavior="smooth"}),r.rec&&r(r.rec))}),wB(KA,1),Bv.pause(),Iu++,zr=2,Qa(2),Gt.forEach(function(r){return br(r.vars.onRefresh)&&r.vars.onRefresh(r)}),zr=Jt.isRefreshing=!1,ju("refresh")},aM=0,Yx=1,jp,Qa=function(e){if(e===2||!zr&&!Op){Jt.isUpdating=!0,jp&&jp.update(0);var t=Gt.length,n=yr(),r=n-T2>=50,s=t&&Gt[0].scroll();if(Yx=aM>s?-1:1,zr||(aM=s),r&&(vo&&!Ky&&n-vo>200&&(vo=0,ju("scrollEnd")),pp=T2,T2=n),Yx<0){for(Ur=t;Ur-- >0;)Gt[Ur]&&Gt[Ur].update(0,r);Yx=1}else for(Ur=0;Ur<t;Ur++)Gt[Ur]&&Gt[Ur].update(0,r);Jt.isUpdating=!1}Mm=0},lM=[yB,_B,QA,ZA,fo+Gp,fo+Up,fo+Hp,fo+zp,"display","flexShrink","float","zIndex","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","gridArea","justifySelf","alignSelf","placeSelf","order"],Jx=lM.concat([Ru,Pu,"boxSizing","max"+Xf,"max"+$A,"position",fo,Si,Si+Hp,Si+Up,Si+Gp,Si+zp]),iz=function(e,t,n){Cf(n);var r=e._gsap;if(r.spacerIsNative)Cf(r.spacerState);else if(e._gsap.swappedIn){var s=t.parentNode;s&&(s.insertBefore(e,t),s.removeChild(t))}e._gsap.swappedIn=!1},R2=function(e,t,n,r){if(!e._gsap.swappedIn){for(var s=lM.length,o=t.style,a=e.style,l;s--;)l=lM[s],o[l]=n[l];o.position=n.position==="absolute"?"absolute":"relative",n.display==="inline"&&(o.display="inline-block"),a[QA]=a[ZA]="auto",o.flexBasis=n.flexBasis||"auto",o.overflow="visible",o.boxSizing="border-box",o[Ru]=Dv(e,Gr)+Pi,o[Pu]=Dv(e,Li)+Pi,o[Si]=a[fo]=a[_B]=a[yB]="0",Cf(r),a[Ru]=a["max"+Xf]=n[Ru],a[Pu]=a["max"+$A]=n[Pu],a[Si]=n[Si],e.parentNode!==t&&(e.parentNode.insertBefore(t,e),t.appendChild(e)),e._gsap.swappedIn=!0}},rz=/([A-Z])/g,Cf=function(e){if(e){var t=e.t.style,n=e.length,r=0,s,o;for((e.t._gsap||vt.core.getCache(e.t)).uncache=1;r<n;r+=2)o=e[r+1],s=e[r],o?t[s]=o:t[s]&&t.removeProperty(s.replace(rz,"-$1").toLowerCase())}},bg=function(e){for(var t=Jx.length,n=e.style,r=[],s=0;s<t;s++)r.push(Jx[s],n[Jx[s]]);return r.t=e,r},sz=function(e,t,n){for(var r=[],s=e.length,o=n?8:0,a;o<s;o+=2)a=e[o],r.push(a,a in t?t[a]:e[o+1]);return r.t=e.t,r},Kx={left:0,top:0},g5=function(e,t,n,r,s,o,a,l,c,u,d,p,m,x){br(e)&&(e=e(l)),ws(e)&&e.substr(0,3)==="max"&&(e=p+(e.charAt(4)==="="?Vx("0"+e.substr(3),n):0));var v=m?m.time():0,_,g,S;if(m&&m.seek(0),isNaN(e)||(e=+e),xp(e))m&&(e=vt.utils.mapRange(m.scrollTrigger.start,m.scrollTrigger.end,0,p,e)),a&&Xx(a,n,r,!0);else{br(t)&&(t=t(l));var b=(e||"0").split(" "),A,w,C,P;S=is(t,l)||_n,A=Wa(S)||{},(!A||!A.left&&!A.top)&&ho(S).display==="none"&&(P=S.style.display,S.style.display="block",A=Wa(S),P?S.style.display=P:S.style.removeProperty("display")),w=Vx(b[0],A[r.d]),C=Vx(b[1]||"0",n),e=A[r.p]-c[r.p]-u+w+s-C,a&&Xx(a,C,r,n-C<20||a._isStart&&C>20),n-=n-C}if(x&&(l[x]=e||-.001,e<0&&(e=0)),o){var B=e+n,R=o._isStart;_="scroll"+r.d2,Xx(o,B,r,R&&B>20||!R&&(d?Math.max(_n[_],Es[_]):o.parentNode[_])<=B+1),d&&(c=Wa(a),d&&(o.style[r.op.p]=c[r.op.p]-r.op.m-o._offset+Pi))}return m&&S&&(_=Wa(S),m.seek(p),g=Wa(S),m._caScrollDist=_[r.p]-g[r.p],e=e/m._caScrollDist*p),m&&m.seek(v),m?e:Math.round(e)},oz=/(webkit|moz|length|cssText|inset)/i,x5=function(e,t,n,r){if(e.parentNode!==t){var s=e.style,o,a;if(t===_n){e._stOrig=s.cssText,a=ho(e);for(o in a)!+o&&!oz.test(o)&&a[o]&&typeof s[o]=="string"&&o!=="0"&&(s[o]=a[o]);s.top=n,s.left=r}else s.cssText=e._stOrig;vt.core.getCache(e).uncache=1,t.appendChild(e)}},EB=function(e,t,n){var r=t,s=r;return function(o){var a=Math.round(e());return a!==r&&a!==s&&Math.abs(a-r)>3&&Math.abs(a-s)>3&&(o=a,n&&n()),s=r,r=Math.round(o),r}},Mg=function(e,t,n){var r={};r[t.p]="+="+n,vt.set(e,r)},v5=function(e,t){var n=gc(e,t),r="_scroll"+t.p2,s=function o(a,l,c,u,d){var p=o.tween,m=l.onComplete,x={};c=c||n();var v=EB(n,c,function(){p.kill(),o.tween=0});return d=u&&d||0,u=u||a-c,p&&p.kill(),l[r]=a,l.inherit=!1,l.modifiers=x,x[r]=function(){return v(c+u*p.ratio+d*p.ratio*p.ratio)},l.onUpdate=function(){Xt.cache++,o.tween&&Qa()},l.onComplete=function(){o.tween=0,m&&m.call(p)},p=o.tween=vt.to(e,l),p};return e[r]=n,n.wheelHandler=function(){return s.tween&&s.tween.kill()&&(s.tween=0)},Vi(e,"wheel",n.wheelHandler),Jt.isTouch&&Vi(e,"touchmove",n.wheelHandler),s},Jt=function(){function i(t,n){Jd||i.register(vt)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),rM(this),this.init(t,n)}var e=i.prototype;return e.init=function(n,r){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),!mp){this.update=this.refresh=this.kill=ca;return}n=d5(ws(n)||xp(n)||n.nodeType?{trigger:n}:n,_g);var s=n,o=s.onUpdate,a=s.toggleClass,l=s.id,c=s.onToggle,u=s.onRefresh,d=s.scrub,p=s.trigger,m=s.pin,x=s.pinSpacing,v=s.invalidateOnRefresh,_=s.anticipatePin,g=s.onScrubComplete,S=s.onSnapComplete,b=s.once,A=s.snap,w=s.pinReparent,C=s.pinSpacer,P=s.containerAnimation,B=s.fastScrollEnd,R=s.preventOverlaps,E=n.horizontal||n.containerAnimation&&n.horizontal!==!1?Gr:Li,L=!d&&d!==0,N=is(n.scroller||Vt),k=vt.core.getCache(N),Y=Hu(N),z=("pinType"in n?n.pinType:ac(N,"pinType")||Y&&"fixed")==="fixed",W=[n.onEnter,n.onLeave,n.onEnterBack,n.onLeaveBack],V=L&&n.toggleActions.split(" "),G="markers"in n?n.markers:_g.markers,Z=Y?0:parseFloat(ho(N)["border"+E.p2+Xf])||0,O=this,ee=n.onRefreshInit&&function(){return n.onRefreshInit(O)},le=qU(N,Y,E),ge=ZU(N,Y),Se=0,Ye=0,K=0,q=gc(N,E),re,Ce,Te,De,tt,Pe,me,Ee,be,$,J,Ue,Ne,ke,Ae,U,F,ne,se,he,de,ze,Be,Ke,$e,Fe,Xe,it,ie,fe,He,Q,je,Re,Ge,Le,Me,Oe,lt;if(O._startClamp=O._endClamp=!1,O._dir=E,_*=45,O.scroller=N,O.scroll=P?P.time.bind(P):q,De=q(),O.vars=n,r=r||n.animation,"refreshPriority"in n&&(dB=1,n.refreshPriority===-9999&&(jp=O)),k.tweenScroll=k.tweenScroll||{top:v5(N,Li),left:v5(N,Gr)},O.tweenTo=re=k.tweenScroll[E.p],O.scrubDuration=function(nt){je=xp(nt)&&nt,je?Q?Q.duration(nt):Q=vt.to(r,{ease:"expo",totalProgress:"+=0",inherit:!1,duration:je,paused:!0,onComplete:function(){return g&&g(O)}}):(Q&&Q.progress(1).kill(),Q=0)},r&&(r.vars.lazy=!1,r._initted&&!O.isReverted||r.vars.immediateRender!==!1&&n.immediateRender!==!1&&r.duration()&&r.render(0,!0,!0),O.animation=r.pause(),r.scrollTrigger=O,O.scrubDuration(d),fe=0,l||(l=r.vars.id)),A&&((!lu(A)||A.push)&&(A={snapTo:A}),"scrollBehavior"in _n.style&&vt.set(Y?[_n,Es]:N,{scrollBehavior:"auto"}),Xt.forEach(function(nt){return br(nt)&&nt.target===(Y?Pn.scrollingElement||Es:N)&&(nt.smooth=!1)}),Te=br(A.snapTo)?A.snapTo:A.snapTo==="labels"?$U(r):A.snapTo==="labelsDirectional"?ez(r):A.directional!==!1?function(nt,yt){return ew(A.snapTo)(nt,yr()-Ye<500?0:yt.direction)}:vt.utils.snap(A.snapTo),Re=A.duration||{min:.1,max:2},Re=lu(Re)?kp(Re.min,Re.max):kp(Re,Re),Ge=vt.delayedCall(A.delay||je/2||.1,function(){var nt=q(),yt=yr()-Ye<500,ft=re.tween;
vendor: 5,152 bytes, line 68
68if((yt||Math.abs(O.getVelocity())<10)&&!ft&&!Ky&&Se!==nt){var Tt=(nt-Pe)/ke,tn=r&&!L?r.totalProgress():Tt,Lt=yt?0:(tn-He)/(yr()-pp)*1e3||0,cn=vt.utils.clamp(-Tt,1-Tt,bd(Lt/2)*Lt/.185),Dn=Tt+(A.inertia===!1?0:cn),bn,fn,qt=A,wi=qt.onStart,hn=qt.onInterrupt,Ti=qt.onComplete;if(bn=Te(Dn,O),xp(bn)||(bn=Dn),fn=Math.max(0,Math.round(Pe+bn*ke)),nt<=me&&nt>=Pe&&fn!==nt){if(ft&&!ft._initted&&ft.data<=bd(fn-nt))return;A.inertia===!1&&(cn=bn-Tt),re(fn,{duration:Re(bd(Math.max(bd(Dn-tn),bd(bn-tn))*.185/Lt/.05||0)),ease:A.ease||"power3",data:bd(fn-nt),onInterrupt:function(){return Ge.restart(!0)&&hn&&hn(O)},onComplete:function(){O.update(),Se=q(),r&&!L&&(Q?Q.resetTo("totalProgress",bn,r._tTime/r._tDur):r.progress(bn)),fe=He=r&&!L?r.totalProgress():O.progress,S&&S(O),Ti&&Ti(O)}},nt,cn*ke,fn-nt-cn*ke),wi&&wi(O,re.tween)}}else O.isActive&&Se!==nt&&Ge.restart(!0)}).pause()),l&&(oM[l]=O),p=O.trigger=is(p||m!==!0&&m),lt=p&&p._gsap&&p._gsap.stRevert,lt&&(lt=lt(O)),m=m===!0?p:is(m),ws(a)&&(a={targets:p,className:a}),m&&(x===!1||x===fo||(x=!x&&m.parentNode&&m.parentNode.style&&ho(m.parentNode).display==="flex"?!1:Si),O.pin=m,Ce=vt.core.getCache(m),Ce.spacer?Ae=Ce.pinState:(C&&(C=is(C),C&&!C.nodeType&&(C=C.current||C.nativeElement),Ce.spacerIsNative=!!C,C&&(Ce.spacerState=bg(C))),Ce.spacer=ne=C||Pn.createElement("div"),ne.classList.add("pin-spacer"),l&&ne.classList.add("pin-spacer-"+l),Ce.pinState=Ae=bg(m)),n.force3D!==!1&&vt.set(m,{force3D:!0}),O.spacer=ne=Ce.spacer,ie=ho(m),Ke=ie[x+E.os2],he=vt.getProperty(m),de=vt.quickSetter(m,E.a,Pi),R2(m,ne,ie),F=bg(m)),G){Ue=lu(G)?d5(G,f5):f5,$=Sg("scroller-start",l,N,E,Ue,0),J=Sg("scroller-end",l,N,E,Ue,0,$),se=$["offset"+E.op.d2];var Pt=is(ac(N,"content")||N);Ee=this.markerStart=Sg("start",l,Pt,E,Ue,se,0,P),be=this.markerEnd=Sg("end",l,Pt,E,Ue,se,0,P),P&&(Oe=vt.quickSetter([Ee,be],E.a,Pi)),!z&&!(va.length&&ac(N,"fixedMarkers")===!0)&&(QU(Y?_n:N),vt.set([$,J],{force3D:!0}),Fe=vt.quickSetter($,E.a,Pi),it=vt.quickSetter(J,E.a,Pi))}if(P){var Qe=P.vars.onUpdate,rt=P.vars.onUpdateParams;P.eventCallback("onUpdate",function(){O.update(0,0,1),Qe&&Qe.apply(P,rt||[])})}if(O.previous=function(){return Gt[Gt.indexOf(O)-1]},O.next=function(){return Gt[Gt.indexOf(O)+1]},O.revert=function(nt,yt){if(!yt)return O.kill(!0);var ft=nt!==!1||!O.enabled,Tt=vr;ft!==O.isReverted&&(ft&&(Le=Math.max(q(),O.scroll.rec||0),K=O.progress,Me=r&&r.progress()),Ee&&[Ee,be,$,J].forEach(function(tn){return tn.style.display=ft?"none":"block"}),ft&&(vr=O,O.update(ft)),m&&(!w||!O.isActive)&&(ft?iz(m,ne,Ae):R2(m,ne,ho(m),$e)),ft||O.update(ft),vr=Tt,O.isReverted=ft)},O.refresh=function(nt,yt,ft,Tt){if(!((vr||!O.enabled)&&!yt)){if(m&&nt&&vo){Vi(i,"scrollEnd",bB);return}!zr&&ee&&ee(O),vr=O,re.tween&&!ft&&(re.tween.kill(),re.tween=0),Q&&Q.pause(),v&&r&&(r.revert({kill:!1}).invalidate(),r.getChildren?r.getChildren(!0,!0,!1).forEach(function(Je){return Je.vars.immediateRender&&Je.render(0,!0,!0)}):r.vars.immediateRender&&r.render(0,!0,!0)),O.isReverted||O.revert(!0,!0),O._subPinOffset=!1;var tn=le(),Lt=ge(),cn=P?P.duration():pa(N,E),Dn=ke<=.01||!ke,bn=0,fn=Tt||0,qt=lu(ft)?ft.end:n.end,wi=n.endTrigger||p,hn=lu(ft)?ft.start:n.start||(n.start===0||!p?0:m?"0 0":"0 100%"),Ti=O.pinnedContainer=n.pinnedContainer&&is(n.pinnedContainer,O),Rr=p&&Math.max(0,Gt.indexOf(O))||0,ai=Rr,li,gi,wo,hl,ei,j,oe,_e,ye,pe,qe,st,We;for(G&&lu(ft)&&(st=vt.getProperty($,E.p),We=vt.getProperty(J,E.p));ai-- >0;)j=Gt[ai],j.end||j.refresh(0,1)||(vr=O),oe=j.pin,oe&&(oe===p||oe===m||oe===Ti)&&!j.isReverted&&(pe||(pe=[]),pe.unshift(j),j.revert(!0,!0)),j!==Gt[ai]&&(Rr--,ai--);for(br(hn)&&(hn=hn(O)),hn=a5(hn,"start",O),Pe=g5(hn,p,tn,E,q(),Ee,$,O,Lt,Z,z,cn,P,O._startClamp&&"_startClamp")||(m?-.001:0),br(qt)&&(qt=qt(O)),ws(qt)&&!qt.indexOf("+=")&&(~qt.indexOf(" ")?qt=(ws(hn)?hn.split(" ")[0]:"")+qt:(bn=Vx(qt.substr(2),tn),qt=ws(hn)?hn:(P?vt.utils.mapRange(0,P.duration(),P.scrollTrigger.start,P.scrollTrigger.end,Pe):Pe)+bn,wi=p)),qt=a5(qt,"end",O),me=Math.max(Pe,g5(qt||(wi?"100% 0":cn),wi,tn,E,q()+bn,be,J,O,Lt,Z,z,cn,P,O._endClamp&&"_endClamp"))||-.001,bn=0,ai=Rr;ai--;)j=Gt[ai]||{},oe=j.pin,oe&&j.start-j._pinPush<=Pe&&!P&&j.end>0&&(li=j.end-(O._startClamp?Math.max(0,j.start):j.start),(oe===p&&j.start-j._pinPush<Pe||oe===Ti)&&isNaN(hn)&&(bn+=li*(1-j.progress)),oe===m&&(fn+=li));if(Pe+=bn,me+=bn,O._startClamp&&(O._startClamp+=bn),O._endClamp&&!zr&&(O._endClamp=me||-.001,me=Math.min(me,pa(N,E))),ke=me-Pe||(Pe-=.01)&&.001,Dn&&(K=vt.utils.clamp(0,1,vt.utils.normalize(Pe,me,Le))),O._pinPush=fn,Ee&&bn&&(li={},li[E.a]="+="+bn,Ti&&(li[E.p]="-="+q()),vt.set([Ee,be],li)),m&&!(sM&&O.end>=pa(N,E)))li=ho(m),hl=E===Li,wo=q(),ze=parseFloat(he(E.a))+fn,!cn&&me>1&&(qe=(Y?Pn.scrollingElement||Es:N).style,qe={style:qe,value:qe["overflow"+E.a.toUpperCase()]},Y&&ho(_n)["overflow"+E.a.toUpperCase()]!=="scroll"&&(qe.style["overflow"+E.a.toUpperCase()]="scroll")),R2(m,ne,li),F=bg(m),gi=Wa(m,!0),_e=z&&gc(N,hl?Gr:Li)(),x?($e=[x+E.os2,ke+fn+Pi],$e.t=ne,ai=x===Si?Dv(m,E)+ke+fn:0,ai&&($e.push(E.d,ai+Pi),ne.style.flexBasis!=="auto"&&(ne.style.flexBasis=ai+Pi)),Cf($e),Ti&&Gt.forEach(function(Je){Je.pin===Ti&&Je.vars.pinSpacing!==!1&&(Je._subPinOffset=!0)}
vendor: 4,521 bytes, line 68
68),z&&q(Le)):(ai=Dv(m,E),ai&&ne.style.flexBasis!=="auto"&&(ne.style.flexBasis=ai+Pi)),z&&(ei={top:gi.top+(hl?wo-Pe:_e)+Pi,left:gi.left+(hl?_e:wo-Pe)+Pi,boxSizing:"border-box",position:"fixed"},ei[Ru]=ei["max"+Xf]=Math.ceil(gi.width)+Pi,ei[Pu]=ei["max"+$A]=Math.ceil(gi.height)+Pi,ei[fo]=ei[fo+Hp]=ei[fo+Up]=ei[fo+Gp]=ei[fo+zp]="0",ei[Si]=li[Si],ei[Si+Hp]=li[Si+Hp],ei[Si+Up]=li[Si+Up],ei[Si+Gp]=li[Si+Gp],ei[Si+zp]=li[Si+zp],U=sz(Ae,ei,w),zr&&q(0)),r?(ye=r._initted,A2(1),r.render(r.duration(),!0,!0),Be=he(E.a)-ze+ke+fn,Xe=Math.abs(ke-Be)>1,z&&Xe&&U.splice(U.length-2,2),r.render(0,!0,!0),ye||r.invalidate(!0),r.parent||r.totalTime(r.totalTime()),A2(0)):Be=ke,qe&&(qe.value?qe.style["overflow"+E.a.toUpperCase()]=qe.value:qe.style.removeProperty("overflow-"+E.a));else if(p&&q()&&!P)for(gi=p.parentNode;gi&&gi!==_n;)gi._pinOffset&&(Pe-=gi._pinOffset,me-=gi._pinOffset),gi=gi.parentNode;pe&&pe.forEach(function(Je){return Je.revert(!1,!0)}),O.start=Pe,O.end=me,De=tt=zr?Le:q(),!P&&!zr&&(De<Le&&q(Le),O.scroll.rec=0),O.revert(!1,!0),Ye=yr(),Ge&&(Se=-1,Ge.restart(!0)),vr=0,r&&L&&(r._initted||Me)&&r.progress()!==Me&&r.progress(Me||0,!0).render(r.time(),!0,!0),(Dn||K!==O.progress||P||v||r&&!r._initted)&&(r&&!L&&(r._initted||K||r.vars.immediateRender!==!1)&&r.totalProgress(P&&Pe<-.001&&!K?vt.utils.normalize(Pe,me,0):K,!0),O.progress=Dn||(De-Pe)/ke===K?0:K),m&&x&&(ne._pinOffset=Math.round(O.progress*Be)),Q&&Q.invalidate(),isNaN(st)||(st-=vt.getProperty($,E.p),We-=vt.getProperty(J,E.p),Mg($,E,st),Mg(Ee,E,st-(Tt||0)),Mg(J,E,We),Mg(be,E,We-(Tt||0))),Dn&&!zr&&O.update(),u&&!zr&&!Ne&&(Ne=!0,u(O),Ne=!1)}},O.getVelocity=function(){return(q()-tt)/(yr()-pp)*1e3||0},O.endAnimation=function(){jh(O.callbackAnimation),r&&(Q?Q.progress(1):r.paused()?L||jh(r,O.direction<0,1):jh(r,r.reversed()))},O.labelToScroll=function(nt){return r&&r.labels&&(Pe||O.refresh()||Pe)+r.labels[nt]/r.duration()*ke||0},O.getTrailing=function(nt){var yt=Gt.indexOf(O),ft=O.direction>0?Gt.slice(0,yt).reverse():Gt.slice(yt+1);return(ws(nt)?ft.filter(function(Tt){return Tt.vars.preventOverlaps===nt}):ft).filter(function(Tt){return O.direction>0?Tt.end<=Pe:Tt.start>=me})},O.update=function(nt,yt,ft){if(!(P&&!ft&&!nt)){var Tt=zr===!0?Le:O.scroll(),tn=nt?0:(Tt-Pe)/ke,Lt=tn<0?0:tn>1?1:tn||0,cn=O.progress,Dn,bn,fn,qt,wi,hn,Ti,Rr;if(yt&&(tt=De,De=P?q():Tt,A&&(He=fe,fe=r&&!L?r.totalProgress():Lt)),_&&m&&!vr&&!gg&&vo&&(!Lt&&Pe<Tt+(Tt-tt)/(yr()-pp)*_?Lt=1e-4:Lt===1&&me>Tt+(Tt-tt)/(yr()-pp)*_&&(Lt=.9999)),Lt!==cn&&O.enabled){if(Dn=O.isActive=!!Lt&&Lt<1,bn=!!cn&&cn<1,hn=Dn!==bn,wi=hn||!!Lt!=!!cn,O.direction=Lt>cn?1:-1,O.progress=Lt,wi&&!vr&&(fn=Lt&&!cn?0:Lt===1?1:cn===1?2:3,L&&(qt=!hn&&V[fn+1]!=="none"&&V[fn+1]||V[fn],Rr=r&&(qt==="complete"||qt==="reset"||qt in r))),R&&(hn||Rr)&&(Rr||d||!r)&&(br(R)?R(O):O.getTrailing(R).forEach(function(wo){return wo.endAnimation()})),L||(Q&&!vr&&!gg?(Q._dp._time-Q._start!==Q._time&&Q.render(Q._dp._time-Q._start),Q.resetTo?Q.resetTo("totalProgress",Lt,r._tTime/r._tDur):(Q.vars.totalProgress=Lt,Q.invalidate().restart())):r&&r.totalProgress(Lt,!!(vr&&(Ye||nt)))),m){if(nt&&x&&(ne.style[x+E.os2]=Ke),!z)de(gp(ze+Be*Lt));else if(wi){if(Ti=!nt&&Lt>cn&&me+1>Tt&&Tt+1>=pa(N,E),w)if(!nt&&(Dn||Ti)){var ai=Wa(m,!0),li=Tt-Pe;x5(m,_n,ai.top+(E===Li?li:0)+Pi,ai.left+(E===Li?0:li)+Pi)}else x5(m,ne);Cf(Dn||Ti?U:F),Xe&&Lt<1&&Dn||de(ze+(Lt===1&&!Ti?Be:0))}}A&&!re.tween&&!vr&&!gg&&Ge.restart(!0),a&&(hn||b&&Lt&&(Lt<1||!w2))&&bm(a.targets).forEach(function(wo){return wo.classList[Dn||b?"add":"remove"](a.className)}),o&&!L&&!nt&&o(O),wi&&!vr?(L&&(Rr&&(qt==="complete"?r.pause().totalProgress(1):qt==="reset"?r.restart(!0).pause():qt==="restart"?r.restart(!0):r[qt]()),o&&o(O)),(hn||!w2)&&(c&&hn&&E2(O,c),W[fn]&&E2(O,W[fn]),b&&(Lt===1?O.kill(!1,1):W[fn]=0),hn||(fn=Lt===1?1:3,W[fn]&&E2(O,W[fn]))),B&&!Dn&&Math.abs(O.getVelocity())>(xp(B)?B:2500)&&(jh(O.callbackAnimation),Q?Q.progress(1):jh(r,qt==="reverse"?1:!Lt,1))):L&&o&&!vr&&o(O)}if(it){var gi=P?Tt/P.duration()*(P._caScrollDist||0):Tt;Fe(gi+($._isFlipped?1:0)),it(gi)}Oe&&Oe(-Tt/P.duration()*(P._caScrollDist||0))}},O.enable=function(nt,yt){O.enabled||(O.enabled=!0,Vi(N,"resize",vp),Y||Vi(N,"scroll",Md),ee&&Vi(i,"refreshInit",ee),nt!==!1&&(O.progress=K=0,De=tt=Se=q()),yt!==!1&&O.refresh())},O.getTween=function(nt){return nt&&re?re.tween:Q},O.setPositions=function(nt,yt,ft,Tt){if(P){var tn=P.scrollTrigger,Lt=P.duration(),cn=tn.end-tn.start;nt=tn.start+cn*nt/Lt,yt=tn.start+cn*yt/Lt}O.refresh(!1,!1,{start:l5(nt,ft&&!!O._startClamp),end:l5(yt,ft&&!!O._endClamp)}
vendor: 3,482 bytes, line 68
68,Tt),O.update()},O.adjustPinSpacing=function(nt){if($e&&nt){var yt=$e.indexOf(E.d)+1;$e[yt]=parseFloat($e[yt])+nt+Pi,$e[1]=parseFloat($e[1])+nt+Pi,Cf($e)}},O.disable=function(nt,yt){if(nt!==!1&&O.revert(!0,!0),O.enabled&&(O.enabled=O.isActive=!1,yt||Q&&Q.pause(),Le=0,Ce&&(Ce.uncache=1),ee&&Wi(i,"refreshInit",ee),Ge&&(Ge.pause(),re.tween&&re.tween.kill()&&(re.tween=0)),!Y)){for(var ft=Gt.length;ft--;)if(Gt[ft].scroller===N&&Gt[ft]!==O)return;Wi(N,"resize",vp),Y||Wi(N,"scroll",Md)}},O.kill=function(nt,yt){O.disable(nt,yt),Q&&!yt&&Q.kill(),l&&delete oM[l];var ft=Gt.indexOf(O);ft>=0&&Gt.splice(ft,1),ft===Ur&&Yx>0&&Ur--,ft=0,Gt.forEach(function(Tt){return Tt.scroller===O.scroller&&(ft=1)}),ft||zr||(O.scroll.rec=0),r&&(r.scrollTrigger=null,nt&&r.revert({kill:!1}),yt||r.kill()),Ee&&[Ee,be,$,J].forEach(function(Tt){return Tt.parentNode&&Tt.parentNode.removeChild(Tt)}),jp===O&&(jp=0),m&&(Ce&&(Ce.uncache=1),ft=0,Gt.forEach(function(Tt){return Tt.pin===m&&ft++}),ft||(Ce.spacer=0)),n.onKill&&n.onKill(O)},Gt.push(O),O.enable(!1,!1),lt&<(O),r&&r.add&&!ke){var Mt=O.update;O.update=function(){O.update=Mt,Xt.cache++,Pe||me||O.refresh()},vt.delayedCall(.01,O.update),ke=.01,Pe=me=0}else O.refresh();m&&nz()},i.register=function(n){return Jd||(vt=n||gB(),mB()&&window.document&&i.enable(),Jd=mp),Jd},i.defaults=function(n){if(n)for(var r in n)_g[r]=n[r];return _g},i.disable=function(n,r){mp=0,Gt.forEach(function(o){return o[r?"kill":"disable"](n)}),Wi(Vt,"wheel",Md),Wi(Pn,"scroll",Md),clearInterval(mg),Wi(Pn,"touchcancel",ca),Wi(_n,"touchstart",ca),vg(Wi,Pn,"pointerdown,touchstart,mousedown",c5),vg(Wi,Pn,"pointerup,touchend,mouseup",u5),Bv.kill(),xg(Wi);for(var s=0;s<Xt.length;s+=3)yg(Wi,Xt[s],Xt[s+1]),yg(Wi,Xt[s],Xt[s+2])},i.enable=function(){if(Vt=window,Pn=document,Es=Pn.documentElement,_n=Pn.body,vt&&(bm=vt.utils.toArray,kp=vt.utils.clamp,rM=vt.core.context||ca,A2=vt.core.suppressOverwrites||ca,KA=Vt.history.scrollRestoration||"auto",aM=Vt.pageYOffset||0,vt.core.globals("ScrollTrigger",i),_n)){mp=1,Ef=document.createElement("div"),Ef.style.height="100vh",Ef.style.position="absolute",TB(),KU(),hi.register(vt),i.isTouch=hi.isTouch,Dl=hi.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),iM=hi.isTouch===1,Vi(Vt,"wheel",Md),JA=[Vt,Pn,Es,_n],vt.matchMedia?(i.matchMedia=function(c){var u=vt.matchMedia(),d;for(d in c)u.add(d,c[d]);return u},vt.addEventListener("matchMediaInit",function(){AB(),tw()}),vt.addEventListener("matchMediaRevert",function(){return MB()}),vt.addEventListener("matchMedia",function(){gu(0,1),ju("matchMedia")}),vt.matchMedia().add("(orientation: portrait)",function(){return C2(),C2})):console.warn("Requires GSAP 3.11.0 or later"),C2(),Vi(Pn,"scroll",Md);var n=_n.hasAttribute("style"),r=_n.style,s=r.borderTopStyle,o=vt.core.Animation.prototype,a,l;for(o.revert||Object.defineProperty(o,"revert",{value:function(){return this.time(-.01,!0)}}),r.borderTopStyle="solid",a=Wa(_n),Li.m=Math.round(a.top+Li.sc())||0,Gr.m=Math.round(a.left+Gr.sc())||0,s?r.borderTopStyle=s:r.removeProperty("border-top-style"),n||(_n.setAttribute("style",""),_n.removeAttribute("style")),mg=setInterval(h5,250),vt.delayedCall(.5,function(){return gg=0}),Vi(Pn,"touchcancel",ca),Vi(_n,"touchstart",ca),vg(Vi,Pn,"pointerdown,touchstart,mousedown",c5),vg(Vi,Pn,"pointerup,touchend,mouseup",u5),nM=vt.utils.checkPrefix("transform"),Jx.push(nM),Jd=yr(),Bv=vt.delayedCall(.2,gu).pause(),Kd=[Pn,"visibilitychange",function(){var c=Vt.innerWidth,u=Vt.innerHe
vendor: 1,156 bytes, line 68
68ight;Pn.hidden?(s5=c,o5=u):(s5!==c||o5!==u)&&vp()},Pn,"DOMContentLoaded",gu,Vt,"load",gu,Vt,"resize",vp],xg(Vi),Gt.forEach(function(c){return c.enable(0,1)}),l=0;l<Xt.length;l+=3)yg(Wi,Xt[l],Xt[l+1]),yg(Wi,Xt[l],Xt[l+2])}},i.config=function(n){"limitCallbacks"in n&&(w2=!!n.limitCallbacks);var r=n.syncInterval;r&&clearInterval(mg)||(mg=r)&&setInterval(h5,r),"ignoreMobileResize"in n&&(iM=i.isTouch===1&&n.ignoreMobileResize),"autoRefreshEvents"in n&&(xg(Wi)||xg(Vi,n.autoRefreshEvents||"none"),fB=(n.autoRefreshEvents+"").indexOf("resize")===-1)},i.scrollerProxy=function(n,r){var s=is(n),o=Xt.indexOf(s),a=Hu(s);~o&&Xt.splice(o,a?6:2),r&&(a?va.unshift(Vt,r,_n,r,Es,r):va.unshift(s,r))},i.clearMatchMedia=function(n){Gt.forEach(function(r){return r._ctx&&r._ctx.query===n&&r._ctx.kill(!0,!0)})},i.isInViewport=function(n,r,s){var o=(ws(n)?is(n):n).getBoundingClientRect(),a=o[s?Ru:Pu]*r||0;return s?o.right-a>0&&o.left+a<Vt.innerWidth:o.bottom-a>0&&o.top+a<Vt.innerHeight},i.positionInViewport=function(n,r,s){ws(n)&&(n=is(n));var o=n.getBoundingClientRect(),a=o[s?Ru:Pu],l=r==null?a/2:r in Fv?Fv[r]*a:~r.indexOf("%")?parseFloat(r)*a/100:parseFloat(r)||0;
vendor: 10,232 bytes, lines 68-69
68return s?(o.left+l)/Vt.innerWidth:(o.top+l)/Vt.innerHeight},i.killAll=function(n){if(Gt.slice(0).forEach(function(s){return s.vars.id!=="ScrollSmoother"&&s.kill()}),n!==!0){var r=Gu.killAll||[];Gu={},r.forEach(function(s){return s()})}},i}();Jt.version="3.14.2";Jt.saveStyles=function(i){return i?bm(i).forEach(function(e){if(e&&e.style){var t=Ms.indexOf(e);t>=0&&Ms.splice(t,5),Ms.push(e,e.style.cssText,e.getBBox&&e.getAttribute("transform"),vt.core.getCache(e),rM())}}):Ms};Jt.revert=function(i,e){return tw(!i,e)};Jt.create=function(i,e){return new Jt(i,e)};Jt.refresh=function(i){return i?vp(!0):(Jd||Jt.register())&&gu(!0)};Jt.update=function(i){return++Xt.cache&&Qa(i===!0?2:0)};Jt.clearScrollMemory=wB;Jt.maxScroll=function(i,e){return pa(i,e?Gr:Li)};Jt.getScrollFunc=function(i,e){return gc(is(i),e?Gr:Li)};Jt.getById=function(i){return oM[i]};Jt.getAll=function(){return Gt.filter(function(i){return i.vars.id!=="ScrollSmoother"})};Jt.isScrolling=function(){return!!vo};Jt.snapDirectional=ew;Jt.addEventListener=function(i,e){var t=Gu[i]||(Gu[i]=[]);~t.indexOf(e)||t.push(e)};Jt.removeEventListener=function(i,e){var t=Gu[i],n=t&&t.indexOf(e);n>=0&&t.splice(n,1)};Jt.batch=function(i,e){var t=[],n={},r=e.interval||.016,s=e.batchMax||1e9,o=function(c,u){var d=[],p=[],m=vt.delayedCall(r,function(){u(d,p),d=[],p=[]}).pause();return function(x){d.length||m.restart(!0),d.push(x.trigger),p.push(x),s<=d.length&&m.progress(1)}},a;for(a in e)n[a]=a.substr(0,2)==="on"&&br(e[a])&&a!=="onRefreshInit"?o(a,e[a]):e[a];return br(s)&&(s=s(),Vi(Jt,"refresh",function(){return s=e.batchMax()})),bm(i).forEach(function(l){var c={};for(a in n)c[a]=n[a];c.trigger=l,t.push(Jt.create(c))}),t};var y5=function(e,t,n,r){return t>r?e(r):t<0&&e(0),n>r?(r-t)/(n-t):n<0?t/(t-n):1},P2=function i(e,t){t===!0?e.style.removeProperty("touch-action"):e.style.touchAction=t===!0?"auto":t?"pan-"+t+(hi.isTouch?" pinch-zoom":""):"none",e===Es&&i(_n,t)},Ag={auto:1,scroll:1},az=function(e){var t=e.event,n=e.target,r=e.axis,s=(t.changedTouches?t.changedTouches[0]:t).target,o=s._gsap||vt.core.getCache(s),a=yr(),l;if(!o._isScrollT||a-o._isScrollT>2e3){for(;s&&s!==_n&&(s.scrollHeight<=s.clientHeight&&s.scrollWidth<=s.clientWidth||!(Ag[(l=ho(s)).overflowY]||Ag[l.overflowX]));)s=s.parentNode;o._isScroll=s&&s!==n&&!Hu(s)&&(Ag[(l=ho(s)).overflowY]||Ag[l.overflowX]),o._isScrollT=a}(o._isScroll||r==="x")&&(t.stopPropagation(),t._gsapAllow=!0)},CB=function(e,t,n,r){return hi.create({target:e,capture:!0,debounce:!1,lockAxis:!0,type:t,onWheel:r=r&&az,onPress:r,onDrag:r,onScroll:r,onEnable:function(){return n&&Vi(Pn,hi.eventTypes[0],S5,!1,!0)},onDisable:function(){return Wi(Pn,hi.eventTypes[0],S5,!0)}})},lz=/(input|label|select|textarea)/i,_5,S5=function(e){var t=lz.test(e.target.tagName);(t||_5)&&(e._gsapAllow=!0,_5=t)},cz=function(e){lu(e)||(e={}),e.preventDefault=e.isNormalizer=e.allowClicks=!0,e.type||(e.type="wheel,touch"),e.debounce=!!e.debounce,e.id=e.id||"normalizer";var t=e,n=t.normalizeScrollX,r=t.momentum,s=t.allowNestedScroll,o=t.onRelease,a,l,c=is(e.target)||Es,u=vt.core.globals().ScrollSmoother,d=u&&u.get(),p=Dl&&(e.content&&is(e.content)||d&&e.content!==!1&&!d.smooth()&&d.content()),m=gc(c,Li),x=gc(c,Gr),v=1,_=(hi.isTouch&&Vt.visualViewport?Vt.visualViewport.scale*Vt.visualViewport.width:Vt.outerWidth)/Vt.innerWidth,g=0,S=br(r)?function(){return r(a)}:function(){return r||2.8},b,A,w=CB(c,e.type,!0,s),C=function(){return A=!1},P=ca,B=ca,R=function(){l=pa(c,Li),B=kp(Dl?1:0,l),n&&(P=kp(0,pa(c,Gr))),b=Iu},E=function(){p._gsap.y=gp(parseFloat(p._gsap.y)+m.offset)+"px",p.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+parseFloat(p._gsap.y)+", 0, 1)",m.offset=m.cacheID=0},L=function(){if(A){requestAnimationFrame(C);var G=gp(a.deltaY/2),Z=B(m.v-G);if(p&&Z!==m.v+m.offset){m.offset=Z-m.v;var O=gp((parseFloat(p&&p._gsap.y)||0)-m.offset);p.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+O+", 0, 1)",p._gsap.y=O+"px",m.cacheID=Xt.cache,Qa()}return!0}m.offset&&E(),A=!0},N,k,Y,z,W=function(){R(),N.isActive()&&N.vars.scrollY>l&&(m()>l?N.progress(1)&&m(l):N.resetTo("scrollY",l))};return p&&vt.set(p,{y:"+=0"}),e.ignoreCheck=function(V){return Dl&&V.type==="touchmove"&&L()||v>1.05&&V.type!=="touchstart"||a.isGesturing||V.touches&&V.touches.length>1},e.onPress=function(){A=!1;var V=v;v=gp((Vt.visualViewport&&Vt.visualViewport.scale||1)/_),N.pause(),V!==v&&P2(c,v>1.01?!0:n?!1:"x"),k=x(),Y=m(),R(),b=Iu},e.onRelease=e.onGestureStart=function(V,G){if(m.offset&&E(),!G)z.restart(!0);else{Xt.cache++;var Z=S(),O,ee;n&&(O=x(),ee=O+Z*.05*-V.velocityX/.227,Z*=y5(x,O,ee,pa(c,Gr)),N.vars.scrollX=P(ee)),O=m(),ee=O+Z*.05*-V.velocityY/.227,Z*=y5(m,O,ee,pa(c,Li)),N.vars.scrollY=B(ee),N.invalidate().duration(Z).play(.01),(Dl&&N.vars.scrollY>=l||O>=l-1)&&vt.to({},{onUpdate:W,duration:Z})}o&&o(V)},e.onWheel=function(){N._ts&&N.pause(),yr()-g>1e3&&(b=0,g=yr())},e.onChange=function(V,G,Z,O,ee){if(Iu!==b&&R(),G&&n&&x(P(O[2]===G?k+(V.startX-V.x):x()+G-O[1])),Z){m.offset&&E();var le=ee[2]===Z,ge=le?Y+V.startY-V.y:m()+Z-ee[1],Se=B(ge);le&&ge!==Se&&(Y+=Se-ge),m(Se)}(Z||G)&&Qa()},e.onEnable=function(){P2(c,n?!1:"x"),Jt.addEventListener("refresh",W),Vi(Vt,"resize",W),m.smooth&&(m.target.style.scrollBehavior="auto",m.smooth=x.smooth=!1),w.enable()},e.onDisable=function(){P2(c,!0),Wi(Vt,"resize",W),Jt.removeEventListener("refresh",W),w.kill()},e.lockAxis=e.lockAxis!==!1,a=new hi(e),a.iOS=Dl,Dl&&!m()&&m(1),Dl&&vt.ticker.add(ca),z=a._dc,N=vt.to(a,{ease:"power4",paused:!0,inherit:!1,scrollX:n?"+=0.1":"+=0",scrollY:"+=0.1",modifiers:{scrollY:EB(m,m(),function(){return N.pause()})},onUpdate:Qa,onComplete:z.vars.onComplete}),a};Jt.sort=function(i){if(br(i))return Gt.sort(i);var e=Vt.pageYOffset||0;return Jt.getAll().forEach(function(t){return t._sortY=t.trigger?e+t.trigger.getBoundingClientRect().top:t.start+Vt.innerHeight}),Gt.sort(i||function(t,n){return(t.vars.refreshPriority||0)*-1e6+(t.vars.containerAnimation?1e6:t._sortY)-((n.vars.containerAnimation?1e6:n._sortY)+(n.vars.refreshPriority||0)*-1e6)})};Jt.observe=function(i){return new hi(i)};Jt.normalizeScroll=function(i){if(typeof i>"u")return kr;if(i===!0&&kr)return kr.enable();if(i===!1){kr&&kr.kill(),kr=i;return}var e=i instanceof hi?i:cz(i);return kr&&kr.target===e.target&&kr.kill(),Hu(e.target)&&(kr=e),e};Jt.core={_getVelocityProp:tM,_inputObserver:CB,_scrollers:Xt,_proxies:va,bridge:{ss:function(){vo||ju("scrollStart"),vo=yr()},ref:function(){return vr}}};gB()&&vt.registerPlugin(Jt);const RB={zh:{brand:"å¿æµå ç´ ",getStartedBtn:"èç³»æä»¬",nav:{products:"产å",opensource:"弿º",company:"å ³äº",resources:"èµæº",career:"æè",research:"ç ç©¶",events:"æ´»å¨",getstarted:"é¢çº¦æ¼ç¤º"},home:{heroTitle:"éæ AI 认ç¥",heroSubtitle:`æä»¬ä¸º AI æå»ºè®¤ç¥åºç¡è®¾æ½ââä¸åªæ¯è®°ä½ï¼èæ¯çè§£ãå ³èã 69æç»è¿å`,quickTitle:"å¿«éäºè§£",quickDesc:"å¿æµå ç´ æ¯ä¸å®¶ä¸æ³¨äºæ ææºè½å人æºäº¤äºçææ¯å ¬å¸ãæä»¬è´åäºæé æ´æäººå¿ç AI 产åï¼è®©ææ¯æ´ææ¸©åº¦ã",servicesTitle:"æå¡æ¦è§",service1Title:"æ æè®¡ç®",service1Desc:"åºäºå¤æ¨¡ææ°æ®çæ æè¯å«ä¸åæè½å",service2Title:"æºè½å¯¹è¯",service2Desc:"å ·å¤æ·±åº¦çè§£åå ±æ è½åç对è¯ç³»ç»",service3Title:"æ°å人",service3Desc:"é«åº¦æççèæäººç©åæºè½ä½å¹³å°",brainSectionTitle:"æ ¸å¿è½å",brain1Title:"è®°å¿å¼æ",brain1Desc:"é¿æè®°å¿åå¨ä¸æ£ç´¢ç³»ç»ï¼è®© AI çæ£è®°ä½æ¯ä¸æ¬¡å¯¹è¯",brain2Title:"å 认ç¥å¼æ",brain2Desc:"深度ç解对è¯ä¸ä¸æï¼æåå ³é®ä¿¡æ¯ä¸æ æ",brain3Title:"Placeholder",brain3Desc:"å³å°æ¨åºçæ°åè½æ¨¡å",mflowTitle:"M-Flow: å ¨æ°èåº",mflowSubtitle:"å°æ ç¶ææ¨¡å转å为æä¹ è¿åçæºè½ä½",mflowButton:"äºè§£æ´å¤ â",section2Title:"æ° Section æ é¢",section2Subtitle:"æ° Section 坿 é¢æè¿°",section2Button:"äºè§£æ´å¤ â",securityTitle:"å®å ¨å¯é ",security1Title:"æ°æ®å®å ¨",security1Desc:"端å°ç«¯å å¯ï¼ç¬¦åå½é å®å ¨æ åï¼ä¿æ¤ç¨æ·éç§",security2Title:"ç³»ç»ç¨³å®",security2Desc:"99.9% å¯ç¨æ§ä¿éï¼å ¨çå¤åºåé¨ç½²",security3Title:"åè§è®¤è¯",security3Desc:"éè¿å¤é¡¹è¡ä¸å®å ¨è®¤è¯ï¼æ»¡è¶³ä¼ä¸çº§éæ±",adoptionTitle:"æäºéç¨",adoption1Title:"å¿«ééæ",adoption1Desc:"ç®æ´ç APIï¼å è¡ä»£ç å³å¯æ¥å ¥",adoption2Title:"çµæ´»å®å¶",adoption2Desc:"æ¯æå¤ç§é¨ç½²æ¹å¼ï¼æéé ç½®",adoption3Title:"ä¸ä¸æ¯æ",adoption3Desc:"7Ã24 ææ¯æ¯æï¼å¿«éååº",whyTitle:"为ä»ä¹éè¦å¿æµå ç´ ï¼",whyCurrentTitle:"ç°ç¶ï¼AI çè®°å¿å°å¢",whyCurrent1:"æ¯æ¬¡å¯¹è¯é½ä»é¶å¼å§ï¼æ æ³è®°ä½ç¨æ·",whyCurrent2:"人设崩å¡ï¼ååçç¾",whyCurrent3:"æ æ³å»ºç«çæ£çç¨æ·å ³ç³»",whyMindflowTitle:"å¿æµå ç´ ï¼æç»è¿åç AI",whyMindflow1:"è·¨ä¼è¯æä¹ è®°å¿ï¼çæ£è®°ä½æ¯ä¸ä¸ªç¨æ·",whyMindflow2:"稳å®ç AI äººæ ¼åä¸è´æ§",whyMindflow3:"éæ¶é´ä¸ææ·±åçç¨æ·çè§£",solutionTitle:"æ ¸å¿è§£å³æ¹æ¡",solution1Title:"è®°å¿å¼æ",solution1Desc:"é¿æè®°å¿åå¨ä¸æ£ç´¢ç³»ç»ï¼å°éç»æå对è¯è½¬åä¸ºå¯æ£ç´¢çæä¹ åç¥è¯å¾è°±",solution2Title:"å 认ç¥å¼æ",solution2Desc:"深度ç解对è¯è¯ä¹ãæ æåæå¾ï¼æä¾ç²¾åçå¯¹è¯æ´å¯ä¸ä¸ä¸æçè§£",solution3Title:"äººæ ¼ä¸è´æ§ç³»ç»",solution3Desc:"ç¡®ä¿ AI å¨è·¨æ¶é´ãè·¨åºæ¯ç交äºä¸å§ç»ä¿æä¸è´çäººæ ¼åè¡ä¸ºé£æ ¼",dataTitle:"æ°æ®è¯´è¯",dataStat1:"97.7%",dataStat1Label:"æä½³åç¡®ç",dataStat2:"1,786",dataStat2Label:"åºåæµè¯é¢",dataStat3:"4项",dataStat3Label:"æ åååºå",dataStat4:"5个",dataStat4Label:"对æ¯ç³»ç»",scenarioTitle:"åºç¨åºæ¯",scenario1Title:"æ æéªä¼´",scenario1Desc:"让 AI ä¼ä¼´çæ£è®°ä½æ¯ä¸æ®µå¯¹è¯ï¼å»ºç«æ·±å±æ æèç³»",scenario2Title:"游æ NPC",scenario2Desc:"èµäºæ¸¸æè§è²æä¹ è®°å¿ï¼è®© NPC æ¥æçå®çäººæ ¼æ¼å",scenario3Title:"æºè½å®¢æ",scenario3Desc:"è®°ä½ç¨æ·å好ååå²é®é¢ï¼æä¾ä¸ªæ§åæå¡ä½éª",scenario4Title:"æè²å©æ",scenario4Desc:"追踪å¦ä¹ è½¨è¿¹ï¼æ ¹æ®å¦çç¹ç¹å¨æè°æ´æå¦çç¥",visionTitle:"æä»¬çæ¿æ¯",visionQuote:`"è®°å¿æ¯å¯¹ä¿¡æ¯çå¨åï¼
70èè®¤ç¥æ¯è®°å¿å 工形æçæç»´ä½ç³»ã"`,visionCtaTitle:`让 AI 71è§é认ç¥`,visionCtaHighlight:"è§é认ç¥",visionCtaSubtitle:"ä»è®°ä½ç¬¬ä¸ä¸ªç¨æ·å¼å§ã",getInTouchTitle:"ä¸å¿æµå ç´ å ±å»ºæªæ¥",getInTouchPlaceholder:"è¾å ¥æ¨çé®ç®±",getInTouchSending:"åéä¸...",getInTouchSuccess:"å·²åéï¼"},products:{title:"产å䏿æ¯",subtitle:"æ¢ç´¢æä»¬çæ ¸å¿äº§ååææ¯è½å",memory:{title:"è®°å¿å¼æ",desc:"é¿æè®°å¿åå¨ä¸æ£ç´¢ç³»ç»ï¼è®© AI çæ£è®°ä½æ¯ä¸æ¬¡å¯¹è¯ï¼æå»ºæç»çç¨æ·å ³ç³»ã"},dialogue:{title:"å 认ç¥å¼æ",desc:"深度ç解对è¯è¯ä¹ãæ æåæå¾ï¼æä¾ç²¾åçå¯¹è¯æ´å¯ååæã"},avatar:{title:"æ°åäººåæºè½ä½åä½å¹³å°",desc:"æå»ºãé¨ç½²å管çå¤ä¸ªæºè½ä½ï¼å®ç°å¤æä»»å¡çåä½ä¸èªå¨åã"},companion:{title:"æ æéªä¼´ AI",desc:"å ·å¤é«åº¦å ±æ è½åç AI ä¼´ä¾£ï¼æä¾æ ææ¯æåéªä¼´æå¡ã"},demoPlaceholder:"ææ¯æ¼ç¤ºåºå - Placeholder"},opensource:{title:"弿ºé¡¹ç®",subtitle:"æä»¬ç¸ä¿¡å¼æºçåéï¼ä»¥ä¸æ¯æä»¬è´¡ç®ç项ç®",project:"项ç®",projectDesc:"弿ºé¡¹ç®æè¿° - Placeholder"},company:{title:"å ³äºæä»¬",subtitle:"æå»º AI è®°å¿åºç¡è®¾æ½ï¼è®©æ¯ä¸ªæºè½ä½æ¥ææä¹ 认ç¥",aboutTitle:"å ³äºå¿æµå ç´ ",mission:"使å½",missionDesc:"为 AI åºç¨æä¾å¯è½å°çè®°å¿ä¸è®¤ç¥æ¨¡åï¼å¸®å©å¼åè æå»ºè½æç»çè§£ç¨æ·ç产åã",vision:"æ¿æ¯",visionDesc:"æä¸ºå ¨ç AI 认ç¥åºç¡è®¾æ½çæ åï¼è®©äººæºäº¤äºä»å°å·çé®çè¿åä¸ºææ¸©åº¦çå ³ç³»ã",values:"æ ¸å¿ä»·å¼è§",value1:"ææ¯é©±å¨",value1Desc:"以ååç®æ³åç³»ç»æ¶æä¸ºæ ¸å¿ç«äºåï¼å¨è®°å¿æ£ç´¢ãå¾è°±æå»ºãè¯ä¹çè§£çæ¹åæç»çªç ´",value2:"弿¾å ±å»º",value2Desc:"弿ºæ ¸å¿è½åï¼ä¸å ¨çå¼åè å ±å»º AI è®°å¿çæï¼é使æ¯é¨æ§ãå éè¡ä¸åæ°",value3:"é¿æä¸»ä¹",value3Desc:"䏿³¨åºç¡è
71®¾æ½å±ç深度价å¼ï¼ä¸ºå®¢æ·åç¤¾åºæå»ºç»å¾èµ·æ¶é´èéªçææ¯åºåº§",team:"æ ¸å¿å¢é",teamDesc:"æ¥èªå®¾å¤§ãUCLA çé¡¶å°å¦åºï¼æ¨ªè·¨ AI ç ç©¶ãç³»ç»æ¶æä¸äº§å设计ï¼å
¼å
·å¦æ¯æ·±åº¦ä¸å·¥ç¨è½åã",teamRole1:"CTO",teamRole2:"CPO",teamRole3:"设计å¸",teamRole4:"AI ç ç©¶å",teamRole5:"游æè´è´£äºº",teamRole6:"é¢é¨è¯å«ç ç©¶å",timeline:"åå±åç¨",timelineItem1:"æç«äº 2024",timelineItem2:"馿¬¾äº§ååå¸",timelineItem3:"ECAI 论æè¢«æ¥æ¶",timelineItem4:"弿ºé¡¹ç®åå¸",joinUs:"å å
¥æä»¬"},news:{title:"æ°é»",subtitle:"äºè§£å¿æµå
ç´ çææ°å¨æåè¡ä¸æ´å¯",featured:"ç²¾éæç« ",featuredTitle:"M-Flow 2.0: æ°ä¸ä»£è®°å¿æ¶æ",featuredExcerpt:"æ¨åºçªç ´æ§çåå¸å¼è®°å¿ç³»ç»ï¼æ§è½æå 3 åï¼æ¯æç¾ä¸çº§å¹¶åç¨æ·ã",articles:"ææ°æç« ",category:{product:"产å",research:"ç ç©¶",community:"社åº",engineering:"å·¥ç¨",industry:"è¡ä¸",event:"æ´»å¨"}},docs:{title:"å¼åææ¡£",subtitle:"éæ©äº§åææ¡£ï¼å¼å§éæä¹æ
",mflowTitle:"M-Flow",mflowSubtitle:"è®°å¿å¼æ",mflowDesc:"为 AI èµäºæä¹
è®°å¿è½åââåå¨ãæ£ç´¢ãå
³èã宿´ç API åèãSDK æååéææç¨ã",mflowStatus:"å¯ç¨",metaTitle:"Metacognition",metaSubtitle:"对è¯åæå¼æ",metaDesc:"深度ç解对è¯ä¸ä¸æï¼æåå
³é®ä¿¡æ¯ãæ
æä¸æå¾ã宿¶åæï¼æºè½æ´å¯ã",metaStatus:"å³å°æ¨åº",viewDocs:"æ¥çææ¡£"},career:{title:"å å
¥æä»¬",subtitle:"ä¸ä¼ç§ç人ä¸èµ·ï¼åææä¹çäº",openPositions:"弿¾èä½",benefits:"ç¦å©å¾
é",culture:"ä¼ä¸æå"},research:{title:"ç ç©¶",subtitle:"æ¢ç´¢åæ²¿ææ¯ï¼æ¨å¨è¡ä¸åå±",papers:"å表论æ",projects:"ç 究项ç®"},events:{title:"æ´»å¨",subtitle:"äºè§£æä»¬çææ°å¨æåæ´»å¨",upcoming:"å³å°ä¸¾è¡",past:"å¾ææ´»å¨"},resources:{title:"èµæºä¸å¿",subtitle:"ææ¡£ãæç¨åå¼åè
èµæº",docs:{title:"å¼åææ¡£",desc:"API åèåéææå",link:"æ¥çææ¡£ â"},tutorials:{title:"æç¨",desc:"ä»å
¥é¨å°è¿é¶ç宿´æç¨",link:"å¼å§å¦ä¹ â"},blog:{title:"å客",desc:"ææ¯æç« åè¡ä¸æ´å¯",link:"é
读å客 â"}},getstarted:{title:"å¼å§ä½¿ç¨",subtitle:"åå¤å¥½å¼å§äºåï¼éæ©éåæ¨çæ¹å¼",contact:{title:"èç³»æä»¬",desc:"䏿们çå¢éåå¾èç³»ï¼äºè§£æ´å¤äº§åä¿¡æ¯æå®å¶åéæ±",email:"é®ç®±",phone:"çµè¯",button:"åé询é®"},developer:{title:"å¼åè
èµæº",desc:"è®¿é®æä»¬ç GitHub è·å弿ºé¡¹ç®ã示ä¾ä»£ç å SDK",github:"â GitHub ä»åº",api:"â API ææ¡£",sdk:"â SDK ä¸è½½"}},footer:"© 2026 å¿æµå
ç´ . All rights reserved."},en:{brand:"Flow Element",getStartedBtn:"Contact Us",nav:{products:"Products",opensource:"Open Source",company:"Company",resources:"Resources",career:"Career",research:"Research",events:"Events",getstarted:"Book a Demo"},home:{heroTitle:"Restructuring AI Cognition",heroSubtitle:"We build the cognitive infrastru
71cture for AI â not just remembering, but understanding, connecting, and evolving",quickTitle:"Quick Overview",quickDesc:"Flow Element is a technology company focused on emotional intelligence and human-computer interaction. We are committed to creating AI products that truly understand people.",servicesTitle:"Services Overview",service1Title:"Emotion Computing",service1Desc:"Emotion recognition and analysis based on multimodal data",service2Title:"Smart Dialogue",service2Desc:"Dialogue systems with deep understanding and empathy",service3Title:"Digital Humans",service3Desc:"Highly realistic virtual characters and agent platforms",brainSectionTitle:"Core Capabilities",brain1Title:"Memory Engine",brain1Desc:"Long-term memory storage and retrieval system for persistent AI conversations",brain2Title:"Metacognition Engine",brain2Desc:"Deep understanding of conversation context, extracting key information and emotions",brain3Title:"Placeholder",brain3Desc:"New feature module coming soon",mflowTitle:"Inventing Memory",mflowSubtitle:"Turn stateless models into persistent, evolving intelligence",mflowButton:"Learn More â",section2Title:"New Section Title",section2Subtitle:"New section subtitle description",section2Button:"Learn More â",securityTitle:"Secure & Reliable",security1Title:"Data Security",security1Desc:"End-to-end encryption, meeting international security standards",security2Title:"System Stability",security2Desc:"99.9% availability, multi-region global deployment",security3Title:"Compliance",security3Desc:"Multiple industry certifications for enterprise needs",adoptionTitle:"Easy to Adopt",adoption1Title:"Quick Integration",adoption1Desc:"Simple APIs, integrate with just a few lines of code",adoption2Title:"Flexible Customization",adoption2Desc:"Multiple deployment options, configure as needed",adoption3Title:"Professional Support",adoption3Desc:"24/7 technical support, rapid response",whyTitle:"Why Flow Element?",whyCurrentTitle:"The Status Quo: AI's Memory Problem",whyCurrent1:"Every conversation starts from scratch â no memory of users",whyCurrent2:"Personality collapses, contradicts itself over time",whyCurrent3:"Cannot build real, lasting user relationships",whyMindflowTitle:"Flow Element: Continuously Evolving AI",whyMindflow1:"Persistent cross-session memory that truly remembers each user",whyMindflow2:"Stable AI personality and behavioral consistency",whyMindflow3:"User understanding that deepens over time",solutionTitle:"Core Solutions",solution1Title:"Memory Engine",solution1Desc:"Long-term memory storage and retrieval that transforms unstructured dialogue into searchable, persistent knowledge graphs",solution2Title:"Metacognition Engine",solution2Desc:"Deep understanding of dialogue semantics, emotions and intent, delivering precise conversational insights",solution3Title:"Personality Consistency System",solution3Desc:"Ensures AI maintains consistent personality and behavior across time and contexts",dataTitle:"The Numbers Speak",dataStat1:"97.7%",dataStat1Label:"Peak Accuracy",dataStat2:"1,786",dataStat2Label:"Benchmark Questions",dataStat3:"4",dataStat3Label:"Standardized Benchmarks",dataStat4:"5",dataStat4Label:"Systems Compared",scenarioTitle:"Use Cases",scenario1Title:"Emotional Companion",scenario1Desc:"Let AI companions truly remember every conversation and build deep emotional bonds",scenario2Title:"Game NPCs",scenario2Desc:"Give game characters persistent memory and real personality evolution",scenario3Title:"Smart Customer Service",scenario3Desc:"Remember user preferences and history for personalized service",scenario4Title:"Education Assistant",scenario4Desc:"Track learning trajectories and dynamically adapt teaching strategies",visionTitle:"Our Vision",visionQuote:`"Memory stores facts, 72cognition is the framework developed from memory."`,visionCtaTitle:`Awaken 73AI cognition`,visionCtaHighlight:"AI cognition",visionCtaSubtitle:"Starting with remembering the first user.",getInTouchTitle:"Build the Future with Flow Element",getInTouchPlaceholder:"Enter your email",getInTouchSending:"Sending...",getInTouchSuccess:"Sent!"},products:{title:"Products & Technology",subtitle:"Explore our core products and technical capabilities",memory:{title:"M-Flow Memory Engine",desc:"Long-term memory storage and retrieval system, enabling AI to remember every conversation and build lasting relationships."},dialogue:{title:"Metacognition Engine",desc:"Deep understanding of dialogue semantics, emotions and intents, providing precise conversational insights."},avatar:{title:"Digital Human & Agent Platform",desc:"Build, deploy and manage multiple agents for complex task collaboration and automation."},companion:{title:"Emotional Companion AI",desc:"AI companion with high empathy capabilities, providing emotional support and companionship."},demoPlaceholder:"Tech Demo Area - Placeholder"},opensource:{title:"Open Source",subtitle:"We believe in the power of open source. Here are our contributions",project:"Project",projectDesc:"Open source project description - Placeholder"},company:{title:"About Us",subtitle:"Building the memory infrastru
73cture for AI â so every agent remembers",aboutTitle:"About Flow Element",mission:"Mission",missionDesc:"Provide production-ready memory and cognition modules for AI applications â helping developers build products that continuously understand their users.",vision:"Vision",visionDesc:"Set the global standard for AI cognitive infrastructure, transforming cold Q&A into relationships that grow.",values:"Core Values",value1:"Technology-Driven",value1Desc:"Original algorithms and system architecture as our core edge â pushing boundaries in memory retrieval, graph construction, and semantic understanding",value2:"Open Ecosystem",value2Desc:"Open-sourcing core capabilities to build the AI memory ecosystem with developers worldwide, lowering barriers and accelerating innovation",value3:"Long-Term Thinking",value3Desc:"Focused on deep infrastructure value, building a technical foundation that stands the test of time for our customers and community",team:"Core Team",teamDesc:"From UPenn, UCLA and top institutions â spanning AI research, systems architecture, and product design with both academic depth and engineering rigor.",teamRole1:"CTO",teamRole2:"CPO",teamRole3:"Designer",teamRole4:"AI Researcher",teamRole5:"Game Lead",teamRole6:"Face Recognition Researcher",timeline:"Timeline",timelineItem1:"Founded in 2024",timelineItem2:"First Product Launch",timelineItem3:"ECAI Paper Accepted",timelineItem4:"Open Source Release",joinUs:"Join Us"},news:{title:"News",subtitle:"Stay updated with latest news and industry insights",featured:"Featured Article",featuredTitle:"M-Flow 2.0: Next-Generation Memory Architecture",featuredExcerpt:"Introducing a breakthrough distributed memory system with 3x performance gains and support for millions of concurrent users.",articles:"Latest Articles",category:{product:"Product",research:"Research",community:"Community",engineering:"Engineering",industry:"Industry",event:"Event"}},docs:{title:"Documentation",subtitle:"Choose a product to explore its documentation",mflowTitle:"M-Flow",mflowSubtitle:"Memory Engine",mflowDesc:"Give AI persistent memory â store, retrieve, and associate. Complete API reference, SDK guides, and integration tutorials.",mflowStatus:"Available",metaTitle:"Metacognition",metaSubtitle:"Dialogue Analysis Engine",metaDesc:"Deep understanding of dialogue context, extracting key information, sentiment and intent. Real-time analysis with intelligent insights.",metaStatus:"Coming Soon",viewDocs:"View Docs"},career:{title:"Join Us",subtitle:"Work with exceptional people on meaningful projects",openPositions:"Open Positions",benefits:"Benefits",culture:"Culture"},research:{title:"Research",subtitle:"Exploring cutting-edge technology, driving industry progress",papers:"Publications",projects:"Research Projects"},events:{title:"Events",subtitle:"Stay updated with our latest news and events",upcoming:"Upcoming",past:"Past Events"},resources:{title:"Resource Center",subtitle:"Documentation, tutorials, and developer resources",docs:{title:"Documentation",desc:"API reference and integration guides",link:"View Docs â"},tutorials:{title:"Tutorials",desc:"Complete tutorials from beginner to advanced",link:"Start Learning â"},blog:{title:"Blog",desc:"Technical articles and industry insights",link:"Read Blog â"}},getstarted:{title:"Book a Demo",subtitle:"Ready to begin? Choose the option that suits you",contact:{title:"Contact Us",desc:"Get in touch with our team for product information or custom requirements",email:"Email",phone:"Phone",button:"Send Inquiry"},developer:{title:"Developer Resources",desc:"Access our GitHub for open source projects, sample code and SDKs",github:"â GitHub Repository",api:"â API Documentation",sdk:"â SDK Downloads"}},footer:"© 2026 Flow Element. All rights reserved."}},PB=X.createContext({lang:"en",t:RB.en}),Cr=()=>X.useContext(PB);/** 74 * @license 75 * Copyright 2010-2025 Three.js Authors 76 * SPDX-License-Identifier: MIT 77 */const jm="182",Cs={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Rs={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},IB=0,cM=1,LB=2,uz=3,BB=0,Rf=1,Wp=2,xu=3,So=0,Jr=1,Di=2,jo=0,lc=1,_a=2,uM=3,dM=4,DB=5,Ul=100,FB=101,NB=102,kB=103,OB=104,UB=200,zB=201,HB=202,GB=203,Nv=204,kv=205,jB=206,WB=207,VB=208,XB=209,YB=210,JB=211,KB=212,qB=213,ZB=214,Ov=0,Uv=1,zv=2,Wu=3,Hv=4,Gv=5,jv=6,Wv=7,Wm=0,QB=1,$B=2,zs=0,qy=1,Zy=2,Qy=3,Vm=4,$y=5,e1=6,t1=7,fM="attached",eD="detached",n1=300,Sa=301,xc=302,Am=303,wm=304,ah=306,bo=1e3,Mr=1001,Vu=1002,Bn=1003,Xm=1004,dz=1004,Yl=1005,fz=1005,jt=1006,Lu=1007,hz=1007,as=1008,pz=1008,jr=1009,nw=1010,iw=1011,Yf=1012,i1=1013,Mo=1014,Vr=1015,sr=1016,r1=1017,s1=1018,Jf=1020,rw=35902,sw=35899,ow=1021,aw=1022,Ni=1023,ba=1026,Jl=1027,o1=1028,Ym=1029,Xu=1030,a1=1031,mz=1032,l1=1033,Vp=33776,Xp=33777,Yp=33778,Jp=33779,Vv=35840,Xv=35841,Yv=35842,Jv=35843,Kv=36196,qv=37492,Zv=37496,Qv=37488,$v=37489,ey=37490,ty=37491,ny=37808,iy=37809,ry=37810,sy=37811,oy=37812,ay=37813,ly=37814,cy=37815,uy=37816,dy=37817,fy=37818,hy=37819,py=37820,my=37821,gy=36492,xy=36494,vy=36495,yy=36283,_y=36284,Sy=36285,by=36286,tD=2200,lw=2201,nD=2202,Yu=2300,vc=2301,qx=2302,vu=2400,yu=2401,Tm=2402,c1=2500,cw=2501,uw=0,Jm=1,Ju=2,iD=3200,gz=3201,xz=3202,vz=3203,wc=0,rD=1,Va="",Un="srgb",Tr="srgb-linear",Em="linear",vn="srgb",yz="",_z="rg",Sz="ga",bz=0,cu=7680,Mz=7681,Az=7682,wz=7683,Tz=34055,Ez=34056,Cz=5386,Rz=512,Pz=513,Iz=514,Lz=515,Bz=516,Dz=517,Fz=518,hM=
vendor: 14,662 bytes, line 77
77519,sD=512,oD=513,aD=514,u1=515,lD=516,cD=517,d1=518,uD=519,Cm=35044,Nz=35048,kz=35040,Oz=35045,Uz=35049,zz=35041,Hz=35046,Gz=35050,jz=35042,Wz="100",pM="300 es",Fs=2e3,Kf=2001,Vz={COMPUTE:"compute",RENDER:"render"},Xz={PERSPECTIVE:"perspective",LINEAR:"linear",FLAT:"flat"},Yz={NORMAL:"normal",CENTROID:"centroid",SAMPLE:"sample",FIRST:"first",EITHER:"either"};function dD(i){for(let e=i.length-1;e>=0;--e)if(i[e]>=65535)return!0;return!1}const Jz={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function mf(i,e){return new Jz[i](e)}function fD(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function Rm(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function hD(){const i=Rm("canvas");return i.style.display="block",i}const b5={};let yc=null;function Kz(i){yc=i}function qz(){return yc}function Pm(...i){const e="THREE."+i.shift();yc?yc("log",e,...i):console.log(e,...i)}function at(...i){const e="THREE."+i.shift();yc?yc("warn",e,...i):console.warn(e,...i)}function bt(...i){const e="THREE."+i.shift();yc?yc("error",e,...i):console.error(e,...i)}function qf(...i){const e=i.join(" ");e in b5||(b5[e]=!0,at(...i))}function Zz(i,e,t){return new Promise(function(n,r){function s(){switch(i.clientWaitSync(e,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(s,t);break;default:n()}}setTimeout(s,t)})}let Aa=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){const n=this._listeners;return n===void 0?!1:n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){const n=this._listeners;if(n===void 0)return;const r=n[e];if(r!==void 0){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}dispatchEvent(e){const t=this._listeners;if(t===void 0)return;const n=t[e.type];if(n!==void 0){e.target=this;const r=n.slice(0);for(let s=0,o=r.length;s<o;s++)r[s].call(this,e);e.target=null}}};const mr=["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 M5=1234567;const Bu=Math.PI/180,Zf=180/Math.PI;function Hs(){const i=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(mr[i&255]+mr[i>>8&255]+mr[i>>16&255]+mr[i>>24&255]+"-"+mr[e&255]+mr[e>>8&255]+"-"+mr[e>>16&15|64]+mr[e>>24&255]+"-"+mr[t&63|128]+mr[t>>8&255]+"-"+mr[t>>16&255]+mr[t>>24&255]+mr[n&255]+mr[n>>8&255]+mr[n>>16&255]+mr[n>>24&255]).toLowerCase()}function It(i,e,t){return Math.max(e,Math.min(t,i))}function dw(i,e){return(i%e+e)%e}function Qz(i,e,t,n,r){return n+(i-e)*(r-n)/(t-e)}function $z(i,e,t){return i!==e?(t-i)/(e-i):0}function Kp(i,e,t){return(1-t)*i+t*e}function e8(i,e,t,n){return Kp(i,e,1-Math.exp(-t*n))}function t8(i,e=1){return e-Math.abs(dw(i,e*2)-e)}function n8(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*(3-2*i))}function i8(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*i*(i*(i*6-15)+10))}function r8(i,e){return i+Math.floor(Math.random()*(e-i+1))}function s8(i,e){return i+Math.random()*(e-i)}function o8(i){return i*(.5-Math.random())}function a8(i){i!==void 0&&(M5=i);let e=M5+=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 l8(i){return i*Bu}function c8(i){return i*Zf}function u8(i){return(i&i-1)===0&&i!==0}function d8(i){return Math.pow(2,Math.ceil(Math.log(i)/Math.LN2))}function f8(i){return Math.pow(2,Math.floor(Math.log(i)/Math.LN2))}function h8(i,e,t,n,r){const s=Math.cos,o=Math.sin,a=s(t/2),l=o(t/2),c=s((e+n)/2),u=o((e+n)/2),d=s((e-n)/2),p=o((e-n)/2),m=s((n-e)/2),x=o((n-e)/2);switch(r){case"XYX":i.set(a*u,l*d,l*p,a*c);break;case"YZY":i.set(l*p,a*u,l*d,a*c);break;case"ZXZ":i.set(l*d,l*p,a*u,a*c);break;case"XZX":i.set(a*u,l*x,l*m,a*c);break;case"YXY":i.set(l*m,a*u,l*x,a*c);break;case"ZYZ":i.set(l*x,l*m,a*u,a*c);break;default:at("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function Wr(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return i/4294967295;case Uint16Array:return i/65535;case Uint8Array:return i/255;case Int32Array:return Math.max(i/2147483647,-1);case Int16Array:return Math.max(i/32767,-1);case Int8Array:return Math.max(i/127,-1);default:throw new Error("Invalid component type.")}}function kt(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return Math.round(i*4294967295);case Uint16Array:return Math.round(i*65535);case Uint8Array:return Math.round(i*255);case Int32Array:return Math.round(i*2147483647);case Int16Array:return Math.round(i*32767);case Int8Array:return Math.round(i*127);default:throw new Error("Invalid component type.")}}const Xn={DEG2RAD:Bu,RAD2DEG:Zf,generateUUID:Hs,clamp:It,euclideanModulo:dw,mapLinear:Qz,inverseLerp:$z,lerp:Kp,damp:e8,pingpong:t8,smoothstep:n8,smootherstep:i8,randInt:r8,randFloat:s8,randFloatSpread:o8,seededRandom:a8,degToRad:l8,radToDeg:c8,isPowerOfTwo:u8,ceilPowerOfTwo:d8,floorPowerOfTwo:f8,setQuaternionFromProperEuler:h8,normalize:kt,denormalize:Wr};class xe{constructor(e=0,t=0){xe.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=It(this.x,e.x,t.x),this.y=It(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=It(this.x,e,t),this.y=It(this.y,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(It(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(It(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),r=Math.sin(t),s=this.x-e.x,o=this.y-e.y;return this.x=s*n-o*r+e.x,this.y=s*r+o*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class si{constructor(e=0,t=0,n=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=r}static slerpFlat(e,t,n,r,s,o,a){let l=n[r+0],c=n[r+1],u=n[r+2],d=n[r+3],p=s[o+0],m=s[o+1],x=s[o+2],v=s[o+3];if(a<=0){e[t+0]=l,e[t+1]=c,e[t+2]=u,e[t+3]=d;return}if(a>=1){e[t+0]=p,e[t+1]=m,e[t+2]=x,e[t+3]=v;return}if(d!==v||l!==p||c!==m||u!==x){let _=l*p+c*m+u*x+d*v;_<0&&(p=-p,m=-m,x=-x,v=-v,_=-_);let g=1-a;if(_<.9995){const S=Math.acos(_),b=Math.sin(S);g=Math.sin(g*S)/b,a=Math.sin(a*S)/b,l=l*g+p*a,c=c*g+m*a,u=u*g+x*a,d=d*g+v*a}else{l=l*g+p*a,c=c*g+m*a,u=u*g+x*a,d=d*g+v*a;const S=1/Math.sqrt(l*l+c*c+u*u+d*d);l*=S,c*=S,u*=S,d*=S}}e[t]=l,e[t+1]=c,e[t+2]=u,e[t+3]=d}static multiplyQuaternionsFlat(e,t,n,r,s,o){const a=n[r],l=n[r+1],c=n[r+2],u=n[r+3],d=s[o],p=s[o+1],m=s[o+2],x=s[o+3];return e[t]=a*x+u*d+l*m-c*p,e[t+1]=l*x+u*p+c*d-a*m,e[t+2]=c*x+u*m+a*p-l*d,e[t+3]=u*x-a*d-l*p-c*m,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const n=e._x,r=e._y,s=e._z,o=e._order,a=Math.cos,l=Math.sin,c=a(n/2),u=a(r/2),d=a(s/2),p=l(n/2),m=l(r/2),x=l(s/2);switch(o){case"XYZ":this._x=p*u*d+c*m*x,this._y=c*m*d-p*u*x,this._z=c*u*x+p*m*d,this._w=c*u*d-p*m*x;break;case"YXZ":this._x=p*u*d+c*m*x,this._y=c*m*d-p*u*x,this._z=c*u*x-p*m*d,this._w=c*u*d+p*m*x;break;case"ZXY":this._x=p*u*d-c*m*x,this._y=c*m*d+p*u*x,this._z=c*u*x+p*m*d,this._w=c*u*d-p*m*x;break;case"ZYX":this._x=p*u*d-c*m*x,this._y=c*m*d+p*u*x,this._z=c*u*x-p*m*d,this._w=c*u*d+p*m*x;break;case"YZX":this._x=p*u*d+c*m*x,this._y=c*m*d+p*u*x,this._z=c*u*x-p*m*d,this._w=c*u*d-p*m*x;break;case"XZY":this._x=p*u*d-c*m*x,this._y=c*m*d-p*u*x,this._z=c*u*x+p*m*d,this._w=c*u*d+p*m*x;break;default:at("Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],r=t[4],s=t[8],o=t[1],a=t[5],l=t[9],c=t[2],u=t[6],d=t[10],p=n+a+d;if(p>0){const m=.5/Math.sqrt(p+1);this._w=.25/m,this._x=(u-l)*m,this._y=(s-c)*m,this._z=(o-r)*m}else if(n>a&&n>d){const m=2*Math.sqrt(1+n-a-d);this._w=(u-l)/m,this._x=.25*m,this._y=(r+o)/m,this._z=(s+c)/m}else if(a>d){const m=2*Math.sqrt(1+a-n-d);this._w=(s-c)/m,this._x=(r+o)/m,this._y=.25*m,this._z=(l+u)/m}else{const m=2*Math.sqrt(1+d-n-a);this._w=(o-r)/m,this._x=(s+c)/m,this._y=(l+u)/m,this._z=.25*m}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<1e-8?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(It(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(n===0)return this;const r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,r=e._y,s=e._z,o=e._w,a=t._x,l=t._y,c=t._z,u=t._w;return this._x=n*u+o*a+r*c-s*l,this._y=r*u+o*l+s*a-n*c,this._z=s*u+o*c+n*l-r*a,this._w=o*u-n*a-r*l-s*c,this._onChangeCallback(),this}slerp(e,t){if(t<=0)return this;if(t>=1)return this.copy(e);let n=e._x,r=e._y,s=e._z,o=e._w,a=this.dot(e);a<0&&(n=-n,r=-r,s=-s,o=-o,a=-a);let l=1-t;if(a<.9995){const c=Math.acos(a),u=Math.sin(c);l=Math.sin(l*c)/u,t=Math.sin(t*c)/u,this._x=this._x*l+n*t,this._y=this._y*l+r*t,this._z=this._z*l+s*t,this._w=this._w*l+o*t,this._onChangeCallback()}else this._x=this._x*l+n*t,this._y=this._y*l+r*t,this._z=this._z*l+s*t,this._w=this._w*l+o*t,this.normalize();return this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),r
vendor: 4,693 bytes, line 77
77=Math.sqrt(1-n),s=Math.sqrt(n);return this.set(r*Math.sin(e),r*Math.cos(e),s*Math.sin(t),s*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class H{constructor(e=0,t=0,n=0){H.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw 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(A5.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(A5.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[3]*n+s[6]*r,this.y=s[1]*t+s[4]*n+s[7]*r,this.z=s[2]*t+s[5]*n+s[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,s=e.elements,o=1/(s[3]*t+s[7]*n+s[11]*r+s[15]);return this.x=(s[0]*t+s[4]*n+s[8]*r+s[12])*o,this.y=(s[1]*t+s[5]*n+s[9]*r+s[13])*o,this.z=(s[2]*t+s[6]*n+s[10]*r+s[14])*o,this}applyQuaternion(e){const t=this.x,n=this.y,r=this.z,s=e.x,o=e.y,a=e.z,l=e.w,c=2*(o*r-a*n),u=2*(a*t-s*r),d=2*(s*n-o*t);return this.x=t+l*c+o*d-a*u,this.y=n+l*u+a*c-s*d,this.z=r+l*d+s*u-o*c,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,n=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[4]*n+s[8]*r,this.y=s[1]*t+s[5]*n+s[9]*r,this.z=s[2]*t+s[6]*n+s[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=It(this.x,e.x,t.x),this.y=It(this.y,e.y,t.y),this.z=It(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=It(this.x,e,t),this.y=It(this.y,e,t),this.z=It(this.z,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(It(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}
vendor: 64,876 bytes, line 77
77lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,r=e.y,s=e.z,o=t.x,a=t.y,l=t.z;return this.x=r*l-s*a,this.y=s*o-n*l,this.z=n*a-r*o,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return I2.copy(this).projectOnVector(e),this.sub(I2)}reflect(e){return this.sub(I2.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 n=this.dot(e)/t;return Math.acos(It(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){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(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,t=Math.random()*2-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const I2=new H,A5=new si;class Nt{constructor(e,t,n,r,s,o,a,l,c){Nt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,r,s,o,a,l,c)}set(e,t,n,r,s,o,a,l,c){const u=this.elements;return u[0]=e,u[1]=r,u[2]=a,u[3]=t,u[4]=s,u[5]=l,u[6]=n,u[7]=o,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){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 n=e.elements,r=t.elements,s=this.elements,o=n[0],a=n[3],l=n[6],c=n[1],u=n[4],d=n[7],p=n[2],m=n[5],x=n[8],v=r[0],_=r[3],g=r[6],S=r[1],b=r[4],A=r[7],w=r[2],C=r[5],P=r[8];return s[0]=o*v+a*S+l*w,s[3]=o*_+a*b+l*C,s[6]=o*g+a*A+l*P,s[1]=c*v+u*S+d*w,s[4]=c*_+u*b+d*C,s[7]=c*g+u*A+d*P,s[2]=p*v+m*S+x*w,s[5]=p*_+m*b+x*C,s[8]=p*g+m*A+x*P,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],n=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return t*o*u-t*a*c-n*s*u+n*a*l+r*s*c-r*o*l}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],d=u*o-a*c,p=a*l-u*s,m=c*s-o*l,x=t*d+n*p+r*m;if(x===0)return this.set(0,0,0,0,0,0,0,0,0);const v=1/x;return e[0]=d*v,e[1]=(r*c-u*n)*v,e[2]=(a*n-r*o)*v,e[3]=p*v,e[4]=(u*t-r*l)*v,e[5]=(r*s-a*t)*v,e[6]=m*v,e[7]=(n*l-c*t)*v,e[8]=(o*t-n*s)*v,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,n,r,s,o,a){const l=Math.cos(s),c=Math.sin(s);return this.set(n*l,n*c,-n*(l*o+c*a)+o+e,-r*c,r*l,-r*(-c*o+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(L2.makeScale(e,t)),this}rotate(e){return this.premultiply(L2.makeRotation(-e)),this}translate(e,t){return this.premultiply(L2.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),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,n=e.elements;for(let r=0;r<9;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const L2=new Nt,w5=new Nt().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),T5=new Nt().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function p8(){const i={enabled:!0,workingColorSpace:Tr,spaces:{},convert:function(r,s,o){return this.enabled===!1||s===o||!s||!o||(this.spaces[s].transfer===vn&&(r.r=$a(r.r),r.g=$a(r.g),r.b=$a(r.b)),this.spaces[s].primaries!==this.spaces[o].primaries&&(r.applyMatrix3(this.spaces[s].toXYZ),r.applyMatrix3(this.spaces[o].fromXYZ)),this.spaces[o].transfer===vn&&(r.r=Pf(r.r),r.g=Pf(r.g),r.b=Pf(r.b))),r},workingToColorSpace:function(r,s){return this.convert(r,this.workingColorSpace,s)},colorSpaceToWorking:function(r,s){return this.convert(r,s,this.workingColorSpace)},getPrimaries:function(r){return this.spaces[r].primaries},getTransfer:function(r){return r===Va?Em:this.spaces[r].transfer},getToneMappingMode:function(r){return this.spaces[r].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(r,s=this.workingColorSpace){return r.fromArray(this.spaces[s].luminanceCoefficients)},define:function(r){Object.assign(this.spaces,r)},_getMatrix:function(r,s,o){return r.copy(this.spaces[s].toXYZ).multiply(this.spaces[o].fromXYZ)},_getDrawingBufferColorSpace:function(r){return this.spaces[r].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(r=this.workingColorSpace){return this.spaces[r].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(r,s){return qf("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),i.workingToColorSpace(r,s)},toWorkingColorSpace:function(r,s){return qf("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),i.colorSpaceToWorking(r,s)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],n=[.3127,.329];return i.define({[Tr]:{primaries:e,whitePoint:n,transfer:Em,toXYZ:w5,fromXYZ:T5,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:Un},outputColorSpaceConfig:{drawingBufferColorSpace:Un}},[Un]:{primaries:e,whitePoint:n,transfer:vn,toXYZ:w5,fromXYZ:T5,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:Un}}}),i}const Yt=p8();function $a(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function Pf(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}let Ad;class pD{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{Ad===void 0&&(Ad=Rm("canvas")),Ad.width=e.width,Ad.height=e.height;const r=Ad.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=Ad}return n.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=Rm("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const r=n.getImageData(0,0,e.width,e.height),s=r.data;for(let o=0;o<s.length;o++)s[o]=$a(s[o]/255)*255;return n.putImageData(r,0,0),t}else if(e.data){const t=e.data.slice(0);for(let n=0;n<t.length;n++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[n]=Math.floor($a(t[n]/255)*255):t[n]=$a(t[n]);return{data:t,width:e.width,height:e.height}}else return at("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let m8=0;class Kl{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:m8++}),this.uuid=Hs(),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.displayHeight,t.displayWidth,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 n={uuid:this.uuid,url:""},r=this.data;if(r!==null){let s;if(Array.isArray(r)){s=[];for(let o=0,a=r.length;o<a;o++)r[o].isDataTexture?s.push(B2(r[o].image)):s.push(B2(r[o]))}else s=B2(r);n.url=s}return t||(e.images[this.uuid]=n),n}}function B2(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&i instanceof ImageBitmap?pD.getDataURL(i):i.data?{data:Array.from(i.data),width:i.width,height:i.height,type:i.data.constructor.name}:(at("Texture: Unable to serialize Texture."),{})}let g8=0;const D2=new H;class Sn extends Aa{constructor(e=Sn.DEFAULT_IMAGE,t=Sn.DEFAULT_MAPPING,n=Mr,r=Mr,s=jt,o=as,a=Ni,l=jr,c=Sn.DEFAULT_ANISOTROPY,u=Va){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:g8++}),this.uuid=Hs(),this.name="",this.source=new Kl(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=n,this.wrapT=r,this.magFilter=s,this.minFilter=o,this.anisotropy=c,this.format=a,this.internalFormat=null,this.type=l,this.offset=new xe(0,0),this.repeat=new xe(1,1),this.center=new xe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Nt,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=u,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(e&&e.depth&&e.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(D2).x}get height(){return this.source.getSize(D2).y}get depth(){return this.source.getSize(D2).z}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(const t in e){const n=e[t];if(n===void 0){at(`Texture.setValues(): parameter '${t}' has value of undefined.`);continue}const r=this[t];if(r===void 0){at(`Texture.setValues(): property '${t}' does not exist.`);continue}r&&n&&r.isVector2&&n.isVector2||r&&n&&r.isVector3&&n.isVector3||r&&n&&r.isMatrix3&&n.isMatrix3?r.copy(n):this[t]=n}}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const n={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==n1)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case bo:e.x=e.x-Math.floor(e.x);break;case Mr:e.x=e.x<0?0:1;break;case Vu: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 bo:e.y=e.y-Math.floor(e.y);break;case Mr:e.y=e.y<0?0:1;break;case Vu: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++}}Sn.DEFAULT_IMAGE=null;Sn.DEFAULT_MAPPING=n1;Sn.DEFAULT_ANISOTROPY=1;class on{constructor(e=0,t=0,n=0,r=1){on.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,s=this.w,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*r+o[12]*s,this.y=o[1]*t+o[5]*n+o[9]*r+o[13]*s,this.z=o[2]*t+o[6]*n+o[10]*r+o[14]*s,this.w=o[3]*t+o[7]*n+o[11]*r+o[15]*s,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,s;const l=e.elements,c=l[0],u=l[4],d=l[8],p=l[1],m=l[5],x=l[9],v=l[2],_=l[6],g=l[10];if(Math.abs(u-p)<.01&&Math.abs(d-v)<.01&&Math.abs(x-_)<.01){if(Math.abs(u+p)<.1&&Math.abs(d+v)<.1&&Math.abs(x+_)<.1&&Math.abs(c+m+g-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const b=(c+1)/2,A=(m+1)/2,w=(g+1)/2,C=(u+p)/4,P=(d+v)/4,B=(x+_)/4;return b>A&&b>w?b<.01?(n=0,r=.707106781,s=.707106781):(n=Math.sqrt(b),r=C/n,s=P/n):A>w?A<.01?(n=.707106781,r=0,s=.707106781):(r=Math.sqrt(A),n=C/r,s=B/r):w<.01?(n=.707106781,r=.707106781,s=0):(s=Math.sqrt(w),n=P/s,r=B/s),this.set(n,r,s,t),this}let S=Math.sqrt((_-x)*(_-x)+(d-v)*(d-v)+(p-u)*(p-u));return Math.abs(S)<.001&&(S=1),this.x=(_-x)/S,this.y=(d-v)/S,this.z=(p-u)/S,this.w=Math.acos((c+m+g-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=It(this.x,e.x,t.x),this.y=It(this.y,e.y,t.y),this.z=It(this.z,e.z,t.z),this.w=It(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=It(this.x,e,t),this.y=It(this.y,e,t),this.z=It(this.z,e,t),this.w=It(this.w,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(It(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class fw extends Aa{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:jt,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},n),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=n.depth,this.scissor=new on(0,0,e,t),this.scissorTest=!1,this.viewport=new on(0,0,e,t);const r={width:e,height:t,depth:n.depth},s=new Sn(r);this.textures=[];const o=n.count;for(let a=0;a<o;a++)this.textures[a]=s.clone(),this.textures[a].isRenderTargetTexture=!0,this.textures[a].renderTarget=this;this._setTextureOptions(n),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=n.depthTexture,this.samples=n.samples,this.multiview=n.multiview}_setTextureOptions(e={}){const t={minFilter:jt,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 n=0;n<this.textures.length;n++)this.textures[n].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,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let r=0,s=this.textures.length;r<s;r++)this.textures[r].image.width=e,this.textures[r].image.height=t,this.textures[r].image.depth=n,this.textures[r].isData3DTexture!==!0&&(this.textures[r].isArrayTexture=this.textures[r].image.depth>1);this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t<n;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;const r=Object.assign({},e.textures[t].image);this.textures[t].source=new Kl(r)}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}dispose(){this.dispatchEvent({type:"dispose"})}}class Gn extends fw{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}}class f1 extends Sn{constructor(e=null,t=1,n=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=Bn,this.minFilter=Bn,this.wrapR=Mr,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class x8 extends Gn{constructor(e=1,t=1,n=1,r={}){super(e,t,r),this.isWebGLArrayRenderTarget=!0,this.depth=n,this.texture=new f1(null,e,t,n),this._setTextureOptions(r),this.texture.isRenderTargetTexture=!0}}class h1 extends Sn{constructor(e=null,t=1,n=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=Bn,this.minFilter=Bn,this.wrapR=Mr,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class v8 extends Gn{constructor(e=1,t=1,n=1,r={}){super(e,t,r),this.isWebGL3DRenderTarget=!0,this.depth=n,this.texture=new h1(null,e,t,n),this._setTextureOptions(r),this.texture.isRenderTargetTexture=!0}}class jn{constructor(e=new H(1/0,1/0,1/0),t=new H(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(Po.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(Po.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=Po.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=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 n=e.geometry;if(n!==void 0){const s=n.getAttribute("position");if(t===!0&&s!==void 0&&e.isInstancedMesh!==!0)for(let o=0,a=s.count;o<a;o++)e.isMesh===!0?e.getVertexPosition(o,Po):Po.fromBufferAttribute(s,o),Po.applyMatrix4(e.matrixWorld),this.expandByPoint(Po);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),wg.copy(e.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),wg.copy(n.boundingBox)),wg.applyMatrix4(e.matrixWorld),this.union(wg)}const r=e.children;for(let s=0,o=r.length;s<o;s++)this.expandByObject(r[s],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,Po),Po.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Wh),Tg.subVectors(this.max,Wh),wd.subVectors(e.a,Wh),Td.subVectors(e.b,Wh),Ed.subVectors(e.c,Wh),Al.subVectors(Td,wd),wl.subVectors(Ed,Td),Gc.subVectors(wd,Ed);let t=[0,-Al.z,Al.y,0,-wl.z,wl.y,0,-Gc.z,Gc.y,Al.z,0,-Al.x,wl.z,0,-wl.x,Gc.z,0,-Gc.x,-Al.y,Al.x,0,-wl.y,wl.x,0,-Gc.y,Gc.x,0];return!F2(t,wd,Td,Ed,Tg)||(t=[1,0,0,0,1,0,0,0,1],!F2(t,wd,Td,Ed,Tg))?!1:(Eg.crossVectors(Al,wl),t=[Eg.x,Eg.y,Eg.z],F2(t,wd,Td,Ed,Tg))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Po).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Po).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:(La[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),La[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),La[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),La[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),La[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),La[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),La[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),La[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(La),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 La=[new H,new H,new H,new H,new H,new H,new H,new H],Po=new H,wg=new jn,wd=new H,Td=new H,Ed=new H,Al=new H,wl=new H,Gc=new H,Wh=new H,Tg=new H,Eg=new H,jc=new H;function F2(i,e,t,n,r){for(let s=0,o=i.length-3;s<=o;s+=3){jc.fromArray(i,s);const a=r.x*Math.abs(jc.x)+r.y*Math.abs(jc.y)+r.z*Math.abs(jc.z),l=e.dot(jc),c=t.dot(jc),u=n.dot(jc);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const y8=new jn,Vh=new H,N2=new H;class mi{constructor(e=new H,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 n=this.center;t!==void 0?n.copy(t):y8.setFromPoints(e).getCenter(n);let r=0;for(let s=0,o=e.length;s<o;s++)r=Math.max(r,n.distanceToSquared(e[s]));return this.radius=Math.sqrt(r),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Vh.subVectors(e,this.center);const t=Vh.lengthSq();if(t>this.radius*this.radius){const n=Math.sqrt(t),r=(n-this.radius)*.5;this.center.addScaledVector(Vh,r/n),this.radius+=r}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(N2.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Vh.copy(e.center).add(N2)),this.expandByPoint(Vh.copy(e.center).sub(N2))),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}}const Ba=new H,k2=new H,Cg=new H,Tl=new H,O2=new H,Rg=new H,U2=new H;class Tc{constructor(e=new H,t=new H(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,Ba)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Ba.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Ba.copy(this.origin).addScaledVector(this.direction,t),Ba.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){k2.copy(e).add(t).multiplyScalar(.5),Cg.copy(t).sub(e).normalize(),Tl.copy(this.origin).sub(k2);const s=e.distanceTo(t)*.5,o=-this.direction.dot(Cg),a=Tl.dot(this.direction),l=-Tl.dot(Cg),c=Tl.lengthSq(),u=Math.abs(1-o*o);let d,p,m,x;if(u>0)if(d=o*l-a,p=o*a-l,x=s*u,d>=0)if(p>=-x)if(p<=x){const v=1/u;d*=v,p*=v,m=d*(d+o*p+2*a)+p*(o*d+p+2*l)+c}else p=s,d=Math.max(0,-(o*p+a)),m=-d*d+p*(p+2*l)+c;else p=-s,d=Math.max(0,-(o*p+a)),m=-d*d+p*(p+2*l)+c;else p<=-x?(d=Math.max(0,-(-o*s+a)),p=d>0?-s:Math.min(Math.max(-s,-l),s),m=-d*d+p*(p+2*l)+c):p<=x?(d=0,p=Math.min(Math.max(-s,-l),s),m=p*(p+2*l)+c):(d=Math.max(0,-(o*s+a)),p=d>0?s:Math.min(Math.max(-s,-l),s),m=-d*d+p*(p+2*l)+c);else p=o>0?-s:s,d=Math.max(0,-(o*p+a)),m=-d*d+p*(p+2*l)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,d),r&&r.copy(k2).addScaledVector(Cg,p),m}intersectSphere(e,t){Ba.subVectors(e.center,this.origin);const n=Ba.dot(this.direction),r=Ba.dot(Ba)-n*n,s=e.radius*e.radius;if(r>s)return null;const o=Math.sqrt(s-r),a=n-o,l=n+o;return l<0?null:a<0?this.at(l,t):this.at(a,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 n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,s,o,a,l;const c=1/this.direction.x,u=1/this.direction.y,d=1/this.direction.z,p=this.origin;return c>=0?(n=(e.min.x-p.x)*c,r=(e.max.x-p.x)*c):(n=(e.max.x-p.x)*c,r=(e.min.x-p.x)*c),u>=0?(s=(e.min.y-p.y)*u,o=(e.max.y-p.y)*u):(s=(e.max.y-p.y)*u,o=(e.min.y-p.y)*u),n>o||s>r||((s>n||isNaN(n))&&(n=s),(o<r||isNaN(r))&&(r=o),d>=0?(a=(e.min.z-p.z)*d,l=(e.max.z-p.z)*d):(a=(e.max.z-p.z)*d,l=(e.min.z-p.z)*d),n>l||a>r)||((a>n||n!==n)&&(n=a),(l<r||r!==r)&&(r=l),r<0)?null:this.at(n>=0?n:r,t)}intersectsBox(e){return this.intersectBox(e,Ba)!==null}intersectTriangle(e,t,n,r,s){O2.subVectors(t,e),Rg.subVectors(n,e),U2.crossVectors(O2,Rg);let o=this.direction.dot(U2),a;if(o>0){if(r)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Tl.subVectors(this.origin,e);const l=a*this.direction.dot(Rg.crossVectors(Tl,Rg));if(l<0)return null;const c=a*this.direction.dot(O2.cross(Tl));if(c<0||l+c>o)return null;const u=-a*Tl.dot(U2);return u<0?null:this.at(u/o,s)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class _t{constructor(e,t,n,r,s,o,a,l,c,u,d,p,m,x,v,_){_t.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,n,r,s,o,a,l,c,u,d,p,m,x,v,_)}set(e,t,n,r,s,o,a,l,c,u,d,p,m,x,v,_){const g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=s,g[5]=o,g[9]=a,g[13]=l,g[2]=c,g[6]=u,g[10]=d,g[14]=p,g[3]=m,g[7]=x,g[11]=v,g[15]=_,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 _t().fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[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,n){return this.determinant()===0?(e.set(1,0,0),t.set(0,1,0),n.set(0,0,1),this):(e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this)}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){if(e.determinant()===0)return this.identity();const t=this.elements,n=e.elements,r=1/Cd.setFromMatrixColumn(e,0).length(),s=1/Cd.setFromMatrixColumn(e,1).length(),o=1/Cd.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*s,t[5]=n[5]*s,t[6]=n[6]*s,t[7]=0,t[8]=n[8]*o,t[9]=n[9]*o,t[10]=n[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,n=e.x,r=e.y,s=e.z,o=Math.cos(n),a=Math.sin(n),l=Math.cos(r),c=Math.sin(r),u=Math.cos(s),d=Math.sin(s);if(e.order==="XYZ"){const p=o*u,m=o*d,x=a*u,v=a*d;t[0]=l*u,t[4]=-l*d,t[8]=c,t[1]=m+x*c,t[5]=p-v*c,t[9]=-a*l,t[2]=v-p*c,t[6]=x+m*c,t[10]=o*l}else if(e.order==="YXZ"){const p=l*u,m=l*d,x=c*u,v=c*d;t[0]=p+v*a,t[4]=x*a-m,t[8]=o*c,t[1]=o*d,t[5]=o*u,t[9]=-a,t[2]=m*a-x,t[6]=v+p*a,t[10]=o*l}else if(e.order==="ZXY"){const p=l*u,m=l*d,x=c*u,v=c*d;t[0]=p-v*a,t[4]=-o*d,t[8]=x+m*a,t[1]=m+x*a,t[5]=o*u,t[9]=v-p*a,t[2]=-o*c,t[6]=a,t[10]=o*l}else if(e.order==="ZYX"){const p=o*u,m=o*d,x=a*u,v=a*d;t[0]=l*u,t[4]=x*c-m,t[8]=p*c+v,t[1]=l*d,t[5]=v*c+p,t[9]=m*c-x,t[2]=-c,t[6]=a*l,t[10]=o*l}else if(e.order==="YZX"){const p=o*l,m=o*c,x=a*l,v=a*c;t[0]=l*u,t[4]=v-p*d,t[8]=x*d+m,t[1]=d,t[5]=o*u,t[9]=-a*u,t[2]=-c*u,t[6]=m*d+x,t[10]=p-v*d}else if(e.order==="XZY"){const p=o*l,m=o*c,x=a*l,v=a*c;t[0]=l*u,t[4]=-d,t[8]=c*u,t[1]=p*d+v,t[5]=o*u,t[9]=m*d-x,t[2]=x*d-m,t[6]=a*u,t[10]=v*d+p}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(_8,e,S8)}lookAt(e,t,n){const r=this.elements;return Ss.subVectors(e,t),Ss.lengthSq()===0&&(Ss.z=1),Ss.normalize(),El.crossVectors(n,Ss),El.lengthSq()===0&&(Math.abs(n.z)===1?Ss.x+=1e-4:Ss.z+=1e-4,Ss.normalize(),El.crossVectors(n,Ss)),El.normalize(),Pg.crossVectors(Ss,El),r[0]=El.x,r[4]=Pg.x,r[8]=Ss.x,r[1]=El.y,r[5]=Pg.y,r[9]=Ss.y,r[2]=El.z,r[6]=Pg.z,r[10]=Ss.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,s=this.elements,o=n[0],a=n[4],l=n[8],c=n[12],u=n[1],d=n[5],p=n[9],m=n[13],x=n[2],v=n[6],_=n[10],g=n[14],S=n[3],b=n[7],A=n[11],w=n[15],C=r[0],P=r[4],B=r[8],R=r[12],E=r[1],L=r[5],N=r[9],k=r[13],Y=r[2],z=r[6],W=r[10],V=r[14],G=r[3],Z=r[7],O=r[11],ee=r[15];return s[0]=o*C+a*E+l*Y+c*G,s[4]=o*P+a*L+l*z+c*Z,s[8]=o*B+a*N+l*W+c*O,s[12]=o*R+a*k+l*V+c*ee,s[1]=u*C+d*E+p*Y+m*G,s[5]=u*P+d*L+p*z+m*Z,s[9]=u*B+d*N+p*W+m*O,s[13]=u*R+d*k+p*V+m*ee,s[2]=x*C+v*E+_*Y+g*G,s[6]=x*P+v*L+_*z+g*Z,s[10]=x*B+v*N+_*W+g*O,s[14]=x*R+v*k+_*V+g*ee,s[3]=S*C+b*E+A*Y+w*G,s[7]=S*P+b*L+A*z+w*Z,s[11]=S*B+b*N+A*W+w*O,s[15]=S*R+b*k+A*V+w*ee,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],n=e[4],r=e[8],s=e[12],o=e[1],a=e[5],l=e[9],c=e[13],u=e[2],d=e[6],p=e[10],m=e[14],x=e[3],v=e[7],_=e[11],g=e[15],S=l*m-c*p,b=a*m-c*d,A=a*p-l*d,w=o*m-c*u,C=o*p-l*u,P=o*d-a*u;return t*(v*S-_*b+g*A)-n*(x*S-_*w+g*C)+r*(x*b-v*w+g*P)-s*(x*A-v*C+_*P)}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,n){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],d=e[9],p=e[10],m=e[11],x=e[12],v=e[13],_=e[14],g=e[15],S=d*_*c-v*p*c+v*l*m-a*_*m-d*l*g+a*p*g,b=x*p*c-u*_*c-x*l*m+o*_*m+u*l*g-o*p*g,A=u*v*c-x*d*c+x*a*m-o*v*m-u*a*g+o*d*g,w=x*d*l-u*v*l-x*a*p+o*v*p+u*a*_-o*d*_,C=t*S+n*b+r*A+s*w;if(C===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const P=1/C;return e[0]=S*P,e[1]=(v*p*s-d*_*s-v*r*m+n*_*m+d*r*g-n*p*g)*P,e[2]=(a*_*s-v*l*s+v*r*c-n*_*c-a*r*g+n*l*g)*P,e[3]=(d*l*s-a*p*s-d*r*c+n*p*c+a*r*m-n*l*m)*P,e[4]=b*P,e[5]=(u*_*s-x*p*s+x*r*m-t*_*m-u*r*g+t*p*g)*P,e[6]=(x*l*s-o*_*s-x*r*c+t*_*c+o*r*g-t*l*g)*P,e[7]=(o*p*s-u*l*s+u*r*c-t*p*c-o*r*m+t*l*m)*P,e[8]=A*P,e[9]=(x*d*s-u*v*s-x*n*m+t*v*m+u*n*g-t*d*g)*P,e[10]=(o*v*s-x*a*s+x*n*c-t*v*c-o*n*g+t*a*g)*P,e[11]=(u*a*s-o*d*s-u*n*c+t*d*c+o*n*m-t*a*m)*P,e[12]=w*P,e[13]=(u*v*r-x*d*r+x*n*p-t*v*p-u*n*_+t*d*_)*P,e[14]=(x*a*r-o*v*r-x*n*l+t*v*l+o*n*_-t*a*_)*P,e[15]=(o*d*r-u*a*r+u*n*l-t*d*l-o*n*p+t*a*p)*P,this}scale(e){const t=this.elements,n=e.x,r=e.y,s=e.z;return t[0]*=n,t[4]*=r,t[8]*=s,t[1]*=n,t[5]*=r,t[9]*=s,t[2]*=n,t[6]*=r,t[10]*=s,t[3]*=n,t[7]*=r,t[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),r=Math.sin(t),s=1-n,o=e.x,a=e.y,l=e.z,c=s*o,u=s*a;return this.set(c*o+n,c*a-r*l,c*l+r*a,0,c*a+r*l,u*a+n,u*l-r*o,0,c*l-r*a,u*l+r*o,s*l*l+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,s,o){return this.set(1,n,s,0,e,1,o,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){const r=this.elements,s=t._x,o=t._y,a=t._z,l=t._w,c=s+s,u=o+o,d=a+a,p=s*c,m=s*u,x=s*d,v=o*u,_=o*d,g=a*d,S=l*c,b=l*u,A=l*d,w=n.x,C=n.y,P=n.z;return r[0]=(1-(v+g))*w,r[1]=(m+A)*w,r[2]=(x-b)*w,r[3]=0,r[4]=(m-A)*C,r[5]=(1-(p+g))*C,r[6]=(_+S)*C,r[7]=0,r[8]=(x+b)*P,r[9]=(_-S)*P,r[10]=(1-(p+v))*P,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){const r=this.elements;if(e.x=r[12],e.y=r[13],e.z=r[14],this.determinant()===0)return n.set(1,1,1),t.identity(),this;let s=Cd.set(r[0],r[1],r[2]).length();const o=Cd.set(r[4],r[5],r[6]).length(),a=Cd.set(r[8],r[9],r[10]).length();this.determinant()<0&&(s=-s),Io.copy(this);const c=1/s,u=1/o,d=1/a;return Io.elements[0]*=c,Io.elements[1]*=c,Io.elements[2]*=c,Io.elements[4]*=u,Io.elements[5]*=u,Io.elements[6]*=u,Io.elements[8]*=d,Io.elements[9]*=d,Io.elements[10]*=d,t.setFromRotationMatrix(Io),n.x=s,n.y=o,n.z=a,this}makePerspective(e,t,n,r,s,o,a=Fs,l=!1){const c=this.elements,u=2*s/(t-e),d=2*s/(n-r),p=(t+e)/(t-e),m=(n+r)/(n-r);let x,v;if(l)x=s/(o-s),v=o*s/(o-s);else if(a===Fs)x=-(o+s)/(o-s),v=-2*o*s/(o-s);else if(a===Kf)x=-o/(o-s),v=-o*s/(o-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return c[0]=u,c[4]=0,c[8]=p,c[12]=0,c[1]=0,c[5]=d,c[9]=m,c[13]=0,c[2]=0,c[6]=0,c[10]=x,c[14]=v,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,t,n,r,s,o,a=Fs,l=!1){const c=this.elements,u=2/(t-e),d=2/(n-r),p=-(t+e)/(t-e),m=-(n+r)/(n-r);let x,v;if(l)x=1/(o-s),v=o/(o-s);else if(a===Fs)x=-2/(o-s),v=-(o+s)/(o-s);else if(a===Kf)x=-1/(o-s),v=-s/(o-s);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return c[0]=u,c[4]=0,c[8]=0,c[12]=p,c[1]=0,c[5]=d,c[9]=0,c[13]=m,c[2]=0,c[6]=0,c[10]=x,c[14]=v,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let r=0;r<16;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}const Cd=new H,Io=new _t,_8=new H(0,0,0),S8=new H(1,1,1),El=new H,Pg=new H,Ss=new H,E5=new _t,C5=new si;class Ys{constructor(e=0,t=0,n=0,r=Ys.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,r=this._order){return this._x=e,this._y=t,this._z=n,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const r=e.elements,s=r[0],o=r[4],a=r[8],l=r[1],c=r[5],u=r[9],d=r[2],p=r[6],m=r[10];switch(t){case"XYZ":this._y=Math.asin(It(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,m),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(p,c),this._z=0);break;case"YXZ":this._x=Math.asin(-It(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,m),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-d,s),this._z=0);break;case"ZXY":this._x=Math.asin(It(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(-d,m),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-It(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(p,m),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(It(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-d,s)):(this._x=0,this._y=Math.atan2(a,m));break;case"XZY":this._z=Math.asin(-It(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(p,c),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-u,m),this._y=0);break;default:at("Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,n===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return E5.makeRotationFromQuaternion(e),this.setFromRotationMatrix(E5,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return C5.setFromEuler(this),this.setFromQuaternion(C5,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}}Ys.DEFAULT_ORDER="XYZ";class cc{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 b8=0;const R5=new H,Rd=new si,Da=new _t,Ig=new H,Xh=new H,M8=new H,A8=new si,P5=new H(1,0,0),I5=new H(0,1,0),L5=new H(0,0,1),B5={type:"added"},w8={type:"removed"},Pd={type:"childadded",child:null},z2={type:"childremoved",child:null};class Wt extends Aa{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:b8++}),this.uuid=Hs(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Wt.DEFAULT_UP.clone();const e=new H,t=new Ys,n=new si,r=new H(1,1,1);function s(){n.setFromEuler(t,!1)}function o(){t.setFromQuaternion(n,void 0,!1)}t._onChange(s),n._onChange(o),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new _t},normalMatrix:{value:new Nt}}),this.matrix=new _t,this.matrixWorld=new _t,this.matrixAutoUpdate=Wt.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=Wt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new cc,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return Rd.setFromAxisAngle(e,t),this.quaternion.multiply(Rd),this}rotateOnWorldAxis(e,t){return Rd.setFromAxisAngle(e,t),this.quaternion.premultiply(Rd),this}rotateX(e){return this.rotateOnAxis(P5,e)}rotateY(e){return this.rotateOnAxis(I5,e)}rotateZ(e){return this.rotateOnAxis(L5,e)}translateOnAxis(e,t){return R5.copy(e).applyQuaternion(this.quaternion),this.position.add(R5.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(P5,e)}translateY(e){return this.translateOnAxis(I5,e)}translateZ(e){return this.translateOnAxis(L5,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(Da.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?Ig.copy(e):Ig.set(e,t,n);const r=this.parent;this.updateWorldMatrix(!0,!1),Xh.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Da.lookAt(Xh,Ig,this.up):Da.lookAt(Ig,Xh,this.up),this.quaternion.setFromRotationMatrix(Da),r&&(Da.extractRotation(r.matrixWorld),Rd.setFromRotationMatrix(Da),this.quaternion.premultiply(Rd.invert()))}add(e){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(bt("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(B5),Pd.child=e,this.dispatchEvent(Pd),Pd.child=null):bt("Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.remove(arguments[n]);return this}const t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(w8),z2.child=e,this.dispatchEvent(z2),z2.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),Da.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),Da.multiply(e.parent.matrixWorld)),e.applyMatrix4(Da),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(B5),Pd.child=e,this.dispatchEvent(Pd),Pd.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,r=this.children.length;n<r;n++){const o=this.children[n].getObjectByProperty(e,t);if(o!==void 0)return o}}getObjectsByProperty(e,t,n=[]){this[e]===t&&n.push(this);const r=this.children;for(let s=0,o=r.length;s<o;s++)r[s].getObjectsByProperty(e,t,n);return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Xh,e,M8),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Xh,A8,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 n=0,r=t.length;n<r;n++)t[n].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;t!==null&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].updateMatrixWorld(e)}updateWorldMatrix(e,t){const n=this.parent;if(e===!0&&n!==null&&n.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 r=this.children;for(let s=0,o=r.length;s<o;s++)r[s].updateWorldMatrix(!1,!0)}}toJSON(e){const t=e===void 0||typeof e=="string",n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const r={};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.castShadow===!0&&(r.castShadow=!0),this.receiveShadow===!0&&(r.receiveShadow=!0),this.visible===!1&&(r.visible=!1),this.frustumCulled===!1&&(r.frustumCulled=!1),this.renderOrder!==0&&(r.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type="BatchedMesh",r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.geometryInfo=this._geometryInfo.map(a=>({...a,boundingBox:a.boundingBox?a.boundingBox.toJSON():void 0,boundingSphere:a.boundingSphere?a.boundingSphere.toJSON():void 0})),r.instanceInfo=this._instanceInfo.map(a=>({...a})),r.availableInstanceIds=this._availableInstanceIds.slice(),r.availableGeometryIds=this._availableGeometryIds.slice(),r.nextIndexStart=this._nextIndexStart,r.nextVertexStart=this._nextVertexStart,r.geometryCount=this._geometryCount,r.maxInstanceCount=this._maxInstanceCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.matricesTexture=this._matricesTexture.toJSON(e),r.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(r.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(r.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(r.boundingBox=this.boundingBox.toJSON()));function s(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=s(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let c=0,u=l.length;c<u;c++){const d=l[c];s(e.shapes,d)}else s(e.shapes,l)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(e.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const a=[];for(let l=0,c=this.material.length;l<c;l++)a.push(s(e.materials,this.material[l]));r.material=a}else r.material=s(e.materials,this.material);if(this.children.length>0){r.children=[];for(let a=0;a<this.children.length;a++)r.children.push(this.children[a].toJSON(e).object)}if(this.animations.length>0){r.animations=[];for(let a=0;a<this.animations.length;a++){const l=this.animations[a];r.animations.push(s(e.animations,l))}}if(t){const a=o(e.geometries),l=o(e.materials),c=o(e.textures),u=o(e.images),d=o(e.shapes),p=o(e.skeletons),m=o(e.animations),x=o(e.nodes);a.length>0&&(n.geometries=a),l.length>0&&(n.materials=l),c.length>0&&(n.textures=c),u.length>0&&(n.images=u),d.length>0&&(n.shapes=d),p.length>0&&(n.skeletons=p),m.length>0&&(n.animations=m),x.length>0&&(n.nodes=x)}return n.object=r,n;function o(a){const l=[];for(const c in a){const u=a[c];delete u.metadata,l.push(u)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let n=0;n<e.children.length;n++){const r=e.children[n];this.add(r.clone())}return this}}Wt.DEFAULT_UP=new H(0,1,0);Wt.DEFAULT_MATRIX_AUTO_UPDATE=!0;Wt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const Lo=new H,Fa=new H,H2=new H,Na=new H,Id=new H,Ld=new H,D5=new H,G2=new H,j2=new H,W2=new H,V2=new on,X2=new on,Y2=new on;class ss{constructor(e=new H,t=new H,n=new H){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),Lo.subVectors(e,t),r.cross(Lo);const s=r.lengthSq();return s>0?r.multiplyScalar(1/Math.sqrt(s)):r.set(0,0,0)}static getBarycoord(e,t,n,r,s){Lo.subVectors(r,t),Fa.subVectors(n,t),H2.subVectors(e,t);const o=Lo.dot(Lo),a=Lo.dot(Fa),l=Lo.dot(H2),c=Fa.dot(Fa),u=Fa.dot(H2),d=o*c-a*a;if(d===0)return s.set(0,0,0),null;const p=1/d,m=(c*l-a*u)*p,x=(o*u-a*l)*p;return s.set(1-m-x,x,m)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,Na)===null?!1:Na.x>=0&&Na.y>=0&&Na.x+Na.y<=1}static getInterpolation(e,t,n,r,s,o,a,l){return this.getBarycoord(e,t,n,r,Na)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(s,Na.x),l.addScaledVector(o,Na.y),l.addScaledVector(a,Na.z),l)}static getInterpolatedAttribute(e,t,n,r,s,o){return V2.setScalar(0),X2.setScalar(0),Y2.setScalar(0),V2.fromBufferAttribute(e,t),X2.fromBufferAttribute(e,n),Y2.fromBufferAttribute(e,r),o.setScalar(0),o.addScaledVector(V2,s.x),o.addScaledVector(X2,s.y),o.addScaledVector(Y2,s.z),o}static isFrontFacing(e,t,n,r){return Lo.subVectors(n,t),Fa.subVectors(e,t),Lo.cross(Fa).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Lo.subVectors(this.c,this.b),Fa.subVectors(this.a,this.b),Lo.cross(Fa).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return ss.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return ss.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,r,s){return ss.getInterpolation(e,this.a,this.b,this.c,t,n,r,s)}containsPoint(e){return ss.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return ss.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,r=this.b,s=this.c;let o,a;Id.subVectors(r,n),Ld.subVectors(s,n),G2.subVectors(e,n);const l=Id.dot(G2),c=Ld.dot(G2);if(l<=0&&c<=0)return t.copy(n);j2.subVectors(e,r);const u=Id.dot(j2),d=Ld.dot(j2);if(u>=0&&d<=u)return t.copy(r);const p=l*d-u*c;if(p<=0&&l>=0&&u<=0)return o=l/(l-u),t.copy(n).addScaledVector(Id,o);W2.subVectors(e,s);const m=Id.dot(W2),x=Ld.dot(W2);if(x>=0&&m<=x)return t.copy(s);const v=m*c-l*x;if(v<=0&&c>=0&&x<=0)return a=c/(c-x),t.copy(n).addScaledVector(Ld,a);const _=u*x-m*d;if(_<=0&&d-u>=0&&m-x>=0)return D5.subVectors(s,r),a=(d-u)/(d-u+(m-x)),t.copy(r).addScaledVector(D5,a);const g=1/(_+v+p);return o=v*g,a=p*g,t.copy(n).addScaledVector(Id,o).addScaledVector(Ld,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const mD={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},Cl={h:0,s:0,l:0},Lg={h:0,s:0,l:0};function J2(i,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?i+(e-i)*6*t:t<1/2?e:t<2/3?i+(e-i)*6*(2/3-t):i}class Ve{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){const r=e;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Un){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Yt.colorSpaceToWorking(this,t),this}setRGB(e,t,n,r=Yt.workingColorSpace){return this.r=e,this.g=t,this.b=n,Yt.colorSpaceToWorking(this,r),this}setHSL(e,t,n,r=Yt.workingColorSpace){if(e=dw(e,1),t=It(t,0,1),n=It(n,0,1),t===0)this.r=this.g=this.b=n;else{const s=n<=.5?n*(1+t):n+t-n*t,o=2*n-s;this.r=J2(o,s,e+1/3),this.g=J2(o,s,e),this.b=J2(o,s,e-1/3)}return Yt.colorSpaceToWorking(this,r),this}setStyle(e,t=Un){function n(s){s!==void 0&&parseFloat(s)<1&&at("C
77olor: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const o=r[1],a=r[2];switch(o){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,t);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,t);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,t);break;default:at("Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=r[1],o=s.length;if(o===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,t);if(o===6)return this.setHex(parseInt(s,16),t);at("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Un){const n=mD[e.toLowerCase()];return n!==void 0?this.setHex(n,t):at("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=$a(e.r),this.g=$a(e.g),this.b=$a(e.b),this}copyLinearToSRGB(e){return this.r=Pf(e.r),this.g=Pf(e.g),this.b=Pf(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Un){return Yt.workingToColorSpace(gr.copy(this),e),Math.round(It(gr.r*255,0,255))*65536+Math.round(It(gr.g*255,0,255))*256+Math.round(It(gr.b*255,0,255))}getHexString(e=Un){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Yt.workingColorSpace){Yt.workingToColorSpace(gr.copy(this),t);const n=gr.r,r=gr.g,s=gr.b,o=Math.max(n,r,s),a=Math.min(n,r,s);let l,c;const u=(a+o)/2;if(a===o)l=0,c=0;else{const d=o-a;switch(c=u<=.5?d/(o+a):d/(2-o-a),o){case n:l=(r-s)/d+(r<s?6:0);break;case r:l=(s-n)/d+2;break;case s:l=(n-r)/d+4;break}l/=6}return e.h=l,e.s=c,e.l=u,e}getRGB(e,t=Yt.workingColorSpace){return Yt.workingToColorSpace(gr.copy(this),t),e.r=gr.r,e.g=gr.g,e.b=gr.b,e}getStyle(e=Un){Yt.workingToColorSpace(gr.copy(this),e);const t=gr.r,n=gr.g,r=gr.b;return e!==Un?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(n*255)},${Math.round(r*255)})`}offsetHSL(e,t,n){return this.getHSL(Cl),this.setHSL(Cl.h+e,Cl.s+t,Cl.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(Cl),e.getHSL(Lg);const n=Kp(Cl.h,Lg.h,t),r=Kp(Cl.s,Lg.s,t),s=Kp(Cl.l,Lg.l,t);return this.setHSL(n,r,s),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,n=this.g,r=this.b,s=e.elements;return this.r=s[0]*t+s[3]*n+s[6]*r,this.g=s[1]*t+s[4]*n+s[7]*r,this.b=s[2]*t+s[5]*n+s[8]*r,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const gr=new Ve;Ve.NAMES=mD;let T8=0;class Wn extends Aa{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:T8++}),this.uuid=Hs(),this.name="",this.type="Material",this.blending=lc,this.side=So,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Nv,this.blendDst=kv,this.blendEquation=Ul,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new Ve(0,0,0),this.blendAlpha=0,this.depthFunc=Wu,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=hM,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=cu,this.stencilZFail=cu,this.stencilZPass=cu,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 n=e[t];if(n===void 0){at(`Material: parameter '${t}' has value of undefined.`);continue}const r=this[t];if(r===void 0){at(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const n={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};
vendor: 9,098 bytes, line 77
77n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(n.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(n.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==lc&&(n.blending=this.blending),this.side!==So&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==Nv&&(n.blendSrc=this.blendSrc),this.blendDst!==kv&&(n.blendDst=this.blendDst),this.blendEquation!==Ul&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==Wu&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==hM&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==cu&&(n.stencilFail=this.stencilFail),this.stencilZFail!==cu&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==cu&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.allowOverride===!1&&(n.allowOverride=!1),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function r(s){const o=[];for(const a in s){const l=s[a];delete l.metadata,o.push(l)}return o}if(t){const s=r(e.textures),o=r(e.images);s.length>0&&(n.textures=s),o.length>0&&(n.images=o)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(t!==null){const r=t.length;n=new Array(r);for(let s=0;s!==r;++s)n[s]=t[s].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipSh
vendor: 6,158 bytes, line 77
77adows,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 pi extends Wn{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Ve(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 Ys,this.combine=Wm,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 Xa=E8();function E8(){const i=new ArrayBuffer(4),e=new Float32Array(i),t=new Uint32Array(i),n=new Uint32Array(512),r=new Uint32Array(512);for(let l=0;l<256;++l){const c=l-127;c<-27?(n[l]=0,n[l|256]=32768,r[l]=24,r[l|256]=24):c<-14?(n[l]=1024>>-c-14,n[l|256]=1024>>-c-14|32768,r[l]=-c-1,r[l|256]=-c-1):c<=15?(n[l]=c+15<<10,n[l|256]=c+15<<10|32768,r[l]=13,r[l|256]=13):c<128?(n[l]=31744,n[l|256]=64512,r[l]=24,r[l|256]=24):(n[l]=31744,n[l|256]=64512,r[l]=13,r[l|256]=13)}const s=new Uint32Array(2048),o=new Uint32Array(64),a=new Uint32Array(64);for(let l=1;l<1024;++l){let c=l<<13,u=0;for(;!(c&8388608);)c<<=1,u-=8388608;c&=-8388609,u+=947912704,s[l]=c|u}for(let l=1024;l<2048;++l)s[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)o[l]=l<<23;o[31]=1199570944,o[32]=2147483648;for(let l=33;l<63;++l)o[l]=2147483648+(l-32<<23);o[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(a[l]=1024);return{floatView:e,uint32View:t,baseTable:n,shiftTable:r,mantissaTable:s,exponentTable:o,offsetTable:a}}function ns(i){Math.abs(i)>65504&&at("DataUtils.toHalfFloat(): Value out of range."),i=It(i,-65504,65504),Xa.floatView[0]=i;const e=Xa.uint32View[0],t=e>>23&511;return Xa.baseTable[t]+((e&8388607)>>Xa.shiftTable[t])}function yp(i){const e=i>>10;return Xa.uint32View[0]=Xa.mantissaTable[Xa.offsetTable[e]+(i&1023)]+Xa.exponentTable[e],Xa.floatView[0]}class C8{static toHalfFloat(e){return ns(e)}static fromHalfFloat(e){return yp(e)}}const _i=new H,Bg=new xe;let R8=0;class zt{constructor(e,t,n=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:R8++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=Cm,this.updateRanges=[],this.gpuType=Vr,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,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,s=this.itemSize;r<s;r++)this.array[e+r]=t.array[n+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,n=this.count;t<n;t++)Bg.fromBufferAttribute(this,t),Bg.applyMatrix3(e),this.setXY(t,Bg.x,Bg.y);else if(this.itemSize===3)for(let t=0,n=this.count;t<n;t++)_i.fromBufferAttribute(this,t),_i.applyMatrix3(e),this.setXYZ(t,_i.x,_i.y,_i.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)_i.fromBufferAttribute(this,t),_i.applyMatrix4(e),this.setXYZ(t,_i.x,_i.y,_i.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)_i.fromBufferAttribute(this,t),_i.applyNormalMatrix(e),this.setXYZ(t,_i.x,_i.y,_i.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)_i.fromBufferAttribute(this,t),_i.transformDirection(e),this.setXYZ(t,_i.x,_i.y,_i.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=Wr(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=kt(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=Wr(t,this.array)),t}setX(e,t){return this.normalized&&(t=kt(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=Wr(t,this.array)),t}setY(e,t){return this.normalized&&(t=kt(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=Wr(t,this.array)),t}setZ(e,t){return this.normalized&&(t=kt(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=Wr(t,this.array)),t}setW(e,t){return this.normalized&&(t=kt(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=kt(t,this.array),n=kt(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,r){return e*=this.itemSize,this.normalized&&(t=kt(t,this.array),n=kt(n,this.array),r=kt(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this}
vendor: 6,748 bytes, line 77
77setXYZW(e,t,n,r,s){return e*=this.itemSize,this.normalized&&(t=kt(t,this.array),n=kt(n,this.array),r=kt(r,this.array),s=kt(s,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=s,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!==Cm&&(e.usage=this.usage),e}}class P8 extends zt{constructor(e,t,n){super(new Int8Array(e),t,n)}}class I8 extends zt{constructor(e,t,n){super(new Uint8Array(e),t,n)}}class L8 extends zt{constructor(e,t,n){super(new Uint8ClampedArray(e),t,n)}}class B8 extends zt{constructor(e,t,n){super(new Int16Array(e),t,n)}}class hw extends zt{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class D8 extends zt{constructor(e,t,n){super(new Int32Array(e),t,n)}}class pw extends zt{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class F8 extends zt{constructor(e,t,n){super(new Uint16Array(e),t,n),this.isFloat16BufferAttribute=!0}getX(e){let t=yp(this.array[e*this.itemSize]);return this.normalized&&(t=Wr(t,this.array)),t}setX(e,t){return this.normalized&&(t=kt(t,this.array)),this.array[e*this.itemSize]=ns(t),this}getY(e){let t=yp(this.array[e*this.itemSize+1]);return this.normalized&&(t=Wr(t,this.array)),t}setY(e,t){return this.normalized&&(t=kt(t,this.array)),this.array[e*this.itemSize+1]=ns(t),this}getZ(e){let t=yp(this.array[e*this.itemSize+2]);return this.normalized&&(t=Wr(t,this.array)),t}setZ(e,t){return this.normalized&&(t=kt(t,this.array)),this.array[e*this.itemSize+2]=ns(t),this}getW(e){let t=yp(this.array[e*this.itemSize+3]);return this.normalized&&(t=Wr(t,this.array)),t}setW(e,t){return this.normalized&&(t=kt(t,this.array)),this.array[e*this.itemSize+3]=ns(t),this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=kt(t,this.array),n=kt(n,this.array)),this.array[e+0]=ns(t),this.array[e+1]=ns(n),this}setXYZ(e,t,n,r){return e*=this.itemSize,this.normalized&&(t=kt(t,this.array),n=kt(n,this.array),r=kt(r,this.array)),this.array[e+0]=ns(t),this.array[e+1]=ns(n),this.array[e+2]=ns(r),this}setXYZW(e,t,n,r,s){return e*=this.itemSize,this.normalized&&(t=kt(t,this.array),n=kt(n,this.array),r=kt(r,this.array),s=kt(s,this.array)),this.array[e+0]=ns(t),this.array[e+1]=ns(n),this.array[e+2]=ns(r),this.array[e+3]=ns(s),this}}class ct extends zt{constructor(e,t,n){super(new Float32Array(e),t,n)}}let N8=0;const ro=new _t,K2=new Wt,Bd=new H,bs=new jn,Yh=new jn,ji=new H;class Rt extends Aa{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:N8++}),this.uuid=Hs(),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(dD(e)?pw:hw)(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,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(n!==void 0){const s=new Nt().getNormalMatrix(e);n.applyNormalMatrix(s),n.needsUpdate=!0}const r=this.attributes.tangent;return r!==void 0&&(r.transformDirection(e),r.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return ro.makeRotationFromQuaternion(e),this.applyMatrix4(ro),this}rotateX(e){return ro.makeRotationX(e),this.applyMatrix4(ro),this}rotateY(e){return ro.makeRotationY(e),this.applyMatrix4(ro),this}rotateZ(e){return ro.makeRotationZ(e),this.applyMatrix4(ro),this}translate(e,t,n){return ro.makeTranslation(e,t,n),this.applyMatrix4(ro),this}scale(e,t,n){return ro.makeScale(e,t,n),this.applyMatrix4(ro),this}lookAt(e){return K2.lookAt(e),K2.updateMatrix(),this.applyMatrix4(K2.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Bd).negate(),this.translate(Bd.x,Bd.y,Bd.z),this}setFromPoints(e){const t=this.getAttribute("position");if(t===void 0){const n=[];for(let r=0,s=e.length;r<s;r++){const o=e[r];n.push(o.x,o.y,o.z||0)}this.setAttribute("position",new ct(n,3))}else{const n=Math.min(e.length,t.count);for(let r=0;r<n;r++){const s=e[r];t.setXYZ(r,s.x,s.y,s.z||0)}e.length>t.count&&at("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 jn);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){bt("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new H(-1/0,-1/0,-1/0),new H(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,r=t.length;n<r;n++){const s=t[n];bs.setFromBufferAttribute(s),this.morphTargetsRelative?(ji.addVectors(this.boundingBox.min,bs.min),this.boundingBox.expandByPoint(ji),ji.addVectors(this.boundingBox.max,bs.max),this.boundingBox.expandByPoint(ji)):(this.boundingBox.expandByPoint(bs.min),this.boundingBox.expandByPoint(bs.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&bt('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 mi);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){bt("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new H,1/0);return}if(e){const n=this.boundingSphere.center;if(bs.setFromBufferAttribute(e),t)for(let s=0,o=t.length;s<o;s++){const a=t[s];Yh.setFromBufferAttribute(a),this.morphTargetsRelative?(ji.addVectors(bs.min,Yh.min),bs.expandByPoint(ji),ji.addVectors(bs.max,Yh.max),bs.expandByPoint(ji)):(bs.expandByPoint(Yh.min),bs.expandByPoint(Yh.max)
vendor: 8,592 bytes, line 77
77)}bs.getCenter(n);let r=0;for(let s=0,o=e.count;s<o;s++)ji.fromBufferAttribute(e,s),r=Math.max(r,n.distanceToSquared(ji));if(t)for(let s=0,o=t.length;s<o;s++){const a=t[s],l=this.morphTargetsRelative;for(let c=0,u=a.count;c<u;c++)ji.fromBufferAttribute(a,c),l&&(Bd.fromBufferAttribute(e,c),ji.add(Bd)),r=Math.max(r,n.distanceToSquared(ji))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&bt('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){bt("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const n=t.position,r=t.normal,s=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new zt(new Float32Array(4*n.count),4));const o=this.getAttribute("tangent"),a=[],l=[];for(let B=0;B<n.count;B++)a[B]=new H,l[B]=new H;const c=new H,u=new H,d=new H,p=new xe,m=new xe,x=new xe,v=new H,_=new H;function g(B,R,E){c.fromBufferAttribute(n,B),u.fromBufferAttribute(n,R),d.fromBufferAttribute(n,E),p.fromBufferAttribute(s,B),m.fromBufferAttribute(s,R),x.fromBufferAttribute(s,E),u.sub(c),d.sub(c),m.sub(p),x.sub(p);const L=1/(m.x*x.y-x.x*m.y);isFinite(L)&&(v.copy(u).multiplyScalar(x.y).addScaledVector(d,-m.y).multiplyScalar(L),_.copy(d).multiplyScalar(m.x).addScaledVector(u,-x.x).multiplyScalar(L),a[B].add(v),a[R].add(v),a[E].add(v),l[B].add(_),l[R].add(_),l[E].add(_))}let S=this.groups;S.length===0&&(S=[{start:0,count:e.count}]);for(let B=0,R=S.length;B<R;++B){const E=S[B],L=E.start,N=E.count;for(let k=L,Y=L+N;k<Y;k+=3)g(e.getX(k+0),e.getX(k+1),e.getX(k+2))}const b=new H,A=new H,w=new H,C=new H;function P(B){w.fromBufferAttribute(r,B),C.copy(w);const R=a[B];b.copy(R),b.sub(w.multiplyScalar(w.dot(R))).normalize(),A.crossVectors(C,R);const L=A.dot(l[B])<0?-1:1;o.setXYZW(B,b.x,b.y,b.z,L)}for(let B=0,R=S.length;B<R;++B){const E=S[B],L=E.start,N=E.count;for(let k=L,Y=L+N;k<Y;k+=3)P(e.getX(k+0)),P(e.getX(k+1)),P(e.getX(k+2))}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(t!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new zt(new Float32Array(t.count*3),3),this.setAttribute("normal",n);else for(let p=0,m=n.count;p<m;p++)n.setXYZ(p,0,0,0);const r=new H,s=new H,o=new H,a=new H,l=new H,c=new H,u=new H,d=new H;if(e)for(let p=0,m=e.count;p<m;p+=3){const x=e.getX(p+0),v=e.getX(p+1),_=e.getX(p+2);r.fromBufferAttribute(t,x),s.fromBufferAttribute(t,v),o.fromBufferAttribute(t,_),u.subVectors(o,s),d.subVectors(r,s),u.cross(d),a.fromBufferAttribute(n,x),l.fromBufferAttribute(n,v),c.fromBufferAttribute(n,_),a.add(u),l.add(u),c.add(u),n.setXYZ(x,a.x,a.y,a.z),n.setXYZ(v,l.x,l.y,l.z),n.setXYZ(_,c.x,c.y,c.z)}else for(let p=0,m=t.count;p<m;p+=3)r.fromBufferAttribute(t,p+0),s.fromBufferAttribute(t,p+1),o.fromBufferAttribute(t,p+2),u.subVectors(o,s),d.subVectors(r,s),u.cross(d),n.setXYZ(p+0,u.x,u.y,u.z),n.setXYZ(p+1,u.x,u.y,u.z),n.setXYZ(p+2,u.x,u.y,u.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)ji.fromBufferAttribute(e,t),ji.normalize(),e.setXYZ(t,ji.x,ji.y,ji.z)}toNonIndexed(){function e(a,l){const c=a.array,u=a.itemSize,d=a.normalized,p=new c.constructor(l.length*u);let m=0,x=0;for(let v=0,_=l.length;v<_;v++){a.isInterleavedBufferAttribute?m=l[v]*a.data.stride+a.offset:m=l[v]*u;for(let g=0;g<u;g++)p[x++]=c[m++]}return new zt(p,u,d)}if(this.index===null)return at("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new Rt,n=this.index.array,r=this.attributes;for(const a in r){const l=r[a],c=e(l,n);t.setAttribute(a,c)}const s=this.morphAttributes;for(const a in s){const l=[],c=s[a];for(let u=0,d=c.length;u<d;u++){const p=c[u],m=e(p,n);l.push(m)}t.morphAttributes[a]=l}t.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let a=0,l=o.length;a<l;a++){const c=o[a];t.addGroup(c.start,c.count,c.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 l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);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 n=this.attributes;for(const l in n){const c=n[l];e.data.attributes[l]=c.toJSON(e.data)}const r={};let s=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let d=0,p=c.length;d<p;d++){const m=c[d];u.push(m.toJSON(e.data))}u.length>0&&(r[l]=u,s=!0)}s&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere=a.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 n=e.index;n!==null&&this.setIndex(n.clone());const r=e.attributes;for(const c in r){const u=r[c];this.setAttribute(c,u.clone(t))}const s=e.morphAttributes;for(const c in s){const u=[],d=s[c];for(let p=0,m=d.length;p<m;p++)u.push(d[p].clone(t));this.morphAttributes[c]=u}this.morphTargetsRelative=e.morphTargetsRelative;const o=e.groups;for(let c=0,u=o.length;c<u;c++){const d=o[c];this.addGroup(d.start,d.count,d.materialIndex)}const a=e.boundingBox;a!==null&&(this.boundingBox=a.clone());const l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const F5=new _t,Wc=new Tc,Dg=new mi,N5=new H,Fg=new H,Ng=new H,kg=new H,q2=new H,Og=new H,k5=new H,Ug=new H;class Kt extends Wt{constructor(e=new Rt,t=new pi){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,n=Object.keys(t);if(n.length>0){const r=t[n[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s<o;s++){const a=r[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=s}}}}getVertexPosition(e,t){const n=this.geometry,r=n.attributes.position,s=n.morphAttributes.position,o=n.morphTargetsRelative;t.fromBufferAttribute(r,e);const a=this.morphTargetInfluences;if(s&&a){Og.set(0,0,0);for(let l=0,c=s.length;l<c;l++){const u=a[l],d=s[l];u!==0&&(q2.fromBufferAttribute(d,e),o?Og.addScaledVector(q2,u):Og.addScaledVector(q2.sub(t),u))}t.add(Og)}return t}raycast(e,t){const n=this.geometry,r=this.material,s=this.matrixWorld;r!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),Dg.copy(n.boundingSphere),Dg.applyMatrix4(s),Wc.copy(e.ray).recast(e.near),!(Dg.containsPoint(Wc.origin)===!1&&(Wc.intersectSphere(Dg,N5)===null||Wc.origin.distanceToSquared(N5)>(e.far-e.near)**2))&&(F5.copy(s).invert(),Wc.copy(e.ray).applyMatrix4(F5),!(n.boundingBox!==null&&Wc.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Wc)))}_computeIntersections(e,t,n){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,c=s.attributes.uv,u=s.attributes.uv1,d=s.attributes.normal,p=s.groups,m=s.drawRange;if(a!==null)if(Array.isArray(o))for(let x=0,v=p.length;x<v;x++){const _=p[x],g=o[_.materialIndex],S=Math.max(_.start,m.start),b=Math.min(a.count,Math.min(_.start+_.count,m.start+m.count));for(let A=S,w=b;A<w;A+=3){const C=a.getX(A),P=a.getX(A+1),B=a.getX(A+2);r=zg(this,g,e,n,c,u,d,C,P,B),r&&(r.faceIndex=Math.floor(A/3),r.face.materialIndex=_.materialIndex,t.push(r))}}else{const x=Math.max(0,m.start),v=Math.min(a.count,m.start+m.count);for(let _=x,g=v;_<g;_+=3){const S=a.getX(_),b=a.getX(_+1),A=a.getX(_+2);
vendor: 7,292 bytes, lines 77-81
77r=zg(this,o,e,n,c,u,d,S,b,A),r&&(r.faceIndex=Math.floor(_/3),t.push(r))}}else if(l!==void 0)if(Array.isArray(o))for(let x=0,v=p.length;x<v;x++){const _=p[x],g=o[_.materialIndex],S=Math.max(_.start,m.start),b=Math.min(l.count,Math.min(_.start+_.count,m.start+m.count));for(let A=S,w=b;A<w;A+=3){const C=A,P=A+1,B=A+2;r=zg(this,g,e,n,c,u,d,C,P,B),r&&(r.faceIndex=Math.floor(A/3),r.face.materialIndex=_.materialIndex,t.push(r))}}else{const x=Math.max(0,m.start),v=Math.min(l.count,m.start+m.count);for(let _=x,g=v;_<g;_+=3){const S=_,b=_+1,A=_+2;r=zg(this,o,e,n,c,u,d,S,b,A),r&&(r.faceIndex=Math.floor(_/3),t.push(r))}}}}function k8(i,e,t,n,r,s,o,a){let l;if(e.side===Jr?l=n.intersectTriangle(o,s,r,!0,a):l=n.intersectTriangle(r,s,o,e.side===So,a),l===null)return null;Ug.copy(a),Ug.applyMatrix4(i.matrixWorld);const c=t.ray.origin.distanceTo(Ug);return c<t.near||c>t.far?null:{distance:c,point:Ug.clone(),object:i}}function zg(i,e,t,n,r,s,o,a,l,c){i.getVertexPosition(a,Fg),i.getVertexPosition(l,Ng),i.getVertexPosition(c,kg);const u=k8(i,e,t,n,Fg,Ng,kg,k5);if(u){const d=new H;ss.getBarycoord(k5,Fg,Ng,kg,d),r&&(u.uv=ss.getInterpolatedAttribute(r,a,l,c,d,new xe)),s&&(u.uv1=ss.getInterpolatedAttribute(s,a,l,c,d,new xe)),o&&(u.normal=ss.getInterpolatedAttribute(o,a,l,c,d,new H),u.normal.dot(n.direction)>0&&u.normal.multiplyScalar(-1));const p={a,b:l,c,normal:new H,materialIndex:0};ss.getNormal(Fg,Ng,kg,p.normal),u.face=p,u.barycoord=d}return u}class td extends Rt{constructor(e=1,t=1,n=1,r=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:s,depthSegments:o};const a=this;r=Math.floor(r),s=Math.floor(s),o=Math.floor(o);const l=[],c=[],u=[],d=[];let p=0,m=0;x("z","y","x",-1,-1,n,t,e,o,s,0),x("z","y","x",1,-1,n,t,-e,o,s,1),x("x","z","y",1,1,e,n,t,r,o,2),x("x","z","y",1,-1,e,n,-t,r,o,3),x("x","y","z",1,-1,e,t,n,r,s,4),x("x","y","z",-1,-1,e,t,-n,r,s,5),this.setIndex(l),this.setAttribute("position",new ct(c,3)),this.setAttribute("normal",new ct(u,3)),this.setAttribute("uv",new ct(d,2));function x(v,_,g,S,b,A,w,C,P,B,R){const E=A/P,L=w/B,N=A/2,k=w/2,Y=C/2,z=P+1,W=B+1;let V=0,G=0;const Z=new H;for(let O=0;O<W;O++){const ee=O*L-k;for(let le=0;le<z;le++){const ge=le*E-N;Z[v]=ge*S,Z[_]=ee*b,Z[g]=Y,c.push(Z.x,Z.y,Z.z),Z[v]=0,Z[_]=0,Z[g]=C>0?1:-1,u.push(Z.x,Z.y,Z.z),d.push(le/P),d.push(1-O/B),V+=1}}for(let O=0;O<B;O++)for(let ee=0;ee<P;ee++){const le=p+ee+z*O,ge=p+ee+z*(O+1),Se=p+(ee+1)+z*(O+1),Ye=p+(ee+1)+z*O;l.push(le,ge,Ye),l.push(ge,Se,Ye),G+=6}a.addGroup(m,G,R),m+=G,p+=V}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new td(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function Qf(i){const e={};for(const t in i){e[t]={};for(const n in i[t]){const r=i[t][n];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?r.isRenderTargetTexture?(at("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][n]=null):e[t][n]=r.clone():Array.isArray(r)?e[t][n]=r.slice():e[t][n]=r}}return e}function Nr(i){const e={};for(let t=0;t<i.length;t++){const n=Qf(i[t]);for(const r in n)e[r]=n[r]}return e}function O8(i){const e=[];for(let t=0;t<i.length;t++)e.push(i[t].clone());return e}function gD(i){const e=i.getRenderTarget();return e===null?i.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:Yt.workingColorSpace}const Gs={clone:Qf,merge:Nr};var U8=`void main() { 78 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 79}`,z8=`void main() { 80 gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 ); 81}`;class dn extends Wn{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=U8,this.fragmentShader=z8,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=Qf(e.uniforms),this.uniformsGroups=O8(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 r in this.uniforms){const o=this.uniforms[r].value;o&&o.isTexture?t.uniforms[r]={type:"t",value:o.toJSON(e).uuid}:o&&o.isColor?t.uniforms[r]={type:"c",value:o.getHex()}:o&&o.isVector2?t.uniforms[r]={type:"v2",value:o.toArray()}:o&&o.isVector3?t.uniforms[r]={type:"v3",value:o.toArray()}:o&&o.isVector4?t.uniforms[r]={type:"v4",value:o.toArray()}:o&&o.isMatrix3?t.uniforms[r]={type:"m3",value:o.toArray()}:o&&o.isMatrix4?t.uniforms[r]={type:"m4",value:o.toArray()}:t.uniforms[r]={value:o}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const n={};for(const r in this.extensions)this.extensions[r]===!0&&(n[r]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}class Km extends Wt{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new _t,this.projectionMatrix=new _t,this.projectionMatrixInverse=new _t,this.coordinateSystem=Fs,this._reversedDepth=!1}get reversedDepth(){return this._reversedDepth}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const Rl=new H,O5=new xe,U5=new xe;class wn extends Km{constructor(e=50,t=1,n=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=Zf*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Bu*.5*this.fov);return .5*this.getFilmHeight()/e}
vendor: 4,175 bytes, line 81
81getEffectiveFOV(){return Zf*2*Math.atan(Math.tan(Bu*.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,n){Rl.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(Rl.x,Rl.y).multiplyScalar(-e/Rl.z),Rl.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Rl.x,Rl.y).multiplyScalar(-e/Rl.z)}getViewSize(e,t){return this.getViewBounds(e,O5,U5),t.subVectors(U5,O5)}setViewOffset(e,t,n,r,s,o){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(Bu*.5*this.fov)/this.zoom,n=2*t,r=this.aspect*n,s=-.5*r;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,c=o.fullHeight;s+=o.offsetX*r/l,t-=o.offsetY*n/c,r*=o.width/l,n*=o.height/c}const a=this.filmOffset;a!==0&&(s+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+r,t,t-n,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}}const Dd=-90,Fd=1;class xD extends Wt{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new wn(Dd,Fd,e,t);r.layers=this.layers,this.add(r);const s=new wn(Dd,Fd,e,t);s.layers=this.layers,this.add(s);const o=new wn(Dd,Fd,e,t);o.layers=this.layers,this.add(o);const a=new wn(Dd,Fd,e,t);a.layers=this.layers,this.add(a);const l=new wn(Dd,Fd,e,t);l.layers=this.layers,this.add(l);const c=new wn(Dd,Fd,e,t);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[n,r,s,o,a,l]=t;for(const c of t)this.remove(c);if(e===Fs)n.up.set(0,1,0),n.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),s.up.set(0,0,-1),s.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===Kf)n.up.set(0,-1,0),n.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),s.up.set(0,0,1),s.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const c of t)this.add(c),c.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();const{renderTarget:n,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[s,o,a,l,c,u]=this.children,d=e.getRenderTarget(),p=e.getActiveCubeFace(),m=e.getActiveMipmapLevel(),x=e.xr.enabled;e.xr.enabled=!1;const v=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0,r),e.render(t,s),e.setRenderTarget(n,1,r),e.render(t,o),e.setRenderTarget(n,2,r),e.render(t,a),e.setRenderTarget(n,3,r),e.render(t,l),e.setRenderTarget(n,4,r),e.render(t,c),n.texture.generateMipmaps=v,e.setRenderTarget(n,5,r),e.render(t,u),e.setRenderTarget(d,p,m),e.xr.enabled=x,n.texture.needsPMREMUpdate=!0}}class qm extends Sn{constructor(e=[],t=Sa,n,r,s,o,a,l,c,u){super(e,t,n,r,s,o,a,l,c,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class mw extends Gn{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const n={width:e,height:e,depth:1},r=[n,n,n,n,n,n];this.texture=new qm(r),this._setTextureOptions(t),this.texture.isRenderTargetTexture=!0}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace
vendor: 18,144 bytes, lines 81-116
81=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:` 82 83 varying vec3 vWorldDirection; 84 85 vec3 transformDirection( in vec3 dir, in mat4 matrix ) { 86 87 return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); 88 89 } 90 91 void main() { 92 93 vWorldDirection = transformDirection( position, modelMatrix ); 94 95 #include <begin_vertex> 96 #include <project_vertex> 97 98 } 99 `,fragmentShader:` 100 101 uniform sampler2D tEquirect; 102 103 varying vec3 vWorldDirection; 104 105 #include <common> 106 107 void main() { 108 109 vec3 direction = normalize( vWorldDirection ); 110 111 vec2 sampleUV = equirectUv( direction ); 112 113 gl_FragColor = texture2D( tEquirect, sampleUV ); 114 115 } 116 `},r=new td(5,5,5),s=new dn({name:"CubemapFromEquirect",uniforms:Qf(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:Jr,blending:jo});s.uniforms.tEquirect.value=t;const o=new Kt(r,s),a=t.minFilter;return t.minFilter===as&&(t.minFilter=jt),new xD(1,10,this).update(e,o),t.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,t=!0,n=!0,r=!0){const s=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,n,r);e.setRenderTarget(s)}}class Ns extends Wt{constructor(){super(),this.isGroup=!0,this.type="Group"}}const H8={type:"move"};class Zx{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Ns,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 Ns,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new H,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new H),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Ns,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new H,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new H),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 n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),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,n){let r=null,s=null,o=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(c&&e.hand){o=!0;for(const v of e.hand.values()){const _=t.getJointPose(v,n),g=this._getHandJoint(c,v);_!==null&&(g.matrix.fromArray(_.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),g.matrixWorldNeedsUpdate=!0,g.jointRadius=_.radius),g.visible=_!==null}const u=c.joints["index-finger-tip"],d=c.joints["thumb-tip"],p=u.position.distanceTo(d.position),m=.02,x=.005;c.inputState.pinching&&p>m+x?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&p<=m-x&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(s=t.getPose(e.gripSpace,n),s!==null&&(l.matrix.fromArray(s.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,s.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(s.linearVelocity)):l.hasLinearVelocity=!1,s.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(s.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(r=t.getPose(e.targetRaySpace,n),r===null&&s!==null&&(r=s),r!==null&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(H8)))}return a!==null&&(a.visible=r!==null),l!==null&&(l.visible=s!==null),c!==null&&(c.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const n=new Ns;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}class p1{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new Ve(e),this.density=t}clone(){return new p1(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class m1{constructor(e,t=1,n=1e3){this.isFog=!0,this.name="",this.color=new Ve(e),this.near=t,this.far=n}clone(){return new m1(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class Ec extends Wt{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 Ys,this.environmentIntensity=1,this.environmentRotation=new Ys,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}}class lh{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=Cm,this.updateRanges=[],this.version=0,this.uuid=Hs()}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,n){e*=this.stride,n*=t.stride;for(let r=0,s=this.stride;r<s;r++)this.array[e+r]=t.array[n+r];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=Hs()),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]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}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=Hs()),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 Dr=new H;class Xr{constructor(e,t,n,r=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=r}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;t<n;t++)Dr.fromBufferAttribute(this,t),Dr.applyMatrix4(e),this.setXYZ(t,Dr.x,Dr.y,Dr.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Dr.fromBufferAttribute(this,t),Dr.applyNormalMatrix(e),this.setXYZ(t,Dr.x,Dr.y,Dr.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Dr.fromBufferAttribute(this,t),Dr.transformDirection(e),this.setXYZ(t,Dr.x,Dr.y,Dr.z);return this}getComponent(e,t){let n=this.array[e*this.data.stride+this.offset+t];return this.normalized&&(n=Wr(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=kt(n,this.array)),this.data.array[e*this.data.stride+this.offset+t]=n,this}setX(e,t){return this.normalized&&(t=kt(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=kt(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=kt(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=kt(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=Wr(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=Wr(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=Wr(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=Wr(t,this.array)),t}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=kt(t,this.array),n=kt(n,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,r){return e=e*this.data.stride+this.offset,this.normalized&&(t=kt(t,this.array),n=kt(n,this.array),r=kt(r,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this}setXYZW(e,t,n,r,s){return e=e*this.data.stride+this.offset,this.normalized&&(t=kt(t,this.array),n=kt(n,this.array),r=kt(r,this.array),s=kt(s,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this.data.array[e+3]=s,this}clone(e){if(e===void 0){Pm("InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let n=0;n<this.count;n++){const r=n*this.data.stride+this.offset;for(let s=0;s<this.itemSize;s++)t.push(this.data.array[r+s])}return new zt(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 Xr(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){Pm("InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let n=0;n<this.count;n++){const r=n*this.data.stride+this.offset;for(let s=0;s<this.itemSize;s++)t.push(this.data.array[r+s])}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}}}class gw extends Wn{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new Ve(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 Nd;const Jh=new H,kd=new H,Od=new H,Ud=new xe,Kh=new xe,vD=new _t,Hg=new H,qh=new H,Gg=new H,z5=new xe,Z2=new xe,H5=new xe;class yD extends Wt{constructor(e=new gw){if(super(),this.isSprite=!0,this.type="Sprite",Nd===void 0){Nd=new Rt;const t=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),n=new lh(t,5);Nd.setIndex([0,1,2,0,2,3]),Nd.setAttribute("position",new Xr(n,3,0,!1)),Nd.setAttribute("uv",new Xr(n,2,3,!1))}this.geometry=Nd,this.material=e,this.center=new xe(.5,.5),this.count=1}raycast(e,t){e.camera===null&&bt('Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),kd.setFromMatrixScale(this.matrixWorld),vD.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),Od.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&kd.multiplyScalar(-Od.z);const n=this.material.rotation;let r,s;n!==0&&(s=Math.cos(n),r=Math.sin(n));const o=this.center;jg(Hg.set(-.5,-.5,0),Od,o,kd,r,s),jg(qh.set(.5,-.5,0),Od,o,kd,r,s),jg(Gg.set(.5,.5,0),Od,o,kd,r,s),z5.set(0,0),Z2.set(1,0),H5.set(1,1);let a=e.ray.intersectTriangle(Hg,qh,Gg,!1,Jh);if(a===null&&(jg(qh.set(-.5,.5,0),Od,o,kd,r,s),Z2.set(0,1),a=e.ray.intersectTriangle(Hg,Gg,qh,!1,Jh),a===null))return;const l=e.ray.origin.distanceTo(Jh);l<e.near||l>e.far||t.push({distance:l,point:Jh.clone(),uv:ss.getInterpolation(Jh,Hg,qh,Gg,z5,Z2,H5,new xe),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 jg(i,e,t,n,r,s){Ud.subVectors(i,t).addScalar(.5).multiply(n),r!==void 0?(Kh.x=s*Ud.x-r*Ud.y,Kh.y=r*Ud.x+s*Ud.y):Kh.copy(Ud),i.copy(e),i.x+=Kh.x,i.y+=Kh.y,i.applyMatrix4(vD)}const Wg=new H,G5=new H;class _D extends Wt{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 n=0,r=t.length;n<r;n++){const s=t[n];this.addLevel(s.object.clone(),s.distance,s.hysteresis)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,t=0,n=0){t=Math.abs(t);const r=this.levels;let s;for(s=0;s<r.length&&!(t<r[s].distance);s++);return r.splice(s,0,{distance:t,hysteresis:n,object:e}),this.add(e),this}removeLevel(e){const t=this.levels;for(let n=0;n<t.length;n++)if(t[n].distance===e){const r=t.splice(n,1);return this.remove(r[0].object),!0}return!1}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const t=this.levels;if(t.length>0){let n,r;for(n=1,r=t.length;n<r;n++){let s=t[n].distance;if(t[n].object.visible&&(s-=s*t[n].hysteresis),e<s)break}return t[n-1].object}return null}raycast(e,t){if(this.levels.length>0){Wg.setFromMatrixPosition(this.matrixWorld);const r=e.ray.origin.distanceTo(Wg);this.getObjectForDistance(r).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){Wg.setFromMatrixPosition(e.matrixWorld),G5.setFromMatrixPosition(this.matrixWorld);const n=Wg.distanceTo(G5)/e.zoom;t[0].object.visible=!0;let r,s;for(r=1,s=t.length;r<s;r++){let o=t[r].distance;if(t[r].object.visible&&(o-=o*t[r].hysteresis),n>=o)t[r-1].object.visible=!1,t[r].object.visible=!0;else break}for(this._currentLevel=r-1;r<s;r++)t[r].object.visible=!1}}toJSON(e){const t=super.toJSON(e);this.autoUpdate===!1&&(t.object.autoUpdate=!1),t.object.levels=[];const n=this.levels;for(let r=0,s=n.length;r<s;r++){const o=n[r];t.object.levels.push({object:o.object.uuid,distance:o.distance,hysteresis:o.hysteresis})}return t}}const j5=new H,W5=new on,V5=new on,G8=new H,X5=new _t,Vg=new H,Q2=new mi,Y5=new _t,$2=new Tc;class g1 extends Kt{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=fM,this.bindMatrix=new _t,this.bindMatrixInverse=new _t,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new jn),this.boundingBox.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,Vg),this.boundingBox.expandByPoint(Vg)}computeBoundingSphere(){const e=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new mi),this.boundingSphere.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,Vg),this.boundingSphere.expandByPoint(Vg)}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 n=this.material,r=this.matrixWorld;n!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),Q2.copy(this.boundingSphere),Q2.applyMatrix4(r),e.ray.intersectsSphere(Q2)!==!1&&(Y5.copy(r).invert(),$2.copy(e.ray).applyMatrix4(Y5),!(this.boundingBox!==null&&$2.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(e,t,$2)))}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 on,t=this.geometry.attributes.skinWeight;for(let n=0,r=t.count;n<r;n++){e.fromBufferAttribute(t,n);const s=1/e.manhattanLength();s!==1/0?e.multiplyScalar(s):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===fM?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===eD?this.bindMatrixInverse.copy(this.bindMatrix).invert():at("SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}
vendor: 6,561 bytes, line 116
116applyBoneTransform(e,t){const n=this.skeleton,r=this.geometry;W5.fromBufferAttribute(r.attributes.skinIndex,e),V5.fromBufferAttribute(r.attributes.skinWeight,e),j5.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let s=0;s<4;s++){const o=V5.getComponent(s);if(o!==0){const a=W5.getComponent(s);X5.multiplyMatrices(n.bones[a].matrixWorld,n.boneInverses[a]),t.addScaledVector(G8.copy(j5).applyMatrix4(X5),o)}}return t.applyMatrix4(this.bindMatrixInverse)}}class Zm extends Wt{constructor(){super(),this.isBone=!0,this.type="Bone"}}class Wo extends Sn{constructor(e=null,t=1,n=1,r,s,o,a,l,c=Bn,u=Bn,d,p){super(null,o,a,l,c,u,r,s,d,p),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const J5=new _t,j8=new _t;class ch{constructor(e=[],t=[]){this.uuid=Hs(),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){at("Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let n=0,r=this.bones.length;n<r;n++)this.boneInverses.push(new _t)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const n=new _t;this.bones[e]&&n.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(n)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const n=this.bones[e];n&&n.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const n=this.bones[e];n&&(n.parent&&n.parent.isBone?(n.matrix.copy(n.parent.matrixWorld).invert(),n.matrix.multiply(n.matrixWorld)):n.matrix.copy(n.matrixWorld),n.matrix.decompose(n.position,n.quaternion,n.scale))}}update(){const e=this.bones,t=this.boneInverses,n=this.boneMatrices,r=this.boneTexture;for(let s=0,o=e.length;s<o;s++){const a=e[s]?e[s].matrixWorld:j8;J5.multiplyMatrices(a,t[s]),J5.toArray(n,s*16)}r!==null&&(r.needsUpdate=!0)}clone(){return new ch(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 n=new Wo(t,e,e,Ni,Vr);return n.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=n,this}getBoneByName(e){for(let t=0,n=this.bones.length;t<n;t++){const r=this.bones[t];if(r.name===e)return r}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let n=0,r=e.bones.length;n<r;n++){const s=e.bones[n];let o=t[s];o===void 0&&(at("Skeleton: No bone found with UUID:",s),o=new Zm),this.bones.push(o),this.boneInverses.push(new _t().fromArray(e.boneInverses[n]))}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,n=this.boneInverses;for(let r=0,s=t.length;r<s;r++){const o=t[r];e.bones.push(o.uuid);const a=n[r];e.boneInverses.push(a.toArray())}return e}}class _c extends zt{constructor(e,t,n,r=1){super(e,t,n),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=r}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}}const zd=new _t,K5=new _t,Xg=[],q5=new jn,W8=new _t,Zh=new Kt,Qh=new mi;class x1 extends Kt{constructor(e,t,n){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new _c(new Float32Array(n*16),16),this.instanceColor=null,this.morphTexture=null,this.count=n,this.boundingBox=null,this.boundingSphere=null;for(let r=0;r<n;r++)this.setMatrixAt(r,W8)}computeBoundingBox(){const e=this.geometry,t=this.count;this.boundingBox===null&&(this.boundingBox=new jn),e.boundingBox===null&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,zd),q5.copy(e.boundingBox).applyMatrix4(zd),this.boundingBox.union(q5)}computeBoundingSphere(){const e=this.geometry,t=this.count;this.boundingSphere===null&&(this.boundingSphere=new mi),e.boundingSphere===null&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,zd),Qh.copy(e.boundingSphere).applyMatrix4(zd),this.boundingSphere.union(Qh)}copy(e,t){return super.copy(e,t),this.instanceMatrix.copy(e.instanceMatrix),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){t.fromArray(this.instanceColor.array,e*3)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,e*16)}getMorphAt(e,t){const n=t.morphTargetInfluences,r=this.morphTexture.source.data.data,s=n.length+1,o=e*s+1;for(let a=0;a<n.length;a++)n[a]=r[o+a]}raycast(e,t){const n=this.matrixWorld,r=this.count;if(Zh.geometry=this.geometry,Zh.material=this.material,Zh.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),Qh.copy(this.boundingSphere),Qh.applyMatrix4(n),e.ray.intersectsSphere(Qh)!==!1))for(let s=0;s<r;s++){this.getMatrixAt(s,zd),K5.multiplyMatrices(n,zd),Zh.matrixWorld=K5,Zh.raycast(e,Xg);for(let o=0,a=Xg.length;o<a;o++){const l=Xg[o];l.instanceId=s,l.object=this,t.push(l)}Xg.length=0}}setColorAt(e,t){this.instanceColor===null&&(this.instanceColor=new _c(new Float32Array(this.instanceMatrix.count*3).fill(1),3)),t.toArray(this.instanceColor.array,e*3)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,e*16)}setMorphAt(e,t){const n=t.morphTargetInfluences,r=n.length+1;this.morphTexture===null&&(this.morphTexture=new Wo(new Float32Array(r*this.count),r,this.count,o1,Vr));const s=this.morphTexture.source.data.data;let o=0;for(let c=0;c<n.length;c++)o+=n[c];const a=this.geometry.morphTargetsRelative?1:1-o,l=r*e;s[l]=a,s.set(n,l+1)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"}),this.morphTexture!==null&&(this.morphTexture.dispose(),this.morphTexture=null)}}const eS=new H,V8=new H,X8=new Nt;class Oo{constructor(e=new H(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}
vendor: 5,526 bytes, line 116
116setFromCoplanarPoints(e,t,n){const r=eS.subVectors(n,t).cross(V8.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const n=e.delta(eS),r=this.normal.dot(n);if(r===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;const s=-(e.start.dot(this.normal)+this.constant)/r;return s<0||s>1?null:t.copy(e.start).addScaledVector(n,s)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||X8.getNormalMatrix(e),r=this.coplanarPoint(eS).applyMatrix4(e),s=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(s),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Vc=new mi,Y8=new xe(.5,.5),Yg=new H;class uh{constructor(e=new Oo,t=new Oo,n=new Oo,r=new Oo,s=new Oo,o=new Oo){this.planes=[e,t,n,r,s,o]}set(e,t,n,r,s,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(n),a[3].copy(r),a[4].copy(s),a[5].copy(o),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,t=Fs,n=!1){const r=this.planes,s=e.elements,o=s[0],a=s[1],l=s[2],c=s[3],u=s[4],d=s[5],p=s[6],m=s[7],x=s[8],v=s[9],_=s[10],g=s[11],S=s[12],b=s[13],A=s[14],w=s[15];if(r[0].setComponents(c-o,m-u,g-x,w-S).normalize(),r[1].setComponents(c+o,m+u,g+x,w+S).normalize(),r[2].setComponents(c+a,m+d,g+v,w+b).normalize(),r[3].setComponents(c-a,m-d,g-v,w-b).normalize(),n)r[4].setComponents(l,p,_,A).normalize(),r[5].setComponents(c-l,m-p,g-_,w-A).normalize();else if(r[4].setComponents(c-l,m-p,g-_,w-A).normalize(),t===Fs)r[5].setComponents(c+l,m+p,g+_,w+A).normalize();else if(t===Kf)r[5].setComponents(l,p,_,A).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(),Vc.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Vc.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Vc)}intersectsSprite(e){Vc.center.set(0,0,0);const t=Y8.distanceTo(e.center);return Vc.radius=.7071067811865476+t,Vc.applyMatrix4(e.matrixWorld),this.intersectsSphere(Vc)}intersectsSphere(e){const t=this.planes,n=e.center,r=-e.radius;for(let s=0;s<6;s++)if(t[s].distanceToPoint(n)<r)return!1;return!0}intersectsBox(e){const t=this.planes;for(let n=0;n<6;n++){const r=t[n];if(Yg.x=r.normal.x>0?e.max.x:e.min.x,Yg.y=r.normal.y>0?e.max.y:e.min.y,Yg.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Yg)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}const ta=new _t,na=new uh;class v1{constructor(){this.coordinateSystem=Fs}intersectsObject(e,t){if(!t.isArrayCamera||t.cameras.length===0)return!1;for(let n=0;n<t.cameras.length;n++){const r=t.cameras[n];if(ta.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),na.setFromProjectionMatrix(ta,r.coordinateSystem,r.reversedDepth),na.intersectsObject(e))return!0}return!1}intersectsSprite(e,t){if(!t||!t.cameras||t.cameras.length===0)return!1;for(let n=0;n<t.cameras.length;n++){const r=t.cameras[n];if(ta.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),na.setFromProjectionMatrix(ta,r.coordinateSystem,r.reversedDepth),na.intersectsSprite(e))return!0}return!1}intersectsSphere(e,t){if(!t||!t.cameras||t.cameras.length===0)return!1;for(let n=0;n<t.cameras.length;n++){const r=t.cameras[n];if(ta.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),na.setFromProjectionMatrix(ta,r.coordinateSystem,r.reversedDepth),na.intersectsSphere(e))return!0}return!1}intersectsBox(e,t){if(!t||!t.cameras||t.cameras.length===0)return!1;for(let n=0;n<t.cameras.length;n++){const r=t.cameras[n];if(ta.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),na.setFromProjectionMatrix(ta,r.coordinateSystem,r.reversedDepth),na.intersectsBox(e))return!0}return!1}containsPoint(e,t){if(!t||!t.cameras||t.cameras.length===0)return!1;for(let n=0;n<t.cameras.length;n++){const r=t.cameras[n];if(ta.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),na.setFromProjectionMatrix(ta,r.coordinateSystem,r.reversedDepth),na.containsPoint(e))return!0}return!1}clone(){return new v1}}function tS(i,e){return i-e}function J8(i,e){return i.z-e.z}function K8(i,e){return e.z-i.z}class q8{constructor(){this.index=0,this.pool=[],this.list=[]}push(e,t,n,r){const s=this.pool,o=this.list;this.index>=s.length&&s.push({start:-1,count:-1,z:-1,index:-1});const a=s[this.index];o.push(a),this.index++,a.start=e,a.count=t,a.z=n,a.index=r}reset(){this.list.length=0,this.index=0}}
vendor: 2,110 bytes, line 116
116const es=new _t,Z8=new Ve(1,1,1),Z5=new uh,Q8=new v1,Jg=new jn,Xc=new mi,$h=new H,Q5=new H,$8=new H,nS=new q8,xr=new Kt,Kg=[];function eH(i,e,t=0){const n=e.itemSize;if(i.isInterleavedBufferAttribute||i.array.constructor!==e.array.constructor){const r=i.count;for(let s=0;s<r;s++)for(let o=0;o<n;o++)e.setComponent(s+t,o,i.getComponent(s,o))}else e.array.set(i.array,t*n);e.needsUpdate=!0}function Yc(i,e){if(i.constructor!==e.constructor){const t=Math.min(i.length,e.length);for(let n=0;n<t;n++)e[n]=i[n]}else{const t=Math.min(i.length,e.length);e.set(new i.constructor(i.buffer,0,t))}}class SD extends Kt{constructor(e,t,n=t*2,r){super(new Rt,r),this.isBatchedMesh=!0,this.perObjectFrustumCulled=!0,this.sortObjects=!0,this.boundingBox=null,this.boundingSphere=null,this.customSort=null,this._instanceInfo=[],this._geometryInfo=[],this._availableInstanceIds=[],this._availableGeometryIds=[],this._nextIndexStart=0,this._nextVertexStart=0,this._geometryCount=0,this._visibilityChanged=!0,this._geometryInitialized=!1,this._maxInstanceCount=e,this._maxVertexCount=t,this._maxIndexCount=n,this._multiDrawCounts=new Int32Array(e),this._multiDrawStarts=new Int32Array(e),this._multiDrawCount=0,this._multiDrawInstances=null,this._matricesTexture=null,this._indirectTexture=null,this._colorsTexture=null,this._initMatricesTexture(),this._initIndirectTexture()}get maxInstanceCount(){return this._maxInstanceCount}get instanceCount(){return this._instanceInfo.length-this._availableInstanceIds.length}get unusedVertexCount(){return this._maxVertexCount-this._nextVertexStart}get unusedIndexCount(){return this._maxIndexCount-this._nextIndexStart}_initMatricesTexture(){let e=Math.sqrt(this._maxInstanceCount*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const t=new Float32Array(e*e*4),n=new Wo(t,e,e,Ni,Vr);this._matricesTexture=n}_initIndirectTexture(){let e=Math.sqrt(this._maxInstanceCount);e=Math.ceil(e);const t=new Uint32Array(e*e),n=new Wo(t,e,e,Ym,Mo);this._indirectTexture=n}_initColorsTexture(){let e=Math.sqrt(this._maxInstanceCount);e=Math.ceil(e);const t=new Float32Array(e*e*4).fill(1),n=new Wo(t,e,e,Ni,Vr);
116n.colorSpace=Yt.workingColorSpace,this._colorsTexture=n}_initializeGeometry(e){const t=this.geometry,n=this._maxVertexCount,r=this._maxIndexCount;if(this._geometryInitialized===!1){for(const s in e.attributes){const o=e.getAttribute(s),{array:a,itemSize:l,normalized:c}=o,u=new a.constructor(n*l),d=new zt(u,l,c);t.setAttribute(s,d)}if(e.getIndex()!==null){const s=n>65535?new Uint32Array(r):new Uint16Array(r);t.setIndex(new zt(s,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 n in t.attributes){if(!e.hasAttribute(n))throw new Error(`THREE.BatchedMesh: Added geometry missing "${n}". All geometries must have consistent attributes.`);const r=e.getAttribute(n),s=t.getAttribute(n);if(r.itemSize!==s.itemSize||r.normalized!==s.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 jn);const e=this.boundingBox,t=this._instanceInfo;e.makeEmpty();for(let n=0,r=t.length;n<r;n++){if(t[n].active===!1)continue;const s=t[n].geometryIndex;this.getMatrixAt(n,es),this.getBoundingBoxAt(s,Jg).applyMatrix4(es),e.union(Jg)}}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new mi);const e=this.boundingSphere,t=this._instanceInfo;e.makeEmpty();for(let n=0,r=t.length;n<r;n++){if(t[n].active===!1)continue;const s=t[n].geometryIndex;this.getMatrixAt(n,es),this.getBoundingSphereAt(s,Xc).applyMatrix4(es),e.union(Xc)}}addInstance(e){if(this._instanceInfo.length>=this.maxInstanceCount&&this._availableInstanceIds.length===0)throw new Error("THREE.BatchedMesh: Maximum item count reached.");const n={visible:!0,active:!0,geometryIndex:e};let r=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(tS),r=this._availableInstanceIds.shift(),this._instanceInfo[r]=n):(r=this._instanceInfo.length,this._instanceInfo.push(n));const s=this._matricesTexture;es.identity().toArray(s.image.data,r*16),s.needsUpdate=!0;const o=this._colorsTexture;return o&&(Z8.toArray(o.image.data,r*4),o.needsUpdate=!0),this._visibilityChanged=!0,r}addGeometry(e,t=-1,n=-1){this._initializeGeometry(e),this._validateGeometry(e);const r={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},s=this._geometryInfo;r.vertexStart=this._nextVertexStart,r.reservedVertexCount=t===-1?e.getAttribute("position").count:t;const o=e.getIndex();if(o!==null&&(r.indexStart=this._nextIndexStart,r.reservedIndexCount=n===-1?o.count:n),r.indexStart!==-1&&r.indexStart+r.reservedIndexCount>this._maxIndexCount||r.vertexStart+r.reservedVertexCount>this._maxVertexCount)throw new Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.");let l;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(tS),l=this._availableGeometryIds.shift(),s[l]=r):(l=this._geometryCount,this._geometryCount++,s.push(r)),this.setGeometryAt(l,e),this._nextIndexStart=r.indexStart+r.reservedIndexCount,this._nextVertexStart=r.vertexStart+r.reservedVertexCount,l}setGeometryAt(e,t){if(e>=this._geometryCount)throw new Error("THREE.BatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);const n=this.geometry,r=n.getIndex()!==null,s=n.getIndex(),o=t.getIndex(),a=this._geometryInfo[e];if(r&&o.count>a.reservedIndexCount||t.attributes.position.count>a.reservedVertexCount)throw new Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.");const l=a.vertexStart,c=a.reservedVertexCount;a.vertexCount=t.getAttribute("position").count;for(const u in n.attributes){const d=t.getAttribute(u),p=n.getAttribute(u);eH(d,p,l);const m=d.itemSize;
vendor: 9,064 bytes, line 116
116for(let x=d.count,v=c;x<v;x++){const _=l+x;for(let g=0;g<m;g++)p.setComponent(_,g,0)}p.needsUpdate=!0,p.addUpdateRange(l*m,c*m)}if(r){const u=a.indexStart,d=a.reservedIndexCount;a.indexCount=t.getIndex().count;for(let p=0;p<o.count;p++)s.setX(u+p,l+o.getX(p));for(let p=o.count,m=d;p<m;p++)s.setX(u+p,l);s.needsUpdate=!0,s.addUpdateRange(u,a.reservedIndexCount)}return a.start=r?a.indexStart:a.vertexStart,a.count=r?a.indexCount:a.vertexCount,a.boundingBox=null,t.boundingBox!==null&&(a.boundingBox=t.boundingBox.clone()),a.boundingSphere=null,t.boundingSphere!==null&&(a.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 n=this._instanceInfo;for(let r=0,s=n.length;r<s;r++)n[r].active&&n[r].geometryIndex===e&&this.deleteInstance(r);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 n=this._geometryInfo,r=n.map((o,a)=>a).sort((o,a)=>n[o].vertexStart-n[a].vertexStart),s=this.geometry;for(let o=0,a=n.length;o<a;o++){const l=r[o],c=n[l];if(c.active!==!1){if(s.index!==null){if(c.indexStart!==t){const{indexStart:u,vertexStart:d,reservedIndexCount:p}=c,m=s.index,x=m.array,v=e-d;for(let _=u;_<u+p;_++)x[_]=x[_]+v;m.array.copyWithin(t,u,u+p),m.addUpdateRange(t,p),m.needsUpdate=!0,c.indexStart=t}t+=c.reservedIndexCount}if(c.vertexStart!==e){const{vertexStart:u,reservedVertexCount:d}=c,p=s.attributes;for(const m in p){const x=p[m],{array:v,itemSize:_}=x;v.copyWithin(e*_,u*_,(u+d)*_),x.addUpdateRange(e*_,d*_),x.needsUpdate=!0}c.vertexStart=e}e+=c.reservedVertexCount,c.start=s.index?c.indexStart:c.vertexStart,this._nextIndexStart=s.index?c.indexStart+c.reservedIndexCount:0,this._nextVertexStart=c.vertexStart+c.reservedVertexCount}}return this._visibilityChanged=!0,this}getBoundingBoxAt(e,t){if(e>=this._geometryCount)return null;const n=this.geometry,r=this._geometryInfo[e];if(r.boundingBox===null){const s=new jn,o=n.index,a=n.attributes.position;for(let l=r.start,c=r.start+r.count;l<c;l++){let u=l;o&&(u=o.getX(u)),s.expandByPoint($h.fromBufferAttribute(a,u))}r.boundingBox=s}return t.copy(r.boundingBox),t}getBoundingSphereAt(e,t){if(e>=this._geometryCount)return null;const n=this.geometry,r=this._geometryInfo[e];if(r.boundingSphere===null){const s=new mi;this.getBoundingBoxAt(e,Jg),Jg.getCenter(s.center);const o=n.index,a=n.attributes.position;let l=0;for(let c=r.start,u=r.start+r.count;c<u;c++){let d=c;o&&(d=o.getX(d)),$h.fromBufferAttribute(a,d),l=Math.max(l,s.center.distanceToSquared($h))}s.radius=Math.sqrt(l),r.boundingSphere=s}return t.copy(r.boundingSphere),t}setMatrixAt(e,t){this.validateInstanceId(e);const n=this._matricesTexture,r=this._matricesTexture.image.data;return t.toArray(r,e*16),n.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),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 n=this._geometryInfo[e];return t.vertexStart=n.vertexStart,t.vertexCount=n.vertexCount,t.reservedVertexCount=n.reservedVertexCount,t.indexStart=n.indexStart,t.indexCount=n.indexCount,t.reservedIndexCount=n.reservedIndexCount,t.start=n.start,t.count=n.count,t}setInstanceCount(e){const t=this._availableInstanceIds,n=this._instanceInfo;for(t.sort(tS);t[t.length-1]===n.length-1;)n.pop(),t.pop();if(e<n.length)throw new Error(`BatchedMesh: Instance ids outside the range ${e} are being used. Cannot shrink instance count.`);const r=new Int32Array(e),s=new Int32Array(e);Yc(this._multiDrawCounts,r),Yc(this._multiDrawStarts,s),this._multiDrawCounts=r,this._multiDrawStarts=s,this._maxInstanceCount=e;const o=this._indirectTexture,a=this._matricesTexture,l=this._colorsTexture;o.dispose(),this._initIndirectTexture(),Yc(o.image.data,this._indirectTexture.image.data),a.dispose(),this._initMatricesTexture(),Yc(a.image.data,this._matricesTexture.image.data),l&&(l.dispose(),this._initColorsTexture(),Yc(l.image.data,this._colorsTexture.image.data))}setGeometrySize(e,t){const n=[...this._geometryInfo].filter(a=>a.active);if(Math.max(...n.map(a=>a.vertexStart+a.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(...n.map(l=>l.indexStart+l.reservedIndexCount))>t)throw new Error(`BatchedMesh: Geometry index values are being used outside the range ${t}. Cannot shrink further.`);const s=this.geometry;s.dispose(),this._maxVertexCount=e,this._maxIndexCount=t,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new Rt,this._initializeGeometry(s));const o=this.geometry;s.index&&Yc(s.index.array,o.index.array);for(const a in s.attributes)Yc(s.attributes[a].array,o.attributes[a].array)}raycast(e,t){const n=this._instanceInfo,r=this._geometryInfo,s=this.matrixWorld,o=this.geometry;xr.material=this.material,xr.geometry.index=o.index,xr.geometry.attributes=o.attributes,xr.geometry.boundingBox===null&&(xr.geometry.boundingBox=new jn),xr.geometry.boundingSphere===null&&(xr.geometry.boundingSphere=new mi);for(let a=0,l=n.length;a<l;a++){if(!n[a].visible||!n[a].active)continue;const c=n[a].geometryIndex,u=r[c];xr.geometry.setDrawRange(u.start,u.count),this.getMatrixAt(a,xr.matrixWorld).premultiply(s),this.getBoundingBoxAt(c,xr.geometry.boundingBox),this.getBoundingSphereAt(c,xr.geometry.boundingSphere),xr.raycast(e,Kg);for(let d=0,p=Kg.length;d<p;d++){const m=Kg[d];m.object=this,m.batchId=a,t.push(m)}Kg.length=0}xr.material=null,xr.geometry.index=null,xr.geometry.attributes={},xr.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,n,r,s){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const o=r.getIndex(),a=o===null?1:o.array.BYTES_PER_ELEMENT,l=this._instanceInfo,c=this._multiDrawStarts,u=this._multiDrawCounts,d=this._geometryInfo,p=this.perObjectFrustumCulled,m=this._indirectTexture,x=m.image.data,v=n.isArrayCamera?Q8:Z5;p&&!n.isArrayCamera&&(es.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse).multiply(this.matrixWorld),Z5.setFromProjectionMatrix(es,n.coordinateSystem,n.reversedDepth));let _=0;if(this.sortObjects){es.copy(this.matrixWorld).invert(),$h.setFromMatrixPosition(n.matrixWorld).applyMatrix4(es),Q5.set(0,0,-1).transformDirection(n.matrixWorld).transformDirection(es);for(let b=0,A=l.length;b<A;b++)if(l[b].visible&&l[b].active){const w=l[b].geometryIndex;this.getMatrixAt(b,es),this.getBoundingSphereAt(w,Xc).applyMatrix4(es
vendor: 6,016 bytes, line 116
116);let C=!1;if(p&&(C=!v.intersectsSphere(Xc,n)),!C){const P=d[w],B=$8.subVectors(Xc.center,$h).dot(Q5);nS.push(P.start,P.count,B,b)}}const g=nS.list,S=this.customSort;S===null?g.sort(s.transparent?K8:J8):S.call(this,g,n);for(let b=0,A=g.length;b<A;b++){const w=g[b];c[_]=w.start*a,u[_]=w.count,x[_]=w.index,_++}nS.reset()}else for(let g=0,S=l.length;g<S;g++)if(l[g].visible&&l[g].active){const b=l[g].geometryIndex;let A=!1;if(p&&(this.getMatrixAt(g,es),this.getBoundingSphereAt(b,Xc).applyMatrix4(es),A=!v.intersectsSphere(Xc,n)),!A){const w=d[b];c[_]=w.start*a,u[_]=w.count,x[_]=g,_++}}m.needsUpdate=!0,this._multiDrawCount=_,this._visibilityChanged=!1}onBeforeShadow(e,t,n,r,s,o){this.onBeforeRender(e,null,r,s,o)}}class Ai extends Wn{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new Ve(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 My=new H,Ay=new H,$5=new _t,ep=new Tc,qg=new mi,iS=new H,eR=new H;let Ma=class extends Wt{constructor(e=new Rt,t=new Ai){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,n=[0];for(let r=1,s=t.count;r<s;r++)My.fromBufferAttribute(t,r-1),Ay.fromBufferAttribute(t,r),n[r]=n[r-1],n[r]+=My.distanceTo(Ay);e.setAttribute("lineDistance",new ct(n,1))}else at("Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,s=e.params.Line.threshold,o=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),qg.copy(n.boundingSphere),qg.applyMatrix4(r),qg.radius+=s,e.ray.intersectsSphere(qg)===!1)return;$5.copy(r).invert(),ep.copy(e.ray).applyMatrix4($5);const a=s/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,c=this.isLineSegments?2:1,u=n.index,p=n.attributes.position;if(u!==null){const m=Math.max(0,o.start),x=Math.min(u.count,o.start+o.count);for(let v=m,_=x-1;v<_;v+=c){const g=u.getX(v),S=u.getX(v+1),b=Zg(this,e,ep,l,g,S,v);b&&t.push(b)}if(this.isLineLoop){const v=u.getX(x-1),_=u.getX(m),g=Zg(this,e,ep,l,v,_,x-1);g&&t.push(g)}}else{const m=Math.max(0,o.start),x=Math.min(p.count,o.start+o.count);for(let v=m,_=x-1;v<_;v+=c){const g=Zg(this,e,ep,l,v,v+1,v);g&&t.push(g)}if(this.isLineLoop){const v=Zg(this,e,ep,l,x-1,m,x-1);v&&t.push(v)}}}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const r=t[n[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s<o;s++){const a=r[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=s}}}}};function Zg(i,e,t,n,r,s,o){const a=i.geometry.attributes.position;if(My.fromBufferAttribute(a,r),Ay.fromBufferAttribute(a,s),t.distanceSqToSegment(My,Ay,iS,eR)>n)return;iS.applyMatrix4(i.matrixWorld);const c=e.ray.origin.distanceTo(iS);if(!(c<e.near||c>e.far))return{distance:c,point:eR.clone().applyMatrix4(i.matrixWorld),index:o,face:null,faceIndex:null,barycoord:null,object:i}}const tR=new H,nR=new H;class gs extends Ma{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,n=[];for(let r=0,s=t.count;r<s;r+=2)tR.fromBufferAttribute(t,r),nR.fromBufferAttribute(t,r+1),n[r]=r===0?0:n[r-1],n[r+1]=n[r]+tR.distanceTo(nR);e.setAttribute("lineDistance",new ct(n,1))}else at("LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class y1 extends Ma{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}}class qa extends Wn{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new Ve(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 iR=new _t,mM=new Tc,Qg=new mi,$g=new H;class uc extends Wt{constructor(e=new Rt,t=new qa){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 n=this.geometry,r=this.matrixWorld,s=e.params.Points.threshold,o=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),Qg.copy(n.boundingSphere),Qg.applyMatrix4(r),Qg.radius+=s,e.ray.intersectsSphere(Qg)===!1)return;iR.copy(r).invert(),mM.copy(e.ray).applyMatrix4(iR);const a=s/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,c=n.index,d=n.attributes.position;if(c!==null){const p=Math.max(0,o.start),m=Math.min(c.count,o.start+o.count);for(let x=p,v=m;x<v;x++){const _=c.getX(x);$g.fromBufferAttribute(d,_),rR($g,_,l,r,e,t,this)}}else{const p=Math.max(0,o.start),m=Math.min(d.count,o.start+o.count);for(let x=p,v=m;x<v;x++)$g.fromBufferAttribute(d,x),rR($g,x,l,r,e,t,this)}}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const r=t[n[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s<o;s++){const a=r[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=s}}}}}function rR(i,e,t,n,r,s,o){const a=mM.distanceSqToPoint(i);if(a<t){const l=new H;
vendor: 3,221 bytes, line 116
116mM.closestPointToPoint(i,l),l.applyMatrix4(n);const c=r.ray.origin.distanceTo(l);if(c<r.near||c>r.far)return;s.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,faceIndex:null,barycoord:null,object:o})}}class xw extends Sn{constructor(e,t,n,r,s=jt,o=jt,a,l,c){super(e,t,n,r,s,o,a,l,c),this.isVideoTexture=!0,this.generateMipmaps=!1,this._requestVideoFrameCallbackId=0;const u=this;function d(){u.needsUpdate=!0,u._requestVideoFrameCallbackId=e.requestVideoFrameCallback(d)}"requestVideoFrameCallback"in e&&(this._requestVideoFrameCallbackId=e.requestVideoFrameCallback(d))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}dispose(){this._requestVideoFrameCallbackId!==0&&(this.source.data.cancelVideoFrameCallback(this._requestVideoFrameCallbackId),this._requestVideoFrameCallbackId=0),super.dispose()}}class tH extends xw{constructor(e,t,n,r,s,o,a,l){super({},e,t,n,r,s,o,a,l),this.isVideoFrameTexture=!0}update(){}clone(){return new this.constructor().copy(this)}setFrame(e){this.image=e,this.needsUpdate=!0}}class nH extends Sn{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=Bn,this.minFilter=Bn,this.generateMipmaps=!1,this.needsUpdate=!0}}class _1 extends Sn{constructor(e,t,n,r,s,o,a,l,c,u,d,p){super(null,o,a,l,c,u,r,s,d,p),this.isCompressedTexture=!0,this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class iH extends _1{constructor(e,t,n,r,s,o){super(e,t,n,s,o),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=Mr,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class rH extends _1{constructor(e,t,n){super(void 0,e[0].width,e[0].height,t,n,Sa),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class bD extends Sn{constructor(e,t,n,r,s,o,a,l,c){super(e,t,n,r,s,o,a,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class $f extends Sn{constructor(e,t,n=Mo,r,s,o,a=Bn,l=Bn,c,u=ba,d=1){if(u!==ba&&u!==Jl)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");const p={width:e,height:t,depth:d};super(p,r,s,o,a,l,u,n,c),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new Kl(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 MD extends $f{constructor(e,t=Mo,n=Sa,r,s,o=Bn,a=Bn,l,c=ba){const u={width:e,height:e,depth:1},d=[u,u,u,u,u,u];super(e,e,t,n,r,s,o,a,l,c),this.image=d,this.isCubeDepthTexture=!0,this.isCubeTexture=!0}get images(){return this.image}set images(e){this.image=e}}class vw extends Sn{constructor(e=null){super(),this.sourceTexture=e,this.isExternalTexture=!0}copy(e){return super.copy(e),this.sourceTexture=e.sourceTexture,this}}class S1 extends Rt{constructor(e=1,t=1,n=4,r=8,s=1){super(),this.type="CapsuleGeometry",this.parameters={radius:e,height:t,capSegments:n,radialSegments:r,heightSegments:s}
vendor: 3,720 bytes, line 116
116,t=Math.max(0,t),n=Math.max(1,Math.floor(n)),r=Math.max(3,Math.floor(r)),s=Math.max(1,Math.floor(s));const o=[],a=[],l=[],c=[],u=t/2,d=Math.PI/2*e,p=t,m=2*d+p,x=n*2+s,v=r+1,_=new H,g=new H;for(let S=0;S<=x;S++){let b=0,A=0,w=0,C=0;if(S<=n){const R=S/n,E=R*Math.PI/2;A=-u-e*Math.cos(E),w=e*Math.sin(E),C=-e*Math.cos(E),b=R*d}else if(S<=n+s){const R=(S-n)/s;A=-u+R*t,w=e,C=0,b=d+R*p}else{const R=(S-n-s)/n,E=R*Math.PI/2;A=u+e*Math.sin(E),w=e*Math.cos(E),C=e*Math.sin(E),b=d+p+R*d}const P=Math.max(0,Math.min(1,b/m));let B=0;S===0?B=.5/r:S===x&&(B=-.5/r);for(let R=0;R<=r;R++){const E=R/r,L=E*Math.PI*2,N=Math.sin(L),k=Math.cos(L);g.x=-w*k,g.y=A,g.z=w*N,a.push(g.x,g.y,g.z),_.set(-w*k,C,w*N),_.normalize(),l.push(_.x,_.y,_.z),c.push(E+B,P)}if(S>0){const R=(S-1)*v;for(let E=0;E<r;E++){const L=R+E,N=R+E+1,k=S*v+E,Y=S*v+E+1;o.push(L,N,k),o.push(N,Y,k)}}}this.setIndex(o),this.setAttribute("position",new ct(a,3)),this.setAttribute("normal",new ct(l,3)),this.setAttribute("uv",new ct(c,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new S1(e.radius,e.height,e.capSegments,e.radialSegments,e.heightSegments)}}class b1 extends Rt{constructor(e=1,t=32,n=0,r=Math.PI*2){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},t=Math.max(3,t);const s=[],o=[],a=[],l=[],c=new H,u=new xe;o.push(0,0,0),a.push(0,0,1),l.push(.5,.5);for(let d=0,p=3;d<=t;d++,p+=3){const m=n+d/t*r;c.x=e*Math.cos(m),c.y=e*Math.sin(m),o.push(c.x,c.y,c.z),a.push(0,0,1),u.x=(o[p]/e+1)/2,u.y=(o[p+1]/e+1)/2,l.push(u.x,u.y)}for(let d=1;d<=t;d++)s.push(d,d+1,0);this.setIndex(s),this.setAttribute("position",new ct(o,3)),this.setAttribute("normal",new ct(a,3)),this.setAttribute("uv",new ct(l,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new b1(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class Qm extends Rt{constructor(e=1,t=1,n=1,r=32,s=1,o=!1,a=0,l=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:r,heightSegments:s,openEnded:o,thetaStart:a,thetaLength:l};const c=this;r=Math.floor(r),s=Math.floor(s);const u=[],d=[],p=[],m=[];let x=0;const v=[],_=n/2;let g=0;S(),o===!1&&(e>0&&b(!0),t>0&&b(!1)),this.setIndex(u),this.setAttribute("position",new ct(d,3)),this.setAttribute("normal",new ct(p,3)),this.setAttribute("uv",new ct(m,2));function S(){const A=new H,w=new H;let C=0;const P=(t-e)/n;for(let B=0;B<=s;B++){const R=[],E=B/s,L=E*(t-e)+e;for(let N=0;N<=r;N++){const k=N/r,Y=k*l+a,z=Math.sin(Y),W=Math.cos(Y);w.x=L*z,w.y=-E*n+_,w.z=L*W,d.push(w.x,w.y,w.z),A.set(z,P,W).normalize(),p.push(A.x,A.y,A.z),m.push(k,1-E),R.push(x++)}v.push(R)}for(let B=0;B<r;B++)for(let R=0;R<s;R++){const E=v[R][B],L=v[R+1][B],N=v[R+1][B+1],k=v[R][B+1];(e>0||R!==0)&&(u.push(E,L,k),C+=3),(t>0||R!==s-1)&&(u.push(L,N,k),C+=3)}c.addGroup(g,C,0),g+=C}function b(A){const w=x,C=new xe,P=new H;let B=0;const R=A===!0?e:t,E=A===!0?1:-1;for(let N=1;N<=r;N++)d.push(0,_*E,0),p.push(0,E,0),m.push(.5,.5),x++;const L=x;for(let N=0;N<=r;N++){const Y=N/r*l+a,z=Math.cos(Y),W=Math.sin(Y);P.x=R*W,P.y=_*E,P.z=R*z,d.push(P.x,P.y,P.z),p.push(0,E,0),C.x=z*.5+.5,C.y=W*.5*E+.5,m.push(C.x,C.y),x++}for(let N=0;N<r;N++){const k=w+N,Y=L+N;A===!0?u.push(Y,Y+1,k):u.push(Y+1,Y,k),B+=3}c.addGroup(g,B,A===!0?1:2),g+=B}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Qm(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class $m extends Qm{constructor(e=1,t=1,n=32,r=1,s=!1,o=0,a=Math.PI*2){super(0,e,t,n,r,s,o,a),this.type="C
116oneGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:s,thetaStart:o,thetaLength:a}}static fromJSON(e){return new $m(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Cc extends Rt{constructor(e=[],t=[],n=1,r=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:r};const s=[],o=[];a(r),c(n),u(),this.setAttribute("position",new ct(s,3)),this.setAttribute("normal",new ct(s.slice(),3)),this.setAttribute("uv",new ct(o,2)),r===0?this.computeVertexNormals():this.normalizeNormals();function a(S){const b=new H,A=new H,w=new H;for(let C=0;C<t.length;C+=3)m(t[C+0],b),m(t[C+1],A),m(t[C+2],w),l(b,A,w,S)}function l(S,b,A,w){const C=w+1,P=[];for(let B=0;B<=C;B++){P[B]=[];const R=S.clone().lerp(A,B/C),E=b.clone().lerp(A,B/C),L=C-B;for(let N=0;N<=L;N++)N===0&&B===C?P[B][N]=R:P[B][N]=R.clone().lerp(E,N/L)}for(let B=0;B<C;B++)for(let R=0;R<2*(C-B)-1;R++){const E=Math.floor(R/2);R%2===0?(p(P[B][E+1]),p(P[B+1][E]),p(P[B][E])):(p(P[B][E+1]),p(P[B+1][E+1]),p(P[B+1][E]))}}function c(S){const b=new H;for(let A=0;A<s.length;A+=3)b.x=s[A+0],b.y=s[A+1],b.z=s[A+2],b.normalize().multiplyScalar(S),s[A+0]=b.x,s[A+1]=b.y,s[A+2]=b.z}function u(){const S=new H;for(let b=0;b<s.length;b+=3){S.x=s[b+0],S.y=s[b+1],S.z=s[b+2];const A=_(S)/2/Math.PI+.5,w=g(S)/Math.PI+.5;o.push(A,1-w)}x(),d()}function d(){for(let S=0;S<o.length;S+=6){const b=o[S+0],A=o[S+2],w=o[S+4],C=Math.max(b,A,w),P=Math.min(b,A,w);C>.9&&P<.1&&(b<.2&&(o[S+0]+=1),A<.2&&(o[S+2]+=1),w<.2&&(o[S+4]+=1))}}function p(S){s.push(S.x,S.y,S.z)}function m(S,b){const A=S*3;b.x=e[A+0],b.y=e[A+1],b.z=e[A+2]}function x(){const S=new H,b=new H,A=new H,w=new H,C=new xe,P=new xe,B=new xe;for(let R=0,E=0;R<s.length;R+=9,E+=6){S.set(s[R+0],s[R+1],s[R+2]),b.set(s[R+3],s[R+4],s[R+5]),A.set(s[R+6],s[R+7],s[R+8]),C.set(o[E+0],o[E+1]),P.set(o[E+2],o[E+3]),B.set(o[E+4],o[E+5]),w.copy(S).add(b).add(A).divideScalar(3);const L=_(w);v(C,E+0,S,L),v(P,E+2,b,L),v(B,E+4,A,L)}}function v(S,b,A,w){w<0&&S.x===1&&(o[b]=S.x-1),A.x===0&&A.z===0&&(o[b]=w/2/Math.PI+.5)}function _(S){return Math.atan2(S.z,-S.x)}function g(S){return Math.atan2(-S.y,Math.sqrt(S.x*S.x+S.z*S.z))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Cc(e.vertices,e.indices,e.radius,e.detail)}}class M1 extends Cc{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2,r=1/n,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,0,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r],o=[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,
vendor: 10,112 bytes, line 116
11619,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9];super(s,o,e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new M1(e.radius,e.detail)}}const ex=new H,tx=new H,rS=new H,nx=new ss;class AD extends Rt{constructor(e=null,t=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:t},e!==null){const r=Math.pow(10,4),s=Math.cos(Bu*t),o=e.getIndex(),a=e.getAttribute("position"),l=o?o.count:a.count,c=[0,0,0],u=["a","b","c"],d=new Array(3),p={},m=[];for(let x=0;x<l;x+=3){o?(c[0]=o.getX(x),c[1]=o.getX(x+1),c[2]=o.getX(x+2)):(c[0]=x,c[1]=x+1,c[2]=x+2);const{a:v,b:_,c:g}=nx;if(v.fromBufferAttribute(a,c[0]),_.fromBufferAttribute(a,c[1]),g.fromBufferAttribute(a,c[2]),nx.getNormal(rS),d[0]=`${Math.round(v.x*r)},${Math.round(v.y*r)},${Math.round(v.z*r)}`,d[1]=`${Math.round(_.x*r)},${Math.round(_.y*r)},${Math.round(_.z*r)}`,d[2]=`${Math.round(g.x*r)},${Math.round(g.y*r)},${Math.round(g.z*r)}`,!(d[0]===d[1]||d[1]===d[2]||d[2]===d[0]))for(let S=0;S<3;S++){const b=(S+1)%3,A=d[S],w=d[b],C=nx[u[S]],P=nx[u[b]],B=`${A}_${w}`,R=`${w}_${A}`;R in p&&p[R]?(rS.dot(p[R].normal)<=s&&(m.push(C.x,C.y,C.z),m.push(P.x,P.y,P.z)),p[R]=null):B in p||(p[B]={index0:c[S],index1:c[b],normal:rS.clone()})}}for(const x in p)if(p[x]){const{index0:v,index1:_}=p[x];ex.fromBufferAttribute(a,v),tx.fromBufferAttribute(a,_),m.push(ex.x,ex.y,ex.z),m.push(tx.x,tx.y,tx.z)}this.setAttribute("position",new ct(m,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}class Xo{constructor(){this.type="Curve",this.arcLengthDivisions=200,this.needsUpdate=!1,this.cacheArcLengths=null}getPoint(){at("Curve: .getPoint() not implemented.")}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/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 n,r=this.getPoint(0),s=0;t.push(0);for(let o=1;o<=e;o++)n=this.getPoint(o/e),s+=n.distanceTo(r),t.push(s),r=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t=null){const n=this.getLengths();let r=0;const s=n.length;let o;t?o=t:o=e*n[s-1];let a=0,l=s-1,c;for(;a<=l;)if(r=Math.floor(a+(l-a)/2),c=n[r]-o,c<0)a=r+1;else if(c>0)l=r-1;else{l=r;break}if(r=l,n[r]===o)return r/(s-1);const u=n[r],p=n[r+1]-u,m=(o-u)/p;return(r+m)/(s-1)}getTangent(e,t){let r=e-1e-4,s=e+1e-4;r<0&&(r=0),s>1&&(s=1);const o=this.getPoint(r),a=this.getPoint(s),l=t||(o.isVector2?new xe:new H);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t=!1){const n=new H,r=[],s=[],o=[],a=new H,l=new _t;for(let m=0;m<=e;m++){const x=m/e;r[m]=this.getTangentAt(x,new H)}s[0]=new H,o[0]=new H;let c=Number.MAX_VALUE;const u=Math.abs(r[0].x),d=Math.abs(r[0].y),p=Math.abs(r[0].z);u<=c&&(c=u,n.set(1,0,0)),d<=c&&(c=d,n.set(0,1,0)),p<=c&&n.set(0,0,1),a.crossVectors(r[0],n).normalize(),s[0].crossVectors(r[0],a),o[0].crossVectors(r[0],s[0]);for(let m=1;m<=e;m++){if(s[m]=s[m-1].clone(),o[m]=o[m-1].clone(),a.crossVectors(r[m-1],r[m]),a.length()>Number.EPSILON){a.normalize();const x=Math.acos(It(r[m-1].dot(r[m]),-1,1));s[m].applyMatrix4(l.makeRotationAxis(a,x))}o[m].crossVectors(r[m],s[m])}if(t===!0){let m=Math.acos(It(s[0].dot(s[e]),-1,1));m/=e,r[0].dot(a.crossVectors(s[0],s[e]))>0&&(m=-m);for(let x=1;x<=e;x++)s[x].applyMatrix4(l.makeRotationAxis(r[x],m*x)),o[x].crossVectors(r[x],s[x])}return{tangents:r,normals:s,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.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 A1 extends Xo{constructor(e=0,t=0,n=1,r=1,s=0,o=Math.PI*2,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=r,this.aStartAngle=s,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,t=new xe){const n=t,r=Math.PI*2;let s=this.aEndAngle-this.aStartAngle;const o=Math.abs(s)<Number.EPSILON;for(;s<0;)s+=r;for(;s>r;)s-=r;s<Number.EPSILON&&(o?s=0:s=r),this.aClockwise===!0&&!o&&(s===r?s=-r:s=s-r);const a=this.aStartAngle+e*s;let l=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(this.aRotation!==0){const u=Math.cos(this.aRotation),d=Math.sin(this.aRotation),p=l-this.aX,m=c-this.aY;l=p*u-m*d+this.aX,c=p*d+m*u+this.aY}return n.set(l,c)}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 wD extends A1{constructor(e,t,n,r,s,o){super(e,t,n,n,r,s,o),this.isArcCurve=!0,this.type="ArcCurve"}}function yw(){let i=0,e=0,t=0,n=0;function r(s,o,a,l){i=s,e=a,t=-3*s+3*o-2*a-l,n=2*s-2*o+a+l}return{initCatmullRom:function(s,o,a,l,c){r(o,a,c*(a-s),c*(l-o))},initNonuniformCatmullRom:function(s,o,a,l,c,u,d){let p=(o-s)/c-(a-s)/(c+u)+(a-o)/u,m=(a-o)/u-(l-o)/(u+d)+(l-a)/d;p*=u,m*=u,r(o,a,p,m)},calc:function(s){const o=s*s,a=o*s;return i+e*s+t*o+n*a}}}const ix=new H,sS=new yw,oS=new yw,aS=new yw;class TD extends Xo{constructor(e=[],t=!1,n="centripetal",r=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=r}getPoint(e,t=new H){const n=t,r=this.points,s=r.length,o=(s-(this.closed?0:1))*e;let a=Math.floor(o),l=o-a;this.closed?a+=a>0?0:(Math.floor(Math.abs(a)/s)+1)*s:l===0&&a===s-1&&(a=s-2,l=1);let c,u;this.closed||a>0?c=r[(a-1)%s]:(ix.subVectors(r[0],r[1]).add(r[0]),c=ix);const d=r[a%s],p=r[(a+1)%s];if(this.closed||a+2<s?u=r[(a+2)%s]:(ix.subVectors(r[s-1],r[s-2]).add(r[s-1]),u=ix),this.curveType==="centripetal"||this.curveType==="chordal"){const m=this.curveType==="chordal"?.5:.25;let x=Math.pow(c.distanceToSquared(d),m),v=Math.pow(d.distanceToSquared(p),m),_=Math.pow(p.distanceToSquared(u),m);v<1e-4&&(v=1),x<1e-4&&(x=v),_<1e-4&&(_=v),sS.initNonuniformCatmullRom(c.x,d.x,p.x,u.x,x,v,_),oS.initNonuniformCatmullRom(c.y,d.y,p.y,u.y,x,v,_),aS.initNonuniformCatmullRom(c.z,d.z,p.z,u.z,x,v,_)}else this.curveType==="catmullrom"&&(sS.initCatmullRom(c.x,d.x,p.x,u.x,this.tension),oS.initCatmullRom(c.y,d.y,p.y,u.y,this.tension),aS.initCatmullRom(c.z,d.z,p.z,u.z,this.tension));return n.set(sS.calc(l),oS.calc(l),aS.calc(l)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const r=e.points[t];this.points.push(r.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,n=this.points.length;t<n;t++){const r=this.points[t];e.points.push(r.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const r=e.points[t];this.points.push(new H().fromArray(r))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function sR(i,e,t,n,r){const s=(n-e)*.5,o=(r-t)*.5,a=i*i,l=i*a;return(2*t-2*n+s+o)*l+(-3*t+3*n-2*s-o)*a+s*i+t}function sH(i,e){const t=1-i;return t*t*e}function oH(i,e){return 2*(1-i)*i*e}function aH(i,e){return i*i*e}function qp(i,e,t,n){return sH(i,e)+oH(i,t)+aH(i,n)}function lH(i,e){const t=1-i;return t*t*t*e}function cH(i,e){const t=1-i;return 3*t*t*i*e}function uH(i,e){return 3*(1-i)*i*i*e}function dH(i,e){return i*i*i*e}function Zp(i,e,t,n,r){return lH(i,e)+cH(i,t)+uH(i,n)+dH(i,r)}class _w extends Xo{constructor(e=new xe,t=new xe,n=new xe,r=new xe){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new xe){const n=t,r=this.v0,s=this.v1,o=this.v2,a=this.v3;return n.set(Zp(e,r.x,s.x,o.x,a.x),Zp(e,r.y,s.y,o.y,a.y)),n}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 ED extends Xo{constructor(e=new H,t=new H,n=new H,r=new H){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new H){const n=t,r=this.v0,s=this.v1,o=this.v2,a=this.v3;return n.set(Zp(e,r.x,s.x,o.x,a.x),Zp(e,r.y,s.y,o.y,a.y),Zp(e,r.z,s.z,o.z,a.z)),n}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 Sw extends Xo{constructor(e=new xe,t=new xe){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new xe){const n=t;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}
vendor: 8,520 bytes, line 116
116getTangent(e,t=new xe){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 CD extends Xo{constructor(e=new H,t=new H){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}getPoint(e,t=new H){const n=t;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new H){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 bw extends Xo{constructor(e=new xe,t=new xe,n=new xe){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new xe){const n=t,r=this.v0,s=this.v1,o=this.v2;return n.set(qp(e,r.x,s.x,o.x),qp(e,r.y,s.y,o.y)),n}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 Mw extends Xo{constructor(e=new H,t=new H,n=new H){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new H){const n=t,r=this.v0,s=this.v1,o=this.v2;return n.set(qp(e,r.x,s.x,o.x),qp(e,r.y,s.y,o.y),qp(e,r.z,s.z,o.z)),n}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 Aw extends Xo{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,t=new xe){const n=t,r=this.points,s=(r.length-1)*e,o=Math.floor(s),a=s-o,l=r[o===0?o:o-1],c=r[o],u=r[o>r.length-2?r.length-1:o+1],d=r[o>r.length-3?r.length-1:o+2];return n.set(sR(a,l.x,c.x,u.x,d.x),sR(a,l.y,c.y,u.y,d.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const r=e.points[t];this.points.push(r.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const r=this.points[t];e.points.push(r.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const r=e.points[t];this.points.push(new xe().fromArray(r))}return this}}var wy=Object.freeze({__proto__:null,ArcCurve:wD,CatmullRomCurve3:TD,CubicBezierCurve:_w,CubicBezierCurve3:ED,EllipseCurve:A1,LineCurve:Sw,LineCurve3:CD,QuadraticBezierCurve:bw,QuadraticBezierCurve3:Mw,SplineCurve:Aw});class RD extends Xo{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 n=e.isVector2===!0?"LineCurve":"LineCurve3";this.curves.push(new wy[n](t,e))}return this}getPoint(e,t){const n=e*this.getLength(),r=this.getCurveLengths();let s=0;for(;s<r.length;){if(r[s]>=n){const o=r[s]-n,a=this.curves[s],l=a.getLength(),c=l===0?0:1-o/l;return a.getPointAt(c,t)}s++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let n=0,r=this.curves.length;n<r;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e}getSpacedPoints(e=40){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){const t=[];let n;for(let r=0,s=this.curves;r<s.length;r++){const o=s[r],a=o.isEllipseCurve?e*2:o.isLineCurve||o.isLineCurve3?1:o.isSplineCurve?e*o.points.length:e,l=o.getPoints(a);for(let c=0;c<l.length;c++){const u=l[c];n&&n.equals(u)||(t.push(u),n=u)}}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,n=e.curves.length;t<n;t++){const r=e.curves[t];this.curves.push(r.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,n=this.curves.length;t<n;t++){const r=this.curves[t];e.curves.push(r.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const r=e.curves[t];this.curves.push(new wy[r.type]().fromJSON(r))}return this}}class Ty extends RD{constructor(e){super(),this.type="Path",this.currentPoint=new xe,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y);return this}moveTo(e,t){return this.currentPoint.set(e,t),this}lineTo(e,t){const n=new Sw(this.currentPoint.clone(),new xe(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,n,r){const s=new bw(this.currentPoint.clone(),new xe(e,t),new xe(n,r));return this.curves.push(s),this.currentPoint.set(n,r),this}bezierCurveTo(e,t,n,r,s,o){const a=new _w(this.currentPoint.clone(),new xe(e,t),new xe(n,r),new xe(s,o));return this.curves.push(a),this.currentPoint.set(s,o),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),n=new Aw(t);return this.curves.push(n),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,n,r,s,o){const a=this.currentPoint.x,l=this.currentPoint.y;return this.absarc(e+a,t+l,n,r,s,o),this}absarc(e,t,n,r,s,o){return this.absellipse(e,t,n,n,r,s,o),this}ellipse(e,t,n,r,s,o,a,l){const c=this.currentPoint.x,u=this.currentPoint.y;return this.absellipse(e+c,t+u,n,r,s,o,a,l),this}absellipse(e,t,n,r,s,o,a,l){const c=new A1(e,t,n,r,s,o,a,l);if(this.curves.length>0){const d=c.getPoint(0);d.equals(this.currentPoint)||this.lineTo(d.x,d.y)}this.curves.push(c);const u=c.getPoint(1);return this.currentPoint.copy(u),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 Du extends Ty{constructor(e){super(e),this.uuid=Hs(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let n=0,r=this.holes.length;n<r;n++)t[n]=this.holes[n].getPoints(e);return t}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const r=e.holes[t];this.holes.push(r.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,n=this.holes.length;t<n;t++){const r=this.holes[t];e.holes.push(r.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const r=e.holes[t];this.holes.push(new Ty().fromJSON(r))}return this}}function fH(i,e,t=2){const n=e&&e.length,r=n?e[0]*t:i.length;let s=PD(i,0,r,t,!0);const o=[];if(!s||s.next===s.prev)return o;let a,l,c;if(n&&(s=xH(i,e,s,t)),i.length>80*t){a=i[0],l=i[1];let u=a,d=l;for(let p=t;p<r;p+=t){const m=i[p],x=i[p+1];m<a&&(a=m),x<l&&(l=x),m>u&&(u=m),x>d&&(d=x)}c=Math.max(u-a,d-l),c=c!==0?32767/c:0}return Im(s,o,t,a,l,c,0),o}function PD(i,e,t,n,r){let s;if(r===CH(i,e,t,n)>0)for(let o=e;o<t;o+=n)s=oR(o/n|0,i[o],i[o+1],s);else for(let o=t-n;o>=e;o-=n)s=oR(o/n|0,i[o],i[o+1],s);return s&&eh(s,s.next)&&(Bm(s),s=s.next),s}function Ku(i,e){if(!i)return i;e||(e=i);let t=i,n;do if(n=!1,!t.steiner&&(eh(t,t.next)||Zn(t.prev,t,t.next)===0)){if(Bm(t),t=e=t.prev,t===t.next)break;n=!0}else t=t.next;while(n||t!==e);return e}function Im(i,e,t,n,r,s,o){if(!i)return;!o&&s&&bH(i,n,r,s);let a=i;for(;i.prev!==i.next;){const l=i.prev,c=i.next;if(s?pH(i,n,r,s):hH(i)){e.push(l.i,i.i,c.i),Bm(i),i=c.next,a=c.next;continue}if(i=c,i===a){o?o===1?(i=mH(Ku(i),e),Im(i,e,t,n,r,s,2)):o===2&&gH(i,e,t,n,r,s
vendor: 2,415 bytes, line 116
116):Im(Ku(i),e,t,n,r,s,1);break}}}function hH(i){const e=i.prev,t=i,n=i.next;if(Zn(e,t,n)>=0)return!1;const r=e.x,s=t.x,o=n.x,a=e.y,l=t.y,c=n.y,u=Math.min(r,s,o),d=Math.min(a,l,c),p=Math.max(r,s,o),m=Math.max(a,l,c);let x=n.next;for(;x!==e;){if(x.x>=u&&x.x<=p&&x.y>=d&&x.y<=m&&_p(r,a,s,l,o,c,x.x,x.y)&&Zn(x.prev,x,x.next)>=0)return!1;x=x.next}return!0}function pH(i,e,t,n){const r=i.prev,s=i,o=i.next;if(Zn(r,s,o)>=0)return!1;const a=r.x,l=s.x,c=o.x,u=r.y,d=s.y,p=o.y,m=Math.min(a,l,c),x=Math.min(u,d,p),v=Math.max(a,l,c),_=Math.max(u,d,p),g=gM(m,x,e,t,n),S=gM(v,_,e,t,n);let b=i.prevZ,A=i.nextZ;for(;b&&b.z>=g&&A&&A.z<=S;){if(b.x>=m&&b.x<=v&&b.y>=x&&b.y<=_&&b!==r&&b!==o&&_p(a,u,l,d,c,p,b.x,b.y)&&Zn(b.prev,b,b.next)>=0||(b=b.prevZ,A.x>=m&&A.x<=v&&A.y>=x&&A.y<=_&&A!==r&&A!==o&&_p(a,u,l,d,c,p,A.x,A.y)&&Zn(A.prev,A,A.next)>=0))return!1;A=A.nextZ}for(;b&&b.z>=g;){if(b.x>=m&&b.x<=v&&b.y>=x&&b.y<=_&&b!==r&&b!==o&&_p(a,u,l,d,c,p,b.x,b.y)&&Zn(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;A&&A.z<=S;){if(A.x>=m&&A.x<=v&&A.y>=x&&A.y<=_&&A!==r&&A!==o&&_p(a,u,l,d,c,p,A.x,A.y)&&Zn(A.prev,A,A.next)>=0)return!1;A=A.nextZ}return!0}function mH(i,e){let t=i;do{const n=t.prev,r=t.next.next;!eh(n,r)&&LD(n,t,t.next,r)&&Lm(n,r)&&Lm(r,n)&&(e.push(n.i,t.i,r.i),Bm(t),Bm(t.next),t=i=r),t=t.next}while(t!==i);return Ku(t)}function gH(i,e,t,n,r,s){let o=i;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&wH(o,a)){let l=BD(o,a);o=Ku(o,o.next),l=Ku(l,l.next),Im(o,e,t,n,r,s,0),Im(l,e,t,n,r,s,0);return}a=a.next}o=o.next}while(o!==i)}function xH(i,e,t,n){const r=[];for(let s=0,o=e.length;s<o;s++){const a=e[s]*n,l=s<o-1?e[s+1]*n:i.length,c=PD(i,a,l,n,!1);c===c.next&&(c.steiner=!0),r.push(AH(c))}r.sort(vH);for(let s=0;s<r.length;s++)t=yH(r[s],t);return t}function vH(i,e){let t=i.x-e.x;if(t===0&&(t=i.y-e.y,t===0)){const n=(i.next.y-i.y)/(i.next.x-i.x),r=(e.next.y-e.y)/(e.next.x-e.x);t=n-r}return t}function yH(i,e){const t=_H(i,e);if(!t)return e;const n=BD(t,i);return Ku(n,n.next),Ku(t,t.next)}function _H(i,e){let t=e;const n=i.x,r=i.y;let s=-1/0,o;if(eh(i,t))return t;do{if(eh(i,t.next))return t.next;if(r<=t.y&&r>=t.next.y&&t.next.y!==t.y){const d=t.x+(r-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(d<=n&&d>s&&(s=d,o=t.x<t.next.x?t:t.next,d===n))return o}t=t.next}while(t!==e);if(!o)return null;const a=o,l=o.x,c=o.y;let u=1/0;t=o;do{if(n>=t.x&&t.x>=l&&n!==t.x&&ID(r<c?n:s,r,l,c,r<c?s:n,r,t.x,t.y)){const d=Math.abs(r-t.y)/(n-t.x);
vendor: 4,847 bytes, line 116
116Lm(t,i)&&(d<u||d===u&&(t.x>o.x||t.x===o.x&&SH(o,t)))&&(o=t,u=d)}t=t.next}while(t!==a);return o}function SH(i,e){return Zn(i.prev,i,e.prev)<0&&Zn(e.next,i,i.next)<0}function bH(i,e,t,n){let r=i;do r.z===0&&(r.z=gM(r.x,r.y,e,t,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==i);r.prevZ.nextZ=null,r.prevZ=null,MH(r)}function MH(i){let e,t=1;do{let n=i,r;i=null;let s=null;for(e=0;n;){e++;let o=n,a=0;for(let c=0;c<t&&(a++,o=o.nextZ,!!o);c++);let l=t;for(;a>0||l>0&&o;)a!==0&&(l===0||!o||n.z<=o.z)?(r=n,n=n.nextZ,a--):(r=o,o=o.nextZ,l--),s?s.nextZ=r:i=r,r.prevZ=s,s=r;n=o}s.nextZ=null,t*=2}while(e>1);return i}function gM(i,e,t,n,r){return i=(i-t)*r|0,e=(e-n)*r|0,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,i|e<<1}function AH(i){let e=i,t=i;do(e.x<t.x||e.x===t.x&&e.y<t.y)&&(t=e),e=e.next;while(e!==i);return t}function ID(i,e,t,n,r,s,o,a){return(r-o)*(e-a)>=(i-o)*(s-a)&&(i-o)*(n-a)>=(t-o)*(e-a)&&(t-o)*(s-a)>=(r-o)*(n-a)}function _p(i,e,t,n,r,s,o,a){return!(i===o&&e===a)&&ID(i,e,t,n,r,s,o,a)}function wH(i,e){return i.next.i!==e.i&&i.prev.i!==e.i&&!TH(i,e)&&(Lm(i,e)&&Lm(e,i)&&EH(i,e)&&(Zn(i.prev,i,e.prev)||Zn(i,e.prev,e))||eh(i,e)&&Zn(i.prev,i,i.next)>0&&Zn(e.prev,e,e.next)>0)}function Zn(i,e,t){return(e.y-i.y)*(t.x-e.x)-(e.x-i.x)*(t.y-e.y)}function eh(i,e){return i.x===e.x&&i.y===e.y}function LD(i,e,t,n){const r=sx(Zn(i,e,t)),s=sx(Zn(i,e,n)),o=sx(Zn(t,n,i)),a=sx(Zn(t,n,e));return!!(r!==s&&o!==a||r===0&&rx(i,t,e)||s===0&&rx(i,n,e)||o===0&&rx(t,i,n)||a===0&&rx(t,e,n))}function rx(i,e,t){return e.x<=Math.max(i.x,t.x)&&e.x>=Math.min(i.x,t.x)&&e.y<=Math.max(i.y,t.y)&&e.y>=Math.min(i.y,t.y)}function sx(i){return i>0?1:i<0?-1:0}function TH(i,e){let t=i;do{if(t.i!==i.i&&t.next.i!==i.i&&t.i!==e.i&&t.next.i!==e.i&&LD(t,t.next,i,e))return!0;t=t.next}while(t!==i);return!1}function Lm(i,e){return Zn(i.prev,i,i.next)<0?Zn(i,e,i.next)>=0&&Zn(i,i.prev,e)>=0:Zn(i,e,i.prev)<0||Zn(i,i.next,e)<0}function EH(i,e){let t=i,n=!1;const r=(i.x+e.x)/2,s=(i.y+e.y)/2;do t.y>s!=t.next.y>s&&t.next.y!==t.y&&r<(t.next.x-t.x)*(s-t.y)/(t.next.y-t.y)+t.x&&(n=!n),t=t.next;while(t!==i);return n}function BD(i,e){const t=xM(i.i,i.x,i.y),n=xM(e.i,e.x,e.y),r=i.next,s=e.prev;return i.next=e,e.prev=i,t.next=r,r.prev=t,n.next=t,t.prev=n,s.next=n,n.prev=s,n}function oR(i,e,t,n){const r=xM(i,e,t);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function Bm(i){i.next.prev=i.prev,i.prev.next=i.next,i.prevZ&&(i.prevZ.nextZ=i.nextZ),i.nextZ&&(i.nextZ.prevZ=i.prevZ)}function xM(i,e,t){return{i,x:e,y:t,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function CH(i,e,t,n){let r=0;for(let s=e,o=t-n;s<t;s+=n)r+=(i[o]-i[s])*(i[s+1]+i[o+1]),o=s;return r}class RH{static triangulate(e,t,n=2){return fH(e,t,n)}}class zo{static area(e){const t=e.length;let n=0;for(let r=t-1,s=0;s<t;r=s++)n+=e[r].x*e[s].y-e[s].x*e[r].y;return n*.5}static isClockWise(e){return zo.area(e)<0}static triangulateShape(e,t){const n=[],r=[],s=[];aR(e),lR(n,e);let o=e.length;t.forEach(aR);for(let l=0;l<t.length;l++)r.push(o),o+=t[l].length,lR(n,t[l]);const a=RH.triangulate(n,r);for(let l=0;l<a.length;l+=3)s.push(a.slice(l,l+3));return s}}function aR(i){const e=i.length;e>2&&i[e-1].equals(i[0])&&i.pop()}function lR(i,e){for(let t=0;t<e.length;t++)i.push(e[t].x),i.push(e[t].y)}class w1 extends Rt{constructor(e=new Du([new xe(.5,.5),new xe(-.5,.5),new xe(-.5,-.5),new xe(.5,-.5)]),t={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const n=this,r=[],s=[];for(let a=0,l=e.length;a<l;a++){const c=e[a];o(c)}this.setAttribute("position",new ct(r,3)),this.setAttribute("uv",new ct(s,2)),this.computeVertexNormals();function o(a){const l=[],c=t.curveSegments!==void 0?t.curveSegments:12,u=t.steps!==void 0?t.steps:1,d=t.depth!==void 0?t.depth:1;let p=t.bevelEnabled!==void 0?t.bevelEnabled:!0,m=t.bevelThickness!==void 0?t.bevelThickness:.2,x=t.bevelSize!==void 0?t.bevelSize:m-.1,v=t.bevelOffset!==void 0?t.bevelOffset:0,_=t.bevelSegments!==void 0?t.bevelSegments:3;const g=t.extrudePath,S=t.UVGenerator!==void 0?t.UVGenerator:PH;let b,A=!1,w,C,P,B;if(g){b=g.getSpacedPoints(u),A=!0,p=!1;const me=g.isCatmullRomCurve3?g.closed:!1;w=g.computeFrenetFrames(u,me),C=new H,P=new H,B=new H}p||(_=0,m=0,x=0,v=0);const R=a.extractPoints(c);let E=R.shape;const L=R.holes;if(!zo.isClockWise(E)){E=E.reverse();for(let me=0,Ee=L.length;me<Ee;me++){const be=L[me];zo.isClockWise(be)&&(L[me]=be.reverse())}}function k(me){const be=10000000000000001e-36;let $=me[0];for(let J=1;J<=me.length;J++){const Ue=J%me.length,Ne=me[Ue],ke=Ne.x-$.x,Ae=Ne.y-$.y,U=ke*ke+Ae*Ae,F=Math.max(Math.abs(Ne.x),Math.abs(Ne.y),Math.abs($.x),Math.abs($.y)),ne=be*F*F;if(U<=ne){me.splice(Ue,1),J--;continue}$=Ne}}
vendor: 26,364 bytes, line 116
116k(E),L.forEach(k);const Y=L.length,z=E;for(let me=0;me<Y;me++){const Ee=L[me];E=E.concat(Ee)}function W(me,Ee,be){return Ee||bt("ExtrudeGeometry: vec does not exist"),me.clone().addScaledVector(Ee,be)}const V=E.length;function G(me,Ee,be){let $,J,Ue;const Ne=me.x-Ee.x,ke=me.y-Ee.y,Ae=be.x-me.x,U=be.y-me.y,F=Ne*Ne+ke*ke,ne=Ne*U-ke*Ae;if(Math.abs(ne)>Number.EPSILON){const se=Math.sqrt(F),he=Math.sqrt(Ae*Ae+U*U),de=Ee.x-ke/se,ze=Ee.y+Ne/se,Be=be.x-U/he,Ke=be.y+Ae/he,$e=((Be-de)*U-(Ke-ze)*Ae)/(Ne*U-ke*Ae);$=de+Ne*$e-me.x,J=ze+ke*$e-me.y;const Fe=$*$+J*J;if(Fe<=2)return new xe($,J);Ue=Math.sqrt(Fe/2)}else{let se=!1;Ne>Number.EPSILON?Ae>Number.EPSILON&&(se=!0):Ne<-Number.EPSILON?Ae<-Number.EPSILON&&(se=!0):Math.sign(ke)===Math.sign(U)&&(se=!0),se?($=-ke,J=Ne,Ue=Math.sqrt(F)):($=Ne,J=ke,Ue=Math.sqrt(F/2))}return new xe($/Ue,J/Ue)}const Z=[];for(let me=0,Ee=z.length,be=Ee-1,$=me+1;me<Ee;me++,be++,$++)be===Ee&&(be=0),$===Ee&&($=0),Z[me]=G(z[me],z[be],z[$]);const O=[];let ee,le=Z.concat();for(let me=0,Ee=Y;me<Ee;me++){const be=L[me];ee=[];for(let $=0,J=be.length,Ue=J-1,Ne=$+1;$<J;$++,Ue++,Ne++)Ue===J&&(Ue=0),Ne===J&&(Ne=0),ee[$]=G(be[$],be[Ue],be[Ne]);O.push(ee),le=le.concat(ee)}let ge;if(_===0)ge=zo.triangulateShape(z,L);else{const me=[],Ee=[];for(let be=0;be<_;be++){const $=be/_,J=m*Math.cos($*Math.PI/2),Ue=x*Math.sin($*Math.PI/2)+v;for(let Ne=0,ke=z.length;Ne<ke;Ne++){const Ae=W(z[Ne],Z[Ne],Ue);Ce(Ae.x,Ae.y,-J),$===0&&me.push(Ae)}for(let Ne=0,ke=Y;Ne<ke;Ne++){const Ae=L[Ne];ee=O[Ne];const U=[];for(let F=0,ne=Ae.length;F<ne;F++){const se=W(Ae[F],ee[F],Ue);Ce(se.x,se.y,-J),$===0&&U.push(se)}$===0&&Ee.push(U)}}ge=zo.triangulateShape(me,Ee)}const Se=ge.length,Ye=x+v;for(let me=0;me<V;me++){const Ee=p?W(E[me],le[me],Ye):E[me];A?(P.copy(w.normals[0]).multiplyScalar(Ee.x),C.copy(w.binormals[0]).multiplyScalar(Ee.y),B.copy(b[0]).add(P).add(C),Ce(B.x,B.y,B.z)):Ce(Ee.x,Ee.y,0)}for(let me=1;me<=u;me++)for(let Ee=0;Ee<V;Ee++){const be=p?W(E[Ee],le[Ee],Ye):E[Ee];A?(P.copy(w.normals[me]).multiplyScalar(be.x),C.copy(w.binormals[me]).multiplyScalar(be.y),B.copy(b[me]).add(P).add(C),Ce(B.x,B.y,B.z)):Ce(be.x,be.y,d/u*me)}for(let me=_-1;me>=0;me--){const Ee=me/_,be=m*Math.cos(Ee*Math.PI/2),$=x*Math.sin(Ee*Math.PI/2)+v;for(let J=0,Ue=z.length;J<Ue;J++){const Ne=W(z[J],Z[J],$);Ce(Ne.x,Ne.y,d+be)}for(let J=0,Ue=L.length;J<Ue;J++){const Ne=L[J];ee=O[J];for(let ke=0,Ae=Ne.length;ke<Ae;ke++){const U=W(Ne[ke],ee[ke],$);A?Ce(U.x,U.y+b[u-1].y,b[u-1].x+be):Ce(U.x,U.y,d+be)}}}K(),q();function K(){const me=r.length/3;if(p){let Ee=0,be=V*Ee;for(let $=0;$<Se;$++){const J=ge[$];Te(J[2]+be,J[1]+be,J[0]+be)}Ee=u+_*2,be=V*Ee;for(let $=0;$<Se;$++){const J=ge[$];Te(J[0]+be,J[1]+be,J[2]+be)}}else{for(let Ee=0;Ee<Se;Ee++){const be=ge[Ee];Te(be[2],be[1],be[0])}for(let Ee=0;Ee<Se;Ee++){const be=ge[Ee];Te(be[0]+V*u,be[1]+V*u,be[2]+V*u)}}n.addGroup(me,r.length/3-me,0)}function q(){const me=r.length/3;let Ee=0;re(z,Ee),Ee+=z.length;for(let be=0,$=L.length;be<$;be++){const J=L[be];re(J,Ee),Ee+=J.length}n.addGroup(me,r.length/3-me,1)}function re(me,Ee){let be=me.length;for(;--be>=0;){const $=be;let J=be-1;J<0&&(J=me.length-1);for(let Ue=0,Ne=u+_*2;Ue<Ne;Ue++){const ke=V*Ue,Ae=V*(Ue+1),U=Ee+$+ke,F=Ee+J+ke,ne=Ee+J+Ae,se=Ee+$+Ae;De(U,F,ne,se)}}}function Ce(me,Ee,be){l.push(me),l.push(Ee),l.push(be)}function Te(me,Ee,be){tt(me),tt(Ee),tt(be);const $=r.length/3,J=S.generateTopUV(n,r,$-3,$-2,$-1);Pe(J[0]),Pe(J[1]),Pe(J[2])}function De(me,Ee,be,$){tt(me),tt(Ee),tt($),tt(Ee),tt(be),tt($);const J=r.length/3,Ue=S.generateSideWallUV(n,r,J-6,J-3,J-2,J-1);Pe(Ue[0]),Pe(Ue[1]),Pe(Ue[3]),Pe(Ue[1]),Pe(Ue[2]),Pe(Ue[3])}function tt(me){r.push(l[me*3+0]),r.push(l[me*3+1]),r.push(l[me*3+2])}function Pe(me){s.push(me.x),s.push(me.y)}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),t=this.parameters.shapes,n=this.parameters.options;return IH(t,n,e)}static fromJSON(e,t){const n=[];for(let s=0,o=e.shapes.length;s<o;s++){const a=t[e.shapes[s]];n.push(a)}const r=e.options.extrudePath;return r!==void 0&&(e.options.extrudePath=new wy[r.type]().fromJSON(r)),new w1(n,e.options)}}const PH={generateTopUV:function(i,e,t,n,r){const s=e[t*3],o=e[t*3+1],a=e[n*3],l=e[n*3+1],c=e[r*3],u=e[r*3+1];return[new xe(s,o),new xe(a,l),new xe(c,u)]},generateSideWallUV:function(i,e,t,n,r,s){const o=e[t*3],a=e[t*3+1],l=e[t*3+2],c=e[n*3],u=e[n*3+1],d=e[n*3+2],p=e[r*3],m=e[r*3+1],x=e[r*3+2],v=e[s*3],_=e[s*3+1],g=e[s*3+2];return Math.abs(a-u)<Math.abs(o-c)?[new xe(o,1-l),new xe(c,1-d),new xe(p,1-x),new xe(v,1-g)]:[new xe(a,1-l),new xe(u,1-d),new xe(m,1-x),new xe(_,1-g)]}};function IH(i,e,t){if(t.shapes=[],Array.isArray(i))for(let n=0,r=i.length;n<r;n++){const s=i[n];t.shapes.push(s.uuid)}else t.shapes.push(i.uuid);return t.options=Object.assign({},e),e.extrudePath!==void 0&&(t.options.extrudePath=e.extrudePath.toJSON()),t}class T1 extends Cc{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2,r=[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1],s=[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(r,s,e,t),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new T1(e.radius,e.detail)}}class E1 extends Rt{constructor(e=[new xe(0,-.5),new xe(.5,0),new xe(0,.5)],t=12,n=0,r=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:r},t=Math.floor(t),r=It(r,0,Math.PI*2);const s=[],o=[],a=[],l=[],c=[],u=1/t,d=new H,p=new xe,m=new H,x=new H,v=new H;let _=0,g=0;for(let S=0;S<=e.length-1;S++)switch(S){case 0:_=e[S+1].x-e[S].x,g=e[S+1].y-e[S].y,m.x=g*1,m.y=-_,m.z=g*0,v.copy(m),m.normalize(),l.push(m.x,m.y,m.z);break;case e.length-1:l.push(v.x,v.y,v.z);break;default:_=e[S+1].x-e[S].x,g=e[S+1].y-e[S].y,m.x=g*1,m.y=-_,m.z=g*0,x.copy(m),m.x+=v.x,m.y+=v.y,m.z+=v.z,m.normalize(),l.push(m.x,m.y,m.z),v.copy(x)}for(let S=0;S<=t;S++){const b=n+S*u*r,A=Math.sin(b),w=Math.cos(b);for(let C=0;C<=e.length-1;C++){d.x=e[C].x*A,d.y=e[C].y,d.z=e[C].x*w,o.push(d.x,d.y,d.z),p.x=S/t,p.y=C/(e.length-1),a.push(p.x,p.y);const P=l[3*C+0]*A,B=l[3*C+1],R=l[3*C+0]*w;c.push(P,B,R)}}for(let S=0;S<t;S++)for(let b=0;b<e.length-1;b++){const A=b+S*e.length,w=A,C=A+e.length,P=A+e.length+1,B=A+1;s.push(w,C,B),s.push(P,B,C)}this.setIndex(s),this.setAttribute("position",new ct(o,3)),this.setAttribute("uv",new ct(a,2)),this.setAttribute("normal",new ct(c,3))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new E1(e.points,e.segments,e.phiStart,e.phiLength)}}class e0 extends Cc{constructor(e=1,t=0){const n=[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],r=[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(n,r,e,t),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new e0(e.radius,e.detail)}}class ks extends Rt{constructor(e=1,t=1,n=1,r=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:r};const s=e/2,o=t/2,a=Math.floor(n),l=Math.floor(r),c=a+1,u=l+1,d=e/a,p=t/l,m=[],x=[],v=[],_=[];for(let g=0;g<u;g++){const S=g*p-o;for(let b=0;b<c;b++){const A=b*d-s;x.push(A,-S,0),v.push(0,0,1),_.push(b/a),_.push(1-g/l)}}for(let g=0;g<l;g++)for(let S=0;S<a;S++){const b=S+c*g,A=S+c*(g+1),w=S+1+c*(g+1),C=S+1+c*g;m.push(b,A,C),m.push(A,w,C)}this.setIndex(m),this.setAttribute("position",new ct(x,3)),this.setAttribute("normal",new ct(v,3)),this.setAttribute("uv",new ct(_,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new ks(e.width,e.height,e.widthSegments,e.heightSegments)}}class C1 extends Rt{constructor(e=.5,t=1,n=32,r=1,s=0,o=Math.PI*2){super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:n,phiSegments:r,thetaStart:s,thetaLength:o},n=Math.max(3,n),r=Math.max(1,r);const a=[],l=[],c=[],u=[];let d=e;const p=(t-e)/r,m=new H,x=new xe;for(let v=0;v<=r;v++){for(let _=0;_<=n;_++){const g=s+_/n*o;m.x=d*Math.cos(g),m.y=d*Math.sin(g),l.push(m.x,m.y,m.z),c.push(0,0,1),x.x=(m.x/t+1)/2,x.y=(m.y/t+1)/2,u.push(x.x,x.y)}d+=p}for(let v=0;v<r;v++){const _=v*(n+1);for(let g=0;g<n;g++){const S=g+_,b=S,A=S+n+1,w=S+n+2,C=S+1;a.push(b,A,C),a.push(A,w,C)}}this.setIndex(a),this.setAttribute("position",new ct(l,3)),this.setAttribute("normal",new ct(c,3)),this.setAttribute("uv",new ct(u,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new C1(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class R1 extends Rt{constructor(e=new Du([new xe(0,.5),new xe(-.5,-.5),new xe(.5,-.5)]),t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const n=[],r=[],s=[],o=[];let a=0,l=0;if(Array.isArray(e)===!1)c(e);else for(let u=0;u<e.length;u++)c(e[u]),this.addGroup(a,l,u),a+=l,l=0;this.setIndex(n),this.setAttribute("position",new ct(r,3)),this.setAttribute("normal",new ct(s,3)),this.setAttribute("uv",new ct(o,2));function c(u){const d=r.length/3,p=u.extractPoints(t);let m=p.shape;const x=p.holes;zo.isClockWise(m)===!1&&(m=m.reverse());for(let _=0,g=x.length;_<g;_++){const S=x[_];zo.isClockWise(S)===!0&&(x[_]=S.reverse())}const v=zo.triangulateShape(m,x);for(let _=0,g=x.length;_<g;_++){const S=x[_];m=m.concat(S)}for(let _=0,g=m.length;_<g;_++){const S=m[_];r.push(S.x,S.y,0),s.push(0,0,1),o.push(S.x,S.y)}for(let _=0,g=v.length;_<g;_++){const S=v[_],b=S[0]+d,A=S[1]+d,w=S[2]+d;n.push(b,A,w),l+=3}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),t=this.parameters.shapes;return LH(t,e)}static fromJSON(e,t){const n=[];for(let r=0,s=e.shapes.length;r<s;r++){const o=t[e.shapes[r]];n.push(o)}return new R1(n,e.curveSegments)}}function LH(i,e){if(e.shapes=[],Array.isArray(i))for(let t=0,n=i.length;t<n;t++){const r=i[t];e.shapes.push(r.uuid)}else e.shapes.push(i.uuid);return e}class dh extends Rt{constructor(e=1,t=32,n=16,r=0,s=Math.PI*2,o=0,a=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:r,phiLength:s,thetaStart:o,thetaLength:a},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const l=Math.min(o+a,Math.PI);let c=0;const u=[],d=new H,p=new H,m=[],x=[],v=[],_=[];for(let g=0;g<=n;g++){const S=[],b=g/n;let A=0;g===0&&o===0?A=.5/t:g===n&&l===Math.PI&&(A=-.5/t);for(let w=0;w<=t;w++){const C=w/t;d.x=-e*Math.cos(r+C*s)*Math.sin(o+b*a),d.y=e*Math.cos(o+b*a),d.z=e*Math.sin(r+C*s)*Math.sin(o+b*a),x.push(d.x,d.y,d.z),p.copy(d).normalize(),v.push(p.x,p.y,p.z),_.push(C+A,1-b),S.push(c++)}u.push(S)}for(let g=0;g<n;g++)for(let S=0;S<t;S++){const b=u[g][S+1],A=u[g][S],w=u[g+1][S],C=u[g+1][S+1];(g!==0||o>0)&&m.push(b,A,C),(g!==n-1||l<Math.PI)&&m.push(A,w,C)}this.setIndex(m),this.setAttribute("position",new ct(x,3)),this.setAttribute("normal",new ct(v,3)),this.setAttribute("uv",new ct(_,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new dh(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class P1 extends Cc{constructor(e=1,t=0){const n=[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],r=[2,1,0,0,3,2,1,3,0,2,3,1];super(n,r,e,t),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new P1(e.radius,e.detail)}}class I1 extends Rt{constructor(e=1,t=.4,n=12,r=48,s=Math.PI*2){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:n,tubularSegments:r,arc:s},n=Math.floor(n),r=Math.floor(r);const o=[],a=[],l=[],c=[],u=new H,d=new H,p=new H;for(let m=0;m<=n;m++)for(let x=0;x<=r;x++){const v=x/r*s,_=m/n*Math.PI*2;d.x=(e+t*Math.cos(_))*Math.cos(v),d.y=(e+t*Math.cos(_))*Math.sin(v),d.z=t*Math.sin(_),a.push(d.x,d.y,d.z),u.x=e*Math.cos(v),u.y=e*Math.sin(v),p.subVectors(d,u).normalize(),l.push(p.x,p.y,p.z),c.push(x/r),c.push(m/n)}for(let m=1;m<=n;m++)for(let x=1;x<=r;x++){const v=(r+1)*m+x-1,_=(r+1)*(m-1)+x-1,g=(r+1)*(m-1)+x,S=(r+1)*m+x;o.push(v,_,S),o.push(_,g,S)}this.setIndex(o),this.setAttribute("position",new ct(a,3)),this.setAttribute("normal",new ct(l,3)),this.setAttribute("uv",new ct(c,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new I1(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class L1 extends Rt{constructor(e=1,t=.4,n=64,r=8,s=2,o=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:n,radialSegments:r,p:s,q:o},n=Math.floor(n),r=Math.floor(r);const a=[],l=[],c=[],u=[],d=new H,p=new H,m=new H,x=new H,v=new H,_=new H,g=new H;for(let b=0;b<=n;++b){const A=b/n*s*Math.PI*2;S(A,s,o,e,m),S(A+.01,s,o,e,x),_.subVectors(x,m),g.addVectors(x,m),v.crossVectors(_,g),g.crossVectors(v,_),v.normalize(),g.normalize();for(let w=0;w<=r;++w){const C=w/r*Math.PI*2,P=-t*Math.cos(C),B=t*Math.sin(C);d.x=m.x+(P*g.x+B*v.x),d.y=m.y+(P*g.y+B*v.y),d.z=m.z+(P*g.z+B*v.z),l.push(d.x,d.y,d.z),p.subVectors(d,m).normalize(),c.push(p.x,p.y,p.z),u.push(b/n),u.push(w/r)}}for(let b=1;b<=n;b++)for(let A=1;A<=r;A++){const w=(r+1)*(b-1)+(A-1),C=(r+1)*b+(A-1),P=(r+1)*b+A,B=(r+1)*(b-1)+A;a.push(w,C,B),a.push(C,P,B)}this.setIndex(a),this.setAttribute("position",new ct(l,3)),this.setAttribute("normal",new ct(c,3)),this.setAttribute("uv",new ct(u,2));function S(b,A,w,C,P){const B=Math.cos(b),R=Math.sin(b),E=w/A*b,L=Math.cos(E);P.x=C*(2+L)*.5*B,P.y=C*(2+L)*R*.5,P.z=C*Math.sin(E)*.5}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new L1(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}class B1 extends Rt{constructor(e=new Mw(new H(-1,-1,0),new H(-1,1,0),new H(1,1,0)),t=64,n=1,r=8,s=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:r,closed:s};const o=e.computeFrenetFrames(t,s);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;const a=new H,l=new H,c=new xe;let u=new H;const d=[],p=[],m=[],x=[];v(),this.setIndex(x),this.setAttribute("position",new ct(d,3)),this.setAttribute("normal",new ct(p,3)),this.setAttribute("uv",new ct(m,2));function v(){for(let b=0;b<t;b++)_(b);_(s===!1?t:0),S(),g()}function _(b){u=e.getPointAt(b/t,u);const A=o.normals[b],w=o.binormals[b];for(let C=0;C<=r;C++){const P=C/r*Math.PI*2,B=Math.sin(P),R=-Math.cos(P);l.x=R*A.x+B*w.x,l.y=R*A.y+B*w.y,l.z=R*A.z+B*w.z,l.normalize(),p.push(l.x,l.y,l.z),a.x=u.x+n*l.x,a.y=u.y+n*l.y,a.z=u.z+n*l.z,d.push(a.x,a.y,a.z)}}function g(){for(let b=1;b<=t;b++)for(let A=1;A<=r;A++){const w=(r+1)*(b-1)+(A-1),C=(r+1)*b+(A-1),P=(r+1)*b+A,B=(r+1)*(b-1)+A;x.push(w,C,B),x.push(C,P,B)}}function S(){for(let b=0;b<=t;b++)for(let A=0;A<=r;A++)c.x=b/t,c.y=A/r,m.push(c.x,c.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 B1(new wy[e.path.type]().fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class ww extends Rt{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},e!==null){const t=[],n=new Set,r=new H,s=new H;if(e.index!==null){const o=e.attributes.position,a=e.index;let l=e.groups;l.length===0&&(l=[{start:0,count:a.count,materialIndex:0}]);for(let c=0,u=l.length;c<u;++c){const d=l[c],p=d.start,m=d.count;for(let x=p,v=p+m;x<v;x+=3)for(let _=0;_<3;_++){const g=a.getX(x+_),S=a.getX(x+(_+1)%3);r.fromBufferAttribute(o,g),s.fromBufferAttribute(o,S),cR(r,s,n)===!0&&(t.push(r.x,r.y,r.z),t.push(s.x,s.y,s.z))}}}else{const o=e.attributes.position;for(let a=0,l=o.count/3;a<l;a++)for(let c=0;c<3;c++){const u=3*a+c,d=3*a+(c+1)%3;r.fromBufferAttribute(o,u),s.fromBufferAttribute(o,d),cR(r,s,n)===!0&&(t.push(r.x,r.y,r.z),t.push(s.x,s.y,s.z))}}this.setAttribute("position",new ct(t,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}function cR(i,e,t){const n=`${i.x},${i.y},${i.z}-${e.x},${e.y},${e.z}`,r=`${e.x},${e.y},${e.z}-${i.x},${i.y},${i.z}`;return t.has(n)===!0||t.has(r)===!0?!1:(t.add(n),t.add(r),!0)}var uR=Object.freeze({__proto__:null,BoxGeometry:td,CapsuleGeometry:S1,CircleGeometry:b1,ConeGeometry:$m,CylinderGeometry:Qm,DodecahedronGeometry:M1,EdgesGeometry:AD,ExtrudeGeometry:w1,IcosahedronGeometry:T1,LatheGeometry:E1,OctahedronGeometry:e0,PlaneGeometry:ks,PolyhedronGeometry:Cc,RingGeometry:C1,ShapeGeometry:R1,SphereGeometry:dh,TetrahedronGeometry:P1,TorusGeometry:I1,TorusKnotGeometry:L1,TubeGeometry:B1,WireframeGeometry:ww});class DD extends Wn{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new Ve(0),this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.fog=e.fog,this}}class D1 extends dn{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class dl extends Wn{constructor(e){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new Ve(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 Ve(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=wc,this.normalScale=new xe(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 Ys,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 oi extends dl{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 xe(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return It(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 Ve(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 Ve(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new Ve(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 Tw extends Wn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Ve(16777215),this.specular=new Ve(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ve(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=wc,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Ys,this.combine=Wm,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class FD extends Wn{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Ve(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ve(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=wc,this.normalScale=new xe(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 ND extends Wn{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=wc,this.normalScale=new xe(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 kD extends Wn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Ve(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,th
vendor: 4,669 bytes, line 116
116is.emissive=new Ve(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=wc,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Ys,this.combine=Wm,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class Ew extends Wn{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=iD,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 Cw extends Wn{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 OD extends Wn{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Ve(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=wc,this.normalScale=new xe(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 UD extends Ai{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 _u(i,e){return!i||i.constructor===e?i:typeof e.BYTES_PER_ELEMENT=="number"?new e(i):Array.prototype.slice.call(i)}function zD(i){function e(r,s){return i[r]-i[s]}const t=i.length,n=new Array(t);for(let r=0;r!==t;++r)n[r]=r;return n.sort(e),n}function vM(i,e,t){const n=i.length,r=new i.constructor(n);for(let s=0,o=0;o!==n;++s){const a=t[s]*e;for(let l=0;l!==e;++l)r[o++]=i[a+l]}return r}function Rw(i,e,t,n){let r=1,s=i[0];for(;s!==void 0&&s[n]===void 0;)s=i[r++];if(s===void 0)return;let o=s[n];if(o!==void 0)if(Array.isArray(o))do o=s[n],o!==void 0&&(e.push(s.time),t.push(...o)),s=i[r++];while(s!==void 0);else if(o.toArray!==void 0)do o=s[n],o!==void 0&&(e.push(s.time),o.toArray(t,t.length)),s=i[r++];while(s!==void 0);else do o=s[n],o!==void 0&&(e.push(s.time),t.push(o)),s=i[r++];while(s!==void 0)}
vendor: 8,461 bytes, line 116
116function BH(i,e,t,n,r=30){const s=i.clone();s.name=e;const o=[];for(let l=0;l<s.tracks.length;++l){const c=s.tracks[l],u=c.getValueSize(),d=[],p=[];for(let m=0;m<c.times.length;++m){const x=c.times[m]*r;if(!(x<t||x>=n)){d.push(c.times[m]);for(let v=0;v<u;++v)p.push(c.values[m*u+v])}}d.length!==0&&(c.times=_u(d,c.times.constructor),c.values=_u(p,c.values.constructor),o.push(c))}s.tracks=o;let a=1/0;for(let l=0;l<s.tracks.length;++l)a>s.tracks[l].times[0]&&(a=s.tracks[l].times[0]);for(let l=0;l<s.tracks.length;++l)s.tracks[l].shift(-1*a);return s.resetDuration(),s}function DH(i,e=0,t=i,n=30){n<=0&&(n=30);const r=t.tracks.length,s=e/n;for(let o=0;o<r;++o){const a=t.tracks[o],l=a.ValueTypeName;if(l==="bool"||l==="string")continue;const c=i.tracks.find(function(g){return g.name===a.name&&g.ValueTypeName===l});if(c===void 0)continue;let u=0;const d=a.getValueSize();a.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(u=d/3);let p=0;const m=c.getValueSize();c.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(p=m/3);const x=a.times.length-1;let v;if(s<=a.times[0]){const g=u,S=d-u;v=a.values.slice(g,S)}else if(s>=a.times[x]){const g=x*d+u,S=g+d-u;v=a.values.slice(g,S)}else{const g=a.createInterpolant(),S=u,b=d-u;g.evaluate(s),v=g.resultBuffer.slice(S,b)}l==="quaternion"&&new si().fromArray(v).normalize().conjugate().toArray(v);const _=c.times.length;for(let g=0;g<_;++g){const S=g*m+p;if(l==="quaternion")si.multiplyQuaternionsFlat(c.values,S,v,0,c.values,S);else{const b=m-p*2;for(let A=0;A<b;++A)c.values[S+A]-=v[A]}}}return i.blendMode=cw,i}class FH{static convertArray(e,t){return _u(e,t)}static isTypedArray(e){return fD(e)}static getKeyframeOrder(e){return zD(e)}static sortedArray(e,t,n){return vM(e,t,n)}static flattenJSON(e,t,n,r){Rw(e,t,n,r)}static subclip(e,t,n,r,s=30){return BH(e,t,n,r,s)}static makeClipAdditive(e,t=0,n=e,r=30){return DH(e,t,n,r)}}class nd{constructor(e,t,n,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=r!==void 0?r:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,r=t[n],s=t[n-1];e:{t:{let o;n:{i:if(!(e<r)){for(let a=n+2;;){if(r===void 0){if(e<s)break i;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===a)break;if(s=r,r=t[++n],e<r)break t}o=t.length;break n}if(!(e>=s)){const a=t[1];e<a&&(n=2,s=a);for(let l=n-2;;){if(s===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(n===l)break;if(r=s,s=t[--n-1],e>=s)break t}o=n,n=0;break n}break e}for(;n<o;){const a=n+o>>>1;e<t[a]?o=a:n=a+1}if(r=t[n],s=t[n-1],s===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(r===void 0)return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,s,r)}return this.interpolate_(n,s,e,r)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,s=e*r;for(let o=0;o!==r;++o)t[o]=n[s+o];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class HD extends nd{constructor(e,t,n,r){super(e,t,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:vu,endingEnd:vu}}intervalChanged_(e,t,n){const r=this.parameterPositions;let s=e-2,o=e+1,a=r[s],l=r[o];if(a===void 0)switch(this.getSettings_().endingStart){case yu:s=e,a=2*t-n;break;case Tm:s=r.length-2,a=t+r[s]-r[s+1];break;default:s=e,a=n}if(l===void 0)switch(this.getSettings_().endingEnd){case yu:o=e,l=2*n-t;break;case Tm:o=1,l=n+r[1]-r[0];break;default:o=e-1,l=t}const c=(n-t)*.5,u=this.valueSize;this._weightPrev=c/(t-a),this._weightNext=c/(l-n),this._offsetPrev=s*u,this._offsetNext=o*u}interpolate_(e,t,n,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=e*a,c=l-a,u=this._offsetPrev,d=this._offsetNext,p=this._weightPrev,m=this._weightNext,x=(n-t)/(r-t),v=x*x,_=v*x,g=-p*_+2*p*v-p*x,S=(1+p)*_+(-1.5-2*p)*v+(-.5+p)*x+1,b=(-1-m)*_+(1.5+m)*v+.5*x,A=m*_-m*v;for(let w=0;w!==a;++w)s[w]=g*o[u+w]+S*o[c+w]+b*o[l+w]+A*o[d+w];return s}}class Pw extends nd{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=e*a,c=l-a,u=(n-t)/(r-t),d=1-u;for(let p=0;p!==a;++p)s[p]=o[c+p]*d+o[l+p]*u;return s}}class GD extends nd{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e){return this.copySampleValue_(e-1)}}class Ao{constructor(e,t,n,r){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=_u(t,this.TimeBufferType),this.values=_u(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:_u(e.times,Array),values:_u(e.values,Array)};const r=e.getInterpolation();r!==e.DefaultInterpolation&&(n.interpolation=r)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new GD(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new Pw(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new HD(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case Yu:t=this.InterpolantFactoryMethodDiscrete;break;case vc:t=this.InterpolantFactoryMethodLinear;break;case qx:t=this.InterpolantFactoryMethodSmooth;break}if(t===void 0){const n="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(n);return at("KeyframeTrack:",n),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Yu;case this.InterpolantFactoryMethodLinear:return vc;case this.InterpolantFactoryMethodSmooth:return qx}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]+=e}return this}scale(e){if(e!==1){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]*=e}return this}trim(e,t){const n=this.times,r=n.length;let s=0,o=r-1;for(;s!==r&&n[s]<e;)++s;for(;o!==-1&&n[o]>t;)--o;if(++o,s!==0||o!==r){s>=o&&(o=Math.max(o,1),s=o-1);const a=this.getValueSize();this.times=n.slice(s,o),this.values=this.values.slice(s*a,o*a)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(bt("KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,r=this.values,s=n.length;s===0&&(bt("KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==s;a++){const l=n[a];if(typeof l=="number"&&isNaN(l)){bt("KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){bt("KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(r!==void 0&&fD(r))for(let a=0,l=r.length;a!==l;++a){const c=r[a];if(isNaN(c)){bt("KeyframeTrack: Value is not a valid number.",this,a,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),r=this.getInterpolation()===qx,s=e.length-1;let o=1;for(let a=1;a<s;++a){let l=!1;const c=e[a],u=e[a+1];if(c!==u&&(a!==1||c!==e[0]))if(r)l=!0;else{const d=a*n,p=d-n,m=d+n;for(let x=0;x!==n;++x){const v=t[d+x];if(v!==t[p+x]||v!==t[m+x]){l=!0;break}}}if(l){if(a!==o){e[o]=e[a];const d=a*n,p=o*n;for(let m=0;m!==n;++m)t[p+m]=t[d+m]}++o}}if(s>0){e[o]=e[s];for(let a=s*n,l=o*n,c=0;c!==n;++c)t[l+c]=t[a+c];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*n)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),n=this.constructor,r=new n(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}}Ao.prototype.ValueTypeName="";Ao.prototype.TimeBufferType=Float32Array;Ao.prototype.ValueBufferType=Float32Array;Ao.prototype.DefaultInterpolation=vc;class id extends Ao{constructor(e,t,n){super(e,t,n)}}id.prototype.ValueTypeName="bool";id.prototype.ValueBufferType=Array;id.prototype.DefaultInterpolation=Yu;id.prototype.InterpolantFactoryMethodLinear=void 0;id.prototype.InterpolantFactoryMethodSmooth=void 0;class Iw extends Ao{constructor(e,t,n,r){super(e,t,n,r)}}
vendor: 4,182 bytes, line 116
116Iw.prototype.ValueTypeName="color";class al extends Ao{constructor(e,t,n,r){super(e,t,n,r)}}al.prototype.ValueTypeName="number";class jD extends nd{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(n-t)/(r-t);let c=e*a;for(let u=c+a;c!==u;c+=4)si.slerpFlat(s,0,o,c-a,o,c,l);return s}}class ll extends Ao{constructor(e,t,n,r){super(e,t,n,r)}InterpolantFactoryMethodLinear(e){return new jD(this.times,this.values,this.getValueSize(),e)}}ll.prototype.ValueTypeName="quaternion";ll.prototype.InterpolantFactoryMethodSmooth=void 0;class rd extends Ao{constructor(e,t,n){super(e,t,n)}}rd.prototype.ValueTypeName="string";rd.prototype.ValueBufferType=Array;rd.prototype.DefaultInterpolation=Yu;rd.prototype.InterpolantFactoryMethodLinear=void 0;rd.prototype.InterpolantFactoryMethodSmooth=void 0;class cl extends Ao{constructor(e,t,n,r){super(e,t,n,r)}}cl.prototype.ValueTypeName="vector";class qu{constructor(e="",t=-1,n=[],r=c1){this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=Hs(),this.userData={},this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,r=1/(e.fps||1);for(let o=0,a=n.length;o!==a;++o)t.push(kH(n[o]).scale(r));const s=new this(e.name,e.duration,t,e.blendMode);return s.uuid=e.uuid,s.userData=JSON.parse(e.userData||"{}"),s}static toJSON(e){const t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode,userData:JSON.stringify(e.userData)};for(let s=0,o=n.length;s!==o;++s)t.push(Ao.toJSON(n[s]));return r}static CreateFromMorphTargetSequence(e,t,n,r){const s=t.length,o=[];for(let a=0;a<s;a++){let l=[],c=[];l.push((a+s-1)%s,a,(a+1)%s),c.push(0,1,0);const u=zD(l);l=vM(l,1,u),c=vM(c,1,u),!r&&l[0]===0&&(l.push(s),c.push(c[0])),o.push(new al(".morphTargetInfluences["+t[a].name+"]",l,c).scale(1/n))}return new this(e,-1,o)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const r=e;n=r.geometry&&r.geometry.animations||r.animations}for(let r=0;r<n.length;r++)if(n[r].name===t)return n[r];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const r={},s=/^([\w-]*?)([\d]+)$/;for(let a=0,l=e.length;a<l;a++){const c=e[a],u=c.name.match(s);if(u&&u.length>1){const d=u[1];let p=r[d];p||(r[d]=p=[]),p.push(c)}}const o=[];for(const a in r)o.push(this.CreateFromMorphTargetSequence(a,r[a],t,n));return o}static parseAnimation(e,t){if(at("AnimationClip: parseAnimation() is deprecated and will be removed with r185"),!e)return bt("AnimationClip: No animation in JSONLoader data."),null;const n=function(d,p,m,x,v){if(m.length!==0){const _=[],g=[];Rw(m,_,g,x),_.length!==0&&v.push(new d(p,_,g))}},r=[],s=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let d=0;d<c.length;d++){const p=c[d].keys;if(!(!p||p.length===0))if(p[0].morphTargets){const m={};let x;for(x=0;x<p.length;x++)if(p[x].morphTargets)for(let v=0;v<p[x].morphTargets.length;v++)m[p[x].morphTargets[v]]=-1;for(const v in m){const _=[],g=[];for(let S=0;S!==p[x].morphTargets.length;++S){const b=p[x];_.push(b.time),g.push(b.morphTarget===v?1:0)}r.push(new al(".morphTargetInfluence["+v+"]",_,g))}l=m.length*o}else{const m=".bones["+t[d].name+"]";n(cl,m+".position",p,"pos",r),n(ll,m+".quaternion",p,"rot",r),n(cl,m+".scale",p,"scl",r)}}return r.length===0?null:new this(s,l,r,a)}resetDuration(){const e=this.tracks;let t=0;for(let n=0,r=e.length;n!==r;++n){const s=this.tracks[n];t=Math.max(t,s.times[s.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 n=0;n<this.tracks.length;n++)e.push(this.tracks[n].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 NH(i){switch(i.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return al;
vendor: 6,582 bytes, line 116
116case"vector":case"vector2":case"vector3":case"vector4":return cl;case"color":return Iw;case"quaternion":return ll;case"bool":case"boolean":return id;case"string":return rd}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+i)}function kH(i){if(i.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=NH(i.type);if(i.times===void 0){const t=[],n=[];Rw(i.keys,t,n,"value"),i.times=t,i.values=n}return e.parse!==void 0?e.parse(i):new e(i.name,i.times,i.values,i.interpolation)}const ma={enabled:!1,files:{},add:function(i,e){this.enabled!==!1&&(this.files[i]=e)},get:function(i){if(this.enabled!==!1)return this.files[i]},remove:function(i){delete this.files[i]},clear:function(){this.files={}}};class Lw{constructor(e,t,n){const r=this;let s=!1,o=0,a=0,l;const c=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this._abortController=null,this.itemStart=function(u){a++,s===!1&&r.onStart!==void 0&&r.onStart(u,o,a),s=!0},this.itemEnd=function(u){o++,r.onProgress!==void 0&&r.onProgress(u,o,a),o===a&&(s=!1,r.onLoad!==void 0&&r.onLoad())},this.itemError=function(u){r.onError!==void 0&&r.onError(u)},this.resolveURL=function(u){return l?l(u):u},this.setURLModifier=function(u){return l=u,this},this.addHandler=function(u,d){return c.push(u,d),this},this.removeHandler=function(u){const d=c.indexOf(u);return d!==-1&&c.splice(d,2),this},this.getHandler=function(u){for(let d=0,p=c.length;d<p;d+=2){const m=c[d],x=c[d+1];if(m.global&&(m.lastIndex=0),m.test(u))return x}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 WD=new Lw;class Ki{constructor(e){this.manager=e!==void 0?e:WD,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise(function(r,s){n.load(e,r,t,s)})}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}}Ki.DEFAULT_MATERIAL_NAME="__DEFAULT";const ka={};class OH extends Error{constructor(e,t){super(e),this.response=t}}class Er extends Ki{constructor(e){super(e),this.mimeType="",this.responseType="",this._abortController=new AbortController}load(e,t,n,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=ma.get(`file:${e}`);if(s!==void 0)return this.manager.itemStart(e),setTimeout(()=>{t&&t(s),this.manager.itemEnd(e)},0),s;if(ka[e]!==void 0){ka[e].push({onLoad:t,onProgress:n,onError:r});return}ka[e]=[],ka[e].push({onLoad:t,onProgress:n,onError:r});const o=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}),a=this.mimeType,l=this.responseType;fetch(o).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&at("FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const u=ka[e],d=c.body.getReader(),p=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),m=p?parseInt(p):0,x=m!==0;let v=0;const _=new ReadableStream({start(g){S();function S(){d.read().then(({done:b,value:A})=>{if(b)g.close();else{v+=A.byteLength;const w=new ProgressEvent("progress",{lengthComputable:x,loaded:v,total:m});for(let C=0,P=u.length;C<P;C++){const B=u[C];B.onProgress&&B.onProgress(w)}g.enqueue(A),S()}},b=>{g.error(b)})}}});return new Response(_)}else throw new OH(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(u=>new DOMParser().parseFromString(u,a));case"json":return c.json();default:if(a==="")return c.text();{const d=/charset="?([^;"\s]*)"?/i.exec(a),p=d&&d[1]?d[1].toLowerCase():void 0,m=new TextDecoder(p);return c.arrayBuffer().then(x=>m.decode(x))}}}).then(c=>{ma.add(`file:${e}`,c);const u=ka[e];delete ka[e];for(let d=0,p=u.length;d<p;d++){const m=u[d];m.onLoad&&m.onLoad(c)}}).catch(c=>{const u=ka[e];if(u===void 0)throw this.manager.itemError(e),c;delete ka[e];for(let d=0,p=u.length;d<p;d++){const m=u[d];m.onError&&m.onError(c)}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 UH extends Ki{constructor(e){super(e)}load(e,t,n,r){const s=this,o=new Er(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{t(s.parse(JSON.parse(a)))}catch(l){r?r(l):bt(l),s.manager.itemError(e)}},n,r)}parse(e){const t=[];for(let n=0;n<e.length;n++){const r=qu.parse(e[n]);t.push(r)}return t}}class zH extends Ki{constructor(e){super(e)}load(e,t,n,r){const s=this,o=[],a=new _1,l=new Er(this.manager);l.setPath(this.path),l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setWithCredentials(s.withCredentials);let c=0;function u(d){l.load(e[d],function(p){const m=s.parse(p,!0);o[d]={width:m.width,height:m.height,format:m.format,mipmaps:m.mipmaps},c+=1,c===6&&(m.mipmapCount===1&&(a.minFilter=jt),a.image=o,a.format=m.format,a.needsUpdate=!0,t&&t(a))},n,r)}if(Array.isArray(e))for(let d=0,p=e.length;d<p;++d)u(d);else l.load(e,function(d){const p=s.parse(d,!0);if(p.isCubemap){const m=p.mipmaps.length/p.mipmapCount;for(let x=0;x<m;x++){o[x]={mipmaps:[]};for(let v=0;v<p.mipmapCount;v++)o[x].mipmaps.push(p.mipmaps[x*p.mipmapCount+v]),o[x].format=p.format,o[x].width=p.width,o[x].height=p.height}a.image=o}else a.image.width=p.width,a.image.height=p.height,a.mipmaps=p.mipmaps;p.mipmapCount===1&&(a.minFilter=jt),a.format=p.format,a.needsUpdate=!0,t&&t(a)},n,r);return a}}const Hd=new WeakMap;class Dm extends Ki{constructor(e){super(e)}load(e,t,n,r){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=ma.get(`image:${e}`);if(o!==void 0){if(o.complete===!0)s.manager.itemStart(e),setTimeout(function(){t&&t(o),s.manager.itemEnd(e)},0);
116else{let d=Hd.get(o);d===void 0&&(d=[],Hd.set(o,d)),d.push({onLoad:t,onError:r})}return o}const a=Rm("img");function l(){u(),t&&t(this);const d=Hd.get(this)||[];for(let p=0;p<d.length;p++){const m=d[p];m.onLoad&&m.onLoad(this)}Hd.delete(this),s.manager.itemEnd(e)}function c(d){u(),r&&r(d),ma.remove(`image:${e}`);const p=Hd.get(this)||[];for(let m=0;m<p.length;m++){const x=p[m];x.onError&&x.onError(d)}Hd.delete(this),s.manager.itemError(e),s.manager.itemEnd(e)}function u(){a.removeEventListener("load",l,!1),a.removeEventListener("error",c,!1)}return a.addEventListener("load",l,!1),a.addEventListener("error",c,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(a.crossOrigin=this.crossOrigin),ma.add(`image:${e}`,a),s.manager.itemStart(e),a.src=e,a}}class HH extends Ki{constructor(e){super(e)}load(e,t,n,r){const s=new qm;s.colorSpace=Un;const o=new Dm(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);let a=0;function l(c){o.load(e[c],function(u){s.images[c]=u,a++,a===6&&(s.needsUpdate=!0,t&&t(s))},void 0,r)}for(let c=0;c<e.length;++c)l(c);return s}}class GH extends Ki{constructor(e){super(e)}load(e,t,n,r){const s=this,o=new Wo,a=new Er(this.manager);return a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setPath(this.path),a.setWithCredentials(s.withCredentials),a.load(e,function(l){let c;try{c=s.parse(l)}catch(u){if(r!==void 0)r(u);else{u(u);return}}c.image!==void 0?o.image=c.image:c.data!==void 0&&(o.image.width=c.width,o.image.height=c.height,o.image.data=c.data),o.wrapS=c.wrapS!==void 0?c.wrapS:Mr,o.wrapT=c.wrapT!==void 0?c.wrapT:Mr,o.magFilter=c.magFilter!==void 0?c.magFilter:jt,o.minFilter=c.minFilter!==void 0?c.minFilter:jt,o.anisotropy=c.anisotropy!==void 0?c.anisotropy:1,c.colorSpace!==void 0&&(o.colorSpace
vendor: 4,433 bytes, line 116
116=c.colorSpace),c.flipY!==void 0&&(o.flipY=c.flipY),c.format!==void 0&&(o.format=c.format),c.type!==void 0&&(o.type=c.type),c.mipmaps!==void 0&&(o.mipmaps=c.mipmaps,o.minFilter=as),c.mipmapCount===1&&(o.minFilter=jt),c.generateMipmaps!==void 0&&(o.generateMipmaps=c.generateMipmaps),o.needsUpdate=!0,t&&t(o,c)},n,r),o}}class fl extends Ki{constructor(e){super(e)}load(e,t,n,r){const s=new Sn,o=new Dm(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(a){s.image=a,s.needsUpdate=!0,t!==void 0&&t(s)},n,r),s}}class Rc extends Wt{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new Ve(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 VD extends Rc{constructor(e,t,n){super(e,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(Wt.DEFAULT_UP),this.updateMatrix(),this.groundColor=new Ve(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 lS=new _t,dR=new H,fR=new H;class Bw{constructor(e){this.camera=e,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new xe(512,512),this.mapType=jr,this.map=null,this.mapPass=null,this.matrix=new _t,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new uh,this._frameExtents=new xe(1,1),this._viewportCount=1,this._viewports=[new on(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;dR.setFromMatrixPosition(e.matrixWorld),t.position.copy(dR),fR.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(fR),t.updateMatrixWorld(),lS.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(lS,t.coordinateSystem,t.reversedDepth),t.reversedDepth?n.set(.5,0,0,.5,0,.5,0,.5,0,0,1,0,0,0,0,1):n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(lS)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.intensity=e.intensity,this.bias=e.bias,this.radius=e.radius,this.autoUpdate=e.autoUpdate,this.needsUpdate=e.needsUpdate,this.normalBias=e.normalBias,this.blurSamples=e.blurSamples,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){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}}class jH extends Bw{constructor(){super(new wn(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1,this.aspect=1}updateMatrices(e){const t=this.camera,n=Zf*2*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height*this.aspect,s=e.distance||t.far;(n!==t.fov||r!==t.aspect||s!==t.far)&&(t.fov=n,t.aspect=r,t.far=s,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class F1 extends Rc{constructor(e,t,n=0,r=Math.PI/3,s=0,o=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(Wt.DEFAULT_UP),this.updateMatrix(),this.target=new Wt,this.distance=n,this.angle=r,this.penumbra=s,this.decay=o,this.map=null,this.shadow=new jH}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 WH extends Bw{constructor(){super(new wn(90,1,.5,500)),this.isPointLightShadow=!0}
vendor: 20,874 bytes, line 116
116}class t0 extends Rc{constructor(e,t,n=0,r=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=r,this.shadow=new WH}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 or extends Km{constructor(e=-1,t=1,n=1,r=-1,s=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=s,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,s,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let s=n-e,o=n+e,a=r+t,l=r-t;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=c*this.view.offsetX,o=s+c*this.view.width,a-=u*this.view.offsetY,l=a-u*this.view.height}this.projectionMatrix.makeOrthographic(s,o,a,l,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 VH extends Bw{constructor(){super(new or(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class th extends Rc{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Wt.DEFAULT_UP),this.updateMatrix(),this.target=new Wt,this.shadow=new VH}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 Dw extends Rc{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class XD extends Rc{constructor(e,t,n=10,r=10){super(e,t),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=n,this.height=r}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 Fw{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new H)}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 n=e.x,r=e.y,s=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.282095),t.addScaledVector(o[1],.488603*r),t.addScaledVector(o[2],.488603*s),t.addScaledVector(o[3],.488603*n),t.addScaledVector(o[4],1.092548*(n*r)),t.addScaledVector(o[5],1.092548*(r*s)),t.addScaledVector(o[6],.315392*(3*s*s-1)),t.addScaledVector(o[7],1.092548*(n*s)),t.addScaledVector(o[8],.546274*(n*n-r*r)),t}getIrradianceAt(e,t){const n=e.x,r=e.y,s=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.886227),t.addScaledVector(o[1],2*.511664*r),t.addScaledVector(o[2],2*.511664*s),t.addScaledVector(o[3],2*.511664*n),t.addScaledVector(o[4],2*.429043*n*r),t.addScaledVector(o[5],2*.429043*r*s),t.addScaledVector(o[6],.743125*s*s-.247708),t.addScaledVector(o[7],2*.429043*n*s),t.addScaledVector(o[8],.429043*(n*n-r*r)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return new this.constructor().copy(this)}fromArray(e,t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].fromArray(e,t+r*3);return this}toArray(e=[],t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].toArray(e,t+r*3);return e}static getBasisAt(e,t){const n=e.x,r=e.y,s=e.z;t[0]=.282095,t[1]=.488603*r,t[2]=.488603*s,t[3]=.488603*n,t[4]=1.092548*n*r,t[5]=1.092548*r*s,t[6]=.315392*(3*s*s-1),t[7]=1.092548*n*s,t[8]=.546274*(n*n-r*r)}}class YD extends Rc{constructor(e=new Fw,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 N1 extends Ki{constructor(e){super(e),this.textures={}}load(e,t,n,r){const s=this,o=new Er(s.manager);o.setPath(s.path),o.setRequestHeader(s.requestHeader),o.setWithCredentials(s.withCredentials),o.load(e,function(a){try{t(s.parse(JSON.parse(a)))}catch(l){r?r(l):bt(l),s.manager.itemError(e)}},n,r)}parse(e){const t=this.textures;function n(s){return t[s]===void 0&&at("MaterialLoader: Undefined texture",s),t[s]}const r=this.createMaterialFromType(e.type);if(e.uuid!==void 0&&(r.uuid=e.uuid),e.name!==void 0&&(r.name=e.name),e.color!==void 0&&r.color!==void 0&&r.color.setHex(e.color),e.roughness!==void 0&&(r.roughness=e.roughness),e.metalness!==void 0&&(r.metalness=e.metalness),e.sheen!==void 0&&(r.sheen=e.sheen),e.sheenColor!==void 0&&(r.sheenColor=new Ve().setHex(e.sheenColor)),e.sheenRoughness!==void 0&&(r.sheenRoughness=e.sheenRoughness),e.emissive!==void 0&&r.emissive!==void 0&&r.emissive.setHex(e.emissive),e.specular!==void 0&&r.specular!==void 0&&r.specular.setHex(e.specular),e.specularIntensity!==void 0&&(r.specularIntensity=e.specularIntensity),e.specularColor!==void 0&&r.specularColor!==void 0&&r.specularColor.setHex(e.specularColor),e.shininess!==void 0&&(r.shininess=e.shininess),e.clearcoat!==void 0&&(r.clearcoat=e.clearcoat),e.clearcoatRoughness!==void 0&&(r.clearcoatRoughness=e.clearcoatRoughness),e.dispersion!==void 0&&(r.dispersion=e.dispersion),e.iridescence!==void 0&&(r.iridescence=e.iridescence),e.iridescenceIOR!==void 0&&(r.iridescenceIOR=e.iridescenceIOR),e.iridescenceThicknessRange!==void 0&&(r.iridescenceThicknessRange=e.iridescenceThicknessRange),e.transmission!==void 0&&(r.transmission=e.transmission),e.thickness!==void 0&&(r.thickness=e.thickness),e.attenuationDistance!==void 0&&(r.attenuationDistance=e.attenuationDistance),e.attenuationColor!==void 0&&r.attenuationColor!==void 0&&r.attenuationColor.setHex(e.attenuationColor),e.anisotropy!==void 0&&(r.anisotropy=e.anisotropy),e.anisotropyRotation!==void 0&&(r.anisotropyRotation=e.anisotropyRotation),e.fog!==void 0&&(r.fog=e.fog),e.flatShading!==void 0&&(r.flatShading=e.flatShading),e.blending!==void 0&&(r.blending=e.blending),e.combine!==void 0&&(r.combine=e.combine),e.side!==void 0&&(r.side=e.side),e.shadowSide!==void 0&&(r.shadowSide=e.shadowSide),e.opacity!==void 0&&(r.opacity=e.opacity),e.transparent!==void 0&&(r.transparent=e.transparent),e.alphaTest!==void 0&&(r.alphaTest=e.alphaTest),e.alphaHash!==void 0&&(r.alphaHash=e.alphaHash),e.depthFunc!==void 0&&(r.depthFunc=e.depthFunc),e.depthTest!==void 0&&(r.depthTest=e.depthTest),e.depthWrite!==void 0&&(r.depthWrite=e.depthWrite),e.colorWrite!==void 0&&(r.colorWrite=e.colorWrite),e.blendSrc!==void 0&&(r.blendSrc=e.blendSrc),e.blendDst!==void 0&&(r.blendDst=e.blendDst),e.blendEquation!==void 0&&(r.blendEquation=e.blendEquation),e.blendSrcAlpha!==void 0&&(r.blendSrcAlpha=e.blendSrcAlpha),e.blendDstAlpha!==void 0&&(r.blendDstAlpha=e.blendDstAlpha),e.blendEquationAlpha!==void 0&&(r.blendEquationAlpha=e.blendEquationAlpha),e.blendColor!==void 0&&r.blendColor!==void 0&&r.blendColor.setHex(e.blendColor),e.blendAlpha!==void 0&&(r.blendAlpha=e.blendAlpha),e.stencilWriteMask!==void 0&&(r.stencilWriteMask=e.stencilWriteMask),e.stencilFunc!==void 0&&(r.stencilFunc=e.stencilFunc),e.stencilRef!==void 0&&(r.stencilRef=e.stencilRef),e.stencilFuncMask!==void 0&&(r.stencilFuncMask=e.stencilFuncMask),e.stencilFail!==void 0&&(r.stencilFail=e.stencilFail),e.stencilZFail!==void 0&&(r.stencilZFail=e.stencilZFail),e.stencilZPass!==void 0&&(r.stencilZPass=e.stencilZPass),e.stencilWrite!==void 0&&(r.stencilWrite=e.stencilWrite),e.wireframe!==void 0&&(r.wireframe=e.wireframe),e.wireframeLinewidth!==void 0&&(r.wireframeLinewidth=e.wireframeLinewidth),e.wireframeLinecap!==void 0&&(r.wireframeLinecap=e.wireframeLinecap),e.wireframeLinejoin!==void 0&&(r.wireframeLinejoin=e.wireframeLinejoin),e.rotation!==void 0&&(r.rotation=e.rotation),e.linewidth!==void 0&&(r.linewidth=e.linewidth),e.dashSize!==void 0&&(r.dashSize=e.dashSize),e.gapSize!==void 0&&(r.gapSize=e.gapSize),e.scale!==void 0&&(r.scale=e.scale),e.polygonOffset!==void 0&&(r.polygonOffset=e.polygonOffset),e.polygonOffsetFactor!==void 0&&(r.polygonOffsetFactor=e.polygonOffsetFactor),e.polygonOffsetUnits!==void 0&&(r.polygonOffsetUnits=e.polygonOffsetUnits),e.dithering!==void 0&&(r.dithering=e.dithering),e.alphaToCoverage!==void 0&&(r.alphaToCoverage=e.alphaToCoverage),e.premultipliedAlpha!==void 0&&(r.premultipliedAlpha=e.premultipliedAlpha),e.forceSinglePass!==void 0&&(r.forceSinglePass=e.forceSinglePass),e.allowOverride!==void 0&&(r.allowOverride=e.allowOverride),e.visible!==void 0&&(r.visible=e.visible),e.toneMapped!==void 0&&(r.toneMapped=e.toneMapped),e.userData!==void 0&&(r.userData=e.userData),e.vertexColors!==void 0&&(typeof e.vertexColors=="number"?r.vertexColors=e.vertexColors>0:r.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const s in e.uniforms){const o=e.uniforms[s];switch(r.uniforms[s]={},o.type){case"t":r.uniforms[s].value=n(o.value);break;case"c":r.uniforms[s].value=new Ve().setHex(o.value);break;case"v2":r.uniforms[s].value=new xe().fromArray(o.value);break;case"v3":r.uniforms[s].value=new H().fromArray(o.value);break;case"v4":r.uniforms[s].value=new on().fromArray(o.value);break;case"m3":r.uniforms[s].value=new Nt().fromArray(o.value);break;case"m4":r.uniforms[s].value=new _t().fromArray(o.value);break;default:r.uniforms[s].value=o.value}}if(e.defines!==void 0&&(r.defines=e.defines),e.vertexShader!==void 0&&(r.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(r.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(r.glslVersion=e.glslVersion),e.extensions!==void 0)for(const s in e.extensions)r.extensions[s]=e.extensions[s];if(e.lights!==void 0&&(r.lights=e.lights),e.clipping!==void 0&&(r.clipping=e.clipping),e.size!==void 0&&(r.size=e.size),e.sizeAttenuation!==void 0&&(r.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(r.map=n(e.map)),e.matcap!==void 0&&(r.matcap=n(e.matcap)),e.alphaMap!==void 0&&(r.alphaMap=n(e.alphaMap)),e.bumpMap!==void 0&&(r.bumpMap=n(e.bumpMap)),e.bumpScale!==void 0&&(r.bumpScale=e.bumpScale),e.normalMap!==void 0&&(r.normalMap=n(e.normalMap)),e.normalMapType!==void 0&&(r.normalMapType=e.normalMapType),e.normalScale!==void 0){let s=e.normalScale;Array.isArray(s)===!1&&(s=[s,s]),r.normalScale=new xe().fromArray(s)}return e.displacementMap!==void 0&&(r.displacementMap=n(e.displacementMap)),e.displacementScale!==void 0&&(r.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(r.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(r.roughnessMap=n(e.roughnessMap)),e.metalnessMap!==void 0&&(r.metalnessMap=n(e.metalnessMap)),e.emissiveMap!==void 0&&(r.emissiveMap=n(e.emissiveMap)),e.emissiveIntensity!==void 0&&(r.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(r.specularMap=n(e.specularMap)),e.specularIntensityMap!==void 0&&(r.specularIntensityMap=n(e.specularIntensityMap)),e.specularColorMap!==void 0&&(r.specularColorMap=n(e.specularColorMap)),e.envMap!==void 0&&(r.envMap=n(e.envMap)),e.envMapRotation!==void 0&&r.envMapRotation.fromArray(e.envMapRotation),e.envMapIntensity!==void 0&&(r.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(r.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(r.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(r.lightMap=n(e.lightMap)),e.lightMapIntensity!==void 0&&(r.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(r.aoMap=n(e.aoMap)),e.aoMapIntensity!==void 0&&(r.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(r.gradientMap=n(e.gradientMap)),e.clearcoatMap!==void 0&&(r.clearcoatMap=n(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(r.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(r.clearcoatNormalMap=n(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(r.clearcoatNormalScale=new xe().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(r.iridescenceMap=n(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(r.iridescenceThicknessMap=n(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(r.transmissionMap=n(e.transmissionMap)),e.thicknessMap!==void 0&&(r.thicknessMap=n(e.thicknessMap)),e.anisotropyMap!==void 0&&(r.anisotropyMap=n(e.anisotropyMap)),e.sheenColorMap!==void 0&&(r.sheenColorMap=n(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(r.sheenRoughnessMap=n(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}createMaterialFromType(e){return N1.createMaterialFromType(e)}static createMaterialFromType(e){const t={ShadowMaterial:DD,SpriteMaterial:gw,RawShaderMaterial:D1,ShaderMaterial:dn,PointsMaterial:qa,MeshPhysicalMaterial:oi,MeshStandardMaterial:dl,MeshPhongMaterial:Tw,MeshToonMaterial:FD,MeshNormalMaterial:ND,MeshLambertMaterial:kD,MeshDepthMaterial:Ew,MeshDistanceMaterial:Cw,MeshBasicMaterial:pi,MeshMatcapMaterial:OD,LineDashedMaterial:UD,LineBasicMaterial:Ai,Material:Wn};return new t[e]}}class js{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 Nw extends Rt{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 JD extends Ki{constructor(e){super(e)}load(e,t,n,r){const s=this,o=new Er(s.manager);o.setPath(s.path),o.setRequestHeader(s.requestHeader),o.setWithCredentials(s.withCredentials),o.load(e,function(a){try{t(s.parse(JSON.parse(a)))}catch(l){r?r(l):bt(l),s.manager.itemError(e)}},n,r)}parse(e){const t={},n={};function r(m,x){if(t[x]!==void 0)return t[x];const _=m.interleavedBuffers[x],g=s(m,_.buffer),S=mf(_.type,g),b=new lh(S,_.stride);return b.uuid=_.uuid,t[x]=b,b}function s(m,x){if(n[x]!==void 0)return n[x];const _=m.arrayBuffers[x],g=new Uint32Array(_).buffer;return n[x]=g,g}const o=e.isInstancedBufferGeometry?new Nw:new Rt,a=e.data.index;if(a!==void 0){const m=mf(a.type,a.array);o.setIndex(new zt(m,1))}const l=e.data.attributes;for(const m in l){const x=l[m];let v;if(x.isInterleavedBufferAttribute){const _=r(e.data,x.data);v=new Xr(_,x.itemSize,x.offset,x.normalized)}else{const _=mf(x.type,x.array),g=x.isInstancedBufferAttribute?_c:zt;v=new g(_,x.itemSize,x.normalized)}x.name!==void 0&&(v.name=x.name),x.usage!==void 0&&v.setUsage(x.usage),o.setAttribute(m,v)}const c=e.data.morphAttributes;if(c)for(const m in c){const x=c[m],v=[];for(let _=0,g=x.length;_<g;_++){const S=x[_];let b;if(S.isInterleavedBufferAttribute){const A=r(e.data,S.data);b=new Xr(A,S.itemSize,S.offset,S.normalized)}else{const A=mf(S.type,S.array);b=new zt(A,S.itemSize,S.normalized)}S.name!==void 0&&(b.name=S.name),v.push(b)}o.morphAttributes[m]=v}e.data.morphTargetsRelative&&(o.morphTargetsRelative=!0);const d=e.data.groups||e.data.drawcalls||e.data.offsets;if(d!==void 0)for(let m=0,x=d.length;m!==x;++m){const v=d[m];o.addGroup(v.start,v.count,v.materialIndex)}const p=e.data.boundingSphere;return p!==void 0&&(o.boundingSphere=new mi().fromJSON(p)),e.name&&(o.name=e.name),e.userData&&(o.userData=e.userData),o}}class XH extends Ki{constructor(e){super(e)}load(e,t,n,r){const s=this,o=this.path===""?js.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||o;const a=new Er(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(l){let c=null;try{c=JSON.parse(l)}catch(d){r!==void 0&&r(d),d("ObjectLoader: Can't parse "+e+".",d.message);return}const u=c.metadata;if(u===void 0||u.type===void 0||u.type.toLowerCase()==="geometry"){r!==void 0&&r(new Error("THREE.ObjectLoader: Can't load "+e)),bt("ObjectLoader: Can't load "+e);return}s.parse(c,t)},n,r)}async loadAsync(e,t){const n=this,r=this.path===""?js.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||r;const s=new Er(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials);const o=await s.loadAsync(e,t),a=JSON.parse(o),l=a.metadata;if(l===void 0||l.type===void 0||l.type.toLowerCase()==="geometry")throw new Error("THREE.ObjectLoader: Can't load "+e);return await n.parseAsync(a)}parse(e,t){const n=this.parseAnimations(e.animations),r=this.parseShapes(e.shapes),s=this.parseGeometries(e.geometries,r),o=this.parseImages(e.images,function(){t!==void 0&&t(c)}),a=this.parseTextures(e.textures,o),l=this.parseMaterials(e.materials,a),c=this.parseObject(e.object,s,l,a,n),u=this.parseSkeletons(e.skeletons,c);if(this.bindSkeletons(c,u),this.bindLightTargets(c),t!==void 0){let d=!1;for(const p in o)if(o[p].data instanceof HTMLImageElement){d=!0;break}d===!1&&t(c)}return c}async parseAsync(e){const t=this.parseAnimations(e.animations),n=this.parseShapes(e.shapes),r=this.parseGeometries(e.geometries,n),s=await this.parseImagesAsync(e.images),o=this.parseTextures(e.textures,s),a=this.parseMaterials(e.materials,o),l=this.parseObject(e.object,r,a,o,t),c=this.parseSkeletons(e.skeletons,l);return this.bindSkeletons(l,c),this.bindLightTargets(l),l}parseShapes(e){const t={};if(e!==void 0)for(let n=0,r=e.length;n<r;n++){const s=new Du().fromJSON(e[n]);t[s.uuid]=s}return t}parseSkeletons(e,t){const n={},r={};if(t.traverse(function(s){s.isBone&&(r[s.uuid]=s)}),e!==void 0)for(let s=0,o=e.length;s<o;s++){const a=new ch().fromJSON(e[s],r);n[a.uuid]=a}return n}parseGeometries(e,t){const n={};if(e!==void 0){const r=new JD;for(let s=0,o=e.length;s<o;s++){let a;const l=e[s];switch(l.type){case"BufferGeometry":case"InstancedBufferGeometry":a=r.parse(l);break;default:l.type in uR?a=uR[l.type].fromJSON(l,t):at(`ObjectLoader: Unsupported geometry type "${l.type}"`)}a.uuid=l.uuid,l.name!==void 0&&(a.name=l.name),l.userData!==void 0&&(a.userData=l.userData),n[l.uuid]=a}}return n}parseMaterials(e,t){const n={},r={};if(e!==void 0){const s=new N1;s.setTextures(t);for(let o=0,a=e.length;o<a;o++){const l=e[o];n[l.uuid]===void 0&&(n[l.uuid]=s.parse(l)),r[l.uuid]=n[l.uuid]}}return r}parseAnimations(e){const t={};if(e!==void 0)for(let n=0;n<e.length;n++){const r=e[n],s=qu.parse(r);t[s.uuid]=s}return t}parseImages(e,t){const n=this,r={};let s;function o(l){return n.manager.itemStart(l),s.load(l,function(){n.manager.itemEnd(l)},void 0,function(){n.manager.itemError(l),n.manager.itemEnd(l)})}function a(l){if(typeof l=="string"){const c=l,u=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(c)?c:n.resourcePath+c;return o(u)}else return l.data?{data:mf(l.type,l.data),width:l.width,height:l.height}:null}if(e!==void 0&&e.length>0){const l=new Lw(t);s=new Dm(l),s.setCrossOrigin(this.crossOrigin);for(let c=0,u=e.length;c<u;c++){const d=e[c],p=d.url;if(Array.isArray(p)){const m=[];for(let x=0,v=p.length;x<v;x++){const _=p[x],g=a(_);g!==null&&(g instanceof HTMLImageElement?m.push(g):m.push(new Wo(g.data,g.width,g.height)))}r[d.uuid]=new Kl(m)}else{const m=a(d.url);r[d.uuid]=new Kl(m)}}}return r}async parseImagesAsync(e){const t=this,n={};let r;
vendor: 12,100 bytes, line 116
116async function s(o){if(typeof o=="string"){const a=o,l=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(a)?a:t.resourcePath+a;return await r.loadAsync(l)}else return o.data?{data:mf(o.type,o.data),width:o.width,height:o.height}:null}if(e!==void 0&&e.length>0){r=new Dm(this.manager),r.setCrossOrigin(this.crossOrigin);for(let o=0,a=e.length;o<a;o++){const l=e[o],c=l.url;if(Array.isArray(c)){const u=[];for(let d=0,p=c.length;d<p;d++){const m=c[d],x=await s(m);x!==null&&(x instanceof HTMLImageElement?u.push(x):u.push(new Wo(x.data,x.width,x.height)))}n[l.uuid]=new Kl(u)}else{const u=await s(l.url);n[l.uuid]=new Kl(u)}}}return n}parseTextures(e,t){function n(s,o){return typeof s=="number"?s:(at("ObjectLoader.parseTexture: Constant should be in numeric form.",s),o[s])}const r={};if(e!==void 0)for(let s=0,o=e.length;s<o;s++){const a=e[s];a.image===void 0&&at('ObjectLoader: No "image" specified for',a.uuid),t[a.image]===void 0&&at("ObjectLoader: Undefined image",a.image);const l=t[a.image],c=l.data;let u;Array.isArray(c)?(u=new qm,c.length===6&&(u.needsUpdate=!0)):(c&&c.data?u=new Wo:u=new Sn,c&&(u.needsUpdate=!0)),u.source=l,u.uuid=a.uuid,a.name!==void 0&&(u.name=a.name),a.mapping!==void 0&&(u.mapping=n(a.mapping,YH)),a.channel!==void 0&&(u.channel=a.channel),a.offset!==void 0&&u.offset.fromArray(a.offset),a.repeat!==void 0&&u.repeat.fromArray(a.repeat),a.center!==void 0&&u.center.fromArray(a.center),a.rotation!==void 0&&(u.rotation=a.rotation),a.wrap!==void 0&&(u.wrapS=n(a.wrap[0],hR),u.wrapT=n(a.wrap[1],hR)),a.format!==void 0&&(u.format=a.format),a.internalFormat!==void 0&&(u.internalFormat=a.internalFormat),a.type!==void 0&&(u.type=a.type),a.colorSpace!==void 0&&(u.colorSpace=a.colorSpace),a.minFilter!==void 0&&(u.minFilter=n(a.minFilter,pR)),a.magFilter!==void 0&&(u.magFilter=n(a.magFilter,pR)),a.anisotropy!==void 0&&(u.anisotropy=a.anisotropy),a.flipY!==void 0&&(u.flipY=a.flipY),a.generateMipmaps!==void 0&&(u.generateMipmaps=a.generateMipmaps),a.premultiplyAlpha!==void 0&&(u.premultiplyAlpha=a.premultiplyAlpha),a.unpackAlignment!==void 0&&(u.unpackAlignment=a.unpackAlignment),a.compareFunction!==void 0&&(u.compareFunction=a.compareFunction),a.userData!==void 0&&(u.userData=a.userData),r[a.uuid]=u}return r}parseObject(e,t,n,r,s){let o;function a(p){return t[p]===void 0&&at("ObjectLoader: Undefined geometry",p),t[p]}function l(p){if(p!==void 0){if(Array.isArray(p)){const m=[];for(let x=0,v=p.length;x<v;x++){const _=p[x];n[_]===void 0&&at("ObjectLoader: Undefined material",_),m.push(n[_])}return m}return n[p]===void 0&&at("ObjectLoader: Undefined material",p),n[p]}}function c(p){return r[p]===void 0&&at("ObjectLoader: Undefined texture",p),r[p]}let u,d;switch(e.type){case"Scene":o=new Ec,e.background!==void 0&&(Number.isInteger(e.background)?o.background=new Ve(e.background):o.background=c(e.background)),e.environment!==void 0&&(o.environment=c(e.environment)),e.fog!==void 0&&(e.fog.type==="Fog"?o.fog=new m1(e.fog.color,e.fog.near,e.fog.far):e.fog.type==="FogExp2"&&(o.fog=new p1(e.fog.color,e.fog.density)),e.fog.name!==""&&(o.fog.name=e.fog.name)),e.backgroundBlurriness!==void 0&&(o.backgroundBlurriness=e.backgroundBlurriness),e.backgroundIntensity!==void 0&&(o.backgroundIntensity=e.backgroundIntensity),e.backgroundRotation!==void 0&&o.backgroundRotation.fromArray(e.backgroundRotation),e.environmentIntensity!==void 0&&(o.environmentIntensity=e.environmentIntensity),e.environmentRotation!==void 0&&o.environmentRotation.fromArray(e.environmentRotation);break;case"PerspectiveCamera":o=new wn(e.fov,e.aspect,e.near,e.far),e.focus!==void 0&&(o.focus=e.focus),e.zoom!==void 0&&(o.zoom=e.zoom),e.filmGauge!==void 0&&(o.filmGauge=e.filmGauge),e.filmOffset!==void 0&&(o.filmOffset=e.filmOffset),e.view!==void 0&&(o.view=Object.assign({},e.view));break;case"OrthographicCamera":o=new or(e.left,e.right,e.top,e.bottom,e.near,e.far),e.zoom!==void 0&&(o.zoom=e.zoom),e.view!==void 0&&(o.view=Object.assign({},e.view));break;case"AmbientLight":o=new Dw(e.color,e.intensity);break;case"DirectionalLight":o=new th(e.color,e.intensity),o.target=e.target||"";break;case"PointLight":o=new t0(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":o=new XD(e.color,e.intensity,e.width,e.height);break;case"SpotLight":o=new F1(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay),o.target=e.target||"";break;case"HemisphereLight":o=new VD(e.color,e.groundColor,e.intensity);break;case"LightProbe":const p=new Fw().fromArray(e.sh);o=new YD(p,e.intensity);break;case"SkinnedMesh":u=a(e.geometry),d=l(e.material),o=new g1(u,d),e.bindMode!==void 0&&(o.bindMode=e.bindMode),e.bindMatrix!==void 0&&o.bindMatrix.fromArray(e.bindMatrix),e.skeleton!==void 0&&(o.skeleton=e.skeleton);break;case"Mesh":u=a(e.geometry),d=l(e.material),o=new Kt(u,d);break;case"InstancedMesh":u=a(e.geometry),d=l(e.material);const m=e.count,x=e.instanceMatrix,v=e.instanceColor;o=new x1(u,d,m),o.instanceMatrix=new _c(new Float32Array(x.array),16),v!==void 0&&(o.instanceColor=new _c(new Float32Array(v.array),v.itemSize));break;case"BatchedMesh":u=a(e.geometry),d=l(e.material),o=new SD(e.maxInstanceCount,e.maxVertexCount,e.maxIndexCount,d),o.geometry=u,o.perObjectFrustumCulled=e.perObjectFrustumCulled,o.sortObjects=e.sortObjects,o._drawRanges=e.drawRanges,o._reservedRanges=e.reservedRanges,o._geometryInfo=e.geometryInfo.map(_=>{let g=null,S=null;return _.boundingBox!==void 0&&(g=new jn().fromJSON(_.boundingBox)),_.boundingSphere!==void 0&&(S=new mi().fromJSON(_.boundingSphere)),{..._,boundingBox:g,boundingSphere:S}}),o._instanceInfo=e.instanceInfo,o._availableInstanceIds=e._availableInstanceIds,o._availableGeometryIds=e._availableGeometryIds,o._nextIndexStart=e.nextIndexStart,o._nextVertexStart=e.nextVertexStart,o._geometryCount=e.geometryCount,o._maxInstanceCount=e.maxInstanceCount,o._maxVertexCount=e.maxVertexCount,o._maxIndexCount=e.maxIndexCount,o._geometryInitialized=e.geometryInitialized,o._matricesTexture=c(e.matricesTexture.uuid),o._indirectTexture=c(e.indirectTexture.uuid),e.colorsTexture!==void 0&&(o._colorsTexture=c(e.colorsTexture.uuid)),e.boundingSphere!==void 0&&(o.boundingSphere=new mi().fromJSON(e.boundingSphere)),e.boundingBox!==void 0&&(o.boundingBox=new jn().fromJSON(e.boundingBox));break;case"LOD":o=new _D;break;case"Line":o=new Ma(a(e.geometry),l(e.material));break;case"LineLoop":o=new y1(a(e.geometry),l(e.material));break;case"LineSegments":o=new gs(a(e.geometry),l(e.material));break;case"PointCloud":case"Points":o=new uc(a(e.geometry),l(e.material));break;case"Sprite":o=new yD(l(e.material));break;case"Group":o=new Ns;break;case"Bone":o=new Zm;break;default:o=new Wt}if(o.uuid=e.uuid,e.name!==void 0&&(o.name=e.name),e.matrix!==void 0?(o.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(o.matrixAutoUpdate=e.matrixAutoUpdate),o.matrixAutoUpdate&&o.matrix.decompose(o.position,o.quaternion,o.scale)):(e.position!==void 0&&o.position.fromArray(e.position),e.rotation!==void 0&&o.rotation.fromArray(e.rotation),e.quaternion!==void 0&&o.quaternion.fromArray(e.quaternion),e.scale!==void 0&&o.scale.fromArray(e.scale)),e.up!==void 0&&o.up.fromArray(e.up),e.castShadow!==void 0&&(o.castShadow=e.castShadow),e.receiveShadow!==void 0&&(o.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.intensity!==void 0&&(o.shadow.intensity=e.shadow.intensity),e.shadow.bias!==void 0&&(o.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(o.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(o.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&o.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(o.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(o.visible=e.visible),e.frustumCulled!==void 0&&(o.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(o.renderOrder=e.renderOrder),e.userData!==void 0&&(o.userData=e.userData),e.layers!==void 0&&(o.layers.mask=e.layers),e.children!==void 0){const p=e.children;for(let m=0;m<p.length;m++)o.add(this.parseObject(p[m],t,n,r,s))}if(e.animations!==void 0){const p=e.animations;for(let m=0;m<p.length;m++){const x=p[m];o.animations.push(s[x])}}if(e.type==="LOD"){e.autoUpdate!==void 0&&(o.autoUpdate=e.autoUpdate);const p=e.levels;for(let m=0;m<p.length;m++){const x=p[m],v=o.getObjectByProperty("uuid",x.object);v!==void 0&&o.addLevel(v,x.distance,x.hysteresis)}}return o}bindSkeletons(e,t){Object.keys(t).length!==0&&e.traverse(function(n){if(n.isSkinnedMesh===!0&&n.skeleton!==void 0){const r=t[n.skeleton];r===void 0?at("ObjectLoader: No skeleton found with UUID:",n.skeleton):n.bind(r,n.bindMatrix)}})}bindLightTargets(e){e.traverse(function(t){if(t.isDirectionalLight||t.isSpotLight){const n=t.target,r=e.getObjectByProperty("uuid",n);r!==void 0?t.target=r:t.target=new Wt}})}}const YH={UVMapping:n1,CubeReflectionMapping:Sa,CubeRefractionMapping:xc,EquirectangularReflectionMapping:Am,EquirectangularRefractionMapping:wm,CubeUVReflectionMapping:ah},hR={RepeatWrapping:bo,ClampToEdgeWrapping:Mr,MirroredRepeatWrapping:Vu},pR={NearestFilter:Bn,NearestMipmapNearestFilter:Xm,NearestMipmapLinearFilter:Yl,LinearFilter:jt,LinearMipmapNearestFilter:Lu,LinearMipmapLinearFilter:as},cS=new WeakMap;class kw extends Ki{constructor(e){super(e),this.isImageBitmapLoader=!0,typeof createImageBitmap>"u"&&at("ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&at("ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"},this._abortController=new AbortController}setOptions(e){return this.options=e,this}load(e,t,n,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=ma.get(`image-bitmap:${e}`);if(o!==void 0){if(s.manager.itemStart(e),o.then){o.then(c=>{if(cS.has(o)===!0)r&&r(cS.get(o)),s.manager.itemError(e),s.manager.itemEnd(e);else return t&&t(c),s.manager.itemEnd(e),c});return}return setTimeout(function(){t&&t(o),s.manager.itemEnd(e)},0),o}const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,a.signal=typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal;const l=fetch(e,a).then(function(c){return c.blob()}).then(function(c){return createImageBitmap(c,Object.assign(s.options,{colorSpaceConversion:"none"}))}).then(function(c){return ma.add(`image-bitmap:${e}`,c),t&&t(c),s.manager.itemEnd(e),c}).catch(function(c){r&&r(c),cS.set(l,c),ma.remove(`image-bitmap:${e}`),s.manager.itemError(e),s.manager.itemEnd(e)});ma.add(`image-bitmap:${e}`,l),s.manager.itemStart(e)}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}let ox;class Ow{static getContext(){return ox===void 0&&(ox=new(window.AudioContext||window.webkitAudioContext)),ox}static setContext(e){ox=e}}class JH extends Ki{constructor(e){super(e)}load(e,t,n,r){const s=this,o=new Er(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(l){try{const c=l.slice(0);Ow.getContext().decodeAudioData(c,function(d){t(d)}).catch(a)}catch(c){a(c)}},n,r);function a(l){r?r(l):bt(l),s.manager.itemError(e)}}}const mR=new _t,gR=new _t,Jc=new _t;class KH{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new wn,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new wn,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,Jc.copy(e.projectionMatrix);const r=t.eyeSep/2,s=r*t.near/t.focus,o=t.near*Math.tan(Bu*t.fov*.5)/t.zoom;let a,l;gR.elements[12]=-r,mR.elements[12]=r,a=-o*t.aspect+s,l=o*t.aspect+s,Jc.elements[0]=2*t.near/(l-
vendor: 4,226 bytes, line 116
116a),Jc.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(Jc),a=-o*t.aspect-s,l=o*t.aspect-s,Jc.elements[0]=2*t.near/(l-a),Jc.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(Jc)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(gR),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(mR)}}class KD extends wn{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}}class n0{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=performance.now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=performance.now();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}const Kc=new H,uS=new si,qH=new H,qc=new H,Zc=new H;class ZH extends Wt{constructor(){super(),this.type="AudioListener",this.context=Ow.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new n0}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const t=this.context.listener;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Kc,uS,qH),qc.set(0,0,-1).applyQuaternion(uS),Zc.set(0,1,0).applyQuaternion(uS),t.positionX){const n=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(Kc.x,n),t.positionY.linearRampToValueAtTime(Kc.y,n),t.positionZ.linearRampToValueAtTime(Kc.z,n),t.forwardX.linearRampToValueAtTime(qc.x,n),t.forwardY.linearRampToValueAtTime(qc.y,n),t.forwardZ.linearRampToValueAtTime(qc.z,n),t.upX.linearRampToValueAtTime(Zc.x,n),t.upY.linearRampToValueAtTime(Zc.y,n),t.upZ.linearRampToValueAtTime(Zc.z,n)}else t.setPosition(Kc.x,Kc.y,Kc.z),t.setOrientation(qc.x,qc.y,qc.z,Zc.x,Zc.y,Zc.z)}}let qD=class extends Wt{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){at("Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){at("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()}
vendor: 4,567 bytes, line 116
116pause(){if(this.hasPlaybackControl===!1){at("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){at("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){at("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}getLoop(){return this.hasPlaybackControl===!1?(at("Audio: this Audio has no playback control."),!1):this.loop}setLoop(e){if(this.hasPlaybackControl===!1){at("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"?(at("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 Qc=new H,xR=new si,QH=new H,$c=new H;class $H extends qD{constructor(e){super(e),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}connect(){return super.connect(),this.panner.connect(this.gain),this}disconnect(){return super.disconnect(),this.panner.disconnect(this.gain),this}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(e){return this.panner.refDistance=e,this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(e){return this.panner.rolloffFactor=e,this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(e){return this.panner.distanceModel=e,this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(e){return this.panner.maxDistance=e,this}setDirectionalCone(e,t,n){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=t,this.panner.coneOuterGain=n,this}updateMatrixWorld(e){if(super.updateMatrixWorld(e),this.hasPlaybackControl===!0&&this.isPlaying===!1)return;this.matrixWorld.decompose(Qc,xR,QH),$c.set(0,0,1).applyQuaternion(xR);const t=this.panner;if(t.positionX){const n=this.context.currentTime+this.listener.timeDelta;t.positionX.linearRampToValueAtTime(Qc.x,n),t.positionY.linearRampToValueAtTime(Qc.y,n),t.positionZ.linearRampToValueAtTime(Qc.z,n),t.orientationX.linearRampToValueAtTime($c.x,n),t.orientationY.linearRampToValueAtTime($c.y,n),t.orientationZ.linearRampToValueAtTime($c.z,n)}else t.setPosition(Qc.x,Qc.y,Qc.z),t.setOrientation($c.x,$c.y,$c.z)}}
vendor: 6,080 bytes, line 116
116class e6{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 n=0;n<t.length;n++)e+=t[n];return e/t.length}}class ZD{constructor(e,t,n){this.binding=e,this.valueSize=n;let r,s,o;switch(t){case"quaternion":r=this._slerp,s=this._slerpAdditive,o=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(n*6),this._workIndex=5;break;case"string":case"bool":r=this._select,s=this._select,o=this._setAdditiveIdentityOther,this.buffer=new Array(n*5);break;default:r=this._lerp,s=this._lerpAdditive,o=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(n*5)}this._mixBufferRegion=r,this._mixBufferRegionAdditive=s,this._setIdentity=o,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,t){const n=this.buffer,r=this.valueSize,s=e*r+r;let o=this.cumulativeWeight;if(o===0){for(let a=0;a!==r;++a)n[s+a]=n[a];o=t}else{o+=t;const a=t/o;this._mixBufferRegion(n,s,0,a,r)}this.cumulativeWeight=o}accumulateAdditive(e){const t=this.buffer,n=this.valueSize,r=n*this._addIndex;this.cumulativeWeightAdditive===0&&this._setIdentity(),this._mixBufferRegionAdditive(t,r,0,e,n),this.cumulativeWeightAdditive+=e}apply(e){const t=this.valueSize,n=this.buffer,r=e*t+t,s=this.cumulativeWeight,o=this.cumulativeWeightAdditive,a=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,s<1){const l=t*this._origIndex;this._mixBufferRegion(n,r,l,1-s,t)}o>0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(let l=t,c=t+t;l!==c;++l)if(n[l]!==n[l+t]){a.setValue(n,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(let s=n,o=r;s!==o;++s)t[s]=t[r+s%n];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 n=e;n<t;n++)this.buffer[n]=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 n=0;n<this.valueSize;n++)this.buffer[t+n]=this.buffer[e+n]}_select(e,t,n,r,s){if(r>=.5)for(let o=0;o!==s;++o)e[t+o]=e[n+o]}_slerp(e,t,n,r){si.slerpFlat(e,t,e,t,e,n,r)}_slerpAdditive(e,t,n,r,s){const o=this._workIndex*s;si.multiplyQuaternionsFlat(e,o,e,t,e,n),si.slerpFlat(e,t,e,t,e,o,r)}_lerp(e,t,n,r,s){const o=1-r;for(let a=0;a!==s;++a){const l=t+a;e[l]=e[l]*o+e[n+a]*r}}_lerpAdditive(e,t,n,r,s){for(let o=0;o!==s;++o){const a=t+o;e[a]=e[a]+e[n+o]*r}}}const Uw="\\[\\]\\.:\\/",t6=new RegExp("["+Uw+"]","g"),zw="[^"+Uw+"]",n6="[^"+Uw.replace("\\.","")+"]",i6=/((?:WC+[\/:])*)/.source.replace("WC",zw),r6=/(WCOD+)?/.source.replace("WCOD",n6),s6=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",zw),o6=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",zw),a6=new RegExp("^"+i6+r6+s6+o6+"$"),l6=["material","materials","bones","map"];class c6{constructor(e,t,n){const r=n||sn.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,r=this._bindings[n];r!==void 0&&r.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,s=n.length;r!==s;++r)n[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}}class sn{constructor(e,t,n){this.path=t,this.parsedPath=n||sn.parseTrackName(t),this.node=sn.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new sn.Composite(e,t,n):new sn(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(t6,"")}static parseTrackName(e){const t=a6.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(r!==void 0&&r!==-1){const s=n.nodeName.substring(r+1);l6.indexOf(s)!==-1&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=s)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(n!==void 0)return n}if(e.children){const n=function(s){for(let o=0;o<s.length;o++){const a=s[o];if(a.name===t||a.uuid===t)return a;const l=n(a.children);if(l)return l}return null},r=n(e.children);if(r)return r}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){const n=this.resolvedProperty;for(let r=0,s=n.length;r!==s;++r)e[t++]=n[r]}_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 n=this.resolvedProperty;for(let r=0,s=n.length;r!==s;++r)n[r]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,s=n.length;r!==s;++r)n[r]=e[t++];this.targetObject.needsUpdate=!0}
vendor: 4,165 bytes, line 116
116_setValue_array_setMatrixWorldNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,s=n.length;r!==s;++r)n[r]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node;const t=this.parsedPath,n=t.objectName,r=t.propertyName;let s=t.propertyIndex;if(e||(e=sn.findNode(this.rootNode,t.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e){at("PropertyBinding: No target node found for track: "+this.path+".");return}if(n){let c=t.objectIndex;switch(n){case"materials":if(!e.material){bt("PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.materials){bt("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){bt("PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}e=e.skeleton.bones;for(let u=0;u<e.length;u++)if(e[u].name===c){c=u;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material){bt("PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.map){bt("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[n]===void 0){bt("PropertyBinding: Can not bind to objectName of node undefined.",this);return}e=e[n]}if(c!==void 0){if(e[c]===void 0){bt("PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);return}e=e[c]}}const o=e[r];if(o===void 0){const c=t.nodeName;bt("PropertyBinding: Trying to update property for track: "+c+"."+r+" but it wasn't found.",e);return}let a=this.Versioning.None;this.targetObject=e,e.isMaterial===!0?a=this.Versioning.NeedsUpdate:e.isObject3D===!0&&(a=this.Versioning.MatrixWorldNeedsUpdate);let l=this.BindingType.Direct;if(s!==void 0){if(r==="morphTargetInfluences"){if(!e.geometry){bt("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!e.geometry.morphAttributes){bt("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}e.morphTargetDictionary[s]!==void 0&&(s=e.morphTargetDictionary[s])}l=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=s}else o.fromArray!==void 0&&o.toArray!==void 0?(l=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(l=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=r;this.getValue=this.GetterByBindingType[l],this.setValue=this.SetterByBindingTypeAndVersioning[l][a]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}sn.Composite=c6;sn.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};sn.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};sn.prototype.GetterByBindingType=[sn.prototype._getValue_direct,sn.prototype._getValue_array,sn.prototype._getValue_arrayElement,sn.prototype._getValue_toArray];sn.prototype.SetterByBindingTypeAndVersioning=[[sn.prototype._setValue_direct,sn.prototype._setValue_direct_setNeedsUpdate,sn.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[sn.prototype._setValue_array,sn.prototype._setValue_array_setNeedsUpdate,sn.prototype._setValue_array_setMatr
vendor: 4,356 bytes, line 116
116ixWorldNeedsUpdate],[sn.prototype._setValue_arrayElement,sn.prototype._setValue_arrayElement_setNeedsUpdate,sn.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[sn.prototype._setValue_fromArray,sn.prototype._setValue_fromArray_setNeedsUpdate,sn.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class u6{constructor(){this.isAnimationObjectGroup=!0,this.uuid=Hs(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const e={};this._indicesByUUID=e;for(let n=0,r=arguments.length;n!==r;++n)e[arguments[n].uuid]=n;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,n=this._paths,r=this._parsedPaths,s=this._bindings,o=s.length;let a,l=e.length,c=this.nCachedObjects_;for(let u=0,d=arguments.length;u!==d;++u){const p=arguments[u],m=p.uuid;let x=t[m];if(x===void 0){x=l++,t[m]=x,e.push(p);for(let v=0,_=o;v!==_;++v)s[v].push(new sn(p,n[v],r[v]))}else if(x<c){a=e[x];const v=--c,_=e[v];t[_.uuid]=x,e[x]=_,t[m]=v,e[v]=p;for(let g=0,S=o;g!==S;++g){const b=s[g],A=b[v];let w=b[x];b[x]=A,w===void 0&&(w=new sn(p,n[g],r[g])),b[v]=w}}else e[x]!==a&&bt("AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=c}remove(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length;let s=this.nCachedObjects_;for(let o=0,a=arguments.length;o!==a;++o){const l=arguments[o],c=l.uuid,u=t[c];if(u!==void 0&&u>=s){const d=s++,p=e[d];t[p.uuid]=u,e[u]=p,t[c]=d,e[d]=l;for(let m=0,x=r;m!==x;++m){const v=n[m],_=v[d],g=v[u];v[u]=_,v[d]=g}}}this.nCachedObjects_=s}uncache(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length;let s=this.nCachedObjects_,o=e.length;for(let a=0,l=arguments.length;a!==l;++a){const c=arguments[a],u=c.uuid,d=t[u];if(d!==void 0)if(delete t[u],d<s){const p=--s,m=e[p],x=--o,v=e[x];t[m.uuid]=d,e[d]=m,t[v.uuid]=p,e[p]=v,e.pop();for(let _=0,g=r;_!==g;++_){const S=n[_],b=S[p],A=S[x];S[d]=b,S[p]=A,S.pop()}}else{const p=--o,m=e[p];p>0&&(t[m.uuid]=d),e[d]=m,e.pop();for(let x=0,v=r;x!==v;++x){const _=n[x];_[d]=_[p],_.pop()}}}this.nCachedObjects_=s}subscribe_(e,t){const n=this._bindingsIndicesByPath;let r=n[e];const s=this._bindings;if(r!==void 0)return s[r];const o=this._paths,a=this._parsedPaths,l=this._objects,c=l.length,u=this.nCachedObjects_,d=new Array(c);r=s.length,n[e]=r,o.push(e),a.push(t),s.push(d);for(let p=u,m=l.length;p!==m;++p){const x=l[p];d[p]=new sn(x,e,t)}return d}unsubscribe_(e){const t=this._bindingsIndicesByPath,n=t[e];if(n!==void 0){const r=this._paths,s=this._parsedPaths,o=this._bindings,a=o.length-1,l=o[a],c=e[a];t[c]=n,o[n]=l,o.pop(),s[n]=s[a],s.pop(),r[n]=r[a],r.pop()}}}class QD{constructor(e,t,n=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=r;const s=t.tracks,o=s.length,a=new Array(o),l={endingStart:vu,endingEnd:vu};for(let c=0;c!==o;++c){const u=s[c].createInterpolant(null);a[c]=u,u.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=lw,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}
vendor: 5,869 bytes, line 116
116fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n=!1){if(e.fadeOut(t),this.fadeIn(t),n===!0){const r=this._clip.duration,s=e._clip.duration,o=s/r,a=r/s;e.warp(1,o,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,n=!1){return e.crossFadeFrom(this,t,n)}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,n){const r=this._mixer,s=r.time,o=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);const l=a.parameterPositions,c=a.sampleValues;return l[0]=s,l[1]=s+n,c[0]=e/o,c[1]=t/o,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,r){if(!this.enabled){this._updateWeight(e);return}const s=this._startTime;if(s!==null){const l=(e-s)*n;l<0||n===0?t=0:(this._startTime=null,t=n*l)}t*=this._updateTimeScale(e);const o=this._updateTime(t),a=this._updateWeight(e);if(a>0){const l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case cw:for(let u=0,d=l.length;u!==d;++u)l[u].evaluate(o),c[u].accumulateAdditive(a);break;case c1:default:for(let u=0,d=l.length;u!==d;++u)l[u].evaluate(o),c[u].accumulate(r,a)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const n=this._weightInterpolant;if(n!==null){const r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),r===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const n=this._timeScaleInterpolant;if(n!==null){const r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,n=this.loop;let r=this.time+e,s=this._loopCount;const o=n===nD;if(e===0)return s===-1?r:o&&(s&1)===1?t-r:r;if(n===tD){s===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else if(r<0)r=0;else{this.time=r;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(s===-1&&(e>=0?(s=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),r>=t||r<0){const a=Math.floor(r/t);r-=t*a,s+=Math.abs(a);const l=this.repetitions-s;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){const c=e<0;this._setEndings(c,!c,o)}else this._setEndings(!1,!1,o);this._loopCount=s,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=r;if(o&&(s&1)===1)return t-r}return r}_setEndings(e,t,n){const r=this._interpolantSettings;n?(r.endingStart=yu,r.endingEnd=yu):(e?r.endingStart=this.zeroSlopeAtStart?yu:vu:r.endingStart=Tm,t?r.endingEnd=this.zeroSlopeAtEnd?yu:vu:r.endingEnd=Tm)}_scheduleFading(e,t,n){const r=this._mixer,s=r.time;let o=this._weightInterpolant;o===null&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,l=o.sampleValues;return a[0]=s,l[0]=t,a[1]=s+e,l[1]=n,this}}const d6=new Float32Array(1);class $D extends Aa{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const n=e._localRoot||this._root,r=e._clip.tracks,s=r.length,o=e._propertyBindings,a=e._interpolants,l=n.uuid,c=this._bindingsByRootAndName;let u=c[l];u===void 0&&(u={},c[l]=u);for(let d=0;d!==s;++d){const p=r[d],m=p.name;let x=u[m];if(x!==void 0)++x.referenceCount,o[d]=x;else{if(x=o[d],x!==void 0){x._cacheIndex===null&&(++x.referenceCount,this._addInactiveBinding(x,l,m));continue}const v=t&&t._propertyBindings[d].binding.parsedPath;x=new ZD(sn.create(n,m,v),p.ValueTypeName,p.getValueSize()),++x.referenceCount,this._addInactiveBinding(x,l,m),o[d]=x}a[d].resultBuffer=x.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const n=(e._localRoot||this._root).uuid,r=e._clip.uuid,s=this._actionsByClip[r];this._bindAction(e,s&&s.knownActions[0]),this._addInactiveAction(e,r,n)}const t=e._propertyBindings;for(let n=0,r=t.length;n!==r;++n){const s=t[n];s.useCount++===0&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let n=0,r=t.length;n!==r;++n){const s=t[n];--s.useCount===0&&(s.restoreOriginalState(),this._takeBackBinding(s))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return t!==null&&t<this._nActiveActions}_addInactiveAction(e,t,n){const r=this._actions,s=this._actionsByClip;let o=s[t];
vendor: 6,447 bytes, line 116
116if(o===void 0)o={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,s[t]=o;else{const a=o.knownActions;e._byClipCacheIndex=a.length,a.push(e)}e._cacheIndex=r.length,r.push(e),o.actionByRoot[n]=e}_removeInactiveAction(e){const t=this._actions,n=t[t.length-1],r=e._cacheIndex;n._cacheIndex=r,t[r]=n,t.pop(),e._cacheIndex=null;const s=e._clip.uuid,o=this._actionsByClip,a=o[s],l=a.knownActions,c=l[l.length-1],u=e._byClipCacheIndex;c._byClipCacheIndex=u,l[u]=c,l.pop(),e._byClipCacheIndex=null;const d=a.actionByRoot,p=(e._localRoot||this._root).uuid;delete d[p],l.length===0&&delete o[s],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const t=e._propertyBindings;for(let n=0,r=t.length;n!==r;++n){const s=t[n];--s.referenceCount===0&&this._removeInactiveBinding(s)}}_lendAction(e){const t=this._actions,n=e._cacheIndex,r=this._nActiveActions++,s=t[r];e._cacheIndex=r,t[r]=e,s._cacheIndex=n,t[n]=s}_takeBackAction(e){const t=this._actions,n=e._cacheIndex,r=--this._nActiveActions,s=t[r];e._cacheIndex=r,t[r]=e,s._cacheIndex=n,t[n]=s}_addInactiveBinding(e,t,n){const r=this._bindingsByRootAndName,s=this._bindings;let o=r[t];o===void 0&&(o={},r[t]=o),o[n]=e,e._cacheIndex=s.length,s.push(e)}_removeInactiveBinding(e){const t=this._bindings,n=e.binding,r=n.rootNode.uuid,s=n.path,o=this._bindingsByRootAndName,a=o[r],l=t[t.length-1],c=e._cacheIndex;l._cacheIndex=c,t[c]=l,t.pop(),delete a[s],Object.keys(a).length===0&&delete o[r]}_lendBinding(e){const t=this._bindings,n=e._cacheIndex,r=this._nActiveBindings++,s=t[r];e._cacheIndex=r,t[r]=e,s._cacheIndex=n,t[n]=s}_takeBackBinding(e){const t=this._bindings,n=e._cacheIndex,r=--this._nActiveBindings,s=t[r];e._cacheIndex=r,t[r]=e,s._cacheIndex=n,t[n]=s}_lendControlInterpolant(){const e=this._controlInterpolants,t=this._nActiveControlInterpolants++;let n=e[t];return n===void 0&&(n=new Pw(new Float32Array(2),new Float32Array(2),1,d6),n.__cacheIndex=t,e[t]=n),n}_takeBackControlInterpolant(e){const t=this._controlInterpolants,n=e.__cacheIndex,r=--this._nActiveControlInterpolants,s=t[r];e.__cacheIndex=r,t[r]=e,s.__cacheIndex=n,t[n]=s}clipAction(e,t,n){const r=t||this._root,s=r.uuid;let o=typeof e=="string"?qu.findByName(r,e):e;const a=o!==null?o.uuid:e,l=this._actionsByClip[a];let c=null;if(n===void 0&&(o!==null?n=o.blendMode:n=c1),l!==void 0){const d=l.actionByRoot[s];if(d!==void 0&&d.blendMode===n)return d;c=l.knownActions[0],o===null&&(o=c._clip)}if(o===null)return null;const u=new QD(this,o,t,n);return this._bindAction(u,c),this._addInactiveAction(u,a,s),u}existingAction(e,t){const n=t||this._root,r=n.uuid,s=typeof e=="string"?qu.findByName(n,e):e,o=s?s.uuid:e,a=this._actionsByClip[o];return a!==void 0&&a.actionByRoot[r]||null}stopAllAction(){const e=this._actions,t=this._nActiveActions;for(let n=t-1;n>=0;--n)e[n].stop();return this}update(e){e*=this.timeScale;const t=this._actions,n=this._nActiveActions,r=this.time+=e,s=Math.sign(e),o=this._accuIndex^=1;for(let c=0;c!==n;++c)t[c]._update(r,e,s,o);const a=this._bindings,l=this._nActiveBindings;for(let c=0;c!==l;++c)a[c].apply(o);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,n=e.uuid,r=this._actionsByClip,s=r[n];if(s!==void 0){const o=s.knownActions;for(let a=0,l=o.length;a!==l;++a){const c=o[a];this._deactivateAction(c);const u=c._cacheIndex,d=t[t.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,d._cacheIndex=u,t[u]=d,t.pop(),this._removeInactiveBindingsForAction(c)}delete r[n]}}uncacheRoot(e){const t=e.uuid,n=this._actionsByClip;for(const o in n){const a=n[o].actionByRoot,l=a[t];l!==void 0&&(this._deactivateAction(l),this._removeInactiveAction(l))}const r=this._bindingsByRootAndName,s=r[t];if(s!==void 0)for(const o in s){const a=s[o];a.restoreOriginalState(),this._removeInactiveBinding(a)}}uncacheAction(e,t){const n=this.existingAction(e,t);n!==null&&(this._deactivateAction(n),this._removeInactiveAction(n))}}class f6 extends fw{constructor(e=1,t=1,n=1,r={}){super(e,t,r),this.isRenderTarget3D=!0,this.depth=n,this.texture=new h1(null,e,t,n),this._setTextureOptions(r),this.texture.isRenderTargetTexture=!0}}class Hw{constructor(e){this.value=e}clone(){return new Hw(this.value.clone===void 0?this.value:this.value.clone())}}let h6=0;class p6 extends Aa{constructor(){super(),this.isUniformsGroup=!0,Object.defineProperty(this,"id",{value:h6++}),this.name="",this.usage=Cm,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 n=0,r=t.length;n<r;n++){const s=Array.isArray(t[n])?t[n]:[t[n]];for(let o=0;o<s.length;o++)this.uniforms.push(s[o].clone())}return this}clone(){return new this.constructor().copy(this)}}class Ey extends lh{constructor(e,t,n=1){super(e,t),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=n}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){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 m6{constructor(e,t,n,r,s,o=!1){this.isGLBufferAttribute=!0,this.name="",this.buffer=e,this.type=t,this.itemSize=n,this.elementSize=r,this.count=s,this.normalized=o,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 vR=new _t;class eF{constructor(e,t,n=0,r=1/0){this.ray=new Tc(e,t),this.near=n,this.far=r,this.camera=null,this.layers=new cc,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):bt("Raycaster:
116Unsupported camera type: "+t.type)}setFromXRController(e){return vR.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(vR),this}intersectObject(e,t=!0,n=[]){return yM(e,this,n,t),n.sort(yR),n}intersectObjects(e,t=!0,n=[]){for(let r=0,s=e.length;r<s;r++)yM(e[r],this,n,t);return n.sort(yR),n}}function yR(i,e){return i.distance-e.distance}function yM(i,e,t,n){let r=!0;if(i.layers.test(e.layers)&&i.raycast(e,t)===!1&&(r=!1),r===!0&&n===!0){const s=i.children;for(let o=0,a=s.length;o<a;o++)yM(s[o],e,t,!0)}}class g6{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=x6.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 x6(){this._document.hidden===!1&&this.reset()}class Fm{constructor(e=1,t=0,n=0){this.radius=e,this.phi=t,this.theta=n}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=It(this.phi,1e-6,Math.PI-1e-6),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(It(t/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}class v6{constructor(e=1,t=0,n=0){this.radius=e,this.theta=t,this.y=n}set(e,t,n){return this.radius=e,this.theta=t,this.y=n,this}copy(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+n*n),this.theta=Math.atan2(e,n),this.y=t,this}clone(){return new this.constructor().copy(this)}}class Gw{constructor(e,t,n,r){Gw.prototype.isMatrix2=!0,this.elements=[1,0,0,1],e!==void 0&&this.set(e,t,n,r)}identity(){return this.set(1,0,0,1),this}fromArray(e,t=0){for(let n=0;n<4;n++)this.elements[n]=e[n+t];return this}set(e,t,n,r){const s=this.elements;return s[0]=e,s[2]=t,s[1]=n,s[3]=r,this}}const _R=new xe;class y6{constructor(e=new xe(1/0,1/0),t=new xe(-1/0,-1/0)){this.isBox2=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=_R.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=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,_R).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 SR=new H,ax=new H,Gd=new H,jd=new H,dS=new H,_6=new H,S6=new H;class tF{constructor(e=new H,t=new H){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){SR.subVectors(e,this.start),ax.subVectors(this.end,this.start);const n=ax.dot(ax);let s=ax.dot(SR)/n;return t&&(s=It(s,0,1)),s}closestPointToPoint(e,t,n){const r=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(r).add(this.start)}
vendor: 5,412 bytes, line 116
116distanceSqToLine3(e,t=_6,n=S6){const r=10000000000000001e-32;let s,o;const a=this.start,l=e.start,c=this.end,u=e.end;Gd.subVectors(c,a),jd.subVectors(u,l),dS.subVectors(a,l);const d=Gd.dot(Gd),p=jd.dot(jd),m=jd.dot(dS);if(d<=r&&p<=r)return t.copy(a),n.copy(l),t.sub(n),t.dot(t);if(d<=r)s=0,o=m/p,o=It(o,0,1);else{const x=Gd.dot(dS);if(p<=r)o=0,s=It(-x/d,0,1);else{const v=Gd.dot(jd),_=d*p-v*v;_!==0?s=It((v*m-x*p)/_,0,1):s=0,o=(v*s+m)/p,o<0?(o=0,s=It(-x/d,0,1)):o>1&&(o=1,s=It((v-x)/d,0,1))}}return t.copy(a).add(Gd.multiplyScalar(s)),n.copy(l).add(jd.multiplyScalar(o)),t.sub(n),t.dot(t)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const bR=new H;class b6 extends Wt{constructor(e,t){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const n=new Rt,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let o=0,a=1,l=32;o<l;o++,a++){const c=o/l*Math.PI*2,u=a/l*Math.PI*2;r.push(Math.cos(c),Math.sin(c),1,Math.cos(u),Math.sin(u),1)}n.setAttribute("position",new ct(r,3));const s=new Ai({fog:!1,toneMapped:!1});this.cone=new gs(n,s),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),bR.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(bR),this.color!==void 0?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}const Pl=new H,lx=new _t,fS=new _t;class M6 extends gs{constructor(e){const t=nF(e),n=new Rt,r=[],s=[];for(let c=0;c<t.length;c++){const u=t[c];u.parent&&u.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),s.push(0,0,0),s.push(0,0,0))}n.setAttribute("position",new ct(r,3)),n.setAttribute("color",new ct(s,3));const o=new Ai({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});super(n,o),this.isSkeletonHelper=!0,this.type="SkeletonHelper",this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1;const a=new Ve(255),l=new Ve(65280);this.setColors(a,l)}updateMatrixWorld(e){const t=this.bones,n=this.geometry,r=n.getAttribute("position");fS.copy(this.root.matrixWorld).invert();for(let s=0,o=0;s<t.length;s++){const a=t[s];a.parent&&a.parent.isBone&&(lx.multiplyMatrices(fS,a.matrixWorld),Pl.setFromMatrixPosition(lx),r.setXYZ(o,Pl.x,Pl.y,Pl.z),lx.multiplyMatrices(fS,a.parent.matrixWorld),Pl.setFromMatrixPosition(lx),r.setXYZ(o+1,Pl.x,Pl.y,Pl.z),o+=2)}n.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}setColors(e,t){const r=this.geometry.getAttribute("color");for(let s=0;s<r.count;s+=2)r.setXYZ(s,e.r,e.g,e.b),r.setXYZ(s+1,t.r,t.g,t.b);return r.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}function nF(i){const e=[];i.isBone===!0&&e.push(i);for(let t=0;t<i.children.length;t++)e.push(...nF(i.children[t]));return e}class A6 extends Kt{constructor(e,t,n){const r=new dh(t,4,2),s=new pi({wireframe:!0,fog:!1,toneMapped:!1});super(r,s),this.light=e,this.color=n,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.color!==void 0?this.material.color.set(this.color):this.material.color.copy(this.light.color)}}const w6=new H,MR=new Ve,AR=new Ve;class T6 extends Wt{constructor(e,t,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="HemisphereLightHelper";const r=new e0(t);r.rotateY(Math.PI*.5),this.material=new pi({wireframe:!0,fog:!1,toneMapped:!1}),this.color===void 0&&(this.material.vertexColors=!0);const s=r.getAttribute("position"),o=new Float32Array(s.count*3);r.setAttribute("color",new zt(o,3)),this.add(new Kt(r,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");MR.copy(this.light.color),AR.copy(this.light.groundColor);for(let n=0,r=t.count;n<r;n++){const s=n<r/2?MR:AR;t.setXYZ(n,s.r,s.g,s.b)}t.needsUpdate=!0}this.light.updateWorldMatrix(!0,!1),e.lookAt(w6.setFromMatrixPosition(this.light.matrixWorld).negate())}}class E6 extends gs{constructor(e=10,t=10,n=4473924,r=8947848){n=new Ve(n),r=new Ve(r);const s=t/2,o=e/t,a=e/2,l=[],c=[];for(let p=0,m=0,x=-a;p<=t;p++,x+=o){l.push(-a,0,x,a,0,x),l.push(x,0,-a,x,0,a);const v=p===s?n:r;v.toArray(c,m),m+=3,v.toArray(c,m),m+=3,v.toArray(c,m),m+=3,v.toArray(c,m),m+=3}const u=new Rt;u.setAttribute("position",new ct(l,3)),u.setAttribute("color",new ct(c,3));const d=new Ai({vertexColors:!0,toneMapped:!1});super(u,d),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}class C6 extends gs{constructor(e=10,t=16,n=8,r=64,s=4473924,o=8947848){s=new Ve(s),o=new Ve(o);const a=[],l=[];
vendor: 10,873 bytes, line 116
116if(t>1)for(let d=0;d<t;d++){const p=d/t*(Math.PI*2),m=Math.sin(p)*e,x=Math.cos(p)*e;a.push(0,0,0),a.push(m,0,x);const v=d&1?s:o;l.push(v.r,v.g,v.b),l.push(v.r,v.g,v.b)}for(let d=0;d<n;d++){const p=d&1?s:o,m=e-e/n*d;for(let x=0;x<r;x++){let v=x/r*(Math.PI*2),_=Math.sin(v)*m,g=Math.cos(v)*m;a.push(_,0,g),l.push(p.r,p.g,p.b),v=(x+1)/r*(Math.PI*2),_=Math.sin(v)*m,g=Math.cos(v)*m,a.push(_,0,g),l.push(p.r,p.g,p.b)}}const c=new Rt;c.setAttribute("position",new ct(a,3)),c.setAttribute("color",new ct(l,3));const u=new Ai({vertexColors:!0,toneMapped:!1});super(c,u),this.type="PolarGridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}const wR=new H,cx=new H,TR=new H;class R6 extends Wt{constructor(e,t,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="DirectionalLightHelper",t===void 0&&(t=1);let r=new Rt;r.setAttribute("position",new ct([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3));const s=new Ai({fog:!1,toneMapped:!1});this.lightPlane=new Ma(r,s),this.add(this.lightPlane),r=new Rt,r.setAttribute("position",new ct([0,0,0,0,0,1],3)),this.targetLine=new Ma(r,s),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),wR.setFromMatrixPosition(this.light.matrixWorld),cx.setFromMatrixPosition(this.light.target.matrixWorld),TR.subVectors(cx,wR),this.lightPlane.lookAt(cx),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(cx),this.targetLine.scale.z=TR.length()}}const ux=new H,ni=new Km;class P6 extends gs{constructor(e){const t=new Rt,n=new Ai({color:16777215,vertexColors:!0,toneMapped:!1}),r=[],s=[],o={};a("n1","n2"),a("n2","n4"),a("n4","n3"),a("n3","n1"),a("f1","f2"),a("f2","f4"),a("f4","f3"),a("f3","f1"),a("n1","f1"),a("n2","f2"),a("n3","f3"),a("n4","f4"),a("p","n1"),a("p","n2"),a("p","n3"),a("p","n4"),a("u1","u2"),a("u2","u3"),a("u3","u1"),a("c","t"),a("p","c"),a("cn1","cn2"),a("cn3","cn4"),a("cf1","cf2"),a("cf3","cf4");function a(x,v){l(x),l(v)}function l(x){r.push(0,0,0),s.push(0,0,0),o[x]===void 0&&(o[x]=[]),o[x].push(r.length/3-1)}t.setAttribute("position",new ct(r,3)),t.setAttribute("color",new ct(s,3)),super(t,n),this.type="CameraHelper",this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update();const c=new Ve(16755200),u=new Ve(16711680),d=new Ve(43775),p=new Ve(16777215),m=new Ve(3355443);this.setColors(c,u,d,p,m)}setColors(e,t,n,r,s){const a=this.geometry.getAttribute("color");return a.setXYZ(0,e.r,e.g,e.b),a.setXYZ(1,e.r,e.g,e.b),a.setXYZ(2,e.r,e.g,e.b),a.setXYZ(3,e.r,e.g,e.b),a.setXYZ(4,e.r,e.g,e.b),a.setXYZ(5,e.r,e.g,e.b),a.setXYZ(6,e.r,e.g,e.b),a.setXYZ(7,e.r,e.g,e.b),a.setXYZ(8,e.r,e.g,e.b),a.setXYZ(9,e.r,e.g,e.b),a.setXYZ(10,e.r,e.g,e.b),a.setXYZ(11,e.r,e.g,e.b),a.setXYZ(12,e.r,e.g,e.b),a.setXYZ(13,e.r,e.g,e.b),a.setXYZ(14,e.r,e.g,e.b),a.setXYZ(15,e.r,e.g,e.b),a.setXYZ(16,e.r,e.g,e.b),a.setXYZ(17,e.r,e.g,e.b),a.setXYZ(18,e.r,e.g,e.b),a.setXYZ(19,e.r,e.g,e.b),a.setXYZ(20,e.r,e.g,e.b),a.setXYZ(21,e.r,e.g,e.b),a.setXYZ(22,e.r,e.g,e.b),a.setXYZ(23,e.r,e.g,e.b),a.setXYZ(24,t.r,t.g,t.b),a.setXYZ(25,t.r,t.g,t.b),a.setXYZ(26,t.r,t.g,t.b),a.setXYZ(27,t.r,t.g,t.b),a.setXYZ(28,t.r,t.g,t.b),a.setXYZ(29,t.r,t.g,t.b),a.setXYZ(30,t.r,t.g,t.b),a.setXYZ(31,t.r,t.g,t.b),a.setXYZ(32,n.r,n.g,n.b),a.setXYZ(33,n.r,n.g,n.b),a.setXYZ(34,n.r,n.g,n.b),a.setXYZ(35,n.r,n.g,n.b),a.setXYZ(36,n.r,n.g,n.b),a.setXYZ(37,n.r,n.g,n.b),a.setXYZ(38,r.r,r.g,r.b),a.setXYZ(39,r.r,r.g,r.b),a.setXYZ(40,s.r,s.g,s.b),a.setXYZ(41,s.r,s.g,s.b),a.setXYZ(42,s.r,s.g,s.b),a.setXYZ(43,s.r,s.g,s.b),a.setXYZ(44,s.r,s.g,s.b),a.setXYZ(45,s.r,s.g,s.b),a.setXYZ(46,s.r,s.g,s.b),a.setXYZ(47,s.r,s.g,s.b),a.setXYZ(48,s.r,s.g,s.b),a.setXYZ(49,s.r,s.g,s.b),a.needsUpdate=!0,this}update(){const e=this.geometry,t=this.pointMap,n=1,r=1;let s,o;if(ni.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),this.camera.reversedDepth===!0)s=1,o=0;else if(this.camera.coordinateSystem===Fs)s=-1,o=1;else if(this.camera.coordinateSystem===Kf)s=0,o=1;else throw new Error("THREE.CameraHelper.update(): Invalid coordinate system: "+this.camera.coordinateSystem);ui("c",t,e,ni,0,0,s),ui("t",t,e,ni,0,0,o),ui("n1",t,e,ni,-n,-r,s),ui("n2",t,e,ni,n,-r,s),ui("n3",t,e,ni,-n,r,s),ui("n4",t,e,ni,n,r,s),ui("f1",t,e,ni,-n,-r,o),ui("f2",t,e,ni,n,-r,o),ui("f3",t,e,ni,-n,r,o),ui("f4",t,e,ni,n,r,o),ui("u1",t,e,ni,n*.7,r*1.1,s),ui("u2",t,e,ni,-n*.7,r*1.1,s),ui("u3",t,e,ni,0,r*2,s),ui("cf1",t,e,ni,-n,0,o),ui("cf2",t,e,ni,n,0,o),ui("cf3",t,e,ni,0,-r,o),ui("cf4",t,e,ni,0,r,o),ui("cn1",t,e,ni,-n,0,s),ui("cn2",t,e,ni,n,0,s),ui("cn3",t,e,ni,0,-r,s),ui("cn4",t,e,ni,0,r,s),e.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}}function ui(i,e,t,n,r,s,o){ux.set(r,s,o).unproject(n);const a=e[i];if(a!==void 0){const l=t.getAttribute("position");for(let c=0,u=a.length;c<u;c++)l.setXYZ(a[c],ux.x,ux.y,ux.z)}}const dx=new jn;class I6 extends gs{constructor(e,t=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(8*3),s=new Rt;s.setIndex(new zt(n,1)),s.setAttribute("position",new zt(r,3)),super(s,new Ai({color:t,toneMapped:!1})),this.object=e,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(){if(this.object!==void 0&&dx.setFromObject(this.object),dx.isEmpty())return;const e=dx.min,t=dx.max,n=this.geometry.attributes.position,r=n.array;r[0]=t.x,r[1]=t.y,r[2]=t.z,r[3]=e.x,r[4]=t.y,r[5]=t.z,r[6]=e.x,r[7]=e.y,r[8]=t.z,r[9]=t.x,r[10]=e.y,r[11]=t.z,r[12]=t.x,r[13]=t.y,r[14]=e.z,r[15]=e.x,r[16]=t.y,r[17]=e.z,r[18]=e.x,r[19]=e.y,r[20]=e.z,r[21]=t.x,r[22]=e.y,r[23]=e.z,n.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(e){return this.object=e,this.update(),this}copy(e,t){return super.copy(e,t),this.object=e.object,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class L6 extends gs{constructor(e,t=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],s=new Rt;s.setIndex(new zt(n,1)),s.setAttribute("position",new ct(r,3)),super(s,new Ai({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 B6 extends Ma{constructor(e,t=1,n=16776960){const r=n,s=[1,-1,0,-1,1,0,-1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],o=new Rt;o.setAttribute("position",new ct(s,3)),o.computeBoundingSphere(),super(o,new Ai({color:r,toneMapped:!1})),this.type="PlaneHelper",this.plane=e,this.size=t;const a=[1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],l=new Rt;l.setAttribute("position",new ct(a,3)),l.computeBoundingSphere(),this.add(new Kt(l,new pi({color:r,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 ER=new H;let fx,hS;class D6 extends Wt{constructor(e=new H(0,0,1),t=new H(0,0,0),n=1,r=16776960,s=n*.2,o=s*.2){super(),this.type="ArrowHelper",fx===void 0&&(fx=new Rt,fx.setAttribute("position",new ct([0,0,0,0,1,0],3)),hS=new $m(.5,1,5,1),hS.translate(0,-.5,0)),this.position.copy(t),this.line=new Ma(fx,new Ai({color:r,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new Kt(hS,new pi({color:r,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(n,s,o)}setDirection(e){if(e.y>.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{ER.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(ER,t)}}setLength(e,t=e*.2,n=t*.2){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class F6 extends gs{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],r=new Rt;r.setAttribute("position",new ct(t,3)),r.setAttribute("color",new ct(n,3));const s=new Ai({vertexColors:!0,toneMapped:!1});super(r,s),this.type="AxesHelper"}setColors(e,t,n){const r=new Ve,s=this.geometry.attributes.color.array;return r.set(e),r.toArray(s,0),r.toArray(s,3),r.set(t),r.toArray(s,6),r.toArray(s,9),r.set(n),r.toArray(s,12),r.toArray(s,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class N6{constructor(){this.type="ShapePath",this.color=new Ve,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new Ty,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,r){return this.currentPath.quadraticCurveTo(e,t,n,r),this}bezierCurveTo(e,t,n,r,s,o){return this.currentPath.bezierCurveTo(e,t,n,r,s,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(g){const S=[];for(let b=0,A=g.length;b<A;b++){const w=g[b],C=new Du;C.curves=w.curves,S.push(C)}return S}function n(g,S){const b=S.length;let A=!1;for(let w=b-1,C=0;C<b;w=C++){let P=S[w],B=S[C],R=B.x-P.x,E=B.y-P.y;if(Math.abs(E)>Number.EPSILON){if(E<0&&(P=S[C],R=-R,B=S[w],E=-E),g.y<P.y||g.y>B.y)continue;if(g.y===P.y){if(g.x===P.x)return!0}else{const L=E*(g.x-P.x)-R*(g.y-P.y);if(L===0)return!0;if(L<0)continue;A=!A}}else{if(g.y!==P.y)continue;if(B.x<=g.x&&g.x<=P.x||P.x<=g.x&&g.x<=B.x)return!0}}return A}const r=zo.isClockWise,s=this.subPaths;if(s.length===0)return[];let o,a,l;const c=[];if(s.length===1)return a=s[0],l=new Du,l.curves=a.curves,c.push(l),c;let u=!r(s[0].getPoints());u=e?!u:u;const d=[],p=[];let m=[],x=0,v;p[x]=void 0,m[x]=[];for(let g=0,S=s.length;g<S;g++)a=s[g],v=a.getPoints(),o=r(v),o=e?!o:o,o?(!u&&p[x]&&x++,p[x]={s:new Du,p:v}
vendor: 5,417 bytes, lines 116-120
116,p[x].s.curves=a.curves,u&&x++,m[x]=[]):m[x].push({h:a,p:v[0]});if(!p[0])return t(s);if(p.length>1){let g=!1,S=0;for(let b=0,A=p.length;b<A;b++)d[b]=[];for(let b=0,A=p.length;b<A;b++){const w=m[b];for(let C=0;C<w.length;C++){const P=w[C];let B=!0;for(let R=0;R<p.length;R++)n(P.p,p[R].p)&&(b!==R&&S++,B?(B=!1,d[R].push(P)):g=!0);B&&d[b].push(P)}}S>0&&g===!1&&(m=d)}let _;for(let g=0,S=p.length;g<S;g++){l=p[g].s,c.push(l),_=m[g];for(let b=0,A=_.length;b<A;b++)l.holes.push(_[b].h)}return c}}class iF extends Aa{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){at("Controls: connect() now requires an element.");return}this.domElement!==null&&this.disconnect(),this.domElement=e}disconnect(){}dispose(){}update(){}}function k6(i,e){const t=i.image&&i.image.width?i.image.width/i.image.height:1;return t>e?(i.repeat.x=1,i.repeat.y=t/e,i.offset.x=0,i.offset.y=(1-i.repeat.y)/2):(i.repeat.x=e/t,i.repeat.y=1,i.offset.x=(1-i.repeat.x)/2,i.offset.y=0),i}function O6(i,e){const t=i.image&&i.image.width?i.image.width/i.image.height:1;return t>e?(i.repeat.x=e/t,i.repeat.y=1,i.offset.x=(1-i.repeat.x)/2,i.offset.y=0):(i.repeat.x=1,i.repeat.y=t/e,i.offset.x=0,i.offset.y=(1-i.repeat.y)/2),i}function U6(i){return i.repeat.x=1,i.repeat.y=1,i.offset.x=0,i.offset.y=0,i}function _M(i,e,t,n){const r=z6(n);switch(t){case ow:return i*e;case o1:return i*e/r.components*r.byteLength;case Ym:return i*e/r.components*r.byteLength;case Xu:return i*e*2/r.components*r.byteLength;case a1:return i*e*2/r.components*r.byteLength;case aw:return i*e*3/r.components*r.byteLength;case Ni:return i*e*4/r.components*r.byteLength;case l1:return i*e*4/r.components*r.byteLength;case Vp:case Xp:return Math.floor((i+3)/4)*Math.floor((e+3)/4)*8;case Yp:case Jp:return Math.floor((i+3)/4)*Math.floor((e+3)/4)*16;case Xv:case Jv:return Math.max(i,16)*Math.max(e,8)/4;case Vv:case Yv:return Math.max(i,8)*Math.max(e,8)/2;case Kv:case qv:case Qv:case $v:return Math.floor((i+3)/4)*Math.floor((e+3)/4)*8;case Zv:case ey:case ty:return Math.floor((i+3)/4)*Math.floor((e+3)/4)*16;case ny:return Math.floor((i+3)/4)*Math.floor((e+3)/4)*16;case iy:return Math.floor((i+4)/5)*Math.floor((e+3)/4)*16;case ry:return Math.floor((i+4)/5)*Math.floor((e+4)/5)*16;case sy:return Math.floor((i+5)/6)*Math.floor((e+4)/5)*16;case oy:return Math.floor((i+5)/6)*Math.floor((e+5)/6)*16;case ay:return Math.floor((i+7)/8)*Math.floor((e+4)/5)*16;case ly:return Math.floor((i+7)/8)*Math.floor((e+5)/6)*16;case cy:return Math.floor((i+7)/8)*Math.floor((e+7)/8)*16;case uy:return Math.floor((i+9)/10)*Math.floor((e+4)/5)*16;case dy:return Math.floor((i+9)/10)*Math.floor((e+5)/6)*16;case fy:return Math.floor((i+9)/10)*Math.floor((e+7)/8)*16;case hy:return Math.floor((i+9)/10)*Math.floor((e+9)/10)*16;case py:return Math.floor((i+11)/12)*Math.floor((e+9)/10)*16;case my:return Math.floor((i+11)/12)*Math.floor((e+11)/12)*16;case gy:case xy:case vy:return Math.ceil(i/4)*Math.ceil(e/4)*16;case yy:case _y:return Math.ceil(i/4)*Math.ceil(e/4)*8;case Sy:case by:return Math.ceil(i/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${t} format.`)}function z6(i){switch(i){case jr:case nw:return{byteLength:1,components:1};case Yf:case iw:case sr:return{byteLength:2,components:1};case r1:case s1:return{byteLength:2,components:4};case Mo:case i1:case Vr:return{byteLength:4,components:1};case rw:case sw:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${i}.`)}class H6{static contain(e,t){return k6(e,t)}static cover(e,t){return O6(e,t)}static fill(e){return U6(e)}static getByteLength(e,t,n,r){return _M(e,t,n,r)}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:jm}}));typeof window<"u"&&(window.__THREE__?at("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=jm);/** 117 * @license 118 * Copyright 2010-2025 Three.js Authors 119 * SPDX-License-Identifier: MIT 120 */function rF(){let i=null,e=!1,t=null,n=null;function r(s,o){t(s,o),n=i.requestAnimationFrame(r)}return{start:function(){e!==!0&&t!==null&&(n=i.requestAnimationFrame(r),e=!0)},stop:function(){i.cancelAnimationFrame(n),e=!1},setAnimationLoop:function(s){t=s},setContext:function(s){i=s}}}function G6(i){const e=new WeakMap;function t(a,l){const c=a.array,u=a.usage,d=c.byteLength,p=i.createBuffer();i.bindBuffer(l,p),i.bufferData(l,c,u),a.onUploadCallback();let m;if(c instanceof Float32Array)m=i.FLOAT;else if(typeof Float16Array<"u"&&c instanceof Float16Array)m=i.HALF_FLOAT;else if(c instanceof Uint16Array)a.isFloat16BufferAttribute?m=i.HALF_FLOAT:m=i.UNSIGNED_SHORT;else if(c instanceof Int16Array)m=i.SHORT;else if(c instanceof Uint32Array)m=i.UNSIGNED_INT;else if(c instanceof Int32Array)m=i.INT;else if(c instanceof Int8Array)m=i.BYTE;else if(c instanceof Uint8Array)m=i.UNSIGNED_BYTE;else if(c instanceof Uint8ClampedArray)m=i.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+c);return{buffer:p,type:m,bytesPerElement:c.BYTES_PER_ELEMENT,version:a.version,size:d}}function n(a,l,c){const u=l.array,d=l.updateRanges;if(i.bindBuffer(c,a),d.length===0)i.bufferSubData(c,0,u);else{d.sort((m,x)=>m.start-x.start);let p=0;for(let m=1;m<d.length;m++){const x=d[p],v=d[m];
vendor: 5,162 bytes, lines 120-233
120v.start<=x.start+x.count+1?x.count=Math.max(x.count,v.start+v.count-x.start):(++p,d[p]=v)}d.length=p+1;for(let m=0,x=d.length;m<x;m++){const v=d[m];i.bufferSubData(c,v.start*u.BYTES_PER_ELEMENT,u,v.start,v.count)}l.clearUpdateRanges()}l.onUploadCallback()}function r(a){return a.isInterleavedBufferAttribute&&(a=a.data),e.get(a)}function s(a){a.isInterleavedBufferAttribute&&(a=a.data);const l=e.get(a);l&&(i.deleteBuffer(l.buffer),e.delete(a))}function o(a,l){if(a.isInterleavedBufferAttribute&&(a=a.data),a.isGLBufferAttribute){const u=e.get(a);(!u||u.version<a.version)&&e.set(a,{buffer:a.buffer,type:a.type,bytesPerElement:a.elementSize,version:a.version});return}const c=e.get(a);if(c===void 0)e.set(a,t(a,l));else if(c.version<a.version){if(c.size!==a.array.byteLength)throw new Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.");n(c.buffer,a,l),c.version=a.version}}return{get:r,remove:s,update:o}}var j6=`#ifdef USE_ALPHAHASH 121 if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard; 122#endif`,W6=`#ifdef USE_ALPHAHASH 123 const float ALPHA_HASH_SCALE = 0.05; 124 float hash2D( vec2 value ) { 125 return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) ); 126 } 127 float hash3D( vec3 value ) { 128 return hash2D( vec2( hash2D( value.xy ), value.z ) ); 129 } 130 float getAlphaHashThreshold( vec3 position ) { 131 float maxDeriv = max( 132 length( dFdx( position.xyz ) ), 133 length( dFdy( position.xyz ) ) 134 ); 135 float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv ); 136 vec2 pixScales = vec2( 137 exp2( floor( log2( pixScale ) ) ), 138 exp2( ceil( log2( pixScale ) ) ) 139 ); 140 vec2 alpha = vec2( 141 hash3D( floor( pixScales.x * position.xyz ) ), 142 hash3D( floor( pixScales.y * position.xyz ) ) 143 ); 144 float lerpFactor = fract( log2( pixScale ) ); 145 float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y; 146 float a = min( lerpFactor, 1.0 - lerpFactor ); 147 vec3 cases = vec3( 148 x * x / ( 2.0 * a * ( 1.0 - a ) ), 149 ( x - 0.5 * a ) / ( 1.0 - a ), 150 1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) ) 151 ); 152 float threshold = ( x < ( 1.0 - a ) ) 153 ? ( ( x < a ) ? cases.x : cases.y ) 154 : cases.z; 155 return clamp( threshold , 1.0e-6, 1.0 ); 156 } 157#endif`,V6=`#ifdef USE_ALPHAMAP 158 diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g; 159#endif`,X6=`#ifdef USE_ALPHAMAP 160 uniform sampler2D alphaMap; 161#endif`,Y6=`#ifdef USE_ALPHATEST 162 #ifdef ALPHA_TO_COVERAGE 163 diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a ); 164 if ( diffuseColor.a == 0.0 ) discard; 165 #else 166 if ( diffuseColor.a < alphaTest ) discard; 167 #endif 168#endif`,J6=`#ifdef USE_ALPHATEST 169 uniform float alphaTest; 170#endif`,K6=`#ifdef USE_AOMAP 171 float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0; 172 reflectedLight.indirectDiffuse *= ambientOcclusion; 173 #if defined( USE_CLEARCOAT ) 174 clearcoatSpecularIndirect *= ambientOcclusion; 175 #endif 176 #if defined( USE_SHEEN ) 177 sheenSpecularIndirect *= ambientOcclusion; 178 #endif 179 #if defined( USE_ENVMAP ) && defined( STANDARD ) 180 float dotNV = saturate( dot( geometryNormal, geometryViewDir ) ); 181 reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness ); 182 #endif 183#endif`,q6=`#ifdef USE_AOMAP 184 uniform sampler2D aoMap; 185 uniform float aoMapIntensity; 186#endif`,Z6=`#ifdef USE_BATCHING 187 #if ! defined( GL_ANGLE_multi_draw ) 188 #define gl_DrawID _gl_DrawID 189 uniform int _gl_DrawID; 190 #endif 191 uniform highp sampler2D batchingTexture; 192 uniform highp usampler2D batchingIdTexture; 193 mat4 getBatchingMatrix( const in float i ) { 194 int size = textureSize( batchingTexture, 0 ).x; 195 int j = int( i ) * 4; 196 int x = j % size; 197 int y = j / size; 198 vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 ); 199 vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 ); 200 vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 ); 201 vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 ); 202 return mat4( v1, v2, v3, v4 ); 203 } 204 float getIndirectIndex( const in int i ) { 205 int size = textureSize( batchingIdTexture, 0 ).x; 206 int x = i % size; 207 int y = i / size; 208 return float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r ); 209 } 210#endif 211#ifdef USE_BATCHING_COLOR 212 uniform sampler2D batchingColorTexture; 213 vec3 getBatchingColor( const in float i ) { 214 int size = textureSize( batchingColorTexture, 0 ).x; 215 int j = int( i ); 216 int x = j % size; 217 int y = j / size; 218 return texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb; 219 } 220#endif`,Q6=`#ifdef USE_BATCHING 221 mat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) ); 222#endif`,$6=`vec3 transformed = vec3( position ); 223#ifdef USE_ALPHAHASH 224 vPosition = vec3( position ); 225#endif`,eG=`vec3 objectNormal = vec3( normal ); 226#ifdef USE_TANGENT 227 vec3 objectTangent = vec3( tangent.xyz ); 228#endif`,tG=`float G_BlinnPhong_Implicit( ) { 229 return 0.25; 230} 231float D_BlinnPhong( const in float shininess, const in float dotNH ) { 232 return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess ); 233}
234vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) { 235 vec3 halfDir = normalize( lightDir + viewDir ); 236 float dotNH = saturate( dot( normal, halfDir ) ); 237 float dotVH = saturate( dot( viewDir, halfDir ) ); 238 vec3 F = F_Schlick( specularColor, 1.0, dotVH ); 239 float G = G_BlinnPhong_Implicit( ); 240 float D = D_BlinnPhong( shininess, dotNH ); 241 return F * ( G * D ); 242} // validated`,nG=`#ifdef USE_IRIDESCENCE 243 const mat3 XYZ_TO_REC709 = mat3( 244 3.2404542, -0.9692660, 0.0556434, 245 -1.5371385, 1.8760108, -0.2040259, 246 -0.4985314, 0.0415560, 1.0572252 247 ); 248 vec3 Fresnel0ToIor( vec3 fresnel0 ) { 249 vec3 sqrtF0 = sqrt( fresnel0 ); 250 return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 ); 251 } 252 vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) { 253 return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) ); 254 } 255 float IorToFresnel0( float transmittedIor, float incidentIor ) { 256 return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor )); 257 } 258 vec3 evalSensitivity( float OPD, vec3 shift ) { 259 float phase = 2.0 * PI * OPD * 1.0e-9; 260 vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 ); 261 vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 ); 262 vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 ); 263 vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var ); 264 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 ) ); 265 xyz /= 1.0685e-7; 266 vec3 rgb = XYZ_TO_REC709 * xyz; 267 return rgb; 268 } 269 vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) { 270 vec3 I; 271 float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) ); 272 float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) ); 273 float cosTheta2Sq = 1.0 - sinTheta2Sq; 274 if ( cosTheta2Sq < 0.0 ) { 275 return vec3( 1.0 ); 276 } 277 float cosTheta2 = sqrt( cosTheta2Sq ); 278 float R0 = IorToFresnel0( iridescenceIOR, outsideIOR ); 279 float R12 = F_Schlick( R0, 1.0, cosTheta1 );
280 float T121 = 1.0 - R12; 281 float phi12 = 0.0; 282 if ( iridescenceIOR < outsideIOR ) phi12 = PI; 283 float phi21 = PI - phi12; 284 vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR ); 285 vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 ); 286 vec3 phi23 = vec3( 0.0 ); 287 if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI; 288 if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI; 289 if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI; 290 float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2; 291 vec3 phi = vec3( phi21 ) + phi23; 292 vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 ); 293 vec3 r123 = sqrt( R123 ); 294 vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 ); 295 vec3 C0 = R12 + Rs; 296 I = C0; 297 vec3 Cm = Rs - T121; 298 for ( int m = 1; m <= 2; ++ m ) { 299 Cm *= r123; 300 vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi ); 301 I += Cm * Sm; 302 } 303 return max( I, vec3( 0.0 ) ); 304 } 305#endif`,iG=`#ifdef USE_BUMPMAP 306 uniform sampler2D bumpMap; 307 uniform float bumpScale; 308 vec2 dHdxy_fwd() { 309 vec2 dSTdx = dFdx( vBumpMapUv ); 310 vec2 dSTdy = dFdy( vBumpMapUv ); 311 float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x; 312 float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll; 313 float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll; 314 return vec2( dBx, dBy ); 315 } 316 vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) { 317 vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) ); 318 vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) ); 319 vec3 vN = surf_norm; 320 vec3 R1 = cross( vSigmaY, vN ); 321 vec3 R2 = cross( vN, vSigmaX ); 322 float fDet = dot( vSigmaX, R1 ) * faceDirection; 323 vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 ); 324 return normalize( abs( fDet ) * surf_norm - vGrad ); 325 } 326#endif`,rG=`#if NUM_CLIPPING_PLANES > 0 327 vec4 plane; 328 #ifdef ALPHA_TO_COVERAGE 329 float distanceToPlane, distanceGradient; 330 float clipOpacity = 1.0; 331 #pragma unroll_loop_start 332 for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { 333 plane = clippingPlanes[ i ]; 334 distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; 335 distanceGradient = fwidth( distanceToPlane ) / 2.0; 336 clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); 337 if ( clipOpacity == 0.0 ) discard; 338 } 339 #pragma unroll_loop_end 340 #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES 341 float unionClipOpacity = 1.0; 342 #pragma unroll_loop_start 343 for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { 344 plane = clippingPlanes[ i ]; 345 distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; 346 distanceGradient = fwidth( distanceToPlane ) / 2.0; 347 unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); 348 } 349 #pragma unroll_loop_end 350 clipOpacity *= 1.0 - unionClipOpacity; 351 #endif 352 diffuseColor.a *= clipOpacity; 353 if ( diffuseColor.a == 0.0 ) discard; 354 #else 355 #pragma unroll_loop_start 356 for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { 357 plane = clippingPlanes[ i ]; 358 if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; 359 } 360 #pragma unroll_loop_end 361 #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES 362 bool clipped = true; 363 #pragma unroll_loop_start 364 for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { 365 plane = clippingPlanes[ i ]; 366 clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; 367 } 368 #pragma unroll_loop_end 369 if ( clipped ) discard; 370 #endif 371 #endif 372#endif`,sG=`#if NUM_CLIPPING_PLANES > 0 373 varying vec3 vClipPosition; 374 uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; 375#endif`,oG=`#if NUM_CLIPPING_PLANES > 0 376 varying vec3 vClipPosition; 377#endif`,aG=`#if NUM_CLIPPING_PLANES > 0 378 vClipPosition = - mvPosition.xyz; 379#endif`,lG=`#if defined( USE_COLOR_ALPHA ) 380 diffuseColor *= vColor; 381#elif defined( USE_COLOR ) 382 diffuseColor.rgb *= vColor; 383#endif`,cG=`#if defined( USE_COLOR_ALPHA ) 384 varying vec4 vColor; 385#elif defined( USE_COLOR ) 386 varying vec3 vColor; 387#endif`,uG=`#if defined( USE_COLOR_ALPHA ) 388 varying vec4 vColor; 389#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) 390 varying vec3 vColor; 391#endif`,dG=`#if defined( USE_COLOR_ALPHA ) 392 vColor = vec4( 1.0 ); 393#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) 394 vColor = vec3( 1.0 ); 395#endif 396#ifdef USE_COLOR 397 vColor *= color; 398#endif 399#ifdef USE_INSTANCING_COLOR 400 vColor.xyz *= instanceColor.xyz; 401#endif 402#ifdef USE_BATCHING_COLOR 403 vec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) ); 404 vColor.xyz *= batchingColor.xyz; 405#endif`,fG=`#define PI 3.141592653589793 406#define PI2 6.283185307179586 407#define PI_HALF 1.5707963267948966 408#define RECIPROCAL_PI 0.3183098861837907 409#define RECIPROCAL_PI2 0.15915494309189535 410#define EPSILON 1e-6 411#ifndef saturate 412#define saturate( a ) clamp( a, 0.0, 1.0 ) 413#endif 414#define whiteComplement( a ) ( 1.0 - saturate( a ) ) 415float pow2( const in float x ) { return x*x; } 416vec3 pow2( const in vec3 x ) { return x*x; } 417float pow3( const in float x ) { return x*x*x; } 418float pow4( const in float x ) { float x2 = x*x; return x2*x2; } 419float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } 420float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } 421highp float rand( const in vec2 uv ) { 422 const highp float a = 12.9898, b = 78.233, c = 43758.5453; 423 highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); 424 return fract( sin( sn ) * c ); 425} 426#ifdef HIGH_PRECISION 427 float precisionSafeLength( vec3 v ) { return length( v ); } 428#else 429 float precisionSafeLength( vec3 v ) { 430 float maxComponent = max3( abs( v ) ); 431 return length( v / maxComponent ) * maxComponent; 432 } 433#endif 434struct IncidentLight { 435 vec3 color; 436 vec3 direction; 437 bool visible; 438}; 439struct ReflectedLight { 440 vec3 directDiffuse; 441 vec3 directSpecular; 442 vec3 indirectDiffuse; 443 vec3 indirectSpecular; 444}; 445#ifdef USE_ALPHAHASH 446 varying vec3 vPosition; 447#endif 448vec3 transformDirection( in vec3 dir, in mat4 matrix ) { 449 return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); 450} 451vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { 452 return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); 453} 454bool isPerspectiveMatrix( mat4 m ) { 455 return m[ 2 ][ 3 ] == - 1.0; 456} 457vec2 equirectUv( in vec3 dir ) { 458 float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; 459 float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; 460 return vec2( u, v ); 461}
462vec3 BRDF_Lambert( const in vec3 diffuseColor ) { 463 return RECIPROCAL_PI * diffuseColor; 464} 465vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { 466 float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); 467 return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); 468} 469float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { 470 float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); 471 return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); 472} // validated`,hG=`#ifdef ENVMAP_TYPE_CUBE_UV 473 #define cubeUV_minMipLevel 4.0 474 #define cubeUV_minTileSize 16.0 475 float getFace( vec3 direction ) { 476 vec3 absDirection = abs( direction ); 477 float face = - 1.0; 478 if ( absDirection.x > absDirection.z ) { 479 if ( absDirection.x > absDirection.y ) 480 face = direction.x > 0.0 ? 0.0 : 3.0; 481 else 482 face = direction.y > 0.0 ? 1.0 : 4.0; 483 } else { 484 if ( absDirection.z > absDirection.y ) 485 face = direction.z > 0.0 ? 2.0 : 5.0; 486 else 487 face = direction.y > 0.0 ? 1.0 : 4.0; 488 } 489 return face; 490 } 491 vec2 getUV( vec3 direction, float face ) { 492 vec2 uv; 493 if ( face == 0.0 ) { 494 uv = vec2( direction.z, direction.y ) / abs( direction.x ); 495 } else if ( face == 1.0 ) { 496 uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); 497 } else if ( face == 2.0 ) { 498 uv = vec2( - direction.x, direction.y ) / abs( direction.z ); 499 } else if ( face == 3.0 ) { 500 uv = vec2( - direction.z, direction.y ) / abs( direction.x ); 501 } else if ( face == 4.0 ) { 502 uv = vec2( - direction.x, direction.z ) / abs( direction.y ); 503 } else { 504 uv = vec2( direction.x, direction.y ) / abs( direction.z ); 505 } 506 return 0.5 * ( uv + 1.0 ); 507 } 508 vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { 509 float face = getFace( direction ); 510 float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); 511 mipInt = max( mipInt, cubeUV_minMipLevel ); 512 float faceSize = exp2( mipInt ); 513 highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; 514 if ( face > 2.0 ) { 515 uv.y += faceSize; 516 face -= 3.0; 517 } 518 uv.x += face * faceSize; 519 uv.x += filterInt * 3.0 * cubeUV_minTileSize; 520 uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); 521 uv.x *= CUBEUV_TEXEL_WIDTH; 522 uv.y *= CUBEUV_TEXEL_HEIGHT; 523 #ifdef texture2DGradEXT 524 return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; 525 #else 526 return texture2D( envMap, uv ).rgb; 527 #endif 528 } 529 #define cubeUV_r0 1.0 530 #define cubeUV_m0 - 2.0 531 #define cubeUV_r1 0.8 532 #define cubeUV_m1 - 1.0 533 #define cubeUV_r4 0.4 534 #define cubeUV_m4 2.0 535 #define cubeUV_r5 0.305 536 #define cubeUV_m5 3.0 537 #define cubeUV_r6 0.21 538 #define cubeUV_m6 4.0 539 float roughnessToMip( float roughness ) { 540 float mip = 0.0; 541 if ( roughness >= cubeUV_r1 ) { 542 mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; 543 } else if ( roughness >= cubeUV_r4 ) { 544 mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; 545 } else if ( roughness >= cubeUV_r5 ) { 546 mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; 547 } else if ( roughness >= cubeUV_r6 ) { 548 mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; 549 } else { 550 mip = - 2.0 * log2( 1.16 * roughness ); } 551 return mip; 552 } 553 vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { 554 float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); 555 float mipF = fract( mip ); 556 float mipInt = floor( mip ); 557 vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); 558 if ( mipF == 0.0 ) { 559 return vec4( color0, 1.0 ); 560 } else { 561 vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); 562 return vec4( mix( color0, color1, mipF ), 1.0 ); 563 } 564 } 565#endif`,pG=`vec3 transformedNormal = objectNormal; 566#ifdef USE_TANGENT 567 vec3 transformedTangent = objectTangent; 568#endif 569#ifdef USE_BATCHING 570 mat3 bm = mat3( batchingMatrix ); 571 transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) ); 572 transformedNormal = bm * transformedNormal; 573 #ifdef USE_TANGENT 574 transformedTangent = bm * transformedTangent; 575 #endif 576#endif 577#ifdef USE_INSTANCING 578 mat3 im = mat3( instanceMatrix ); 579 transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) ); 580 transformedNormal = im * transformedNormal; 581 #ifdef USE_TANGENT 582 transformedTangent = im * transformedTangent; 583 #endif 584#endif 585transformedNormal = normalMatrix * transformedNormal; 586#ifdef FLIP_SIDED 587 transformedNormal = - transformedNormal; 588#endif 589#ifdef USE_TANGENT 590 transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz; 591 #ifdef FLIP_SIDED 592 transformedTangent = - transformedTangent; 593 #endif 594#endif`,mG=`#ifdef USE_DISPLACEMENTMAP 595 uniform sampler2D displacementMap; 596 uniform float displacementScale; 597 uniform float displacementBias; 598#endif`,gG=`#ifdef USE_DISPLACEMENTMAP 599 transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + dis
599placementBias ); 600#endif`,xG=`#ifdef USE_EMISSIVEMAP 601 vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); 602 #ifdef DECODE_VIDEO_TEXTURE_EMISSIVE 603 emissiveColor = sRGBTransferEOTF( emissiveColor ); 604 #endif 605 totalEmissiveRadiance *= emissiveColor.rgb; 606#endif`,vG=`#ifdef USE_EMISSIVEMAP 607 uniform sampler2D emissiveMap; 608#endif`,yG="gl_FragColor = linearToOutputTexel( gl_FragColor );",_G=`vec4 LinearTransferOETF( in vec4 value ) { 609 return value; 610} 611vec4 sRGBTransferEOTF( in vec4 value ) { 612 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 ); 613} 614vec4 sRGBTransferOETF( in vec4 value ) { 615 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 ); 616}`,SG=`#ifdef USE_ENVMAP 617 #ifdef ENV_WORLDPOS 618 vec3 cameraToFrag; 619 if ( isOrthographic ) { 620 cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); 621 } else { 622 cameraToFrag = normalize( vWorldPosition - cameraPosition ); 623 } 624 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 625 #ifdef ENVMAP_MODE_REFLECTION 626 vec3 reflectVec = reflect( cameraToFrag, worldNormal ); 627 #else 628 vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); 629 #endif 630 #else 631 vec3 reflectVec = vReflect; 632 #endif 633 #ifdef ENVMAP_TYPE_CUBE 634 vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); 635 #else 636 vec4 envColor = vec4( 0.0 ); 637 #endif 638 #ifdef ENVMAP_BLENDING_MULTIPLY 639 outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); 640 #elif defined( ENVMAP_BLENDING_MIX ) 641 outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); 642 #elif defined( ENVMAP_BLENDING_ADD ) 643 outgoingLight += envColor.xyz * specularStrength * reflectivity; 644 #endif 645#endif`,bG=`#ifdef USE_ENVMAP 646 uniform float envMapIntensity; 647 uniform float flipEnvMap; 648 uniform mat3 envMapRotation; 649 #ifdef ENVMAP_TYPE_CUBE 650 uniform samplerCube envMap; 651 #else 652 uniform sampler2D envMap; 653 #endif 654#endif`,MG=`#ifdef USE_ENVMAP 655 uniform float reflectivity; 656 #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) 657 #define ENV_WORLDPOS 658 #endif 659 #ifdef ENV_WORLDPOS 660 varying vec3 vWorldPosition; 661 uniform float refractionRatio; 662 #else 663 varying vec3 vReflect; 664 #endif 665#endif`,AG=`#ifdef USE_ENVMAP 666 #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) 667 #define ENV_WORLDPOS 668 #endif 669 #ifdef ENV_WORLDPOS 670 671 varying vec3 vWorldPosition; 672 #else 673 varying vec3 vReflect; 674 uniform float refractionRatio; 675 #endif 676#endif`,wG=`#ifdef USE_ENVMAP 677 #ifdef ENV_WORLDPOS 678 vWorldPosition = worldPosition.xyz; 679 #else 680 vec3 cameraToVertex; 681 if ( isOrthographic ) { 682 cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); 683 } else {
684 cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); 685 } 686 vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); 687 #ifdef ENVMAP_MODE_REFLECTION 688 vReflect = reflect( cameraToVertex, worldNormal ); 689 #else 690 vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); 691 #endif 692 #endif 693#endif`,TG=`#ifdef USE_FOG 694 vFogDepth = - mvPosition.z; 695#endif`,EG=`#ifdef USE_FOG 696 varying float vFogDepth; 697#endif`,CG=`#ifdef USE_FOG 698 #ifdef FOG_EXP2 699 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); 700 #else 701 float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); 702 #endif 703 gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); 704#endif`,RG=`#ifdef USE_FOG 705 uniform vec3 fogColor; 706 varying float vFogDepth; 707 #ifdef FOG_EXP2 708 uniform float fogDensity; 709 #else 710 uniform float fogNear; 711 uniform float fogFar; 712 #endif 713#endif`,PG=`#ifdef USE_GRADIENTMAP 714 uniform sampler2D gradientMap; 715#endif 716vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { 717 float dotNL = dot( normal, lightDirection ); 718 vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); 719 #ifdef USE_GRADIENTMAP 720 return vec3( texture2D( gradientMap, coord ).r ); 721 #else 722 vec2 fw = fwidth( coord ) * 0.5; 723 return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); 724 #endif 725}`,IG=`#ifdef USE_LIGHTMAP 726 uniform sampler2D lightMap; 727 uniform float lightMapIntensity; 728#endif`,LG=`LambertMaterial material; 729material.diffuseColor = diffuseColor.rgb; 730material.specularStrength = specularStrength;`,BG=`varying vec3 vViewPosition; 731struct LambertMaterial { 732 vec3 diffuseColor; 733 float specularStrength; 734}; 735void 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 ) { 736 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 737 vec3 irradiance = dotNL * directLight.color; 738 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 739} 740void 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 ) { 741 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 742} 743#define RE_Direct RE_Direct_Lambert 744#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,DG=`uniform bool receiveShadow; 745uniform vec3 ambientLightColor; 746#if defined( USE_LIGHT_PROBES ) 747 uniform vec3 lightProbe[ 9 ]; 748#endif 749vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { 750 float x = normal.x, y = normal.y, z = normal.z; 751 vec3 result = shCoefficients[ 0 ] * 0.886227; 752 result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; 753 result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; 754 result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; 755 result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; 756 result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; 757 result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); 758 result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; 759 result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); 760 return result; 761} 762vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { 763 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 764 vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); 765 return irradiance; 766} 767vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { 768 vec3 irradiance = ambientLightColor; 769 return irradiance; 770} 771float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { 772 float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); 773 if ( cutoffDistance > 0.0 ) { 774 distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); 775 } 776 return distanceFalloff; 777} 778float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { 779 return smoothstep( coneCosine, penumbraCosine, angleCosine ); 780} 781#if NUM_DIR_LIGHTS > 0 782 struct DirectionalLight { 783 vec3 direction; 784 vec3 color; 785 }; 786 uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; 787 void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) { 788 light.color = directionalLight.color; 789 light.direction = directionalLight.direction; 790 light.visible = true; 791 } 792#endif 793#if NUM_POINT_LIGHTS > 0 794 struct PointLight { 795 vec3 position; 796 vec3 color; 797 float distance; 798 float decay; 799 }; 800 uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; 801 void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) { 802 vec3 lVector = pointLight.position - geometryPosition; 803 light.direction = normalize( lVector ); 804 float lightDistance = length( lVector ); 805 light.color = pointLight.color; 806 light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); 807 light.visible = ( light.color != vec3( 0.0 ) ); 808 } 809#endif
810#if NUM_SPOT_LIGHTS > 0 811 struct SpotLight { 812 vec3 position; 813 vec3 direction; 814 vec3 color; 815 float distance; 816 float decay; 817 float coneCos; 818 float penumbraCos; 819 }; 820 uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; 821 void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) { 822 vec3 lVector = spotLight.position - geometryPosition; 823 light.direction = normalize( lVector ); 824 float angleCos = dot( light.direction, spotLight.direction ); 825 float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); 826 if ( spotAttenuation > 0.0 ) { 827 float lightDistance = length( lVector ); 828 light.color = spotLight.color * spotAttenuation; 829 light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); 830 light.visible = ( light.color != vec3( 0.0 ) ); 831 } else { 832 light.color = vec3( 0.0 ); 833 light.visible = false; 834 } 835 } 836#endif 837#if NUM_RECT_AREA_LIGHTS > 0 838 struct RectAreaLight { 839 vec3 color; 840 vec3 position; 841 vec3 halfWidth; 842 vec3 halfHeight; 843 }; 844 uniform sampler2D ltc_1; uniform sampler2D ltc_2; 845 uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; 846#endif 847#if NUM_HEMI_LIGHTS > 0 848 struct HemisphereLight { 849 vec3 direction; 850 vec3 skyColor; 851 vec3 groundColor; 852 }; 853 uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; 854 vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { 855 float dotNL = dot( normal, hemiLight.direction ); 856 float hemiDiffuseWeight = 0.5 * dotNL + 0.5; 857 vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); 858 return irradiance; 859 } 860#endif`,FG=`#ifdef USE_ENVMAP 861 vec3 getIBLIrradiance( const in vec3 normal ) { 862 #ifdef ENVMAP_TYPE_CUBE_UV 863 vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); 864 vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 ); 865 return PI * envMapColor.rgb * envMapIntensity; 866 #else 867 return vec3( 0.0 ); 868 #endif 869 } 870 vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { 871 #ifdef ENVMAP_TYPE_CUBE_UV 872 vec3 reflectVec = reflect( - viewDir, normal ); 873 reflectVec = normalize( mix( reflectVec, normal, pow4( roughness ) ) ); 874 reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); 875 vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness ); 876 return envMapColor.rgb * envMapIntensity; 877 #else 878 return vec3( 0.0 ); 879 #endif 880 } 881 #ifdef USE_ANISOTROPY 882 vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) { 883 #ifdef ENVMAP_TYPE_CUBE_UV 884 vec3 bentNormal = cross( bitangent, viewDir ); 885 bentNormal = normalize( cross( bentNormal, bitangent ) ); 886 bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) ); 887 return getIBLRadiance( viewDir, bentNormal, roughness ); 888 #else 889 return vec3( 0.0 ); 890 #endif 891 } 892 #endif 893#endif`,NG=`ToonMaterial material; 894material.diffuseColor = diffuseColor.rgb;`,kG=`varying vec3 vViewPosition; 895struct ToonMaterial { 896 vec3 diffuseColor; 897}; 898void 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 ) { 899 vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color; 900 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 901} 902void 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 ) { 903 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 904} 905#define RE_Direct RE_Direct_Toon 906#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,OG=`BlinnPhongMaterial material; 907material.diffuseColor = diffuseColor.rgb; 908material.specularColor = specular; 909material.specularShininess = shininess; 910material.specularStrength = specularStrength;`,UG=`varying vec3 vViewPosition; 911struct BlinnPhongMaterial { 912 vec3 diffuseColor; 913 vec3 specularColor; 914 float specularShininess; 915 float specularStrength; 916}; 917void 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 ) {
918 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 919 vec3 irradiance = dotNL * directLight.color; 920 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 921 reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength; 922} 923void 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 ) { 924 reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); 925} 926#define RE_Direct RE_Direct_BlinnPhong 927#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,zG=`PhysicalMaterial material; 928material.diffuseColor = diffuseColor.rgb; 929material.diffuseContribution = diffuseColor.rgb * ( 1.0 - metalnessFactor ); 930material.metalness = metalnessFactor; 931vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); 932float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); 933material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; 934material.roughness = min( material.roughness, 1.0 ); 935#ifdef IOR 936 material.ior = ior; 937 #ifdef USE_SPECULAR 938 float specularIntensityFactor = specularIntensity; 939 vec3 specularColorFactor = specularColor; 940 #ifdef USE_SPECULAR_COLORMAP 941 specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb; 942 #endif 943 #ifdef USE_SPECULAR_INTENSITYMAP 944 specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a; 945 #endif 946 material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); 947 #else 948 float specularIntensityFactor = 1.0; 949 vec3 specularColorFactor = vec3( 1.0 ); 950 material.specularF90 = 1.0; 951 #endif 952 material.specularColor = min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor; 953 material.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor ); 954#else 955 material.specularColor = vec3( 0.04 ); 956 material.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor ); 957 material.specularF90 = 1.0; 958#endif 959#ifdef USE_CLEARCOAT 960 material.clearcoat = clearcoat; 961 material.clearcoatRoughness = clearcoatRoughness; 962 material.clearcoatF0 = vec3( 0.04 ); 963 material.clearcoatF90 = 1.0; 964 #ifdef USE_CLEARCOATMAP 965 material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x; 966 #endif 967 #ifdef USE_CLEARCOAT_ROUGHNESSMAP 968 material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y; 969 #endif 970 material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); 971 material.clearcoatRoughness += geometryRoughness; 972 material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); 973#endif 974#ifdef USE_DISPERSION 975 material.dispersion = dispersion; 976#endif 977#ifdef USE_IRIDESCENCE 978 material.iridescence = iridescence; 979 material.iridescenceIOR = iridescenceIOR; 980 #ifdef USE_IRIDESCENCEMAP 981 material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r; 982 #endif 983 #ifdef USE_IRIDESCENCE_THICKNESSMAP 984 material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum; 985 #else 986 material.iridescenceThickness = iridescenceThicknessMaximum; 987 #endif 988#endif 989#ifdef USE_SHEEN 990 material.sheenColor = sheenColor; 991 #ifdef USE_SHEEN_COLORMAP 992 material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb; 993 #endif 994 material.sheenRoughness = clamp( sheenRoughness, 0.0001, 1.0 ); 995 #ifdef USE_SHEEN_ROUGHNESSMAP 996 material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; 997 #endif 998#endif 999#ifdef USE_ANISOTROPY 1000 #ifdef USE_ANISOTROPYMAP 1001 mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x ); 1002 vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb; 1003 vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b; 1004 #else 1005 vec2 anisotropyV = anisotropyVector; 1006 #endif 1007 material.anisotropy = length( anisotropyV ); 1008 if( material.anisotropy == 0.0 ) { 1009 anisotropyV = vec2( 1.0, 0.0 ); 1010 } else { 1011 anisotropyV /= material.anisotropy; 1012 material.anisotropy = saturate( material.anisotropy ); 1013 } 1014 material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );
1015 material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; 1016 material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; 1017#endif`,HG
vendor: 17,312 bytes, lines 1017-1365
1017=`uniform sampler2D dfgLUT; 1018struct PhysicalMaterial { 1019 vec3 diffuseColor; 1020 vec3 diffuseContribution; 1021 vec3 specularColor; 1022 vec3 specularColorBlended; 1023 float roughness; 1024 float metalness; 1025 float specularF90; 1026 float dispersion; 1027 #ifdef USE_CLEARCOAT 1028 float clearcoat; 1029 float clearcoatRoughness; 1030 vec3 clearcoatF0; 1031 float clearcoatF90; 1032 #endif 1033 #ifdef USE_IRIDESCENCE 1034 float iridescence; 1035 float iridescenceIOR; 1036 float iridescenceThickness; 1037 vec3 iridescenceFresnel; 1038 vec3 iridescenceF0; 1039 vec3 iridescenceFresnelDielectric; 1040 vec3 iridescenceFresnelMetallic; 1041 #endif 1042 #ifdef USE_SHEEN 1043 vec3 sheenColor; 1044 float sheenRoughness; 1045 #endif 1046 #ifdef IOR 1047 float ior; 1048 #endif 1049 #ifdef USE_TRANSMISSION 1050 float transmission; 1051 float transmissionAlpha; 1052 float thickness; 1053 float attenuationDistance; 1054 vec3 attenuationColor; 1055 #endif 1056 #ifdef USE_ANISOTROPY 1057 float anisotropy; 1058 float alphaT; 1059 vec3 anisotropyT; 1060 vec3 anisotropyB; 1061 #endif 1062}; 1063vec3 clearcoatSpecularDirect = vec3( 0.0 ); 1064vec3 clearcoatSpecularIndirect = vec3( 0.0 ); 1065vec3 sheenSpecularDirect = vec3( 0.0 ); 1066vec3 sheenSpecularIndirect = vec3(0.0 ); 1067vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { 1068 float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); 1069 float x2 = x * x; 1070 float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); 1071 return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); 1072} 1073float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { 1074 float a2 = pow2( alpha ); 1075 float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); 1076 float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); 1077 return 0.5 / max( gv + gl, EPSILON ); 1078} 1079float D_GGX( const in float alpha, const in float dotNH ) { 1080 float a2 = pow2( alpha ); 1081 float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; 1082 return RECIPROCAL_PI * a2 / pow2( denom ); 1083} 1084#ifdef USE_ANISOTROPY 1085 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 ) { 1086 float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) ); 1087 float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) ); 1088 float v = 0.5 / ( gv + gl ); 1089 return v; 1090 } 1091 float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) { 1092 float a2 = alphaT * alphaB; 1093 highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH ); 1094 highp float v2 = dot( v, v ); 1095 float w2 = a2 / v2; 1096 return RECIPROCAL_PI * a2 * pow2 ( w2 ); 1097 } 1098#endif 1099#ifdef USE_CLEARCOAT 1100 vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) { 1101 vec3 f0 = material.clearcoatF0; 1102 float f90 = material.clearcoatF90; 1103 float roughness = material.clearcoatRoughness; 1104 float alpha = pow2( roughness ); 1105 vec3 halfDir = normalize( lightDir + viewDir ); 1106 float dotNL = saturate( dot( normal, lightDir ) ); 1107 float dotNV = saturate( dot( normal, viewDir ) ); 1108 float dotNH = saturate( dot( normal, halfDir ) ); 1109 float dotVH = saturate( dot( viewDir, halfDir ) ); 1110 vec3 F = F_Schlick( f0, f90, dotVH ); 1111 float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); 1112 float D = D_GGX( alpha, dotNH ); 1113 return F * ( V * D ); 1114 } 1115#endif 1116vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { 1117 vec3 f0 = material.specularColorBlended; 1118 float f90 = material.specularF90; 1119 float roughness = material.roughness; 1120 float alpha = pow2( roughness ); 1121 vec3 halfDir = normalize( lightDir + viewDir ); 1122 float dotNL = saturate( dot( normal, lightDir ) ); 1123 float dotNV = saturate( dot( normal, viewDir ) ); 1124 float dotNH = saturate( dot( normal, halfDir ) ); 1125 float dotVH = saturate( dot( viewDir, halfDir ) ); 1126 vec3 F = F_Schlick( f0, f90, dotVH ); 1127 #ifdef USE_IRIDESCENCE 1128 F = mix( F, material.iridescenceFresnel, material.iridescence ); 1129 #endif 1130 #ifdef USE_ANISOTROPY 1131 float dotTL = dot( material.anisotropyT, lightDir ); 1132 float dotTV = dot( material.anisotropyT, viewDir ); 1133 float dotTH = dot( material.anisotropyT, halfDir ); 1134 float dotBL = dot( material.anisotropyB, lightDir ); 1135 float dotBV = dot( material.anisotropyB, viewDir ); 1136 float dotBH = dot( material.anisotropyB, halfDir ); 1137 float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL ); 1138 float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH ); 1139 #else 1140 float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); 1141 float D = D_GGX( alpha, dotNH ); 1142 #endif 1143 return F * ( V * D ); 1144} 1145vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { 1146 const float LUT_SIZE = 64.0; 1147 const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; 1148 const float LUT_BIAS = 0.5 / LUT_SIZE; 1149 float dotNV = saturate( dot( N, V ) ); 1150 vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); 1151 uv = uv * LUT_SCALE + LUT_BIAS; 1152 return uv; 1153} 1154float LTC_ClippedSphereFormFactor( const in vec3 f ) { 1155 float l = length( f ); 1156 return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); 1157} 1158vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { 1159 float x = dot( v1, v2 ); 1160 float y = abs( x ); 1161 float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; 1162 float b = 3.4175940 + ( 4.1616724 + y ) * y; 1163 float v = a / b; 1164 float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; 1165 return cross( v1, v2 ) * theta_sintheta; 1166} 1167vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { 1168 vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; 1169 vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; 1170 vec3 lightNormal = cross( v1, v2 ); 1171 if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); 1172 vec3 T1, T2; 1173 T1 = normalize( V - N * dot( V, N ) ); 1174 T2 = - cross( N, T1 ); 1175 mat3 mat = mInv * transpose( mat3( T1, T2, N ) ); 1176 vec3 coords[ 4 ]; 1177 coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); 1178 coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); 1179 coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); 1180 coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); 1181 coords[ 0 ] = normalize( coords[ 0 ] ); 1182 coords[ 1 ] = normalize( coords[ 1 ] ); 1183 coords[ 2 ] = normalize( coords[ 2 ] ); 1184 coords[ 3 ] = normalize( coords[ 3 ] ); 1185 vec3 vectorFormFactor = vec3( 0.0 ); 1186 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); 1187 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); 1188 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); 1189 vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); 1190 float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); 1191 return vec3( result ); 1192} 1193#if defined( USE_SHEEN ) 1194float D_Charlie( float roughness, float dotNH ) { 1195 float alpha = pow2( roughness ); 1196 float invAlpha = 1.0 / alpha; 1197 float cos2h = dotNH * dotNH; 1198 float sin2h = max( 1.0 - cos2h, 0.0078125 ); 1199 return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); 1200} 1201float V_Neubelt( float dotNV, float dotNL ) { 1202 return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); 1203} 1204vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { 1205 vec3 halfDir = normalize( lightDir + viewDir ); 1206 float dotNL = saturate( dot( normal, lightDir ) ); 1207 float dotNV = saturate( dot( normal, viewDir ) ); 1208 float dotNH = saturate( dot( normal, halfDir ) ); 1209 float D = D_Charlie( sheenRoughness, dotNH ); 1210 float V = V_Neubelt( dotNV, dotNL ); 1211 return sheenColor * ( D * V ); 1212} 1213#endif 1214float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { 1215 float dotNV = saturate( dot( normal, viewDir ) ); 1216 float r2 = roughness * roughness; 1217 float rInv = 1.0 / ( roughness + 0.1 ); 1218 float a = -1.9362 + 1.0678 * roughness + 0.4573 * r2 - 0.8469 * rInv; 1219 float b = -0.6014 + 0.5538 * roughness - 0.4670 * r2 - 0.1255 * rInv; 1220 float DG = exp( a * dotNV + b ); 1221 return saturate( DG ); 1222} 1223vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { 1224 float dotNV = saturate( dot( normal, viewDir ) ); 1225 vec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg; 1226 return specularColor * fab.x + specularF90 * fab.y; 1227} 1228#ifdef USE_IRIDESCENCE 1229void 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 ) { 1230#else 1231void 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 ) { 1232#endif 1233 float dotNV = saturate( dot( normal, viewDir ) ); 1234 vec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg; 1235 #ifdef USE_IRIDESCENCE 1236 vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); 1237 #else 1238 vec3 Fr = specularColor; 1239 #endif 1240 vec3 FssEss = Fr * fab.x + specularF90 * fab.y; 1241 float Ess = fab.x + fab.y; 1242 float Ems = 1.0 - Ess; 1243 vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); 1244 singleScatter += FssEss; 1245 multiScatter += Fms * Ems; 1246} 1247vec3 BRDF_GGX_Multiscatter( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { 1248 vec3 singleScatter = BRDF_GGX( lightDir, viewDir, normal, material ); 1249 float dotNL = saturate( dot( normal, lightDir ) ); 1250 float dotNV = saturate( dot( normal, viewDir ) ); 1251 vec2 dfgV = texture2D( dfgLUT, vec2( material.roughness, dotNV ) ).rg; 1252 vec2 dfgL = texture2D( dfgLUT, vec2( material.roughness, dotNL ) ).rg; 1253 vec3 FssEss_V = material.specularColorBlended * dfgV.x + material.specularF90 * dfgV.y; 1254 vec3 FssEss_L = material.specularColorBlended * dfgL.x + material.specularF90 * dfgL.y; 1255 float Ess_V = dfgV.x + dfgV.y; 1256 float Ess_L = dfgL.x + dfgL.y; 1257 float Ems_V = 1.0 - Ess_V; 1258 float Ems_L = 1.0 - Ess_L; 1259 vec3 Favg = material.specularColorBlended + ( 1.0 - material.specularColorBlended ) * 0.047619; 1260 vec3 Fms = FssEss_V * FssEss_L * Favg / ( 1.0 - Ems_V * Ems_L * Favg + EPSILON ); 1261 float compensationFactor = Ems_V * Ems_L; 1262 vec3 multiScatter = Fms * compensationFactor; 1263 return singleScatter + multiScatter; 1264} 1265#if NUM_RECT_AREA_LIGHTS > 0 1266 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 ) { 1267 vec3 normal = geometryNormal; 1268 vec3 viewDir = geometryViewDir; 1269 vec3 position = geometryPosition; 1270 vec3 lightPos = rectAreaLight.position; 1271 vec3 halfWidth = rectAreaLight.halfWidth; 1272 vec3 halfHeight = rectAreaLight.halfHeight; 1273 vec3 lightColor = rectAreaLight.color; 1274 float roughness = material.roughness; 1275 vec3 rectCoords[ 4 ]; 1276 rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; 1277 rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; 1278 rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; 1279 vec2 uv = LTC_Uv( normal, viewDir, roughness ); 1280 vec4 t1 = texture2D( ltc_1, uv ); 1281 vec4 t2 = texture2D( ltc_2, uv ); 1282 mat3 mInv = mat3( 1283 vec3( t1.x, 0, t1.y ), 1284 vec3( 0, 1, 0 ), 1285 vec3( t1.z, 0, t1.w ) 1286 ); 1287 vec3 fresnel = ( material.specularColorBlended * t2.x + ( vec3( 1.0 ) - material.specularColorBlended ) * t2.y ); 1288 reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); 1289 reflectedLight.directDiffuse += lightColor * material.diffuseContribution * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); 1290 } 1291#endif 1292void 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 ) { 1293 float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); 1294 vec3 irradiance = dotNL * directLight.color; 1295 #ifdef USE_CLEARCOAT 1296 float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) ); 1297 vec3 ccIrradiance = dotNLcc * directLight.color; 1298 clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material ); 1299 #endif 1300 #ifdef USE_SHEEN 1301 1302 sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness ); 1303 1304 float sheenAlbedoV = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); 1305 float sheenAlbedoL = IBLSheenBRDF( geometryNormal, directLight.direction, material.sheenRoughness ); 1306 1307 float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * max( sheenAlbedoV, sheenAlbedoL ); 1308 1309 irradiance *= sheenEnergyComp; 1310 1311 #endif 1312 reflectedLight.directSpecular += irradiance * BRDF_GGX_Multiscatter( directLight.direction, geometryViewDir, geometryNormal, material ); 1313 reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseContribution ); 1314} 1315void 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 ) { 1316 vec3 diffuse = irradiance * BRDF_Lambert( material.diffuseContribution ); 1317 #ifdef USE_SHEEN 1318 float sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); 1319 float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo; 1320 diffuse *= sheenEnergyComp; 1321 #endif 1322 reflectedLight.indirectDiffuse += diffuse; 1323} 1324void 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) { 1325 #ifdef USE_CLEARCOAT 1326 clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); 1327 #endif 1328 #ifdef USE_SHEEN 1329 sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ) * RECIPROCAL_PI; 1330 #endif 1331 vec3 singleScatteringDielectric = vec3( 0.0 ); 1332 vec3 multiScatteringDielectric = vec3( 0.0 ); 1333 vec3 singleScatteringMetallic = vec3( 0.0 ); 1334 vec3 multiScatteringMetallic = vec3( 0.0 ); 1335 #ifdef USE_IRIDESCENCE 1336 computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnelDielectric, material.roughness, singleScatteringDielectric, multiScatteringDielectric ); 1337 computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.iridescence, material.iridescenceFresnelMetallic, material.roughness, singleScatteringMetallic, multiScatteringMetallic ); 1338 #else 1339 computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScatteringDielectric, multiScatteringDielectric ); 1340 computeMultiscattering( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.roughness, singleScatteringMetallic, multiScatteringMetallic ); 1341 #endif 1342 vec3 singleScattering = mix( singleScatteringDielectric, singleScatteringMetallic, material.metalness ); 1343 vec3 multiScattering = mix( multiScatteringDielectric, multiScatteringMetallic, material.metalness ); 1344 vec3 totalScatteringDielectric = singleScatteringDielectric + multiScatteringDielectric; 1345 vec3 diffuse = material.diffuseContribution * ( 1.0 - totalScatteringDielectric ); 1346 vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; 1347 vec3 indirectSpecular = radiance * singleScattering; 1348 indirectSpecular += multiScattering * cosineWeightedIrradiance; 1349 vec3 indirectDiffuse = diffuse * cosineWeightedIrradiance; 1350 #ifdef USE_SHEEN 1351 float sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); 1352 float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo; 1353 indirectSpecular *= sheenEnergyComp; 1354 indirectDiffuse *= sheenEnergyComp; 1355 #endif 1356 reflectedLight.indirectSpecular += indirectSpecular; 1357 reflectedLight.indirectDiffuse += indirectDiffuse; 1358} 1359#define RE_Direct RE_Direct_Physical 1360#define RE_Direct_RectArea RE_Direct_RectArea_Physical 1361#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical 1362#define RE_IndirectSpecular RE_IndirectSpecular_Physical 1363float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { 1364 return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); 1365}`,
1365GG=` 1366vec3 geometryPosition = - vViewPosition; 1367vec3 geometryNormal = normal; 1368vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); 1369vec3 geometryClearcoatNormal = vec3( 0.0 ); 1370#ifdef USE_CLEARCOAT 1371 geometryClearcoatNormal = clearcoatNormal; 1372#endif 1373#ifdef USE_IRIDESCENCE 1374 float dotNVi = saturate( dot( normal, geometryViewDir ) ); 1375 if ( material.iridescenceThickness == 0.0 ) { 1376 material.iridescence = 0.0; 1377 } else { 1378 material.iridescence = saturate( material.iridescence ); 1379 } 1380 if ( material.iridescence > 0.0 ) { 1381 material.iridescenceFresnelDielectric = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); 1382 material.iridescenceFresnelMetallic = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.diffuseColor ); 1383 material.iridescenceFresnel = mix( material.iridescenceFresnelDielectric, material.iridescenceFresnelMetallic, material.metalness ); 1384 material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); 1385 } 1386#endif 1387IncidentLight directLight; 1388#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) 1389 PointLight pointLight; 1390 #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 1391 PointLightShadow pointLightShadow; 1392 #endif 1393 #pragma unroll_loop_start 1394 for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { 1395 pointLight = pointLights[ i ]; 1396 getPointLightInfo( pointLight, geometryPosition, directLight ); 1397 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) ) 1398 pointLightShadow = pointLightShadows[ i ]; 1399 directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; 1400 #endif 1401 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1402 } 1403 #pragma unroll_loop_end 1404#endif 1405#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) 1406 SpotLight spotLight; 1407 vec4 spotColor; 1408 vec3 spotLightCoord; 1409 bool inSpotLightMap; 1410 #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 1411 SpotLightShadow spotLightShadow; 1412 #endif 1413 #pragma unroll_loop_start 1414 for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { 1415 spotLight = spotLights[ i ]; 1416 getSpotLightInfo( spotLight, geometryPosition, directLight ); 1417 #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) 1418 #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX 1419 #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 1420 #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS 1421 #else 1422 #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) 1423 #endif 1424 #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) 1425 spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; 1426 inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); 1427 spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); 1428 directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; 1429 #endif 1430 #undef SPOT_LIGHT_MAP_INDEX 1431 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 1432 spotLightShadow = spotLightShadows[ i ]; 1433 directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; 1434 #endif 1435 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1436 } 1437 #pragma unroll_loop_end 1438#endif 1439#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) 1440 DirectionalLight directionalLight; 1441 #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 1442 DirectionalLightShadow directionalLightShadow; 1443 #endif 1444 #pragma unroll_loop_start 1445 for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { 1446 directionalLight = directionalLights[ i ]; 1447 getDirectionalLightInfo( directionalLight, directLight ); 1448 #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) 1449 directionalLightShadow = directionalLightShadows[ i ]; 1450 directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; 1451 #endif 1452 RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1453 } 1454 #pragma unroll_loop_end 1455#endif 1456#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) 1457 RectAreaLight rectAreaLight; 1458 #pragma unroll_loop_start 1459 for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { 1460 rectAreaLight = rectAreaLights[ i ]; 1461 RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1462 } 1463 #pragma unroll_loop_end 1464#endif 1465#if defined( RE_IndirectDiffuse ) 1466 vec3 iblIrradiance = vec3( 0.0 ); 1467 vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); 1468 #if defined( USE_LIGHT_PROBES ) 1469 irradiance += getLightProbeIrradiance( lightProbe, geometryNormal ); 1470 #endif 1471 #if ( NUM_HEMI_LIGHTS > 0 ) 1472 #pragma unroll_loop_start 1473 for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { 1474 irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal ); 1475 } 1476 #pragma unroll_loop_end 1477 #endif 1478#endif 1479#if defined( RE_IndirectSpecular ) 1480 vec3 radiance = vec3( 0.0 ); 1481 vec3 clearcoatRadiance = vec3( 0.0 ); 1482#endif`,jG=`#if defined( RE_IndirectDiffuse ) 1483 #ifdef USE_LIGHTMAP 1484 vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); 1485 vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; 1486 irradiance += lightMapIrradiance; 1487 #endif 1488 #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) 1489 iblIrradiance += getIBLIrradiance( geometryNormal ); 1490 #endif 1491#endif 1492#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) 1493 #ifdef USE_ANISOTROPY 1494 radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy ); 1495 #else 1496 radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness ); 1497 #endif 1498 #ifdef USE_CLEARCOAT 1499 clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); 1500 #endif 1501#endif`,WG=`#if defined( RE_IndirectDiffuse ) 1502 RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1503#endif 1504#if defined( RE_IndirectSpecular ) 1505 RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); 1506#endif`,VG=`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER ) 1507 gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; 1508#endif`,XG=`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER ) 1509 uniform float logDepthBufFC; 1510 varying float vFragDepth; 1511 varying float vIsPerspective; 1512#endif`,YG=`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER 1513 varying float vFragDepth; 1514 varying float vIsPerspective; 1515#endif`,JG=`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER 1516 vFragDepth = 1.0 + gl_Position.w; 1517 vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); 1518#endif`,KG=`#ifdef USE_MAP 1519 vec4 sampledDiffuseColor = texture2D( map, vMapUv ); 1520 #ifdef DECODE_VIDEO_TEXTURE 1521 sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor ); 1522 #endif 1523 diffuseColor *= sampledDiffuseColor; 1524#endif`,qG=`#ifdef USE_MAP 1525 uniform sampler2D map; 1526#endif`,ZG=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) 1527 #if defined( USE_POINTS_UV ) 1528 vec2 uv = vUv; 1529 #else 1530 vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; 1531 #endif 1532#endif 1533#ifdef USE_MAP 1534 diffuseColor *= texture2D( map, uv ); 1535#endif 1536#ifdef USE_ALPHAMAP 1537 diffuseColor.a *= texture2D( alphaMap, uv ).g; 1538#endif`,QG=`#if defined( USE_POINTS_UV ) 1539 varying vec2 vUv; 1540#else 1541 #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) 1542 uniform mat3 uvTransform; 1543 #endif 1544#endif 1545#ifdef USE_MAP 1546 uniform sampler2D map; 1547#endif 1548#ifdef USE_ALPHAMAP 1549 uniform sampler2D alphaMap; 1550#endif`,$G=`float metalnessFactor = metalness; 1551#ifdef USE_METALNESSMAP 1552 vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); 1553 metalnessFactor *= texelMetalness.b; 1554#endif`,ej=`#ifdef USE_METALNESSMAP 1555 uniform sampler2D metalnessMap; 1556#endif`,tj=`#ifdef USE_INSTANCING_MORPH 1557 float morphTargetInfluences[ MORPHTARGETS_COUNT ]; 1558 float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r; 1559 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1560 morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r; 1561 } 1562#endif`,nj=`#if defined( USE_MORPHCOLORS ) 1563 vColor *= morphTargetBaseInfluence; 1564 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1565 #if defined( USE_COLOR_ALPHA ) 1566 if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; 1567 #elif defined( USE_COLOR ) 1568 if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; 1569 #endif 1570 } 1571#endif`,ij=`#ifdef USE_MORPHNORMALS 1572 objectNormal *= morphTargetBaseInfluence; 1573 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1574 if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; 1575 } 1576#endif`,rj=`#ifdef USE_MORPHTARGETS 1577 #ifndef USE_INSTANCING_MORPH 1578 uniform float morphTargetBaseInfluence; 1579 uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; 1580 #endif 1581 uniform sampler2DArray morphTargetsTexture; 1582 uniform ivec2 morphTargetsTextureSize; 1583 vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { 1584 int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; 1585 int y = texelIndex / morphTargetsTextureSize.x; 1586 int x = texelIndex - y * morphTargetsTextureSize.x; 1587 ivec3 morphUV = ivec3( x, y, morphTargetIndex ); 1588 return texelFetch( morphTargetsTexture, morphUV, 0 ); 1589 } 1590#endif`,sj=`#ifdef USE_MORPHTARGETS 1591 transformed *= morphTargetBaseInfluence; 1592 for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { 1593 if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; 1594 } 1595#endif`,oj=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; 1596#ifdef FLAT_SHADED 1597 vec3 fdx = dFdx( vViewPosition ); 1598 vec3 fdy = dFdy( vViewPosition ); 1599 vec3 normal = normalize( cross( fdx, fdy ) ); 1600#else 1601 vec3 normal = normalize( vNormal ); 1602 #ifdef DOUBLE_SIDED 1603 normal *= faceDirection; 1604 #endif 1605#endif 1606#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) 1607 #ifdef USE_TANGENT 1608 mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); 1609 #else 1610 mat3 tbn = getTangentFrame( - vViewPosition, normal, 1611 #if defined( USE_NORMALMAP ) 1612 vNormalMapUv 1613 #elif defined( USE_CLEARCOAT_NORMALMAP ) 1614 vClearcoatNormalMapUv 1615 #else 1616 vUv 1617 #endif 1618 ); 1619 #endif 1620 #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) 1621 tbn[0] *= faceDirection; 1622 tbn[1] *= faceDirection; 1623 #endif 1624#endif 1625#ifdef USE_CLEARCOAT_NORMALMAP 1626 #ifdef USE_TANGENT 1627 mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); 1628 #else 1629 mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv ); 1630 #endif 1631 #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) 1632 tbn2[0] *= faceDirection; 1633 tbn2[1] *= faceDirection; 1634 #endif 1635#endif 1636vec3 nonPerturbedNormal = normal;`,aj=`#ifdef USE_NORMALMAP_OBJECTSPACE 1637 normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; 1638 #ifdef FLIP_SIDED 1639 normal = - normal; 1640 #endif 1641 #ifdef DOUBLE_SIDED 1642 normal = normal * faceDirection; 1643 #endif 1644 normal = normalize( normalMatrix * normal ); 1645#elif defined( USE_NORMALMAP_TANGENTSPACE ) 1646 vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; 1647 mapN.xy *= normalScale; 1648 normal = normalize( tbn * mapN ); 1649#elif defined( USE_BUMPMAP )
1650 normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); 1651#endif`,lj=`#ifndef FLAT_SHADED 1652 varying vec3 vNormal; 1653 #ifdef USE_TANGENT 1654 varying vec3 vTangent; 1655 varying vec3 vBitangent; 1656 #endif 1657#endif`,cj=`#ifndef FLAT_SHADED 1658 varying vec3 vNormal; 1659 #ifdef USE_TANGENT 1660 varying vec3 vTangent; 1661 varying vec3 vBitangent; 1662 #endif 1663#endif`,uj=`#ifndef FLAT_SHADED 1664 vNormal = normalize( transformedNormal ); 1665 #ifdef USE_TANGENT 1666 vTangent = normalize( transformedTangent ); 1667 vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); 1668 #endif 1669#endif`,dj=`#ifdef USE_NORMALMAP 1670 uniform sampler2D normalMap; 1671 uniform vec2 normalScale; 1672#endif 1673#ifdef USE_NORMALMAP_OBJECTSPACE 1674 uniform mat3 normalMatrix; 1675#endif 1676#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) ) 1677 mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) { 1678 vec3 q0 = dFdx( eye_pos.xyz ); 1679 vec3 q1 = dFdy( eye_pos.xyz ); 1680 vec2 st0 = dFdx( uv.st ); 1681 vec2 st1 = dFdy( uv.st ); 1682 vec3 N = surf_norm; 1683 vec3 q1perp = cross( q1, N ); 1684 vec3 q0perp = cross( N, q0 ); 1685 vec3 T = q1perp * st0.x + q0perp * st1.x; 1686 vec3 B = q1perp * st0.y + q0perp * st1.y; 1687 float det = max( dot( T, T ), dot( B, B ) ); 1688 float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); 1689 return mat3( T * scale, B * scale, N ); 1690 } 1691#endif`,fj=`#ifdef USE_CLEARCOAT 1692 vec3 clearcoatNormal = nonPerturbedNormal; 1693#endif`,hj=`#ifdef USE_CLEARCOAT_NORMALMAP 1694 vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; 1695 clearcoatMapN.xy *= clearcoatNormalScale; 1696 clearcoatNormal = normalize( tbn2 * clearcoatMapN ); 1697#endif`,pj=`#ifdef USE_CLEARCOATMAP 1698 uniform sampler2D clearcoatMap; 1699#endif 1700#ifdef USE_CLEARCOAT_NORMALMAP 1701 uniform sampler2D clearcoatNormalMap; 1702 uniform vec2 clearcoatNormalScale; 1703#endif 1704#ifdef USE_CLEARCOAT_ROUGHNESSMAP 1705 uniform sampler2D clearcoatRoughnessMap; 1706#endif`,mj=`#ifdef USE_IRIDESCENCEMAP 1707 uniform sampler2D iridescenceMap; 1708#endif 1709#ifdef USE_IRIDESCENCE_THICKNESSMAP 1710 uniform sampler2D iridescenceThicknessMap; 1711#endif`,gj=`#ifdef OPAQUE 1712diffuseColor.a = 1.0; 1713#endif 1714#ifdef USE_TRANSMISSION 1715diffuseColor.a *= material.transmissionAlpha; 1716#endif 1717gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,xj=`vec3 packNormalToRGB( const in vec3 normal ) { 1718 return normalize( normal ) * 0.5 + 0.5; 1719} 1720vec3 unpackRGBToNormal( const in vec3 rgb ) { 1721 return 2.0 * rgb.xyz - 1.0; 1722} 1723const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.; 1724const float Inv255 = 1. / 255.; 1725const vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 ); 1726const vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g ); 1727const vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b ); 1728const vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a ); 1729vec4 packDepthToRGBA( const in float v ) { 1730 if( v <= 0.0 ) 1731 return vec4( 0., 0., 0., 0. ); 1732 if( v >= 1.0 ) 1733 return vec4( 1., 1., 1., 1. ); 1734 float vuf; 1735 float af = modf( v * PackFactors.a, vuf ); 1736 float bf = modf( vuf * ShiftRight8, vuf ); 1737 float gf = modf( vuf * ShiftRight8, vuf ); 1738 return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af ); 1739} 1740vec3 packDepthToRGB( const in float v ) { 1741 if( v <= 0.0 ) 1742 return vec3( 0., 0., 0. ); 1743 if( v >= 1.0 ) 1744 return vec3( 1., 1., 1. ); 1745 float vuf; 1746 float bf = modf( v * PackFactors.b, vuf ); 1747 float gf = modf( vuf * ShiftRight8, vuf ); 1748 return vec3( vuf * Inv255, gf * PackUpscale, bf ); 1749} 1750vec2 packDepthToRG( const in float v ) { 1751 if( v <= 0.0 ) 1752 return vec2( 0., 0. ); 1753 if( v >= 1.0 ) 1754 return vec2( 1., 1. ); 1755 float vuf; 1756 float gf = modf( v * 256., vuf ); 1757 return vec2( vuf * Inv255, gf ); 1758} 1759float unpackRGBAToDepth( const in vec4 v ) { 1760 return dot( v, UnpackFactors4 ); 1761} 1762float unpackRGBToDepth( const in vec3 v ) { 1763 return dot( v, UnpackFactors3 ); 1764} 1765float unpackRGToDepth( const in vec2 v ) { 1766 return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g; 1767} 1768vec4 pack2HalfToRGBA( const in vec2 v ) {
1769 vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); 1770 return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); 1771} 1772vec2 unpackRGBATo2Half( const in vec4 v ) { 1773 return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); 1774} 1775float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { 1776 return ( viewZ + near ) / ( near - far ); 1777} 1778float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) { 1779 return depth * ( near - far ) - near; 1780} 1781float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { 1782 return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); 1783} 1784float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { 1785 return ( near * far ) / ( ( far - near ) * depth - far ); 1786}`,vj=`#ifdef PREMULTIPLIED_ALPHA 1787 gl_FragColor.rgb *= gl_FragColor.a; 1788#endif`,yj=`vec4 mvPosition = vec4( transformed, 1.0 ); 1789#ifdef USE_BATCHING 1790 mvPosition = batchingMatrix * mvPosition; 1791#endif 1792#ifdef USE_INSTANCING 1793 mvPosition = instanceMatrix * mvPosition; 1794#endif 1795mvPosition = modelViewMatrix * mvPosition; 1796gl_Position = projectionMatrix * mvPosition;`,_j=`#ifdef DITHERING 1797 gl_FragColor.rgb = dithering( gl_FragColor.rgb ); 1798#endif`,Sj=`#ifdef DITHERING 1799 vec3 dithering( vec3 color ) { 1800 float grid_position = rand( gl_FragCoord.xy ); 1801 vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); 1802 dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); 1803 return color + dither_shift_RGB; 1804 } 1805#endif`,bj=`float roughnessFactor = roughness; 1806#ifdef USE_ROUGHNESSMAP 1807 vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); 1808 roughnessFactor *= texelRoughness.g; 1809#endif`,Mj=`#ifdef USE_ROUGHNESSMAP 1810 uniform sampler2D roughnessMap; 1811#endif`,Aj=`#if NUM_SPOT_LIGHT_COORDS > 0 1812 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; 1813#endif 1814#if NUM_SPOT_LIGHT_MAPS > 0 1815 uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; 1816#endif 1817#ifdef USE_SHADOWMAP 1818 #if NUM_DIR_LIGHT_SHADOWS > 0 1819 #if defined( SHADOWMAP_TYPE_PCF ) 1820 uniform sampler2DShadow directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; 1821 #else 1822 uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; 1823 #endif 1824 varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; 1825 struct DirectionalLightShadow { 1826 float shadowIntensity; 1827 float shadowBias; 1828 float shadowNormalBias; 1829 float shadowRadius; 1830 vec2 shadowMapSize; 1831 }; 1832 uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; 1833 #endif 1834 #if NUM_SPOT_LIGHT_SHADOWS > 0 1835 #if defined( SHADOWMAP_TYPE_PCF ) 1836 uniform sampler2DShadow spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; 1837 #else 1838 uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; 1839 #endif 1840 struct SpotLightShadow { 1841 float shadowIntensity; 1842 float shadowBias; 1843 float shadowNormalBias; 1844 float shadowRadius; 1845 vec2 shadowMapSize; 1846 }; 1847 uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; 1848 #endif 1849 #if NUM_POINT_LIGHT_SHADOWS > 0 1850 #if defined( SHADOWMAP_TYPE_PCF ) 1851 uniform samplerCubeShadow pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; 1852 #elif defined( SHADOWMAP_TYPE_BASIC ) 1853 uniform samplerCube pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; 1854 #endif 1855 varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; 1856 struct PointLightShadow { 1857 float shadowIntensity; 1858 float shadowBias; 1859 float shadowNormalBias; 1860 float shadowRadius; 1861 vec2 shadowMapSize; 1862 float shadowCameraNear; 1863 float shadowCameraFar; 1864 }; 1865 uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; 1866 #endif 1867 #if defined( SHADOWMAP_TYPE_PCF ) 1868 float interleavedGradientNoise( vec2 position ) { 1869 return fract( 52.9829189 * fract( dot( position, vec2( 0.06711056, 0.00583715 ) ) ) ); 1870 } 1871 vec2 vogelDiskSample( int sampleIndex, int samplesCount, float phi ) { 1872 const float goldenAngle = 2.399963229728653; 1873 float r = sqrt( ( float( sampleIndex ) + 0.5 ) / float( samplesCount ) ); 1874 float theta = float( sampleIndex ) * goldenAngle + phi; 1875 return vec2( cos( theta ), sin( theta ) ) * r; 1876 } 1877 #endif 1878 #if defined( SHADOWMAP_TYPE_PCF ) 1879 float getShadow( sampler2DShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { 1880 float shadow = 1.0; 1881 shadowCoord.xyz /= shadowCoord.w; 1882 shadowCoord.z += shadowBias; 1883 bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; 1884 bool frustumTest = inFrustum && shadowCoord.z <= 1.0; 1885 if ( frustumTest ) { 1886 vec2 texelSize = vec2( 1.0 ) / shadowMapSize; 1887 float radius = shadowRadius * texelSize.x; 1888 float phi = interleavedGradientNoise( gl_FragCoord.xy ) * 6.28318530718; 1889 shadow = ( 1890 texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 0, 5, phi ) * radius, shadowCoord.z ) ) + 1891 texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 1, 5, phi ) * radius, shadowCoord.z ) ) + 1892 texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 2, 5, phi ) * radius, shadowCoord.z ) ) + 1893 texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 3, 5, phi ) * radius, shadowCoord.z ) ) + 1894 texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 4, 5, phi ) * radius, shadowCoord.z ) ) 1895 ) * 0.2; 1896 } 1897 return mix( 1.0, shadow, shadowIntensity ); 1898 } 1899 #elif defined( SHADOWMAP_TYPE_VSM ) 1900 float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { 1901 float shadow = 1.0; 1902 shadowCoord.xyz /= shadowCoord.w; 1903 shadowCoord.z += shadowBias; 1904 bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; 1905 bool frustumTest = inFrustum && shadowCoord.z <= 1.0; 1906 if ( frustumTest ) { 1907 vec2 distribution = texture2D( shadowMap, shadowCoord.xy ).rg; 1908 float mean = distribution.x; 1909 float variance = distribution.y * distribution.y; 1910 #ifdef USE_REVERSED_DEPTH_BUFFER 1911 float hard_shadow = step( mean, shadowCoord.z ); 1912 #else 1913 float hard_shadow = step( shadowCoord.z, mean ); 1914 #endif 1915 if ( hard_shadow == 1.0 ) { 1916 shadow = 1.0; 1917 } else { 1918 variance = max( variance, 0.0000001 ); 1919 float d = shadowCoord.z - mean; 1920 float p_max = variance / ( variance + d * d ); 1921 p_max = clamp( ( p_max - 0.3 ) / 0.65, 0.0, 1.0 ); 1922 shadow = max( hard_shadow, p_max ); 1923 } 1924 } 1925 return mix( 1.0, shadow, shadowIntensity ); 1926 } 1927 #else 1928 float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { 1929 float shadow = 1.0; 1930 shadowCoord.xyz /= shadowCoord.w; 1931 shadowCoord.z += shadowBias; 1932 bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; 1933 bool frustumTest = inFrustum && shadowCoord.z <= 1.0; 1934 if ( frustumTest ) { 1935 float depth = texture2D( shadowMap, shadowCoord.xy ).r; 1936 #ifdef USE_REVERSED_DEPTH_BUFFER 1937 shadow = step( depth, shadowCoord.z ); 1938 #else 1939 shadow = step( shadowCoord.z, depth ); 1940 #endif 1941 } 1942 return mix( 1.0, shadow, shadowIntensity ); 1943 } 1944 #endif 1945 #if NUM_POINT_LIGHT_SHADOWS > 0 1946 #if defined( SHADOWMAP_TYPE_PCF ) 1947 float getPointShadow( samplerCubeShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { 1948 float shadow = 1.0; 1949 vec3 lightToPosition = shadowCoord.xyz; 1950 vec3 bd3D = normalize( lightToPosition ); 1951 vec3 absVec = abs( lightToPosition ); 1952 float viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z ); 1953 if ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) { 1954 float dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) ); 1955 dp += shadowBias; 1956 float texelSize = shadowRadius / shadowMapSize.x; 1957 vec3 absDir = abs( bd3D ); 1958 vec3 tangent = absDir.x > absDir.z ? vec3( 0.0, 1.0, 0.0 ) : vec3( 1.0, 0.0, 0.0 ); 1959 tangent = normalize( cross( bd3D, tangent ) ); 1960 vec3 bitangent = cross( bd3D, tangent ); 1961 float phi = interleavedGradientNoise( gl_FragCoord.xy ) * 6.28318530718; 1962 shadow = ( 1963 texture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 0, 5, phi ).x + bitangent * vogelDiskSample( 0, 5, phi ).y ) * texelSize, dp ) ) + 1964 texture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 1, 5, phi ).x + bitangent * vogelDiskSample( 1, 5, phi ).y ) * texelSize, dp ) ) + 1965 texture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 2, 5, phi ).x + bitangent * vogelDiskSample( 2, 5, phi ).y ) * texelSize, dp ) ) + 1966 texture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 3, 5, phi ).x + bitangent * vogelDiskSample( 3, 5, phi ).y ) * texelSize, dp ) ) + 1967 texture( shadowMap, vec4( bd3D + ( tangent * vogelDiskSample( 4, 5, phi ).x + bitangent * vogelDiskSample( 4, 5, phi ).y ) * texelSize, dp ) ) 1968 ) * 0.2; 1969 } 1970 return mix( 1.0, shadow, shadowIntensity ); 1971 } 1972 #elif defined( SHADOWMAP_TYPE_BASIC ) 1973 float getPointShadow( samplerCube shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { 1974 float shadow = 1.0; 1975 vec3 lightToPosition = shadowCoord.xyz; 1976 vec3 bd3D = normalize( lightToPosition ); 1977 vec3 absVec = abs( lightToPosition ); 1978 float viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z ); 1979 if ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) { 1980 float dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) ); 1981 dp += shadowBias; 1982 float depth = textureCube( shadowMap, bd3D ).r; 1983 #ifdef USE_REVERSED_DEPTH_BUFFER 1984 shadow = step( depth, dp ); 1985 #else 1986 shadow = step( dp, depth ); 1987 #endif 1988 } 1989 return mix( 1.0, shadow, shadowIntensity ); 1990 } 1991 #endif 1992 #endif
1993#endif`,wj=`#if NUM_SPOT_LIGHT_COORDS > 0 1994 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; 1995 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; 1996#endif 1997#ifdef USE_SHADOWMAP 1998 #if NUM_DIR_LIGHT_SHADOWS > 0 1999 uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; 2000 varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; 2001 struct DirectionalLightShadow { 2002 float shadowIntensity; 2003 float shadowBias; 2004 float shadowNormalBias; 2005 float shadowRadius; 2006 vec2 shadowMapSize; 2007 }; 2008 uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; 2009 #endif 2010 #if NUM_SPOT_LIGHT_SHADOWS > 0 2011 struct SpotLightShadow { 2012 float shadowIntensity; 2013 float shadowBias; 2014 float shadowNormalBias; 2015 float shadowRadius; 2016 vec2 shadowMapSize; 2017 }; 2018 uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; 2019 #endif 2020 #if NUM_POINT_LIGHT_SHADOWS > 0 2021 uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; 2022 varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; 2023 struct PointLightShadow { 2024 float shadowIntensity; 2025 float shadowBias; 2026 float shadowNormalBias; 2027 float shadowRadius; 2028 vec2 shadowMapSize; 2029 float shadowCameraNear; 2030 float shadowCameraFar; 2031 }; 2032 uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; 2033 #endif 2034#endif`,Tj=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) 2035 vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); 2036 vec4 shadowWorldPosition; 2037#endif 2038#if defined( USE_SHADOWMAP ) 2039 #if NUM_DIR_LIGHT_SHADOWS > 0 2040 #pragma unroll_loop_start 2041 for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { 2042 shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); 2043 vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; 2044 } 2045 #pragma unroll_loop_end 2046 #endif 2047 #if NUM_POINT_LIGHT_SHADOWS > 0 2048 #pragma unroll_loop_start 2049 for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { 2050 shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); 2051 vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; 2052 } 2053 #pragma unroll_loop_end 2054 #endif 2055#endif 2056#if NUM_SPOT_LIGHT_COORDS > 0 2057 #pragma unroll_loop_start 2058 for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { 2059 shadowWorldPosition = worldPosition; 2060 #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) 2061 shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; 2062 #endif 2063 vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; 2064 } 2065 #pragma unroll_loop_end 2066#endif`,Ej=`float getShadowMask() { 2067 float shadow = 1.0; 2068 #ifdef USE_SHADOWMAP 2069 #if NUM_DIR_LIGHT_SHADOWS > 0 2070 DirectionalLightShadow directionalLight; 2071 #pragma unroll_loop_start 2072 for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { 2073 directionalLight = directionalLightShadows[ i ]; 2074 shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; 2075 } 2076 #pragma unroll_loop_end 2077 #endif 2078 #if NUM_SPOT_LIGHT_SHADOWS > 0 2079 SpotLightShadow spotLight; 2080 #pragma unroll_loop_start 2081 for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { 2082 spotLight = spotLightShadows[ i ]; 2083 shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; 2084 } 2085 #pragma unroll_loop_end 2086 #endif 2087 #if NUM_POINT_LIGHT_SHADOWS > 0 && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) ) 2088 PointLightShadow pointLight; 2089 #pragma unroll_loop_start 2090 for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { 2091 pointLight = pointLightShadows[ i ]; 2092 shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; 2093 } 2094 #pragma unroll_loop_end 2095 #endif 2096 #endif 2097 return shadow; 2098}`,Cj=`#ifdef USE_SKINNING 2099 mat4 boneMatX = getBoneMatrix( skinIndex.x ); 2100 mat4 boneMatY = getBoneMatrix( skinIndex.y ); 2101 mat4 boneMatZ = getBoneMatrix( skinIndex.z ); 2102 mat4 boneMatW = getBoneMatrix( skinIndex.w ); 2103#endif`,Rj=`#ifdef USE_SKINNING 2104 uniform mat4 bindMatrix; 2105 uniform mat4 bindMatrixInverse; 2106 uniform highp sampler2D boneTexture; 2107 mat4 getBoneMatrix( const in float i ) { 2108 int size = textureSize( boneTexture, 0 ).x; 2109 int j = int( i ) * 4; 2110 int x = j % size; 2111 int y = j / size; 2112 vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 ); 2113 vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 ); 2114 vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 ); 2115 vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); 2116 return mat4( v1, v2, v3, v4 ); 2117 } 2118#endif`,Pj=`#ifdef USE_SKINNING 2119 vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); 2120 vec4 skinned = vec4( 0.0 ); 2121 skinned += boneMatX * skinVertex * skinWeight.x; 2122 skinned += boneMatY * skinVertex * skinWeight.y; 2123 skinned += boneMatZ * skinVertex * skinWeight.z; 2124 skinned += boneMatW * skinVertex * skinWeight.w; 2125 transformed = ( bindMatrixInverse * skinned ).xyz; 2126#endif`,Ij=`#ifdef USE_SKINNING 2127 mat4 skinMatrix = mat4( 0.0 ); 2128 skinMatrix += skinWeight.x * boneMatX; 2129 skinMatrix += skinWeight.y * boneMatY; 2130 skinMatrix += skinWeight.z * boneMatZ; 2131 skinMatrix += skinWeight.w * boneMatW; 2132 skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; 2133 objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; 2134 #ifdef USE_TANGENT 2135 objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; 2136 #endif 2137#endif`,Lj=`float specularStrength; 2138#ifdef USE_SPECULARMAP 2139 vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); 2140 specularStrength = texelSpecular.r; 2141#else 2142 specularStrength = 1.0; 2143#endif`,Bj=`#ifdef USE_SPECULARMAP 2144 uniform sampler2D specularMap; 2145#endif`,Dj=`#if defined( TONE_MAPPING ) 2146 gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); 2147#endif`,Fj=`#ifndef saturate 2148#define saturate( a ) clamp( a, 0.0, 1.0 ) 2149#endif 2150uniform float toneMappingExposure; 2151vec3 LinearToneMapping( vec3 color ) { 2152 return saturate( toneMappingExposure * color ); 2153} 2154vec3 ReinhardToneMapping( vec3 color ) { 2155 color *= toneMappingExposure; 2156 return saturate( color / ( vec3( 1.0 ) + color ) ); 2157} 2158vec3 CineonToneMapping( vec3 color ) { 2159 color *= toneMappingExposure; 2160 color = max( vec3( 0.0 ), color - 0.004 ); 2161 return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); 2162} 2163vec3 RRTAndODTFit( vec3 v ) { 2164 vec3 a = v * ( v + 0.0245786 ) - 0.000090537; 2165 vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; 2166 return a / b; 2167} 2168vec3 ACESFilmicToneMapping( vec3 color ) { 2169 const mat3 ACESInputMat = mat3( 2170 vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), 2171 vec3( 0.04823, 0.01566, 0.83777 ) 2172 ); 2173 const mat3 ACESOutputMat = mat3( 2174 vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), 2175 vec3( -0.07367, -0.00605, 1.07602 ) 2176 ); 2177 color *= toneMappingExposure / 0.6; 2178 color = ACESInputMat * color; 2179 color = RRTAndODTFit( color ); 2180 color = ACESOutputMat * color; 2181 return saturate( color ); 2182} 2183const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3( 2184 vec3( 1.6605, - 0.1246, - 0.0182 ), 2185 vec3( - 0.5876, 1.1329, - 0.1006 ), 2186 vec3( - 0.0728, - 0.0083, 1.1187 ) 2187); 2188const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3( 2189 vec3( 0.6274, 0.0691, 0.0164 ), 2190 vec3( 0.3293, 0.9195, 0.0880 ), 2191 vec3( 0.0433, 0.0113, 0.8956 ) 2192); 2193vec3 agxDefaultContrastApprox( vec3 x ) { 2194 vec3 x2 = x * x; 2195 vec3 x4 = x2 * x2; 2196 return + 15.5 * x4 * x2 2197 - 40.14 * x4 * x 2198 + 31.96 * x4 2199 - 6.868 * x2 * x 2200 + 0.4298 * x2 2201 + 0.1191 * x 2202 - 0.00232; 2203} 2204vec3 AgXToneMapping( vec3 color ) { 2205 const mat3 AgXInsetMatrix = mat3( 2206 vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ), 2207 vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ), 2208 vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 ) 2209 );
2210 const mat3 AgXOutsetMatrix = mat3( 2211 vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ), 2212 vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ), 2213 vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 ) 2214 ); 2215 const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069; 2216 color *= toneMappingExposure; 2217 color = LINEAR_SRGB_TO_LINEAR_REC2020 * color; 2218 color = AgXInsetMatrix * color; 2219 color = max( color, 1e-10 ); color = log2( color ); 2220 color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv ); 2221 color = clamp( color, 0.0, 1.0 ); 2222 color = agxDefaultContrastApprox( color ); 2223 color = AgXOutsetMatrix * color; 2224 color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) ); 2225 color = LINEAR_REC2020_TO_LINEAR_SRGB * color; 2226 color = clamp( color, 0.0, 1.0 ); 2227 return color; 2228} 2229vec3 NeutralToneMapping( vec3 color ) { 2230 const float StartCompression = 0.8 - 0.04; 2231 const float Desaturation = 0.15; 2232 color *= toneMappingExposure; 2233 float x = min( color.r, min( color.g, color.b ) ); 2234 float offset = x < 0.08 ? x - 6.25 * x * x : 0.04; 2235 color -= offset; 2236 float peak = max( color.r, max( color.g, color.b ) ); 2237 if ( peak < StartCompression ) return color; 2238 float d = 1. - StartCompression; 2239 float newPeak = 1. - d * d / ( peak + d - StartCompression ); 2240 color *= newPeak / peak; 2241 float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. ); 2242 return mix( color, vec3( newPeak ), g ); 2243} 2244vec3 CustomToneMapping( vec3 color ) { return color; }`,Nj=`#ifdef USE_TRANSMISSION 2245 material.transmission = transmission; 2246 material.transmissionAlpha = 1.0; 2247 material.thickness = thickness; 2248 material.attenuationDistance = attenuationDistance; 2249 material.attenuationColor = attenuationColor; 2250 #ifdef USE_TRANSMISSIONMAP 2251 material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r; 2252 #endif 2253 #ifdef USE_THICKNESSMAP 2254 material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g; 2255 #endif 2256 vec3 pos = vWorldPosition; 2257 vec3 v = normalize( cameraPosition - pos ); 2258 vec3 n = inverseTransformDirection( normal, viewMatrix ); 2259 vec4 transmitted = getIBLVolumeRefraction( 2260 n, v, material.roughness, material.diffuseContribution, material.specularColorBlended, material.specularF90, 2261 pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness, 2262 material.attenuationColor, material.attenuationDistance ); 2263 material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); 2264 totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); 2265#endif`,kj=`#ifdef USE_TRANSMISSION 2266 uniform float transmission; 2267 uniform float thickness; 2268 uniform float attenuationDistance; 2269 uniform vec3 attenuationColor; 2270 #ifdef USE_TRANSMISSIONMAP 2271 uniform sampler2D transmissionMap; 2272 #endif 2273 #ifdef USE_THICKNESSMAP 2274 uniform sampler2D thicknessMap; 2275 #endif 2276 uniform vec2 transmissionSamplerSize; 2277 uniform sampler2D transmissionSamplerMap; 2278 uniform mat4 modelMatrix; 2279 uniform mat4 projectionMatrix; 2280 varying vec3 vWorldPosition; 2281 float w0( float a ) { 2282 return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 ); 2283 } 2284 float w1( float a ) { 2285 return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 ); 2286 } 2287 float w2( float a ){ 2288 return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 ); 2289 } 2290 float w3( float a ) { 2291 return ( 1.0 / 6.0 ) * ( a * a * a ); 2292 } 2293 float g0( float a ) { 2294 return w0( a ) + w1( a ); 2295 } 2296 float g1( float a ) { 2297 return w2( a ) + w3( a ); 2298 } 2299 float h0( float a ) { 2300 return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) ); 2301 } 2302 float h1( float a ) { 2303 return 1.0 + w3( a ) / ( w2( a ) + w3( a ) ); 2304 } 2305 vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) { 2306 uv = uv * texelSize.zw + 0.5; 2307 vec2 iuv = floor( uv ); 2308 vec2 fuv = fract( uv ); 2309 float g0x = g0( fuv.x ); 2310 float g1x = g1( fuv.x ); 2311 float h0x = h0( fuv.x ); 2312 float h1x = h1( fuv.x ); 2313 float h0y = h0( fuv.y ); 2314 float h1y = h1( fuv.y ); 2315 vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; 2316 vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; 2317 vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; 2318 vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; 2319 return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + 2320 g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); 2321 } 2322 vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) { 2323 vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) ); 2324 vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) ); 2325 vec2 fLodSizeInv = 1.0 / fLodSize; 2326 vec2 cLodSizeInv = 1.0 / cLodSize; 2327 vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) ); 2328 vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) ); 2329 return mix( fSample, cSample, fract( lod ) ); 2330 } 2331 vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { 2332 vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); 2333 vec3 modelScale; 2334 modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); 2335 modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); 2336 modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); 2337 return normalize( refractionVector ) * thickness * modelScale; 2338 } 2339 float applyIorToRoughness( const in float roughness, const in float ior ) { 2340 return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); 2341 } 2342 vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { 2343 float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); 2344 return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod ); 2345 } 2346 vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { 2347 if ( isinf( attenuationDistance ) ) { 2348 return vec3( 1.0 ); 2349 } else { 2350 vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; 2351 vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance; 2352 } 2353 } 2354 vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, 2355 const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, 2356 const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness, 2357 const in vec3 attenuationColor, const in float attenuationDistance ) { 2358 vec4 transmittedLight; 2359 vec3 transmittance; 2360 #ifdef USE_DISPERSION 2361 float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion; 2362 vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread ); 2363 for ( int i = 0; i < 3; i ++ ) { 2364 vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix ); 2365 vec3 refractedRayExit = position + transmissionRay; 2366 vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); 2367 vec2 refractionCoords = ndcPos.xy / ndcPos.w; 2368 refractionCoords += 1.0; 2369 refractionCoords /= 2.0; 2370 vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] ); 2371 transmittedLight[ i ] = transmissionSample[ i ]; 2372 transmittedLight.a += transmissionSample.a; 2373 transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ]; 2374 } 2375 transmittedLight.a /= 3.0; 2376 #else 2377 vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); 2378 vec3 refractedRayExit = position + transmissionRay; 2379 vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); 2380 vec2 refractionCoords = ndcPos.xy / ndcPos.w; 2381 refractionCoords += 1.0; 2382 refractionCoords /= 2.0; 2383 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); 2384 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance ); 2385 #endif 2386 vec3 attenuatedColor = transmittance * transmittedLight.rgb; 2387 vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); 2388 float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; 2389 return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); 2390 } 2391#endif`,Oj=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2392 varying vec2 vUv; 2393#endif 2394#ifdef USE_MAP 2395 varying vec2 vMapUv; 2396#endif 2397#ifdef USE_ALPHAMAP
2398 varying vec2 vAlphaMapUv; 2399#endif 2400#ifdef USE_LIGHTMAP 2401 varying vec2 vLightMapUv; 2402#endif 2403#ifdef USE_AOMAP 2404 varying vec2 vAoMapUv; 2405#endif 2406#ifdef USE_BUMPMAP 2407 varying vec2 vBumpMapUv; 2408#endif 2409#ifdef USE_NORMALMAP 2410 varying vec2 vNormalMapUv; 2411#endif 2412#ifdef USE_EMISSIVEMAP 2413 varying vec2 vEmissiveMapUv; 2414#endif 2415#ifdef USE_METALNESSMAP 2416 varying vec2 vMetalnessMapUv; 2417#endif 2418#ifdef USE_ROUGHNESSMAP 2419 varying vec2 vRoughnessMapUv; 2420#endif 2421#ifdef USE_ANISOTROPYMAP 2422 varying vec2 vAnisotropyMapUv; 2423#endif 2424#ifdef USE_CLEARCOATMAP 2425 varying vec2 vClearcoatMapUv; 2426#endif 2427#ifdef USE_CLEARCOAT_NORMALMAP 2428 varying vec2 vClearcoatNormalMapUv; 2429#endif 2430#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2431 varying vec2 vClearcoatRoughnessMapUv; 2432#endif 2433#ifdef USE_IRIDESCENCEMAP 2434 varying vec2 vIridescenceMapUv; 2435#endif 2436#ifdef USE_IRIDESCENCE_THICKNESSMAP 2437 varying vec2 vIridescenceThicknessMapUv; 2438#endif 2439#ifdef USE_SHEEN_COLORMAP 2440 varying vec2 vSheenColorMapUv; 2441#endif 2442#ifdef USE_SHEEN_ROUGHNESSMAP 2443 varying vec2 vSheenRoughnessMapUv; 2444#endif 2445#ifdef USE_SPECULARMAP 2446 varying vec2 vSpecularMapUv; 2447#endif 2448#ifdef USE_SPECULAR_COLORMAP 2449 varying vec2 vSpecularColorMapUv; 2450#endif 2451#ifdef USE_SPECULAR_INTENSITYMAP 2452 varying vec2 vSpecularIntensityMapUv; 2453#endif 2454#ifdef USE_TRANSMISSIONMAP 2455 uniform mat3 transmissionMapTransform; 2456 varying vec2 vTransmissionMapUv; 2457#endif 2458#ifdef USE_THICKNESSMAP 2459 uniform mat3 thicknessMapTransform; 2460 varying vec2 vThicknessMapUv; 2461#endif`,Uj=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2462 varying vec2 vUv; 2463#endif 2464#ifdef USE_MAP 2465 uniform mat3 mapTransform; 2466 varying vec2 vMapUv; 2467#endif 2468#ifdef USE_ALPHAMAP 2469 uniform mat3 alphaMapTransform; 2470 varying vec2 vAlphaMapUv; 2471#endif 2472#ifdef USE_LIGHTMAP 2473 uniform mat3 lightMapTransform; 2474 varying vec2 vLightMapUv; 2475#endif 2476#ifdef USE_AOMAP 2477 uniform mat3 aoMapTransform; 2478 varying vec2 vAoMapUv; 2479#endif 2480#ifdef USE_BUMPMAP 2481 uniform mat3 bumpMapTransform; 2482 varying vec2 vBumpMapUv; 2483#endif 2484#ifdef USE_NORMALMAP 2485 uniform mat3 normalMapTransform; 2486 varying vec2 vNormalMapUv; 2487#endif 2488#ifdef USE_DISPLACEMENTMAP 2489 uniform mat3 displacementMapTransform; 2490 varying vec2 vDisplacementMapUv; 2491#endif 2492#ifdef USE_EMISSIVEMAP 2493 uniform mat3 emissiveMapTransform; 2494 varying vec2 vEmissiveMapUv; 2495#endif 2496#ifdef USE_METALNESSMAP 2497 uniform mat3 metalnessMapTransform; 2498 varying vec2 vMetalnessMapUv; 2499#endif 2500#ifdef USE_ROUGHNESSMAP 2501 uniform mat3 roughnessMapTransform; 2502 varying vec2 vRoughnessMapUv; 2503#endif 2504#ifdef USE_ANISOTROPYMAP 2505 uniform mat3 anisotropyMapTransform; 2506 varying vec2 vAnisotropyMapUv; 2507#endif 2508#ifdef USE_CLEARCOATMAP 2509 uniform mat3 clearcoatMapTransform; 2510 varying vec2 vClearcoatMapUv; 2511#endif 2512#ifdef USE_CLEARCOAT_NORMALMAP 2513 uniform mat3 clearcoatNormalMapTransform; 2514 varying vec2 vClearcoatNormalMapUv; 2515#endif 2516#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2517 uniform mat3 clearcoatRoughnessMapTransform; 2518 varying vec2 vClearcoatRoughnessMapUv; 2519#endif 2520#ifdef USE_SHEEN_COLORMAP 2521 uniform mat3 sheenColorMapTransform; 2522 varying vec2 vSheenColorMapUv; 2523#endif 2524#ifdef USE_SHEEN_ROUGHNESSMAP 2525 uniform mat3 sheenRoughnessMapTransform; 2526 varying vec2 vSheenRoughnessMapUv; 2527#endif 2528#ifdef USE_IRIDESCENCEMAP 2529 uniform mat3 iridescenceMapTransform; 2530 varying vec2 vIridescenceMapUv; 2531#endif 2532#ifdef USE_IRIDESCENCE_THICKNESSMAP 2533 uniform mat3 iridescenceThicknessMapTransform; 2534 varying vec2 vIridescenceThicknessMapUv; 2535#endif 2536#ifdef USE_SPECULARMAP 2537 uniform mat3 specularMapTransform; 2538 varying vec2 vSpecularMapUv; 2539#endif 2540#ifdef USE_SPECULAR_COLORMAP 2541 uniform mat3 specularColorMapTransform; 2542 varying vec2 vSpecularColorMapUv; 2543#endif 2544#ifdef USE_SPECULAR_INTENSITYMAP 2545 uniform mat3 specularIntensityMapTransform; 2546 varying vec2 vSpecularIntensityMapUv; 2547#endif 2548#ifdef USE_TRANSMISSIONMAP 2549 uniform mat3 transmissionMapTransform; 2550 varying vec2 vTransmissionMapUv; 2551#endif 2552#ifdef USE_THICKNESSMAP 2553 uniform mat3 thicknessMapTransform; 2554 varying vec2 vThicknessMapUv; 2555#endif`,zj=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) 2556 vUv = vec3( uv, 1 ).xy; 2557#endif 2558#ifdef USE_MAP 2559 vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy; 2560#endif 2561#ifdef USE_ALPHAMAP 2562 vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy; 2563#endif 2564#ifdef USE_LIGHTMAP 2565 vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy; 2566#endif 2567#ifdef USE_AOMAP 2568 vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy; 2569#endif 2570#ifdef USE_BUMPMAP 2571 vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy; 2572#endif 2573#ifdef USE_NORMALMAP 2574 vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy; 2575#endif 2576#ifdef USE_DISPLACEMENTMAP 2577 vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy; 2578#endif 2579#ifdef USE_EMISSIVEMAP 2580 vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy; 2581#endif 2582#ifdef USE_METALNESSMAP 2583 vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy; 2584#endif 2585#ifdef USE_ROUGHNESSMAP 2586 vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy; 2587#endif 2588#ifdef USE_ANISOTROPYMAP 2589 vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy; 2590#endif 2591#ifdef USE_CLEARCOATMAP 2592 vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy; 2593#endif 2594#ifdef USE_CLEARCOAT_NORMALMAP 2595 vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy; 2596#endif 2597#ifdef USE_CLEARCOAT_ROUGHNESSMAP 2598 vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy; 2599#endif
2600#ifdef USE_IRIDESCENCEMAP 2601 vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy; 2602#endif 2603#ifdef USE_IRIDESCENCE_THICKNESSMAP 2604 vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy; 2605#endif 2606#ifdef USE_SHEEN_COLORMAP 2607 vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy; 2608#endif 2609#ifdef USE_SHEEN_ROUGHNESSMAP 2610 vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy; 2611#endif 2612#ifdef USE_SPECULARMAP 2613 vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy; 2614#endif 2615#ifdef USE_SPECULAR_COLORMAP 2616 vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy; 2617#endif 2618#ifdef USE_SPECULAR_INTENSITYMAP 2619 vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy; 2620#endif 2621#ifdef USE_TRANSMISSIONMAP 2622 vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy; 2623#endif 2624#ifdef USE_THICKNESSMAP 2625 vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; 2626#endif`,Hj=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 2627 vec4 worldPosition = vec4( transformed, 1.0 ); 2628 #ifdef USE_BATCHING 2629 worldPosition = batchingMatrix * worldPosition; 2630 #endif 2631 #ifdef USE_INSTANCING 2632 worldPosition = instanceMatrix * worldPosition; 2633 #endif 2634 worldPosition = modelMatrix * worldPosition; 2635#endif`;const Gj=`varying vec2 vUv; 2636uniform mat3 uvTransform; 2637void main() { 2638 vUv = ( uvTransform * vec3( uv, 1 ) ).xy; 2639 gl_Position = vec4( position.xy, 1.0, 1.0 ); 2640}`,jj=`uniform sampler2D t2D; 2641uniform float backgroundIntensity; 2642varying vec2 vUv; 2643void main() { 2644 vec4 texColor = texture2D( t2D, vUv ); 2645 #ifdef DECODE_VIDEO_TEXTURE 2646 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 ); 2647 #endif 2648 texColor.rgb *= backgroundIntensity; 2649 gl_FragColor = texColor; 2650 #include <tonemapping_fragment> 2651 #include <colorspace_fragment> 2652}`,Wj=`varying vec3 vWorldDirection; 2653#include <common> 2654void main() { 2655 vWorldDirection = transformDirection( position, modelMatrix ); 2656 #include <begin_vertex> 2657 #include <project_vertex> 2658 gl_Position.z = gl_Position.w; 2659}`,Vj=`#ifdef ENVMAP_TYPE_CUBE 2660 uniform samplerCube envMap; 2661#elif defined( ENVMAP_TYPE_CUBE_UV ) 2662 uniform sampler2D envMap; 2663#endif 2664uniform float flipEnvMap; 2665uniform float backgroundBlurriness; 2666uniform float backgroundIntensity; 2667uniform mat3 backgroundRotation; 2668varying vec3 vWorldDirection; 2669#include <cube_uv_reflection_fragment> 2670void main() { 2671 #ifdef ENVMAP_TYPE_CUBE 2672 vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); 2673 #elif defined( ENVMAP_TYPE_CUBE_UV ) 2674 vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness ); 2675 #else 2676 vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); 2677 #endif 2678 texColor.rgb *= backgroundIntensity; 2679 gl_FragColor = texColor; 2680 #include <tonemapping_fragment> 2681 #include <colorspace_fragment> 2682}`,Xj=`varying vec3 vWorldDirection; 2683#include <common> 2684void main() { 2685 vWorldDirection = transformDirection( position, modelMatrix ); 2686 #include <begin_vertex> 2687 #include <project_vertex> 2688 gl_Position.z = gl_Position.w; 2689}`,Yj=`uniform samplerCube tCube; 2690uniform float tFlip; 2691uniform float opacity; 2692varying vec3 vWorldDirection; 2693void main() { 2694 vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); 2695 gl_FragColor = texColor; 2696 gl_FragColor.a *= opacity; 2697 #include <tonemapping_fragment> 2698 #include <colorspace_fragment> 2699}`,Jj=`#include <common> 2700#include <batching_pars_vertex> 2701#include <uv_pars_vertex> 2702#include <displacementmap_pars_vertex> 2703#include <morphtarget_pars_vertex> 2704#include <skinning_pars_vertex> 2705#include <logdepthbuf_pars_vertex> 2706#include <clipping_planes_pars_vertex> 2707varying vec2 vHighPrecisionZW; 2708void main() { 2709 #include <uv_vertex> 2710 #include <batching_vertex> 2711 #include <skinbase_vertex> 2712 #include <morphinstance_vertex> 2713 #ifdef USE_DISPLACEMENTMAP 2714 #include <beginnormal_vertex> 2715 #include <morphnormal_vertex> 2716 #include <skinnormal_vertex> 2717 #endif 2718 #include <begin_vertex> 2719 #include <morphtarget_vertex> 2720 #include <skinning_vertex> 2721 #include <displacementmap_vertex> 2722 #include <project_vertex> 2723 #include <logdepthbuf_vertex> 2724 #include <clipping_planes_vertex> 2725 vHighPrecisionZW = gl_Position.zw; 2726}`,Kj=`#if DEPTH_PACKING == 3200 2727 uniform float opacity; 2728#endif 2729#include <common> 2730#include <packing> 2731#include <uv_pars_fragment> 2732#include <map_pars_fragment> 2733#include <alphamap_pars_fragment> 2734#include <alphatest_pars_fragment> 2735#include <alphahash_pars_fragment> 2736#include <logdepthbuf_pars_fragment> 2737#include <clipping_planes_pars_fragment> 2738varying vec2 vHighPrecisionZW; 2739void main() { 2740 vec4 diffuseColor = vec4( 1.0 ); 2741 #include <clipping_planes_fragment> 2742 #if DEPTH_PACKING == 3200 2743 diffuseColor.a = opacity; 2744 #endif 2745 #include <map_fragment> 2746 #include <alphamap_fragment> 2747 #include <alphatest_fragment> 2748 #include <alphahash_fragment> 2749 #include <logdepthbuf_fragment> 2750 #ifdef USE_REVERSED_DEPTH_BUFFER 2751 float fragCoordZ = vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ]; 2752 #else 2753 float fragCoordZ = 0.5 * vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ] + 0.5; 2754 #endif 2755 #if DEPTH_PACKING == 3200 2756 gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); 2757 #elif DEPTH_PACKING == 3201 2758 gl_FragColor = packDepthToRGBA( fragCoordZ ); 2759 #elif DEPTH_PACKING == 3202 2760 gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 ); 2761 #elif DEPTH_PACKING == 3203 2762 gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 ); 2763 #endif 2764}`,qj=`#define DISTANCE 2765varying vec3 vWorldPosition; 2766#include <common> 2767#include <batching_pars_vertex> 2768#include <uv_pars_vertex> 2769#include <displacementmap_pars_vertex> 2770#include <morphtarget_pars_vertex> 2771#include <skinning_pars_vertex> 2772#include <clipping_planes_pars_vertex> 2773void main() { 2774 #include <uv_vertex> 2775 #include <batching_vertex> 2776 #include <skinbase_vertex> 2777 #include <morphinstance_vertex> 2778 #ifdef USE_DISPLACEMENTMAP 2779 #include <beginnormal_vertex> 2780 #include <morphnormal_vertex> 2781 #include <skinnormal_vertex> 2782 #endif 2783 #include <begin_vertex> 2784 #include <morphtarget_vertex> 2785 #include <skinning_vertex> 2786 #include <displacementmap_vertex> 2787 #include <project_vertex> 2788 #include <worldpos_vertex> 2789 #include <clipping_planes_vertex> 2790 vWorldPosition = worldPosition.xyz; 2791}`,Zj=`#define DISTANCE 2792uniform vec3 referencePosition; 2793uniform float nearDistance; 2794uniform float farDistance; 2795varying vec3 vWorldPosition; 2796#include <common> 2797#include <uv_pars_fragment> 2798#include <map_pars_fragment> 2799#include <alphamap_pars_fragment> 2800#include <alphatest_pars_fragment> 2801#include <alphahash_pars_fragment> 2802#include <clipping_planes_pars_fragment> 2803void main () { 2804 vec4 diffuseColor = vec4( 1.0 ); 2805 #include <clipping_planes_fragment> 2806 #include <map_fragment> 2807 #include <alphamap_fragment> 2808 #include <alphatest_fragment> 2809 #include <alphahash_fragment> 2810 float dist = length( vWorldPosition - referencePosition ); 2811 dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); 2812 dist = saturate( dist ); 2813 gl_FragColor = vec4( dist, 0.0, 0.0, 1.0 ); 2814}`,Qj=`varying vec3 vWorldDirection; 2815#include <common> 2816void main() { 2817 vWorldDirection = transformDirection( position, modelMatrix ); 2818 #include <begin_vertex> 2819 #include <project_vertex> 2820}`,$j=`uniform sampler2D tEquirect; 2821varying vec3 vWorldDirection; 2822#include <common> 2823void main() { 2824 vec3 direction = normalize( vWorldDirection ); 2825 vec2 sampleUV = equirectUv( direction ); 2826 gl_FragColor = texture2D( tEquirect, sampleUV ); 2827 #include <tonemapping_fragment> 2828 #include <colorspace_fragment> 2829}`,e9=`uniform float scale; 2830attribute float lineDistance; 2831varying float vLineDistance; 2832#include <common> 2833#include <uv_pars_vertex> 2834#include <color_pars_vertex> 2835#include <fog_pars_vertex> 2836#include <morphtarget_pars_vertex> 2837#include <logdepthbuf_pars_vertex> 2838#include <clipping_planes_pars_vertex> 2839void main() { 2840 vLineDistance = scale * lineDistance; 2841 #include <uv_vertex> 2842 #include <color_vertex> 2843 #include <morphinstance_vertex> 2844 #include <morphcolor_vertex> 2845 #include <begin_vertex> 2846 #include <morphtarget_vertex> 2847 #include <project_vertex> 2848 #include <logdepthbuf_vertex> 2849 #include <clipping_planes_vertex> 2850 #include <fog_vertex> 2851}`,t9=`uniform vec3 diffuse; 2852uniform float opacity; 2853uniform float dashSize; 2854uniform float totalSize; 2855varying float vLineDistance; 2856#include <common> 2857#include <color_pars_fragment> 2858#include <uv_pars_fragment> 2859#include <map_pars_fragment> 2860#include <fog_pars_fragment> 2861#include <logdepthbuf_pars_fragment> 2862#include <clipping_planes_pars_fragment> 2863void main() { 2864 vec4 diffuseColor = vec4( diffuse, opacity ); 2865 #include <clipping_planes_fragment> 2866 if ( mod( vLineDistance, totalSize ) > dashSize ) { 2867 discard; 2868 } 2869 vec3 outgoingLight = vec3( 0.0 ); 2870 #include <logdepthbuf_fragment> 2871 #include <map_fragment> 2872 #include <color_fragment> 2873 outgoingLight = diffuseColor.rgb; 2874 #include <opaque_fragment> 2875 #include <tonemapping_fragment> 2876 #include <colorspace_fragment> 2877 #include <fog_fragment> 2878 #include <premultiplied_alpha_fragment> 2879}`,n9=`#include <common> 2880#include <batching_pars_vertex> 2881#include <uv_pars_vertex> 2882#include <envmap_pars_vertex> 2883#include <color_pars_vertex> 2884#include <fog_pars_vertex> 2885#include <morphtarget_pars_vertex> 2886#include <skinning_pars_vertex> 2887#include <logdepthbuf_pars_vertex> 2888#include <clipping_planes_pars_vertex> 2889void main() { 2890 #include <uv_vertex> 2891 #include <color_vertex> 2892 #include <morphinstance_vertex> 2893 #include <morphcolor_vertex> 2894 #include <batching_vertex> 2895 #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) 2896 #include <beginnormal_vertex> 2897 #include <morphnormal_vertex> 2898 #include <skinbase_vertex> 2899 #include <skinnormal_vertex> 2900 #include <defaultnormal_vertex> 2901 #endif 2902 #include <begin_vertex> 2903 #include <morphtarget_vertex> 2904 #include <skinning_vertex> 2905 #include <project_vertex> 2906 #include <logdepthbuf_vertex> 2907 #include <clipping_planes_vertex> 2908 #include <worldpos_vertex> 2909 #include <envmap_vertex> 2910 #include <fog_vertex> 2911}`,i9=`uniform vec3 diffuse; 2912uniform float opacity; 2913#ifndef FLAT_SHADED 2914 varying vec3 vNormal; 2915#endif 2916#include <common> 2917#include <dithering_pars_fragment> 2918#include <color_pars_fragment> 2919#include <uv_pars_fragment> 2920#include <map_pars_fragment> 2921#include <alphamap_pars_fragment> 2922#include <alphatest_pars_fragment> 2923#include <alphahash_pars_fragment> 2924#include <aomap_pars_fragment> 2925#include <lightmap_pars_fragment> 2926#include <envmap_common_pars_fragment> 2927#include <envmap_pars_fragment> 2928#include <fog_pars_fragment> 2929#include <specularmap_pars_fragment> 2930#include <logdepthbuf_pars_fragment> 2931#include <clipping_planes_pars_fragment> 2932void main() { 2933 vec4 diffuseColor = vec4( diffuse, opacity ); 2934 #include <clipping_planes_fragment> 2935 #include <logdepthbuf_fragment> 2936 #include <map_fragment> 2937 #include <color_fragment> 2938 #include <alphamap_fragment> 2939 #include <alphatest_fragment> 2940 #include <alphahash_fragment> 2941 #include <specularmap_fragment> 2942 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 2943 #ifdef USE_LIGHTMAP 2944 vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); 2945 reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; 2946 #else 2947 reflectedLight.indirectDiffuse += vec3( 1.0 ); 2948 #endif 2949 #include <aomap_fragment> 2950 reflectedLight.indirectDiffuse *= diffuseColor.rgb; 2951 vec3 outgoingLight = reflectedLight.indirectDiffuse; 2952 #include <envmap_fragment> 2953 #include <opaque_fragment> 2954 #include <tonemapping_fragment> 2955 #include <colorspace_fragment> 2956 #include <fog_fragment> 2957 #include <premultiplied_alpha_fragment> 2958 #include <dithering_fragment> 2959}`,r9=`#define LAMBERT 2960varying vec3 vViewPosition; 2961#include <common> 2962#include <batching_pars_vertex> 2963#include <uv_pars_vertex> 2964#include <displacementmap_pars_vertex> 2965#include <envmap_pars_vertex> 2966#include <color_pars_vertex> 2967#include <fog_pars_vertex> 2968#include <normal_pars_vertex> 2969#include <morphtarget_pars_vertex> 2970#include <skinning_pars_vertex> 2971#include <shadowmap_pars_vertex> 2972#include <logdepthbuf_pars_vertex> 2973#include <clipping_planes_pars_vertex> 2974void main() { 2975 #include <uv_vertex> 2976 #include <color_vertex> 2977 #include <morphinstance_vertex> 2978 #include <morphcolor_vertex> 2979 #include <batching_vertex> 2980 #include <beginnormal_vertex> 2981 #include <morphnormal_vertex> 2982 #include <skinbase_vertex> 2983 #include <skinnormal_vertex> 2984 #include <defaultnormal_vertex> 2985 #include <normal_vertex> 2986 #include <begin_vertex> 2987 #include <morphtarget_vertex> 2988 #include <skinning_vertex> 2989 #include <displacementmap_vertex> 2990 #include <project_vertex> 2991 #include <logdepthbuf_vertex> 2992 #include <clipping_planes_vertex> 2993 vViewPosition = - mvPosition.xyz; 2994 #include <worldpos_vertex> 2995 #include <envmap_vertex> 2996 #include <shadowmap_vertex> 2997 #include <fog_vertex> 2998}`,s9=`#define LAMBERT 2999uniform vec3 diffuse; 3000uniform vec3 emissive; 3001uniform float opacity; 3002#include <common> 3003#include <dithering_pars_fragment> 3004#include <color_pars_fragment> 3005#include <uv_pars_fragment> 3006#include <map_pars_fragment> 3007#include <alphamap_pars_fragment> 3008#include <alphatest_pars_fragment> 3009#include <alphahash_pars_fragment> 3010#include <aomap_pars_fragment> 3011#include <lightmap_pars_fragment> 3012#include <emissivemap_pars_fragment> 3013#include <envmap_common_pars_fragment> 3014#include <envmap_pars_fragment> 3015#include <fog_pars_fragment> 3016#include <bsdfs> 3017#include <lights_pars_begin> 3018#include <normal_pars_fragment> 3019#include <lights_lambert_pars_fragment> 3020#include <shadowmap_pars_fragment> 3021#include <bumpmap_pars_fragment> 3022#include <normalmap_pars_fragment> 3023#include <specularmap_pars_fragment> 3024#include <logdepthbuf_pars_fragment> 3025#include <clipping_planes_pars_fragment> 3026void main() { 3027 vec4 diffuseColor = vec4( diffuse, opacity ); 3028 #include <clipping_planes_fragment> 3029 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3030 vec3 totalEmissiveRadiance = emissive; 3031 #include <logdepthbuf_fragment> 3032 #include <map_fragment> 3033 #include <color_fragment> 3034 #include <alphamap_fragment> 3035 #include <alphatest_fragment> 3036 #include <alphahash_fragment> 3037 #include <specularmap_fragment> 3038 #include <normal_fragment_begin> 3039 #include <normal_fragment_maps> 3040 #include <emissivemap_fragment> 3041 #include <lights_lambert_fragment> 3042 #include <lights_fragment_begin> 3043 #include <lights_fragment_maps> 3044 #include <lights_fragment_end> 3045 #include <aomap_fragment> 3046 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; 3047 #include <envmap_fragment> 3048 #include <opaque_fragment> 3049 #include <tonemapping_fragment> 3050 #include <colorspace_fragment> 3051 #include <fog_fragment> 3052 #include <premultiplied_alpha_fragment> 3053 #include <dithering_fragment> 3054}`,o9=`#define MATCAP 3055varying vec3 vViewPosition; 3056#include <common> 3057#include <batching_pars_vertex> 3058#include <uv_pars_vertex> 3059#include <color_pars_vertex> 3060#include <displacementmap_pars_vertex> 3061#include <fog_pars_vertex> 3062#include <normal_pars_vertex> 3063#include <morphtarget_pars_vertex> 3064#include <skinning_pars_vertex> 3065#include <logdepthbuf_pars_vertex> 3066#include <clipping_planes_pars_vertex> 3067void main() { 3068 #include <uv_vertex> 3069 #include <color_vertex> 3070 #include <morphinstance_vertex> 3071 #include <morphcolor_vertex> 3072 #include <batching_vertex> 3073 #include <beginnormal_vertex> 3074 #include <morphnormal_vertex> 3075 #include <skinbase_vertex> 3076 #include <skinnormal_vertex> 3077 #include <defaultnormal_vertex> 3078 #include <normal_vertex> 3079 #include <begin_vertex> 3080 #include <morphtarget_vertex> 3081 #include <skinning_vertex> 3082 #include <displacementmap_vertex> 3083 #include <project_vertex> 3084 #include <logdepthbuf_vertex> 3085 #include <clipping_planes_vertex> 3086 #include <fog_vertex> 3087 vViewPosition = - mvPosition.xyz; 3088}`,a9=`#define MATCAP 3089uniform vec3 diffuse; 3090uniform float opacity; 3091uniform sampler2D matcap; 3092varying vec3 vViewPosition; 3093#include <common> 3094#include <dithering_pars_fragment> 3095#include <color_pars_fragment> 3096#include <uv_pars_fragment> 3097#include <map_pars_fragment> 3098#include <alphamap_pars_fragment> 3099#include <alphatest_pars_fragment> 3100#include <alphahash_pars_fragment> 3101#include <fog_pars_fragment> 3102#include <normal_pars_fragment> 3103#include <bumpmap_pars_fragment> 3104#include <normalmap_pars_fragment> 3105#includ
3105e <logdepthbuf_pars_fragment> 3106#include <clipping_planes_pars_fragment> 3107void main() { 3108 vec4 diffuseColor = vec4( diffuse, opacity ); 3109 #include <clipping_planes_fragment> 3110 #include <logdepthbuf_fragment> 3111 #include <map_fragment> 3112 #include <color_fragment> 3113 #include <alphamap_fragment> 3114 #include <alphatest_fragment> 3115 #include <alphahash_fragment> 3116 #include <normal_fragment_begin> 3117 #include <normal_fragment_maps> 3118 vec3 viewDir = normalize( vViewPosition ); 3119 vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); 3120 vec3 y = cross( viewDir, x ); 3121 vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; 3122 #ifdef USE_MATCAP 3123 vec4 matcapColor = texture2D( matcap, uv ); 3124 #else 3125 vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); 3126 #endif 3127 vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; 3128 #include <opaque_fragment> 3129 #include <tonemapping_fragment> 3130 #include <colorspace_fragment> 3131 #include <fog_fragment> 3132 #include <premultiplied_alpha_fragment> 3133 #include <dithering_fragment> 3134}`,l9=`#define NORMAL 3135#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3136 varying vec3 vViewPosition; 3137#endif 3138#include <common> 3139#include <batching_pars_vertex> 3140#include <uv_pars_vertex> 3141#include <displacementmap_pars_vertex> 3142#include <normal_pars_vertex> 3143#include <morphtarget_pars_vertex> 3144#include <skinning_pars_vertex> 3145#include <logdepthbuf_pars_vertex> 3146#include <clipping_planes_pars_vertex> 3147void main() { 3148 #include <uv_vertex> 3149 #include <batching_vertex> 3150 #include <beginnormal_vertex> 3151 #include <morphinstance_vertex> 3152 #include <morphnormal_vertex> 3153 #include <skinbase_vertex> 3154 #include <skinnormal_vertex> 3155 #include <defaultnormal_vertex> 3156 #include <normal_vertex> 3157 #include <begin_vertex> 3158 #include <morphtarget_vertex> 3159 #include <skinning_vertex> 3160 #include <displacementmap_vertex> 3161 #include <project_vertex> 3162 #include <logdepthbuf_vertex> 3163 #include <clipping_planes_vertex> 3164#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3165 vViewPosition = - mvPosition.xyz; 3166#endif 3167}`,c9=`#define NORMAL 3168uniform float opacity; 3169#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) 3170 varying vec3 vViewPosition; 3171#endif 3172#include <uv_pars_fragment> 3173#include <normal_pars_fragment> 3174#include <bumpmap_pars_fragment> 3175#include <normalmap_pars_fragment> 3176#include <logdepthbuf_pars_fragment> 3177#include <clipping_planes_pars_fragment> 3178void main() { 3179 vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity ); 3180 #include <clipping_planes_fragment> 3181 #include <logdepthbuf_fragment> 3182 #include <normal_fragment_begin> 3183 #include <normal_fragment_maps> 3184 gl_FragColor = vec4( normalize( normal ) * 0.5 + 0.5, diffuseColor.a ); 3185 #ifdef OPAQUE 3186 gl_FragColor.a = 1.0; 3187 #endif 3188}`,u9=`#define PHONG 3189varying vec3 vViewPosition; 3190#include <common> 3191#include <batching_pars_vertex> 3192#include <uv_pars_vertex> 3193#include <displacementmap_pars_vertex> 3194#include <envmap_pars_vertex> 3195#include <color_pars_vertex> 3196#include <fog_pars_vertex> 3197#include <normal_pars_vertex> 3198#include <morphtarget_pars_vertex> 3199#include <skinning_pars_vertex> 3200#include <shadowmap_pars_vertex> 3201#include <logdepthbuf_pars_vertex> 3202#include <clipping_planes_pars_vertex> 3203void main() { 3204 #include <uv_vertex> 3205 #include <color_vertex> 3206 #include <morphcolor_vertex> 3207 #include <batching_vertex> 3208 #include <beginnormal_vertex> 3209 #include <morphinstance_vertex> 3210 #include <morphnormal_vertex> 3211 #include <skinbase_vertex> 3212 #include <skinnormal_vertex> 3213 #include <defaultnormal_vertex> 3214 #include <normal_vertex> 3215 #include <begin_vertex> 3216 #include <morphtarget_vertex> 3217 #include <skinning_vertex> 3218 #include <displacementmap_vertex> 3219 #include <project_vertex> 3220 #include <logdepthbuf_vertex> 3221 #include <clipping_planes_vertex> 3222 vViewPosition = - mvPosition.xyz; 3223 #include <worldpos_vertex> 3224 #include <envmap_vertex> 3225 #include <shadowmap_vertex> 3226 #include <fog_vertex> 3227}`,d9=`#define PHONG 3228uniform vec3 diffuse; 3229uniform vec3 emissive; 3230uniform vec3 specular; 3231uniform float shininess; 3232uniform float opacity; 3233#include <common> 3234#include <dithering_pars_fragment> 3235#include <color_pars_fragment> 3236#include <uv_pars_fragment> 3237#include <map_pars_fragment> 3238#include <alphamap_pars_fragment> 3239#include <alphatest_pars_fragment> 3240#include <alphahash_pars_fragment> 3241#include <aomap_pars_fragment> 3242#include <lightmap_pars_fragment> 3243#include <emissivemap_pars_fragment> 3244#include <envmap_common_pars_fragment> 3245#include <envmap_pars_fragment> 3246#include <fog_pars_fragment> 3247#include <bsdfs> 3248#include <lights_pars_begin> 3249#include <normal_pars_fragment> 3250#include <lights_phong_pars_fragment> 3251#include <shadowmap_pars_fragment> 3252#include <bumpmap_pars_fragment> 3253#include <normalmap_pars_fragment> 3254#include <specularmap_pars_fragment> 3255#include <logdepthbuf_pars_fragment> 3256#include <clipping_planes_pars_fragment> 3257void main() { 3258 vec4 diffuseColor = vec4( diffuse, opacity ); 3259 #include <clipping_planes_fragment> 3260 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3261 vec3 totalEmissiveRadiance = emissive; 3262 #include <logdepthbuf_fragment> 3263 #include <map_fragment> 3264 #include <color_fragment> 3265 #include <alphamap_fragment> 3266 #include <alphatest_fragment> 3267 #include <alphahash_fragment> 3268 #include <specularmap_fragment> 3269 #include <normal_fragment_begin> 3270 #include <normal_fragment_maps> 3271 #include <emissivemap_fragment> 3272 #include <lights_phong_fragment> 3273 #include <lights_fragment_begin> 3274 #include <lights_fragment_maps> 3275 #include <lights_fragment_end> 3276 #include <aomap_fragment> 3277 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; 3278 #include <envmap_fragment> 3279 #include <opaque_fragment> 3280 #include <tonemapping_fragment> 3281 #include <colorspace_fragment> 3282 #include <fog_fragment> 3283 #include <premultiplied_alpha_fragment> 3284 #include <dithering_fragment> 3285}`,f9=`#define STANDARD 3286varying vec3 vViewPosition; 3287#ifdef USE_TRANSMISSION 3288 varying vec3 vWorldPosition; 3289#endif 3290#include <common> 3291#include <batching_pars_vertex> 3292#include <uv_pars_vertex> 3293#include <displacementmap_pars_vertex> 3294#include <color_pars_vertex> 3295#include <fog_pars_vertex> 3296#include <normal_pars_vertex> 3297#include <morphtarget_pars_vertex> 3298#include <skinning_pars_vertex> 3299#include <shadowmap_pars_vertex> 3300#include <logdepthbuf_pars_vertex> 3301#include <clipping_planes_pars_vertex> 3302void main() { 3303 #include <uv_vertex> 3304 #include <color_vertex> 3305 #include <morphinstance_vertex> 3306 #include <morphcolor_vertex> 3307 #include <batching_vertex> 3308 #include <beginnormal_vertex> 3309 #include <morphnormal_vertex> 3310 #include <skinbase_vertex> 3311 #include <skinnormal_vertex> 3312 #include <defaultnormal_vertex> 3313 #include <normal_vertex> 3314 #include <begin_vertex> 3315 #include <morphtarget_vertex> 3316 #include <skinning_vertex> 3317 #include <displacementmap_vertex> 3318 #include <project_vertex> 3319 #include <logdepthbuf_vertex> 3320 #include <clipping_planes_vertex> 3321 vViewPosition = - mvPosition.xyz; 3322 #include <worldpos_vertex> 3323 #include <shadowmap_vertex> 3324 #include <fog_vertex> 3325#ifdef USE_TRANSMISSION 3326 vWorldPosition = worldPosition.xyz; 3327#endif 3328}`,h9=`#define STANDARD 3329#ifdef PHYSICAL 3330 #define IOR 3331 #define USE_SPECULAR 3332#endif 3333uniform vec3 diffuse; 3334uniform vec3 emissive; 3335uniform float roughness; 3336uniform float metalness; 3337uniform float opacity; 3338#ifdef IOR 3339 uniform float ior; 3340#endif 3341#ifdef USE_SPECULAR 3342 uniform float specularIntensity; 3343 uniform vec3 specularColor; 3344 #ifdef USE_SPECULAR_COLORMAP 3345 uniform sampler2D specularColorMap; 3346 #endif 3347 #ifdef USE_SPECULAR_INTENSITYMAP 3348 uniform sampler2D specularIntensityMap; 3349 #endif 3350#endif 3351#ifdef USE_CLEARCOAT 3352 uniform float clearcoat; 3353 uniform float clearcoatRoughness; 3354#endif 3355#ifdef USE_DISPERSION 3356 uniform float dispersion; 3357#endif
3358#ifdef USE_IRIDESCENCE 3359 uniform float iridescence; 3360 uniform float iridescenceIOR; 3361 uniform float iridescenceThicknessMinimum; 3362 uniform float iridescenceThicknessMaximum; 3363#endif 3364#ifdef USE_SHEEN 3365 uniform vec3 sheenColor; 3366 uniform float sheenRoughness; 3367 #ifdef USE_SHEEN_COLORMAP 3368 uniform sampler2D sheenColorMap; 3369 #endif 3370 #ifdef USE_SHEEN_ROUGHNESSMAP 3371 uniform sampler2D sheenRoughnessMap; 3372 #endif 3373#endif 3374#ifdef USE_ANISOTROPY 3375 uniform vec2 anisotropyVector; 3376 #ifdef USE_ANISOTROPYMAP 3377 uniform sampler2D anisotropyMap; 3378 #endif 3379#endif 3380varying vec3 vViewPosition; 3381#include <common> 3382#include <dithering_pars_fragment> 3383#include <color_pars_fragment> 3384#include <uv_pars_fragment> 3385#include <map_pars_fragment> 3386#include <alphamap_pars_fragment> 3387#include <alphatest_pars_fragment> 3388#include <alphahash_pars_fragment> 3389#include <aomap_pars_fragment> 3390#include <lightmap_pars_fragment> 3391#include <emissivemap_pars_fragment> 3392#include <iridescence_fragment> 3393#include <cube_uv_reflection_fragment> 3394#include <envmap_common_pars_fragment> 3395#include <envmap_physical_pars_fragment> 3396#include <fog_pars_fragment> 3397#include <lights_pars_begin> 3398#include <normal_pars_fragment> 3399#include <lights_physical_pars_fragment> 3400#include <transmission_pars_fragment> 3401#include <shadowmap_pars_fragment> 3402#include <bumpmap_pars_fragment> 3403#include <normalmap_pars_fragment> 3404#include <clearcoat_pars_fragment> 3405#include <iridescence_pars_fragment> 3406#include <roughnessmap_pars_fragment> 3407#include <metalnessmap_pars_fragment> 3408#include <logdepthbuf_pars_fragment> 3409#include <clipping_planes_pars_fragment> 3410void main() { 3411 vec4 diffuseColor = vec4( diffuse, opacity ); 3412 #include <clipping_planes_fragment> 3413 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3414 vec3 totalEmissiveRadiance = emissive; 3415 #include <logdepthbuf_fragment> 3416 #include <map_fragment> 3417 #include <color_fragment> 3418 #include <alphamap_fragment> 3419 #include <alphatest_fragment> 3420 #include <alphahash_fragment> 3421 #include <roughnessmap_fragment> 3422 #include <metalnessmap_fragment> 3423 #include <normal_fragment_begin> 3424 #include <normal_fragment_maps> 3425 #include <clearcoat_normal_fragment_begin> 3426 #include <clearcoat_normal_fragment_maps> 3427 #include <emissivemap_fragment> 3428 #include <lights_physical_fragment> 3429 #include <lights_fragment_begin> 3430 #include <lights_fragment_maps> 3431 #include <lights_fragment_end> 3432 #include <aomap_fragment> 3433 vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; 3434 vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; 3435 #include <transmission_fragment> 3436 vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; 3437 #ifdef USE_SHEEN 3438 3439 outgoingLight = outgoingLight + sheenSpecularDirect + sheenSpecularIndirect; 3440 3441 #endif 3442 #ifdef USE_CLEARCOAT 3443 float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) ); 3444 vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); 3445 outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat; 3446 #endif 3447 #include <opaque_fragment> 3448 #include <tonemapping_fragment> 3449 #include <colorspace_fragment> 3450 #include <fog_fragment> 3451 #include <premultiplied_alpha_fragment> 3452 #include <dithering_fragment> 3453}`,p9=`#define TOON 3454varying vec3 vViewPosition; 3455#include <common> 3456#include <batching_pars_vertex> 3457#include <uv_pars_vertex> 3458#include <displacementmap_pars_vertex> 3459#include <color_pars_vertex> 3460#include <fog_pars_vertex> 3461#include <normal_pars_vertex> 3462#include <morphtarget_pars_vertex> 3463#include <skinning_pars_vertex> 3464#include <shadowmap_pars_vertex> 3465#include <logdepthbuf_pars_vertex> 3466#include <clipping_planes_pars_vertex> 3467void main() { 3468 #include <uv_vertex> 3469 #include <color_vertex> 3470 #include <morphinstance_vertex> 3471 #include <morphcolor_vertex> 3472 #include <batching_vertex> 3473 #include <beginnormal_vertex> 3474 #include <morphnormal_vertex> 3475 #include <skinbase_vertex> 3476 #include <skinnormal_vertex> 3477 #include <defaultnormal_vertex> 3478 #include <normal_vertex> 3479 #include <begin_vertex> 3480 #include <morphtarget_vertex> 3481 #include <skinning_vertex> 3482 #include <displacementmap_vertex> 3483 #include <project_vertex> 3484 #include <logdepthbuf_vertex> 3485 #include <clipping_planes_vertex> 3486 vViewPosition = - mvPosition.xyz; 3487 #include <worldpos_vertex> 3488 #include <shadowmap_vertex> 3489 #include <fog_vertex> 3490}`,m9=`#define TOON 3491uniform vec3 diffuse; 3492uniform vec3 emissive; 3493uniform float opacity; 3494#include <common> 3495#include <dithering_pars_fragment> 3496#include <color_pars_fragment> 3497#include <uv_pars_fragment> 3498#include <map_pars_fragment> 3499#include <alphamap_pars_fragment> 3500#include <alphatest_pars_fragment> 3501#include <alphahash_pars_fragment> 3502#include <aomap_pars_fragment> 3503#include <lightmap_pars_fragment> 3504#include <emissivemap_pars_fragment> 3505#include <gradientmap_pars_fragment> 3506#include <fog_pars_fragment> 3507#include <bsdfs> 3508#include <lights_pars_begin> 3509#include <normal_pars_fragment> 3510#include <lights_toon_pars_fragment> 3511#include <shadowmap_pars_fragment> 3512#include <bumpmap_pars_fragment> 3513#include <normalmap_pars_fragment> 3514#include <logdepthbuf_pars_fragment> 3515#include <clipping_planes_pars_fragment> 3516void main() { 3517 vec4 diffuseColor = vec4( diffuse, opacity ); 3518 #include <clipping_planes_fragment> 3519 ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); 3520 vec3 totalEmissiveRadiance = emissive; 3521 #include <logdepthbuf_fragment> 3522 #include <map_fragment> 3523 #include <color_fragment> 3524 #include <alphamap_fragment> 3525 #include <alphatest_fragment> 3526 #include <alphahash_fragment> 3527 #include <normal_fragment_begin> 3528 #include <normal_fragment_maps> 3529 #include <emissivemap_fragment> 3530 #include <lights_toon_fragment> 3531 #include <lights_fragment_begin> 3532 #include <lights_fragment_maps> 3533 #include <lights_fragment_end> 3534 #include <aomap_fragment> 3535 vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; 3536 #include <opaque_fragment> 3537 #include <tonemapping_fragment> 3538 #include <colorspace_fragment> 3539 #include <fog_fragment> 3540 #include <premultiplied_alpha_fragment> 3541 #include <dithering_fragment> 3542}`,g9=`uniform float size; 3543uniform float scale; 3544#include <common> 3545#include <color_pars_vertex> 3546#include <fog_pars_vertex> 3547#include <morphtarget_pars_vertex> 3548#include <logdepthbuf_pars_vertex> 3549#include <clipping_planes_pars_vertex> 3550#ifdef USE_POINTS_UV 3551 varying vec2 vUv; 3552 uniform mat3 uvTransform; 3553#endif 3554void main() { 3555 #ifdef USE_POINTS_UV 3556 vUv = ( uvTransform * vec3( uv, 1 ) ).xy; 3557 #endif 3558 #include <color_vertex> 3559 #include <morphinstance_vertex> 3560 #include <morphcolor_vertex> 3561 #include <begin_vertex> 3562 #include <morphtarget_vertex> 3563 #include <project_vertex> 3564 gl_PointSize = size; 3565 #ifdef USE_SIZEATTENUATION 3566 bool isPerspective = isPerspectiveMatrix( projectionMatrix ); 3567 if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); 3568 #endif 3569 #include <logdepthbuf_vertex> 3570 #include <clipping_planes_vertex> 3571 #include <worldpos_vertex> 3572 #include <fog_vertex> 3573}`,x9=`uniform vec3 diffuse; 3574uniform float opacity; 3575#include <common> 3576#include <color_pars_fragment> 3577#include <map_particle_pars_fragment> 3578#include <alphatest_pars_fragment> 3579#include <alphahash_pars_fragment> 3580#include <fog_pars_fragment> 3581#include <logdepthbuf_pars_fragment> 3582#include <clipping_planes_pars_fragment> 3583void main() { 3584 vec4 diffuseColor = vec4( diffuse, opacity ); 3585 #include <clipping_planes_fragment> 3586 vec3 outgoingLight = vec3( 0.0 ); 3587 #include <logdepthbuf_fragment> 3588 #include <map_particle_fragment> 3589 #include <color_fragment> 3590 #include <alphatest_fragment> 3591 #include <alphahash_fragment> 3592 outgoingLight = diffuseColor.rgb; 3593 #include <opaque_fragment> 3594 #include <tonemapping_fragment> 3595 #include <colorspace_fragment> 3596 #include <fog_fragment> 3597 #include <premultiplied_alpha_fragment> 3598}`,v9=`#include <common> 3599#include <batching_pars_vertex> 3600#include <fog_pars_vertex> 3601#include <morphtarget_pars_vertex> 3602#include <skinning_pars_vertex> 3603#include <logdepthbuf_pars_vertex> 3604#include <shadowmap_pars_vertex> 3605void main() { 3606 #include <batching_vertex> 3607 #include <beginnormal_vertex> 3608 #include <morphinstance_vertex> 3609 #include <morphnormal_vertex> 3610 #include <skinbase_vertex> 3611 #include <skinnormal_vertex> 3612 #include <defaultnormal_vertex> 3613 #include <begin_vertex> 3614 #include <morphtarget_vertex> 3615 #include <skinning_vertex> 3616 #include <project_vertex> 3617 #include <logdepthbuf_vertex> 3618 #include <worldpos_vertex> 3619 #include <shadowmap_vertex> 3620 #include <fog_vertex> 3621}
3621`,y9=`uniform vec3 color; 3622uniform float opacity; 3623#include <common> 3624#include <fog_pars_fragment> 3625#include <bsdfs> 3626#include <lights_pars_begin> 3627#include <logdepthbuf_pars_fragment> 3628#include <shadowmap_pars_fragment> 3629#include <shadowmask_pars_fragment> 3630void main() { 3631 #include <logdepthbuf_fragment> 3632 gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); 3633 #include <tonemapping_fragment> 3634 #include <colorspace_fragment> 3635 #include <fog_fragment> 3636}`,_9=`uniform float rotation; 3637uniform vec2 center; 3638#include <common> 3639#include <uv_pars_vertex> 3640#include <fog_pars_vertex> 3641#include <logdepthbuf_pars_vertex> 3642#include <clipping_planes_pars_vertex> 3643void main() { 3644 #include <uv_vertex> 3645 vec4 mvPosition = modelViewMatrix[ 3 ]; 3646 vec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) ); 3647 #ifndef USE_SIZEATTENUATION 3648 bool isPerspective = isPerspectiveMatrix( projectionMatrix ); 3649 if ( isPerspective ) scale *= - mvPosition.z; 3650 #endif 3651 vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; 3652 vec2 rotatedPosition; 3653 rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; 3654 rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; 3655 mvPosition.xy += rotatedPosition; 3656 gl_Position = projectionMatrix * mvPosition; 3657 #include <logdepthbuf_vertex> 3658 #include <clipping_planes_vertex> 3659 #include <fog_vertex> 3660}`,S9=`uniform vec3 diffuse; 3661uniform float opacity; 3662#include <common> 3663#include <uv_pars_fragment> 3664#include <map_pars_fragment> 3665#include <alphamap_pars_fragment> 3666#include <alphatest_pars_fragment> 3667#include <alphahash_pars_fragment> 3668#include <fog_pars_fragment> 3669#include <logdepthbuf_pars_fragment> 3670#include <clipping_planes_pars_fragment> 3671void main() { 3672 vec4 diffuseColor = vec4( diffuse, opacity ); 3673 #include <clipping_planes_fragment> 3674 vec3 outgoingLight = vec3( 0.0 ); 3675 #include <logdepthbuf_fragment> 3676 #include <map_fragment> 3677 #include <alphamap_fragment> 3678 #include <alphatest_fragment> 3679 #include <alphahash_fragment> 3680 outgoingLight = diffuseColor.rgb; 3681 #include <opaque_fragment> 3682 #include <tonemapping_fragment> 3683 #include <colorspace_fragment> 3684 #include <fog_fragment> 3685}`,Ot={alphahash_fragment:j6,alphahash_pars_fragment:W6,alphamap_fragment:V6,alphamap_pars_fragment:X6,alphatest_fragment:Y6,alphatest_pars_fragment:J6,aomap_fragment:K6,aomap_pars_fragment:q6,batching_pars_vertex:Z6,batching_vertex:Q6,begin_vertex:$6,beginnormal_vertex:eG,bsdfs:tG,iridescence_fragment:nG,bumpmap_pars_fragment:iG,clipping_planes_fragment:rG,clipping_planes_pars_fragment:sG,clipping_planes_pars_vertex:oG,clipping_planes_vertex:aG,color_fragment:lG,color_pars_fragment:cG,color_pars_vertex:uG,color_vertex:dG,common:fG,cube_uv_reflection_fragment:hG,defaultnormal_vertex:pG,displacementmap_pars_vertex:mG,displacementmap_vertex:gG,emissivemap_fragment:xG,emissivemap_pars_fragment:vG,colorspace_fragment:yG,colorspace_pars_fragment:_G,envmap_fragment:SG,envmap_common_pars_fragment:bG,envmap_pars_fragment:MG,envmap_pars_vertex:AG,envmap_physical_pars_fragment:FG,envmap_vertex:wG,fog_vertex:TG,fog_pars_vertex:EG,fog_fragment:CG,fog_pars_fragment:RG,gradientmap_pars_fragment:PG,lightmap_pars_fragment:IG,lights_lambert_fragment:LG,lights_lambert_pars_fragment:BG,lights_pars_begin:DG,lights_toon_fragment:NG,lights_toon_pars_fragment:kG,lights_phong_fragment:OG,lights_phong_pars_fragment:UG,lights_physical_fragment:zG,lights_physical_pars_fragment:HG,lights_fragment_begin:GG,lights_fragment_maps:jG,lights_fragment_end:WG,logdepthbuf_fragment:VG,logdepthbuf_pars_fragment:XG,logdepthbuf_pars_vertex:YG,logdepthbuf_vertex:JG,map_fragment:KG,map_pars_fragment:qG,map_particle_fragment:ZG,map_particle_pars_fragment:QG,metalnessmap_fragment:$G,metalnessmap_pars_fragment:ej,morphinstance_vertex:tj,morphcolor_vertex:nj,morphnormal_vertex:ij,morphtarget_pars_vertex:rj,morphtarget_vertex:sj,normal_fragment_begin:oj,normal_fragment_maps:aj,normal_pars_fragment:lj,normal_pars_vertex:cj,normal_vertex:uj,normalmap_pars_fragment:dj,clearcoat_normal_fragment_begin:fj,clearcoat_normal_fragment_maps:hj,clearcoat_pars_fragment:pj,iridescence_pars_fragment:mj,opaque_fragment:gj,packing:xj,premultiplied_alpha_fragment:vj,project_vertex:yj,dithering_fragment:_j,dithering_pars_fragment:Sj,roughnessmap_fragment:bj,roughnessmap_pars_fragment:Mj,shadowmap_pars_fragment:Aj,shadowmap_pars_vertex:wj,shadowmap_vertex:Tj,shadowmask_pars_fragment:Ej,skinbase_vertex:Cj,skinning_pars_vertex:Rj,skinning_vertex:Pj,skinnormal_vertex:Ij,specularmap_fragment:Lj,specularmap_pars_fragment:Bj,tonemapping_fragment:Dj,tonemapping_pars_fragment:Fj,transmission_fragment:Nj,transmission_pars_fragment:kj,uv_pars_fragment:Oj,uv_pars_vertex:Uj,uv_vertex:zj,worldpos_vertex:Hj,background_vert:Gj,background_frag:jj,backgroundCube_vert:Wj,backgroundCube_frag:Vj,cube_vert:Xj,cube_frag:Yj,depth_vert:Jj,depth_frag:Kj,distance_vert:qj,distance_frag:Zj,equirect_vert:Qj,equirect_frag:$j,linedashed_vert:e9,linedashed_frag:t9,meshbasic_vert:n9,meshbasic_frag:i9,meshlambert_vert:r9,meshlambert_frag:s9,meshmatcap_vert:o9,meshmatcap_frag:a9,meshnormal_vert:l9,meshnormal_frag:c9,meshphong_vert:u9,meshphong_frag:d9,meshphysical_vert:f9,meshphysical_frag:h9,meshtoon_vert:p9,meshtoon_frag:m9,points_vert:g9,points_frag:x9,shadow_vert:v9,shadow_frag:y9,sprite_vert:_9,sprite_frag:S9},ot={common:{diffuse:{value:new Ve(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Nt},alphaMap:{value:null},alphaMapTransform:{value:new Nt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Nt}},envmap:{envMap:{value:null},envMapRotation:{value:new Nt},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98},dfgLUT:{value:null}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Nt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Nt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Nt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Nt},normalScale:{value:new xe(1,1)}}
vendor: 7,488 bytes, line 3685
3685,displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Nt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Nt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Nt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Nt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Ve(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Ve(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Nt},alphaTest:{value:0},uvTransform:{value:new Nt}},sprite:{diffuse:{value:new Ve(16777215)},opacity:{value:1},center:{value:new xe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Nt},alphaMap:{value:null},alphaMapTransform:{value:new Nt},alphaTest:{value:0}}},Uo={basic:{uniforms:Nr([ot.common,ot.specularmap,ot.envmap,ot.aomap,ot.lightmap,ot.fog]),vertexShader:Ot.meshbasic_vert,fragmentShader:Ot.meshbasic_frag},lambert:{uniforms:Nr([ot.common,ot.specularmap,ot.envmap,ot.aomap,ot.lightmap,ot.emissivemap,ot.bumpmap,ot.normalmap,ot.displacementmap,ot.fog,ot.lights,{emissive:{value:new Ve(0)}}]),vertexShader:Ot.meshlambert_vert,fragmentShader:Ot.meshlambert_frag},phong:{uniforms:Nr([ot.common,ot.specularmap,ot.envmap,ot.aomap,ot.lightmap,ot.emissivemap,ot.bumpmap,ot.normalmap,ot.displacementmap,ot.fog,ot.lights,{emissive:{value:new Ve(0)},specular:{value:new Ve(1118481)},shininess:{value:30}}]),vertexShader:Ot.meshphong_vert,fragmentShader:Ot.meshphong_frag},standard:{uniforms:Nr([ot.common,ot.envmap,ot.aomap,ot.lightmap,ot.emissivemap,ot.bumpmap,ot.normalmap,ot.displacementmap,ot.roughnessmap,ot.metalnessmap,ot.fog,ot.lights,{emissive:{value:new Ve(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Ot.meshphysical_vert,fragmentShader:Ot.meshphysical_frag},toon:{uniforms:Nr([ot.common,ot.aomap,ot.lightmap,ot.emissivemap,ot.bumpmap,ot.normalmap,ot.displacementmap,ot.gradientmap,ot.fog,ot.lights,{emissive:{value:new Ve(0)}}]),vertexShader:Ot.meshtoon_vert,fragmentShader:Ot.meshtoon_frag},matcap:{uniforms:Nr([ot.common,ot.bumpmap,ot.normalmap,ot.displacementmap,ot.fog,{matcap:{value:null}}]),vertexShader:Ot.meshmatcap_vert,fragmentShader:Ot.meshmatcap_frag},points:{uniforms:Nr([ot.points,ot.fog]),vertexShader:Ot.points_vert,fragmentShader:Ot.points_frag},dashed:{uniforms:Nr([ot.common,ot.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Ot.linedashed_vert,fragmentShader:Ot.linedashed_frag},depth:{uniforms:Nr([ot.common,ot.displacementmap]),vertexShader:Ot.depth_vert,fragmentShader:Ot.depth_frag},normal:{uniforms:Nr([ot.common,ot.bumpmap,ot.normalmap,ot.displacementmap,{opacity:{value:1}}]),vertexShader:Ot.meshnormal_vert,fragmentShader:Ot.meshnormal_frag},sprite:{uniforms:Nr([ot.sprite,ot.fog]),vertexShader:Ot.sprite_vert,fragmentShader:Ot.sprite_frag},background:{uniforms:{uvTransform:{value:new Nt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Ot.background_vert,fragmentShader:Ot.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Nt}},vertexShader:Ot.backgroundCube_vert,fragmentShader:Ot.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Ot.cube_vert,fragmentShader:Ot.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Ot.equirect_vert,fragmentShader:Ot.equirect_frag},distance:{uniforms:Nr([ot.common,ot.displacementmap,{referencePosition:{value:new H},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Ot.distance_vert,fragmentShader:Ot.distance_frag},shadow:{uniforms:Nr([ot.lights,ot.fog,{color:{value:new Ve(0)},opacity:{value:1}}]),vertexShader:Ot.shadow_vert,fragmentShader:Ot.shadow_frag}};Uo.physical={uniforms:Nr([Uo.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Nt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Nt},clearcoatNormalScale:{value:new xe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Nt},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Nt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Nt},sheen:{value:0},sheenColor:{value:new Ve(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Nt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Nt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Nt},transmissionSamplerSize:{value:new xe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Nt},attenuationDistance:{value:0},attenuationColor:{value:new Ve(0)},specularColor:{value:new Ve(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Nt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Nt},anisotropyVector:{value:new xe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Nt}}]),vertexShader:Ot.meshphysical_vert,fragmentShader:Ot.meshphysical_frag};const hx={r:0,b:0,g:0},eu=new Ys,b9=new _t;function M9(i,e,t,n,r,s,o){const a=new Ve(0);let l=s===!0?0:1,c,u,d=null,p=0,m=null;function x(b){let A=b.isScene===!0?b.background:null;return A&&A.isTexture&&(A=(b.backgroundBlurriness>0?t:e).get(A)),A}function v(b){let A=!1;const w=x(b);w===null?g(a,l):w&&w.isColor&&(g(w,1),A=!0);const C=i.xr.getEnvironmentBlendMode();C==="additive"?n.buffers.color.setClear(0,0,0,1,o):C==="alpha-blend"&&n.buffers.color.setClear(0,0,0,0,o),(i.autoClear||A)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil))}function _(b,A){const w=x(A);w&&(w.isCubeTexture||w.mapping===ah)?(u===void 0&&(u=new Kt(new td(1,1,1),new dn({name:"Backgroun
3685dCubeMaterial",uniforms:Qf(Uo.backgroundCube.uniforms),vertexShader:Uo.backgroundCube.vertexShader,fragmentShader:Uo.backgroundCube.fragmentShader,side:Jr,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(C,P,B){this.matrixWorld.copyPosition(B.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(u)),eu.copy(A.backgroundRotation),eu.x*=-1,eu.y*=-1,eu.z*=-1,w.isCubeTexture&&w.isRenderTargetTexture===!1&&(eu.y*=-1,eu.z*=-1),u.material.uniforms.envMap.value=w,u.material.uniforms.flipEnvMap.value=w.isCubeTexture&&w.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=A.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=A.backgroundIntensity,u.material.uniforms.backgroundRotation.value.setFromMatrix4(b9.makeRotationFromEuler(eu)),u.material.toneMapped=Yt.getTransfer(w.colorSpace)!==vn,(d!==w||p!==w.version||m!==i.toneMapping)&&(u.material.needsUpdate=!0,d=w,p=w.version,m=i.toneMapping),u.layers.enableAll(),b.unshift(u,u.geometry,u.material,0,0,null)):w&&w.isTexture&&(c===void 0&&(c=new Kt(new ks(2,2),new dn({name:"BackgroundMaterial",uniforms:Qf(Uo.background.uniforms),vertexShader:Uo.background.vertexShader,fragmentShader:Uo.background.fragmentShader,side:So,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(c)),c.material.uniforms.t2D.value=w,c.material.uniforms.backgroundIntensity.value=A.backgroundIntensity,c.material.toneMapped=Yt.getTransfer(w.colorSpace)!==vn,w.matrixAutoUpdate===!0&&w.updateMatrix(),c.material.uniforms.uvTransform.value.copy(w.matrix),(d!==w||p!==w.version||m!==i.toneMapping)&&(c.material.needsUpdate=!0,d=w,p=w.version,m=i.toneMapping),c.layers.enableAll(),b.unshift(c,c.geometry,c.material,0,0,null))}function g(b,A){b.getRGB(hx,gD(i)),n.buffers.color.setClear(hx.r,hx.g,hx.b,A,o)}function S(){u!==void 0&&(u.geometry.dispose(),u.material.dispose(),u=void 0),c!==void 0&&(c.geometry.dispose(),c.material.dispose(),c=void 0)}return{getClearColor:function(){return a},setClearColor:function(b,A=1){a.set(b),l=A,g(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(b){l=b,g(a,l)},render:v,addToRenderList:_,dispose:S}}function A9(i,e){const t=i.getParameter(i.MAX_VERTEX_ATTRIBS),n={},r=p(null);let s=r,o=!1;function a(E,L,N,k,Y){let z=!1;const W=d(k,N,L);s!==W&&(s=W,c(s.object)),z=m(E,k,N,Y),z&&x(E,k,N,Y),Y!==null&&e.update(Y,i.ELEMENT_ARRAY_BUFFER),(z||o)&&(o=!1,A(E,L,N,k),Y!==null&&i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,e.get(Y).buffer))}function l(){return i.createVertexArray()}function c(E){return i.bindVertexArray(E)}function u(E){return i.deleteVertexArray(E)}function d(E,L,N){const k=N.wireframe===!0;let Y=n[E.id];Y===void 0&&(Y={},n[E.id]=Y);let z=Y[L.id];z===void 0&&(z={},Y[L.id]=z);let W=z[k];return W===void 0&&(W=p(l()),z[k]=W),W}function p(E){const L=[],N=[],k=[];for(let Y=0;Y<t;Y++)L[Y]=0,N[Y]=0,k[Y]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:L,enabledAttributes:N,attributeDivisors:k,object:E,attributes:{},index:null}}function m(E,L,N,k){const Y=s.attributes,z=L.attributes;let W=0;const V=N.getAttributes();for(const G in V)if(V[G].location>=0){const O=Y[G];let ee=z[G];if(ee===void 0&&(G==="instanceMatrix"&&E.instanceMatrix&&(ee=E.instanceMatrix),G==="instanceColor"&&E.instanceColor&&(ee=E.instanceColor)),O===void 0||O.attribute!==ee||ee&&O.data!==ee.data)return!0;W++}return s.attributesNum!==W||s.index!==k}function x(E,L,N,k){const Y={},z=L.attributes;let W=0;const V=N.getAttributes();for(const G in V)if(V[G].location>=0){let O=z[G];O===void 0&&(G==="instanceMatrix"&&E.instanceMatrix&&(O=E.instanceMatrix),G==="instanceColor"&&E.instanceColor&&(O=E.instanceColor));const ee={};ee.attribute=O,O&&O.data&&(ee.data=O.data),Y[G]=ee,W++}s.attributes=Y,s.attributesNum=W,s.index=k}function v(){const E=s.newAttributes;for(let L=0,N=E.length;L<N;L++)E[L]=0}function _(E){g(E,0)}function g(E,L){const N=s.newAttributes,k=s.enabledAttributes,Y=s.attributeDivisors;N[E]=1,k[E]===0&&(i.enableVertexAttribArray(E),k[E]=1),Y[E]!==L&&(i.vertexAttribDivisor(E,L),Y[E]=L)}function S(){const E=s.newAttributes,L=s.enabledAttributes;for(let N=0,k=L.length;N<k;N++)L[N]!==E[N]&&(i.disableVertexAttribArray(N),L[N]=0)}function b(E,L,N,k,Y,z,W){W===!0?i.vertexAttribIPointer(E,L,N,Y,z):i.vertexAttribPointer(E,L,N,k,Y,z)}function A(E,L,N,k){v();const Y=k.attributes,z=N.getAttributes(),W=L.defaultAttributeValues;for(const V in z){const G=z[V];if(G.location>=0){let Z=Y[V];if(Z===void 0&&(V==="instanceMatrix"&&E.instanceMatrix&&(Z=E.instanceMatrix),V==="instanceColor"&&E.instanceColor&&(Z=E.instanceColor)),Z!==void 0){const O=Z.normalized,ee=Z.itemSize,le=e.get(Z);if(le===void 0)continue;const ge=le.buffer,Se=le.type,Ye=le.bytesPerElement,K=Se===i.INT||Se===i.UNSIGNED_INT||Z.gpuType===i1;if(Z.isInterleavedBufferAttribute){const q=Z.data,re=q.stride,Ce=Z.offset;if(q.isInstancedInterleavedBuffer){for(let Te=0;Te<G.locationSize;Te++)g(G.location+Te,q.meshPerAttribute);E.isInstancedMesh!==!0&&k._maxInstanceCount===void 0&&(k._maxInstanceCount=q.meshPerAttribute*q.count)}else for(let Te=0;Te<G.locationSize;Te++)_(G.location+Te);i.bindBuffer(i.ARRAY_BUFFER,ge);for(let Te=0;Te<G.locationSize;Te++)b(G.location+Te,ee/G.locationSize,Se,O,re*Ye,(Ce+ee/G.locationSize*Te)*Ye,K)}else{if(Z.isInstancedBufferAttribute){for(let q=0;q<G.locationSize;q++)g(G.location+q,Z.meshPerAttribute);E.isInstancedMesh!==!0&&k._maxInstanceCount===void 0&&(k._maxInstanceCount=Z.meshPerAttribute*Z.count)}
vendor: 1,607 bytes, line 3685
3685else for(let q=0;q<G.locationSize;q++)_(G.location+q);i.bindBuffer(i.ARRAY_BUFFER,ge);for(let q=0;q<G.locationSize;q++)b(G.location+q,ee/G.locationSize,Se,O,ee*Ye,ee/G.locationSize*q*Ye,K)}}else if(W!==void 0){const O=W[V];if(O!==void 0)switch(O.length){case 2:i.vertexAttrib2fv(G.location,O);break;case 3:i.vertexAttrib3fv(G.location,O);break;case 4:i.vertexAttrib4fv(G.location,O);break;default:i.vertexAttrib1fv(G.location,O)}}}}S()}function w(){B();for(const E in n){const L=n[E];for(const N in L){const k=L[N];for(const Y in k)u(k[Y].object),delete k[Y];delete L[N]}delete n[E]}}function C(E){if(n[E.id]===void 0)return;const L=n[E.id];for(const N in L){const k=L[N];for(const Y in k)u(k[Y].object),delete k[Y];delete L[N]}delete n[E.id]}function P(E){for(const L in n){const N=n[L];if(N[E.id]===void 0)continue;const k=N[E.id];for(const Y in k)u(k[Y].object),delete k[Y];delete N[E.id]}}function B(){R(),o=!0,s!==r&&(s=r,c(s.object))}function R(){r.geometry=null,r.program=null,r.wireframe=!1}return{setup:a,reset:B,resetDefaultState:R,dispose:w,releaseStatesOfGeometry:C,releaseStatesOfProgram:P,initAttributes:v,enableAttribute:_,disableUnusedAttributes:S}}function w9(i,e,t){let n;function r(c){n=c}function s(c,u){i.drawArrays(n,c,u),t.update(u,n,1)}function o(c,u,d){d!==0&&(i.drawArraysInstanced(n,c,u,d),t.update(u,n,d))}function a(c,u,d){if(d===0)return;e.get("WEBGL_multi_draw").multiDrawArraysWEBGL(n,c,0,u,0,d);let m=0;for(let x=0;x<d;x++)m+=u[x];t.update(m,n,1)}function l(c,u,d,p){if(d===0)return;const m=e.get("WEBGL_multi_draw");if(m===null)for(let x=0;x<c.length;x++)o(c[x],u[x],p[x]);
vendor: 13,889 bytes, lines 3685-3762
3685else{m.multiDrawArraysInstancedWEBGL(n,c,0,u,0,p,0,d);let x=0;for(let v=0;v<d;v++)x+=u[v]*p[v];t.update(x,n,1)}}this.setMode=r,this.render=s,this.renderInstances=o,this.renderMultiDraw=a,this.renderMultiDrawInstances=l}function T9(i,e,t,n){let r;function s(){if(r!==void 0)return r;if(e.has("EXT_texture_filter_anisotropic")===!0){const P=e.get("EXT_texture_filter_anisotropic");r=i.getParameter(P.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r}function o(P){return!(P!==Ni&&n.convert(P)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_FORMAT))}function a(P){const B=P===sr&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(P!==jr&&n.convert(P)!==i.getParameter(i.IMPLEMENTATION_COLOR_READ_TYPE)&&P!==Vr&&!B)}function l(P){if(P==="highp"){if(i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.HIGH_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision>0)return"highp";P="mediump"}return P==="mediump"&&i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.MEDIUM_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=t.precision!==void 0?t.precision:"highp";const u=l(c);u!==c&&(at("WebGLRenderer:",c,"not supported, using",u,"instead."),c=u);const d=t.logarithmicDepthBuffer===!0,p=t.reversedDepthBuffer===!0&&e.has("EXT_clip_control"),m=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),x=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS),v=i.getParameter(i.MAX_TEXTURE_SIZE),_=i.getParameter(i.MAX_CUBE_MAP_TEXTURE_SIZE),g=i.getParameter(i.MAX_VERTEX_ATTRIBS),S=i.getParameter(i.MAX_VERTEX_UNIFORM_VECTORS),b=i.getParameter(i.MAX_VARYING_VECTORS),A=i.getParameter(i.MAX_FRAGMENT_UNIFORM_VECTORS),w=i.getParameter(i.MAX_SAMPLES),C=i.getParameter(i.SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:s,getMaxPrecision:l,textureFormatReadable:o,textureTypeReadable:a,precision:c,logarithmicDepthBuffer:d,reversedDepthBuffer:p,maxTextures:m,maxVertexTextures:x,maxTextureSize:v,maxCubemapSize:_,maxAttributes:g,maxVertexUniforms:S,maxVaryings:b,maxFragmentUniforms:A,maxSamples:w,samples:C}}function E9(i){const e=this;let t=null,n=0,r=!1,s=!1;const o=new Oo,a=new Nt,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(d,p){const m=d.length!==0||p||n!==0||r;return r=p,n=d.length,m},this.beginShadows=function(){s=!0,u(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(d,p){t=u(d,p,0)},this.setState=function(d,p,m){const x=d.clippingPlanes,v=d.clipIntersection,_=d.clipShadows,g=i.get(d);if(!r||x===null||x.length===0||s&&!_)s?u(null):c();else{const S=s?0:n,b=S*4;let A=g.clippingState||null;l.value=A,A=u(x,p,b,m);for(let w=0;w!==b;++w)A[w]=t[w];g.clippingState=A,this.numIntersection=v?this.numPlanes:0,this.numPlanes+=S}};function c(){l.value!==t&&(l.value=t,l.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function u(d,p,m,x){const v=d!==null?d.length:0;let _=null;if(v!==0){if(_=l.value,x!==!0||_===null){const g=m+v*4,S=p.matrixWorldInverse;a.getNormalMatrix(S),(_===null||_.length<g)&&(_=new Float32Array(g));for(let b=0,A=m;b!==v;++b,A+=4)o.copy(d[b]).applyMatrix4(S,a),o.normal.toArray(_,A),_[A+3]=o.constant}l.value=_,l.needsUpdate=!0}return e.numPlanes=v,e.numIntersection=0,_}}function C9(i){let e=new WeakMap;function t(o,a){return a===Am?o.mapping=Sa:a===wm&&(o.mapping=xc),o}function n(o){if(o&&o.isTexture){const a=o.mapping;if(a===Am||a===wm)if(e.has(o)){const l=e.get(o).texture;return t(l,o.mapping)}else{const l=o.image;if(l&&l.height>0){const c=new mw(l.height);return c.fromEquirectangularTexture(i,o),e.set(o,c),o.addEventListener("dispose",r),t(c.texture,o.mapping)}else return null}}return o}function r(o){const a=o.target;a.removeEventListener("dispose",r);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function s(){e=new WeakMap}return{get:n,dispose:s}}const ql=4,CR=[.125,.215,.35,.446,.526,.582],du=20,R9=256,tp=new or,RR=new Ve;let pS=null,mS=0,gS=0,xS=!1;const P9=new H;class SM{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._sizeLods=[],this._sigmas=[],this._lodMeshes=[],this._backgroundBox=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._blurMaterial=null,this._ggxMaterial=null}fromScene(e,t=0,n=.1,r=100,s={}){const{size:o=256,position:a=P9}=s;pS=this._renderer.getRenderTarget(),mS=this._renderer.getActiveCubeFace(),gS=this._renderer.getActiveMipmapLevel(),xS=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(o);const l=this._allocateTargets();return l.depthBuffer=!0,this._sceneToCubeUV(e,n,r,l,a),t>0&&this._blur(l,0,0,t),this._applyPMREM(l),this._cleanup(l),l}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=LR(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=IR(),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(pS,mS,gS),this._renderer.xr.enabled=xS,e.scissorTest=!1,Wd(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===Sa||e.mapping===xc?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),pS=this._renderer.getRenderTarget(),mS=this._renderer.getActiveCubeFace(),gS=this._renderer.getActiveMipmapLevel(),xS=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;const n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,n={magFilter:jt,minFilter:jt,generateMipmaps:!1,type:sr,format:Ni,colorSpace:Tr,depthBuffer:!1},r=PR(e,t,n);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=PR(e,t,n);const{_lodMax:s}=this;({lodMeshes:this._lodMeshes,sizeLods:this._sizeLods,sigmas:this._sigmas}=I9(s)),this._blurMaterial=B9(s,e,t),this._ggxMaterial=L9(s,e,t)}return r}_compileMaterial(e){const t=new Kt(new Rt,e);this._renderer.compile(t,tp)}_sceneToCubeUV(e,t,n,r,s){const l=new wn(90,1,t,n),c=[1,-1,1,1,1,1],u=[1,1,1,-1,-1,-1],d=this._renderer,p=d.autoClear,m=d.toneMapping;d.getClearColor(RR),d.toneMapping=zs,d.autoClear=!1,d.state.buffers.depth.getReversed()&&(d.setRenderTarget(r),d.clearDepth(),d.setRenderTarget(null)),this._backgroundBox===null&&(this._backgroundBox=new Kt(new td,new pi({name:"PMREM.Background",side:Jr,depthWrite:!1,depthTest:!1})));const v=this._backgroundBox,_=v.material;let g=!1;const S=e.background;S?S.isColor&&(_.color.copy(S),e.background=null,g=!0):(_.color.copy(RR),g=!0);for(let b=0;b<6;b++){const A=b%3;A===0?(l.up.set(0,c[b],0),l.position.set(s.x,s.y,s.z),l.lookAt(s.x+u[b],s.y,s.z)):A===1?(l.up.set(0,0,c[b]),l.position.set(s.x,s.y,s.z),l.lookAt(s.x,s.y+u[b],s.z)):(l.up.set(0,c[b],0),l.position.set(s.x,s.y,s.z),l.lookAt(s.x,s.y,s.z+u[b]));const w=this._cubeSize;Wd(r,A*w,b>2?w:0,w,w),d.setRenderTarget(r),g&&d.render(v,l),d.render(e,l)}d.toneMapping=m,d.autoClear=p,e.background=S}_textureToCubeUV(e,t){const n=this._renderer,r=e.mapping===Sa||e.mapping===xc;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=LR()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=IR());const s=r?this._cubemapMaterial:this._equirectMaterial,o=this._lodMeshes[0];o.material=s;const a=s.uniforms;a.envMap.value=e;const l=this._cubeSize;Wd(t,0,0,3*l,2*l),n.setRenderTarget(t),n.render(o,tp)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;const r=this._lodMeshes.length;for(let s=1;s<r;s++)this._applyGGXFilter(e,s-1,s);t.autoClear=n}_applyGGXFilter(e,t,n){const r=this._renderer,s=this._pingPongRenderTarget,o=this._ggxMaterial,a=this._lodMeshes[n];a.material=o;const l=o.uniforms,c=n/(this._lodMeshes.length-1),u=t/(this._lodMeshes.length-1),d=Math.sqrt(c*c-u*u),p=0+c*1.25,m=d*p,{_lodMax:x}=this,v=this._sizeLods[n],_=3*v*(n>x-ql?n-x+ql:0),g=4*(this._cubeSize-v);l.envMap.value=e.texture,l.roughness.value=m,l.mipInt.value=x-t,Wd(s,_,g,3*v,2*v),r.setRenderTarget(s),r.render(a,tp),l.envMap.value=s.texture,l.roughness.value=0,l.mipInt.value=x-n,Wd(e,_,g,3*v,2*v),r.setRenderTarget(e),r.render(a,tp)}_blur(e,t,n,r,s){const o=this._pingPongRenderTarget;this._halfBlur(e,o,t,n,r,"latitudinal",s),this._halfBlur(o,e,n,n,r,"longitudinal",s)}_halfBlur(e,t,n,r,s,o,a){const l=this._renderer,c=this._blurMaterial;o!=="latitudinal"&&o!=="longitudinal"&&bt("blur direction must be either latitudinal or longitudinal!");const u=3,d=this._lodMeshes[r];d.material=c;const p=c.uniforms,m=this._sizeLods[n]-1,x=isFinite(s)?Math.PI/(2*m):2*Math.PI/(2*du-1),v=s/x,_=isFinite(s)?1+Math.floor(u*v):du;_>du&&at(`sigmaRadians, ${s}, is too large and will clip, as it requested ${_} samples when the maximum is set to ${du}`);const g=[];let S=0;for(let P=0;P<du;++P){const B=P/v,R=Math.exp(-B*B/2);g.push(R),P===0?S+=R:P<_&&(S+=2*R)}for(let P=0;P<g.length;P++)g[P]=g[P]/S;p.envMap.value=e.texture,p.samples.value=_,p.weights.value=g,p.latitudinal.value=o==="latitudinal",a&&(p.poleAxis.value=a);const{_lodMax:b}=this;p.dTheta.value=x,p.mipInt.value=b-n;const A=this._sizeLods[r],w=3*A*(r>b-ql?r-b+ql:0),C=4*(this._cubeSize-A);Wd(t,w,C,3*A,2*A),l.setRenderTarget(t),l.render(d,tp)}}function I9(i){const e=[],t=[],n=[];let r=i;const s=i-ql+1+CR.length;for(let o=0;o<s;o++){const a=Math.pow(2,r);e.push(a);let l=1/a;o>i-ql?l=CR[o-i+ql-1]:o===0&&(l=0),t.push(l);const c=1/(a-2),u=-c,d=1+c,p=[u,u,d,u,d,d,u,u,d,d,u,d],m=6,x=6,v=3,_=2,g=1,S=new Float32Array(v*x*m),b=new Float32Array(_*x*m),A=new Float32Array(g*x*m);for(let C=0;C<m;C++){const P=C%3*2/3-1,B=C>2?0:-1,R=[P,B,0,P+2/3,B,0,P+2/3,B+1,0,P,B,0,P+2/3,B+1,0,P,B+1,0];S.set(R,v*x*C),b.set(p,_*x*C);const E=[C,C,C,C,C,C];A.set(E,g*x*C)}const w=new Rt;w.setAttribute("position",new zt(S,v)),w.setAttribute("uv",new zt(b,_)),w.setAttribute("faceIndex",new zt(A,g)),n.push(new Kt(w,null)),r>ql&&r--}return{lodMeshes:n,sizeLods:e,sigmas:t}}function PR(i,e,t){const n=new Gn(i,e,t);return n.texture.mapping=ah,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function Wd(i,e,t,n,r){i.viewport.set(e,t,n,r),i.scissor.set(e,t,n,r)}function L9(i,e,t){return new dn({name:"PMREMGGXConvolution",defines:{GGX_SAMPLES:R9,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${i}.0`},uniforms:{envMap:{value:null},roughness:{value:0},mipInt:{value:0}},vertexShader:k1(),fragmentShader:` 3686 3687 precision highp float; 3688 precision highp int; 3689 3690 varying vec3 vOutputDirection; 3691 3692 uniform sampler2D envMap; 3693 uniform float roughness; 3694 uniform float mipInt; 3695 3696 #define ENVMAP_TYPE_CUBE_UV 3697 #include <cube_uv_reflection_fragment> 3698 3699 #define PI 3.14159265359 3700 3701 // Van der Corput radical inverse 3702 float radicalInverse_VdC(uint bits) { 3703 bits = (bits << 16u) | (bits >> 16u); 3704 bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u); 3705 bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u); 3706 bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u); 3707 bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u); 3708 return float(bits) * 2.3283064365386963e-10; // / 0x100000000 3709 } 3710 3711 // Hammersley sequence 3712 vec2 hammersley(uint i, uint N) { 3713 return vec2(float(i) / float(N), radicalInverse_VdC(i)); 3714 } 3715 3716 // GGX VNDF importance sampling (Eric Heitz 2018) 3717 // "Sampling the GGX Distribution of Visible Normals" 3718 // https://jcgt.org/published/0007/04/01/ 3719 vec3 importanceSampleGGX_VNDF(vec2 Xi, vec3 V, float roughness) { 3720 float alpha = roughness * roughness; 3721 3722 // Section 3.2: Transform view direction to hemisphere configuration 3723 vec3 Vh = normalize(vec3(alpha * V.x, alpha * V.y, V.z)); 3724 3725 // Section 4.1: Orthonormal basis 3726 float lensq = Vh.x * Vh.x + Vh.y * Vh.y; 3727 vec3 T1 = lensq > 0.0 ? vec3(-Vh.y, Vh.x, 0.0) / sqrt(lensq) : vec3(1.0, 0.0, 0.0); 3728 vec3 T2 = cross(Vh, T1); 3729 3730 // Section 4.2: Parameterization of projected area 3731 float r = sqrt(Xi.x); 3732 float phi = 2.0 * PI * Xi.y; 3733 float t1 = r * cos(phi); 3734 float t2 = r * sin(phi); 3735 float s = 0.5 * (1.0 + Vh.z); 3736 t2 = (1.0 - s) * sqrt(1.0 - t1 * t1) + s * t2; 3737 3738 // Section 4.3: Reprojection onto hemisphere 3739 vec3 Nh = t1 * T1 + t2 * T2 + sqrt(max(0.0, 1.0 - t1 * t1 - t2 * t2)) * Vh; 3740 3741 // Section 3.4: Transform back to ellipsoid configuration 3742 return normalize(vec3(alpha * Nh.x, alpha * Nh.y, max(0.0, Nh.z))); 3743 } 3744 3745 void main() { 3746 vec3 N = normalize(vOutputDirection); 3747 vec3 V = N; // Assume view direction equals normal for pre-filtering 3748 3749 vec3 prefilteredColor = vec3(0.0); 3750 float totalWeight = 0.0; 3751 3752 // For very low roughness, just sample the environment directly 3753 if (roughness < 0.001) { 3754 gl_FragColor = vec4(bilinearCubeUV(envMap, N, mipInt), 1.0); 3755 return; 3756 } 3757 3758 // Tangent space basis for VNDF sampling 3759 vec3 up = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0); 3760 vec3 tangent = normalize(cross(up, N)); 3761 vec3 bitangent = cross(N, tangent); 3762
3763 for(uint i = 0u; i < uint(GGX_SAMPLES); i++) { 3764 vec2 Xi = hammersley(i, uint(GGX_SAMPLES)); 3765 3766 // For PMREM, V = N, so in tangent space V is always (0, 0, 1) 3767 vec3 H_tangent = importanceSampleGGX_VNDF(Xi, vec3(0.0, 0.0, 1.0), roughness); 3768 3769 // Transform H back to world space 3770 vec3 H = normalize(tangent * H_tangent.x + bitangent * H_tangent.y + N * H_tangent.z); 3771 vec3 L = normalize(2.0 * dot(V, H) * H - V); 3772 3773 float NdotL = max(dot(N, L), 0.0); 3774 3775 if(NdotL > 0.0) { 3776 // Sample environment at fixed mip level 3777 // VNDF importance sampling handles the distribution filtering 3778 vec3 sampleColor = bilinearCubeUV(envMap, L, mipInt); 3779 3780 // Weight by NdotL for the split-sum approximation 3781 // VNDF PDF naturally accounts for the visible microfacet distribution 3782 prefilteredColor += sampleColor * NdotL; 3783 totalWeight += NdotL; 3784 } 3785 } 3786 3787 if (totalWeight > 0.0) { 3788 prefilteredColor = prefilteredColor / totalWeight; 3789 } 3790 3791 gl_FragColor = vec4(prefilteredColor, 1.0); 3792 } 3793 `,blending:jo,depthTest:!1,depthWrite:!1})}function B9(i,e,t){const n=new Float32Array(du),r=new H(0,1,0);return new dn({name:"SphericalGaussianBlur",defines:{n:du,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${i}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:k1(),fragmentShader:` 3794 3795 precision mediump float; 3796 precision mediump int; 3797 3798 varying vec3 vOutputDirection; 3799 3800 uniform sampler2D envMap; 3801 uniform int samples; 3802 uniform float weights[ n ]; 3803 uniform bool latitudinal; 3804 uniform float dTheta; 3805 uniform float mipInt; 3806 uniform vec3 poleAxis; 3807 3808 #define ENVMAP_TYPE_CUBE_UV 3809 #include <cube_uv_reflection_fragment> 3810 3811 vec3 getSample( float theta, vec3 axis ) { 3812 3813 float cosTheta = cos( theta ); 3814 // Rodrigues' axis-angle rotation 3815 vec3 sampleDirection = vOutputDirection * cosTheta 3816 + cross( axis, vOutputDirection ) * sin( theta ) 3817 + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); 3818 3819 return bilinearCubeUV( envMap, sampleDirection, mipInt ); 3820 3821 } 3822 3823 void main() { 3824 3825 vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); 3826 3827 if ( all( equal( axis, vec3( 0.0 ) ) ) ) { 3828 3829 axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); 3830 3831 } 3832 3833 axis = normalize( axis ); 3834 3835 gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); 3836 gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); 3837 3838 for ( int i = 1; i < n; i++ ) { 3839 3840 if ( i >= samples ) { 3841 3842 break; 3843 3844 } 3845 3846 float theta = dTheta * float( i ); 3847 gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); 3848 gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); 3849 3850 } 3851 3852 } 3853 `,blending:jo,depthTest:!1,depthWrite:!1})}function IR(){return new dn({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:k1(),fragmentShader:` 3854 3855 precision mediump float; 3856 precision mediump int; 3857 3858 varying vec3 vOutputDirection; 3859 3860 uniform sampler2D envMap; 3861 3862 #include <common> 3863 3864 void main() { 3865 3866 vec3 outputDirection = normalize( vOutputDirection ); 3867 vec2 uv = equirectUv( outputDirection ); 3868 3869 gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); 3870 3871 } 3872 `,blending:jo,depthTest:!1,depthWrite:!1})}function LR(){return new dn({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:k1(),fragmentShader:` 3873 3874 precision mediump float; 3875 precision mediump int; 3876 3877 uniform float flipEnvMap; 3878 3879 varying vec3 vOutputDirection; 3880 3881 uniform samplerCube envMap; 3882 3883 void main() { 3884 3885 gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); 3886 3887 } 3888 `,blending:jo,depthTest:!1,depthWrite:!1})}function k1(){return` 3889 3890 precision mediump float; 3891 precision mediump int; 3892 3893 attribute float faceIndex; 3894 3895 varying vec3 vOutputDirection; 3896 3897 // RH coordinate system; PMREM face-indexing convention 3898 vec3 getDirection( vec2 uv, float face ) { 3899 3900 uv = 2.0 * uv - 1.0; 3901 3902 vec3 direction = vec3( uv, 1.0 ); 3903 3904 if ( face == 0.0 ) { 3905 3906 direction = direction.zyx; // ( 1, v, u ) pos x 3907 3908 } else if ( face == 1.0 ) { 3909 3910 direction = direction.xzy; 3911 direction.xz *= -1.0; // ( -u, 1, -v ) pos y 3912 3913 } else if ( face == 2.0 ) { 3914 3915 direction.x *= -1.0; // ( -u, v, 1 ) pos z 3916 3917 } else if ( face == 3.0 ) { 3918 3919 direction = direction.zyx; 3920 direction.xz *= -1.0; // ( -1, v, -u ) neg x 3921 3922 } else if ( face == 4.0 ) { 3923 3924 direction = direction.xzy; 3925 direction.xy *= -1.0; // ( -u, -1, v ) neg y 3926 3927 } else if ( face == 5.0 ) { 3928 3929 direction.z *= -1.0; // ( u, v, -1 ) neg z 3930 3931 } 3932 3933 return direction; 3934 3935 } 3936 3937 void main() { 3938 3939 vOutputDirection = getDirection( uv, faceIndex ); 3940 gl_Position = vec4( position, 1.0 ); 3941 3942 } 3943 `}function D9(i){let e=new WeakMap,t=null;function n(a){if(a&&a.isTexture){const l=a.mapping,c=l===Am||l===wm,u=l===Sa||l===xc;if(c||u){let d=e.get(a);const p=d!==void 0?d.texture.pmremVersion:0;if(a.isRenderTargetTexture&&a.pmremVersion!==p)return t===null&&(t=new SM(i)),d=c?t.fromEquirectangular(a,d):t.fromCubemap(a,d),d.texture.pmremVersion=a.pmremVersion,e.set(a,d),d.texture;if(d!==void 0)return d.texture;{const m=a.image;return c&&m&&m.height>0||u&&m&&r(m)?(t===null&&(t=new SM(i)),d=c?t.fromEquirectangular(a):t.fromCubemap(a),d.texture.pmremVersion=a.pmremVersion,e.set(a,d),a.addEventListener("dispose",s),d.texture):null}}}return a}function r(a){let l=0;const c=6;for(let u=0;u<c;u++)a[u]!==void 0&&l++;return l===c}function s(a){const l=a.target;l.removeEventListener("dispose",s);const c=e.get(l);c!==void 0&&(e.delete(l),c.dispose())}function o(){e=new WeakMap,t!==null&&(t.dispose(),t=null)}return{get:n,dispose:o}}function F9(i){const e={};function t(n){if(e[n]!==void 0)return e[n];const r=i.getExtension(n);return e[n]=r,r}return{has:function(n){return t(n)!==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(n){const r=t(n);return r===null&&qf("WebGLRenderer: "+n+" extension not supported."),r}}}function N9(i,e,t,n){const r={},s=new WeakMap;function o(d){const p=d.target;p.index!==null&&e.remove(p.index);for(const x in p.attributes)e.remove(p.attributes[x]);p.removeEventListener("dispose",o),delete r[p.id];const m=s.get(p);m&&(e.remove(m),s.delete(p)),n.releaseStatesOfGeometry(p),p.isInstancedBufferGeometry===!0&&delete p._maxInstanceCount,t.memory.geometries--}function a(d,p){return r[p.id]===!0||(p.addEventListener("dispose",o),r[p.id]=!0,t.memory.geometries++),p}function l(d){const p=d.attributes;for(const m in p)e.update(p[m],i.ARRAY_BUFFER)}function c(d){const p=[],m=d.index,x=d.attributes.position;let v=0;if(m!==null){const S=m.array;v=m.version;for(let b=0,A=S.length;b<A;b+=3){const w=S[b+0],C=S[b+1],P=S[b+2];p.push(w,C,C,P,P,w)}}else if(x!==void 0){const S=x.array;v=x.version;for(let b=0,A=S.length/3-1;b<A;b+=3){const w=b+0,C=b+1,P=b+2;p.push(w,C,C,P,P,w)}}else return;const _=new(dD(p)?pw:hw)(p,1);_.version=v;const g=s.get(d);g&&e.remove(g),s.set(d,_)}function u(d){const p=s.get(d);if(p){const m=d.index;m!==null&&p.version<m.version&&c(d)}else c(d);return s.get(d)}return{get:a,update:l,getWireframeAttribute:u}}function k9(i,e,t){let n;function r(p){n=p}let s,o;function a(p){s=p.type,o=p.bytesPerElement}function l(p,m){i.drawElements(n,m,s,p*o),t.update(m,n,1)}function c(p,m,x){x!==0&&(i.drawElementsInstanced(n,m,s,p*o,x),t.update(m,n,x))}function u(p,m,x){if(x===0)return;e.get("WEBGL_multi_draw").multiDrawElementsWEBGL(n,m,0,s,p,0,x);let _=0;for(let g=0;g<x;g++)_+=m[g];t.update(_,n,1)}function d(p,m,x,v){if(x===0)return;const _=e.get("WEBGL_multi_draw");if(_===null)for(let g=0;g<p.length;g++)c(p[g]/o,m[g],v[g]);
vendor: 20,714 bytes, lines 3943-4024
3943else{_.multiDrawElementsInstancedWEBGL(n,m,0,s,p,0,v,0,x);let g=0;for(let S=0;S<x;S++)g+=m[S]*v[S];t.update(g,n,1)}}this.setMode=r,this.setIndex=a,this.render=l,this.renderInstances=c,this.renderMultiDraw=u,this.renderMultiDrawInstances=d}function O9(i){const e={geometries:0,textures:0},t={frame:0,calls:0,triangles:0,points:0,lines:0};function n(s,o,a){switch(t.calls++,o){case i.TRIANGLES:t.triangles+=a*(s/3);break;case i.LINES:t.lines+=a*(s/2);break;case i.LINE_STRIP:t.lines+=a*(s-1);break;case i.LINE_LOOP:t.lines+=a*s;break;case i.POINTS:t.points+=a*s;break;default:bt("WebGLInfo: Unknown draw mode:",o);break}}function r(){t.calls=0,t.triangles=0,t.points=0,t.lines=0}return{memory:e,render:t,programs:null,autoReset:!0,reset:r,update:n}}function U9(i,e,t){const n=new WeakMap,r=new on;function s(o,a,l){const c=o.morphTargetInfluences,u=a.morphAttributes.position||a.morphAttributes.normal||a.morphAttributes.color,d=u!==void 0?u.length:0;let p=n.get(a);if(p===void 0||p.count!==d){let E=function(){B.dispose(),n.delete(a),a.removeEventListener("dispose",E)};var m=E;p!==void 0&&p.texture.dispose();const x=a.morphAttributes.position!==void 0,v=a.morphAttributes.normal!==void 0,_=a.morphAttributes.color!==void 0,g=a.morphAttributes.position||[],S=a.morphAttributes.normal||[],b=a.morphAttributes.color||[];let A=0;x===!0&&(A=1),v===!0&&(A=2),_===!0&&(A=3);let w=a.attributes.position.count*A,C=1;w>e.maxTextureSize&&(C=Math.ceil(w/e.maxTextureSize),w=e.maxTextureSize);const P=new Float32Array(w*C*4*d),B=new f1(P,w,C,d);B.type=Vr,B.needsUpdate=!0;const R=A*4;for(let L=0;L<d;L++){const N=g[L],k=S[L],Y=b[L],z=w*C*4*L;for(let W=0;W<N.count;W++){const V=W*R;x===!0&&(r.fromBufferAttribute(N,W),P[z+V+0]=r.x,P[z+V+1]=r.y,P[z+V+2]=r.z,P[z+V+3]=0),v===!0&&(r.fromBufferAttribute(k,W),P[z+V+4]=r.x,P[z+V+5]=r.y,P[z+V+6]=r.z,P[z+V+7]=0),_===!0&&(r.fromBufferAttribute(Y,W),P[z+V+8]=r.x,P[z+V+9]=r.y,P[z+V+10]=r.z,P[z+V+11]=Y.itemSize===4?r.w:1)}}p={count:d,texture:B,size:new xe(w,C)},n.set(a,p),a.addEventListener("dispose",E)}if(o.isInstancedMesh===!0&&o.morphTexture!==null)l.getUniforms().setValue(i,"morphTexture",o.morphTexture,t);else{let x=0;for(let _=0;_<c.length;_++)x+=c[_];const v=a.morphTargetsRelative?1:1-x;l.getUniforms().setValue(i,"morphTargetBaseInfluence",v),l.getUniforms().setValue(i,"morphTargetInfluences",c)}l.getUniforms().setValue(i,"morphTargetsTexture",p.texture,t),l.getUniforms().setValue(i,"morphTargetsTextureSize",p.size)}return{update:s}}function z9(i,e,t,n){let r=new WeakMap;function s(l){const c=n.render.frame,u=l.geometry,d=e.get(l,u);if(r.get(d)!==c&&(e.update(d),r.set(d,c)),l.isInstancedMesh&&(l.hasEventListener("dispose",a)===!1&&l.addEventListener("dispose",a),r.get(l)!==c&&(t.update(l.instanceMatrix,i.ARRAY_BUFFER),l.instanceColor!==null&&t.update(l.instanceColor,i.ARRAY_BUFFER),r.set(l,c))),l.isSkinnedMesh){const p=l.skeleton;r.get(p)!==c&&(p.update(),r.set(p,c))}return d}function o(){r=new WeakMap}function a(l){const c=l.target;c.removeEventListener("dispose",a),t.remove(c.instanceMatrix),c.instanceColor!==null&&t.remove(c.instanceColor)}return{update:s,dispose:o}}const H9={[qy]:"LINEAR_TONE_MAPPING",[Zy]:"REINHARD_TONE_MAPPING",[Qy]:"CINEON_TONE_MAPPING",[Vm]:"ACES_FILMIC_TONE_MAPPING",[e1]:"AGX_TONE_MAPPING",[t1]:"NEUTRAL_TONE_MAPPING",[$y]:"CUSTOM_TONE_MAPPING"};function G9(i,e,t,n,r){const s=new Gn(e,t,{type:i,depthBuffer:n,stencilBuffer:r}),o=new Gn(e,t,{type:sr,depthBuffer:!1,stencilBuffer:!1}),a=new Rt;a.setAttribute("position",new ct([-1,3,0,-1,-1,0,3,-1,0],3)),a.setAttribute("uv",new ct([0,2,0,0,2,0],2));const l=new D1({uniforms:{tDiffuse:{value:null}},vertexShader:` 3944 precision highp float; 3945 3946 uniform mat4 modelViewMatrix; 3947 uniform mat4 projectionMatrix; 3948 3949 attribute vec3 position; 3950 attribute vec2 uv; 3951 3952 varying vec2 vUv; 3953 3954 void main() { 3955 vUv = uv; 3956 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 3957 }`,fragmentShader:` 3958 precision highp float; 3959 3960 uniform sampler2D tDiffuse; 3961 3962 varying vec2 vUv; 3963 3964 #include <tonemapping_pars_fragment> 3965 #include <colorspace_pars_fragment> 3966 3967 void main() { 3968 gl_FragColor = texture2D( tDiffuse, vUv ); 3969 3970 #ifdef LINEAR_TONE_MAPPING 3971 gl_FragColor.rgb = LinearToneMapping( gl_FragColor.rgb ); 3972 #elif defined( REINHARD_TONE_MAPPING ) 3973 gl_FragColor.rgb = ReinhardToneMapping( gl_FragColor.rgb ); 3974 #elif defined( CINEON_TONE_MAPPING ) 3975 gl_FragColor.rgb = CineonToneMapping( gl_FragColor.rgb ); 3976 #elif defined( ACES_FILMIC_TONE_MAPPING ) 3977 gl_FragColor.rgb = ACESFilmicToneMapping( gl_FragColor.rgb ); 3978 #elif defined( AGX_TONE_MAPPING ) 3979 gl_FragColor.rgb = AgXToneMapping( gl_FragColor.rgb ); 3980 #elif defined( NEUTRAL_TONE_MAPPING ) 3981 gl_FragColor.rgb = NeutralToneMapping( gl_FragColor.rgb ); 3982 #elif defined( CUSTOM_TONE_MAPPING ) 3983 gl_FragColor.rgb = CustomToneMapping( gl_FragColor.rgb ); 3984 #endif 3985 3986 #ifdef SRGB_TRANSFER 3987 gl_FragColor = sRGBTransferOETF( gl_FragColor ); 3988 #endif 3989 }`,depthTest:!1,depthWrite:!1}),c=new Kt(a,l),u=new or(-1,1,1,-1,0,1);let d=null,p=null,m=!1,x,v=null,_=[],g=!1;this.setSize=function(S,b){s.setSize(S,b),o.setSize(S,b);for(let A=0;A<_.length;A++){const w=_[A];w.setSize&&w.setSize(S,b)}},this.setEffects=function(S){_=S,g=_.length>0&&_[0].isRenderPass===!0;const b=s.width,A=s.height;for(let w=0;w<_.length;w++){const C=_[w];C.setSize&&C.setSize(b,A)}},this.begin=function(S,b){if(m||S.toneMapping===zs&&_.length===0)return!1;if(v=b,b!==null){const A=b.width,w=b.height;(s.width!==A||s.height!==w)&&this.setSize(A,w)}return g===!1&&S.setRenderTarget(s),x=S.toneMapping,S.toneMapping=zs,!0},this.hasRenderPass=function(){return g},this.end=function(S,b){S.toneMapping=x,m=!0;let A=s,w=o;for(let C=0;C<_.length;C++){const P=_[C];if(P.enabled!==!1&&(P.render(S,w,A,b),P.needsSwap!==!1)){const B=A;A=w,w=B}}if(d!==S.outputColorSpace||p!==S.toneMapping){d=S.outputColorSpace,p=S.toneMapping,l.defines={},Yt.getTransfer(d)===vn&&(l.defines.SRGB_TRANSFER="");const C=H9[p];C&&(l.defines[C]=""),l.needsUpdate=!0}l.uniforms.tDiffuse.value=A.texture,S.setRenderTarget(v),S.render(c,u),v=null,m=!1},this.isCompositing=function(){return m},this.dispose=function(){s.dispose(),o.dispose(),a.dispose(),l.dispose()}}const sF=new Sn,bM=new $f(1,1),oF=new f1,aF=new h1,lF=new qm,BR=[],DR=[],FR=new Float32Array(16),NR=new Float32Array(9),kR=new Float32Array(4);function fh(i,e,t){const n=i[0];if(n<=0||n>0)return i;const r=e*t;let s=BR[r];if(s===void 0&&(s=new Float32Array(r),BR[r]=s),e!==0){n.toArray(s,0);for(let o=1,a=0;o!==e;++o)a+=t,i[o].toArray(s,a)}return s}function ki(i,e){if(i.length!==e.length)return!1;for(let t=0,n=i.length;t<n;t++)if(i[t]!==e[t])return!1;return!0}function Oi(i,e){for(let t=0,n=e.length;t<n;t++)i[t]=e[t]}function O1(i,e){let t=DR[e];t===void 0&&(t=new Int32Array(e),DR[e]=t);for(let n=0;n!==e;++n)t[n]=i.allocateTextureUnit();return t}function j9(i,e){const t=this.cache;t[0]!==e&&(i.uniform1f(this.addr,e),t[0]=e)}function W9(i,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(i.uniform2f(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(ki(t,e))return;i.uniform2fv(this.addr,e),Oi(t,e)}}function V9(i,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(i.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)&&(i.uniform3f(this.addr,e.r,e.g,e.b),t[0]=e.r,t[1]=e.g,t[2]=e.b);else{if(ki(t,e))return;i.uniform3fv(this.addr,e),Oi(t,e)}}function X9(i,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)&&(i.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(ki(t,e))return;i.uniform4fv(this.addr,e),Oi(t,e)}}function Y9(i,e){const t=this.cache,n=e.elements;if(n===void 0){if(ki(t,e))return;i.uniformMatrix2fv(this.addr,!1,e),Oi(t,e)}else{if(ki(t,n))return;kR.set(n),i.uniformMatrix2fv(this.addr,!1,kR),Oi(t,n)}}function J9(i,e){const t=this.cache,n=e.elements;if(n===void 0){if(ki(t,e))return;i.uniformMatrix3fv(this.addr,!1,e),Oi(t,e)}else{if(ki(t,n))return;NR.set(n),i.uniformMatrix3fv(this.addr,!1,NR),Oi(t,n)}}function K9(i,e){const t=this.cache,n=e.elements;if(n===void 0){if(ki(t,e))return;i.uniformMatrix4fv(this.addr,!1,e),Oi(t,e)}else{if(ki(t,n))return;FR.set(n),i.uniformMatrix4fv(this.addr,!1,FR),Oi(t,n)}}function q9(i,e){const t=this.cache;t[0]!==e&&(i.uniform1i(this.addr,e),t[0]=e)}function Z9(i,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(i.uniform2i(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(ki(t,e))return;i.uniform2iv(this.addr,e),Oi(t,e)}}function Q9(i,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(i.uniform3i(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(ki(t,e))return;i.uniform3iv(this.addr,e),Oi(t,e)}}function $9(i,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)&&(i.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(ki(t,e))return;i.uniform4iv(this.addr,e),Oi(t,e)}}function eW(i,e){const t=this.cache;t[0]!==e&&(i.uniform1ui(this.addr,e),t[0]=e)}function tW(i,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(i.uniform2ui(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(ki(t,e))return;i.uniform2uiv(this.addr,e),Oi(t,e)}}function nW(i,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(i.uniform3ui(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(ki(t,e))return;i.uniform3uiv(this.addr,e),Oi(t,e)}}function iW(i,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)&&(i.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(ki(t,e))return;i.uniform4uiv(this.addr,e),Oi(t,e)}}function rW(i,e,t){const n=this.cache,r=t.allocateTextureUnit();n[0]!==r&&(i.uniform1i(this.addr,r),n[0]=r);let s;this.type===i.SAMPLER_2D_SHADOW?(bM.compareFunction=t.isReversedDepthBuffer()?d1:u1,s=bM):s=sF,t.setTexture2D(e||s,r)}function sW(i,e,t){const n=this.cache,r=t.allocateTextureUnit();n[0]!==r&&(i.uniform1i(this.addr,r),n[0]=r),t.setTexture3D(e||aF,r)}function oW(i,e,t){const n=this.cache,r=t.allocateTextureUnit();n[0]!==r&&(i.uniform1i(this.addr,r),n[0]=r),t.setTextureCube(e||lF,r)}function aW(i,e,t){const n=this.cache,r=t.allocateTextureUnit();n[0]!==r&&(i.uniform1i(this.addr,r),n[0]=r),t.setTexture2DArray(e||oF,r)}function lW(i){switch(i){case 5126:return j9;case 35664:return W9;case 35665:return V9;case 35666:return X9;case 35674:return Y9;case 35675:return J9;case 35676:return K9;case 5124:case 35670:return q9;case 35667:case 35671:return Z9;case 35668:case 35672:return Q9;case 35669:case 35673:return $9;case 5125:return eW;case 36294:return tW;case 36295:return nW;case 36296:return iW;case 35678:case 36198:case 36298:case 36306:case 35682:return rW;case 35679:case 36299:case 36307:return sW;case 35680:case 36300:case 36308:case 36293:return oW;case 36289:case 36303:case 36311:case 36292:return aW}}function cW(i,e){i.uniform1fv(this.addr,e)}function uW(i,e){const t=fh(e,this.size,2);i.uniform2fv(this.addr,t)}function dW(i,e){const t=fh(e,this.size,3);i.uniform3fv(this.addr,t)}function fW(i,e){const t=fh(e,this.size,4);i.uniform4fv(this.addr,t)}function hW(i,e){const t=fh(e,this.size,4);i.uniformMatrix2fv(this.addr,!1,t)}function pW(i,e){const t=fh(e,this.size,9);i.uniformMatrix3fv(this.addr,!1,t)}function mW(i,e){const t=fh(e,this.size,16);i.uniformMatrix4fv(this.addr,!1,t)}function gW(i,e){i.uniform1iv(this.addr,e)}function xW(i,e){i.uniform2iv(this.addr,e)}function vW(i,e){i.uniform3iv(this.addr,e)}function yW(i,e){i.uniform4iv(this.addr,e)}function _W(i,e){i.uniform1uiv(this.addr,e)}function SW(i,e){i.uniform2uiv(this.addr,e)}function bW(i,e){i.uniform3uiv(this.addr,e)}function MW(i,e){i.uniform4uiv(this.addr,e)}function AW(i,e,t){const n=this.cache,r=e.length,s=O1(t,r);ki(n,s)||(i.uniform1iv(this.addr,s),Oi(n,s));let o;this.type===i.SAMPLER_2D_SHADOW?o=bM:o=sF;for(let a=0;a!==r;++a)t.setTexture2D(e[a]||o,s[a])}function wW(i,e,t){const n=this.cache,r=e.length,s=O1(t,r);ki(n,s)||(i.uniform1iv(this.addr,s),Oi(n,s));for(let o=0;o!==r;++o)t.setTexture3D(e[o]||aF,s[o])}function TW(i,e,t){const n=this.cache,r=e.length,s=O1(t,r);ki(n,s)||(i.uniform1iv(this.addr,s),Oi(n,s));for(let o=0;o!==r;++o)t.setTextureCube(e[o]||lF,s[o])}function EW(i,e,t){const n=this.cache,r=e.length,s=O1(t,r);ki(n,s)||(i.uniform1iv(this.addr,s),Oi(n,s));for(let o=0;o!==r;++o)t.setTexture2DArray(e[o]||oF,s[o])}function CW(i){switch(i){case 5126:return cW;case 35664:return uW;case 35665:return dW;case 35666:return fW;case 35674:return hW;case 35675:return pW;case 35676:return mW;case 5124:case 35670:return gW;case 35667:case 35671:return xW;case 35668:case 35672:return vW;case 35669:case 35673:return yW;case 5125:return _W;case 36294:return SW;case 36295:return bW;case 36296:return MW;case 35678:case 36198:case 36298:case 36306:case 35682:return AW;case 35679:case 36299:case 36307:return wW;case 35680:case 36300:case 36308:case 36293:return TW;case 36289:case 36303:case 36311:case 36292:return EW}}class RW{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.setValue=lW(t.type)}}class PW{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=CW(t.type)}}class IW{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,n){const r=this.seq;for(let s=0,o=r.length;s!==o;++s){const a=r[s];a.setValue(e,t[a.id],n)}}}const vS=/(\w+)(\])?(\[|\.)?/g;function OR(i,e){i.seq.push(e),i.map[e.id]=e}function LW(i,e,t){const n=i.name,r=n.length;for(vS.lastIndex=0;;){const s=vS.exec(n),o=vS.lastIndex;let a=s[1];const l=s[2]==="]",c=s[3];if(l&&(a=a|0),c===void 0||c==="["&&o+2===r){OR(t,c===void 0?new RW(a,i,e):new PW(a,i,e));break}else{let d=t.map[a];d===void 0&&(d=new IW(a),OR(t,d)),t=d}}}class Qx{constructor(e,t){this.seq=[],this.map={};const n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let o=0;o<n;++o){const a=e.getActiveUniform(t,o),l=e.getUniformLocation(t,a.name);LW(a,l,this)}const r=[],s=[];for(const o of this.seq)o.type===e.SAMPLER_2D_SHADOW||o.type===e.SAMPLER_CUBE_SHADOW||o.type===e.SAMPLER_2D_ARRAY_SHADOW?r.push(o):s.push(o);r.length>0&&(this.seq=r.concat(s))}setValue(e,t,n,r){const s=this.map[t];s!==void 0&&s.setValue(e,n,r)}setOptional(e,t,n){const r=t[n];r!==void 0&&this.setValue(e,n,r)}static upload(e,t,n,r){for(let s=0,o=t.length;s!==o;++s){const a=t[s],l=n[a.id];l.needsUpdate!==!1&&a.setValue(e,l.value,r)}}static seqWithValue(e,t){const n=[];for(let r=0,s=e.length;r!==s;++r){const o=e[r];o.id in t&&n.push(o)}return n}}function UR(i,e,t){const n=i.createShader(e);return i.shaderSource(n,t),i.compileShader(n),n}const BW=37297;let DW=0;function FW(i,e){const t=i.split(` 3990`),n=[],r=Math.max(e-6,0),s=Math.min(e+6,t.length);for(let o=r;o<s;o++){const a=o+1;n.push(`${a===e?">":" "} ${a}: ${t[o]}`)}return n.join(` 3991`)}const zR=new Nt;function NW(i){Yt._getMatrix(zR,Yt.workingColorSpace,i);const e=`mat3( ${zR.elements.map(t=>t.toFixed(4))} )`;switch(Yt.getTransfer(i)){case Em:return[e,"LinearTransferOETF"];case vn:return[e,"sRGBTransferOETF"];default:return at("WebGLProgram: Unsupported color space: ",i),[e,"LinearTransferOETF"]}}function HR(i,e,t){const n=i.getShaderParameter(e,i.COMPILE_STATUS),s=(i.getShaderInfoLog(e)||"").trim();if(n&&s==="")return"";const o=/ERROR: 0:(\d+)/.exec(s);if(o){const a=parseInt(o[1]);return t.toUpperCase()+` 3992 3993`+s+` 3994 3995`+FW(i.getShaderSource(e),a)}else return s}function kW(i,e){const t=NW(e);return[`vec4 ${i}( vec4 value ) {`,` return ${t[1]}( vec4( value.rgb * ${t[0]}, value.a ) );`,"}"].join(` 3996`)}const OW={[qy]:"Linear",[Zy]:"Reinhard",[Qy]:"Cineon",[Vm]:"ACESFilmic",[e1]:"AgX",[t1]:"Neutral",[$y]:"Custom"};function UW(i,e){const t=OW[e];return t===void 0?(at("WebGLProgram: Unsupported toneMapping:",e),"vec3 "+i+"( vec3 color ) { return LinearToneMapping( color ); }"):"vec3 "+i+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}const px=new H;function zW(){Yt.getLuminanceCoefficients(px);const i=px.x.toFixed(4),e=px.y.toFixed(4),t=px.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",` const vec3 weights = vec3( ${i}, ${e}, ${t} );`," return dot( weights, rgb );","}"].join(` 3997`)}function HW(i){return[i.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",i.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(Sp).join(` 3998`)}function GW(i){const e=[];for(const t in i){const n=i[t];n!==!1&&e.push("#define "+t+" "+n)}return e.join(` 3999`)}function jW(i,e){const t={},n=i.getProgramParameter(e,i.ACTIVE_ATTRIBUTES);for(let r=0;r<n;r++){const s=i.getActiveAttrib(e,r),o=s.name;let a=1;s.type===i.FLOAT_MAT2&&(a=2),s.type===i.FLOAT_MAT3&&(a=3),s.type===i.FLOAT_MAT4&&(a=4),t[o]={type:s.type,location:i.getAttribLocation(e,o),locationSize:a}}return t}function Sp(i){return i!==""}function GR(i,e){const t=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return i.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 jR(i,e){return i.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const WW=/^[ \t]*#include +<([\w\d./]+)>/gm;function MM(i){return i.replace(WW,XW)}const VW=new Map;function XW(i,e){let t=Ot[e];if(t===void 0){const n=VW.get(e);if(n!==void 0)t=Ot[n],at('WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,n);else throw new Error("Can not resolve #include <"+e+">")}return MM(t)}const YW=/#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 WR(i){return i.replace(YW,JW)}function JW(i,e,t,n){let r="";for(let s=parseInt(e);s<parseInt(t);s++)r+=n.replace(/\[\s*i\s*\]/g,"[ "+s+" ]").replace(/UNROLLED_LOOP_INDEX/g,s);return r}function VR(i){let e=`precision ${i.precision} float; 4000 precision ${i.precision} int; 4001 precision ${i.precision} sampler2D; 4002 precision ${i.precision} samplerCube; 4003 precision ${i.precision} sampler3D; 4004 precision ${i.precision} sampler2DArray; 4005 precision ${i.precision} sampler2DShadow; 4006 precision ${i.precision} samplerCubeShadow; 4007 precision ${i.precision} sampler2DArrayShadow; 4008 precision ${i.precision} isampler2D; 4009 precision ${i.precision} isampler3D; 4010 precision ${i.precision} isamplerCube; 4011 precision ${i.precision} isampler2DArray; 4012 precision ${i.precision} usampler2D; 4013 precision ${i.precision} usampler3D; 4014 precision ${i.precision} usamplerCube; 4015 precision ${i.precision} usampler2DArray; 4016 `;return i.precision==="highp"?e+=` 4017#define HIGH_PRECISION`:i.precision==="mediump"?e+=` 4018#define MEDIUM_PRECISION`:i.precision==="lowp"&&(e+=` 4019#define LOW_PRECISION`),e}const KW={[Rf]:"SHADOWMAP_TYPE_PCF",[xu]:"SHADOWMAP_TYPE_VSM"};function qW(i){return KW[i.shadowMapType]||"SHADOWMAP_TYPE_BASIC"}const ZW={[Sa]:"ENVMAP_TYPE_CUBE",[xc]:"ENVMAP_TYPE_CUBE",[ah]:"ENVMAP_TYPE_CUBE_UV"};function QW(i){return i.envMap===!1?"ENVMAP_TYPE_CUBE":ZW[i.envMapMode]||"ENVMAP_TYPE_CUBE"}const $W={[xc]:"ENVMAP_MODE_REFRACTION"};function eV(i){return i.envMap===!1?"ENVMAP_MODE_REFLECTION":$W[i.envMapMode]||"ENVMAP_MODE_REFLECTION"}const tV={[Wm]:"ENVMAP_BLENDING_MULTIPLY",[QB]:"ENVMAP_BLENDING_MIX",[$B]:"ENVMAP_BLENDING_ADD"};function nV(i){return i.envMap===!1?"ENVMAP_BLENDING_NONE":tV[i.combine]||"ENVMAP_BLENDING_NONE"}function iV(i){const e=i.envMapCubeUVHeight;if(e===null)return null;const t=Math.log2(e)-2,n=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,t),7*16)),texelHeight:n,maxMip:t}}function rV(i,e,t,n){const r=i.getContext(),s=t.defines;let o=t.vertexShader,a=t.fragmentShader;const l=qW(t),c=QW(t),u=eV(t),d=nV(t),p=iV(t),m=HW(t),x=GW(s),v=r.createProgram();let _,g,S=t.glslVersion?"#version "+t.glslVersion+` 4020`:"";t.isRawShaderMaterial?(_=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,x].filter(Sp).join(` 4021`),_.length>0&&(_+=` 4022`),g=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,x].filter(Sp).join(` 4023`),g.length>0&&(g+=` 4024`)):(_=[VR(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,x,t.extensionCl
vendor: 6,474 bytes, lines 4024-4026
4024ipCullDistance?"#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 "+u:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+t.anisotropyMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphColors?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.logarithmicDepthBuffer?"#define USE_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",` 4025`].filter(Sp).join(` 4026`),g=[VR(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,x,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 "+c:"",t.envMap?"#define "+u:"",t.envMap?"#define "+d:"",p?"#define CUBEUV_TEXEL_WIDTH "+p.texelWidth:"",p?"#define CUBEUV_TEXEL_HEIGHT "+p.texelHeight:"",p?"#define CUBEUV_MAX_MIP "+p.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.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
4026IDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor||t.batchingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",t.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",t.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==zs?"#define TONE_MAPPING":"",t.toneMapping!==zs?Ot.tonemapping_pars_fragment:"",t.toneMapping!==zs?UW("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",Ot.colorspace_pars_fragment,kW("linearToOutputTexel",t.outputColorSpace),zW(),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` 4027`].filter(Sp).join(` 4028`)),o=MM(o),o=GR(o,t),o=jR(o,t),a=MM(a),a=GR(a,t),a=jR(a,t),o=WR(o),a=WR(a),t.isRawShaderMaterial!==!0&&(S=`#version 300 es 4029`,_=[m,"#define attribute in","#define varying out","#define texture2D texture"].join(` 4030`)+` 4031`+_,g=["#define varying in",t.glslVersion===pM?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===pM?"":"#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(` 4032`)+` 4033`+g);const b=S+_+o,A=S+g+a,w=UR(r,r.VERTEX_SHADER,b),C=UR(r,r.FRAGMENT_SHADER,A);r.attachShader(v,w),r.attachShader(v,C),t.index0AttributeName!==void 0?r.bindAttribLocation(v,0,t.index0AttributeName):t.morphTargets===!0&&r.bindAttribLocation(v,0,"position"),r.linkProgram(v);function P(L){if(i.debug.checkShaderErrors){const N=r.getProgramInfoLog(v)||"",k=r.getShaderInfoLog(w)||"",Y=r.getShaderInfoLog(C)||"",z=N.trim(),W=k.trim(),V=Y.trim();let G=!0,Z=!0;if(r.getProgramParameter(v,r.LINK_STATUS)===!1)if(G=!1,typeof i.debug.onShaderError=="function")i.debug.onShaderError(r,v,w,C);else{const O=HR(r,w,"vertex"),ee=HR(r,C,"fragment");bt("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(v,r.VALIDATE_STATUS)+` 4034 4035Material Name: `+L.name+` 4036Material Type: `+L.type+` 4037 4038Program Info Log: `+z+` 4039`+O+` 4040`+ee)}else z!==""?at("WebGLProgram: Program Info Log:",z):(W===""||V==="")&&(Z=!1);Z&&(L.diagnostics={runnable:G,programLog:z,vertexShader:{log:W,prefix:_},fragmentShader:{log:V,prefix:g}})}r.deleteShader(w),r.deleteShader(C),B=new Qx(r,v),R=jW(r,v)}let B;this.getUniforms=function(){return B===void 0&&P(this),B};let R;this.getAttributes=function(){return R===void 0&&P(this),R};let E=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return E===!1&&(E=r.getProgramParameter(v,BW)),E},this.destroy=function(){n.releaseStatesOfProgram(this),r.deleteProgram(v),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=DW++,this.cacheKey=e,this.usedTimes=1,this.program=v,this.vertexShader=w,this.fragmentShader=C,this}let sV=0;class oV{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,n=e.fragmentShader,r=this._getShaderStage(t),s=this._getShaderStage(n),o=this._getShaderCacheForMaterial(e);return o.has(r)===!1&&(o.add(r),r.usedTimes++),o.has(s)===!1&&(o.add(s),s.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const n of t)n.usedTimes--,n.usedTimes===0&&this.shaderCache.delete(n.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 n=t.get(e);return n===void 0&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){const t=this.shaderCache;let n=t.get(e);return n===void 0&&(n=new aV(e),t.set(e,n)),n}}class aV{constructor(e){this.id=sV++,this.code=e,this.usedTimes=0}}function lV(i,e,t,n,r,s,o){const a=new cc,l=new oV,c=new Set,u=[],d=new Map,p=r.logarithmicDepthBuffer;let m=r.precision;const x={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 v(R){return c.add(R),R===0?"uv":`uv${R}`}function _(R,E,L,N,k){const Y=N.fog,z=k.geometry,W=R.isMeshStandardMaterial?N.environment:null,V=(R.isMeshStandardMaterial?t:e).get(R.envMap||W),G=V&&V.mapping===ah?V.image.height:null,Z=x[R.type];R.precision!==null&&(m=r.getMaxPrecision(R.precision),m!==R.precision&&at("WebGLProgram.getParameters:",R.precision,"not supported, using",m,"instead."));const O=z.morphAttributes.position||z.morphAttributes.normal||z.morphAttributes.color,ee=O!==void 0?O.length:0;let le=0;z.morphAttributes.position!==void 0&&(le=1),z.morphAttributes.normal!==void 0&&(le=2),z.morphAttributes.color!==void 0&&(le=3);let ge,Se,Ye,K;if(Z){const Qe=Uo[Z];ge=Qe.vertexShader,Se=Qe.fragmentShader}else ge=R.vertexShader,Se=R.fragmentShader,l.update(R),Ye=l.getVertexShaderID(R),K=l.getFragmentShaderID(R);const q=i.getRenderTarget(),re=i.state.buffers.depth.getReversed(),Ce=k.isInstancedMesh===!0,Te=k.isBatchedMesh===!0,De=!!R.map,tt=!!R.matcap,Pe=!!V,me=!!R.aoMap,Ee=!!R.lightMap,be=!!R.bumpMap,$=!!R.normalMap,J=!!R.displacementMap,Ue=!!R.emissiveMap,Ne=!!R.metalnessMap,ke=!!R.roughnessMap,Ae=R.anisotropy>0,U=R.clearcoat>0,F=R.dispersion>0,ne=R.iridescence>0,se=R.sheen>0,he=R.transmission>0,de=Ae&&!!R.anisotropyMap,ze=U&&!!R.clearcoatMap,Be=U&&!!R.clearcoatNormalMap,Ke=U&&!!R.clearcoatRoughnessMap,$e=ne&&!!R.iridescenceMap,Fe=ne&&!!R.iridescenceThicknessMap,Xe=se&&!!R.sheenColorMap,it=se&&!!R.sheenRoughnessMap,ie=!!R.specularMap,fe=!!R.specularColorMap,He=!!R.specularIntensityMap,Q=he&&!!R.transmissionMap,je=he&&!!R.thicknessMap,Re=!!R.gradientMap,Ge=!!R.alphaMap,Le=R.alphaTest>0,Me=!!R.alphaHash,Oe=!!R.extensions;let lt=zs;R.toneMapped&&(q===null||q.isXRRenderTarget===!0)&&(lt=i.toneMapping);const Pt={shaderID:Z,shaderType:R.type,shaderName:R.name,vertexShader:ge,fragmentShader:Se,defines:R.defines,customVertexShaderID:Ye,customFragmentShaderID:K,isRawShaderMaterial:R.isRawShaderMaterial===!0,glslVersion:R.glslVersion,precision:m,batching:Te,batchingColor:Te&&k._colorsTexture!==null,instancing:Ce,instancingColor:Ce&&k.instanceColor!==null,instancingMorph:Ce&&k.morphTexture!==null,outputColorSpace:q
vendor: 31,002 bytes, lines 4040-4067
4040===null?i.outputColorSpace:q.isXRRenderTarget===!0?q.texture.colorSpace:Tr,alphaToCoverage:!!R.alphaToCoverage,map:De,matcap:tt,envMap:Pe,envMapMode:Pe&&V.mapping,envMapCubeUVHeight:G,aoMap:me,lightMap:Ee,bumpMap:be,normalMap:$,displacementMap:J,emissiveMap:Ue,normalMapObjectSpace:$&&R.normalMapType===rD,normalMapTangentSpace:$&&R.normalMapType===wc,metalnessMap:Ne,roughnessMap:ke,anisotropy:Ae,anisotropyMap:de,clearcoat:U,clearcoatMap:ze,clearcoatNormalMap:Be,clearcoatRoughnessMap:Ke,dispersion:F,iridescence:ne,iridescenceMap:$e,iridescenceThicknessMap:Fe,sheen:se,sheenColorMap:Xe,sheenRoughnessMap:it,specularMap:ie,specularColorMap:fe,specularIntensityMap:He,transmission:he,transmissionMap:Q,thicknessMap:je,gradientMap:Re,opaque:R.transparent===!1&&R.blending===lc&&R.alphaToCoverage===!1,alphaMap:Ge,alphaTest:Le,alphaHash:Me,combine:R.combine,mapUv:De&&v(R.map.channel),aoMapUv:me&&v(R.aoMap.channel),lightMapUv:Ee&&v(R.lightMap.channel),bumpMapUv:be&&v(R.bumpMap.channel),normalMapUv:$&&v(R.normalMap.channel),displacementMapUv:J&&v(R.displacementMap.channel),emissiveMapUv:Ue&&v(R.emissiveMap.channel),metalnessMapUv:Ne&&v(R.metalnessMap.channel),roughnessMapUv:ke&&v(R.roughnessMap.channel),anisotropyMapUv:de&&v(R.anisotropyMap.channel),clearcoatMapUv:ze&&v(R.clearcoatMap.channel),clearcoatNormalMapUv:Be&&v(R.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ke&&v(R.clearcoatRoughnessMap.channel),iridescenceMapUv:$e&&v(R.iridescenceMap.channel),iridescenceThicknessMapUv:Fe&&v(R.iridescenceThicknessMap.channel),sheenColorMapUv:Xe&&v(R.sheenColorMap.channel),sheenRoughnessMapUv:it&&v(R.sheenRoughnessMap.channel),specularMapUv:ie&&v(R.specularMap.channel),specularColorMapUv:fe&&v(R.specularColorMap.channel),specularIntensityMapUv:He&&v(R.specularIntensityMap.channel),transmissionMapUv:Q&&v(R.transmissionMap.channel),thicknessMapUv:je&&v(R.thicknessMap.channel),alphaMapUv:Ge&&v(R.alphaMap.channel),vertexTangents:!!z.attributes.tangent&&($||Ae),vertexColors:R.vertexColors,vertexAlphas:R.vertexColors===!0&&!!z.attributes.color&&z.attributes.color.itemSize===4,pointsUvs:k.isPoints===!0&&!!z.attributes.uv&&(De||Ge),fog:!!Y,useFog:R.fog===!0,fogExp2:!!Y&&Y.isFogExp2,flatShading:R.flatShading===!0&&R.wireframe===!1,sizeAttenuation:R.sizeAttenuation===!0,logarithmicDepthBuffer:p,reversedDepthBuffer:re,skinning:k.isSkinnedMesh===!0,morphTargets:z.morphAttributes.position!==void 0,morphNormals:z.morphAttributes.normal!==void 0,morphColors:z.morphAttributes.color!==void 0,morphTargetsCount:ee,morphTextureStride:le,numDirLights:E.directional.length,numPointLights:E.point.length,numSpotLights:E.spot.length,numSpotLightMaps:E.spotLightMap.length,numRectAreaLights:E.rectArea.length,numHemiLights:E.hemi.length,numDirLightShadows:E.directionalShadowMap.length,numPointLightShadows:E.pointShadowMap.length,numSpotLightShadows:E.spotShadowMap.length,numSpotLightShadowsWithMaps:E.numSpotLightShadowsWithMaps,numLightProbes:E.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:R.dithering,shadowMapEnabled:i.shadowMap.enabled&&L.length>0,shadowMapType:i.shadowMap.type,toneMapping:lt,decodeVideoTexture:De&&R.map.isVideoTexture===!0&&Yt.getTransfer(R.map.colorSpace)===vn,decodeVideoTextureEmissive:Ue&&R.emissiveMap.isVideoTexture===!0&&Yt.getTransfer(R.emissiveMap.colorSpace)===vn,premultipliedAlpha:R.premultipliedAlpha,doubleSided:R.side===Di,flipSided:R.side===Jr,useDepthPacking:R.depthPacking>=0,depthPacking:R.depthPacking||0,index0AttributeName:R.index0AttributeName,extensionClipCullDistance:Oe&&R.extensions.clipCullDistance===!0&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(Oe&&R.extensions.multiDraw===!0||Te)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:R.customProgramCacheKey()};return Pt.vertexUv1s=c.has(1),Pt.vertexUv2s=c.has(2),Pt.vertexUv3s=c.has(3),c.clear(),Pt}function g(R){const E=[];if(R.shaderID?E.push(R.shaderID):(E.push(R.customVertexShaderID),E.push(R.customFragmentShaderID)),R.defines!==void 0)for(const L in R.defines)E.push(L),E.push(R.defines[L]);return R.isRawShaderMaterial===!1&&(S(E,R),b(E,R),E.push(i.outputColorSpace)),E.push(R.customProgramCacheKey),E.join()}function S(R,E){R.push(E.precision),R.push(E.outputColorSpace),R.push(E.envMapMode),R.push(E.envMapCubeUVHeight),R.push(E.mapUv),R.push(E.alphaMapUv),R.push(E.lightMapUv),R.push(E.aoMapUv),R.push(E.bumpMapUv),R.push(E.normalMapUv),R.push(E.displacementMapUv),R.push(E.emissiveMapUv),R.push(E.metalnessMapUv),R.push(E.roughnessMapUv),R.push(E.anisotropyMapUv),R.push(E.clearcoatMapUv),R.push(E.clearcoatNormalMapUv),R.push(E.clearcoatRoughnessMapUv),R.push(E.iridescenceMapUv),R.push(E.iridescenceThicknessMapUv),R.push(E.sheenColorMapUv),R.push(E.sheenRoughnessMapUv),R.push(E.specularMapUv),R.push(E.specularColorMapUv),R.push(E.specularIntensityMapUv),R.push(E.transmissionMapUv),R.push(E.thicknessMapUv),R.push(E.combine),R.push(E.fogExp2),R.push(E.sizeAttenuation),R.push(E.morphTargetsCount),R.push(E.morphAttributeCount),R.push(E.numDirLights),R.push(E.numPointLights),R.push(E.numSpotLights),R.push(E.numSpotLightMaps),R.push(E.numHemiLights),R.push(E.numRectAreaLights),R.push(E.numDirLightShadows),R.push(E.numPointLightShadows),R.push(E.numSpotLightShadows),R.push(E.numSpotLightShadowsWithMaps),R.push(E.numLightProbes),R.push(E.shadowMapType),R.push(E.toneMapping),R.push(E.numClippingPlanes),R.push(E.numClipIntersection),R.push(E.depthPacking)}function b(R,E){a.disableAll(),E.instancing&&a.enable(0),E.instancingColor&&a.enable(1),E.instancingMorph&&a.enable(2),E.matcap&&a.enable(3),E.envMap&&a.enable(4),E.normalMapObjectSpace&&a.enable(5),E.normalMapTangentSpace&&a.enable(6),E.clearcoat&&a.enable(7),E.iridescence&&a.enable(8),E.alphaTest&&a.enable(9),E.vertexColors&&a.enable(10),E.vertexAlphas&&a.enable(11),E.vertexUv1s&&a.enable(12),E.vertexUv2s&&a.enable(13),E.vertexUv3s&&a.enable(14),E.vertexTangents&&a.enable(15),E.anisotropy&&a.enable(16),E.alphaHash&&a.enable(17),E.batching&&a.enable(18),E.dispersion&&a.enable(19),E.batchingColor&&a.enable(20),E.gradientMap&&a.enable(21),R.push(a.mask),a.disableAll(),E.fog&&a.enable(0),E.useFog&&a.enable(1),E.flatShading&&a.enable(2),E.logarithmicDepthBuffer&&a.enable(3),E.reversedDepthBuffer&&a.enable(4),E.skinning&&a.enable(5),E.morphTargets&&a.enable(6),E.morphNormals&&a.enable(7),E.morphColors&&a.enable(8),E.premultipliedAlpha&&a.enable(9),E.shadowMapEnabled&&a.enable(10),E.doubleSided&&a.enable(11),E.flipSided&&a.enable(12),E.useDepthPacking&&a.enable(13),E.dithering&&a.enable(14),E.transmission&&a.enable(15),E.sheen&&a.enable(16),E.opaque&&a.enable(17),E.pointsUvs&&a.enable(18),E.decodeVideoTexture&&a.enable(19),E.decodeVideoTextureEmissive&&a.enable(20),E.alphaToCoverage&&a.enable(21),R.push(a.mask)}function A(R){const E=x[R.type];let L;if(E){const N=Uo[E];L=Gs.clone(N.uniforms)}else L=R.uniforms;return L}function w(R,E){let L=d.get(E);return L!==void 0?++L.usedTimes:(L=new rV(i,E,R,s),u.push(L),d.set(E,L)),L}function C(R){if(--R.usedTimes===0){const E=u.indexOf(R);u[E]=u[u.length-1],u.pop(),d.delete(R.cacheKey),R.destroy()}}function P(R){l.remove(R)}function B(){l.dispose()}return{getParameters:_,getProgramCacheKey:g,getUniforms:A,acquireProgram:w,releaseProgram:C,releaseShaderCache:P,programs:u,dispose:B}}function cV(){let i=new WeakMap;function e(o){return i.has(o)}function t(o){let a=i.get(o);return a===void 0&&(a={},i.set(o,a)),a}function n(o){i.delete(o)}function r(o,a,l){i.get(o)[a]=l}function s(){i=new WeakMap}return{has:e,get:t,remove:n,update:r,dispose:s}}function uV(i,e){return i.groupOrder!==e.groupOrder?i.groupOrder-e.groupOrder:i.renderOrder!==e.renderOrder?i.renderOrder-e.renderOrder:i.material.id!==e.material.id?i.material.id-e.material.id:i.z!==e.z?i.z-e.z:i.id-e.id}function XR(i,e){return i.groupOrder!==e.groupOrder?i.groupOrder-e.groupOrder:i.renderOrder!==e.renderOrder?i.renderOrder-e.renderOrder:i.z!==e.z?e.z-i.z:i.id-e.id}function YR(){const i=[];let e=0;const t=[],n=[],r=[];function s(){e=0,t.length=0,n.length=0,r.length=0}function o(d,p,m,x,v,_){let g=i[e];return g===void 0?(g={id:d.id,object:d,geometry:p,material:m,groupOrder:x,renderOrder:d.renderOrder,z:v,group:_},i[e]=g):(g.id=d.id,g.object=d,g.geometry=p,g.material=m,g.groupOrder=x,g.renderOrder=d.renderOrder,g.z=v,g.group=_),e++,g}function a(d,p,m,x,v,_){const g=o(d,p,m,x,v,_);m.transmission>0?n.push(g):m.transparent===!0?r.push(g):t.push(g)}function l(d,p,m,x,v,_){const g=o(d,p,m,x,v,_);m.transmission>0?n.unshift(g):m.transparent===!0?r.unshift(g):t.unshift(g)}function c(d,p){t.length>1&&t.sort(d||uV),n.length>1&&n.sort(p||XR),r.length>1&&r.sort(p||XR)}function u(){for(let d=e,p=i.length;d<p;d++){const m=i[d];if(m.id===null)break;m.id=null,m.object=null,m.geometry=null,m.material=null,m.group=null}}return{opaque:t,transmissive:n,transparent:r,init:s,push:a,unshift:l,finish:u,sort:c}}function dV(){let i=new WeakMap;function e(n,r){const s=i.get(n);let o;return s===void 0?(o=new YR,i.set(n,[o])):r>=s.length?(o=new YR,s.push(o)):o=s[r],o}function t(){i=new WeakMap}return{get:e,dispose:t}}function fV(){const i={};return{get:function(e){if(i[e.id]!==void 0)return i[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new H,color:new Ve};break;case"SpotLight":t={position:new H,direction:new H,color:new Ve,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new H,color:new Ve,distance:0,decay:0};break;case"HemisphereLight":t={direction:new H,skyColor:new Ve,groundColor:new Ve};break;case"RectAreaLight":t={color:new Ve,position:new H,halfWidth:new H,halfHeight:new H};break}return i[e.id]=t,t}}}function hV(){const i={};return{get:function(e){if(i[e.id]!==void 0)return i[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe,shadowCameraNear:1,shadowCameraFar:1e3};break}return i[e.id]=t,t}}}let pV=0;function mV(i,e){return(e.castShadow?2:0)-(i.castShadow?2:0)+(e.map?1:0)-(i.map?1:0)}function gV(i){const e=new fV,t=hV(),n={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 c=0;c<9;c++)n.probe.push(new H);const r=new H,s=new _t,o=new _t;function a(c){let u=0,d=0,p=0;for(let R=0;R<9;R++)n.probe[R].set(0,0,0);let m=0,x=0,v=0,_=0,g=0,S=0,b=0,A=0,w=0,C=0,P=0;c.sort(mV);for(let R=0,E=c.length;R<E;R++){const L=c[R],N=L.color,k=L.intensity,Y=L.distance;let z=null;if(L.shadow&&L.shadow.map&&(L.shadow.map.texture.format===Xu?z=L.shadow.map.texture:z=L.shadow.map.depthTexture||L.shadow.map.texture),L.isAmbientLight)u+=N.r*k,d+=N.g*k,p+=N.b*k;else if(L.isLightProbe){for(let W=0;W<9;W++)n.probe[W].addScaledVector(L.sh.coefficients[W],k);P++}else if(L.isDirectionalLight){const W=e.get(L);if(W.color.copy(L.color).multiplyScalar(L.intensity),L.castShadow){const V=L.shadow,G=t.get(L);G.shadowIntensity=V.intensity,G.shadowBias=V.bias,G.shadowNormalBias=V.normalBias,G.shadowRadius=V.radius,G.shadowMapSize=V.mapSize,n.directionalShadow[m]=G,n.directionalShadowMap[m]=z,n.directionalShadowMatrix[m]=L.shadow.matrix,S++}n.directional[m]=W,m++}else if(L.isSpotLight){const W=e.get(L);W.position.setFromMatrixPosition(L.matrixWorld),W.color.copy(N).multiplyScalar(k),W.distance=Y,W.coneCos=Math.cos(L.angle),W.penumbraCos=Math.cos(L.angle*(1-L.penumbra)),W.decay=L.decay,n.spot[v]=W;const V=L.shadow;if(L.map&&(n.spotLightMap[w]=L.map,w++,V.updateMatrices(L),L.castShadow&&C++),n.spotLightMatrix[v]=V.matrix,L.castShadow){const G=t.get(L);G.shadowIntensity=V.intensity,G.shadowBias=V.bias,G.shadowNormalBias=V.normalBias,G.shadowRadius=V.radius,G.shadowMapSize=V.mapSize,n.spotShadow[v]=G,n.spotShadowMap[v]=z,A++}v++}else if(L.isRectAreaLight){const W=e.get(L);W.color.copy(N).multiplyScalar(k),W.halfWidth.set(L.width*.5,0,0),W.halfHeight.set(0,L.height*.5,0),n.rectArea[_]=W,_++}else if(L.isPointLight){const W=e.get(L);if(W.color.copy(L.color).multiplyScalar(L.intensity),W.distance=L.distance,W.decay=L.decay,L.castShadow){const V=L.shadow,G=t.get(L);G.shadowIntensity=V.intensity,G.shadowBias=V.bias,G.shadowNormalBias=V.normalBias,G.shadowRadius=V.radius,G.shadowMapSize=V.mapSize,G.shadowCameraNear=V.camera.near,G.shadowCameraFar=V.camera.far,n.pointShadow[x]=G,n.pointShadowMap[x]=z,n.pointShadowMatrix[x]=L.shadow.matrix,b++}n.point[x]=W,x++}else if(L.isHemisphereLight){const W=e.get(L);W.skyColor.copy(L.color).multiplyScalar(k),W.groundColor.copy(L.groundColor).multiplyScalar(k),n.hemi[g]=W,g++}}_>0&&(i.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=ot.LTC_FLOAT_1,n.rectAreaLTC2=ot.LTC_FLOAT_2):(n.rectAreaLTC1=ot.LTC_HALF_1,n.rectAreaLTC2=ot.LTC_HALF_2)),n.ambient[0]=u,n.ambient[1]=d,n.ambient[2]=p;const B=n.hash;(B.directionalLength!==m||B.pointLength!==x||B.spotLength!==v||B.rectAreaLength!==_||B.hemiLength!==g||B.numDirectionalShadows!==S||B.numPointShadows!==b||B.numSpotShadows!==A||B.numSpotMaps!==w||B.numLightProbes!==P)&&(n.directional.length=m,n.spot.length=v,n.rectArea.length=_,n.point.length=x,n.hemi.length=g,n.directionalShadow.length=S,n.directionalShadowMap.length=S,n.pointShadow.length=b,n.pointShadowMap.length=b,n.spotShadow.length=A,n.spotShadowMap.length=A,n.directionalShadowMatrix.length=S,n.pointShadowMatrix.length=b,n.spotLightMatrix.length=A+w-C,n.spotLightMap.length=w,n.numSpotLightShadowsWithMaps=C,n.numLightProbes=P,B.directionalLength=m,B.pointLength=x,B.spotLength=v,B.rectAreaLength=_,B.hemiLength=g,B.numDirectionalShadows=S,B.numPointShadows=b,B.numSpotShadows=A,B.numSpotMaps=w,B.numLightProbes=P,n.version=pV++)}function l(c,u){let d=0,p=0,m=0,x=0,v=0;const _=u.matrixWorldInverse;for(let g=0,S=c.length;g<S;g++){const b=c[g];if(b.isDirectionalLight){const A=n.directional[d];A.direction.setFromMatrixPosition(b.matrixWorld),r.setFromMatrixPosition(b.target.matrixWorld),A.direction.sub(r),A.direction.transformDirection(_),d++}else if(b.isSpotLight){const A=n.spot[m];A.position.setFromMatrixPosition(b.matrixWorld),A.position.applyMatrix4(_),A.direction.setFromMatrixPosition(b.matrixWorld),r.setFromMatrixPosition(b.target.matrixWorld),A.direction.sub(r),A.direction.transformDirection(_),m++}else if(b.isRectAreaLight){const A=n.rectArea[x];A.position.setFromMatrixPosition(b.matrixWorld),A.position.applyMatrix4(_),o.identity(),s.copy(b.matrixWorld),s.premultiply(_),o.extractRotation(s),A.halfWidth.set(b.width*.5,0,0),A.halfHeight.set(0,b.height*.5,0),A.halfWidth.applyMatrix4(o),A.halfHeight.applyMatrix4(o),x++}else if(b.isPointLight){const A=n.point[p];A.position.setFromMatrixPosition(b.matrixWorld),A.position.applyMatrix4(_),p++}else if(b.isHemisphereLight){const A=n.hemi[v];A.direction.setFromMatrixPosition(b.matrixWorld),A.direction.transformDirection(_),v++}}}return{setup:a,setupView:l,state:n}}function JR(i){const e=new gV(i),t=[],n=[];function r(u){c.camera=u,t.length=0,n.length=0}function s(u){t.push(u)}function o(u){n.push(u)}function a(){e.setup(t)}function l(u){e.setupView(t,u)}const c={lightsArray:t,shadowsArray:n,camera:null,lights:e,transmissionRenderTarget:{}};return{init:r,state:c,setupLights:a,setupLightsView:l,pushLight:s,pushShadow:o}}function xV(i){let e=new WeakMap;function t(r,s=0){const o=e.get(r);let a;return o===void 0?(a=new JR(i),e.set(r,[a])):s>=o.length?(a=new JR(i),o.push(a)):a=o[s],a}function n(){e=new WeakMap}return{get:t,dispose:n}}const vV=`void main() { 4041 gl_Position = vec4( position, 1.0 ); 4042}`,yV=`uniform sampler2D shadow_pass; 4043uniform vec2 resolution; 4044uniform float radius; 4045void main() { 4046 const float samples = float( VSM_SAMPLES ); 4047 float mean = 0.0; 4048 float squared_mean = 0.0; 4049 float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); 4050 float uvStart = samples <= 1.0 ? 0.0 : - 1.0; 4051 for ( float i = 0.0; i < samples; i ++ ) { 4052 float uvOffset = uvStart + i * uvStride; 4053 #ifdef HORIZONTAL_PASS 4054 vec2 distribution = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ).rg; 4055 mean += distribution.x; 4056 squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; 4057 #else 4058 float depth = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ).r; 4059 mean += depth; 4060 squared_mean += depth * depth; 4061 #endif 4062 } 4063 mean = mean / samples; 4064 squared_mean = squared_mean / samples; 4065 float std_dev = sqrt( max( 0.0, squared_mean - mean * mean ) ); 4066 gl_FragColor = vec4( mean, std_dev, 0.0, 1.0 ); 4067}`,_V=[new H(1,0,0),new H(-1,0,0),new H(0,1,0),new H(0,-1,0),new H(0,0,1),new H(0,0,-1)],SV=[new H(0,-1,0),new H(0,-1,0),new H(0,0,1),new H(0,0,-1),new H(0,-1,0),new H(0,-1,0)],KR=new _t,np=new H,yS=new H;function bV(i,e,t){let n=new uh;const r=new xe,s=new xe,o=new on,a=new Ew,l=new Cw,c={},u=t.maxTextureSize,d={[So]:Jr,[Jr]:So,[Di]:Di},p=new dn({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new xe},radius:{value:4}},vertexShader:vV,fragmentShader:yV}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const x=new Rt;x.setAttribute("position",new zt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const v=new Kt(x,p),_=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Rf;let g=this.type;this.render=function(C,P,B){if(_.enabled===!1||_.autoUpdate===!1&&_.needsUpdate===!1||C.length===0)return;C.type===Wp&&(at("WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead."),C.type=Rf);const R=i.getRenderTarget(),E=i.getActiveCubeFace(),L=i.getActiveMipmapLevel(),N=i.state;N.setBlending(jo),N.buffers.depth.getReversed()===!0?N.buffers.color.setClear(0,0,0,0):N.buffers.color.setClear(1,1,1,1),N.buffers.depth.setTest(!0),N.setScissorTest(!1);const k=g!==this.type;k&&P.traverse(function(Y){Y.material&&(Array.isArray(Y.material)?Y.material.forEach(z=>z.needsUpdate=!0):Y.material.needsUpdate=!0)});for(let Y=0,z=C.length;Y<z;Y++){const W=C[Y],V=W.shadow;if(V===void 0){at("WebGLShadowMap:",W,"has no shadow.");continue}if(V.autoUpdate===!1&&V.needsUpdate===!1)continue;r.copy(V.mapSize);const G=V.getFrameExtents();if(r.multiply(G),s.copy(V.mapSize),(r.x>u||r.y>u)&&(r.x>u&&(s.x=Math.floor(u/G.x),r.x=s.x*G.x,V.mapSize.x=s.x),r.y>u&&(s.y=Math.floor(u/G.y),r.y=s.y*G.y,V.mapSize.y=s.y)),V.map===null||k===!0){if(V.map!==null&&(V.map.depthTexture!==null&&(V.map.depthTexture.dispose(),V.map.depthTexture=null),V.map.dispose()),this.type===xu){if(W.isPointLight){at("WebGLShadowMap: VSM shadow maps are not supported for PointLights. Use PCF or BasicShadowMap instead.");continue}V.map=new Gn(r.x,r.y,{format:Xu,type:sr,minFilter:jt,magFilter:jt,generateMipmaps:!1}),V.map.texture.name=W.name+".shadowMap",V.map.depthTexture=new $f(r.x,r.y,Vr),V.map.depthTexture.name=W.name+".shadowMapDepth",V.map.depthTexture.format=ba,V.map.depthTexture.compareFunction=null,V.map.depthTexture.minFilter=Bn,V.map.depthTexture.magFilter=Bn}else{W.isPointLight?(V.map=new mw(r.x),V.map.depthTexture=new MD(r.x,Mo)):(V.map=new Gn(r.x,r.y),V.map.depthTexture=new $f(r.x,r.y,Mo)),V.map.depthTexture.name=W.name+".shadowMap",V.map.depthTexture.format=ba;const O=i.state.buffers.depth.getReversed();this.type===Rf?(V.map.depthTexture.compareFunction=O?d1:u1,V.map.depthTexture.minFilter=jt,V.map.depthTexture.magFilter=jt):(V.map.depthTexture.compareFunction=null,V.map.depthTexture.minFilter=Bn,V.map.depthTexture.magFilter=Bn)}V.camera.updateProjectionMatrix()}const Z=V.map.isWebGLCubeRenderTarget?6:1;for(let O=0;O<Z;O++){if(V.map.isWebGLCubeRenderTarget)i.setRenderTarget(V.map,O),i.clear();else{O===0&&(i.setRenderTarget(V.map),i.clear());const ee=V.getViewport(O);o.set(s.x*ee.x,s.y*ee.y,s.x*ee.z,s.y*ee.w),N.viewport(o)}if(W.isPointLight){const ee=V.camera,le=V.matrix,ge=W.distance||ee.far;ge!==ee.far&&(ee.far=ge,ee.updateProjectionMatrix()),np.setFromMatrixPosition(W.matrixWorld),ee.position.copy(np),yS.copy(ee.position),yS.add(_V[O]),ee.up.copy(SV[O]),ee.lookAt(yS),ee.updateMatrixWorld(),le.makeTranslation(-np.x,-np.y,-np.z),KR.multiplyMatrices(ee.projectionMatrix,ee.matrixWorldInverse),V._frustum.setFromProjectionMatrix(KR,ee.coordinateSystem,ee.reversedDepth)}else V.updateMatrices(W);n=V.getFrustum(),A(P,B,V.camera,W,this.type)}V.isPointLightShadow!==!0&&this.type===xu&&S(V,B),V.needsUpdate=!1}g=this.type,_.needsUpdate=!1,i.setRenderTarget(R,E,L)};function S(C,P){const B=e.update(v);p.defines.VSM_SAMPLES!==C.blurSamples&&(p.defines.VSM_SAMPLES=C.blurSamples,m.defines.VSM_SAMPLES=C.blurSamples,p.needsUpdate=!0,m.needsUpdate=!0),C.mapPass===null&&(C.mapPass=new Gn(r.x,r.y,{format:Xu,type:sr})),p.uniforms.shadow_pass.value=C.map.depthTexture,p.uniforms.resolution.value=C.mapSize,p.uniforms.radius.value=C.radius,i.setRenderTarget(C.mapPass),i.clear(),i.renderBufferDirect(P,null,B,p,v,null),m.uniforms.shadow_pass.value=C.mapPass.texture,m.uniforms.resolution.value=C.mapSize,m.uniforms.radius.value=C.radius,i.setRenderTarget(C.map),i.clear(),i.renderBufferDirect(P,null,B,m,v,null)}function b(C,P,B,R){let E=null;const L=B.isPointLight===!0?C.customDistanceMaterial:C.customDepthMaterial;if(L!==void 0)E=L;else if(E=B.isPointLight===!0?l:a,i.localClippingEnabled&&P.clipShadows===!0&&Array.isArray(P.clippingPlanes)&&P.clippingPlanes.length!==0||P.displacementMap&&P.displacementScale!==0||P.alphaMap&&P.alphaTest>0||P.map&&P.alphaTest>0||P.alphaToCoverage===!0){const N=E.uuid,k=P.uuid;let Y=c[N];Y===void 0&&(Y={},c[N]=Y);let z=Y[k];z===void 0&&(z=E.clone(),Y[k]=z,P.addEventListener("dispose",w)),E=z}if(E.visible=P.visible,E.wireframe=P.wireframe,R===xu?E.side=P.shadowSide!==null?P.shadowSide:P.side:E.side=P.shadowSide!==null?P.shadowSide:d[P.side],E.alphaMap=P.alphaMap,E.alphaTest=P.alphaToCoverage===!0?.5:P.alphaTest,E.map=P.map,E.clipShadows=P.clipShadows,E.clippingPlanes=P.clippingPlanes,E.clipIntersection=P.clipIntersection,E.displacementMap=P.displacementMap,E.displacementScale=P.displacementScale,E.displacementBias=P.displacementBias,E.wireframeLinewidth=P.wireframeLinewidth,E.linewidth=P.linewidth,B.isPointLight===!0&&E.isMeshDistanceMaterial===!0){const N=i.properties.get(E);N.light=B}return E}function A(C,P,B,R,E){if(C.visible===!1)return;if(C.layers.test(P.layers)&&(C.isMesh||C.isLine||C.isPoints)&&(C.castShadow||C.receiveShadow&&E===xu)&&(!C.frustumCulled||n.intersectsObject(C))){C.modelViewMatrix.multiplyMatrices(B.matrixWorldInverse,C.matrixWorld);const k=e.update(C),Y=C.material;if(Array.isArray(Y)){const z=k.groups;for(let W=0,V=z.length;W<V;W++){const G=z[W],Z=Y[G.materialIndex];if(Z&&Z.visible){const O=b(C,Z,R,E);C.onBeforeShadow(i,C,P,B,k,O,G),i.renderBufferDirect(B,null,k,O,C,G),C.onAfterShadow(i,C,P,B,k,O,G)}}}else if(Y.visible){const z=b(C,Y,R,E);C.onBeforeShadow(i,C,P,B,k,z,null),i.renderBufferDirect(B,null,k,z,C,null),C.onAfterShadow(i,C,P,B,k,z,null)}}const N=C.children;for(let k=0,Y=N.length;k<Y;k++)A(N[k],P,B,R,E)}function w(C){C.target.removeEventListener("dispose",w);for(const B in c){const R=c[B],E=C.target.uuid;E in R&&(R[E].dispose(),delete R[E])}}}const MV={[Ov]:Uv,[zv]:jv,[Hv]:Wv,[Wu]:Gv,[Uv]:Ov,[jv]:zv,[Wv]:Hv,[Gv]:Wu};function AV(i,e){function t(){let Q=!1;const je=new on;let Re=null;const Ge=new on(0,0,0,0);return{setMask:function(Le){Re!==Le&&!Q&&(i.colorMask(Le,Le,Le,Le),Re=Le)},setLocked:function(Le){Q=Le},setClear:function(Le,Me,Oe,lt,Pt){Pt===!0&&(Le*=lt,Me*=lt,Oe*=lt),je.set(Le,Me,Oe,lt),Ge.equals(je)===!1&&(i.clearColor(Le,Me,Oe,lt),Ge.copy(je))},reset:function(){Q=!1,Re=null,Ge.set(-1,0,0,0)}}}function n(){let Q=!1,je=!1,Re=null,Ge=null,Le=null;return{setReversed:function(Me){if(je!==Me){const Oe=e.get("EXT_clip_control");Me?Oe.clipControlEXT(Oe.LOWER_LEFT_EXT,Oe.ZERO_TO_ONE_EXT):Oe.clipControlEXT(Oe.LOWER_LEFT_EXT,Oe.NEGATIVE_ONE_TO_ONE_EXT),je=Me;const lt=Le;Le=null,this.setClear(lt)}},getReversed:function(){return je},setTest:function(Me){Me?q(i.DEPTH_TEST):re(i.DEPTH_TEST)},setMask:function(Me){Re!==Me&&!Q&&(i.depthMask(Me),Re=Me)},setFunc:function(Me){if(je&&(Me=MV[Me]),Ge!==Me){switch(Me){case Ov:i.depthFunc(i.NEVER);break;case Uv:i.depthFunc(i.ALWAYS);break;case zv:i.depthFunc(i.LESS);break;case Wu:i.depthFunc(i.LEQUAL);break;case Hv:i.depthFunc(i.EQUAL);break;case Gv:i.depthFunc(i.GEQUAL);break;case jv:i.depthFunc(i.GREATER);break;case Wv:i.depthFunc(i.NOTEQUAL);break;default:i.depthFunc(i.LEQUAL)}Ge=Me}},setLocked:function(Me){Q=Me},setClear:function(Me){Le!==Me&&(je&&(Me=1-Me),i.clearDepth(Me),Le=Me)},reset:function(){Q=!1,Re=null,Ge=null,Le=null,je=!1}}}function r(){let Q=!1,je=null,Re=null,Ge=null,Le=null,Me=null,Oe=null,lt=null,Pt=null;return{setTest:function(Qe){Q||(Qe?q(i.STENCIL_TEST):re(i.STENCIL_TEST))},setMask:function(Qe){je!==Qe&&!Q&&(i.stencilMask(Qe),je=Qe)},setFunc:function(Qe,rt,Mt){(Re!==Qe||Ge!==rt||Le!==Mt)&&(i.stencilFunc(Qe,rt,Mt),Re=Qe,Ge=rt,Le=Mt)},setOp:function(Qe,rt,Mt){(Me!==Qe||Oe!==rt||lt!==Mt)&&(i.stencilOp(Qe,rt,Mt),Me=Qe,Oe=rt,lt=Mt)},setLocked:function(Qe){Q=Qe},setClear:function(Qe){Pt!==Qe&&(i.clearStencil(Qe),Pt=Qe)},reset:function(){Q=!1,je=null,Re=null,Ge=null,Le=null,Me=null,Oe=null,lt=null,Pt=null}}}const s=new t,o=new n,a=new r,l=new WeakMap,c=new WeakMap;let u={},d={},p=new WeakMap,m=[],x=null,v=!1,_=null,g=null,S=null,b=null,A=null,w=null,C=null,P=new Ve(0,0,0),B=0,R=!1,E=null,L=null,N=null,k=null,Y=null;const z=i.getParameter(i.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let W=!1,V=0;const G=i.getParameter(i.VERSION);G.indexOf("WebGL")!==-1?(V=parseFloat(/^WebGL (\d)/.exec(G)[1]),W=V>=1):G.indexOf("OpenGL ES")!==-1&&(V=parseFloat(/^OpenGL ES (\d)/.exec(G)[1]),W=V>=2);let Z=null,O={};const ee=i.getParameter(i.SCISSOR_BOX),le=i.getParameter(i.VIEWPORT),ge=new on().fromArray(ee),Se=new on().fromArray(le);function Ye(Q,je,Re,Ge){const Le=new Uint8Array(4),Me=i.createTexture();i.bindTexture(Q,Me),i.texParameteri(Q,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(Q,i.TEXTURE_MAG_FILTER,i.NEAREST);for(let Oe=0;Oe<Re;Oe++)Q===i.TEXTURE_3D||Q===i.TEXTURE_2D_ARRAY?i.texImage3D(je,0,i.RGBA,1,1,Ge,0,i.RGBA,i.UNSIGNED_BYTE,Le):i.texImage2D(je+Oe,0,i.RGBA,1,1,0,i.RGBA,i.UNSIGNED_BYTE,Le);return Me}const K={};K[i.TEXTURE_2D]=Ye(i.TEXTURE_2D,i.TEXTURE_2D,1),K[i.TEXTURE_CUBE_MAP]=Ye(i.TEXTURE_CUBE_MAP,i.TEXTURE_CUBE_MAP_POSITIVE_X,6),K[i.TEXTURE_2D_ARRAY]=Ye(i.TEXTURE_2D_ARRAY,i.TEXTURE_2D_ARRAY,1,1),K[i.TEXTURE_3D]=Ye(i.TEXTURE_3D,i.TEXTURE_3D,1,1),s.setClear(0,0,0,1),o.setClear(1),a.setClear(0),q(i.DEPTH_TEST),o.setFunc(Wu),be(!1),$(cM),q(i.CULL_FACE),me(jo);function q(Q){u[Q]!==!0&&(i.enable(Q),u[Q]=!0)}function re(Q){u[Q]!==!1&&(i.disable(Q),u[Q]=!1)}function Ce(Q,je){return d[Q]!==je?(i.bindFramebuffer(Q,je),d[Q]=je,Q===i.DRAW_FRAMEBUFFER&&(d[i.FRAMEBUFFER]=je),Q===i.FRAMEBUFFER&&(d[i.DRAW_FRAMEBUFFER]=je),!0):!1}function Te(Q,je){let Re=m,Ge=!1;if(Q){Re=p.get(je),Re===void 0&&(Re=[],p.set(je,Re));const Le=Q.textures;if(Re.length!==Le.length||Re[0]!==i.COLOR_ATTACHMENT0){for(let Me=0,Oe=Le.length;Me<Oe;Me++)Re[Me]=i.COLOR_ATTACHMENT0+Me;Re.length=Le.length,Ge=!0}}else Re[0]!==i.BACK&&(Re[0]=i.BACK,Ge=!0);Ge&&i.drawBuffers(Re)}function De(Q){return x!==Q?(i.useProgram(Q),x=Q,!0):!1}const tt={[Ul]:i.FUNC_ADD,[FB]:i.FUNC_SUBTRACT,[NB]:i.FUNC_REVERSE_SUBTRACT};tt[kB]=i.MIN,tt[OB]=i.MAX;const Pe={[UB]:i.ZERO,[zB]:i.ONE,[HB]:i.SRC_COLOR,[Nv]:i.SRC_ALPHA,[YB]:i.SRC_ALPHA_SATURATE,[VB]:i.DST_COLOR,[jB]:i.DST_ALPHA,[GB]:i.ONE_MINUS_SRC_COLOR,[kv]:i.ONE_MINUS_SRC_ALPHA,[XB]:i.ONE_MINUS_DST_COLOR,[WB]:i.ONE_MINUS_DST_ALPHA,[JB]:i.CONSTANT_COLOR,[KB]:i.ONE_MINUS_CONSTANT_COLOR,[qB]:i.CONSTANT_ALPHA,[ZB]:i.ONE_MINUS_CONSTANT_ALPHA};function me(Q,je,Re,Ge,Le,Me,Oe,lt,Pt,Qe){if(Q===jo){v===!0&&(re(i.BLEND),v=!1);return}if(v===!1&&(q(i.BLEND),v=!0),Q!==DB){if(Q!==_||Qe!==R){if((g!==Ul||A!==Ul)&&(i.blendEquation(i.FUNC_ADD),g=Ul,A=Ul),Qe)switch(Q){case lc:i.blendFuncSeparate(i.ONE,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA);break;case _a:i.blendFunc(i.ONE,i.ONE);break;case uM:i.blendFuncSeparate(i.ZERO,i.ONE_MINUS_SRC_COLOR,i.ZERO,i.ONE);break;case dM:i.blendFuncSeparate(i.DST_COLOR,i.ONE_MINUS_SRC_ALPHA,i.ZERO,i.ONE);break;default:bt("WebGLState: Invalid blending: ",Q);break}else switch(Q){case lc:i.blendFuncSeparate(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA);break;case _a:i.blendFuncSeparate(i.SRC_ALPHA,i.ONE,i.ONE,i.ONE);break;case uM:bt("WebGLState: SubtractiveBlending requires material.premultipliedAlpha = true");break;case dM:bt("WebGLState: MultiplyBlending requires material.premultipliedAlpha = true");break;default:bt("WebGLState: Invalid blending: ",Q);break}S=null,b=null,w=null,C=null,P.set(0,0,0),B=0,_=Q,R=Qe}return}Le=Le||je,Me=Me||Re,Oe=Oe||Ge,(je!==g||Le!==A)&&(i.blendEquationSeparate(tt[je],tt[Le]),g=je,A=Le),(Re!==S||Ge!==b||Me!==w||Oe!==C)&&(i.blendFuncSeparate(Pe[Re],Pe[Ge],Pe[Me],Pe[Oe]),S=Re,b=Ge,w=Me,C=Oe),(lt.equals(P)===!1||Pt!==B)&&(i.blendColor(lt.r,lt.g,lt.b,Pt),P.copy(lt),B=Pt),_=Q,R=!1}function Ee(Q,je){Q.side===Di?re(i.CULL_FACE):q(i.CULL_FACE);let Re=Q.side===Jr;je&&(Re=!Re),be(Re),Q.blending===lc&&Q.transparent===!1?me(jo):me(Q.blending,Q.blendEquation,Q.blendSrc,Q.blendDst,Q.blendEquationAlpha,Q.blendSrcAlpha,Q.blendDstAlpha,Q.blendColor,Q.blendAlpha,Q.premultipliedAlpha),o.setFunc(Q.depthFunc),o.setTest(Q.depthTest),o.setMask(Q.depthWrite),s.setMask(Q.colorWrite);const Ge=Q.stencilWrite;a.setTest(Ge),Ge&&(a.setMask(Q.stencilWriteMask),a.setFunc(Q.stencilFunc,Q.stencilRef,Q.stencilFuncMask),a.setOp(Q.stencilFail,Q.stencilZFail,Q.stencilZPass)),Ue(Q.polygonOffset,Q.polygonOffsetFactor,Q.polygonOffsetUnits),Q.alphaToCoverage===!0?q(i.SAMPLE_ALPHA_TO_COVERAGE):re(i.SAMPLE_ALPHA_TO_COVERAGE)}function be(Q){E!==Q&&(Q?i.frontFace(i.CW):i.frontFace(i.CCW),E=Q)}function $(Q){Q!==IB?(q(i.CULL_FACE),Q!==L&&(Q===cM?i.cullFace(i.BACK):Q===LB?i.cullFace(i.FRONT):i.cullFace(i.FRONT_AND_BACK))):re(i.CULL_FACE),L=Q}function J(Q){Q!==N&&(W&&i.lineWidth(Q),N=Q)}function Ue(Q,je,Re){Q?(q(i.POLYGON_OFFSET_FILL),(k!==je||Y!==Re)&&(i.polygonOffset(je,Re),k=je,Y=Re)):re(i.POLYGON_OFFSET_FILL)}function Ne(Q){Q?q(i.SCISSOR_TEST):re(i.SCISSOR_TEST)}function ke(Q){Q===void 0&&(Q=i.TEXTURE0+z-1),Z!==Q&&(i.activeTexture(Q),Z=Q)}function Ae(Q,je,Re){Re===void 0&&(Z===null?Re=i.TEXTURE0+z-1:Re=Z);let Ge=O[Re];Ge===void 0&&(Ge={type:void 0,texture:void 0},O[Re]=Ge),(Ge.type!==Q||Ge.texture!==je)&&(Z!==Re&&(i.activeTexture(Re),Z=Re),i.bindTexture(Q,je||K[Q]),Ge.type=Q,Ge.texture=je)}function U(){const Q=O[Z];
vendor: 1,645 bytes, line 4067
4067Q!==void 0&&Q.type!==void 0&&(i.bindTexture(Q.type,null),Q.type=void 0,Q.texture=void 0)}function F(){try{i.compressedTexImage2D(...arguments)}catch(Q){bt("WebGLState:",Q)}}function ne(){try{i.compressedTexImage3D(...arguments)}catch(Q){bt("WebGLState:",Q)}}function se(){try{i.texSubImage2D(...arguments)}catch(Q){bt("WebGLState:",Q)}}function he(){try{i.texSubImage3D(...arguments)}catch(Q){bt("WebGLState:",Q)}}function de(){try{i.compressedTexSubImage2D(...arguments)}catch(Q){bt("WebGLState:",Q)}}function ze(){try{i.compressedTexSubImage3D(...arguments)}catch(Q){bt("WebGLState:",Q)}}function Be(){try{i.texStorage2D(...arguments)}catch(Q){bt("WebGLState:",Q)}}function Ke(){try{i.texStorage3D(...arguments)}catch(Q){bt("WebGLState:",Q)}}function $e(){try{i.texImage2D(...arguments)}catch(Q){bt("WebGLState:",Q)}}function Fe(){try{i.texImage3D(...arguments)}catch(Q){bt("WebGLState:",Q)}}function Xe(Q){ge.equals(Q)===!1&&(i.scissor(Q.x,Q.y,Q.z,Q.w),ge.copy(Q))}function it(Q){Se.equals(Q)===!1&&(i.viewport(Q.x,Q.y,Q.z,Q.w),Se.copy(Q))}function ie(Q,je){let Re=c.get(je);Re===void 0&&(Re=new WeakMap,c.set(je,Re));let Ge=Re.get(Q);Ge===void 0&&(Ge=i.getUniformBlockIndex(je,Q.name),Re.set(Q,Ge))}function fe(Q,je){const Ge=c.get(je).get(Q);l.get(je)!==Ge&&(i.uniformBlockBinding(je,Ge,Q.__bindingPointIndex),l.set(je,Ge))}function He(){i.disable(i.BLEND),i.disable(i.CULL_FACE),i.disable(i.DEPTH_TEST),i.disable(i.POLYGON_OFFSET_FILL),i.disable(i.SCISSOR_TEST),i.disable(i.STENCIL_TEST),i.disable(i.SAMPLE_ALPHA_TO_COVERAGE),i.blendEquation(i.FUNC_ADD),i.blendFunc(i.ONE,i.ZERO),i.blendFuncSeparate(i.ONE,i.ZERO,i.ONE,i.ZERO),i.blendColor
vendor: 91,069 bytes, lines 4067-4091
4067(0,0,0,0),i.colorMask(!0,!0,!0,!0),i.clearColor(0,0,0,0),i.depthMask(!0),i.depthFunc(i.LESS),o.setReversed(!1),i.clearDepth(1),i.stencilMask(4294967295),i.stencilFunc(i.ALWAYS,0,4294967295),i.stencilOp(i.KEEP,i.KEEP,i.KEEP),i.clearStencil(0),i.cullFace(i.BACK),i.frontFace(i.CCW),i.polygonOffset(0,0),i.activeTexture(i.TEXTURE0),i.bindFramebuffer(i.FRAMEBUFFER,null),i.bindFramebuffer(i.DRAW_FRAMEBUFFER,null),i.bindFramebuffer(i.READ_FRAMEBUFFER,null),i.useProgram(null),i.lineWidth(1),i.scissor(0,0,i.canvas.width,i.canvas.height),i.viewport(0,0,i.canvas.width,i.canvas.height),u={},Z=null,O={},d={},p=new WeakMap,m=[],x=null,v=!1,_=null,g=null,S=null,b=null,A=null,w=null,C=null,P=new Ve(0,0,0),B=0,R=!1,E=null,L=null,N=null,k=null,Y=null,ge.set(0,0,i.canvas.width,i.canvas.height),Se.set(0,0,i.canvas.width,i.canvas.height),s.reset(),o.reset(),a.reset()}return{buffers:{color:s,depth:o,stencil:a},enable:q,disable:re,bindFramebuffer:Ce,drawBuffers:Te,useProgram:De,setBlending:me,setMaterial:Ee,setFlipSided:be,setCullFace:$,setLineWidth:J,setPolygonOffset:Ue,setScissorTest:Ne,activeTexture:ke,bindTexture:Ae,unbindTexture:U,compressedTexImage2D:F,compressedTexImage3D:ne,texImage2D:$e,texImage3D:Fe,updateUBOMapping:ie,uniformBlockBinding:fe,texStorage2D:Be,texStorage3D:Ke,texSubImage2D:se,texSubImage3D:he,compressedTexSubImage2D:de,compressedTexSubImage3D:ze,scissor:Xe,viewport:it,reset:He}}function wV(i,e,t,n,r,s,o){const a=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,l=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new xe,u=new WeakMap;let d;const p=new WeakMap;let m=!1;try{m=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function x(U,F){return m?new OffscreenCanvas(U,F):Rm("canvas")}function v(U,F,ne){let se=1;const he=Ae(U);if((he.width>ne||he.height>ne)&&(se=ne/Math.max(he.width,he.height)),se<1)if(typeof HTMLImageElement<"u"&&U instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&U instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&U instanceof ImageBitmap||typeof VideoFrame<"u"&&U instanceof VideoFrame){const de=Math.floor(se*he.width),ze=Math.floor(se*he.height);d===void 0&&(d=x(de,ze));const Be=F?x(de,ze):d;return Be.width=de,Be.height=ze,Be.getContext("2d").drawImage(U,0,0,de,ze),at("WebGLRenderer: Texture has been resized from ("+he.width+"x"+he.height+") to ("+de+"x"+ze+")."),Be}else return"data"in U&&at("WebGLRenderer: Image in DataTexture is too big ("+he.width+"x"+he.height+")."),U;return U}function _(U){return U.generateMipmaps}function g(U){i.generateMipmap(U)}function S(U){return U.isWebGLCubeRenderTarget?i.TEXTURE_CUBE_MAP:U.isWebGL3DRenderTarget?i.TEXTURE_3D:U.isWebGLArrayRenderTarget||U.isCompressedArrayTexture?i.TEXTURE_2D_ARRAY:i.TEXTURE_2D}function b(U,F,ne,se,he=!1){if(U!==null){if(i[U]!==void 0)return i[U];at("WebGLRenderer: Attempt to use non-existing WebGL internal format '"+U+"'")}let de=F;if(F===i.RED&&(ne===i.FLOAT&&(de=i.R32F),ne===i.HALF_FLOAT&&(de=i.R16F),ne===i.UNSIGNED_BYTE&&(de=i.R8)),F===i.RED_INTEGER&&(ne===i.UNSIGNED_BYTE&&(de=i.R8UI),ne===i.UNSIGNED_SHORT&&(de=i.R16UI),ne===i.UNSIGNED_INT&&(de=i.R32UI),ne===i.BYTE&&(de=i.R8I),ne===i.SHORT&&(de=i.R16I),ne===i.INT&&(de=i.R32I)),F===i.RG&&(ne===i.FLOAT&&(de=i.RG32F),ne===i.HALF_FLOAT&&(de=i.RG16F),ne===i.UNSIGNED_BYTE&&(de=i.RG8)),F===i.RG_INTEGER&&(ne===i.UNSIGNED_BYTE&&(de=i.RG8UI),ne===i.UNSIGNED_SHORT&&(de=i.RG16UI),ne===i.UNSIGNED_INT&&(de=i.RG32UI),ne===i.BYTE&&(de=i.RG8I),ne===i.SHORT&&(de=i.RG16I),ne===i.INT&&(de=i.RG32I)),F===i.RGB_INTEGER&&(ne===i.UNSIGNED_BYTE&&(de=i.RGB8UI),ne===i.UNSIGNED_SHORT&&(de=i.RGB16UI),ne===i.UNSIGNED_INT&&(de=i.RGB32UI),ne===i.BYTE&&(de=i.RGB8I),ne===i.SHORT&&(de=i.RGB16I),ne===i.INT&&(de=i.RGB32I)),F===i.RGBA_INTEGER&&(ne===i.UNSIGNED_BYTE&&(de=i.RGBA8UI),ne===i.UNSIGNED_SHORT&&(de=i.RGBA16UI),ne===i.UNSIGNED_INT&&(de=i.RGBA32UI),ne===i.BYTE&&(de=i.RGBA8I),ne===i.SHORT&&(de=i.RGBA16I),ne===i.INT&&(de=i.RGBA32I)),F===i.RGB&&(ne===i.UNSIGNED_INT_5_9_9_9_REV&&(de=i.RGB9_E5),ne===i.UNSIGNED_INT_10F_11F_11F_REV&&(de=i.R11F_G11F_B10F)),F===i.RGBA){const ze=he?Em:Yt.getTransfer(se);ne===i.FLOAT&&(de=i.RGBA32F),ne===i.HALF_FLOAT&&(de=i.RGBA16F),ne===i.UNSIGNED_BYTE&&(de=ze===vn?i.SRGB8_ALPHA8:i.RGBA8),ne===i.UNSIGNED_SHORT_4_4_4_4&&(de=i.RGBA4),ne===i.UNSIGNED_SHORT_5_5_5_1&&(de=i.RGB5_A1)}return(de===i.R16F||de===i.R32F||de===i.RG16F||de===i.RG32F||de===i.RGBA16F||de===i.RGBA32F)&&e.get("EXT_color_buffer_float"),de}function A(U,F){let ne;return U?F===null||F===Mo||F===Jf?ne=i.DEPTH24_STENCIL8:F===Vr?ne=i.DEPTH32F_STENCIL8:F===Yf&&(ne=i.DEPTH24_STENCIL8,at("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):F===null||F===Mo||F===Jf?ne=i.DEPTH_COMPONENT24:F===Vr?ne=i.DEPTH_COMPONENT32F:F===Yf&&(ne=i.DEPTH_COMPONENT16),ne}function w(U,F){return _(U)===!0||U.isFramebufferTexture&&U.minFilter!==Bn&&U.minFilter!==jt?Math.log2(Math.max(F.width,F.height))+1:U.mipmaps!==void 0&&U.mipmaps.length>0?U.mipmaps.length:U.isCompressedTexture&&Array.isArray(U.image)?F.mipmaps.length:1}function C(U){const F=U.target;F.removeEventListener("dispose",C),B(F),F.isVideoTexture&&u.delete(F)}function P(U){const F=U.target;F.removeEventListener("dispose",P),E(F)}function B(U){const F=n.get(U);if(F.__webglInit===void 0)return;const ne=U.source,se=p.get(ne);if(se){const he=se[F.__cacheKey];he.usedTimes--,he.usedTimes===0&&R(U),Object.keys(se).length===0&&p.delete(ne)}n.remove(U)}function R(U){const F=n.get(U);i.deleteTexture(F.__webglTexture);const ne=U.source,se=p.get(ne);delete se[F.__cacheKey],o.memory.textures--}function E(U){const F=n.get(U);if(U.depthTexture&&(U.depthTexture.dispose(),n.remove(U.depthTexture)),U.isWebGLCubeRenderTarget)for(let se=0;se<6;se++){if(Array.isArray(F.__webglFramebuffer[se]))for(let he=0;he<F.__webglFramebuffer[se].length;he++)i.deleteFramebuffer(F.__webglFramebuffer[se][he]);else i.deleteFramebuffer(F.__webglFramebuffer[se]);F.__webglDepthbuffer&&i.deleteRenderbuffer(F.__webglDepthbuffer[se])}else{if(Array.isArray(F.__webglFramebuffer))for(let se=0;se<F.__webglFramebuffer.length;se++)i.deleteFramebuffer(F.__webglFramebuffer[se]);else i.deleteFramebuffer(F.__webglFramebuffer);if(F.__webglDepthbuffer&&i.deleteRenderbuffer(F.__webglDepthbuffer),F.__webglMultisampledFramebuffer&&i.deleteFramebuffer(F.__webglMultisampledFramebuffer),F.__webglColorRenderbuffer)for(let se=0;se<F.__webglColorRenderbuffer.length;se++)F.__webglColorRenderbuffer[se]&&i.deleteRenderbuffer(F.__webglColorRenderbuffer[se]);F.__webglDepthRenderbuffer&&i.deleteRenderbuffer(F.__webglDepthRenderbuffer)}const ne=U.textures;for(let se=0,he=ne.length;se<he;se++){const de=n.get(ne[se]);de.__webglTexture&&(i.deleteTexture(de.__webglTexture),o.memory.textures--),n.remove(ne[se])}n.remove(U)}let L=0;function N(){L=0}function k(){const U=L;return U>=r.maxTextures&&at("WebGLTextures: Trying to use "+U+" texture units while this GPU supports only "+r.maxTextures),L+=1,U}function Y(U){const F=[];return F.push(U.wrapS),F.push(U.wrapT),F.push(U.wrapR||0),F.push(U.magFilter),F.push(U.minFilter),F.push(U.anisotropy),F.push(U.internalFormat),F.push(U.format),F.push(U.type),F.push(U.generateMipmaps),F.push(U.premultiplyAlpha),F.push(U.flipY),F.push(U.unpackAlignment),F.push(U.colorSpace),F.join()}function z(U,F){const ne=n.get(U);if(U.isVideoTexture&&Ne(U),U.isRenderTargetTexture===!1&&U.isExternalTexture!==!0&&U.version>0&&ne.__version!==U.version){const se=U.image;if(se===null)at("WebGLRenderer: Texture marked for update but no image data found.");else if(se.complete===!1)at("WebGLRenderer: Texture marked for update but image is incomplete");else{K(ne,U,F);return}}else U.isExternalTexture&&(ne.__webglTexture=U.sourceTexture?U.sourceTexture:null);t.bindTexture(i.TEXTURE_2D,ne.__webglTexture,i.TEXTURE0+F)}function W(U,F){const ne=n.get(U);if(U.isRenderTargetTexture===!1&&U.version>0&&ne.__version!==U.version){K(ne,U,F);return}else U.isExternalTexture&&(ne.__webglTexture=U.sourceTexture?U.sourceTexture:null);t.bindTexture(i.TEXTURE_2D_ARRAY,ne.__webglTexture,i.TEXTURE0+F)}function V(U,F){const ne=n.get(U);if(U.isRenderTargetTexture===!1&&U.version>0&&ne.__version!==U.version){K(ne,U,F);return}t.bindTexture(i.TEXTURE_3D,ne.__webglTexture,i.TEXTURE0+F)}function G(U,F){const ne=n.get(U);if(U.isCubeDepthTexture!==!0&&U.version>0&&ne.__version!==U.version){q(ne,U,F);return}t.bindTexture(i.TEXTURE_CUBE_MAP,ne.__webglTexture,i.TEXTURE0+F)}const Z={[bo]:i.REPEAT,[Mr]:i.CLAMP_TO_EDGE,[Vu]:i.MIRRORED_REPEAT},O={[Bn]:i.NEAREST,[Xm]:i.NEAREST_MIPMAP_NEAREST,[Yl]:i.NEAREST_MIPMAP_LINEAR,[jt]:i.LINEAR,[Lu]:i.LINEAR_MIPMAP_NEAREST,[as]:i.LINEAR_MIPMAP_LINEAR},ee={[sD]:i.NEVER,[uD]:i.ALWAYS,[oD]:i.LESS,[u1]:i.LEQUAL,[aD]:i.EQUAL,[d1]:i.GEQUAL,[lD]:i.GREATER,[cD]:i.NOTEQUAL};function le(U,F){if(F.type===Vr&&e.has("OES_texture_float_linear")===!1&&(F.magFilter===jt||F.magFilter===Lu||F.magFilter===Yl||F.magFilter===as||F.minFilter===jt||F.minFilter===Lu||F.minFilter===Yl||F.minFilter===as)&&at("WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),i.texParameteri(U,i.TEXTURE_WRAP_S,Z[F.wrapS]),i.texParameteri(U,i.TEXTURE_WRAP_T,Z[F.wrapT]),(U===i.TEXTURE_3D||U===i.TEXTURE_2D_ARRAY)&&i.texParameteri(U,i.TEXTURE_WRAP_R,Z[F.wrapR]),i.texParameteri(U,i.TEXTURE_MAG_FILTER,O[F.magFilter]),i.texParameteri(U,i.TEXTURE_MIN_FILTER,O[F.minFilter]),F.compareFunction&&(i.texParameteri(U,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE),i.texParameteri(U,i.TEXTURE_COMPARE_FUNC,ee[F.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(F.magFilter===Bn||F.minFilter!==Yl&&F.minFilter!==as||F.type===Vr&&e.has("OES_texture_float_linear")===!1)return;if(F.anisotropy>1||n.get(F).__currentAnisotropy){const ne=e.get("EXT_texture_filter_anisotropic");i.texParameterf(U,ne.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(F.anisotropy,r.getMaxAnisotropy())),n.get(F).__currentAnisotropy=F.anisotropy}}}function ge(U,F){let ne=!1;U.__webglInit===void 0&&(U.__webglInit=!0,F.addEventListener("dispose",C));const se=F.source;let he=p.get(se);he===void 0&&(he={},p.set(se,he));const de=Y(F);if(de!==U.__cacheKey){he[de]===void 0&&(he[de]={texture:i.createTexture(),usedTimes:0},o.memory.textures++,ne=!0),he[de].usedTimes++;const ze=he[U.__cacheKey];ze!==void 0&&(he[U.__cacheKey].usedTimes--,ze.usedTimes===0&&R(F)),U.__cacheKey=de,U.__webglTexture=he[de].texture}return ne}function Se(U,F,ne){return Math.floor(Math.floor(U/ne)/F)}function Ye(U,F,ne,se){const de=U.updateRanges;if(de.length===0)t.texSubImage2D(i.TEXTURE_2D,0,0,0,F.width,F.height,ne,se,F.data);else{de.sort((Fe,Xe)=>Fe.start-Xe.start);let ze=0;for(let Fe=1;Fe<de.length;Fe++){const Xe=de[ze],it=de[Fe],ie=Xe.start+Xe.count,fe=Se(it.start,F.width,4),He=Se(Xe.start,F.width,4);it.start<=ie+1&&fe===He&&Se(it.start+it.count-1,F.width,4)===fe?Xe.count=Math.max(Xe.count,it.start+it.count-Xe.start):(++ze,de[ze]=it)}de.length=ze+1;const Be=i.getParameter(i.UNPACK_ROW_LENGTH),Ke=i.getParameter(i.UNPACK_SKIP_PIXELS),$e=i.getParameter(i.UNPACK_SKIP_ROWS);i.pixelStorei(i.UNPACK_ROW_LENGTH,F.width);for(let Fe=0,Xe=de.length;Fe<Xe;Fe++){const it=de[Fe],ie=Math.floor(it.start/4),fe=Math.ceil(it.count/4),He=ie%F.width,Q=Math.floor(ie/F.width),je=fe,Re=1;i.pixelStorei(i.UNPACK_SKIP_PIXELS,He),i.pixelStorei(i.UNPACK_SKIP_ROWS,Q),t.texSubImage2D(i.TEXTURE_2D,0,He,Q,je,Re,ne,se,F.data)}U.clearUpdateRanges(),i.pixelStorei(i.UNPACK_ROW_LENGTH,Be),i.pixelStorei(i.UNPACK_SKIP_PIXELS,Ke),i.pixelStorei(i.UNPACK_SKIP_ROWS,$e)}}function K(U,F,ne){let se=i.TEXTURE_2D;(F.isDataArrayTexture||F.isCompressedArrayTexture)&&(se=i.TEXTURE_2D_ARRAY),F.isData3DTexture&&(se=i.TEXTURE_3D);const he=ge(U,F),de=F.source;t.bindTexture(se,U.__webglTexture,i.TEXTURE0+ne);const ze=n.get(de);if(de.version!==ze.__version||he===!0){t.activeTexture(i.TEXTURE0+ne);const Be=Yt.getPrimaries(Yt.workingColorSpace),Ke=F.colorSpace===Va?null:Yt.getPrimaries(F.colorSpace),$e=F.colorSpace===Va||Be===Ke?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,F.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,F.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,F.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,$e);let Fe=v(F.image,!1,r.maxTextureSize);Fe=ke(F,Fe);const Xe=s.convert(F.format,F.colorSpace),it=s.convert(F.type);let ie=b(F.internalFormat,Xe,it,F.colorSpace,F.isVideoTexture);le(se,F);let fe;const He=F.mipmaps,Q=F.isVideoTexture!==!0,je=ze.__version===void 0||he===!0,Re=de.dataReady,Ge=w(F,Fe);if(F.isDepthTexture)ie=A(F.format===Jl,F.type),je&&(Q?t.texStorage2D(i.TEXTURE_2D,1,ie,Fe.width,Fe.height):t.texImage2D(i.TEXTURE_2D,0,ie,Fe.width,Fe.height,0,Xe,it,null));else if(F.isDataTexture)if(He.length>0){Q&&je&&t.texStorage2D(i.TEXTURE_2D,Ge,ie,He[0].width,He[0].height);for(let Le=0,Me=He.length;Le<Me;Le++)fe=He[Le],Q?Re&&t.texSubImage2D(i.TEXTURE_2D,Le,0,0,fe.width,fe.height,Xe,it,fe.data):t.texImage2D(i.TEXTURE_2D,Le,ie,fe.width,fe.height,0,Xe,it,fe.data);F.generateMipmaps=!1}else Q?(je&&t.texStorage2D(i.TEXTURE_2D,Ge,ie,Fe.width,Fe.height),Re&&Ye(F,Fe,Xe,it)):t.texImage2D(i.TEXTURE_2D,0,ie,Fe.width,Fe.height,0,Xe,it,Fe.data);else if(F.isCompressedTexture)if(F.isCompressedArrayTexture){Q&&je&&t.texStorage3D(i.TEXTURE_2D_ARRAY,Ge,ie,He[0].width,He[0].height,Fe.depth);for(let Le=0,Me=He.length;Le<Me;Le++)if(fe=He[Le],F.format!==Ni)if(Xe!==null)if(Q){if(Re)if(F.layerUpdates.size>0){const Oe=_M(fe.width,fe.height,F.format,F.type);for(const lt of F.layerUpdates){const Pt=fe.data.subarray(lt*Oe/fe.data.BYTES_PER_ELEMENT,(lt+1)*Oe/fe.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Le,0,0,lt,fe.width,fe.height,1,Xe,Pt)}F.clearLayerUpdates()}else t.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Le,0,0,0,fe.width,fe.height,Fe.depth,Xe,fe.data)}else t.compressedTexImage3D(i.TEXTURE_2D_ARRAY,Le,ie,fe.width,fe.height,Fe.depth,0,fe.data,0,0);else at("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Q?Re&&t.texSubImage3D(i.TEXTURE_2D_ARRAY,Le,0,0,0,fe.width,fe.height,Fe.depth,Xe,it,fe.data):t.texImage3D(i.TEXTURE_2D_ARRAY,Le,ie,fe.width,fe.height,Fe.depth,0,Xe,it,fe.data)}else{Q&&je&&t.texStorage2D(i.TEXTURE_2D,Ge,ie,He[0].width,He[0].height);for(let Le=0,Me=He.length;Le<Me;Le++)fe=He[Le],F.format!==Ni?Xe!==null?Q?Re&&t.compressedTexSubImage2D(i.TEXTURE_2D,Le,0,0,fe.width,fe.height,Xe,fe.data):t.compressedTexImage2D(i.TEXTURE_2D,Le,ie,fe.width,fe.height,0,fe.data):at("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Q?Re&&t.texSubImage2D(i.TEXTURE_2D,Le,0,0,fe.width,fe.height,Xe,it,fe.data):t.texImage2D(i.TEXTURE_2D,Le,ie,fe.width,fe.height,0,Xe,it,fe.data)}else if(F.isDataArrayTexture)if(Q){if(je&&t.texStorage3D(i.TEXTURE_2D_ARRAY,Ge,ie,Fe.width,Fe.height,Fe.depth),Re)if(F.layerUpdates.size>0){const Le=_M(Fe.width,Fe.height,F.format,F.type);for(const Me of F.layerUpdates){const Oe=Fe.data.subarray(Me*Le/Fe.data.BYTES_PER_ELEMENT,(Me+1)*Le/Fe.data.BYTES_PER_ELEMENT);t.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,Me,Fe.width,Fe.height,1,Xe,it,Oe)}F.clearLayerUpdates()}else t.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,0,Fe.width,Fe.height,Fe.depth,Xe,it,Fe.data)}else t.texImage3D(i.TEXTURE_2D_ARRAY,0,ie,Fe.width,Fe.height,Fe.depth,0,Xe,it,Fe.data);else if(F.isData3DTexture)Q?(je&&t.texStorage3D(i.TEXTURE_3D,Ge,ie,Fe.width,Fe.height,Fe.depth),Re&&t.texSubImage3D(i.TEXTURE_3D,0,0,0,0,Fe.width,Fe.height,Fe.depth,Xe,it,Fe.data)):t.texImage3D(i.TEXTURE_3D,0,ie,Fe.width,Fe.height,Fe.depth,0,Xe,it,Fe.data);else if(F.isFramebufferTexture){if(je)if(Q)t.texStorage2D(i.TEXTURE_2D,Ge,ie,Fe.width,Fe.height);else{let Le=Fe.width,Me=Fe.height;for(let Oe=0;Oe<Ge;Oe++)t.texImage2D(i.TEXTURE_2D,Oe,ie,Le,Me,0,Xe,it,null),Le>>=1,Me>>=1}}else if(He.length>0){if(Q&&je){const Le=Ae(He[0]);t.texStorage2D(i.TEXTURE_2D,Ge,ie,Le.width,Le.height)}for(let Le=0,Me=He.length;Le<Me;Le++)fe=He[Le],Q?Re&&t.texSubImage2D(i.TEXTURE_2D,Le,0,0,Xe,it,fe):t.texImage2D(i.TEXTURE_2D,Le,ie,Xe,it,fe);F.generateMipmaps=!1}else if(Q){if(je){const Le=Ae(Fe);t.texStorage2D(i.TEXTURE_2D,Ge,ie,Le.width,Le.height)}Re&&t.texSubImage2D(i.TEXTURE_2D,0,0,0,Xe,it,Fe)}else t.texImage2D(i.TEXTURE_2D,0,ie,Xe,it,Fe);_(F)&&g(se),ze.__version=de.version,F.onUpdate&&F.onUpdate(F)}U.__version=F.version}function q(U,F,ne){if(F.image.length!==6)return;const se=ge(U,F),he=F.source;t.bindTexture(i.TEXTURE_CUBE_MAP,U.__webglTexture,i.TEXTURE0+ne);const de=n.get(he);if(he.version!==de.__version||se===!0){t.activeTexture(i.TEXTURE0+ne);const ze=Yt.getPrimaries(Yt.workingColorSpace),Be=F.colorSpace===Va?null:Yt.getPrimaries(F.colorSpace),Ke=F.colorSpace===Va||ze===Be?i.NONE:i.BROWSER_DEFAULT_WEBGL;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,F.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,F.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,F.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,Ke);const $e=F.isCompressedTexture||F.image[0].isCompressedTexture,Fe=F.image[0]&&F.image[0].isDataTexture,Xe=[];for(let Me=0;Me<6;Me++)!$e&&!Fe?Xe[Me]=v(F.image[Me],!0,r.maxCubemapSize):Xe[Me]=Fe?F.image[Me].image:F.image[Me],Xe[Me]=ke(F,Xe[Me]);const it=Xe[0],ie=s.convert(F.format,F.colorSpace),fe=s.convert(F.type),He=b(F.internalFormat,ie,fe,F.colorSpace),Q=F.isVideoTexture!==!0,je=de.__version===void 0||se===!0,Re=he.dataReady;let Ge=w(F,it);le(i.TEXTURE_CUBE_MAP,F);let Le;if($e){Q&&je&&t.texStorage2D(i.TEXTURE_CUBE_MAP,Ge,He,it.width,it.height);for(let Me=0;Me<6;Me++){Le=Xe[Me].mipmaps;for(let Oe=0;Oe<Le.length;Oe++){const lt=Le[Oe];F.format!==Ni?ie!==null?Q?Re&&t.compressedTexSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Me,Oe,0,0,lt.width,lt.height,ie,lt.data):t.compressedTexImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Me,Oe,He,lt.width,lt.height,0,lt.data):at("WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):Q?Re&&t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Me,Oe,0,0,lt.width,lt.height,ie,fe,lt.data):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Me,Oe,He,lt.width,lt.height,0,ie,fe,lt.data)}}}else{if(Le=F.mipmaps,Q&&je){Le.length>0&&Ge++;const Me=Ae(Xe[0]);t.texStorage2D(i.TEXTURE_CUBE_MAP,Ge,He,Me.width,Me.height)}for(let Me=0;Me<6;Me++)if(Fe){Q?Re&&t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Me,0,0,0,Xe[Me].width,Xe[Me].height,ie,fe,Xe[Me].data):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Me,0,He,Xe[Me].width,Xe[Me].height,0,ie,fe,Xe[Me].data);for(let Oe=0;Oe<Le.length;Oe++){const Pt=Le[Oe].image[Me].image;Q?Re&&t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Me,Oe+1,0,0,Pt.width,Pt.height,ie,fe,Pt.data):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Me,Oe+1,He,Pt.width,Pt.height,0,ie,fe,Pt.data)}}else{Q?Re&&t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Me,0,0,0,ie,fe,Xe[Me]):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Me,0,He,ie,fe,Xe[Me]);for(let Oe=0;Oe<Le.length;Oe++){const lt=Le[Oe];Q?Re&&t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Me,Oe+1,0,0,ie,fe,lt.image[Me]):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+Me,Oe+1,He,ie,fe,lt.image[Me])}}}_(F)&&g(i.TEXTURE_CUBE_MAP),de.__version=he.version,F.onUpdate&&F.onUpdate(F)}U.__version=F.version}function re(U,F,ne,se,he,de){const ze=s.convert(ne.format,ne.colorSpace),Be=s.convert(ne.type),Ke=b(ne.internalFormat,ze,Be,ne.colorSpace),$e=n.get(F),Fe=n.get(ne);if(Fe.__renderTarget=F,!$e.__hasExternalTextures){const Xe=Math.max(1,F.width>>de),it=Math.max(1,F.height>>de);he===i.TEXTURE_3D||he===i.TEXTURE_2D_ARRAY?t.texImage3D(he,de,Ke,Xe,it,F.depth,0,ze,Be,null):t.texImage2D(he,de,Ke,Xe,it,0,ze,Be,null)}t.bindFramebuffer(i.FRAMEBUFFER,U),Ue(F)?a.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,se,he,Fe.__webglTexture,0,J(F)):(he===i.TEXTURE_2D||he>=i.TEXTURE_CUBE_MAP_POSITIVE_X&&he<=i.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&i.framebufferTexture2D(i.FRAMEBUFFER,se,he,Fe.__webglTexture,de),t.bindFramebuffer(i.FRAMEBUFFER,null)}function Ce(U,F,ne){if(i.bindRenderbuffer(i.RENDERBUFFER,U),F.depthBuffer){const se=F.depthTexture,he=se&&se.isDepthTexture?se.type:null,de=A(F.stencilBuffer,he),ze=F.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT;Ue(F)?a.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,J(F),de,F.width,F.height):ne?i.renderbufferStorageMultisample(i.RENDERBUFFER,J(F),de,F.width,F.height):i.renderbufferStorage(i.RENDERBUFFER,de,F.width,F.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,ze,i.RENDERBUFFER,U)}else{const se=F.textures;for(let he=0;he<se.length;he++){const de=se[he],ze=s.convert(de.format,de.colorSpace),Be=s.convert(de.type),Ke=b(de.internalFormat,ze,Be,de.colorSpace);Ue(F)?a.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,J(F),Ke,F.width,F.height):ne?i.renderbufferStorageMultisample(i.RENDERBUFFER,J(F),Ke,F.width,F.height):i.renderbufferStorage(i.RENDERBUFFER,Ke,F.width,F.height)}}i.bindRenderbuffer(i.RENDERBUFFER,null)}function Te(U,F,ne){const se=F.isWebGLCubeRenderTarget===!0;if(t.bindFramebuffer(i.FRAMEBUFFER,U),!(F.depthTexture&&F.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");const he=n.get(F.depthTexture);if(he.__renderTarget=F,(!he.__webglTexture||F.depthTexture.image.width!==F.width||F.depthTexture.image.height!==F.height)&&(F.depthTexture.image.width=F.width,F.depthTexture.image.height=F.height,F.depthTexture.needsUpdate=!0),se){if(he.__webglInit===void 0&&(he.__webglInit=!0,F.depthTexture.addEventListener("dispose",C)),he.__webglTexture===void 0){he.__webglTexture=i.createTexture(),t.bindTexture(i.TEXTURE_CUBE_MAP,he.__webglTexture),le(i.TEXTURE_CUBE_MAP,F.depthTexture);const $e=s.convert(F.depthTexture.format),Fe=s.convert(F.depthTexture.type);let Xe;F.depthTexture.format===ba?Xe=i.DEPTH_COMPONENT24:F.depthTexture.format===Jl&&(Xe=i.DEPTH24_STENCIL8);for(let it=0;it<6;it++)i.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+it,0,Xe,F.width,F.height,0,$e,Fe,null)}}else z(F.depthTexture,0);const de=he.__webglTexture,ze=J(F),Be=se?i.TEXTURE_CUBE_MAP_POSITIVE_X+ne:i.TEXTURE_2D,Ke=F.depthTexture.format===Jl?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT;if(F.depthTexture.format===ba)Ue(F)?a.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,Ke,Be,de,0,ze):i.framebufferTexture2D(i.FRAMEBUFFER,Ke,Be,de,0);else if(F.depthTexture.format===Jl)Ue(F)?a.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,Ke,Be,de,0,ze):i.framebufferTexture2D(i.FRAMEBUFFER,Ke,Be,de,0);else throw new Error("Unknown depthTexture format")}function De(U){const F=n.get(U),ne=U.isWebGLCubeRenderTarget===!0;if(F.__boundDepthTexture!==U.depthTexture){const se=U.depthTexture;if(F.__depthDisposeCallback&&F.__depthDisposeCallback(),se){const he=()=>{delete F.__boundDepthTexture,delete F.__depthDisposeCallback,se.removeEventListener("dispose",he)};se.addEventListener("dispose",he),F.__depthDisposeCallback=he}F.__boundDepthTexture=se}if(U.depthTexture&&!F.__autoAllocateDepthBuffer)if(ne)for(let se=0;se<6;se++)Te(F.__webglFramebuffer[se],U,se);else{const se=U.texture.mipmaps;se&&se.length>0?Te(F.__webglFramebuffer[0],U,0):Te(F.__webglFramebuffer,U,0)}else if(ne){F.__webglDepthbuffer=[];for(let se=0;se<6;se++)if(t.bindFramebuffer(i.FRAMEBUFFER,F.__webglFramebuffer[se]),F.__webglDepthbuffer[se]===void 0)F.__webglDepthbuffer[se]=i.createRenderbuffer(),Ce(F.__webglDepthbuffer[se],U,!1);else{const he=U.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,de=F.__webglDepthbuffer[se];i.bindRenderbuffer(i.RENDERBUFFER,de),i.framebufferRenderbuffer(i.FRAMEBUFFER,he,i.RENDERBUFFER,de)}}else{const se=U.texture.mipmaps;if(se&&se.length>0?t.bindFramebuffer(i.FRAMEBUFFER,F.__webglFramebuffer[0]):t.bindFramebuffer(i.FRAMEBUFFER,F.__webglFramebuffer),F.__webglDepthbuffer===void 0)F.__webglDepthbuffer=i.createRenderbuffer(),Ce(F.__webglDepthbuffer,U,!1);else{const he=U.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,de=F.__webglDepthbuffer;i.bindRenderbuffer(i.RENDERBUFFER,de),i.framebufferRenderbuffer(i.FRAMEBUFFER,he,i.RENDERBUFFER,de)}}t.bindFramebuffer(i.FRAMEBUFFER,null)}function tt(U,F,ne){const se=n.get(U);F!==void 0&&re(se.__webglFramebuffer,U,U.texture,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,0),ne!==void 0&&De(U)}function Pe(U){const F=U.texture,ne=n.get(U),se=n.get(F);U.addEventListener("dispose",P);const he=U.textures,de=U.isWebGLCubeRenderTarget===!0,ze=he.length>1;if(ze||(se.__webglTexture===void 0&&(se.__webglTexture=i.createTexture()),se.__version=F.version,o.memory.textures++),de){ne.__webglFramebuffer=[];for(let Be=0;Be<6;Be++)if(F.mipmaps&&F.mipmaps.length>0){ne.__webglFramebuffer[Be]=[];for(let Ke=0;Ke<F.mipmaps.length;Ke++)ne.__webglFramebuffer[Be][Ke]=i.createFramebuffer()}else ne.__webglFramebuffer[Be]=i.createFramebuffer()}else{if(F.mipmaps&&F.mipmaps.length>0){ne.__webglFramebuffer=[];for(let Be=0;Be<F.mipmaps.length;Be++)ne.__webglFramebuffer[Be]=i.createFramebuffer()}else ne.__webglFramebuffer=i.createFramebuffer();if(ze)for(let Be=0,Ke=he.length;Be<Ke;Be++){const $e=n.get(he[Be]);$e.__webglTexture===void 0&&($e.__webglTexture=i.createTexture(),o.memory.textures++)}if(U.samples>0&&Ue(U)===!1){ne.__webglMultisampledFramebuffer=i.createFramebuffer(),ne.__webglColorRenderbuffer=[],t.bindFramebuffer(i.FRAMEBUFFER,ne.__webglMultisampledFramebuffer);for(let Be=0;Be<he.length;Be++){const Ke=he[Be];ne.__webglColorRenderbuffer[Be]=i.createRenderbuffer(),i.bindRenderbuffer(i.RENDERBUFFER,ne.__webglColorRenderbuffer[Be]);const $e=s.convert(Ke.format,Ke.colorSpace),Fe=s.convert(Ke.type),Xe=b(Ke.internalFormat,$e,Fe,Ke.colorSpace,U.isXRRenderTarget===!0),it=J(U);i.renderbufferStorageMultisample(i.RENDERBUFFER,it,Xe,U.width,U.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0+Be,i.RENDERBUFFER,ne.__webglColorRenderbuffer[Be])}i.bindRenderbuffer(i.RENDERBUFFER,null),U.depthBuffer&&(ne.__webglDepthRenderbuffer=i.createRenderbuffer(),Ce(ne.__webglDepthRenderbuffer,U,!0)),t.bindFramebuffer(i.FRAMEBUFFER,null)}}if(de){t.bindTexture(i.TEXTURE_CUBE_MAP,se.__webglTexture),le(i.TEXTURE_CUBE_MAP,F);for(let Be=0;Be<6;Be++)if(F.mipmaps&&F.mipmaps.length>0)for(let Ke=0;Ke<F.mipmaps.length;Ke++)re(ne.__webglFramebuffer[Be][Ke],U,F,i.COLOR_ATTACHMENT0,i.TEXTURE_CUBE_MAP_POSITIVE_X+Be,Ke);else re(ne.__webglFramebuffer[Be],U,F,i.COLOR_ATTACHMENT0,i.TEXTURE_CUBE_MAP_POSITIVE_X+Be,0);_(F)&&g(i.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(ze){for(let Be=0,Ke=he.length;Be<Ke;Be++){const $e=he[Be],Fe=n.get($e);let Xe=i.TEXTURE_2D;(U.isWebGL3DRenderTarget||U.isWebGLArrayRenderTarget)&&(Xe=U.isWebGL3DRenderTarget?i.TEXTURE_3D:i.TEXTURE_2D_ARRAY),t.bindTexture(Xe,Fe.__webglTexture),le(Xe,$e),re(ne.__webglFramebuffer,U,$e,i.COLOR_ATTACHMENT0+Be,Xe,0),_($e)&&g(Xe)}t.unbindTexture()}else{let Be=i.TEXTURE_2D;if((U.isWebGL3DRenderTarget||U.isWebGLArrayRenderTarget)&&(Be=U.isWebGL3DRenderTarget?i.TEXTURE_3D:i.TEXTURE_2D_ARRAY),t.bindTexture(Be,se.__webglTexture),le(Be,F),F.mipmaps&&F.mipmaps.length>0)for(let Ke=0;Ke<F.mipmaps.length;Ke++)re(ne.__webglFramebuffer[Ke],U,F,i.COLOR_ATTACHMENT0,Be,Ke);else re(ne.__webglFramebuffer,U,F,i.COLOR_ATTACHMENT0,Be,0);_(F)&&g(Be),t.unbindTexture()}U.depthBuffer&&De(U)}function me(U){const F=U.textures;for(let ne=0,se=F.length;ne<se;ne++){const he=F[ne];if(_(he)){const de=S(U),ze=n.get(he).__webglTexture;t.bindTexture(de,ze),g(de),t.unbindTexture()}}}const Ee=[],be=[];function $(U){if(U.samples>0){if(Ue(U)===!1){const F=U.textures,ne=U.width,se=U.height;let he=i.COLOR_BUFFER_BIT;const de=U.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,ze=n.get(U),Be=F.length>1;if(Be)for(let $e=0;$e<F.length;$e++)t.bindFramebuffer(i.FRAMEBUFFER,ze.__webglMultisampledFramebuffer),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0+$e,i.RENDERBUFFER,null),t.bindFramebuffer(i.FRAMEBUFFER,ze.__webglFramebuffer),i.framebufferTexture2D(i.DRAW_FRAMEBUFFER,i.COLOR_ATTACHMENT0+$e,i.TEXTURE_2D,null,0);t.bindFramebuffer(i.READ_FRAMEBUFFER,ze.__webglMultisampledFramebuffer);const Ke=U.texture.mipmaps;Ke&&Ke.length>0?t.bindFramebuffer(i.DRAW_FRAMEBUFFER,ze.__webglFramebuffer[0]):t.bindFramebuffer(i.DRAW_FRAMEBUFFER,ze.__webglFramebuffer);for(let $e=0;$e<F.length;$e++){if(U.resolveDepthBuffer&&(U.depthBuffer&&(he|=i.DEPTH_BUFFER_BIT),U.stencilBuffer&&U.resolveStencilBuffer&&(he|=i.STENCIL_BUFFER_BIT)),Be){i.framebufferRenderbuffer(i.READ_FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.RENDERBUFFER,ze.__webglColorRenderbuffer[$e]);const Fe=n.get(F[$e]).__webglTexture;i.framebufferTexture2D(i.DRAW_FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,Fe,0)}i.blitFramebuffer(0,0,ne,se,0,0,ne,se,he,i.NEAREST),l===!0&&(Ee.length=0,be.length=0,Ee.push(i.COLOR_ATTACHMENT0+$e),U.depthBuffer&&U.resolveDepthBuffer===!1&&(Ee.push(de),be.push(de),i.invalidateFramebuffer(i.DRAW_FRAMEBUFFER,be)),i.invalidateFramebuffer(i.READ_FRAMEBUFFER,Ee))}if(t.bindFramebuffer(i.READ_FRAMEBUFFER,null),t.bindFramebuffer(i.DRAW_FRAMEBUFFER,null),Be)for(let $e=0;$e<F.length;$e++){t.bindFramebuffer(i.FRAMEBUFFER,ze.__webglMultisampledFramebuffer),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0+$e,i.RENDERBUFFER,ze.__webglColorRenderbuffer[$e]);const Fe=n.get(F[$e]).__webglTexture;t.bindFramebuffer(i.FRAMEBUFFER,ze.__webglFramebuffer),i.framebufferTexture2D(i.DRAW_FRAMEBUFFER,i.COLOR_ATTACHMENT0+$e,i.TEXTURE_2D,Fe,0)}t.bindFramebuffer(i.DRAW_FRAMEBUFFER,ze.__webglMultisampledFramebuffer)}else if(U.depthBuffer&&U.resolveDepthBuffer===!1&&l){const F=U.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT;i.invalidateFramebuffer(i.DRAW_FRAMEBUFFER,[F])}}}function J(U){return Math.min(r.maxSamples,U.samples)}function Ue(U){const F=n.get(U);return U.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&F.__useRenderToTexture!==!1}function Ne(U){const F=o.render.frame;u.get(U)!==F&&(u.set(U,F),U.update())}function ke(U,F){const ne=U.colorSpace,se=U.format,he=U.type;return U.isCompressedTexture===!0||U.isVideoTexture===!0||ne!==Tr&&ne!==Va&&(Yt.getTransfer(ne)===vn?(se!==Ni||he!==jr)&&at("WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):bt("WebGLTextures: Unsupported texture color space:",ne)),F}function Ae(U){return typeof HTMLImageElement<"u"&&U instanceof HTMLImageElement?(c.width=U.naturalWidth||U.width,c.height=U.naturalHeight||U.height):typeof VideoFrame<"u"&&U instanceof VideoFrame?(c.width=U.displayWidth,c.height=U.displayHeight):(c.width=U.width,c.height=U.height),c}this.allocateTextureUnit=k,this.resetTextureUnits=N,this.setTexture2D=z,this.setTexture2DArray=W,this.setTexture3D=V,this.setTextureCube=G,this.rebindTextures=tt,this.setupRenderTarget=Pe,this.updateRenderTargetMipmap=me,this.updateMultisampleRenderTarget=$,this.setupDepthRenderbuffer=De,this.setupFrameBufferTexture=re,this.useMultisampledRTT=Ue,this.isReversedDepthBuffer=function(){return t.buffers.depth.getReversed()}}function cF(i,e){function t(n,r=Va){let s;const o=Yt.getTransfer(r);if(n===jr)return i.UNSIGNED_BYTE;if(n===r1)return i.UNSIGNED_SHORT_4_4_4_4;if(n===s1)return i.UNSIGNED_SHORT_5_5_5_1;if(n===rw)return i.UNSIGNED_INT_5_9_9_9_REV;if(n===sw)return i.UNSIGNED_INT_10F_11F_11F_REV;if(n===nw)return i.BYTE;if(n===iw)return i.SHORT;if(n===Yf)return i.UNSIGNED_SHORT;if(n===i1)return i.INT;if(n===Mo)return i.UNSIGNED_INT;if(n===Vr)return i.FLOAT;if(n===sr)return i.HALF_FLOAT;if(n===ow)return i.ALPHA;if(n===aw)return i.RGB;if(n===Ni)return i.RGBA;if(n===ba)return i.DEPTH_COMPONENT;if(n===Jl)return i.DEPTH_STENCIL;if(n===o1)return i.RED;if(n===Ym)return i.RED_INTEGER;if(n===Xu)return i.RG;if(n===a1)return i.RG_INTEGER;if(n===l1)return i.RGBA_INTEGER;if(n===Vp||n===Xp||n===Yp||n===Jp)if(o===vn)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(n===Vp)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===Xp)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===Yp)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===Jp)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(n===Vp)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===Xp)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===Yp)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===Jp)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===Vv||n===Xv||n===Yv||n===Jv)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(n===Vv)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===Xv)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===Yv)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===Jv)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===Kv||n===qv||n===Zv||n===Qv||n===$v||n===ey||n===ty)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(n===Kv||n===qv)return o===vn?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(n===Zv)return o===vn?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC;if(n===Qv)return s.COMPRESSED_R11_EAC;if(n===$v)return s.COMPRESSED_SIGNED_R11_EAC;if(n===ey)return s.COMPRESSED_RG11_EAC;if(n===ty)return s.COMPRESSED_SIGNED_RG11_EAC}else return null;if(n===ny||n===iy||n===ry||n===sy||n===oy||n===ay||n===ly||n===cy||n===uy||n===dy||n===fy||n===hy||n===py||n===my)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(n===ny)return o===vn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===iy)return o===vn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===ry)return o===vn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===sy)return o===vn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===oy)return o===vn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===ay)return o===vn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===ly)return o===vn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===cy)return o===vn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===uy)return o===vn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===dy)return o===vn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===fy)return o===vn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===hy)return o===vn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===py)return o===vn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===my)return o===vn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===gy||n===xy||n===vy)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(n===gy)return o===vn?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===xy)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===vy)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===yy||n===_y||n===Sy||n===by)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(n===yy)return s.COMPRESSED_RED_RGTC1_EXT;if(n===_y)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===Sy)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===by)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===Jf?i.UNSIGNED_INT_24_8:i[n]!==void 0?i[n]:null}return{convert:t}}const TV=` 4068void main() { 4069 4070 gl_Position = vec4( position, 1.0 ); 4071 4072}`,EV=` 4073uniform sampler2DArray depthColor; 4074uniform float depthWidth; 4075uniform float depthHeight; 4076 4077void main() { 4078 4079 vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight ); 4080 4081 if ( coord.x >= 1.0 ) { 4082 4083 gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r; 4084 4085 } else { 4086 4087 gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r; 4088 4089 } 4090 4091}`;class CV{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t){if(this.texture===null){const n=new vw(e.texture);(e.depthNear!==t.depthNear||e.depthFar!==t.depthFar)&&(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=n}}getMesh(e){if(this.texture!==null&&this.mesh===null){const t=e.cameras[0].viewport,n=new dn({vertexShader:TV,fragmentShader:EV,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new Kt(new ks(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class RV extends Aa{constructor(e,t){super();const n=this;let r=null,s=1,o=null,a="local-floor",l=1,c=null,u=null,d=null,p=null,m=null,x=null;const v=typeof XRWebGLBinding<"u",_=new CV,g={},S=t.getContextAttributes();let b=null,A=null;const w=[],C=[],P=new xe;let B=null;const R=new wn;R.viewport=new on;const E=new wn;E.viewport=new on;const L=[R,E],N=new KD;let k=null,Y=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(K){let q=w[K];return q===void 0&&(q=new Zx,w[K]=q),q.getTargetRaySpace()},this.getControllerGrip=function(K){let q=w[K];return q===void 0&&(q=new Zx,w[K]=q),q.getGripSpace()},this.getHand=function(K){let q=w[K];return q===void 0&&(q=new Zx,w[K]=q),q.getHandSpace()};function z(K){const q=C.indexOf(K.inputSource);if(q===-1)return;const re=w[q];re!==void 0&&(re.update(K.inputSource,K.frame,c||o),re.dispatchEvent({type:K.type,data:K.inputSource}))}function W(){r.removeEventListener("select",z),r.removeEventListener("selectstart",z),r.removeEventListener("selectend",z),r.removeEventListener("squeeze",z),r.removeEventListener("squeezestart",z),r.removeEventListener("squeezeend",z),r.removeEventListener("end",W),r.removeEventListener("inputsourceschange",V);for(let K=0;K<w.length;K++){const q=C[K];q!==null&&(C[K]=null,w[K].disconnect(q))}k=null,Y=null,_.reset();for(const K in g)delete g[K];e.setRenderTarget(b),m=null,p=null,d=null,r=null,A=null,Ye.stop(),n.isPresenting=!1,e.setPixelRatio(B),e.setSize(P.width,P.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(K){s=K,n.isPresenting===!0&&at("WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(K){a=K,n.isPresenting===!0&&at("WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||o},this.setReferenceSpace=function(K){c=K},this.getBaseLayer=function(){return p!==null?p:m},this.getBinding=function(){return d===null&&v&&(d=new XRWebGLBinding(r,t)),d},this.getFrame=function(){return x},this.getSession=function(){return r},this.setSession=async function(K){if(r=K,r!==null){if(b=e.getRenderTarget(),r.addEventListener("select",z),r.addEventListener("selectstart",z),r.addEventListener("selectend",z),r.addEventListener("squeeze",z),r.addEventListener("squeezestart",z),r.addEventListener("squeezeend",z),r.addEventListener("end",W),r.addEventListener("inputsourceschange",V),S.xrCompatible!==!0&&await t.makeXRCompatible(),B=e.getPixelRatio(),e.getSize(P),v&&"createProjectionLayer"in XRWebGLBinding.prototype){let re=null,Ce=null,Te=null;S.depth&&(Te=S.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,re=S.stencil?Jl:ba,Ce=S.stencil?Jf:Mo);const De={colorFormat:t.RGBA8,depthFormat:Te,scaleFactor:s};d=this.getBinding(),p=d.createProjectionLayer(De),r.updateRenderState({layers:[p]}),e.setPixelRatio(1),e.setSize(p.textureWidth,p.textureHeight,!1),A=new Gn(p.textureWidth,p.textureHeight,{format:Ni,type:jr,depthTexture:new $f(p.textureWidth,p.textureHeight,Ce,void 0,void 0,void 0,void 0,void 0,void 0,re),stencilBuffer:S.stencil,colorSpace:e.outputColorSpace,samples:S.antialias?4:0,resolveDepthBuffer:p.ignoreDepthValues===!1,resolveStencilBuffer:p.ignoreDepthValues===!1})}else{const re={antialias:S.antialias,alpha:!0,depth:S.depth,stencil:S.stencil,framebufferScaleFactor:s};m=new XRWebGLLayer(r,t,re),r.updateRenderState({baseLayer:m}),e.setPixelRatio(1),e.setSize(m.framebufferWidth,m.framebufferHeight,!1),A=new Gn(m.framebufferWidth,m.framebufferHeight,{format:Ni,type:jr,colorSpace:e.outputColorSpace,stencilBuffer:S.stencil,resolveDepthBuffer:m.ignoreDepthValues===!1,resolveStencilBuffer:m.ignoreDepthValues===!1})}A.isXRRenderTarget=!0,this.setFoveation(l),c=null,o=await r.requestReferenceSpace(a),Ye.setContext(r),Ye.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(r!==null)return r.environmentBlendMode},this.getDepthTexture=function(){return _.getDepthTexture()};function V(K){for(let q=0;q<K.removed.length;q++){const re=K.removed[q],Ce=C.indexOf(re);Ce>=0&&(C[Ce]=null,w[Ce].disconnect(re))}for(let q=0;q<K.added.length;q++){const re=K.added[q];let Ce=C.indexOf(re);if(Ce===-1){for(let De=0;De<w.length;De++)if(De>=C.length){C.push(re),Ce=De;break}else if(C[De]===null){C[De]=re,Ce=De;break}if(Ce===-1)break}const Te=w[Ce];Te&&Te.connect(re)}}const G=new H,Z=new H;function O(K,q,re){G.setFromMatrixPosition(q.matrixWorld),Z.setFromMatrixPosition(re.matrixWorld);const Ce=G.distanceTo(Z),Te=q.projectionMatrix.elements,De=re.projectionMatrix.elements,tt=Te[14]/(Te[10]-1),Pe=Te[14]/(Te[10]+1),me=(Te[9]+1)/Te[5],Ee=(Te[9]-1)/Te[5],be=(Te[8]-1)/Te[0],$=(De[8]+1)/De[0],J=tt*be,Ue=tt*$,Ne=Ce/(-be+$),ke=Ne*-be;if(q.matrixWorld.decompose(K.position,K.quaternion,K.scale),K.translateX(ke),K.translateZ(Ne),K.matrixWorld.compose(K.position,K.quaternion,K.scale),K.matrixWorldInverse.copy(K.matrixWorld).invert(),Te[10]===-1)K.projectionMatrix.copy(q.projectionMatrix),K.projectionMatrixInverse.copy(q.projectionMatrixInverse);else{const Ae=tt+Ne,U=Pe+Ne,F=J-ke,ne=Ue+(Ce-ke),se=me*Pe/U*Ae,he=Ee*Pe/U*Ae;K.projectionMatrix.makePerspective(F,ne,se,he,Ae,U),K.projectionMatrixInverse.copy(K.projectionMatrix).invert()}}function ee(K,q){q===null?K.matrixWorld.copy(K.matrix):K.matrixWorld.multiplyMatrices(q.matrixWorld,K.matrix),K.matrixWorldInverse.copy(K.matrixWorld).invert()}this.updateCamera=function(K){if(r===null)return;let q=K.near,re=K.far;_.texture!==null&&(_.depthNear>0&&(q=_.depthNear),_.depthFar>0&&(re=_.depthFar)),N.near=E.near=R.near=q,N.far=E.far=R.far=re,(k!==N.near||Y!==N.far)&&(r.updateRenderState({depthNear:N.near,depthFar:N.far}),k=N.near,Y=N.far),N.layers.mask=K.layers.mask|6,R.layers.mask=N.layers.mask&3,E.layers.mask=N.layers.mask&5;const Ce=K.parent,Te=N.cameras;ee(N,Ce);for(let De=0;De<Te.length;De++)ee(Te[De],Ce);Te.length===2?O(N,R,E):N.projectionMatrix.copy(R.projectionMatrix),le(K,N,Ce)};function le(K,q,re){re===null?K.matrix.copy(q.matrixWorld):(K.matrix.copy(re.matrixWorld),K.matrix.invert(),K.matrix.multiply(q.matrixWorld)),K.matrix.decompose(K.position,K.quaternion,K.scale),K.updateMatrixWorld(!0),K.projectionMatrix.copy(q.projectionMatrix),K.projectionMatrixInverse.copy(q.projectionMatrixInverse),K.isPerspectiveCamera&&(K.fov=Zf*2*Math.atan(1/K.projectionMatrix.elements[5]),K.zoom=1)}this.getCamera=function(){return N},this.getFoveation=function(){if(!(p===null&&m===null))return l},this.setFoveation=function(K){l=K,p!==null&&(p.fixedFoveation=K),m!==null&&m.fixedFoveation!==void 0&&(m.fixedFoveation=K)},this.hasDepthSensing=function(){return _.texture!==null},this.getDepthSensingMesh=function(){return _.getMesh(N)},this.getCameraTexture=function(K){return g[K]};let ge=null;function Se(K,q){if(u=q.getViewerPose(c||o),x=q,u!==null){const re=u.views;m!==null&&(e.setRenderTargetFramebuffer(A,m.framebuffer),e.setRenderTarget(A));let Ce=!1;re.length!==N.cameras.length&&(N.cameras.length=0,Ce=!0);for(let Pe=0;Pe<re.length;Pe++){const me=re[Pe];let Ee=null;if(m!==null)Ee=m.getViewport(me);else{const $=d.getViewSubImage(p,me);Ee=$.viewport,Pe===0&&(e.setRenderTargetTextures(A,$.colorTexture,$.depthStencilTexture),e.setRenderTarget(A))}let be=L[Pe];be===void 0&&(be=new wn,be.layers.enable(Pe),be.viewport=new on,L[Pe]=be),be.matrix.fromArray(me.transform.matrix),be.matrix.decompose(be.position,be.quaternion,be.scale),be.projectionMatrix.fromArray(me.projectionMatrix),be.projectionMatrixInverse.copy(be.projectionMatrix).invert(),be.viewport.set(Ee.x,Ee.y,Ee.width,Ee.height),Pe===0&&(N.matrix.copy(be.matrix),N.matrix.decompose(N.position,N.quaternion,N.scale)),Ce===!0&&N.cameras.push(be)}const Te=r.enabledFeatures;if(Te&&Te.includes("depth-sensing")&&r.depthUsage=="gpu-optimized"&&v){d=n.getBinding();const Pe=d.getDepthInformation(re[0]);Pe&&Pe.isValid&&Pe.texture&&_.init(Pe,r.renderState)}if(Te&&Te.includes("camera-access")&&v){e.state.unbindTexture(),d=n.getBinding();for(let Pe=0;Pe<re.length;Pe++){const me=re[Pe].camera;if(me){let Ee=g[me];Ee||(Ee=new vw,g[me]=Ee);const be=d.getCameraImage(me);Ee.sourceTexture=be}}}}for(let re=0;re<w.length;re++){const Ce=C[re],Te=w[re];Ce!==null&&Te!==void 0&&Te.update(Ce,q,c||o)}ge&&ge(K,q),q.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:q}),x=null}const Ye=new rF;Ye.setAnimationLoop(Se),this.setAnimationLoop=function(K){ge=K},this.dispose=function(){}}}const tu=new Ys,PV=new _t;function IV(i,e){function t(_,g){_.matrixAutoUpdate===!0&&_.updateMatrix(),g.value.copy(_.matrix)}function n(_,g){g.color.getRGB(_.fogColor.value,gD(i)),g.isFog?(_.fogNear.value=g.near,_.fogFar.value=g.far):g.isFogExp2&&(_.fogDensity.value=g.density)}function r(_,g,S,b,A){g.isMeshBasicMaterial||g.isMeshLambertMaterial?s(_,g):g.isMeshToonMaterial?(s(_,g),d(_,g)):g.isMeshPhongMaterial?(s(_,g),u(_,g)):g.isMeshStandardMaterial?(s(_,g),p(_,g),g.isMeshPhysicalMaterial&&m(_,g,A)):g.isMeshMatcapMaterial?(s(_,g),x(_,g)):g.isMeshDepthMaterial?s(_,g):g.isMeshDistanceMaterial?(s(_,g),v(_,g)):g.isMeshNormalMaterial?s(_,g):g.isLineBasicMaterial?(o(_,g),g.isLineDashedMaterial&&a(_,g)):g.isPointsMaterial?l(_,g,S,b):g.isSpriteMaterial?c(_,g):g.isShadowMaterial?(_.color.value.copy(g.color),_.opacity.value=g.opacity):g.isShaderMaterial&&(g.uniformsNeedUpdate=!1)}function s(_,g){_.opacity.value=g.opacity,g.color&&_.diffuse.value.copy(g.color),g.emissive&&_.emissive.value.copy(g.emissive).multiplyScalar(g.emissiveIntensity),g.map&&(_.map.value=g.map,t(g.map,_.mapTransform)),g.alphaMap&&(_.alphaMap.value=g.alphaMap,t(g.alphaMap,_.alphaMapTransform)),g.bumpMap&&(_.bumpMap.value=g.bumpMap,t(g.bumpMap,_.bumpMapTransform),_.bumpScale.value=g.bumpScale,g.side===Jr&&(_.bumpScale.value*=-1)),g.normalMap&&(_.normalMap.value=g.normalMap,t(g.normalMap,_.normalMapTransform),_.normalScale.value.copy(g.normalScale),g.side===Jr&&_.normalScale.value.negate()),g.displacementMap&&(_.displacementMap.value=g.displacementMap,t(g.displacementMap,_.displacementMapTransform),_.displacementScale.value=g.displacementScale,_.displacementBias.value=g.displacementBias),g.emissiveMap&&(_.emissiveMap.value=g.emissiveMap,t(g.emissiveMap,_.emissiveMapTransform)),g.specularMap&&(_.specularMap.value=g.specularMap,t(g.specularMap,_.specularMapTransform)),g.alphaTest>0&&(_.alphaTest.value=g.alphaTest);const S=e.get(g),b=S.envMap,A=S.envMapRotation;b&&(_.envMap.value=b,tu.copy(A),tu.x*=-1,tu.y*=-1,tu.z*=-1,b.isCubeTexture&&b.isRenderTargetTexture===!1&&(tu.y*=-1,tu.z*=-1),_.envMapRotation.value.setFromMatrix4(PV.makeRotationFromEuler(tu)),_.flipEnvMap.value=b.isCubeTexture&&b.isRenderTargetTexture===!1?-1:1,_.reflectivity.value=g.reflectivity,_.ior.value=g.ior,_.refractionRatio.value=g.refractionRatio),g.lightMap&&(_.lightMap.value=g.lightMap,_.lightMapIntensity.value=g.lightMapIntensity,t(g.lightMap,_.lightMapTransform)),g.aoMap&&(_.aoMap.value=g.aoMap,_.aoMapIntensity.value=g.aoMapIntensity,t(g.aoMap,_.aoMapTransform))}function o(_,g){_.diffuse.value.copy(g.color),_.opacity.value=g.opacity,g.map&&(_.map.value=g.map,t(g.map,_.mapTransform))}function a(_,g){_.dashSize.value=g.dashSize,_.totalSize.value=g.dashSize+g.gapSize,_.scale.value=g.scale}function l(_,g,S,b){_.diffuse.value.copy(g.color),_.opacity.value=g.opacity,_.size.value=g.size*S,_.scale.value=b*.5,g.map&&(_.map.value=g.map,t(g.map,_.uvTransform)),g.alphaMap&&(_.alphaMap.value=g.alphaMap,t(g.alphaMap,_.alphaMapTransform)),g.alphaTest>0&&(_.alphaTest.value=g.alphaTest)}function c(_,g){_.diffuse.value.copy(g.color),_.opacity.value=g.opacity,_.rotation.value=g.rotation,g.map&&(_.map.value=g.map,t(g.map,_.mapTransform)),g.alphaMap&&(_.alphaMap.value=g.alphaMap,t(g.alphaMap,_.alphaMapTransform)),g.alphaTest>0&&(_.alphaTest.value=g.alphaTest)}function u(_,g){_.specular.value.copy(g.specular),_.shininess.value=Math.max(g.shininess,1e-4)}function d(_,g){g.gradientMap&&(_.gradientMap.value=g.gradientMap)}function p(_,g){_.metalness.value=g.metalness,g.metalnessMap&&(_.metalnessMap.value=g.metalnessMap,t(g.metalnessMap,_.metalnessMapTransform)),_.roughness.value=g.roughness,g.roughnessMap&&(_.roughnessMap.value=g.roughnessMap,t(g.roughnessMap,_.roughnessMapTransform)),g.envMap&&(_.envMapIntensity.value=g.envMapIntensity)}function m(_,g,S){_.ior.value=g.ior,g.sheen>0&&(_.sheenColor.value.copy(g.sheenColor).multiplyScalar(g.sheen),_.sheenRoughness.value=g.sheenRoughness,g.sheenColorMap&&(_.sheenColorMap.value=g.sheenColorMap,t(g.sheenColorMap,_.sheenColorMapTransform)),g.sheenRoughnessMap&&(_.sheenRoughnessMap.value=g.sheenRoughnessMap,t(g.sheenRoughnessMap,_.sheenRoughnessMapTransform))),g.clearcoat>0&&(_.clearcoat.value=g.clearcoat,_.clearcoatRoughness.value=g.clearcoatRoughness,g.clearcoatMap&&(_.clearcoatMap.value=g.clearcoatMap,t(g.clearcoatMap,_.clearcoatMapTransform)),g.clearcoatRoughnessMap&&(_.clearcoatRoughnessMap.value=g.clearcoatRoughnessMap,t(g.clearcoatRoughnessMap,_.clearcoatRoughnessMapTransform)),g.clearcoatNormalMap&&(_.clearcoatNormalMap.value=g.clearcoatNormalMap,t(g.clearcoatNormalMap,_.clearcoatNormalMapTransform),_.clearcoatNormalScale.value.copy(g.clearcoatNormalScale),g.side===Jr&&_.clearcoatNormalScale.value.negate())),g.dispersion>0&&(_.dispersion.value=g.dispersion),g.iridescence>0&&(_.iridescence.value=g.iridescence,_.iridescenceIOR.value=g.iridescenceIOR,_.iridescenceThicknessMinimum.value=g.iridescenceThicknessRange[0],_.iridescenceThicknessMaximum.value=g.iridescenceThicknessRange[1],g.iridescenceMap&&(_.iridescenceMap.value=g.iridescenceMap,t(g.iridescenceMap,_.iridescenceMapTransform)),g.iridescenceThicknessMap&&(_.iridescenceThicknessMap.value=g.iridescenceThicknessMap,t(g.iridescenceThicknessMap,_.iridescenceThicknessMapTransform))),g.transmission>0&&(_.transmission.value=g.transmission,_.transmissionSamplerMap.value=S.texture,_.transmissionSamplerSize.value.set(S.width,S.height),g.transmissionMap&&(_.transmissionMap.value=g.transmissionMap,t(g.transmissionMap,_.transmissionMapTransform)),_.thickness.value=g.thickness,g.thicknessMap&&(_.thicknessMap.value=g.thicknessMap,t(g.thicknessMap,_.thicknessMapTransform)),_.attenuationDistance.value=g.attenuationDistance,_.attenuationColor.value.copy(g.attenuationColor)),g.anisotropy>0&&(_.anisotropyVector.value.set(g.anisotropy*Math.cos(g.anisotropyRotation),g.anisotropy*Math.sin(g.anisotropyRotation)),g.anisotropyMap&&(_.anisotropyMap.value=g.anisotropyMap,t(g.anisotropyMap,_.anisotropyMapTransform))),_.specularIntensity.value=g.specularIntensity,_.specularColor.value.copy(g.specularColor),g.specularColorMap&&(_.specularColorMap.value=g.specularColorMap,t(g.specularColorMap,_.specularColorMapTransform)),g.specularIntensityMap&&(_.specularIntensityMap.value=g.specularIntensityMap,t(g.specularIntensityMap,_.specularIntensityMapTransform))}function x(_,g){g.matcap&&(_.matcap.value=g.matcap)}function v(_,g){const S=e.get(g).light;_.referencePosition.value.setFromMatrixPosition(S.matrixWorld),_.nearDistance.value=S.shadow.camera.near,_.farDistance.value=S.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:r}}function LV(i,e,t,n){let r={},s={},o=[];const a=i.getParameter(i.MAX_UNIFORM_BUFFER_BINDINGS);function l(S,b){const A=b.program;n.uniformBlockBinding(S,A)}function c(S,b){let A=r[S.id];A===void 0&&(x(S),A=u(S),r[S.id]=A,S.addEventListener("dispose",_));const w=b.program;n.updateUBOMapping(S,w);const C=e.render.frame;s[S.id]!==C&&(p(S),s[S.id]=C)}function u(S){const b=d();S.__bindingPointIndex=b;const A=i.createBuffer(),w=S.__size,C=S.usage;return i.bindBuffer(i.UNIFORM_BUFFER,A),i.bufferData(i.UNIFORM_BUFFER,w,C),i.bindBuffer(i.UNIFORM_BUFFER,null),i.bindBufferBase(i.UNIFORM_BUFFER,b,A),A}function d(){for(let S=0;S<a;S++)if(o.indexOf(S)===-1)return o.push(S),S;return bt("WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function p(S){const b=r[S.id],A=S.uniforms,w=S.__cache;i.bindBuffer(i.UNIFORM_BUFFER,b);for(let C=0,P=A.length;C<P;C++){const B=Array.isArray(A[C])?A[C]:[A[C]];for(let R=0,E=B.length;R<E;R++){const L=B[R];if(m(L,C,R,w)===!0){const N=L.__offset,k=Array.isArray(L.value)?L.value:[L.value];let Y=0;for(let z=0;z<k.length;z++){const W=k[z],V=v(W);typeof W=="number"||typeof W=="boolean"?(L.__data[0]=W,i.bufferSubData(i.UNIFORM_BUFFER,N+Y,L.__data)):W.isMatrix3?(L.__data[0]=W.elements[0],L.__data[1]=W.elements[1],L.__data[2]=W.elements[2],L.__data[3]=0,L.__data[4]=W.elements[3],L.__data[5]=W.elements[4],L.__data[6]=W.elements[5],L.__data[7]=0,L.__data[8]=W.elements[6],L.__data[9]=W.elements[7],L.__data[10]=W.elements[8],L.__data[11]=0):(W.toArray(L.__data,Y),Y+=V.storage/Float32Array.BYTES_PER_ELEMENT)}i.bufferSubData(i.UNIFORM_BUFFER,N,L.__data)}}}i.bindBuffer(i.UNIFORM_BUFFER,null)}function m(S,b,A,w){const C=S.value,P=b+"_"+A;if(w[P]===void 0)return typeof C=="number"||typeof C=="boolean"?w[P]=C:w[P]=C.clone(),!0;{const B=w[P];if(typeof C=="number"||typeof C=="boolean"){if(B!==C)return w[P]=C,!0}else if(B.equals(C)===!1)return B.copy(C),!0}return!1}function x(S){const b=S.uniforms;let A=0;const w=16;for(let P=0,B=b.length;P<B;P++){const R=Array.isArray(b[P])?b[P]:[b[P]];for(let E=0,L=R.length;E<L;E++){const N=R[E],k=Array.isArray(N.value)?N.value:[N.value];for(let Y=0,z=k.length;Y<z;Y++){const W=k[Y],V=v(W),G=A%w,Z=G%V.boundary,O=G+Z;A+=Z,O!==0&&w-O<V.storage&&(A+=w-O),N.__data=new Float32Array(V.storage/Float32Array.BYTES_PER_ELEMENT),N.__offset=A,A+=V.storage}}}const C=A%w;return C>0&&(A+=w-C),S.__size=A,S.__cache={},this}function v(S){const b={boundary:0,storage:0};return typeof S=="number"||typeof S=="boolean"?(b.boundary=4,b.storage=4):S.isVector2?(b.boundary=8,b.storage=8):S.isVector3||S.isColor?(b.boundary=16,b.storage=12):S.isVector4?(b.boundary=16,b.storage=16):S.isMatrix3?(b.boundary=48,b.storage=48):S.isMatrix4?(b.boundary=64,b.storage=64):S.isTexture?at("WebGLRenderer: Texture samplers can not be part of an uniforms group."):at("WebGLRenderer: Unsupported uniform value type.",S),b}function _(S){const b=S.target;b.removeEventListener("dispose",_);const A=o.indexOf(b.__bindingPointIndex);o.splice(A,1),i.deleteBuffer(r[b.id]),delete r[b.id],delete s[b.id]}function g(){for(const S in r)i.deleteBuffer(r[S]);o=[],r={},s={}}return{bind:l,update:c,dispose:g}}const BV=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,10751,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 ia=null;function DV(){return ia===null&&(ia=new Wo(BV,16,16,Xu,sr),ia.name="DFG_LUT",ia.minFilter=jt,ia.magFilter=jt,ia.wrapS=Mr,ia.wrapT=Mr,ia.generateMipmaps=!1,ia.needsUpdate=!0),ia}class U1{constructor(e={}){const{canvas:t=hD(),context:n=null,depth:r=!0,stencil:s=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:d=!1,reversedDepthBuffer:p=!1,outputBufferType:m=jr}=e;this.isWebGLRenderer=!0;let x;if(n!==null){if(typeof WebGLRenderingContext<"u"&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");x=n.getContextAttributes().alpha}else x=o;const v=m,_=new Set([l1,a1,Ym]),g=new Set([jr,Mo,Yf,Jf,r1,s1]),S=new Uint32Array(4),b=new Int32Array(4);let A=null,w=null;const C=[],P=[];let B=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=zs,this.toneMappingExposure=1,this.transmissionResolutionScale=1;const R=this;let E=!1;this._outputColorSpace=Un;let L=0,N=0,k=null,Y=-1,z=null;const W=new on,V=new on;let G=null;const Z=new Ve(0);let O=0,ee=t.width,le=t.height,ge=1,Se=null,Ye=null;const K=new on(0,0,ee,le),q=new on(0,0,ee,le);let re=!1;const Ce=new uh;let Te=!1,De=!1;const tt=new _t,Pe=new H,me=new on,Ee={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let be=!1;function $(){return k===null?ge:1}let J=n;function Ue(j,oe){return t.getContext(j,oe)}try{const j={alpha:!0,depth:r,stencil:s,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:u,failIfMajorPerformanceCaveat:d};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${jm}`),t.addEventListener("webglcontextlost",lt,!1),t.addEventListener("webglcontextrestored",Pt,!1),t.addEventListener("webglcontextcreationerror",Qe,!1),J===null){const oe="webgl2";if(J=Ue(oe,j),J===null)throw Ue(oe)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(j){throw bt("WebGLRenderer: "+j.message),j}let Ne,ke,Ae,U,F,ne,se,he,de,ze,Be,Ke,$e,Fe,Xe,it,ie,fe,He,Q,je,Re,Ge,Le;function Me(){Ne=new F9(J),Ne.init(),Re=new cF(J,Ne),ke=new T9(J,Ne,e,Re),Ae=new AV(J,Ne),ke.reversedDepthBuffer&&p&&Ae.buffers.depth.setReversed(!0),U=new O9(J),F=new cV,ne=new wV(J,Ne,Ae,F,ke,Re,U),se=new C9(R),he=new D9(R),de=new G6(J),Ge=new A9(J,de),ze=new N9(J,de,U,Ge),Be=new z9(J,ze,de,U),He=new U9(J,ke,ne),it=new E9(F),Ke=new lV(R,se,he,Ne,ke,Ge,it),$e=new IV(R,F),Fe=new dV,Xe=new xV(Ne),fe=new M9(R,se,he,Ae,Be,x,l),ie=new bV(R,Be,ke),Le=new LV(J,U,ke,Ae),Q=new w9(J,Ne,U),je=new k9(J,Ne,U),U.programs=Ke.programs,R.capabilities=ke,R.extensions=Ne,R.properties=F,R.renderLists=Fe,R.shadowMap=ie,R.state=Ae,R.info=U}Me(),v!==jr&&(B=new G9(v,t.width,t.height,r,s));const Oe=new RV(R,J);this.xr=Oe,this.getContext=function(){return J},this.getContextAttributes=function(){return J.getContextAttributes()},this.forceContextLoss=function(){const j=Ne.get("WEBGL_lose_context");j&&j.loseContext()},this.forceContextRestore=function(){const j=Ne.get("WEBGL_lose_context");j&&j.restoreContext()},this.getPixelRatio=function(){return ge},this.setPixelRatio=function(j){j!==void 0&&(ge=j,this.setSize(ee,le,!1))},this.getSize=function(j){return j.set(ee,le)},this.setSize=function(j,oe,_e=!0){if(Oe.isPresenting){at("WebGLRenderer: Can't change size while VR device is presenting.");return}ee=j,le=oe,t.width=Math.floor(j*ge),t.height=Math.floor(oe*ge),_e===!0&&(t.style.width=j+"px",t.style.height=oe+"px"),B!==null&&B.setSize(t.width,t.height),this.setViewport(0,0,j,oe)},this.getDrawingBufferSize=function(j){return j.set(ee*ge,le*ge).floor()},this.setDrawingBufferSize=function(j,oe,_e){ee=j,le=oe,ge=_e,t.width=Math.floor(j*_e),t.height=Math.floor(oe*_e),this.setViewport(0,0,j,oe)},this.setEffects=function(j){if(v===jr){console.error("THREE.WebGLRenderer: setEffects() requires outputBufferType set to HalfFloatType or FloatType.");return}if(j){for(let oe=0;oe<j.length;oe++)if(j[oe].isOutputPass===!0){console.warn("THREE.WebGLRenderer: OutputPass is not needed in setEffects(). Tone mapping and color space conversion are applied automatically.");break}}B.setEffects(j||[])},this.getCurrentViewport=function(j){return j.copy(W)},this.getViewport=function(j){return j.copy(K)},this.setViewport=function(j,oe,_e,ye){j.isVector4?K.set(j.x,j.y,j.z,j.w):K.set(j,oe,_e,ye),Ae.viewport(W.copy(K).multiplyScalar(ge).round())},this.getScissor=function(j){return j.copy(q)},this.setScissor=function(j,oe,_e,ye){j.isVector4?q.set(j.x,j.y,j.z,j.w):q.set(j,oe,_e,ye),Ae.scissor(V.copy(q).multiplyScalar(ge).round())},this.getScissorTest=function(){return re},this.setScissorTest=function(j){Ae.setScissorTest(re=j)},this.setOpaqueSort=function(j){Se=j},this.setTransparentSort=function(j){Ye=j},this.getClearColor=function(j){return j.copy(fe.getClearColor())},this.setClearColor=function(){fe.setClearColor(...arguments)},this.getClearAlpha=function(){return fe.getClearAlpha()},this.setClearAlpha=function(){fe.setClearAlpha(...arguments)},this.clear=function(j=!0,oe=!0,_e=!0){let ye=0;if(j){let pe=!1;if(k!==null){const qe=k.texture.format;pe=_.has(qe)}if(pe){const qe=k.texture.type,st=g.has(qe),We=fe.getClearColor(),Je=fe.getClearAlpha(),pt=We.r,gt=We.g,ht=We.b;st?(S[0]=pt,S[1]=gt,S[2]=ht,S[3]=Je,J.clearBufferuiv(J.COLOR,0,S)):(b[0]=pt,b[1]=gt,b[2]=ht,b[3]=Je,J.clearBufferiv(J.COLOR,0,b))}else ye|=J.COLOR_BUFFER_BIT}oe&&(ye|=J.DEPTH_BUFFER_BIT),_e&&(ye|=J.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),J.clear(ye)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",lt,!1),t.removeEventListener("webglcontextrestored",Pt,!1),t.removeEventListener("webglcontextcreationerror",Qe,!1),fe.dispose(),Fe.dispose(),Xe.dispose(),F.dispose(),se.dispose(),he.dispose(),Be.dispose(),Ge.dispose(),Le.dispose(),Ke.dispose(),Oe.dispose(),Oe.removeEventListener("sessionstart",tn),Oe.removeEventListener("sessionend",Lt),cn.stop()};function lt(j){j.preventDefault(),Pm("WebGLRenderer: Context Lost."),E=!0}function Pt(){Pm("WebGLRenderer: Context Restored."),E=!1;const j=U.autoReset,oe=ie.enabled,_e=ie.autoUpdate,ye=ie.needsUpdate,pe=ie.type;Me(),U.autoReset=j,ie.enabled=oe,ie.autoUpdate=_e,ie.needsUpdate=ye,ie.type=pe}function Qe(j){bt("WebGLRenderer: A WebGL context could not be created. Reason: ",j.statusMessage)}function rt(j){const oe=j.target;oe.removeEventListener("dispose",rt),Mt(oe)}function Mt(j){nt(j),F.remove(j)}function nt(j){const oe=F.get(j).programs;oe!==void 0&&(oe.forEach(function(_e){Ke.releaseProgram(_e)}),j.isShaderMaterial&&Ke.releaseShaderCache(j))}this.renderBufferDirect=function(j,oe,_e,ye,pe,qe){oe===null&&(oe=Ee);const st=pe.isMesh&&pe.matrixWorld.determinant()<0,We=ai(j,oe,_e,ye,pe);Ae.setMaterial(ye,st);let Je=_e.index,pt=1;if(ye.wireframe===!0){if(Je=ze.getWireframeAttribute(_e),Je===void 0)return;pt=2}const gt=_e.drawRange,ht=_e.attributes.position;let Bt=gt.start*pt,nn=(gt.start+gt.count)*pt;qe!==null&&(Bt=Math.max(Bt,qe.start*pt),nn=Math.min(nn,(qe.start+qe.count)*pt)),Je!==null?(Bt=Math.max(Bt,0),nn=Math.min(nn,Je.count)):ht!=null&&(Bt=Math.max(Bt,0),nn=Math.min(nn,ht.count));const Zt=nn-Bt;if(Zt<0||Zt===1/0)return;Ge.setup(pe,ye,We,_e,Je);let Tn,yn=Q;if(Je!==null&&(Tn=de.get(Je),yn=je,yn.setIndex(Tn)),pe.isMesh)ye.wireframe===!0?(Ae.setLineWidth(ye.wireframeLinewidth*$()),yn.setMode(J.LINES)):yn.setMode(J.TRIANGLES);else if(pe.isLine){let wt=ye.linewidth;wt===void 0&&(wt=1),Ae.setLineWidth(wt*$()),pe.isLineSegments?yn.setMode(J.LINES):pe.isLineLoop?yn.setMode(J.LINE_LOOP):yn.setMode(J.LINE_STRIP)}else pe.isPoints?yn.setMode(J.POINTS):pe.isSprite&&yn.setMode(J.TRIANGLES);if(pe.isBatchedMesh)if(pe._multiDrawInstances!==null)qf("WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),yn.renderMultiDrawInstances(pe._multiDrawStarts,pe._multiDrawCounts,pe._multiDrawCount,pe._multiDrawInstances);else if(Ne.get("WEBGL_multi_draw"))yn.renderMultiDraw(pe._multiDrawStarts,pe._multiDrawCounts,pe._multiDrawCount);else{const wt=pe._multiDrawStarts,ln=pe._multiDrawCounts,rn=pe._multiDrawCount,Fn=Je?de.get(Je).bytesPerElement:1,pl=F.get(ye).currentProgram.getUniforms();for(let Pr=0;Pr<rn;Pr++)pl.setValue(J,"_gl_DrawID",Pr),yn.render(wt[Pr]/Fn,ln[Pr])}else if(pe.isInstancedMesh)yn.renderInstances(Bt,Zt,pe.count);else if(_e.isInstancedBufferGeometry){const wt=_e._maxInstanceCount!==void 0?_e._maxInstanceCount:1/0,ln=Math.min(_e.instanceCount,wt);yn.renderInstances(Bt,Zt,ln)}else yn.render(Bt,Zt)};function yt(j,oe,_e){j.transparent===!0&&j.side===Di&&j.forceSinglePass===!1?(j.side=Jr,j.needsUpdate=!0,hn(j,oe,_e),j.side=So,j.needsUpdate=!0,hn(j,oe,_e),j.side=Di):hn(j,oe,_e)}this.compile=function(j,oe,_e=null){_e===null&&(_e=j),w=Xe.get(_e),w.init(oe),P.push(w),_e.traverseVisible(function(pe){pe.isLight&&pe.layers.test(oe.layers)&&(w.pushLight(pe),pe.castShadow&&w.pushShadow(pe))}),j!==_e&&j.traverseVisible(function(pe){pe.isLight&&pe.layers.test(oe.layers)&&(w.pushLight(pe),pe.castShadow&&w.pushShadow(pe))}),w.setupLights();const ye=new Set;return j.traverse(function(pe){if(!(pe.isMesh||pe.isPoints||pe.isLine||pe.isSprite))return;const qe=pe.material;if(qe)if(Array.isArray(qe))for(let st=0;st<qe.length;st++){const We=qe[st];yt(We,_e,pe),ye.add(We)}else yt(qe,_e,pe),ye.add(qe)}),w=P.pop(),ye},this.compileAsync=function(j,oe,_e=null){const ye=this.compile(j,oe,_e);return new Promise(pe=>{function qe(){if(ye.forEach(function(st){F.get(st).currentProgram.isReady()&&ye.delete(st)}),ye.size===0){pe(j);return}setTimeout(qe,10)}Ne.get("KHR_parallel_shader_compile")!==null?qe():setTimeout(qe,10)})};let ft=null;function Tt(j){ft&&ft(j)}function tn(){cn.stop()}function Lt(){cn.start()}const cn=new rF;cn.setAnimationLoop(Tt),typeof self<"u"&&cn.setContext(self),this.setAnimationLoop=function(j){ft=j,Oe.setAnimationLoop(j),j===null?cn.stop():cn.start()},Oe.addEventListener("sessionstart",tn),Oe.addEventListener("sessionend",Lt),this.render=function(j,oe){if(oe!==void 0&&oe.isCamera!==!0){bt("WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(E===!0)return;const _e=Oe.enabled===!0&&Oe.isPresenting===!0,ye=B!==null&&(k===null||_e)&&B.begin(R,k);if(j.matrixWorldAutoUpdate===!0&&j.updateMatrixWorld(),oe.parent===null&&oe.matrixWorldAutoUpdate===!0&&oe.updateMatrixWorld(),Oe.enabled===!0&&Oe.isPresenting===!0&&(B===null||B.isCompositing()===!1)&&(Oe.cameraAutoUpdate===!0&&Oe.updateCamera(oe),oe=Oe.getCamera()),j.isScene===!0&&j.onBeforeRender(R,j,oe,k),w=Xe.get(j,P.length),w.init(oe),P.push(w),tt.multiplyMatrices(oe.projectionMatrix,oe.matrixWorldInverse),Ce.setFromProjectionMatrix(tt,Fs,oe.reversedDepth),De=this.localClippingEnabled,Te=it.init(this.clippingPlanes,De),A=Fe.get(j,C.length),A.init(),C.push(A),Oe.enabled===!0&&Oe.isPresenting===!0){const st=R.xr.getDepthSensingMesh();st!==null&&Dn(st,oe,-1/0,R.sortObjects)}Dn(j,oe,0,R.sortObjects),A.finish(),R.sortObjects===!0&&A.sort(Se,Ye),be=Oe.enabled===!1||Oe.isPresenting===!1||Oe.hasDepthSensing()===!1,be&&fe.addToRenderList(A,j),this.info.render.frame++,Te===!0&&it.beginShadows();const pe=w.state.shadowsArray;if(ie.render(pe,j,oe),Te===!0&&it.endShadows(),this.info.autoReset===!0&&this.info.reset(),(ye&&B.hasRenderPass())===!1){const st=A.opaque,We=A.transmissive;if(w.setupLights(),oe.isArrayCamera){const Je=oe.cameras;if(We.length>0)for(let pt=0,gt=Je.length;pt<gt;pt++){const ht=Je[pt];fn(st,We,j,ht)}be&&fe.render(j);for(let pt=0,gt=Je.length;pt<gt;pt++){const ht=Je[pt];bn(A,j,ht,ht.viewport)}}else We.length>0&&fn(st,We,j,oe),be&&fe.render(j),bn(A,j,oe)}k!==null&&N===0&&(ne.updateMultisampleRenderTarget(k),ne.updateRenderTargetMipmap(k)),ye&&B.end(R),j.isScene===!0&&j.onAfterRender(R,j,oe),Ge.resetDefaultState(),Y=-1,z=null,P.pop(),P.length>0?(w=P[P.length-1],Te===!0&&it.setGlobalState(R.clippingPlanes,w.state.camera)):w=null,C.pop(),C.length>0?A=C[C.length-1]:A=null};function Dn(j,oe,_e,ye){if(j.visible===!1)return;if(j.layers.test(oe.layers)){if(j.isGroup)_e=j.renderOrder;else if(j.isLOD)j.autoUpdate===!0&&j.update(oe);else if(j.isLight)w.pushLight(j),j.castShadow&&w.pushShadow(j);else if(j.isSprite){if(!j.frustumCulled||Ce.intersectsSprite(j)){ye&&me.setFromMatrixPosition(j.matrixWorld).applyMatrix4(tt);const st=Be.update(j),We=j.material;We.visible&&A.push(j,st,We,_e,me.z,null)}}else if((j.isMesh||j.isLine||j.isPoints)&&(!j.frustumCulled||Ce.intersectsObject(j))){const st=Be.update(j),We=j.material;if(ye&&(j.boundingSphere!==void 0?(j.boundingSphere===null&&j.computeBoundingSphere(),me.copy(j.boundingSphere.center)):(st.boundingSphere===null&&st.computeBoundingSphere(),me.copy(st.boundingSphere.center)),me.applyMatrix4(j.matrixWorld).applyMatrix4(tt)),Array.isArray(We)){const Je=st.groups;for(let pt=0,gt=Je.length;pt<gt;pt++){const ht=Je[pt],Bt=We[ht.materialIndex];Bt&&Bt.visible&&A.push(j,st,Bt,_e,me.z,ht)}}else We.visible&&A.push(j,st,We,_e,me.z,null)}}const qe=j.children;for(let st=0,We=qe.length;st<We;st++)Dn(qe[st],oe,_e,ye)}function bn(j,oe,_e,ye){const{opaque:pe,transmissive:qe,transparent:st}=j;w.setupLightsView(_e),Te===!0&&it.setGlobalState(R.clippingPlanes,_e),ye&&Ae.viewport(W.copy(ye)),pe.length>0&&qt(pe,oe,_e),qe.length>0&&qt(qe,oe,_e),st.length>0&&qt(st,oe,_e),Ae.buffers.depth.setTest(!0),Ae.buffers.depth.setMask(!0),Ae.buffers.color.setMask(!0),Ae.setPolygonOffset(!1)}function fn(j,oe,_e,ye){if((_e.isScene===!0?_e.overrideMaterial:null)!==null)return;if(w.state.transmissionRenderTarget[ye.id]===void 0){const Bt=Ne.has("EXT_color_buffer_half_float")||Ne.has("EXT_color_buffer_float");w.state.transmissionRenderTarget[ye.id]=new Gn(1,1,{generateMipmaps:!0,type:Bt?sr:jr,minFilter:as,samples:ke.samples,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Yt.workingColorSpace})}const qe=w.state.transmissionRenderTarget[ye.id],st=ye.viewport||W;qe.setSize(st.z*R.transmissionResolutionScale,st.w*R.transmissionResolutionScale);const We=R.getRenderTarget(),Je=R.getActiveCubeFace(),pt=R.getActiveMipmapLevel();R.setRenderTarget(qe),R.getClearColor(Z),O=R.getClearAlpha(),O<1&&R.setClearColor(16777215,.5),R.clear(),be&&fe.render(_e);const gt=R.toneMapping;R.toneMapping=zs;const ht=ye.viewport;if(ye.viewport!==void 0&&(ye.viewport=void 0),w.setupLightsView(ye),Te===!0&&it.setGlobalState(R.clippingPlanes,ye),qt(j,_e,ye),ne.updateMultisampleRenderTarget(qe),ne.updateRenderTargetMipmap(qe),Ne.has("WEBGL_multisampled_render_to_texture")===!1){let Bt=!1;for(let nn=0,Zt=oe.length;nn<Zt;nn++){const Tn=oe[nn],{object:yn,geometry:wt,material:ln,group:rn}=Tn;if(ln.side===Di&&yn.layers.test(ye.layers)){const Fn=ln.side;ln.side=Jr,ln.needsUpdate=!0,wi(yn,_e,ye,wt,ln,rn),ln.side=Fn,ln.needsUpdate=!0,Bt=!0}}Bt===!0&&(ne.updateMultisampleRenderTarget(qe),ne.updateRenderTargetMipmap(qe))}R.setRenderTarget(We,Je,pt),R.setClearColor(Z,O),ht!==void 0&&(ye.viewport=ht),R.toneMapping=gt}function qt(j,oe,_e){const ye=oe.isScene===!0?oe.overrideMaterial:null;for(let pe=0,qe=j.length;pe<qe;pe++){const st=j[pe],{object:We,geometry:Je,group:pt}=st;let gt=st.material;gt.allowOverride===!0&&ye!==null&&(gt=ye),We.layers.test(_e.layers)&&wi(We,oe,_e,Je,gt,pt)}}function wi(j,oe,_e,ye,pe,qe){j.onBeforeRender(R,oe,_e,ye,pe,qe),j.modelViewMatrix.multiplyMatrices(_e.matrixWorldInverse,j.matrixWorld),j.normalMatrix.getNormalMatrix(j.modelViewMatrix),pe.onBeforeRender(R,oe,_e,ye,j,qe),pe.transparent===!0&&pe.side===Di&&pe.forceSinglePass===!1?(pe.side=Jr,pe.needsUpdate=!0,R.renderBufferDirect(_e,oe,ye,pe,j,qe),pe.side=So,pe.needsUpdate=!0,R.renderBufferDirect(_e,oe,ye,pe,j,qe),pe.side=Di):R.renderBufferDirect(_e,oe,ye,pe,j,qe),j.onAfterRender(R,oe,_e,ye,pe,qe)}function hn(j,oe,_e){oe.isScene!==!0&&(oe=Ee);const ye=F.get(j),pe=w.state.lights,qe=w.state.shadowsArray,st=pe.state.version,We=Ke.getParameters(j,pe.state,qe,oe,_e),Je=Ke.getProgramCacheKey(We);let pt=ye.programs;ye.environment=j.isMeshStandardMaterial?oe.environment:null,ye.fog=oe.fog,ye.envMap=(j.isMeshStandardMaterial?he:se).get(j.envMap||ye.environment),ye.envMapRotation=ye.environment!==null&&j.envMap===null?oe.environmentRotation:j.envMapRotation,pt===void 0&&(j.addEventListener("dispose",rt),pt=new Map,ye.programs=pt);let gt=pt.get(Je);if(gt!==void 0){if(ye.currentProgram===gt&&ye.lightsStateVersion===st)return Rr(j,We),gt}else We.uniforms=Ke.getUniforms(j),j.onBeforeCompile(We,R),gt=Ke.acquireProgram(We,Je),pt.set(Je,gt),ye.uniforms=We.uniforms;const ht=ye.uniforms;return(!j.isShaderMaterial&&!j.isRawShaderMaterial||j.clipping===!0)&&(ht.clippingPlanes=it.uniform),Rr(j,We),ye.needsLights=gi(j),ye.lightsStateVersion=st,ye.needsLights&&(ht.ambientLightColor.value=pe.state.ambient,ht.lightProbe.value=pe.state.probe,ht.directionalLights.value=pe.state.directional,ht.directionalLightShadows.value=pe.state.directionalShadow,ht.spotLights.value=pe.state.spot,ht.spotLightShadows.value=pe.state.spotShadow,ht.rectAreaLights.value=pe.state.rectArea,ht.ltc_1.value=pe.state.rectAreaLTC1,ht.ltc_2.value=pe.state.rectAreaLTC2,ht.pointLights.value=pe.state.point,ht.pointLightShadows.value=pe.state.pointShadow,ht.hemisphereLights.value=pe.state.hemi,ht.directionalShadowMap.value=pe.state.directionalShadowMap,ht.directionalShadowMatrix.value=pe.state.directionalShadowMatrix,ht.spotShadowMap.value=pe.state.spotShadowMap,ht.spotLightMatrix.value=pe.state.spotLightMatrix,ht.spotLightMap.value=pe.state.spotLightMap,ht.pointShadowMap.value=pe.state.pointShadowMap,ht.pointShadowMatrix.value=pe.state.pointShadowMatrix),ye.currentProgram=gt,ye.uniformsList=null,gt}function Ti(j){if(j.uniformsList===null){const oe=j.currentProgram.getUniforms();j.uniformsList=Qx.seqWithValue(oe.seq,j.uniforms)}return j.uniformsList}function Rr(j,oe){const _e=F.get(j);_e.outputColorSpace=oe.outputColorSpace,_e.batching=oe.batching,_e.batchingColor=oe.batchingColor,_e.instancing=oe.instancing,_e.instancingColor=oe.instancingColor,_e.instancingMorph=oe.instancingMorph,_e.skinning=oe.skinning,_e.morphTargets=oe.morphTargets,_e.morphNormals=oe.morphNormals,_e.morphColors=oe.morphColors,_e.morphTargetsCount=oe.morphTargetsCount,_e.numClippingPlanes=oe.numClippingPlanes,_e.numIntersection=oe.numClipIntersection,_e.vertexAlphas=oe.vertexAlphas,_e.vertexTangents=oe.vertexTangents,_e.toneMapping=oe.toneMapping}function ai(j,oe,_e,ye,pe){oe.isScene!==!0&&(oe=Ee),ne.resetTextureUnits();const qe=oe.fog,st=ye.isMeshStandardMaterial?oe.environment:null,We=k===null?R.outputColorSpace:k.isXRRenderTarget===!0?k.texture.colorSpace:Tr,Je=(ye.isMeshStandardMaterial?he:se).get(ye.envMap||st),pt=ye.vertexColors===!0&&!!_e.attributes.color&&_e.attributes.color.itemSize===4,gt=!!_e.attributes.tangent&&(!!ye.normalMap||ye.anisotropy>0),ht=!!_e.morphAttributes.position,Bt=!!_e.morphAttributes.normal,nn=!!_e.morphAttributes.color;let Zt=zs;ye.toneMapped&&(k===null||k.isXRRenderTarget===!0)&&(Zt=R.toneMapping);const Tn=_e.morphAttributes.position||_e.morphAttributes.normal||_e.morphAttributes.color,yn=Tn!==void 0?Tn.length:0,wt=F.get(ye),ln=w.state.lights;if(Te===!0&&(De===!0||j!==z)){const xi=j===z&&ye.id===Y;it.setState(ye,j,xi)}let rn=!1;ye.version===wt.__version?(wt.needsLights&&wt.lightsStateVersion!==ln.state.version||wt.outputColorSpace!==We||pe.isBatchedMesh&&wt.batching===!1||!pe.isBatchedMesh&&wt.batching===!0||pe.isBatchedMesh&&wt.batchingColor===!0&&pe.colorTexture===null||pe.isBatchedMesh&&wt.batchingColor===!1&&pe.colorTexture!==null||pe.isInstancedMesh&&wt.instancing===!1||!pe.isInstancedMesh&&wt.instancing===!0||pe.isSkinnedMesh&&wt.skinning===!1||!pe.isSkinnedMesh&&wt.skinning===!0||pe.isInstancedMesh&&wt.instancingColor===!0&&pe.instanceColor===null||pe.isInstancedMesh&&wt.instancingColor===!1&&pe.instanceColor!==null||pe.isInstancedMesh&&wt.instancingMorph===!0&&pe.morphTexture===null||pe.isInstancedMesh&&wt.instancingMorph===!1&&pe.morphTexture!==null||wt.envMap!==Je||ye.fog===!0&&wt.fog!==qe||wt.numClippingPlanes!==void 0&&(wt.numClippingPlanes!==it.numPlanes||wt.numIntersection!==it.numIntersection)||wt.vertexAlphas!==pt||wt.vertexTangents!==gt||wt.morphTargets!==ht||wt.morphNormals!==Bt||wt.morphColors!==nn||wt.toneMapping!==Zt||wt.morphTargetsCount!==yn)&&(rn=!0):(rn=!0,wt.__version=ye.version);let Fn=wt.currentProgram;rn===!0&&(Fn=hn(ye,oe,pe));let pl=!1,Pr=!1,Pc=!1;const xn=Fn.getUniforms(),Ei=wt.uniforms;if(Ae.useProgram(Fn.program)&&(pl=!0,Pr=!0,Pc=!0),ye.id!==Y&&(Y=ye.id,Pr=!0),pl||z!==j){Ae.buffers.depth.getReversed()&&j.reversedDepth!==!0&&(j._reversedDepth=!0,j.updateProjectionMatrix()),xn.setValue(J,"projectionMatrix",j.projectionMatrix),xn.setValue(J,"viewMatrix",j.matrixWorldInverse);const lr=xn.map.cameraPosition;lr!==void 0&&lr.setValue(J,Pe.setFromMatrixPosition(j.matrixWorld)),ke.logarithmicDepthBuffer&&xn.setValue(J,"logDepthBufFC",2/(Math.log(j.far+1)/Math.LN2)),(ye.isMeshPhongMaterial||ye.isMeshToonMaterial||ye.isMeshLambertMaterial||ye.isMeshBasicMaterial||ye.isMeshStandardMaterial||ye.isShaderMaterial)&&xn.setValue(J,"isOrthographic",j.isOrthographicCamera===!0),z!==j&&(z=j,Pr=!0,Pc=!0)}if(wt.needsLights&&(ln.state.directionalShadowMap.length>0&&xn.setValue(J,"directionalShadowMap",ln.state.directionalShadowMap,ne),ln.state.spotShadowMap.length>0&&xn.setValue(J,"spotShadowMap",ln.state.spotShadowMap,ne),ln.state.pointShadowMap.length>0&&xn.setValue(J,"pointShadowMap",ln.state.pointShadowMap,ne)),pe.isSkinnedMesh){xn.setOptional(J,pe,"bindMatrix"),xn.setOptional(J,pe,"bindMatrixInverse");const xi=pe.skeleton;xi&&(xi.boneTexture===null&&xi.computeBoneTexture(),xn.setValue(J,"boneTexture",xi.boneTexture,ne))}pe.isBatchedMesh&&(xn.setOptional(J,pe,"batchingTexture"),xn.setValue(J,"batchingTexture",pe._matricesTexture,ne),xn.setOptional(J,pe,"batchingIdTexture"),xn.setValue(J,"batchingIdTexture",pe._indirectTexture,ne),xn.setOptional(J,pe,"batchingColorTexture"),pe._colorsTexture!==null&&xn.setValue(J,"batchingColorTexture",pe._colorsTexture,ne));const Ui=_e.morphAttributes;if((Ui.position!==void 0||Ui.normal!==void 0||Ui.color!==void 0)&&He.update(pe,_e,Fn),(Pr||wt.receiveShadow!==pe.receiveShadow)&&(wt.receiveShadow=pe.receiveShadow,xn.setValue(J,"receiveShadow",pe.receiveShadow)),ye.isMeshGouraudMaterial&&ye.envMap!==null&&(Ei.envMap.value=Je,Ei.flipEnvMap.value=Je.isCubeTexture&&Je.isRenderTargetTexture===!1?-1:1),ye.isMeshStandardMaterial&&ye.envMap===null&&oe.environment!==null&&(Ei.envMapIntensity.value=oe.environmentIntensity),Ei.dfgLUT!==void 0&&(Ei.dfgLUT.value=DV()),Pr&&(xn.setValue(J,"toneMappingExposure",R.toneMappingExposure),wt.needsLights&&li(Ei,Pc),qe&&ye.fog===!0&&$e.refreshFogUniforms(Ei,qe),$e.refreshMaterialUniforms(Ei,ye,ge,le,w.state.transmissionRenderTarget[j.id]),Qx.upload(J,Ti(wt),Ei,ne)),ye.isShaderMaterial&&ye.uniformsNeedUpdate===!0&&(Qx.upload(J,Ti(wt),Ei,ne),ye.uniformsNeedUpdate=!1),ye.isSpriteMaterial&&xn.setValue(J,"center",pe.center),xn.setValue(J,"modelViewMatrix",pe.modelViewMatrix),xn.setValue(J,"normalMatrix",pe.normalMatrix),xn.setValue(J,"modelMatrix",pe.matrixWorld),ye.isShaderMaterial||ye.isRawShaderMaterial){const xi=ye.uniformsGroups;for(let lr=0,ph=xi.length;lr<ph;lr++){const To=xi[lr];Le.update(To,Fn),Le.bind(To,Fn)}}return Fn}function li(j,oe){j.ambientLightColor.needsUpdate=oe,j.lightProbe.needsUpdate=oe,j.directionalLights.needsUpdate=oe,j.directionalLightShadows.needsUpdate=oe,j.pointLights.needsUpdate=oe,j.pointLightShadows.needsUpdate=oe,j.spotLights.needsUpdate=oe,j.spotLightShadows.needsUpdate=oe,j.rectAreaLights.needsUpdate=oe,j.hemisphereLights.needsUpdate=oe}function gi(j){return j.isMeshLambertMaterial||j.isMeshToonMaterial||j.isMeshPhongMaterial||j.isMeshStandardMaterial||j.isShadowMaterial||j.isShaderMaterial&&j.lights===!0}this.getActiveCubeFace=function(){return L},this.getActiveMipmapLevel=function(){return N},this.getRenderTarget=function(){return k},this.setRenderTargetTextures=function(j,oe,_e){const ye=F.get(j);ye.__autoAllocateDepthBuffer=j.resolveDepthBuffer===!1,ye.__autoAllocateDepthBuffer===!1&&(ye.__useRenderToTexture=!1),F.get(j.texture).__webglTexture=oe,F.get(j.depthTexture).__webglTexture=ye.__autoAllocateDepthBuffer?void 0:_e,ye.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(j,oe){const _e=F.get(j);_e.__webglFramebuffer=oe,_e.__useDefaultFramebuffer=oe===void 0};const wo=J.createFramebuffer();this.setRenderTarget=function(j,oe=0,_e=0){k=j,L=oe,N=_e;let ye=null,pe=!1,qe=!1;if(j){const We=F.get(j);if(We.__useDefaultFramebuffer!==void 0){Ae.bindFramebuffer(J.FRAMEBUFFER,We.__webglFramebuffer),W.copy(j.viewport),V.copy(j.scissor),G=j.scissorTest,Ae.viewport(W),Ae.scissor(V),Ae.setScissorTest(G),Y=-1;return}else if(We.__webglFramebuffer===void 0)ne.setupRenderTarget(j);else if(We.__hasExternalTextures)ne.rebindTextures(j,F.get(j.texture).__webglTexture,F.get(j.depthTexture).__webglTexture);else if(j.depthBuffer){const gt=j.depthTexture;if(We.__boundDepthTexture!==gt){if(gt!==null&&F.has(gt)&&(j.width!==gt.image.width||j.height!==gt.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");ne.setupDepthRenderbuffer(j)}}const Je=j.texture;(Je.isData3DTexture||Je.isDataArrayTexture||Je.isCompressedArrayTexture)&&(qe=!0);const pt=F.get(j).__webglFramebuffer;j.isWebGLCubeRenderTarget?(Array.isArray(pt[oe])?ye=pt[oe][_e]:ye=pt[oe],pe=!0):j.samples>0&&ne.useMultisampledRTT(j)===!1?ye=F.get(j).__webglMultisampledFramebuffer:Array.isArray(pt)?ye=pt[_e]:ye=pt,W.copy(j.viewport),V.copy(j.scissor),G=j.scissorTest}else W.copy(K).multiplyScalar(ge).floor(),V.copy(q).multiplyScalar(ge).floor(),G=re;if(_e!==0&&(ye=wo),Ae.bindFramebuffer(J.FRAMEBUFFER,ye)&&Ae.drawBuffers(j,ye),Ae.viewport(W),Ae.scissor(V),Ae.setScissorTest(G),pe){const We=F.get(j.texture);J.framebufferTexture2D(J.FRAMEBUFFER,J.COLOR_ATTACHMENT0,J.TEXTURE_CUBE_MAP_POSITIVE_X+oe,We.__webglTexture,_e)}else if(qe){const We=oe;for(let Je=0;Je<j.textures.length;Je++){const pt=F.get(j.textures[Je]);J.framebufferTextureLayer(J.FRAMEBUFFER,J.COLOR_ATTACHMENT0+Je,pt.__webglTexture,_e,We)}}else if(j!==null&&_e!==0){const We=F.get(j.texture);J.framebufferTexture2D(J.FRAMEBUFFER,J.COLOR_ATTACHMENT0,J.TEXTURE_2D,We.__webglTexture,_e)}Y=-1},this.readRenderTargetPixels=function(j,oe,_e,ye,pe,qe,st,We=0){if(!(j&&j.isWebGLRenderTarget)){bt("WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Je=F.get(j).__webglFramebuffer;if(j.isWebGLCubeRenderTarget&&st!==void 0&&(Je=Je[st]),Je){Ae.bindFramebuffer(J.FRAMEBUFFER,Je);try{const pt=j.textures[We],gt=pt.format,ht=pt.type;if(!ke.textureFormatReadable(gt)){bt("WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!ke.textureTypeReadable(ht)){bt("WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}oe>=0&&oe<=j.width-ye&&_e>=0&&_e<=j.height-pe&&(j.textures.length>1&&J.readBuffer(J.COLOR_ATTACHMENT0+We),J.readPixels(oe,_e,ye,pe,Re.convert(gt),Re.convert(ht),qe))}finally{const pt=k!==null?F.get(k).__webglFramebuffer:null;Ae.bindFramebuffer(J.FRAMEBUFFER,pt)}}},this.readRenderTargetPixelsAsync=async function(j,oe,_e,ye,pe,qe,st,We=0){if(!(j&&j.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Je=F.get(j).__webglFramebuffer;if(j.isWebGLCubeRenderTarget&&st!==void 0&&(Je=Je[st]),Je)if(oe>=0&&oe<=j.width-ye&&_e>=0&&_e<=j.height-pe){Ae.bindFramebuffer(J.FRAMEBUFFER,Je);const pt=j.textures[We],gt=pt.format,ht=pt.type;if(!ke.textureFormatReadable(gt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!ke.textureTypeReadable(ht))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");const Bt=J.createBuffer();J.bindBuffer(J.PIXEL_PACK_BUFFER,Bt),J.bufferData(J.PIXEL_PACK_BUFFER,qe.byteLength,J.STREAM_READ),j.textures.length>1&&J.readBuffer(J.COLOR_ATTACHMENT0+We),J.readPixels(oe,_e,ye,pe,Re.convert(gt),Re.convert(ht),0);const nn=k!==null?F.get(k).__webglFramebuffer:null;Ae.bindFramebuffer(J.FRAMEBUFFER,nn);const Zt=J.fenceSync(J.SYNC_GPU_COMMANDS_COMPLETE,0);return J.flush(),await Zz(J,Zt,4),J.bindBuffer(J.PIXEL_PACK_BUFFER,Bt),J.getBufferSubData(J.PIXEL_PACK_BUFFER,0,qe),J.deleteBuffer(Bt),J.deleteSync(Zt),qe}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(j,oe=null,_e=0){const ye=Math.pow(2,-_e),pe=Math.floor(j.image.width*ye),qe=Math.floor(j.image.height*ye),st=oe!==null?oe.x:0,We=oe!==null?oe.y:0;ne.setTexture2D(j,0),J.copyTexSubImage2D(J.TEXTURE_2D,_e,0,0,st,We,pe,qe),Ae.unbindTexture()};const hl=J.createFramebuffer(),ei=J.createFramebuffer();this.copyTextureToTexture=function(j,oe,_e=null,ye=null,pe=0,qe=null){qe===null&&(pe!==0?(qf("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),qe=pe,pe=0):qe=0);let st,We,Je,pt,gt,ht,Bt,nn,Zt;const Tn=j.isCompressedTexture?j.mipmaps[qe]:j.image;if(_e!==null)st=_e.max.x-_e.min.x,We=_e.max.y-_e.min.y,Je=_e.isBox3?_e.max.z-_e.min.z:1,pt=_e.min.x,gt=_e.min.y,ht=_e.isBox3?_e.min.z:0;else{const Ui=Math.pow(2,-pe);st=Math.floor(Tn.width*Ui),We=Math.floor(Tn.height*Ui),j.isDataArrayTexture?Je=Tn.depth:j.isData3DTexture?Je=Math.floor(Tn.depth*Ui):Je=1,pt=0,gt=0,ht=0}ye!==null?(Bt=ye.x,nn=ye.y,Zt=ye.z):(Bt=0,nn=0,Zt=0);const yn=Re.convert(oe.format),wt=Re.convert(oe.type);let ln;oe.isData3DTexture?(ne.setTexture3D(oe,0),ln=J.TEXTURE_3D):oe.isDataArrayTexture||oe.isCompressedArrayTexture?(ne.setTexture2DArray(oe,0),ln=J.TEXTURE_2D_ARRAY):(ne.setTexture2D(oe,0),ln=J.TEXTURE_2D),J.pixelStorei(J.UNPACK_FLIP_Y_WEBGL,oe.flipY),J.pixelStorei(J.UNPACK_PREMULTIPLY_ALPHA_WEBGL,oe.premultiplyAlpha),J.pixelStorei(J.UNPACK_ALIGNMENT,oe.unpackAlignment);const rn=J.getParameter(J.UNPACK_ROW_LENGTH),Fn=J.getParameter(J.UNPACK_IMAGE_HEIGHT),pl=J.getParameter(J.UNPACK_SKIP_PIXELS),Pr=J.getParameter(J.UNPACK_SKIP_ROWS),Pc=J.getParameter(J.UNPACK_SKIP_IMAGES);J.pixelStorei(J.UNPACK_ROW_LENGTH,Tn.width),J.pixelStorei(J.UNPACK_IMAGE_HEIGHT,Tn.height),J.pixelStorei(J.UNPACK_SKIP_PIXELS,pt),J.pixelStorei(J.UNPACK_SKIP_ROWS,gt),J.pixelStorei(J.UNPACK_SKIP_IMAGES,ht);const xn=j.isDataArrayTexture||j.isData3DTexture,Ei=oe.isDataArrayTexture||oe.isData3DTexture;if(j.isDepthTexture){const Ui=F.get(j),xi=F.get(oe),lr=F.get(Ui.__renderTarget),ph=F.get(xi.__renderTarget);Ae.bindFramebuffer(J.READ_FRAMEBUFFER,lr.__webglFramebuffer),Ae.bindFramebuffer(J.DRAW_FRAMEBUFFER,ph.__webglFramebuffer);for(let To=0;To<Je;To++)xn&&(J.framebufferTextureLayer(J.READ_FRAMEBUFFER,J.COLOR_ATTACHMENT0,F.get(j).__webglTexture,pe,ht+To),J.framebufferTextureLayer(J.DRAW_FRAMEBUFFER,J.COLOR_ATTACHMENT0,F.get(oe).__webglTexture,qe,Zt+To)),J.blitFramebuffer(pt,gt,st,We,Bt,nn,st,We,J.DEPTH_BUFFER_BIT,J.NEAREST);Ae.bindFramebuffer(J.READ_FRAMEBUFFER,null),Ae.bindFramebuffer(J.DRAW_FRAMEBUFFER,null)}else if(pe!==0||j.isRenderTargetTexture||F.has(j)){const Ui=F.get(j),xi=F.get(oe);Ae.bindFramebuffer(J.READ_FRAMEBUFFER,hl),Ae.bindFramebuffer(J.DRAW_FRAMEBUFFER,ei);for(let lr=0;lr<Je;lr++)xn?J.framebufferTextureLayer(J.READ_FRAMEBUFFER,J.COLOR_ATTACHMENT0,Ui.__webglTexture,pe,ht+lr):J.framebufferTexture2D(J.READ_FRAMEBUFFER,J.COLOR_ATTACHMENT0,J.TEXTURE_2D,Ui.__webglTexture,pe),Ei?J.framebufferTextureLayer(J.DRAW_FRAMEBUFFER,J.COLOR_ATTACHMENT0,xi.__webglTexture,qe,Zt+lr):J.framebufferTexture2D(J.DRAW_FRAMEBUFFER,J.COLOR_ATTACHMENT0,J.TEXTURE_2D,xi.__webglTexture,qe),pe!==0?J.blitFramebuffer(pt,gt,st,We,Bt,nn,st,We,J.COLOR_BUFFER_BIT,J.NEAREST):Ei?J.copyTexSubImage3D(ln,qe,Bt,nn,Zt+lr,pt,gt,st,We):J.copyTexSubImage2D(ln,qe,Bt,nn,pt,gt,st,We);Ae.bindFramebuffer(J.READ_FRAMEBUFFER,null),Ae.bindFramebuffer(J.DRAW_FRAMEBUFFER,null)}else Ei?j.isDataTexture||j.isData3DTexture?J.texSubImage3D(ln,qe,Bt,nn,Zt,st,We,Je,yn,wt,Tn.data):oe.isCompressedArrayTexture?J.compressedTexSubImage3D(ln,qe,Bt,nn,Zt,st,We,Je,yn,Tn.data):J.texSubImage3D(ln,qe,Bt,nn,Zt,st,We,Je,yn,wt,Tn):j.isDataTexture?J.texSubImage2D(J.TEXTURE_2D,qe,Bt,nn,st,We,yn,wt,Tn.data):j.isCompressedTexture?J.compressedTexSubImage2D(J.TEXTURE_2D,qe,Bt,nn,Tn.width,Tn.height,yn,Tn.data):J.texSubImage2D(J.TEXTURE_2D,qe,Bt,nn,st,We,yn,wt,Tn);J.pixelStorei(J.UNPACK_ROW_LENGTH,rn),J.pixelStorei(J.UNPACK_IMAGE_HEIGHT,Fn),J.pixelStorei(J.UNPACK_SKIP_PIXELS,pl),J.pixelStorei(J.UNPACK_SKIP_ROWS,Pr),J.pixelStorei(J.UNPACK_SKIP_IMAGES,Pc),qe===0&&oe.generateMipmaps&&J.generateMipmap(ln),Ae.unbindTexture()},this.initRenderTarget=function(j){F.get(j).__webglFramebuffer===void 0&&ne.setupRenderTarget(j)},this.initTexture=function(j){j.isCubeTexture?ne.setTextureCube(j,0):j.isData3DTexture?ne.setTexture3D(j,0):j.isDataArrayTexture||j.isCompressedArrayTexture?ne.setTexture2DArray(j,0):ne.setTexture2D(j,0),Ae.unbindTexture()},this.resetState=function(){L=0,N=0,k=null,Ae.reset(),Ge.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Fs}get outputColorSpace(){return this._outputColorSpace}
4091set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=Yt._getDrawingBufferColorSpace(e),t.unpackColorSpace=Yt._getUnpackColorSpace()}}const FV=Object.freeze(Object.defineProperty({__proto__:null,ACESFilmicToneMapping:Vm,AddEquation:Ul,AddOperation:$B,AdditiveAnimationBlendMode:cw,AdditiveBlending:_a,AgXToneMapping:e1,AlphaFormat:ow,AlwaysCompare:uD,AlwaysDepth:Uv,AlwaysStencilFunc:hM,AmbientLight:Dw,AnimationAction:QD,AnimationClip:qu,AnimationLoader:UH,AnimationMixer:$D,AnimationObjectGroup:u6,AnimationUtils:FH,ArcCurve:wD,ArrayCamera:KD,ArrowHelper:D6,AttachedBindMode:fM,Audio:qD,AudioAnalyser:e6,AudioContext:Ow,AudioListener:ZH,AudioLoader:JH,AxesHelper:F6,BackSide:Jr,BasicDepthPacking:iD,BasicShadowMap:BB,BatchedMesh:SD,Bone:Zm,BooleanKeyframeTrack:id,Box2:y6,Box3:jn,Box3Helper:L6,BoxGeometry:td,BoxHelper:I6,BufferAttribute:zt,BufferGeometry:Rt,BufferGeometryLoader:JD,ByteType:nw,Cache:ma,Camera:Km,CameraHelper:P6,CanvasTexture:bD,CapsuleGeometry:S1,CatmullRomCurve3:TD,CineonToneMapping:Qy,CircleGeometry:b1,ClampToEdgeWrapping:Mr,Clock:n0,Color:Ve,ColorKeyframeTrack:Iw,ColorManagement:Yt,CompressedArrayTexture:iH,CompressedCubeTexture:rH,CompressedTexture:_1,CompressedTextureLoader:zH,ConeGeometry:$m,ConstantAlphaFactor:qB,ConstantColorFactor:JB,Controls:iF,CubeCamera:xD,CubeDepthTexture:MD,CubeReflectionMapping:Sa,CubeRefractionMapping:xc,CubeTexture:qm,CubeTextureLoader:HH,CubeUVReflectionMapping:ah,CubicBezierCurve:_w,CubicBezierCurve3:ED,CubicInterpolant:HD,CullFaceBack:cM,CullFaceFront:LB,CullFaceFrontBack:uz,CullFaceNone:IB,Curve:Xo,CurvePath:RD,CustomBlending:DB,CustomToneMapping:$y,CylinderGeometry:Qm,Cylindrical:v6,Data3DTexture:h1,DataArrayTexture:f1,DataTexture:Wo,DataTextureLoader:GH,DataUtils:C8,DecrementStencilOp:wz,DecrementWrapStencilOp:Ez,DefaultLoadingManager:WD,DepthFormat:ba,DepthStencilFormat:Jl,DepthTexture:$f,DetachedBindMode:eD,DirectionalLight:th,DirectionalLightHelper:R6,DiscreteInterpolant:GD,DodecahedronGeometry:M1,DoubleSide:Di,DstAlphaFactor:jB,DstColorFactor:VB,DynamicCopyUsage:Gz,DynamicDrawUsage:Nz,DynamicReadUsage:Uz,EdgesGeometry:AD,EllipseCurve:A1,EqualCompare:aD,EqualDepth:Hv,EqualStencilFunc:Iz,EquirectangularReflectionMapping:Am,EquirectangularRefractionMapping:wm,Euler:Ys,EventDispatcher:Aa,ExternalTexture:vw,ExtrudeGeometry:w1,FileLoader:Er,Float16BufferAttribute:F8,Float32BufferAttribute:ct,FloatType:Vr,Fog:m1,FogExp2:p1,FramebufferTexture:nH,FrontSide:So,Frustum:uh,FrustumArray:v1,GLBufferAttribute:m6,GLSL1:Wz,GLSL3:pM,GreaterCompare:lD,GreaterDepth:jv,GreaterEqualCompare:d1,GreaterEqualDepth:Gv,GreaterEqualStencilFunc:Fz,GreaterStencilFunc:Bz,GridHelper:E6,Group:Ns,HalfFloatType:sr,HemisphereLight:VD,HemisphereLightHelper:T6,IcosahedronGeometry:T1,ImageBitmapLoader:kw,ImageLoader:Dm,ImageUtils:pD,IncrementStencilOp:Az,IncrementWrapStencilOp:Tz,InstancedBufferAttribute:_c,InstancedBufferGeometry:Nw,InstancedInterleavedBuffer:Ey,InstancedMesh:x1,Int16BufferAttribute:B8,Int32BufferAttribute:D8,Int8BufferAttribute:P8,IntType:i1,InterleavedBuffer:lh,InterleavedBufferAttribute:Xr,Interpolant:nd,InterpolateDiscrete:Yu,InterpolateLinear:vc,InterpolateSmooth:qx,InterpolationSamplingMode:Yz,InterpolationSamplingType:Xz,InvertStencilOp:Cz,KeepStencilOp:cu,KeyframeTrack:Ao,LOD:_D,LatheGeometry:E1,Layers:cc,LessCompare:oD,LessDepth:zv,LessEqualCompare:u1,LessEqualDepth:Wu,LessEqualStencilFunc:Lz,LessStencilFunc:Pz,Light:Rc,LightProbe:YD,Line:M
4091a,Line3:tF,LineBasicMaterial:Ai,LineCurve:Sw,LineCurve3:CD,LineDashedMaterial:UD,LineLoop:y1,LineSegments:gs,LinearFilter:jt,LinearInterpolant:Pw,LinearMipMapLinearFilter:pz,LinearMipMapNearestFilter:hz,LinearMipmapLinearFilter:as,LinearMipmapNearestFilter:Lu,LinearSRGBColorSpace:Tr,LinearToneMapping:qy,LinearTransfer:Em,Loader:Ki,LoaderUtils:js,LoadingManager:Lw,LoopOnce:tD,LoopPingPong:nD,LoopRepeat:lw,MOUSE:Cs,Material:Wn,MaterialLoader:N1,MathUtils:Xn,Matrix2:Gw,Matrix3:Nt,Matrix4:_t,MaxEquation:OB,Mesh:Kt,MeshBasicMaterial:pi,MeshDepthMaterial:Ew,MeshDistanceMaterial:Cw,MeshLambertMaterial:kD,MeshMatcapMaterial:OD,MeshNormalMaterial:ND,MeshPhongMaterial:Tw,MeshPhysicalMaterial:oi,MeshStandardMaterial:dl,MeshToonMaterial:FD,MinEquation:kB,MirroredRepeatWrapping:Vu,MixOperation:QB,MultiplyBlending:dM,MultiplyOperation:Wm,NearestFilter:Bn,NearestMipMapLinearFilter:fz,NearestMipMapNearestFilter:dz,NearestMipmapLinearFilter:Yl,NearestMipmapNearestFilter:Xm,NeutralToneMapping:t1,NeverCompare:sD,NeverDepth:Ov,NeverStencilFunc:Rz,NoBlending:jo,NoColorSpace:Va,NoNormalPacking:yz,NoToneMapping:zs,NormalAnimationBlendMode:c1,NormalBlending:lc,NormalGAPacking:Sz,NormalRGPacking:_z,NotEqualCompare:cD,NotEqualDepth:Wv,NotEqualStencilFunc:Dz,NumberKeyframeTrack:al,Object3D:Wt,ObjectLoader:XH,ObjectSpaceNormalMap:rD,OctahedronGeometry:e0,OneFactor:zB,OneMinusConstantAlphaFactor:ZB,OneMinusConstantColorFactor:KB,OneMinusDstAlphaFactor:WB,OneMinusDstColorFactor:XB,OneMinusSrcAlphaFactor:kv,OneMinusSrcColorFactor:GB,OrthographicCamera:or,PCFShadowMap:Rf,PCFSoftShadowMap:Wp,PMREMGenerator:SM,Path:Ty,PerspectiveCamera:wn,Plane:Oo,PlaneGeometry:ks,PlaneHelper:B6,PointLight:t0,PointLightHelper:A6,Points:uc,PointsMaterial:qa,PolarGridHelper:C6,PolyhedronGeometry:Cc,PositionalAudio:$H,PropertyBinding:sn,PropertyMixer:ZD,QuadraticBezierCurve:bw,QuadraticBezierCurve3:Mw,Quaternion:si,QuaternionKeyframeTrack:ll,QuaternionLinearInterpolant:jD,R11_EAC_Format:Qv,RED_GREEN_RGTC2_Format:Sy,RED_RGTC1_Format:yy,REVISION:jm,RG11_EAC_Format:ey,RGBADepthPacking:gz,RGBAFormat:Ni,RGBAIntegerFormat:l1,RGBA_ASTC_10x10_Format:hy,RGBA_ASTC_10x5_Format:uy,RGBA_ASTC_10x6_Format:dy,RGBA_ASTC_10x8_Format:fy,RGBA_ASTC_12x10_Format:py,RGBA_ASTC_12x12_Format:my,RGBA_ASTC_4x4_Format:ny,RGBA_ASTC_5x4_Format:iy,RGBA_ASTC_5x5_Format:ry,RGBA_ASTC_6x5_Format:sy,RGBA_ASTC_6x6_Format:oy,RGBA_ASTC_8x5_Format:ay,RGBA_ASTC_8x6_Format:ly,RGBA_ASTC_8x8_Format:cy,RGBA_BPTC_Format:gy,RGBA_ETC2_EAC_Format:Zv,RGBA_PVRTC_2BPPV1_Format:Jv,RGBA_PVRTC_4BPPV1_Format:Yv,RGBA_S3TC_DXT1_Format:Xp,RGBA_S3TC_DXT3_Format:Yp,RGBA_S3TC_DXT5_Format:Jp,RGBDepthPacking:xz,RGBFormat:aw,RGBIntegerFormat:mz,RGB_BPTC_SIGNED_Format:xy,RGB_BPTC_UNSIGNED_Format:vy,RGB_ETC1_Format:Kv,RGB_ETC2_Format:qv,RGB_PVRTC_2BPPV1_Format:Xv,RGB_PVRTC_4BPPV1_Format:Vv,RGB_S3TC_DXT1_Format:Vp,RGDepthPacking:vz,RGFormat:Xu,RGIntegerFormat:a1,RawShaderMaterial:D1,Ray:Tc,Raycaster:eF,RectAreaLight:XD,RedFormat:o1,RedIntegerFormat:Ym,ReinhardToneMapping:Zy,RenderTarget:fw,RenderTarget3D:f6,RepeatWrapping:bo,ReplaceStencilOp:Mz,ReverseSubtractEquation:NB,RingGeometry:C1,SIGNED_R11_EAC_Format:$v,SIGNED_RED_GREEN_RGTC2_Format:by,SIGNED_RED_RGTC1_Format:_y,SIGNED_RG11_EAC_Format:ty,SRGBColorSpace:Un,SRGBTransfer:vn,Scene:Ec,ShaderChunk:Ot,ShaderLib:Uo,ShaderMaterial:dn,ShadowMaterial:DD,Shape:Du,ShapeGeometry:R1,ShapePath:N6,ShapeUtils:zo,ShortType:iw,Skeleton:ch,SkeletonHelper:M6,SkinnedMesh:g1,Source:Kl,Sphere:mi,SphereGeometry:dh,Spherical:Fm,SphericalHarmonics3:Fw,SplineCurve:Aw,SpotLight:F1,SpotLightHelper:b6,Sprite:yD,SpriteMaterial:gw,SrcAlphaFactor:Nv,SrcAlphaSaturateFactor:YB,SrcColorFactor:HB,StaticCopyUsage:Hz,StaticDrawUsage:Cm,StaticReadUsage:Oz,StereoCamera:KH,StreamCopyUsage:jz,StreamDrawUsage:kz,StreamReadUsage:zz,StringKeyframeTrack:rd,SubtractEquation:FB,SubtractiveBlending:uM,TOUCH:Rs,TangentSpaceNormalMap:wc,TetrahedronGeometry:P1,Texture:Sn,TextureLoader:fl,TextureUtils:H6,Timer:g6,TimestampQuery:Vz,TorusGeometry:I1,TorusKnotGeometry:L1,Triangle:ss,TriangleFanDrawMode:Ju,TriangleStripDrawMode:Jm,TrianglesDrawMode:uw,TubeGeometry:B1,UVMapping:n1,Uint16BufferAttribute:hw,Uint32BufferAttribute:pw,Uint8BufferAttribute:I8,Uint8ClampedBufferAttribute:L8,Uniform:Hw,UniformsGroup:p6,UniformsLib:ot,UniformsUtils:Gs,UnsignedByteType:jr,UnsignedInt101111Type:sw,UnsignedInt248Type:Jf,UnsignedInt5999Type:rw,UnsignedIntType:Mo,UnsignedShort4444Type:r1,UnsignedShort5551Type:s1,UnsignedShortType:Yf,VSMShadowMap:xu,Vector2:xe,Vector3:H,Vector4:on,VectorKeyframeTrack:cl,VideoFrameTexture:tH,VideoTexture:xw,WebGL3DRenderTarget:v8,WebGLArrayRenderTarget:x8,WebGLCoordinateSystem:Fs,WebGLCubeRen
vendor: 133,995 bytes, lines 4091-4133
4091derTarget:mw,WebGLRenderTarget:Gn,WebGLRenderer:U1,WebGLUtils:cF,WebGPUCoordinateSystem:Kf,WebXRController:Zx,WireframeGeometry:ww,WrapAroundEnding:Tm,ZeroCurvatureEnding:vu,ZeroFactor:UB,ZeroSlopeEnding:yu,ZeroStencilOp:bz,createCanvasElement:hD,error:bt,getConsoleFunction:qz,log:Pm,setConsoleFunction:Kz,warn:at,warnOnce:qf},Symbol.toStringTag,{value:"Module"}));var uF={exports:{}},sd={};/** 4092 * @license React 4093 * react-reconciler-constants.production.min.js 4094 * 4095 * Copyright (c) Facebook, Inc. and its affiliates. 4096 * 4097 * This source code is licensed under the MIT license found in the 4098 * LICENSE file in the root directory of this source tree. 4099 */sd.ConcurrentRoot=1;sd.ContinuousEventPriority=4;sd.DefaultEventPriority=16;sd.DiscreteEventPriority=1;sd.IdleEventPriority=536870912;sd.LegacyRoot=0;uF.exports=sd;var gf=uF.exports;function NV(i){let e;const t=new Set,n=(c,u)=>{const d=typeof c=="function"?c(e):c;if(d!==e){const p=e;e=u?d:Object.assign({},e,d),t.forEach(m=>m(e,p))}},r=()=>e,s=(c,u=r,d=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let p=u(e);function m(){const x=u(e);if(!d(p,x)){const v=p;c(p=x,v)}}return t.add(m),()=>t.delete(m)},l={setState:n,getState:r,subscribe:(c,u,d)=>u||d?s(c,u,d):(t.add(c),()=>t.delete(c)),destroy:()=>t.clear()};return e=i(n,r,l),l}const kV=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),qR=kV?X.useEffect:X.useLayoutEffect;function OV(i){const e=typeof i=="function"?NV(i):i,t=(n=e.getState,r=Object.is)=>{const[,s]=X.useReducer(_=>_+1,0),o=e.getState(),a=X.useRef(o),l=X.useRef(n),c=X.useRef(r),u=X.useRef(!1),d=X.useRef();d.current===void 0&&(d.current=n(o));let p,m=!1;(a.current!==o||l.current!==n||c.current!==r||u.current)&&(p=n(o),m=!r(d.current,p)),qR(()=>{m&&(d.current=p),a.current=o,l.current=n,c.current=r,u.current=!1});const x=X.useRef(o);qR(()=>{const _=()=>{try{const S=e.getState(),b=l.current(S);c.current(d.current,b)||(a.current=S,d.current=b,s())}catch{u.current=!0,s()}},g=e.subscribe(_);return e.getState()!==x.current&&_(),g},[]);const v=m?p:d.current;return X.useDebugValue(v),v};return Object.assign(t,e),t[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const n=[t,e];return{next(){const r=n.length<=0;return{value:n.shift(),done:r}}}},t}const UV=i=>typeof i=="object"&&typeof i.then=="function",Su=[];function dF(i,e,t=(n,r)=>n===r){if(i===e)return!0;if(!i||!e)return!1;const n=i.length;if(e.length!==n)return!1;for(let r=0;r<n;r++)if(!t(i[r],e[r]))return!1;return!0}function fF(i,e=null,t=!1,n={}){e===null&&(e=[i]);for(const s of Su)if(dF(e,s.keys,s.equal)){if(t)return;if(Object.prototype.hasOwnProperty.call(s,"error"))throw s.error;if(Object.prototype.hasOwnProperty.call(s,"response"))return n.lifespan&&n.lifespan>0&&(s.timeout&&clearTimeout(s.timeout),s.timeout=setTimeout(s.remove,n.lifespan)),s.response;if(!t)throw s.promise}const r={keys:e,equal:n.equal,remove:()=>{const s=Su.indexOf(r);s!==-1&&Su.splice(s,1)},promise:(UV(i)?i:i(...e)).then(s=>{r.response=s,n.lifespan&&n.lifespan>0&&(r.timeout=setTimeout(r.remove,n.lifespan))}).catch(s=>r.error=s)};if(Su.push(r),!t)throw r.promise}const zV=(i,e,t)=>fF(i,e,!1,t),HV=(i,e,t)=>void fF(i,e,!0,t),GV=i=>{if(i===void 0||i.length===0)Su.splice(0,Su.length);else{const e=Su.find(t=>dF(i,t.keys,t.equal));e&&e.remove()}};var hF={exports:{}},pF={exports:{}},mF={};/** 4100 * @license React 4101 * scheduler.production.min.js 4102 * 4103 * Copyright (c) Facebook, Inc. and its affiliates. 4104 * 4105 * This source code is licensed under the MIT license found in the 4106 * LICENSE file in the root directory of this source tree. 4107 */(function(i){function e(G,Z){var O=G.length;G.push(Z);e:for(;0<O;){var ee=O-1>>>1,le=G[ee];if(0<r(le,Z))G[ee]=Z,G[O]=le,O=ee;else break e}}function t(G){return G.length===0?null:G[0]}function n(G){if(G.length===0)return null;var Z=G[0],O=G.pop();if(O!==Z){G[0]=O;e:for(var ee=0,le=G.length,ge=le>>>1;ee<ge;){var Se=2*(ee+1)-1,Ye=G[Se],K=Se+1,q=G[K];if(0>r(Ye,O))K<le&&0>r(q,Ye)?(G[ee]=q,G[K]=O,ee=K):(G[ee]=Ye,G[Se]=O,ee=Se);else if(K<le&&0>r(q,O))G[ee]=q,G[K]=O,ee=K;else break e}}return Z}function r(G,Z){var O=G.sortIndex-Z.sortIndex;return O!==0?O:G.id-Z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;i.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();i.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,d=null,p=3,m=!1,x=!1,v=!1,_=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(G){for(var Z=t(c);Z!==null;){if(Z.callback===null)n(c);else if(Z.startTime<=G)n(c),Z.sortIndex=Z.expirationTime,e(l,Z);else break;Z=t(c)}}function A(G){if(v=!1,b(G),!x)if(t(l)!==null)x=!0,W(w);else{var Z=t(c);Z!==null&&V(A,Z.startTime-G)}}function w(G,Z){x=!1,v&&(v=!1,g(B),B=-1),m=!0;var O=p;try{for(b(Z),d=t(l);d!==null&&(!(d.expirationTime>Z)||G&&!L());){var ee=d.callback;if(typeof ee=="function"){d.callback=null,p=d.priorityLevel;var le=ee(d.expirationTime<=Z);Z=i.unstable_now(),typeof le=="function"?d.callback=le:d===t(l)&&n(l),b(Z)}else n(l);d=t(l)}if(d!==null)var ge=!0;else{var Se=t(c);Se!==null&&V(A,Se.startTime-Z),ge=!1}return ge}finally{d=null,p=O,m=!1}}var C=!1,P=null,B=-1,R=5,E=-1;function L(){return!(i.unstable_now()-E<R)}function N(){if(P!==null){var G=i.unstable_now();E=G;var Z=!0;try{Z=P(!0,G)}finally{Z?k():(C=!1,P=null)}}else C=!1}var k;if(typeof S=="function")k=function(){S(N)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,z=Y.port2;Y.port1.onmessage=N,k=function(){z.postMessage(null)}}else k=function(){_(N,0)};function W(G){P=G,C||(C=!0,k())}function V(G,Z){B=_(function(){G(i.unstable_now())},Z)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(G){G.callback=null},i.unstable_continueExecution=function(){x||m||(x=!0,W(w))},i.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<G?Math.floor(1e3/G):5},i.unstable_getCurrentPriorityLevel=function(){return p},i.unstable_getFirstCallbackNode=function(){return t(l)},i.unstable_next=function(G){switch(p){case 1:case 2:case 3:var Z=3;break;default:Z=p}var O=p;p=Z;try{return G()}finally{p=O}},i.unstable_pauseExecution=function(){},i.unstable_requestPaint=function(){},i.unstable_runWithPriority=function(G,Z){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var O=p;p=G;try{return Z()}finally{p=O}},i.unstable_scheduleCallback=function(G,Z,O){var ee=i.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0<O?ee+O:ee):O=ee,G){case 1:var le=-1;break;case 2:le=250;break;case 5:le=1073741823;break;case 4:le=1e4;break;default:le=5e3}return le=O+le,G={id:u++,callback:Z,priorityLevel:G,startTime:O,expirationTime:le,sortIndex:-1},O>ee?(G.sortIndex=O,e(c,G),t(l)===null&&G===t(c)&&(v?(g(B),B=-1):v=!0,V(A,O-ee))):(G.sortIndex=le,e(l,G),x||m||(x=!0,W(w))),G},i.unstable_shouldYield=L,i.unstable_wrapCallback=function(G){var Z=p;return function(){var O=p;p=Z;try{return G.apply(this,arguments)}finally{p=O}}}})(mF);pF.exports=mF;var AM=pF.exports;/** 4108 * @license React 4109 * react-reconciler.production.min.js 4110 * 4111 * Copyright (c) Facebook, Inc. and its affiliates. 4112 * 4113 * This source code is licensed under the MIT license found in the 4114 * LICENSE file in the root directory of this source tree. 4115 */var jV=function(e){var t={},n=X,r=AM,s=Object.assign;function o(f){for(var h="https://reactjs.org/docs/error-decoder.html?invariant="+f,M=1;M<arguments.length;M++)h+="&args[]="+encodeURIComponent(arguments[M]);return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,l=Symbol.for("react.element"),c=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),m=Symbol.for("react.provider"),x=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),A=Symbol.for("react.offscreen"),w=Symbol.iterator;function C(f){return f===null||typeof f!="object"?null:(f=w&&f[w]||f["@@iterator"],typeof f=="function"?f:null)}function P(f){if(f==null)return null;if(typeof f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f;switch(f){case u:return"Fragment";case c:return"Portal";case p:return"Profiler";case d:return"StrictMode";case _:return"Suspense";case g:return"SuspenseList"}if(typeof f=="object")switch(f.$$typeof){case x:return(f.displayName||"Context")+".Consumer";case m:return(f._context.displayName||"Context")+".Provider";case v:var h=f.render;return f=f.displayName,f||(f=h.displayName||h.name||"",f=f!==""?"ForwardRef("+f+")":"ForwardRef"),f;case S:return h=f.displayName||null,h!==null?h:P(f.type)||"Memo";case b:h=f._payload,f=f._init;try{return P(f(h))}catch{}}return null}function B(f){var h=f.type;switch(f.tag){case 24:return"Cache";case 9:return(h.displayName||"Context")+".Consumer";case 10:return(h._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return f=h.render,f=f.displayName||f.name||"",h.displayName||(f!==""?"ForwardRef("+f+")":"ForwardRef");case 7:return"Fragment";case 5:return h;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return P(h);case 8:return h===d?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h}return null}function R(f){var h=f,M=f;if(f.alternate)for(;h.return;)h=h.return;else{f=h;do h=f,h.flags&4098&&(M=h.return),f=h.return;while(f)}return h.tag===3?M:null}function E(f){if(R(f)!==f)throw Error(o(188))}function L(f){var h=f.alternate;if(!h){if(h=R(f),h===null)throw Error(o(188));return h!==f?null:f}for(var M=f,T=h;;){var I=M.return;if(I===null)break;var D=I.alternate;if(D===null){if(T=I.return,T!==null){M=T;continue}break}if(I.child===D.child){for(D=I.child;D;){if(D===M)return E(I),f;if(D===T)return E(I),h;D=D.sibling}throw Error(o(188))}if(M.return!==T.return)M=I,T=D;else{for(var te=!1,ae=I.child;ae;){if(ae===M){te=!0,M=I,T=D;break}if(ae===T){te=!0,T=I,M=D;break}ae=ae.sibling}if(!te){for(ae=D.child;ae;){if(ae===M){te=!0,M=D,T=I;break}if(ae===T){te=!0,T=D,M=I;break}ae=ae.sibling}if(!te)throw Error(o(189))}}if(M.alternate!==T)throw Error(o(190))}if(M.tag!==3)throw Error(o(188));return M.stateNode.current===M?f:h}function N(f){return f=L(f),f!==null?k(f):null}function k(f){if(f.tag===5||f.tag===6)return f;for(f=f.child;f!==null;){var h=k(f);if(h!==null)return h;f=f.sibling}return null}function Y(f){if(f.tag===5||f.tag===6)return f;for(f=f.child;f!==null;){if(f.tag!==4){var h=Y(f);if(h!==null)return h}f=f.sibling}return null}var z=Array.isArray,W=e.getPublicInstance,V=e.getRootHostContext,G=e.getChildHostContext,Z=e.prepareForCommit,O=e.resetAfterCommit,ee=e.createInstance,le=e.appendInitialChild,ge=e.finalizeInitialChildren,Se=e.prepareUpdate,Ye=e.shouldSetTextContent,K=e.createTextInstance,q=e.scheduleTimeout,re=e.cancelTimeout,Ce=e.noTimeout,Te=e.isPrimaryRenderer,De=e.supportsMutation,tt=e.supportsPersistence,Pe=e.supportsHydration,me=e.getInstanceFromNode,Ee=e.preparePortalMount,be=e.getCurrentEventPriority,$=e.detachDeletedInstance,J=e.supportsMicrotasks,Ue=e.scheduleMicrotask,Ne=e.supportsTestSelectors,ke=e.findFiberRoot,Ae=e.getBoundingRect,U=e.getTextContent,F=e.isHiddenSubtree,ne=e.matchAccessibilityRole,se=e.setFocusIfFocusable,he=e.setupIntersectionObserver,de=e.appendChild,ze=e.appendChildToContainer,Be=e.commitTextUpdate,Ke=e.commitMount,$e=e.commitUpdate,Fe=e.insertBefore,Xe=e.insertInContainerBefore,it=e.removeChild,ie=e.removeChildFromContainer,fe=e.resetTextContent,He=e.hideInstance,Q=e.hideTextInstance,je=e.unhideInstance,Re=e.unhideTextInstance,Ge=e.clearContainer,Le=e.cloneInstance,Me=e.createContainerChildSet,Oe=e.appendChildToContainerChildSet,lt=e.finalizeContainerChildren,Pt=e.replaceContainerChildren,Qe=e.cloneHiddenInstance,rt=e.cloneHiddenTextInstance,Mt=e.canHydrateInstance,nt=e.canHydrateTextInstance,yt=e.canHydrateSuspenseInstance,ft=e.isSuspenseInstancePending,Tt=e.isSuspenseInstanceFallback,tn=e.registerSuspenseInstanceRetry,Lt=e.getNextHydratableSibling,cn=e.getFirstHydratableChild,Dn=e.getFirstHydratableChildWithinContainer,bn=e.getFirstHydratableChildWithinSuspenseInstance,fn=e.hydrateInstance,qt=e.hydrateTextInstance,wi=e.hydrateSuspenseInstance,hn=e.getNextHydratableInstanceAfterSuspenseInstance,Ti=e.commitHydratedContainer,Rr=e.commitHydratedSuspenseInstance,ai=e.clearSuspenseBoundary,li=e.clearSuspenseBoundaryFromContainer,gi=e.shouldDeleteUnhydratedTailInstances,wo=e.didNotMatchHydratedContainerTextInstance,hl=e.didNotMatchHydratedTextInstance,ei;function j(f){if(ei===void 0)try{throw Error()}catch(M){var h=M.stack.trim().match(/\n( *(at )?)/);ei=h&&h[1]||""}return` 4116`+ei+f}var oe=!1;function _e(f,h){if(!f||oe)return"";oe=!0;var M=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(h)if(h=function(){throw Error()},Object.defineProperty(h.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(h,[])}catch(et){var T=et}Reflect.construct(f,[],h)}else{try{h.call()}catch(et){T=et}f.call(h.prototype)}else{try{throw Error()}catch(et){T=et}f()}}catch(et){if(et&&T&&typeof et.stack=="string"){for(var I=et.stack.split(` 4117`),D=T.stack.split(` 4118`),te=I.length-1,ae=D.length-1;1<=te&&0<=ae&&I[te]!==D[ae];)ae--;for(;1<=te&&0<=ae;te--,ae--)if(I[te]!==D[ae]){if(te!==1||ae!==1)do if(te--,ae--,0>ae||I[te]!==D[ae]){var Ie=` 4119`+I[te].replace(" at new "," at ");return f.displayName&&Ie.includes("<anonymous>")&&(Ie=Ie.replace("<anonymous>",f.displayName)),Ie}while(1<=te&&0<=ae);break}}}finally{oe=!1,Error.prepareStackTrace=M}return(f=f?f.displayName||f.name:"")?j(f):""}var ye=Object.prototype.hasOwnProperty,pe=[],qe=-1;function st(f){return{current:f}}function We(f){0>qe||(f.current=pe[qe],pe[qe]=null,qe--)}function Je(f,h){qe++,pe[qe]=f.current,f.current=h}var pt={},gt=st(pt),ht=st(!1),Bt=pt;function nn(f,h){var M=f.type.contextTypes;if(!M)return pt;var T=f.stateNode;if(T&&T.__reactInternalMemoizedUnmaskedChildContext===h)return T.__reactInternalMemoizedMaskedChildContext;var I={},D;for(D in M)I[D]=h[D];return T&&(f=f.stateNode,f.__reactInternalMemoizedUnmaskedChildContext=h,f.__reactInternalMemoizedMaskedChildContext=I),I}function Zt(f){return f=f.childContextTypes,f!=null}function Tn(){We(ht),We(gt)}function yn(f,h,M){if(gt.current!==pt)throw Error(o(168));Je(gt,h),Je(ht,M)}function wt(f,h,M){var T=f.stateNode;if(h=h.childContextTypes,typeof T.getChildContext!="function")return M;T=T.getChildContext();for(var I in T)if(!(I in h))throw Error(o(108,B(f)||"Unknown",I));return s({},M,T)}function ln(f){return f=(f=f.stateNode)&&f.__reactInternalMemoizedMergedChildContext||pt,Bt=gt.current,Je(gt,f),Je(ht,ht.current),!0}function rn(f,h,M){var T=f.stateNode;if(!T)throw Error(o(169));M?(f=wt(f,h,Bt),T.__reactInternalMemoizedMergedChildContext=f,We(ht),We(gt),Je(gt,f)):We(ht),Je(ht,M)}var Fn=Math.clz32?Math.clz32:Pc,pl=Math.log,Pr=Math.LN2;function Pc(f){return f>>>=0,f===0?32:31-(pl(f)/Pr|0)|0}var xn=64,Ei=4194304;function Ui(f){switch(f&-f){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return f&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return f&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return f}}function xi(f,h){var M=f.pendingLanes;if(M===0)return 0;var T=0,I=f.suspendedLanes,D=f.pingedLanes,te=M&268435455;if(te!==0){var ae=te&~I;ae!==0?T=Ui(ae):(D&=te,D!==0&&(T=Ui(D)))}else te=M&~I,te!==0?T=Ui(te):D!==0&&(T=Ui(D));if(T===0)return 0;if(h!==0&&h!==T&&!(h&I)&&(I=T&-T,D=h&-h,I>=D||I===16&&(D&4194240)!==0))return h;if(T&4&&(T|=M&16),h=f.entangledLanes,h!==0)for(f=f.entanglements,h&=T;0<h;)M=31-Fn(h),I=1<<M,T|=f[M],h&=~I;return T}function lr(f,h){switch(f){case 1:case 2:case 4:return h+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return h+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ph(f,h){for(var M=f.suspendedLanes,T=f.pingedLanes,I=f.expirationTimes,D=f.pendingLanes;0<D;){var te=31-Fn(D),ae=1<<te,Ie=I[te];Ie===-1?(!(ae&M)||ae&T)&&(I[te]=lr(ae,h)):Ie<=h&&(f.expiredLanes|=ae),D&=~ae}}function To(f){return f=f.pendingLanes&-1073741825,f!==0?f:f&1073741824?1073741824:0}function H1(f){for(var h=[],M=0;31>M;M++)h.push(f);return h}function mh(f,h,M){f.pendingLanes|=h,h!==536870912&&(f.suspendedLanes=0,f.pingedLanes=0),f=f.eventTimes,h=31-Fn(h),f[h]=M}function aN(f,h){var M=f.pendingLanes&~h;f.pendingLanes=h,f.suspendedLanes=0,f.pingedLanes=0,f.expiredLanes&=h,f.mutableReadLanes&=h,f.entangledLanes&=h,h=f.entanglements;var T=f.eventTimes;for(f=f.expirationTimes;0<M;){var I=31-Fn(M),D=1<<I;h[I]=0,T[I]=-1,f[I]=-1,M&=~D}}function G1(f,h){var M=f.entangledLanes|=h;for(f=f.entanglements;M;){var T=31-Fn(M),I=1<<T;I&h|f[T]&h&&(f[T]|=h),M&=~I}}var pn=0;function eT(f){return f&=-f,1<f?4<f?f&268435455?16:536870912:4:1}var j1=r.unstable_scheduleCallback,tT=r.unstable_cancelCallback,lN=r.unstable_shouldYield,cN=r.unstable_requestPaint,zi=r.unstable_now,W1=r.unstable_ImmediatePriority,uN=r.unstable_UserBlockingPriority,V1=r.unstable_NormalPriority,dN=r.unstable_IdlePriority,o0=null,Yo=null;function fN(f){if(Yo&&typeof Yo.onCommitFiberRoot=="function")try{Yo.onCommitFiberRoot(o0,f,void 0,(f.current.flags&128)===128)}catch{}}function hN(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var Jo=typeof Object.is=="function"?Object.is:hN,Ta=null,a0=!1,X1=!1;function nT(f){Ta===null?Ta=[f]:Ta.push(f)}function pN(f){a0=!0,nT(f)}function Ko(){if(!X1&&Ta!==null){X1=!0;var f=0,h=pn;try{var M=Ta;for(pn=1;f<M.length;f++){var T=M[f];do T=T(!0);while(T!==null)}Ta=null,a0=!1}catch(I){throw Ta!==null&&(Ta=Ta.slice(f+1)),j1(W1,Ko),I}finally{pn=h,X1=!1}}return null}var mN=a.ReactCurrentBatchConfig;function l0(f,h){if(Jo(f,h))return!0;if(typeof f!="object"||f===null||typeof h!="object"||h===null)return!1;var M=Object.keys(f),T=Object.keys(h);if(M.length!==T.length)return!1;for(T=0;T<M.length;T++){var I=M[T];if(!ye.call(h,I)||!Jo(f[I],h[I]))return!1}return!0}function gN(f){switch(f.tag){case 5:return j(f.type);case 16:return j("Lazy");case 13:return j("Suspense");case 19:return j("SuspenseList");case 0:case 2:case 15:return f=_e(f.type,!1),f;case 11:return f=_e(f.type.render,!1),f;case 1:return f=_e(f.type,!0),f;default:return""}}function Eo(f,h){if(f&&f.defaultProps){h=s({},h),f=f.defaultProps;for(var M in f)h[M]===void 0&&(h[M]=f[M]);return h}return h}var c0=st(null),u0=null,ld=null,Y1=null;function J1(){Y1=ld=u0=null}function iT(f,h,M){Te?(Je(c0,h._currentValue),h._currentValue=M):(Je(c0,h._currentValue2),h._currentValue2=M)}function K1(f){var h=c0.current;We(c0),Te?f._currentValue=h:f._currentValue2=h}function q1(f,h,M){for(;f!==null;){var T=f.alternate;if((f.childLanes&h)!==h?(f.childLanes|=h,T!==null&&(T.childLanes|=h)):T!==null&&(T.childLanes&h)!==h&&(T.childLanes|=h),f===M)break;f=f.return}}function cd(f,h){u0=f,Y1=ld=null,f=f.dependencies,f!==null&&f.firstContext!==null&&(f.lanes&h&&(ys=!0),f.firstContext=null)}function qs(f){var h=Te?f._currentValue:f._currentValue2;if(Y1!==f)if(f={context:f,memoizedValue:h,next:null},ld===null){if(u0===null)throw Error(o(308));ld=f,u0.dependencies={lanes:0,firstContext:f}}else ld=ld.next=f;return h}var qo=null,ml=!1;function Z1(f){f.updateQueue={baseState:f.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function rT(f,h){f=f.updateQueue,h.updateQueue===f&&(h.updateQueue={baseState:f.baseState,firstBaseUpdate:f.firstBaseUpdate,lastBaseUpdate:f.lastBaseUpdate,shared:f.shared,effects:f.effects})}function Ea(f,h){return{eventTime:f,lane:h,tag:0,payload:null,callback:null,next:null}}function gl(f,h){var M=f.updateQueue;M!==null&&(M=M.shared,vi!==null&&f.mode&1&&!(Ht&2)?(f=M.interleaved,f===null?(h.next=h,qo===null?qo=[M]:qo.push(M)):(h.next=f.next,f.next=h),M.interleaved=h):(f=M.pending,f===null?h.next=h:(h.next=f.next,f.next=h),M.pending=h))}function d0(f,h,M){if(h=h.updateQueue,h!==null&&(h=h.shared,(M&4194240)!==0)){var T=h.lanes;T&=f.pendingLanes,M|=T,h.lanes=M,G1(f,M)}}function sT(f,h){var M=f.updateQueue,T=f.alternate;if(T!==null&&(T=T.updateQueue,M===T)){var I=null,D=null;if(M=M.firstBaseUpdate,M!==null){do{var te={eventTime:M.eventTime,lane:M.lane,tag:M.tag,payload:M.payload,callback:M.callback,next:null};D===null?I=D=te:D=D.next=te,M=M.next}while(M!==null);D===null?I=D=h:D=D.next=h}else I=D=h;M={baseState:T.baseState,firstBaseUpdate:I,lastBaseUpdate:D,shared:T.shared,effects:T.effects},f.updateQueue=M;return}f=M.lastBaseUpdate,f===null?M.firstBaseUpdate=h:f.next=h,M.lastBaseUpdate=h}function f0(f,h,M,T){var I=f.updateQueue;ml=!1;var D=I.firstBaseUpdate,te=I.lastBaseUpdate,ae=I.shared.pending;if(ae!==null){I.shared.pending=null;var Ie=ae,et=Ie.next;Ie.next=null,te===null?D=et:te.next=et,te=Ie;var xt=f.alternate;xt!==null&&(xt=xt.updateQueue,ae=xt.lastBaseUpdate,ae!==te&&(ae===null?xt.firstBaseUpdate=et:ae.next=et,xt.lastBaseUpdate=Ie))}if(D!==null){var Dt=I.baseState;te=0,xt=et=Ie=null,ae=D;do{var Et=ae.lane,En=ae.eventTime;if((T&Et)===Et){xt!==null&&(xt=xt.next={eventTime:En,lane:0,tag:ae.tag,payload:ae.payload,callback:ae.callback,next:null});e:{var At=f,fr=ae;switch(Et=h,En=M,fr.tag){case 1:if(At=fr.payload,typeof At=="function"){Dt=At.call(En,Dt,Et);break e}Dt=At;break e;case 3:At.flags=At.flags&-65537|128;case 0:if(At=fr.payload,Et=typeof At=="function"?At.call(En,Dt,Et):At,Et==null)break e;Dt=s({},Dt,Et);break e;case 2:ml=!0}}ae.callback!==null&&ae.lane!==0&&(f.flags|=64,Et=I.effects,Et===null?I.effects=[ae]:Et.push(ae))}else En={eventTime:En,lane:Et,tag:ae.tag,payload:ae.payload,callback:ae.callback,next:null},xt===null?(et=xt=En,Ie=Dt):xt=xt.next=En,te|=Et;if(ae=ae.next,ae===null){if(ae=I.shared.pending,ae===null)break;Et=ae,ae=Et.next,Et.next=null,I.lastBaseUpdate=Et,I.shared.pending=null}}while(!0);if(xt===null&&(Ie=Dt),I.baseState=Ie,I.firstBaseUpdate=et,I.lastBaseUpdate=xt,h=I.shared.interleaved,h!==null){I=h;do te|=I.lane,I=I.next;while(I!==h)}else D===null&&(I.shared.lanes=0);vd|=te,f.lanes=te,f.memoizedState=Dt}}function oT(f,h,M){if(f=h.effects,h.effects=null,f!==null)for(h=0;h<f.length;h++){var T=f[h],I=T.callback;if(I!==null){if(T.callback=null,T=M,typeof I!="function")throw Error(o(191,I));I.call(T)}}}var aT=new n.Component().refs;function Q1(f,h,M,T){h=f.memoizedState,M=M(T,h),M=M==null?h:s({},h,M),f.memoizedState=M,f.lanes===0&&(f.updateQueue.baseState=M)}var h0={isMounted:function(f){return(f=f._reactInternals)?R(f)===f:!1},enqueueSetState:function(f,h,M){f=f._reactInternals;var T=Lr(),I=yl(f),D=Ea(T,I);D.payload=h,M!=null&&(D.callback=M),gl(f,D),h=to(f,I,T),h!==null&&d0(h,f,I)},enqueueReplaceState:function(f,h,M){f=f._reactInternals;var T=Lr(),I=yl(f),D=Ea(T,I);D.tag=1,D.payload=h,M!=null&&(D.callback=M),gl(f,D),h=to(f,I,T),h!==null&&d0(h,f,I)},enqueueForceUpdate:function(f,h){f=f._reactInternals;var M=Lr(),T=yl(f),I=Ea(M,T);I.tag=2,h!=null&&(I.callback=h),gl(f,I),h=to(f,T,M),h!==null&&d0(h,f,T)}};function lT(f,h,M,T,I,D,te){return f=f.stateNode,typeof f.shouldComponentUpdate=="function"?f.shouldComponentUpdate(T,D,te):h.prototype&&h.prototype.isPureReactComponent?!l0(M,T)||!l0(I,D):!0}function cT(f,h,M){var T=!1,I=pt,D=h.contextType;return typeof D=="object"&&D!==null?D=qs(D):(I=Zt(h)?Bt:gt.current,T=h.contextTypes,D=(T=T!=null)?nn(f,I):pt),h=new h(M,D),f.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=h0,f.stateNode=h,h._reactInternals=f,T&&(f=f.stateNode,f.__reactInternalMemoizedUnmaskedChildContext=I,f.__reactInternalMemoizedMaskedChildContext=D),h}function uT(f,h,M,T){f=h.state,typeof h.componentWillReceiveProps=="function"&&h.componentWillReceiveProps(M,T),typeof h.UNSAFE_componentWillReceiveProps=="function"&&h.UNSAFE_componentWillReceiveProps(M,T),h.state!==f&&h0.enqueueReplaceState(h,h.state,null)}function $1(f,h,M,T){var I=f.stateNode;I.props=M,I.state=f.memoizedState,I.refs=aT,Z1(f);var D=h.contextType;typeof D=="object"&&D!==null?I.context=qs(D):(D=Zt(h)?Bt:gt.current,I.context=nn(f,D)),I.state=f.memoizedState,D=h.getDerivedStateFromProps,typeof D=="function"&&(Q1(f,h,D,M),I.state=f.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof I.getSnapshotBeforeUpdate=="function"||typeof I.UNSAFE_componentWillMount!="function"&&typeof I.componentWillMount!="function"||(h=I.state,typeof I.componentWillMount=="function"&&I.componentWillMount(),typeof I.UNSAFE_componentWillMount=="function"&&I.UNSAFE_componentWillMount(),h!==I.state&&h0.enqueueReplaceState(I,I.state,null),f0(f,M,I,T),I.state=f.memoizedState),typeof I.componentDidMount=="function"&&(f.flags|=4194308)}var ud=[],dd=0,p0=null,m0=0,Zs=[],Qs=0,Ic=null,Ca=1,Ra="";function Lc(f,h){ud[dd++]=m0,ud[dd++]=p0,p0=f,m0=h}function dT(f,h,M){Zs[Qs++]=Ca,Zs[Qs++]=Ra,Zs[Qs++]=Ic,Ic=f;var T=Ca;f=Ra;var I=32-Fn(T)-1;T&=~(1<<I),M+=1;var D=32-Fn(h)+I;if(30<D){var te=I-I%5;D=(T&(1<<te)-1).toString(32),T>>=te,I-=te,Ca=1<<32-Fn(h)+I|M<<I|T,Ra=D+f}else Ca=1<<D|M<<I|T,Ra=f}function e_(f){f.return!==null&&(Lc(f,1),dT(f,1,0))}function t_(f){for(;f===p0;)p0=ud[--dd],ud[dd]=null,m0=ud[--dd],ud[dd]=null;for(;f===Ic;)Ic=Zs[--Qs],Zs[Qs]=null,Ra=Zs[--Qs],Zs[Qs]=null,Ca=Zs[--Qs],Zs[Qs]=null}var xs=null,vs=null,On=!1,gh=!1,Co=null;function fT(f,h){var M=no(5,null,null,0);M.elementType="DELETED",M.stateNode=h,M.return=f,h=f.deletions,h===null?(f.deletions=[M],f.flags|=16):h.push(M)}function hT(f,h){switch(f.tag){case 5:return h=Mt(h,f.type,f.pendingProps),h!==null?(f.stateNode=h,xs=f,vs=cn(h),!0):!1;case 6:return h=nt(h,f.pendingProps),h!==null?(f.stateNode=h,xs=f,vs=null,!0):!1;case 13:if(h=yt(h),h!==null){var M=Ic!==null?{id:Ca,overflow:Ra}:null;return f.memoizedState={dehydrated:h,treeContext:M,retryLane:1073741824},M=no(18,null,null,0),M.stateNode=h,M.return=f,f.child=M,xs=f,vs=null,!0}return!1;default:return!1}}function n_(f){return(f.mode&1)!==0&&(f.flags&128)===0}function i_(f){if(On){var h=vs;if(h){var M=h;if(!hT(f,h)){if(n_(f))throw Error(o(418));h=Lt(M);var T=xs;h&&hT(f,h)?fT(T,M):(f.flags=f.flags&-4097|2,On=!1,xs=f)}}else{if(n_(f))throw Error(o(418));f.flags=f.flags&-4097|2,On=!1,xs=f}}}function pT(f){for(f=f.return;f!==null&&f.tag!==5&&f.tag!==3&&f.tag!==13;)f=f.return;xs=f}function xh(f){if(!Pe||f!==xs)return!1;if(!On)return pT(f),On=!0,!1;if(f.tag!==3&&(f.tag!==5||gi(f.type)&&!Ye(f.type,f.memoizedProps))){var h=vs;if(h){if(n_(f)){for(f=vs;f;)f=Lt(f);throw Error(o(418))}for(;h;)fT(f,h),h=Lt(h)}}if(pT(f),f.tag===13){if(!Pe)throw Error(o(316));if(f=f.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(o(317));vs=hn(f)}else vs=xs?Lt(f.stateNode):null;return!0}function fd(){Pe&&(vs=xs=null,gh=On=!1)}function r_(f){Co===null?Co=[f]:Co.push(f)}function vh(f,h,M){if(f=M.ref,f!==null&&typeof f!="function"&&typeof f!="object"){if(M._owner){if(M=M._owner,M){if(M.tag!==1)throw Error(o(309));var T=M.stateNode}if(!T)throw Error(o(147,f));var I=T,D=""+f;return h!==null&&h.ref!==null&&typeof h.ref=="function"&&h.ref._stringRef===D?h.ref:(h=function(te){var ae=I.refs;ae===aT&&(ae=I.refs={}),te===null?delete ae[D]:ae[D]=te},h._stringRef=D,h)}if(typeof f!="string")throw Error(o(284));if(!M._owner)throw Error(o(290,f))}return f}function g0(f,h){throw f=Object.prototype.toString.call(h),Error(o(31,f==="[object Object]"?"object with keys {"+Object.keys(h).join(", ")+"}":f))}function mT(f){var h=f._init;return h(f._payload)}function gT(f){function h(ve,ce){if(f){var we=ve.deletions;we===null?(ve.deletions=[ce],ve.flags|=16):we.push(ce)}}function M(ve,ce){if(!f)return null;for(;ce!==null;)h(ve,ce),ce=ce.sibling;return null}function T(ve,ce){for(ve=new Map;ce!==null;)ce.key!==null?ve.set(ce.key,ce):ve.set(ce.index,ce),ce=ce.sibling;return ve}function I(ve,ce){return ve=Sl(ve,ce),ve.index=0,ve.sibling=null,ve}function D(ve,ce,we){return ve.index=we,f?(we=ve.alternate,we!==null?(we=we.index,we<ce?(ve.flags|=2,ce):we):(ve.flags|=2,ce)):(ve.flags|=1048576,ce)}function te(ve){return f&&ve.alternate===null&&(ve.flags|=2),ve}function ae(ve,ce,we,dt){return ce===null||ce.tag!==6?(ce=H_(we,ve.mode,dt),ce.return=ve,ce):(ce=I(ce,we),ce.return=ve,ce)}function Ie(ve,ce,we,dt){var St=we.type;return St===u?xt(ve,ce,we.props.children,dt,we.key):ce!==null&&(ce.elementType===St||typeof St=="object"&&St!==null&&St.$$typeof===b&&mT(St)===ce.type)?(dt=I(ce,we.props),dt.ref=vh(ve,ce,we),dt.return=ve,dt):(dt=Y0(we.type,we.key,we.props,null,ve.mode,dt),dt.ref=vh(ve,ce,we),dt.return=ve,dt)}function et(ve,ce,we,dt){return ce===null||ce.tag!==4||ce.stateNode.containerInfo!==we.containerInfo||ce.stateNode.implementation!==we.implementation?(ce=G_(we,ve.mode,dt),ce.return=ve,ce):(ce=I(ce,we.children||[]),ce.return=ve,ce)}function xt(ve,ce,we,dt,St){return ce===null||ce.tag!==7?(ce=Uc(we,ve.mode,dt,St),ce.return=ve,ce):(ce=I(ce,we),ce.return=ve,ce)}function Dt(ve,ce,we){if(typeof ce=="string"&&ce!==""||typeof ce=="number")return ce=H_(""+ce,ve.mode,we),ce.return=ve,ce;if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case l:return we=Y0(ce.type,ce.key,ce.props,null,ve.mode,we),we.ref=vh(ve,null,ce),we.return=ve,we;case c:return ce=G_(ce,ve.mode,we),ce.return=ve,ce;case b:var dt=ce._init;return Dt(ve,dt(ce._payload),we)}if(z(ce)||C(ce))return ce=Uc(ce,ve.mode,we,null),ce.return=ve,ce;g0(ve,ce)}return null}function Et(ve,ce,we,dt){var St=ce!==null?ce.key:null;if(typeof we=="string"&&we!==""||typeof we=="number")return St!==null?null:ae(ve,ce,""+we,dt);if(typeof we=="object"&&we!==null){switch(we.$$typeof){case l:return we.key===St?Ie(ve,ce,we,dt):null;case c:return we.key===St?et(ve,ce,we,dt):null;case b:return St=we._init,Et(ve,ce,St(we._payload),dt)}if(z(we)||C(we))return St!==null?null:xt(ve,ce,we,dt,null);g0(ve,we)}return null}function En(ve,ce,we,dt,St){if(typeof dt=="string"&&dt!==""||typeof dt=="number")return ve=ve.get(we)||null,ae(ce,ve,""+dt,St);if(typeof dt=="object"&&dt!==null){switch(dt.$$typeof){case l:return ve=ve.get(dt.key===null?we:dt.key)||null,Ie(ce,ve,dt,St);case c:return ve=ve.get(dt.key===null?we:dt.key)||null,et(ce,ve,dt,St);case b:var Ut=dt._init;return En(ve,ce,we,Ut(dt._payload),St)}if(z(dt)||C(dt))return ve=ve.get(we)||null,xt(ce,ve,dt,St,null);g0(ce,dt)}return null}function At(ve,ce,we,dt){for(var St=null,Ut=null,Ft=ce,mn=ce=0,Gi=null;Ft!==null&&mn<we.length;mn++){Ft.index>mn?(Gi=Ft,Ft=null):Gi=Ft.sibling;var gn=Et(ve,Ft,we[mn],dt);if(gn===null){Ft===null&&(Ft=Gi);break}f&&Ft&&gn.alternate===null&&h(ve,Ft),ce=D(gn,ce,mn),Ut===null?St=gn:Ut.sibling=gn,Ut=gn,Ft=Gi}if(mn===we.length)return M(ve,Ft),On&&Lc(ve,mn),St;if(Ft===null){for(;mn<we.length;mn++)Ft=Dt(ve,we[mn],dt),Ft!==null&&(ce=D(Ft,ce,mn),Ut===null?St=Ft:Ut.sibling=Ft,Ut=Ft);return On&&Lc(ve,mn),St}for(Ft=T(ve,Ft);mn<we.length;mn++)Gi=En(Ft,ve,mn,we[mn],dt),Gi!==null&&(f&&Gi.alternate!==null&&Ft.delete(Gi.key===null?mn:Gi.key),ce=D(Gi,ce,mn),Ut===null?St=Gi:Ut.sibling=Gi,Ut=Gi);return f&&Ft.forEach(function(bl){return h(ve,bl)}),On&&Lc(ve,mn),St}function fr(ve,ce,we,dt){var St=C(we);if(typeof St!="function")throw Error(o(150));if(we=St.call(we),we==null)throw Error(o(151));for(var Ut=St=null,Ft=ce,mn=ce=0,Gi=null,gn=we.next();Ft!==null&&!gn.done;mn++,gn=we.next()){Ft.index>mn?(Gi=Ft,Ft=null):Gi=Ft.sibling;var bl=Et(ve,Ft,gn.value,dt);if(bl===null){Ft===null&&(Ft=Gi);break}f&&Ft&&bl.alternate===null&&h(ve,Ft),ce=D(bl,ce,mn),Ut===null?St=bl:Ut.sibling=bl,Ut=bl,Ft=Gi}if(gn.done)return M(ve,Ft),On&&Lc(ve,mn),St;if(Ft===null){for(;!gn.done;mn++,gn=we.next())gn=Dt(ve,gn.value,dt),gn!==null&&(ce=D(gn,ce,mn),Ut===null?St=gn:Ut.sibling=gn,Ut=gn);return On&&Lc(ve,mn),St}for(Ft=T(ve,Ft);!gn.done;mn++,gn=we.next())gn=En(Ft,ve,mn,gn.value,dt),gn!==null&&(f&&gn.alternate!==null&&Ft.delete(gn.key===null?mn:gn.key),ce=D(gn,ce,mn),Ut===null?St=gn:Ut.sibling=gn,Ut=gn);return f&&Ft.forEach(function(XN){return h(ve,XN)}),On&&Lc(ve,mn),St}function io(ve,ce,we,dt){if(typeof we=="object"&&we!==null&&we.type===u&&we.key===null&&(we=we.props.children),typeof we=="object"&&we!==null){switch(we.$$typeof){case l:e:{for(var St=we.key,Ut=ce;Ut!==null;){if(Ut.key===St){if(St=we.type,St===u){if(Ut.tag===7){M(ve,Ut.sibling),ce=I(Ut,we.props.children),ce.return=ve,ve=ce;break e}}else if(Ut.elementType===St||typeof St=="object"&&St!==null&&St.$$typeof===b&&mT(St)===Ut.type){M(ve,Ut.sibling),ce=I(Ut,we.props),ce.ref=vh(ve,Ut,we),ce.return=ve,ve=ce;break e}M(ve,Ut);break}else h(ve,Ut);Ut=Ut.sibling}we.type===u?(ce=Uc(we.props.children,ve.mode,dt,we.key),ce.return=ve,ve=ce):(dt=Y0(we.type,we.key,we.props,null,ve.mode,dt),dt.ref=vh(ve,ce,we),dt.return=ve,ve=dt)}return te(ve);case c:e:{for(Ut=we.key;ce!==null;){if(ce.key===Ut)if(ce.tag===4&&ce.stateNode.containerInfo===we.containerInfo&&ce.stateNode.implementation===we.implementation){M(ve,ce.sibling),ce=I(ce,we.children||[]),ce.return=ve,ve=ce;break e}else{M(ve,ce);break}else h(ve,ce);ce=ce.sibling}ce=G_(we,ve.mode,dt),ce.return=ve,ve=ce}return te(ve);case b:return Ut=we._init,io(ve,ce,Ut(we._payload),dt)}if(z(we))return At(ve,ce,we,dt);if(C(we))return fr(ve,ce,we,dt);g0(ve,we)}return typeof we=="string"&&we!==""||typeof we=="number"?(we=""+we,ce!==null&&ce.tag===6?(M(ve,ce.sibling),ce=I(ce,we),ce.return=ve,ve=ce):(M(ve,ce),ce=H_(we,ve.mode,dt),ce.return=ve,ve=ce),te(ve)):M(ve,ce)}return io}var hd=gT(!0),xT=gT(!1),yh={},$s=st(yh),_h=st(yh),pd=st(yh);function Zo(f){if(f===yh)throw Error(o(174));return f}function s_(f,h){Je(pd,h),Je(_h,f),Je($s,yh),f=V(h),We($s),Je($s,f)}function md(){We($s),We(_h),We(pd)}function vT(f){var h=Zo(pd.current),M=Zo($s.current);h=G(M,f.type,h),M!==h&&(Je(_h,f),Je($s,h))}function o_(f){_h.current===f&&(We($s),We(_h))}var Vn=st(0);function x0(f){for(var h=f;h!==null;){if(h.tag===13){var M=h.memoizedState;if(M!==null&&(M=M.dehydrated,M===null||ft(M)||Tt(M)))return h}else if(h.tag===19&&h.memoizedProps.revealOrder!==void 0){if(h.flags&128)return h}else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===f)break;for(;h.sibling===null;){if(h.return===null||h.return===f)return null;h=h.return}h.sibling.return=h.return,h=h.sibling}return null}var a_=[];function l_(){for(var f=0;f<a_.length;f++){var h=a_[f];Te?h._workInProgressVersionPrimary=null:h._workInProgressVersionSecondary=null}a_.length=0}var v0=a.ReactCurrentDispatcher,eo=a.ReactCurrentBatchConfig,gd=0,ti=null,cr=null,Hi=null,y0=!1,Sh=!1,bh=0,xN=0;function ur(){throw Error(o(321))}function c_(f,h){if(h===null)return!1;for(var M=0;M<h.length&&M<f.length;M++)if(!Jo(f[M],h[M]))return!1;return!0}function u_(f,h,M,T,I,D){if(gd=D,ti=h,h.memoizedState=null,h.updateQueue=null,h.lanes=0,v0.current=f===null||f.memoizedState===null?SN:bN,f=M(T,I),Sh){D=0;do{if(Sh=!1,bh=0,25<=D)throw Error(o(301));D+=1,Hi=cr=null,h.updateQueue=null,v0.current=MN,f=M(T,I)}while(Sh)}if(v0.current=A0,h=cr!==null&&cr.next!==null,gd=0,Hi=cr=ti=null,y0=!1,h)throw Error(o(300));return f}function d_(){var f=bh!==0;return bh=0,f}function Pa(){var f={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Hi===null?ti.memoizedState=Hi=f:Hi=Hi.next=f,Hi}function Qo(){if(cr===null){var f=ti.alternate;f=f!==null?f.memoizedState:null}else f=cr.next;var h=Hi===null?ti.memoizedState:Hi.next;if(h!==null)Hi=h,cr=f;else{if(f===null)throw Error(o(310));cr=f,f={memoizedState:cr.memoizedState,baseState:cr.baseState,baseQueue:cr.baseQueue,queue:cr.queue,next:null},Hi===null?ti.memoizedState=Hi=f:Hi=Hi.next=f}return Hi}function Bc(f,h){return typeof h=="function"?h(f):h}function _0(f){var h=Qo(),M=h.queue;if(M===null)throw Error(o(311));M.lastRenderedReducer=f;var T=cr,I=T.baseQueue,D=M.pending;if(D!==null){if(I!==null){var te=I.next;I.next=D.next,D.next=te}T.baseQueue=I=D,M.pending=null}if(I!==null){D=I.next,T=T.baseState;var ae=te=null,Ie=null,et=D;do{var xt=et.lane;if((gd&xt)===xt)Ie!==null&&(Ie=Ie.next={lane:0,action:et.action,hasEagerState:et.hasEagerState,eagerState:et.eagerState,next:null}),T=et.hasEagerState?et.eagerState:f(T,et.action);else{var Dt={lane:xt,action:et.action,hasEagerState:et.hasEagerState,eagerState:et.eagerState,next:null};Ie===null?(ae=Ie=Dt,te=T):Ie=Ie.next=Dt,ti.lanes|=xt,vd|=xt}et=et.next}while(et!==null&&et!==D);Ie===null?te=T:Ie.next=ae,Jo(T,h.memoizedState)||(ys=!0),h.memoizedState=T,h.baseState=te,h.baseQueue=Ie,M.lastRenderedState=T}if(f=M.interleaved,f!==null){I=f;do D=I.lane,ti.lanes|=D,vd|=D,I=I.next;while(I!==f)}else I===null&&(M.lanes=0);return[h.memoizedState,M.dispatch]}function S0(f){var h=Qo(),M=h.queue;if(M===null)throw Error(o(311));M.lastRenderedReducer=f;var T=M.dispatch,I=M.pending,D=h.memoizedState;if(I!==null){M.pending=null;var te=I=I.next;do D=f(D,te.action),te=te.next;while(te!==I);Jo(D,h.memoizedState)||(ys=!0),h.memoizedState=D,h.baseQueue===null&&(h.baseState=D),M.lastRenderedState=D}return[D,T]}function yT(){}function _T(f,h){var M=ti,T=Qo(),I=h(),D=!Jo(T.memoizedState,I);if(D&&(T.memoizedState=I,ys=!0),T=T.queue,Ah(MT.bind(null,M,T,f),[f]),T.getSnapshot!==h||D||Hi!==null&&Hi.memoizedState.tag&1){if(M.flags|=2048,Mh(9,bT.bind(null,M,T,I,h),void 0,null),vi===null)throw Error(o(349));gd&30||ST(M,h,I)}return I}function ST(f,h,M){f.flags|=16384,f={getSnapshot:h,value:M},h=ti.updateQueue,h===null?(h={lastEffect:null,stores:null},ti.updateQueue=h,h.stores=[f]):(M=h.stores,M===null?h.stores=[f]:M.push(f))}function bT(f,h,M,T){h.value=M,h.getSnapshot=T,AT(h)&&to(f,1,-1)}function MT(f,h,M){return M(function(){AT(h)&&to(f,1,-1)})}function AT(f){var h=f.getSnapshot;f=f.value;try{var M=h();return!Jo(f,M)}catch{return!0}}function f_(f){var h=Pa();return typeof f=="function"&&(f=f()),h.memoizedState=h.baseState=f,f={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Bc,lastRenderedState:f},h.queue=f,f=f.dispatch=_N.bind(null,ti,f),[h.memoizedState,f]}function Mh(f,h,M,T){return f={tag:f,create:h,destroy:M,deps:T,next:null},h=ti.updateQueue,h===null?(h={lastEffect:null,stores:null},ti.updateQueue=h,h.lastEffect=f.next=f):(M=h.lastEffect,M===null?h.lastEffect=f.next=f:(T=M.next,M.next=f,f.next=T,h.lastEffect=f)),f}function wT(){return Qo().memoizedState}function b0(f,h,M,T){var I=Pa();ti.flags|=f,I.memoizedState=Mh(1|h,M,void 0,T===void 0?null:T)}function M0(f,h,M,T){var I=Qo();T=T===void 0?null:T;var D=void 0;if(cr!==null){var te=cr.memoizedState;if(D=te.destroy,T!==null&&c_(T,te.deps)){I.memoizedState=Mh(h,M,D,T);return}}ti.flags|=f,I.memoizedState=Mh(1|h,M,D,T)}function h_(f,h){return b0(8390656,8,f,h)}function Ah(f,h){return M0(2048,8,f,h)}function TT(f,h){return M0(4,2,f,h)}function ET(f,h){return M0(4,4,f,h)}function CT(f,h){if(typeof h=="function")return f=f(),h(f),function(){h(null)};if(h!=null)return f=f(),h.current=f,function(){h.current=null}}function RT(f,h,M){return M=M!=null?M.concat([f]):null,M0(4,4,CT.bind(null,h,f),M)}function p_(){}function PT(f,h){var M=Qo();h=h===void 0?null:h;var T=M.memoizedState;return T!==null&&h!==null&&c_(h,T[1])?T[0]:(M.memoizedState=[f,h],f)}function IT(f,h){var M=Qo();h=h===void 0?null:h;var T=M.memoizedState;return T!==null&&h!==null&&c_(h,T[1])?T[0]:(f=f(),M.memoizedState=[f,h],f)}function vN(f,h){var M=pn;pn=M!==0&&4>M?M:4,f(!0);var T=eo.transition;eo.transition={};try{f(!1),h()}finally{pn=M,eo.transition=T}}function LT(){return Qo().memoizedState}function yN(f,h,M){var T=yl(f);M={lane:T,action:M,hasEagerState:!1,eagerState:null,next:null},BT(f)?DT(h,M):(FT(f,h,M),M=Lr(),f=to(f,T,M),f!==null&&NT(f,h,T))}function _N(f,h,M){var T=yl(f),I={lane:T,action:M,hasEagerState:!1,eagerState:null,next:null};if(BT(f))DT(h,I);else{FT(f,h,I);var D=f.alternate;if(f.lanes===0&&(D===null||D.lanes===0)&&(D=h.lastRenderedReducer,D!==null))try{var te=h.lastRenderedState,ae=D(te,M);if(I.hasEagerState=!0,I.eagerState=ae,Jo(ae,te))return}catch{}finally{}M=Lr(),f=to(f,T,M),f!==null&&NT(f,h,T)}}function BT(f){var h=f.alternate;return f===ti||h!==null&&h===ti}function DT(f,h){Sh=y0=!0;var M=f.pending;M===null?h.next=h:(h.next=M.next,M.next=h),f.pending=h}function FT(f,h,M){vi!==null&&f.mode&1&&!(Ht&2)?(f=h.interleaved,f===null?(M.next=M,qo===null?qo=[h]:qo.push(h)):(M.next=f.next,f.next=M),h.interleaved=M):(f=h.pending,f===null?M.next=M:(M.next=f.next,f.next=M),h.pending=M)}function NT(f,h,M){if(M&4194240){var T=h.lanes;T&=f.pendingLanes,M|=T,h.lanes=M,G1(f,M)}}var A0={readContext:qs,useCallback:ur,useContext:ur,useEffect:ur,useImperativeHandle:ur,useInsertionEffect:ur,useLayoutEffect:ur,useMemo:ur,useReducer:ur,useRef:ur,useState:ur,useDebugValue:ur,useDeferredValue:ur,useTransition:ur,useMutableSource:ur,useSyncExternalStore:ur,useId:ur,unstable_isNewReconciler:!1},SN={readContext:qs,useCallback:function(f,h){return Pa().memoizedState=[f,h===void 0?null:h],f},useContext:qs,useEffect:h_,useImperativeHandle:function(f,h,M){return M=M!=null?M.concat([f]):null,b0(4194308,4,CT.bind(null,h,f),M)},useLayoutEffect:function(f,h){return b0(4194308,4,f,h)},useInsertionEffect:function(f,h){return b0(4,2,f,h)},useMemo:function(f,h){var M=Pa();return h=h===void 0?null:h,f=f(),M.memoizedState=[f,h],f},useReducer:function(f,h,M){var T=Pa();return h=M!==void 0?M(h):h,T.memoizedState=T.baseState=h,f={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:f,lastRenderedState:h},T.queue=f,f=f.dispatch=yN.bind(null,ti,f),[T.memoizedState,f]},useRef:function(f){var h=Pa();return f={current:f},h.memoizedState=f},useState:f_,useDebugValue:p_,useDeferredValue:function(f){var h=f_(f),M=h[0],T=h[1];return h_(function(){var I=eo.transition;eo.transition={};try{T(f)}finally{eo.transition=I}},[f]),M},useTransition:function(){var f=f_(!1),h=f[0];return f=vN.bind(null,f[1]),Pa().memoizedState=f,[h,f]},useMutableSource:function(){},useSyncExternalStore:function(f,h,M){var T=ti,I=Pa();if(On){if(M===void 0)throw Error(o(407));M=M()}else{if(M=h(),vi===null)throw Error(o(349));gd&30||ST(T,h,M)}I.memoizedState=M;var D={value:M,getSnapshot:h};return I.queue=D,h_(MT.bind(null,T,D,f),[f]),T.flags|=2048,Mh(9,bT.bind(null,T,D,M,h),void 0,null),M},useId:function(){var f=Pa(),h=vi.identifierPrefix;if(On){var M=Ra,T=Ca;M=(T&~(1<<32-Fn(T)-1)).toString(32)+M,h=":"+h+"R"+M,M=bh++,0<M&&(h+="H"+M.toString(32)),h+=":"}else M=xN++,h=":"+h+"r"+M.toString(32)+":";return f.memoizedState=h},unstable_isNewReconciler:!1},bN={readContext:qs,useCallback:PT,useContext:qs,useEffect:Ah,useImperativeHandle:RT,useInsertionEffect:TT,useLayoutEffect:ET,useMemo:IT,useReducer:_0,useRef:wT,useState:function(){return _0(Bc)},useDebugValue:p_,useDeferredValue:function(f){var h=_0(Bc),M=h[0],T=h[1];return Ah(function(){var I=eo.transition;eo.transition={};try{T(f)}finally{eo.transition=I}},[f]),M},useTransition:function(){var f=_0(Bc)[0],h=Qo().memoizedState;return[f,h]},useMutableSource:yT,useSyncExternalStore:_T,useId:LT,unstable_isNewReconciler:!1},MN={readContext:qs,useCallback:PT,useContext:qs,useEffect:Ah,useImperativeHandle:RT,useInsertionEffect:TT,useLayoutEffect:ET,useMemo:IT,useReducer:S0,useRef:wT,useState:function(){return S0(Bc)},useDebugValue:p_,useDeferredValue:function(f){var h=S0(Bc),M=h[0],T=h[1];return Ah(function(){var I=eo.transition;eo.transition={};try{T(f)}finally{eo.transition=I}},[f]),M},useTransition:function(){var f=S0(Bc)[0],h=Qo().memoizedState;return[f,h]},useMutableSource:yT,useSyncExternalStore:_T,useId:LT,unstable_isNewReconciler:!1};function m_(f,h){try{var M="",T=h;do M+=gN(T),T=T.return;while(T);var I=M}catch(D){I=` 4120Error generating stack: `+D.message+` 4121`+D.stack}return{value:f,source:h,stack:I}}function g_(f,h){try{console.error(h.value)}catch(M){setTimeout(function(){throw M})}}var AN=typeof WeakMap=="function"?WeakMap:Map;function kT(f,h,M){M=Ea(-1,M),M.tag=3,M.payload={element:null};var T=h.value;return M.callback=function(){z0||(z0=!0,D_=T),g_(f,h)},M}function OT(f,h,M){M=Ea(-1,M),M.tag=3;var T=f.type.getDerivedStateFromError;if(typeof T=="function"){var I=h.value;M.payload=function(){return T(I)},M.callback=function(){g_(f,h)}}var D=f.stateNode;return D!==null&&typeof D.componentDidCatch=="function"&&(M.callback=function(){g_(f,h),typeof T!="function"&&(xl===null?xl=new Set([this]):xl.add(this));var te=h.stack;this.componentDidCatch(h.value,{componentStack:te!==null?te:""})}),M}function UT(f,h,M){var T=f.pingCache;if(T===null){T=f.pingCache=new AN;var I=new Set;T.set(h,I)}else I=T.get(h),I===void 0&&(I=new Set,T.set(h,I));I.has(M)||(I.add(M),f=ON.bind(null,f,h,M),h.then(f,f))}function zT(f){do{var h;if((h=f.tag===13)&&(h=f.memoizedState,h=h!==null?h.dehydrated!==null:!0),h)return f;f=f.return}while(f!==null);return null}function HT(f,h,M,T,I){return f.mode&1?(f.flags|=65536,f.lanes=I,f):(f===h?f.flags|=65536:(f.flags|=128,M.flags|=131072,M.flags&=-52805,M.tag===1&&(M.alternate===null?M.tag=17:(h=Ea(-1,1),h.tag=2,gl(M,h))),M.lanes|=1),f)}function $o(f){f.flags|=4}function GT(f,h){if(f!==null&&f.child===h.child)return!0;if(h.flags&16)return!1;for(f=h.child;f!==null;){if(f.flags&12854||f.subtreeFlags&12854)return!1;f=f.sibling}return!0}var wh,Th,w0,T0;if(De)wh=function(f,h){for(var M=h.child;M!==null;){if(M.tag===5||M.tag===6)le(f,M.stateNode);else if(M.tag!==4&&M.child!==null){M.child.return=M,M=M.child;continue}if(M===h)break;for(;M.sibling===null;){if(M.return===null||M.return===h)return;M=M.return}M.sibling.return=M.return,M=M.sibling}},Th=function(){},w0=function(f,h,M,T,I){if(f=f.memoizedProps,f!==T){var D=h.stateNode,te=Zo($s.current);M=Se(D,M,f,T,I,te),(h.updateQueue=M)&&$o(h)}},T0=function(f,h,M,T){M!==T&&$o(h)};else if(tt){wh=function(f,h,M,T){for(var I=h.child;I!==null;){if(I.tag===5){var D=I.stateNode;M&&T&&(D=Qe(D,I.type,I.memoizedProps,I)),le(f,D)}else if(I.tag===6)D=I.stateNode,M&&T&&(D=rt(D,I.memoizedProps,I)),le(f,D);else if(I.tag!==4){if(I.tag===22&&I.memoizedState!==null)D=I.child,D!==null&&(D.return=I),wh(f,I,!0,!0);else if(I.child!==null){I.child.return=I,I=I.child;continue}}if(I===h)break;for(;I.sibling===null;){if(I.return===null||I.return===h)return;I=I.return}I.sibling.return=I.return,I=I.sibling}};var jT=function(f,h,M,T){for(var I=h.child;I!==null;){if(I.tag===5){var D=I.stateNode;M&&T&&(D=Qe(D,I.type,I.memoizedProps,I)),Oe(f,D)}else if(I.tag===6)D=I.stateNode,M&&T&&(D=rt(D,I.memoizedProps,I)),Oe(f,D);else if(I.tag!==4){if(I.tag===22&&I.memoizedState!==null)D=I.child,D!==null&&(D.return=I),jT(f,I,!0,!0);else if(I.child!==null){I.child.return=I,I=I.child;continue}}if(I===h)break;for(;I.sibling===null;){if(I.return===null||I.return===h)return;I=I.return}I.sibling.return=I.return,I=I.sibling}};Th=function(f,h){var M=h.stateNode;if(!GT(f,h)){f=M.containerInfo;var T=Me(f);jT(T,h,!1,!1),M.pendingChildren=T,$o(h),lt(f,T)}},w0=function(f,h,M,T,I){var D=f.stateNode,te=f.memoizedProps;if((f=GT(f,h))&&te===T)h.stateNode=D;else{var ae=h.stateNode,Ie=Zo($s.current),et=null;te!==T&&(et=Se(ae,M,te,T,I,Ie)),f&&et===null?h.stateNode=D:(D=Le(D,et,M,te,T,h,f,ae),ge(D,M,T,I,Ie)&&$o(h),h.stateNode=D,f?$o(h):wh(D,h,!1,!1))}},T0=function(f,h,M,T){M!==T?(f=Zo(pd.current),M=Zo($s.current),h.stateNode=K(T,f,M,h),$o(h)):h.stateNode=f.stateNode}}else Th=function(){},w0=function(){},T0=function(){};function Eh(f,h){if(!On)switch(f.tailMode){case"hidden":h=f.tail;for(var M=null;h!==null;)h.alternate!==null&&(M=h),h=h.sibling;M===null?f.tail=null:M.sibling=null;break;case"collapsed":M=f.tail;for(var T=null;M!==null;)M.alternate!==null&&(T=M),M=M.sibling;T===null?h||f.tail===null?f.tail=null:f.tail.sibling=null:T.sibling=null}}function dr(f){var h=f.alternate!==null&&f.alternate.child===f.child,M=0,T=0;if(h)for(var I=f.child;I!==null;)M|=I.lanes|I.childLanes,T|=I.subtreeFlags&14680064,T|=I.flags&14680064,I.return=f,I=I.sibling;else for(I=f.child;I!==null;)M|=I.lanes|I.childLanes,T|=I.subtreeFlags,T|=I.flags,I.return=f,I=I.sibling;return f.subtreeFlags|=T,f.childLanes=M,h}function wN(f,h,M){var T=h.pendingProps;switch(t_(h),h.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dr(h),null;case 1:return Zt(h.type)&&Tn(),dr(h),null;case 3:return T=h.stateNode,md(),We(ht),We(gt),l_(),T.pendingContext&&(T.context=T.pendingContext,T.pendingContext=null),(f===null||f.child===null)&&(xh(h)?$o(h):f===null||f.memoizedState.isDehydrated&&!(h.flags&256)||(h.flags|=1024,Co!==null&&(k_(Co),Co=null))),Th(f,h),dr(h),null;case 5:o_(h),M=Zo(pd.current);var I=h.type;if(f!==null&&h.stateNode!=null)w0(f,h,I,T,M),f.ref!==h.ref&&(h.flags|=512,h.flags|=2097152);else{if(!T){if(h.stateNode===null)throw Error(o(166));return dr(h),null}if(f=Zo($s.current),xh(h)){if(!Pe)throw Error(o(175));f=fn(h.stateNode,h.type,h.memoizedProps,M,f,h,!gh),h.updateQueue=f,f!==null&&$o(h)}else{var D=ee(I,T,M,f,h);wh(D,h,!1,!1),h.stateNode=D,ge(D,I,T,M,f)&&$o(h)}h.ref!==null&&(h.flags|=512,h.flags|=2097152)}return dr(h),null;case 6:if(f&&h.stateNode!=null)T0(f,h,f.memoizedProps,T);else{if(typeof T!="string"&&h.stateNode===null)throw Error(o(166));if(f=Zo(pd.current),M=Zo($s.current),xh(h)){if(!Pe)throw Error(o(176));if(f=h.stateNode,T=h.memoizedProps,(M=qt(f,T,h,!gh))&&(I=xs,I!==null))switch(D=(I.mode&1)!==0,I.tag){case 3:wo(I.stateNode.containerInfo,f,T,D);break;case 5:hl(I.type,I.memoizedProps,I.stateNode,f,T,D)}M&&$o(h)}else h.stateNode=K(T,f,M,h)}return dr(h),null;case 13:if(We(Vn),T=h.memoizedState,On&&vs!==null&&h.mode&1&&!(h.flags&128)){for(f=vs;f;)f=Lt(f);return fd(),h.flags|=98560,h}if(T!==null&&T.dehydrated!==null){if(T=xh(h),f===null){if(!T)throw Error(o(318));if(!Pe)throw Error(o(344));if(f=h.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(o(317));wi(f,h)}else fd(),!(h.flags&128)&&(h.memoizedState=null),h.flags|=4;return dr(h),null}return Co!==null&&(k_(Co),Co=null),h.flags&128?(h.lanes=M,h):(T=T!==null,M=!1,f===null?xh(h):M=f.memoizedState!==null,T&&!M&&(h.child.flags|=8192,h.mode&1&&(f===null||Vn.current&1?Ci===0&&(Ci=3):U_())),h.updateQueue!==null&&(h.flags|=4),dr(h),null);case 4:return md(),Th(f,h),f===null&&Ee(h.stateNode.containerInfo),dr(h),null;case 10:return K1(h.type._context),dr(h),null;case 17:return Zt(h.type)&&Tn(),dr(h),null;case 19:if(We(Vn),I=h.memoizedState,I===null)return dr(h),null;if(T=(h.flags&128)!==0,D=I.rendering,D===null)if(T)Eh(I,!1);else{if(Ci!==0||f!==null&&f.flags&128)for(f=h.child;f!==null;){if(D=x0(f),D!==null){for(h.flags|=128,Eh(I,!1),f=D.updateQueue,f!==null&&(h.updateQueue=f,h.flags|=4),h.subtreeFlags=0,f=M,T=h.child;T!==null;)M=T,I=f,M.flags&=14680066,D=M.alternate,D===null?(M.childLanes=0,M.lanes=I,M.child=null,M.subtreeFlags=0,M.memoizedProps=null,M.memoizedState=null,M.updateQueue=null,M.dependencies=null,M.stateNode=null):(M.childLanes=D.childLanes,M.lanes=D.lanes,M.child=D.child,M.subtreeFlags=0,M.deletions=null,M.memoizedProps=D.memoizedProps,M.memoizedState=D.memoizedState,M.updateQueue=D.updateQueue,M.type=D.type,I=D.dependencies,M.dependencies=I===null?null:{lanes:I.lanes,firstContext:I.firstContext}),T=T.sibling;return Je(Vn,Vn.current&1|2),h.child}f=f.sibling}I.tail!==null&&zi()>B_&&(h.flags|=128,T=!0,Eh(I,!1),h.lanes=4194304)}else{if(!T)if(f=x0(D),f!==null){if(h.flags|=128,T=!0,f=f.updateQueue,f!==null&&(h.updateQueue=f,h.flags|=4),Eh(I,!0),I.tail===null&&I.tailMode==="hidden"&&!D.alternate&&!On)return dr(h),null}else 2*zi()-I.renderingStartTime>B_&&M!==1073741824&&(h.flags|=128,T=!0,Eh(I,!1),h.lanes=4194304);I.isBackwards?(D.sibling=h.child,h.child=D):(f=I.last,f!==null?f.sibling=D:h.child=D,I.last=D)}return I.tail!==null?(h=I.tail,I.rendering=h,I.tail=h.sibling,I.renderingStartTime=zi(),h.sibling=null,f=Vn.current,Je(Vn,T?f&1|2:f&1),h):(dr(h),null);case 22:case 23:return O_(),T=h.memoizedState!==null,f!==null&&f.memoizedState!==null!==T&&(h.flags|=8192),T&&h.mode&1?_s&1073741824&&(dr(h),De&&h.subtreeFlags&6&&(h.flags|=8192)):dr(h),null;case 24:return null;case 25:return null}throw Error(o(156,h.tag))}var TN=a.ReactCurrentOwner,ys=!1;function Ir(f,h,M,T){h.child=f===null?xT(h,null,M,T):hd(h,f.child,M,T)}function WT(f,h,M,T,I){M=M.render;var D=h.ref;return cd(h,I),T=u_(f,h,M,T,D,I),M=d_(),f!==null&&!ys?(h.updateQueue=f.updateQueue,h.flags&=-2053,f.lanes&=~I,Ia(f,h,I)):(On&&M&&e_(h),h.flags|=1,Ir(f,h,T,I),h.child)}function VT(f,h,M,T,I){if(f===null){var D=M.type;return typeof D=="function"&&!z_(D)&&D.defaultProps===void 0&&M.compare===null&&M.defaultProps===void 0?(h.tag=15,h.type=D,XT(f,h,D,T,I)):(f=Y0(M.type,null,T,h,h.mode,I),f.ref=h.ref,f.return=h,h.child=f)}if(D=f.child,!(f.lanes&I)){var te=D.memoizedProps;if(M=M.compare,M=M!==null?M:l0,M(te,T)&&f.ref===h.ref)return Ia(f,h,I)}return h.flags|=1,f=Sl(D,T),f.ref=h.ref,f.return=h,h.child=f}function XT(f,h,M,T,I){if(f!==null&&l0(f.memoizedProps,T)&&f.ref===h.ref)if(ys=!1,(f.lanes&I)!==0)f.flags&131072&&(ys=!0);else return h.lanes=f.lanes,Ia(f,h,I);return x_(f,h,M,T,I)}function YT(f,h,M){var T=h.pendingProps,I=T.children,D=f!==null?f.memoizedState:null;if(T.mode==="hidden")if(!(h.mode&1))h.memoizedState={baseLanes:0,cachePool:null},Je(xd,_s),_s|=M;else if(M&1073741824)h.memoizedState={baseLanes:0,cachePool:null},T=D!==null?D.baseLanes:M,Je(xd,_s),_s|=T;else return f=D!==null?D.baseLanes|M:M,h.lanes=h.childLanes=1073741824,h.memoizedState={baseLanes:f,cachePool:null},h.updateQueue=null,Je(xd,_s),_s|=f,null;else D!==null?(T=D.baseLanes|M,h.memoizedState=null):T=M,Je(xd,_s),_s|=T;return Ir(f,h,I,M),h.child}function JT(f,h){var M=h.ref;(f===null&&M!==null||f!==null&&f.ref!==M)&&(h.flags|=512,h.flags|=2097152)}function x_(f,h,M,T,I){var D=Zt(M)?Bt:gt.current;return D=nn(h,D),cd(h,I),M=u_(f,h,M,T,D,I),T=d_(),f!==null&&!ys?(h.updateQueue=f.updateQueue,h.flags&=-2053,f.lanes&=~I,Ia(f,h,I)):(On&&T&&e_(h),h.flags|=1,Ir(f,h,M,I),h.child)}function KT(f,h,M,T,I){if(Zt(M)){var D=!0;ln(h)}else D=!1;if(cd(h,I),h.stateNode===null)f!==null&&(f.alternate=null,h.alternate=null,h.flags|=2),cT(h,M,T),$1(h,M,T,I),T=!0;else if(f===null){var te=h.stateNode,ae=h.memoizedProps;te.props=ae;var Ie=te.context,et=M.contextType;typeof et=="object"&&et!==null?et=qs(et):(et=Zt(M)?Bt:gt.current,et=nn(h,et));var xt=M.getDerivedStateFromProps,Dt=typeof xt=="function"||typeof te.getSnapshotBeforeUpdate=="function";Dt||typeof te.UNSAFE_componentWillReceiveProps!="function"&&typeof te.componentWillReceiveProps!="function"||(ae!==T||Ie!==et)&&uT(h,te,T,et),ml=!1;var Et=h.memoizedState;te.state=Et,f0(h,T,te,I),Ie=h.memoizedState,ae!==T||Et!==Ie||ht.current||ml?(typeof xt=="function"&&(Q1(h,M,xt,T),Ie=h.memoizedState),(ae=ml||lT(h,M,ae,T,Et,Ie,et))?(Dt||typeof te.UNSAFE_componentWillMount!="function"&&typeof te.componentWillMount!="function"||(typeof te.componentWillMount=="function"&&te.componentWillMount(),typeof te.UNSAFE_componentWillMount=="function"&&te.UNSAFE_componentWillMount()),typeof te.componentDidMount=="function"&&(h.flags|=4194308)):(typeof te.componentDidMount=="function"&&(h.flags|=4194308),h.memoizedProps=T,h.memoizedState=Ie),te.props=T,te.state=Ie,te.context=et,T=ae):(typeof te.componentDidMount=="function"&&(h.flags|=4194308),T=!1)}else{te=h.stateNode,rT(f,h),ae=h.memoizedProps,et=h.type===h.elementType?ae:Eo(h.type,ae),te.props=et,Dt=h.pendingProps,Et=te.context,Ie=M.contextType,typeof Ie=="object"&&Ie!==null?Ie=qs(Ie):(Ie=Zt(M)?Bt:gt.current,Ie=nn(h,Ie));var En=M.getDerivedStateFromProps;(xt=typeof En=="function"||typeof te.getSnapshotBeforeUpdate=="function")||typeof te.UNSAFE_componentWillReceiveProps!="function"&&typeof te.componentWillReceiveProps!="function"||(ae!==Dt||Et!==Ie)&&uT(h,te,T,Ie),ml=!1,Et=h.memoizedState,te.state=Et,f0(h,T,te,I);var At=h.memoizedState;ae!==Dt||Et!==At||ht.current||ml?(typeof En=="function"&&(Q1(h,M,En,T),At=h.memoizedState),(et=ml||lT(h,M,et,T,Et,At,Ie)||!1)?(xt||typeof te.UNSAFE_componentWillUpdate!="function"&&typeof te.componentWillUpdate!="function"||(typeof te.componentWillUpdate=="function"&&te.componentWillUpdate(T,At,Ie),typeof te.UNSAFE_componentWillUpdate=="function"&&te.UNSAFE_componentWillUpdate(T,At,Ie)),typeof te.componentDidUpdate=="function"&&(h.flags|=4),typeof te.getSnapshotBeforeUpdate=="function"&&(h.flags|=1024)):(typeof te.componentDidUpdate!="function"||ae===f.memoizedProps&&Et===f.memoizedState||(h.flags|=4),typeof te.getSnapshotBeforeUpdate!="function"||ae===f.memoizedProps&&Et===f.memoizedState||(h.flags|=1024),h.memoizedProps=T,h.memoizedState=At),te.props=T,te.state=At,te.context=Ie,T=et):(typeof te.componentDidUpdate!="function"||ae===f.memoizedProps&&Et===f.memoizedState||(h.flags|=4),typeof te.getSnapshotBeforeUpdate!="function"||ae===f.memoizedProps&&Et===f.memoizedState||(h.flags|=1024),T=!1)}return v_(f,h,M,T,D,I)}function v_(f,h,M,T,I,D){JT(f,h);var te=(h.flags&128)!==0;if(!T&&!te)return I&&rn(h,M,!1),Ia(f,h,D);T=h.stateNode,TN.current=h;var ae=te&&typeof M.getDerivedStateFromError!="function"?null:T.render();return h.flags|=1,f!==null&&te?(h.child=hd(h,f.child,null,D),h.child=hd(h,null,ae,D)):Ir(f,h,ae,D),h.memoizedState=T.state,I&&rn(h,M,!0),h.child}function qT(f){var h=f.stateNode;h.pendingContext?yn(f,h.pendingContext,h.pendingContext!==h.context):h.context&&yn(f,h.context,!1),s_(f,h.containerInfo)}function ZT(f,h,M,T,I){return fd(),r_(I),h.flags|=256,Ir(f,h,M,T),h.child}var E0={dehydrated:null,treeContext:null,retryLane:0};function C0(f){return{baseLanes:f,cachePool:null}}function QT(f,h,M){var T=h.pendingProps,I=Vn.current,D=!1,te=(h.flags&128)!==0,ae;if((ae=te)||(ae=f!==null&&f.memoizedState===null?!1:(I&2)!==0),ae?(D=!0,h.flags&=-129):(f===null||f.memoizedState!==null)&&(I|=1),Je(Vn,I&1),f===null)return i_(h),f=h.memoizedState,f!==null&&(f=f.dehydrated,f!==null)?(h.mode&1?Tt(f)?h.lanes=8:h.lanes=1073741824:h.lanes=1,null):(I=T.children,f=T.fallback,D?(T=h.mode,D=h.child,I={mode:"hidden",children:I},!(T&1)&&D!==null?(D.childLanes=0,D.pendingProps=I):D=J0(I,T,0,null),f=Uc(f,T,M,null),D.return=h,f.return=h,D.sibling=f,h.child=D,h.child.memoizedState=C0(M),h.memoizedState=E0,f):y_(h,I));if(I=f.memoizedState,I!==null){if(ae=I.dehydrated,ae!==null){if(te)return h.flags&256?(h.flags&=-257,R0(f,h,M,Error(o(422)))):h.memoizedState!==null?(h.child=f.child,h.flags|=128,null):(D=T.fallback,I=h.mode,T=J0({mode:"visible",children:T.children},I,0,null),D=Uc(D,I,M,null),D.flags|=2,T.return=h,D.return=h,T.sibling=D,h.child=T,h.mode&1&&hd(h,f.child,null,M),h.child.memoizedState=C0(M),h.memoizedState=E0,D);if(!(h.mode&1))h=R0(f,h,M,null);else if(Tt(ae))h=R0(f,h,M,Error(o(419)));else if(T=(M&f.childLanes)!==0,ys||T){if(T=vi,T!==null){switch(M&-M){case 4:D=2;break;case 16:D=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:D=32;break;case 536870912:D=268435456;break;default:D=0}T=D&(T.suspendedLanes|M)?0:D,T!==0&&T!==I.retryLane&&(I.retryLane=T,to(f,T,-1))}U_(),h=R0(f,h,M,Error(o(421)))}else ft(ae)?(h.flags|=128,h.child=f.child,h=UN.bind(null,f),tn(ae,h),h=null):(M=I.treeContext,Pe&&(vs=bn(ae),xs=h,On=!0,Co=null,gh=!1,M!==null&&(Zs[Qs++]=Ca,Zs[Qs++]=Ra,Zs[Qs++]=Ic,Ca=M.id,Ra=M.overflow,Ic=h)),h=y_(h,h.pendingProps.children),h.flags|=4096);return h}return D?(T=eE(f,h,T.children,T.fallback,M),D=h.child,I=f.child.memoizedState,D.memoizedState=I===null?C0(M):{baseLanes:I.baseLanes|M,cachePool:null},D.childLanes=f.childLanes&~M,h.memoizedState=E0,T):(M=$T(f,h,T.children,M),h.memoizedState=null,M)}return D?(T=eE(f,h,T.children,T.fallback,M),D=h.child,I=f.child.memoizedState,D.memoizedState=I===null?C0(M):{baseLanes:I.baseLanes|M,cachePool:null},D.childLanes=f.childLanes&~M,h.memoizedState=E0,T):(M=$T(f,h,T.children,M),h.memoizedState=null,M)}function y_(f,h){return h=J0({mode:"visible",children:h},f.mode,0,null),h.return=f,f.child=h}function $T(f,h,M,T){var I=f.child;return f=I.sibling,M=Sl(I,{mode:"visible",children:M}),!(h.mode&1)&&(M.lanes=T),M.return=h,M.sibling=null,f!==null&&(T=h.deletions,T===null?(h.deletions=[f],h.flags|=16):T.push(f)),h.child=M}function eE(f,h,M,T,I){var D=h.mode;f=f.child;var te=f.sibling,ae={mode:"hidden",children:M};return!(D&1)&&h.child!==f?(M=h.child,M.childLanes=0,M.pendingProps=ae,h.deletions=null):(M=Sl(f,ae),M.subtreeFlags=f.subtreeFlags&14680064),te!==null?T=Sl(te,T):(T=Uc(T,D,I,null),T.flags|=2),T.return=h,M.return=h,M.sibling=T,h.child=M,T}function R0(f,h,M,T){return T!==null&&r_(T),hd(h,f.child,null,M),f=y_(h,h.pendingProps.children),f.flags|=2,h.memoizedState=null,f}function tE(f,h,M){f.lanes|=h;var T=f.alternate;T!==null&&(T.lanes|=h),q1(f.return,h,M)}function __(f,h,M,T,I){var D=f.memoizedState;D===null?f.memoizedState={isBackwards:h,rendering:null,renderingStartTime:0,last:T,tail:M,tailMode:I}:(D.isBackwards=h,D.rendering=null,D.renderingStartTime=0,D.last=T,D.tail=M,D.tailMode=I)}function nE(f,h,M){var T=h.pendingProps,I=T.revealOrder,D=T.tail;if(Ir(f,h,T.children,M),T=Vn.current,T&2)T=T&1|2,h.flags|=128;else{if(f!==null&&f.flags&128)e:for(f=h.child;f!==null;){if(f.tag===13)f.memoizedState!==null&&tE(f,M,h);else if(f.tag===19)tE(f,M,h);else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===h)break e;for(;f.sibling===null;){if(f.return===null||f.return===h)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}T&=1}if(Je(Vn,T),!(h.mode&1))h.memoizedState=null;else switch(I){case"forwards":for(M=h.child,I=null;M!==null;)f=M.alternate,f!==null&&x0(f)===null&&(I=M),M=M.sibling;M=I,M===null?(I=h.child,h.child=null):(I=M.sibling,M.sibling=null),__(h,!1,I,M,D);break;case"backwards":for(M=null,I=h.child,h.child=null;I!==null;){if(f=I.alternate,f!==null&&x0(f)===null){h.child=I;break}f=I.sibling,I.sibling=M,M=I,I=f}__(h,!0,M,null,D);break;case"together":__(h,!1,null,null,void 0);break;default:h.memoizedState=null}return h.child}function Ia(f,h,M){if(f!==null&&(h.dependencies=f.dependencies),vd|=h.lanes,!(M&h.childLanes))return null;if(f!==null&&h.child!==f.child)throw Error(o(153));if(h.child!==null){for(f=h.child,M=Sl(f,f.pendingProps),h.child=M,M.return=h;f.sibling!==null;)f=f.sibling,M=M.sibling=Sl(f,f.pendingProps),M.return=h;M.sibling=null}return h.child}function EN(f,h,M){switch(h.tag){case 3:qT(h),fd();break;case 5:vT(h);break;case 1:Zt(h.type)&&ln(h);break;case 4:s_(h,h.stateNode.containerInfo);break;case 10:iT(h,h.type._context,h.memoizedProps.value);break;case 13:var T=h.memoizedState;if(T!==null)return T.dehydrated!==null?(Je(Vn,Vn.current&1),h.flags|=128,null):M&h.child.childLanes?QT(f,h,M):(Je(Vn,Vn.current&1),f=Ia(f,h,M),f!==null?f.sibling:null);Je(Vn,Vn.current&1);break;case 19:if(T=(M&h.childLanes)!==0,f.flags&128){if(T)return nE(f,h,M);h.flags|=128}var I=h.memoizedState;if(I!==null&&(I.rendering=null,I.tail=null,I.lastEffect=null),Je(Vn,Vn.current),T)break;return null;case 22:case 23:return h.lanes=0,YT(f,h,M)}return Ia(f,h,M)}function CN(f,h){switch(t_(h),h.tag){case 1:return Zt(h.type)&&Tn(),f=h.flags,f&65536?(h.flags=f&-65537|128,h):null;case 3:return md(),We(ht),We(gt),l_(),f=h.flags,f&65536&&!(f&128)?(h.flags=f&-65537|128,h):null;case 5:return o_(h),null;case 13:if(We(Vn),f=h.memoizedState,f!==null&&f.dehydrated!==null){if(h.alternate===null)throw Error(o(340));fd()}return f=h.flags,f&65536?(h.flags=f&-65537|128,h):null;case 19:return We(Vn),null;case 4:return md(),null;case 10:return K1(h.type._context),null;case 22:case 23:return O_(),null;case 24:return null;default:return null}}var P0=!1,Dc=!1,RN=typeof WeakSet=="function"?WeakSet:Set,ut=null;function I0(f,h){var M=f.ref;if(M!==null)if(typeof M=="function")try{M(null)}catch(T){$r(f,h,T)}else M.current=null}function S_(f,h,M){try{M()}catch(T){$r(f,h,T)}}var iE=!1;function PN(f,h){for(Z(f.containerInfo),ut=h;ut!==null;)if(f=ut,h=f.child,(f.subtreeFlags&1028)!==0&&h!==null)h.return=f,ut=h;else for(;ut!==null;){f=ut;try{var M=f.alternate;if(f.flags&1024)switch(f.tag){case 0:case 11:case 15:break;case 1:if(M!==null){var T=M.memoizedProps,I=M.memoizedState,D=f.stateNode,te=D.getSnapshotBeforeUpdate(f.elementType===f.type?T:Eo(f.type,T),I);D.__reactInternalSnapshotBeforeUpdate=te}break;case 3:De&&Ge(f.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(ae){$r(f,f.return,ae)}if(h=f.sibling,h!==null){h.return=f.return,ut=h;break}ut=f.return}return M=iE,iE=!1,M}function Fc(f,h,M){var T=h.updateQueue;if(T=T!==null?T.lastEffect:null,T!==null){var I=T=T.next;do{if((I.tag&f)===f){var D=I.destroy;I.destroy=void 0,D!==void 0&&S_(h,M,D)}I=I.next}while(I!==T)}}function Ch(f,h){if(h=h.updateQueue,h=h!==null?h.lastEffect:null,h!==null){var M=h=h.next;do{if((M.tag&f)===f){var T=M.create;M.destroy=T()}M=M.next}while(M!==h)}}function b_(f){var h=f.ref;if(h!==null){var M=f.stateNode;switch(f.tag){case 5:f=W(M);break;default:f=M}typeof h=="function"?h(f):h.current=f}}function rE(f,h,M){if(Yo&&typeof Yo.onCommitFiberUnmount=="function")try{Yo.onCommitFiberUnmount(o0,h)}catch{}switch(h.tag){case 0:case 11:case 14:case 15:if(f=h.updateQueue,f!==null&&(f=f.lastEffect,f!==null)){var T=f=f.next;do{var I=T,D=I.destroy;I=I.tag,D!==void 0&&(I&2||I&4)&&S_(h,M,D),T=T.next}while(T!==f)}break;case 1:if(I0(h,M),f=h.stateNode,typeof f.componentWillUnmount=="function")try{f.props=h.memoizedProps,f.state=h.memoizedState,f.componentWillUnmount()}catch(te){$r(h,M,te)}break;case 5:I0(h,M);break;case 4:De?uE(f,h,M):tt&&tt&&(h=h.stateNode.containerInfo,M=Me(h),Pt(h,M))}}function sE(f,h,M){for(var T=h;;)if(rE(f,T,M),T.child===null||De&&T.tag===4){if(T===h)break;for(;T.sibling===null;){if(T.return===null||T.return===h)return;T=T.return}T.sibling.return=T.return,T=T.sibling}else T.child.return=T,T=T.child}function oE(f){var h=f.alternate;h!==null&&(f.alternate=null,oE(h)),f.child=null,f.deletions=null,f.sibling=null,f.tag===5&&(h=f.stateNode,h!==null&&$(h)),f.stateNode=null,f.return=null,f.dependencies=null,f.memoizedProps=null,f.memoizedState=null,f.pendingProps=null,f.stateNode=null,f.updateQueue=null}function aE(f){return f.tag===5||f.tag===3||f.tag===4}function lE(f){e:for(;;){for(;f.sibling===null;){if(f.return===null||aE(f.return))return null;f=f.return}for(f.sibling.return=f.return,f=f.sibling;f.tag!==5&&f.tag!==6&&f.tag!==18;){if(f.flags&2||f.child===null||f.tag===4)continue e;f.child.return=f,f=f.child}if(!(f.flags&2))return f.stateNode}}function cE(f){if(De){e:{for(var h=f.return;h!==null;){if(aE(h))break e;h=h.return}throw Error(o(160))}var M=h;switch(M.tag){case 5:h=M.stateNode,M.flags&32&&(fe(h),M.flags&=-33),M=lE(f),A_(f,M,h);break;case 3:case 4:h=M.stateNode.containerInfo,M=lE(f),M_(f,M,h);break;default:throw Error(o(161))}}}function M_(f,h,M){var T=f.tag;if(T===5||T===6)f=f.stateNode,h?Xe(M,f,h):ze(M,f);else if(T!==4&&(f=f.child,f!==null))for(M_(f,h,M),f=f.sibling;f!==null;)M_(f,h,M),f=f.sibling}function A_(f,h,M){var T=f.tag;if(T===5||T===6)f=f.stateNode,h?Fe(M,f,h):de(M,f);else if(T!==4&&(f=f.child,f!==null))for(A_(f,h,M),f=f.sibling;f!==null;)A_(f,h,M),f=f.sibling}function uE(f,h,M){for(var T=h,I=!1,D,te;;){if(!I){I=T.return;e:for(;;){if(I===null)throw Error(o(160));switch(D=I.stateNode,I.tag){case 5:te=!1;break e;case 3:D=D.containerInfo,te=!0;break e;case 4:D=D.containerInfo,te=!0;break e}I=I.return}I=!0}if(T.tag===5||T.tag===6)sE(f,T,M),te?ie(D,T.stateNode):it(D,T.stateNode);else if(T.tag===18)te?li(D,T.stateNode):ai(D,T.stateNode);else if(T.tag===4){if(T.child!==null){D=T.stateNode.containerInfo,te=!0,T.child.return=T,T=T.child;continue}}else if(rE(f,T,M),T.child!==null){T.child.return=T,T=T.child;continue}if(T===h)break;for(;T.sibling===null;){if(T.return===null||T.return===h)return;T=T.return,T.tag===4&&(I=!1)}T.sibling.return=T.return,T=T.sibling}}function w_(f,h){if(De){switch(h.tag){case 0:case 11:case 14:case 15:Fc(3,h,h.return),Ch(3,h),Fc(5,h,h.return);return;case 1:return;case 5:var M=h.stateNode;if(M!=null){var T=h.memoizedProps;f=f!==null?f.memoizedProps:T;var I=h.type,D=h.updateQueue;h.updateQueue=null,D!==null&&$e(M,D,I,f,T,h)}return;case 6:if(h.stateNode===null)throw Error(o(162));M=h.memoizedProps,Be(h.stateNode,f!==null?f.memoizedProps:M,M);return;case 3:Pe&&f!==null&&f.memoizedState.isDehydrated&&Ti(h.stateNode.containerInfo);return;case 12:return;case 13:L0(h);return;case 19:L0(h);return;case 17:return}throw Error(o(163))}switch(h.tag){case 0:case 11:case 14:case 15:Fc(3,h,h.return),Ch(3,h),Fc(5,h,h.return);return;case 12:return;case 13:L0(h);return;case 19:L0(h);return;case 3:Pe&&f!==null&&f.memoizedState.isDehydrated&&Ti(h.stateNode.containerInfo);break;case 22:case 23:return}e:if(tt){switch(h.tag){case 1:case 5:case 6:break e;case 3:case 4:h=h.stateNode,Pt(h.containerInfo,h.pendingChildren);break e}throw Error(o(163))}}function L0(f){var h=f.updateQueue;if(h!==null){f.updateQueue=null;var M=f.stateNode;M===null&&(M=f.stateNode=new RN),h.forEach(function(T){var I=zN.bind(null,f,T);M.has(T)||(M.add(T),T.then(I,I))})}}function IN(f,h){for(ut=h;ut!==null;){h=ut;var M=h.deletions;if(M!==null)for(var T=0;T<M.length;T++){var I=M[T];try{var D=f;De?uE(D,I,h):sE(D,I,h);var te=I.alternate;te!==null&&(te.return=null),I.return=null}catch(St){$r(I,h,St)}}if(M=h.child,h.subtreeFlags&12854&&M!==null)M.return=h,ut=M;else for(;ut!==null;){h=ut;try{var ae=h.flags;if(ae&32&&De&&fe(h.stateNode),ae&512){var Ie=h.alternate;if(Ie!==null){var et=Ie.ref;et!==null&&(typeof et=="function"?et(null):et.current=null)}}if(ae&8192)switch(h.tag){case 13:if(h.memoizedState!==null){var xt=h.alternate;(xt===null||xt.memoizedState===null)&&(L_=zi())}break;case 22:var Dt=h.memoizedState!==null,Et=h.alternate,En=Et!==null&&Et.memoizedState!==null;if(M=h,De){e:if(T=M,I=Dt,D=null,De)for(var At=T;;){if(At.tag===5){if(D===null){D=At;var fr=At.stateNode;I?He(fr):je(At.stateNode,At.memoizedProps)}}else if(At.tag===6){if(D===null){var io=At.stateNode;I?Q(io):Re(io,At.memoizedProps)}}else if((At.tag!==22&&At.tag!==23||At.memoizedState===null||At===T)&&At.child!==null){At.child.return=At,At=At.child;continue}if(At===T)break;for(;At.sibling===null;){if(At.return===null||At.return===T)break e;D===At&&(D=null),At=At.return}D===At&&(D=null),At.sibling.return=At.return,At=At.sibling}}if(Dt&&!En&&M.mode&1){ut=M;for(var ve=M.child;ve!==null;){for(M=ut=ve;ut!==null;){T=ut;var ce=T.child;switch(T.tag){case 0:case 11:case 14:case 15:Fc(4,T,T.return);break;case 1:I0(T,T.return);var we=T.stateNode;if(typeof we.componentWillUnmount=="function"){var dt=T.return;try{we.props=T.memoizedProps,we.state=T.memoizedState,we.componentWillUnmount()}catch(St){$r(T,dt,St)}}break;case 5:I0(T,T.return);break;case 22:if(T.memoizedState!==null){hE(M);continue}}ce!==null?(ce.return=T,ut=ce):hE(M)}ve=ve.sibling}}}switch(ae&4102){case 2:cE(h),h.flags&=-3;break;case 6:cE(h),h.flags&=-3,w_(h.alternate,h);break;case 4096:h.flags&=-4097;break;case 4100:h.flags&=-4097,w_(h.alternate,h);break;case 4:w_(h.alternate,h)}}catch(St){$r(h,h.return,St)}if(M=h.sibling,M!==null){M.return=h.return,ut=M;break}ut=h.return}}}function LN(f,h,M){ut=f,dE(f)}function dE(f,h,M){for(var T=(f.mode&1)!==0;ut!==null;){var I=ut,D=I.child;if(I.tag===22&&T){var te=I.memoizedState!==null||P0;if(!te){var ae=I.alternate,Ie=ae!==null&&ae.memoizedState!==null||Dc;ae=P0;var et=Dc;if(P0=te,(Dc=Ie)&&!et)for(ut=I;ut!==null;)te=ut,Ie=te.child,te.tag===22&&te.memoizedState!==null?pE(I):Ie!==null?(Ie.return=te,ut=Ie):pE(I);for(;D!==null;)ut=D,dE(D),D=D.sibling;ut=I,P0=ae,Dc=et}fE(f)}else I.subtreeFlags&8772&&D!==null?(D.return=I,ut=D):fE(f)}}function fE(f){for(;ut!==null;){var h=ut;if(h.flags&8772){var M=h.alternate;try{if(h.flags&8772)switch(h.tag){case 0:case 11:case 15:Dc||Ch(5,h);break;case 1:var T=h.stateNode;if(h.flags&4&&!Dc)if(M===null)T.componentDidMount();else{var I=h.elementType===h.type?M.memoizedProps:Eo(h.type,M.memoizedProps);T.componentDidUpdate(I,M.memoizedState,T.__reactInternalSnapshotBeforeUpdate)}var D=h.updateQueue;D!==null&&oT(h,D,T);break;case 3:var te=h.updateQueue;if(te!==null){if(M=null,h.child!==null)switch(h.child.tag){case 5:M=W(h.child.stateNode);break;case 1:M=h.child.stateNode}oT(h,te,M)}break;case 5:var ae=h.stateNode;M===null&&h.flags&4&&Ke(ae,h.type,h.memoizedProps,h);break;case 6:break;case 4:break;case 12:break;case 13:if(Pe&&h.memoizedState===null){var Ie=h.alternate;if(Ie!==null){var et=Ie.memoizedState;if(et!==null){var xt=et.dehydrated;xt!==null&&Rr(xt)}}}break;case 19:case 17:case 21:case 22:case 23:break;default:throw Error(o(163))}Dc||h.flags&512&&b_(h)}catch(Dt){$r(h,h.return,Dt)}}if(h===f){ut=null;break}if(M=h.sibling,M!==null){M.return=h.return,ut=M;break}ut=h.return}}function hE(f){for(;ut!==null;){var h=ut;if(h===f){ut=null;break}var M=h.sibling;if(M!==null){M.return=h.return,ut=M;break}ut=h.return}}function pE(f){for(;ut!==null;){var h=ut;try{switch(h.tag){case 0:case 11:case 15:var M=h.return;try{Ch(4,h)}catch(Ie){$r(h,M,Ie)}break;case 1:var T=h.stateNode;if(typeof T.componentDidMount=="function"){var I=h.return;try{T.componentDidMount()}catch(Ie){$r(h,I,Ie)}}var D=h.return;try{b_(h)}catch(Ie){$r(h,D,Ie)}break;case 5:var te=h.return;try{b_(h)}catch(Ie){$r(h,te,Ie)}}}catch(Ie){$r(h,h.return,Ie)}if(h===f){ut=null;break}var ae=h.sibling;if(ae!==null){ae.return=h.return,ut=ae;break}ut=h.return}}var B0=0,D0=1,F0=2,N0=3,k0=4;if(typeof Symbol=="function"&&Symbol.for){var Rh=Symbol.for;B0=Rh("selector.component"),D0=Rh("selector.has_pseudo_class"),F0=Rh("selector.role"),N0=Rh("selector.test_id"),k0=Rh("selector.text")}function T_(f){var h=me(f);if(h!=null){if(typeof h.memoizedProps["data-testname"]!="string")throw Error(o(364));return h}if(f=ke(f),f===null)throw Error(o(362));return f.stateNode.current}function E_(f,h){switch(h.$$typeof){case B0:if(f.type===h.value)return!0;break;case D0:e:{h=h.value,f=[f,0];for(var M=0;M<f.length;){var T=f[M++],I=f[M++],D=h[I];if(T.tag!==5||!F(T)){for(;D!=null&&E_(T,D);)I++,D=h[I];if(I===h.length){h=!0;break e}else for(T=T.child;T!==null;)f.push(T,I),T=T.sibling}}h=!1}return h;case F0:if(f.tag===5&&ne(f.stateNode,h.value))return!0;break;case k0:if((f.tag===5||f.tag===6)&&(f=U(f),f!==null&&0<=f.indexOf(h.value)))return!0;break;case N0:if(f.tag===5&&(f=f.memoizedProps["data-testname"],typeof f=="string"&&f.toLowerCase()===h.value.toLowerCase()))return!0;break;default:throw Error(o(365))}return!1}function C_(f){switch(f.$$typeof){case B0:return"<"+(P(f.value)||"Unknown")+">";case D0:return":has("+(C_(f)||"")+")";case F0:return'[role="'+f.value+'"]';case k0:return'"'+f.value+'"';case N0:return'[data-testname="'+f.value+'"]';default:throw Error(o(365))}}function mE(f,h){var M=[];f=[f,0];for(var T=0;T<f.length;){var I=f[T++],D=f[T++],te=h[D];if(I.tag!==5||!F(I)){for(;te!=null&&E_(I,te);)D++,te=h[D];if(D===h.length)M.push(I);else for(I=I.child;I!==null;)f.push(I,D),I=I.sibling}}return M}function R_(f,h){if(!Ne)throw Error(o(363));f=T_(f),f=mE(f,h),h=[],f=Array.from(f);for(var M=0;M<f.length;){var T=f[M++];if(T.tag===5)F(T)||h.push(T.stateNode);else for(T=T.child;T!==null;)f.push(T),T=T.sibling}return h}var BN=Math.ceil,O0=a.ReactCurrentDispatcher,P_=a.ReactCurrentOwner,ci=a.ReactCurrentBatchConfig,Ht=0,vi=null,yi=null,qi=0,_s=0,xd=st(0),Ci=0,Ph=null,vd=0,U0=0,I_=0,Ih=null,Zr=null,L_=0,B_=1/0;function yd(){B_=zi()+500}var z0=!1,D_=null,xl=null,H0=!1,vl=null,G0=0,Lh=0,F_=null,j0=-1,W0=0;function Lr(){return Ht&6?zi():j0!==-1?j0:j0=zi()}function yl(f){return f.mode&1?Ht&2&&qi!==0?qi&-qi:mN.transition!==null?(W0===0&&(f=xn,xn<<=1,!(xn&4194240)&&(xn=64),W0=f),W0):(f=pn,f!==0?f:be()):1}function to(f,h,M){if(50<Lh)throw Lh=0,F_=null,Error(o(185));var T=V0(f,h);return T===null?null:(mh(T,h,M),(!(Ht&2)||T!==vi)&&(T===vi&&(!(Ht&2)&&(U0|=h),Ci===4&&_l(T,qi)),Qr(T,M),h===1&&Ht===0&&!(f.mode&1)&&(yd(),a0&&Ko())),T)}function V0(f,h){f.lanes|=h;var M=f.alternate;for(M!==null&&(M.lanes|=h),M=f,f=f.return;f!==null;)f.childLanes|=h,M=f.alternate,M!==null&&(M.childLanes|=h),M=f,f=f.return;return M.tag===3?M.stateNode:null}function Qr(f,h){var M=f.callbackNode;ph(f,h);var T=xi(f,f===vi?qi:0);if(T===0)M!==null&&tT(M),f.callbackNode=null,f.callbackPriority=0;else if(h=T&-T,f.callbackPriority!==h){if(M!=null&&tT(M),h===1)f.tag===0?pN(xE.bind(null,f)):nT(xE.bind(null,f)),J?Ue(function(){Ht===0&&Ko()}):j1(W1,Ko),M=null;else{switch(eT(T)){case 1:M=W1;break;case 4:M=uN;break;case 16:M=V1;break;case 536870912:M=dN;break;default:M=V1}M=TE(M,gE.bind(null,f))}f.callbackPriority=h,f.callbackNode=M}}function gE(f,h){if(j0=-1,W0=0,Ht&6)throw Error(o(327));var M=f.callbackNode;if(Oc()&&f.callbackNode!==M)return null;var T=xi(f,f===vi?qi:0);if(T===0)return null;if(T&30||T&f.expiredLanes||h)h=X0(f,T);else{h=T;var I=Ht;Ht|=2;var D=_E();(vi!==f||qi!==h)&&(yd(),Nc(f,h));do try{NN();break}catch(ae){yE(f,ae)}while(!0);J1(),O0.current=D,Ht=I,yi!==null?h=0:(vi=null,qi=0,h=Ci)}if(h!==0){if(h===2&&(I=To(f),I!==0&&(T=I,h=N_(f,I))),h===1)throw M=Ph,Nc(f,0),_l(f,T),Qr(f,zi()),M;if(h===6)_l(f,T);else{if(I=f.current.alternate,!(T&30)&&!DN(I)&&(h=X0(f,T),h===2&&(D=To(f),D!==0&&(T=D,h=N_(f,D))),h===1))throw M=Ph,Nc(f,0),_l(f,T),Qr(f,zi()),M;switch(f.finishedWork=I,f.finishedLanes=T,h){case 0:case 1:throw Error(o(345));case 2:kc(f,Zr);break;case 3:if(_l(f,T),(T&130023424)===T&&(h=L_+500-zi(),10<h)){if(xi(f,0)!==0)break;if(I=f.suspendedLanes,(I&T)!==T){Lr(),f.pingedLanes|=f.suspendedLanes&I;break}f.timeoutHandle=q(kc.bind(null,f,Zr),h);break}kc(f,Zr);break;case 4:if(_l(f,T),(T&4194240)===T)break;for(h=f.eventTimes,I=-1;0<T;){var te=31-Fn(T);D=1<<te,te=h[te],te>I&&(I=te),T&=~D}if(T=I,T=zi()-T,T=(120>T?120:480>T?480:1080>T?1080:1920>T?1920:3e3>T?3e3:4320>T?4320:1960*BN(T/1960))-T,10<T){f.timeoutHandle=q(kc.bind(null,f,Zr),T);break}kc(f,Zr);break;case 5:kc(f,Zr);break;default:throw Error(o(329))}}}return Qr(f,zi()),f.callbackNode===M?gE.bind(null,f):null}function N_(f,h){var M=Ih;return f.current.memoizedState.isDehydrated&&(Nc(f,h).flags|=256),f=X0(f,h),f!==2&&(h=Zr,Zr=M,h!==null&&k_(h)),f}function k_(f){Zr===null?Zr=f:Zr.push.apply(Zr,f)}function DN(f){for(var h=f;;){if(h.flags&16384){var M=h.updateQueue;if(M!==null&&(M=M.stores,M!==null))for(var T=0;T<M.length;T++){var I=M[T],D=I.getSnapshot;I=I.value;try{if(!Jo(D(),I))return!1}catch{return!1}}}if(M=h.child,h.subtreeFlags&16384&&M!==null)M.return=h,h=M;else{if(h===f)break;for(;h.sibling===null;){if(h.return===null||h.return===f)return!0;h=h.return}h.sibling.return=h.return,h=h.sibling}}return!0}function _l(f,h){for(h&=~I_,h&=~U0,f.suspendedLanes|=h,f.pingedLanes&=~h,f=f.expirationTimes;0<h;){var M=31-Fn(h),T=1<<M;f[M]=-1,h&=~T}}function xE(f){if(Ht&6)throw Error(o(327));Oc();var h=xi(f,0);if(!(h&1))return Qr(f,zi()),null;var M=X0(f,h);if(f.tag!==0&&M===2){var T=To(f);T!==0&&(h=T,M=N_(f,T))}if(M===1)throw M=Ph,Nc(f,0),_l(f,h),Qr(f,zi()),M;if(M===6)throw Error(o(345));return f.finishedWork=f.current.alternate,f.finishedLanes=h,kc(f,Zr),Qr(f,zi()),null}function vE(f){vl!==null&&vl.tag===0&&!(Ht&6)&&Oc();var h=Ht;Ht|=1;var M=ci.transition,T=pn;try{if(ci.transition=null,pn=1,f)return f()}finally{pn=T,ci.transition=M,Ht=h,!(Ht&6)&&Ko()}}function O_(){_s=xd.current,We(xd)}function Nc(f,h){f.finishedWork=null,f.finishedLanes=0;var M=f.timeoutHandle;if(M!==Ce&&(f.timeoutHandle=Ce,re(M)),yi!==null)for(M=yi.return;M!==null;){var T=M;switch(t_(T),T.tag){case 1:T=T.type.childContextTypes,T!=null&&Tn();break;case 3:md(),We(ht),We(gt),l_();break;case 5:o_(T);break;case 4:md();break;case 13:We(Vn);break;case 19:We(Vn);break;case 10:K1(T.type._context);break;case 22:case 23:O_()}M=M.return}if(vi=f,yi=f=Sl(f.current,null),qi=_s=h,Ci=0,Ph=null,I_=U0=vd=0,Zr=Ih=null,qo!==null){for(h=0;h<qo.length;h++)if(M=qo[h],T=M.interleaved,T!==null){M.interleaved=null;var I=T.next,D=M.pending;if(D!==null){var te=D.next;D.next=I,T.next=te}M.pending=T}qo=null}return f}function yE(f,h){do{var M=yi;try{if(J1(),v0.current=A0,y0){for(var T=ti.memoizedState;T!==null;){var I=T.queue;I!==null&&(I.pending=null),T=T.next}y0=!1}if(gd=0,Hi=cr=ti=null,Sh=!1,bh=0,P_.current=null,M===null||M.return===null){Ci=1,Ph=h,yi=null;break}e:{var D=f,te=M.return,ae=M,Ie=h;if(h=qi,ae.flags|=32768,Ie!==null&&typeof Ie=="object"&&typeof Ie.then=="function"){var et=Ie,xt=ae,Dt=xt.tag;if(!(xt.mode&1)&&(Dt===0||Dt===11||Dt===15)){var Et=xt.alternate;Et?(xt.updateQueue=Et.updateQueue,xt.memoizedState=Et.memoizedState,xt.lanes=Et.lanes):(xt.updateQueue=null,xt.memoizedState=null)}var En=zT(te);if(En!==null){En.flags&=-257,HT(En,te,ae,D,h),En.mode&1&&UT(D,et,h),h=En,Ie=et;var At=h.updateQueue;if(At===null){var fr=new Set;fr.add(Ie),h.updateQueue=fr}else At.add(Ie);break e}else{if(!(h&1)){UT(D,et,h),U_();break e}Ie=Error(o(426))}}else if(On&&ae.mode&1){var io=zT(te);if(io!==null){!(io.flags&65536)&&(io.flags|=256),HT(io,te,ae,D,h),r_(Ie);break e}}D=Ie,Ci!==4&&(Ci=2),Ih===null?Ih=[D]:Ih.push(D),Ie=m_(Ie,ae),ae=te;do{switch(ae.tag){case 3:ae.flags|=65536,h&=-h,ae.lanes|=h;var ve=kT(ae,Ie,h);sT(ae,ve);break e;case 1:D=Ie;var ce=ae.type,we=ae.stateNode;if(!(ae.flags&128)&&(typeof ce.getDerivedStateFromError=="function"||we!==null&&typeof we.componentDidCatch=="function"&&(xl===null||!xl.has(we)))){ae.flags|=65536,h&=-h,ae.lanes|=h;var dt=OT(ae,D,h);sT(ae,dt);break e}}ae=ae.return}while(ae!==null)}bE(M)}catch(St){h=St,yi===M&&M!==null&&(yi=M=M.return);continue}break}while(!0)}function _E(){var f=O0.current;return O0.current=A0,f===null?A0:f}function U_(){(Ci===0||Ci===3||Ci===2)&&(Ci=4),vi===null||!(vd&268435455)&&!(U0&268435455)||_l(vi,qi)}function X0(f,h){var M=Ht;Ht|=2;var T=_E();vi===f&&qi===h||Nc(f,h);do try{FN();break}catch(I){yE(f,I)}while(!0);if(J1(),Ht=M,O0.current=T,yi!==null)throw Error(o(261));return vi=null,qi=0,Ci}function FN(){for(;yi!==null;)SE(yi)}function NN(){for(;yi!==null&&!lN();)SE(yi)}function SE(f){var h=wE(f.alternate,f,_s);f.memoizedProps=f.pendingProps,h===null?bE(f):yi=h,P_.current=null}function bE(f){var h=f;do{var M=h.alternate;if(f=h.return,h.flags&32768){if(M=CN(M,h),M!==null){M.flags&=32767,yi=M;return}if(f!==null)f.flags|=32768,f.subtreeFlags=0,f.deletions=null;else{Ci=6,yi=null;return}}else if(M=wN(M,h,_s),M!==null){yi=M;return}if(h=h.sibling,h!==null){yi=h;return}yi=h=f}while(h!==null);Ci===0&&(Ci=5)}function kc(f,h){var M=pn,T=ci.transition;try{ci.transition=null,pn=1,kN(f,h,M)}finally{ci.transition=T,pn=M}return null}function kN(f,h,M){do Oc();while(vl!==null);if(Ht&6)throw Error(o(327));var T=f.finishedWork,I=f.finishedLanes;if(T===null)return null;if(f.finishedWork=null,f.finishedLanes=0,T===f.current)throw Error(o(177));f.callbackNode=null,f.callbackPriority=0;var D=T.lanes|T.childLanes;if(aN(f,D),f===vi&&(yi=vi=null,qi=0),!(T.subtreeFlags&2064)&&!(T.flags&2064)||H0||(H0=!0,TE(V1,function(){return Oc(),null})),D=(T.flags&15990)!==0,T.subtreeFlags&15990||D){D=ci.transition,ci.transition=null;var te=pn;pn=1;var ae=Ht;Ht|=4,P_.current=null,PN(f,T),IN(f,T),O(f.containerInfo),f.current=T,LN(T),cN(),Ht=ae,pn=te,ci.transition=D}else f.current=T;if(H0&&(H0=!1,vl=f,G0=I),D=f.pendingLanes,D===0&&(xl=null),fN(T.stateNode),Qr(f,zi()),h!==null)for(M=f.onRecoverableError,T=0;T<h.length;T++)M(h[T]);if(z0)throw z0=!1,f=D_,D_=null,f;return G0&1&&f.tag!==0&&Oc(),D=f.pendingLanes,D&1?f===F_?Lh++:(Lh=0,F_=f):Lh=0,Ko(),null}function Oc(){if(vl!==null){var f=eT(G0),h=ci.transition,M=pn;try{if(ci.transition=null,pn=16>f?16:f,vl===null)var T=!1;else{if(f=vl,vl=null,G0=0,Ht&6)throw Error(o(331));var I=Ht;for(Ht|=4,ut=f.current;ut!==null;){var D=ut,te=D.child;if(ut.flags&16){var ae=D.deletions;if(ae!==null){for(var Ie=0;Ie<ae.length;Ie++){var et=ae[Ie];for(ut=et;ut!==null;){var xt=ut;switch(xt.tag){case 0:case 11:case 15:Fc(8,xt,D)}var Dt=xt.child;if(Dt!==null)Dt.return=xt,ut=Dt;else for(;ut!==null;){xt=ut;var Et=xt.sibling,En=xt.return;if(oE(xt),xt===et){ut=null;break}if(Et!==null){Et.return=En,ut=Et;break}ut=En}}}var At=D.alternate;if(At!==null){var fr=At.child;if(fr!==null){At.child=null;do{var io=fr.sibling;fr.sibling=null,fr=io}while(fr!==null)}}ut=D}}if(D.subtreeFlags&2064&&te!==null)te.return=D,ut=te;else e:for(;ut!==null;){if(D=ut,D.flags&2048)switch(D.tag){case 0:case 11:case 15:Fc(9,D,D.return)}var ve=D.sibling;if(ve!==null){ve.return=D.return,ut=ve;break e}ut=D.return}}var ce=f.current;for(ut=ce;ut!==null;){te=ut;var we=te.child;if(te.subtreeFlags&2064&&we!==null)we.return=te,ut=we;else e:for(te=ce;ut!==null;){if(ae=ut,ae.flags&2048)try{switch(ae.tag){case 0:case 11:case 15:Ch(9,ae)}}catch(St){$r(ae,ae.return,St)}if(ae===te){ut=null;break e}var dt=ae.sibling;if(dt!==null){dt.return=ae.return,ut=dt;break e}ut=ae.return}}if(Ht=I,Ko(),Yo&&typeof Yo.onPostCommitFiberRoot=="function")try{Yo.onPostCommitFiberRoot(o0,f)}catch{}T=!0}return T}finally{pn=M,ci.transition=h}}return!1}function ME(f,h,M){h=m_(M,h),h=kT(f,h,1),gl(f,h),h=Lr(),f=V0(f,1),f!==null&&(mh(f,1,h),Qr(f,h))}function $r(f,h,M){if(f.tag===3)ME(f,f,M);else for(;h!==null;){if(h.tag===3){ME(h,f,M);break}else if(h.tag===1){var T=h.stateNode;if(typeof h.type.getDerivedStateFromError=="function"||typeof T.componentDidCatch=="function"&&(xl===null||!xl.has(T))){f=m_(M,f),f=OT(h,f,1),gl(h,f),f=Lr(),h=V0(h,1),h!==null&&(mh(h,1,f),Qr(h,f));break}}h=h.return}}function ON(f,h,M){var T=f.pingCache;T!==null&&T.delete(h),h=Lr(),f.pingedLanes|=f.suspendedLanes&M,vi===f&&(qi&M)===M&&(Ci===4||Ci===3&&(qi&130023424)===qi&&500>zi()-L_?Nc(f,0):I_|=M),Qr(f,h)}function AE(f,h){h===0&&(f.mode&1?(h=Ei,Ei<<=1,!(Ei&130023424)&&(Ei=4194304)):h=1);var M=Lr();f=V0(f,h),f!==null&&(mh(f,h,M),Qr(f,M))}function UN(f){var h=f.memoizedState,M=0;h!==null&&(M=h.retryLane),AE(f,M)}function zN(f,h){var M=0;switch(f.tag){case 13:var T=f.stateNode,I=f.memoizedState;I!==null&&(M=I.retryLane);break;case 19:T=f.stateNode;break;default:throw Error(o(314))}T!==null&&T.delete(h),AE(f,M)}var wE;wE=function(f,h,M){if(f!==null)if(f.memoizedProps!==h.pendingProps||ht.current)ys=!0;else{if(!(f.lanes&M)&&!(h.flags&128))return ys=!1,EN(f,h,M);ys=!!(f.flags&131072)}else ys=!1,On&&h.flags&1048576&&dT(h,m0,h.index);switch(h.lanes=0,h.tag){case 2:var T=h.type;f!==null&&(f.alternate=null,h.alternate=null,h.flags|=2),f=h.pendingProps;var I=nn(h,gt.current);cd(h,M),I=u_(null,h,T,f,I,M);var D=d_();return h.flags|=1,typeof I=="object"&&I!==null&&typeof I.render=="function"&&I.$$typeof===void 0?(h.tag=1,h.memoizedState=null,h.updateQueue=null,Zt(T)?(D=!0,ln(h)):D=!1,h.memoizedState=I.state!==null&&I.state!==void 0?I.state:null,Z1(h),I.updater=h0,h.stateNode=I,I._reactInternals=h,$1(h,T,f,M),h=v_(null,h,T,!0,D,M)):(h.tag=0,On&&D&&e_(h),Ir(null,h,I,M),h=h.child),h;case 16:T=h.elementType;e:{switch(f!==null&&(f.alternate=null,h.alternate=null,h.flags|=2),f=h.pendingProps,I=T._init,T=I(T._payload),h.type=T,I=h.tag=GN(T),f=Eo(T,f),I){case 0:h=x_(null,h,T,f,M);break e;case 1:h=KT(null,h,T,f,M);break e;case 11:h=WT(null,h,T,f,M);break e;case 14:h=VT(null,h,T,Eo(T.type,f),M);break e}throw Error(o(306,T,""))}return h;case 0:return T=h.type,I=h.pendingProps,I=h.elementType===T?I:Eo(T,I),x_(f,h,T,I,M);case 1:return T=h.type,I=h.pendingProps,I=h.elementType===T?I:Eo(T,I),KT(f,h,T,I,M);case 3:e:{if(qT(h),f===null)throw Error(o(387));T=h.pendingProps,D=h.memoizedState,I=D.element,rT(f,h),f0(h,T,null,M);var te=h.memoizedState;if(T=te.element,Pe&&D.isDehydrated)if(D={element:T,isDehydrated:!1,cache:te.cache,transitions:te.transitions},h.updateQueue.baseState=D,h.memoizedState=D,h.flags&256){I=Error(o(423)),h=ZT(f,h,T,M,I);break e}else if(T!==I){I=Error(o(424)),h=ZT(f,h,T,M,I);break e}else for(Pe&&(vs=Dn(h.stateNode.containerInfo),xs=h,On=!0,Co=null,gh=!1),M=xT(h,null,T,M),h.child=M;M;)M.flags=M.flags&-3|4096,M=M.sibling;else{if(fd(),T===I){h=Ia(f,h,M);break e}Ir(f,h,T,M)}h=h.child}return h;case 5:return vT(h),f===null&&i_(h),T=h.type,I=h.pendingProps,D=f!==null?f.memoizedProps:null,te=I.children,Ye(T,I)?te=null:D!==null&&Ye(T,D)&&(h.flags|=32),JT(f,h),Ir(f,h,te,M),h.child;case 6:return f===null&&i_(h),null;case 13:return QT(f,h,M);case 4:return s_(h,h.stateNode.containerInfo),T=h.pendingProps,f===null?h.child=hd(h,null,T,M):Ir(f,h,T,M),h.child;case 11:return T=h.type,I=h.pendingProps,I=h.elementType===T?I:Eo(T,I),WT(f,h,T,I,M);case 7:return Ir(f,h,h.pendingProps,M),h.child;case 8:return Ir(f,h,h.pendingProps.children,M),h.child;case 12:return Ir(f,h,h.pendingProps.children,M),h.child;case 10:e:{if(T=h.type._context,I=h.pendingProps,D=h.memoizedProps,te=I.value,iT(h,T,te),D!==null)if(Jo(D.value,te)){if(D.children===I.children&&!ht.current){h=Ia(f,h,M);break e}}else for(D=h.child,D!==null&&(D.return=h);D!==null;){var ae=D.dependencies;if(ae!==null){te=D.child;for(var Ie=ae.firstContext;Ie!==null;){if(Ie.context===T){if(D.tag===1){Ie=Ea(-1,M&-M),Ie.tag=2;var et=D.updateQueue;if(et!==null){et=et.shared;var xt=et.pending;xt===null?Ie.next=Ie:(Ie.next=xt.next,xt.next=Ie),et.pending=Ie}}D.lanes|=M,Ie=D.alternate,Ie!==null&&(Ie.lanes|=M),q1(D.return,M,h),ae.lanes|=M;break}Ie=Ie.next}}else if(D.tag===10)te=D.type===h.type?null:D.child;else if(D.tag===18){if(te=D.return,te===null)throw Error(o(341));te.lanes|=M,ae=te.alternate,ae!==null&&(ae.lanes|=M),q1(te,M,h),te=D.sibling}else te=D.child;if(te!==null)te.return=D;else for(te=D;te!==null;){if(te===h){te=null;break}if(D=te.sibling,D!==null){D.return=te.return,te=D;break}te=te.return}D=te}Ir(f,h,I.children,M),h=h.child}return h;case 9:return I=h.type,T=h.pendingProps.children,cd(h,M),I=qs(I),T=T(I),h.flags|=1,Ir(f,h,T,M),h.child;case 14:return T=h.type,I=Eo(T,h.pendingProps),I=Eo(T.type,I),VT(f,h,T,I,M);case 15:return XT(f,h,h.type,h.pendingProps,M);case 17:return T=h.type,I=h.pendingProps,I=h.elementType===T?I:Eo(T,I),f!==null&&(f.alternate=null,h.alternate=null,h.flags|=2),h.tag=1,Zt(T)?(f=!0,ln(h)):f=!1,cd(h,M),cT(h,T,I),$1(h,T,I,M),v_(null,h,T,!0,f,M);case 19:return nE(f,h,M);case 22:return YT(f,h,M)}throw Error(o(156,h.tag))};function TE(f,h){return j1(f,h)}function HN(f,h,M,T){this.tag=f,this.key=M,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=h,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=T,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function no(f,h,M,T){return new HN(f,h,M,T)}function z_(f){return f=f.prototype,!(!f||!f.isReactComponent)}function GN(f){if(typeof f=="function")return z_(f)?1:0;if(f!=null){if(f=f.$$typeof,f===v)return 11;if(f===S)return 14}return 2}function Sl(f,h){var M=f.alternate;return M===null?(M=no(f.tag,h,f.key,f.mode),M.elementType=f.elementType,M.type=f.type,M.stateNode=f.stateNode,M.alternate=f,f.alternate=M):(M.pendingProps=h,M.type=f.type,M.flags=0,M.subtreeFlags=0,M.deletions=null),M.flags=f.flags&14680064,M.childLanes=f.childLanes,M.lanes=f.lanes,M.child=f.child,M.memoizedProps=f.memoizedProps,M.memoizedState=f.memoizedState,M.updateQueue=f.updateQueue,h=f.dependencies,M.dependencies=h===null?null:{lanes:h.lanes,firstContext:h.firstContext},M.sibling=f.sibling,M.index=f.index,M.ref=f.ref,M}function Y0(f,h,M,T,I,D){var te=2;if(T=f,typeof f=="function")z_(f)&&(te=1);else if(typeof f=="string")te=5;else e:switch(f){case u:return Uc(M.children,I,D,h);case d:te=8,I|=8;break;case p:return f=no(12,M,h,I|2),f.elementType=p,f.lanes=D,f;case _:return f=no(13,M,h,I),f.elementType=_,f.lanes=D,f;case g:return f=no(19,M,h,I),f.elementType=g,f.lanes=D,f;case A:return J0(M,I,D,h);default:if(typeof f=="object"&&f!==null)switch(f.$$typeof){case m:te=10;break e;case x:te=9;break e;case v:te=11;break e;case S:te=14;break e;case b:te=16,T=null;break e}throw Error(o(130,f==null?f:typeof f,""))}return h=no(te,M,h,I),h.elementType=f,h.type=T,h.lanes=D,h}function Uc(f,h,M,T){return f=no(7,f,T,h),f.lanes=M,f}function J0(f,h,M,T){return f=no(22,f,T,h),f.elementType=A,f.lanes=M,f.stateNode={},f}function H_(f,h,M){return f=no(6,f,null,h),f.lanes=M,f}function G_(f,h,M){return h=no(4,f.children!==null?f.children:[],f.key,h),h.lanes=M,h.stateNode={containerInfo:f.containerInfo,pendingChildren:null,implementation:f.implementation},h}function jN(f,h,M,T,I){this.tag=h,this.containerInfo=f,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Ce,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=H1(0),this.expirationTimes=H1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=H1(0),this.identifierPrefix=T,this.onRecoverableError=I,Pe&&(this.mutableSourceEagerHydrationData=null)}function EE(f,h,M,T,I,D,te,ae,Ie){return f=new jN(f,h,M,ae,Ie),h===1?(h=1,D===!0&&(h|=8)):h=0,D=no(3,null,null,h),f.current=D,D.stateNode=f,D.memoizedState={element:T,isDehydrated:M,cache:null,transitions:null},Z1(D),f}function CE(f){if(!f)return pt;f=f._reactInternals;e:{if(R(f)!==f||f.tag!==1)throw Error(o(170));var h=f;do{switch(h.tag){case 3:h=h.stateNode.context;break e;case 1:if(Zt(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break e}}h=h.return}while(h!==null);throw Error(o(171))}if(f.tag===1){var M=f.type;if(Zt(M))return wt(f,M,h)}return h}function RE(f){var h=f._reactInternals;if(h===void 0)throw typeof f.render=="function"?Error(o(188)):(f=Object.keys(f).join(","),Error(o(268,f)));return f=N(h),f===null?null:f.stateNode}function PE(f,h){if(f=f.memoizedState,f!==null&&f.dehydrated!==null){var M=f.retryLane;f.retryLane=M!==0&&M<h?M:h}}function j_(f,h){PE(f,h),(f=f.alternate)&&PE(f,h)}function WN(f){return f=N(f),f===null?null:f.stateNode}function VN(){return null}return t.attemptContinuousHydration=function(f){if(f.tag===13){var h=Lr();to(f,134217728,h),j_(f,134217728)}},t.attemptHydrationAtCurrentPriority=function(f){if(f.tag===13){var h=Lr(),M=yl(f);to(f,M,h),j_(f,M)}},t.attemptSynchronousHydration=function(f){switch(f.tag){case 3:var h=f.stateNode;if(h.current.memoizedState.isDehydrated){var M=Ui(h.pendingLanes);M!==0&&(G1(h,M|1),Qr(h,zi()),!(Ht&6)&&(yd(),Ko()))}break;case 13:var T=Lr();vE(function(){return to(f,1,T)}),j_(f,1)}},t.batchedUpdates=function(f,h){var M=Ht;Ht|=1;try{return f(h)}finally{Ht=M,Ht===0&&(yd(),a0&&Ko())}},t.createComponentSelector=function(f){return{$$typeof:B0,value:f}},t.createContainer=function(f,h,M,T,I,D,te){return EE(f,h,!1,null,M,T,I,D,te)},t.createHasPseudoClassSelector=function(f){return{$$typeof:D0,value:f}},t.createHydrationContainer=function(f,h,M,T,I,D,te,ae,Ie){return f=EE(M,T,!0,f,I,D,te,ae,Ie),f.context=CE(null),M=f.current,T=Lr(),I=yl(M),D=Ea(T,I),D.callback=h??null,gl(M,D),f.current.lanes=I,mh(f,I,T),Qr(f,T),f},t.createPortal=function(f,h,M){var T=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:T==null?null:""+T,children:f,containerInfo:h,implementation:M}},t.createRoleSelector=function(f){return{$$typeof:F0,value:f}},t.createTestNameSelector=function(f){return{$$typeof:N0,value:f}},t.createTextSelector=function(f){return{$$typeof:k0,value:f}},t.deferredUpdates=function(f){var h=pn,M=ci.transition;try{return ci.transition=null,pn=16,f()}finally{pn=h,ci.transition=M}},t.discreteUpdates=function(f,h,M,T,I){var D=pn,te=ci.transition;try{return ci.transition=null,pn=1,f(h,M,T,I)}finally{pn=D,ci.transition=te,Ht===0&&yd()}},t.findAllNodes=R_,t.findBoundingRects=function(f,h){if(!Ne)throw Error(o(363));h=R_(f,h),f=[];for(var M=0;M<h.length;M++)f.push(Ae(h[M]));for(h=f.length-1;0<h;h--){M=f[h];for(var T=M.x,I=T+M.width,D=M.y,te=D+M.height,ae=h-1;0<=ae;ae--)if(h!==ae){var Ie=f[ae],et=Ie.x,xt=et+Ie.width,Dt=Ie.y,Et=Dt+Ie.height;if(T>=et&&D>=Dt&&I<=xt&&te<=Et){f.splice(h,1);break}else if(T!==et||M.width!==Ie.width||Et<D||Dt>te){if(!(D!==Dt||M.height!==Ie.height||xt<T||et>I)){et>T&&(Ie.width+=et-T,Ie.x=T),xt<I&&(Ie.width=I-et),f.splice(h,1);break}}else{Dt>D&&(Ie.height+=Dt-D,Ie.y=D),Et<te&&(Ie.height=te-Dt),f.splice(h,1);break}}}return f},t.findHostInstance=RE,t.findHostInstanceWithNoPortals=function(f){return f=L(f),f=f!==null?Y(f):null,f===null?null:f.stateNode},t.findHostInstanceWithWarning=function(f){return RE(f)},t.flushControlled=function(f){var h=Ht;Ht|=1;var M=ci.transition,T=pn;try{ci.transition=null,pn=1,f()}finally{pn=T,ci.transition=M,Ht=h,Ht===0&&(yd(),Ko())}},t.flushPassiveEffects=Oc,t.flushSync=vE,t.focusWithin=function(f,h){if(!Ne)throw Error(o(363));for(f=T_(f),h=mE(f,h),h=Array.from(h),f=0;f<h.length;){var M=h[f++];if(!F(M)){if(M.tag===5&&se(M.stateNode))return!0;for(M=M.child;M!==null;)h.push(M),M=M.sibling}}return!1},t.getCurrentUpdatePriority=function(){return pn},t.getFindAllNodesFailureDescription=function(f,h){if(!Ne)throw Error(o(363));var M=0,T=[];f=[T_(f),0];for(var I=0;I<f.length;){var D=f[I++],te=f[I++],ae=h[te];if((D.tag!==5||!F(D))&&(E_(D,ae)&&(T.push(C_(ae)),te++,te>M&&(M=te)),te<h.length))for(D=D.child;D!==null;)f.push(D,te),D=D.sibling}if(M<h.length){for(f=[];M<h.length;M++)f.push(C_(h[M]));return`findAllNodes was able to match part of the selector: 4122 `+(T.join(" > ")+` 4123 4124No matching component was found for: 4125 `)+f.join(" > ")}return null},t.getPublicRootInstance=function(f){if(f=f.current,!f.child)return null;switch(f.child.tag){case 5:return W(f.child.stateNode);default:return f.child.stateNode}},t.injectIntoDevTools=function(f){if(f={bundleType:f.bundleType,version:f.version,rendererPackageName:f.rendererPackageName,rendererConfig:f.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:WN,findFiberByHostInstance:f.findFiberByHostInstance||VN,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")f=!1;else{var h=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(h.isDisabled||!h.supportsFiber)f=!0;else{try{o0=h.inject(f),Yo=h}catch{}f=!!h.checkDCE}}return f},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(f,h,M,T){if(!Ne)throw Error(o(363));f=R_(f,h);var I=he(f,M,T).disconnect;return{disconnect:function(){I()}}},t.registerMutableSourceForHydration=function(f,h){var M=h._getVersion;M=M(h._source),f.mutableSourceEagerHydrationData==null?f.mutableSourceEagerHydrationData=[h,M]:f.mutableSourceEagerHydrationData.push(h,M)},t.runWithPriority=function(f,h){var M=pn;try{return pn=f,h()}finally{pn=M}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(f,h,M,T){var I=h.current,D=Lr(),te=yl(I);return M=CE(M),h.context===null?h.context=M:h.pendingContext=M,h=Ea(D,te),h.payload={element:f},T=T===void 0?null:T,T!==null&&(h.callback=T),gl(I,h),f=to(I,te,D),f!==null&&d0(f,I,te),te},t};hF.exports=jV;var WV=hF.exports;const VV=j3(WV),jw={},XV=i=>void Object.assign(jw,i);function YV(i,e){function t(u,{args:d=[],attach:p,...m},x){let v=`${u[0].toUpperCase()}${u.slice(1)}`,_;if(u==="primitive"){if(m.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const g=m.object;_=qd(g,{type:u,root:x,attach:p,primitive:!0})}else{const g=jw[v];if(!g)throw new Error(`R3F: ${v} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(!Array.isArray(d))throw new Error("R3F: The args prop must be an array!");_=qd(new g(...d),{type:u,root:x,attach:p,memoizedProps:{args:d}})}return _.__r3f.attach===void 0&&(_.isBufferGeometry?_.__r3f.attach="geometry":_.isMaterial&&(_.__r3f.attach="material")),v!=="inject"&&bS(_,m),_}function n(u,d){let p=!1;if(d){var m,x;(m=d.__r3f)!=null&&m.attach?SS(u,d,d.__r3f.attach):d.isObject3D&&u.isObject3D&&(u.add(d),p=!0),p||(x=u.__r3f)==null||x.objects.push(d),d.__r3f||qd(d,{}),d.__r3f.parent=u,TM(d),Zd(d)}}function r(u,d,p){let m=!1;if(d){var x,v;if((x=d.__r3f)!=null&&x.attach)SS(u,d,d.__r3f.attach);else if(d.isObject3D&&u.isObject3D){d.parent=u,d.dispatchEvent({type:"added"}),u.dispatchEvent({type:"childadded",child:d});const _=u.children.filter(S=>S!==d),g=_.indexOf(p);u.children=[..._.slice(0,g),d,..._.slice(g)],m=!0}m||(v=u.__r3f)==null||v.objects.push(d),d.__r3f||qd(d,{}),d.__r3f.parent=u,TM(d),Zd(d)}}function s(u,d,p=!1){u&&[...u].forEach(m=>o(d,m,p))}function o(u,d,p){if(d){var m,x,v;if(d.__r3f&&(d.__r3f.parent=null),(m=u.__r3f)!=null&&m.objects&&(u.__r3f.objects=u.__r3f.objects.filter(A=>A!==d)),(x=d.__r3f)!=null&&x.attach)t3(u,d,d.__r3f.attach);else if(d.isObject3D&&u.isObject3D){var _;u.remove(d),(_=d.__r3f)!=null&&_.root&&t7($x(d),d)}const S=(v=d.__r3f)==null?void 0:v.primitive,b=!S&&(p===void 0?d.dispose!==null:p);if(!S){var g;s((g=d.__r3f)==null?void 0:g.objects,d,b),s(d.children,d,b)}if(delete d.__r3f,b&&d.dispose&&d.type!=="Scene"){const A=()=>{try{d.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT>"u"?AM.unstable_scheduleCallback(AM.unstable_IdlePriority,A):A()}Zd(u)}}function a(u,d,p,m){var x;const v=(x=u.__r3f)==null?void 0:x.parent;if(!v)return;const _=t(d,p,u.__r3f.root);if(u.children){for(const g of u.children)g.__r3f&&n(_,g);u.children=u.children.filter(g=>!g.__r3f)}u.__r3f.objects.forEach(g=>n(_,g)),u.__r3f.objects=[],u.__r3f.autoRemovedBeforeAppend||o(v,u),_.parent&&(_.__r3f.autoRemovedBeforeAppend=!0),n(v,_),_.raycast&&_.__r3f.eventCount&&$x(_).getState().internal.interaction.push(_),[m,m.alternate].forEach(g=>{g!==null&&(g.stateNode=_,g.ref&&(typeof g.ref=="function"?g.ref(_):g.ref.current=_))})}const l=()=>{};return{reconciler:VV({createInstance:t,removeChild:o,appendChild:n,appendInitialChild:n,insertBefore:r,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(u,d)=>{if(!d)return;const p=u.getState().scene;p.__r3f&&(p.__r3f.root=u,n(p,d))},removeChildFromContainer:(u,d)=>{d&&o(u.getState().scene,d)},insertInContainerBefore:(u,d,p)=>{if(!d||!p)return;const m=u.getState().scene;m.__r3f&&r(m,d,p)},getRootHostContext:()=>null,getChildHostContext:u=>u,finalizeInitialChildren(u){var d;return!!((d=u==null?void 0:u.__r3f)!=null?d:{}).handlers},prepareUpdate(u,d,p,m){var x;if(((x=u==null?void 0:u.__r3f)!=null?x:{}).primitive&&m.object&&m.object!==u)return[!0];{const{args:_=[],children:g,...S}=m,{args:b=[],children:A,...w}=p;if(!Array.isArray(_))throw new Error("R3F: the args prop must be an array!");if(_.some((P,B)=>P!==b[B]))return[!0];const C=bF(u,S,w,!0);return C.changes.length?[!1,C]:null}},commitUpdate(u,[d,p],m,x,v,_){d?a(u,m,v,_):bS(u,p)},commitMount(u,d,p,m){var x;const v=(x=u.__r3f)!=null?x:{};u.raycast&&v.handlers&&v.eventCount&&$x(u).getState().internal.interaction.push(u)},getPublicInstance:u=>u,prepareForCommit:()=>null,preparePortalMount:u=>qd(u.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(u){var d;const{attach:p,parent:m}=(d=u.__r3f)!=null?d:{};p&&m&&t3(m,u,p),u.isObject3D&&(u.visible=!1),Zd(u)},unhideInstance(u,d){var p;const{attach:m,parent:x}=(p=u.__r3f)!=null?p:{};m&&x&&SS(x,u,m),(u.isObject3D&&d.visible==null||d.visible)&&(u.visible=!0),Zd(u)},createTextInstance:l,hideTextInstance:l,unhideTextInstance:l,getCurrentEventPriority:()=>e?e():gf.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&In.fun(performance.now)?performance.now:In.fun(Date.now)?Date.now:()=>0,scheduleTimeout:In.fun(setTimeout)?setTimeout:void 0,cancelTimeout:In.fun(clearTimeout)?clearTimeout:void 0}),applyProps:bS}}var ZR,QR;const _S=i=>"colorSpace"in i||"outputColorSpace"in i,gF=()=>{var i;return(i=jw.ColorManagement)!=null?i:null},xF=i=>i&&i.isOrthographicCamera,JV=i=>i&&i.hasOwnProperty("current"),i0=typeof window<"u"&&((ZR=window.document)!=null&&ZR.createElement||((QR=window.navigator)==null?void 0:QR.product)==="ReactNative")?X.useLayoutEffect:X.useEffect;function vF(i){const e=X.useRef(i);return i0(()=>void(e.current=i),[i]),e}function KV({set:i}){return i0(()=>(i(new Promise(()=>null)),()=>i(!1)),[i]),null}class yF extends X.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}yF.getDerivedStateFromError=()=>({error:!0});const _F="__default",$R=new Map,qV=i=>i&&!!i.memoized&&!!i.changes;function SF(i){var e;const t=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(i)?Math.min(Math.max(i[0],t),i[1]):i}const ip=i=>{var e;return(e=i.__r3f)==null?void 0:e.root.getState()};function $x(i){let e=i.__r3f.root;for(;e.getState().previousRoot;)e=e.getState().previousRoot;return e}const In={obj:i=>i===Object(i)&&!In.arr(i)&&typeof i!="function",fun:i=>typeof i=="function",str:i=>typeof i=="string",num:i=>typeof i=="number",boo:i=>typeof i=="boolean",und:i=>i===void 0,arr:i=>Array.isArray(i),equ(i,e,{arrays:t="shallow",objects:n="reference",strict:r=!0}={}){if(typeof i!=typeof e||!!i!=!!e)return!1;if(In.str(i)||In.num(i)||In.boo(i))return i===e;const s=In.obj(i);if(s&&n==="reference")return i===e;const o=In.arr(i);if(o&&t==="reference")return i===e;if((o||s)&&i===e)return!0;let a;for(a in i)if(!(a in e))return!1;if(s&&t==="shallow"&&n==="shallow"){for(a in r?e:i)if(!In.equ(i[a],e[a],{strict:r,objects:"reference"}))return!1}else for(a in r?e:i)if(i[a]!==e[a])return!1;if(In.und(a)){if(o&&i.length===0&&e.length===0||s&&Object.keys(i).length===0&&Object.keys(e).length===0)return!0;if(i!==e)return!1}return!0}};function ZV(i){const e={nodes:{},materials:{}};return i&&i.traverse(t=>{t.name&&(e.nodes[t.name]=t),t.material&&!e.materials[t.material.name]&&(e.materials[t.material.name]=t.material)}),e}function QV(i){i.dispose&&i.type!=="Scene"&&i.dispose();for(const e in i)e.dispose==null||e.dispose(),delete i[e]}function qd(i,e){const t=i;return t.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e},i}function wM(i,e){let t=i;if(e.includes("-")){const n=e.split("-"),r=n.pop();return t=n.reduce((s,o)=>s[o],i),{target:t,key:r}}else return{target:t,key:e}}const e3=/-\d+$/;function SS(i,e,t){if(In.str(t)){if(e3.test(t)){const s=t.replace(e3,""),{target:o,key:a}=wM(i,s);Array.isArray(o[a])||(o[a]=[])}const{target:n,key:r}=wM(i,t);e.__r3f.previousAttach=n[r],n[r]=e}else e.__r3f.previousAttach=t(i,e)}function t3(i,e,t){var n,r;if(In.str(t)){const{target:s,key:o}=wM(i,t),a=e.__r3f.previousAttach;a===void 0?delete s[o]:s[o]=a}else(n=e.__r3f)==null||n.previousAttach==null||n.previousAttach(i,e);(r=e.__r3f)==null||delete r.previousAttach}function bF(i,{children:e,key:t,ref:n,...r},{children:s,key:o,ref:a,...l}={},c=!1){const u=i.__r3f,d=Object.entries(r),p=[];if(c){const x=Object.keys(l);for(let v=0;v<x.length;v++)r.hasOwnProperty(x[v])||d.unshift([x[v],_F+"remove"])}d.forEach(([x,v])=>{var _;if((_=i.__r3f)!=null&&_.primitive&&x==="object"||In.equ(v,l[x]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(x))return p.push([x,v,!0,[]]);let g=[];x.includes("-")&&(g=x.split("-")),p.push([x,v,!1,g]);for(const S in r){const b=r[S];S.startsWith(`${x}-`)&&p.push([S,b,!1,S.split("-")])}});const m={...r};return u!=null&&u.memoizedProps&&u!=null&&u.memoizedProps.args&&(m.args=u.memoizedProps.args),u!=null&&u.memoizedProps&&u!=null&&u.memoizedProps.attach&&(m.attach=u.memoizedProps.attach),{memoized:m,changes:p}}function bS(i,e){var t;const n=i.__r3f,r=n==null?void 0:n.root,s=r==null||r.getState==null?void 0:r.getState(),{memoized:o,changes:a}=qV(e)?e:bF(i,e),l=n==null?void 0:n.eventCount;i.__r3f&&(i.__r3f.memoizedProps=o);for(let p=0;p<a.length;p++){let[m,x,v,_]=a[p];if(_S(i)){const A="srgb",w="srgb-linear";m==="encoding"?(m="colorSpace",x=x===3001?A:w):m==="outputEncoding"&&(m="outputColorSpace",x=x===3001?A:w)}let g=i,S=g[m];if(_.length&&(S=_.reduce((b,A)=>b[A],i),!(S&&S.set))){const[b,...A]=_.reverse();g=A.reverse().reduce((w,C)=>w[C],i),m=b}if(x===_F+"remove")if(g.constructor){let b=$R.get(g.constructor);b||(b=new g.constructor,$R.set(g.constructor,b)),x=b[m]}else x=0;if(v&&n)x?n.handlers[m]=x:delete n.handlers[m],n.eventCount=Object.keys(n.handlers).length;else if(S&&S.set&&(S.copy||S instanceof cc)){if(Array.isArray(x))S.fromArray?S.fromArray(x):S.set(...x);else if(S.copy&&x&&x.constructor&&S.constructor===x.constructor)S.copy(x);else if(x!==void 0){var c;const b=(c=S)==null?void 0:c.isColor;!b&&S.setScalar?S.setScalar(x):S instanceof cc&&x instanceof cc?S.mask=x.mask:S.set(x),!gF()&&s&&!s.linear&&b&&S.convertSRGBToLinear()}}else{var u;if(g[m]=x,(u=g[m])!=null&&u.isTexture&&g[m].format===Ni&&g[m].type===jr&&s){const b=g[m];_S(b)&&_S(s.gl)?b.colorSpace=s.gl.outputColorSpace:b.encoding=s.gl.outputEncoding}}Zd(i)}if(n&&n.parent&&i.raycast&&l!==n.eventCount){const p=$x(i).getState().internal,m=p.interaction.indexOf(i);m>-1&&p.interaction.splice(m,1),n.eventCount&&p.interaction.push(i)}return!(a.length===1&&a[0][0]==="onUpdate")&&a.length&&(t=i.__r3f)!=null&&t.parent&&TM(i),i}function Zd(i){var e,t;const n=(e=i.__r3f)==null||(t=e.root)==null||t.getState==null?void 0:t.getState();n&&n.internal.frames===0&&n.invalidate()}function TM(i){i.onUpdate==null||i.onUpdate(i)}function $V(i,e){i.manual||(xF(i)?(i.left=e.width/-2,i.right=e.width/2,i.top=e.height/2,i.bottom=e.height/-2):i.aspect=e.width/e.height,i.updateProjectionMatrix(),i.updateMatrixWorld())}function mx(i){return(i.eventObject||i.object).uuid+"/"+i.index+i.instanceId}function e7(){var i;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return gf.DefaultEventPriority;switch((i=e.event)==null?void 0:i.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return gf.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return gf.ContinuousEventPriority;default:return gf.DefaultEventPriority}}function MF(i,e,t,n){const r=t.get(e);r&&(t.delete(e),t.size===0&&(i.delete(n),r.target.releasePointerCapture(n)))}function t7(i,e){const{internal:t}=i.getState();t.interaction=t.interaction.filter(n=>n!==e),t.initialHits=t.initialHits.filter(n=>n!==e),t.hovered.forEach((n,r)=>{(n.eventObject===e||n.object===e)&&t.hovered.delete(r)}),t.capturedMap.forEach((n,r)=>{MF(t.capturedMap,e,n,r)})}function n7(i){function e(l){const{internal:c}=i.getState(),u=l.offsetX-c.initialClick[0],d=l.offsetY-c.initialClick[1];return Math.round(Math.sqrt(u*u+d*d))}function t(l){return l.filter(c=>["Move","Over","Enter","Out","Leave"].some(u=>{var d;return(d=c.__r3f)==null?void 0:d.handlers["onPointer"+u]}))}function n(l,c){const u=i.getState(),d=new Set,p=[],m=c?c(u.internal.interaction):u.internal.interaction;for(let g=0;g<m.length;g++){const S=ip(m[g]);S&&(S.raycaster.camera=void 0)}u.previousRoot||u.events.compute==null||u.events.compute(l,u);function x(g){const S=ip(g);if(!S||!S.events.enabled||S.raycaster.camera===null)return[];if(S.raycaster.camera===void 0){var b;S.events.compute==null||S.events.compute(l,S,(b=S.previousRoot)==null?void 0:b.getState()),S.raycaster.camera===void 0&&(S.raycaster.camera=null)}return S.raycaster.camera?S.raycaster.intersectObject(g,!0):[]}let v=m.flatMap(x).sort((g,S)=>{const b=ip(g.object),A=ip(S.object);return!b||!A?g.distance-S.distance:A.events.priority-b.events.priority||g.distance-S.distance}).filter(g=>{const S=mx(g);return d.has(S)?!1:(d.add(S),!0)});u.events.filter&&(v=u.events.filter(v,u));for(const g of v){let S=g.object;for(;S;){var _;(_=S.__r3f)!=null&&_.eventCount&&p.push({...g,eventObject:S}),S=S.parent}}if("pointerId"in l&&u.internal.capturedMap.has(l.pointerId))for(let g of u.internal.capturedMap.get(l.pointerId).values())d.has(mx(g.intersection))||p.push(g.intersection);return p}function r(l,c,u,d){const p=i.getState();if(l.length){const m={stopped:!1};for(const x of l){const v=ip(x.object)||p,{raycaster:_,pointer:g,camera:S,internal:b}=v,A=new H(g.x,g.y,0).unproject(S),w=E=>{var L,N;return(L=(N=b.capturedMap.get(E))==null?void 0:N.has(x.eventObject))!=null?L:!1},C=E=>{const L={intersection:x,target:c.target};b.capturedMap.has(E)?b.capturedMap.get(E).set(x.eventObject,L):b.capturedMap.set(E,new Map([[x.eventObject,L]])),c.target.setPointerCapture(E)},P=E=>{const L=b.capturedMap.get(E);L&&MF(b.capturedMap,x.eventObject,L,E)};let B={};for(let E in c){let L=c[E];typeof L!="function"&&(B[E]=L)}let R={...x,...B,pointer:g,intersections:l,stopped:m.stopped,delta:u,unprojectedPoint:A,ray:_.ray,camera:S,stopPropagation(){const E="pointerId"in c&&b.capturedMap.get(c.pointerId);if((!E||E.has(x.eventObject))&&(R.stopped=m.stopped=!0,b.hovered.size&&Array.from(b.hovered.values()).find(L=>L.eventObject===x.eventObject))){const L=l.slice(0,l.indexOf(x));s([...L,x])}},target:{hasPointerCapture:w,setPointerCapture:C,releasePointerCapture:P},currentTarget:{hasPointerCapture:w,setPointerCapture:C,releasePointerCapture:P},nativeEvent:c};if(d(R),m.stopped===!0)break}}return l}function s(l){const{internal:c}=i.getState();for(const u of c.hovered.values())if(!l.length||!l.find(d=>d.object===u.object&&d.index===u.index&&d.instanceId===u.instanceId)){const p=u.eventObject.__r3f,m=p==null?void 0:p.handlers;if(c.hovered.delete(mx(u)),p!=null&&p.eventCount){const x={...u,intersections:l};m.onPointerOut==null||m.onPointerOut(x),m.onPointerLeave==null||m.onPointerLeave(x)}}}function o(l,c){for(let u=0;u<c.length;u++){const d=c[u].__r3f;d==null||d.handlers.onPointerMissed==null||d.handlers.onPointerMissed(l)}}function a(l){switch(l){case"onPointerLeave":case"onPointerCancel":return()=>s([]);case"onLostPointerCapture":return c=>{const{internal:u}=i.getState();"pointerId"in c&&u.capturedMap.has(c.pointerId)&&requestAnimationFrame(()=>{u.capturedMap.has(c.pointerId)&&(u.capturedMap.delete(c.pointerId),s([]))})}}return function(u){const{onPointerMissed:d,internal:p}=i.getState();p.lastEvent.current=u;const m=l==="onPointerMove",x=l==="onClick"||l==="onContextMenu"||l==="onDoubleClick",_=n(u,m?t:void 0),g=x?e(u):0;l==="onPointerDown"&&(p.initialClick=[u.offsetX,u.offsetY],p.initialHits=_.map(b=>b.eventObject)),x&&!_.length&&g<=2&&(o(u,p.interaction),d&&d(u)),m&&s(_);function S(b){const A=b.eventObject,w=A.__r3f,C=w==null?void 0:w.handlers;if(w!=null&&w.eventCount)if(m){if(C.onPointerOver||C.onPointerEnter||C.onPointerOut||C.onPointerLeave){const P=mx(b),B=p.hovered.get(P);B?B.stopped&&b.stopPropagation():(p.hovered.set(P,b),C.onPointerOver==null||C.onPointerOver(b),C.onPointerEnter==null||C.onPointerEnter(b))}C.onPointerMove==null||C.onPointerMove(b)}else{const P=C[l];P?(!x||p.initialHits.includes(A))&&(o(u,p.interaction.filter(B=>!p.initialHits.includes(B))),P(b)):x&&p.initialHits.includes(A)&&o(u,p.interaction.filter(B=>!p.initialHits.includes(B)))}}r(_,u,g,S)}}return{handlePointer:a}}const AF=i=>!!(i!=null&&i.render),wF=X.createContext(null),i7=(i,e)=>{const t=OV((a,l)=>{const c=new H,u=new H,d=new H;function p(g=l().camera,S=u,b=l().size){const{width:A,height:w,top:C,left:P}=b,B=A/w;S.isVector3?d.copy(S):d.set(...S);const R=g.getWorldPosition(c).distanceTo(d);if(xF(g))return{width:A/g.zoom,height:w/g.zoom,top:C,left:P,factor:1,distance:R,aspect:B};{const E=g.fov*Math.PI/180,L=2*Math.tan(E/2)*R,N=L*(A/w);return{width:N,height:L,top:C,left:P,factor:A/N,distance:R,aspect:B}}}let m;const x=g=>a(S=>({performance:{...S.performance,current:g}})),v=new xe;return{set:a,get:l,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(g=1)=>i(l(),g),advance:(g,S)=>e(g,S,l()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new n0,pointer:v,mouse:v,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const g=l();m&&clearTimeout(m),g.performance.current!==g.performance.min&&x(g.performance.min),m=setTimeout(()=>x(l().performance.max),g.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:p},setEvents:g=>a(S=>({...S,events:{...S.events,...g}})),setSize:(g,S,b,A,w)=>{const C=l().camera,P={width:g,height:S,top:A||0,left:w||0,updateStyle:b};a(B=>({size:P,viewport:{...B.viewport,...p(C,u,P)}}))},setDpr:g=>a(S=>{const b=SF(g);return{viewport:{...S.viewport,dpr:b,initialDpr:S.viewport.initialDpr||b}}}),setFrameloop:(g="always")=>{const S=l().clock;S.stop(),S.elapsedTime=0,g!=="never"&&(S.start(),S.elapsedTime=0),a(()=>({frameloop:g}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:X.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(g,S,b)=>{const A=l().internal;return A.priority=A.priority+(S>0?1:0),A.subscribers.push({ref:g,priority:S,store:b}),A.subscribers=A.subscribers.sort((w,C)=>w.priority-C.priority),()=>{const w=l().internal;w!=null&&w.subscribers&&(w.priority=w.priority-(S>0?1:0),w.subscribers=w.subscribers.filter(C=>C.ref!==g))}}}}}),n=t.getState();let r=n.size,s=n.viewport.dpr,o=n.camera;return t.subscribe(()=>{const{camera:a,size:l,viewport:c,gl:u,set:d}=t.getState();if(l.width!==r.width||l.height!==r.height||c.dpr!==s){var p;r=l,s=c.dpr,$V(a,l),u.setPixelRatio(c.dpr);const m=(p=l.updateStyle)!=null?p:typeof HTMLCanvasElement<"u"&&u.domElement instanceof HTMLCanvasElement;u.setSize(l.width,l.height,m)}a!==o&&(o=a,d(m=>({viewport:{...m.viewport,...m.viewport.getCurrentViewport(a)}})))}),t.subscribe(a=>i(a)),t};let gx,r7=new Set,s7=new Set,o7=new Set;function MS(i,e){if(i.size)for(const{callback:t}of i.values())t(e)}function rp(i,e){switch(i){case"before":return MS(r7,e);case"after":return MS(s7,e);case"tail":return MS(o7,e)}}let AS,wS;function TS(i,e,t){let n=e.clock.getDelta();for(e.frameloop==="never"&&typeof i=="number"&&(n=i-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=i),AS=e.internal.subscribers,gx=0;gx<AS.length;gx++)wS=AS[gx],wS.ref.current(wS.store.getState(),n,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}function a7(i){let e=!1,t=!1,n,r,s;function o(c){r=requestAnimationFrame(o),e=!0,n=0,rp("before",c),t=!0;for(const d of i.values()){var u;s=d.store.getState(),s.internal.active&&(s.frameloop==="always"||s.internal.frames>0)&&!((u=s.gl.xr)!=null&&u.isPresenting)&&(n+=TS(c,s))}if(t=!1,rp("after",c),n===0)return rp("tail",c),e=!1,cancelAnimationFrame(r)}function a(c,u=1){var d;if(!c)return i.forEach(p=>a(p.store.getState(),u));(d=c.gl.xr)!=null&&d.isPresenting||!c.internal.active||c.frameloop==="never"||(u>1?c.internal.frames=Math.min(60,c.internal.frames+u):t?c.internal.frames=2:c.internal.frames=1,e||(e=!0,requestAnimationFrame(o)))}function l(c,u=!0,d,p){if(u&&rp("before",c),d)TS(c,d,p);else for(const m of i.values())TS(c,m.store.getState());u&&rp("after",c)}return{loop:o,invalidate:a,advance:l}}function TF(){const i=X.useContext(wF);if(!i)throw new Error("R3F: Hooks can only be used within the Canvas component!");return i}function Bi(i=t=>t,e){return TF()(i,e)}function od(i,e=0){const t=TF(),n=t.getState().internal.subscribe,r=vF(i);return i0(()=>n(r,e,t),[e,n,t]),null}const n3=new WeakMap;function EF(i,e){return function(t,...n){let r=n3.get(t);return r||(r=new t,n3.set(t,r)),i&&i(r),Promise.all(n.map(s=>new Promise((o,a)=>r.load(s,l=>{l.scene&&Object.assign(l,ZV(l.scene)),o(l)},e,l=>a(new Error(`Could not load ${s}: ${l==null?void 0:l.message}`))))))}}function wa(i,e,t,n){const r=Array.isArray(e)?e:[e],s=zV(EF(t,n),[i,...r],{equal:In.equ});return Array.isArray(e)?s:s[0]}wa.preload=function(i,e,t){const n=Array.isArray(e)?e:[e];return HV(EF(t),[i,...n])};wa.clear=function(i,e){const t=Array.isArray(e)?e:[e];return GV([i,...t])};const nh=new Map,{invalidate:i3,advance:r3}=a7(nh),{reconciler:Cy,applyProps:Vd}=YV(nh,e7),Xd={objects:"shallow",strict:!1},l7=(i,e)=>{const t=typeof i=="function"?i(e):i;return AF(t)?t:new U1({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...i})};function c7(i,e){const t=typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement;if(e){const{width:n,height:r,top:s,left:o,updateStyle:a=t}=e;return{width:n,height:r,top:s,left:o,updateStyle:a}}else if(typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement&&i.parentElement){const{width:n,height:r,top:s,left:o}=i.parentElement.getBoundingClientRect();return{width:n,height:r,top:s,left:o,updateStyle:t}}else if(typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas)return{width:i.width,height:i.height,top:0,left:0,updateStyle:t};return{width:0,height:0,top:0,left:0}}function u7(i){const e=nh.get(i),t=e==null?void 0:e.fiber,n=e==null?void 0:e.store;e&&console.warn("R3F.createRoot should only be called once!");const r=typeof reportError=="function"?reportError:console.error,s=n||i7(i3,r3),o=t||Cy.createContainer(s,gf.ConcurrentRoot,null,!1,null,"",r,null);e||nh.set(i,{fiber:o,store:s});let a,l=!1,c;return{configure(u={}){let{gl:d,size:p,scene:m,events:x,onCreated:v,shadows:_=!1,linear:g=!1,flat:S=!1,legacy:b=!1,orthographic:A=!1,frameloop:w="always",dpr:C=[1,2],performance:P,raycaster:B,camera:R,onPointerMissed:E}=u,L=s.getState(),N=L.gl;L.gl||L.set({gl:N=l7(d,i)});let k=L.raycaster;k||L.set({raycaster:k=new eF});const{params:Y,...z}=B||{};if(In.equ(z,k,Xd)||Vd(k,{...z}),In.equ(Y,k.params,Xd)||Vd(k,{params:{...k.params,...Y}}),!L.camera||L.camera===c&&!In.equ(c,R,Xd)){c=R;const O=R instanceof Km,ee=O?R:A?new or(0,0,0,0,.1,1e3):new wn(75,0,.1,1e3);O||(ee.position.z=5,R&&(Vd(ee,R),("aspect"in R||"left"in R||"right"in R||"bottom"in R||"top"in R)&&(ee.manual=!0,ee.updateProjectionMatrix())),!L.camera&&!(R!=null&&R.rotation)&&ee.lookAt(0,0,0)),L.set({camera:ee}),k.camera=ee}if(!L.scene){let O;m!=null&&m.isScene?O=m:(O=new Ec,m&&Vd(O,m)),L.set({scene:qd(O)})}if(!L.xr){var W;const O=(ge,Se)=>{const Ye=s.getState();Ye.frameloop!=="never"&&r3(ge,!0,Ye,Se)},ee=()=>{const ge=s.getState();ge.gl.xr.enabled=ge.gl.xr.isPresenting,ge.gl.xr.setAnimationLoop(ge.gl.xr.isPresenting?O:null),ge.gl.xr.isPresenting||i3(ge)},le={connect(){const ge=s.getState().gl;ge.xr.addEventListener("sessionstart",ee),ge.xr.addEventListener("sessionend",ee)},disconnect(){const ge=s.getState().gl;ge.xr.removeEventListener("sessionstart",ee),ge.xr.removeEventListener("sessionend",ee)}};typeof((W=N.xr)==null?void 0:W.addEventListener)=="function"&&le.connect(),L.set({xr:le})}if(N.shadowMap){const O=N.shadowMap.enabled,ee=N.shadowMap.type;if(N.shadowMap.enabled=!!_,In.boo(_))N.shadowMap.type=Wp;else if(In.str(_)){var V;const le={basic:BB,percentage:Rf,soft:Wp,variance:xu};N.shadowMap.type=(V=le[_])!=null?V:Wp}else In.obj(_)&&Object.assign(N.shadowMap,_);(O!==N.shadowMap.enabled||ee!==N.shadowMap.type)&&(N.shadowMap.needsUpdate=!0)}const G=gF();G&&("enabled"in G?G.enabled=!b:"legacyMode"in G&&(G.legacyMode=b)),l||Vd(N,{outputEncoding:g?3e3:3001,toneMapping:S?zs:Vm}),L.legacy!==b&&L.set(()=>({legacy:b})),L.linear!==g&&L.set(()=>({linear:g})),L.flat!==S&&L.set(()=>({flat:S})),d&&!In.fun(d)&&!AF(d)&&!In.equ(d,N,Xd)&&Vd(N,d),x&&!L.events.handlers&&L.set({events:x(s)});const Z=c7(i,p);return In.equ(Z,L.size,Xd)||L.setSize(Z.width,Z.height,Z.updateStyle,Z.top,Z.left),C&&L.viewport.dpr!==SF(C)&&L.setDpr(C),L.frameloop!==w&&L.setFrameloop(w),L.onPointerMissed||L.set({onPointerMissed:E}),P&&!In.equ(P,L.performance,Xd)&&L.set(O=>({performance:{...O.performance,...P}})),a=v,l=!0,this},render(u){return l||this.configure(),Cy.updateContainer(y.jsx(d7,{store:s,children:u,onCreated:a,rootElement:i}),o,null,()=>{}),s},unmount(){CF(i)}}}function d7({store:i,children:e,onCreated:t,rootElement:n}){return i0(()=>{const r=i.getState();r.set(s=>({internal:{...s.internal,active:!0}})),t&&t(r),i.getState().events.connected||r.events.connect==null||r.events.connect(n)},[]),y.jsx(wF.Provider,{value:i,children:e})}function CF(i,e){const t=nh.get(i),n=t==null?void 0:t.fiber;if(n){const r=t==null?void 0:t.store.getState();r&&(r.internal.active=!1),Cy.updateContainer(null,n,null,()=>{r&&setTimeout(()=>{try{var s,o,a,l;r.events.disconnect==null||r.events.disconnect(),(s=r.gl)==null||(o=s.renderLists)==null||o.dispose==null||o.dispose(),(a=r.gl)==null||a.forceContextLoss==null||a.forceContextLoss(),(l=r.gl)!=null&&l.xr&&r.xr.disconnect(),QV(r),nh.delete(i)}catch{}},500)})}}Cy.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:X.version});const ES={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 f7(i){const{handlePointer:e}=n7(i);return{priority:1,enabled:!0,compute(t,n,r){n.pointer.set(t.offsetX/n.size.width*2-1,-(t.offsetY/n.size.height)*2+1),n.raycaster.setFromCamera(n.pointer,n.camera)},connected:void 0,handlers:Object.keys(ES).reduce((t,n)=>({...t,[n]:e(n)}),{}),update:()=>{var t;const{events:n,internal:r}=i.getState();(t=r.lastEvent)!=null&&t.current&&n.handlers&&n.handlers.onPointerMove(r.lastEvent.current)},connect:t=>{var n;const{set:r,events:s}=i.getState();s.disconnect==null||s.disconnect(),r(o=>({events:{...o.events,connected:t}})),Object.entries((n=s.handlers)!=null?n:[]).forEach(([o,a])=>{const[l,c]=ES[o];t.addEventListener(l,a,{passive:c})})},disconnect:()=>{const{set:t,events:n}=i.getState();if(n.connected){var r;Object.entries((r=n.handlers)!=null?r:[]).forEach(([s,o])=>{if(n&&n.connected instanceof HTMLElement){const[a]=ES[s];n.connected.removeEventListener(a,o)}}),t(s=>({events:{...s.events,connected:void 0}}))}}}}function s3(i,e){let t;return(...n)=>{window.clearTimeout(t),t=window.setTimeout(()=>i(...n),e)}}function h7({debounce:i,scroll:e,polyfill:t,offsetSize:n}={debounce:0,scroll:!1,offsetSize:!1}){const r=t||(typeof window>"u"?class{}:window.ResizeObserver);if(!r)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[s,o]=X.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),a=X.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:s,orientationHandler:null}),l=i?typeof i=="number"?i:i.scroll:null,c=i?typeof i=="number"?i:i.resize:null,u=X.useRef(!1);X.useEffect(()=>(u.current=!0,()=>void(u.current=!1)));const[d,p,m]=X.useMemo(()=>{const g=()=>{if(!a.current.element)return;const{left:S,top:b,width:A,height:w,bottom:C,right:P,x:B,y:R}=a.current.element.getBoundingClientRect(),E={left:S,top:b,width:A,height:w,bottom:C,right:P,x:B,y:R};a.current.element instanceof HTMLElement&&n&&(E.height=a.current.element.offsetHeight,E.width=a.current.element.offsetWidth),Object.freeze(E),u.current&&!x7(a.current.lastBounds,E)&&o(a.current.lastBounds=E)};return[g,c?s3(g,c):g,l?s3(g,l):g]},[o,n,l,c]);function x(){a.current.scrollContainers&&(a.current.scrollContainers.forEach(g=>g.removeEventListener("scroll",m,!0)),a.current.scrollContainers=null),a.current.resizeObserver&&(a.current.resizeObserver.disconnect(),a.current.resizeObserver=null),a.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",a.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",a.current.orientationHandler))}function v(){a.current.element&&(a.current.resizeObserver=new r(m),a.current.resizeObserver.observe(a.current.element),e&&a.current.scrollContainers&&a.current.scrollContainers.forEach(g=>g.addEventListener("scroll",m,{capture:!0,passive:!0})),a.current.orientationHandler=()=>{m()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",a.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",a.current.orientationHandler))}const _=g=>{!g||g===a.current.element||(x(),a.current.element=g,a.current.scrollContainers=RF(g),v())};return m7(m,!!e),p7(p),X.useEffect(()=>{x(),v()},[e,m,p]),X.useEffect(()=>x,[]),[_,s,d]}function p7(i){X.useEffect(()=>{const e=i;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[i])}function m7(i,e){X.useEffect(()=>{if(e){const t=i;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",t,!0)}},[i,e])}function RF(i){const e=[];if(!i||i===document.body)return e;const{overflow:t,overflowX:n,overflowY:r}=window.getComputedStyle(i);return[t,n,r].some(s=>s==="auto"||s==="scroll")&&e.push(i),[...e,...RF(i.parentElement)]}const g7=["x","y","top","bottom","left","right","width","height"],x7=(i,e)=>g7.every(t=>i[t]===e[t]);var v7=Object.defineProperty,y7=Object.defineProperties,_7=Object.getOwnPropertyDescriptors,o3=Object.getOwnPropertySymbols,S7=Object.prototype.hasOwnProperty,b7=Object.prototype.propertyIsEnumerable,a3=(i,e,t)=>e in i?v7(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,l3=(i,e)=>{for(var t in e||(e={}))S7.call(e,t)&&a3(i,t,e[t]);if(o3)for(var t of o3(e))b7.call(e,t)&&a3(i,t,e[t]);return i},M7=(i,e)=>y7(i,_7(e)),c3,u3;typeof window<"u"&&((c3=window.document)!=null&&c3.createElement||((u3=window.navigator)==null?void 0:u3.product)==="ReactNative")?X.useLayoutEffect:X.useEffect;function PF(i,e,t){if(!i)return;if(t(i)===!0)return i;let n=i.child;for(;n;){const r=PF(n,e,t);if(r)return r;n=n.sibling}}function IF(i){try{return Object.defineProperties(i,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return i}}const d3=console.error;console.error=function(){const i=[...arguments].join("");if(i!=null&&i.startsWith("Warning:")&&i.includes("useContext")){console.error=d3;return}return d3.apply(this,arguments)};const Ww=IF(X.createContext(null));class LF extends X.Component{render(){return X.createElement(Ww.Provider,{value:this._reactInternals},this.props.children)}}function A7(){const i=X.useContext(Ww);if(i===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const e=X.useId();return X.useMemo(()=>{for(const n of[i,i==null?void 0:i.alternate]){if(!n)continue;const r=PF(n,!1,s=>{let o=s.memoizedState;for(;o;){if(o.memoizedState===e)return!0;o=o.next}});if(r)return r}},[i,e])}function w7(){const i=A7(),[e]=X.useState(()=>new Map);e.clear();let t=i;for(;t;){if(t.type&&typeof t.type=="object"){const r=t.type._context===void 0&&t.type.Provider===t.type?t.type:t.type._context;r&&r!==Ww&&!e.has(r)&&e.set(r,X.useContext(IF(r)))}t=t.return}return e}function T7(){const i=w7();return X.useMemo(()=>Array.from(i.keys()).reduce((e,t)=>n=>X.createElement(e,null,X.createElement(t.Provider,M7(l3({},n),{value:i.get(t)}))),e=>X.createElement(LF,l3({},e))),[i])}const E7=X.forwardRef(function({children:e,fallback:t,resize:n,style:r,gl:s,events:o=f7,eventSource:a,eventPrefix:l,shadows:c,linear:u,flat:d,legacy:p,orthographic:m,frameloop:x,dpr:v,performance:_,raycaster:g,camera:S,scene:b,onPointerMissed:A,onCreated:w,...C},P){X.useMemo(()=>XV(FV),[]);const B=T7(),[R,E]=h7({scroll:!0,debounce:{scroll:50,resize:0},...n}),L=X.useRef(null),N=X.useRef(null);X.useImperativeHandle(P,()=>L.current);const k=vF(A),[Y,z]=X.useState(!1),[W,V]=X.useState(!1);if(Y)throw Y;if(W)throw W;const G=X.useRef(null);i0(()=>{const O=L.current;E.width>0&&E.height>0&&O&&(G.current||(G.current=u7(O)),G.current.configure({gl:s,events:o,shadows:c,linear:u,flat:d,legacy:p,orthographic:m,frameloop:x,dpr:v,performance:_,raycaster:g,camera:S,scene:b,size:E,onPointerMissed:(...ee)=>k.current==null?void 0:k.current(...ee),onCreated:ee=>{ee.events.connect==null||ee.events.connect(a?JV(a)?a.current:a:N.current),l&&ee.setEvents({compute:(le,ge)=>{const Se=le[l+"X"],Ye=le[l+"Y"];ge.pointer.set(Se/ge.size.width*2-1,-(Ye/ge.size.height)*2+1),ge.raycaster.setFromCamera(ge.pointer,ge.camera)}}),w==null||w(ee)}}),G.current.render(y.jsx(B,{children:y.jsx(yF,{set:V,children:y.jsx(X.Suspense,{fallback:y.jsx(KV,{set:z}),children:e??null})})})))}),X.useEffect(()=>{const O=L.current;if(O)return()=>CF(O)},[]);const Z=a?"none":"auto";return y.jsx("div",{ref:N,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:Z,...r},...C,children:y.jsx("div",{ref:R,style:{width:"100%",height:"100%"},children:y.jsx("canvas",{ref:L,style:{display:"block"},children:t})})})}),Nm=X.forwardRef(function(e,t){return y.jsx(LF,{children:y.jsx(E7,{...e,ref:t})})});/*! 4126 * @gsap/react 2.1.2 4127 * https://gsap.com 4128 * 4129 * Copyright 2008-2025, GreenSock. All rights reserved. 4130 * Subject to the terms at https://gsap.com/standard-license or for 4131 * Club GSAP members, the agreement issued with that membership. 4132 * @author: Jack Doyle, [email protected] 4133*/let f3=typeof document<"u"?X.useLayoutEffect:X.useEffect,h3=i=>i&&!Array.isArray(i)&&typeof i=="object",xx=[],C7={},BF=YA;const Vw=(i,e=xx)=>{let t=C7;
4133h3(i)?(t=i,i=null,e="dependencies"in t?t.dependencies:xx):h3(e)&&(t=e,e="dependencies"in t?t.dependencies:xx),i&&typeof i!="function"&&console.warn("First parameter must be a function or config object");const{scope:n,revertOnUpdate:r}=t,s=X.useRef(!1),o=X.useRef(BF.context(()=>{},n)),a=X.useRef(c=>o.current.add(null,c)),l=e&&e.length&&!r;return l&&f3(()=>(s.current=!0,()=>o.current.revert()),xx),f3(()=>{if(i&&o.current.add(i,n),!l||!s.current)return()=>o.current.revert()},e),{context:o.current,contextSafe:a.current}};Vw.register=i=>{BF=i};Vw.headless=!0;function R7(){const i=document.createElement("canvas");i.width=64,i.height=64;const e=i.getContext("2d"),t=e.createRadialGradient(32,32,0,32,32,32);return t.addColorStop(0,"rgba(255, 255, 255, 1)"),t.addColorStop(.08,"rgba(255, 255, 255, 0.9)"),t.addColorStop(.15,"rgba(255, 255, 255, 0.5)"),t.addColorStop(.3,"rgba(255, 255, 255, 0.12)"),t.addColorStop(.5,"rgba(255, 255, 255, 0.02)"),t.addColorStop(1,"rgba(255, 255, 255, 0)"),e.fillStyle=t,e.fillRect(0,0,64,64),new bD(i)}function ih(){return ih=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(i[n]=t[n])}return i},ih.apply(null,arguments)}const r0=new H,Xw=new H,P7=new H,p3=new xe;function I7(i,e,t){const n=r0.setFromMatrixPosition(i.matrixWorld);n.project(e);const r=t.width/2,s=t.height/2;return[n.x*r+r,-(n.y*s)+s]}function L7(i,e){const t=r0.setFromMatrixPosition(i.matrixWorld),n=Xw.setFromMatrixPosition(e.matrixWorld),r=t.sub(n),s=e.getWorldDirection(P7);return r.angleTo(s)>Math.PI/2}function B7(i,e,t,n){const r=r0.setFromMatrixPosition(i.matrixWorld),s=r.clone();s.project(e),p3.set(s.x,s.y),t.setFromCamera(p3,e);const o=t.intersectObjects(n,!0);if(o.length){const a=o[0].distance;return r.distanceTo(t.ray.origin)<a}return!0}function D7(i,e){if(e instanceof or)return e.zoom;if(e instanceof wn){const t=r0.setFromMatrixPosition(i.matrixWorld),n=Xw.setFromMatrixPosition(e.matrixWorld),r=e.fov*Math.PI/180,s=t.distanceTo(n);return 1/(2*Math.tan(r/2)*s)}else return 1}function F7(i,e,t){if(e instanceof wn||e instanceof or){const n=r0.setFromMatrixPosition(i.matrixWorld),r=Xw.setFromMatrixPosition(e.matrixWorld),s=n.distanceTo(r),o=(t[1]-t[0])/(e.far-e.near),a=t[1]-o*e.far;return Math.round(o*s+a)}}const EM=i=>Math.abs(i)<1e-10?0:i;function DF(i,e,t=""){let n="matrix3d(";for(let r=0;r!==16;r++)n+=EM(e[r]*i.elements[r])+(r!==15?",":")");return t+n}const N7=(i=>e=>DF(e,i))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),k7=(i=>(e,t)=>DF(e,i(t),"translate(-50%,-50%)"))(i=>[1/i,1/i,1/i,1,-1/i,-1/i,-1/i,-1,1/i,1/i,1/i,1,1,1,1,1]);function O7(i){return i&&typeof i=="object"&&"current"in i}const U7=X.forwardRef(({children:i,eps:e=.001,style:t,className:n,prepend:r,center:s,fullscreen:o,portal:a,distanceFactor:l,sprite:c=!1,transform:u=!1,occlude:d,onOcclude:p,castShadow:m,receiveShadow:x,material:v,geometry:_,zIndexRange:g=[16777271,0],calculatePosition:S=I7,as:b="div",wrapperClass:A,pointerEvents:w="auto",...C},P)=>{const{gl:B,camera:R,scene:E,size:L,raycaster:N,events:k,viewport:Y}=Bi(),[z]=X.useState(()=>document.createElement(b)),W=X.useRef(),V=X.useRef(null),G=X.useRef(0),Z=X.useRef([0,0]),O=X.useRef(null),ee=X.useRef(null),le=(a==null?void 0:a.current)||k.connected||B.domElement.parentNode,ge=X.useRef(null),Se=X.useRef(!1),Ye=X.useMemo(()=>d&&d!=="blending"||Array.isArray(d)&&d.length&&O7(d[0]),[d]);X.useLayoutEffect(()=>{const Te=B.domElement;d&&d==="blending"?(Te.style.zIndex=`${Math.floor(g[0]/2)}`,Te.style.position="absolute",Te.style.pointerEvents="none"):(Te.style.zIndex=null,Te.style.position=null,Te.style.pointerEvents=null)},[d]),X.useLayoutEffect(()=>{if(V.current){const Te=W.current=iL(z);if(E.updateMatrixWorld(),u)z.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{const De=S(V.current,R,L);z.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${De[0]}px,${De[1]}px,0);transform-origin:0 0;`}return le&&(r?le.prepend(z):le.appendChild(z)),()=>{le&&le.removeChild(z),Te.unmount()}}},[le,u]),X.useLayoutEffect(()=>{A&&(z.className=A)},[A]);const K=X.useMemo(()=>u?{position:"absolute",top:0,left:0,width:L.width,height:L.height,transformStyle:"preserve-3d",pointerEvents:"none"}
vendor: 5,492 bytes, lines 4133-4170
4133:{position:"absolute",transform:s?"translate3d(-50%,-50%,0)":"none",...o&&{top:-L.height/2,left:-L.width/2,width:L.width,height:L.height},...t},[t,s,o,L,u]),q=X.useMemo(()=>({position:"absolute",pointerEvents:w}),[w]);X.useLayoutEffect(()=>{if(Se.current=!1,u){var Te;(Te=W.current)==null||Te.render(X.createElement("div",{ref:O,style:K},X.createElement("div",{ref:ee,style:q},X.createElement("div",{ref:P,className:n,style:t,children:i}))))}else{var De;(De=W.current)==null||De.render(X.createElement("div",{ref:P,style:K,className:n,children:i}))}});const re=X.useRef(!0);od(Te=>{if(V.current){R.updateMatrixWorld(),V.current.updateWorldMatrix(!0,!1);const De=u?Z.current:S(V.current,R,L);if(u||Math.abs(G.current-R.zoom)>e||Math.abs(Z.current[0]-De[0])>e||Math.abs(Z.current[1]-De[1])>e){const tt=L7(V.current,R);let Pe=!1;Ye&&(Array.isArray(d)?Pe=d.map($=>$.current):d!=="blending"&&(Pe=[E]));const me=re.current;if(Pe){const $=B7(V.current,R,N,Pe);re.current=$&&!tt}else re.current=!tt;me!==re.current&&(p?p(!re.current):z.style.display=re.current?"block":"none");const Ee=Math.floor(g[0]/2),be=d?Ye?[g[0],Ee]:[Ee-1,0]:g;if(z.style.zIndex=`${F7(V.current,R,be)}`,u){const[$,J]=[L.width/2,L.height/2],Ue=R.projectionMatrix.elements[5]*J,{isOrthographicCamera:Ne,top:ke,left:Ae,bottom:U,right:F}=R,ne=N7(R.matrixWorldInverse),se=Ne?`scale(${Ue})translate(${EM(-(F+Ae)/2)}px,${EM((ke+U)/2)}px)`:`translateZ(${Ue}px)`;let he=V.current.matrixWorld;c&&(he=R.matrixWorldInverse.clone().transpose().copyPosition(he).scale(V.current.scale),he.elements[3]=he.elements[7]=he.elements[11]=0,he.elements[15]=1),z.style.width=L.width+"px",z.style.height=L.height+"px",z.style.perspective=Ne?"":`${Ue}px`,O.current&&ee.current&&(O.current.style.transform=`${se}${ne}translate(${$}px,${J}px)`,ee.current.style.transform=k7(he,1/((l||10)/400)))}else{const $=l===void 0?1:D7(V.current,R)*l;z.style.transform=`translate3d(${De[0]}px,${De[1]}px,0) scale(${$})`}Z.current=De,G.current=R.zoom}}if(!Ye&&ge.current&&!Se.current)if(u){if(O.current){const De=O.current.children[0];if(De!=null&&De.clientWidth&&De!=null&&De.clientHeight){const{isOrthographicCamera:tt}=R;if(tt||_)C.scale&&(Array.isArray(C.scale)?C.scale instanceof H?ge.current.scale.copy(C.scale.clone().divideScalar(1)):ge.current.scale.set(1/C.scale[0],1/C.scale[1],1/C.scale[2]):ge.current.scale.setScalar(1/C.scale));else{const Pe=(l||10)/400,me=De.clientWidth*Pe,Ee=De.clientHeight*Pe;ge.current.scale.set(me,Ee,1)}Se.current=!0}}}else{const De=z.children[0];if(De!=null&&De.clientWidth&&De!=null&&De.clientHeight){const tt=1/Y.factor,Pe=De.clientWidth*tt,me=De.clientHeight*tt;ge.current.scale.set(Pe,me,1),Se.current=!0}ge.current.lookAt(Te.camera.position)}});const Ce=X.useMemo(()=>({vertexShader:u?void 0:` 4134 /* 4135 This shader is from the THREE's SpriteMaterial. 4136 We need to turn the backing plane into a Sprite 4137 (make it always face the camera) if "transfrom" 4138 is false. 4139 */ 4140 #include <common> 4141 4142 void main() { 4143 vec2 center = vec2(0., 1.); 4144 float rotation = 0.0; 4145 4146 // This is somewhat arbitrary, but it seems to work well 4147 // Need to figure out how to derive this dynamically if it even matters 4148 float size = 0.03; 4149 4150 vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); 4151 vec2 scale; 4152 scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); 4153 scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); 4154 4155 bool isPerspective = isPerspectiveMatrix( projectionMatrix ); 4156 if ( isPerspective ) scale *= - mvPosition.z; 4157 4158 vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale * size; 4159 vec2 rotatedPosition; 4160 rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; 4161 rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; 4162 mvPosition.xy += rotatedPosition; 4163 4164 gl_Position = projectionMatrix * mvPosition; 4165 } 4166 `,fragmentShader:` 4167 void main() { 4168 gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); 4169 } 4170 `}),[u]);return X.createElement("group",ih({},C,{ref:V}),d&&!Ye&&X.createElement("mesh",{castShadow:m,receiveShadow:x,ref:ge},_||X.createElement("planeGeometry",null),v||X.createElement("shaderMaterial",{side:Di,vertexShader:Ce.vertexShader,fragmentShader:Ce.fragmentShader})))}),Yw=parseInt(jm.replace(/\D+/g,"")),FF=Yw>=125?"uv1":"uv2";function m3(i,e){if(e===uw)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),i;if(e===Ju||e===Jm){let t=i.getIndex();if(t===null){const o=[],a=i.getAttribute("position");if(a!==void 0){for(let l=0;l<a.count;l++)o.push(l);i.setIndex(o),t=i.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),i}const n=t.count-2,r=[];if(t)if(e===Ju)for(let o=1;o<=n;o++)r.push(t.getX(0)),r.push(t.getX(o)),r.push(t.getX(o+1));else for(let o=0;o<n;o++)o%2===0?(r.push(t.getX(o)),r.push(t.getX(o+1)),r.push(t.getX(o+2))):(r.push(t.getX(o+2)),r.push(t.getX(o+1)),r.push(t.getX(o)));r.length/3!==n&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");
4170const s=i.clone();return s.setIndex(r),s.clearGroups(),s}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),i}var z7=Object.defineProperty,H7=(i,e,t)=>e in i?z7(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,G7=(i,e,t)=>(H7(i,e+"",t),t);class j7{constructor(){G7(this,"_listeners")}addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const n=this._listeners;return n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;const r=this._listeners[e];if(r!==void 0){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const n=this._listeners[e.type];if(n!==void 0){e.target=this;const r=n.slice(0);for(let s=0,o=r.length;s<o;s++)r[s].call(this,e);e.target=null}}}var W7=Object.defineProperty,V7=(i,e,t)=>e in i?W7(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Ct=(i,e,t)=>(V7(i,typeof e!="symbol"?e+"":e,t),t);const vx=new Tc,g3=new Oo,X7=Math.cos(70*(Math.PI/180)),x3=(i,e)=>(i%e+e)%e;let Y7=class extends j7{constructor(e,t){super(),Ct(this,"object"),Ct(this,"domElement"),Ct(this,"enabled",!0),Ct(this,"target",new H),Ct(this,"minDistance",0),Ct(this,"maxDistance",1/0),Ct(this,"minZoom",0),Ct(this,"maxZoom",1/0),Ct(this,"minPolarAngle",0),Ct(this,"maxPolarAngle",Math.PI),Ct(this,"minAzimuthAngle",-1/0),Ct(this,"maxAzimuthAngle",1/0),Ct(this,"enableDamping",!1),Ct(this,"dampingFactor",.05),Ct(this,"enableZoom",!0),Ct(this,"zoomSpeed",1),Ct(this,"enableRotate",!0),Ct(this,"rotateSpeed",1),Ct(this,"enablePan",!0),Ct(this,"panSpeed",1),Ct(this,"screenSpacePanning",!0),Ct(this,"keyPanSpeed",7),Ct(this,"zoomToCursor",!1),Ct(this,"autoRotate",!1),Ct(this,"autoRotateSpeed",2),Ct(this,"reverseOrbit",!1),Ct(this,"reverseHorizontalOrbit",!1),Ct(this,"reverseVerticalOrbit",!1),Ct(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),Ct(this,"mouseButtons",{LEFT:Cs.ROTATE,MIDDLE:Cs.DOLLY,RIGHT:Cs.PAN}),Ct(this,"touches",{ONE:Rs.ROTATE,TWO:Rs.DOLLY_PAN}),Ct(this,"target0"),Ct(this,"position0"),Ct(this,"zoom0"),Ct(this,"_domElementKeyEvents",null),Ct(this,"getPolarAngle"),Ct(this,"getAzimuthalAngle"),Ct(this,"setPolarAngle"),Ct(this,"setAzimuthalAngle"),Ct(this,"getDistance"),Ct(this,"getZoomScale"),Ct(this,"listenToKeyEvents"),Ct(this,"stopListenToKeyEvents"),Ct(this,"saveState"),Ct(this,"reset"),Ct(this,"update"),Ct(this,"connect"),Ct(this,"dispose"),Ct(this,"dollyIn"),Ct(this,"dollyOut"),Ct(this,"getScale"),Ct(this,"setScale"),this.object=e,this.domElement=t,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>u.phi,this.getAzimuthalAngle=()=>u.theta,this.setPolarAngle=ie=>{let fe=x3(ie,2*Math.PI),He=u.phi;He<0&&(He+=2*Math.PI),fe<0&&(fe+=2*Math.PI);let Q=Math.abs(fe-He);2*Math.PI-Q<Q&&(fe<He?fe+=2*Math.PI:He+=2*Math.PI),d.phi=fe-He,n.update()},this.setAzimuthalAngle=ie=>{let fe=x3(ie,2*Math.PI),He=u.theta;He<0&&(He+=2*Math.PI),fe<0&&(fe+=2*Math.PI);let Q=Math.abs(fe-He);2*Math.PI-Q<Q&&(fe<He?fe+=2*Math.PI:He+=2*Math.PI),d.theta=fe-He,n.update()},this.getDistance=()=>n.object.position.distanceTo(n.target),this.listenToKeyEvents=ie=>{ie.addEventListener("keydown",de),this._domElementKeyEvents=ie},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",de),this._domElementKeyEvents=null},this.saveState=()=>{n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=()=>{n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(r),n.update(),l=a.NONE},this.update=(()=>{const ie=new H,fe=new H(0,1,0),He=new si().setFromUnitVectors(e.up,fe),Q=He.clone().invert(),je=new H,Re=new si,Ge=2*Math.PI;return function(){const Me=n.object.position;He.setFromUnitVectors(e.up,fe),Q.copy(He).invert(),ie.copy(Me).sub(n.target),ie.applyQuaternion(He),u.setFromVector3(ie),n.autoRotate&&l===a.NONE&&Y(N()),n.enableDamping?(u.theta+=d.theta*n.dampingFactor,u.phi+=d.phi*n.dampingFactor):(u.theta+=d.theta,u.phi+=d.phi);let Oe=n.minAzimuthAngle,lt=n.maxAzimuthAngle;isFinite(Oe)&&isFinite(lt)&&(Oe<-Math.PI?Oe+=Ge:Oe>Math.PI&&(Oe-=Ge),lt<-Math.PI?lt+=Ge:lt>Math.PI&&(lt-=Ge),Oe<=lt?u.theta=Math.max(Oe,Math.min(lt,u.theta)):u.theta=u.theta>(Oe+lt)/2?Math.max(Oe,u.theta):Math.min(lt,u.theta)),u.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,u.phi)),u.makeSafe(),n.enableDamping===!0?n.target.addScaledVector(m,n.dampingFactor):n.target.add(m),n.zoomToCursor&&R||n.object.isOrthographicCamera?u.radius=ge(u.radiu
4170s):u.radius=ge(u.radius*p),ie.setFromSpherical(u),ie.applyQuaternion(Q),Me.copy(n.target).add(ie),n.object.matrixAutoUpdate||n.object.updateMatrix(),n.object.lookAt(n.target),n.enableDamping===!0?(d.theta*=1-n.dampingFactor,d.phi*=1-n.dampingFactor,m.multiplyScalar(1-n.dampingFactor)):(d.set(0,0,0),m.set(0,0,0));let Pt=!1;if(n.zoomToCursor&&R){let Qe=null;if(n.object instanceof wn&&n.object.isPerspectiveCamera){const rt=ie.length();Qe=ge(rt*p);const Mt=rt-Qe;n.object.position.addScaledVector(P,Mt),n.object.updateMatrixWorld()}else if(n.object.isOrthographicCamera){const rt=new H(B.x,B.y,0);rt.unproject(n.object),n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/p)),n.object.updateProjectionMatrix(),Pt=!0;const Mt=new H(B.x,B.y,0);Mt.unproject(n.object),n.object.position.sub(Mt).add(rt),n.object.updateMatrixWorld(),Qe=ie.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),n.zoomToCursor=!1;Qe!==null&&(n.screenSpacePanning?n.target.set(0,0,-1).transformDirection(n.object.matrix).multiplyScalar(Qe).add(n.object.position):(vx.origin.copy(n.object.position),vx.direction.set(0,0,-1).transformDirection(n.object.matrix),Math.abs(n.object.up.dot(vx.direction))<X7?e.lookAt(n.target):(g3.setFromNormalAndCoplanarPoint(n.object.up,n.target),vx.intersectPlane(g3,n.target))))}else n.object instanceof or&&n.object.isOrthographicCamera&&(Pt=p!==1,Pt&&(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/p)),n.object.updateProjectionMatrix()));return p=1,R=!1,Pt||je.distanceToSquared(n.object.position)>c||8*(1-Re.dot(n.object.quaternion))>c?(n.dispatchEvent(r),je.copy(n.object.position),Re.copy(n.object.quaternion),Pt=!1,!0):!1}})(),this.connect=ie=>{n.domElement=ie,n.domElement.style.touchAction="none",n.domElement.addEventListener("contextmenu",Ke),n.domElement.addEventListener("pointerdown",Ae),n.domElement.addEventListener("pointercancel",F),n.domElement.addEventListener("wheel",he)},this.dispose=()=>{var ie,fe,He,Q,je,Re;n.domElement&&(n.domElement.style.touchAction="auto"),(ie=n.domElement)==null||ie.removeEventListener("contextmenu",Ke),(fe=n.domElement)==null||fe.removeEventListener("pointerdown",Ae),(He=n.domElement)==null||He.removeEventListener("pointercancel",F),(Q=n.domElement)==null||Q.removeEventListener("wheel",he),(je=n.domElement)==null||je.ownerDocument.removeEventListener("pointermove",U),(Re=n.domElement)==null||Re.ownerDocument.removeEventListener("pointerup",F),n._domElementKeyEvents!==null&&n._domElementKeyEvents.removeEventListener("keydown",de)};const n=this,r={type:"change"},s={type:"start"},o={type:"end"},a={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let l=a.NONE;const c=1e-6,u=new Fm,d=new Fm;let p=1;const m=new H,x=new xe,v=new xe,_=new xe,g=new xe,S=new xe,b=new xe,A=new xe,w=new xe,C=new xe,P=new H,B=new xe;let R=!1;const E=[],L={};function N(){return 2*Math.PI/60/60*n.autoRotateSpeed}function k(){return Math.pow(.95,n.zoomSpeed)}function Y(ie){n.reverseOrbit||n.reverseHorizontalOrbit?d.theta+=ie:d.theta-=ie}function z(ie){n.reverseOrbit||n.reverseVerticalOrbit?d.phi+=ie:d.phi-=ie}const W=(()=>{const ie=new H;return function(He,Q){ie.setFromMatrixColumn(Q,0),ie.multiplyScalar(-He),m.add(ie)}})(),V=(()=>{const ie=new H;return function(He,Q){n.screenSpacePanning===!0?ie.setFromMatrixColumn(Q,1):(ie.setFromMatrixColumn(Q,0),ie.crossVectors(n.object.up,ie)),ie.multiplyScalar(He),m.add(ie)}})(),G=(()=>{const ie=new H;return function(He,Q){const je=n.domElement;if(je&&n.object instanceof wn&&n.object.isPerspectiveCamera){const Re=n.object.position;ie.copy(Re).sub(n.target);let Ge=ie.length();Ge*=Math.tan(n.object.fov/2*Math.PI/180),W(2*He*Ge/je.clientHeight,n.object.matrix),V(2*Q*Ge/je.clientHeight,n.object.matrix)}else je&&n.object instanceof or&&n.object.isOrthographicCamera?(W(He*(n.object.right-n.object.left)/n.object.zoom/je.clientWidth,n.object.matrix),V(Q*(n.object.top-n.object.bottom)/n.object.zoom/je.clientHeight,n.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),n.enablePan=!1)}})();function Z(ie){n.object instanceof wn&&n.object.isPerspectiveCamera||n.object instanceof or&&n.object.isOrthographicCamera?p=ie:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function O(ie){Z(p/ie)}function ee(ie){Z(p*ie)}function le(ie){if(!n.zoomToCursor||!n.domElement)return;R=!0;const fe=n.domElement.getBoundingClientRect(),He=ie.clientX-fe.left,Q=ie.clientY-fe.top,je=fe.width,Re=fe.height;B.x=He/je*2-1,B.y=-(Q/Re)*2+1,P.set(B.x,B.y,1).unproject(n.object).sub(n.object.position).normalize()}function ge(ie){return Math.max(n.minDistance,Math.min(n.maxDistance,ie))}function Se(ie){x.set(ie.clientX,ie.clientY)}function Ye(ie){le(ie),A.set(ie.clientX,ie.clientY)}function K(ie){g.set(ie.clientX,ie.clientY)}function q(ie){v.set(ie.clientX,ie.clientY),_.subVectors(v,x).multiplyScalar(n.rotateSpeed);const fe=n.domElement;fe&&(Y(2*Math.PI*_.x/fe.clientHeight),z(2*Math.PI*_.y/fe.clientHeight)),x.copy(v),n.update()}function re(ie){w.set(ie.clientX,ie.clientY),C.subVectors(w,A),C.y>0?O(k()):C.y<0&&ee(k()),A.copy(w),n.update()}function Ce(ie){S.set(ie.clientX,ie.clientY),b.subVectors(S,g).multiplyScalar(n.panSpeed),G(b.x,b.y),g.copy(S),n.update()}function Te(ie){le(ie),ie.deltaY<0?ee(k()):ie.deltaY>0&&O(k()),n.update()}function De(ie){let fe=!1;switch(ie.code){case n.keys.UP:G(0,n.keyPanSpeed),fe=!0;break;case n.keys.BOTTOM:G(0,-n.keyPanSpeed),fe=!0;break;case n.keys.LEFT:G(n.keyPanSpeed,0),fe=!0;break;case n.keys.RIGHT:G(-n.keyPanSpeed,0),fe=!0;break}fe&&(ie.preventDefault(),n.update())}function tt(){if(E.length==1)x.set(E[0].pageX,E[0].pageY);else{const ie=.5*(E[0].pageX+E[1].pageX),fe=.5*(E[0].pageY+E[1].pageY);x.set(ie,fe)}}function Pe(){if(E.length==1)g.set(E[0].pageX,E[0].pageY);else{const ie=.5*(E[0].pageX+E[1].pageX),fe=.5*(E[0].pageY+E[1].pageY);g.set(ie,fe)}}function me(){const ie=E[0].pageX-E[1].pageX,fe=E[0].pageY-E[1].pageY,He=Math.sqrt(ie*ie+fe*fe);A.set(0,He)}function Ee(){n.enableZoom&&me(),n.enablePan&&Pe()}function be(){n.enableZoom&&me(),n.enableRotate&&tt()}function $(ie){if(E.length==1)v.set(ie.pageX,ie.pageY);else{const He=it(ie),Q=.5*(ie.pageX+He.x),je=.5*(ie.pageY+He.y);v.set(Q,je)}_.subVectors(v,x).multiplyScalar(n.rotateSpeed);const fe=n.domElement;fe&&(Y(2*Math.PI*_.x/fe.clientHeight),z(2*Math.PI*_.y/fe.clientHeight)),x.copy(v)}function J(ie){if(E.length==1)S.set(ie.pageX,ie.pageY);else{const fe=it(ie),He=.5*(ie.pageX+fe.x),Q=.5*(ie.pageY+fe.y);S.set(He,Q)}b.subVectors(S,g).multiplyScalar(n.panSpeed),G(b.x,b.y),g.copy(S)}function Ue(ie){const fe=it(ie),He=ie.pageX-fe.x,Q=ie.pageY-fe.y,je=Math.sqrt(He*He+Q*Q);w.set(0,je),C.set(0,Math.pow(w.y/A.y,n.zoomSpeed)),O(C.y),A.copy(w)}function Ne(ie){n.enableZoom&&Ue(ie),n.enablePan&&J(ie)}function ke(ie){n.enableZoom&&Ue(ie),n.enableRotate&&$(ie)}function Ae(ie){var fe,He;n.enabled!==!1&&(E.length===0&&((fe=n.domElement)==null||fe.ownerDocument.addEventListener("pointermove",U),(He=n.domElement)==null||He.ownerDocument.addEventListener("pointerup",F)),$e(ie),ie.pointerType==="touch"?ze(ie):ne(ie))}function U(ie){n.enabled!==!1&&(ie.pointerType==="touch"?Be(ie):se(ie))}function F(ie){var fe,He,Q;Fe(ie),E.length===0&&((fe=n.domElement)==null||fe.releasePointerCapture(ie.pointerId),(He=n.domElement)==null||He.ownerDocument.removeEventListener("pointermove",U),(Q=n.domElement)==null||Q.ownerDocument.removeEventListener("pointerup",F)),n.dispatchEvent(o),l=a.NONE}function ne(ie){let fe;switch(ie.button){case 0:fe=n.mouseButtons.LEFT;break;case 1:fe=n.mouseButtons.MIDDLE;break;case 2:fe=n.mouseButtons.RIGHT;break;default:fe=-1}switch(fe){case Cs.DOLLY:if(n.enableZoom===!1)return;Ye(ie),l=a.DOLLY;break;case Cs.ROTATE:if(ie.ctrlKey||ie.metaKey||ie.shiftKey){if(n.enablePan===!1)return;K(ie),l=a.PAN}else{if(n.enableRotate===!1)return;Se(ie),l=a.ROTATE}break;case Cs.PAN:if(ie.ctrlKey||ie.metaKey||ie.shiftKey){if(n.enableRotate===!1)return;Se(ie),l=a.ROTATE}else{if(n.enablePan===!1)return;K(ie),l=a.PAN}break;default:l=a.NONE}l!==a.NONE&&n.dispatchEvent(s)}function se(ie){if(n.enabled!==!1)switch(l){case a.ROTATE:if(n.enableRotate===!1)return;q(ie);break;case a.DOLLY:if(n.enableZoom===!1)return;re(ie);break;case a.PAN:if(n.enablePan===!1)return;Ce(ie);break}}function he(ie){n.enabled===!1||n.enableZoom===!1||l!==a.NONE&&l!==a.ROTATE||(ie.preventDefault(),n.dispatchEvent(s),Te(ie),n.dispatchEvent(o))}function de(ie){n.enabled===!1||n.enablePan===!1||De(ie)}function ze(ie){switch(Xe(ie),E.length){case 1:switch(n.touches.ONE){case Rs.ROTATE:if(n.enableRotate===!1)return;tt(),l=a.TOUCH_ROTATE;break;case Rs.PAN:if(n.enablePan===!1)return;Pe(),l=a.TOUCH_PAN;break;default:l=a.NONE}break;case 2:switch(n.touches.TWO){case Rs.DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;Ee(),l=a.TOUCH_DOLLY_PAN;break;case Rs.DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;be(),l=a.TOUCH_DOLLY_ROTATE;break;default:l=a.NONE}break;default:l=a.NONE}l!==a.NONE&&n.dispatchEvent(s)}function Be(ie){switch(Xe(ie),l){case a.TOUCH_ROTATE:if(n.enableRotate===!1)return;$(ie),n.update();break;case a.TOUCH_PAN:if(n.enablePan===!1)return;J(ie),n.update();break;case a.TOUCH_DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;Ne(ie),n.update();break;case a.TOUCH_DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;ke(ie),n.update();break;default:l=a.NONE}}function Ke(ie){n.enabled!==!1&&ie.preventDefault()}function $e(ie){E.push(ie)}function Fe(ie){delete L[ie.pointerId];for(let fe=0;fe<E.length;fe++)if(E[fe].pointerId==ie.pointerId){E.splice(fe,1);return}}function Xe(ie){let fe=L[ie.pointerId];fe===void 0&&(fe=new xe,L[ie.pointerId]=fe),fe.set(ie.pageX,ie.pageY)}function it(ie){const fe=ie.pointerId===E[0].pointerId?E[1]:E[0];return L[fe.pointerId]}this.dollyIn=(ie=k())=>{ee(ie),n.update()},this.dollyOut=(ie=k())=>{O(ie),n.update()}
vendor: 16,432 bytes, line 4170
4170,this.getScale=()=>p,this.setScale=ie=>{Z(ie),n.update()},this.getZoomScale=()=>k(),t!==void 0&&this.connect(t),this.update()}};function Ry(i){if(typeof TextDecoder<"u")return new TextDecoder().decode(i);let e="";for(let t=0,n=i.length;t<n;t++)e+=String.fromCharCode(i[t]);try{return decodeURIComponent(escape(e))}catch{return e}}const bu="srgb",el="srgb-linear",v3=3001,J7=3e3;let Jw=class extends Ki{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(t){return new $7(t)}),this.register(function(t){return new eX(t)}),this.register(function(t){return new cX(t)}),this.register(function(t){return new uX(t)}),this.register(function(t){return new dX(t)}),this.register(function(t){return new nX(t)}),this.register(function(t){return new iX(t)}),this.register(function(t){return new rX(t)}),this.register(function(t){return new sX(t)}),this.register(function(t){return new Q7(t)}),this.register(function(t){return new oX(t)}),this.register(function(t){return new tX(t)}),this.register(function(t){return new lX(t)}),this.register(function(t){return new aX(t)}),this.register(function(t){return new q7(t)}),this.register(function(t){return new fX(t)}),this.register(function(t){return new hX(t)})}load(e,t,n,r){const s=this;let o;if(this.resourcePath!=="")o=this.resourcePath;else if(this.path!==""){const c=js.extractUrlBase(e);o=js.resolveURL(c,this.path)}else o=js.extractUrlBase(e);this.manager.itemStart(e);const a=function(c){r?r(c):console.error(c),s.manager.itemError(e),s.manager.itemEnd(e)},l=new Er(this.manager);l.setPath(this.path),l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setWithCredentials(this.withCredentials),l.load(e,function(c){try{s.parse(c,o,function(u){t(u),s.manager.itemEnd(e)},a)}catch(u){a(u)}},n,a)}setDRACOLoader(e){return this.dracoLoader=e,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,n,r){let s;const o={},a={};if(typeof e=="string")s=JSON.parse(e);else if(e instanceof ArrayBuffer)if(Ry(new Uint8Array(e.slice(0,4)))===NF){try{o[Qt.KHR_BINARY_GLTF]=new pX(e)}catch(u){r&&r(u);return}s=JSON.parse(o[Qt.KHR_BINARY_GLTF].content)}else s=JSON.parse(Ry(new Uint8Array(e)));else s=e;if(s.asset===void 0||s.asset.version[0]<2){r&&r(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const l=new EX(s,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});l.fileLoader.setRequestHeader(this.requestHeader);for(let c=0;c<this.pluginCallbacks.length;c++){const u=this.pluginCallbacks[c](l);u.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[u.name]=u,o[u.name]=!0}if(s.extensionsUsed)for(let c=0;c<s.extensionsUsed.length;++c){const u=s.extensionsUsed[c],d=s.extensionsRequired||[];switch(u){case Qt.KHR_MATERIALS_UNLIT:o[u]=new Z7;break;case Qt.KHR_DRACO_MESH_COMPRESSION:o[u]=new mX(s,this.dracoLoader);break;case Qt.KHR_TEXTURE_TRANSFORM:o[u]=new gX;break;case Qt.KHR_MESH_QUANTIZATION:o[u]=new xX;break;default:d.indexOf(u)>=0&&a[u]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+u+'".')}}l.setExtensions(o),l.setPlugins(a),l.parse(n,r)}parseAsync(e,t){const n=this;return new Promise(function(r,s){n.parse(e,t,r,s)})}};function K7(){let i={};return{get:function(e){return i[e]},add:function(e,t){i[e]=t},remove:function(e){delete i[e]},removeAll:function(){i={}}}}const Qt={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};let q7=class{constructor(e){this.parser=e,this.name=Qt.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let n=0,r=t.length;n<r;n++){const s=t[n];s.extensions&&s.extensions[this.name]&&s.extensions[this.name].light!==void 0&&e._addNodeRef(this.cache,s.extensions[this.name].light)}}_loadLight(e){const t=this.parser,n="light:"+e;let r=t.cache.get(n);if(r)return r;const s=t.json,l=((s.extensions&&s.extensions[this.name]||{}).lights||[])[e];let c;const u=new Ve(16777215);l.color!==void 0&&u.setRGB(l.color[0],l.color[1],l.color[2],el);const d=l.range!==void 0?l.range:0;switch(l.type){case"directional":c=new th(u),c.target.position.set(0,0,-1),c.add(c.target);break;case"point":c=new t0(u),c.distance=d;break;case"spot":c=new F1(u),c.distance=d,l.spot=l.spot||{},l.spot.innerConeAngle=l.spot.innerConeAngle!==void 0?l.spot.innerConeAngle:0,l.spot.outerConeAngle=l.spot.outerConeAngle!==void 0?l.spot.outerConeAngle:Math.PI/4,c.angle=l.spot.outerConeAngle,c.penumbra=1-l.spot.innerConeAngle/l.spot.outerConeAngle,c.target.position.set(0,0,-1),c.add(c.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+l.type)}return c.position.set(0,0,0),c.decay=2,Ha(c,l),l.intensity!==void 0&&(c.intensity=l.intensity),c.name=t.createUniqueName(l.name||"light_"+e),r=Promise.resolve(c),t.cache.add(n,r),r}getDependency(e,t){if(e==="light")return this._loadLight(t)}createNodeAttachment(e){const t=this,n=this.parser,s=n.json.nodes[e],a=(s.extensions&&s.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(l){return n._getNodeRef(t.cache,a,l)})}},Z7=class{constructor(){this.name=Qt.KHR_MATERIALS_UNLIT}getMaterialType(){return pi}extendParams(e,t,n){const r=[];e.color=new Ve(1,1,1),e.opacity=1;const s=t.pbrMetallicRoughness;if(s){if(Array.isArray(s.baseColorFactor)){const o=s.baseColorFactor;e.color.setRGB(o[0],o[1],o[2],el),e.opacity=o[3]}s.baseColorTexture!==void 0&&r.push(n.assignTexture(e,"map",s.baseColorTexture,bu))}return Promise.all(r)}},Q7=class{constructor(e){this.parser=e,this.name=Qt.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const r=this.parser.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=r.extensions[this.name].emissiveStrength;return s!==void 0&&(t.emissiveIntensity=s),Promise.resolve()}},$7=class{constructor(e){this.parser=e,this.name=Qt.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:oi}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];if(o.clearcoatFactor!==void 0&&(t.clearcoat=o.clearcoatFactor),o.clearcoatTexture!==void 0&&s.push(n.assignTexture(t,"clearcoatMap",o.clearcoatTexture)),o.clearcoatRoughnessFactor!==void 0&&(t.clearcoatRoughness=o.clearcoatRoughnessFactor),o.clearcoatRoughnessTexture!==void 0&&s.push(n.assignTexture(t,"clearcoatRoughnessMap",o.clearcoatRoughnessTexture)),o.clearcoatNormalTexture!==void 0&&(s.push(n.assignTexture(t,"clearcoatNormalMap",o.clearcoatNormalTexture)),o.clearcoatNormalTexture.scale!==void 0)){const a=o.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new xe(a,a)}return Promise.all(s)}},eX=class{constructor(e){this.parser=e,this.name=Qt.KHR_MATERIALS_DISPERSION}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:oi}extendMaterialParams(e,t){const r=this.parser.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=r.extensions[this.name];return t.dispersion=s.dispersion!==void 0?s.dispersion:0,Promise.resolve()}},tX=class{constructor(e){this.parser=e,this.name=Qt.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:oi}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];return o.iridescenceFactor!==void 0&&(t.iridescence=o.iridescenceFactor),o.iridescenceTexture!==void 0&&s.push(n.assignTexture(t,"iridescenceMap",o.iridescenceTexture)),o.iridescenceIor!==void 0&&(t.iridescenceIOR=o.iridescenceIor),t.iridescenceThicknessRange===void 0&&(t.iridescenceThicknessRange=[100,400]),o.iridescenceThicknessMinimum!==void 0&&(t.iridescenceThicknessRange[0]=o.iridescenceThicknessMinimum),o.iridescenceThicknessMaximum!==void 0&&(t.iridescenceThicknessRange[1]=o.iridescenceThicknessMaximum),o.iridescenceThicknessTexture!==void 0&&s.push(n.assignTexture(t,"iridescenceThicknessMap",o.iridescenceThicknessTexture)),Promise.all(s)}},nX=class{constructor(e){this.parser=e,this.name=Qt.KHR_MATERIALS_SHEEN}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:oi}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[];t.sheenColor=new Ve(0,0,0),t.sheenRoughness=0,t.sheen=1;const o=r.extensions[this.name];if(o.sheenColorFactor!==void 0){const a=o.sheenColorFactor;t.sheenColor.setRGB(a[0],a[1],a[2],el)}return o.sheenRoughnessFactor!==void 0&&(t.sheenRoughness=o.sheenRoughnessFactor),o.sheenColorTexture!==void 0&&s.push(n.assignTexture(t,"sheenColorMap",o.sheenColorTexture,bu)),o.sheenRoughnessTexture!==void 0&&s.push(n.assignTexture(t,"sheenRoughnessMap",o.sheenRoughnessTexture)),Promise.all(s)}},iX=class{constructor(e){this.parser=e,this.name=Qt.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:oi}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];return o.transmissionFactor!==void 0&&(t.transmission=o.transmissionFactor),o.transmissionTexture!==void 0&&s.push(n.assignTexture(t,"transmissionMap",o.transmissionTexture)),Promise.all(s)}},rX=class{constructor(e){this.parser=e,this.name=Qt.KHR_MATERIALS_VOLUME}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:oi}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];t.thickness=o.thicknessFactor!==void 0?o.thicknessFactor:0,o.thicknessTexture!==void 0&&s.push(n.assignTexture(t,"thicknessMap",o.thicknessTexture)),t.attenuationDistance=o.attenuationDistance||1/0;const a=o.attenuationColor||[1,1,1];return t.attenuationColor=new Ve().setRGB(a[0],a[1],a[2],el),Promise.all(s)}},sX=class{constructor(e){this.parser=e,this.name=Qt.KHR_MATERIALS_IOR}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:oi}extendMaterialParams(e,t){const r=this.parser.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=r.extensions[this.name];return t.ior=s.ior!==void 0?s.ior:1.5,Promise.resolve()}},oX=class{constructor(e){this.parser=e,this.name=Qt.KHR_MATERIALS_SPECULAR}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:oi}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];t.specularIntensity=o.specularFactor!==void 0?o.specularFactor:1,o.specularTexture!==void 0&&s.push(n.assignTexture(t,"specularIntensityMap",o.specularTexture));const a=o.specularColorFactor||[1,1,1];return t.specularColor=new Ve().setRGB(a[0],a[1],a[2],el),o.specularColorTexture!==void 0&&s.push(n.assignTexture(t,"specularColorMap",o.specularColorTexture,bu)),Promise.all(s)}},aX=class{constructor(e){this.parser=e,this.name=Qt.EXT_MATERIALS_BUMP}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:oi}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];return t.bumpScale=o.bumpFactor!==void 0?o.bumpFactor:1,o.bumpTexture!==void 0&&s.push(n.assignTexture(t,"bumpMap",o.bumpTexture)),Promise.all(s)}},lX=class{constructor(e){this.parser=e,this.name=Qt.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:oi}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];return o.anisotropyStrength!==void 0&&(t.anisotropy=o.anisotropyStrength),o.anisotropyRotation!==void 0&&(t.anisotropyRotation=o.anisotropyRotation),o.anisotropyTexture!==void 0&&s.push(n.assignTexture(t,"anisotropyMap",o.anisotropyTexture)),Promise.all(s)}},cX=class{constructor(e){this.parser=e,this.name=Qt.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,n=t.json,r=n.textures[e];if(!r.extensions||!r.extensions[this.name])return null;const s=r.extensions[this.name],o=t.options.ktx2Loader;if(!o){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,s.source,o)}},uX=class{constructor(e){this.parser=e,this.name=Qt.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,r=n.json,s=r.textures[e];if(!s.extensions||!s.extensions[t])return null;const o=s.extensions[t],a=r.images[o.source];let l=n.textureLoader;if(a.uri){const c=n.options.manager.getHandler(a.uri);c!==null&&(l=c)}return this.detectSupport().then(function(c){if(c)return n.loadTextureImage(e,o.source,l);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return n.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}},dX=class{constructor(e){this.parser=e,this.name=Qt.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,r=n.json,s=r.textures[e];if(!s.extensions||!s.extensions[t])return null;const o=s.extensions[t],a=r.images[o.source];let l=n.textureLoader;if(a.uri){const c=n.options.manager.getHandler(a.uri);c!==null&&(l=c)}return this.detectSupport().then(function(c){if(c)return n.loadTextureImage(e,o.source,l);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return n.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdj
4170FDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}},fX=class{constructor(e){this.name=Qt.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){const r=n.extensions[this.name],s=this.parser.getDependency("buffer",r.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return s.then(function(a){const l=r.byteOffset||0,c=r.byteLength||0,u=r.count,d=r.byteStride,p=new Uint8Array(a,l,c);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(u,d,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(u*d);return o.decodeGltfBuffer(new Uint8Array(m),u,d,p,r.mode,r.filter),m})})}else return null}},hX=class{constructor(e){this.name=Qt.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,n=t.nodes[e];if(!n.extensions||!n.extensions[this.name]||n.mesh===void 0)return null;const r=t.meshes[n.mesh];for(const c of r.primitives)if(c.mode!==ao.TRIANGLES&&c.mode!==ao.TRIANGLE_STRIP&&c.mode!==ao.TRIANGLE_FAN&&c.mode!==void 0)return null;const o=n.extensions[this.name].attributes,a=[],l={};for(const c in o)a.push(this.parser.getDependency("accessor",o[c]).then(u=>(l[c]=u,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(c=>{const u=c.pop(),d=u.isGroup?u.children:[u],p=c[0].count,m=[];for(const x of d){const v=new _t,_=new H,g=new si,S=new H(1,1,1),b=new x1(x.geometry,x.material,p);for(let A=0;A<p;A++)l.TRANSLATION&&_.fromBufferAttribute(l.TRANSLATION,A),l.ROTATION&&g.fromBufferAttribute(l.ROTATION,A),l.SCALE&&S.fromBufferAttribute(l.SCALE,A),b.setMatrixAt(A,v.compose(_,g,S));for(const A in l)if(A==="_COLOR_0"){const w=l[A];b.instanceColor=new _c(w.array,w.itemSize,w.normalized)}else A!=="TRANSLATION"&&A!=="ROTATION"&&A!=="SCALE"&&x.geometry.setAttribute(A,l[A]);Wt.prototype.copy.call(b,x),this.parser.assignFinalMaterial(b),m.push(b)}return u.isGroup?(u.clear(),u.add(...m),u):m[0]}))}};const NF="glTF",sp=12,y3={JSON:1313821514,BIN:5130562};let pX=class{constructor(e){this.name=Qt.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,sp);if(this.header={magic:Ry(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==NF)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const n=this.header.length-sp,r=new DataView(e,sp);let s=0;for(;s<n;){const o=r.getUint32(s,!0);s+=4;const a=r.getUint32(s,!0);if(s+=4,a===y3.JSON){const l=new Uint8Array(e,sp+s,o);this.content=Ry(l)}else if(a===y3.BIN){const l=sp+s;this.body=e.slice(l,l+o)}s+=o}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}},mX=class{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=Qt.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const n=this.json,r=this.dracoLoader,s=e.extensions[this.name].bufferView,o=e.extensions[this.name].attributes,a={},l={},c={};for(const u in o){const d=CM[u]||u.toLowerCase();a[d]=o[u]}for(const u in e.attributes){const d=CM[u]||u.toLowerCase();if(o[u]!==void 0){const p=n.accessors[e.attributes[u]],m=If[p.componentType];c[d]=m.name,l[d]=p.normalized===!0}}return t.getDependency("bufferView",s).then(function(u){return new Promise(function(d,p){r.decodeDracoFile(u,function(m){for(const x in m.attributes){const v=m.attributes[x],_=l[x];_!==void 0&&(v.normalized=_)}d(m)},a,c,el,p)})})}},gX=class{constructor(){this.name=Qt.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return(t.texCoord===void 0||t.texCoord===e.channel)&&t.offset===void 0&&t.rotation===void 0&&t.scale===void 0||(e=e.clone(),t.texCoord!==void 0&&(e.channel=t.texCoord),t.offset!==void 0&&e.offset.fromArray(t.offset),t.rotation!==void 0&&(e.rotation=t.rotation),t.scale!==void 0&&e.repeat.fromArray(t.scale),e.needsUpdate=!0),e}},xX=class{constructor(){this.name=Qt.KHR_MESH_QUANTIZATION}},kF=class extends nd{constructor(e,t,n,r){super(e,t,n,r)}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,s=e*r*3+r;for(let o=0;o!==r;o++)t[o]=n[s+o];return t}interpolate_(e,t,n,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=a*2,c=a*3,u=r-t,d=(n-t)/u,p=d*d,m=p*d,x=e*c,v=x-c,_=-2*m+3*p,g=m-p,S=1-_,b=g-p+d;for(let A=0;A!==a;A++){const w=o[v+A+a],C=o[v+A+l]*u,P=o[x+A+a],B=o[x+A]*u;s[A]=S*w+b*C+_*P+g*B}return s}};const vX=new si;let yX=class extends kF{interpolate_(e,t,n,r){const s=super.interpolate_(e,t,n,r);return vX.fromArray(s).normalize().toArray(s),s}};const ao={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},If={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},_3={9728:Bn,9729:jt,9984:Xm,9985:Lu,9986:Yl,9987:as},S3={33071:Mr,33648:Vu,10497:bo},CS={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},CM={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",...Yw>=152?{TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3"}:{TEXCOORD_0:"uv",TEXCOORD_1:"uv2"},COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},Il={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},_X={CUBICSPLINE:void 0,LINEAR:vc,STEP:Yu},RS={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function SX(i){return i.DefaultMaterial===void 0&&(i.DefaultMaterial=new dl({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:So})),i.DefaultMaterial}function nu(i,e,t){for(const n in t.extensions)i[n]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[n]=t.extensions[n])}function Ha(i,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(i.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function bX(i,e,t){let n=!1,r=!1,s=!1;for(let c=0,u=e.length;c<u;c++){const d=e[c];if(d.POSITION!==void 0&&(n=!0),d.NORMAL!==void 0&&(r=!0),d.COLOR_0!==void 0&&(s=!0),n&&r&&s)break}if(!n&&!r&&!s)return Promise.resolve(i);const o=[],a=[],l=[];for(let c=0,u=e.length;c<u;c++){const d=e[c];if(n){const p=d.POSITION!==void 0?t.getDependency("accessor",d.POSITION):i.attributes.position;o.push(p)}if(r){const p=d.NORMAL!==void 0?t.getDependency("accessor",d.NORMAL):i.attributes.normal;a.push(p)}if(s){const p=d.COLOR_0!==void 0?t.getDependency("accessor",d.COLOR_0):i.attributes.color;l.push(p)}}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(l)]).then(function(c){const u=c[0],d=c[1],p=c[2];return n&&(i.morphAttributes.position=u),r&&(i.morphAttributes.normal=d),s&&(i.morphAttributes.color=p),i.morphTargetsRelative=!0,i})}function MX(i,e){if(i.updateMorphTargets(),e.weights!==void 0)for(let t=0,n=e.weights.length;t<n;t++)i.morphTargetInfluences[t]=e.weights[t];if(e.extras&&Array.isArray(e.extras.targetNames)){const t=e.extras.targetNames;if(i.morphTargetInfluences.length===t.length){i.morphTargetDictionary={};for(let n=0,r=t.length;n<r;n++)i.morphTargetDictionary[t[n]]=n}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function AX(i){let e;const t=i.extensions&&i.extensions[Qt.KHR_DRACO_MESH_COMPRESSION];if(t?e="draco:"+t.bufferView+":"+t.indices+":"+PS(t.attributes):e=i.indices+":"+PS(i.attributes)+":"+i.mode,i.targets!==void 0)for(let n=0,r=i.targets.length;n<r;n++)e+=":"+PS(i.targets[n]);return e}function PS(i){let e="";const t=Object.keys(i).sort();for(let n=0,r=t.length;n<r;n++)e+=t[n]+":"+i[t[n]]+";";return e}function RM(i){switch(i){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function wX(i){return i.search(/\.jpe?g($|\?)/i)>0||i.search(/^data\:image\/jpeg/)===0?"image/jpeg":i.search(/\.webp($|\?)/i)>0||i.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const TX=new _t;let EX=class{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new K7,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let n=!1,r=!1,s=-1;typeof navigator<"u"&&typeof navigator.userAgent<"u"&&(n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,r=navigator.userAgent.indexOf("Firefox")>-1,s=r?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||n||r&&s<98?this.textureLoader=new fl(this.options.manager):this.textureLoader=new kw(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Er(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const n=this,r=this.json,s=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()}
vendor: 13,906 bytes, line 4170
4170)).then(function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])}).then(function(o){const a={scene:o[0][r.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:r.asset,parser:n,userData:{}};return nu(s,a,r),Ha(a,r),Promise.all(n._invokeAll(function(l){return l.afterRoot&&l.afterRoot(a)})).then(function(){for(const l of a.scenes)l.updateMatrixWorld();e(a)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[];for(let r=0,s=t.length;r<s;r++){const o=t[r].joints;for(let a=0,l=o.length;a<l;a++)e[o[a]].isBone=!0}for(let r=0,s=e.length;r<s;r++){const o=e[r];o.mesh!==void 0&&(this._addNodeRef(this.meshCache,o.mesh),o.skin!==void 0&&(n[o.mesh].isSkinnedMesh=!0)),o.camera!==void 0&&this._addNodeRef(this.cameraCache,o.camera)}}_addNodeRef(e,t){t!==void 0&&(e.refs[t]===void 0&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,n){if(e.refs[t]<=1)return n;const r=n.clone(),s=(o,a)=>{const l=this.associations.get(o);l!=null&&this.associations.set(a,l);for(const[c,u]of o.children.entries())s(u,a.children[c])};return s(n,r),r.name+="_instance_"+e.uses[t]++,r}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let n=0;n<t.length;n++){const r=e(t[n]);if(r)return r}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const n=[];for(let r=0;r<t.length;r++){const s=e(t[r]);s&&n.push(s)}return n}getDependency(e,t){const n=e+":"+t;let r=this.cache.get(n);if(!r){switch(e){case"scene":r=this.loadScene(t);break;case"node":r=this._invokeOne(function(s){return s.loadNode&&s.loadNode(t)});break;case"mesh":r=this._invokeOne(function(s){return s.loadMesh&&s.loadMesh(t)});break;case"accessor":r=this.loadAccessor(t);break;case"bufferView":r=this._invokeOne(function(s){return s.loadBufferView&&s.loadBufferView(t)});break;case"buffer":r=this.loadBuffer(t);break;case"material":r=this._invokeOne(function(s){return s.loadMaterial&&s.loadMaterial(t)});break;case"texture":r=this._invokeOne(function(s){return s.loadTexture&&s.loadTexture(t)});break;case"skin":r=this.loadSkin(t);break;case"animation":r=this._invokeOne(function(s){return s.loadAnimation&&s.loadAnimation(t)});break;case"camera":r=this.loadCamera(t);break;default:if(r=this._invokeOne(function(s){return s!=this&&s.getDependency&&s.getDependency(e,t)}),!r)throw new Error("Unknown type: "+e);break}this.cache.add(n,r)}return r}getDependencies(e){let t=this.cache.get(e);if(!t){const n=this,r=this.json[e+(e==="mesh"?"es":"s")]||[];t=Promise.all(r.map(function(s,o){return n.getDependency(e,o)})),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],n=this.fileLoader;if(t.type&&t.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(t.uri===void 0&&e===0)return Promise.resolve(this.extensions[Qt.KHR_BINARY_GLTF].body);const r=this.options;return new Promise(function(s,o){n.load(js.resolveURL(t.uri,r.path),s,void 0,function(){o(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))})})}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then(function(n){const r=t.byteLength||0,s=t.byteOffset||0;return n.slice(s,s+r)})}loadAccessor(e){const t=this,n=this.json,r=this.json.accessors[e];if(r.bufferView===void 0&&r.sparse===void 0){const o=CS[r.type],a=If[r.componentType],l=r.normalized===!0,c=new a(r.count*o);return Promise.resolve(new zt(c,o,l))}const s=[];return r.bufferView!==void 0?s.push(this.getDependency("bufferView",r.bufferView)):s.push(null),r.sparse!==void 0&&(s.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),s.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(s).then(function(o){const a=o[0],l=CS[r.type],c=If[r.componentType],u=c.BYTES_PER_ELEMENT,d=u*l,p=r.byteOffset||0,m=r.bufferView!==void 0?n.bufferViews[r.bufferView].byteStride:void 0,x=r.normalized===!0;let v,_;if(m&&m!==d){const g=Math.floor(p/m),S="InterleavedBuffer:"+r.bufferView+":"+r.componentType+":"+g+":"+r.count;let b=t.cache.get(S);b||(v=new c(a,g*m,r.count*m/u),b=new lh(v,m/u),t.cache.add(S,b)),_=new Xr(b,l,p%m/u,x)}else a===null?v=new c(r.count*l):v=new c(a,p,r.count*l),_=new zt(v,l,x);if(r.sparse!==void 0){const g=CS.SCALAR,S=If[r.sparse.indices.componentType],b=r.sparse.indices.byteOffset||0,A=r.sparse.values.byteOffset||0,w=new S(o[1],b,r.sparse.count*g),C=new c(o[2],A,r.sparse.count*l);a!==null&&(_=new zt(_.array.slice(),_.itemSize,_.normalized));for(let P=0,B=w.length;P<B;P++){const R=w[P];if(_.setX(R,C[P*l]),l>=2&&_.setY(R,C[P*l+1]),l>=3&&_.setZ(R,C[P*l+2]),l>=4&&_.setW(R,C[P*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return _})}loadTexture(e){const t=this.json,n=this.options,s=t.textures[e].source,o=t.images[s];let a=this.textureLoader;if(o.uri){const l=n.manager.getHandler(o.uri);l!==null&&(a=l)}return this.loadTextureImage(e,s,a)}loadTextureImage(e,t,n){const r=this,s=this.json,o=s.textures[e],a=s.images[t],l=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[l])return this.textureCache[l];const c=this.loadImageSource(t,n).then(function(u){u.flipY=!1,u.name=o.name||a.name||"",u.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(u.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return u.magFilter=_3[p.magFilter]||jt,u.minFilter=_3[p.minFilter]||as,u.wrapS=S3[p.wrapS]||bo,u.wrapT=S3[p.wrapT]||bo,r.associations.set(u,{textures:e}),u}).catch(function(){return null});return this.textureCache[l]=c,c}loadImageSource(e,t){const n=this,r=this.json,s=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(d=>d.clone());const o=r.images[e],a=self.URL||self.webkitURL;let l=o.uri||"",c=!1;if(o.bufferView!==void 0)l=n.getDependency("bufferView",o.bufferView).then(function(d){c=!0;const p=new Blob([d],{type:o.mimeType});return l=a.createObjectURL(p),l});else if(o.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const u=Promise.resolve(l).then(function(d){return new Promise(function(p,m){let x=p;t.isImageBitmapLoader===!0&&(x=function(v){const _=new Sn(v);_.needsUpdate=!0,p(_)}),t.load(js.resolveURL(d,s.path),x,void 0,m)})}).then(function(d){return c===!0&&a.revokeObjectURL(l),Ha(d,o),d.userData.mimeType=o.mimeType||wX(o.uri),d}).catch(function(d){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),d});return this.sourceCache[e]=u,u}assignTexture(e,t,n,r){const s=this;return this.getDependency("texture",n.index).then(function(o){if(!o)return null;if(n.texCoord!==void 0&&n.texCoord>0&&(o=o.clone(),o.channel=n.texCoord),s.extensions[Qt.KHR_TEXTURE_TRANSFORM]){const a=n.extensions!==void 0?n.extensions[Qt.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[Qt.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),s.associations.set(o,l)}}return r!==void 0&&(typeof r=="number"&&(r=r===v3?bu:el),"colorSpace"in o?o.colorSpace=r:o.encoding=r===bu?v3:J7),e[t]=o,o})}assignFinalMaterial(e){const t=e.geometry;let n=e.material;const r=t.attributes.tangent===void 0,s=t.attributes.color!==void 0,o=t.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+n.uuid;let l=this.cache.get(a);l||(l=new qa,Wn.prototype.copy.call(l,n),l.color.copy(n.color),l.map=n.map,l.sizeAttenuation=!1,this.cache.add(a,l)),n=l}else if(e.isLine){const a="LineBasicMaterial:"+n.uuid;let l=this.cache.get(a);l||(l=new Ai,Wn.prototype.copy.call(l,n),l.color.copy(n.color),l.map=n.map,this.cache.add(a,l)),n=l}if(r||s||o){let a="ClonedMaterial:"+n.uuid+":";r&&(a+="derivative-tangents:"),s&&(a+="vertex-colors:"),o&&(a+="flat-shading:");let l=this.cache.get(a);l||(l=n.clone(),s&&(l.vertexColors=!0),o&&(l.flatShading=!0),r&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(a,l),this.associations.set(l,this.associations.get(n))),n=l}e.material=n}getMaterialType(){return dl}loadMaterial(e){const t=this,n=this.json,r=this.extensions,s=n.materials[e];let o;const a={},l=s.extensions||{},c=[];if(l[Qt.KHR_MATERIALS_UNLIT]){const d=r[Qt.KHR_MATERIALS_UNLIT];o=d.getMaterialType(),c.push(d.extendParams(a,s,t))}else{const d=s.pbrMetallicRoughness||{};if(a.color=new Ve(1,1,1),a.opacity=1,Array.isArray(d.baseColorFactor)){const p=d.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],el),a.opacity=p[3]}d.baseColorTexture!==void 0&&c.push(t.assignTexture(a,"map",d.baseColorTexture,bu)),a.metalness=d.metallicFactor!==void 0?d.metallicFactor:1,a.roughness=d.roughnessFactor!==void 0?d.roughnessFactor:1,d.metallicRoughnessTexture!==void 0&&(c.push(t.assignTexture(a,"metalnessMap",d.metallicRoughnessTexture)),c.push(t.assignTexture(a,"roughnessMap",d.metallicRoughnessTexture))),o=this._invokeOne(function(p){return p.getMaterialType&&p.getMaterialType(e)}),c.push(Promise.all(this._invokeAll(function(p){return p.extendMaterialParams&&p.extendMaterialParams(e,a)})))}s.doubleSided===!0&&(a.side=Di);const u=s.alphaMode||RS.OPAQUE;if(u===RS.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,u===RS.MASK&&(a.alphaTest=s.alphaCutoff!==void 0?s.alphaCutoff:.5)),s.normalTexture!==void 0&&o!==pi&&(c.push(t.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new xe(1,1),s.normalTexture.scale!==void 0)){const d=s.normalTexture.scale;a.normalScale.set(d,d)}if(s.occlusionTexture!==void 0&&o!==pi&&(c.push(t.assignTexture(a,"aoMap",s.occlusionTexture)),s.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=s.occlusionTexture.strength)),s.emissiveFactor!==void 0&&o!==pi){const d=s.emissiveFactor;a.emissive=new Ve().setRGB(d[0],d[1],d[2],el)}return s.emissiveTexture!==void 0&&o!==pi&&c.push(t.assignTexture(a,"emissiveMap",s.emissiveTexture,bu)),Promise.all(c).then(function(){const d=new o(a);return s.name&&(d.name=s.name),Ha(d,s),t.associations.set(d,{materials:e}),s.extensions&&nu(r,d,s),d})}createUniqueName(e){const t=sn.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,n=this.extensions,r=this.primitiveCache;function s(a){return n[Qt.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,t).then(function(l){return b3(l,a,t)})}const o=[];for(let a=0,l=e.length;a<l;a++){const c=e[a],u=AX(c),d=r[u];if(d)o.push(d.promise);else{let p;c.extensions&&c.extensions[Qt.KHR_DRACO_MESH_COMPRESSION]?p=s(c):p=b3(new Rt,c,t),r[u]={primitive:c,promise:p},o.push(p)}}return Promise.all(o)}loadMesh(e){const t=this,n=this.json,r=this.extensions,s=n.meshes[e],o=s.primitives,a=[];for(let l=0,c=o.length;l<c;l++){const u=o[l].material===void 0?SX(this.cache):this.getDependency("material",o[l].material);a.push(u)}return a.push(t.loadGeometries(o)),Promise.all(a).then(function(l){const c=l.slice(0,l.length-1),u=l[l.length-1],d=[];for(let m=0,x=u.length;m<x;m++){const v=u[m],_=o[m];let g;const S=c[m];if(_.mode===ao.TRIANGLES||_.mode===ao.TRIANGLE_STRIP||_.mode===ao.TRIANGLE_FAN||_.mode===void 0)g=s.isSkinnedMesh===!0?new g1(v,S):new Kt(v,S),g.isSkinnedMesh===!0&&g.normalizeSkinWeights(),_.mode===ao.TRIANGLE_STRIP?g.geometry=m3(g.geometry,Jm):_.mode===ao.TRIANGLE_FAN&&(g.geometry=m3(g.geometry,Ju));else if(_.mode===ao.LINES)g=new gs(v,S);else if(_.mode===ao.LINE_STRIP)g=new Ma(v,S);else if(_.mode===ao.LINE_LOOP)g=new y1(v,S);else if(_.mode===ao.POINTS)g=new uc(v,S);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+_.mode);Object.keys(g.geometry.morphAttributes).length>0&&MX(g,s),g.name=t.createUniqueName(s.name||"mesh_"+e),Ha(g,s),_.extensions&&nu(r,g,_),t.assignFinalMaterial(g),d.push(g)}for(let m=0,x=d.length;m<x;m++)t.associations.set(d[m],{meshes:e,primitives:m});if(d.length===1)return s.extensions&&nu(r,d[0],s),d[0];const p=new Ns;s.extensions&&nu(r,p,s),t.associations.set(p,{meshes:e});for(let m=0,x=d.length;m<x;m++)p.add(d[m]);return p})}loadCamera(e){let t;const n=this.json.cameras[e],r=n[n.type];if(!r){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return n.type==="perspective"?t=new wn(Xn.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):n.type==="orthographic"&&(t=new or(-r.xmag,r.xmag,r.ymag,-r.ymag,r.znear,r.zfar)),n.name&&(t.name=this.createUniqueName(n.name)),Ha(t,n),Promise.resolve(t)}loadSkin(e){const t=this.json.skins[e],n=[];for(let r=0,s=t.joints.length;r<s;r++)n.push(this._loadNodeShallow(t.joints[r]));return t.inverseBindMatrices!==void 0?n.push(this.getDependency("accessor",t.inverseBindMatrices)):n.push(null),Promise.all(n).then(function(r){const s=r.pop(),o=r,a=[],l=[];for(let c=0,u=o.length;c<u;c++){const d=o[c];if(d){a.push(d);const p=new _t;s!==null&&p.fromArray(s.array,c*16),l.push(p)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[c])}return new ch(a,l)})}loadAnimation(e){const t=this.json,n=this,r=t.animations[e],s=r.name?r.name:"animation_"+e,o=[],a=[],l=[],c=[],u=[];for(let d=0,p=r.channels.length;d<p;d++){const m=r.channels[d],x=r.samplers[m.sampler],v=m.target,_=v.node,g=r.parameters!==void 0?r.parameters[x.input]:x.input,S=r.parameters!==void 0?r.parameters[x.output]:x.output;v.node!==void 0&&(o.push(this.getDependency("node",_)),a.push(this.getDependency("accessor",g)),l.push(this.getDependency("accessor",S)),c.push(x),u.push(v))}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(l),Promise.all(c),Promise.all(u)]).then(function(d){const p=d[0],m=d[1],x=d[2],v=d[3],_=d[4],g=[];for(let S=0,b=p.length;S<b;S++){const A=p[S],w=m[S],C=x[S],P=v[S],B=_[S];if(A===void 0)continue;A.updateMatrix&&A.updateMatrix();const R=n._createAnimationTracks(A,w,C,P,B);if(R)for(let E=0;E<R.length;E++)g.push(R[E])}return new qu(s,void 0,g)})}createNodeMesh(e){const t=this.json,n=this,r=t.nodes[e];return r.mesh===void 0?null:n.getDependency("mesh",r.mesh).then(function(s){const o=n._getNodeRef(n.meshCache,r.mesh,s);
4170return r.weights!==void 0&&o.traverse(function(a){if(a.isMesh)for(let l=0,c=r.weights.length;l<c;l++)a.morphTargetInfluences[l]=r.weights[l]}),o})}loadNode(e){const t=this.json,n=this,r=t.nodes[e],s=n._loadNodeShallow(e),o=[],a=r.children||[];for(let c=0,u=a.length;c<u;c++)o.push(n.getDependency("node",a[c]));const l=r.skin===void 0?Promise.resolve(null):n.getDependency("skin",r.skin);return Promise.all([s,Promise.all(o),l]).then(function(c){const u=c[0],d=c[1],p=c[2];p!==null&&u.traverse(function(m){m.isSkinnedMesh&&m.bind(p,TX)});for(let m=0,x=d.length;m<x;m++)u.add(d[m]);return u})}_loadNodeShallow(e){const t=this.json,n=this.extensions,r=this;if(this.nodeCache[e]!==void 0)return this.nodeCache[e];const s=t.nodes[e],o=s.name?r.createUniqueName(s.name):"",a=[],l=r._invokeOne(function(c){return c.createNodeMesh&&c.createNodeMesh(e)});return l&&a.push(l),s.camera!==void 0&&a.push(r.getDependency("camera",s.camera).then(function(c){return r._getNodeRef(r.cameraCache,s.camera,c)})),r._invokeAll(function(c){return c.createNodeAttachment&&c.createNodeAttachment(e)}).forEach(function(c){a.push(c)}),this.nodeCache[e]=Promise.all(a).then(function(c){let u;if(s.isBone===!0?u=new Zm:c.length>1?u=new Ns:c.length===1?u=c[0]:u=new Wt,u!==c[0])for(let d=0,p=c.length;d<p;d++)u.add(c[d]);if(s.name&&(u.userData.name=s.name,u.name=o),Ha(u,s),s.extensions&&nu(n,u,s),s.matrix!==void 0){const d=new _t;d.fromArray(s.matrix),u.applyMatrix4(d)}else s.translation!==void 0&&u.position.fromArray(s.translation),s.rotation!==void 0&&u.quaternion.fromArray(s.rotation),s.scale!==void 0&&u.scale.fromArray(s.scale);return r.associations.has(u)||r.associations.set(u,{}),r.associations.get(u).nodes=e,u}),this.nodeCache[e]}loadScene(e){const t=this.extensions,n=this.json.scenes[e],r=this,s=new Ns;n.name&&(s.name=r.createUniqueName(n.name)),Ha(s,n),n.extensions&&nu(t,s,n);const o=n.nodes||[],a=[];for(let l=0,c=o.length;l<c;l++)a.push(r.getDependency("node",o[l]));return Promise.all(a).then(function(l){for(let u=0,d=l.length;u<d;u++)s.add(l[u]);const c=u=>{const d=new Map;for(const[p,m]of r.associations)(p instanceof Wn||p instanceof Sn)&&d.set(p,m);return u.traverse(p=>{const m=r.associations.get(p);m!=null&&d.set(p,m)}),d};return r.associations=c(s),s})}_createAnimationTracks(e,t,n,r,s){const o=[],a=e.name?e.name:e.uuid,l=[];Il[s.path]===Il.weights?e.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a);let c;switch(Il[s.path]){case Il.weights:c=al;break;case Il.rotation:c=ll;break;case Il.position:case Il.scale:c=cl;break;default:switch(n.itemSize){case 1:c=al;break;case 2:case 3:default:c=cl;break}break}const u=r.interpolation!==void 0?_X[r.interpolation]:vc,d=this._getArrayFromAccessor(n);for(let p=0,m=l.length;p<m;p++){const x=new c(l[p]+"."+Il[s.path],t.array,d,u);r.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(x),o.push(x)}return o}_getArrayFromAccessor(e){let t=e.array;if(e.normalized){const n=RM(t.constructor),r=new Float32Array(t.length);for(let s=0,o=t.length;s<o;s++)r[s]=t[s]*n;t=r}return t}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(n){const r=this instanceof ll?yX:kF;return new r(this.times,this.values,this.getValueSize()/3,n)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}};function CX(i,e,t){const n=e.attributes,r=new jn;if(n.POSITION!==void 0){const a=t.json.accessors[n.POSITION],l=a.min,c=a.max;if(l!==void 0&&c!==void 0){if(r.set(new H(l[0],l[1],l[2]),new H(c[0],c[1],c[2])),a.normalized){const u=RM(If[a.componentType]);r.min.multiplyScalar(u),r.max.multiplyScalar(u)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const s=e.targets;if(s!==void 0){const a=new H,l=new H;for(let c=0,u=s.length;c<u;c++){const d=s[c];if(d.POSITION!==void 0){const p=t.json.accessors[d.POSITION],m=p.min,x=p.max;if(m!==void 0&&x!==void 0){if(l.setX(Math.max(Math.abs(m[0]),Math.abs(x[0]))),l.setY(Math.max(Math.abs(m[1]),Math.abs(x[1]))),l.setZ(Math.max(Math.abs(m[2]),Math.abs(x[2]))),p.normalized){const v=RM(If[p.componentType]);l.multiplyScalar(v)}a.max(l)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}r.expandByVector(a)}i.boundingBox=r;const o=new mi;r.getCenter(o.center),o.radius=r.min.distanceTo(r.max)/2,i.boundingSphere=o}function b3(i,e,t){const n=e.attributes,r=[];function s(o,a){return t.getDependency("accessor",o).then(function(l){i.setAttribute(a,l)})}for(const o in n){const a=CM[o]||o.toLowerCase();a in i.attributes||r.push(s(n[o],a))}if(e.indices!==void 0&&!i.index){const o=t.getDependency("accessor",e.indices).then(function(a){i.setIndex(a)});r.push(o)}return Ha(i,e),CX(i,e,t),Promise.all(r).then(function(){return e.targets!==void 0?bX(i,e.targets,t):i})}const RX=/^[og]\s*(.+)?/,PX=/^mtllib /,IX=/^usemtl /,LX=/^usemap /,M3=new H,IS=new H,A3=new H,w3=new H,so=new H;function BX(){const i={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(e,t){if(this.object&&this.object.fromDeclaration===!1){this.object.name=e,this.object.fromDeclaration=t!==!1;return}const n=this.object&&typeof this.object.currentMaterial=="function"?this.object.currentMaterial():void 0;if(this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0),this.object={name:e||"",fromDeclaration:t!==!1,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(r,s){const o=this._finalize(!1);o&&(o.inherited||o.groupCount<=0)&&this.materials.splice(o.index,1);const a={index:this.materials.length,name:r||"",mtllib:Array.isArray(s)&&s.length>0?s[s.length-1]:"",smooth:o!==void 0?o.smooth:this.smooth,groupStart:o!==void 0?o.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(l){const c={index:typeof l=="number"?l:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return c.clone=this.clone.bind(c),c}};return this.materials.push(a),a},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(r){const s=this.currentMaterial();if(s&&s.groupEnd===-1&&(s.groupEnd=this.geometry.vertices.length/3,s.groupCount=s.groupEnd-s.groupStart,s.inherited=!1),r&&this.materials.length>1)for(let o=this.materials.length-1;o>=0;o--)this.materials[o].groupCount<=0&&this.materials.splice(o,1);return r&&this.materials.length===0&&this.materials.push({name:"",smooth:this.smooth}),s}},n&&n.name&&typeof n.clone=="function"){const r=n.clone(0);r.inherited=!0,this.object.materials.push(r)}this.objects.push(this.object)},finalize:function(){this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0)},parseVertexIndex:function(e,t){const n=parseInt(e,10);return(n>=0?n-1:n+t/3)*3},parseNormalIndex:function(e,t){const n=parseInt(e,10);return(n>=0?n-1:n+t/3)*3},parseUVIndex:function(e,t){const n=parseInt(e,10);return(n>=0?n-1:n+t/2)*2},addVertex:function(e,t,n){const r=this.vertices,s=this.object.geometry.vertices;s.push(r[e+0],r[e+1],r[e+2]),s.push(r[t+0],r[t+1],r[t+2]),s.push(r[n+0],r[n+1],r[n+2])},addVertexPoint:function(e){const t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addVertexLine:function(e){const t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addNormal:function(e,t,n){const r=this.normals,s=this.object.geometry.normals;s.push(r[e+0],r[e+1],r[e+2]),s.push(r[t+0],r[t+1],r[t+2]),s.push(r[n+0],r[n+1],r[n+2])},addFaceNormal:function(e,t,n){const r=this.vertices,s=this.object.geometry.normals;M3.fromArray(r,e),IS.fromArray(r,t),A3.fromArray(r,n),so.subVectors(A3,IS),w3.subVectors(M3,IS),so.cross(w3),so.normalize(),s.push(so.x,so.y,so.z),s.push(so.x,so.y,so.z),s.push(so.x,so.y,so.z)},addColor:function(e,t,n){const r=this.colors,s=this.object.geometry.colors;r[e]!==void 0&&s.push(r[e+0],r[e+1],r[e+2]),r[t]!==void 0&&s.push(r[t+0],r[t+1],r[t+2]),r[n]!==void 0&&s.push(r[n+0],r[n+1],r[n+2])},addUV:function(e,t,n){const r=this.uvs,s=this.object.geometry.uvs;s.push(r[e+0],r[e+1]),s.push(r[t+0],r[t+1]),s.push(r[n+0],r[n+1])},addDefaultUV:function(){const e=this.object.geometry.uvs;e.push(0,0),e.push(0,0),e.push(0,0)},addUVLine:function(e){const t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])},addFace:function(e,t,n,r,s,o,a,l,c){const u=this.vertices.length;let d=this.parseVertexIndex(e,u),p=this.parseVertexIndex(t,u),m=this.parseVertexIndex(n,u);
4170if(this.addVertex(d,p,m),this.addColor(d,p,m),a!==void 0&&a!==""){const x=this.normals.length;d=this.parseNormalIndex(a,x),p=this.parseNormalIndex(l,x),m=this.parseNormalIndex(c,x),this.addNormal(d,p,m)}else this.addFaceNormal(d,p,m);if(r!==void 0&&r!==""){const x=this.uvs.length;d=this.parseUVIndex(r,x),p=this.parseUVIndex(s,x),m=this.parseUVIndex(o,x),this.addUV(d,p,m),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(e){this.object.geometry.type="Points";const t=this.vertices.length;for(let n=0,r=e.length;n<r;n++){const s=this.parseVertexIndex(e[n],t);this.addVertexPoint(s),this.addColor(s)}},addLineGeometry:function(e,t){this.object.geometry.type="Line";const n=this.vertices.length,r=this.uvs.length;for(let s=0,o=e.length;s<o;s++)this.addVertexLine(this.parseVertexIndex(e[s],n));for(let s=0,o=t.length;s<o;s++)this.addUVLine(this.parseUVIndex(t[s],r))}};return i.startObject("",!1),i}class OF extends Ki{constructor(e){super(e),this.materials=null}load(e,t,n,r){const s=this,o=new Er(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{t(s.parse(a))}catch(l){r?r(l):console.error(l),s.manager.itemError(e)}},n,r)}setMaterials(e){return this.materials=e,this}parse(e){const t=new BX;e.indexOf(`\r 4171`)!==-1&&(e=e.replace(/\r\n/g,` 4172`)),e.indexOf(`\\ 4173`)!==-1&&(e=e.replace(/\\\n/g,""));const n=e.split(` 4174`);let r="",s="",o=0,a=[];const l=typeof"".trimLeft=="function";for(let d=0,p=n.length;d<p;d++)if(r=n[d],r=l?r.trimLeft():r.trim(),o=r.length,o!==0&&(s=r.charAt(0),s!=="#"))if(s==="v"){const m=r.split(/\s+/);switch(m[0]){case"v":t.vertices.push(parseFloat(m[1]),parseFloat(m[2]),parseFloat(m[3])),m.length>=7?t.colors.push(parseFloat(m[4]),parseFloat(m[5]),parseFloat(m[6])):t.colors.push(void 0,void 0,void 0);break;case"vn":t.normals.push(parseFloat(m[1]),parseFloat(m[2]),parseFloat(m[3]));break;case"vt":t.uvs.push(parseFloat(m[1]),parseFloat(m[2]));break}}else if(s==="f"){const x=r.substr(1).trim().split(/\s+/),v=[];for(let g=0,S=x.length;g<S;g++){const b=x[g];if(b.length>0){const A=b.split("/");v.push(A)}}const _=v[0];for(let g=1,S=v.length-1;g<S;g++){const b=v[g],A=v[g+1];t.addFace(_[0],b[0],A[0],_[1],b[1],A[1],_[2],b[2],A[2])}}else if(s==="l"){const m=r.substring(1).trim().split(" ");let x=[];const v=[];if(r.indexOf("/")===-1)x=m;else for(let _=0,g=m.length;_<g;_++){const S=m[_].split("/");S[0]!==""&&x.push(S[0]),S[1]!==""&&v.push(S[1])}t.addLineGeometry(x,v)}else if(s==="p"){const x=r.substr(1).trim().split(" ");t.addPointGeometry(x)}else if((a=RX.exec(r))!==null){const m=(" "+a[0].substr(1).trim()).substr(1);t.startObject(m)}else if(IX.test(r))t.object.startMaterial(r.substring(7).trim(),t.materialLibraries);else if(PX.test(r))t.materialLibraries.push(r.substring(7).trim());else if(LX.test(r))console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');else if(s==="s"){if(a=r.split(" "),a.length>1){const x=a[1].trim().toLowerCase();t.object.smooth=x!=="0"&&x!=="off"}else t.object.smooth=!0;const m=t.object.currentMaterial();m&&(m.smooth=t.object.smooth)}else{if(r==="\0")continue;console.warn('THREE.OBJLoader: Unexpected line: "'+r+'"')}t.finalize();const c=new Ns;if(c.materialLibraries=[].concat(t.materialLibraries),!(t.objects.length===1&&t.objects[0].geometry.vertices.length===0)===!0)for(let d=0,p=t.objects.length;d<p;d++){const m=t.objects[d],x=m.geometry,v=m.materials,_=x.type==="Line",g=x.type==="Points";let S=!1;if(x.vertices.length===0)continue;const b=new Rt;b.setAttribute("position",new ct(x.vertices,3)),x.normals.length>0&&b.setAttribute("normal",new ct(x.normals,3)),x.colors.length>0&&(S=!0,b.setAttribute("color",new ct(x.colors,3))),x.hasUVIndices===!0&&b.setAttribute("uv",new ct(x.uvs,2));const A=[];for(let C=0,P=v.length;C<P;C++){const B=v[C],R=B.name+"_"+B.smooth+"_"+S;let E=t.materials[R];if(this.materials!==null){if(E=this.materials.create(B.name),_&&E&&!(E instanceof Ai)){const L=new Ai;Wn.prototype.copy.call(L,E),L.color.copy(E.color),E=L}else if(g&&E&&!(E instanceof qa)){const L=new qa({size:10,sizeAttenuation:!1});Wn.prototype.copy.call(L,E),L.color.copy(E.color),L.map=E.map,E=L}}E===void 0&&(_?E=new Ai:g?E=new qa({size:1,sizeAttenuation:!1}):E=new Tw,E.name=B.name,E.flatShading=!B.smooth,E.vertexColors=S,t.materials[R]=E),A.push(E)}let w;if(A.length>1){for(let C=0,P=v.length;C<P;C++){const B=v[C];b.addGroup(B.groupStart,B.groupCount,C)}_?w=new gs(b,A):g?w=new uc(b,A):w=new Kt(b,A)}else _?w=new gs(b,A[0]):g?w=new uc(b,A[0]):w=new Kt(b,A[0]);w.name=m.name,c.add(w)}else if(t.vertices.length>0){const d=new qa({size:1,sizeAttenuation:!1}),p=new Rt;p.setAttribute("position",new ct(t.vertices,3)),t.colors.length>0&&t.colors[0]!==void 0&&(p.setAttribute("color",new ct(t.colors,3)),d.vertexColors=!0);const m=new uc(p,d);c.add(m)}return c}}const LS=new WeakMap;class DX extends Ki{constructor(e){super(e),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(e){return this.decoderPath=e,this}setDecoderConfig(e){return this.decoderConfig=e,this}setWorkerLimit(e){return this.workerLimit=e,this}load(e,t,n,r){const s=new Er(this.manager);s.setPath(this.path),s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,o=>{const a={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};
vendor: 4,225 bytes, lines 4174-4175
4174this.decodeGeometry(o,a).then(t).catch(r)},n,r)}decodeDracoFile(e,t,n,r){const s={attributeIDs:n||this.defaultAttributeIDs,attributeTypes:r||this.defaultAttributeTypes,useUniqueIDs:!!n};this.decodeGeometry(e,s).then(t)}decodeGeometry(e,t){for(const l in t.attributeTypes){const c=t.attributeTypes[l];c.BYTES_PER_ELEMENT!==void 0&&(t.attributeTypes[l]=c.name)}const n=JSON.stringify(t);if(LS.has(e)){const l=LS.get(e);if(l.key===n)return l.promise;if(e.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let r;const s=this.workerNextTaskID++,o=e.byteLength,a=this._getWorker(s,o).then(l=>(r=l,new Promise((c,u)=>{r._callbacks[s]={resolve:c,reject:u},r.postMessage({type:"decode",id:s,taskConfig:t,buffer:e},[e])}))).then(l=>this._createGeometry(l.geometry));return a.catch(()=>!0).then(()=>{r&&s&&this._releaseTask(r,s)}),LS.set(e,{key:n,promise:a}),a}_createGeometry(e){const t=new Rt;e.index&&t.setIndex(new zt(e.index.array,1));for(let n=0;n<e.attributes.length;n++){const r=e.attributes[n],s=r.name,o=r.array,a=r.itemSize;t.setAttribute(s,new zt(o,a))}return t}_loadLibrary(e,t){const n=new Er(this.manager);return n.setPath(this.decoderPath),n.setResponseType(t),n.setWithCredentials(this.withCredentials),new Promise((r,s)=>{n.load(e,r,void 0,s)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e=typeof WebAssembly!="object"||this.decoderConfig.type==="js",t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then(n=>{const r=n[0];e||(this.decoderConfig.wasmBinary=n[1]);const s=FX.toString(),o=["/* draco decoder */",r,"","/* worker */",s.substring(s.indexOf("{")+1,s.lastIndexOf("}"))].join(` 4175`);this.workerSourceURL=URL.createObjectURL(new Blob([o]))}),this.decoderPending}_getWorker(e,t){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){const r=new Worker(this.workerSourceURL);r._callbacks={},r._taskCosts={},r._taskLoad=0,r.postMessage({type:"init",decoderConfig:this.decoderConfig}),r.onmessage=function(s){const o=s.data;switch(o.type){case"decode":r._callbacks[o.id].resolve(o);break;case"error":r._callbacks[o.id].reject(o);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+o.type+'"')}},this.workerPool.push(r)}else this.workerPool.sort(function(r,s){return r._taskLoad>s._taskLoad?-1:1});const n=this.workerPool[this.workerPool.length-1];return n._taskCosts[e]=t,n._taskLoad+=t,n})}_releaseTask(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]}debug(){console.log("Task load: ",this.workerPool.map(e=>e._taskLoad))}dispose(){for(let e=0;e<this.workerPool.length;++e)this.workerPool[e].terminate();return this.workerPool.length=0,this}}function FX(){let i,e;onmessage=function(o){const a=o.data;switch(a.type){case"init":i=a.decoderConfig,e=new Promise(function(u){i.onModuleLoaded=function(d){u({draco:d})},DracoDecoderModule(i)});break;case"decode":const l=a.buffer,c=a.taskConfig;e.then(u=>{const d=u.draco,p=new d.Decoder,m=new d.DecoderBuffer;m.Init(new Int8Array(l),l.byteLength);try{const x=t(d,p,m,c),v=x.attributes.map(_=>_.array.buffer);x.index&&v.push(x.index.array.buffer),self.postMessage({type:"decode",id:a.id,geometry:x},v)}catch(x){console.error(x),self.postMessage({type:"error",id:a.id,error:x.message})}finally{d.destroy(m),d.destroy(p)}});break}};function t(o,a,l,c){const u=c.attributeIDs,d=c.attributeTypes;let p,m;const x=a.GetEncodedGeometryType(l);if(x===o.TRIANGULAR_MESH)p=new o.Mesh,m=a.DecodeBufferToMesh(l,p);else if(x===o.POINT_CLOUD)p=new o.PointCloud,m=a.DecodeBufferToPointCloud(l,p);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!m.ok()||p.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+m.error_msg());const v={index:null,attributes:[]};for(const _ in u){const g=self[d[_]];let S,b;if(c.useUniqueIDs)b=u[_],S=a.GetAttributeByUniqueId(p,b);else{if(b=a.GetAttributeId(p,o[u[_]]),b===-1)continue;S=a.GetAttribute(p,b)}
4175v.attributes.push(r(o,a,p,_,g,S))}return x===o.TRIANGULAR_MESH&&(v.index=n(o,a,p)),o.destroy(p),v}function n(o,a,l){const u=l.num_faces()*3,d=u*4,p=o._malloc(d);a.GetTrianglesUInt32Array(l,d,p);const m=new Uint32Array(o.HEAPF32.buffer,p,u).slice();return o._free(p),{array:m,itemSize:1}}function r(o,a,l,c,u,d){const p=d.num_components(),x=l.num_points()*p,v=x*u.BYTES_PER_ELEMENT,_=s(o,u),g=o._malloc(v);a.GetAttributeDataArrayForAllPoints(l,d,_,v,g);const S=new u(o.HEAPF32.buffer,g,x).slice();return o._free(g),{name:c,array:S,itemSize:p}}function s(o,a){switch(a){case Float32Array:return o.DT_FLOAT32;case Int8Array:return o.DT_INT8;case Int16Array:return o.DT_INT16;case Int32Array:return o.DT_INT32;case Uint8Array:return o.DT_UINT8;case Uint16Array:return o.DT_UINT16;case Uint32Array:return o.DT_UINT32}}}const T3=new jn,yx=new H;class Kw extends Nw{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";const e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],t=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],n=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(n),this.setAttribute("position",new ct(e,3)),this.setAttribute("uv",new ct(t,2))}applyMatrix4(e){const t=this.attributes.instanceStart,n=this.attributes.instanceEnd;return t!==void 0&&(t.applyMatrix4(e),n.applyMatrix4(e),t.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const n=new Ey(t,6,1);return this.setAttribute("instanceStart",new Xr(n,3,0)),this.setAttribute("instanceEnd",new Xr(n,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e,t=3){let n;e instanceof Float32Array?n=e:Array.isArray(e)&&(n=new Float32Array(e));const r=new Ey(n,t*2,1);return this.setAttribute("instanceColorStart",new Xr(r,t,0)),this.setAttribute("instanceColorEnd",new Xr(r,t,t)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new ww(e.geometry)),this}fromLineSegments(e){const t=e.geometry;return this.setPositions(t.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new jn);const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;e!==void 0&&t!==void 0&&(this.boundingBox.setFromBufferAttribute(e),T3.setFromBufferAttribute(t),this.boundingBox.union(T3))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new mi),this.boundingBox===null&&this.computeBoundingBox();const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;if(e!==void 0&&t!==void 0){const n=this.boundingSphere.center;this.boundingBox.getCenter(n);let r=0;for(let s=0,o=e.count;s<o;s++)yx.fromBufferAttribute(e,s),r=Math.max(r,n.distanceToSquared(yx)),yx.fromBufferAttribute(t,s),r=Math.max(r,n.distanceToSquared(yx));this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}toJSON(){}applyMatrix(e){return console.warn("THREE.LineSegmentsGeometry: applyMatrix() has been renamed to applyMatrix4()."),this.applyMatrix4(e)}}class UF extends Kw{constructor(){super(),this.isLineGeometry=!0,this.type="LineGeometry"}setPositions(e){const t=e.length-3,n=new Float32Array(2*t);for(let r=0;r<t;r+=3)n[2*r]=e[r],n[2*r+1]=e[r+1],n[2*r+2]=e[r+2],n[2*r+3]=e[r+3],n[2*r+4]=e[r+4],n[2*r+5]=e[r+5];return super.setPositions(n),this}setColors(e,t=3){const n=e.length-t,r=new Float32Array(2*n);if(t===3)for(let s=0;s<n;s+=t)r[2*s]=e[s],r[2*s+1]=e[s+1],r[2*s+2]=e[s+2],r[2*s+3]=e[s+3],r[2*s+4]=e[s+4],r[2*s+5]=e[s+5];else for(let s=0;s<n;s+=t)r[2*s]=e[s],r[2*s+1]=e[s+1],r[2*s+2]=e[s+2],r[2*s+3]=e[s+3],r[2*s+4]=e[s+4],r[2*s+5]=e[s+5],r[2*s+6]=e[s+6],r[2*s+7]=e[s+7];return super.setColors(r,t),this}fromLine(e){const t=e.geometry;return this.setPositions(t.attributes.position.array),this}}class qw extends dn{constructor(e){super({type:"LineMaterial",uniforms:Gs.clone(Gs.merge([ot.common,ot.fog,{worldUnits:{value:1},linewidth:{value:1},resolution:{value:new xe(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}}])),vertexShader:` 4176 #include <common> 4177 #include <fog_pars_vertex> 4178 #include <logdepthbuf_pars_vertex> 4179 #include <clipping_planes_pars_vertex> 4180 4181 uniform float linewidth; 4182 uniform vec2 resolution; 4183 4184 attribute vec3 instanceStart; 4185 attribute vec3 instanceEnd; 4186 4187 #ifdef USE_COLOR 4188 #ifdef USE_LINE_COLOR_ALPHA 4189 varying vec4 vLineColor; 4190 attribute vec4 instanceColorStart; 4191 attribute vec4 instanceColorEnd; 4192 #else 4193 varying vec3 vLineColor; 4194 attribute vec3 instanceColorStart; 4195 attribute vec3 instanceColorEnd; 4196 #endif 4197 #endif 4198 4199 #ifdef WORLD_UNITS 4200 4201 varying vec4 worldPos; 4202 varying vec3 worldStart; 4203 varying vec3 worldEnd; 4204 4205 #ifdef USE_DASH 4206 4207 varying vec2 vUv; 4208 4209 #endif 4210 4211 #else 4212 4213 varying vec2 vUv; 4214 4215 #endif 4216 4217 #ifdef USE_DASH 4218 4219 uniform float dashScale; 4220 attribute float instanceDistanceStart; 4221 attribute float instanceDistanceEnd; 4222 varying float vLineDistance; 4223 4224 #endif 4225 4226 void trimSegment( const in vec4 start, inout vec4 end ) { 4227 4228 // trim end segment so it terminates between the camera plane and the near plane 4229 4230 // conservative estimate of the near plane 4231 float a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column 4232 float b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column 4233 float nearEstimate = - 0.5 * b / a; 4234 4235 float alpha = ( nearEstimate - start.z ) / ( end.z - start.z ); 4236 4237 end.xyz = mix( start.xyz, end.xyz, alpha ); 4238 4239 } 4240 4241 void main() { 4242 4243 #ifdef USE_COLOR 4244 4245 vLineColor = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd; 4246 4247 #endif 4248 4249 #ifdef USE_DASH 4250 4251 vLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd; 4252 vUv = uv; 4253 4254 #endif 4255 4256 float aspect = resolution.x / resolution.y; 4257 4258 // camera space 4259 vec4 start = modelViewMatrix * vec4( instanceStart, 1.0 ); 4260 vec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 ); 4261 4262 #ifdef WORLD_UNITS 4263 4264 worldStart = start.xyz; 4265 worldEnd = end.xyz; 4266 4267 #else 4268 4269 vUv = uv; 4270 4271 #endif 4272 4273 // special case for perspective projection, and segments that terminate either in, or behind, the camera plane 4274 // clearly the gpu firmware has a way of addressing this issue when projecting into ndc space 4275 // but we need to perform ndc-space calculations in the shader, so we must address this issue directly 4276 // perhaps there is a more elegant solution -- WestLangley 4277 4278 bool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column 4279 4280 if ( perspective ) { 4281 4282 if ( start.z < 0.0 && end.z >= 0.0 ) { 4283 4284 trimSegment( start, end ); 4285 4286 } else if ( end.z < 0.0 && start.z >= 0.0 ) { 4287 4288 trimSegment( end, start ); 4289 4290 } 4291 4292 } 4293 4294 // clip space 4295 vec4 clipStart = projectionMatrix * start; 4296 vec4 clipEnd = projectionMatrix * end; 4297 4298 // ndc space 4299 vec3 ndcStart = clipStart.xyz / clipStart.w; 4300 vec3 ndcEnd = clipEnd.xyz / clipEnd.w; 4301 4302 // direction 4303 vec2 dir = ndcEnd.xy - ndcStart.xy; 4304 4305 // account for clip-space aspect ratio 4306 dir.x *= aspect; 4307 dir = normalize( dir ); 4308 4309 #ifdef WORLD_UNITS 4310 4311 // get the offset direction as perpendicular to the view vector
4312 vec3 worldDir = normalize( end.xyz - start.xyz ); 4313 vec3 offset; 4314 if ( position.y < 0.5 ) { 4315 4316 offset = normalize( cross( start.xyz, worldDir ) ); 4317 4318 } else { 4319 4320 offset = normalize( cross( end.xyz, worldDir ) ); 4321 4322 } 4323 4324 // sign flip 4325 if ( position.x < 0.0 ) offset *= - 1.0; 4326 4327 float forwardOffset = dot( worldDir, vec3( 0.0, 0.0, 1.0 ) ); 4328 4329 // don't extend the line if we're rendering dashes because we 4330 // won't be rendering the endcaps 4331 #ifndef USE_DASH 4332 4333 // extend the line bounds to encompass endcaps 4334 start.xyz += - worldDir * linewidth * 0.5; 4335 end.xyz += worldDir * linewidth * 0.5; 4336 4337 // shift the position of the quad so it hugs the forward edge of the line 4338 offset.xy -= dir * forwardOffset; 4339 offset.z += 0.5; 4340 4341 #endif 4342 4343 // endcaps 4344 if ( position.y > 1.0 || position.y < 0.0 ) { 4345 4346 offset.xy += dir * 2.0 * forwardOffset; 4347 4348 } 4349 4350 // adjust for linewidth 4351 offset *= linewidth * 0.5; 4352 4353 // set the world position 4354 worldPos = ( position.y < 0.5 ) ? start : end; 4355 worldPos.xyz += offset; 4356 4357 // project the worldpos 4358 vec4 clip = projectionMatrix * worldPos; 4359 4360 // shift the depth of the projected points so the line 4361 // segments overlap neatly 4362 vec3 clipPose = ( position.y < 0.5 ) ? ndcStart : ndcEnd; 4363 clip.z = clipPose.z * clip.w; 4364 4365 #else 4366 4367 vec2 offset = vec2( dir.y, - dir.x ); 4368 // undo aspect ratio adjustment 4369 dir.x /= aspect; 4370 offset.x /= aspect; 4371 4372 // sign flip 4373 if ( position.x < 0.0 ) offset *= - 1.0; 4374 4375 // endcaps 4376 if ( position.y < 0.0 ) { 4377 4378 offset += - dir; 4379 4380 } else if ( position.y > 1.0 ) { 4381 4382 offset += dir; 4383 4384 } 4385 4386 // adjust for linewidth 4387 offset *= linewidth; 4388 4389 // adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ... 4390 offset /= resolution.y; 4391 4392 // select end 4393 vec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd; 4394 4395 // back to clip space 4396 offset *= clip.w; 4397 4398 clip.xy += offset; 4399 4400 #endif 4401 4402 gl_Position = clip; 4403 4404 vec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation 4405 4406 #include <logdepthbuf_vertex> 4407 #include <clipping_planes_vertex> 4408 #include <fog_vertex> 4409 4410 } 4411 `,fragmentShader:` 4412 uniform vec3 diffuse; 4413 uniform float opacity; 4414 uniform float linewidth; 4415 4416 #ifdef USE_DASH 4417 4418 uniform float dashOffset; 4419 uniform float dashSize; 4420 uniform float gapSize; 4421 4422 #endif 4423 4424 varying float vLineDistance; 4425 4426 #ifdef WORLD_UNITS 4427 4428 varying vec4 worldPos; 4429 varying vec3 worldStart; 4430 varying vec3 worldEnd; 4431 4432 #ifdef USE_DASH 4433 4434 varying vec2 vUv; 4435 4436 #endif 4437 4438 #else 4439 4440 varying vec2 vUv; 4441 4442 #endif 4443 4444 #include <common> 4445 #include <fog_pars_fragment> 4446 #include <logdepthbuf_pars_fragment> 4447 #include <clipping_planes_pars_fragment> 4448 4449 #ifdef USE_COLOR 4450 #ifdef USE_LINE_COLOR_ALPHA 4451 varying vec4 vLineColor; 4452 #else 4453 varying vec3 vLineColor; 4454 #endif 4455 #endif 4456 4457 vec2 closestLineToLine(vec3 p1, vec3 p2, vec3 p3, vec3 p4) { 4458 4459 float mua; 4460 float mub; 4461 4462 vec3 p13 = p1 - p3; 4463 vec3 p43 = p4 - p3; 4464 4465 vec3 p21 = p2 - p1; 4466 4467 float d1343 = dot( p13, p43 ); 4468 float d4321 = dot( p43, p21 );
4469 float d1321 = dot( p13, p21 ); 4470 float d4343 = dot( p43, p43 ); 4471 float d2121 = dot( p21, p21 ); 4472 4473 float denom = d2121 * d4343 - d4321 * d4321; 4474 4475 float numer = d1343 * d4321 - d1321 * d4343; 4476 4477 mua = numer / denom; 4478 mua = clamp( mua, 0.0, 1.0 ); 4479 mub = ( d1343 + d4321 * ( mua ) ) / d4343; 4480 mub = clamp( mub, 0.0, 1.0 ); 4481 4482 return vec2( mua, mub ); 4483 4484 } 4485 4486 void main() { 4487 4488 #include <clipping_planes_fragment> 4489 4490 #ifdef USE_DASH 4491 4492 if ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps 4493 4494 if ( mod( vLineDistance + dashOffset, dashSize + gapSize ) > dashSize ) discard; // todo - FIX 4495 4496 #endif 4497 4498 float alpha = opacity; 4499 4500 #ifdef WORLD_UNITS 4501 4502 // Find the closest points on the view ray and the line segment 4503 vec3 rayEnd = normalize( worldPos.xyz ) * 1e5; 4504 vec3 lineDir = worldEnd - worldStart; 4505 vec2 params = closestLineToLine( worldStart, worldEnd, vec3( 0.0, 0.0, 0.0 ), rayEnd ); 4506 4507 vec3 p1 = worldStart + lineDir * params.x; 4508 vec3 p2 = rayEnd * params.y; 4509 vec3 delta = p1 - p2; 4510 float len = length( delta ); 4511 float norm = len / linewidth; 4512 4513 #ifndef USE_DASH 4514 4515 #ifdef USE_ALPHA_TO_COVERAGE 4516 4517 float dnorm = fwidth( norm ); 4518 alpha = 1.0 - smoothstep( 0.5 - dnorm, 0.5 + dnorm, norm ); 4519 4520 #else 4521 4522 if ( norm > 0.5 ) { 4523 4524 discard; 4525 4526 } 4527 4528 #endif 4529 4530 #endif 4531 4532 #else 4533 4534 #ifdef USE_ALPHA_TO_COVERAGE 4535 4536 // artifacts appear on some hardware if a derivative is taken within a conditional 4537 float a = vUv.x; 4538 float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0; 4539 float len2 = a * a + b * b; 4540 float dlen = fwidth( len2 ); 4541 4542 if ( abs( vUv.y ) > 1.0 ) { 4543 4544 alpha = 1.0 - smoothstep( 1.0 - dlen, 1.0 + dlen, len2 ); 4545 4546 } 4547 4548 #else 4549 4550 if ( abs( vUv.y ) > 1.0 ) { 4551 4552 float a = vUv.x; 4553 float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0; 4554 float len2 = a * a + b * b; 4555 4556 if ( len2 > 1.0 ) discard; 4557 4558 } 4559 4560 #endif 4561 4562 #endif 4563 4564 vec4 diffuseColor = vec4( diffuse, alpha ); 4565 #ifdef USE_COLOR 4566 #ifdef USE_LINE_COLOR_ALPHA 4567 diffuseColor *= vLineColor; 4568 #else 4569 diffuseColor.rgb *= vLineColor; 4570 #endif 4571 #endif 4572 4573 #include <logdepthbuf_fragment> 4574 4575 gl_FragColor = diffuseColor; 4576 4577 #include <tonemapping_fragment> 4578 #include <${Yw>=154?"colorspace_fragment":"encodings_fragment"}> 4579 #include <fog_fragment> 4580 #include <premultiplied_alpha_fragment> 4581 4582 } 4583 `,clipping:!0}),this.isLineMaterial=!0,this.onBeforeCompile=function(){this.transparent?this.defines.USE_LINE_COLOR_ALPHA="1":delete this.defines.USE_LINE_COLOR_ALPHA},Object.defineProperties(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(t){this.uniforms.diffuse.value=t}},worldUnits:{enumerable:!0,get:function(){return"WORLD_UNITS"in this.defines},set:function(t){t===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(t){this.uniforms.linewidth.value=t}},dashed:{enumerable:!0,get:function(){return"USE_DASH"in this.defines},set(t){!!t!="USE_DASH"in this.defines&&(this.needsUpdate=!0),t===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(t){this.uniforms.dashScale.value=t}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(t){this.uniforms.dashSize.value=t}},dashOffset:{enumerable:!0,get:function(){return this.uniforms.dashOffset.value},set:function(t){this.uniforms.dashOffset.value=t}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(t){this.uniforms.gapSize.value=t}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(t){this.uniforms.opacity.value=t}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(t){this.uniforms.resolution.value.copy(t)}}
4583,alphaToCoverage:{enumerable:!0,get:function(){return"USE_ALPHA_TO_COVERAGE"in this.defines},set:function(t){!!t!="USE_ALPHA_TO_COVERAGE"in this.defines&&(this.needsUpdate=!0),t===!0?(this.defines.USE_ALPHA_TO_COVERAGE="",this.extensions.derivatives=!0):(delete this.defines.USE_ALPHA_TO_COVERAGE,this.extensions.derivatives=!1)}}}),this.setValues(e)}}const BS=new on,E3=new H,C3=new H,Zi=new on,Qi=new on,ra=new on,DS=new H,FS=new _t,er=new tF,R3=new H,_x=new jn,Sx=new mi,sa=new on;let fa,Fu;function P3(i,e,t){return sa.set(0,0,-e,1).applyMatrix4(i.projectionMatrix),sa.multiplyScalar(1/sa.w),sa.x=Fu/t.width,sa.y=Fu/t.height,sa.applyMatrix4(i.projectionMatrixInverse),sa.multiplyScalar(1/sa.w),Math.abs(Math.max(sa.x,sa.y))}function NX(i,e){const t=i.matrixWorld,n=i.geometry,r=n.attributes.instanceStart,s=n.attributes.instanceEnd,o=Math.min(n.instanceCount,r.count);for(let a=0,l=o;a<l;a++){er.start.fromBufferAttribute(r,a),er.end.fromBufferAttribute(s,a),er.applyMatrix4(t);const c=new H,u=new H;fa.distanceSqToSegment(er.start,er.end,u,c),u.distanceTo(c)<Fu*.5&&e.push({point:u,pointOnLine:c,distance:fa.origin.distanceTo(u),object:i,face:null,faceIndex:a,uv:null,[FF]:null})}}function kX(i,e,t){const n=e.projectionMatrix,s=i.material.resolution,o=i.matrixWorld,a=i.geometry,l=a.attributes.instanceStart,c=a.attributes.instanceEnd,u=Math.min(a.instanceCount,l.count),d=-e.near;fa.at(1,ra),ra.w=1,ra.applyMatrix4(e.matrixWorldInverse),ra.applyMatrix4(n),ra.multiplyScalar(1/ra.w),ra.x*=s.x/2,ra.y*=s.y/2,ra.z=0,DS.copy(ra),FS.multiplyMatrices(e.matrixWorldInverse,o);for(let p=0,m=u;p<m;p++){if(Zi.fromBufferAttribute(l,p),Qi.fromBufferAttribute(c,p),Zi.w=1,Qi.w=1,Zi.applyMatrix4(FS),Qi.applyMatrix4(FS),Zi.z>d&&Qi.z>d)continue;if(Zi.z>d){const b=Zi.z-Qi.z,A=(Zi.z-d)/b;Zi.lerp(Qi,A)}else if(Qi.z>d){const b=Qi.z-Zi.z,A=(Qi.z-d)/b;Qi.lerp(Zi,A)}Zi.applyMatrix4(n),Qi.applyMatrix4(n),Zi.multiplyScalar(1/Zi.w),Qi.multiplyScalar(1/Qi.w),Zi.x*=s.x/2,Zi.y*=s.y/2,Qi.x*=s.x/2,Qi.y*=s.y/2,er.start.copy(Zi),er.start.z=0,er.end.copy(Qi),er.end.z=0;const v=er.closestPointToPointParameter(DS,!0);er.at(v,R3);const _=Xn.lerp(Zi.z,Qi.z,v),g=_>=-1&&_<=1,S=DS.distanceTo(R3)<Fu*.5;if(g&&S){er.start.fromBufferAttribute(l,p),er.end.fromBufferAttribute(c,p),er.start.applyMatrix4(o),er.end.applyMatrix4(o);const b=new H,A=new H;fa.distanceSqToSegment(er.start,er.end,A,b),t.push({point:A,pointOnLine:b,distance:fa.origin.distanceTo(A),object:i,face:null,faceIndex:p,uv:null,[FF]:null})}}}class zF extends Kt{constructor(e=new Kw,t=new qw({color:Math.random()*16777215})){super(e,t),this.isLineSegments2=!0,this.type="LineSegments2"}computeLineDistances(){const e=this.geometry,t=e.attributes.instanceStart,n=e.attributes.instanceEnd,r=new Float32Array(2*t.count);for(let o=0,a=0,l=t.count;o<l;o++,a+=2)E3.fromBufferAttribute(t,o),C3.fromBufferAttribute(n,o),r[a]=a===0?0:r[a-1],r[a+1]=r[a]+E3.distanceTo(C3);const s=new Ey(r,2,1);return e.setAttribute("instanceDistanceStart",new Xr(s,1,0)),e.setAttribute("instanceDistanceEnd",new Xr(s,1,1)),this}raycast(e,t){const n=this.material.worldUnits,r=e.camera;r===null&&!n&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.');const s=e.params.Line2!==void 0&&e.params.Line2.threshold||0;fa=e.ray;const o=this.matrixWorld,a=this.geometry,l=this.material;Fu=l.linewidth+s,a.boundingSphere===null&&a.computeBoundingSphere(),Sx.copy(a.boundingSphere).applyMatrix4(o);let c;if(n)c=Fu*.5;else{const d=Math.max(r.near,Sx.distanceToPoint(fa.origin));c=P3(r,d,l.resolution)}if(Sx.radius+=c,fa.intersectsSphere(Sx)===!1)return;a.boundingBox===null&&a.computeBoundingBox(),_x.copy(a.boundingBox).applyMatrix4(o);let u;if(n)u=Fu*.5;else{const d=Math.max(r.near,_x.distanceToPoint(fa.origin));u=P3(r,d,l.resolution)}_x.expandByScalar(u),fa.intersectsBox(_x)!==!1&&(n?NX(this,t):kX(this,r,t))}onBeforeRender(e){const t=this.material.uniforms;t&&t.resolution&&(e.getViewport(BS),this.material.uniforms.resolution.value.set(BS.z,BS.w))}}class OX extends zF{constructor(e=new UF,t=new qw({color:Math.random()*16777215})){super(e,t),this.isLine2=!0,this.type="Line2"}}let bx;const NS=()=>
4583{if(bx)return bx;const i="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE6HYy86BBAKCFJAICIJAYJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCGJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCEJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCIJAYAmJHY2BBAI2BFHmCKrHPAPCE6HPy86BBAKCLJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCKJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCOJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCNJAYAmJHY2BBAI2BGHmCKrHPAPCE6HPy86BBAKCVJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCcJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCMJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCSJAYAmJHm2BBAI2BEHICKrHYAYCE6HYy86BBAKCQJAmAYJHm2BBAICIrCEZHYAYCE6HYy86BBAKCfJAmAYJHm2BBAICGrCEZHYAYCE6HYy86BBAKCbJAmAYJHK2BBAICEZHIAICE6HIy86BBAKAIJRISGMAKAI2BNAI2BBHmCIrHYAYCb6HYy86BBAKCFJAICNJAYJHY2BBAmCbZHmAmCb6Hmy86BBAKCGJAYAmJHm2BBAI2BFHYCIrHPAPCb6HPy86BBAKCEJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCIJAmAYJHm2BBAI2BGHYCIrHPAPCb6HPy86BBAKCLJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCKJAmAYJHm2BBAI2BEHYCIrHPAPCb6HPy86BBAKCOJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCNJAmAYJHm2BBAI2BIHYCIrHPAPCb6HPy86BBAKCVJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCcJAmAYJHm2BBAI2BLHYCIrHPAPCb6HPy86BBAKCMJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCSJAmAYJHm2BBAI2BKHYCIrHPAPCb6HPy86BBAKCQJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCfJAmAYJHm2BBAI2BOHICIrHYAYCb6HYy86BBAKCbJAmAYJHK2BBAICbZHIAICb6HIy86BBAKAIJRISFMAKAI8pBB83BBAKCNJAICNJ8pBB83BBAICTJRIMAtCGJRtAECTJHEAS9JQBMMGXAIQBCBRISEMGXAM9FQBANAbJ2BBRtCBRKAfREEXAEANCU/CBJAKJ2BBHTCFrCBATCFZl9zAtJHt86BBAEAGJREAKCFJHKAM9HQBMMAfCFJRfAIRTAbCFJHbAG9HQBMMABAcAG9sJANCUGJAMAG9sTkUUUBpANANCUGJAMCaJAG9sJAGTkUUUBpMAMCBAIyAcJRcAIQBMC9+RKSFMCBC99AOAIlAGCAAGCA9Ly6yRKMALCU/EBJ8kUUUUBAKM+OmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUFT+JUUUBpALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIA
4583LAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM+lLKFaF99GaG99FaG99GXGXAGCI9HQBAF9FQFEXGXGX9DBBB8/9DBBB+/ABCGJHG1BB+yAB1BBHE+yHI+L+TABCFJHL1BBHK+yHO+L+THN9DBBBB9gHVyAN9DBB/+hANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE86BBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG86BBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG86BBABCIJRBAFCaJHFQBSGMMAF9FQBEXGXGX9DBBB8/9DBBB+/ABCIJHG8uFB+yAB8uFBHE+yHI+L+TABCGJHL8uFBHK+yHO+L+THN9DBBBB9gHVyAN9DB/+g6ANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE87FBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG87FBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG87FBABCNJRBAFCaJHFQBMMM/SEIEaE99EaF99GXAF9FQBCBREABRIEXGXGX9D/zI818/AICKJ8uFBHLCEq+y+VHKAI8uFB+y+UHO9DB/+g6+U9DBBB8/9DBBB+/AO9DBBBB9gy+SHN+L9DBBB9P9d9FQBAN+oRVSFMCUUUU94RVMAICIJ8uFBRcAICGJ8uFBRMABALCFJCEZAEqCFWJAV87FBGXGXAKAM+y+UHN9DB/+g6+U9DBBB8/9DBBB+/AN9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRMSFMCUUUU94RMMABALCGJCEZAEqCFWJAM87FBGXGXAKAc+y+UHK9DB/+g6+U9DBBB8/9DBBB+/AK9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRcSFMCUUUU94RcMABALCaJCEZAEqCFWJAc87FBGXGX9DBBU8/AOAO+U+TANAN+U+TAKAK+U+THO9DBBBBAO9DBBBB9gy+R9DB/+g6+U9DBBB8/+SHO+L9DBBB9P9d9FQBAO+oRcSFMCUUUU94RcMABALCEZAEqCFWJAc87FBAICNJRIAECIJREAFCaJHFQBMMM9JBGXAGCGrAF9sHF9FQBEXABAB8oGBHGCNWCN91+yAGCi91CnWCUUU/8EJ+++U84GBABCIJRBAFCaJHFQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEM/lFFFaGXGXAFABqCEZ9FQBABRESFMGXGXAGCT9PQBABRESFMABREEXAEAF8oGBjGBAECIJAFCIJ8oGBjGBAECNJAFCNJ8oGBjGBAECSJAFCSJ8oGBjGBAECTJREAFCTJRFAGC9wJHGCb9LQBMMAGCI9JQBEXAEAF8oGBjGBAFCIJRFAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF2BB86BBAECFJREAFCFJRFAGCaJHGQBMMABMoFFGaGXGXABCEZ9FQBABRESFMAFCgFZC+BwsN9sRIGXGXAGCT9PQBABRESFMABREEXAEAIjGBAECSJAIjGBAECNJAIjGBAECIJAIjGBAECTJREAGC9wJHGCb9LQBMMAGCI9JQBEXAEAIjGBAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF86BBAECFJREAGCaJHGQBMMABMMMFBCUNMIT9kBB",e="B9h9z9tFBBBFiI9gBB9gLaaaaaFa9gEaaaB9gFaFaEMcBBFBFFGGGEILF9wFFFLEFBFKNFaFCx/aFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBG8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBIy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBKi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBOn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBNI9z9iqlBVc+N9IcIBTEM9+FLa8jUUUUBCTlRBCBRFEXCBRGCBREEXABCNJAGJAECUaAFAGrCFZHIy86BBAEAIJREAGCFJHGCN9HQBMAFCx+YUUBJAE86BBAFCEWCxkUUBJAB8pEN83EBAFCFJHFCUG9HQBMMk8lLbaE97F9+FaL978jUUUUBCU/KBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAG/8cBBCUoBAG9uC/wgBZHKCUGAKCUG9JyRNAECFJRKCBRVGXEXAVAF9PQFANAFAVlAVANJAF9JyRcGXGXAG9FQBAcCbJHIC9wZHMCE9sRSAMCFWRQAICIrCEJCGrRfCBRbEXAKRTCBRtGXEXGXAOATlAf9PQBCBRKSLMALCU/CBJAtAM9sJRmATAfJRKCBREGXAMCoB9JQBAOAKlC/gB9JQBCBRIEXAmAIJREGXGXGXGXGXATAICKrJ2BBHYCEZfIBFGEBMAECBDtDMIBSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIBAKCTJRKMGXGXGXGXGXAYCGrCEZfIBFGEBMAECBDtDMITSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMITAKCTJRKMGXGXGXGXGXAYCIrCEZfIBFGEBMAECBDtDMIASEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIAAKCTJRKMGXGXGXGXGXAYCKrfIBFGEBMAECBDtDMI8wSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCIJAeDeBJAYCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCNJAeDeBJAYCx+YUUBJ2BBJRKSFMAEAKDBBBDMI8wAKCTJRKMAICoBJREAICUFJAM9LQFAERIAOAKlC/fB9LQBMMGXAEAM9PQBAECErRIEXGXAOAKlCi9PQBCBRKSOMAmAEJRYGXGXGXGXGXATAECKrJ2BBAICKZrCEZfIBFGEBMAYCBDtDMIBSEMAYAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAYAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAYAKDBBBDMIBAKCTJRKMAICGJRIAECTJHEAM9JQBMMG
4583XAK9FQBAKRTAtCFJHtCI6QGSFMMCBRKSEMGXAM9FQBALCUGJAbJREALAbJDBGBReCBRYEXAEALCU/CBJAYJHIDBIBHdCFD9tAdCFDbHPD9OD9hD9RHdAIAMJDBIBH8ZCFD9tA8ZAPD9OD9hD9RH8ZDQBTFtGmEYIPLdKeOnHpAIAQJDBIBHyCFD9tAyAPD9OD9hD9RHyAIASJDBIBH8cCFD9tA8cAPD9OD9hD9RH8cDQBTFtGmEYIPLdKeOnH8dDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGEAeD9uHeDyBjGBAEAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeApA8dDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNiV8ZcpMyS8cQ8df8eb8fHdAyA8cDQNiV8ZcpMyS8cQ8df8eb8fH8ZDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJREAYCTJHYAM9JQBMMAbCIJHbAG9JQBMMABAVAG9sJALCUGJAcAG9s/8cBBALALCUGJAcCaJAG9sJAG/8cBBMAcCBAKyAVJRVAKQBMC9+RKSFMCBC99AOAKlAGCAAGCA9Ly6yRKMALCU/KBJ8kUUUUBAKMNBT+BUUUBM+KmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUF/8MBALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM/dLEK97FaF97GXGXAGCI9HQBAF9FQFCBRGEXABABDBBBHECiD+rFCiD+sFD/6FHIAECND+rFCiD+sFD/6FAID/gFAECTD+rFCiD+sFD/6FHLD/gFD/kFD/lFHKCBDtD+2FHOAICUUUU94DtHND9OD9RD/kFHI9DBB/+hDYAIAID/mFAKAKD/mFALAOALAND9OD9RD/kFHIAID/mFD/kFD/kFD/jFD/nFHLD/mF9DBBX9LDYHOD/kFCgFDtD9OAECUUU94DtD9OD9QAIALD/mFAOD/kFCND+rFCU/+EDtD9OD9QAKALD/mFAOD/kFCTD+rFCUU/8ODtD9OD9QDMBBABCTJRBAGCIJHGAF9JQBSGMMAF9FQBCBRGEXABCTJHVAVDBBBHECBDtHOCUU98D8cFCUU98D8cEHND9OABDBBBHKAEDQILKOSQfbPden8c8d8e8fCggFDtD9OD/6FAKAEDQBFGENVcMTtmYi8ZpyHECTD+sFD/6FHID/gFAECTD+rFCTD+sFD/6FHLD/gFD/kFD/lFHE9DB/+g6DYALAEAOD+2FHOALCUUUU94DtHcD9OD9RD/kFHLALD/mFAEAED/mFAIAOAIAcD9OD9RD/kFHEAED/mFD/kFD/kFD/jFD/nFHID/mF9DBBX9LDYHOD/kFCTD+rFALAID/mFAOD/kFCggEDtD9OD9QHLAEAID/mFAOD/kFCaDbCBDnGCBDnECBDnKCBDnOCBDncCBDnMCBDnfCBDnbD9OHEDQNVi8ZcMpySQ8c8dfb8e8fD9QDMBBABAKAND9OALAEDQBFTtGEmYILPdKOenD9QDMBBABCAJRBAGCIJHGAF9JQBMMM/hEIGaF97FaL978jUUUUBCTlREGXAF9FQBCBRIEXAEABDBBBHLABCTJHKDBBBHODQILKOSQfbPden8c8d8e8fHNCTD+sFHVCID+rFDMIBAB9DBBU8/DY9D/zI818/DYAVCEDtD9QD/6FD/nFHVALAODQBFGENVcMTtmYi8ZpyHLCTD+rFCTD+sFD/6FD/mFHOAOD/mFAVALCTD+sFD/6FD/mFHcAcD/mFAVANCTD+rFCTD+sFD/6FD/mFHNAND/mFD/kFD/kFD/lFCBDtD+4FD/jF9DB/+g6DYHVD/mF9DBBX9LDYHLD/kFCggEDtHMD9OAcAVD/mFALD/kFCTD+rFD9QHcANAVD/mFALD/kFCTD+rFAOAVD/mFALD/kFAMD9OD9QHVDQBFTtGEmYILPdKOenHLD8dBAEDBIBDyB+t+J83EBABCNJALD8dFAEDBIBDyF+t+J83EBAKAcAVDQNVi8ZcMpySQ8c8dfb8e8fHVD8dBAEDBIBDyG+t+J83EBABCiJAVD8dFAEDBIBDyE+t+J83EBABCAJRBAICIJHIAF9JQBMMM9jFF97GXAGCGrAF9sHG9FQBCBRFEXABABDBBBHECND+rFCND+sFD/6FAECiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBABCTJRBAFCIJHFAG9JQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB",t=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),n=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]);if(typeof WebAssembly!="object")return{supported:!1};let r=i;WebAssembly.validate(t)&&(r=e);let s;const o=WebAssembly.instantiate(a(r),{}).then(d=>{s=d.instance,s.exports.__wasm_call_ctors()});function a(d){const p=new Uint8Array(d.length);for(let x=0;x<d.length;
4583++x){const v=d.charCodeAt(x);p[x]=v>96?v-71:v>64?v-65:v>47?v+4:v>46?63:62}let m=0;for(let x=0;x<d.length;++x)p[m++]=p[x]<60?n[p[x]]:(p[x]-60)*64+p[++x];return p.buffer.slice(0,m)}function l(d,p,m,x,v,_){const g=s.exports.sbrk,S=m+3&-4,b=g(S*x),A=g(v.length),w=new Uint8Array(s.exports.memory.buffer);w.set(v,A);const C=d(b,m,x,A,v.length);if(C===0&&_&&_(b,S,x),p.set(w.subarray(b,b+m*x)),g(b-g(0)),C!==0)throw new Error(`Malformed buffer data: ${C}`)}const c={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},u={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return bx={ready:o,supported:!0,decodeVertexBuffer(d,p,m,x,v){l(s.exports.meshopt_decodeVertexBuffer,d,p,m,x,s.exports[c[v]])},decodeIndexBuffer(d,p,m,x){l(s.exports.meshopt_decodeIndexBuffer,d,p,m,x)},decodeIndexSequence(d,p,m,x){l(s.exports.meshopt_decodeIndexSequence,d,p,m,x)},decodeGltfBuffer(d,p,m,x,v,_){l(s.exports[u[v]],d,p,m,x,s.exports[c[_]])}},bx},UX=X.forwardRef(function({points:e,color:t=16777215,vertexColors:n,linewidth:r,lineWidth:s,segments:o,dashed:a,...l},c){var u,d;const p=Bi(g=>g.size),m=X.useMemo(()=>o?new zF:new OX,[o]),[x]=X.useState(()=>new qw),v=(n==null||(u=n[0])==null?void 0:u.length)===4?4:3,_=X.useMemo(()=>{const g=o?new Kw:new UF,S=e.map(b=>{const A=Array.isArray(b);return b instanceof H||b instanceof on?[b.x,b.y,b.z]:b instanceof xe?[b.x,b.y,0]:A&&b.length===3?[b[0],b[1],b[2]]:A&&b.length===2?[b[0],b[1],0]:b});if(g.setPositions(S.flat()),n){t=16777215;const b=n.map(A=>A instanceof Ve?A.toArray():A);g.setColors(b.flat(),v)}return g},[e,o,n,v]);return X.useLayoutEffect(()=>{m.computeLineDistances()},[e,m]),X.useLayoutEffect(()=>{a?x.defines.USE_DASH="":delete x.defines.USE_DASH,x.needsUpdate=!0},[a,x]),X.useEffect(()=>()=>{_.dispose(),x.dispose()},[_]),X.createElement("primitive",ih({object:m,ref:c},l),X.createElement("primitive",{object:_,attach:"geometry"}),X.createElement("primitive",ih({object:x,attach:"material",color:t,vertexColors:!!n,resolution:[p.width,p.height],linewidth:(d=r??s)!==null&&d!==void 0?d:1,dashed:a,transparent:v===4},l)))}),kS=i=>i===Object(i)&&!Array.isArray(i)&&typeof i!="function";function Zw(i,e){const t=Bi(s=>s.gl),n=wa(fl,kS(i)?Object.values(i):i);return X.useLayoutEffect(()=>{e==null||e(n)},[e]),X.useEffect(()=>{if("initTexture"in t){let s=[];Array.isArray(n)?s=n:n instanceof Sn?s=[n]:kS(n)&&(s=Object.values(n)),s.forEach(o=>{o instanceof Sn&&t.initTexture(o)})}},[t,n]),X.useMemo(()=>{if(kS(i)){const s={};let o=0;for(const a in i)s[a]=n[o++];return s}else return n},[i,n])}Zw.preload=i=>wa.preload(fl,i);Zw.clear=i=>wa.clear(fl,i);let Mx=null,HF="https://www.gstatic.com/draco/versioned/decoders/1.5.5/";function GF(i=!0,e=!0,t){return n=>{t&&t(n),i&&(Mx||(Mx=new DX),Mx.setDecoderPath(typeof i=="string"?i:HF),n.setDRACOLoader(Mx)),e&&n.setMeshoptDecoder(typeof NS=="function"?NS():NS)}}const hh=(i,e,t,n)=>wa(Jw,i,GF(e,t,n));hh.preload=(i,e,t,n)=>wa.preload(Jw,i,GF(e,t,n));hh.clear=i=>wa.clear(Jw,i);hh.setDecoderPath=i=>{HF=i};const jF=X.forwardRef(({makeDefault:i,camera:e,regress:t,domElement:n,enableDamping:r=!0,keyEvents:s=!1,onChange:o,onStart:a,onEnd:l,...c},u)=>{const d=Bi(C=>C.invalidate),p=Bi(C=>C.camera),m=Bi(C=>C.gl),x=Bi(C=>C.events),v=Bi(C=>C.setEvents),_=Bi(C=>C.set),g=Bi(C=>C.get),S=Bi(C=>C.performance),b=e||p,A=n||x.connected||m.domElement,w=X.useMemo(()=>new Y7(b),[b]);return od(()=>{w.enabled&&w.update()},-1),X.useEffect(()=>(s&&w.connect(s===!0?A:s),w.connect(A),()=>void w.dispose()),[s,A,t,w,d]),X.useEffect(()=>{const C=R=>{d(),t&&S.regress(),o&&o(R)},P=R=>{a&&a(R)},B=R=>{l&&l(R)};return w.addEventListener("change",C),w.addEventListener("start",P),w.addEventListener("end",B),()=>{w.removeEventListener("start",P),w.removeEventListener("end",B),w.removeEventListener("change",C)}},[o,a,l,w,d,v]),X.useEffect(()=>{if(i){const C=g().controls;return _({controls:w}),()=>_({controls:C})}},[i,w]),X.createElement("primitive",ih({ref:u,object:w,enableDamping:r},c))});function zX(i,e){const t=X.useRef(),[n]=X.useState(()=>e?e instanceof Wt?{current:e}:e:t),[r]=X.useState(()=>new $D(void 0));X.useLayoutEffect(()=>{e&&(n.current=e instanceof Wt?e:e.current),r._root=n.current});const s=X.useRef({}),o=X.useMemo(()=>{const a={};
4583return i.forEach(l=>Object.defineProperty(a,l.name,{enumerable:!0,get(){if(n.current)return s.current[l.name]||(s.current[l.name]=r.clipAction(l,n.current))},configurable:!0})),{ref:n,clips:i,actions:a,names:i.map(l=>l.name),mixer:r}},[i]);return od((a,l)=>r.update(l)),X.useEffect(()=>{const a=n.current;return()=>{s.current={},r.stopAllAction(),Object.values(o.actions).forEach(l=>{a&&r.uncacheAction(l,a)})}},[i]),o}hh.preload("/model/brain-testing.glb");const HX={r:.45,g:.45,b:.55};function GX({}){const i=X.useRef(null),e=wa(OF,"/model/Brain_model.obj"),t=X.useRef(null),{positions:n,regions:r}=X.useMemo(()=>{const o=[];e.traverse(A=>{if(A instanceof Kt&&A.geometry){const C=A.geometry.attributes.position;if(C)for(let P=0;P<C.count;P++)o.push(C.getX(P),C.getY(P),C.getZ(P))}});const a=1,l=Math.floor(o.length/3/a),c=new Float32Array(l*3),u=[];let d=1/0,p=-1/0,m=1/0,x=-1/0;for(let A=0;A<o.length;A+=3)d=Math.min(d,o[A+1]),p=Math.max(p,o[A+1]),m=Math.min(m,o[A+2]),x=Math.max(x,o[A+2]);const v=p-d,_=x-m,g=(d+p)/2,S=(m+x)/2,b=(A,w,C)=>{const P=(w-g)/(v/2),B=(C-S)/(_/2);return B>.2?"logic":B<-.2?P<0?"longTermMemory":"language":P>.1?"shortTermMemory":"emotion"};for(let A=0;A<l;A++){const w=A*a*3,C=o[w],P=o[w+1],B=o[w+2];c[A*3]=C,c[A*3+1]=P,c[A*3+2]=B,u.push(b(C,P,B))}return t.current=new Float32Array(l*3),{positions:c,regions:u}},[e]),s=X.useMemo(()=>R7(),[]);return od(()=>{if(!i.current||!t.current)return;const o=t.current;for(let c=0;c<r.length;c++){const u=HX;o[c*3]=u.r,o[c*3+1]=u.g,o[c*3+2]=u.b}const l=i.current.geometry.attributes.color;l&&(l.needsUpdate=!0)}),y.jsxs("points",{ref:i,scale:1,position:[0,0,0],children:[y.jsxs("bufferGeometry",{children:[y.jsx("bufferAttribute",{attach:"attributes-position",count:n.length/3,array:n,itemSize:3}),y.jsx("bufferAttribute",{attach:"attributes-color",count:r.length,array:t.current,itemSize:3})]}),y.jsx("pointsMaterial",{size:.014,vertexColors:!0,transparent:!0,opacity:.85,sizeAttenuation:!0,map:s,alphaMap:s,depthWrite:!1,blending:_a})]})}function jX({onRegionChange:i}){const e=wa(OF,"/model/Brain_model.obj"),t=X.useRef(null),n=X.useMemo(()=>{let l=1/0,c=-1/0,u=1/0,d=-1/0,p=1/0,m=-1/0;return e.traverse(x=>{if(x instanceof Kt&&x.geometry){const v=x.geometry.attributes.position;if(v)for(let _=0;_<v.count;_++){const g=v.getX(_),S=v.getY(_),b=v.getZ(_);l=Math.min(l,g),c=Math.max(c,g),u=Math.min(u,S),d=Math.max(d,S),p=Math.min(p,b),m=Math.max(m,b)}}}),{rangeX:c-l,rangeY:d-u,rangeZ:m-p,centerX:(l+c)/2,centerY:(u+d)/2,centerZ:(p+m)/2}},[e]),r=l=>{const{rangeX:c,rangeY:u,rangeZ:d,centerX:p,centerY:m,centerZ:x}=n;(l.x-p)/(c/2);const v=(l.y-m)/(u/2),_=(l.z-x)/(d/2);return _>.2?"logic":_<-.2?v<0?"longTermMemory":"language":v>.1?"shortTermMemory":"emotion"},s=l=>{if(l.point&&t.current){const c=t.current.worldToLocal(l.point.clone()),u=r(c);i(u)}},o=()=>{i(null)},a=X.useMemo(()=>{const l=e.clone();return l.traverse(c=>{c instanceof Kt&&(c.material=new pi({transparent:!0,opacity:0,side:Di}))}),l},[e]);return y.jsx("primitive",{ref:t,object:a,scale:1,position:[0,0,0],onPointerMove:l=>{var c;(c=l.stopPropagation)==null||c.call(l),l.intersections&&l.intersections.length>0&&s(l.intersections[0])},onPointerLeave:o})}const OS=new H(0,.57,0),Do=.55;function US(i,e,t){const n=i*Math.PI/180,r=e*Math.PI/180;return new H(t*Math.sin(r)*Math.sin(n)+OS.x,t*Math.cos(r)+OS.y,t*Math.sin(r)*Math.cos(n)+OS.z)}const WX=[{region:{zh:"大èç®å±",en:"CORTEX"},feature:{zh:"M-Flow è®°å¿å¼æ",en:"M-Flow Memory Engine"},desc:{zh:"å°å¯¹è¯è½¬å为æä¹
ç¥è¯å¾è°±",en:"Dialogue â persistent knowledge graph"},theta:280,phi:25,anchorR:Do,extTheta:265,extPhi:28,extR:Do+.38,side:"left"},{region:{zh:"åé¢å¶",en:"PREFRONTAL"},feature:{zh:"对è¯çè§£ä¸æå¾è¯å«",en:"Dialogue & Intent Recognition"},desc:{zh:"深度è¯ä¹åæä¸æ¨ç",en:"Deep semantic analysis & reasoning"},theta:330,phi:55,anchorR:Do,extTheta:300,extPhi:55,extR:Do+.6,side:"left"},{region:{zh:"海马ä½",en:"HIPPOCAMPUS"},feature:{zh:"è·¨ä¼è¯é¿æè®°å¿",en:"Cross-session Memory"},desc:{zh:"81.8% LoCoMo-10 è®°å¿åç¡®ç",en:"81.8% LoCoMo-10 memory accuracy"},theta:250,phi:100,anchorR:.2,extTheta:245,extPhi:110,extR:Do+.55,side:"left"},{region:{zh:"é¢å¶",en:"TEMPORAL"},feature:{zh:"è¯ä¹åæä¸è¯é¢è¿½è¸ª",en:"Semantic & Topic Tracking"},desc:{zh:"çè§£è¯ä¹å
³èä¸ä¸ä¸æ",en:"Semantic links & context continuity"},theta:90,phi:65,anchorR:Do,extTheta:95,extPhi:50,extR:Do+.6,side:"right"},{region:{zh:"æä»æ ¸",en:"AMYGDALA"},feature:{zh:"æ
æè¯å«ä¸æéåæ",en:"Emotion Recognition & Weighting"},desc:{zh:"ææå¯¹è¯ä¸çæ
æä¿¡å·",en:"Emotional signal detection in dialogue"},theta:70,phi:85,anchorR:.18,extTheta:80,extPhi:80,extR:Do+.55,side:"right"},{region:{zh:"å°è",en:"CEREBELLUM"},feature:{zh:"ç¥è¯å¾è°±æå»º",en:"Knowledge Graph Construction"},desc:{zh:"ç»æåè®°å¿ç卿ç½ç»",en:"Dynamic structured memory network"},theta:160,phi:130,anchorR:.35,extTheta:120,extPhi:115,extR:Do+.55,side:"right"}];function VX({def:i,lang:e}){const t=X.useMemo(()=>US(i.theta,i.phi,i.anchorR),[i.theta,i.phi,i.anchorR]),n=X.useMemo(()=>US(i.extTheta,i.extPhi,i.extR),[i.extTheta,i.extPhi,i.extR]),r=X.useMemo(()=>US(i.theta,i.phi,Do),[i.theta,i.phi]),s=X.useMemo(()=>i.anchorR>=Do*.9?t.clone().lerp(n,.35):r,[t,n,r,i.anchorR]),o=e==="zh";return y.jsxs("group",{children:[y.jsx(UX,{points:[t,s,n],color:"#ffffff",lineWidth:.6,transparent:!0,opacity:.15}),y.jsxs("mesh",{position:t,children:[y.jsx("sphereGeometry",{args:[.012,8,8]}),y.jsx("meshBasicMaterial",{color:"#7ec8e3",depthWrite:!1,depthTest:!1})]}),y.jsxs("mesh",{position:n,children:[y.jsx("sphereGeometry",{args:[.008,8,8]}),y.jsx("meshBasicMaterial",{color:"#7ec8e3",depthWrite:!1,depthTest:!1})]}),y.jsx(U7,{position:n,center:!1,style:{pointerEvents:"none",userSelect:"none",whiteSpace:"nowrap",transform:i.side==="left"?"translateX(-100%)":"translateX(0%)"},zIndexRange:[10,0],children:y.jsxs("div",{style:{textAlign:i.side==="left"?"right":"left",padding:i.side==="left"?"0 8px 0 0":"0 0 0 8px"},children:[y.jsx("div",{style:{fontSize:"9px",letterSpacing:"0.12em",textTransform:"uppercase",color:"#7ec8e3",fontFamily:"var(--font-mono, monospace)",marginBottom:"2px"},children:o?i.region.zh:i.region.en}),y.jsx("div",{style:{fontSize:"12px",fontWeight:600,color:"rgba(255,255,255,0.88)",lineHeight:1.3,marginBottom:"1px"},children:o?i.feature.zh:i.feature.en}),y.jsx("div",{style:{fontSize:"10px",color:"rgba(255,255,255,0.32)",lineHeight:1.3},children:o?i.desc.zh:i.desc.en})]})})]})}function XX({lang:i}){return y.jsx("group",{children:WX.map((e,t)=>y.jsx(VX,{def:e,lang:i},t))})}function YX(){const i=()=>
4583{if(typeof window>"u")return 2;const n=window.innerWidth/window.innerHeight;return n<1?2*Math.min(1,n/.6):2},[e,t]=X.useState(i);return X.useEffect(()=>{const n=window.matchMedia("(orientation: portrait)"),r=()=>t(i());return n.addEventListener("change",r),()=>n.removeEventListener("change",r)},[]),e}function JX({lang:i="zh"}={}){const[e,t]=X.useState(null),n=X.useRef(null),r=YX();return y.jsxs(y.Fragment,{children:[y.jsx("ambientLight",{intensity:.5}),y.jsx("pointLight",{position:[5,5,5],intensity:.8,color:"#ffffff"}),y.jsx("pointLight",{position:[-5,-5,5],intensity:.5,color:"#87CEEB"}),y.jsx("pointLight",{position:[0,0,8],intensity:.7,color:"#ffffff"}),y.jsx(X.Suspense,{fallback:null,children:y.jsxs("group",{ref:n,position:[0,-1.1,0],scale:r,children:[y.jsx(GX,{hoveredRegion:e,groupRef:n}),y.jsx(jX,{onRegionChange:t}),y.jsx(XX,{lang:i})]})}),y.jsx(jF,{enableZoom:!1,enablePan:!1,autoRotate:!0,autoRotateSpeed:1.5,enableRotate:!0,rotateSpeed:.5,target:[0,-1.1+.57*r,0]})]})}function KX({scale:i=1,position:e=[0,0,0],autoRotate:t=!0}){const n=X.useRef(null),{scene:r,animations:s}=hh("/model/Brain_hologram_animated.glb"),{actions:o,mixer:a}=zX(s,n);return X.useEffect(()=>{o&&Object.keys(o).length>0&&Object.values(o).forEach(l=>{l&&(l.play(),l.setLoop(lw,1/0))})},[o]),od((l,c)=>{n.current&&t&&(n.current.rotation.y+=c*.15),a&&a.update(c)}),X.useEffect(()=>{r.traverse(l=>{l instanceof Kt&&(l.material=new dl({color:new Ve(3900150),emissive:new Ve(1982639),emissiveIntensity:.5,transparent:!0,opacity:.85,wireframe:!1,side:Di}))})},[r]),y.jsxs("group",{ref:n,position:e,scale:i,children:[y.jsx("primitive",{object:r}),y.jsx("directionalLight",{position:[5,5,5],intensity:2,color:"#ffffff"}),y.jsx("directionalLight",{position:[-5,3,-5],intensity:1.2,color:"#3B82F6"}),y.jsx("pointLight",{position:[0,3,0],intensity:1.5,color:"#60A5FA"}),y.jsx("pointLight",{position:[2,-2,2],intensity:.8,color:"#93C5FD"}),y.jsx("spotLight",{position:[0,5,0],angle:.5,penumbra:1,intensity:1.5,color:"#ffffff"})]})}hh.preload("/model/Brain_hologram_animated.glb");
4583const qX=1,ZX=-.1,QX=4,$X=-2.85,WF=1536/1024,VF=16/9,XF=i=>Math.max(1,WF/i),YF=i=>Math.max(1,i/WF),eY=XF(VF),tY=YF(VF);function I3(i){return{cx:eY/XF(i),cy:tY/YF(i)}}function nY(i){return qX*i+ZX}function iY(i){return QX*i+$X}function Ax(i,e,t=0){const n=nY(i),r=iY(i),s=Math.min(n,r),o=Math.max(n,r);return i>=-1-t&&i<=1+t&&e>=s-t&&e<=o+t}function rY({count:i=8e3}){const e=X.useRef(null),t=X.useRef(null),{camera:n,mouse:r,size:s}=Bi(),o=X.useRef({isInWindow:!0,position:new H,prevPosition:new H,velocity:new H,lastMoveTime:performance.now(),lastUpdateTime:performance.now()}),a=X.useRef({velocity:new H,center:new H,strength:0});X.useEffect(()=>{const d=()=>{o.current.isInWindow=!0},p=()=>{o.current.isInWindow=!1},m=()=>{o.current.lastMoveTime=performance.now()};return document.addEventListener("mouseenter",d),document.addEventListener("mouseleave",p),document.addEventListener("mousemove",m),()=>{document.removeEventListener("mouseenter",d),document.removeEventListener("mouseleave",p),document.removeEventListener("mousemove",m)}},[]);const l=X.useMemo(()=>{const d=new Float32Array(i*3),p=new Float32Array(i*3),m=new Float32Array(i*3),x=new Float32Array(i),v=new Float32Array(i),_=new Float32Array(i),S=performance.now()-5e3,b=new H;n.updateMatrixWorld();const A=.96,w=.8,C=s.width/s.height,{cx:P,cy:B}=I3(C),R=Math.log(4),E=2.5,L=(Y,z)=>{const W=Y-A,V=z-w,G=Math.sqrt(W*W+V*V),Z=Math.min(G/E*3,3),ee=Math.log(-Z+4)/R;return Math.pow(ee,3)};let N=0,k=0;for(;N<i&&k<5e5;){k++;const Y=Xn.randFloatSpread(100),z=Xn.randFloatSpread(100),W=Xn.randFloatSpread(30)-15;b.set(Y,z,W),b.project(n);const V=b.x,G=b.y,Z=b.z;if(V>=-1.5&&V<=1.5&&G>=-1.5&&G<=1.5&&Z>0&&Z<1){const O=V*P,ee=G*B,ge=Math.random()<.4?Xn.randFloat(.1,.5):0;if(Ax(O,ee,ge)){const Se=L(O,ee);if(Math.random()>Se)continue;d[N*3]=Y,d[N*3+1]=z,d[N*3+2]=W;const Ye=.0025,K=.0025,q=Xn.randFloat(-Ye,Ye),re=Xn.randFloat(-K,K);p[N*3]=q,p[N*3+1]=re,p[N*3+2]=0,m[N*3]=q,m[N*3+1]=re,m[N*3+2]=0,Ax(O,ee,0)?x[N]=Xn.randFloat(.3,.8):x[N]=Xn.randFloat(.1,.4),v[N]=Xn.randFloat(.05,.3),_[N]=S,N++}}}return{positions:d,velocities:p,baseVelocities:m,alphas:x,fadeThresholds:v,releaseTimes:_,actualCount:N}},[i,n,s.width,s.height]),c=X.useMemo(()=>new dn({uniforms:{color:{value:new Ve(16777215)},size:{value:.15},pixelRatio:{value:Math.min(window.devicePixelRatio,2)}},vertexShader:` 4584 attribute float alpha; 4585 varying float vAlpha; 4586 uniform float size; 4587 uniform float pixelRatio; 4588 4589 void main() { 4590 vAlpha = alpha; 4591 vec4 mvPosition = modelViewMatrix * vec4(position, 1.0); 4592 float pointSize = size * pixelRatio * (300.0 / -mvPosition.z); 4593 // é嶿大ç²å尺寸为 6.0 4594 gl_PointSize = min(pointSize, 12.0); 4595 gl_Position = projectionMatrix * mvPosition; 4596 } 4597 `,fragmentShader:` 4598 uniform vec3 color; 4599 varying float vAlpha; 4600 4601 void main() { 4602 float dist = length(gl_PointCoord - vec2(0.5, 0.5)); 4603 if (dist > 0.5) discard; 4604 4605 float strength = 1.0 - (dist * 2.0); 4606 strength = pow(strength, 1.5); 4607 4608 gl_FragColor = vec4(color, vAlpha * strength); 4609 } 4610 `,transparent:!0,blending:_a,depthWrite:!1}),[]),u=(d,p,m)=>(Math.sin(d*1.2+m*.3)*Math.cos(p*.8+m*.2)+Math.sin(d*2.1-m*.4)*.5+Math.cos(p*1.7+m*.5)*.3)*.5;return od((d,p)=>{if(!e.current)return;const m=performance.now(),x=m*.001,v=m-5e3,_=o.current.isInWindow,g=d.size.width/d.size.height,S=I3(g),b=e.current.geometry.attributes.position.array,A=l.velocities,w=l.baseVelocities,C=e.current.geometry.attributes.alpha.array,P=l.fadeThresholds,B=l.releaseTimes,R=.5*p,E=new H(r.x,r.y,.5);E.unproject(n);const L=E.sub(n.position).normalize(),N=(-15-n.position.z)/L.z,k=n.position.clone().add(L.multiplyScalar(N)),Y=Math.max(.001,(m-o.current.lastUpdateTime)/1e3),z=o.current.velocity;_?(z.subVectors(k,o.current.prevPosition).divideScalar(Y),z.clampLength(0,50)):z.multiplyScalar(.9),o.current.prevPosition.copy(k),o.current.position.copy(k),o.current.lastUpdateTime=m;const W=z.length(),V=a.current;V.center.lerp(k,.15);const G=W*.8;V.strength+=(G-V.strength)*.1,V.strength*=.995,V.velocity.lerp(z,.08),V.velocity.multiplyScalar(.98);const O=Math.min(1+W*.1,1.5),ee=new H,le=new H,ge=new H,Se=new H,K=1/.4;for(let q=0;q<l.actualCount;q++){const re=q*3;ee.set(b[re],b[re+1],b[re+2]);const Ce=ee.clone().sub(V.center),Te=Ce.length(),De=Math.exp(-(Te*Te)/(2*O*O));if(le.copy(V.velocity).multiplyScalar(De*.02),Te>.1&&V.strength>.5){Se.set(-Ce.y,Ce.x,0).normalize();const ke=V.strength*De*.003;Se.multiplyScalar(ke),le.add(Se)}if(W>5){const ke=Math.min(W*3e-4,.004)*De,Ae=u(b[re]*.1,b[re+1]*.1,x),U=u(b[re]*.1+100,b[re+1]*.1,x);le.x+=Ae*ke,le.y+=U*ke}ge.copy(le).sub(new H(A[re],A[re+1],A[re+2])).multiplyScalar(K*p),A[re]+=ge.x,A[re+1]+=ge.y,A[re+2]+=ge.z;const tt=De*V.strength,Pe=Xn.lerp(.08,.005,Math.min(tt,1));A[re]+=(w[re]-A[re])*Pe,A[re+1]+=(w[re+1]-A[re+1])*Pe,A[re+2]+=(w[re+2]-A[re+2])*Pe,b[re]+=A[re],b[re+1]+=A[re+1],b[re+2]+=A[re+2],ee.set(b[re],b[re+1],b[re+2]),ee.project(n);const me=ee.x,Ee=ee.y,be=ee.z,$=me*S.cx,J=Ee*S.cy,Ue=P[q];if(Ax($,J,Ue)&&be>0&&be<1)C[q]<.8&&(C[q]+=R,C[q]>.8&&(C[q]=.8));else if(C[q]-=R,C[q]<=0){C[q]=0;let ke=!1,Ae=0;for(;!ke&&Ae<50;){Ae++;const U=Xn.randFloatSpread(100),F=Xn.randFloatSpread(100),ne=Xn.randFloatSpread(30)-15;ee.set(U,F,ne).project(n);const se=ee.x,he=ee.y,de=ee.z;if(Ax(se*S.cx,he*S.cy,.1)&&de>
46100&&de<1){b[re]=U,b[re+1]=F,b[re+2]=ne;const ze=.0025,Be=.0025,Ke=Xn.randFloat(-ze,ze),$e=Xn.randFloat(-Be,Be);A[re]=Ke,A[re+1]=$e,A[re+2]=0,w[re]=Ke,w[re+1]=$e,w[re+2]=0,C[q]=.1,B[q]=v,ke=!0}}if(!ke){const U=Xn.randFloatSpread(40),F=Xn.randFloatSpread(40),ne=Xn.randFloat(-25,-5);b[re]=U,b[re+1]=F,b[re+2]=ne,C[q]=.1}}}e.current.geometry.attributes.position.needsUpdate=!0,e.current.geometry.attributes.alpha.needsUpdate=!0}),y.jsxs("points",{ref:e,children:[y.jsxs("bufferGeometry",{children:[y.jsx("bufferAttribute",{attach:"attributes-position",count:l.actualCount,array:l.positions,itemSize:3}),y.jsx("bufferAttribute",{attach:"attributes-alpha",count:l.actualCount,array:l.alphas,itemSize:1})]}),y.jsx("primitive",{object:c,ref:t,attach:"material"})]})}function L3(i,e){if(e===uw)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),i;if(e===Ju||e===Jm){let t=i.getIndex();if(t===null){const o=[],a=i.getAttribute("position");if(a!==void 0){for(let l=0;l<a.count;l++)o.push(l);i.setIndex(o),t=i.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),i}const n=t.count-2,r=[];if(e===Ju)for(let o=1;o<=n;o++)r.push(t.getX(0)),r.push(t.getX(o)),r.push(t.getX(o+1));else for(let o=0;o<n;o++)o%2===0?(r.push(t.getX(o)),r.push(t.getX(o+1)),r.push(t.getX(o+2))):(r.push(t.getX(o+2)),r.push(t.getX(o+1)),r.push(t.getX(o)));r.length/3!==n&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const s=i.clone();return s.setIndex(r),s.clearGroups(),s}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),i}class sY extends Ki{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(t){return new uY(t)}),this.register(function(t){return new dY(t)}),this.register(function(t){return new _Y(t)}),this.register(function(t){return new SY(t)}),this.register(function(t){return new bY(t)}),this.register(function(t){return new hY(t)}),this.register(function(t){return new pY(t)}),this.register(function(t){return new mY(t)}),this.register(function(t){return new gY(t)}),this.register(function(t){return new cY(t)}),this.register(function(t){return new xY(t)}),this.register(function(t){return new fY(t)}),this.register(function(t){return new yY(t)}),this.register(function(t){return new vY(t)}),this.register(function(t){return new aY(t)}),this.register(function(t){return new MY(t)}),this.register(function(t){return new AY(t)})}load(e,t,n,r){const s=this;let o;if(this.resourcePath!=="")o=this.resourcePath;else if(this.path!==""){const c=js.extractUrlBase(e);o=js.resolveURL(c,this.path)}else o=js.extractUrlBase(e);this.manager.itemStart(e);const a=function(c){r?r(c):console.error(c),s.manager.itemError(e),s.manager.itemEnd(e)},l=new Er(this.manager);l.setPath(this.path),l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setWithCredentials(this.withCredentials),l.load(e,function(c){try{s.parse(c,o,function(u){t(u),s.manager.itemEnd(e)},a)}catch(u){a(u)}},n,a)}setDRACOLoader(e){return this.dracoLoader=e,this}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,n,r){let s;const o={},a={},l=new TextDecoder;if(typeof e=="string")s=JSON.parse(e);else if(e instanceof ArrayBuffer)if(l.decode(new Uint8Array(e,0,4))===JF){try{o[$t.KHR_BINARY_GLTF]=new wY(e)}catch(d){r&&r(d);return}s=JSON.parse(o[$t.KHR_BINARY_GLTF].content)}else s=JSON.parse(l.decode(e));else s=e;if(s.asset===void 0||s.asset.version[0]<2){r&&r(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const c=new OY(s,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let u=0;u<this.pluginCallbacks.length;u++){const d=this.pluginCallbacks[u](c);
vendor: 21,776 bytes, line 4610
4610d.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[d.name]=d,o[d.name]=!0}if(s.extensionsUsed)for(let u=0;u<s.extensionsUsed.length;++u){const d=s.extensionsUsed[u],p=s.extensionsRequired||[];switch(d){case $t.KHR_MATERIALS_UNLIT:o[d]=new lY;break;case $t.KHR_DRACO_MESH_COMPRESSION:o[d]=new TY(s,this.dracoLoader);break;case $t.KHR_TEXTURE_TRANSFORM:o[d]=new EY;break;case $t.KHR_MESH_QUANTIZATION:o[d]=new CY;break;default:p.indexOf(d)>=0&&a[d]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+d+'".')}}c.setExtensions(o),c.setPlugins(a),c.parse(n,r)}parseAsync(e,t){const n=this;return new Promise(function(r,s){n.parse(e,t,r,s)})}}function oY(){let i={};return{get:function(e){return i[e]},add:function(e,t){i[e]=t},remove:function(e){delete i[e]},removeAll:function(){i={}}}}const $t={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class aY{constructor(e){this.parser=e,this.name=$t.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let n=0,r=t.length;n<r;n++){const s=t[n];s.extensions&&s.extensions[this.name]&&s.extensions[this.name].light!==void 0&&e._addNodeRef(this.cache,s.extensions[this.name].light)}}_loadLight(e){const t=this.parser,n="light:"+e;let r=t.cache.get(n);if(r)return r;const s=t.json,l=((s.extensions&&s.extensions[this.name]||{}).lights||[])[e];let c;const u=new Ve(16777215);l.color!==void 0&&u.setRGB(l.color[0],l.color[1],l.color[2],Tr);const d=l.range!==void 0?l.range:0;switch(l.type){case"directional":c=new th(u),c.target.position.set(0,0,-1),c.add(c.target);break;case"point":c=new t0(u),c.distance=d;break;case"spot":c=new F1(u),c.distance=d,l.spot=l.spot||{},l.spot.innerConeAngle=l.spot.innerConeAngle!==void 0?l.spot.innerConeAngle:0,l.spot.outerConeAngle=l.spot.outerConeAngle!==void 0?l.spot.outerConeAngle:Math.PI/4,c.angle=l.spot.outerConeAngle,c.penumbra=1-l.spot.innerConeAngle/l.spot.outerConeAngle,c.target.position.set(0,0,-1),c.add(c.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+l.type)}return c.position.set(0,0,0),aa(c,l),l.intensity!==void 0&&(c.intensity=l.intensity),c.name=t.createUniqueName(l.name||"light_"+e),r=Promise.resolve(c),t.cache.add(n,r),r}getDependency(e,t){if(e==="light")return this._loadLight(t)}createNodeAttachment(e){const t=this,n=this.parser,s=n.json.nodes[e],a=(s.extensions&&s.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(l){return n._getNodeRef(t.cache,a,l)})}}class lY{constructor(){this.name=$t.KHR_MATERIALS_UNLIT}getMaterialType(){return pi}extendParams(e,t,n){const r=[];e.color=new Ve(1,1,1),e.opacity=1;const s=t.pbrMetallicRoughness;if(s){if(Array.isArray(s.baseColorFactor)){const o=s.baseColorFactor;e.color.setRGB(o[0],o[1],o[2],Tr),e.opacity=o[3]}s.baseColorTexture!==void 0&&r.push(n.assignTexture(e,"map",s.baseColorTexture,Un))}return Promise.all(r)}}class cY{constructor(e){this.parser=e,this.name=$t.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const r=this.parser.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=r.extensions[this.name].emissiveStrength;return s!==void 0&&(t.emissiveIntensity=s),Promise.resolve()}}class uY{constructor(e){this.parser=e,this.name=$t.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:oi}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];if(o.clearcoatFactor!==void 0&&(t.clearcoat=o.clearcoatFactor),o.clearcoatTexture!==void 0&&s.push(n.assignTexture(t,"clearcoatMap",o.clearcoatTexture)),o.clearcoatRoughnessFactor!==void 0&&(t.clearcoatRoughness=o.clearcoatRoughnessFactor),o.clearcoatRoughnessTexture!==void 0&&s.push(n.assignTexture(t,"clearcoatRoughnessMap",o.clearcoatRoughnessTexture)),o.clearcoatNormalTexture!==void 0&&(s.push(n.assignTexture(t,"clearcoatNormalMap",o.clearcoatNormalTexture)),o.clearcoatNormalTexture.scale!==void 0)){const a=o.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new xe(a,a)}return Promise.all(s)}}class dY{constructor(e){this.parser=e,this.name=$t.KHR_MATERIALS_DISPERSION}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:oi}extendMaterialParams(e,t){const r=this.parser.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=r.extensions[this.name];return t.dispersion=s.dispersion!==void 0?s.dispersion:0,Promise.resolve()}}class fY{constructor(e){this.parser=e,this.name=$t.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:oi}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];return o.iridescenceFactor!==void 0&&(t.iridescence=o.iridescenceFactor),o.iridescenceTexture!==void 0&&s.push(n.assignTexture(t,"iridescenceMap",o.iridescenceTexture)),o.iridescenceIor!==void 0&&(t.iridescenceIOR=o.iridescenceIor),t.iridescenceThicknessRange===void 0&&(t.iridescenceThicknessRange=[100,400]),o.iridescenceThicknessMinimum!==void 0&&(t.iridescenceThicknessRange[0]=o.iridescenceThicknessMinimum),o.iridescenceThicknessMaximum!==void 0&&(t.iridescenceThicknessRange[1]=o.iridescenceThicknessMaximum),o.iridescenceThicknessTexture!==void 0&&s.push(n.assignTexture(t,"iridescenceThicknessMap",o.iridescenceThicknessTexture)),Promise.all(s)}}class hY{constructor(e){this.parser=e,this.name=$t.KHR_MATERIALS_SHEEN}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:oi}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[];t.sheenColor=new Ve(0,0,0),t.sheenRoughness=0,t.sheen=1;const o=r.extensions[this.name];if(o.sheenColorFactor!==void 0){const a=o.sheenColorFactor;t.sheenColor.setRGB(a[0],a[1],a[2],Tr)}return o.sheenRoughnessFactor!==void 0&&(t.sheenRoughness=o.sheenRoughnessFactor),o.sheenColorTexture!==void 0&&s.push(n.assignTexture(t,"sheenColorMap",o.sheenColorTexture,Un)),o.sheenRoughnessTexture!==void 0&&s.push(n.assignTexture(t,"sheenRoughnessMap",o.sheenRoughnessTexture)),Promise.all(s)}}class pY{constructor(e){this.parser=e,this.name=$t.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:oi}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];return o.transmissionFactor!==void 0&&(t.transmission=o.transmissionFactor),o.transmissionTexture!==void 0&&s.push(n.assignTexture(t,"transmissionMap",o.transmissionTexture)),Promise.all(s)}}class mY{constructor(e){this.parser=e,this.name=$t.KHR_MATERIALS_VOLUME}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:oi}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];t.thickness=o.thicknessFactor!==void 0?o.thicknessFactor:0,o.thicknessTexture!==void 0&&s.push(n.assignTexture(t,"thicknessMap",o.thicknessTexture)),t.attenuationDistance=o.attenuationDistance||1/0;const a=o.attenuationColor||[1,1,1];return t.attenuationColor=new Ve().setRGB(a[0],a[1],a[2],Tr),Promise.all(s)}}class gY{constructor(e){this.parser=e,this.name=$t.KHR_MATERIALS_IOR}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:oi}extendMaterialParams(e,t){const r=this.parser.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=r.extensions[this.name];return t.ior=s.ior!==void 0?s.ior:1.5,Promise.resolve()}}class xY{constructor(e){this.parser=e,this.name=$t.KHR_MATERIALS_SPECULAR}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:oi}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];t.specularIntensity=o.specularFactor!==void 0?o.specularFactor:1,o.specularTexture!==void 0&&s.push(n.assignTexture(t,"specularIntensityMap",o.specularTexture));const a=o.specularColorFactor||[1,1,1];return t.specularColor=new Ve().setRGB(a[0],a[1],a[2],Tr),o.specularColorTexture!==void 0&&s.push(n.assignTexture(t,"specularColorMap",o.specularColorTexture,Un)),Promise.all(s)}}class vY{constructor(e){this.parser=e,this.name=$t.EXT_MATERIALS_BUMP}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:oi}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];return t.bumpScale=o.bumpFactor!==void 0?o.bumpFactor:1,o.bumpTexture!==void 0&&s.push(n.assignTexture(t,"bumpMap",o.bumpTexture)),Promise.all(s)}}class yY{constructor(e){this.parser=e,this.name=$t.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:oi}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const s=[],o=r.extensions[this.name];return o.anisotropyStrength!==void 0&&(t.anisotropy=o.anisotropyStrength),o.anisotropyRotation!==void 0&&(t.anisotropyRotation=o.anisotropyRotation),o.anisotropyTexture!==void 0&&s.push(n.assignTexture(t,"anisotropyMap",o.anisotropyTexture)),Promise.all(s)}}class _Y{constructor(e){this.parser=e,this.name=$t.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,n=t.json,r=n.textures[e];if(!r.extensions||!r.extensions[this.name])return null;const s=r.extensions[this.name],o=t.options.ktx2Loader;if(!o){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,s.source,o)}}class SY{constructor(e){this.parser=e,this.name=$t.EXT_TEXTURE_WEBP}loadTexture(e){const t=this.name,n=this.parser,r=n.json,s=r.textures[e];if(!s.extensions||!s.extensions[t])return null;const o=s.extensions[t],a=r.images[o.source];let l=n.textureLoader;if(a.uri){const c=n.options.manager.getHandler(a.uri);c!==null&&(l=c)}return n.loadTextureImage(e,o.source,l)}}class bY{constructor(e){this.parser=e,this.name=$t.EXT_TEXTURE_AVIF}loadTexture(e){const t=this.name,n=this.parser,r=n.json,s=r.textures[e];if(!s.extensions||!s.extensions[t])return null;const o=s.extensions[t],a=r.images[o.source];let l=n.textureLoader;if(a.uri){const c=n.options.manager.getHandler(a.uri);c!==null&&(l=c)}return n.loadTextureImage(e,o.source,l)}}class MY{constructor(e){this.name=$t.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){const r=n.extensions[this.name],s=this.parser.getDependency("buffer",r.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return s.then(function(a){const l=r.byteOffset||0,c=r.byteLength||0,u=r.count,d=r.byteStride,p=new Uint8Array(a,l,c);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(u,d,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(u*d);return o.decodeGltfBuffer(new Uint8Array(m),u,d,p,r.mode,r.filter),m})})}else return null}}class AY{constructor(e){this.name=$t.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,n=t.nodes[e];if(!n.extensions||!n.extensions[this.name]||n.mesh===void 0)return null;const r=t.meshes[n.mesh];for(const c of r.primitives)if(c.mode!==lo.TRIANGLES&&c.mode!==lo.TRIANGLE_STRIP&&c.mode!==lo.TRIANGLE_FAN&&c.mode!==void 0)return null;const o=n.extensions[this.name].attributes,a=[],l={};for(const c in o)a.push(this.parser.getDependency("accessor",o[c]).then(u=>(l[c]=u,l[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(c=>{const u=c.pop(),d=u.isGroup?u.children:[u],p=c[0].count,m=[];for(const x of d){const v=new _t,_=new H,g=new si,S=new H(1,1,1),b=new x1(x.geometry,x.material,p);for(let A=0;A<p;A++)l.TRANSLATION&&_.fromBufferAttribute(l.TRANSLATION,A),l.ROTATION&&g.fromBufferAttribute(l.ROTATION,A),l.SCALE&&S.fromBufferAttribute(l.SCALE,A),b.setMatrixAt(A,v.compose(_,g,S));for(const A in l)if(A==="_COLOR_0"){const w=l[A];b.instanceColor=new _c(w.array,w.itemSize,w.normalized)}else A!=="TRANSLATION"&&A!=="ROTATION"&&A!=="SCALE"&&x.geometry.setAttribute(A,l[A]);Wt.prototype.copy.call(b,x),this.parser.assignFinalMaterial(b),m.push(b)}return u.isGroup?(u.clear(),u.add(...m),u):m[0]}))}}const JF="glTF",op=12,B3={JSON:1313821514,BIN:5130562};class wY{constructor(e){this.name=$t.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,op),n=new TextDecoder;if(this.header={magic:n.decode(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==JF)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const r=this.header.length-op,s=new DataView(e,op);let o=0;for(;o<r;){const a=s.getUint32(o,!0);o+=4;const l=s.getUint32(o,!0);if(o+=4,l===B3.JSON){const c=new Uint8Array(e,op+o,a);this.content=n.decode(c)}else if(l===B3.BIN){const c=op+o;this.body=e.slice(c,c+a)}o+=a}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class TY{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=$t.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const n=this.json,r=this.dracoLoader,s=e.extensions[this.name].bufferView,o=e.extensions[this.name].attributes,a={},l={},c={};for(const u in o){const d=PM[u]||u.toLowerCase();a[d]=o[u]}for(const u in e.attributes){const d=PM[u]||u.toLowerCase();if(o[u]!==void 0){const p=n.accessors[e.attributes[u]],m=Lf[p.componentType];c[d]=m.name,l[d]=p.normalized===!0}}return t.getDependency("bufferView",s).then(function(u){return new Promise(function(d,p){r.decodeDracoFile(u,function(m){for(const x in m.attributes){const v=m.attributes[x],_=l[x];_!==void 0&&(v.normalized=_)}d(m)},a,c,Tr,p)})})}}class EY{constructor(){this.name=$t.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return(t.texCoord===void 0||t.texCoord===e.channel)&&t.offset===void 0&&t.rotation===void 0&&t.scale===void 0||(e=e.clone(),t.texCoord!==void 0&&(e.channel=t.texCoord),t.offset!==void 0&&e.offset.fromArray(t.offset),t.rotation!==void 0&&(e.rotation=t.rotation),t.scale!==void 0&&e.repeat.fromArray(t.scale),e.needsUpdate=!0),e}}class CY{constructor(){this.name=$t.KHR_MESH_QUANTIZATION}}class KF extends nd{constructor(e,t,n,r){super(e,t,n,r)}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,s=e*r*3+r;for(let o=0;o!==r;o++)t[o]=n[s+o];return t}interpolate_(e,t,n,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=a*2,c=a*3,u=r-t,d=(n-t)/u,p=d*d,m=p*d,x=e*c,v=x-c,_=-2*m+3*p,g=m-p,S=1-_,b=g-p+d;for(let A=0;A!==a;A++){const w=o[v+A+a],C=o[v+A+l]*u,P=o[x+A+a],B=o[x+A]*u;s[A]=S*w+b*C+_*P+g*B}return s}}const RY=new si;class PY extends KF{interpolate_(e,t,n,r){const s=super.interpolate_(e,t,n,r);return RY.fromArray(s).normalize().toArray(s),s}}const lo={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},Lf={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},D3={9728:Bn,9729:jt,9984:Xm,9985:Lu,9986:Yl,9987:as},F3={33071:Mr,33648:Vu,10497:bo},zS={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},PM={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},Ll={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},IY={CUBICSPLINE:void 0,LINEAR:vc,STEP:Yu},HS={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function LY(i){return i.DefaultMaterial===void 0&&(i.DefaultMaterial=new dl({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:So})),i.DefaultMaterial}function iu(i,e,t){for(const n in t.extensions)i[n]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[n]=t.extensions[n])}function aa(i,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(i.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function BY(i,e,t){let n=!1,r=!1,s=!1;for(let c=0,u=e.length;c<u;c++){const d=e[c];if(d.POSITION!==void 0&&(n=!0),d.NORMAL!==void 0&&(r=!0),d.COLOR_0!==void 0&&(s=!0),n&&r&&s)break}if(!n&&!r&&!s)return Promise.resolve(i);const o=[],a=[],l=[];for(let c=0,u=e.length;c<u;c++){const d=e[c];if(n){const p=d.POSITION!==void 0?t.getDependency("accessor",d.POSITION):i.attributes.position;o.push(p)}if(r){const p=d.NORMAL!==void 0?t.getDependency("accessor",d.NORMAL):i.attributes.normal;a.push(p)}if(s){const p=d.COLOR_0!==void 0?t.getDependency("accessor",d.COLOR_0):i.attributes.color;l.push(p)}}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(l)]).then(function(c){const u=c[0],d=c[1],p=c[2];return n&&(i.morphAttributes.position=u),r&&(i.morphAttributes.normal=d),s&&(i.morphAttributes.color=p),i.morphTargetsRelative=!0,i})}function DY(i,e){if(i.updateMorphTargets(),e.weights!==void 0)for(let t=0,n=e.weights.length;t<n;t++)i.morphTargetInfluences[t]=e.weights[t];if(e.extras&&Array.isArray(e.extras.targetNames)){const t=e.extras.targetNames;if(i.morphTargetInfluences.length===t.length){i.morphTargetDictionary={};for(let n=0,r=t.length;n<r;n++)i.morphTargetDictionary[t[n]]=n}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function FY(i){let e;const t=i.extensions&&i.extensions[$t.KHR_DRACO_MESH_COMPRESSION];if(t?e="draco:"+t.bufferView+":"+t.indices+":"+GS(t.attributes):e=i.indices+":"+GS(i.attributes)+":"+i.mode,i.targets!==void 0)for(let n=0,r=i.targets.length;n<r;n++)e+=":"+GS(i.targets[n]);return e}function GS(i){let e="";const t=Object.keys(i).sort();for(let n=0,r=t.length;n<r;n++)e+=t[n]+":"+i[t[n]]+";";return e}function IM(i){switch(i){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function NY(i){return i.search(/\.jpe?g($|\?)/i)>0||i.search(/^data\:image\/jpeg/)===0?"image/jpeg":i.search(/\.webp($|\?)/i)>0||i.search(/^data\:image\/webp/)===0?"image/webp":i.search(/\.ktx2($|\?)/i)>0||i.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}const kY=new _t;class OY{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new oY,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let n=!1,r=-1,s=!1,o=-1;if(typeof navigator<"u"){const a=navigator.userAgent;n=/^((?!chrome|android).)*safari/i.test(a)===!0;const l=a.match(/Version\/(\d+)/);r=n&&l?parseInt(l[1],10):-1,s=a.indexOf("Firefox")>-1,o=s?a.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>"u"||n&&r<17||s&&o<98?this.textureLoader=new fl(this.options.manager):this.textureLoader=new kw(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Er(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const n=this,r=this.json,s=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()}
vendor: 18,869 bytes, line 4610
4610)).then(function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])}).then(function(o){const a={scene:o[0][r.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:r.asset,parser:n,userData:{}};return iu(s,a,r),aa(a,r),Promise.all(n._invokeAll(function(l){return l.afterRoot&&l.afterRoot(a)})).then(function(){for(const l of a.scenes)l.updateMatrixWorld();e(a)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[];for(let r=0,s=t.length;r<s;r++){const o=t[r].joints;for(let a=0,l=o.length;a<l;a++)e[o[a]].isBone=!0}for(let r=0,s=e.length;r<s;r++){const o=e[r];o.mesh!==void 0&&(this._addNodeRef(this.meshCache,o.mesh),o.skin!==void 0&&(n[o.mesh].isSkinnedMesh=!0)),o.camera!==void 0&&this._addNodeRef(this.cameraCache,o.camera)}}_addNodeRef(e,t){t!==void 0&&(e.refs[t]===void 0&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,n){if(e.refs[t]<=1)return n;const r=n.clone(),s=(o,a)=>{const l=this.associations.get(o);l!=null&&this.associations.set(a,l);for(const[c,u]of o.children.entries())s(u,a.children[c])};return s(n,r),r.name+="_instance_"+e.uses[t]++,r}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let n=0;n<t.length;n++){const r=e(t[n]);if(r)return r}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const n=[];for(let r=0;r<t.length;r++){const s=e(t[r]);s&&n.push(s)}return n}getDependency(e,t){const n=e+":"+t;let r=this.cache.get(n);if(!r){switch(e){case"scene":r=this.loadScene(t);break;case"node":r=this._invokeOne(function(s){return s.loadNode&&s.loadNode(t)});break;case"mesh":r=this._invokeOne(function(s){return s.loadMesh&&s.loadMesh(t)});break;case"accessor":r=this.loadAccessor(t);break;case"bufferView":r=this._invokeOne(function(s){return s.loadBufferView&&s.loadBufferView(t)});break;case"buffer":r=this.loadBuffer(t);break;case"material":r=this._invokeOne(function(s){return s.loadMaterial&&s.loadMaterial(t)});break;case"texture":r=this._invokeOne(function(s){return s.loadTexture&&s.loadTexture(t)});break;case"skin":r=this.loadSkin(t);break;case"animation":r=this._invokeOne(function(s){return s.loadAnimation&&s.loadAnimation(t)});break;case"camera":r=this.loadCamera(t);break;default:if(r=this._invokeOne(function(s){return s!=this&&s.getDependency&&s.getDependency(e,t)}),!r)throw new Error("Unknown type: "+e);break}this.cache.add(n,r)}return r}getDependencies(e){let t=this.cache.get(e);if(!t){const n=this,r=this.json[e+(e==="mesh"?"es":"s")]||[];t=Promise.all(r.map(function(s,o){return n.getDependency(e,o)})),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],n=this.fileLoader;if(t.type&&t.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(t.uri===void 0&&e===0)return Promise.resolve(this.extensions[$t.KHR_BINARY_GLTF].body);const r=this.options;return new Promise(function(s,o){n.load(js.resolveURL(t.uri,r.path),s,void 0,function(){o(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))})})}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then(function(n){const r=t.byteLength||0,s=t.byteOffset||0;return n.slice(s,s+r)})}loadAccessor(e){const t=this,n=this.json,r=this.json.accessors[e];if(r.bufferView===void 0&&r.sparse===void 0){const o=zS[r.type],a=Lf[r.componentType],l=r.normalized===!0,c=new a(r.count*o);return Promise.resolve(new zt(c,o,l))}const s=[];return r.bufferView!==void 0?s.push(this.getDependency("bufferView",r.bufferView)):s.push(null),r.sparse!==void 0&&(s.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),s.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(s).then(function(o){const a=o[0],l=zS[r.type],c=Lf[r.componentType],u=c.BYTES_PER_ELEMENT,d=u*l,p=r.byteOffset||0,m=r.bufferView!==void 0?n.bufferViews[r.bufferView].byteStride:void 0,x=r.normalized===!0;let v,_;if(m&&m!==d){const g=Math.floor(p/m),S="InterleavedBuffer:"+r.bufferView+":"+r.componentType+":"+g+":"+r.count;let b=t.cache.get(S);b||(v=new c(a,g*m,r.count*m/u),b=new lh(v,m/u),t.cache.add(S,b)),_=new Xr(b,l,p%m/u,x)}else a===null?v=new c(r.count*l):v=new c(a,p,r.count*l),_=new zt(v,l,x);if(r.sparse!==void 0){const g=zS.SCALAR,S=Lf[r.sparse.indices.componentType],b=r.sparse.indices.byteOffset||0,A=r.sparse.values.byteOffset||0,w=new S(o[1],b,r.sparse.count*g),C=new c(o[2],A,r.sparse.count*l);a!==null&&(_=new zt(_.array.slice(),_.itemSize,_.normalized)),_.normalized=!1;for(let P=0,B=w.length;P<B;P++){const R=w[P];if(_.setX(R,C[P*l]),l>=2&&_.setY(R,C[P*l+1]),l>=3&&_.setZ(R,C[P*l+2]),l>=4&&_.setW(R,C[P*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}_.normalized=x}return _})}loadTexture(e){const t=this.json,n=this.options,s=t.textures[e].source,o=t.images[s];let a=this.textureLoader;if(o.uri){const l=n.manager.getHandler(o.uri);l!==null&&(a=l)}return this.loadTextureImage(e,s,a)}loadTextureImage(e,t,n){const r=this,s=this.json,o=s.textures[e],a=s.images[t],l=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[l])return this.textureCache[l];const c=this.loadImageSource(t,n).then(function(u){u.flipY=!1,u.name=o.name||a.name||"",u.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(u.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return u.magFilter=D3[p.magFilter]||jt,u.minFilter=D3[p.minFilter]||as,u.wrapS=F3[p.wrapS]||bo,u.wrapT=F3[p.wrapT]||bo,u.generateMipmaps=!u.isCompressedTexture&&u.minFilter!==Bn&&u.minFilter!==jt,r.associations.set(u,{textures:e}),u}).catch(function(){return null});return this.textureCache[l]=c,c}loadImageSource(e,t){const n=this,r=this.json,s=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(d=>d.clone());const o=r.images[e],a=self.URL||self.webkitURL;let l=o.uri||"",c=!1;if(o.bufferView!==void 0)l=n.getDependency("bufferView",o.bufferView).then(function(d){c=!0;const p=new Blob([d],{type:o.mimeType});return l=a.createObjectURL(p),l});else if(o.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const u=Promise.resolve(l).then(function(d){return new Promise(function(p,m){let x=p;t.isImageBitmapLoader===!0&&(x=function(v){const _=new Sn(v);_.needsUpdate=!0,p(_)}),t.load(js.resolveURL(d,s.path),x,void 0,m)})}).then(function(d){return c===!0&&a.revokeObjectURL(l),aa(d,o),d.userData.mimeType=o.mimeType||NY(o.uri),d}).catch(function(d){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),d});return this.sourceCache[e]=u,u}assignTexture(e,t,n,r){const s=this;return this.getDependency("texture",n.index).then(function(o){if(!o)return null;if(n.texCoord!==void 0&&n.texCoord>0&&(o=o.clone(),o.channel=n.texCoord),s.extensions[$t.KHR_TEXTURE_TRANSFORM]){const a=n.extensions!==void 0?n.extensions[$t.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[$t.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),s.associations.set(o,l)}}return r!==void 0&&(o.colorSpace=r),e[t]=o,o})}assignFinalMaterial(e){const t=e.geometry;let n=e.material;const r=t.attributes.tangent===void 0,s=t.attributes.color!==void 0,o=t.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+n.uuid;let l=this.cache.get(a);l||(l=new qa,Wn.prototype.copy.call(l,n),l.color.copy(n.color),l.map=n.map,l.sizeAttenuation=!1,this.cache.add(a,l)),n=l}else if(e.isLine){const a="LineBasicMaterial:"+n.uuid;let l=this.cache.get(a);l||(l=new Ai,Wn.prototype.copy.call(l,n),l.color.copy(n.color),l.map=n.map,this.cache.add(a,l)),n=l}if(r||s||o){let a="ClonedMaterial:"+n.uuid+":";r&&(a+="derivative-tangents:"),s&&(a+="vertex-colors:"),o&&(a+="flat-shading:");let l=this.cache.get(a);l||(l=n.clone(),s&&(l.vertexColors=!0),o&&(l.flatShading=!0),r&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(a,l),this.associations.set(l,this.associations.get(n))),n=l}e.material=n}getMaterialType(){return dl}loadMaterial(e){const t=this,n=this.json,r=this.extensions,s=n.materials[e];let o;const a={},l=s.extensions||{},c=[];if(l[$t.KHR_MATERIALS_UNLIT]){const d=r[$t.KHR_MATERIALS_UNLIT];o=d.getMaterialType(),c.push(d.extendParams(a,s,t))}else{const d=s.pbrMetallicRoughness||{};if(a.color=new Ve(1,1,1),a.opacity=1,Array.isArray(d.baseColorFactor)){const p=d.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],Tr),a.opacity=p[3]}d.baseColorTexture!==void 0&&c.push(t.assignTexture(a,"map",d.baseColorTexture,Un)),a.metalness=d.metallicFactor!==void 0?d.metallicFactor:1,a.roughness=d.roughnessFactor!==void 0?d.roughnessFactor:1,d.metallicRoughnessTexture!==void 0&&(c.push(t.assignTexture(a,"metalnessMap",d.metallicRoughnessTexture)),c.push(t.assignTexture(a,"roughnessMap",d.metallicRoughnessTexture))),o=this._invokeOne(function(p){return p.getMaterialType&&p.getMaterialType(e)}),c.push(Promise.all(this._invokeAll(function(p){return p.extendMaterialParams&&p.extendMaterialParams(e,a)})))}s.doubleSided===!0&&(a.side=Di);const u=s.alphaMode||HS.OPAQUE;if(u===HS.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,u===HS.MASK&&(a.alphaTest=s.alphaCutoff!==void 0?s.alphaCutoff:.5)),s.normalTexture!==void 0&&o!==pi&&(c.push(t.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new xe(1,1),s.normalTexture.scale!==void 0)){const d=s.normalTexture.scale;a.normalScale.set(d,d)}if(s.occlusionTexture!==void 0&&o!==pi&&(c.push(t.assignTexture(a,"aoMap",s.occlusionTexture)),s.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=s.occlusionTexture.strength)),s.emissiveFactor!==void 0&&o!==pi){const d=s.emissiveFactor;a.emissive=new Ve().setRGB(d[0],d[1],d[2],Tr)}return s.emissiveTexture!==void 0&&o!==pi&&c.push(t.assignTexture(a,"emissiveMap",s.emissiveTexture,Un)),Promise.all(c).then(function(){const d=new o(a);return s.name&&(d.name=s.name),aa(d,s),t.associations.set(d,{materials:e}),s.extensions&&iu(r,d,s),d})}createUniqueName(e){const t=sn.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,n=this.extensions,r=this.primitiveCache;function s(a){return n[$t.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,t).then(function(l){return N3(l,a,t)})}const o=[];for(let a=0,l=e.length;a<l;a++){const c=e[a],u=FY(c),d=r[u];if(d)o.push(d.promise);else{let p;c.extensions&&c.extensions[$t.KHR_DRACO_MESH_COMPRESSION]?p=s(c):p=N3(new Rt,c,t),r[u]={primitive:c,promise:p},o.push(p)}}return Promise.all(o)}loadMesh(e){const t=this,n=this.json,r=this.extensions,s=n.meshes[e],o=s.primitives,a=[];for(let l=0,c=o.length;l<c;l++){const u=o[l].material===void 0?LY(this.cache):this.getDependency("material",o[l].material);a.push(u)}return a.push(t.loadGeometries(o)),Promise.all(a).then(function(l){const c=l.slice(0,l.length-1),u=l[l.length-1],d=[];for(let m=0,x=u.length;m<x;m++){const v=u[m],_=o[m];let g;const S=c[m];if(_.mode===lo.TRIANGLES||_.mode===lo.TRIANGLE_STRIP||_.mode===lo.TRIANGLE_FAN||_.mode===void 0)g=s.isSkinnedMesh===!0?new g1(v,S):new Kt(v,S),g.isSkinnedMesh===!0&&g.normalizeSkinWeights(),_.mode===lo.TRIANGLE_STRIP?g.geometry=L3(g.geometry,Jm):_.mode===lo.TRIANGLE_FAN&&(g.geometry=L3(g.geometry,Ju));else if(_.mode===lo.LINES)g=new gs(v,S);else if(_.mode===lo.LINE_STRIP)g=new Ma(v,S);else if(_.mode===lo.LINE_LOOP)g=new y1(v,S);else if(_.mode===lo.POINTS)g=new uc(v,S);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+_.mode);Object.keys(g.geometry.morphAttributes).length>0&&DY(g,s),g.name=t.createUniqueName(s.name||"mesh_"+e),aa(g,s),_.extensions&&iu(r,g,_),t.assignFinalMaterial(g),d.push(g)}for(let m=0,x=d.length;m<x;m++)t.associations.set(d[m],{meshes:e,primitives:m});if(d.length===1)return s.extensions&&iu(r,d[0],s),d[0];const p=new Ns;s.extensions&&iu(r,p,s),t.associations.set(p,{meshes:e});for(let m=0,x=d.length;m<x;m++)p.add(d[m]);return p})}loadCamera(e){let t;const n=this.json.cameras[e],r=n[n.type];if(!r){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return n.type==="perspective"?t=new wn(Xn.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):n.type==="orthographic"&&(t=new or(-r.xmag,r.xmag,r.ymag,-r.ymag,r.znear,r.zfar)),n.name&&(t.name=this.createUniqueName(n.name)),aa(t,n),Promise.resolve(t)}loadSkin(e){const t=this.json.skins[e],n=[];for(let r=0,s=t.joints.length;r<s;r++)n.push(this._loadNodeShallow(t.joints[r]));return t.inverseBindMatrices!==void 0?n.push(this.getDependency("accessor",t.inverseBindMatrices)):n.push(null),Promise.all(n).then(function(r){const s=r.pop(),o=r,a=[],l=[];for(let c=0,u=o.length;c<u;c++){const d=o[c];if(d){a.push(d);const p=new _t;s!==null&&p.fromArray(s.array,c*16),l.push(p)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[c])}return new ch(a,l)})}loadAnimation(e){const t=this.json,n=this,r=t.animations[e],s=r.name?r.name:"animation_"+e,o=[],a=[],l=[],c=[],u=[];for(let d=0,p=r.channels.length;d<p;d++){const m=r.channels[d],x=r.samplers[m.sampler],v=m.target,_=v.node,g=r.parameters!==void 0?r.parameters[x.input]:x.input,S=r.parameters!==void 0?r.parameters[x.output]:x.output;v.node!==void 0&&(o.push(this.getDependency("node",_)),a.push(this.getDependency("accessor",g)),l.push(this.getDependency("accessor",S)),c.push(x),u.push(v))}return Promise.all([Promise.all(o),Promise.all(a),Promise.all(l),Promise.all(c),Promise.all(u)]).then(function(d){const p=d[0],m=d[1],x=d[2],v=d[3],_=d[4],g=[];for(let b=0,A=p.length;b<A;b++){const w=p[b],C=m[b],P=x[b],B=v[b],R=_[b];if(w===void 0)continue;w.updateMatrix&&w.updateMatrix();const E=n._createAnimationTracks(w,C,P,B,R);if(E)for(let L=0;L<E.length;L++)g.push(E[L])}const S=new qu(s,void 0,g);return aa(S,r),S})}createNodeMesh(e){const t=this.json,n=this,r=t.nodes[e];return r.mesh===void 0?null:n.getDependency("mesh",r.mesh).then(function(s){const o=n._getNodeRef(n.meshCache,r.mesh,s);return r.weights!==void 0&&o.traverse(function(a){if(a.isMesh)for(let l=0,c=r.weights.length;l<c;l++)a.morphTargetInfluences[l]=r.weights[l]}),o})}loadNode(e){const t=this.json,n=this,r=t.nodes[e],s=n._loadNodeShallow(e),o=[],a=r.children||[];for(let c=0,u=a.length;c<u;c++)o.push(n.getDependency("node",a[c]));const l=r.skin===void 0?Promise.resolve(null):n.getDependency("skin",r.skin);return Promise.all([s,Promise.all(o),l]).then(function(c){const u=c[0],d=c[1],p=c[2];p!==null&&u.traverse(function(m){m.isSkinnedMesh&&m.bind(p,kY)});for(let m=0,x=d.length;m<x;m++)u.add(d[m]);return u})}_loadNodeShallow(e){const t=this.json,n=this.extensions,r=this;if(this.nodeCache[e]!==void 0)return this.nodeCache[e];const s=t.nodes[e],o=s.name?r.createUniqueName(s.name):"",a=[],l=r._invokeOne(function(c){return c.createNodeMesh&&c.createNodeMesh(e)});return l&&a.push(l),s.camera!==void 0&&a.push(r.getDependency("camera",s.camera).then(function(c){return r._getNodeRef(r.cameraCache,s.camera,c)})),r._invokeAll(function(c){return c.createNodeAttachment&&c.createNodeAttachment(e)}).forEach(function(c){a.push(c)}),this.nodeCache[e]=Promise.all(a).then(function(c){let u;if(s.isBone===!0?u=new Zm:c.length>1?u=new Ns:c.length===1?u=c[0]:u=new Wt,u!==c[0])for(let d=0,p=c.length;d<p;d++)u.add(c[d]);if(s.name&&(u.userData.name=s.name,u.name=o),aa(u,s),s.extensions&&iu(n,u,s),s.matrix!==void 0){const d=new _t;d.fromArray(s.matrix),u.applyMatrix4(d)}else s.translation!==void 0&&u.position.fromArray(s.translation),s.rotation!==void 0&&u.quaternion.fromArray(s.rotation),s.scale!==void 0&&u.scale.fromArray(s.scale);if(!r.associations.has(u))r.associations.set(u,{});else if(s.mesh!==void 0&&r.meshCache.refs[s.mesh]>1){const d=r.associations.get(u);r.associations.set(u,{...d})}return r.associations.get(u).nodes=e,u}),this.nodeCache[e]}loadScene(e){const t=this.extensions,n=this.json.scenes[e],r=this,s=new Ns;n.name&&(s.name=r.createUniqueName(n.name)),aa(s,n),n.extensions&&iu(t,s,n);const o=n.nodes||[],a=[];for(let l=0,c=o.length;l<c;l++)a.push(r.getDependency("node",o[l]));return Promise.all(a).then(function(l){for(let u=0,d=l.length;u<d;u++)s.add(l[u]);const c=u=>{const d=new Map;for(const[p,m]of r.associations)(p instanceof Wn||p instanceof Sn)&&d.set(p,m);return u.traverse(p=>{const m=r.associations.get(p);m!=null&&d.set(p,m)}),d};return r.associations=c(s),s})}_createAnimationTracks(e,t,n,r,s){const o=[],a=e.name?e.name:e.uuid,l=[];Ll[s.path]===Ll.weights?e.traverse(function(p){p.morphTargetInfluences&&l.push(p.name?p.name:p.uuid)}):l.push(a);let c;switch(Ll[s.path]){case Ll.weights:c=al;break;case Ll.rotation:c=ll;break;case Ll.translation:case Ll.scale:c=cl;break;default:switch(n.itemSize){case 1:c=al;break;case 2:case 3:default:c=cl;break}break}const u=r.interpolation!==void 0?IY[r.interpolation]:vc,d=this._getArrayFromAccessor(n);for(let p=0,m=l.length;p<m;p++){const x=new c(l[p]+"."+Ll[s.path],t.array,d,u);r.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(x),o.push(x)}return o}_getArrayFromAccessor(e){let t=e.array;if(e.normalized){const n=IM(t.constructor),r=new Float32Array(t.length);for(let s=0,o=t.length;s<o;s++)r[s]=t[s]*n;t=r}return t}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(n){const r=this instanceof ll?PY:KF;return new r(this.times,this.values,this.getValueSize()/3,n)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function UY(i,e,t){const n=e.attributes,r=new jn;if(n.POSITION!==void 0){const a=t.json.accessors[n.POSITION],l=a.min,c=a.max;if(l!==void 0&&c!==void 0){if(r.set(new H(l[0],l[1],l[2]),new H(c[0],c[1],c[2])),a.normalized){const u=IM(Lf[a.componentType]);r.min.multiplyScalar(u),r.max.multiplyScalar(u)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const s=e.targets;if(s!==void 0){const a=new H,l=new H;for(let c=0,u=s.length;c<u;c++){const d=s[c];if(d.POSITION!==void 0){const p=t.json.accessors[d.POSITION],m=p.min,x=p.max;if(m!==void 0&&x!==void 0){if(l.setX(Math.max(Math.abs(m[0]),Math.abs(x[0]))),l.setY(Math.max(Math.abs(m[1]),Math.abs(x[1]))),l.setZ(Math.max(Math.abs(m[2]),Math.abs(x[2]))),p.normalized){const v=IM(Lf[p.componentType]);l.multiplyScalar(v)}a.max(l)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}r.expandByVector(a)}i.boundingBox=r;const o=new mi;r.getCenter(o.center),o.radius=r.min.distanceTo(r.max)/2,i.boundingSphere=o}function N3(i,e,t){const n=e.attributes,r=[];function s(o,a){return t.getDependency("accessor",o).then(function(l){i.setAttribute(a,l)})}for(const o in n){const a=PM[o]||o.toLowerCase();a in i.attributes||r.push(s(n[o],a))}if(e.indices!==void 0&&!i.index){const o=t.getDependency("accessor",e.indices).then(function(a){i.setIndex(a)});r.push(o)}return Yt.workingColorSpace!==Tr&&"COLOR_0"in n&&console.warn(`THREE.GLTFLoader: Convert
4610ing vertex colors from "srgb-linear" to "${Yt.workingColorSpace}" not supported.`),aa(i,e),UY(i,e,t),Promise.all(r).then(function(){return e.targets!==void 0?BY(i,e.targets,t):i})}class zY extends Kt{constructor(e,t={}){super(e),this.isWater=!0;const n=this,r=t.textureWidth!==void 0?t.textureWidth:512,s=t.textureHeight!==void 0?t.textureHeight:512,o=t.clipBias!==void 0?t.clipBias:0,a=t.alpha!==void 0?t.alpha:1,l=t.time!==void 0?t.time:0,c=t.waterNormals!==void 0?t.waterNormals:null,u=t.sunDirection!==void 0?t.sunDirection:new H(.70707,.70707,0),d=new Ve(t.sunColor!==void 0?t.sunColor:16777215),p=new Ve(t.waterColor!==void 0?t.waterColor:8355711),m=t.eye!==void 0?t.eye:new H(0,0,0),x=t.distortionScale!==void 0?t.distortionScale:20,v=t.side!==void 0?t.side:So,_=t.fog!==void 0?t.fog:!1,g=new Oo,S=new H,b=new H,A=new H,w=new _t,C=new H(0,0,-1),P=new on,B=new H,R=new H,E=new on,L=new _t,N=new wn,k=new Gn(r,s),Y={name:"MirrorShader",uniforms:Gs.merge([ot.fog,ot.lights,{normalSampler:{value:null},mirrorSampler:{value:null},alpha:{value:1},time:{value:0},size:{value:1},distortionScale:{value:20},textureMatrix:{value:new _t},sunColor:{value:new Ve(8355711)},sunDirection:{value:new H(.70707,.70707,0)},eye:{value:new H},waterColor:{value:new Ve(5592405)}}]),vertexShader:` 4611 uniform mat4 textureMatrix; 4612 uniform float time; 4613 4614 varying vec4 mirrorCoord; 4615 varying vec4 worldPosition; 4616 4617 #include <common> 4618 #include <fog_pars_vertex> 4619 #include <shadowmap_pars_vertex> 4620 #include <logdepthbuf_pars_vertex> 4621 4622 void main() { 4623 mirrorCoord = modelMatrix * vec4( position, 1.0 ); 4624 worldPosition = mirrorCoord.xyzw; 4625 mirrorCoord = textureMatrix * mirrorCoord; 4626 vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 ); 4627 gl_Position = projectionMatrix * mvPosition; 4628 4629 #include <beginnormal_vertex> 4630 #include <defaultnormal_vertex> 4631 #include <logdepthbuf_vertex> 4632 #include <fog_vertex> 4633 #include <shadowmap_vertex> 4634 }`,fragmentShader:` 4635 uniform sampler2D mirrorSampler; 4636 uniform float alpha; 4637 uniform float time; 4638 uniform float size; 4639 uniform float distortionScale; 4640 uniform sampler2D normalSampler; 4641 uniform vec3 sunColor; 4642 uniform vec3 sunDirection; 4643 uniform vec3 eye; 4644 uniform vec3 waterColor; 4645 4646 varying vec4 mirrorCoord; 4647 varying vec4 worldPosition; 4648 4649 vec4 getNoise( vec2 uv ) { 4650 vec2 uv0 = ( uv / 103.0 ) + vec2(time / 17.0, time / 29.0); 4651 vec2 uv1 = uv / 107.0-vec2( time / -19.0, time / 31.0 ); 4652 vec2 uv2 = uv / vec2( 8907.0, 9803.0 ) + vec2( time / 101.0, time / 97.0 ); 4653 vec2 uv3 = uv / vec2( 1091.0, 1027.0 ) - vec2( time / 109.0, time / -113.0 ); 4654 vec4 noise = texture2D( normalSampler, uv0 ) + 4655 texture2D( normalSampler, uv1 ) + 4656 texture2D( normalSampler, uv2 ) + 4657 texture2D( normalSampler, uv3 ); 4658 return noise * 0.5 - 1.0; 4659 } 4660 4661 void sunLight( const vec3 surfaceNormal, const vec3 eyeDirection, float shiny, float spec, float diffuse, inout vec3 diffuseColor, inout vec3 specularColor ) { 4662 vec3 reflection = normalize( reflect( -sunDirection, surfaceNormal ) ); 4663 float direction = max( 0.0, dot( eyeDirection, reflection ) ); 4664 specularColor += pow( direction, shiny ) * sunColor * spec; 4665 diffuseColor += max( dot( sunDirection, surfaceNormal ), 0.0 ) * sunColor * diffuse; 4666 } 4667 4668 #include <common> 4669 #include <packing> 4670 #include <bsdfs> 4671 #include <fog_pars_fragment> 4672 #include <logdepthbuf_pars_fragment> 4673 #include <lights_pars_begin> 4674 #include <shadowmap_pars_fragment> 4675 #include <shadowmask_pars_fragment> 4676 4677 void main() { 4678 4679 #include <logdepthbuf_fragment> 4680 vec4 noise = getNoise( worldPosition.xz * size ); 4681 vec3 surfaceNormal = normalize( noise.xzy * vec3( 1.5, 1.0, 1.5 ) ); 4682 4683 vec3 diffuseLight = vec3(0.0); 4684 vec3 specularLight = vec3(0.0); 4685 4686 vec3 worldToEye = eye-worldPosition.xyz;
4687 vec3 eyeDirection = normalize( worldToEye ); 4688 sunLight( surfaceNormal, eyeDirection, 100.0, 2.0, 0.5, diffuseLight, specularLight ); 4689 4690 float distance = length(worldToEye); 4691 4692 vec2 distortion = surfaceNormal.xz * ( 0.001 + 1.0 / distance ) * distortionScale; 4693 vec3 reflectionSample = vec3( texture2D( mirrorSampler, mirrorCoord.xy / mirrorCoord.w + distortion ) ); 4694 4695 float theta = max( dot( eyeDirection, surfaceNormal ), 0.0 ); 4696 float rf0 = 0.3; 4697 float reflectance = rf0 + ( 1.0 - rf0 ) * pow( ( 1.0 - theta ), 5.0 ); 4698 vec3 scatter = max( 0.0, dot( surfaceNormal, eyeDirection ) ) * waterColor; 4699 vec3 albedo = mix( ( sunColor * diffuseLight * 0.3 + scatter ) * getShadowMask(), ( vec3( 0.1 ) + reflectionSample * 0.9 + reflectionSample * specularLight ), reflectance); 4700 vec3 outgoingLight = albedo; 4701 gl_FragColor = vec4( outgoingLight, alpha ); 4702 4703 #include <tonemapping_fragment> 4704 #include <colorspace_fragment> 4705 #include <fog_fragment> 4706 }`},z=new dn({name:Y.name,uniforms:Gs.clone(Y.uniforms),vertexShader:Y.vertexShader,fragmentShader:Y.fragmentShader,lights:!0,side:v,fog:_});z.uniforms.mirrorSampler.value=k.texture,z.uniforms.textureMatrix.value=L,z.uniforms.alpha.value=a,z.uniforms.time.value=l,z.uniforms.normalSampler.value=c,z.uniforms.sunColor.value=d,z.uniforms.waterColor.value=p,z.uniforms.sunDirection.value=u,z.uniforms.distortionScale.value=x,z.uniforms.eye.value=m,n.material=z,n.onBeforeRender=function(W,V,G){if(b.setFromMatrixPosition(n.matrixWorld),A.setFromMatrixPosition(G.matrixWorld),w.extractRotation(n.matrixWorld),S.set(0,0,1),S.applyMatrix4(w),B.subVectors(b,A),B.dot(S)>0)return;B.reflect(S).negate(),B.add(b),w.extractRotation(G.matrixWorld),C.set(0,0,-1),C.applyMatrix4(w),C.add(A),R.subVectors(b,C),R.reflect(S).negate(),R.add(b),N.position.copy(B),N.up.set(0,1,0),N.up.applyMatrix4(w),N.up.reflect(S),N.lookAt(R),N.far=G.far,N.updateMatrixWorld(),N.projectionMatrix.copy(G.projectionMatrix),L.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),L.multiply(N.projectionMatrix),L.multiply(N.matrixWorldInverse),g.setFromNormalAndCoplanarPoint(S,b),g.applyMatrix4(N.matrixWorldInverse),P.set(g.normal.x,g.normal.y,g.normal.z,g.constant);const Z=N.projectionMatrix;E.x=(Math.sign(P.x)+Z.elements[8])/Z.elements[0],E.y=(Math.sign(P.y)+Z.elements[9])/Z.elements[5],E.z=-1,E.w=(1+Z.elements[10])/Z.elements[14],P.multiplyScalar(2/P.dot(E)),Z.elements[2]=P.x,Z.elements[6]=P.y,Z.elements[10]=P.z+1-o,Z.elements[14]=P.w,m.setFromMatrixPosition(G.matrixWorld);const O=W.getRenderTarget(),ee=W.xr.enabled,le=W.shadowMap.autoUpdate;n.visible=!1,W.xr.enabled=!1,W.shadowMap.autoUpdate=!1,W.setRenderTarget(k),W.state.buffers.depth.setMask(!0),W.autoClear===!1&&W.clear(),W.render(V,N),n.visible=!0,W.xr.enabled=ee,W.shadowMap.autoUpdate=le,W.setRenderTarget(O);const ge=G.viewport;ge!==void 0&&W.state.viewport(ge)}}}const k3={type:"change"},Qw={type:"start"},qF={type:"end"},wx=new Tc,O3=new Oo,HY=Math.cos(70*Xn.DEG2RAD),Ri=new H,ts=2*Math.PI,An={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},jS=1e-6;class GY extends iF{constructor(e,t=null){super(e,t),this.state=An.NONE,this.target=new H,this.cursor=new H,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:Cs.ROTATE,MIDDLE:Cs.DOLLY,RIGHT:Cs.PAN},this.touches={ONE:Rs.ROTATE,TWO:Rs.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new H,this._lastQuaternion=new si,this._lastTargetPosition=new H,this._quat=new si().setFromUnitVectors(e.up,new H(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new Fm,this._sphericalDelta=new Fm,this._scale=1,this._panOffset=new H,this._rotateStart=new xe,this._rotateEnd=new xe,this._rotateDelta=new xe,this._panStart=new xe,this._panEnd=new xe,this._panDelta=new xe,this._dollyStart=new xe,this._dollyEnd=new xe,this._dollyDelta=new xe,this._dollyDirection=new H,this._mouse=new xe,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=WY.bind(this),this._onPointerDown=jY.bind(this),this._onPointerUp=VY.bind(this),this._onContextMenu=QY.bind(this),this._onMouseWheel=JY.bind(this),this._onKeyDown=KY.bind(this),this._onTouchStart=qY.bind(this),this._onTouchMove=ZY.bind(this),this._onMouseDown=XY.bind(this),this._onMouseMove=YY.bind(this),this._interceptControlDown=$Y.bind(this),this._interceptControlUp=eJ.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(e){super.connect(e),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1}),this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.ownerDocument.removeEventListener("pointermove",this._onPointerMove),this.domElement.ownerDocument.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction="auto"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(e){e.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=e}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(k3),this.update(),this.state=An.NONE}update(e=null){const t=this.object.position;Ri.copy(t).sub(this.target),Ri.applyQuaternion(this._quat),this._spherical.setFromVector3(Ri),this.autoRotate&&this.state===An.NONE&&this._rotateLeft(this._getAutoRotationAngle(e)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let n=this.minAzimuthAngle,r=this.maxAzimuthAngle;isFinite(n)&&isFinite(r)&&(n<-Math.PI?n+=ts:n>Math.PI&&(n-=ts),r<-Math.PI?r+=ts:r>Math.PI&&(r-=ts),n<=r?this._spherical.theta=Math.max(n,Math.min(r,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(n+r)/2?Math.max(n,this._spherical.theta):Math.min(r,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let s=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radiu
vendor: 24,502 bytes, lines 4706-4761
4706s=this._clampDistance(this._spherical.radius);else{const o=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),s=o!=this._spherical.radius}if(Ri.setFromSpherical(this._spherical),Ri.applyQuaternion(this._quatInverse),t.copy(this.target).add(Ri),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let o=null;if(this.object.isPerspectiveCamera){const a=Ri.length();o=this._clampDistance(a*this._scale);const l=a-o;this.object.position.addScaledVector(this._dollyDirection,l),this.object.updateMatrixWorld(),s=!!l}else if(this.object.isOrthographicCamera){const a=new H(this._mouse.x,this._mouse.y,0);a.unproject(this.object);const l=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),s=l!==this.object.zoom;const c=new H(this._mouse.x,this._mouse.y,0);c.unproject(this.object),this.object.position.sub(c).add(a),this.object.updateMatrixWorld(),o=Ri.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;o!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position):(wx.origin.copy(this.object.position),wx.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(wx.direction))<HY?this.object.lookAt(this.target):(O3.setFromNormalAndCoplanarPoint(this.object.up,this.target),wx.intersectPlane(O3,this.target))))}else if(this.object.isOrthographicCamera){const o=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),o!==this.object.zoom&&(this.object.updateProjectionMatrix(),s=!0)}return this._scale=1,this._performCursorZoom=!1,s||this._lastPosition.distanceToSquared(this.object.position)>jS||8*(1-this._lastQuaternion.dot(this.object.quaternion))>jS||this._lastTargetPosition.distanceToSquared(this.target)>jS?(this.dispatchEvent(k3),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(e){return e!==null?ts/60*this.autoRotateSpeed*e:ts/60/60*this.autoRotateSpeed}_getZoomScale(e){const t=Math.abs(e*.01);return Math.pow(.95,this.zoomSpeed*t)}_rotateLeft(e){this._sphericalDelta.theta-=e}_rotateUp(e){this._sphericalDelta.phi-=e}_panLeft(e,t){Ri.setFromMatrixColumn(t,0),Ri.multiplyScalar(-e),this._panOffset.add(Ri)}_panUp(e,t){this.screenSpacePanning===!0?Ri.setFromMatrixColumn(t,1):(Ri.setFromMatrixColumn(t,0),Ri.crossVectors(this.object.up,Ri)),Ri.multiplyScalar(e),this._panOffset.add(Ri)}_pan(e,t){const n=this.domElement;if(this.object.isPerspectiveCamera){const r=this.object.position;Ri.copy(r).sub(this.target);let s=Ri.length();s*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*e*s/n.clientHeight,this.object.matrix),this._panUp(2*t*s/n.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(e*(this.object.right-this.object.left)/this.object.zoom/n.clientWidth,this.object.matrix),this._panUp(t*(this.object.top-this.object.bottom)/this.object.zoom/n.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(e,t){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const n=this.domElement.getBoundingClientRect(),r=e-n.left,s=t-n.top,o=n.width,a=n.height;this._mouse.x=r/o*2-1,this._mouse.y=-(s/a)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(e){return Math.max(this.minDistance,Math.min(this.maxDistance,e))}_handleMouseDownRotate(e){this._rotateStart.set(e.clientX,e.clientY)}_handleMouseDownDolly(e){this._updateZoomParameters(e.clientX,e.clientX),this._dollyStart.set(e.clientX,e.clientY)}_handleMouseDownPan(e){this._panStart.set(e.clientX,e.clientY)}_handleMouseMoveRotate(e){this._rotateEnd.set(e.clientX,e.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const t=this.domElement;this._rotateLeft(ts*this._rotateDelta.x/t.clientHeight),this._rotateUp(ts*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(e){this._dollyEnd.set(e.clientX,e.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(e){this._panEnd.set(e.clientX,e.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(e){this._updateZoomParameters(e.clientX,e.clientY),e.deltaY<0?this._dollyIn(this._getZoomScale(e.deltaY)):e.deltaY>0&&this._dollyOut(this._getZoomScale(e.deltaY)),this.update()}_handleKeyDown(e){let t=!1;switch(e.code){case this.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(ts*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),t=!0;break;case this.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(-ts*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),t=!0;break;case this.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(ts*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),t=!0;break;case this.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(-ts*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),t=!0;break}t&&(e.preventDefault(),this.update())}_handleTouchStartRotate(e){if(this._pointers.length===1)this._rotateStart.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._rotateStart.set(n,r)}}_handleTouchStartPan(e){if(this._pointers.length===1)this._panStart.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._panStart.set(n,r)}}_handleTouchStartDolly(e){const t=this._getSecondPointerPosition(e),n=e.pageX-t.x,r=e.pageY-t.y,s=Math.sqrt(n*n+r*r);this._dollyStart.set(0,s)}_handleTouchStartDollyPan(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enablePan&&this._handleTouchStartPan(e)}_handleTouchStartDollyRotate(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enableRotate&&this._handleTouchStartRotate(e)}_handleTouchMoveRotate(e){if(this._pointers.length==1)this._rotateEnd.set(e.pageX,e.pageY);else{const n=this._getSecondPointerPosition(e),r=.5*(e.pageX+n.x),s=.5*(e.pageY+n.y);this._rotateEnd.set(r,s)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const t=this.domElement;this._rotateLeft(ts*this._rotateDelta.x/t.clientHeight),this._rotateUp(ts*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(e){if(this._pointers.length===1)this._panEnd.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);this._panEnd.set(n,r)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(e){const t=this._getSecondPointerPosition(e),n=e.pageX-t.x,r=e.pageY-t.y,s=Math.sqrt(n*n+r*r);this._dollyEnd.set(0,s),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);const o=(e.pageX+t.x)*.5,a=(e.pageY+t.y)*.5;this._updateZoomParameters(o,a)}_handleTouchMoveDollyPan(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enablePan&&this._handleTouchMovePan(e)}_handleTouchMoveDollyRotate(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enableRotate&&this._handleTouchMoveRotate(e)}_addPointer(e){this._pointers.push(e.pointerId)}_removePointer(e){delete this._pointerPositions[e.pointerId];for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId){this._pointers.splice(t,1);return}}_isTrackingPointer(e){for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId)return!0;return!1}_trackPointer(e){let t=this._pointerPositions[e.pointerId];t===void 0&&(t=new xe,this._pointerPositions[e.pointerId]=t),t.set(e.pageX,e.pageY)}_getSecondPointerPosition(e){const t=e.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[t]}_customWheelEvent(e){const t=e.deltaMode,n={clientX:e.clientX,clientY:e.clientY,deltaY:e.deltaY};switch(t){case 1:n.deltaY*=16;break;case 2:n.deltaY*=100;break}return e.ctrlKey&&!this._controlActive&&(n.deltaY*=10),n}}function jY(i){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(i.pointerId),this.domElement.ownerDocument.addEventListener("pointermove",this._onPointerMove),this.domElement.ownerDocument.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(i)&&(this._addPointer(i),i.pointerType==="touch"?this._onTouchStart(i):this._onMouseDown(i)))}function WY(i){this.enabled!==!1&&(i.pointerType==="touch"?this._onTouchMove(i):this._onMouseMove(i))}function VY(i){switch(this._removePointer(i),this._pointers.length){case 0:this.domElement.releasePointerCapture(i.pointerId),this.domElement.ownerDocument.removeEventListener("pointermove",this._onPointerMove),this.domElement.ownerDocument.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(qF),this.state=An.NONE;break;case 1:const e=this._pointers[0],t=this._pointerPositions[e];this._onTouchStart({pointerId:e,pageX:t.x,pageY:t.y});break}}function XY(i){let e;switch(i.button){case 0:e=this.mouseButtons.LEFT;break;case 1:e=this.mouseButtons.MIDDLE;break;case 2:e=this.mouseButtons.RIGHT;break;default:e=-1}switch(e){case Cs.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(i),this.state=An.DOLLY;break;case Cs.ROTATE:if(i.ctrlKey||i.metaKey||i.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(i),this.state=An.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(i),this.state=An.ROTATE}break;case Cs.PAN:if(i.ctrlKey||i.metaKey||i.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(i),this.state=An.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(i),this.state=An.PAN}break;default:this.state=An.NONE}this.state!==An.NONE&&this.dispatchEvent(Qw)}function YY(i){switch(this.state){case An.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(i);break;case An.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(i);break;case An.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(i);break}}function JY(i){this.enabled===!1||this.enableZoom===!1||this.state!==An.NONE||(i.preventDefault(),this.dispatchEvent(Qw),this._handleMouseWheel(this._customWheelEvent(i)),this.dispatchEvent(qF))}function KY(i){this.enabled!==!1&&this._handleKeyDown(i)}function qY(i){switch(this._trackPointer(i),this._pointers.length){case 1:switch(this.touches.ONE){case Rs.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(i),this.state=An.TOUCH_ROTATE;break;case Rs.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(i),this.state=An.TOUCH_PAN;break;default:this.state=An.NONE}break;case 2:switch(this.touches.TWO){case Rs.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(i),this.state=An.TOUCH_DOLLY_PAN;break;case Rs.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(i),this.state=An.TOUCH_DOLLY_ROTATE;break;default:this.state=An.NONE}break;default:this.state=An.NONE}this.state!==An.NONE&&this.dispatchEvent(Qw)}function ZY(i){switch(this._trackPointer(i),this.state){case An.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(i),this.update();break;case An.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(i),this.update();break;case An.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(i),this.update();break;case An.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(i),this.update();break;default:this.state=An.NONE}}function QY(i){this.enabled!==!1&&i.preventDefault()}function $Y(i){i.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function eJ(i){i.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}const ev={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:` 4707 4708 varying vec2 vUv; 4709 4710 void main() { 4711 4712 vUv = uv; 4713 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 4714 4715 }`,fragmentShader:` 4716 4717 uniform float opacity; 4718 4719 uniform sampler2D tDiffuse; 4720 4721 varying vec2 vUv; 4722 4723 void main() { 4724 4725 vec4 texel = texture2D( tDiffuse, vUv ); 4726 gl_FragColor = opacity * texel; 4727 4728 4729 }`};class ad{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const tJ=new or(-1,1,1,-1,0,1);class nJ extends Rt{constructor(){super(),this.setAttribute("position",new ct([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new ct([0,2,0,0,2,0],2))}}const iJ=new nJ;class z1{constructor(e){this._mesh=new Kt(iJ,e)}dispose(){this._mesh.geometry.dispose()}render(e){e.render(this._mesh,tJ)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}}class ZF extends ad{constructor(e,t="tDiffuse"){super(),this.textureID=t,this.uniforms=null,this.material=null,e instanceof dn?(this.uniforms=e.uniforms,this.material=e):e&&(this.uniforms=Gs.clone(e.uniforms),this.material=new dn({name:e.name!==void 0?e.name:"unspecified",defines:Object.assign({},e.defines),uniforms:this.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader})),this._fsQuad=new z1(this.material)}render(e,t,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this._fsQuad.material=this.material,this.renderToScreen?(e.setRenderTarget(null),this._fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),this._fsQuad.render(e))}dispose(){this.material.dispose(),this._fsQuad.dispose()}}class U3 extends ad{constructor(e,t){super(),this.scene=e,this.camera=t,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(e,t,n){const r=e.getContext(),s=e.state;s.buffers.color.setMask(!1),s.buffers.depth.setMask(!1),s.buffers.color.setLocked(!0),s.buffers.depth.setLocked(!0);let o,a;this.inverse?(o=0,a=1):(o=1,a=0),s.buffers.stencil.setTest(!0),s.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),s.buffers.stencil.setFunc(r.ALWAYS,o,4294967295),s.buffers.stencil.setClear(a),s.buffers.stencil.setLocked(!0),e.setRenderTarget(n),this.clear&&e.clear(),e.render(this.scene,this.camera),e.setRenderTarget(t),this.clear&&e.clear(),e.render(this.scene,this.camera),s.buffers.color.setLocked(!1),s.buffers.depth.setLocked(!1),s.buffers.color.setMask(!0),s.buffers.depth.setMask(!0),s.buffers.stencil.setLocked(!1),s.buffers.stencil.setFunc(r.EQUAL,1,4294967295),s.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),s.buffers.stencil.setLocked(!0)}}class rJ extends ad{constructor(){super(),this.needsSwap=!1}render(e){e.state.buffers.stencil.setLocked(!1),e.state.buffers.stencil.setTest(!1)}}class LM{constructor(e,t){if(this.renderer=e,this._pixelRatio=e.getPixelRatio(),t===void 0){const n=e.getSize(new xe);this._width=n.width,this._height=n.height,t=new Gn(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:sr}),t.texture.name="EffectComposer.rt1"}else this._width=t.width,this._height=t.height;this.renderTarget1=t,this.renderTarget2=t.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new ZF(ev),this.copyPass.material.blending=jo,this.clock=new n0}swapBuffers(){const e=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=e}addPass(e){this.passes.push(e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(e,t){this.passes.splice(t,0,e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(e){const t=this.passes.indexOf(e);t!==-1&&this.passes.splice(t,1)}isLastEnabledPass(e){for(let t=e+1;t<this.passes.length;t++)if(this.passes[t].enabled)return!1;return!0}render(e){e===void 0&&(e=this.clock.getDelta());const t=this.renderer.getRenderTarget();let n=!1;for(let r=0,s=this.passes.length;r<s;r++){const o=this.passes[r];if(o.enabled!==!1){if(o.renderToScreen=this.renderToScreen&&this.isLastEnabledPass(r),o.render(this.renderer,this.writeBuffer,this.readBuffer,e,n),o.needsSwap){if(n){const a=this.renderer.getContext(),l=this.renderer.state.buffers.stencil;l.setFunc(a.NOTEQUAL,1,4294967295),this.copyPass.render(this.renderer,this.writeBuffer,this.readBuffer,e),l.setFunc(a.EQUAL,1,4294967295)}this.swapBuffers()}U3!==void 0&&(o instanceof U3?n=!0:o instanceof rJ&&(n=!1))}}this.renderer.setRenderTarget(t)}reset(e){if(e===void 0){const t=this.renderer.getSize(new xe);this._pixelRatio=this.renderer.getPixelRatio(),this._width=t.width,this._height=t.height,e=this.renderTarget1.clone(),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.renderTarget1=e,this.renderTarget2=e.clone(),this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2}setSize(e,t){this._width=e,this._height=t;const n=this._width*this._pixelRatio,r=this._height*this._pixelRatio;this.renderTarget1.setSize(n,r),this.renderTarget2.setSize(n,r);for(let s=0;s<this.passes.length;s++)this.passes[s].setSize(n,r)}setPixelRatio(e){this._pixelRatio=e,this.setSize(this._width,this._height)}dispose(){this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.copyPass.dispose()}}class BM extends ad{constructor(e,t,n=null,r=null,s=null){super(),this.scene=e,this.camera=t,this.overrideMaterial=n,this.clearColor=r,this.clearAlpha=s,this.clear=!0,this.clearDepth=!1,this.needsSwap=!1,this.isRenderPass=!0,this._oldClearColor=new Ve}render(e,t,n){const r=e.autoClear;e.autoClear=!1;let s,o;this.overrideMaterial!==null&&(o=this.scene.overrideMaterial,this.scene.overrideMaterial=this.overrideMaterial),this.clearColor!==null&&(e.getClearColor(this._oldClearColor),e.setClearColor(this.clearColor,e.getClearAlpha())),this.clearAlpha!==null&&(s=e.getClearAlpha(),e.setClearAlpha(this.clearAlpha)),this.clearDepth==!0&&e.clearDepth(),e.setRenderTarget(this.renderToScreen?null:n),this.clear===!0&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),e.render(this.scene,this.camera),this.clearColor!==null&&e.setClearColor(this._oldClearColor),this.clearAlpha!==null&&e.setClearAlpha(s),this.overrideMaterial!==null&&(this.scene.overrideMaterial=o),e.autoClear=r}}const sJ={uniforms:{tDiffuse:{value:null},luminosityThreshold:{value:1},smoothWidth:{value:1},defaultColor:{value:new Ve(0)},defaultOpacity:{value:0}},vertexShader:` 4730 4731 varying vec2 vUv; 4732 4733 void main() { 4734 4735 vUv = uv; 4736 4737 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 4738 4739 }`,fragmentShader:` 4740 4741 uniform sampler2D tDiffuse; 4742 uniform vec3 defaultColor; 4743 uniform float defaultOpacity; 4744 uniform float luminosityThreshold; 4745 uniform float smoothWidth; 4746 4747 varying vec2 vUv; 4748 4749 void main() { 4750 4751 vec4 texel = texture2D( tDiffuse, vUv ); 4752 4753 float v = luminance( texel.xyz ); 4754 4755 vec4 outputColor = vec4( defaultColor.rgb, defaultOpacity ); 4756 4757 float alpha = smoothstep( luminosityThreshold, luminosityThreshold + smoothWidth, v ); 4758 4759 gl_FragColor = mix( outputColor, texel, alpha ); 4760 4761 }`};class Zu extends ad{constructor(e,t=1,n,r){super(),this.strength=t,this.radius=n,this.threshold=r,this.resolution=e!==void 0?new xe(e.x,e.y):new xe(256,256),this.clearColor=new Ve(0,0,0),this.needsSwap=!1,this.renderTargetsHorizontal=[],this.renderTargetsVertical=[],this.nMips=5;let s=Math.round(this.resolution.x/2),o=Math.round(this.resolution.y/2);this.renderTargetBright=new Gn(s,o,{type:sr}),this.renderTargetBright.texture.name="UnrealBloomPass.bright",this.renderTargetBright.texture.generateMipmaps=!1;for(let u=0;u<this.nMips;u++){const d=new Gn(s,o,{type:sr});d.texture.name="UnrealBloomPass.h"+u,d.texture.generateMipmaps=!1,this.renderTargetsHorizontal.push(d);const p=new Gn(s,o,{type:sr});p.texture.name="UnrealBloomPass.v"+u,p.texture.generateMipmaps=!1,this.renderTargetsVertical.push(p),s=Math.round(s/2),o=Math.round(o/2)}const a=sJ;this.highPassUniforms=Gs.clone(a.uniforms),this.highPassUniforms.luminosityThreshold.value=r,this.highPassUniforms.smoothWidth.value=.01,this.materialHighPassFilter=new dn({uniforms:this.highPassUniforms,vertexShader:a.vertexShader,fragmentShader:a.fragmentShader}),this.separableBlurMaterials=[];const l=[6,10,14,18,22];s=Math.round(this.resolution.x/2),o=Math.round(this.resolution.y/2);for(let u=0;u<this.nMips;u++)this.separableBlurMaterials.push(this._getSeparableBlurMaterial(l[u])),this.separableBlurMaterials[u].uniforms.invSize.value=new xe(1/s,1/o),s=Math.round(s/2),o=Math.round(o/2);this.compositeMaterial=this._getCompositeMaterial(this.nMips),this.compositeMaterial.uniforms.blurTexture1.value=this.renderTargetsVertical[0].texture,this.compositeMaterial.uniforms.blurTexture2.value=this.renderTargetsVertical[1].texture,this.compositeMaterial.uniforms.blurTexture3.value=this.renderTargetsVertical[2].texture,this.compositeMaterial.uniforms.blurTexture4.value=this.renderTargetsVertical[3].texture,this.compositeMaterial.uniforms.blurTexture5.value=this.renderTargetsVertical[4].texture,this.compositeMaterial.uniforms.bloomStrength.value=t,this.compositeMaterial.uniforms.bloomRadius.value=.1;const c=[1,.8,.6,.4,.2];this.compositeMaterial.uniforms.bloomFactors.value=c,this.bloomTintColors=[new H(1,1,1),new H(1,1,1),new H(1,1,1),new H(1,1,1),new H(1,1,1)],this.compositeMaterial.uniforms.bloomTintColors.value=this.bloomTintColors,this.copyUniforms=Gs.clone(ev.uniforms),this.blendMaterial=new dn({uniforms:this.copyUniforms,vertexShader:ev.vertexShader,fragmentShader:ev.fragmentShader,premultipliedAlpha:!0,blending:_a,depthTest:!1,depthWrite:!1,transparent:!0}),this._oldClearColor=new Ve,this._oldClearAlpha=1,this._basic=new pi,this._fsQuad=new z1(null)}dispose(){for(let e=0;e<this.renderTargetsHorizontal.length;e++)this.renderTargetsHorizontal[e].dispose();for(let e=0;e<this.renderTargetsVertical.length;e++)this.renderTargetsVertical[e].dispose();this.renderTargetBright.dispose();for(let e=0;e<this.separableBlurMaterials.length;e++)this.separableBlurMaterials[e].dispose();this.compositeMaterial.dispose(),this.blendMaterial.dispose(),this._basic.dispose(),this._fsQuad.dispose()}setSize(e,t){let n=Math.round(e/2),r=Math.round(t/2);this.renderTargetBright.setSize(n,r);for(let s=0;s<this.nMips;s++)this.renderTargetsHorizontal[s].setSize(n,r),this.renderTargetsVertical[s].setSize(n,r),this.separableBlurMaterials[s].uniforms.invSize.value=new xe(1/n,1/r),n=Math.round(n/2),r=Math.round(r/2)}
vendor: 6,632 bytes, lines 4761-4914
4761render(e,t,n,r,s){e.getClearColor(this._oldClearColor),this._oldClearAlpha=e.getClearAlpha();const o=e.autoClear;e.autoClear=!1,e.setClearColor(this.clearColor,0),s&&e.state.buffers.stencil.setTest(!1),this.renderToScreen&&(this._fsQuad.material=this._basic,this._basic.map=n.texture,e.setRenderTarget(null),e.clear(),this._fsQuad.render(e)),this.highPassUniforms.tDiffuse.value=n.texture,this.highPassUniforms.luminosityThreshold.value=this.threshold,this._fsQuad.material=this.materialHighPassFilter,e.setRenderTarget(this.renderTargetBright),e.clear(),this._fsQuad.render(e);let a=this.renderTargetBright;for(let l=0;l<this.nMips;l++)this._fsQuad.material=this.separableBlurMaterials[l],this.separableBlurMaterials[l].uniforms.colorTexture.value=a.texture,this.separableBlurMaterials[l].uniforms.direction.value=Zu.BlurDirectionX,e.setRenderTarget(this.renderTargetsHorizontal[l]),e.clear(),this._fsQuad.render(e),this.separableBlurMaterials[l].uniforms.colorTexture.value=this.renderTargetsHorizontal[l].texture,this.separableBlurMaterials[l].uniforms.direction.value=Zu.BlurDirectionY,e.setRenderTarget(this.renderTargetsVertical[l]),e.clear(),this._fsQuad.render(e),a=this.renderTargetsVertical[l];this._fsQuad.material=this.compositeMaterial,this.compositeMaterial.uniforms.bloomStrength.value=this.strength,this.compositeMaterial.uniforms.bloomRadius.value=this.radius,this.compositeMaterial.uniforms.bloomTintColors.value=this.bloomTintColors,e.setRenderTarget(this.renderTargetsHorizontal[0]),e.clear(),this._fsQuad.render(e),this._fsQuad.material=this.blendMaterial,this.copyUniforms.tDiffuse.value=this.renderTargetsHorizontal[0].texture,s&&e.state.buffers.stencil.setTest(!0),this.renderToScreen?(e.setRenderTarget(null),this._fsQuad.render(e)):(e.setRenderTarget(n),this._fsQuad.render(e)),e.setClearColor(this._oldClearColor,this._oldClearAlpha),e.autoClear=o}_getSeparableBlurMaterial(e){const t=[],n=e/3;for(let r=0;r<e;r++)t.push(.39894*Math.exp(-.5*r*r/(n*n))/n);return new dn({defines:{KERNEL_RADIUS:e},uniforms:{colorTexture:{value:null},invSize:{value:new xe(.5,.5)},direction:{value:new xe(.5,.5)},gaussianCoefficients:{value:t}},vertexShader:` 4762 4763 varying vec2 vUv; 4764 4765 void main() { 4766 4767 vUv = uv; 4768 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 4769 4770 }`,fragmentShader:` 4771 4772 #include <common> 4773 4774 varying vec2 vUv; 4775 4776 uniform sampler2D colorTexture; 4777 uniform vec2 invSize; 4778 uniform vec2 direction; 4779 uniform float gaussianCoefficients[KERNEL_RADIUS]; 4780 4781 void main() { 4782 4783 float weightSum = gaussianCoefficients[0]; 4784 vec3 diffuseSum = texture2D( colorTexture, vUv ).rgb * weightSum; 4785 4786 for ( int i = 1; i < KERNEL_RADIUS; i ++ ) { 4787 4788 float x = float( i ); 4789 float w = gaussianCoefficients[i]; 4790 vec2 uvOffset = direction * invSize * x; 4791 vec3 sample1 = texture2D( colorTexture, vUv + uvOffset ).rgb; 4792 vec3 sample2 = texture2D( colorTexture, vUv - uvOffset ).rgb; 4793 diffuseSum += ( sample1 + sample2 ) * w; 4794 4795 } 4796 4797 gl_FragColor = vec4( diffuseSum, 1.0 ); 4798 4799 }`})}_getCompositeMaterial(e){return new dn({defines:{NUM_MIPS:e},uniforms:{blurTexture1:{value:null},blurTexture2:{value:null},blurTexture3:{value:null},blurTexture4:{value:null},blurTexture5:{value:null},bloomStrength:{value:1},bloomFactors:{value:null},bloomTintColors:{value:null},bloomRadius:{value:0}},vertexShader:` 4800 4801 varying vec2 vUv; 4802 4803 void main() { 4804 4805 vUv = uv; 4806 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 4807 4808 }`,fragmentShader:` 4809 4810 varying vec2 vUv; 4811 4812 uniform sampler2D blurTexture1; 4813 uniform sampler2D blurTexture2; 4814 uniform sampler2D blurTexture3; 4815 uniform sampler2D blurTexture4; 4816 uniform sampler2D blurTexture5; 4817 uniform float bloomStrength; 4818 uniform float bloomRadius; 4819 uniform float bloomFactors[NUM_MIPS]; 4820 uniform vec3 bloomTintColors[NUM_MIPS]; 4821 4822 float lerpBloomFactor( const in float factor ) { 4823 4824 float mirrorFactor = 1.2 - factor; 4825 return mix( factor, mirrorFactor, bloomRadius ); 4826 4827 } 4828 4829 void main() { 4830 4831 // 3.0 for backwards compatibility with previous alpha-based intensity 4832 vec3 bloom = 3.0 * bloomStrength * ( 4833 lerpBloomFactor( bloomFactors[ 0 ] ) * bloomTintColors[ 0 ] * texture2D( blurTexture1, vUv ).rgb + 4834 lerpBloomFactor( bloomFactors[ 1 ] ) * bloomTintColors[ 1 ] * texture2D( blurTexture2, vUv ).rgb + 4835 lerpBloomFactor( bloomFactors[ 2 ] ) * bloomTintColors[ 2 ] * texture2D( blurTexture3, vUv ).rgb + 4836 lerpBloomFactor( bloomFactors[ 3 ] ) * bloomTintColors[ 3 ] * texture2D( blurTexture4, vUv ).rgb + 4837 lerpBloomFactor( bloomFactors[ 4 ] ) * bloomTintColors[ 4 ] * texture2D( blurTexture5, vUv ).rgb 4838 ); 4839 4840 float bloomAlpha = max( bloom.r, max( bloom.g, bloom.b ) ); 4841 gl_FragColor = vec4( bloom, bloomAlpha ); 4842 4843 }`})}}Zu.BlurDirectionX=new xe(1,0);Zu.BlurDirectionY=new xe(0,1);const Tx={name:"OutputShader",uniforms:{tDiffuse:{value:null},toneMappingExposure:{value:1}},vertexShader:` 4844 precision highp float; 4845 4846 uniform mat4 modelViewMatrix; 4847 uniform mat4 projectionMatrix; 4848 4849 attribute vec3 position; 4850 attribute vec2 uv; 4851 4852 varying vec2 vUv; 4853 4854 void main() { 4855 4856 vUv = uv; 4857 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 4858 4859 }`,fragmentShader:` 4860 4861 precision highp float; 4862 4863 uniform sampler2D tDiffuse; 4864 4865 #include <tonemapping_pars_fragment> 4866 #include <colorspace_pars_fragment> 4867 4868 varying vec2 vUv; 4869 4870 void main() { 4871 4872 gl_FragColor = texture2D( tDiffuse, vUv ); 4873 4874 // tone mapping 4875 4876 #ifdef LINEAR_TONE_MAPPING 4877 4878 gl_FragColor.rgb = LinearToneMapping( gl_FragColor.rgb ); 4879 4880 #elif defined( REINHARD_TONE_MAPPING ) 4881 4882 gl_FragColor.rgb = ReinhardToneMapping( gl_FragColor.rgb ); 4883 4884 #elif defined( CINEON_TONE_MAPPING ) 4885 4886 gl_FragColor.rgb = CineonToneMapping( gl_FragColor.rgb ); 4887 4888 #elif defined( ACES_FILMIC_TONE_MAPPING ) 4889 4890 gl_FragColor.rgb = ACESFilmicToneMapping( gl_FragColor.rgb ); 4891 4892 #elif defined( AGX_TONE_MAPPING ) 4893 4894 gl_FragColor.rgb = AgXToneMapping( gl_FragColor.rgb ); 4895 4896 #elif defined( NEUTRAL_TONE_MAPPING ) 4897 4898 gl_FragColor.rgb = NeutralToneMapping( gl_FragColor.rgb ); 4899 4900 #elif defined( CUSTOM_TONE_MAPPING ) 4901 4902 gl_FragColor.rgb = CustomToneMapping( gl_FragColor.rgb ); 4903 4904 #endif 4905 4906 // color space 4907 4908 #ifdef SRGB_TRANSFER 4909 4910 gl_FragColor = sRGBTransferOETF( gl_FragColor ); 4911 4912 #endif 4913 4914 }`};class oJ extends ad{constructor(){super(),this.isOutputPass=!0,this.uniforms=Gs.clone(Tx.uniforms),this.material=new D1({name:Tx.name,uniforms:this.uniforms,vertexShader:Tx.vertexShader,fragmentShader:Tx.fragmentShader}
vendor: 1,491 bytes, lines 4914-4921
4914),this._fsQuad=new z1(this.material),this._outputColorSpace=null,this._toneMapping=null}render(e,t,n){this.uniforms.tDiffuse.value=n.texture,this.uniforms.toneMappingExposure.value=e.toneMappingExposure,(this._outputColorSpace!==e.outputColorSpace||this._toneMapping!==e.toneMapping)&&(this._outputColorSpace=e.outputColorSpace,this._toneMapping=e.toneMapping,this.material.defines={},Yt.getTransfer(this._outputColorSpace)===vn&&(this.material.defines.SRGB_TRANSFER=""),this._toneMapping===qy?this.material.defines.LINEAR_TONE_MAPPING="":this._toneMapping===Zy?this.material.defines.REINHARD_TONE_MAPPING="":this._toneMapping===Qy?this.material.defines.CINEON_TONE_MAPPING="":this._toneMapping===Vm?this.material.defines.ACES_FILMIC_TONE_MAPPING="":this._toneMapping===e1?this.material.defines.AGX_TONE_MAPPING="":this._toneMapping===t1?this.material.defines.NEUTRAL_TONE_MAPPING="":this._toneMapping===$y&&(this.material.defines.CUSTOM_TONE_MAPPING=""),this.material.needsUpdate=!0),this.renderToScreen===!0?(e.setRenderTarget(null),this._fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),this._fsQuad.render(e))}dispose(){this.material.dispose(),this._fsQuad.dispose()}}const Ex={defines:{SMAA_THRESHOLD:"0.1"},uniforms:{tDiffuse:{value:null},resolution:{value:new xe(1/1024,1/512)}},vertexShader:` 4915 4916 uniform vec2 resolution; 4917 4918 varying vec2 vUv; 4919 varying vec4 vOffset[ 3 ]; 4920 4921 void SMAAEdgeDetectionVS( vec2 texcoord ) {
4922 vOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 ); // WebGL port note: Changed sign in W component 4923 vOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 ); // WebGL port note: Changed sign in W component 4924 vOffset[ 2 ] = texcoord.xyxy + resolution.xyxy * vec4( -2.0, 0.0, 0.0, 2.0 ); // WebGL port note: Changed sign in W component 4925 } 4926 4927 void main() { 4928 4929 vUv = uv; 4930 4931 SMAAEdgeDetectionVS( vUv ); 4932 4933 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 4934 4935 }`,fragmentShader:` 4936 4937 uniform sampler2D tDiffuse; 4938 4939 varying vec2 vUv; 4940 varying vec4 vOffset[ 3 ]; 4941 4942 vec4 SMAAColorEdgeDetectionPS( vec2 texcoord, vec4 offset[3], sampler2D colorTex ) { 4943 vec2 threshold = vec2( SMAA_THRESHOLD, SMAA_THRESHOLD ); 4944 4945 // Calculate color deltas: 4946 vec4 delta; 4947 vec3 C = texture2D( colorTex, texcoord ).rgb; 4948 4949 vec3 Cleft = texture2D( colorTex, offset[0].xy ).rgb; 4950 vec3 t = abs( C - Cleft ); 4951 delta.x = max( max( t.r, t.g ), t.b ); 4952 4953 vec3 Ctop = texture2D( colorTex, offset[0].zw ).rgb; 4954 t = abs( C - Ctop ); 4955 delta.y = max( max( t.r, t.g ), t.b ); 4956 4957 // We do the usual threshold: 4958 vec2 edges = step( threshold, delta.xy ); 4959 4960 // Then discard if there is no edge: 4961 if ( dot( edges, vec2( 1.0, 1.0 ) ) == 0.0 ) 4962 discard; 4963 4964 // Calculate right and bottom deltas: 4965 vec3 Cright = texture2D( colorTex, offset[1].xy ).rgb; 4966 t = abs( C - Cright ); 4967 delta.z = max( max( t.r, t.g ), t.b ); 4968 4969 vec3 Cbottom = texture2D( colorTex, offset[1].zw ).rgb; 4970 t = abs( C - Cbottom ); 4971 delta.w = max( max( t.r, t.g ), t.b ); 4972 4973 // Calculate the maximum delta in the direct neighborhood: 4974 float maxDelta = max( max( max( delta.x, delta.y ), delta.z ), delta.w ); 4975 4976 // Calculate left-left and top-top deltas: 4977 vec3 Cleftleft = texture2D( colorTex, offset[2].xy ).rgb; 4978 t = abs( C - Cleftleft ); 4979 delta.z = max( max( t.r, t.g ), t.b ); 4980 4981 vec3 Ctoptop = texture2D( colorTex, offset[2].zw ).rgb; 4982 t = abs( C - Ctoptop ); 4983 delta.w = max( max( t.r, t.g ), t.b ); 4984 4985 // Calculate the final maximum delta: 4986 maxDelta = max( max( maxDelta, delta.z ), delta.w ); 4987 4988 // Local contrast adaptation in action: 4989 edges.xy *= step( 0.5 * maxDelta, delta.xy ); 4990 4991 return vec4( edges, 0.0, 0.0 ); 4992 } 4993 4994 void main() { 4995 4996 gl_FragColor = SMAAColorEdgeDetectionPS( vUv, vOffset, tDiffuse ); 4997 4998 }`},Cx={defines:{SMAA_MAX_SEARCH_STEPS:"8",SMAA_AREATEX_MAX_DISTANCE:"16",SMAA_AREATEX_PIXEL_SIZE:"( 1.0 / vec2( 160.0, 560.0 ) )",SMAA_AREATEX_SUBTEX_SIZE:"( 1.0 / 7.0 )"},uniforms:{tDiffuse:{value:null},tArea:{value:null},tSearch:{value:null},resolution:{value:new xe(1/1024,1/512)}},vertexShader:` 4999 5000 uniform vec2 resolution; 5001 5002 varying vec2 vUv; 5003 varying vec4 vOffset[ 3 ]; 5004 varying vec2 vPixcoord; 5005 5006 void SMAABlendingWeightCalculationVS( vec2 texcoord ) { 5007 vPixcoord = texcoord / resolution; 5008 5009 // We will use these offsets for the searches later on (see @PSEUDO_GATHER4):
5010 vOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -0.25, 0.125, 1.25, 0.125 ); // WebGL port note: Changed sign in Y and W components 5011 vOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( -0.125, 0.25, -0.125, -1.25 ); // WebGL port note: Changed sign in Y and W components 5012 5013 // And these for the searches, they indicate the ends of the loops: 5014 vOffset[ 2 ] = vec4( vOffset[ 0 ].xz, vOffset[ 1 ].yw ) + vec4( -2.0, 2.0, -2.0, 2.0 ) * resolution.xxyy * float( SMAA_MAX_SEARCH_STEPS ); 5015 5016 } 5017 5018 void main() { 5019 5020 vUv = uv; 5021 5022 SMAABlendingWeightCalculationVS( vUv ); 5023 5024 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 5025 5026 }`,fragmentShader:` 5027 5028 #define SMAASampleLevelZeroOffset( tex, coord, offset ) texture2D( tex, coord + float( offset ) * resolution, 0.0 ) 5029 5030 uniform sampler2D tDiffuse; 5031 uniform sampler2D tArea; 5032 uniform sampler2D tSearch; 5033 uniform vec2 resolution; 5034 5035 varying vec2 vUv; 5036 varying vec4 vOffset[3]; 5037 varying vec2 vPixcoord; 5038 5039 #if __VERSION__ == 100 5040 vec2 round( vec2 x ) { 5041 return sign( x ) * floor( abs( x ) + 0.5 ); 5042 } 5043 #endif 5044 5045 float SMAASearchLength( sampler2D searchTex, vec2 e, float bias, float scale ) { 5046 // Not required if searchTex accesses are set to point: 5047 // float2 SEARCH_TEX_PIXEL_SIZE = 1.0 / float2(66.0, 33.0); 5048 // e = float2(bias, 0.0) + 0.5 * SEARCH_TEX_PIXEL_SIZE + 5049 // e * float2(scale, 1.0) * float2(64.0, 32.0) * SEARCH_TEX_PIXEL_SIZE; 5050 e.r = bias + e.r * scale; 5051 return 255.0 * texture2D( searchTex, e, 0.0 ).r; 5052 } 5053 5054 float SMAASearchXLeft( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) { 5055 /** 5056 * @PSEUDO_GATHER4 5057 * This texcoord has been offset by (-0.25, -0.125) in the vertex shader to 5058 * sample between edge, thus fetching four edges in a row. 5059 * Sampling with different offsets in each direction allows to disambiguate 5060 * which edges are active from the four fetched ones. 5061 */ 5062 vec2 e = vec2( 0.0, 1.0 ); 5063 5064 for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) { // WebGL port note: Changed while to for 5065 e = texture2D( edgesTex, texcoord, 0.0 ).rg; 5066 texcoord -= vec2( 2.0, 0.0 ) * resolution; 5067 if ( ! ( texcoord.x > end && e.g > 0.8281 && e.r == 0.0 ) ) break; 5068 } 5069 5070 // We correct the previous (-0.25, -0.125) offset we applied: 5071 texcoord.x += 0.25 * resolution.x; 5072 5073 // The searches are bias by 1, so adjust the coords accordingly: 5074 texcoord.x += resolution.x; 5075 5076 // Disambiguate the length added by the last step: 5077 texcoord.x += 2.0 * resolution.x; // Undo last step 5078 texcoord.x -= resolution.x * SMAASearchLength(searchTex, e, 0.0, 0.5); 5079 5080 return texcoord.x; 5081 } 5082 5083 float SMAASearchXRight( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) { 5084 vec2 e = vec2( 0.0, 1.0 ); 5085 5086 for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) { // WebGL port note: Changed while to for 5087 e = texture2D( edgesTex, texcoord, 0.0 ).rg; 5088 texcoord += vec2( 2.0, 0.0 ) * resolution; 5089 if ( ! ( texcoord.x < end && e.g > 0.8281 && e.r == 0.0 ) ) break; 5090 } 5091 5092 texcoord.x -= 0.25 * resolution.x; 5093 texcoord.x -= resolution.x; 5094 texcoord.x -= 2.0 * resolution.x; 5095 texcoord.x += resolution.x * SMAASearchLength( searchTex, e, 0.5, 0.5 ); 5096 5097 return texcoord.x; 5098 } 5099 5100 float SMAASearchYUp( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) { 5101 vec2 e = vec2( 1.0, 0.0 ); 5102 5103 for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) { // WebGL port note: Changed while to for 5104 e = texture2D( edgesTex, texcoord, 0.0 ).rg; 5105 texcoord += vec2( 0.0, 2.0 ) * resolution; // WebGL port note: Changed sign 5106 if ( ! ( texcoord.y > end && e.r > 0.8281 && e.g == 0.0 ) ) break; 5107 } 5108 5109 texcoord.y -= 0.25 * resolution.y; // WebGL port note: Changed sign 5110 texcoord.y -= resolution.y; // WebGL port note: Changed sign 5111 texcoord.y -= 2.0 * resolution.y; // WebGL port note: Changed sign 5112 texcoord.y += resolution.y * SMAASearchLength( searchTex, e.gr, 0.0, 0.5 ); // WebGL port note: Changed sign 5113 5114 return texcoord.y; 5115 } 5116 5117 float SMAASearchYDown( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) { 5118 vec2 e = vec2( 1.0, 0.0 ); 5119 5120 for ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) { // WebGL port note: Changed while to for 5121 e = texture2D( edgesTex, texcoord, 0.0 ).rg; 5122 texcoord -= vec2( 0.0, 2.0 ) * resolution; // WebGL port note: Changed sign 5123 if ( ! ( texcoord.y < end && e.r > 0.8281 && e.g == 0.0 ) ) break; 5124 } 5125 5126 texcoord.y += 0.25 * resolution.y; // WebGL port note: Changed sign 5127 texcoord.y += resolution.y; // WebGL port note: Changed sign 5128 texcoord.y += 2.0 * resolution.y; // WebGL port note: Changed sign 5129 texcoord.y -= resolution.y * SMAASearchLength( searchTex, e.gr, 0.5, 0.5 ); // WebGL port note: Changed sign 5130 5131 return texcoord.y; 5132 } 5133 5134 vec2 SMAAArea( sampler2D areaTex, vec2 dist, float e1, float e2, float offset ) { 5135 // Rounding prevents precision errors of bilinear filtering: 5136 vec2 texcoord = float( SMAA_AREATEX_MAX_DISTANCE ) * round( 4.0 * vec2( e
51361, e2 ) ) + dist; 5137 5138 // We do a scale and bias for mapping to texel space: 5139 texcoord = SMAA_AREATEX_PIXEL_SIZE * texcoord + ( 0.5 * SMAA_AREATEX_PIXEL_SIZE ); 5140 5141 // Move to proper place, according to the subpixel offset: 5142 texcoord.y += SMAA_AREATEX_SUBTEX_SIZE * offset; 5143 5144 return texture2D( areaTex, texcoord, 0.0 ).rg; 5145 } 5146 5147 vec4 SMAABlendingWeightCalculationPS( vec2 texcoord, vec2 pixcoord, vec4 offset[ 3 ], sampler2D edgesTex, sampler2D areaTex, sampler2D searchTex, ivec4 subsampleIndices ) { 5148 vec4 weights = vec4( 0.0, 0.0, 0.0, 0.0 ); 5149 5150 vec2 e = texture2D( edgesTex, texcoord ).rg; 5151 5152 if ( e.g > 0.0 ) { // Edge at north 5153 vec2 d; 5154 5155 // Find the distance to the left: 5156 vec2 coords; 5157 coords.x = SMAASearchXLeft( edgesTex, searchTex, offset[ 0 ].xy, offset[ 2 ].x ); 5158 coords.y = offset[ 1 ].y; // offset[1].y = texcoord.y - 0.25 * resolution.y (@CROSSING_OFFSET) 5159 d.x = coords.x; 5160 5161 // Now fetch the left crossing edges, two at a time using bilinear 5162 // filtering. Sampling at -0.25 (see @CROSSING_OFFSET) enables to 5163 // discern what value each edge has: 5164 float e1 = texture2D( edgesTex, coords, 0.0 ).r; 5165 5166 // Find the distance to the right: 5167 coords.x = SMAASearchXRight( edgesTex, searchTex, offset[ 0 ].zw, offset[ 2 ].y ); 5168 d.y = coords.x; 5169 5170 // We want the distances to be in pixel units (doing this here allow to 5171 // better interleave arithmetic and memory accesses): 5172 d = d / resolution.x - pixcoord.x; 5173 5174 // SMAAArea below needs a sqrt, as the areas texture is compressed 5175 // quadratically: 5176 vec2 sqrt_d = sqrt( abs( d ) ); 5177 5178 // Fetch the right crossing edges: 5179 coords.y -= 1.0 * resolution.y; // WebGL port note: Added 5180 float e2 = SMAASampleLevelZeroOffset( edgesTex, coords, ivec2( 1, 0 ) ).r; 5181 5182 // Ok, we know how this pattern looks like, now it is time for getting 5183 // the actual area: 5184 weights.rg = SMAAArea( areaTex, sqrt_d, e1, e2, float( subsampleIndices.y ) ); 5185 } 5186 5187 if ( e.r > 0.0 ) { // Edge at west 5188 vec2 d; 5189 5190 // Find the distance to the top: 5191 vec2 coords; 5192 5193 coords.y = SMAASearchYUp( edgesTex, searchTex, offset[ 1 ].xy, offset[ 2 ].z ); 5194 coords.x = offset[ 0 ].x; // offset[1].x = texcoord.x - 0.25 * resolution.x; 5195 d.x = coords.y; 5196 5197 // Fetch the top crossing edges: 5198 float e1 = texture2D( edgesTex, coords, 0.0 ).g; 5199 5200 // Find the distance to the bottom: 5201 coords.y = SMAASearchYDown( edgesTex, searchTex, offset[ 1 ].zw, offset[ 2 ].w ); 5202 d.y = coords.y; 5203 5204 // We want the distances to be in pixel units: 5205 d = d / resolution.y - pixcoord.y; 5206 5207 // SMAAArea below needs a sqrt, as the areas texture is compressed 5208 // quadratically: 5209 vec2 sqrt_d = sqrt( abs( d ) ); 5210 5211 // Fetch the bottom crossing edges: 5212 coords.y -= 1.0 * resolution.y; // WebGL port note: Added 5213 float e2 = SMAASampleLevelZeroOffset( edgesTex, coords, ivec2( 0, 1 ) ).g; 5214 5215 // Get the area for this direction: 5216 weights.ba = SMAAArea( areaTex, sqrt_d, e1, e2, float( subsampleIndices.x ) ); 5217 } 5218 5219 return weights; 5220 } 5221 5222 void main() { 5223 5224 gl_FragColor = SMAABlendingWeightCalculationPS( vUv, vPixcoord, vOffset, tDiffuse, tArea, tSearch, ivec4( 0.0 ) ); 5225 5226 }`},WS={uniforms:{tDiffuse:{value:null},tColor:{value:null},resolution:{value:new xe(1/1024,1/512)}},vertexShader:` 5227 5228 uniform vec2 resolution; 5229 5230 varying vec2 vUv; 5231 varying vec4 vOffset[ 2 ]; 5232 5233 void SMAANeighborhoodBlendingVS( vec2 texcoord ) {
5234 vOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 ); // WebGL port note: Changed sign in W component 5235 vOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 ); // WebGL port note: Changed sign in W component 5236 } 5237 5238 void main() { 5239 5240 vUv = uv; 5241 5242 SMAANeighborhoodBlendingVS( vUv ); 5243 5244 gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 5245 5246 }`,fragmentShader:` 5247 5248 uniform sampler2D tDiffuse; 5249 uniform sampler2D tColor; 5250 uniform vec2 resolution; 5251 5252 varying vec2 vUv; 5253 varying vec4 vOffset[ 2 ]; 5254 5255 vec4 SMAANeighborhoodBlendingPS( vec2 texcoord, vec4 offset[ 2 ], sampler2D colorTex, sampler2D blendTex ) { 5256 // Fetch the blending weights for current pixel: 5257 vec4 a; 5258 a.xz = texture2D( blendTex, texcoord ).xz; 5259 a.y = texture2D( blendTex, offset[ 1 ].zw ).g; 5260 a.w = texture2D( blendTex, offset[ 1 ].xy ).a; 5261 5262 // Is there any blending weight with a value greater than 0.0? 5263 if ( dot(a, vec4( 1.0, 1.0, 1.0, 1.0 )) < 1e-5 ) { 5264 return texture2D( colorTex, texcoord, 0.0 ); 5265 } else { 5266 // Up to 4 lines can be crossing a pixel (one through each edge). We 5267 // favor blending by choosing the line with the maximum weight for each 5268 // direction: 5269 vec2 offset; 5270 offset.x = a.a > a.b ? a.a : -a.b; // left vs. right 5271 offset.y = a.g > a.r ? -a.g : a.r; // top vs. bottom // WebGL port note: Changed signs 5272 5273 // Then we go in the direction that has the maximum weight: 5274 if ( abs( offset.x ) > abs( offset.y )) { // horizontal vs. vertical 5275 offset.y = 0.0; 5276 } else { 5277 offset.x = 0.0; 5278 } 5279 5280 // Fetch the opposite color and lerp by hand: 5281 vec4 C = texture2D( colorTex, texcoord, 0.0 ); 5282 texcoord += sign( offset ) * resolution; 5283 vec4 Cop = texture2D( colorTex, texcoord, 0.0 ); 5284 float s = abs( offset.x ) > abs( offset.y ) ? abs( offset.x ) : abs( offset.y ); 5285 5286 // WebGL port note: Added gamma correction 5287 C.xyz = pow(C.xyz, vec3(2.2)); 5288 Cop.xyz = pow(Cop.xyz, vec3(2.2)); 5289 vec4 mixed = mix(C, Cop, s); 5290 mixed.xyz = pow(mixed.xyz, vec3(1.0 / 2.2)); 5291 5292 return mixed; 5293 } 5294 } 5295 5296 void main() { 5297 5298 gl_FragColor = SMAANeighborhoodBlendingPS( vUv, vOffset, tColor, tDiffuse ); 5299 5300 }`};class aJ extends ad{constructor(){super(),this._edgesRT=new Gn(1,1,{depthBuffer:!1,type:sr}),this._edgesRT.texture.name="SMAAPass.edges",this._weightsRT=new Gn(1,1,{depthBuffer:!1,type:sr}),this._weightsRT.texture.name="SMAAPass.weights";const e=this,t=new Image;t.src=this._getAreaTexture(),t.onload=function(){e._areaTexture.needsUpdate=!0},this._areaTexture=new Sn,this._areaTexture.name="SMAAPass.area",this._areaTexture.image=t,this._areaTexture.minFilter=jt,this._areaTexture.generateMipmaps=!1,this._areaTexture.flipY=!1;const n=new Image;n.src=this._getSearchTexture(),n.onload=function(){e._searchTexture.needsUpdate=!0},this._searchTexture=new Sn,this._searchTexture.name="SMAAPass.search",this._searchTexture.image=n,this._searchTexture.magFilter=Bn,this._searchTexture.minFilter=Bn,this._searchTexture.generateMipmaps=!1,this._searchTexture.flipY=!1,this._uniformsEdges=Gs.clone(Ex.uniforms),this._materialEdges=new dn({defines:Object.assign({},Ex.defines),uniforms:this._uniformsEdges,vertexShader:Ex.vertexShader,fragmentShader:Ex.fragmentShader}),this._uniformsWeights=Gs.clone(Cx.uniforms),this._uniformsWeights.tDiffuse.value=this._edgesRT.texture,this._uniformsWeights.tArea.value=this._areaTexture,this._uniformsWeights.tSearch.value=this._searchTexture,this._materialWeights=new dn({defines:Object.assign({},Cx.defines),uniforms:this._uniformsWeights,vertexShader:Cx.vertexShader,fragmentShader:Cx.fragmentShader}),this._uniformsBlend=Gs.clone(WS.uniforms),this._uniformsBlend.tDiffuse.value=this._weightsRT.texture,this._materialBlend=new dn({uniforms:this._uniformsBlend,vertexShader:WS.vertexShader,fragmentShader:WS.fragmentShader}),this._fsQuad=new z1(null)}render(e,t,n){this._uniformsEdges.tDiffuse.value=n.texture,this._fsQuad.material=this._materialEdges,e.setRenderTarget(this._edgesRT),this.clear&&e.clear(),this._fsQuad.render(e),this._fsQuad.material=this._materialWeights,e.setRenderTarget(this._weightsRT),this.clear&&e.clear(),this._fsQuad.render(e),this._uniformsBlend.tColor.value=n.texture,this._fsQuad.material=this._materialBlend,this.renderToScreen?(e.setRenderTarget(null),this._fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(),this._fsQuad.render(e))}setSize(e,t){this._edgesRT.setSize(e,t),this._weightsRT.setSize(e,t),this._materialEdges.uniforms.resolution.value.set(1/e,1/t),this._materialWeights.uniforms.resolution.value.set(1/e,1/t),this._materialBlend.uniforms.resolution.value.set(1/e,1/t)}dispose(){this._edgesRT.dispose(),this._weightsRT.dispose(),this._areaTexture.dispose(),this._searchTexture.dispose(),this._materialEdges.dispose(),this._materialWeights.dispose(),this._materialBlend.dispose(),this._fsQuad.dispose()}_getAreaTexture
vendor: 44,306 bytes, line 5300
5300(){return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAIwCAIAAACOVPcQAACBeklEQVR42u39W4xlWXrnh/3WWvuciIzMrKxrV8/0rWbY0+SQFKcb4owIkSIFCjY9AC1BT/LYBozRi+EX+cV+8IMsYAaCwRcBwjzMiw2jAWtgwC8WR5Q8mDFHZLNHTarZGrLJJllt1W2qKrsumZWZcTvn7L3W54e1vrXX3vuciLPPORFR1XE2EomorB0nVuz//r71re/y/1eMvb4Cb3N11xV/PP/2v4UBAwJG/7H8urx6/25/Gf8O5hypMQ0EEEQwAqLfoN/Z+97f/SW+/NvcgQk4sGBJK6H7N4PFVL+K+e0N11yNfkKvwUdwdlUAXPHHL38oa15f/i/46Ih6SuMSPmLAYAwyRKn7dfMGH97jaMFBYCJUgotIC2YAdu+LyW9vvubxAP8kAL8H/koAuOKP3+q6+xGnd5kdYCeECnGIJViwGJMAkQKfDvB3WZxjLKGh8VSCCzhwEWBpMc5/kBbjawT4HnwJfhr+pPBIu7uu+OOTo9vsmtQcniMBGkKFd4jDWMSCRUpLjJYNJkM+IRzQ+PQvIeAMTrBS2LEiaiR9b/5PuT6Ap/AcfAFO4Y3dA3DFH7/VS+M8k4baEAQfMI4QfbVDDGIRg7GKaIY52qAjTAgTvGBAPGIIghOCYAUrGFNgzA7Q3QhgCwfwAnwe5vDejgG44o/fbm1C5ZlYQvQDARPAIQGxCWBM+wWl37ZQESb4gImexGMDouhGLx1Cst0Saa4b4AqO4Hk4gxo+3DHAV/nx27p3JziPM2pVgoiia5MdEzCGULprIN7gEEeQ5IQxEBBBQnxhsDb5auGmAAYcHMA9eAAz8PBol8/xij9+C4Djlim4gJjWcwZBhCBgMIIYxGAVIkH3ZtcBuLdtRFMWsPGoY9rN+HoBji9VBYdwD2ZQg4cnO7OSq/z4rU5KKdwVbFAjNojCQzTlCLPFSxtamwh2jMUcEgg2Wm/6XgErIBhBckQtGN3CzbVacERgCnfgLswhnvqf7QyAq/z4rRZm1YglYE3affGITaZsdIe2FmMIpnOCap25I6jt2kCwCW0D1uAD9sZctNGXcQIHCkINDQgc78aCr+zjtw3BU/ijdpw3zhCwcaONwBvdeS2YZKkJNJsMPf2JKEvC28RXxxI0ASJyzQCjCEQrO4Q7sFArEzjZhaFc4cdv+/JFdKULM4px0DfUBI2hIsy06BqLhGTQEVdbfAIZXYMPesq6VoCHICzUyjwInO4Y411//LYLs6TDa9wvg2CC2rElgAnpTBziThxaL22MYhzfkghz6GAs2VHbbdM91VZu1MEEpupMMwKyVTb5ij9+u4VJG/5EgEMMmFF01cFai3isRbKbzb+YaU/MQbAm2XSMoUPAmvZzbuKYRIFApbtlrfFuUGd6vq2hXNnH78ZLh/iFhsQG3T4D1ib7k5CC6vY0DCbtrohgLEIClXiGtl10zc0CnEGIhhatLBva7NP58Tvw0qE8yWhARLQ8h4+AhQSP+I4F5xoU+VilGRJs6wnS7ruti/4KvAY/CfdgqjsMy4pf8fodQO8/gnuX3f/3xi3om1/h7THr+co3x93PP9+FBUfbNUjcjEmhcrkT+8K7ml7V10Jo05mpIEFy1NmCJWx9SIKKt+EjAL4Ez8EBVOB6havuT/rByPvHXK+9zUcfcbb254+9fydJknYnRr1oGfdaiAgpxu1Rx/Rek8KISftx3L+DfsLWAANn8Hvw0/AFeAGO9DFV3c6D+CcWbL8Dj9e7f+T1k8AZv/d7+PXWM/Z+VvdCrIvuAKO09RpEEQJM0Ci6+B4xhTWr4cZNOvhktabw0ta0rSJmqz3Yw5/AKXwenod7cAhTmBSPKf6JBdvH8IP17h95pXqw50/+BFnj88fev4NchyaK47OPhhtI8RFSvAfDSNh0Ck0p2gLxGkib5NJj/JWCr90EWQJvwBzO4AHcgztwAFN1evHPUVGwfXON+0debT1YeGON9Yy9/63X+OguiwmhIhQhD7l4sMqlG3D86Suc3qWZ4rWjI1X7u0Ytw6x3rIMeIOPDprfe2XzNgyj6PahhBjO4C3e6puDgXrdg+/5l948vF3bqwZetZ+z9Rx9zdIY5pInPK4Nk0t+l52xdK2B45Qd87nM8fsD5EfUhIcJcERw4RdqqH7Yde5V7m1vhNmtedkz6EDzUMF/2jJYWbC+4fzzA/Y+/8PPH3j9dcBAPIRP8JLXd5BpAu03aziOL3VVHZzz3CXWDPWd+SH2AnxIqQoTZpo9Ckc6HIrFbAbzNmlcg8Ag8NFDDAhbJvTBZXbC94P7t68EXfv6o+21gUtPETU7bbkLxvNKRFG2+KXzvtObonPP4rBvsgmaKj404DlshFole1Glfh02fE7bYR7dZ82oTewIBGn1Md6CG6YUF26X376oevOLzx95vhUmgblI6LBZwTCDY7vMq0op5WVXgsObOXJ+1x3qaBl9j1FeLxbhU9w1F+Wiba6s1X/TBz1LnUfuYDi4r2C69f1f14BWfP+p+W2GFKuC9phcELMYRRLur9DEZTUdEH+iEqWdaM7X4WOoPGI+ZYD2+wcQ+y+ioHUZ9dTDbArzxmi/bJI9BND0Ynd6lBdve/butBw8+f/T9D3ABa3AG8W3VPX4hBin+bj8dMMmSpp5pg7fJ6xrBFE2WQQEWnV8Qg3FbAWzYfM1rREEnmvkN2o1+acG2d/9u68GDzx91v3mAjb1zkpqT21OipPKO0b9TO5W0nTdOmAQm0TObts3aBKgwARtoPDiCT0gHgwnbArzxmtcLc08HgF1asN0C4Ms/fvD5I+7PhfqyXE/b7RbbrGyRQRT9ARZcwAUmgdoz0ehJ9Fn7QAhUjhDAQSw0bV3T3WbNa59jzmiP6GsWbGXDX2ytjy8+f9T97fiBPq9YeLdBmyuizZHaqXITnXiMUEEVcJ7K4j3BFPurtB4bixW8wTpweL8DC95szWMOqucFYGsWbGU7p3TxxxefP+r+oTVktxY0v5hbq3KiOKYnY8ddJVSBxuMMVffNbxwIOERShst73HZ78DZrHpmJmH3K6sGz0fe3UUj0eyRrSCGTTc+rjVNoGzNSv05srAxUBh8IhqChiQgVNIIBH3AVPnrsnXQZbLTm8ammv8eVXn/vWpaTem5IXRlt+U/LA21zhSb9cye6jcOfCnOwhIAYXAMVTUNV0QhVha9xjgA27ODJbLbmitt3tRN80lqG6N/khgot4ZVlOyO4WNg3OIMzhIZQpUEHieg2im6F91hB3I2tubql6BYNN9Hj5S7G0G2tahslBWKDnOiIvuAEDzakDQKDNFQT6gbn8E2y4BBubM230YIpBnDbMa+y3dx0n1S0BtuG62lCCXwcY0F72T1VRR3t2ONcsmDjbmzNt9RFs2LO2hQNyb022JisaI8rAWuw4HI3FuAIhZdOGIcdjLJvvObqlpqvWTJnnQbyi/1M9O8UxWhBs//H42I0q1Yb/XPGONzcmm+ri172mHKvZBpHkJaNJz6v9jxqiklDj3U4CA2ugpAaYMWqNXsdXbmJNd9egCnJEsphXNM+MnK3m0FCJ5S1kmJpa3DgPVbnQnPGWIDspW9ozbcO4K/9LkfaQO2KHuqlfFXSbdNzcEcwoqNEFE9zcIXu9/6n/ym/BC/C3aJLzEKPuYVlbFnfhZ8kcWxV3dbv4bKl28566wD+8C53aw49lTABp9PWbsB+knfc/Li3eVizf5vv/xmvnPKg5ihwKEwlrcHqucuVcVOxEv8aH37E3ZqpZypUulrHEtIWKUr+txHg+ojZDGlwnqmkGlzcVi1dLiNSJiHjfbRNOPwKpx9TVdTn3K05DBx4psIk4Ei8aCkJahRgffk4YnEXe07T4H2RR1u27E6wfQsBDofUgjFUFnwC2AiVtA+05J2zpiDK2Oa0c5fmAecN1iJzmpqFZxqYBCYhFTCsUNEmUnIcZ6aEA5rQVhEywG6w7HSW02XfOoBlQmjwulOFQAg66SvJblrTEX1YtJ3uG15T/BH1OfOQeuR8g/c0gdpT5fx2SKbs9EfHTKdM8A1GaJRHLVIwhcGyydZsbifAFVKl5EMKNU2Hryo+06BeTgqnxzYjThVySDikbtJPieco75lYfKAJOMEZBTjoITuWHXXZVhcUDIS2hpiXHV9Ku4u44bN5OYLDOkJo8w+xJSMbhBRHEdEs9JZUCkQrPMAvaHyLkxgkEHxiNkx/x2YB0mGsQ8EUWj/stW5YLhtS5SMu+/YBbNPDCkGTUybN8krRLBGPlZkVOA0j+a1+rkyQKWGaPHPLZOkJhioQYnVZ2hS3zVxMtgC46KuRwbJNd9nV2PHgb36F194ecf/Yeu2vAFe5nm/bRBFrnY4BauE8ERmZRFUn0k8hbftiVYSKMEme2dJCJSCGYAlNqh87bXOPdUkGy24P6d1ll21MBqqx48Fvv8ZHH8HZFY7j/uAq1xMJUFqCSUlJPmNbIiNsmwuMs/q9CMtsZsFO6SprzCS1Z7QL8xCQClEelpjTduDMsmWD8S1PT152BtvmIGvUeDA/yRn83u/x0/4qxoPHjx+PXY9pqX9bgMvh/Nz9kpP4pOe1/fYf3axUiMdHLlPpZCNjgtNFAhcHEDxTumNONhHrBduW+vOyY++70WWnPXj98eA4kOt/mj/5E05l9+O4o8ePx67HFqyC+qSSnyselqjZGaVK2TadbFLPWAQ4NBhHqDCCV7OTpo34AlSSylPtIdd2AJZlyzYQrDJ5lcWGNceD80CunPLGGzsfD+7wRb95NevJI5docQ3tgCyr5bGnyaPRlmwNsFELViOOx9loebGNq2moDOKpHLVP5al2cymWHbkfzGXL7kfRl44H9wZy33tvt+PB/Xnf93e+nh5ZlU18wCiRUa9m7kib9LYuOk+hudQNbxwm0AQqbfloimaB2lM5fChex+ylMwuTbfmXQtmWlenZljbdXTLuOxjI/fDDHY4Hjx8/Hrse0zXfPFxbUN1kKqSCCSk50m0Ajtx3ub9XHBKHXESb8iO6E+qGytF4nO0OG3SXzbJlhxBnKtKyl0NwybjvYCD30aMdjgePHz8eu56SVTBbgxJMliQ3Oauwg0QHxXE2Ez/EIReLdQj42Gzb4CLS0YJD9xUx7bsi0vJi5mUbW1QzL0h0PFk17rtiIPfJk52MB48fPx67npJJwyrBa2RCCQRTbGZSPCxTPOiND4G2pYyOQ4h4jINIJh5wFU1NFZt+IsZ59LSnDqBjZ2awbOku+yInunLcd8VA7rNnOxkPHj9+PGY9B0MWJJNozOJmlglvDMXDEozdhQWbgs/U6oBanGzLrdSNNnZFjOkmbi5bNt1lX7JLLhn3vXAg9/h4y/Hg8ePHI9dzQMEkWCgdRfYykYKnkP7D4rIujsujaKPBsB54vE2TS00ccvFY/Tth7JXeq1hz+qgVy04sAJawTsvOknHfCwdyT062HA8eP348Zj0vdoXF4pilKa2BROed+9fyw9rWRXeTFXESMOanvDZfJuJaSXouQdMdDJZtekZcLLvEeK04d8m474UDuaenW44Hjx8/Xns9YYqZpszGWB3AN/4VHw+k7WSFtJ3Qicuqb/NlVmgXWsxh570xg2UwxUw3WfO6B5nOuO8aA7lnZxuPB48fPx6znm1i4bsfcbaptF3zNT78eFPtwi1OaCNOqp1x3zUGcs/PN++AGD1+fMXrSVm2baTtPhPahbPhA71wIHd2bXzRa69nG+3CraTtPivahV/55tXWg8fyRY/9AdsY8VbSdp8V7cKrrgdfM//z6ILQFtJ2nxHtwmuoB4/kf74+gLeRtvvMaBdeSz34+vifx0YG20jbfTa0C6+tHrwe//NmOG0L8EbSdp8R7cLrrQe/996O+ai3ujQOskpTNULa7jOjXXj99eCd8lHvoFiwsbTdZ0a78PrrwTvlo966pLuRtB2fFe3Cm6oHP9kNH/W2FryxtN1nTLvwRurBO+Kj3pWXHidtx2dFu/Bm68Fb81HvykuPlrb7LGkX3mw9eGs+6h1Y8MbSdjegXcguQLjmevDpTQLMxtJ2N6NdyBZu9AbrwVvwUW+LbteULUpCdqm0HTelXbhNPe8G68Gb8lFvVfYfSNuxvrTdTWoXbozAzdaDZzfkorOj1oxVxlIMlpSIlpLrt8D4hrQL17z+c3h6hU/wv4Q/utps4+bm+6P/hIcf0JwQ5oQGPBL0eKPTYEXTW+eL/2DKn73J9BTXYANG57hz1cEMviVf/4tf5b/6C5pTQkMIWoAq7hTpOJjtAM4pxKu5vg5vXeUrtI09/Mo/5H+4z+Mp5xULh7cEm2QbRP2tFIKR7WM3fPf/jZ3SWCqLM2l4NxID5zB72HQXv3jj/8mLR5xXNA5v8EbFQEz7PpRfl1+MB/hlAN65qgDn3wTgH13hK7T59bmP+NIx1SHHU84nLOITt3iVz8mNO+lPrjGAnBFqmioNn1mTyk1ta47R6d4MrX7tjrnjYUpdUbv2rVr6YpVfsGG58AG8Ah9eyUN8CX4WfgV+G8LVWPDGb+Zd4cU584CtqSbMKxauxTg+dyn/LkVgA+IR8KHtejeFKRtTmLLpxN6mYVLjYxwXf5x2VofiZcp/lwKk4wGOpYDnoIZPdg/AAbwMfx0+ge9dgZvYjuqKe4HnGnykYo5TvJbG0Vj12JagRhwKa44H95ShkZa5RyLGGdfYvG7aw1TsF6iapPAS29mNS3NmsTQZCmgTzFwgL3upCTgtBTRwvGMAKrgLn4evwin8+afJRcff+8izUGUM63GOOuAs3tJkw7J4kyoNreqrpO6cYLQeFUd7TTpr5YOTLc9RUUogUOVJQ1GYJaFLAW0oTmKyYS46ZooP4S4EON3xQ5zC8/CX4CnM4c1PE8ApexpoYuzqlP3d4S3OJP8ZDK7cKWNaTlqmgDiiHwl1YsE41w1zT4iRTm3DBqxvOUsbMKKDa/EHxagtnta072ejc3DOIh5ojvh8l3tk1JF/AV6FU6jh3U8HwEazLgdCLYSQ+MYiAI2ltomkzttUb0gGHdSUUgsIYjTzLG3mObX4FBRaYtpDVNZrih9TgTeYOBxsEnN1gOCTM8Bsw/ieMc75w9kuAT6A+/AiHGvN/+Gn4KRkiuzpNNDYhDGFndWRpE6SVfm8U5bxnSgVV2jrg6JCKmneqey8VMFgq2+AM/i4L4RUbfSi27lNXZ7R7W9RTcq/q9fk4Xw3AMQd4I5ifAZz8FcVtm9SAom/dyN4lczJQW/kC42ZrHgcCoIf1oVMKkVItmMBi9cOeNHGLqOZk+QqQmrbc5YmYgxELUUN35z2iohstgfLIFmcMV7s4CFmI74L9+EFmGsi+tGnAOD4Yk9gIpo01Y4cA43BWGygMdr4YZekG3OBIUXXNukvJS8tqa06e+lSDCtnqqMFu6hWHXCF+WaYt64m9QBmNxi7Ioy7D+fa1yHw+FMAcPt7SysFLtoG4PXAk7JOA3aAxBRqUiAdU9Yp5lK3HLSRFtOim0sa8euEt08xvKjYjzeJ2GU7YawexrnKI9tmobInjFXCewpwriY9+RR4aaezFhMhGCppKwom0ChrgFlKzyPKkGlTW1YQrE9HJqu8hKGgMc6hVi5QRq0PZxNfrYNgE64utmRv6KKHRpxf6VDUaOvNP5jCEx5q185My/7RKz69UQu2im5k4/eownpxZxNLwiZ1AZTO2ZjWjkU9uaB2HFn6Q3u0JcsSx/qV9hTEApRzeBLDJQXxYmTnq7bdLa3+uqFrxLJ5w1TehnNHx5ECvCh2g2c3hHH5YsfdaSKddztfjQ6imKFGSyFwlLzxEGPp6r5IevVjk1AMx3wMqi1NxDVjLBiPs9tbsCkIY5we5/ML22zrCScFxnNtzsr9Wcc3CnD+pYO+4VXXiDE0oc/vQQ/fDK3oPESJMYXNmJa/DuloJZkcTpcYE8lIH8Dz8DJMiynNC86Mb2lNaaqP/+L7f2fcE/yP7/Lde8xfgSOdMxvOixZf/9p3+M4hT1+F+zApxg9XfUvYjc8qX2lfOOpK2gNRtB4flpFu9FTKCp2XJRgXnX6olp1zyYjTKJSkGmLE2NjUr1bxFM4AeAAHBUFIeSLqXR+NvH/M9fOnfHzOD2vCSyQJKzfgsCh+yi/Mmc35F2fUrw7miW33W9hBD1vpuUojFphIyvg7aTeoymDkIkeW3XLHmguMzbIAJejN6B5MDrhipE2y6SoFRO/AK/AcHHZHNIfiWrEe/C6cr3f/yOvrQKB+zMM55/GQdLDsR+ifr5Fiuu+/y+M78LzOE5dsNuXC3PYvYWd8NXvphLSkJIasrlD2/HOqQ+RjcRdjKTGWYhhVUm4yxlyiGPuMsZR7sMCHUBeTuNWA7if+ifXgc/hovftHXs/DV+Fvwe+f8shzMiMcweFgBly3//vwJfg5AN4450fn1Hd1Rm1aBLu22Dy3y3H2+OqMemkbGZ4jozcDjJf6596xOLpC0eMTHbKnxLxH27uZ/bMTGs2jOaMOY4m87CfQwF0dw53oa1k80JRuz/XgS+8fX3N9Af4qPIMfzKgCp4H5TDGe9GGeFPzSsZz80SlPTxXjgwJmC45njzgt2vbQ4b4OAdUK4/vWhO8d8v6EE8fMUsfakXbPpFJeLs2ubM/qdm/la3WP91uWhxXHjoWhyRUq2iJ/+5mA73zwIIo+LoZ/SgvIRjAd1IMvvn98PfgOvAJfhhm8scAKVWDuaRaK8aQ9f7vuPDH6Bj47ZXau7rqYJ66mTDwEDU6lLbCjCK0qTXyl5mnDoeNRxanj3FJbaksTk0faXxHxLrssgPkWB9LnA/MFleXcJozzjwsUvUG0X/QCve51qkMDXp9mtcyOy3rwBfdvVJK7D6/ACSzg3RoruIq5UDeESfEmVclDxnniU82vxMLtceD0hGZWzBNPMM/jSPne2OVatiTKUpY5vY7gc0LdUAWeWM5tH+O2I66AOWw9xT2BuyRVLGdoDHUsVRXOo/c+ZdRXvFfnxWyIV4upFLCl9eAL7h8Zv0QH8Ry8pA2cHzQpGesctVA37ZtklBTgHjyvdSeKY/RZw/kJMk0Y25cSNRWSigQtlULPTw+kzuJPeYEkXjQRpoGZobYsLF79pyd1dMRHInbgFTZqNLhDqiIsTNpoex2WLcy0/X6rHcdMMQvFSd5dWA++4P7xv89deACnmr36uGlL69bRCL6BSZsS6c0TU2TKK5gtWCzgAOOwQcurqk9j8whvziZSMLcq5hbuwBEsYjopUBkqw1yYBGpLA97SRElEmx5MCInBY5vgLk94iKqSWmhIGmkJ4Bi9m4L645J68LyY4wsFYBfUg5feP/6gWWm58IEmKQM89hq7KsZNaKtP5TxxrUZZVkNmMJtjbKrGxLNEbHPJxhqy7lAmbC32ZqeF6lTaknRWcYaFpfLUBh/rwaQycCCJmW15Kstv6jRHyJFry2C1ahkkIW0LO75s61+owxK1y3XqweX9m5YLM2DPFeOjn/iiqCKJ+yKXF8t5Yl/kNsqaSCryxPq5xWTFIaP8KSW0RYxqupaUf0RcTNSSdJZGcKYdYA6kdtrtmyBckfKXwqk0pHpUHlwWaffjNRBYFPUDWa8e3Lt/o0R0CdisKDM89cX0pvRHEfM8ca4t0s2Xx4kgo91MPQJ/0c9MQYq0co8MBh7bz1fio0UUHLR4aAIOvOmoYO6kwlEVODSSTliWtOtH6sPkrtctF9ZtJ9GIerBskvhdVS5cFNv9s1BU0AbdUgdK4FG+dRnjFmDTzniRMdZO1QhzMK355vigbdkpz9P6qjUGE5J2qAcXmwJ20cZUiAD0z+pGMx6xkzJkmEf40Hr4qZfVg2XzF9YOyoV5BjzVkUJngKf8lgNYwKECEHrCNDrWZzMlflS3yBhr/InyoUgBc/lKT4pxVrrC6g1YwcceK3BmNxZcAtz3j5EIpqguh9H6wc011YN75cKDLpFDxuwkrPQmUwW4KTbj9mZTwBwLq4aQMUZbHm1rylJ46dzR0dua2n3RYCWZsiHROeywyJGR7mXKlpryyCiouY56sFkBWEnkEB/raeh/Sw4162KeuAxMQpEkzy5alMY5wamMsWKKrtW2WpEWNnReZWONKWjrdsKZarpFjqCslq773PLmEhM448Pc3+FKr1+94vv/rfw4tEcu+lKTBe4kZSdijBrykwv9vbCMPcLQTygBjzVckSLPRVGslqdunwJ4oegtFOYb4SwxNgWLCmD7T9kVjTv5YDgpo0XBmN34Z/rEHp0sgyz7lngsrm4lvMm2Mr1zNOJYJ5cuxuQxwMGJq/TP5emlb8fsQBZviK4t8hFL+zbhtlpwaRSxQRWfeETjuauPsdGxsBVdO7nmP4xvzSoT29pRl7kGqz+k26B3Oy0YNV+SXbbQas1ctC/GarskRdFpKczVAF1ZXnLcpaMuzVe6lZ2g/1ndcvOVgRG3sdUAY1bKD6achijMPdMxV4muKVorSpiDHituH7rSTs7n/4y5DhRXo4FVBN4vO/zbAcxhENzGbHCzU/98Mcx5e7a31kWjw9FCe/zNeYyQjZsWb1uc7U33pN4Mji6hCLhivqfa9Ss6xLg031AgfesA/l99m9fgvnaF9JoE6bYKmkGNK3aPbHB96w3+DnxFm4hs0drLsk7U8kf/N/CvwQNtllna0rjq61sH8L80HAuvwH1tvBy2ChqWSCaYTaGN19sTvlfzFD6n+iKTbvtayfrfe9ueWh6GJFoxLdr7V72a5ZpvHcCPDzma0wTO4EgbLyedxstO81n57LYBOBzyfsOhUKsW1J1BB5vr/tz8RyqOFylQP9Tvst2JALsC5lsH8PyQ40DV4ANzYa4dedNiKNR1s+x2wwbR7q4/4cTxqEk4LWDebfisuo36JXLiWFjOtLrlNWh3K1rRS4xvHcDNlFnNmWBBAl5SWaL3oPOfnvbr5pdjVnEaeBJSYjuLEkyLLsWhKccadmOphZkOPgVdalj2QpSmfOsADhMWE2ZBu4+EEJI4wKTAuCoC4xwQbWXBltpxbjkXJtKxxabo9e7tyhlgb6gNlSbUpMh+l/FaqzVwewGu8BW1Zx7pTpQDJUjb8tsUTW6+GDXbMn3mLbXlXJiGdggxFAoUrtPS3wE4Nk02UZG2OOzlk7fRs7i95QCLo3E0jtrjnM7SR3uS1p4qtS2nJ5OwtQVHgOvArLBFijZUV9QtSl8dAY5d0E0hM0w3HS2DpIeB6m/A1+HfhJcGUq4sOxH+x3f5+VO+Ds9rYNI7zPXOYWPrtf8bYMx6fuOAX5jzNR0PdsuON+X1f7EERxMJJoU6GkTEWBvVolVlb5lh3tKCg6Wx1IbaMDdJ+9sUCc5KC46hKGCk3IVOS4TCqdBNfUs7Kd4iXf2RjnT/LLysJy3XDcHLh/vde3x8DoGvwgsa67vBk91G5Pe/HbOe7xwym0NXbtiuuDkGO2IJDh9oQvJ4cY4vdoqLDuoH9Zl2F/ofsekn8lkuhIlhQcffUtSjytFyp++p6NiE7Rqx/lodgKVoceEp/CP4FfjrquZaTtj2AvH5K/ywpn7M34K/SsoYDAdIN448I1/0/wveW289T1/lX5xBzc8N5IaHr0XMOQdHsIkDuJFifj20pBm5jzwUv9e2FhwRsvhAbalCIuIw3bhJihY3p6nTFFIZgiSYjfTf3aXuOjmeGn4bPoGvwl+CFzTRczBIuHBEeImHc37/lGfwZR0cXzVDOvaKfNHvwe+suZ771K/y/XcBlsoN996JpBhoE2toYxOznNEOS5TJc6Id5GEXLjrWo+LEWGNpPDU4WAwsIRROu+1vM+0oW37z/MBN9kqHnSArwPfgFJ7Cq/Ai3Ie7g7ncmI09v8sjzw9mzOAEXoIHxURueaAce5V80f/DOuuZwHM8vsMb5wBzOFWM7wymTXPAEvm4vcFpZ2ut0VZRjkiP2MlmLd6DIpbGSiHOjdnUHN90hRYmhTnmvhzp1iKDNj+b7t5hi79lWGwQ+HN9RsfFMy0FXbEwhfuczKgCbyxYwBmcFhhvo/7a44v+i3XWcwDP86PzpGQYdWh7csP5dBvZ1jNzdxC8pBGuxqSW5vw40nBpj5JhMwvOzN0RWqERHMr4Lv1kWX84xLR830G3j6yqZ1a8UstTlW+qJPOZ+sZ7xZPKTJLhiNOAFd6tk+jrTH31ncLOxid8+nzRb128HhUcru/y0Wn6iT254YPC6FtVSIMoW2sk727AhvTtrWKZTvgsmckfXYZWeNRXx/3YQ2OUxLDrbHtN11IwrgXT6c8dATDwLniYwxzO4RzuQqTKSC5gAofMZ1QBK3zQ4JWobFbcvJm87FK+6JXrKahLn54m3p+McXzzYtP8VF/QpJuh1OwieElEoI1pRxPS09FBrkq2tWCU59+HdhNtTIqKm8EBrw2RTOEDpG3IKo2Y7mFdLm3ZeVjYwVw11o/oznceMve4CgMfNym/utA/d/ILMR7gpXzRy9eDsgLcgbs8O2Va1L0zzIdwGGemTBuwROHeoMShkUc7P+ISY3KH5ZZeWqO8mFTxQYeXTNuzvvK5FGPdQfuu00DwYFY9dyhctEt+OJDdnucfpmyhzUJzfsJjr29l8S0bXBfwRS9ZT26tmMIdZucch5ZboMz3Nio3nIOsYHCGoDT4kUA9MiXEp9Xsui1S8th/kbWIrMBxDGLodWUQIWcvnXy+9M23xPiSMOiRPqM+YMXkUN3gXFrZJwXGzUaMpJfyRS9ZT0lPe8TpScuRlbMHeUmlaKDoNuy62iWNTWNFYjoxFzuJs8oR+RhRx7O4SVNSXpa0ZJQ0K1LAHDQ+D9IepkMXpcsq5EVCvClBUIzDhDoyKwDw1Lc59GbTeORivugw1IcuaEOaGWdNm+Ps5fQ7/tm0DjMegq3yM3vb5j12qUId5UZD2oxDSEWOZMSqFl/W+5oynWDa/aI04tJRQ2eTXusg86SQVu/nwSYwpW6wLjlqIzwLuxGIvoAvul0PS+ZNz0/akp/pniO/8JDnGyaCkzbhl6YcqmK/69prxPqtpx2+Km9al9sjL+rwMgHw4jE/C8/HQ3m1vBuL1fldbzd8mOueVJ92syqdEY4KJjSCde3mcRw2TA6szxedn+zwhZMps0XrqEsiUjnC1hw0TELC2Ek7uAAdzcheXv1BYLagspxpzSAoZZUsIzIq35MnFQ9DOrlNB30jq3L4pkhccKUAA8/ocvN1Rzx9QyOtERs4CVsJRK/DF71kPYrxYsGsm6RMh4cps5g1DOmM54Ly1ii0Hd3Y/BMk8VWFgBVmhqrkJCPBHAolwZaWzLR9Vb7bcWdX9NyUYE+uB2BKfuaeBUcjDljbYVY4DdtsVWvzRZdWnyUzDpjNl1Du3aloAjVJTNDpcIOVVhrHFF66lLfJL1zJr9PQ2nFJSBaKoDe+sAvLufZVHVzYh7W0h/c6AAZ+7Tvj6q9j68G/cTCS/3n1vLKHZwNi+P+pS0WkZNMBMUl+LDLuiE4omZy71r3UFMwNJV+VJ/GC5ixVUkBStsT4gGKh0Gm4Oy3qvq7Lbmq24nPdDuDR9deR11XzP4vFu3TYzfnIyiSVmgizUYGqkIXNdKTY9pgb9D2Ix5t0+NHkVzCdU03suWkkVZAoCONCn0T35gAeW38de43mf97sMOpSvj4aa1KYUm58USI7Wxxes03bAZdRzk6UtbzMaCQ6IxO0dy7X+XsjoD16hpsBeGz9dfzHj+R/Hp8nCxZRqkEDTaCKCSywjiaoMJ1TITE9eg7Jqnq8HL6gDwiZb0u0V0Rr/rmvqjxKuaLCX7ZWXTvAY+uvm3z8CP7nzVpngqrJpZKwWnCUjIviYVlirlGOzPLI3SMVyp/elvBUjjDkNhrtufFFErQ8pmdSlbK16toBHlt/HV8uHMX/vEGALkV3RJREiSlopxwdMXOZPLZ+ix+kAHpMKIk8UtE1ygtquttwxNhphrIZ1IBzjGF3IIGxGcBj6q8bHJBG8T9vdsoWrTFEuebEZuVxhhClH6P5Zo89OG9fwHNjtNQTpD0TG9PJLEYqvEY6Rlxy+ZZGfL0Aj62/bnQCXp//eeM4KzfQVJbgMQbUjlMFIm6TpcfWlZje7NBSV6IsEVmumWIbjiloUzQX9OzYdo8L1wjw2PrrpimONfmfNyzKklrgnEkSzT5QWYQW40YShyzqsRmMXbvVxKtGuYyMKaU1ugenLDm5Ily4iT14fP11Mx+xJv+zZ3MvnfdFqxU3a1W/FTB4m3Qfsyc1XUcdVhDeUDZXSFHHLQj/Y5jtC7ZqM0CXGwB4bP11i3LhOvzPGygYtiUBiwQV/4wFO0majijGsafHyRLu0yG6q35cL1rOpVxr2s5cM2jJYMCdc10Aj6q/blRpWJ//+dmm5psMl0KA2+AFRx9jMe2WbC4jQxnikd4DU8TwUjRVacgdlhmr3bpddzuJ9zXqr2xnxJfzP29RexdtjDVZqzkqa6PyvcojGrfkXiJ8SEtml/nYskicv0ivlxbqjemwUjMw5evdg8fUX9nOiC/lf94Q2i7MURk9nW1MSj5j8eAyV6y5CN2S6qbnw3vdA1Iwq+XOSCl663udN3IzLnrt+us25cI1+Z83SXQUldqQq0b5XOT17bGpLd6ssN1VMPf8c+jG8L3NeCnMdF+Ra3fRa9dft39/LuZ/3vwHoHrqGmQFafmiQw6eyzMxS05K4bL9uA+SKUQzCnSDkqOGokXyJvbgJ/BHI+qvY69//4rl20NsmK2ou2dTsyIALv/91/8n3P2Aao71WFGi8KKv1fRC5+J67Q/507/E/SOshqN5TsmYIjVt+kcjAx98iz/4SaojbIV1rexE7/C29HcYD/DX4a0rBOF5VTu7omsb11L/AWcVlcVZHSsqGuXLLp9ha8I//w3Mv+T4Ew7nTBsmgapoCrNFObIcN4pf/Ob/mrvHTGqqgAupL8qWjWPS9m/31jAe4DjA+4+uCoQoT/zOzlrNd3qd4SdphFxsUvYwGWbTWtISc3wNOWH+kHBMfc6kpmpwPgHWwqaSUG2ZWWheYOGQGaHB+eQ/kn6b3pOgLV+ODSn94wDvr8Bvb70/LLuiPPEr8OGVWfDmr45PZyccEmsVXZGe1pRNX9SU5+AVQkNTIVPCHF/jGmyDC9j4R9LfWcQvfiETmgMMUCMN1uNCakkweZsowdYobiMSlnKA93u7NzTXlSfe+SVbfnPQXmg9LpYAQxpwEtONyEyaueWM4FPjjyjG3uOaFmBTWDNgBXGEiQpsaWhnAqIijB07Dlsy3fUGeP989xbWkyf+FF2SNEtT1E0f4DYYVlxFlbaSMPIRMk/3iMU5pME2SIWJvjckciebkQuIRRyhUvkHg/iUljG5kzVog5hV7vIlCuBrmlhvgPfNHQM8lCf+FEGsYbMIBC0qC9a0uuy2wLXVbLBaP5kjHokCRxapkQyzI4QEcwgYHRZBp+XEFTqXFuNVzMtjXLJgX4gAid24Hjwc4N3dtVSe+NNiwTrzH4WVUOlDobUqr1FuAgYllc8pmzoVrELRHSIW8ViPxNy4xwjBpyR55I6J220qQTZYR4guvUICJiSpr9gFFle4RcF/OMB7BRiX8sSfhpNSO3lvEZCQfLUVTKT78Ek1LRLhWN+yLyTnp8qWUZ46b6vxdRGXfHVqx3eI75YaLa4iNNiK4NOW7wPW6lhbSOF9/M9qw8e/aoB3d156qTzxp8pXx5BKAsYSTOIIiPkp68GmTq7sZtvyzBQaRLNxIZ+paozHWoLFeExIhRBrWitHCAHrCF7/thhD8JhYz84wg93QRV88wLuLY8zF8sQ36qF1J455bOlgnELfshKVxYOXKVuKx0jaj22sczTQqPqtV/XDgpswmGTWWMSDw3ssyUunLLrVPGjYRsH5ggHeHSWiV8kT33ycFSfMgkoOK8apCye0J6VW6GOYvffgU9RWsukEi2kUV2nl4dOYUzRik9p7bcA4ggdJ53LxKcEe17B1R8eqAd7dOepV8sTXf5lhejoL85hUdhDdknPtKHFhljOT+bdq0hxbm35p2nc8+Ja1Iw+tJykgp0EWuAAZYwMVwac5KzYMslhvgHdHRrxKnvhTYcfKsxTxtTETkjHO7rr3zjoV25lAQHrqpV7bTiy2aXMmUhTBnKS91jhtR3GEoF0oLnWhWNnYgtcc4N0FxlcgT7yz3TgNIKkscx9jtV1ZKpWW+Ub1tc1eOv5ucdgpx+FJy9pgbLE7xDyXb/f+hLHVGeitHOi6A7ybo3sF8sS7w7cgdk0nJaOn3hLj3uyD0Zp5pazFIUXUpuTTU18d1EPkDoX8SkmWTnVIozEdbTcZjoqxhNHf1JrSS/AcvHjZ/SMHhL/7i5z+POsTUh/8BvNfYMTA8n+yU/MlTZxSJDRStqvEuLQKWwDctMTQogUDyQRoTQG5Kc6oQRE1yV1jCA7ri7jdZyK0sYTRjCR0Hnnd+y7nHxNgTULqw+8wj0mQKxpYvhjm9uSUxg+TTy7s2GtLUGcywhXSKZN275GsqlclX90J6bRI1aouxmgL7Q0Nen5ziM80SqMIo8cSOo+8XplT/5DHNWsSUr/6lLN/QQ3rDyzLruEW5enpf7KqZoShEduuSFOV7DLX7Ye+GmXb6/hnNNqKsVXuMDFpb9Y9eH3C6NGEzuOuI3gpMH/I6e+zDiH1fXi15t3vA1czsLws0TGEtmPEJdiiFPwlwKbgLHAFk4P6ZyPdymYYHGE0dutsChQBl2JcBFlrEkY/N5bQeXQ18gjunuMfMfsBlxJSx3niO485fwO4fGD5T/+3fPQqkneWVdwnw/3bMPkW9Wbqg+iC765Zk+xcT98ibKZc2EdgHcLoF8cSOo/Oc8fS+OyEULF4g4sJqXVcmfMfsc7A8v1/yfGXmL9I6Fn5pRwZhsPv0TxFNlAfZCvG+Oohi82UC5f/2IsJo0cTOm9YrDoKhFPEUr/LBYTUNht9zelHXDqwfPCIw4owp3mOcIQcLttWXFe3VZ/j5H3cIc0G6oPbCR+6Y2xF2EC5cGUm6wKC5tGEzhsWqw5hNidUiKX5gFWE1GXh4/Qplw4sVzOmx9QxU78g3EF6wnZlEN4FzJ1QPSLEZz1KfXC7vd8ssGdIbNUYpVx4UapyFUHzJoTOo1McSkeNn1M5MDQfs4qQuhhX5vQZFw8suwWTcyYTgioISk2YdmkhehG4PkE7w51inyAGGaU+uCXADabGzJR1fn3lwkty0asIo8cROm9Vy1g0yDxxtPvHDAmpu+PKnM8Ix1wwsGw91YJqhteaWgjYBmmQiebmSpwKKzE19hx7jkzSWOm66oPbzZ8Yj6kxVSpYjVAuvLzYMCRo3oTQecOOjjgi3NQ4l9K5/hOGhNTdcWVOTrlgYNkEXINbpCkBRyqhp+LdRB3g0OU6rMfW2HPCFFMV9nSp+uB2woepdbLBuJQyaw/ZFysXrlXwHxI0b0LovEkiOpXGA1Ijagf+KUNC6rKNa9bQnLFqYNkEnMc1uJrg2u64ELPBHpkgWbmwKpJoDhMwNbbGzAp7Yg31wS2T5rGtzit59PrKhesWG550CZpHEzpv2NGRaxlNjbMqpmEIzygJqQfjypycs2pg2cS2RY9r8HUqkqdEgKTWtWTKoRvOBPDYBltja2SO0RGjy9UHtxwRjA11ujbKF+ti5cIR9eCnxUg6owidtyoU5tK4NLji5Q3HCtiyF2IqLGYsHViOXTXOYxucDqG0HyttqYAKqYo3KTY1ekyDXRAm2AWh9JmsVh/ccg9WJ2E8YjG201sPq5ULxxX8n3XLXuMInbft2mk80rRGjCGctJ8/GFdmEQ9Ug4FlE1ll1Y7jtiraqm5Fe04VV8lvSVBL8hiPrfFVd8+7QH3Qbu2ipTVi8cvSGivc9cj8yvH11YMHdNSERtuOslM97feYFOPKzGcsI4zW0YGAbTAOaxCnxdfiYUmVWslxiIblCeAYr9VYR1gM7GmoPrilunSxxeT3DN/2eBQ9H11+nk1adn6VK71+5+Jfct4/el10/7KBZfNryUunWSCPxPECk1rdOv1WVSrQmpC+Tl46YD3ikQYcpunSQgzVB2VHFhxHVGKDgMEY5GLlQnP7FMDzw7IacAWnO6sBr12u+XanW2AO0wQ8pknnFhsL7KYIqhkEPmEXFkwaN5KQphbkUmG72wgw7WSm9RiL9QT925hkjiVIIhphFS9HKI6/8QAjlpXqg9W2C0apyaVDwKQwrwLY3j6ADR13ZyUNByQXHQu6RY09Hu6zMqXRaNZGS/KEJs0cJEe9VH1QdvBSJv9h09eiRmy0V2uJcqHcShcdvbSNg5fxkenkVprXM9rDVnX24/y9MVtncvbKY706anNl3ASll9a43UiacVquXGhvq4s2FP62NGKfQLIQYu9q1WmdMfmUrDGt8eDS0cXozH/fjmUH6Jruvm50hBDSaEU/2Ru2LEN/dl006TSc/g7tfJERxGMsgDUEr104pfWH9lQaN+M4KWQjwZbVc2rZVNHsyHal23wZtIs2JJqtIc/WLXXRFCpJkfE9jvWlfFbsNQ9pP5ZBS0zKh4R0aMFj1IjTcTnvi0Zz2rt7NdvQb2mgbju1plsH8MmbnEk7KbK0b+wC2iy3aX3szW8xeZvDwET6hWZYwqTXSSG+wMETKum0Dq/q+x62gt2ua2ppAo309TRk9TPazfV3qL9H8z7uhGqGqxNVg/FKx0HBl9OVUORn8Q8Jx9gFttGQUDr3tzcXX9xGgN0EpzN9mdZ3GATtPhL+CjxFDmkeEU6x56kqZRusLzALXVqkCN7zMEcqwjmywDQ6OhyUe0Xao1Qpyncrg6wKp9XfWDsaZplElvQ/b3sdweeghorwBDlHzgk1JmMc/wiERICVy2VJFdMjFuLQSp3S0W3+sngt2njwNgLssFGVQdJ0tu0KH4ky1LW4yrbkuaA6Iy9oz/qEMMXMMDWyIHhsAyFZc2peV9hc7kiKvfULxCl9iddfRK1f8kk9qvbdOoBtOg7ZkOZ5MsGrSHsokgLXUp9y88smniwWyuFSIRVmjplga3yD8Uij5QS1ZiM4U3Qw5QlSm2bXjFe6jzzBFtpg+/YBbLAWG7OPynNjlCw65fukGNdkJRf7yM1fOxVzbxOJVocFoYIaGwH22mIQkrvu1E2nGuebxIgW9U9TSiukPGU+Lt++c3DJPKhyhEEbXCQLUpae2exiKy6tMPe9mDRBFCEMTWrtwxN8qvuGnt6MoihKWS5NSyBhbH8StXoAz8PLOrRgLtOT/+4vcu+7vDLnqNvztOq7fmd8sMmY9Xzn1zj8Dq8+XVdu2Nv0IIySgEdQo3xVHps3Q5i3fLFsV4aiqzAiBhbgMDEd1uh8qZZ+lwhjkgokkOIv4xNJmyncdfUUzgB4oFMBtiu71Xumpz/P+cfUP+SlwFExwWW62r7b+LSPxqxn/gvMZ5z9C16t15UbNlq+jbGJtco7p8wbYlL4alSyfWdeuu0j7JA3JFNuVAwtst7F7FhWBbPFNKIUORndWtLraFLmMu7KFVDDOzqkeaiN33YAW/r76wR4XDN/yN1z7hejPau06EddkS/6XThfcz1fI/4K736fO48vlxt2PXJYFaeUkFS8U15XE3428xdtn2kc8GQlf1vkIaNRRnOMvLTWrZbElEHeLWi1o0dlKPAh1MVgbbVquPJ5+Cr8LU5/H/+I2QlHIU2ClXM9G8v7Rr7oc/hozfUUgsPnb3D+I+7WF8kNO92GY0SNvuxiE+2Bt8prVJTkzE64sfOstxuwfxUUoyk8VjcTlsqe2qITSFoSj6Epd4KsT6BZOWmtgE3hBfir8IzZDwgV4ZTZvD8VvPHERo8v+vL1DASHTz/i9OlKueHDjK5Rnx/JB1Vb1ioXdBra16dmt7dgik10yA/FwJSVY6XjA3oy4SqM2frqDPPSRMex9qs3XQtoWxMj7/Er8GWYsXgjaVz4OYumP2+9kbxvny/6kvWsEBw+fcb5bInc8APdhpOSs01tEqIkoiZjbAqKMruLbJYddHuHFRIyJcbdEdbl2sVLaySygunutBg96Y2/JjKRCdyHV+AEFtTvIpbKIXOamknYSiB6KV/0JetZITgcjjk5ZdaskBtWO86UF0ap6ozGXJk2WNiRUlCPFir66lzdm/SLSuK7EUdPz8f1z29Skq6F1fXg8+5UVR6bszncP4Tn4KUkkdJ8UFCY1zR1i8RmL/qQL3rlei4THG7OODlnKko4oI01kd3CaM08Ia18kC3GNoVaO9iDh+hWxSyTXFABXoau7Q6q9OxYg/OVEMw6jdbtSrJ9cBcewGmaZmg+bvkUnUUaGr+ZfnMH45Ivevl61hMcXsxYLFTu1hTm2zViCp7u0o5l+2PSUh9bDj6FgYypufBDhqK2+oXkiuHFHR3zfj+9PtA8oR0xnqX8qn+sx3bFODSbbF0X8EUvWQ8jBIcjo5bRmLOljDNtcqNtOe756h3l0VhKa9hDd2l1eqmsnh0MNMT/Cqnx6BInumhLT8luljzQ53RiJeA/0dxe5NK0o2fA1+GLXr6eNQWHNUOJssQaTRlGpLHKL9fD+IrQzTOMZS9fNQD4AnRNVxvTdjC+fJdcDDWQcyB00B0t9BDwTxXgaAfzDZ/DBXzRnfWMFRwuNqocOmX6OKNkY63h5n/fFcB28McVHqnXZVI27K0i4rDLNE9lDKV/rT+udVbD8dFFu2GGZ8mOt0kAXcoX3ZkIWVtw+MNf5NjR2FbivROHmhV1/pj2egv/fMGIOWTIWrV3Av8N9imV9IWml36H6cUjqEWNv9aNc+veb2sH46PRaHSuMBxvtW+twxctq0z+QsHhux8Q7rCY4Ct8lqsx7c6Sy0dl5T89rIeEuZKoVctIk1hNpfavER6yyH1Vvm3MbsUHy4ab4hWr/OZPcsRBphnaV65/ZcdYPNNwsjN/djlf9NqCw9U5ExCPcdhKxUgLSmfROpLp4WSUr8ojdwbncbvCf+a/YzRaEc6QOvXcGO256TXc5Lab9POvB+AWY7PigWYjzhifbovuunzRawsO24ZqQQAqguBtmpmPB7ysXJfyDDaV/aPGillgz1MdQg4u5MYaEtBNNHFjkRlSpd65lp4hd2AVPTfbV7FGpyIOfmNc/XVsPfg7vzaS/3nkvLL593ANLvMuRMGpQIhiF7kUEW9QDpAUbTWYBcbp4WpacHHY1aacqQyjGZS9HI3yCBT9kUZJhVOD+zUDvEH9ddR11fzPcTDQ5TlgB0KwqdXSavk9BC0pKp0WmcuowSw07VXmXC5guzSa4p0UvRw2lbDiYUx0ExJJRzWzi6Gm8cnEkfXXsdcG/M/jAJa0+bmCgdmQ9CYlNlSYZOKixmRsgiFxkrmW4l3KdFKv1DM8tk6WxPYJZhUUzcd8Kdtgrw/gkfXXDT7+avmfVak32qhtkg6NVdUS5wgkru1YzIkSduTW1FDwVWV3JQVJVuieTc0y4iDpFwc7/BvSalvKdQM8sv662cevz/+8sQVnjVAT0W2wLllw1JiMhJRxgDjCjLQsOzSFSgZqx7lAW1JW0e03yAD3asC+GD3NbQhbe+mN5GXH1F83KDOM4n/e5JIuH4NpdQARrFPBVptUNcjj4cVMcFSRTE2NpR1LEYbYMmfWpXgP9KejaPsLUhuvLCsVXznAG9dfx9SR1ud/3hZdCLHb1GMdPqRJgqDmm76mHbvOXDtiO2QPUcKo/TWkQ0i2JFXpBoo7vij1i1Lp3ADAo+qvG3V0rM//vFnnTE4hxd5Ka/Cor5YEdsLVJyKtDgVoHgtW11pWSjolPNMnrlrVj9Fv2Qn60twMwKPqr+N/wvr8z5tZcDsDrv06tkqyzESM85Ycv6XBWA2birlNCXrI6VbD2lx2L0vQO0QVTVVLH4SE67fgsfVXv8n7sz7/85Z7cMtbE6f088wSaR4kCkCm10s6pKbJhfqiUNGLq+0gLWC6eUAZFPnLjwqtKd8EwGvWX59t7iPW4X/eAN1svgRVSY990YZg06BD1ohLMtyFTI4pKTJsS9xREq9EOaPWiO2gpms7397x6nQJkbh+Fz2q/rqRROX6/M8bJrqlVW4l6JEptKeUFuMYUbtCQ7CIttpGc6MY93x1r1vgAnRXvY5cvwWPqb9uWQm+lP95QxdNMeWhOq1x0Db55C7GcUv2ZUuN6n8iKzsvOxibC//Yfs9Na8r2Rlz02vXXDT57FP/zJi66/EJSmsJKa8QxnoqW3VLQ+jZVUtJwJ8PNX1NQCwfNgdhhHD9on7PdRdrdGPF28rJr1F+3LBdeyv+8yYfLoMYet1vX4upNAjVvwOUWnlNXJXlkzk5Il6kqeoiL0C07qno+/CYBXq/+utlnsz7/Mzvy0tmI4zm4ag23PRN3t/CWryoUVJGm+5+K8RJ0V8Hc88/XHUX/HfiAq7t+BH+x6v8t438enWmdJwFA6ZINriLGKv/95f8lT9/FnyA1NMVEvQyaXuu+gz36f/DD73E4pwqpLcvm/o0Vle78n//+L/NPvoefp1pTJye6e4A/D082FERa5/opeH9zpvh13cNm19/4v/LDe5xMWTi8I0Ta0qKlK27AS/v3/r+/x/2GO9K2c7kVMonDpq7//jc5PKCxeNPpFVzaRr01wF8C4Pu76hXuX18H4LduTr79guuFD3n5BHfI+ZRFhY8w29TYhbbLi/bvBdqKE4fUgg1pBKnV3FEaCWOWyA+m3WpORZr/j+9TKJtW8yBTF2/ZEODI9/QavHkVdGFp/Pjn4Q+u5hXapsP5sOH+OXXA1LiKuqJxiMNbhTkbdJTCy4llEt6NnqRT4dhg1V3nbdrm6dYMecA1yTOL4PWTE9L5VzPFlLBCvlG58AhehnN4uHsAYinyJ+AZ/NkVvELbfOBUuOO5syBIEtiqHU1k9XeISX5bsimrkUUhnGDxourN8SgUsCZVtKyGbyGzHXdjOhsAvOAswSRyIBddRdEZWP6GZhNK/yjwew9ehBo+3jEADu7Ay2n8mDc+TS7awUHg0OMzR0LABhqLD4hJEh/BEGyBdGlSJoXYXtr+3HS4ijzVpgi0paWXtdruGTknXBz+11qT1Q2inxaTzQCO46P3lfLpyS4fou2PH/PupwZgCxNhGlj4IvUuWEsTkqMWm6i4xCSMc9N1RDQoCVcuGItJ/MRWefais+3synowi/dESgJjkilnWnBTGvRWmaw8oR15257t7CHmCf8HOn7cwI8+NQBXMBEmAa8PMRemrNCEhLGEhDQKcGZWS319BX9PFBEwGTbRBhLbDcaV3drFcDqk5kCTd2JF1Wp0HraqBx8U0wwBTnbpCadwBA/gTH/CDrcCs93LV8E0YlmmcyQRQnjBa8JESmGUfIjK/7fkaDJpmD2QptFNVJU1bbtIAjjWQizepOKptRjbzR9Kag6xZmMLLjHOtcLT3Tx9o/0EcTT1XN3E45u24AiwEypDJXihKjQxjLprEwcmRKclaDNZCVqr/V8mYWyFADbusiY5hvgFoU2vio49RgJLn5OsReRFN6tabeetiiy0V7KFHT3HyZLx491u95sn4K1QQSPKM9hNT0wMVvAWbzDSVdrKw4zRjZMyJIHkfq1VAVCDl/bUhNKlGq0zGr05+YAceXVPCttVk0oqjVwMPt+BBefx4yPtGVkUsqY3CHDPiCM5ngupUwCdbkpd8kbPrCWHhkmtIKLEetF2499eS1jZlIPGYnlcPXeM2KD9vLS0bW3ktYNqUllpKLn5ZrsxlIzxvDu5eHxzGLctkZLEY4PgSOg2IUVVcUONzUDBEpRaMoXNmUc0tFZrTZquiLyKxrSm3DvIW9Fil+AkhXu5PhEPx9mUNwqypDvZWdKlhIJQY7vn2OsnmBeOWnYZ0m1iwbbw1U60by5om47iHRV6fOgzjMf/DAZrlP40Z7syxpLK0lJ0gqaAK1c2KQKu7tabTXkLFz0sCftuwX++MyNeNn68k5Buq23YQhUh0SNTJa1ioQ0p4nUG2y0XilF1JqODqdImloPS4Bp111DEWT0jJjVv95uX9BBV7eB3bUWcu0acSVM23YZdd8R8UbQUxJ9wdu3oMuhdt929ME+mh6JXJ8di2RxbTi6TbrDquqV4aUKR2iwT6aZbyOwEXN3DUsWr8Hn4EhwNyHuXHh7/pdaUjtR7vnDh/d8c9xD/s5f501eQ1+CuDiCvGhk1AN/4Tf74RfxPwD3toLarR0zNtsnPzmS64KIRk861dMWCU8ArasG9T9H0ZBpsDGnjtAOM2+/LuIb2iIUGXNgl5ZmKD/Tw8TlaAuihaFP5yrw18v4x1898zIdP+DDAX1bM3GAMvPgRP/cJn3zCW013nrhHkrITyvYuwOUkcHuKlRSW5C6rzIdY4ppnF7J8aAJbQepgbJYBjCY9usGXDKQxq7RZfh9eg5d1UHMVATRaD/4BHK93/1iAgYZ/+jqPn8Dn4UExmWrpa3+ZOK6MvM3bjwfzxNWA2dhs8+51XHSPJiaAhGSpWevEs5xHLXcEGFXYiCONySH3fPWq93JIsBiSWvWyc3CAN+EcXoT7rCSANloPPoa31rt/5PUA/gp8Q/jDD3hyrjzlR8VkanfOvB1XPubt17vzxAfdSVbD1pzAnfgyF3ycadOTOTXhpEUoLC1HZyNGW3dtmjeXgr2r56JNmRwdNNWaQVBddd6rh4MhviEB9EFRD/7RGvePvCbwAL4Mx/D6M541hHO4D3e7g6PafdcZVw689z7NGTwo5om7A8sPhccT6qKcl9NJl9aM/9kX+e59Hh1yPqGuCCZxuITcsmNaJ5F7d0q6J3H48TO1/+M57085q2icdu2U+W36Ldllz9Agiv4YGljoEN908EzvDOrBF98/vtJwCC/BF2AG75xxEmjmMIcjxbjoaxqOK3/4hPOZzhMPBpYPG44CM0dTVm1LjLtUWWVz1Bcf8tEx0zs8O2A2YVHRxKYOiy/aOVoAaMu0i7ubu43njjmd4ibMHU1sIDHaQNKrZND/FZYdk54oCXetjq7E7IVl9eAL7t+oHnwXXtLx44czzoRFHBztYVwtH1d+NOMkupZ5MTM+gUmq90X+Bh9zjRlmaQ+m7YMqUL/veemcecAtOJ0yq1JnVlN27di2E0+Klp1tAJ4KRw1eMI7aJjsO3R8kPSI3fUFXnIOfdQe86sIIVtWDL7h//Ok6vj8vwDk08NEcI8zz7OhBy+WwalzZeZ4+0XniRfst9pAJqQHDGLzVQ2pheZnnv1OWhwO43/AgcvAEXEVVpa4db9sGvNK8wjaENHkfFQ4Ci5i7dqnQlPoLQrHXZDvO3BIXZbJOBrOaEbML6sFL798I4FhKihjHMsPjBUZYCMFr6nvaArxqXPn4lCa+cHfSa2cP27g3Z3ziYTRrcbQNGLQmGF3F3cBdzzzX7AILx0IB9rbwn9kx2G1FW3Inic+ZLIsVvKR8Zwfj0l1fkqo8LWY1M3IX14OX3r9RKTIO+d9XzAI8qRPGPn/4NC2n6o4rN8XJ82TOIvuVA8zLKUHRFgBCetlDZlqR1gLKjS39xoE7Bt8UvA6BxuEDjU3tFsEijgA+615tmZkXKqiEENrh41iLDDZNq4pKTWR3LZfnos81LOuNa15cD956vLMsJd1rqYp51gDUQqMYm2XsxnUhD2jg1DM7SeuJxxgrmpfISSXVIJIS5qJJSvJPEQ49DQTVIbYWJ9QWa/E2+c/oPK1drmC7WSfJRNKBO5Yjvcp7Gc3dmmI/Xh1kDTEuiSnWqQf37h+fTMhGnDf6dsS8SQfQWlqqwXXGlc/PEZ/SC5mtzIV0nAshlQdM/LvUtYutrEZ/Y+EAFtq1k28zQhOwLr1AIeANzhF8t9qzTdZf2qRKO6MWE9ohBYwibbOmrFtNmg3mcS+tB28xv2uKd/agYCvOP+GkSc+0lr7RXzyufL7QbkUpjLjEWFLqOIkAGu2B0tNlO9Eau2W1qcOUvVRgKzypKIQZ5KI3q0MLzqTNRYqiZOqmtqloIRlmkBHVpHmRYV6/HixbO6UC47KOFJnoMrVyr7wYz+SlW6GUaghYbY1I6kkxA2W1fSJokUdSh2LQ1GAimRGm0MT+uu57H5l7QgOWxERpO9moLRPgTtquWCfFlGlIjQaRly9odmzMOWY+IBO5tB4sW/0+VWGUh32qYk79EidWKrjWuiLpiVNGFWFRJVktyeXWmbgBBzVl8anPuXyNJlBJOlKLTgAbi/EYHVHxWiDaVR06GnHQNpJcWcK2jJtiCfG2sEHLzuI66sGrMK47nPIInPnu799935aOK2cvmvubrE38ZzZjrELCmXM2hM7UcpXD2oC3+ECVp7xtIuxptJ0jUr3sBmBS47TVxlvJ1Sqb/E0uLdvLj0lLr29ypdd/eMX3f6lrxGlKwKQxEGvw0qHbkbwrF3uHKwVENbIV2wZ13kNEF6zD+x24aLNMfDTCbDPnEikZFyTNttxWBXDaBuM8KtI2rmaMdUY7cXcUPstqTGvBGSrFWIpNMfbdea990bvAOC1YX0qbc6smDS1mPxSJoW4fwEXvjMmhlijDRq6qale6aJEuFGoppYDoBELQzLBuh/mZNx7jkinv0EtnUp50lO9hbNK57lZaMAWuWR5Yo9/kYwcYI0t4gWM47Umnl3YmpeBPqSyNp3K7s2DSAS/39KRuEN2bS4xvowV3dFRMx/VFcp2Yp8w2nTO9hCXtHG1kF1L4KlrJr2wKfyq77R7MKpFKzWlY9UkhYxyHWW6nBWPaudvEAl3CGcNpSXPZ6R9BbBtIl6cHL3gIBi+42CYXqCx1gfGWe7Ap0h3luyXdt1MKy4YUT9xSF01G16YEdWsouW9mgDHd3veyA97H+Ya47ZmEbqMY72oPztCGvK0onL44AvgC49saZKkWRz4veWljE1FHjbRJaWv6ZKKtl875h4CziFCZhG5rx7tefsl0aRT1bMHZjm8dwL/6u7wCRysaQblQoG5yAQN5zpatMNY/+yf8z+GLcH/Qn0iX2W2oEfXP4GvwQHuIL9AYGnaO3zqAX6946nkgqZNnUhx43DIdQtMFeOPrgy/y3Yd85HlJWwjLFkU3kFwq28xPnuPhMWeS+tDLV9Otllq7pQCf3uXJDN9wFDiUTgefHaiYbdfi3b3u8+iY6TnzhgehI1LTe8lcd7s1wJSzKbahCRxKKztTLXstGAiu3a6rPuQs5pk9TWAan5f0BZmGf7Ylxzzk/A7PAs4QPPPAHeFQ2hbFHszlgZuKZsJcUmbDC40sEU403cEjczstOEypa+YxevL4QBC8oRYqWdK6b7sK25tfE+oDZgtOQ2Jg8T41HGcBE6fTWHn4JtHcu9S7uYgU5KSCkl/mcnq+5/YBXOEr6lCUCwOTOM1taOI8mSxx1NsCXBEmLKbMAg5MkwbLmpBaFOPrNSlO2HnLiEqW3tHEwd8AeiQLmn+2gxjC3k6AxREqvKcJbTEzlpLiw4rNZK6oJdidbMMGX9FULKr0AkW+2qDEPBNNm5QAt2Ik2nftNWHetubosHLo2nG4vQA7GkcVCgVCgaDixHqo9UUn1A6OshapaNR/LPRYFV8siT1cCtJE0k/3WtaNSuUZYKPnsVIW0xXWnMUxq5+En4Kvw/MqQmVXnAXj9Z+9zM98zM/Agy7F/qqj2Nh67b8HjFnPP3iBn/tkpdzwEJX/whIcQUXOaikeliCRGUk7tiwF0rItwMEhjkZ309hikFoRAmLTpEXWuHS6y+am/KB/fM50aLEhGnSMwkpxzOov4H0AvgovwJ1iGzDLtJn/9BU+fAINfwUe6FHSLhu83viV/+/HrOePX+STT2B9uWGbrMHHLldRBlhS/CJQmcRxJFqZica01XixAZsYiH1uolZxLrR/SgxVIJjkpQP4PE9sE59LKLr7kltSBogS5tyszzH8Fvw8/AS8rNOg0xUS9fIaHwb+6et8Q/gyvKRjf5OusOzGx8evA/BP4IP11uN/grca5O0lcsPLJ5YjwI4QkJBOHa0WdMZYGxPbh2W2nR9v3WxEWqgp/G3+6VZbRLSAAZ3BhdhAaUL33VUSw9yjEsvbaQ9u4A/gGXwZXoEHOuU1GSj2chf+Mo+f8IcfcAxfIKVmyunRbYQVnoevwgfw3TXXcw++xNuP4fhyueEUNttEduRVaDttddoP0eSxLe2LENk6itYxlrxBNBYrNNKSQmeaLcm9c8UsaB5WyO6675yyQIAWSDpBVoA/gxmcwEvwoDv0m58UE7gHn+fJOa8/Ywan8EKRfjsopF83eCglX/Sfr7OeaRoQfvt1CGvIDccH5BCvw1sWIzRGC/66t0VTcLZQZtm6PlAasbOJ9iwWtUo7biktTSIPxnR24jxP1ZKaqq+2RcXM9OrBAm/AAs7hDJ5bNmGb+KIfwCs8a3jnjBrOFeMjHSCdbKr+2uOLfnOd9eiA8Hvvwwq54VbP2OqwkB48Ytc4YEOiH2vTXqodabfWEOzso4qxdbqD5L6tbtNPECqbhnA708DZH4QOJUXqScmUlks7Ot6FBuZw3n2mEbaUX7kDzxHOOQk8nKWMzAzu6ZZ8sOFw4RK+6PcuXo9tB4SbMz58ApfKDXf3szjNIIbGpD5TKTRxGkEMLjLl+K3wlWXBsCUxIDU+jbOiysESqAy1MGUJpXgwbTWzNOVEziIXZrJ+VIztl1PUBxTSo0dwn2bOmfDRPD3TRTGlfbCJvO9KvuhL1hMHhB9wPuPRLGHcdOWG2xc0U+5bQtAJT0nRTewXL1pgk2+rZAdeWmz3jxAqfNQQdzTlbF8uJ5ecEIWvTkevAHpwz7w78QujlD/Lr491bD8/1vhM2yrUQRrWXNQY4fGilfctMWYjL72UL/qS9eiA8EmN88nbNdour+PBbbAjOjIa4iBhfFg6rxeKdEGcL6p3EWR1Qq2Qkhs2DrnkRnmN9tG2EAqmgPw6hoL7Oza7B+3SCrR9tRftko+Lsf2F/mkTndN2LmzuMcKTuj/mX2+4Va3ki16+nnJY+S7MefpkidxwnV+4wkXH8TKnX0tsYzYp29DOOoSW1nf7nTh2akYiWmcJOuTidSaqESrTYpwjJJNVGQr+rLI7WsqerHW6Kp/oM2pKuV7T1QY9gjqlZp41/WfKpl56FV/0kvXQFRyeQ83xaTu5E8p5dNP3dUF34ihyI3GSpeCsywSh22ZJdWto9winhqifb7VRvgktxp13vyjrS0EjvrRfZ62uyqddSWaWYlwTPAtJZ2oZ3j/Sgi/mi+6vpzesfAcWNA0n8xVyw90GVFGuZjTXEQy+6GfLGLMLL523f5E0OmxVjDoOuRiH91RKU+vtoCtH7TgmvBLvtFXWLW15H9GTdVw8ow4IlRLeHECN9ym1e9K0I+Cbnhgv4Yu+aD2HaQJ80XDqOzSGAV4+4yCqBxrsJAX6ZTIoX36QnvzhhzzMfFW2dZVLOJfo0zbce5OvwXMFaZ81mOnlTVXpDZsQNuoYWveketKb5+6JOOsgX+NTm7H49fUTlx+WLuWL7qxnOFh4BxpmJx0p2gDzA/BUARuS6phR+pUsY7MMboAHx5xNsSVfVZcYSwqCKrqon7zM+8ecCkeS4nm3rINuaWvVNnMRI1IRpxTqx8PZUZ0Br/UEduo3B3hNvmgZfs9gQPj8vIOxd2kndir3awvJ6BLvoUuOfFWNYB0LR1OQJoUySKb9IlOBx74q1+ADC2G6rOdmFdJcD8BkfualA+BdjOOzP9uUhGUEX/TwhZsUduwRr8wNuXKurCixLBgpQI0mDbJr9dIqUuV+92ngkJZ7xduCk2yZKbfWrH1VBiTg9VdzsgRjW3CVXCvAwDd+c1z9dWw9+B+8MJL/eY15ZQ/HqvTwVdsZn5WQsgRRnMaWaecu3jFvMBEmgg+FJFZsnSl0zjB9OqPYaBD7qmoVyImFvzi41usesV0julaAR9dfR15Xzv9sEruRDyk1nb+QaLU67T885GTls6YgcY+UiMa25M/pwGrbCfzkvR3e0jjtuaFtnwuagHTSb5y7boBH119HXhvwP487jJLsLJ4XnUkHX5sLbS61dpiAXRoZSCrFJ+EjpeU3puVfitngYNo6PJrAigKktmwjyQdZpfq30mmtulaAx9Zfx15Xzv+cyeuiBFUs9zq8Kq+XB9a4PVvph3GV4E3y8HENJrN55H1X2p8VyqSKwVusJDKzXOZzplWdzBUFK9e+B4+uv468xvI/b5xtSAkBHQaPvtqWzllVvEOxPbuiE6+j2pvjcKsbvI7txnRErgfH7LdXqjq0IokKzga14GzQ23SSbCQvO6r+Or7SMIr/efOkkqSdMnj9mBx2DRsiY29Uj6+qK9ZrssCKaptR6HKURdwUYeUWA2kPzVKQO8ku2nU3Anhs/XWkBx3F/7wJtCTTTIKftthue1ty9xvNYLY/zo5KSbIuKbXpbEdSyeRyYdAIwKY2neyoc3+k1XUaufYga3T9daMUx/r8z1s10ITknIO0kuoMt+TB8jK0lpayqqjsJ2qtXAYwBU932zinimgmd6mTRDnQfr88q36NAI+tv24E8Pr8zxtasBqx0+xHH9HhlrwsxxNUfKOHQaZBITNf0uccj8GXiVmXAuPEAKSdN/4GLHhs/XWj92dN/uetNuBMnVR+XWDc25JLjo5Mg5IZIq226tmCsip2zZliL213YrTlL2hcFjpCduyim3M7/eB16q/blQsv5X/esDRbtJeabLIosWy3ycavwLhtxdWzbMmHiBTiVjJo6lCLjXZsi7p9PEPnsq6X6wd4bP11i0rD5fzPm/0A6brrIsllenZs0lCJlU4abakR59enZKrKe3BZihbTxlyZ2zl1+g0wvgmA166/bhwDrcn/7Ddz0eWZuJvfSESug6NzZsox3Z04FIxz0mUjMwVOOVTq1CQ0AhdbBGVdjG/CgsfUX7esJl3K/7ytWHRv683praW/8iDOCqWLLhpljDY1ZpzK75QiaZoOTpLKl60auHS/97oBXrv+umU9+FL+5+NtLFgjqVLCdbmj7pY5zPCPLOHNCwXGOcLquOhi8CmCWvbcuO73XmMUPab+ug3A6/A/78Bwe0bcS2+tgHn4J5pyS2WbOck0F51Vq3LcjhLvZ67p1ABbaL2H67bg78BfjKi/jr3+T/ABV3ilLmNXTI2SpvxWBtt6/Z//D0z/FXaGbSBgylzlsEGp+5//xrd4/ae4d8DUUjlslfIYS3t06HZpvfQtvv0N7AHWqtjP2pW08QD/FLy//da38vo8PNlKHf5y37Dxdfe/oj4kVIgFq3koLReSR76W/bx//n9k8jonZxzWTANVwEniDsg87sOSd/z7//PvMp3jQiptGVWFX2caezzAXwfgtzYUvbr0iozs32c3Uge7varH+CNE6cvEYmzbPZ9hMaYDdjK4V2iecf6EcEbdUDVUARda2KzO/JtCuDbNQB/iTeL0EG1JSO1jbXS+nLxtPMDPw1fh5+EPrgSEKE/8Gry5A73ui87AmxwdatyMEBCPNOCSKUeRZ2P6Myb5MRvgCHmA9ywsMifU+AYXcB6Xa5GibUC5TSyerxyh0j6QgLVpdyhfArRTTLqQjwe4HOD9s92D4Ap54odXAPBWLAwB02igG5Kkc+piN4lvODIFGAZgT+EO4Si1s7fjSR7vcQETUkRm9O+MXyo9OYhfe4xt9STQ2pcZRLayCV90b4D3jR0DYAfyxJ+eywg2IL7NTMXna7S/RpQ63JhWEM8U41ZyQGjwsVS0QBrEKLu8xwZsbi4wLcCT+OGidPIOCe1PiSc9Qt+go+vYqB7cG+B9d8cAD+WJPz0Am2gxXgU9IneOqDpAAXOsOltVuMzpdakJXrdPCzXiNVUpCeOos5cxnpQT39G+XVLhs1osQVvJKPZyNq8HDwd4d7pNDuWJPxVX7MSzqUDU6gfadKiNlUFTzLeFHHDlzO4kpa7aiKhBPGKwOqxsBAmYkOIpipyXcQSPlRTf+Tii0U3EJGaZsDER2qoB3h2hu0qe+NNwUooYU8y5mILbJe6OuX+2FTKy7bieTDAemaQyQ0CPthljSWO+xmFDIYiESjM5xKd6Ik5lvLq5GrQ3aCMLvmCA9wowLuWJb9xF59hVVP6O0CrBi3ZjZSNOvRy+I6klNVRJYRBaEzdN+imiUXQ8iVF8fsp+W4JXw7WISW7fDh7lptWkCwZ4d7QTXyBPfJMYK7SijjFppGnlIVJBJBYj7eUwtiP1IBXGI1XCsjNpbjENVpSAJ2hq2LTywEly3hUYazt31J8w2+aiLx3g3fohXixPfOMYm6zCGs9LVo9MoW3MCJE7R5u/WsOIjrqBoHUO0bJE9vxBpbhsd3+Nb4/vtPCZ4oZYCitNeYuC/8UDvDvy0qvkiW/cgqNqRyzqSZa/s0mqNGjtKOoTm14zZpUauiQgVfqtQiZjq7Q27JNaSK5ExRcrGCXO1FJYh6jR6CFqK7bZdQZ4t8g0rSlPfP1RdBtqaa9diqtzJkQ9duSryi2brQXbxDwbRUpFMBHjRj8+Nt7GDKgvph9okW7LX47gu0SpGnnFQ1S1lYldOsC7hYteR574ZuKs7Ei1lBsfdz7IZoxzzCVmmVqaSySzQbBVAWDek+N4jh9E/4VqZrJjPwiv9BC1XcvOWgO8275CVyBPvAtTVlDJfZkaZGU7NpqBogAj/xEHkeAuJihWYCxGN6e8+9JtSegFXF1TrhhLGP1fak3pebgPz192/8gB4d/6WT7+GdYnpH7hH/DJzzFiYPn/vjW0SgNpTNuPIZoAEZv8tlGw4+RLxy+ZjnKa5NdFoC7UaW0aduoYse6+bXg1DLg6UfRYwmhGEjqPvF75U558SANrElK/+MdpXvmqBpaXOa/MTZaa1DOcSiLaw9j0NNNst3c+63c7EKTpkvKHzu6bPbP0RkuHAVcbRY8ijP46MIbQeeT1mhA+5PV/inyDdQipf8LTvMXbwvoDy7IruDNVZKTfV4CTSRUYdybUCnGU7KUTDxLgCknqUm5aAW6/1p6eMsOYsphLzsHrE0Y/P5bQedx1F/4yPHnMB3/IOoTU9+BL8PhtjuFKBpZXnYNJxTuv+2XqolKR2UQgHhS5novuxVySJhBNRF3SoKK1XZbbXjVwWNyOjlqWJjrWJIy+P5bQedyldNScP+HZ61xKSK3jyrz+NiHG1hcOLL/+P+PDF2gOkekKGiNWKgJ+8Z/x8Iv4DdQHzcpZyF4v19I27w9/yPGDFQvmEpKtqv/TLiWMfn4sofMm9eAH8Ao0zzh7h4sJqYtxZd5/D7hkYPneDzl5idlzNHcIB0jVlQ+8ULzw/nc5/ojzl2juE0apD7LRnJxe04dMz2iOCFNtGFpTuXA5AhcTRo8mdN4kz30nVjEC4YTZQy4gpC7GlTlrePKhGsKKgeXpCYeO0MAd/GH7yKQUlXPLOasOH3FnSphjHuDvEu4gB8g66oNbtr6eMbFIA4fIBJkgayoXriw2XEDQPJrQeROAlY6aeYOcMf+IVYTU3XFlZufMHinGywaW3YLpObVBAsbjF4QJMsVUSayjk4voPsHJOQfPWDhCgDnmDl6XIRerD24HsGtw86RMHOLvVSHrKBdeVE26gKB5NKHzaIwLOmrqBWJYZDLhASG16c0Tn+CdRhWDgWXnqRZUTnPIHuMJTfLVpkoYy5CzylHVTGZMTwkGAo2HBlkQplrJX6U+uF1wZz2uwS1SQ12IqWaPuO4baZaEFBdukksJmkcTOm+YJSvoqPFzxFA/YUhIvWxcmSdPWTWwbAKVp6rxTtPFUZfKIwpzm4IoMfaYQLWgmlG5FME2gdBgm+J7J+rtS/XBbaVLsR7bpPQnpMFlo2doWaVceHk9+MkyguZNCJ1He+kuHTWyQAzNM5YSUg/GlTk9ZunAsg1qELVOhUSAK0LABIJHLKbqaEbHZLL1VA3VgqoiOKXYiS+HRyaEKgsfIqX64HYWbLRXy/qWoylIV9gudL1OWBNgBgTNmxA6b4txDT4gi3Ri7xFSLxtXpmmYnzAcWDZgY8d503LFogz5sbonDgkKcxGsWsE1OI+rcQtlgBBCSOKD1mtqYpIU8cTvBmAT0yZe+zUzeY92fYjTtGipXLhuR0ePoHk0ofNWBX+lo8Z7pAZDk8mEw5L7dVyZZoE/pTewbI6SNbiAL5xeygW4xPRuLCGbhcO4RIeTMFYHEJkYyEO9HmJfXMDEj/LaH781wHHZEtqSQ/69UnGpzH7LKIAZEDSPJnTesJTUa+rwTepI9dLJEawYV+ZkRn9g+QirD8vF8Mq0jFQ29js6kCS3E1+jZIhgPNanHdHFqFvPJLHqFwQqbIA4jhDxcNsOCCQLDomaL/dr5lyJaJU6FxPFjO3JOh3kVMcROo8u+C+jo05GjMF3P3/FuDLn5x2M04xXULPwaS6hBYki+MrMdZJSgPHlcB7nCR5bJ9Kr5ACUn9jk5kivdd8tk95SOGrtqu9lr2IhK65ZtEl7ZKrp7DrqwZfRUSN1el7+7NJxZbywOC8neNKTch5vsTEMNsoCCqHBCqIPRjIPkm0BjvFODGtto99rCl+d3wmHkW0FPdpZtC7MMcVtGFQjJLX5bdQ2+x9ypdc313uj8xlsrfuLgWXz1cRhZvJYX0iNVBRcVcmCXZs6aEf3RQF2WI/TcCbKmGU3IOoDJGDdDub0+hYckt6PlGu2BcxmhbTdj/klhccLGJMcqRjMJP1jW2ETqLSWJ/29MAoORluJ+6LPffBZbi5gqi5h6catQpmOT7/OFf5UorRpLzCqcMltBLhwd1are3kztrSzXO0LUbXRQcdLh/RdSZ+swRm819REDrtqzC4es6Gw4JCKlSnjYVpo0xeq33PrADbFLL3RuCmObVmPN+24kfa+AojDuM4umKe2QwCf6EN906HwjujaitDs5o0s1y+k3lgbT2W2i7FJdnwbLXhJUBq/9liTctSmFC/0OqUinb0QddTWamtjbHRFuWJJ6NpqZ8vO3fZJ37Db+2GkaPYLGHs7XTTdiFQJ68SkVJFVmY6McR5UycflNCsccHFaV9FNbR4NttLxw4pQ7wJd066Z0ohVbzihaxHVExd/ay04oxUKWt+AsdiQ9OUyZ2krzN19IZIwafSTFgIBnMV73ADj7V/K8u1MaY2sJp2HWm0f41tqwajEvdHWOJs510MaAqN4aoSiPCXtN2KSi46dUxHdaMquar82O1x5jqhDGvqmoE9LfxcY3zqA7/x3HA67r9ZG4O6Cuxu12/+TP+eLP+I+HErqDDCDVmBDO4larujNe7x8om2rMug0MX0rL1+IWwdwfR+p1TNTyNmVJ85ljWzbWuGv8/C7HD/izjkHNZNYlhZcUOKVzKFUxsxxN/kax+8zPWPSFKw80rJr9Tizyj3o1gEsdwgWGoxPezDdZ1TSENE1dLdNvuKL+I84nxKesZgxXVA1VA1OcL49dFlpFV5yJMhzyCmNQ+a4BqusPJ2bB+xo8V9u3x48VVIEPS/mc3DvAbXyoYr6VgDfh5do5hhHOCXMqBZUPhWYbWZECwVJljLgMUWOCB4MUuMaxGNUQDVI50TQ+S3kFgIcu2qKkNSHVoM0SHsgoZxP2d5HH8B9woOk4x5bPkKtAHucZsdykjxuIpbUrSILgrT8G7G5oCW+K0990o7E3T6AdW4TilH5kDjds+H64kS0mz24grtwlzDHBJqI8YJQExotPvoC4JBq0lEjjQkyBZ8oH2LnRsQ4Hu1QsgDTJbO8fQDnllitkxuVskoiKbRF9VwzMDvxHAdwB7mD9yCplhHFEyUWHx3WtwCbSMMTCUCcEmSGlg4gTXkHpZXWQ7kpznK3EmCHiXInqndkQjunG5kxTKEeGye7jWz9cyMR2mGiFQ15ENRBTbCp+Gh86vAyASdgmJq2MC6hoADQ3GosP0QHbnMHjyBQvQqfhy/BUbeHd5WY/G/9LK/8Ka8Jd7UFeNWEZvzPb458Dn8DGLOe3/wGL/4xP+HXlRt+M1PE2iLhR8t+lfgxsuh7AfO2AOf+owWhSZRYQbd622hbpKWKuU+XuvNzP0OseRDa+mObgDHJUSc/pKx31QdKffQ5OIJpt8GWjlgTwMc/w5MPCR/yl1XC2a2Yut54SvOtMev55Of45BOat9aWG27p2ZVORRvnEk1hqWMVUmqa7S2YtvlIpspuF1pt0syuZS2NV14mUidCSfzQzg+KqvIYCMljIx2YK2AO34fX4GWdu5xcIAb8MzTw+j/lyWM+Dw/gjs4GD6ehNgA48kX/AI7XXM/XAN4WHr+9ntywqoCakCqmKP0rmQrJJEErG2Upg1JObr01lKQy4jskWalKYfJ/EDLMpjNSHFEUAde2fltaDgmrNaWQ9+AAb8I5vKjz3L1n1LriB/BXkG/wwR9y/oRX4LlioHA4LzP2inzRx/DWmutRweFjeP3tNeSGlaE1Fde0OS11yOpmbIp2u/jF1n2RRZviJM0yBT3IZl2HWImKjQOxIyeU325b/qWyU9Moj1o07tS0G7qJDoGHg5m8yeCxMoEH8GU45tnrNM84D2l297DQ9t1YP7jki/7RmutRweEA77/HWXOh3HCxkRgldDQkAjNTMl2Iloc1qN5JfJeeTlyTRzxURTdn1Ixv2uKjs12AbdEWlBtmVdk2k7FFwj07PCZ9XAwW3dG+8xKzNFr4EnwBZpy9Qzhh3jDXebBpYcpuo4fQ44u+fD1dweEnHzI7v0xuuOALRUV8rXpFyfSTQYkhd7IHm07jpyhlkCmI0ALYqPTpUxXS+z4jgDj1Pflvmz5ecuItpIBxyTHpSTGWd9g1ApfD/bvwUhL4nT1EzqgX7cxfCcNmb3mPL/qi9SwTHJ49oj5ZLjccbTG3pRmlYi6JCG0mQrAt1+i2UXTZ2dv9IlQpN5naMYtviaXlTrFpoMsl3bOAFEa8sqPj2WCMrx3Yjx99qFwO59Aw/wgx+HlqNz8oZvA3exRDvuhL1jMQHPaOJ0+XyA3fp1OfM3qObEVdhxjvynxNMXQV4+GJyvOEFqeQBaIbbO7i63rpxCltdZShPFxkjM2FPVkn3TG+Rp9pO3l2RzFegGfxGDHIAh8SteR0C4HopXzRF61nheDw6TFN05Ebvq8M3VKKpGjjO6r7nhudTEGMtYM92HTDaR1FDMXJ1eThsbKfywyoWwrzRSXkc51flG3vIid62h29bIcFbTGhfV+faaB+ohj7dPN0C2e2lC96+XouFByen9AsunLDJZ9z7NExiUc0OuoYW6UZkIyx2YUR2z6/TiRjyKMx5GbbjLHvHuf7YmtKghf34LJfx63Yg8vrvN2zC7lY0x0tvKezo4HmGYDU+Gab6dFL+KI761lDcNifcjLrrr9LWZJctG1FfU1uwhoQE22ObjdfkSzY63CbU5hzs21WeTddH2BaL11Gi7lVdlxP1nkxqhnKhVY6knS3EPgVGg1JpN5cP/hivujOelhXcPj8HC/LyI6MkteVjlolBdMmF3a3DbsuAYhL44dxzthWSN065xxUd55Lmf0wRbOYOqH09/o9WbO2VtFdaMb4qBgtFJoT1SqoN8wPXMoXLb3p1PUEhxfnnLzGzBI0Ku7FxrKsNJj/8bn/H8fPIVOd3rfrklUB/DOeO+nkghgSPzrlPxluCMtOnDL4Yml6dK1r3vsgMxgtPOrMFUZbEUbTdIzii5beq72G4PD0DKnwjmBULUVFmy8t+k7fZ3pKc0Q4UC6jpVRqS9Umv8bxw35flZVOU1X7qkjnhZlsMbk24qQ6Hz7QcuL6sDC0iHHki96Uh2UdvmgZnjIvExy2TeJdMDZNSbdZyAHe/Yd1xsQhHiKzjh7GxQ4yqMPaywPkjMamvqrYpmO7Knad+ZQC5msCuAPWUoxrxVhrGv7a+KLXFhyONdTMrZ7ke23qiO40ZJUyzgYyX5XyL0mV7NiUzEs9mjtbMN0dERqwyAJpigad0B3/zRV7s4PIfXSu6YV/MK7+OrYe/JvfGMn/PHJe2fyUdtnFrKRNpXV0Y2559aWPt/G4BlvjTMtXlVIWCnNyA3YQBDmYIodFz41PvXPSa6rq9lWZawZ4dP115HXV/M/tnFkkrBOdzg6aP4pID+MZnTJ1SuuB6iZlyiox4HT2y3YBtkUKWooacBQUDTpjwaDt5poBHl1/HXltwP887lKKXxNUEyPqpGTyA699UqY/lt9yGdlUKra0fFWS+36iylVWrAyd7Uw0CZM0z7xKTOduznLIjG2Hx8cDPLb+OvK6Bv7n1DYci4CxUuRxrjBc0bb4vD3rN5Zz36ntLb83eVJIB8LiIzCmn6SMPjlX+yNlTjvIGjs+QzHPf60Aj62/jrzG8j9vYMFtm1VoRWCJdmw7z9N0t+c8cxZpPeK4aTRicS25QhrVtUp7U578chk4q04Wx4YoQSjFryUlpcQ1AbxZ/XVMknIU//OGl7Q6z9Zpxi0+3yFhSkjUDpnCIUhLWVX23KQ+L9vKvFKI0ZWFQgkDLvBoylrHNVmaw10zwCPrr5tlodfnf94EWnQ0lFRWy8pW9LbkLsyUVDc2NSTHGDtnD1uMtchjbCeb1mpxFP0YbcClhzdLu6lfO8Bj6q+bdT2sz/+8SZCV7VIxtt0DUn9L7r4cLYWDSXnseEpOGFuty0qbOVlS7NNzs5FOGJUqQpl2Q64/yBpZf90sxbE+//PGdZ02HSipCbmD6NItmQ4Lk5XUrGpDMkhbMm2ZVheNYV+VbUWTcv99+2NyX1VoafSuC+AN6q9bFIMv5X/eagNWXZxEa9JjlMwNWb00akGUkSoepp1/yRuuqHGbUn3UdBSTxBU6SEVklzWRUkPndVvw2PrrpjvxOvzPmwHc0hpmq82npi7GRro8dXp0KXnUQmhZbRL7NEVp1uuZmO45vuzKsHrktS3GLWXODVjw+vXXLYx4Hf7njRPd0i3aoAGX6W29GnaV5YdyDj9TFkakje7GHYzDoObfddHtOSpoi2SmzJHrB3hM/XUDDEbxP2/oosszcRlehWXUvzHv4TpBVktHqwenFo8uLVmy4DKLa5d3RtLrmrM3aMFr1183E4sewf+85VWeg1c5ag276NZrM9IJVNcmLEvDNaV62aq+14IAOGFsBt973Ra8Xv11YzXwNfmft7Jg2oS+XOyoC8/cwzi66Dhmgk38kUmP1CUiYWOX1bpD2zWXt2FCp7uq8703APAa9dfNdscR/M/bZLIyouVxqJfeWvG9Je+JVckHQ9+CI9NWxz+blX/KYYvO5n2tAP/vrlZ7+8/h9y+9qeB/Hnt967e5mevX10rALDWK//FaAT5MXdBXdP0C/BAes792c40H+AiAp1e1oH8HgH94g/Lttx1gp63op1eyoM/Bvw5/G/7xFbqJPcCXnmBiwDPb/YKO4FX4OjyCb289db2/Noqicw4i7N6TVtoz8tNwDH+8x/i6Ae7lmaQVENzJFb3Di/BFeAwz+Is9SjeQySpPqbLFlNmyz47z5a/AF+AYFvDmHqibSXTEzoT4Gc3OALaqAP4KPFUJ6n+1x+rGAM6Zd78bgJ0a8QN4GU614vxwD9e1Amy6CcskNrczLx1JIp6HE5UZD/DBHrFr2oNlgG4Odv226BodoryjGJ9q2T/AR3vQrsOCS0ctXZi3ruLlhpFDJYl4HmYtjQCP9rhdn4suySLKDt6wLcC52h8xPlcjju1fn+yhuw4LZsAGUuo2b4Fx2UwQu77uqRHXGtg92aN3tQCbFexc0uk93vhTXbct6y7MulLycoUljx8ngDMBg1tvJjAazpEmOtxlzclvj1vQf1Tx7QlPDpGpqgtdSKz/d9/hdy1vTfFHSmC9dGDZbLiezz7Ac801HirGZsWjydfZyPvHXL/Y8Mjzg8BxTZiuwKz4Eb8sBE9zznszmjvFwHKPIWUnwhqfVRcd4Ck0K6ate48m1oOfrX3/yOtvAsJ8zsPAM89sjnddmuLuDPjX9Bu/L7x7xpMzFk6nWtyQfPg278Gn4Aekz2ZgOmU9eJ37R14vwE/BL8G3aibCiWMWWDQ0ZtkPMnlcGeAu/Ag+8ZyecU5BPuy2ILD+sQqyZhAKmn7XZd+jIMTN9eBL7x95xVLSX4On8EcNlXDqmBlqS13jG4LpmGbkF/0CnOi3H8ETOIXzmnmtb0a16Tzxj1sUvQCBiXZGDtmB3KAefPH94xcUa/6vwRn80GOFyjEXFpba4A1e8KQfFF+259tx5XS4egYn8fQsLGrqGrHbztr+uByTahWuL1NUGbDpsnrwBfePPwHHIf9X4RnM4Z2ABWdxUBlqQ2PwhuDxoS0vvqB1JzS0P4h2nA/QgTrsJFn+Y3AOjs9JFC07CGWX1oNX3T/yHOzgDjwPn1PM3g9Jk9lZrMEpxnlPmBbjyo2+KFXRU52TJM/2ALcY57RUzjObbjqxVw++4P6RAOf58pcVsw9Daje3htriYrpDOonre3CudSe6bfkTEgHBHuDiyu5MCsc7BHhYDx7ePxLjqigXZsw+ijMHFhuwBmtoTPtOxOrTvYJDnC75dnUbhfwu/ZW9AgYd+peL68HD+0emKquiXHhWjJg/UrkJYzuiaL3E9aI/ytrCvAd4GcYZMCkSQxfUg3v3j8c4e90j5ZTPdvmJJGHnOCI2nHS8081X013pHuBlV1gB2MX1YNmWLHqqGN/TWmG0y6clJWthxNUl48q38Bi8vtMKyzzpFdSDhxZ5WBA5ZLt8Jv3895DduBlgbPYAj8C4B8hO68FDkoh5lydC4FiWvBOVqjYdqjiLv92t8yPDjrDaiHdUD15qkSURSGmXJwOMSxWAXYwr3zaAufJ66l+94vv3AO+vPcD7aw/w/toDvL/2AO+vPcD7aw/wHuD9tQd4f+0B3l97gPfXHuD9tQd4f+0B3l97gG8LwP8G/AL8O/A5OCq0Ys2KIdv/qOIXG/4mvFAMF16gZD+2Xvu/B8as5+8bfllWyg0zaNO5bfXj6vfhhwD86/Aq3NfRS9t9WPnhfnvCIw/CT8GLcFTMnpntdF/z9V+PWc/vWoIH+FL3Znv57PitcdGP4R/C34avw5fgRVUInCwbsn1yyA8C8zm/BH8NXoXnVE6wVPjdeCI38kX/3+Ct9dbz1pTmHFRu+Hm4O9Ch3clr99negxfwj+ER/DR8EV6B5+DuQOnTgUw5rnkY+FbNU3gNXh0o/JYTuWOvyBf9FvzX663HH/HejO8LwAl8Hl5YLTd8q7sqA3wbjuExfAFegQdwfyDoSkWY8swzEf6o4Qyewefg+cHNbqMQruSL/u/WWc+E5g7vnnEXgDmcDeSGb/F4cBcCgT+GGRzDU3hZYburAt9TEtHgbM6JoxJ+6NMzzTcf6c2bycv2+KK/f+l6LBzw5IwfqZJhA3M472pWT/ajKxnjv4AFnMEpnBTPND6s2J7qHbPAqcMK74T2mZ4VGB9uJA465It+/eL1WKhYOD7xHOkr1ajK7d0C4+ke4Hy9qXZwpgLr+Znm/uNFw8xQOSy8H9IzjUrd9+BIfenYaylf9FsXr8fBAadnPIEDna8IBcwlxnuA0/Wv6GAWPd7dDIKjMdSWueAsBj4M7TOd06qBbwDwKr7oleuxMOEcTuEZTHWvDYUO7aHqAe0Bbq+HEFRzOz7WVoTDQkVds7A4sIIxfCQdCefFRoIOF/NFL1mPab/nvOakSL/Q1aFtNpUb/nFOVX6gzyg/1nISyDfUhsokIzaBR9Kxm80s5mK+6P56il1jXic7nhQxsxSm3OwBHl4fFdLqi64nDQZvqE2at7cWAp/IVvrN6/BFL1mPhYrGMBfOi4PyjuSGf6wBBh7p/FZTghCNWGgMzlBbrNJoPJX2mW5mwZfyRffXo7OFi5pZcS4qZUrlViptrXtw+GQoyhDPS+ANjcGBNRiLCQDPZPMHuiZfdFpPSTcQwwKYdRNqpkjm7AFeeT0pJzALgo7g8YYGrMHS0iocy+YTm2vyRUvvpXCIpQ5pe666TJrcygnScUf/p0NDs/iAI/nqDHC8TmQT8x3NF91l76oDdQGwu61Z6E0ABv7uO1dbf/37Zlv+Zw/Pbh8f1s4Avur6657/+YYBvur6657/+YYBvur6657/+YYBvur6657/+aYBvuL6657/+VMA8FXWX/f8zzcN8BXXX/f8zzcNMFdbf93zP38KLPiK6697/uebtuArrr/u+Z9vGmCusP6653/+1FjwVdZf9/zPN7oHX339dc//fNMu+irrr3v+50+Bi+Zq6697/uebA/jz8Pudf9ht/fWv517J/XUzAP8C/BAeX9WCDrUpZ3/dEMBxgPcfbtTVvsYV5Yn32u03B3Ac4P3b8I+vxNBKeeL9dRMAlwO83959qGO78sT769oB7g3w/vGVYFzKE++v6wV4OMD7F7tckFkmT7y/rhHgpQO8b+4Y46XyxPvrugBeNcB7BRiX8sT767oAvmCA9woAHsoT76+rBJjLBnh3txOvkifeX1dswZcO8G6N7sXyxPvr6i340gHe3TnqVfLE++uKAb50gHcXLnrX8sR7gNdPRqwzwLu7Y/FO5Yn3AK9jXCMGeHdgxDuVJ75VAI8ljP7PAb3/RfjcZfePHBB+79dpfpH1CanN30d+mT1h9GqAxxJGM5LQeeQ1+Tb+EQJrElLb38VHQ94TRq900aMIo8cSOo+8Dp8QfsB8zpqE1NO3OI9Zrj1h9EV78PqE0WMJnUdeU6E+Jjyk/hbrEFIfeWbvId8H9oTRFwdZaxJGvziW0Hn0gqYB/wyZ0PwRlxJST+BOw9m77Amj14ii1yGM/txYQudN0qDzGe4EqfA/5GJCagsHcPaEPWH0esekSwmjRxM6b5JEcZ4ww50ilvAOFxBSx4yLW+A/YU8YvfY5+ALC6NGEzhtmyZoFZoarwBLeZxUhtY4rc3bKnjB6TKJjFUHzJoTOozF2YBpsjcyxDgzhQ1YRUse8+J4wenwmaylB82hC5w0zoRXUNXaRBmSMQUqiWSWkLsaVqc/ZE0aPTFUuJWgeTei8SfLZQeMxNaZSIzbII4aE1Nmr13P2hNHjc9E9guYNCZ032YlNwESMLcZiLQHkE4aE1BFg0yAR4z1h9AiAGRA0jyZ03tyIxWMajMPWBIsxYJCnlITU5ShiHYdZ94TR4wCmSxg9jtB5KyPGYzymAYexWEMwAPIsAdYdV6aObmNPGD0aYLoEzaMJnTc0Ygs+YDw0GAtqxBjkuP38bMRWCHn73xNGjz75P73WenCEJnhwyVe3AEe8TtKdJcYhBl97wuhNAObK66lvD/9J9NS75v17wuitAN5fe4D31x7g/bUHeH/tAd5fe4D3AO+vPcD7aw/w/toDvL/2AO+vPcD7aw/w/toDvAd4f/24ABzZ8o+KLsSLS+Pv/TqTb3P4hKlQrTGh+fbIBT0Axqznnb+L/V2mb3HkN5Mb/nEHeK7d4IcDld6lmDW/iH9E+AH1MdOw/Jlu2T1xNmY98sv4wHnD7D3uNHu54WUuOsBTbQuvBsPT/UfzNxGYzwkP8c+Yz3C+r/i6DcyRL/rZ+utRwWH5PmfvcvYEt9jLDS/bg0/B64DWKrQM8AL8FPwS9beQCe6EMKNZYJol37jBMy35otdaz0Bw2H/C2Smc7+WGB0HWDELBmOByA3r5QONo4V+DpzR/hFS4U8wMW1PXNB4TOqYz9urxRV++ntWCw/U59Ty9ebdWbrgfRS9AYKKN63ZokZVygr8GZ/gfIhZXIXPsAlNjPOLBby5c1eOLvmQ9lwkOy5x6QV1j5TYqpS05JtUgUHUp5toHGsVfn4NX4RnMCe+AxTpwmApTYxqMxwfCeJGjpXzRF61nbcHhUBPqWze9svwcHJ+S6NPscKrEjug78Dx8Lj3T8D4YxGIdxmJcwhi34fzZUr7olevZCw5vkOhoClq5zBPZAnygD/Tl9EzDh6kl3VhsHYcDEb+hCtJSvuiV69kLDm+WycrOTArHmB5/VYyP6jOVjwgGawk2zQOaTcc1L+aLXrKeveDwZqlKrw8U9Y1p66uK8dEzdYwBeUQAY7DbyYNezBfdWQ97weEtAKYQg2xJIkuveAT3dYeLGH+ShrWNwZgN0b2YL7qznr3g8JYAo5bQBziPjx7BPZ0d9RCQp4UZbnFdzBddor4XHN4KYMrB2qHFRIzzcLAHQZ5the5ovui94PCWAPefaYnxIdzRwdHCbuR4B+tbiy96Lzi8E4D7z7S0mEPd+eqO3cT53Z0Y8SV80XvB4Z0ADJi/f7X113f+7p7/+UYBvur6657/+YYBvur6657/+aYBvuL6657/+aYBvuL6657/+aYBvuL6657/+aYBvuL6657/+VMA8FXWX/f8z58OgK+y/rrnf75RgLna+uue//lTA/CV1V/3/M837aKvvv6653++UQvmauuve/7nTwfAV1N/3fM/fzr24Cuuv+75nz8FFnxl9dc9//MOr/8/glixwRuUfM4AAAAASUVORK5CYII="}
5300_getSearchTexture(){return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAAAhCAAAAABIXyLAAAAAOElEQVRIx2NgGAWjYBSMglEwEICREYRgFBZBqDCSLA2MGPUIVQETE9iNUAqLR5gIeoQKRgwXjwAAGn4AtaFeYLEAAAAASUVORK5CYII="}}function lJ(){const i=X.useRef(null);return X.useEffect(()=>{if(!i.current)return;const e=i.current,t=new Ec;t.background=new Ve(0);const n=new wn(50,e.clientWidth/e.clientHeight,.1,1e3),r=new U1({antialias:!0,powerPreference:"high-performance"});r.setSize(e.clientWidth,e.clientHeight),r.setPixelRatio(Math.min(window.devicePixelRatio,2)),r.outputColorSpace=Un,e.appendChild(r.domElement);const s=1,o=new cc;o.set(s);const a=new pi({color:"black"}),l={},c=new LM(r),u=new BM(t,n);c.renderToScreen=!1,c.addPass(u);const d=new Zu(new xe(e.clientWidth,e.clientHeight),.4,.4,0);c.addPass(d);const p=new LM(r);p.addPass(new BM(t,n));const m=new ZF(new dn({uniforms:{baseTexture:{value:null},bloomTexture:{value:c.renderTarget2.texture}},vertexShader:` 5301 varying vec2 vUv; 5302 void main() { 5303 vUv = uv; 5304 gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); 5305 } 5306 `,fragmentShader:` 5307 uniform sampler2D baseTexture; 5308 uniform sampler2D bloomTexture; 5309 varying vec2 vUv; 5310 void main() { 5311 gl_FragColor = texture2D(baseTexture, vUv) + texture2D(bloomTexture, vUv); 5312 } 5313 `}),"baseTexture");m.needsSwap=!0,p.addPass(m),p.addPass(new oJ);const x=new aJ(e.clientWidth,e.clientHeight);p.addPass(x);const v=new GY(n,r.domElement);v.enableDamping=!0,v.enableZoom=!1,v.enableRotate=!1,v.enablePan=!1,t.add(new Dw(16777215,.6));const _=new th(16777215,1.5);_.position.set(5,5,5),t.add(_);const g=new th(16777215,1);g.position.set(-5,-5,-5),t.add(g);const S={baseColor:new Ve(6461180),topColor:new Ve(6461180),bottomBrightness:2.4,fadeStrength:11,extendDown:5,speed:1.9,size:9.5,x:0,y:0,z:-3},b=` 5314 varying vec2 vUv; 5315 void main() { 5316 vUv = uv; 5317 gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); 5318 } 5319 `,A=` 5320 uniform float time; 5321 uniform vec3 baseColor; 5322 uniform vec3 topColor; 5323 uniform float bottomBrightness; 5324 uniform float fadeStrength; 5325 uniform float size; 5326 varying vec2 vUv; 5327 5328 float noise(vec2 p) { 5329 return fract(sin(dot(p, vec2(12.9898, 78.233))) * 43758.5453); 5330 } 5331 5332 float smoothNoise(vec2 p) { 5333 vec2 i = floor(p); 5334 vec2 f = fract(p); 5335 f = f * f * (3.0 - 2.0 * f); 5336 float a = noise(i); 5337 float b = noise(i + vec2(1.0, 0.0)); 5338 float c = noise(i + vec2(0.0, 1.0)); 5339 float d = noise(i + vec2(1.0, 1.0)); 5340 return mix(mix(a, b, f.x), mix(c, d, f.x), f.y); 5341 } 5342 5343 float fbm(vec2 p) { 5344 float v = 0.0; 5345 float a = 0.5; 5346 for (int i = 0; i < 4; i++) { 5347 v += a * smoothNoise(p); 5348 p *= 2.0; 5349 a *= 0.5; 5350 } 5351 return v; 5352 } 5353 5354 void main() { 5355 vec2 uv = vUv; 5356 float timeL = time * 0.15; 5357 float timeR = time * -0.12; 5358 5359 float curtainL = fbm(vec2(uv.x * size * 1.5 + timeL, 0.0)); 5360 float curtainR = fbm(vec2(uv.x * size * 1.8 + timeR, 0.5)); 5361 float curtain = (curtainL + curtainR) * 0.5; 5362 5363 float waveL = fbm(vec2(uv.x * 2.0 + timeL, uv.y * 0.5)); 5364 float waveR = fbm(vec2(uv.x * 2.5 + timeR, uv.y * 0.3)); 5365 float wave = (waveL + waveR) * 0.5; 5366 5367 float f = 0.0; 5368 f += fbm(vec2(uv.x * size + wave, uv.y * 0.2 + time * 0.05)); 5369 f *= curtain * 2.5; 5370 5371 vec3 finalColor = mix(baseColor, topColor, uv.y + wave * 0.4); 5372 float verticalFade = pow(1.0 - uv.y, fadeStrength); 5373 float alpha = pow(f, 2.5) * bottomBrightness * verticalFade; 5374 alpha *= smoothstep(0.0, 0.2, uv.x) * smoothstep(1.0, 0.8, uv.x); 5375 5376 vec3 color = finalColor * f * bottomBrightness * verticalFade; 5377 5378 // åªå¨æå ä¸åé¨åæ·»å æå¨ï¼è¿é¨åä¼è¢«åå°å°æ°´é¢ï¼ 5379 // uv.y < 0.5 æ¯æå åºé¨ï¼ä¼åºç°å¨æ°´é¢åå°ä¸ 5380 float ditherMask = smoothstep(0.5, 0.3, uv.y); // ä¸åé¨åææå¨ï¼ä¸åé¨å没æ 5381 float dither = (noise(gl_FragCoord.xy) - 0.5) / 45.0 * ditherMask; 5382 color += vec3(dither); 5383 5384 gl_FragColor = vec4(color, alpha); 5385 } 5386 `,w=new dn({uniforms:{time:{value:0},baseColor:{value:S.baseColor},topColor:{value:S.topColor},bottomBrightness:{value:S.bottomBrightness},fadeStrength:{value:S.fadeStrength},size:{value:S.size}},vertexShader:b,fragmentShader:A,transparent:!0,blending:_a,side:Di,depthWrite:!1}
5386),C=new Kt(new ks(60,40,64,64),w);C.position.set(S.x,0,S.z),C.layers.enable(s),t.add(C);const P={vertexShader:` 5387 varying vec2 vUv; 5388 void main() { 5389 vUv = uv; 5390 gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); 5391 } 5392 `,fragmentShader:` 5393 uniform float time; 5394 uniform vec3 color; 5395 uniform float intensity; 5396 varying vec2 vUv; 5397 5398 float noise(vec2 p) { 5399 return fract(sin(dot(p, vec2(12.9898, 78.233))) * 43758.5453); 5400 } 5401 5402 float smoothNoise(vec2 p) { 5403 vec2 i = floor(p); 5404 vec2 f = fract(p); 5405 f = f * f * (3.0 - 2.0 * f); 5406 float a = noise(i); 5407 float b = noise(i + vec2(1.0, 0.0)); 5408 float c = noise(i + vec2(0.0, 1.0)); 5409 float d = noise(i + vec2(1.0, 1.0)); 5410 return mix(mix(a, b, f.x), mix(c, d, f.x), f.y); 5411 } 5412 5413 float fbm(vec2 p) { 5414 float v = 0.0; 5415 float a = 0.5; 5416 for (int i = 0; i < 4; i++) { 5417 v += a * smoothNoise(p); 5418 p *= 2.0; 5419 a *= 0.5; 5420 } 5421 return v; 5422 } 5423 5424 void main() { 5425 vec2 uv = vUv; 5426 5427 // æ¨ªåæµå¨çåªå£°ï¼åªç¨äºè¾¹ç¼ï¼ 5428 float n = fbm(vec2(uv.x * 8.0 + time * 0.3, uv.y * 2.0)); 5429 float n2 = fbm(vec2(uv.x * 12.0 - time * 0.2, uv.y * 3.0 + 0.5)); 5430 float noiseValue = (n + n2) * 0.5; 5431 5432 // 计ç®è·ç¦»ä¸å¿çè·ç¦» 5433 float distFromCenter = abs(uv.y - 0.5) * 2.0; 5434 5435 // ä¸å¿åºåå®å ¨ä¸éæï¼è¾¹ç¼åºåæ·¡åº 5436 // ä¸å¿ 40% åºåä¿æä¸éæ (distFromCenter < 0.4) 5437 float edgeFade = smoothstep(0.3, 1.0, distFromCenter); 5438 5439 // ä¸å¿åºåç alpha = 1ï¼è¾¹ç¼åºåéæ¸éæ 5440 float centerAlpha = 1.0 - smoothstep(0.0, 0.5, distFromCenter); 5441 float edgeAlpha = (1.0 - edgeFade) * noiseValue; 5442 float verticalAlpha = max(centerAlpha, edgeAlpha * 0.8); 5443 5444 // è¾¹ç¼æµå¨ææå¼ºåº¦ 5445 float edgeEffect = smoothstep(0.3, 0.8, distFromCenter); 5446 5447 // æç»é¢è²ï¼ä¸å¿çº¯è²ï¼è¾¹ç¼æåªå£° 5448 float colorMix = mix(1.0, noiseValue * 1.5, edgeEffect); 5449 5450 // æ°´å¹³æ¹åæ·¡åºï¼å·¦å³è¾¹ç¼éæï¼ 5451 float horizontalFade = smoothstep(0.0, 0.2, uv.x) * smoothstep(1.0, 0.8, uv.x); 5452 5453 float finalAlpha = verticalAlpha * horizontalFade * intensity; 5454 5455 gl_FragColor = vec4(color * colorMix, finalAlpha); 5456 } 5457 `},B=new dn({uniforms:{time:{value:0},color:{value:new Ve(6461180)},intensity:{value:.48}},vertexShader:P.vertexShader,fragmentShader:P.fragmentShader,transparent:!0,blending:_a,side:Di,depthTest:!1,depthWrite:!1}),R=new Kt(new ks(80,3,64,8),B);R.renderOrder=100,R.layers.enable(s),t.add(R);const E={width:150,height:100,x:0,y:-.1,z:-30,distortionScale:.15,speed:.2,waterColor:0,sunColor:0,size:5,alpha:1},L=new zY(new ks(E.width,E.height),{textureWidth:1024,textureHeight:1024,waterNormals:new fl().load("https://threejs.org/examples/textures/waternormals.jpg",$=>{$.wrapS=$.wrapT=bo}),sunDirection:new H,sunColor:E.sunColor,waterColor:E.waterColor,distortionScale:E.distortionScale,alpha:E.alpha});L.material.transparent=!0,L.material.onBeforeCompile=$=>{$.fragmentShader=$.fragmentShader.replace("vec3 albedo = mix( ( sunColor * diffuseLight * 0.3 + scatter ) * getShadowMask(), ( vec3( 0.1 ) + reflectionSample * 0.9 + reflectionSample * specularLight ), reflectance);","vec3 albedo = mix( ( sunColor * diffuseLight * 0.3 + scatter ) * getShadowMask(), ( reflectionSample + reflectionSample * specularLight ), reflectance);")},L.material.uniforms.size.value=E.size,L.rotation.x=-Math.PI/2,L.position.y=-1,t.add(L);const N=` 5458 uniform float time; 5459 varying vec2 vUv; 5460 5461 float noise(vec2 p) { 5462 return fract(sin(dot(p, vec2(12.9898, 78.233))) * 43758.5453); 5463 } 5464 5465 float smoothNoise(vec2 p) { 5466 vec2 i = floor(p); 5467 vec2 f = fract(p); 5468 f = f * f * (3.0 - 2.0 * f); 5469 float a = noise(i); 5470 float b = noise(i + vec2(1.0, 0.0)); 5471 float c = noise(i + vec2(0.0, 1.0)); 5472 float d = noise(i + vec2(1.0, 1.0)); 5473 return mix(mix(a, b, f.x), mix(c, d, f.x), f.y); 5474 } 5475 5476 float fbm(vec2 p) { 5477 float v = 0.0; 5478 float a = 0.5; 5479 for (int i = 0; i < 4; i++) { 5480 v += a * smoothNoise(p); 5481 p *= 2.0; 5482 a *= 0.5; 5483 } 5484 return v; 5485 } 5486 5487 void main() { 5488 vec2 uv = vUv; 5489 float timeFlow = time * 0.1; 5490 5491 // æ°´å¹³æµå¨çæå ææ 5492 float aurora1 = fbm(vec2(uv.x * 15.0 + timeFlow, uv.y * 2.0)); 5493 float aurora2 = fbm(vec2(uv.x * 12.0 - timeFlow * 0.8, uv.y * 3.0 + 0.5)); 5494 float aurora = (aurora1 + aurora2) * 0.5; 5495 5496 // åç´æ¹åï¼æ´æåç髿¯å叿·¡åº 5497 float centerY = (uv.y - 0.5) * 2.0; 5498 float verticalFade = exp(-centerY * centerY * 0.8); 5499 // é¢å¤çè¾¹ç¼èå - æ´å¤§èå´ 5500 float edgeSoftness = smoothstep(0.0, 0.5, uv.y) * smoothstep(1.0, 0.5, uv.y); 5501 verticalFade *= edgeSoftness * edgeSoftness; // äºæ¬¡æ¹è®©è¾¹ç¼æ´è 5502 5503 // æ°´å¹³æ¹åï¼æ´å®½çæ¸åæ·¡åº 5504 float horizontalFade = smoothstep(0.0, 0.45, uv.x) * smoothstep(1.0, 0.55, uv.x); 5505 horizontalFade *= horizontalFade; // äºæ¬¡æ¹è®©è¾¹ç¼æ´è 5506 5507 // 亮度æ§å¶ 5508 float intensity = 0.8; 5509 float minBrightness = 0.35; 5510 float brightness = mix(minBrightness, intensity, aurora); 5511 5512 // æå é¢è²
5513 vec3 auroraColor = vec3(0.38, 0.59, 0.99) * brightness; 5514 5515 float alpha = min(verticalFade * horizontalFade * aurora * 1.2, 0.85); 5516 5517 gl_FragColor = vec4(auroraColor, alpha); 5518 } 5519 `,k=new dn({uniforms:{time:{value:0}},vertexShader:b,fragmentShader:N,transparent:!0,blending:lc,side:Di,depthTest:!1,depthWrite:!1}),Y=new Kt(new ks(50,4,32,16),k);Y.renderOrder=998,Y.visible=!1,t.add(Y);const z={color:4497660,intensity:2},W=100,V=[],G=new dh(.04,8,8);for(let $=0;$<W;$++){const J=new dl({color:z.color,emissive:z.color,emissiveIntensity:z.intensity,transparent:!0,opacity:0,depthTest:!1,depthWrite:!1}),Ue=new Kt(G,J);Ue.renderOrder=999,Ue.layers.enable(s),t.add(Ue),V.push(Ue)}const Z=[];for(let $=0;$<W;$++)Z.push(new H(0,0,0));const O=new H(0,0,0),ee=new t0(z.color,2,10);ee.visible=!1,t.add(ee);let le,ge=.5,Se=-1/0;const Ye=.15,K=new xe;let q=performance.now(),re=0,Ce=0;new sY().load("/model/FlowElement.glb",$=>{le=$.scene,le.traverse(ze=>{if(ze.isMesh){const Be=ze;if(Be.material){const Ke=Be.material;Ke.color.set(13421772),Ke.emissive.set(13421772),Ke.emissiveIntensity=.72,Ke.roughness=.4,Ke.metalness=0}}}),t.add(le),le.layers.set(0),L.layers.set(0);const Ue=new jn().setFromObject(le).getSize(new H),Ne=Math.max(Ue.x,Ue.y,Ue.z),Ae=Ne>0?2.8/Ne:.8;le.scale.set(Ae,Ae,Ae);const U=new jn().setFromObject(le),F=U.getCenter(new H),ne=U.getSize(new H);ge=U.max.z+.2,L.position.set(E.x,U.min.y+E.y,E.z),L.position.y-=.325,Se=L.position.y,C.position.y=U.min.y-S.extendDown+20+S.y,R.position.set(0,L.position.y+.07,S.z+.5),R.rotation.x=-Math.PI/2;const se=L.position.y+.08,he=E.z-E.height/2+.5;Y.position.set(0,se,he),Y.rotation.x=-Math.PI/2+.1;const de=Math.max(ne.x,ne.y,ne.z);if(de>0){const ze=e.clientWidth/e.clientHeight,Be=de*1.5;n.position.z=ze<1?Be/ze*.75:Be}n.position.y=1.25,v.target.set(F.x,F.y,F.z),le.position.y=.55}),n.position.z=2;const De=$=>{const J=performance.now(),Ue=J-q,Ne=$.clientX/window.innerWidth*2-1,ke=-($.clientY/window.innerHeight)*2+1;if(Ue>0){const Ae=Math.sqrt(Math.pow(Ne-K.x,2)+Math.pow(ke-K.y,2));Ce=Ce*.8+Ae/Ue*.2}q=J,ee.visible=!0,K.x=Ne,K.y=ke},tt=()=>{ee.visible=!1,Ce=0,K.x=0,K.y=0};window.addEventListener("mousemove",De),document.addEventListener("mouseleave",tt);const Pe=()=>{const $=e.clientWidth,J=e.clientHeight,Ue=$/J;if(n.aspect=Ue,le){const ke=new jn().setFromObject(le).getSize(new H),Ae=Math.max(ke.x,ke.y,ke.z);if(Ae>0){const U=Ae*1.5;n.position.z=Ue<1?U/Ue*.75:U}}n.updateProjectionMatrix(),r.setSize($,J),r.setPixelRatio(Math.min(window.devicePixelRatio,2)),c.setSize($,J),p.setSize($,J),x.setSize($,J)};window.addEventListener("resize",Pe);const me=new n0;let Ee;function be(){Ee=requestAnimationFrame(be);const $=me.getDelta(),J=performance.now();L.material.uniforms.time.value+=$*E.speed,w.uniforms.time.value+=$*S.speed,B.uniforms.time.value+=$*1.5,k.uniforms.time.value+=$*1.5;const Ne=J-q<100&&Ce>2e-4?1:0;if(re+=(Ne-re)*.15,le){const se=10*(Math.PI/180),he=K.x*se,de=K.y*-se;le.rotation.y+=(he-le.rotation.y)*.03,le.rotation.x+=(de-le.rotation.x)*.03}
5519v.update();const ke=new H(K.x,K.y,.5);ke.unproject(n);const Ae=ke.sub(n.position).normalize(),U=(ge-n.position.z)/Ae.z,F=n.position.clone().add(Ae.multiplyScalar(U)),ne=Se+Ye;if(F.y<ne&&Ae.y!==0){const se=(ne-n.position.y)/Ae.y;se>0&&(F.x=n.position.x+Ae.x*se,F.y=ne,F.z=n.position.z+Ae.z*se)}if(ee.position.copy(F),ee.intensity=2*re,ee.visible){const se=F.distanceTo(O),he=Math.min(Math.floor(se/.02),10);for(let de=0;de<=he;de++){const ze=new H().lerpVectors(O,F,(de+1)/(he+1)),Be=Se+Ye;ze.y<Be&&(ze.y=Be),Z.unshift(ze),Z.pop()}}O.copy(F);for(let se=0;se<W;se++){const he=V[se],de=Z[se];he.position.lerp(de,.2);const ze=Se+Ye;he.position.y<ze&&(he.position.y=ze);const Be=(W-se)/W;he.scale.setScalar(Be*.5*re);const Ke=he.material;Ke.opacity=ee.visible?Be*.5*re:Ke.opacity*.9}t.traverse(se=>{se.isMesh&&!o.test(se.layers)&&(l[se.uuid]=se.material,se.material=a)}),c.render(),t.traverse(se=>{l[se.uuid]&&(se.material=l[se.uuid],delete l[se.uuid])}),p.render()}return be(),()=>{cancelAnimationFrame(Ee),window.removeEventListener("mousemove",De),document.removeEventListener("mouseleave",tt),window.removeEventListener("resize",Pe),r.dispose(),c.dispose(),p.dispose(),e.contains(r.domElement)&&e.removeChild(r.domElement)}},[]),y.jsx("div",{ref:i,style:{width:"100%",height:"100%",position:"absolute",top:0,left:0}})}function QF({smokeColor:i="#C4B896",centerX:e=-3,centerY:t=4,innerRadius:n=8,outerRadius:r=10,screenLeft:s=-15,screenRight:o=15,trailFalloff:a=6e3,fadeSpeed:l=2,warpStrength:c=25,turbulenceSpeed:u=.5,turbulenceScale:d=50,scrollSpeed:p=5e-4,scale:m=1,radialFlowSpeed:x=.3,fadeScale:v=1}){const _=X.useRef(null),{gl:g,size:S}=Bi(),b=X.useRef({x:.5,y:.5,active:!1}),A=X.useRef({x:.5,y:.5}),w=X.useRef({x:0,y:0}),C=X.useRef(null);X.useEffect(()=>{const B=g.domElement,R=L=>{const N=B.getBoundingClientRect();L.clientX>=N.left&&L.clientX<=N.right&&L.clientY>=N.top&&L.clientY<=N.bottom?(b.current.x=(L.clientX-N.left)/N.width,b.current.y=1-(L.clientY-N.top)/N.height,b.current.active=!0):b.current.active=!1},E=()=>{b.current.active=!1};return window.addEventListener("mousemove",R),window.addEventListener("mouseleave",E),()=>{window.removeEventListener("mousemove",R),window.removeEventListener("mouseleave",E)}},[g]),X.useLayoutEffect(()=>{const R={minFilter:jt,magFilter:jt,format:Ni,type:sr,depthBuffer:!1,stencilBuffer:!1},E=new Gn(128,128,R),L=new Gn(128,128,R),N=new or(-1,1,1,-1,0,1),k=new Ec,Y=new ks(2,2),z=new dn({uniforms:{uPrevState:{value:null},uMouse:{value:new xe(.5,.5)},uMouseVelocity:{value:new xe(0,0)},uTime:{value:0},uDeltaTime:{value:.016},uTrailFalloff:{value:a},uFadeSpeed:{value:l},uTurbulenceSpeed:{value:u},uTurbulenceScale:{value:d},uScrollSpeed:{value:p},uAspect:{value:S.width/S.height}},vertexShader:` 5520 varying vec2 vUv; 5521 void main() { 5522 vUv = uv; 5523 gl_Position = vec4(position.xy, 0.0, 1.0); 5524 } 5525 `,fragmentShader:` 5526 precision highp float; 5527 5528 uniform sampler2D uPrevState; 5529 uniform vec2 uMouse; 5530 uniform vec2 uMouseVelocity; 5531 uniform float uTime; 5532 uniform float uDeltaTime; 5533 uniform float uTrailFalloff; 5534 uniform float uFadeSpeed; 5535 uniform float uTurbulenceSpeed; 5536 uniform float uTurbulenceScale; 5537 uniform float uScrollSpeed; 5538 uniform float uAspect; 5539 5540 varying vec2 vUv; 5541 5542 // åªå£°å½æ° 5543 float hash(vec2 p) { 5544 return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453); 5545 } 5546 5547 float noise(vec2 p) { 5548 vec2 i = floor(p); 5549 vec2 f = fract(p); 5550 f = f * f * (3.0 - 2.0 * f); 5551 float a = hash(i); 5552 float b = hash(i + vec2(1.0, 0.0)); 5553 float c = hash(i + vec2(0.0, 1.0)); 5554 float d = hash(i + vec2(1.0, 1.0)); 5555 return mix(mix(a, b, f.x), mix(c, d, f.x), f.y); 5556 } 5557 5558 // æ¹æµå½æ° 5559 vec2 turbulence(vec2 p, float t) { 5560 mat2 rot = mat2(0.6, -0.8, 0.8, 0.6); 5561 vec2 turb = vec2(0.0); 5562 float freq = uTurbulenceScale; 5563 5564 for (float i = 0.0; i < 6.0; i++) { 5565 vec2 pos = p + uTurbulenceSpeed * i * t * vec2(0.1, 0.0); 5566 float phase = freq * (pos * rot).y + uTurbulenceSpeed * t * freq * 0.1; 5567 turb += rot[0] * sin(phase) / freq; 5568 rot *= mat2(0.6, -0.8, 0.8, 0.6); 5569 freq *= 1.3; 5570 } 5571 return turb; 5572 } 5573 5574 void main() { 5575 float cyclicTime = mod(uTime, 480.0); // 8åéå¾ªç¯ 5576 vec2 ratio = vec2(1.0, 1.0 / uAspect);
5577 float delta = 144.0 * uDeltaTime; 5578 5579 // æ»å¨åæ¹æµ 5580 vec2 scroll = uScrollSpeed * vec2(1.0, vUv.y - 0.5) * ratio; 5581 vec2 turb = turbulence((vUv + scroll) / ratio, cyclicTime); 5582 vec2 distort = 0.02 * turb; 5583 5584 // å¸¦ææ²çéæ · 5585 vec2 distortedUv = vUv + delta * scroll + delta * distort * ratio; 5586 distortedUv = clamp(distortedUv, 0.001, 0.999); 5587 vec4 prev = texture2D(uPrevState, distortedUv); 5588 5589 // ========== 线段è·ç¦»æå°¾ ========== 5590 vec2 trailA = vUv + 0.01 * delta * turb * ratio - uMouse; 5591 vec2 trailB = -uMouseVelocity; 5592 float trailD = dot(trailB, trailB); 5593 5594 float falloff = 0.0; 5595 if (trailD > 0.0) { 5596 float f = clamp(dot(trailA, trailB) / trailD, 0.0, 1.0); 5597 vec2 trailDif = trailA / ratio - f * trailB / ratio; 5598 falloff = 1.0 / (1.0 + uTrailFalloff * dot(trailDif, trailDif)); 5599 falloff *= min(trailD / (0.001 + trailD), 1.0); 5600 } 5601 5602 // ========== åºäºæ¶é´çææ°è¡°å ========== 5603 float noiseVal = noise(gl_FragCoord.xy / 64.0 + cyclicTime * vec2(7.1, 9.1)); 5604 vec4 fadeExp = vec4(0.5, 0.5, 0.8, 0.8); 5605 vec4 fade = pow(vec4(noiseVal), fadeExp); 5606 fade = exp(-uFadeSpeed * fade * uDeltaTime * 2.0); 5607 5608 vec4 decay = mix(vec4(0.5, 0.5, 0.0, 0.0), prev, fade); 5609 5610 // è¾åº 5611 vec4 col = decay; 5612 vec2 vel = (-trailB) / (0.01 + length(trailB)); 5613 col.rg -= (0.5 - abs(decay.rg - 0.5)) * (falloff * vel * 0.5); 5614 5615 float vig = 0.5 + 0.5 * (uMouse.x - uMouseVelocity.x); 5616 col.ba += falloff * (1.0 - decay.ba) * vec2(1.0, vig * vig); 5617 5618 col += (noiseVal - 0.5) / 255.0; 5619 gl_FragColor = col; 5620 } 5621 `,depthTest:!1,depthWrite:!1}),W=new dn({uniforms:{uTime:{value:0},uColor:{value:new Ve(i)},uTrailState:{value:null},uCenterX:{value:e},uCenterY:{value:t},uInnerRadius:{value:n},uOuterRadius:{value:r},uScreenLeft:{value:s},uScreenRight:{value:o},uWarpStrength:{value:c},uScale:{value:m},uAspect:{value:S.width/S.height},uRadialFlowSpeed:{value:x},uFadeScale:{value:v}},vertexShader:` 5622 varying vec2 vWorldPos; 5623 varying vec2 vUv; 5624 void main() { 5625 vec4 worldPosition = modelMatrix * vec4(position, 1.0); 5626 vWorldPos = worldPosition.xy; 5627 vUv = uv; 5628 gl_Position = projectionMatrix * viewMatrix * worldPosition; 5629 } 5630 `,fragmentShader:` 5631 precision highp float; 5632 5633 uniform float uTime; 5634 uniform vec3 uColor; 5635 uniform sampler2D uTrailState; 5636 // ç¯å½¢åºå 5637 uniform float uCenterX; 5638 uniform float uCenterY; 5639 uniform float uInnerRadius; 5640 uniform float uOuterRadius; 5641 uniform float uScreenLeft; 5642 uniform float uScreenRight; 5643 uniform float uWarpStrength; 5644 uniform float uScale; 5645 uniform float uAspect; 5646 uniform float uRadialFlowSpeed; 5647 uniform float uFadeScale; 5648 5649 varying vec2 vWorldPos; 5650 varying vec2 vUv; 5651 5652 // åªå£°å½æ° 5653 float hash(vec2 p) { 5654 return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453); 5655 } 5656 5657 float noise(vec2 p) { 5658 vec2 i = floor(p); 5659 vec2 f = fract(p); 5660 f = f * f * (3.0 - 2.0 * f); 5661 float a = hash(i); 5662 float b = hash(i + vec2(1.0, 0.0)); 5663 float c = hash(i + vec2(0.0, 1.0)); 5664 float d = hash(i + vec2(1.0, 1.0)); 5665 return mix(mix(a, b, f.x), mix(c, d, f.x), f.y); 5666 } 5667 5668 // FBM - X.AI 飿 ¼æåçé¾ï¼3 å±ï¼åå° GPU è´è½½ï¼ 5669 float fbm(vec2 p) { 5670 float value = 0.0; 5671 float amp = 0.6; 5672 float freq = 0.8; 5673 mat2 rot = mat2(0.8, 0.6, -0.6, 0.8); 5674 for (int i = 0; i < 3; i++) { 5675 value += amp * (0.5 + 0.5 * noise(p * freq)); 5676 p = rot * p * 1.9; 5677 amp *= 0.55; 5678 } 5679 return value / 1.1; 5680 } 5681 5682 // ç¯å½¢åºåé®ç½© 5683 float ringMask(vec2 pos) { 5684 vec2 center = vec2(uCenterX, uCenterY); 5685 float dist = length(pos - center); 5686 5687 // å å¤åè¾¹ç 5688 if (dist < uInnerRadius || dist > uOuterRadius) return 0.0; 5689 if (pos.x < uScreenLeft || pos.x > uScreenRight) return 0.0; 5690 5691 // éèä¸åé¨åï¼y > åå¿y çé¨åï¼ 5692 if (pos.y > uCenterY) return 0.0; 5693 5694 // æåè¾¹ç¼ï¼æ¸éèå´éè§å£ç¼©æ¾ï¼ 5695 float fadeRange = 0.8 * uFadeScale; 5696 float innerFade = smoothstep(uInnerRadius, uInnerRadius + fadeRange, dist); 5697 float outerFade = smoothstep(uOuterRadius, uOuterRadius - fadeRange, dist); 5698 5699 // ========== å·¦å³è¾¹çæ¸éèå´ï¼æ uFadeScale 缩æ¾ï¼ååºå¼éé ï¼ ========== 5700 float leftFadeRange = 18.0 * uFadeScale; // å·¦ä¾§è¾¹çæ¸éèå´ï¼è¶å¤§è¶æåï¼ 5701 float rightFadeRange = 4.0 * uFadeScale; // å³ä¾§è¾¹çæ¸éèå´ï¼è¶å¤§è¶æåï¼ 5702 5703 float leftFade = smoothstep(uScreenLeft, uScreenLeft + leftFadeRange, pos.x); 5704 float rightFade = smoothstep(uScreenRight, uScreenRight - rightFadeRange, pos.x); 5705 5706 return innerFade * outerFade * leftFade * rightFade; 5707 } 5708 5709 // World â UV 5710 vec2 worldToUv(vec2 worldPos) { 5711 float camZ = 20.0; 5712 float fovY = 1.0472; 5713 float halfHeight = camZ * tan(fovY * 0.5); 5714 float halfWidth = halfHeight * uAspect; 5715 return vec2( 5716 worldPos.x / (2.0 * halfWidth) + 0.5, 5717 worldPos.y / (2.0 * halfHeight) + 0.5 5718 ); 5719 } 5720 5721 void main() { 5722 float t = uTime; 5723 float cyclicT = mod(t, 480.0); // 8åé循ç¯ï¼é¿å æµ®ç¹ç²¾åº¦é®é¢ 5724 vec2 pos = vWorldPos; 5725 5726 // ========== ç¯å½¢åºåé®ç½© ========== 5727 float regionMask = ringMask(pos); 5728 if (regionMask < 0.01) { 5729 discard; 5730 } 5731 5732 // ç¸å¯¹äºåå¿çåæ 5733 vec2 center = vec2(uCenterX, uCenterY); 5734 vec2 relPos = pos - center; 5735 float distFromCenter = length(relPos); 5736 5737 // ========== æå æµå¨ææ ========== 5738 vec2 radial = normalize(relPos); 5739 vec2 tangent = vec2(-radial.y, radial.x); 5740 float angle = atan(relPos.y, relPos.x); 5741 5742 // 计ç®ä»å å°å¤çå½ä¸åè·ç¦» 5743 float shellThick = uOuterRadius - uInnerRadius; 5744 float radialPos = (distFromCenter - uInnerRadius) / shellThick; 5745 radialPos = clamp(radialPos, 0.0, 1.0); 5746 5747 // ========== é¼ æ æ¶æ¼ªææ ========== 5748 vec2 rippleUv = worldToUv(pos); 5749 vec4 rippleState = texture2D(uTrailState, clamp(rippleUv, 0.0, 1.0)); 5750 vec2 rippleVel = (rippleState.rg - 0.5) * 2.0; 5751 float rippleIntensity = rippleState.a; 5752
5753 // ========== å¾åå夿©æ£æµå¨ï¼ä½¿ç¨æåæ éæ ·ï¼ ========== 5754 // ç¨æåæ æ¥éæ ·åªå£°ï¼é¿å å¾åæä¼¸äº§ççæ¡çº¹ 5755 float radialFlow = cyclicT * uRadialFlowSpeed; 5756 5757 // æåæ ï¼ç¨è§åº¦åè·ç¦»ä½ä¸ºéæ ·åæ 5758 // è·ç¦»éæ¶é´åå° = 纹ççèµ·æ¥å夿µå¨ 5759 float flowDist = distFromCenter - radialFlow * 2.0; 5760 5761 // ========== æåçå¾åæ°å¨ææï¼å夿©æ£ï¼ ========== 5762 float outwardFlow = cyclicT * uRadialFlowSpeed * 0.5; 5763 5764 // 使ç¨å¤å± FBM åªå£°ï¼è®©æ°å¨æ´æåèªç¶ï¼æ²¡æææ¾ç纹çå½¢ç¶ 5765 vec2 turbCoord = vec2(angle * 1.2, (distFromCenter - outwardFlow) * 0.06); 5766 5767 // æååªå£°å å ï¼2 å±ï¼é«é¢å±å¯¹è§è§è´¡ç®æå°ï¼ 5768 float turb = 0.0; 5769 turb += noise(turbCoord) * 0.6; 5770 turb += noise(turbCoord * 2.1 + 10.0) * 0.4; 5771 5772 // æåçæ°å¨å¼ºåº¦ï¼åå°ä»¥é¿å ææ¾çº¹çï¼ 5773 float radialTurbStrength = 43.5; 5774 float turbOffset = (turb - 1.5) * radialTurbStrength; 5775 5776 // æåæ éæ ·ï¼æ°å¨æ´æåãæ´èªç¶ï¼ 5777 vec2 polarCoord1 = vec2(angle * 2.0, flowDist * 0.25 + turbOffset); 5778 vec2 polarCoord2 = vec2(angle * 1.8 + 10.0, flowDist * 0.22 + turbOffset * 0.7); 5779 vec2 polarCoord3 = vec2(angle * 2.2 + 20.0, flowDist * 0.28 + turbOffset * 0.5); 5780 5781 // æ¶æ¼ªæ°å¨ 5782 polarCoord1 += rippleVel * rippleIntensity * 0.5; 5783 polarCoord2 += rippleVel * rippleIntensity * 0.4; 5784 5785 // å¤å±çé¾çº¹ç - ç´æ¥ FBM éæ ·ï¼å»é¤ softSmoke ä¸éåä½éæ ·ï¼ 5786 float smoke1 = fbm(polarCoord1 + cyclicT * 0.08 * vec2(0.1, 0.05)); 5787 float smoke2 = fbm(polarCoord2 + cyclicT * 0.06 * vec2(-0.05, 0.1)); 5788 float smoke3 = fbm(polarCoord3 + cyclicT * 0.1 * vec2(0.08, -0.03)); 5789 5790 // æ··åæé 5791 float w1 = 0.4; 5792 float w2 = 0.35; 5793 float w3 = 0.25; 5794 5795 // ç»åçé¾å± 5796 float smoke = smoke1 * w1 + smoke2 * w2 + smoke3 * w3; 5797 smoke = smoke / (w1 + w2 + w3); 5798 5799 // ========== æå å¼å¸ææ ========== 5800 // æåç亮度波å¨ï¼ä¸æ¯æ¡çº¹ 5801 float breathSpeed = 0.8; 5802 float breathScale = 19.0; 5803 5804 // ååæµå¨ï¼ä¸ååå·¦ï¼ä¸ååå³ 5805 // å峿µå¨çå± 5806 float breathRight1 = sin(angle * breathScale + cyclicT * breathSpeed) * 0.5 + 0.5; 5807 float breathRight2 = sin(angle * breathScale * 1.3 + cyclicT * breathSpeed * 0.7 + 2.0) * 0.5 + 0.5; 5808 5809 // åå·¦æµå¨çå± 5810 float breathLeft1 = sin(angle * breathScale * 0.8 - cyclicT * breathSpeed * 0.9) * 0.5 + 0.5; 5811 float breathLeft2 = sin(angle * breathScale * 1.1 - cyclicT * breathSpeed * 1.1 + 3.5) * 0.5 + 0.5; 5812 5813 // æ··åååå¼å¸ï¼åè¡¡æéï¼ 5814 float rightFlow = breathRight1 * 0.6 + breathRight2 * 0.4; 5815 float leftFlow = breathLeft1 * 0.6 + breathLeft2 * 0.4; 5816 float aurora = rightFlow * 0.5 + leftFlow * 0.5; 5817 aurora = smoothstep(0.2, 0.8, aurora); // æåè¿æ¸¡ 5818 aurora = 0.5 + aurora * 0.5; // èå´ 0.5-1.0ï¼ä¸ä¼å®å ¨åé» 5819 5820 // åªå¨å¤ååºç¨æå ææï¼å åä¿æç¨³å®ï¼ 5821 float auroraBlend = smoothstep(0.2, 0.6, radialPos); 5822 aurora = mix(1.0, aurora, auroraBlend); 5823 5824 // åºç¨æå å°çé¾ 5825 smoke = smoke * aurora; 5826 5827 // æå对æ¯åº¦ 5828 smoke = smoothstep(0.1, 0.9, smoke); 5829 smoke = pow(smoke, 0.55); 5830 5831 // ========== 亮度æ¸å ========== 5832 // ç±å å夿¸éï¼å 侧亮ï¼å¤ä¾§æ·¡ 5833 float shellThickness = uOuterRadius - uInnerRadius; 5834 float normalizedDist = (distFromCenter - uInnerRadius) / shellThickness; 5835 float innerBrightness = 1.0 - normalizedDist; // å ä¾§100%ï¼å¤ä¾§0% 5836 5837 // è§åº¦äº®åº¦ï¼æ£ä¸æ¹åå³21.5°æäº®ï¼åä¸¤ä¾§è¿æ¸¡ 5838 // (angle å·²å¨æå ææä¸å®ä¹) 5839 float targetAngle = -1.155; // -68.5° (æ£ä¸æ¹-90°åå³21.5°) 5840 float angleDiff2 = angle - targetAngle; 5841 // å¤çè§åº¦ç¯ç» 5842 if (angleDiff2 > 3.14159) angleDiff2 -= 6.28318; 5843 if (angleDiff2 < -3.14159) angleDiff2 += 6.28318; 5844 5845 // ========== å嫿§å¶å·¦å³æ¸é ========== 5846 float leftFadeRange = 0.3; // 左侧æ¸éèå´ï¼å¼§åº¦ï¼è¶å¤§è¶æåï¼ 5847 float rightFadeRange = 0.3; // å³ä¾§æ¸éèå´ï¼å¼§åº¦ï¼è¶å¤§è¶æåï¼ 5848 5849 float angleBrightness; 5850 if (angleDiff2 > 0.0) { 5851 // 左侧ï¼è§åº¦å¤§äºç®æ è§åº¦ï¼ 5852 angleBrightness = 1.0 - smoothstep(0.0, leftFadeRange, angleDiff2); 5853 } else { 5854 // å³ä¾§ï¼è§åº¦å°äºç®æ è§åº¦ï¼ 5855 angleBrightness = 1.0 - smoothstep(0.0, rightFadeRange, -angleDiff2); 5856 } 5857 angleBrightness = pow(angleBrightness, 0.8); 5858 angleBrightness = 1.0 + angleBrightness * 1.5; // æ£å¸¸100%ï¼æäº®250% 5859 5860 float brightness = innerBrightness * angleBrightness; 5861 5862 // ========== æå°¾ææ ========== 5863 vec2 trailUv = worldToUv(pos); 5864 vec4 trailState = texture2D(uTrailState, clamp(trailUv, 0.0, 1.0)); 5865 vec2 trailVel = (trailState.rg - 0.5) * 2.0; 5866 float trailIntensity = trailState.a; 5867 5868 // ææ½æ¶çé¾è¢«æ¨å¼
5869 smoke *= 1.0 - trailIntensity * 0.6; 5870 5871 // ææ½è¾¹ç¼åå ææï¼å·²ç¦ç¨ï¼ 5872 float trailGlow = 0.0; 5873 5874 // ========== åºå±æ¨¡ç³èæ¯ï¼å·²éèï¼ ========== 5875 float bgAlpha = 0.0; // éèèæ¯ç¯ 5876 vec3 bgColor = uColor; 5877 5878 // ========== å ååé®ç½©å±ï¼å¹³æ»è¦çæ°å¨ææ ========== 5879 // ä» 0.2 å°æå¤ä¾§å¹³æ»è¿æ¸¡ 5880 float innerMask = 1.0 - smoothstep(0.2, 1.0, radialPos); 5881 innerMask = innerMask * innerMask * innerMask; // ç«æ¹æ²çº¿ï¼è¾¹ç¼æ´æå 5882 5883 // éæé®ç½©å±ï¼æ æµå¨ææï¼ 5884 // 使ç¨éæåæ çææåç纹ç 5885 vec2 staticCoord = vec2(angle * 2.0, distFromCenter * 0.1); 5886 staticCoord += rippleVel * rippleIntensity * 0.5; // ä¿çé¼ æ æ¶æ¼ª 5887 5888 float staticNoise = noise(staticCoord) * 0.5 + noise(staticCoord * 2.0 + 5.0) * 0.3; 5889 staticNoise = staticNoise / 0.8; 5890 5891 // é®ç½©å±åºç¡äº®åº¦ 5892 float maskBase = 0.45 + staticNoise * 0.2; 5893 5894 // ä¿çé¼ æ æå°¾ææï¼è¢«æ¨å¼ï¼ 5895 maskBase *= 1.0 - trailIntensity * 0.6; 5896 5897 // å¹³æ»æ··åï¼å ååç¨éæé®ç½©ï¼å¤ååä¿æå¨ææ°å¨ 5898 float maskedSmoke = mix(smoke, maskBase, innerMask); 5899 5900 // ========== æç»é¢è² ========== 5901 float finalSmoke = maskedSmoke * brightness * regionMask; 5902 5903 // åå ææ 5904 float glow = pow(finalSmoke, 0.9) * 2.5; 5905 5906 vec3 smokeCol = uColor * glow; 5907 5908 // æ ¸å¿æ´äº® 5909 float coreGlow = smoothstep(0.4, 0.8, finalSmoke) * 0.5; 5910 smokeCol += uColor * coreGlow; 5911 5912 // çé¾éæåº¦ 5913 float smokeAlpha = finalSmoke * innerBrightness * 0.95 * 0.8; 5914 5915 // åå¹¶ï¼èæ¯å± + çé¾å± 5916 // èæ¯å¨ä¸é¢ï¼çé¾å¨ä¸é¢ 5917 vec3 col = bgColor * bgAlpha + smokeCol * smokeAlpha; 5918 5919 // æ·»å ææ½è¾¹ç¼åå ç»æ¡ 5920 col += uColor * trailGlow * 1.5; 5921 5922 float alpha = max(bgAlpha, smokeAlpha); 5923 alpha = max(alpha, trailGlow * 0.8); // è¾¹ç¼ä¹æéæåº¦ 5924 5925 // Tonemap 5926 col = col / (1.0 + col); 5927 col = sqrt(col); 5928 5929 alpha = clamp(alpha, 0.0, 0.9); 5930 5931 // é²è²å¸¦ 5932 float dither = (hash(gl_FragCoord.xy + t) - 0.5) * 0.015; 5933 col += dither; 5934 5935 gl_FragColor = vec4(col, alpha); 5936 } 5937 `,transparent:!0,depthWrite:!1,blending:_a,side:Di}),V=new Kt(Y,z);k.add(V),C.current={rtA:E,rtB:L,current:0,trailMaterial:z,smokeMaterial:W,quadMesh:V,quadScene:k,quadCamera:N};const G=10,Z=16/9;z.uniforms.uAspect.value=Z,W.uniforms.uAspect.value=Z;let O=0;for(let le=0;le<G;le++){const ge=O===0?E:L,Se=O===0?L:E;z.uniforms.uPrevState.value=ge.texture,z.uniforms.uMouse.value.set(.5,.5),z.uniforms.uMouseVelocity.value.set(0,0),z.uniforms.uTime.value=le*.016,z.uniforms.uDeltaTime.value=.016,V.material=z,g.setRenderTarget(Se),g.render(k,N),g.setRenderTarget(null),O=O===0?1:0}C.current.current=O;const ee=O===0?E:L;return W.uniforms.uTrailState.value=ee.texture,W.uniforms.uTime.value=G*.016,_.current&&(_.current.material=W),()=>{E.dispose(),L.dispose(),Y.dispose(),z.dispose(),W.dispose(),C.current=null}},[g]),X.useEffect(()=>{if(!C.current)return;const B=C.current;B.smokeMaterial.uniforms.uColor.value.set(i),B.smokeMaterial.uniforms.uCenterX.value=e,B.smokeMaterial.uniforms.uCenterY.value=t,B.smokeMaterial.uniforms.uInnerRadius.value=n,B.smokeMaterial.uniforms.uOuterRadius.value=r,B.smokeMaterial.uniforms.uScreenLeft.value=s,B.smokeMaterial.uniforms.uScreenRight.value=o,B.smokeMaterial.uniforms.uWarpStrength.value=c,B.smokeMaterial.uniforms.uScale.value=m,B.smokeMaterial.uniforms.uRadialFlowSpeed.value=x,B.smokeMaterial.uniforms.uFadeScale.value=v,B.trailMaterial.uniforms.uTrailFalloff.value=a,B.trailMaterial.uniforms.uFadeSpeed.value=l,B.trailMaterial.uniforms.uTurbulenceSpeed.value=u,B.trailMaterial.uniforms.uTurbulenceScale.value=d,B.trailMaterial.uniforms.uScrollSpeed.value=p},[i,e,t,n,r,s,o,c,m,x,v,a,l,u,d,p]),od((B,R)=>
5937{if(!C.current)return;const E=C.current,L=Math.min(R,.033),N=B.clock.elapsedTime;if(_.current&&_.current.material!==E.smokeMaterial&&(_.current.material=E.smokeMaterial),b.current.active){const z=b.current.x-A.current.x,W=b.current.y-A.current.y;w.current.x+=(z/L-w.current.x)*.5,w.current.y+=(W/L-w.current.y)*.5;const V=Math.sqrt(w.current.x**2+w.current.y**2);if(V>50){const G=50/V;w.current.x*=G,w.current.y*=G}}else w.current.x*=.85,w.current.y*=.85;A.current.x=b.current.x,A.current.y=b.current.y;const k=E.current===0?E.rtA:E.rtB,Y=E.current===0?E.rtB:E.rtA;E.trailMaterial.uniforms.uPrevState.value=k.texture,E.trailMaterial.uniforms.uMouse.value.set(b.current.x,b.current.y),E.trailMaterial.uniforms.uMouseVelocity.value.set(w.current.x*.015,w.current.y*.015),E.trailMaterial.uniforms.uTime.value=N,E.trailMaterial.uniforms.uDeltaTime.value=L,E.trailMaterial.uniforms.uAspect.value=S.width/S.height,E.quadMesh.material=E.trailMaterial,g.setRenderTarget(Y),g.render(E.quadScene,E.quadCamera),g.setRenderTarget(null),E.current=E.current===0?1:0,E.smokeMaterial.uniforms.uTime.value=N,E.smokeMaterial.uniforms.uTrailState.value=Y.texture,E.smokeMaterial.uniforms.uAspect.value=S.width/S.height});const P=X.useMemo(()=>{const R=s-2,E=o+2,L=t-r-2,N=t+2;return{cx:(R+E)/2,cy:(L+N)/2,w:E-R,h:N-L}},[t,r,s,o]);return y.jsx("mesh",{ref:_,position:[P.cx,P.cy,0],children:y.jsx("planeGeometry",{args:[P.w,P.h]})})}new Ve(0);const ue={DEBUG_SHOW_CAMERA_INFO:!1,BLOOM_ENABLED:!0,VORTEX_PARTICLE_COUNT:2e4,VORTEX_R_INNER:.82,VORTEX_R_OUTER:2,ECCENTRICITY_INNER:1,ECCENTRICITY_OUTER:1,TILT_INNER:-35*Math.PI/180,TILT_OUTER:-5*Math.PI/180,VORTEX_ROTATION:0,Z_DEPTH_INNER:-2.5,Z_DEPTH_OUTER:3,VORTEX_CENTER_X:-.12,VORTEX_CENTER_Y:-.25,ANGULAR_SPEED_BASE:.01,ANGULAR_SPEED_INNER_MULT:3,ANGULAR_SPEED_OUTER_MULT:.1,PARTICLE_MOVE_SPEED_MIN:.01,PARTICLE_MOVE_SPEED_MAX:.05,INITIAL_SPREAD_TIME:15,STREAM_LINE_COUNT:150,STREAM_PARTICLES_PER_LINE:100,STREAM_LINE_LENGTH:.35,SPIRAL_ARM_COUNT:0,SPIRAL_ARM_PARTICLES:6e3,SPIRAL_ARM_TIGHTNESS:.6,SPIRAL_ARM_WIDTH:.36,BRIGHT_ANGLE:-Math.PI*.38,BRIGHTNESS_CAP:13.05,BRIGHTNESS_MIN:2.02,BRIGHTNESS_MULTIPLIER:1.55,PARTICLE_SIZE_MIN:.02,PARTICLE_SIZE_MAX:.04,PARTICLE_SIZE_EDGE_BOOST:0,STARFIELD_COUNT:350,STARFIELD_SIZE_MIN:.15,STARFIELD_SIZE_MAX:.6,STARFIELD_ALPHA_MIN:.08,STARFIELD_ALPHA_MAX:.35,BLOOM_STRENGTH:.02,BLOOM_RADIUS:.53,BLOOM_THRESHOLD:.01,VIGNETTE_INTENSITY:.35,VIGNETTE_SMOOTHNESS:.5,CAMERA_FOV:55,CAMERA_POS_X:.72,CAMERA_POS_Y:-.16,CAMERA_POS_Z:2.18,CAMERA_TARGET_X:-.1,CAMERA_TARGET_Y:-.2,CAMERA_TARGET_Z:-.1,MAX_DT:.033,MAX_PIXEL_RATIO:2,WORLD_SCALE:2,VIDEO_PLAYBACK_RATE:.5,VIDEO_LOOP:!0,VIDEO_MUTED:!0,VIDEO_PLAYS_INLINE:!0,VIDEO_PRELOAD:"metadata",VIDEO_CROSS_ORIGIN:"anonymous",OUTWARD_SPEED_INNER:3.15,OUTWARD_SPEED_OUTER:3.05,TANGENT_SPEED_MULT:2.7,MOUSE_RADIUS:2,MOUSE_PUSH_STRENGTH:1.5},cJ=` 5938uniform float uTime; 5939uniform float uPixelRatio; 5940 5941attribute float aAlpha; 5942attribute float aSize; 5943attribute float aPhase; 5944 5945varying float vAlpha; 5946varying float vPhase; 5947 5948void main() { 5949 vec4 mvPosition = modelViewMatrix * vec4(position, 1.0); 5950 gl_Position = projectionMatrix * mvPosition; 5951 5952 // éè§ç¼©æ¾ï¼è¿å¤§è¿å°ï¼ 5953 float depth = -mvPosition.z; // ç¸æºç©ºé´ä¸çæ·±åº¦ï¼æ£å¼ï¼ 5954 float sizeAttenuation = 200.0 / max(depth, 0.5); // 鲿¢é¤é¶ï¼å¢å¼ºææ 5955 gl_PointSize = aSize * uPixelRatio * sizeAttenuation; 5956 gl_PointSize = clamp(gl_PointSize, 0.5, 40.0); // å 许æ´å¤§çç²å 5957 5958 vAlpha = aAlpha; 5959 vPhase = aPhase; 5960} 5961`,uJ=` 5962uniform float uTime; 5963 5964varying float vAlpha; 5965varying float vPhase; 5966 5967void main() { 5968 vec2 uv = gl_PointCoord - vec2(0.5); 5969 float dist = length(uv); 5970 5971 // å®å ¨ç¡¬è¾¹åå½¢ï¼æ æ¨¡ç³æ å æï¼ 5972 if (dist > 0.4) discard; 5973 5974 // 微弱éªç 5975 float twinkle = 0.95 + 0.05 * sin(uTime * 1.2 + vPhase * 6.28); 5976 5977 // 纯ç½è² 5978 vec3 color = vec3(1.0); 5979 5980 float alpha = vAlpha * twinkle; 5981 5982 gl_FragColor = vec4(color, alpha); 5983} 5984`,dJ=({className:i,style:e,showBackground:t=!0,videoSrc:n})=>{const r=X.useRef(null),s=X.useRef(null),o=X.useRef(null),a=X.useRef(null),l=X.useRef(null),c=X.useRef(null),u=X.useRef(null),d=X.useRef(null),p=X.useRef(null),m=X.useRef(null),x=X.useRef(null),v=X.useRef(null),_=X.useRef(null),g=X.useRef(0),S=X.useRef(0);X.useRef(0);const b=X.useRef({position:new H(0,0,0),prevPosition:new H(0,0,0),velocity:new H(0,0,0),isInWindow:!0,lastUpdateTime:performance.now()}),[A,w]=X.useState({posX:0,posY:0,posZ:0,targetX:0,targetY:0,targetZ:0}),C=X.useCallback(()=>{const L=ue.WORLD_SCALE,N=ue.VORTEX_CENTER_X*L,k=ue.VORTEX_CENTER_Y*L,Y=ue.VORTEX_R_OUTER-ue.VORTEX_R_INNER,z=ue.STREAM_LINE_COUNT*ue.STREAM_PARTICLES_PER_LINE,W=ue.SPIRAL_ARM_COUNT*ue.SPIRAL_ARM_PARTICLES,V=ue.VORTEX_PARTICLE_COUNT,G=z+W+V,Z=new Float32Array(G*3),O=new Float32Array(G),ee=new Float32Array(G),le=new Float32Array(G),ge=[];let Se=0;for(let Ye=0;Ye<ue.STREAM_LINE_COUNT;Ye++){const K=.1+Math.pow(Math.random(),.7)*.85,q=ue.VORTEX_R_INNER+K*Y,re=Math.random()*Math.PI*2,Ce=ue.STREAM_LINE_LENGTH*Math.PI*2*(.5+Math.random()*.5),Te=q*L,De=ue.ECCENTRICITY_INNER+K*(ue.ECCENTRICITY_OUTER-ue.ECCENTRICITY_INNER),tt=Te*De,Pe=ue.TILT_INNER+K*(ue.TILT_OUTER-ue.TILT_INNER),me=ue.Z_DEPTH_INNER+K*(ue.Z_DEPTH_OUTER-ue.Z_DEPTH_INNER),Ee=ue.ANGULAR_SPEED_INNER_MULT+(ue.ANGULAR_SPEED_OUTER_MULT-ue.ANGULAR_SPEED_INNER_MULT)*K,be=ue.ANGULAR_SPEED_BASE*Ee,$=Math.pow(K,.6)*Math.exp(-Math.pow((K-.7)*2,2));for(let J=0;J<ue.STREAM_PARTICLES_PER_LINE;J++){const Ue=J/(ue.STREAM_PARTICLES_PER_LINE-1),Ne=re+Ue*Ce,ke=Te*Math.cos(Ne),Ae=tt*Math.sin(Ne),U=ke,F=Ae*Math.cos(Pe),ne=Ae*Math.sin(Pe)*.5+me,se=ue.VORTEX_ROTATION,he=N+U*Math.cos(se)-F*Math.sin(se),de=k+U*Math.sin(se)+F*Math.cos(se),ze=ne;let Be=Math.abs(Ne-ue.BRIGHT_ANGLE);Be>Math.PI&&(Be=2*Math.PI-Be);const Ke=Math.pow(Math.cos(Be/2),2.5),$e=Math.sin(Ue*Math.PI),Fe=$*(.1+Ke*.9)*$e*ue.BRIGHTNESS_MULTIPLIER,Xe=.5+K*.5+$e*.2,it=ue.PARTICLE_SIZE_MIN+Xe*(ue.PARTICLE_SIZE_MAX-ue.PARTICLE_SIZE_MIN);Z[Se*3]=he,Z[Se*3+1]=de,Z[Se*3+2]=ze,O[Se]=Math.min(ue.BRIGHTNESS_CAP,Math.max(ue.BRIGHTNESS_MIN,Fe)),ee[Se]=it*(.6+Math.random()*.5),le[Se]=Math.random();const ie=ue.PARTICLE_MOVE_SPEED_MIN+Math.random()*(ue.PARTICLE_MOVE_SPEED_MAX-ue.PARTICLE_MOVE_SPEED_MIN);ge.push({orbitRadius:q*L,orbitNorm:K,angle:Ne,angularSpeed:be*(.9+Math.random()*.2),baseAlpha:$,eccentricity:De,tilt:Pe,velocityX:0,velocityY:0,velocityZ:0,targetX:he,targetY:de,targetZ:ze,moveSpeed:ie}),Se++}}for(let Ye=0;Ye<ue.SPIRAL_ARM_COUNT;Ye++){const K=Ye/ue.SPIRAL_ARM_COUNT*Math.PI*2;for(let q=0;q<ue.SPIRAL_ARM_PARTICLES;q++){const re=q/ue.SPIRAL_ARM_PARTICLES,Ce=.08+re*.88,Te=ue.VORTEX_R_INNER+Ce*Y,De=K+Math.log(1+re*5)*ue.SPIRAL_ARM_TIGHTNESS*2,tt=ue.ANGULAR_SPEED_INNER_MULT+(ue.ANGULAR_SPEED_OUTER_MULT-ue.ANGULAR_SPEED_INNER_MULT)*Ce,Pe=ue.ANGULAR_SPEED_BASE*tt*ue.INITIAL_SPREAD_TIME,me=De+Pe,Ee=(Math.random()-.5)*2*ue.SPIRAL_ARM_WIDTH*Te,be=(Te+Ee)*L,$=ue.ECCENTRICITY_INNER+Ce*(ue.ECCENTRICITY_OUTER-ue.ECCENTRICITY_INNER),J=be*$,Ue=ue.TILT_INNER+Ce*(ue.TILT_OUTER-ue.TILT_INNER),Ne=ue.Z_DEPTH_INNER+Ce*(ue.Z_DEPTH_OUTER-ue.Z_DEPTH_INNER),ke=be*Math.cos(me),Ae=J*Math.sin(me),U=ke,F=Ae*Math.cos(Ue),ne=Ae*Math.sin(Ue)*.5+Ne+(Math.random()-.5)*.05,se=ue.VORTEX_ROTATION,he=N+U*Math.cos(se)-F*Math.sin(se),de=k+U*Math.sin(se)+F*Math.cos(se),ze=ne+(Math.random()-.5)*.05;
5984let Be=Math.abs(me-ue.BRIGHT_ANGLE);Be>Math.PI&&(Be=2*Math.PI-Be);const Ke=Math.pow(Math.cos(Be/2),2.5),$e=Math.exp(-Math.pow(Math.abs(Ee)/(ue.SPIRAL_ARM_WIDTH*Te)*2,2)),Fe=Math.pow(Ce,.5)*Math.exp(-Math.pow((Ce-.75)*2,2)),Xe=Fe*$e*(.1+Ke*.9)*ue.BRIGHTNESS_MULTIPLIER,it=.5+Ce*.5+$e*.3,ie=ue.PARTICLE_SIZE_MIN+it*(ue.PARTICLE_SIZE_MAX-ue.PARTICLE_SIZE_MIN),fe=ue.ANGULAR_SPEED_BASE*tt;Z[Se*3]=he,Z[Se*3+1]=de,Z[Se*3+2]=ze,O[Se]=Math.min(ue.BRIGHTNESS_CAP,Math.max(ue.BRIGHTNESS_MIN,Xe)),ee[Se]=ie*(.6+Math.random()*.8),le[Se]=Math.random();const He=ue.PARTICLE_MOVE_SPEED_MIN+Math.random()*(ue.PARTICLE_MOVE_SPEED_MAX-ue.PARTICLE_MOVE_SPEED_MIN);ge.push({orbitRadius:Te*L,orbitNorm:Ce,angle:me,angularSpeed:fe*(.85+Math.random()*.3),baseAlpha:Fe*$e,eccentricity:$,tilt:Ue,velocityX:0,velocityY:0,velocityZ:0,targetX:he,targetY:de,targetZ:ze,moveSpeed:He}),Se++}}for(let Ye=0;Ye<ue.VORTEX_PARTICLE_COUNT;Ye++){const K=Math.random();let q;K<.5?q=.4+Math.pow(Math.random(),.6)*.58:K<.8?(q=.7+(()=>{let He=0,Q=0;for(;He===0;)He=Math.random();for(;Q===0;)Q=Math.random();return Math.sqrt(-2*Math.log(He))*Math.cos(2*Math.PI*Q)})()*.18,q=Math.max(.1,Math.min(.98,q))):q=Math.pow(Math.random(),.6);const re=ue.VORTEX_R_INNER+q*Y,Ce=Math.random()*Math.PI*2,Te=re*L,De=ue.ECCENTRICITY_INNER+q*(ue.ECCENTRICITY_OUTER-ue.ECCENTRICITY_INNER),tt=Te*De,Pe=ue.TILT_INNER+q*(ue.TILT_OUTER-ue.TILT_INNER),me=ue.Z_DEPTH_INNER+q*(ue.Z_DEPTH_OUTER-ue.Z_DEPTH_INNER),Ee=Te*Math.cos(Ce),be=tt*Math.sin(Ce),$=Ee,J=be*Math.cos(Pe),Ue=be*Math.sin(Pe)*.5+me+(Math.random()-.5)*.06,Ne=ue.VORTEX_ROTATION,ke=N+$*Math.cos(Ne)-J*Math.sin(Ne),Ae=k+$*Math.sin(Ne)+J*Math.cos(Ne),U=Ue;let F=Math.abs(Ce-ue.BRIGHT_ANGLE);F>Math.PI&&(F=2*Math.PI-F);const ne=Math.pow(Math.cos(F/2),2.5),se=Math.pow(q,.6)*Math.exp(-Math.pow((q-.8)*2.5,2)),he=se*(.08+ne*.92)*ue.BRIGHTNESS_MULTIPLIER,de=q>.7?(q-.7)/.3*ue.PARTICLE_SIZE_EDGE_BOOST:0,ze=.4+q*.6,Be=ue.PARTICLE_SIZE_MIN+ze*(ue.PARTICLE_SIZE_MAX-ue.PARTICLE_SIZE_MIN)+de,Ke=ue.ANGULAR_SPEED_INNER_MULT+(ue.ANGULAR_SPEED_OUTER_MULT-ue.ANGULAR_SPEED_INNER_MULT)*q,$e=ue.ANGULAR_SPEED_BASE*Ke;Z[Se*3]=ke,Z[Se*3+1]=Ae,Z[Se*3+2]=U,O[Se]=Math.min(ue.BRIGHTNESS_CAP,Math.max(ue.BRIGHTNESS_MIN,he)),ee[Se]=Be*(.5+Math.random()*1),le[Se]=Math.random();const Fe=ue.PARTICLE_MOVE_SPEED_MIN+Math.random()*(ue.PARTICLE_MOVE_SPEED_MAX-ue.PARTICLE_MOVE_SPEED_MIN);ge.push({orbitRadius:re*L,orbitNorm:q,angle:Ce,angularSpeed:$e*(.8+Math.random()*.4),baseAlpha:se,eccentricity:De,tilt:Pe,velocityX:0,velocityY:0,velocityZ:0,targetX:ke,targetY:Ae,targetZ:U,moveSpeed:Fe}),Se++}return{positions:Z,alphas:O,sizes:ee,phases:le,particleData:ge,totalCount:G}},[]),P=X.useCallback(()=>{const L=ue.STARFIELD_COUNT,N=new Float32Array(L*3),k=new Float32Array(L),Y=new Float32Array(L),z=new Float32Array(L);for(let W=0;W<L;W++){N[W*3]=(Math.random()-.5)*10,N[W*3+1]=(Math.random()-.5)*7,N[W*3+2]=-1+Math.random()*.5;const V=Math.pow(Math.random(),2);Y[W]=ue.STARFIELD_SIZE_MIN+V*(ue.STARFIELD_SIZE_MAX-ue.STARFIELD_SIZE_MIN),k[W]=ue.STARFIELD_ALPHA_MIN+Math.random()*(ue.STARFIELD_ALPHA_MAX-ue.STARFIELD_ALPHA_MIN),z[W]=Math.random()}return{positions:N,alphas:k,sizes:Y,phases:z}},[]),B=X.useCallback(()=>{if(!r.current)return;const L=r.current,N=L.clientWidth,k=L.clientHeight,Y=N/k,z=new U1({antialias:!0,alpha:!0,powerPreference:"high-performance",preserveDrawingBuffer:!1});z.setSize(N,k),z.setPixelRatio(Math.min(window.devicePixelRatio,ue.MAX_PIXEL_RATIO)),z.setClearColor(0,t?1:0),z.autoClear=!0,z.outputColorSpace=Un,z.toneMapping=zs;const W=z.domElement;W.style.background="transparent",W.style.backgroundColor="transparent",W.style.position="relative",W.style.width="100%",W.style.height="100%",W.style.zIndex="1",W.style.pointerEvents="auto",L.appendChild(W),s.current=z,z.setClearColor(0,t?1:0),requestAnimationFrame(()=>{W.style.background="transparent",W.style.backgroundColor="transparent",console.log("Canvas æ ·å¼å·²è®¾ç½®ï¼èæ¯åºè¯¥éæ"),console.log("Canvas computed style:",window.getComputedStyle(W).backgroundColor),console.log("Container background:",window.getComputedStyle(L).backgroundImage)});const V=new Ec;if(n){const q=document.createElement("video");
5984q.src=n,q.loop=ue.VIDEO_LOOP,q.muted=ue.VIDEO_MUTED,q.playsInline=ue.VIDEO_PLAYS_INLINE,q.preload=ue.VIDEO_PRELOAD,q.crossOrigin=ue.VIDEO_CROSS_ORIGIN,u.current=q,q.playbackRate=ue.VIDEO_PLAYBACK_RATE;const re=new xw(q);re.colorSpace=Un,re.minFilter=jt,re.magFilter=jt,d.current=re,V.background=re,q.play().then(()=>{q.playbackRate=ue.VIDEO_PLAYBACK_RATE,console.log("è§é¢çº¹çå·²åå»ºå¹¶ææ¾ï¼ææ¾éç:",q.playbackRate)}).catch(Ce=>{console.error("è§é¢ææ¾å¤±è´¥:",Ce);const Te=()=>{q.playbackRate=ue.VIDEO_PLAYBACK_RATE,q.play().catch(De=>console.error("æå¨ææ¾å¤±è´¥:",De)),document.removeEventListener("click",Te),document.removeEventListener("touchstart",Te)};document.addEventListener("click",Te),document.addEventListener("touchstart",Te)})}else t&&new fl().load("/Bg.png",re=>{re.colorSpace=Un,V.background=re,console.log("åºæ¯èæ¯å¾çå·²å è½½ï¼é¢è²ç©ºé´:",re.colorSpace)},void 0,re=>{console.error("åºæ¯èæ¯å¾çå 载失败:",re)});a.current=V;const G=new wn(ue.CAMERA_FOV,Y,.1,100);G.position.set(ue.CAMERA_POS_X,ue.CAMERA_POS_Y,ue.CAMERA_POS_Z),G.lookAt(ue.CAMERA_TARGET_X,ue.CAMERA_TARGET_Y,ue.CAMERA_TARGET_Z),l.current=G;const{positions:Z,alphas:O,sizes:ee,phases:le,particleData:ge}=C();x.current=Z,v.current=O,_.current=ge;const Se=new Rt;Se.setAttribute("position",new zt(Z,3)),Se.setAttribute("aAlpha",new zt(O,1)),Se.setAttribute("aSize",new zt(ee,1)),Se.setAttribute("aPhase",new zt(le,1));const Ye=new dn({vertexShader:cJ,fragmentShader:uJ,uniforms:{uTime:{value:0},uPixelRatio:{value:z.getPixelRatio()}},transparent:!0,depthWrite:!1,blending:_a}),K=new uc(Se,Ye);K.renderOrder=1,V.add(K),p.current=K;{const q=new LM(z),re=new BM(V,G);re.clear=!0,q.addPass(re);const Ce=new Zu(new xe(N,k),ue.BLOOM_STRENGTH,ue.BLOOM_RADIUS,ue.BLOOM_THRESHOLD);q.addPass(Ce),o.current=q}S.current=performance.now(),R()},[C,P,t,n]),R=X.useCallback(()=>{g.current=requestAnimationFrame(R);const L=s.current,N=a.current,k=l.current,Y=p.current,z=x.current,W=v.current,V=_.current;if(!L||!N||!k||!Y||!z||!W||!V)return;const G=performance.now();let Z=(G-S.current)/1e3;Z=Math.min(Z,ue.MAX_DT),S.current=G;const O=G*.001,ee=ue.WORLD_SCALE,le=ue.VORTEX_CENTER_X*ee,ge=ue.VORTEX_CENTER_Y*ee;for(let K=0;K<V.length;K++){const q=V[K],re=z[K*3],Ce=z[K*3+1],Te=z[K*3+2],De=q.targetX-re,tt=q.targetY-Ce,Pe=q.targetZ-Te,me=Math.sqrt(De*De+tt*tt+Pe*Pe);if(Math.sqrt(q.velocityX*q.velocityX+q.velocityY*q.velocityY+q.velocityZ*q.velocityZ)<.001||me<.1){const Re=Math.sqrt((re-le)*(re-le)+(Ce-ge)*(Ce-ge)),Ge=ue.VORTEX_R_OUTER-ue.VORTEX_R_INNER,Le=Math.max(0,Math.min(1,(Re/ee-ue.VORTEX_R_INNER)/Ge));let Me;Le>=.95?Me=.7+Math.random()*.25:(Me=Le+(1-Le)*.3*(.5+Math.random()*.5),Me=Math.min(.98,Me));const lt=(ue.VORTEX_R_INNER+Me*Ge)*ee,Pt=lt*q.eccentricity,Qe=ue.Z_DEPTH_INNER+Me*(ue.Z_DEPTH_OUTER-ue.Z_DEPTH_INNER),rt=Math.random()*Math.PI*2,Mt=lt*Math.cos(rt),nt=Pt*Math.sin(rt),yt=Mt,ft=nt*Math.cos(q.tilt),Tt=nt*Math.sin(q.tilt)*.5+Qe+(Math.random()-.5)*.3,tn=ue.VORTEX_ROTATION;q.targetX=le+yt*Math.cos(tn)-ft*Math.sin(tn),q.targetY=ge+yt*Math.sin(tn)+ft*Math.cos(tn),q.targetZ=Tt}const be=re-le,$=Ce-ge,J=Math.sqrt(be*be+$*$),Ue=ue.VORTEX_R_OUTER-ue.VORTEX_R_INNER,Ne=Math.max(0,Math.min(1,(J/ee-ue.VORTEX_R_INNER)/Ue));let ke=0;{const Re=ue.OUTWARD_SPEED_INNER-ue.OUTWARD_SPEED_OUTER;ke=(ue.OUTWARD_SPEED_INNER-Ne*Re)*q.moveSpeed}let Ae=0,U=0;J>.01&&(Ae=be/J,U=$/J);const F=q.targetX-re,ne=q.targetY-Ce,se=q.targetZ-Te,he=Math.sqrt(F*F+ne*ne+se*se);if(he>0){const Re=q.moveSpeed*ue.TANGENT_SPEED_MULT,Ge=F/he*Re,Le=ne/he*Re,Me=se/he*Re;q.velocityX=Ge+Ae*ke,q.velocityY=Le+U*ke,q.velocityZ=Me}else q.velocityX=Ae*ke,q.velocityY=U*ke,q.velocityZ=0;if(b.current.isInWindow){const Re=b.current.position,Ge=re-Re.x,Le=Ce-Re.y,Me=Te-Re.z,Oe=Math.sqrt(Ge*Ge+Le*Le+Me*Me);if(Oe<ue.MOUSE_RADIUS&&Oe>.001){const lt=Oe/ue.MOUSE_RADIUS,Pt=Math.pow(1-lt,2)*ue.MOUSE_PUSH_STRENGTH,Qe=Ge/Oe*Pt,rt=Le/Oe*Pt,Mt=Me/Oe*Pt*.5;q.velocityX+=Qe,q.velocityY+=rt,q.velocityZ+=Mt}}let de=re+q.velocityX*Z,ze=Ce+q.velocityY*Z,Be=Te+q.velocityZ*Z;const Ke=de-le,$e=ze-ge,Fe=Math.sqrt(Ke*Ke+$e*$e),Xe=ue.VORTEX_R_OUTER*ee*1.1,it=ue.VORTEX_R_INNER*ee*.9,ie=Math.max(0,Math.min(1,(Fe/ee-ue.VORTEX_R_INNER)/Ue));if(q.orbitNorm=ie,q.orbitRadius=(ue.VORTEX_R_INNER+ie*Ue)*ee,Fe>Xe||Fe<it)if(Fe>Xe){const Re=.1+Math.random()*.2,Ge=ue.VORTEX_R_INNER+Re*Ue,Le=Math.random()*Math.PI*2,Me=Ge*ee,Oe=Me*q.eccentricity,lt=ue.Z_DEPTH_INNER+Re*(ue.Z_DEPTH_OUTER-ue.Z_DEPTH_INNER),Pt=Me*Math.cos(Le),Qe
5984=Oe*Math.sin(Le),rt=Pt,Mt=Qe*Math.cos(q.tilt),nt=Qe*Math.sin(q.tilt)*.5+lt,yt=ue.VORTEX_ROTATION;de=le+rt*Math.cos(yt)-Mt*Math.sin(yt),ze=ge+rt*Math.sin(yt)+Mt*Math.cos(yt),Be=nt,q.orbitNorm=Re,q.orbitRadius=Ge*ee;const ft=Re+.2+Math.random()*.3,tn=(ue.VORTEX_R_INNER+ft*Ue)*ee,Lt=tn*q.eccentricity,cn=ue.Z_DEPTH_INNER+ft*(ue.Z_DEPTH_OUTER-ue.Z_DEPTH_INNER),Dn=Le+(Math.random()-.5)*.5,bn=tn*Math.cos(Dn),fn=Lt*Math.sin(Dn),qt=bn,wi=fn*Math.cos(q.tilt),hn=fn*Math.sin(q.tilt)*.5+cn;q.targetX=le+qt*Math.cos(yt)-wi*Math.sin(yt),q.targetY=ge+qt*Math.sin(yt)+wi*Math.cos(yt),q.targetZ=hn,q.velocityX=0,q.velocityY=0,q.velocityZ=0}else{const Re=Math.atan2($e,Ke),Ge=(Fe/ee-ue.VORTEX_R_INNER)/Ue,Le=Math.min(.95,Ge+.2),Oe=(ue.VORTEX_R_INNER+Le*Ue)*ee;de=le+Math.cos(Re)*Oe,ze=ge+Math.sin(Re)*Oe;const lt=Math.random()*Math.PI*2,Qe=Math.min(.98,Le+.15),rt=ue.VORTEX_R_INNER+Qe*Ue,Mt=rt*ee*Math.cos(lt),nt=rt*ee*q.eccentricity*Math.sin(lt),yt=Mt,ft=nt*Math.cos(q.tilt),Tt=nt*Math.sin(q.tilt)*.5+ue.Z_DEPTH_INNER+Qe*(ue.Z_DEPTH_OUTER-ue.Z_DEPTH_INNER),tn=ue.VORTEX_ROTATION;q.targetX=le+yt*Math.cos(tn)-ft*Math.sin(tn),q.targetY=ge+yt*Math.sin(tn)+ft*Math.cos(tn),q.targetZ=Tt,q.orbitNorm=Qe,q.orbitRadius=rt*ee}z[K*3]=de,z[K*3+1]=ze,z[K*3+2]=Be;const fe=Math.atan2(ze-ge,de-le);let He=Math.abs(fe-ue.BRIGHT_ANGLE);He>Math.PI&&(He=2*Math.PI-He);const Q=Math.pow(Math.cos(He/2),2.5),je=q.baseAlpha*(.08+Q*.92)*ue.BRIGHTNESS_MULTIPLIER;W[K]=Math.min(ue.BRIGHTNESS_CAP,Math.max(ue.BRIGHTNESS_MIN,je))}const Se=Y.geometry;Se.getAttribute("position").needsUpdate=!0,Se.getAttribute("aAlpha").needsUpdate=!0;const Ye=Y.material;if(Ye.uniforms.uTime.value=O,m.current){const K=m.current.material;K.uniforms.uTime.value=O}d.current&&u.current&&u.current.readyState>=2&&(d.current.needsUpdate=!0),c.current&&c.current.update(),o.current&&ue.BLOOM_ENABLED?o.current.render():L.render(N,k)},[]),E=X.useCallback(()=>{if(!r.current||!s.current||!l.current)return;const L=r.current,N=L.clientWidth,k=L.clientHeight;s.current.setSize(N,k),l.current.aspect=N/k,l.current.updateProjectionMatrix(),o.current&&o.current.setSize(N,k)},[]);return X.useEffect(()=>{const L=Y=>{if(!r.current||!l.current||!s.current)return;const W=r.current.getBoundingClientRect(),V=(Y.clientX-W.left)/W.width*2-1,G=-((Y.clientY-W.top)/W.height)*2+1,Z=new H(V,G,.5);Z.unproject(l.current);const O=l.current,ee=Z.sub(O.position).normalize(),le=(-.5-O.position.z)/ee.z,ge=O.position.clone().add(ee.multiplyScalar(le)),Se=performance.now(),Ye=Math.max(.001,(Se-b.current.lastUpdateTime)/1e3),K=b.current.velocity;K.subVectors(ge,b.current.prevPosition).divideScalar(Ye),K.clampLength(0,50),b.current.prevPosition.copy(b.current.position),b.current.position.copy(ge),b.current.lastUpdateTime=Se,b.current.isInWindow=!0},N=()=>{b.current.isInWindow=!1,b.current.velocity.multiplyScalar(.9)},k=()=>{b.current.isInWindow=!0};return window.addEventListener("mousemove",L),window.addEventListener("mouseleave",N),window.addEventListener("mouseenter",k),()=>{window.removeEventListener("mousemove",L),window.removeEventListener("mouseleave",N),window.removeEventListener("mouseenter",k)}},[]),X.useEffect(()=>(B(),window.addEventListener("resize",E),()=>{window.removeEventListener("resize",E),g.current&&cancelAnimationFrame(g.current),o.current&&o.current.dispose(),c.current&&c.current.dispose(),s.current&&(s.current.dispose(),r.current&&s.current.domElement&&r.current.removeChild(s.current.domElement)),p.current&&(p.current.geometry.dispose(),p.current.material.dispose()),m.current&&(m.current.geometry.dispose(),m.current.material.dispose()),d.current&&(d.current.dispose(),d.current=null),u.current&&(u.current.pause(),u.current.src="",u.current.load(),u.current=null)}),[B,E]),y.jsxs("div",{className:i,style:{width:"100%",height:"100%",position:"absolute",top:0,left:0,overflow:"hidden",background:"transparent",...e},children:[t&&y.jsx("img",{src:"/Bg.png",alt:"",style:{width:"100%",height:"100%",position:"absolute",top:0,left:0,objectFit:"cover",objectPosition:"center",zIndex:0,pointerEvents:"none"},onError:L=>{console.error("èæ¯å¾çå 载失败:",L)},onLoad:L=>{console.log("èæ¯å¾çå è½½æåï¼åºè¯¥å¯è§");const N=L.target;
5984console.log("å¾ç尺寸:",N.naturalWidth,N.naturalHeight),console.log("å¾çæ¾ç¤ºå°ºå¯¸:",N.offsetWidth,N.offsetHeight)}}),y.jsx("div",{ref:r,style:{width:"100%",height:"100%",position:"absolute",top:0,left:0,zIndex:1,...t?{backgroundImage:"url(/Bg.png)",backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}:{},backgroundColor:"transparent"}}),y.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none",background:`radial-gradient( 5985 ellipse at center, 5986 transparent 0%, 5987 transparent ${(1-ue.VIGNETTE_INTENSITY)*40}%, 5988 rgba(0, 0, 0, ${ue.VIGNETTE_INTENSITY*.6}) ${(1-ue.VIGNETTE_SMOOTHNESS)*100}%, 5989 rgba(0, 0, 0, ${ue.VIGNETTE_INTENSITY}) 100% 5990 )`}}),ue.DEBUG_SHOW_CAMERA_INFO]})};function fJ({hovered:i}){const e=X.useRef(null),t=X.useRef(0),n=X.useRef([]);if(n.current.length===0)for(let o=0;o<120;o++)n.current.push(Math.random());const r=n.current,s=X.useCallback((o,a,l,c,u)=>{o.clearRect(0,0,a,l);const d=[{x:.02,y:.12,fw:.16,angle:-.08},{x:.06,y:.3,fw:.12,angle:.12},{x:.01,y:.48,fw:.18,angle:-.04},{x:.08,y:.62,fw:.1,angle:.15},{x:.03,y:.78,fw:.14,angle:-.1},{x:.1,y:.9,fw:.11,angle:.06},{x:.05,y:.04,fw:.09,angle:.08}];for(let b=0;b<d.length;b++){const A=d[b],w=Math.sin(c*.4+b*1.7)*.008,C=(A.x+w)*a,P=A.y*l,B=A.fw*a,R=8;o.save(),o.translate(C+B*.5,P+R*.5),o.rotate(A.angle+Math.sin(c*.3+b)*.03),o.translate(-(C+B*.5),-(P+R*.5)),o.beginPath();const E=2;o.moveTo(C+E,P),o.lineTo(C+B-E,P),o.arcTo(C+B,P,C+B,P+E,E),o.lineTo(C+B,P+R-E),o.arcTo(C+B,P+R,C+B-E,P+R,E),o.lineTo(C+E,P+R),o.arcTo(C,P+R,C,P+R-E,E),o.lineTo(C,P+E),o.arcTo(C,P,C+E,P,E),o.closePath(),o.fillStyle=`rgba(255,255,255,${.05*u})`,o.fill(),o.strokeStyle=`rgba(255,255,255,${.04*u})`,o.lineWidth=.4,o.stroke(),o.beginPath(),o.moveTo(C+3,P+R*.5),o.lineTo(C+B*(.4+r[b]*.4),P+R*.5),o.strokeStyle=`rgba(255,255,255,${.05*u})`,o.lineWidth=1.2,o.stroke(),o.restore()}const p=a*.28,m=a*.48,x=l*.42,v=l*.06;o.beginPath(),o.moveTo(p,l*.5-x),o.lineTo(m,l*.5-v),o.strokeStyle=`rgba(255,255,255,${.06*u})`,o.lineWidth=.6,o.stroke(),o.beginPath(),o.moveTo(p,l*.5+x),o.lineTo(m,l*.5+v),o.strokeStyle=`rgba(255,255,255,${.06*u})`,o.lineWidth=.6,o.stroke();const _=o.createLinearGradient(p,0,m,0);_.addColorStop(0,`rgba(160,200,255,${.02*u})`),_.addColorStop(1,`rgba(160,200,255,${.05*u})`),o.beginPath(),o.moveTo(p,l*.5-x),o.lineTo(m,l*.5-v),o.lineTo(m,l*.5+v),o.lineTo(p,l*.5+x),o.closePath(),o.fillStyle=_,o.fill();for(let b=0;b<4;b++){const A=p+(m-p)*((b+1)/5),w=(A-p)/(m-p),C=x+(v-x)*w;o.beginPath(),o.moveTo(A,l*.5-C*.8),o.lineTo(A,l*.5+C*.8),o.strokeStyle=`rgba(160,200,255,${.03*u})`,o.lineWidth=.4,o.stroke()}const g=[{x:.62,y:.5},{x:.72,y:.22},{x:.88,y:.18},{x:.78,y:.42},{x:.92,y:.38},{x:.72,y:.7},{x:.88,y:.75},{x:.78,y:.55},{x:.95,y:.55}],S=[[0,1],[0,3],[0,5],[0,7],[1,2],[3,4],[5,6],[7,8],[1,3],[5,7],[3,7]];for(const[b,A]of S){const w=g[b],C=g[A];o.beginPath(),o.moveTo(w.x*a,w.y*l),o.lineTo(C.x*a,C.y*l),o.strokeStyle=`rgba(160,200,255,${.06*u})`,o.lineWidth=.5,o.stroke()}for(let b=0;b<g.length;b++){const A=g[b],w=.8+.2*Math.sin(c*1.2+b*.9),C=b===0?4:2.5;if(b===0){const P=o.createRadialGradient(A.x*a,A.y*l,0,A.x*a,A.y*l,16);P.addColorStop(0,`rgba(160,200,255,${.1*u})`),P.addColorStop(1,"rgba(160,200,255,0)"),o.beginPath(),o.arc(A.x*a,A.y*l,16,0,Math.PI*2),o.fillStyle=P,o.fill()}o.beginPath(),o.arc(A.x*a,A.y*l,C*w,0,Math.PI*2),o.fillStyle=`rgba(200,220,255,${(b===0?.5:.25)*u*w})`,o.fill()}for(let b=0;b<20;b++){const A=(r[b+60]+c*(.06+r[b+80]*.04))%1;let w,C;if(A<.35){const B=A/.35,R=Math.floor(r[b+90]*d.length),E=d[R],L=(E.x+E.fw*.5)*a,N=E.y*l;w=L+(p-L)*B;const k=l*.5+(N-l*.5)*(1-B*.3);C=N+(k-N)*B}else if(A<.65){const B=(A-.35)/.3;w=p+(m-p)*B;const R=x+(v-x)*B;C=l*.5+(r[b+100]-.5)*R*1.6*(1-B)}else{const B=(A-.65)/.35;w=m+(g[0].x*a-m)*B,C=l*.5+(g[0].y*l-l*.5)*B}const P=Math.sin(A*Math.PI)*.45;o.beginPath(),o.arc(w,C,1.3,0,Math.PI*2),o.fillStyle=`rgba(160,200,255,${P*u})`,o.fill()}},[r]);return X.useEffect(()=>{const o=e.current;if(!o)return;const a=o.getContext("2d");if(!a)return;const l=Math.min(window.devicePixelRatio||1,2),c=()=>{const u=o.getBoundingClientRect();o.width=u.width*l,o.height=u.height*l,a.setTransform(l,0,0,l,0,0),s(a,u.width,u.height,100,1.4)};return c(),window.addEventListener("resize",c),()=>{cancelAnimationFrame(t.current),window.removeEventListener("resize",c)}},[s]),X.useEffect(()=>{const o=e.current;if(!o)return;const a=o.getContext("2d");if(!a)return;const l=o.getBoundingClientRect(),c=l.width,u=l.height;if(!i){cancelAnimationFrame(t.current),s(a,c,u,100,1.4);return}const d=performance.now(),p=()=>{const m=(performance.now()-d)*.001;s(a,c,u,m,2.5),t.current=requestAnimationFrame(p)};return t.current=requestAnimationFrame(p),()=>{cancelAnimationFrame(t.current)}},[i,s]),y.jsx("canvas",{ref:e,style:{position:"absolute",inset:0,width:"100%",height:"100%"}})}function hJ({hovered:i}){const e=X.useRef(null),t=X.useRef(0),n=X.useRef([]);if(n.current.length===0)for(let a=0;a<100;a++)n.current.push(Math.random());const r=n.current,s=["120,200,255","255,200,120","255,140,160","120,200,255","160,255,180","25
59905,200,120","200,160,255","160,255,180"],o=X.useCallback((a,l,c,u,d)=>{a.clearRect(0,0,l,c);const p=[{x:.03,y:.06,bw:.22,fromA:!0},{x:.12,y:.18,bw:.18,fromA:!1},{x:.03,y:.3,bw:.25,fromA:!0},{x:.1,y:.43,bw:.16,fromA:!1},{x:.03,y:.55,bw:.2,fromA:!0},{x:.12,y:.67,bw:.22,fromA:!1},{x:.03,y:.79,bw:.18,fromA:!0},{x:.1,y:.91,bw:.14,fromA:!1}],m=.07,x=l*.42;for(let E=0;E<p.length;E++){const L=p[E],N=L.x*l,k=L.y*c,Y=L.bw*l,z=m*c,W=z*.35,V=Math.min(1,Math.max(0,u*.6-E*.08));a.beginPath(),a.moveTo(N+W,k),a.lineTo(N+Y*V-W,k),a.arcTo(N+Y*V,k,N+Y*V,k+W,W),a.lineTo(N+Y*V,k+z-W),a.arcTo(N+Y*V,k+z,N+Y*V-W,k+z,W),a.lineTo(N+W,k+z),a.arcTo(N,k+z,N,k+z-W,W),a.lineTo(N,k+W),a.arcTo(N,k,N+W,k,W),a.closePath(),a.fillStyle=`rgba(255,255,255,${(L.fromA?.06:.04)*d*V})`,a.fill(),a.strokeStyle=`rgba(255,255,255,${.04*d*V})`,a.lineWidth=.4,a.stroke(),V>.3&&(a.beginPath(),a.moveTo(N+4,k+z*.4),a.lineTo(N+Y*V*(.3+r[E]*.4),k+z*.4),a.strokeStyle=`rgba(255,255,255,${.05*d})`,a.lineWidth=1,a.stroke(),z>12&&(a.beginPath(),a.moveTo(N+4,k+z*.65),a.lineTo(N+Y*V*(.2+r[E+10]*.3),k+z*.65),a.stroke()));const G=L.fromA?N-5:N+Y*V+5;a.beginPath(),a.arc(G,k+z*.5,2,0,Math.PI*2),a.fillStyle=`rgba(${L.fromA?"120,200,255":"255,200,220"},${.2*d*V})`,a.fill()}a.beginPath(),a.moveTo(x,c*.02),a.lineTo(x,c*.98),a.strokeStyle=`rgba(255,255,255,${.03*d})`,a.lineWidth=.5,a.stroke();const v=l*.46,_=v,g=l*.04;for(let E=0;E<p.length;E++){const N=p[E].y*c,k=m*c,Y=Math.min(1,Math.max(0,u*.5-E*.1)),z=.7+.3*Math.sin(u*1.5+E*.8);a.fillStyle=`rgba(${s[E]},${.12*d*Y*z})`,a.fillRect(_,N,g*Y,k),a.beginPath(),a.moveTo(x+4,N+k*.5),a.lineTo(_,N+k*.5),a.strokeStyle=`rgba(${s[E]},${.05*d*Y})`,a.lineWidth=.3,a.stroke()}const S=v+l*.1,b=[[0,2],[2,4],[4,6],[1,3],[3,5],[5,7]];for(let E=0;E<b.length;E++){const[L,N]=b[E],k=p[L].y*c+m*c*.5,Y=p[N].y*c+m*c*.5,z=Math.min(1,Math.max(0,u*.4-E*.12)),W=8+E*3;a.beginPath(),a.moveTo(S,k),a.bezierCurveTo(S+W,k,S+W,Y,S,Y);const V=p[L].fromA;a.strokeStyle=`rgba(${V?"120,200,255":"255,200,220"},${.08*d*z})`,a.lineWidth=.6,a.stroke(),a.beginPath(),a.arc(S,k,1.5,0,Math.PI*2),a.fillStyle=`rgba(255,255,255,${.15*d*z})`,a.fill(),a.beginPath(),a.arc(S,Y,1.5,0,Math.PI*2),a.fill()}const A=v+l*.22,w=[.5,.7,.4,.55,.65,.45,.6,.35];for(let E=0;E<p.length;E++){const L=p[E].y*c+m*c*.15,N=w[E]*l*.12,k=7,Y=Math.min(1,Math.max(0,u*.4-E*.1)),z=2;a.beginPath(),a.moveTo(A+z,L),a.lineTo(A+N*Y-z,L),a.arcTo(A+N*Y,L,A+N*Y,L+z,z),a.lineTo(A+N*Y,L+k-z),a.arcTo(A+N*Y,L+k,A+N*Y-z,L+k,z),a.lineTo(A+z,L+k),a.arcTo(A,L+k,A,L+k-z,z),a.lineTo(A,L+z),a.arcTo(A,L,A+z,L,z),a.closePath(),a.fillStyle=`rgba(${s[E]},${.06*d*Y})`,a.fill(),a.strokeStyle=`rgba(${s[E]},${.04*d*Y})`,a.lineWidth=.3,a.stroke(),Y>.4&&(a.beginPath(),a.moveTo(A+3,L+k*.5),a.lineTo(A+N*Y*.7,L+k*.5),a.strokeStyle=`rgba(255,255,255,${.04*d})`,a.lineWidth=.8,a.stroke())}const C=v+l*.38,P=c*.25,B=c*.75,R=.8+.2*Math.sin(u*.8);a.beginPath(),a.moveTo(C-4,B),a.lineTo(C-4,P+8),a.strokeStyle=`rgba(255,200,220,${.06*d*R})`,a.lineWidth=.5,a.stroke(),a.beginPath(),a.moveTo(C-4,P+8),a.lineTo(C-7,P+14),a.moveTo(C-4,P+8),a.lineTo(C-1,P+14),a.strokeStyle=`rgba(255,200,220,${.08*d*R})`,a.stroke(),a.beginPath(),a.moveTo(C+4,P),a.lineTo(C+4,B-8),a.strokeStyle=`rgba(120,200,255,${.06*d*R})`,a.lineWidth=.5,a.stroke(),a.beginPath(),a.moveTo(C+4,B-8),a.lineTo(C+1,B-14),a.moveTo(C+4,B-8),a.lineTo(C+7,B-14),a.strokeStyle=`rgba(120,200,255,${.08*d*R})`,a.stroke();for(let E=0;E<6;E++){const L=(r[E+70]+u*.15)%1,N=E%2===0,k=C+(N?-4:4),Y=N?B-(B-P)*L:P+(B-P)*L;a.beginPath(),a.arc(k,Y,1,0,Math.PI*2),a.fillStyle=`rgba(${N?"255,200,220":"120,200,255"},${.3*d*Math.sin(L*Math.PI)})`,a.fill()}},[r,s]);return X.useEffect(()=>{const a=e.current;if(!a)return;const l=a.getContext("2d");if(!l)return;const c=Math.min(window.devicePixelRatio||1,2),u=()=>{const d=a.getBoundingClientRect();a.width=d.width*c,a.height=d.height*c,l.setTransform(c,0,0,c,0,0),o(l,d.width,d.height,100,1.4)};return u(),window.addEventListener("resize",u),()=>{cancelAnimationFrame(t.current),window.removeEventListener("resize",u)}},[o]),X.useEffect(()=>{const a=e.current;if(!a)return;const l=a.getContext("2d");if(!l)return;const c=a.getBoundingClientRect(),u=c.width,d=c.height;if(!i){cancelAnimationFrame(t.current),o(l,u,d,100,1.4);return}const p=performance.now(),m=()=>{const x=(performance.now()-p)*.001;o(l,u,d,x,2.5),t.current=requestAnimationFrame(m)};return t.current=requestAnimationFrame(m),()=>{cancelAnimationFrame(t.current)}},[i,o]),y.jsx("canvas",{ref:e,style:{position:"absolute",inset:0,width:"100%",height:"100%"}})}function pJ({hovered:i,type:e}){const t=X.useRef(null),n=X.useRef(0),r=X.useRef([]);if(r.current.length===0)for(let l=0;l<80;l++)r.current.push(Math.random());const s=r.current,o=(l,c,u,d,p,m)=>{l.beginPath(),l.moveTo(c+m,u),l.lineTo(c+d-m,u),l.arcTo(c+d,u,c+d,u+m,m),l.lineTo(c+d,u+p-m),l.arcTo(c+d,u+p,c+d-m,u+p,m),l.lineTo(c+m,u+p),l.arcTo(c,u+p,c,u+p-m,m),l.lineTo(c,u
5990+m),l.arcTo(c,u,c+m,u,m),l.closePath()},a=X.useCallback((l,c,u,d,p)=>{if(l.clearRect(0,0,c,u),e==="network"){const m=c*.5,x=u*.48,v=Math.min(c,u),_=[{x:.12,y:.2,w:.18,label:.6},{x:.72,y:.15,w:.2,label:.7},{x:.08,y:.7,w:.16,label:.5},{x:.7,y:.72,w:.22,label:.8},{x:.38,y:.1,w:.14,label:.45},{x:.42,y:.82,w:.18,label:.55}];for(let A=0;A<_.length;A++){const w=_[A],C=(w.x+w.w*.5)*c,P=(w.y+.02)*u;l.beginPath(),l.moveTo(C,P);const B=(C+m)*.5,R=P,E=x;l.bezierCurveTo(B,R,B,E,m,x),l.strokeStyle=`rgba(255,255,255,${.05*p})`,l.lineWidth=.6,l.stroke()}for(let A=0;A<18;A++){const w=Math.floor(s[A]*_.length),C=_[w],P=(s[A+20]+d*(.15+s[A+40]*.1))%1,B=(C.x+C.w*.5)*c,R=(C.y+.02)*u,E=(B+m)*.5,L=1-P,N=P,k=L*L*L*B+3*L*L*N*E+3*L*N*N*E+N*N*N*m,Y=L*L*L*R+3*L*L*N*R+3*L*N*N*x+N*N*N*x,z=Math.sin(P*Math.PI)*.5;l.beginPath(),l.arc(k,Y,1.2,0,Math.PI*2),l.fillStyle=`rgba(160,200,255,${z*p})`,l.fill()}for(let A=0;A<_.length;A++){const w=_[A],C=.8+.2*Math.sin(d*.7+A*1.3),P=w.x*c,B=w.y*u,R=w.w*c,E=12;o(l,P,B,R,E,3),l.fillStyle=`rgba(255,255,255,${.06*p*C})`,l.fill(),l.strokeStyle=`rgba(255,255,255,${.04*p})`,l.lineWidth=.4,l.stroke(),l.beginPath(),l.moveTo(P+4,B+E*.5),l.lineTo(P+R*w.label,B+E*.5),l.strokeStyle=`rgba(255,255,255,${.06*p})`,l.lineWidth=1.5,l.stroke()}const g=.9+.1*Math.sin(d*1.5),S=v*.06*g,b=l.createRadialGradient(m,x,0,m,x,S*3);b.addColorStop(0,`rgba(160,200,255,${.1*p})`),b.addColorStop(1,"rgba(160,200,255,0)"),l.beginPath(),l.arc(m,x,S*3,0,Math.PI*2),l.fillStyle=b,l.fill();for(let A=3;A>=1;A--)l.beginPath(),l.arc(m,x,S*(A/3),0,Math.PI*2),l.strokeStyle=`rgba(255,255,255,${(.08+A*.04)*p})`,l.lineWidth=.5,l.stroke();l.beginPath(),l.arc(m,x,2.5,0,Math.PI*2),l.fillStyle=`rgba(255,255,255,${.6*p})`,l.fill()}else if(e==="pulse"){const m=c*.22,x=c*.78,v=u*.5;for(const[S,b]of[[m,0],[x,1]]){const A=.85+.15*Math.sin(d*1.2+b*Math.PI),w=l.createRadialGradient(S,v,0,S,v,18*A);w.addColorStop(0,`rgba(${b===0?"180,200,255":"255,200,220"},${.12*p})`),w.addColorStop(1,`rgba(${b===0?"180,200,255":"255,200,220"},0)`),l.beginPath(),l.arc(S,v,18*A,0,Math.PI*2),l.fillStyle=w,l.fill(),l.beginPath(),l.arc(S,v,4,0,Math.PI*2),l.fillStyle=`rgba(255,255,255,${.4*p})`,l.fill()}const _=7;for(let S=0;S<_;S++){const b=S%2===0,A=v+(S-_*.5)*14,w=b?m+8:x-8,C=(.2+s[S+10]*.2)*(x-m),P=b?w+C:w-C,B=Math.min(1,Math.max(0,d*.8-S*.15)),R=w+(P-w)*B;l.beginPath(),l.moveTo(w,A),l.lineTo(R,A),l.strokeStyle=`rgba(${b?"180,200,255":"255,200,220"},${.12*p*B})`,l.lineWidth=1.5,l.stroke(),B>.1&&(l.beginPath(),l.arc(R,A,1.5,0,Math.PI*2),l.fillStyle=`rgba(255,255,255,${.2*p*B})`,l.fill())}const g=Math.min(.08,d*.01)*p;l.beginPath(),l.moveTo(m,v),l.lineTo(x,v),l.strokeStyle=`rgba(255,255,255,${g})`,l.lineWidth=.5,l.stroke()}else if(e==="chat"){const m=c*.28,x=u*.5,v=.9+.1*Math.sin(d*1);l.beginPath(),l.arc(m,x,14*v,0,Math.PI*2),l.strokeStyle=`rgba(255,255,255,${.12*p})`,l.lineWidth=.8,l.stroke(),l.beginPath(),l.arc(m,x-4,4,0,Math.PI*2),l.fillStyle=`rgba(255,255,255,${.15*p})`,l.fill(),l.beginPath(),l.arc(m,x+6,6,Math.PI,0),l.fillStyle=`rgba(255,255,255,${.1*p})`,l.fill();const _=[{x:.52,y:.18,w:.28,orbit:0},{x:.55,y:.35,w:.22,orbit:1},{x:.48,y:.52,w:.35,orbit:2},{x:.55,y:.68,w:.24,orbit:3},{x:.5,y:.82,w:.3,orbit:4}];for(let g=0;g<_.length;g++){const S=_[g],b=Math.sin(d*.5+g*1.2)*.015,A=(S.x+b)*c,w=S.y*u,C=S.w*c,P=10,B=Math.min(1,Math.max(0,d*.5-g*.12));o(l,A,w,C*B,P,3),l.fillStyle=`rgba(255,255,255,${.06*p*B})`,l.fill(),l.strokeStyle=`rgba(255,255,255,${.04*p*B})`,l.lineWidth=.4,l.stroke(),B>.3&&(l.beginPath(),l.moveTo(A+4,w+P*.5),l.lineTo(A+C*B*s[g+30]*.6+4,w+P*.5),l.strokeStyle=`rgba(255,255,255,${.06*p})`,l.lineWidth=1.2,l.stroke()),l.beginPath(),l.moveTo(m+15,x+(g-2)*8),l.lineTo(A,w+P*.5),l.strokeStyle=`rgba(255,255,255,${.03*p*B})`,l.lineWidth=.4,l.stroke();const R=(s[g+50]+d*.2)%1,E=m+15+(A-m-15)*R,L=x+(g-2)*8+(w+P*.5-x-(g-2)*8)*R;l.beginPath(),l.arc(E,L,1,0,Math.PI*2),l.fillStyle=`rgba(180,200,255,${.35*p*Math.sin(R*Math.PI)})`,l.fill()}}else if(e==="tree"){const m=u*.5,x=c*.08,v=c*.92,_=6;l.beginPath(),l.moveTo(x,m),l.lineTo(v,m),l.strokeStyle=`rgba(255,255,255,${.04*p})`,l.lineWidth=1,l.stroke();const g=Math.min(1,d*.12),S=x+(v-x)*g;l.beginPath(),l.moveTo(x,m),l.lineTo(S,m),l.strokeStyle=`rgba(180,200,255,${.15*p})`,l.lineWidth=1.5,l.stroke();const b=S;l.beginPath(),l.arc(b,m,3,0,Math.PI*2),l.fillStyle=`rgba(255,255,255,${.5*p})`,l.fill();for(let A=0;A<_;A++){const w=x+(v-x)*(A/(_-1)),C=w<=S,P=C?1:.3,B=C?.9+.1*Math.sin(d*1.5+A):1;if(l.beginPath(),l.arc(w,m,5*B,0,Math.PI*2),l.fillStyle=`rgba(${C?"180,200,255":"255,255,255"},${(C?.2:.04)*p})`,l.fill(),l.strokeStyle=`rgba(255,255,255,${.08*p*P})`,l.lineWidth=.6,l.stroke(),C&&(l.beginPath(),l.arc(w,m,2.5,0,Math.PI*2),l.fillStyle=`rgba(200,220,255,${.4*p}
5990)`,l.fill()),C){const E=2+Math.floor(s[A*3]*2);for(let L=0;L<E;L++){const N=-Math.PI*.3-L*.4+Math.sin(d*.6+A+L)*.08,k=(15+s[A*3+L+10]*18)*B,Y=w+Math.cos(N)*k,z=m+Math.sin(N)*k;l.beginPath(),l.moveTo(w,m-5),l.lineTo(Y,z),l.strokeStyle=`rgba(180,200,255,${.06*p})`,l.lineWidth=.5,l.stroke(),l.beginPath(),l.arc(Y,z,1.5,0,Math.PI*2),l.fillStyle=`rgba(200,220,255,${.15*p})`,l.fill()}}const R=(.04+s[A+50]*.04)*c;l.beginPath(),l.moveTo(w-R*.5,m+14),l.lineTo(w+R*.5,m+14),l.strokeStyle=`rgba(255,255,255,${.04*p*P})`,l.lineWidth=1.5,l.stroke()}}},[e,s]);return X.useEffect(()=>{const l=t.current;if(!l)return;const c=l.getContext("2d");if(!c)return;const u=Math.min(window.devicePixelRatio||1,2),d=()=>{const p=l.getBoundingClientRect();l.width=p.width*u,l.height=p.height*u,c.setTransform(u,0,0,u,0,0),a(c,p.width,p.height,100,.55)};return d(),window.addEventListener("resize",d),()=>{cancelAnimationFrame(n.current),window.removeEventListener("resize",d)}},[a]),X.useEffect(()=>{const l=t.current;if(!l)return;const c=l.getContext("2d");if(!c)return;const u=l.getBoundingClientRect();if(!i){cancelAnimationFrame(n.current),a(c,u.width,u.height,100,.55);return}const d=performance.now(),p=()=>{const m=(performance.now()-d)*.001,x=l.getBoundingClientRect();a(c,x.width,x.height,m,1),n.current=requestAnimationFrame(p)};return n.current=requestAnimationFrame(p),()=>{cancelAnimationFrame(n.current)}},[i,a]),y.jsx("canvas",{ref:t,style:{position:"absolute",inset:0,width:"100%",height:"100%"}})}const mJ=({onNavigateToProduct:i,onNavigateToGetStarted:e,onNavigateToTab:t})=>{const{t:n,lang:r}=Cr(),s=X.useRef(null),o=X.useRef(0),[a,l]=X.useState(0),[c,u]=X.useState(!1),[d,p]=X.useState(null),[m,x]=X.useState(null),[v,_]=X.useState(!1),g=X.useRef(null),[S,b]=X.useState([0,0,0]),[A,w]=X.useState(0);X.useEffect(()=>{let E;const L=performance.now(),N=3e3,k=()=>{const Y=performance.now()-L,z=Math.min(Y/N,1),W=1-Math.pow(1-z,3);l(W),z<1&&(E=requestAnimationFrame(k))};return E=requestAnimationFrame(k),()=>cancelAnimationFrame(E)},[]),X.useEffect(()=>{const E=g.current;if(!E)return;const L=new IntersectionObserver(([N])=>{N.isIntersecting&&(_(!0),L.disconnect())},{threshold:.3});return L.observe(E),()=>L.disconnect()},[]);const C=[{label:"LoCoMo-10",metric:r==="zh"?"LLM è¯å¤åç¡®ç":"LLM-Judge Accuracy",questions:r==="zh"?"1,540 é¢ Â· å¤è½®å¯¹è¯ QA":"1,540 Questions · Multi-Session QA",items:[{label:"M-Flow",value:81.8,color:"rgba(255,255,255,0.85)"},{label:"Cognee",value:79.4,color:"rgba(255,255,255,0.30)"},{label:"Zep",value:73.4,color:"rgba(255,255,255,0.22)"},{label:"Supermemory",value:64.4,color:"rgba(255,255,255,0.18)"},{label:"Mem0",value:50.4,color:"rgba(255,255,255,0.14)"}]},{label:"LongMemEval",metric:r==="zh"?"LLM è¯å¤åç¡®ç":"LLM-Judge Accuracy",questions:r==="zh"?"100 é¢ Â· é¿æè®°å¿ QA":"100 Questions · Long-term Memory QA",items:[{label:"M-Flow",value:89,color:"rgba(255,255,255,0.85)"},{label:"Supermemory",value:74,color:"rgba(255,255,255,0.30)"},{label:"Mem0",value:71,color:"rgba(255,255,255,0.22)"},{label:"Zep",value:61,color:"rgba(255,255,255,0.18)"},{label:"Cognee",value:57,color:"rgba(255,255,255,0.14)"}]},{label:"Evolving Events",metric:r==="zh"?"人类级æ£ç¡®ç":"Human-like Correctness",questions:r==="zh"?"100 é¢ Â· è·¨ææ¡£æ¨ç":"100 Questions · Cross-chunk Reasoning",items:[{label:"M-Flow",value:95.8,color:"rgba(255,255,255,0.85)"},{label:"Cognee",value:88.6,color:"rgba(255,255,255,0.25)"},{label:"Graphiti",value:66.3,color:"rgba(255,255,255,0.18)"}]}],P=C[A];X.useEffect(()=>{if(!v)return;const E=C[A].items.map(z=>z.value),L=1800,N=performance.now();let k;const Y=()=>{const z=performance.now()-N,W=Math.min(z/L,1),V=1-Math.pow(1-W,3);b(E.map(G=>parseFloat((G*V).toFixed(1)))),W<1&&(k=requestAnimationFrame(Y))};return k=requestAnimationFrame(Y),()=>cancelAnimationFrame(k)},[v,A]),Vw(()=>{Jt.create({trigger:s.current,start:"top top",end:"bottom top",scrub:1,onUpdate:E=>{o.current=E.progress}})},{scope:s});const B=E=>t==null?void 0:t(E),R=(E,L)=>{const N={position:"absolute",width:"4px",height:"4px",background:L?"rgba(255,255,255,0.5)":"rgba(255,255,255,0.12)",transition:"background 0.5s ease"};return E==="tl"?{...N,top:-2,left:-2}:E==="tr"?{...N,top:-2,right:-2}:E==="bl"?{...N,bottom:-2,left:-2}:{...N,bottom:-2,right:-2}};return y.jsxs("div",{ref:s,children:[y.jsxs("section",{style:{position:"relative",minHeight:"100vh",background:"#030508",overflow:"hidden",display:"flex",flexDirection:"column"},children:[y.jsx("div",{style:{position:"absolute",inset:"-20px",backgroundImage:"url(/LightImage.png)",backgroundSize:"cover",backgroundPosition:"center",opacity:.75*a,zIndex:0}}),y.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:1,opacity:a},children:y.jsx(Nm,{camera:{position:[0,0,5],fov:60},children:y.jsx(rY,{count:3e3})})}),y.jsx("div",{style:{position:"absolute",inset:0,background:"linear-gradient(100deg, rgba(3,5,8,0.92) 0%, rgba(3,5,8,0.5) 40%, transparent 70%)",zIndex:2,pointerEvents:"none",opacity:a}}),y.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,height:"320px",background:"linear-gradient(0deg, var(--bg-0) 0%, rgba(11,11,11,0.9) 25%, rgba(11,11,11,0.35) 55%, transparent 100%)",zIndex:2,pointerEvents:"none"}}),y.jsx("div",{style:{position:"relative",zIndex:3,flex:1,display:"flex",alignItems:"flex-end",padding:"0 clamp(32px, 6vw, 120px)",paddingBottom:"clamp(90px, 20vh, 240px)",pointerEvents:"none"},children:y.jsxs("div",{style:{maxWidth:"680px",pointerEvents:"auto"},children:[y.jsx("div",{style:{fontSize:"10px",letterSpacing:"0.2em",textTransform:"uppercase",color:"rgba(255,255,255,0.35)",marginBottom:"24px",fontWeight:500}
5990,children:"AI Memory Infrastructure"}),y.jsx("h1",{style:{fontSize:"clamp(40px, 5.8vw, 80px)",marginBottom:"24px",fontWeight:200,letterSpacing:"-0.03em",lineHeight:1.15,paddingBottom:"0.08em",whiteSpace:"pre-line",background:"linear-gradient(175deg, rgba(255,255,255,1), rgba(180,180,190,0.7))",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text"},children:n.home.heroTitle}),y.jsx("p",{style:{fontSize:"clamp(14px, 1.2vw, 18px)",color:"rgba(255,255,255,0.45)",lineHeight:1.7,maxWidth:"520px",fontWeight:400,whiteSpace:"pre-line"},children:n.home.heroSubtitle})]})})]}),y.jsx("section",{style:{padding:"clamp(80px, 8vw, 120px) 0",position:"relative"},children:y.jsxs("div",{style:{maxWidth:"1200px",margin:"0 auto",padding:"0 clamp(24px, 4vw, 80px)"},children:[y.jsxs("div",{style:{fontSize:"11px",letterSpacing:"0.15em",textTransform:"uppercase",color:"var(--text-3)",marginBottom:"16px",fontWeight:400,fontFamily:"var(--font-mono)"},children:["[ ",r==="zh"?"é®é¢":"THE PROBLEM"," ]"]}),y.jsx("h2",{style:{fontSize:"clamp(28px, 3.2vw, 48px)",fontWeight:300,color:"var(--text-0)",letterSpacing:"-0.025em",lineHeight:1.15,marginBottom:"20px",maxWidth:"680px"},children:r==="zh"?"为ä»ä¹å¤ç½®è®°å¿çå½é¢åºç°äºè¿ä¹ä¹
ï¼è¿æ²¡æè¢«è§£å³ï¼":"Why hasn't the problem of external memory been solved after all this time?"}),y.jsx("p",{style:{fontSize:"clamp(14px, 1.1vw, 17px)",lineHeight:1.7,color:"var(--text-3)",fontWeight:300,marginBottom:"clamp(56px, 7vw, 88px)",maxWidth:"560px"},children:r==="zh"?"è®°å¿è§£å³æ¹æ¡ä»å¨ä¸æ°ï¼Agents ä»å¨ä½¿ç¨å
置记å¿ã":"Memory solutions keep shipping, yet agents still rely on built-in memory."}),y.jsxs("div",{className:"rsp-grid-2",style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"1px",background:"rgba(255,255,255,0.06)",borderRadius:"2px",overflow:"hidden"},children:[y.jsxs("div",{style:{background:"rgba(255,255,255,0.02)",padding:"clamp(36px, 3vw, 56px)",display:"flex",flexDirection:"column",gap:"24px",transition:"background 0.4s ease"},children:[y.jsx("div",{style:{width:"48px",height:"48px",position:"relative"},children:y.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",children:[y.jsx("circle",{cx:"16",cy:"24",r:"8",stroke:"rgba(255,255,255,0.2)",strokeWidth:"1.2",fill:"none"}),y.jsx("circle",{cx:"32",cy:"24",r:"8",stroke:"rgba(200,120,100,0.4)",strokeWidth:"1.2",fill:"none",strokeDasharray:"3 3"}),y.jsx("line",{x1:"22",y1:"18",x2:"28",y2:"30",stroke:"rgba(200,120,100,0.5)",strokeWidth:"1.5",strokeLinecap:"round"}),y.jsx("line",{x1:"22",y1:"30",x2:"28",y2:"18",stroke:"rgba(200,120,100,0.5)",strokeWidth:"1.5",strokeLinecap:"round"}),y.jsx("text",{x:"4",y:"46",fill:"rgba(255,255,255,0.15)",fontSize:"7",fontFamily:"var(--font-mono)",children:"â similarity"})]})}),y.jsx("div",{style:{fontSize:"11px",letterSpacing:"0.1em",textTransform:"uppercase",color:"rgba(255,255,255,0.3)",fontFamily:"var(--font-mono)",fontWeight:500},children:"01"}),y.jsx("h3",{style:{fontSize:"clamp(18px, 1.5vw, 22px)",fontWeight:400,color:"var(--text-0)",letterSpacing:"-0.01em",lineHeight:1.3},children:r==="zh"?"è®°å¿ä¸æ¯ç¸ä¼¼åº¦æ¯å¯¹":"Memory is not similarity matching"}),y.jsx("p",{style:{fontSize:"clamp(13px, 1vw, 15px)",lineHeight:1.7,color:"var(--text-3)",fontWeight:300},children:r==="zh"?"æèååå¿æ¯ä»è®¤ç¥ç³»ç»ä¸æ¾å°å
³é®ä¿¡æ¯ï¼è䏿¯ææ¬å½¢æç¸ä¼¼çä¿¡æ¯ãè¿æ¯å½ä» RAG æ¶æææ ¸å¿çåºå±é»è¾é®é¢ã":"Thinking and recall is about finding critical information from a cognitive system, not textually similar information. This is the fundamental flaw in today's RAG architecture."})]}),y.jsxs("div",{style:{background:"rgba(255,255,255,0.02)",padding:"clamp(36px, 3vw, 56px)",display:"flex",flexDirection:"column",gap:"24px",transition:"background 0.4s ease"},children:[y.jsx("div",{style:{width:"48px",height:"48px",position:"relative"},children:y.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",children:[y.jsx("circle",{cx:"24",cy:"14",r:"4",stroke:"rgba(120,180,255,0.5)",strokeWidth:"1.2",fill:"rgba(120,180,255,0.06)"}),y.jsx("circle",{cx:"12",cy:"30",r:"3",stroke:"rgba(255,255,255,0.2)",strokeWidth:"1",fill:"none"}),y.jsx("circle",{cx:"24",cy:"34",r:"3",stroke:"rgba(255,255,255,0.2)",strokeWidth:"1",fill:"none"}),y.jsx("circle",{cx:"36",cy:"30",r:"3",stroke:"rgba(255,255,255,0.2)",strokeWidth:"1",fill:"none"}),y.jsx("line",{x1:"22",y1:"18",x2:"13",y2:"27",stroke:"rgba(120,180,255,0.3)",strokeWidth:"1"}),y.jsx("line",{x1:"24",y1:"18",x2:"24",y2:"31",stroke:"rgba(120,180,255,0.3)",strokeWidth:"1"}),y.jsx("line",{x1:"26",y1:"18",x2:"35",y2:"27",stroke:"rgba(120,180,255,0.3)",strokeWidth:"1"}),y.jsx("line",{x1:"15",y1:"30",x2:"21",y2:"33",stroke:"rgba(255,255,255,0.1)",strokeWidth:"1",strokeDasharray:"2 2"}),y.jsx("line",{x1:"27",y1:"33",x2:"33",y2:"30",stroke:"rgba(255,255,255,0.1)",strokeWidth:"1",strokeDasharray:"2 2"})]})}),y.jsx("div",{style:{fontSize:"11px",letterSpacing:"0.1em",textTransform:"uppercase",color:"rgba(255,255,255,0.3)",fontFamily:"var(--font-mono)",fontWeight:500},children:"02"}),y.jsx("h3",{style:{fontSize:"clamp(18px, 1.5vw, 22px)",fontWeight:400,color:"var(--text-0)",letterSpacing:"-0.01em",lineHeight:1.3},children:r==="zh"?"M-Flow å¾ç»æéæ":"M-Flow graph restructuring"}),y.jsx("p",{style:{fontSize:"clamp(13px, 1vw, 15px)",lineHeight:1.7,color:"var(--text-3)",fontWeight:300},children:r==="zh"?"è§£å³äºè®°å¿å¾è°±çæ¬è´¨é®é¢ââç²åº¦ä¸èç³»ãçæ£å®æäºèæ³ä¸æ¨çï¼è䏿¯å½¢æç¸ä¼¼çå¹é
ã":"Solves the fundamental problem of memory graphs â granularity and connections. Achieving true association and reasoning, not just surface-level similarity matching."})]})]}),y.jsx("div",{style:{width:"100%",height:"1px",background:"linear-gradient(90deg, transparent, rgba(255,255,255,0.06) 20%, rgba(255,255,255,0.06) 80%, transparent)",marginTop:"clamp(64px, 8vw, 100px)"}})]})}),y.jsx("section",{style:{padding:"clamp(80px, 8vw, 120px) 0",position:"relative"},children:y.jsxs("div",{style:{maxWidth:"1200px",margin:"0 auto",padding:"0 clamp(24px, 4vw, 80px)"},children:[y.jsxs("div",{style:{fontSize:"11px",letterSpacing:"0.15em",textTransform:"uppercase",color:"var(--text-3)",marginBottom:"16
5990px",fontWeight:400,fontFamily:"var(--font-mono)"},children:["[ ",r==="zh"?"æ ¸å¿äº§å":"PRODUCTS"," ]"]}),y.jsx("h2",{style:{fontSize:"clamp(28px, 3.2vw, 48px)",fontWeight:200,color:"var(--text-0)",letterSpacing:"-0.025em",lineHeight:1.15,marginBottom:"clamp(44px, 5vw, 72px)",maxWidth:"600px"},children:r==="zh"?"䏤大弿ï¼é©±å¨ AI è®°å¿ä¸çè§£":"Two engines powering AI memory and understanding"}),y.jsx("div",{className:"rsp-grid-2",style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"24px"},children:[{title:r==="zh"?"M-Flow è®°å¿å¼æ":"M-Flow Memory Engine",desc:r==="zh"?"å°éç»æå对è¯è½¬å为æä¹
åç¥è¯å¾è°±ãé¥å½¢è®°å¿æ¶æï¼æ¯æè·¨ä¼è¯æ£ç´¢ï¼Top-1 å½ä¸ç 93.7%ã":"Transform unstructured dialogue into persistent knowledge graphs. Conical memory architecture with cross-session retrieval and 93.7% Top-1 hit rate.",tab:null,href:"https://m-flow.ai",cta:r==="zh"?"æ¢ç´¢å¼æ":"EXPLORE",canvasType:"burst"},{title:r==="zh"?"å
认ç¥å¼æ":"Metacognition Engine",desc:r==="zh"?"深度ç解对è¯è¯ä¹ãæ
æä¸æå¾ãè¯é¢è¿½è¸ªãèææ§å¶ãå
³ç³»å¨æåæãè¨è¯è¡ä¸ºè¯å«ã":"Deep understanding of dialogue semantics, emotions, and intent. Topic tracking, beat control, relationship dynamics, and speech act recognition.",tab:"dialogue",href:void 0,cta:r==="zh"?"äºè§£æ´å¤":"LEARN MORE",canvasType:"dialogue"}].map((E,L)=>y.jsxs("div",{onClick:()=>{E.href?window.open(E.href,"_blank"):E.tab&&B(E.tab)},onMouseEnter:()=>p(L),onMouseLeave:()=>p(null),style:{position:"relative",border:`1px solid ${d===L?"rgba(255,255,255,0.25)":"rgba(255,255,255,0.10)"}`,background:d===L?"rgba(255,255,255,0.03)":"rgba(255,255,255,0.015)",cursor:"pointer",transition:"border-color 0.5s ease, background 0.5s ease",display:"flex",flexDirection:"column"},children:[y.jsx("div",{style:R("tl",d===L)}),y.jsx("div",{style:R("tr",d===L)}),y.jsx("div",{style:R("bl",d===L)}),y.jsx("div",{style:R("br",d===L)}),y.jsxs("div",{style:{padding:"clamp(28px, 3vw, 44px)",paddingBottom:"20px"},children:[y.jsx("h3",{style:{fontSize:"clamp(22px, 2vw, 30px)",fontWeight:400,color:"var(--text-0)",marginBottom:"14px",letterSpacing:"-0.01em",lineHeight:1.2},children:E.title}),y.jsx("p",{style:{fontSize:"14px",color:"var(--text-2)",lineHeight:1.7,maxWidth:"400px"},children:E.desc})]}),y.jsx("div",{style:{position:"relative",flex:1,minHeight:"280px",overflow:"hidden"},children:E.canvasType==="burst"?y.jsx(fJ,{hovered:d===L}):y.jsx(hJ,{hovered:d===L})}),y.jsx("div",{style:{padding:"0 clamp(28px, 3vw, 44px) clamp(28px, 3vw, 44px)"},children:y.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:"8px",padding:"10px 20px",border:`1px solid ${d===L?"rgba(255,255,255,0.25)":"rgba(255,255,255,0.1)"}`,borderRadius:"100px",fontSize:"11px",fontFamily:"var(--font-mono)",letterSpacing:"0.1em",textTransform:"uppercase",color:d===L?"var(--text-0)":"var(--text-3)",transition:"all 0.4s ease"},children:[E.cta,y.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:y.jsx("path",{d:"M1 9L9 1M9 1H3M9 1V7",stroke:"currentColor",strokeWidth:"0.8"})})]})})]},L))})]})}),y.jsx("section",{style:{padding:"clamp(64px, 8vw, 100px) 0",borderTop:"1px solid var(--line-0)"},children:y.jsxs("div",{className:"rsp-grid-2 rsp-gap-sm",style:{maxWidth:"1200px",margin:"0 auto",padding:"0 clamp(24px, 4vw, 80px)",display:"grid",gridTemplateColumns:"1fr 1fr",gap:"clamp(40px, 6vw, 100px)",alignItems:"center"},children:[y.jsxs("div",{children:[y.jsxs("div",{style:{fontSize:"11px",letterSpacing:"0.15em",textTransform:"uppercase",color:"var(--text-3)",marginBottom:"16px",fontWeight:400,fontFamily:"var(--font-mono)"},children:["[ ",r==="zh"?"æ§è½åºå":"BENCHMARK"," ]"]}),y.jsx("h2",{style:{fontSize:"clamp(26px, 2.8vw, 42px)",fontWeight:300,color:"var(--text-0)",letterSpacing:"-0.02em",lineHeight:1.2,marginBottom:"20px"},children:"Benchmarking M-Flow"}),y.jsx("p",{style:{fontSize:"15px",color:"var(--text-2)",lineHeight:1.75,marginBottom:"12px"},children:r==="zh"?"M-Flow å¨ä¸é¡¹æ åååºåæµè¯ä¸å
¨é¢é¢å
ï¼æ¶µç 1,740 éé¢ç®ï¼å¯¹æ¯ CogneeãZepãMem0ãSupermemoryãGraphiti çä¸»æµæ¹æ¡åå徿ä¼è¡¨ç°ã":"M-Flow outperforms all competitors across three standardized benchmarks, covering 1,740 questions against Cognee, Zep, Mem0, Supermemory, and Graphiti."}),y.jsx("p",{style:{fontSize:"13px",color:"var(--text-3)",lineHeight:1.6,marginBottom:"32px"},children:r==="zh"?"äºè§£æ´å¤è¯·é
读æä»¬çç 究论æä¸å®æ´è¯æµæ¥åã":"Read our research papers and full benchmark reports."})]}),y.jsxs("div",{ref:g,style:{position:"relative",padding:"40px",border:"1px solid rgba(255,255,255,0.06)"},children:[y.jsx("div",{style:R("tl",!1)}),y.jsx("div",{style:R("tr",!1)}),y.jsx("div",{style:R("bl",!1)}),y.jsx("div",{style:R("br",!1)}),y.jsx("div",{style:{display:"flex",gap:"4px",marginBottom:"28px",flexWrap:"wrap"},children:C.map((E,L)=>y.jsx("button",{onClick:()=>w(L),style:{fontFamily:"var(--font-mono)",fontSize:"10px",fontWeight:400,letterSpacing:"0.06em",textTransform:"uppercase",color:L===A?"var(--text-0)":"var(--text-3)",padding:"5px 10px",borderRadius:"100px",cursor:"pointer",border:`1px solid ${L===A?"rgba(255,255,255,0.2)":"rgba(255,255,255,0.06)"}`,background:L===A?"rgba(255,255,255,0.05)":"transparent",transition:"all 0.3s ease"},children:E.label},E.label))}),y.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"24px"},children:P.items.map((E,L)=>y.jsxs("div",{children:[y.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"6px",fontSize:"12px",letterSpacing:"0.04em"},children:[y.jsx("span",{style:{color:L===0?"var(--text-0)":"var(--text-3)",fontWeight:L===0?500:400},children:E.label}),y.jsxs("span",{style:{color:L===0?"var(--text-0)":"var(--text-3)",fontFamily:"var(--font-mono)"},children:[v?S[L]??0:0,"%"]})]}),y.jsx("div",{style:{height:"2px",background:"rgba(255,255,255,0.04)",position:"relative"},children:y.jsx("div",{style:{height:"100%",width:v?`${S[L]??0}%`:"0%",background:E.color}})})]},`${A}-${L}`))}),y.jsxs("div",{style:{marginTop:"20px",fontSize:"10px",color:"var(--text-3)",letterSpacing:"0.06em",textTransform:"uppercase"},children:[P.metric," â ",P.questions]})]})]})}),y.jsx("section",{style:{padding:"clamp(64px, 8vw, 100px) 0",borderTop:"1px solid var(--line-0)"},children:y.jsxs("div",{style:{maxWidth:"1200px",margin:"0 auto",padding:"0 clamp(24px, 4vw, 80px)"},children:[y.jsxs("div",{style:{fontSize:"11px",letterSpacing:"0.15em",textTransform:"uppercase",color:"var(--text-3)",marginBottom:"16
5990px",fontWeight:400,fontFamily:"var(--font-mono)"},children:["[ ",r==="zh"?"åºç¨åºæ¯":"USE CASES"," ]"]}),y.jsxs("div",{className:"rsp-col",style:{display:"flex",justifyContent:"space-between",alignItems:"flex-end",marginBottom:"clamp(48px, 5vw, 72px)",gap:"16px"},children:[y.jsx("h2",{style:{fontSize:"clamp(26px, 2.8vw, 42px)",fontWeight:300,color:"var(--text-0)",letterSpacing:"-0.02em",lineHeight:1.2,maxWidth:"500px"},children:r==="zh"?"为åè¡ä¸æ³¨å ¥è®°å¿è½å":"Memory for every industry"}),y.jsxs("button",{onClick:()=>B("business"),style:{fontSize:"11px",letterSpacing:"0.1em",textTransform:"uppercase",fontFamily:"var(--font-mono)",color:"var(--text-3)",background:"none",border:"1px solid rgba(255,255,255,0.1)",borderRadius:"100px",padding:"10px 20px",cursor:"pointer",transition:"all 0.3s ease",display:"inline-flex",alignItems:"center",gap:"8px"},onMouseOver:E=>{E.currentTarget.style.color="var(--text-0)",E.currentTarget.style.borderColor="rgba(255,255,255,0.25)"},onMouseOut:E=>{E.currentTarget.style.color="var(--text-3)",E.currentTarget.style.borderColor="rgba(255,255,255,0.1)"},children:[r==="zh"?"æ¥çå ¨é¨":"VIEW ALL",y.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",children:y.jsx("path",{d:"M1 9L9 1M9 1H3M9 1V7",stroke:"currentColor",strokeWidth:"0.8"})})]})]}),y.jsx("div",{className:"rsp-grid-4",style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"16px"},children:[{title:r==="zh"?"AI Agent èªä¸»æºè½ä½":"AI Agent",desc:r==="zh"?"跨任å¡é¿æè®°å¿ï¼ç§¯ç´¯ç»éªä¸ç¨æ·å好ï¼åæ¶åå¨äºå®è®°å¿ä¸æ½è±¡æ¨¡å¼":"Cross-task long-term memory for experience accumulation and user preferences",canvasType:"network"},{title:"AI Coding",desc:r==="zh"?"ç²¾åçé¿æé¡¹ç®è®°å¿ï¼è®©ç¼ç¨å©æçæ£è®°ä½ä»£ç åºå ¨è²ï¼ä¸åæ¯æ¬¡ä»é¶å¼å§":"Precise long-term project memory â assistants truly remember the full codebase",canvasType:"pulse"},{title:r==="zh"?"æ°å人 / AI 婿":"Digital Human / AI Assistant",desc:r==="zh"?"髿§ä»·æ¯è®°å¿æ¹æ¡ï¼è®©æ¯æ¬¡å¯¹è¯é½å¨ä¸ä¸æ¬¡åºç¡ä¸å»¶ç»ä¸æé¿":"Cost-effective memory â every conversation builds upon the last",canvasType:"chat"},{title:r==="zh"?"æ³å¾ç¥è¯åº":"Legal Knowledge Base",desc:r==="zh"?"æ³è§ãå¤ä¾ãååæ¡æ¬¾ç»æåå ¥åºï¼æ¯æè·¨ææ¡£è¯ä¹å ³èæ£ç´¢":"Structured statutes, precedents, and clauses with semantic cross-document retrieval",canvasType:"tree"}].map((E,L)=>y.jsxs("div",{onMouseEnter:()=>x(L),onMouseLeave:()=>x(null),style:{position:"relative",border:`1px solid ${m===L?"rgba(255,255,255,0.15)":"rgba(255,255,255,0.06)"}`,transition:"border-color 0.5s ease",display:"flex",flexDirection:"column"},children:[y.jsx("div",{style:R("tl",m===L)}),y.jsx("div",{style:R("tr",m===L)}),y.jsx("div",{style:R("bl",m===L)}),y.jsx("div",{style:R("br",m===L)}),y.jsx("div",{style:{position:"relative",height:"160px",overflow:"hidden"},children:y.jsx(pJ,{hovered:m===L,type:E.canvasType})}),y.jsxs("div",{style:{padding:"0 clamp(20px, 2vw, 28px) clamp(24px, 2.5vw, 36px)"},children:[y.jsx("h3",{style:{fontSize:"18px",fontWeight:500,color:"var(--text-0)",marginBottom:"10px",letterSpacing:"-0.01em"},children:E.title}),y.jsx("p",{style:{fontSize:"13px",color:"var(--text-2)",lineHeight:1.65},children:E.desc})]})]},L))})]})}),y.jsxs("section",{style:{position:"relative",borderTop:"1px solid var(--line-0)",height:"100vh",overflow:"visible"},children:[y.jsx("div",{style:{position:"absolute",inset:0,width:"100%",height:"100%",background:"radial-gradient(ellipse at center, rgba(15, 15, 25, 0.95) 0%, var(--bg-0) 60%)"},children:y.jsx(Nm,{camera:{position:[0,0,5],fov:50},style:{background:"transparent"},gl:{alpha:!0},children:y.jsx(JX,{lang:r})})}),y.jsx("div",{style:{position:"absolute",bottom:"var(--s-8, 32px)",left:"50%",transform:"translateX(-50%)",zIndex:2,color:"var(--text-3)",fontSize:"var(--fs-small, 12px)",pointerEvents:"none",opacity:.5},children:r==="en"?"â Drag to rotate":"â ææ½æè½¬å¤§è"})]}),y.jsx("section",{style:{padding:"clamp(72px, 8vw, 120px) 0",borderTop:"1px solid var(--line-0)"},children:y.jsxs("div",{style:{maxWidth:"800px",margin:"0 auto",textAlign:"center",padding:"0 clamp(24px, 4vw, 80px)"},children:[y.jsx("blockquote",{style:{fontSize:"clamp(20px, 2.2vw, 30px)",fontWeight:300,color:"rgba(255,255,255,0.6)",lineHeight:1.55,letterSpacing:"-0.01em",fontStyle:"italic",margin:0,padding:0,border:"none",whiteSpace:"pre-line"},children:n.home.visionQuote}),y.jsxs("div",{style:{marginTop:"32px",fontSize:"11px",letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--text-3)"},children:["â ",r==="zh"?"å¿æµå ç´ ":"Flow Element"]})]})}),y.jsx("section",{style:{padding:"clamp(80px, 10vw, 160px) 0",borderTop:"1px solid var(--line-0)",textAlign:"center",position:"relative"},children:y.jsxs("div",{style:{maxWidth:"900px",margin:"0 auto",padding:"0 24px"},children:[y.jsx("h2",{style:{fontSize:"clamp(40px, 5.5vw, 80px)",fontWeight:400,color:"rgba(255,255,255,0.95)",lineHeight:1.05,marginBottom:"52px",letterSpacing:"-0.04em",textAlign:"center"},children:(()=>{const E=n.home.visionCtaTitle,L=n.home.visionCtaHighlight||"";if(!L||!E.includes(L))return E.split(` 5991`).map((Y,z)=>y.jsx("span",{style:{display:"block"},children:Y},z));const N=E.indexOf(L),k=E.substring(0,N).replace(/\n$/,"");return y.jsxs(y.Fragment,{children:[y.jsx("span",{style:{display:"block"},children:k}),y.jsx("span",{style:{display:"block",background:"linear-gradient(135deg, rgba(180,220,240,0.95), rgba(126,200,227,0.8))",WebkitBackgroun
5991dClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text"},children:L})]})})()}),y.jsxs("button",{onClick:()=>window.scrollTo({top:document.documentElement.scrollHeight,behavior:"smooth"}),onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),style:{fontFamily:"var(--font-sans)",fontSize:"12px",fontWeight:500,letterSpacing:"0.08em",textTransform:"uppercase",color:"#0a0a0a",padding:"14px 36px",border:"none",background:c?"#ffffff":"rgba(255,255,255,0.9)",cursor:"pointer",display:"inline-flex",alignItems:"center",gap:"10px",transition:"all 0.3s ease",transform:c?"translateY(-1px)":"translateY(0)"},children:[n.getStartedBtn,y.jsx("svg",{width:"14",height:"7",viewBox:"0 0 14 7",fill:"none",style:{transition:"transform 0.3s ease",transform:c?"translateX(3px)":"translateX(0)"},children:y.jsx("path",{d:"M0 3.5H12M12 3.5L9 0.5M12 3.5L9 6.5",stroke:"currentColor",strokeWidth:"0.8"})})]})]})})]})},gJ=2560,xJ={positionX:1.8,positionY:-2.7,positionZ:-5,rotation:4.9,scaleX:1.33,scaleY:1,baseSize:22.8,opacity:1,blur:.01},vJ={centerX:-4.55,centerY:28.35,innerRadius:34.2,outerRadius:43.56,screenLeft:-18.6,screenRight:19.8,smokeColor:"#F5B642",trailFalloff:3e4,fadeSpeed:1,warpStrength:20,turbulenceSpeed:.1,turbulenceScale:25,scrollSpeed:3e-4,radialFlowSpeed:1.2};function yJ({viewportScale:i}){const{gl:e}=Bi(),t=Zw("/000.png"),n=xJ,r=i,s=X.useRef(null),o=t.image,a=o?o.width/o.height:1,l=n.baseSize*n.scaleY*r,c=n.baseSize*a*n.scaleX*r,u=X.useMemo(()=>{if(!(t!=null&&t.image))return null;const d=t.image,p=Math.min(d.width||512,1024),m=Math.min(d.height||512,1024),x=new Gn(p,m,{minFilter:jt,magFilter:jt,format:Ni}),v=new dn({uniforms:{uTexture:{value:t},uOpacity:{value:n.opacity},uBlur:{value:n.blur}},vertexShader:` 5992 varying vec2 vUv; 5993 void main() { 5994 vUv = uv; 5995 gl_Position = vec4(position.xy, 0.0, 1.0); 5996 } 5997 `,fragmentShader:` 5998 uniform sampler2D uTexture; 5999 uniform float uOpacity; 6000 uniform float uBlur; 6001 varying vec2 vUv; 6002 float gaussian(float x, float sigma) { 6003 return exp(-(x * x) / (2.0 * sigma * sigma)); 6004 } 6005 void main() { 6006 vec4 color = vec4(0.0); 6007 float totalWeight = 0.0; 6008 float sigma = 4.0; 6009 for (float x = -6.0; x <= 6.0; x += 1.0) { 6010 for (float y = -6.0; y <= 6.0; y += 1.0) { 6011 vec2 offset = vec2(x, y) * uBlur * 0.15; 6012 vec2 sampleUv = vUv + offset; 6013 if (sampleUv.x >= 0.0 && sampleUv.x <= 1.0 && sampleUv.y >= 0.0 && sampleUv.y <= 1.0) { 6014 float weight = gaussian(length(vec2(x, y)), sigma); 6015 color += texture2D(uTexture, sampleUv) * weight; 6016 totalWeight += weight; 6017 } 6018 } 6019 } 6020 color /= totalWeight; 6021 float fadeRange = 0.08; 6022 float edgeFade = 1.0; 6023 edgeFade *= smoothstep(0.0, fadeRange, vUv.x); 6024 edgeFade *= smoothstep(0.0, fadeRange, 1.0 - vUv.x); 6025 edgeFade *= smoothstep(0.0, fadeRange, vUv.y); 6026 edgeFade *= smoothstep(0.0, fadeRange, 1.0 - vUv.y); 6027 color.a *= uOpacity * edgeFade; 6028 gl_FragColor = color; 6029 } 6030 `}),_=new or(-1,1,1,-1,0,1),g=new Ec,S=new ks(2,2),b=new Kt(S,v);return g.add(b),e.setRenderTarget(x),e.render(g,_),e.setRenderTarget(null),s.current=x,v.dispose(),S.dispose(),x.texture},[t,e,n.opacity,n.blur]);return X.useEffect(()=>()=>{var d;(d=s.current)==null||d.dispose()},[]),u?y.jsxs("mesh",{position:[n.positionX*r,n.positionY*r,n.positionZ],rotation:[0,0,Math.PI*n.rotation/180],children:[y.jsx("planeGeometry",{args:[c,l]}),y.jsx("meshBasicMaterial",{map:u,transparent:!0,depthWrite:!1})]}):null}function _J(){const{size:i}=Bi(),e=vJ,t=20,n=60*Math.PI/180,r=2*t*Math.tan(n/2),s=r*(i.width/i.height)/2,o=gJ/1440,a=r*o/2,l=Math.min(s/a,1),c=Math.max(e.screenLeft,-s),u=Math.min(e.screenRight,s);return y.jsxs(y.Fragment,{children:[y.jsx(yJ,{viewportScale:l}),y.jsx(QF,{smokeColor:e.smokeColor,centerX:e.centerX*l,centerY:e.centerY*l,innerRadius:e.innerRadius*l,outerRadius:e.outerRadius*l,screenLeft:c,screenRight:u,trailFalloff:e.trailFalloff,fadeSpeed:e.fadeSpeed,warpStrength:e.warpStrength,turbulenceSpeed:e.turbulenceSpeed,turbulenceScale:e.turbulenceScale,scrollSpeed:e.scrollSpeed,scale:1,radialFlowSpeed:e.radialFlowSpeed,fadeScale:l})]})}const SJ=({onNavigateToTab:i})=>{const{t:e,lang:t}=Cr(),[n,r]=X.useState(null),[s,o]=X.useState(!1);X.useEffect(()=>{const l=setTimeout(()=>
6030o(!0),200);return()=>clearTimeout(l)},[]);const a=[{...e.products.memory,id:"memory-engine",features:t==="en"?["Long-term memory storage","Semantic retrieval","Multi-level organization","Cross-session persistence"]:["é¿æè®°å¿åå¨","è¯ä¹æ£ç´¢","å¤å±çº§ç»ç»","è·¨ä¼è¯æä¹
å"]},{...e.products.dialogue,id:"dialogue",features:t==="en"?["Emotion analysis","Intent recognition","Context tracking","Dialogue summarization"]:["æ
æåæ","æå¾è¯å«","ä¸ä¸æè¿½è¸ª","å¯¹è¯æè¦"]},{...e.products.avatar,id:"avatar",features:t==="en"?["Multi-agent orchestration","Task automation","Workflow builder","Real-time collaboration"]:["夿ºè½ä½åä½","ä»»å¡èªå¨å","工使µæå»º","宿¶åä½"]},{...e.products.companion,id:"companion",features:t==="en"?["Emotional intelligence","Personalized interactions","Relationship building","Adaptive personality"]:["æ
ææºè½","个æ§åäºå¨","å
³ç³»å»ºç«","èªéåºæ§æ ¼"]}];return y.jsxs("div",{style:{minHeight:"100vh",position:"relative"},children:[y.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,height:"107vh",zIndex:0,overflow:"hidden",background:"#000"},children:[y.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",opacity:s?1:0,transition:"opacity 0.8s ease-out"},children:y.jsx(Nm,{camera:{position:[0,0,20],fov:60},style:{background:"#000"},gl:{alpha:!0,antialias:!0},frameloop:"always",children:y.jsx(_J,{})})}),y.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,height:"200px",background:"linear-gradient(180deg, rgba(0,0,0,0.6) 0%, transparent 100%)",pointerEvents:"none"}})]}),y.jsxs("section",{style:{minHeight:"107vh",display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center",textAlign:"left",padding:"0 80px",position:"relative",zIndex:1,marginTop:"-120px"},children:[y.jsx("h1",{style:{fontSize:"clamp(36px, 5vw, 72px)",fontWeight:300,marginBottom:"24px",lineHeight:1.1,letterSpacing:"-0.02em",textShadow:"0 12px 44px rgba(0,0,0,0.6)",background:"linear-gradient(180deg, rgba(255,255,255,0.98), rgba(223, 223, 223, 0.85))",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text"},children:t==="en"?"The Arc of Cognition":"æ¶æè®¤ç¥"}),y.jsx("p",{style:{color:"rgba(255, 255, 255, 0.6)",fontSize:"1.3rem",maxWidth:"600px",lineHeight:1.6,fontWeight:400},children:e.products.subtitle})]}),y.jsx("section",{style:{minHeight:"80vh",display:"flex",alignItems:"center",justifyContent:"center",padding:"60px 40px",position:"relative",borderTop:"1px solid rgba(255, 255, 255, 0.1)"},children:y.jsxs("div",{className:"rsp-grid-2",style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"60px",maxWidth:"1200px",width:"100%",alignItems:"center"},children:[y.jsx("div",{style:{height:"500px",borderRadius:"24px",overflow:"hidden",background:"transparent",border:"1px solid rgba(59, 130, 246, 0.2)",boxShadow:"0 0 60px rgba(59, 130, 246, 0.15)"},children:y.jsxs(Nm,{camera:{position:[0,0,2.5],fov:50},children:[y.jsx(KX,{scale:2,position:[0,-.2,0]}),y.jsx(jF,{enableZoom:!1,enablePan:!1,autoRotate:!1,maxPolarAngle:Math.PI/1.5,minPolarAngle:Math.PI/3})]})}),y.jsxs("div",{children:[y.jsx("span",{style:{fontSize:"11px",letterSpacing:"0.12em",textTransform:"uppercase",color:"rgba(255, 255, 255, 0.38)",display:"block",marginBottom:"16px"},children:t==="en"?"Core Technology":"æ ¸å¿ææ¯"}),y.jsx("h2",{style:{fontSize:"2.5rem",fontWeight:400,color:"#fff",marginBottom:"24px",lineHeight:1.2},children:t==="en"?"Neural Architecture":"ç¥ç»æ¶æ"}),y.jsx("p",{style:{color:"rgba(255, 255, 255, 0.6)",fontSize:"1.1rem",lineHeight:1.7,marginBottom:"32px"},children:t==="en"?"Our brain-inspired architecture enables natural language understanding with human-like memory retention, emotional intelligence, and contextual awareness.":"æä»¬å大èå¯åçæ¶æå®ç°äºå
·æäººç±»è®°å¿ä¿æãæ
ææºè½åä¸ä¸ææç¥è½åçèªç¶è¯è¨çè§£ã"}),y.jsx("div",{style:{display:"flex",gap:"12px",flexWrap:"wrap"},children:(t==="en"?["Memory Networks","Attention Mechanisms","Emotional Processing"]:["è®°å¿ç½ç»","注æåæºå¶","æ
æå¤ç"]).map((l,c)=>y.jsx("span",{style:{padding:"8px 16px",border:"1px solid rgba(59, 130, 246, 0.3)",borderRadius:"20px",color:"rgba(59, 130, 246, 0.9)",fontSize:"0.9rem",background:"rgba(59, 130, 246, 0.1)"},children:l},c))})]})]})}),y.jsx("section",{style:{padding:"0 40px 100px"},children:a.map((l,c)=>y.jsxs("div",{id:l.id,onMouseEnter:()=>r(c),onMouseLeave:()=>r(null),className:"rsp-grid-2",style:{padding:"48px 0",borderTop:"1px solid rgba(255, 255, 255, 0.1)",display:"grid",gridTemplateColumns:"1fr 2fr",gap:"60px",alignItems:"start",transition:"all 0.3s ease"},children:[y.jsx("div",{children:y.jsx("h2",{style:{fontSize:"2rem",fontWeight:500,color:n===c?"#fff":"rgba(255, 255, 255, 0.8)",transition:"color 0.3s ease",marginBottom:"8px"},children:l.title})}),y.jsxs("div",{children:[y.jsx("p",{style:{color:"rgba(255, 255, 255, 0.5)",lineHeight:1.7,marginBottom:"32px",fontSize:"1.1rem"},children:l.desc}),y.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px"},children:l.features.map((u,d)=>y.jsx("span",{style:{padding:"8px 16px",border:"1px solid rgba(255, 255, 255, 0.15)",borderRadius:"20px",color:"rgba(255, 255, 255, 0.6)",fontSize:"0.9rem"},children:u},d))})]})]},c))}),y.jsxs("section",{style:{padding:"100px 80px",textAlign:"center",borderTop:"1px solid rgba(255, 255, 255, 0.1)"},children:[y.jsx("h2",{style:{fontSize:"2.5rem",fontWeight:500,marginBottom:"20px",color:"#fff"},children:t==="en"?"Ready to get started?":"åå¤å¥½å¼å§äºåï¼"}),y.jsx("p",{style:{color:"rgba(255, 255, 255, 0.5)",marginBottom:"40px",maxWidth:"500px",margin:"0 auto 40px",fontSize:"1.1rem"},children:t==="en"?"Start building with Flow Element today.":"ç«å³å¼å§ä½¿ç¨å¿æµå
ç´ ã"}),y.jsx("button",{onClick:()=>i==null?void 0:i("getintouch"),style:{padding:"16px 32px",backgroundColor:"#fff",color:"#000",border:"none",borderRadius:"30px",fontSize:"1rem",fontWeight:500,cursor:"pointer"},children:t==="en"?"Book a Demo":"é¢çº¦æ¼ç¤º"})]})]})},bJ=()=>{const{lang:i}=Cr(),[e,t]=X.useState(!1),[n,r]=X.useState(!1),[s,o]=X.useState(null),a=[{title:"Long-term Memory",titleZh:"é¿æè®°å¿",desc:"Persistent memory storage that survives across sessions, enabling AI to build lasting relationships with users.",descZh:"è·¨ä¼è¯æä¹
åè®°å¿åå¨ï¼è®© AI è½å¤ä¸ç¨æ·å»ºç«æä¹
çå
³ç³»ã",label:"01"},{title:"Semantic Search",titleZh:"è¯ä¹æ£ç´¢",desc:"Advanced vector-based retrieval that finds relevant memories based on meaning, not just keywords.",descZh:"åºäºåéçé«çº§æ£ç´¢ï¼æ ¹æ®è¯ä¹èéå
³é®è¯æ¥æ¾ç¸å
³è®°å¿ã",label:"02"},{title:"Easy Integration",titleZh:"è½»æ¾éæ",desc:"Simple API design with SDKs for Python, JavaScript, and REST. Deploy in minutes.",descZh:"ç®æ´ç API è®¾è®¡ï¼æ¯æ PythonãJavaScript å REST SDKãå åéå³å¯ä¸æã",label:"03"}];return y.jsxs("div",{children:[y.jsxs("section",{style:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"100vh",overflow:"hidden",background:"#000"},children:[y.jsx(dJ,{style:{zIndex:1}
6030,showBackground:!1,videoSrc:"/BGVedio.mp4"}),y.jsx("div",{style:{position:"absolute",inset:0,background:"linear-gradient(90deg, rgba(3,5,8,0.85) 0%, rgba(3,5,8,0.5) 35%, transparent 60%)",pointerEvents:"none",zIndex:1}}),y.jsxs("div",{style:{position:"absolute",left:80,top:"40%",transform:"translateY(-50%)",textAlign:"left",zIndex:10},children:[y.jsx("h1",{className:"rsp-wrap",style:{fontSize:"4.5rem",fontWeight:300,fontStyle:"normal",lineHeight:1.1,fontFamily:'"SF Pro Display", "Inter", -apple-system, BlinkMacSystemFont, sans-serif',letterSpacing:"-0.03em",color:"#ffffff",whiteSpace:"nowrap",margin:0},children:i==="en"?"The M-flow Engine":"M-flow è®°å¿å¼æ"}),y.jsx("p",{style:{color:"rgba(255, 255, 255, 0.7)",fontSize:"1.25rem",fontWeight:400,fontFamily:'"SF Pro Display", "Inter", -apple-system, BlinkMacSystemFont, sans-serif',marginTop:"24px",lineHeight:1.5,maxWidth:"600px",margin:"24px 0 0 0",letterSpacing:"-0.01em"},children:i==="en"?"The most advanced memory layer for AI applications.":"æå
è¿ç AI åºç¨è®°å¿å±ã让æ¨ç AI æ¥æè®°å¿ãå¦ä¹ åå»ºç«ææä¹å
³ç³»çè½åã"}),y.jsxs("div",{style:{display:"flex",gap:"16px",marginTop:"36px",justifyContent:"flex-start"},children:[y.jsxs("button",{onMouseEnter:()=>t(!0),onMouseLeave:()=>t(!1),style:{padding:"14px 28px",backgroundColor:e?"rgba(255, 255, 255, 0.1)":"rgba(255, 255, 255, 0.05)",color:"#fff",border:"1px solid rgba(255, 255, 255, 0.2)",borderRadius:"9999px",fontSize:"1rem",fontWeight:400,fontFamily:'"SF Pro Display", "Inter", -apple-system, BlinkMacSystemFont, sans-serif',letterSpacing:"-0.01em",cursor:"pointer",transition:"all 0.2s ease",display:"flex",alignItems:"center",gap:"8px"},children:[y.jsx("span",{children:i==="en"?"Deploy Now":"ç«å³é¨ç½²"}),y.jsx("span",{style:{transform:e?"translateX(4px)":"translateX(0)",transition:"transform 0.2s ease",opacity:.8},children:"â"})]}),y.jsxs("button",{onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),style:{padding:"14px 28px",backgroundColor:n?"rgba(255, 255, 255, 0.1)":"transparent",color:"#fff",border:"1px solid rgba(255, 255, 255, 0.2)",borderRadius:"9999px",fontSize:"1rem",fontWeight:400,fontFamily:'"SF Pro Display", "Inter", -apple-system, BlinkMacSystemFont, sans-serif',letterSpacing:"-0.01em",cursor:"pointer",transition:"all 0.2s ease",display:"flex",alignItems:"center",gap:"8px"},children:[y.jsx("span",{children:"GitHub"}),y.jsx("span",{style:{opacity:.8},children:"â"})]})]})]})]}),y.jsxs("div",{style:{padding:"0 80px"},children:[y.jsxs("section",{className:"rsp-col rsp-gap-sm",style:{display:"flex",justifyContent:"center",gap:"80px",padding:"60px 0",borderTop:"1px solid #222",borderBottom:"1px solid #222",marginBottom:"80px"},children:[y.jsxs("div",{style:{textAlign:"center"},children:[y.jsx("p",{style:{fontSize:"3rem",fontWeight:700,color:"#fff",marginBottom:"8px"},children:"10K+"}),y.jsx("p",{style:{color:"#888"},children:"GitHub Stars"})]}),y.jsxs("div",{style:{textAlign:"center"},children:[y.jsx("p",{style:{fontSize:"3rem",fontWeight:700,color:"#fff",marginBottom:"8px"},children:"500+"}),y.jsx("p",{style:{color:"#888"},children:"Contributors"})]}),y.jsxs("div",{style:{textAlign:"center"},children:[y.jsx("p",{style:{fontSize:"3rem",fontWeight:700,color:"#fff",marginBottom:"8px"},children:"1M+"}),y.jsx("p",{style:{color:"#888"},children:"Downloads"})]})]}),y.jsxs("section",{style:{padding:"0 0 80px",textAlign:"center"},children:[y.jsx("div",{style:{display:"inline-block",padding:"8px 20px",border:"1px solid #444",borderRadius:"50px",fontSize:"0.9rem",color:"#888",marginBottom:"24px"},children:"Features"}),y.jsx("h2",{style:{fontSize:"2.5rem",fontWeight:600,marginBottom:"16px",color:"#fff"},children:i==="en"?"Why M-Flow?":"为ä»ä¹éæ© M-Flowï¼"}),y.jsx("p",{style:{color:"#888",fontSize:"1.1rem",marginBottom:"48px",maxWidth:"600px",margin:"0 auto 48px"},children:i==="en"?"Built for production, designed for developers.":"为ç产ç¯å¢æå»ºï¼ä¸ºå¼åè
设计ã"}),y.jsx("div",{className:"rsp-grid-3",style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"24px",textAlign:"left"},children:a.map((l,c)=>y.jsxs("div",{onMouseEnter:()=>o(c),onMouseLeave:()=>o(null),style:{padding:"40px 32px",backgroundColor:s===c?"#1E90FF":"rgba(255, 255, 255, 0.03)",border:s===c?"1px solid #1E90FF":"1px solid #333",borderRadius:"16px",cursor:"pointer",transition:"all 0.3s ease",transform:s===c?"translateY(-8px)":"translateY(0)",boxShadow:s===c?"0 20px 40px rgba(0, 0, 128, 0.3)":"none"},children:[y.jsx("div",{style:{fontSize:"0.85rem",fontWeight:600,color:s===c?"rgba(255,255,255,0.6)":"#555",marginBottom:"20px",transition:"color 0.3s ease"},children:l.label}),y.jsx("h3",{style:{fontSize:"1.5rem",fontWeight:600,marginBottom:"16
6030px",color:"#fff"},children:i==="en"?l.title:l.titleZh}),y.jsx("p",{style:{color:s===c?"rgba(255,255,255,0.85)":"#888",lineHeight:1.7,fontSize:"0.95rem",transition:"color 0.3s ease"},children:i==="en"?l.desc:l.descZh}),y.jsx("div",{style:{marginTop:"24px",opacity:s===c?1:0,transform:s===c?"translateX(0)":"translateX(-10px)",transition:"all 0.3s ease",color:"#fff",fontSize:"1.2rem"},children:"â"})]},c))})]}),y.jsxs("section",{style:{padding:"60px",backgroundColor:"rgba(255, 255, 255, 0.03)",borderRadius:"24px",textAlign:"center",border:"1px solid #333"},children:[y.jsx("h2",{style:{fontSize:"2rem",fontWeight:600,marginBottom:"16px",color:"#fff"},children:i==="en"?"Ready to transform your business?":"åå¤å¥½è½¬åäºåï¼"}),y.jsx("p",{style:{color:"#888",marginBottom:"32px"},children:i==="en"?"Join thousands of developers building with M-Flow.":"å å
¥æåä¸ä¸ä½¿ç¨ M-Flow æå»ºçå¼åè
ã"}),y.jsxs("div",{style:{display:"flex",gap:"16px",justifyContent:"center"},children:[y.jsx("button",{style:{padding:"14px 28px",backgroundColor:"#fff",color:"#000",border:"none",borderRadius:"50px",fontSize:"1rem",fontWeight:600,cursor:"pointer"},children:i==="en"?"View Documentation":"æ¥çææ¡£"}),y.jsx("button",{style:{padding:"14px 28px",backgroundColor:"transparent",color:"#fff",border:"1px solid #444",borderRadius:"50px",fontSize:"1rem",fontWeight:500,cursor:"pointer"},children:i==="en"?"Join Discord":"å å
¥ Discord"})]})]})]})]})},MJ=()=>{const i=X.useRef(null);return X.useEffect(()=>{const e=i.current;if(!e)return;const t=e.getContext("2d");if(!t)return;let n=0,r=0,s=0;const o=[],a=(d,p)=>{d.x=Math.random()*r,d.y=Math.random()*s,d.s=.5+Math.random()*1.5,d.vx=(Math.random()-.5)*.12,d.vy=-.02-Math.random()*.08,d.a=.15+Math.random()*.45,d.phase=Math.random()*Math.PI*2};for(let d=0;d<60;d++){const p={x:0,y:0,s:0,vx:0,vy:0,a:0,phase:0};a(p,!0),o.push(p)}const l=()=>{const d=Math.min(window.devicePixelRatio||1,2);r=e.parentElement.clientWidth,s=e.parentElement.clientHeight,e.width=r*d,e.height=s*d,e.style.width=r+"px",e.style.height=s+"px",t.setTransform(d,0,0,d,0,0)};l();let c=0;const u=()=>{c++,t.globalCompositeOperation="source-over",t.fillStyle="#050508",t.fillRect(0,0,r,s),t.globalCompositeOperation="lighter";const d=t.createRadialGradient(r*.75,s*.15,0,r*.75,s*.15,r*.6);d.addColorStop(0,"rgba(50,80,140,0.25)"),d.addColorStop(.4,"rgba(30,55,110,0.08)"),d.addColorStop(1,"rgba(0,0,0,0)"),t.fillStyle=d,t.fillRect(0,0,r,s);const p=t.createRadialGradient(r*.6,s*.4,0,r*.6,s*.4,r*.5);p.addColorStop(0,"rgba(35,60,120,0.1)"),p.addColorStop(.5,"rgba(20,40,90,0.03)"),p.addColorStop(1,"rgba(0,0,0,0)"),t.fillStyle=p,t.fillRect(0,0,r,s);for(const x of o){x.x+=x.vx,x.y+=x.vy,(x.y<-10||x.x<-10||x.x>r+10)&&a(x);const v=.5+.5*Math.sin(c*.015+x.phase),_=x.a*v;t.beginPath(),t.arc(x.x,x.y,x.s,0,Math.PI*2),t.fillStyle=`rgba(160,190,240,${_})`,t.fill()}t.globalCompositeOperation="source-over";const m=t.createLinearGradient(0,s*.65,0,s);m.addColorStop(0,"rgba(5,5,8,0)"),m.addColorStop(1,"rgba(5,5,8,0.9)"),t.fillStyle=m,t.fillRect(0,0,r,s),n=requestAnimationFrame(u)};return n=requestAnimationFrame(u),window.addEventListener("resize",l),()=>{cancelAnimationFrame(n),window.removeEventListener("resize",l)}},[]),y.jsx("canvas",{ref:i,style:{position:"absolute",inset:0,width:"100%",height:"100%",zIndex:0}})},AJ=()=>y.jsx("div",{className:"val-vis",style:{width:"100%",maxWidth:280,aspectRatio:"7/5",marginBottom:24},children:y.jsxs("svg",{viewBox:"0 0 280 200",fill:"none",style:{width:"100%",height:"100%"},children:[y.jsx("rect",{x:"30",y:"12",width:"110",height:"3",rx:"1.5",fill:"rgba(140,180,255,0.12)"}),y.jsx("rect",{x:"30",y:"20",width:"85",height:"3",rx:"1.5",fill:"rgba(140,180,255,0.08)"}),y.jsx("rect",{x:"30",y:"28",width:"95",height:"3",rx:"1.5",fill:"rgba(140,180,255,0.08)"}),y.jsx("rect",{x:"30",y:"36",width:"70",height:"3",rx:"1.5",fill:"rgba(140,180,255,0.06)"}),[[30,12,28,0],[75,12,22,.2],[108,12,18,.4],[35,20,25,.5],[50,28,18,.7],[80,28,15,.9]].map(([i,e,t,n],r)=>y.jsx("rect",{className:"va td-hl",x:i,y:e,width:t,height:"3",rx:"1.5",fill:"rgba(100,180,255,0.65)",style:{"--d":`${n}s`,opacity:.8}},`hl${r}`)),y.jsx("path",{d:"M24,8 L24,42 M24,8 L28,8 M24,42 L28,42",stroke:"rgba(140,200,255,0.25)",strokeWidth:"0.8"}),y.jsx("text",{x:"155",y:"18",fontSize:"7",fill:"rgba(140,180,255,0.18)",fontFamily:"monospace",children:"semantic"}),[[35,42,70,72,.6],[55,42,100,100,.8],[85,42,140,85,1],[100,42,180,72,1.1],[60,42,210,90,1.3]].map(([i,e,t,n,r],s)=>y.jsx("line",{className:"va td-conn",x1:i,y1:e,x2:t,y2:n,stroke:"rgba(100,180,255,0.2)",strokeWidth:"0.7",strokeDasharray:"4 3",style:{"--d":`${r}s`,opacity:.3,strokeDashoffset:0}},`fc${s}`)),y.jsx("line",{x1:"20",y1:"50",x2:"260",y2:"50",stroke:"rgba(140,180,255,0.04)",strokeWidth:"0.5",strokeDasharray:"4 6"}),y.jsx("circle",{cx:"140",cy:"85",r:"7",fill:"rgba(140,190,255,0.12)",stroke:"rgba(140,190,255,0.2)",strokeWidth:"0.8"}),y.jsx("circle",{cx:"140",cy:"85",r:"3",fill:"rgba(200,220,255,0.3)"}),[{cx:65,cy:72},{cx:95,cy:105},{cx:180,cy:70}
6030,{cx:215,cy:92},{cx:160,cy:112},{cx:248,cy:78},{cx:42,cy:100},{cx:110,cy:68},{cx:195,cy:115}].map((i,e)=>y.jsx("circle",{className:"va td-node",cx:i.cx,cy:i.cy,r:"4.5",fill:"rgba(140,180,255,0.08)",stroke:"rgba(140,180,255,0.2)",strokeWidth:"0.6",style:{"--d":`${.8+e*.15}s`,opacity:.5}},`gn${e}`)),[[140,85,65,72],[140,85,95,105],[140,85,180,70],[140,85,215,92],[140,85,160,112],[140,85,110,68],[180,70,215,92],[180,70,248,78],[215,92,248,78],[215,92,195,115],[65,72,42,100],[65,72,95,105],[95,105,160,112],[110,68,65,72]].map(([i,e,t,n],r)=>y.jsx("line",{className:"va td-conn",x1:i,y1:e,x2:t,y2:n,stroke:"rgba(100,180,255,0.12)",strokeWidth:"0.5",strokeDasharray:"40",style:{"--d":`${1+r*.1}s`,opacity:.3,strokeDashoffset:0}},`ge${r}`)),[{cx:65,cy:72},{cx:180,cy:70},{cx:215,cy:92}].map((i,e)=>y.jsx("circle",{className:"va td-ring",cx:i.cx,cy:i.cy,r:"9",fill:"none",stroke:"rgba(100,200,255,0.2)",strokeWidth:"0.5",style:{"--d":`${1.5+e*.4}s`,opacity:.15}},`gp${e}`)),y.jsx("text",{x:"20",y:"122",fontSize:"7",fill:"rgba(140,180,255,0.18)",fontFamily:"monospace",children:"graph"}),y.jsx("line",{x1:"20",y1:"130",x2:"260",y2:"130",stroke:"rgba(140,180,255,0.04)",strokeWidth:"0.5",strokeDasharray:"4 6"}),y.jsx("rect",{x:"30",y:"142",width:"100",height:"14",rx:"7",fill:"rgba(140,180,255,0.04)",stroke:"rgba(140,180,255,0.1)",strokeWidth:"0.5"}),y.jsx("circle",{cx:"42",cy:"149",r:"3.5",fill:"none",stroke:"rgba(140,200,255,0.3)",strokeWidth:"0.8"}),y.jsx("line",{x1:"44.5",y1:"151.5",x2:"47",y2:"154",stroke:"rgba(140,200,255,0.3)",strokeWidth:"0.8"}),y.jsx("rect",{x:"52",y:"147.5",width:"35",height:"2.5",rx:"1",fill:"rgba(140,180,255,0.15)"}),y.jsx("line",{className:"va td-beam",x1:"130",y1:"149",x2:"215",y2:"92",stroke:"rgba(100,200,255,0.5)",strokeWidth:"1.2",strokeDasharray:"4 2",style:{opacity:.7}}),[[10,"0.45",1,"0s"],[16,"0.15",.6,"0.15s"],[22,"0.06",.4,"0.3s"]].map(([i,e,t,n],r)=>y.jsx("circle",{className:"va td-found",cx:"215",cy:"92",r:i,fill:"none",stroke:`rgba(100,200,255,${e})`,strokeWidth:t,style:{"--d":n,opacity:.7}},`fr${r}`)),[[175,148,75,34,"0.05","0.15",.5,3,"0.2s"],[183,155,42,2.5,"0.25","",0,1,"0.3s"],[183,161,56,2,"0.12","",0,1,"0.4s"],[183,167,48,2,"0.08","",0,1,"0.45s"],[183,173,38,2,"0.06","",0,1,"0.5s"]].map(([i,e,t,n,r,s,o,a,l],c)=>y.jsx("rect",{className:"va td-beam",x:i,y:e,width:t,height:n,rx:a,fill:`rgba(140,${c===0?190:c===1?200:180},255,${r})`,stroke:s?`rgba(140,190,255,${s})`:"none",strokeWidth:o,style:{"--d":l,opacity:.7}},`rc${c}`)),y.jsx("text",{x:"30",y:"194",fontSize:"7",fill:"rgba(140,180,255,0.18)",fontFamily:"monospace",children:"retrieval"})]})}),wJ=()=>{const i=[{cx:36,cy:42,delay:0},{cx:80,cy:22,delay:.15},{cx:140,cy:16,delay:.3},{cx:200,cy:22,delay:.45},{cx:244,cy:42,delay:.6},{cx:258,cy:88,delay:.75},{cx:22,cy:88,delay:.9}],e=[{cx:48,cy:152,w:52,delay:1.4},{cx:114,cy:162,w:52,delay:1.6},{cx:180,cy:152,w:52,delay:1.8}];return y.jsx("div",{className:"val-vis",style:{width:"100%",maxWidth:280,aspectRatio:"7/5",marginBottom:24},children:y.jsxs("svg",{viewBox:"0 0 280 200",fill:"none",style:{width:"100%",height:"100%"},children:[y.jsx("rect",{x:"110",y:"68",width:"60",height:"44",rx:"5",fill:"rgba(120,210,180,0.05)",stroke:"rgba(120,210,180,0.18)",strokeWidth:"0.8"}),y.jsx("text",{x:"140",y:"96",textAnchor:"middle",fontSize:"16",fontFamily:"monospace",fontWeight:"300",fill:"rgba(120,210,180,0.4)",children:"</>"}),y.jsx("text",{x:"140",y:"107",textAnchor:"middle",fontSize:"6",fontFamily:"monospace",fill:"rgba(120,210,180,0.18)",children:"CORE"}),i.map((t,n)=>y.jsx("line",{className:"va oe-fk",x1:"140",y1:"80",x2:t.cx,y2:t.cy,stroke:"rgba(120,210,180,0.12)",strokeWidth:"0.6",strokeDasharray:"80",style:{"--d":`${t.delay}s`,opacity:.3,strokeDashoffset:0}},`fork${n}`)),i.map((t,n)=>y.jsxs("g",{className:"va oe-dev",style:{"--d":`${t.delay+.3}s`,opacity:.8,transform:"scale(1)",transformOrigin:`${t.cx}px ${t.cy}px`},children:[y.jsx("circle",{cx:t.cx,cy:t.cy,r:"12",fill:"rgba(120,210,180,0.03)",stroke:"rgba(120,210,180,0.15)",strokeWidth:"0.6"}),y.jsx("circle",{cx:t.cx,cy:t.cy-2.5,r:"3",fill:"rgba(120,210,180,0.25)"}),y.jsx("path",{d:`M${t.cx-5},${t.cy+6} A5,4.5 0 0,1 ${t.cx+5},${t.cy+6}`,fill:"rgba(120,210,180,0.15)"})]},`dev${n}`)),i.map((t,n)=>{const r=140-t.cx,s=85-t.cy;return[.35,.65].map((o,a)=>{const l=t.cx+r*o,c=t.cy+s*o;return y.jsx("circle",{className:"va oe-mg",cx:l,cy:c,r:"2.2",fill:"rgba(120,210,180,0.6)",style:{"--d":`${t.delay+2+a*.6}s`,opacity:.5}},`cd${n}_${a}`)})}),e.map((t,n)=>y.jsx("line",{className:"va oe-ln",x1:"140",y1:"112",x2:t.cx+t.w/2,y2:t.cy,stroke:"rgba(120,210,180,0.08)",strokeWidth:"0.5",strokeDasharray:"3 4",style:{"--d":`${t.delay-.2}s`,opacity:.15}},`mc${n}`)),e.map((t,n)=>y.jsxs("g",{className:"va oe-mod",style:{"--d":`${t.delay}s`,opacity:.4,transform:"translateY(0)"},children:[y.jsx("rect",{x:t.cx,y:t.cy,width:t.w,height:"22",rx:"3",fill:"rgba(120,210,180,0.03)",stroke:"rgba(120,210,180,0.12)",strokeWidth:"0.5"}),y.jsx("rect",{x:t.cx+6,y:t.cy+5,width:t.w*.5,height:"2.5",rx:"1",fill:"rgba(120,210,180,0.15)"}),y.jsx("rect",{x:t.cx+6,y:t.cy+10,width:t.w*.7,height:"2",rx:"1",fill:"rgba(120,210,180,0.08)"}),y.jsx("rect",{x:t.cx+6,y:t.cy+15,width:t.w*.4,height:"2",rx:"1",fill:"rgba(120,210,180,0.05)"})]},`mod${n}`)),y.jsx("line",{className:"va oe-ln",x1:100,y1:"163",x2:"114",y2:"173",stroke:"rgba(120,210,180,0.08)",strokeWidth:"0.4",strokeDasharray:"3 3",style:{"--d":"2.0s",opacity:.15}}),y.jsx("line",{className:"va oe-ln",x1:166,y1:"173",x2:"180",y2:"163",stroke:"rgba(120,210,180,0.08)",strokeWidth:"0.4",strokeDasharray:"3 3",style:{"--d":"2.2s",opacity:.15}}),y.jsx("text",{x:"140",y:"195",textAnchor:"middle",fontSize:"7",fontFamily:"monospace",fill:"rgba(120,210,180,0.15)",children:"ecosystem"}),y.jsx("rect",{className:"va oe-pl",x:"107",y:"65",width:"66",height:"50",rx:"7",fill:"none",stroke:"rgba(120,210,180,0.12)",strokeWidth:"0.6",style:{opacity:.08}}),y.jsx("rect",{className:"va oe-pl",x:"103",y:"61",width:"74",height:"58",rx:"9",fill:"none",stroke:"rgba(120,210,180,0.05)",strokeWidth:"0.4",style:{"--d":"0.3s",opacity:.05}})]})})},TJ=()=>y.jsx("div",{className:"val-vis",style:{width:"100%",maxWidth:280,aspectRatio:"7/5",marginBottom:24}
6030,children:y.jsxs("svg",{viewBox:"0 0 280 200",fill:"none",style:{width:"100%",height:"100%"},children:[y.jsx("rect",{x:"82",y:"10",width:"116",height:"32",rx:"3",fill:"rgba(140,190,255,0.03)",stroke:"rgba(140,190,255,0.1)",strokeWidth:"0.5"}),y.jsx("circle",{cx:"90",cy:"16",r:"1.5",fill:"rgba(140,190,255,0.15)"}),y.jsx("circle",{cx:"96",cy:"16",r:"1.5",fill:"rgba(140,190,255,0.1)"}),y.jsx("circle",{cx:"102",cy:"16",r:"1.5",fill:"rgba(140,190,255,0.08)"}),y.jsx("line",{x1:"112",y1:"20",x2:"112",y2:"39",stroke:"rgba(140,190,255,0.06)",strokeWidth:"0.4"}),y.jsx("rect",{x:"87",y:"22",width:"18",height:"2",rx:"1",fill:"rgba(140,190,255,0.1)"}),y.jsx("rect",{x:"87",y:"27",width:"15",height:"1.5",rx:"0.75",fill:"rgba(140,190,255,0.06)"}),y.jsx("rect",{x:"87",y:"31",width:"17",height:"1.5",rx:"0.75",fill:"rgba(140,190,255,0.06)"}),y.jsx("rect",{x:"87",y:"35",width:"13",height:"1.5",rx:"0.75",fill:"rgba(140,190,255,0.05)"}),y.jsx("rect",{x:"118",y:"22",width:"40",height:"2.5",rx:"1",fill:"rgba(140,190,255,0.12)"}),y.jsx("rect",{x:"118",y:"28",width:"65",height:"2",rx:"1",fill:"rgba(140,190,255,0.06)"}),y.jsx("rect",{x:"118",y:"33",width:"55",height:"2",rx:"1",fill:"rgba(140,190,255,0.05)"}),y.jsx("rect",{x:"118",y:"38",width:"45",height:"1.5",rx:"0.75",fill:"rgba(140,190,255,0.04)"}),y.jsx("line",{x1:"15",y1:"52",x2:"265",y2:"52",stroke:"rgba(140,190,255,0.15)",strokeWidth:"1"}),y.jsx("rect",{x:"15",y:"52",width:"250",height:"4",fill:"rgba(140,190,255,0.03)"}),y.jsx("text",{x:"18",y:"49",fontSize:"5.5",fontFamily:"monospace",fill:"rgba(140,190,255,0.18)",children:"surface"}),y.jsx("line",{x1:"12",y1:"56",x2:"12",y2:"190",stroke:"rgba(140,190,255,0.08)",strokeWidth:"0.5"}),[{y:72,l:"L1"},{y:98,l:"L2"},{y:126,l:"L3"},{y:157,l:"L4"}].map((i,e)=>y.jsxs("g",{children:[y.jsx("line",{x1:"9",y1:i.y,x2:"12",y2:i.y,stroke:"rgba(140,190,255,0.12)",strokeWidth:"0.5"}),y.jsx("text",{x:"7",y:i.y+2,textAnchor:"end",fontSize:"4.5",fontFamily:"monospace",fill:"rgba(140,190,255,0.1)",children:i.l})]},`ds${e}`)),y.jsx("path",{d:"M12,188 L10,184 M12,188 L14,184",stroke:"rgba(140,190,255,0.12)",strokeWidth:"0.5"}),y.jsx("rect",{className:"va lt-bld",x:"60",y:"62",width:"160",height:"26",rx:"2",fill:"rgba(140,190,255,0.05)",stroke:"rgba(140,190,255,0.1)",strokeWidth:"0.5",style:{"--d":"1.1s","--lt-o":"0.5",opacity:.5}}),y.jsx("text",{x:"72",y:"77",fontSize:"6",fontFamily:"monospace",fill:"rgba(140,190,255,0.12)",children:"{ }"}),y.jsx("rect",{x:"92",y:"72",width:"30",height:"2",rx:"1",fill:"rgba(140,190,255,0.08)"}),y.jsx("rect",{x:"92",y:"77",width:"22",height:"2",rx:"1",fill:"rgba(140,190,255,0.06)"}),y.jsx("text",{x:"130",y:"77",fontSize:"6",fontFamily:"monospace",fill:"rgba(140,190,255,0.1)",children:"[ ]"}),y.jsx("rect",{x:"148",y:"72",width:"25",height:"2",rx:"1",fill:"rgba(140,190,255,0.08)"}),y.jsx("rect",{x:"148",y:"77",width:"18",height:"2",rx:"1",fill:"rgba(140,190,255,0.06)"}),y.jsx("rect",{x:"180",y:"72",width:"28",height:"2",rx:"1",fill:"rgba(140,190,255,0.07)"}),y.jsx("text",{x:"228",y:"78",fontSize:"5.5",fontFamily:"monospace",fill:"rgba(140,190,255,0.13)",children:"Semantic"}),y.jsx("rect",{className:"va lt-bld",x:"42",y:"94",width:"196",height:"28",rx:"2",fill:"rgba(140,190,255,0.08)",stroke:"rgba(140,190,255,0.13)",strokeWidth:"0.5",style:{"--d":"0.8s","--lt-o":"0.6",opacity:.6}}),[[62,106],[88,102],[88,112],[114,106],[140,102],[140,112],[166,106],[192,102],[192,112],[218,106]].map(([i,e],t)=>y.jsx("circle",{cx:i,cy:e,r:"2",fill:"rgba(140,190,255,0.1)",stroke:"rgba(140,190,255,0.08)",strokeWidth:"0.3"},`gm${t}`)),[[62,106,88,102],[88,102,114,106],[88,112,114,106],[114,106,140,102],[140,102,166,106],[140,112,166,106],[166,106,192,102],[192,102,218,106],[192,112,218,106]].map(([i,e,t,n],r)=>y.jsx("line",{x1:i,y1:e,x2:t,y2:n,stroke:"rgba(140,190,255,0.06)",strokeWidth:"0.3"},`gl${r}`)),y.jsx("text",{x:"244",y:"111",fontSize:"5.5",fontFamily:"monospace",fill:"rgba(140,190,255,0.13)",children:"Graph"}),y.jsx("rect",{className:"va lt-bld",x:"28",y:"128",width:"224",height:"24",rx:"2",fill:"rgba(140,190,255,0.11)",stroke:"rgba(140,190,255,0.18)",strokeWidth:"0.6",style:{"--d":"0.5s","--lt-o":"0.7",opacity:.7}}),[40,72,104,136,168,200].map((i,e)=>y.jsx("rect",{x:i,y:"134",width:"22",height:"12",rx:"1.5",fill:"rgba(140,190,255,0.04)",stroke:"rgba(140,190,255,0.08)",strokeWidth:"0.3"},`mb${e}`)),[40,72,104,136,168,200].map((i,e)=>y.jsxs("g",{children:[y.jsx("rect",{x:i+3,y:"137",width:10+e%3*2,height:"1.5",rx:"0.5",fill:"rgba(140,190,255,0.1)"}),y.jsx("rect",{x:i+3,y:"140",width:8+e%2*4,height:"1.5",rx:"0.5",fill:"rgba(140,190,255,0.06)"})]},`mc${e}`)),y.jsx("text",{x:"258",y:"143",fontSize:"5.5",fontFamily:"monospace",fill:"rgba(140,190,255,0.13)",children:"Memory"}),y.jsx("rect",{className:"va lt-bld",x:"18",y:"158",width:"244",height:"32",rx:"3",fill:"rgba(140,190,255,0.16)",stroke:"rgba(140,190,255,0.25)",strokeWidth:"0.8",style:{"--d":"0.2s","--lt-o":"0.85",opacity:.85}}),y.jsx("line",{x1:"30",y1:"168",x2:"250",y2:"168",stroke:"rgba(140,190,255,0.08)",strokeWidth:"0.4"}),y.jsx("line",{x1:"30",y1:"176",x2:"250",y2:"176",stroke:"rgba(140,190,255,0.06)",strokeWidth:"0.4"}),y.jsx("line",{x1:"30",y1:"182",x2:"250",y2:"182",stroke:"rgba(140,190,255,0.04)",strokeWidth:"0.3"}
6030),[50,80,110,140,170,200,230].map((i,e)=>y.jsx("line",{x1:i,y1:"165",x2:i,y2:"185",stroke:"rgba(140,190,255,0.04)",strokeWidth:"0.3"},`cv${e}`)),[50,110,170,230].map((i,e)=>y.jsx("circle",{cx:i,cy:"168",r:"1.5",fill:"rgba(140,190,255,0.12)"},`cj${e}`)),[80,140,200].map((i,e)=>y.jsx("circle",{cx:i,cy:"176",r:"1.2",fill:"rgba(140,190,255,0.08)"},`cj2${e}`)),[38,88,148,208].map((i,e)=>y.jsx("rect",{x:i,y:"170",width:"32",height:"8",rx:"1",fill:"rgba(140,190,255,0.04)",stroke:"rgba(140,190,255,0.08)",strokeWidth:"0.3"},`cm${e}`)),y.jsx("text",{x:"140",y:"186",textAnchor:"middle",fontSize:"5.5",fontFamily:"monospace",fill:"rgba(140,190,255,0.12)",children:"Core Runtime"}),[{cx:100,y1:158,y2:152,d:0},{cx:140,y1:158,y2:152,d:.3},{cx:180,y1:158,y2:152,d:.6},{cx:90,y1:128,y2:122,d:.8},{cx:140,y1:128,y2:122,d:1},{cx:190,y1:128,y2:122,d:1.2},{cx:110,y1:94,y2:88,d:1.4},{cx:160,y1:94,y2:88,d:1.6},{cx:140,y1:62,y2:52,d:2}].map((i,e)=>y.jsx("circle",{className:"va lt-flow",cx:i.cx,cy:i.y1-3,r:"1.5",fill:"rgba(140,210,255,0.4)",style:{"--d":`${i.d}s`,opacity:.3}},`df${e}`)),[[140,42,140,62],[100,88,100,94],[140,88,140,94],[180,88,180,94],[90,122,90,128],[140,122,140,128],[190,122,190,128],[100,152,100,158],[140,152,140,158],[180,152,180,158]].map(([i,e,t,n],r)=>y.jsx("line",{x1:i,y1:e,x2:t,y2:n,stroke:"rgba(140,190,255,0.06)",strokeWidth:"0.5",strokeDasharray:"2 2"},`cd${r}`)),y.jsx("line",{x1:"268",y1:"52",x2:"268",y2:"192",stroke:"rgba(140,190,255,0.1)",strokeWidth:"0.6"}),[{y:62,l:"Y1"},{y:94,l:"Y2"},{y:128,l:"Y3"},{y:158,l:"Y5"},{y:190,l:"Y10"}].map((i,e)=>y.jsxs("g",{children:[y.jsx("line",{className:"va lt-tk",x1:"265",y1:i.y,x2:"268",y2:i.y,stroke:"rgba(140,190,255,0.25)",strokeWidth:"0.6",style:{"--d":`${e*.3}s`,opacity:.25}}),y.jsx("text",{x:"272",y:i.y+2,fontSize:"4.5",fontFamily:"monospace",fill:"rgba(140,190,255,0.1)",children:i.l})]},`tl${e}`)),y.jsx("path",{d:"M268,190 L266,186 M268,190 L270,186",stroke:"rgba(140,190,255,0.12)",strokeWidth:"0.5"}),y.jsx("text",{x:"268",y:"198",textAnchor:"middle",fontSize:"4.5",fontFamily:"monospace",fill:"rgba(140,190,255,0.1)",children:"time"})]})}),EJ=({onNavigateToTab:i})=>{const{t:e,lang:t}=Cr(),n=[{title:e.company.value1,description:e.company.value1Desc},{title:e.company.value2,description:e.company.value2Desc},{title:e.company.value3,description:e.company.value3Desc}],r=t==="en"?[{year:"2025.6",title:"Founded",description:"Flow Element established with the mission to build cognitive infrastru
6030cture for AI."},{year:"2026.3.27",title:"Memory Engine Open Source",description:"M-Flow core memory engine fully open-sourced â giving every developer access to cognitive infrastructure."},{year:"2026 Q2",title:"Voiceprint Recognition",description:"Voiceprint recognition engineering integrated into the memory engine â enabling speaker identification and voice-based cognitive capabilities.",upcoming:!0},{year:"2026 Q3",title:"Metacognition Engine",description:"Launch of the Metacognition Engine â deep semantic and emotional understanding for every conversation.",upcoming:!0}]:[{year:"2025.6",title:"å ¬å¸æç«",description:"å¿æµå ç´ åç«ï¼èç¦ AI 认ç¥åºç¡è®¾æ½ï¼ç«å¿è®©æ¯ä¸ªæºè½ä½é½æ¥ææç¥ãè®°å¿ä¸çè§£çè½åã"},{year:"2026.3.27",title:"è®°å¿å¼æå¼æº",description:"M-Flow æ ¸å¿è®°å¿å¼æå ¨é¢å¼æºï¼è®©æ¯ä¸ä½å¼åè é½è½æ¥å ¥è®¤ç¥åºç¡è®¾æ½ã"},{year:"2026 Q2",title:"声纹è¯å«å·¥ç¨",description:"声纹è¯å«å·¥ç¨å å ¥è®°å¿å¼æââå®ç°è¯´è¯äººè¯å«ä¸åºäºè¯é³ç认ç¥è½åã",upcoming:!0},{year:"2026 Q3",title:"å 认ç¥å¼æä¸çº¿",description:"å 认ç¥å¼ææ£å¼åå¸ï¼ä¸ºæ¯ä¸æ¬¡å¯¹è¯æä¾æ·±åº¦è¯ä¹çè§£ä¸æ æåæè½åã",upcoming:!0}];return y.jsxs("div",{style:{minHeight:"100vh",position:"relative"},children:[y.jsx("style",{children:` 6031 @keyframes hero-fogA { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(30px,-15px) scale(1.06)} } 6032 @keyframes hero-fogB { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(-22px,10px) scale(0.96)} } 6033 @keyframes hero-fogC { 0%,100%{transform:translate(0,0)} 50%{transform:translate(15px,8px) scale(1.04)} } 6034 @keyframes hero-scrollBounce { 6035 0%,100% { transform:translateY(0); } 6036 50% { transform:translateY(6px); } 6037 } 6038 `}),y.jsxs("section",{style:{position:"relative",minHeight:"100vh",overflow:"hidden",background:"#050507"},children:[y.jsx(MJ,{}),y.jsx("div",{style:{position:"absolute",inset:0,background:"linear-gradient(225deg, rgba(190,205,240,0.09) 0%, rgba(170,185,225,0.05) 20%, transparent 50%, rgba(0,0,0,0.35) 100%)",pointerEvents:"none",zIndex:1}}),y.jsx("div",{style:{position:"absolute",top:"8%",right:"10%",width:"32vw",height:"24vh",background:"radial-gradient(ellipse 130% 100% at 50% 50%, rgba(200,210,230,0.1) 0%, rgba(160,170,190,0.03) 50%, transparent 80%)",borderRadius:"50%",filter:"blur(40px)",animation:"hero-fogA 14s ease-in-out infinite",pointerEvents:"none"}}),y.jsx("div",{style:{position:"absolute",top:"30%",right:"20%",width:"26vw",height:"20vh",background:"radial-gradient(ellipse at center, rgba(210,215,230,0.08) 0%, transparent 65%)",borderRadius:"50%",filter:"blur(50px)",animation:"hero-fogB 18s ease-in-out infinite",pointerEvents:"none"}}),y.jsx("div",{style:{position:"absolute",top:"45%",left:"18%",width:"34vw",height:"22vh",background:"radial-gradient(ellipse 140% 100% at 60% 50%, rgba(180,190,210,0.07) 0%, transparent 70%)",borderRadius:"50%",filter:"blur(55px)",animation:"hero-fogC 20s ease-in-out infinite",pointerEvents:"none"}}),y.jsx("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",zIndex:2},children:y.jsxs("div",{style:{textAlign:"center",maxWidth:"900px",padding:"0 40px",marginTop:"-10vh"},children:[y.jsx("h1",{style:{fontSize:"clamp(48px, 8vw, 84px)",fontWeight:200,letterSpacing:"-2px",margin:"0 0 28px 0",lineHeight:1.05,color:"rgba(255,255,255,0.95)",textShadow:"0 2px 40px rgba(0,0,0,0.6)",whiteSpace:"pre-line"},children:e.company.title}),y.jsx("p",{style:{fontSize:"17px",fontWeight:300,lineHeight:1.7,letterSpacing:"0.3px",margin:"0 auto",maxWidth:"520px",color:"rgba(220,215,205,0.45)",textShadow:"0 1px 20px rgba(0,0,0,0.5)"},children:t==="en"?"Making AI think and behave more like humans":"让 AI æèæ¹å¼åå¤å¨è¡¨ç°åæ¶å徿´æäºº"})]})}),y.jsxs("div",{style:{position:"absolute",bottom:"5%",left:"50%",transform:"translateX(-50%)",zIndex:3,display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"},children:[y.jsx("span",{style:{fontSize:"10px",letterSpacing:"0.2em",textTransform:"uppercase",color:"rgba(180,190,210,0.35)",fontWeight:400},children:"Scroll"}),y.jsx("svg",{width:"16",height:"20",viewBox:"0 0 16 20",fill:"none",style:{animation:"hero-scrollBounce 2s ease-in-out infinite"}
6038,children:y.jsx("path",{d:"M8 2 L8 14 M3 10 L8 15 L13 10",stroke:"rgba(180,190,210,0.3)",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})})]}),y.jsx("div",{style:{position:"absolute",left:0,right:0,bottom:0,height:"18%",background:"linear-gradient(to bottom, transparent, var(--bg-0))",pointerEvents:"none",zIndex:3}})]}),y.jsx("section",{style:{padding:"80px 40px",borderTop:"1px solid var(--line-0)",background:"var(--bg-0)",position:"relative",zIndex:2},children:y.jsxs("div",{className:"rsp-grid-2",style:{maxWidth:"720px",margin:"0 auto",display:"grid",gridTemplateColumns:"1fr 1px 1fr",gap:"48px",alignItems:"start"},children:[y.jsxs("div",{children:[y.jsx("span",{style:{fontSize:"9px",letterSpacing:"0.15em",textTransform:"uppercase",color:"var(--text-3)",display:"block",marginBottom:"16px",fontWeight:400},children:e.company.mission}),y.jsx("p",{style:{fontSize:"14px",fontWeight:300,color:"rgba(255,255,255,0.5)",lineHeight:1.8,margin:0},children:e.company.missionDesc})]}),y.jsx("div",{style:{width:"1px",height:"100%",background:"linear-gradient(180deg, transparent, rgba(255,255,255,0.08), transparent)"}}),y.jsxs("div",{children:[y.jsx("span",{style:{fontSize:"9px",letterSpacing:"0.15em",textTransform:"uppercase",color:"var(--text-3)",display:"block",marginBottom:"16px",fontWeight:400},children:e.company.vision}),y.jsx("p",{style:{fontSize:"14px",fontWeight:300,color:"rgba(255,255,255,0.5)",lineHeight:1.8,margin:0},children:e.company.visionDesc})]})]})}),y.jsxs("section",{style:{padding:"100px 40px",borderTop:"1px solid var(--line-0)",background:"var(--bg-0)",position:"relative",zIndex:2,overflow:"hidden"},children:[y.jsx("style",{children:` 6039 .val-card { 6040 position: relative; 6041 padding: 48px 36px 40px; 6042 border: 1px solid rgba(255,255,255,0.05); 6043 border-radius: 2px; 6044 background: linear-gradient(180deg, rgba(255,255,255,0.015) 0%, transparent 100%); 6045 transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1); 6046 } 6047 .val-card:hover { 6048 border-color: rgba(100,160,255,0.12); 6049 background: linear-gradient(0deg, rgba(100,160,255,0.04) 0%, transparent 60%); 6050 transform: translateY(-3px); 6051 } 6052 .val-card::after { 6053 content: ''; 6054 position: absolute; 6055 inset: -1px; 6056 border: 1px solid rgba(100,160,255,0.15); 6057 border-radius: 2px; 6058 clip-path: inset(100% 0 0 0); 6059 transition: clip-path 0.6s cubic-bezier(0.16, 1, 0.3, 1); 6060 pointer-events: none; 6061 } 6062 .val-card:hover::after { clip-path: inset(0 0 0 0); } 6063 6064 /* ââ Hover: smooth transitions + animations ââ */ 6065 .val-card .va { 6066 animation: none !important; 6067 transition: opacity 0.8s ease, transform 0.8s ease; 6068 } 6069 .val-card:hover .td-hl { animation: td-hl 5s ease-in-out infinite var(--d, 0s) !important; } 6070 .val-card:hover .td-conn { animation: td-conn 5s ease-out infinite var(--d, 0s) !important; } 6071 .val-card:hover .td-node { animation: td-nodeIn 5s ease-out infinite var(--d, 0s) !important; } 6072 .val-card:hover .td-beam { animation: td-beam 5s ease-in-out infinite var(--d, 0s) !important; } 6073 .val-card:hover .td-found { animation: td-found 5s ease-in-out infinite var(--d, 0s) !important; } 6074 .val-card:hover .td-ring { animation: td-ring 5s ease-out infinite var(--d, 0s) !important; } 6075 .val-card:hover .oe-fk { animation: oe-fork 6s ease-out infinite var(--d, 0s) !important; } 6076 .val-card:hover .oe-dev { animation: oe-devIn 6s ease-out infinite var(--d, 0s) !important; } 6077 .val-card:hover .oe-mg { animation: oe-merge 6s ease-in-out infinite var(--d, 0s) !important; } 6078 .val-card:hover .oe-pl { animation: oe-pulse 2.5s ease-in-out infinite var(--d, 0s) !important; } 6079 .val-card:hover .oe-mod { animation: oe-modIn 6s ease-out infinite var(--d, 0s) !important; } 6080 .val-card:hover .oe-ln { animation: oe-lineIn 6s ease-out infinite var(--d, 0s) !important; } 6081 .val-card:hover .lt-bld { animation: lt-buildUp 6s ease-in-out infinite var(--d, 0s) !important; } 6082 .val-card:hover .lt-tk { animation: lt-tick 3s ease-in-out infinite var(--d, 0s) !important; } 6083 .val-card:hover .lt-pl { animation: lt-pulse 4s ease-in-out infinite !important; } 6084 .val-card:hover .lt-flow { animation: lt-flow 3s ease-in-out infinite var(--d, 0s) !important; } 6085 6086 /* ââ Keyframes: Card 1 (ææ¯é©±å¨) â no snap from 0 ââ */ 6087 @keyframes td-hl { 0%,100%{opacity:0.15} 12%,55%{opacity:1} } 6088 @keyframes td-conn { 0%{stroke-dashoffset:40;opacity:0.1} 25%{opacity:0.3} 60%,100%{stroke-dashoffset:0;opacity:0.3} } 6089 @keyframes td-nodeIn { 0%{opacity:0.3;transform:scale(0.9)}
6089 30%{opacity:0.7;transform:scale(1.15)} 50%,100%{opacity:0.5;transform:scale(1)} } 6090 @keyframes td-beam { 0%,50%{opacity:0.05} 58%{opacity:0.8} 78%{opacity:0.8} 100%{opacity:0.05} } 6091 @keyframes td-found { 0%,50%{opacity:0.05} 60%{opacity:0.8} 80%{opacity:0.8} 100%{opacity:0.05} } 6092 @keyframes td-ring { 0%,30%{r:4.5;opacity:0.02} 50%{opacity:0.35} 100%{r:18;opacity:0} } 6093 6094 /* ââ Keyframes: Card 2 (弿¾å ±å»º) â no snap from 0 ââ */ 6095 @keyframes oe-fork { 0%{stroke-dashoffset:80;opacity:0.1} 15%{opacity:0.5} 50%,100%{stroke-dashoffset:0;opacity:0.3} } 6096 @keyframes oe-devIn { 0%{opacity:0.3;transform:scale(0.9)} 25%{opacity:1;transform:scale(1.15)} 40%,100%{opacity:0.8;transform:scale(1)} } 6097 @keyframes oe-merge { 0%,40%{opacity:0.05} 55%{opacity:0.8} 75%{opacity:0.7} 100%{opacity:0.05} } 6098 @keyframes oe-pulse { 0%,100%{opacity:0.08} 50%{opacity:0.35} } 6099 @keyframes oe-modIn { 0%,35%{opacity:0.15;transform:translateY(3px)} 55%{opacity:0.6;transform:translateY(0)} 100%{opacity:0.4;transform:translateY(0)} } 6100 @keyframes oe-lineIn { 0%{opacity:0.05} 40%,100%{opacity:0.15} } 6101 6102 /* ââ Keyframes: Card 3 (é¿æä¸»ä¹) â breathing effect ââ */ 6103 @keyframes lt-buildUp { 0%,100%{opacity:var(--lt-o);transform:translateY(0)} 50%{opacity:1;transform:translateY(-2px)} } 6104 @keyframes lt-pulse { 0%,100%{opacity:0.05} 50%{opacity:0.25} } 6105 @keyframes lt-tick { 0%,100%{opacity:0.12} 50%{opacity:0.45} } 6106 @keyframes lt-flow { 0%{opacity:0.05;transform:translateY(0)} 25%{opacity:0.7} 50%{opacity:0.7;transform:translateY(-10px)} 75%{opacity:0.3;transform:translateY(-14px)} 100%{opacity:0.05;transform:translateY(-18px)} } 6107 `}),y.jsx("div",{style:{position:"absolute",top:"50%",left:"50%",width:"800px",height:"400px",transform:"translate(-50%, -50%)",background:"radial-gradient(ellipse, rgba(60,100,180,0.03) 0%, transparent 70%)",pointerEvents:"none"}}),y.jsxs("div",{style:{maxWidth:"var(--container)",margin:"0 auto",position:"relative"},children:[y.jsx("span",{style:{fontSize:"10px",letterSpacing:"0.2em",textTransform:"uppercase",color:"var(--text-3)",display:"block",marginBottom:"60px",fontWeight:500},children:e.company.values}),y.jsx("div",{className:"rsp-grid-3",style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"32px"},children:n.map((s,o)=>y.jsxs("div",{className:"val-card",children:[o===0&&y.jsx(AJ,{}),o===1&&y.jsx(wJ,{}),o===2&&y.jsx(TJ,{}),y.jsx("h3",{style:{fontSize:"var(--fs-h3)",fontWeight:300,color:"var(--text-0)",marginBottom:"14px",letterSpacing:"-0.01em"},children:s.title}),y.jsx("p",{style:{fontSize:"var(--fs-body)",color:"var(--text-2)",lineHeight:1.7},children:s.description})]},o))})]})]}),y.jsx("section",{style:{padding:"80px 40px",borderTop:"1px solid var(--line-0)",background:"var(--bg-0)",position:"relative",zIndex:2},children:y.jsxs("div",{style:{maxWidth:"var(--container)",margin:"0 auto"},children:[y.jsx("span",{style:{fontSize:"var(--fs-micro)",letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--text-3)",display:"block",marginBottom:"60px"},children:e.company.timeline}),y.jsx("div",{style:{position:"relative",paddingLeft:"60px"},children:r.map((s,o)=>{var l;const a=s.upcoming;return y.jsxs("div",{style:{paddingBottom:"52px",position:"relative",opacity:a?.55:1},children:[y.jsx("div",{style:{position:"absolute",left:"-48px",top:"2px",width:"24px",height:"24px",borderRadius:"50%",border:a?"1px dashed rgba(255,255,255,0.15)":"1px solid var(--line-0)",background:"var(--bg-0)"},children:y.jsx("div",{style:{position:"absolute",inset:"3px",borderRadius:"50%",background:a?"transparent":o===0?"var(--line-1)":"transparent"}})}),o<r.length-1&&y.jsx("div",{style:{position:"absolute",left:"-40px",top:"24px",width:"1px",height:"52px",background:(l=r[o+1])!=null&&l.upcoming?"repeating-linear-gradient(180deg, var(--line-0) 0px, var(--line-0) 4px, transparent 4px, transparent 8px)":"var(--line-0)"}}),y.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",marginBottom:"8px"},children:[y.jsx("h3",{style:{fontSize:"var(--fs-body-lg)",fontWeight:400,color:a?"rgba(255,255,255,0.6)":"var(--text-0)",margin:0},children:s.title}),a&&y.jsx("span",{style:{fontSize:"10px",letterSpacing:"0.1em",color:"rgba(160,180,255,0.6)",border:"1px solid rgba(160,180,255,0.2)",borderRadius:"4px",padding:"2px 8px",textTransform:"uppercase",fontWeight:500},children:t==="zh"?"å³å°å°æ¥":"Upcoming"})]}),y.jsx("p",{style:{fontSize:"var(--fs-micro)",color:"var(--text-2)",letterSpacing:"0.08em",textTransform:"uppercase",margin:"0 0 8px 0"},children:s.year}),y.jsx("p",{style:{fontSize:"var(--fs-body)",color:a?"rgba(255,255,255,0.35)":"var(--text-2)",lineHeight:1.6,maxWidth:"500px",margin:0},children:s.description})]},o)})})]})}),y.jsxs("section",{style:{padding:"140px 40px",borderTop:"1px solid var(--line-0)",background:"var(--bg-0)",textAlign:"center",position:"relative",zIndex:2,overflow:"hidden"},children:[y.jsx("style",{children:` 6108 @keyframes cta-glow { 6109 0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(1); } 6110 50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.08); } 6111 } 6112 @keyframes cta-line-l { 6113 0%, 100% { transform: scaleX(0.6); opacity: 0.15; } 6114 50% { transform: scaleX(1); opacity: 0.4; } 6115 } 6116 @keyframes cta-line-r { 6117 0%, 100% { transform: scaleX(0.6); opacity: 0.15; } 6118 50% { transform: scaleX(1); opacity: 0.4; } 6119 } 6120 @keyframes cta-ring { 6121 0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0.3; } 6122 100% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; } 6123 } 6124 @keyframes cta-particle { 6125 0% { transform: translateY(0) scale(1); opacity: 0; } 6126 20% { opacity: 0.6; } 6127 80% { opacity: 0.4; } 6128 100% { transform: translateY(-80px) scale(0.3); opacity: 0; } 6129 } 6130 .cta-btn { 6131 position: relative; 6132 padding: 16px 48px; 6133 border: 1px solid rgba(100,160,255,0.2); 6134 border-radius: 0; 6135 background: transparent; 6136 color: rgba(255,255,255,0.9); 6137 font-size: 13px; 6138 font-weight: 400; 6139 letter-spacing: 0.15em; 6140 text-transform: uppercase; 6141 cursor: pointer; 6142 transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); 6143 overflow: hidden; 6144 } 6145 .cta-btn::before { 6146 content: ''; 6147 position: absolute; 6148 inset: 0; 6149 background: linear-gradient(135deg, rgba(100,160,255,0.06), transparent, rgba(100,160,255,0.04)); 6150 opacity: 0; 6151 transition: opacity 0.5s ease; 6152 } 6153 .cta-btn:hover { 6154 border-color: rgba(100,160,255,0.4); 6155 box-shadow: 0 0 30px rgba(100,160,255,0.08), 0 0 60px rgba(100,160,255,0.04); 6156 transform: translateY(-1px); 6157 } 6158 .cta-btn:hover::before { opacity: 1; } 6159 `}),y.jsx("div",{style:{position:"absolute",top:"50%",left:"50%",width:"600px",height:"600px",borderRadius:"50%",background:"radial-gradient(circle, rgba(60,110,200,0.06) 0%, rgba(50,90,180,0.03) 40%, transparent 70%)",animation:"cta-glow 8s ease-in-out infinite",pointerEvents:"none"}}),[0,1,2].map(s=>y.jsx("div",{style:{position:"absolute",top:"50%",left:"50%",width:"300px",height:"300px",borderRadius:"50%",border:"1px solid rgba(100,160,255,0.06)",animation:`cta-ring 6s ease-out ${s*2}s infinite`,pointerEvents:"none"}},s)),y.jsx("div",{style:{position:"absolute",top:"50%",left:"0",right:"55%",height:"1px",background:"linear-gradient(90deg, transparent, rgba(100,160,255,0.15))",transformOrigin:"right",animation:"cta-line-l 6s ease-in-out infinite",pointerEvents:"none"}}),y.jsx("div",{style:{position:"absolute",top:"50%",left:"55%",right:"0",height:"1px",background:"linear-gradient(90deg, rgba(100,160,255,0.15), transparent)",transformOrigin:"left",animation:"cta-line-r 6s ease-in-out 1s infinite",pointerEvents:"none"}}),[{x:"20%",d:0,dur:5},{x:"35%",d:1.5,dur:6},{x:"65%",d:3,dur:5.5},{x:"80%",d:.8,dur:6.5},{x:"50%",d:2.2,dur:4.5}].map((s,o)=>y.jsx("div",{style:{position:"absolute",left:s.x,bottom:"20%",width:"2px",height:"2px",borderRadius:"50%",background:"rgba(100,170,255,0.5)",boxShadow:"0 0 6px rgba(100,160,255,0.3)",animation:`cta-
6159particle ${s.dur}s ease-out ${s.d}s infinite`,pointerEvents:"none"}},o)),y.jsxs("div",{style:{maxWidth:"640px",margin:"0 auto",position:"relative"},children:[y.jsx("span",{style:{fontSize:"10px",letterSpacing:"0.2em",textTransform:"uppercase",color:"var(--text-3)",display:"block",marginBottom:"40px",fontWeight:500},children:t==="en"?"Careers":"å å ¥æä»¬"}),y.jsx("h2",{style:{fontSize:"clamp(28px, 3.5vw, 48px)",fontWeight:200,color:"var(--text-0)",marginBottom:"32px",lineHeight:1.3,letterSpacing:"-0.02em"},children:t==="en"?"Build the memory layer of AI":"æå»º AI çè®°å¿å±"}),y.jsx("p",{style:{fontSize:"clamp(14px, 1.2vw, 17px)",color:"var(--text-2)",lineHeight:1.8,marginBottom:"56px",fontWeight:300},children:t==="en"?"We're looking for builders who want to solve one of AI's hardest problems â giving machines real memory. If you thrive on deep technical challenges and care about shipping infrastructure that matters, let's talk.":"æä»¬æ£å¨å¯»æ¾æ³è¦è§£å³ AI é¢åæé¾é®é¢ä¹ä¸ç人ââèµäºæºå¨çæ£çè®°å¿ãå¦æä½ çè¡·äºæ·±åº¦ææ¯ææï¼å¹¶ä¸æ¸´ææå»ºçæ£éè¦çåºç¡è®¾æ½ï¼æå¾ ä¸ä½ åè¡ã"}),y.jsx("button",{className:"cta-btn",onClick:()=>i==null?void 0:i("contactjob"),children:t==="en"?"Get in Touch":"èç³»æä»¬"})]})]})]})},CJ=()=>{const{t:i}=Cr();return y.jsxs("div",{style:{padding:"60px 80px"},children:[y.jsx("h1",{style:{fontSize:"2.5rem",marginBottom:"16px"},children:i.resources.title}),y.jsx("p",{style:{color:"#888",marginBottom:"60px"},children:i.resources.subtitle}),y.jsx("div",{className:"rsp-grid-3",style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"32px"},children:[i.resources.docs,i.resources.tutorials,i.resources.blog].map((e,t)=>y.jsxs("div",{style:{padding:"32px",border:"1px solid #333"},children:[y.jsx("h3",{style:{marginBottom:"12px"},children:e.title}),y.jsx("p",{style:{color:"#888",marginBottom:"16px"},children:e.desc}),y.jsx("a",{href:"#",style:{color:"#4fc3f7"},children:e.link})]},t))})]})},RJ=()=>{const{t:i,lang:e}=Cr(),t=e==="en"?[{title:"Senior AI Engineer",location:"Remote / Beijing",type:"Full-time"},{title:"Product Designer",location:"Beijing",type:"Full-time"},{title:"Frontend Engineer",location:"Remote",type:"Full-time"},{title:"Machine Learning Researcher",location:"Beijing",type:"Full-time"}]:[{title:"é«çº§ AI å·¥ç¨å¸",location:"è¿ç¨ / å京",type:"å ¨è"},{title:"产å设计å¸",location:"å京",type:"å ¨è"},{title:"å端工ç¨å¸",location:"è¿ç¨",type:"å ¨è"},{title:"æºå¨å¦ä¹ ç ç©¶å",location:"å京",type:"å ¨è"}];return y.jsxs("div",{style:{minHeight:"100vh",position:"relative"},children:[y.jsxs("section",{style:{minHeight:"60vh",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",padding:"120px 40px 80px",background:` 6160 radial-gradient(600px 400px at 50% 30%, rgba(100,200,150,0.08), transparent 60%), 6161 var(--bg-0) 6162 `},children:[y.jsx("h1",{style:{fontSize:"var(--fs-h1)",fontWeight:300,marginBottom:"24px",color:"var(--text-0)",letterSpacing:"-0.02em"},children:i.career.title}),y.jsx("p",{style:{color:"var(--text-1)",fontSize:"var(--fs-body-lg)",maxWidth:"600px",lineHeight:1.6},children:i.career.subtitle})]}),y.jsx("section",{style:{padding:"80px 40px",borderTop:"1px solid var(--line-0)"},children:y.jsxs("div",{style:{maxWidth:"var(--container)",margin:"0 auto"},children:[y.jsx("span",{style:{fontSize:"var(--fs-micro)",letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--text-3)",display:"block",marginBottom:"var(--s-4)"},children:i.career.openPositions}),y.jsx("div",{style:{marginTop:"40px"},children:t.map((n,r)=>y.jsxs("div",{style:{padding:"24px 0",borderBottom:"1px solid var(--line-0)",display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",transition:"all var(--t-mid) var(--ease)"},onMouseOver:s=>{s.currentTarget.style.paddingLeft="16px",s.currentTarget.style.background="var(--bg-1)"},onMouseOut:s=>{s.currentTarget.style.paddingLeft="0",s.currentTarget.style.background="transparent"},children:[y.jsxs("div",{children:[y.jsx("h3",{style:{fontSize:"var(--fs-h3)",color:"var(--text-0)",marginBottom:"8px"},children:n.title}),y.jsxs("p",{style:{color:"var(--text-2)",fontSize:"var(--fs-body)"},children:[n.location," · ",n.type]})]}),y.jsx("span",{style:{color:"var(--text-1)"},children:"â"})]},r))})]})})]})},PJ=()=>{const{t:i,lang:e}=Cr(),t=e==="en"?[{title:"Memory-Augmented Neural Networks for Conversational AI",venue:"NeurIPS 2024",year:"2024"},{title:"Emotional Intelligence in Large Language Models",venue:"ACL 2024",year:"2024"},{title:"Long-term Memory Retrieval for Dialogue Systems",venue:"EMNLP 2023",year:"2023"}]:[{title:"é¢å对è¯AIçè®°å¿å¢å¼ºç¥ç»ç½ç»",venue:"NeurIPS 2024",year:"2024"},{title:"大è¯è¨æ¨¡åä¸çæ ææºè½",venue:"ACL 2024",year:"2024"},{title:"对è¯ç³»ç»çé¿æè®°å¿æ£ç´¢",venue:"EMNLP 2023",year:"2023"}];return y.jsxs("div",{style:{minHeight:"100vh",position:"relative"},children:[y.jsxs("section",{style:{minHeight:"60vh",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",padding:"120px 40px 80px",background:` 6163 radial-gradient(600px 400px at 50% 30%, rgba(200,100,255,0.08), transparent 60%), 6164 var(--bg-0) 6165 `},children:[y.jsx("h1",{style:{fontSize:"var(--fs-h1)",fontWeight:300,marginBottom:"24px",color:"var(--text-0)",letterSpacing:"-0.02em"},children:i.research.title}),y.jsx("p",{style:{color:"var(--text-1)",fontSize:"var(--fs-body-lg)",maxWidth:"600px",lineHeight:1.6},children:i.research.subtitle})]}),y.jsx("section",{style:{padding:"80px 40px",borderTop:"1px solid var(--line-0)"},children:y.jsxs("div",{style:{maxWidth:"var(--container)",margin:"0 auto"},children:[y.jsx("span",{style:{fontSize:"var(--fs-micro)",letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--text-3)",display:"block",marginBottom:"var(--s-4)"},children:i.research.papers}),y.jsx("div",{style:{marginTop:"40px"},children:t.map((n,r)=>
6165y.jsxs("article",{style:{padding:"32px",marginBottom:"16px",border:"1px solid var(--line-0)",borderRadius:"var(--r-lg)",background:"linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01))",transition:"all var(--t-mid) var(--ease)",cursor:"pointer"},onMouseOver:s=>{s.currentTarget.style.borderColor="var(--line-1)",s.currentTarget.style.transform="translateY(-2px)"},onMouseOut:s=>{s.currentTarget.style.borderColor="var(--line-0)",s.currentTarget.style.transform="translateY(0)"},children:[y.jsx("h3",{style:{fontSize:"var(--fs-h3)",color:"var(--text-0)",marginBottom:"12px"},children:n.title}),y.jsxs("p",{style:{color:"var(--text-2)",fontSize:"var(--fs-body)"},children:[n.venue," · ",n.year]})]},r))})]})})]})},IJ=()=>{const{t:i,lang:e}=Cr(),t=e==="en"?[{title:"Flow Element Developer Conference 2026",date:"Mar 15, 2026",location:"Beijing",status:"upcoming"},{title:"AI & Emotional Intelligence Workshop",date:"Feb 20, 2026",location:"Online",status:"upcoming"},{title:"Product Launch Event",date:"Dec 10, 2025",location:"Shanghai",status:"past"}]:[{title:"å¿æµå ç´ å¼åè å¤§ä¼ 2026",date:"2026å¹´3æ15æ¥",location:"å京",status:"upcoming"},{title:"AI䏿 ææºè½å·¥ä½å",date:"2026å¹´2æ20æ¥",location:"线ä¸",status:"upcoming"},{title:"产ååå¸ä¼",date:"2025å¹´12æ10æ¥",location:"䏿µ·",status:"past"}];return y.jsxs("div",{style:{minHeight:"100vh",position:"relative"},children:[y.jsxs("section",{style:{minHeight:"60vh",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",padding:"120px 40px 80px",background:` 6166 radial-gradient(600px 400px at 50% 30%, rgba(255,180,100,0.08), transparent 60%), 6167 var(--bg-0) 6168 `},children:[y.jsx("h1",{style:{fontSize:"var(--fs-h1)",fontWeight:300,marginBottom:"24px",color:"var(--text-0)",letterSpacing:"-0.02em"},children:i.events.title}),y.jsx("p",{style:{color:"var(--text-1)",fontSize:"var(--fs-body-lg)",maxWidth:"600px",lineHeight:1.6},children:i.events.subtitle})]}),y.jsx("section",{style:{padding:"80px 40px",borderTop:"1px solid var(--line-0)"},children:y.jsxs("div",{style:{maxWidth:"var(--container)",margin:"0 auto"},children:[y.jsx("span",{style:{fontSize:"var(--fs-micro)",letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--text-3)",display:"block",marginBottom:"var(--s-10)"},children:i.events.upcoming}),y.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(340px, 1fr))",gap:"24px"},children:t.filter(n=>n.status==="upcoming").map((n,r)=>y.jsxs("article",{style:{padding:"32px",border:"1px solid var(--line-0)",borderRadius:"var(--r-lg)",background:"linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01))",transition:"all var(--t-mid) var(--ease)",cursor:"pointer"},onMouseOver:s=>{s.currentTarget.style.borderColor="var(--line-1)",s.currentTarget.style.transform="translateY(-2px)"},onMouseOut:s=>{s.currentTarget.style.borderColor="var(--line-0)",s.currentTarget.style.transform="translateY(0)"},children:[y.jsx("span",{style:{display:"inline-block",padding:"4px 10px",borderRadius:"var(--r-pill)",background:"rgba(100, 200, 150, 0.15)",color:"rgba(100, 200, 150, 0.9)",fontSize:"var(--fs-micro)",marginBottom:"16px"},children:e==="en"?"Upcoming":"å³å°ä¸¾è¡"}),y.jsx("h3",{style:{fontSize:"var(--fs-h3)",color:"var(--text-0)",marginBottom:"12px"},children:n.title}),y.jsxs("p",{style:{color:"var(--text-2)",fontSize:"var(--fs-body)"},children:[n.date," · ",n.location]})]},r))}),y.jsx("span",{style:{fontSize:"var(--fs-micro)",letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--text-3)",display:"block",marginTop:"60px",marginBottom:"var(--s-10)"},children:i.events.past}),y.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(340px, 1fr))",gap:"24px"},children:t.filter(n=>n.status==="past").map((n,r)=>y.jsxs("article",{style:{padding:"32px",border:"1px solid var(--line-0)",borderRadius:"var(--r-lg)",background:"var(--bg-1)",opacity:.7},children:[y.jsx("h3",{style:{fontSize:"var(--fs-h3)",color:"var(--text-1)",marginBottom:"12px"},children:n.title}),y.jsxs("p",{style:{color:"var(--text-2)",fontSize:"var(--fs-body)"},children:[n.date," · ",n.location]})]},r))})]})})]})},LJ=()=>{const{lang:i}=Cr(),[e,t]=X.useState(""),[n,r]=X.useState(""),[s,o]=X.useState(!0);return y.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"calc(100vh - 200px)",padding:"80px 80px 40px"},children:[y.jsx("h1",{style:{fontSize:"2rem",fontWeight:600,marginBottom:"16
6168px",color:"#fff",textAlign:"center"},children:i==="en"?"Sign in to Flow Element":"ç»å½å¿æµå
ç´ "}),y.jsx("p",{style:{color:"#888",textAlign:"center",marginBottom:"40px",maxWidth:"200px",lineHeight:1.6},children:i==="en"?"Access your AI memory dashboard. Build intelligent applications with persistent memory.":"è®¿é®æ¨ç AI è®°å¿ä»ªè¡¨æ¿ãä½¿ç¨æä¹
è®°å¿æå»ºæºè½åºç¨ã"}),y.jsxs("div",{style:{width:"100%",maxWidth:"360px",padding:"32px",backgroundColor:"rgba(255, 255, 255, 0.03)",border:"1px solid #333",borderRadius:"16px"},children:[y.jsx("div",{style:{marginBottom:"16px"},children:y.jsx("input",{type:"email",value:e,onChange:a=>t(a.target.value),placeholder:i==="en"?"Email address":"é®ç®±å°å",style:{width:"100%",padding:"14px 16px",backgroundColor:"rgba(255, 255, 255, 0.05)",border:"1px solid #444",borderRadius:"8px",color:"#fff",fontSize:"1rem",outline:"none"}})}),y.jsx("div",{style:{marginBottom:"24px"},children:y.jsx("input",{type:"password",value:n,onChange:a=>r(a.target.value),placeholder:i==="en"?"Password":"å¯ç ",style:{width:"100%",padding:"14px 16px",backgroundColor:"rgba(255, 255, 255, 0.05)",border:"1px solid #444",borderRadius:"8px",color:"#fff",fontSize:"1rem",outline:"none"}})}),y.jsx("button",{style:{width:"100%",padding:"14px",backgroundColor:"#fff",color:"#000",border:"none",borderRadius:"8px",fontSize:"1rem",fontWeight:600,cursor:"pointer",marginBottom:"24px"},children:s?i==="en"?"Sign In":"ç»å½":i==="en"?"Create Account":"å建账æ·"}),y.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"16px",marginBottom:"24px"},children:[y.jsx("div",{style:{flex:1,height:"1px",backgroundColor:"#444"}}),y.jsx("span",{style:{color:"#666",fontSize:"0.85rem"},children:i==="en"?"or":"æ"}),y.jsx("div",{style:{flex:1,height:"1px",backgroundColor:"#444"}})]}),y.jsxs("button",{style:{width:"100%",padding:"14px",backgroundColor:"transparent",color:"#fff",border:"1px solid #444",borderRadius:"8px",fontSize:"1rem",fontWeight:500,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",gap:"8px"},children:[y.jsx("span",{children:"GitHub"}),i==="en"?"Sign In":"ç»å½"]})]}),y.jsxs("p",{style:{marginTop:"24px",color:"#888",fontSize:"0.9rem"},children:[s?i==="en"?"Don't have an account? ":"è¿æ²¡æè´¦æ·ï¼":i==="en"?"Already have an account? ":"å·²æè´¦æ·ï¼",y.jsx("span",{onClick:()=>o(!s),style:{color:"#fff",cursor:"pointer",textDecoration:"underline"},children:s?i==="en"?"Sign up":"注å":i==="en"?"Log in":"ç»å½"})]}),y.jsxs("p",{style:{marginTop:"40px",marginBottom:"80px",color:"#666",fontSize:"0.8rem"},children:[i==="en"?"By signing in, you agree to our ":"ç»å½å³è¡¨ç¤ºæ¨åææä»¬ç ",y.jsx("span",{style:{color:"#888",textDecoration:"underline",cursor:"pointer"},children:i==="en"?"Privacy Policy":"éç§æ¿ç"})]})]})},BJ=({onNavigateToTab:i})=>{const{lang:e}=Cr(),t=(n,r)=>e==="zh"?r:n;return y.jsxs("div",{style:{backgroundColor:"#0b0b0b",color:"#ffffff",minHeight:"100vh"},children:[y.jsx("section",{style:{borderBottom:"1px solid var(--line-0)",paddingTop:"80px",paddingBottom:"100px",paddingLeft:"60px",paddingRight:"60px",backgroundImage:"url(/Bg.png)",backgroundSize:"cover",backgroundPosition:"center",backdropFilter:"blur(40px)",position:"relative"},children:y.jsxs("div",{style:{position:"relative",zIndex:2,maxWidth:"800px"},children:[y.jsx("div",{style:{fontSize:"clamp(26px, 2.8vw, 42px)",fontWeight:300,lineHeight:"1.2",marginBottom:"16px",letterSpacing:"-0.5px"},children:t("M-Flow Memory Engine","M-Flow è®°å¿å¼æ")}),y.jsx("div",{style:{fontSize:"14px",color:"var(--text-2)",lineHeight:"1.7",maxWidth:"600px",fontWeight:300},children:t("Persistent memory layer for your LLM applications. Extract, memorize, retrieve, and reason over conversational and contextual knowledge with precision.","为æ¨ç LLM åºç¨æä¾æä¹
åå
åå±ã精确æåãè®°å¿ãæ£ç´¢åæ¨ç对è¯åä¸ä¸æç¥è¯ã")})]})}),y.jsxs("section",{style:{borderBottom:"1px solid var(--line-0)",paddingTop:"80px",paddingBottom:"80px",paddingLeft:"60px",paddingRight:"60px"},children:[y.jsx("div",{style:{fontSize:"10px",fontWeight:400,letterSpacing:"0.2em",color:"var(--text-3)",marginBottom:"48px",textTransform:"uppercase"},children:t("Data Pipeline","æ°æ®æµæ°´çº¿")}),y.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"0",maxWidth:"1000px"},children:["Input","Extract","Memorize","Storage","Retrieval","Output"].map((n,r)=>y.jsxs(eP.Fragment,{children:[y.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"12px",flex:1},children:[y.jsx("div",{style:{width:"48px",height:"48px",border:"1px solid var(--line-0)",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(255, 255, 255, 0.02)"},children:y.jsx("span",{style:{fontSize:"18px",fontWeight:300},children:r+1})}),y.jsx("div",{style:{fontSize:"12px",color:"var(--text-2)",fontWeight:300,textAlign:"center"},children:n})]}),r<5&&y.jsx("div",{style:{flex:1,height:"1px",backgroundColor:"var(--line-0)",margin:"0 -12px"}})]},r))})]}),y.jsxs("section",{style:{borderBottom:"1px solid var(--line-0)",paddingTop:"80px",paddingBottom:"80px",paddingLeft:"60px",paddingRight:"60px"},children:[y.jsx("div",{style:{fontSize:"10px",fontWeight:400,letterSpacing:"0.2em",color:"var(--text-3)",marginBottom:"48px",textTransform:"uppercase"},children:t("Conical Architecture","é¥å½¢è®°å¿ç»æ")}),y.jsxs("div",{className:"rsp-grid-2",style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"80px",alignItems:"center",maxWidth:"1200px"},children:[y.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"24px"},children:[{title:"Episode",desc:t("High-level event or conversation","é«çº§å«çäºä»¶æå¯¹è¯")},{title:"Facet",desc:t("Aspect or dimension of an episode","äºä»¶çæä¸ªæ¹é¢æç»´åº¦")},{title:"FacetPoint",desc:t("Discrete knowledge point","离æ£çç¥è¯ç¹")},{title:"Entity",desc:t("Core semantic unit","æ ¸å¿è¯ä¹åä½")}].map((n,r)=>y.jsxs("div",{style:{display:"flex",gap:"16px"},children:[y.jsxs("div",{style:{fontSize:"12px",fontWeight:300,color:"var(--text-3)",minWidth:"20px"},children:[r+1,"."]}),y.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[y.jsx("div",{style:{fontSize:"14px",fontWeight:400,color:"#ffffff"},children:n.title}),y.jsx("div",{style:{fontSize:"13px",fontWeight:300,color:"var(--text-2)",lineHeight:"1.5"},children:n.desc})]})]},r))}),y.jsx("div",{style:{display:"flex",alignItems:"flex-end",justifyContent:"center",height:"300px"},children:y.jsxs("div",{style:{position:"relative",width:"100%",height:"100%"},children:[y.jsx("div",{style:{position:"absolute",bottom:0,left:"50%",transform:"translateX(-50%)",width:"0",height:"0",borderLeft:"100px solid transparent",borderRight:"100px solid transparent",borderBottom:"140px solid rgba(255, 255, 255, 0.08)"}}),y.jsx("div",{style:{position:"absolute",bottom:"140px",left:"50%",transform:"translateX(-50%)",width:"0",height:"0",borderLeft:"70px solid transparent",borderRight:"70px solid transparent",borderBottom:"100px solid rgba(255, 255, 255, 0.12)"}}),y.jsx("div",{style:{position:"absolute",bottom:"240px",left:"50%",transform:"translateX(-50%)",width:"0",height:"0",borderLeft:"40px solid transparent",borderRight:"40px solid transparent",borderBottom:"60px solid rgba(255, 255, 255, 0.16)"}}),y.jsx("div",{style:{position:"absolute",bottom:"300px",left:"50%",transform:"translateX(-50%)",width:"0",height:"0",borderLeft:"15px solid transparent",borderRight:"15px solid transparent",borderBottom:"25px solid rgba(255, 255, 255, 0.2)"}}),y.jsx("div",{style:{position:"absolute",bottom:"305px",left:"50%",transform:"translateX(-50%)",fontSize:"10px",fontWeight:300,color:"var(--text-3)",whiteSpace:"nowrap",marginTop:"8px"},children:"Entity"}),y.jsx("div",{style:{position:"absolute",bottom:"265px",left:"50%",transform:"translateX(-50%)",fontSize:"10px",fontWeight:300,color:"var(--text-3)",whiteSpace:"nowrap"},children:"FacetPoint"}),y.jsx("div",{style:{position:"absolute",bottom:"155px",left:"50%",transform:"translateX(-50%)",fontSize:"10px",fontWeight:300,color:"var(--text-3)",whiteSpace:"nowrap"},children:"Facet"}),y.jsx("div",{style:{position:"absolute",bottom:"10px",left:"50%",transform:"translateX(-50%)",fontSize:"10px",fontWeight:300,color:"var(--text-3)",whiteSpace:"nowrap"},children:"Episode"})]})})]})]}),y.jsxs("section",{style:{borderBottom:"1px solid var(--line-0)",paddingTop:"80px",paddingBottom:"80px",paddingLeft:"60px",paddingRight:"60px"},children:[y.jsx("div",{style:{fontSize:"10px",fontWeight:400,letterSpacing:"0.2em",color:"var(--text-3)",marginBottom:"48px",textTransform:"uppercase"},children:t("Retrieval Paths","æ£ç´¢è·¯å¾")}),y.jsx("div",{className:"rsp-grid-2",style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"60px",maxWidth:"1000px"},children:[{title:t("Episodic Retrieval","äºä»¶åæ£ç´¢"),desc:t("Retrieve memories based on specific events, conversations, or time periods. Perfect for context-aware interactions.","æ ¹æ®ç¹å®äºä»¶ãå¯¹è¯ææ¶é´æ®µæ£ç´¢è®°å¿ãå®ç¾éé
ä¸ä¸ææç¥äº¤äºã")},{title:t("Procedural Retrieval","ç¨åºåæ£ç´¢"),desc:t("Extract learned patterns and procedures. Ideal for skill transfer and behavioral consistency.","æåå¦ä¹ å°ç模å¼åç¨åºãéç¨äºæè½è¿ç§»åè¡ä¸ºä¸è´æ§ã")}].map((n,r)=>y.jsxs("div",{style:{border:"1px solid var(--line-0)",padding:"40px",backgroundColor:"rgba(255, 255, 255, 0.01)"},children:[y.jsx("div",{style:{fontSize:"14px",fontWeight:400,marginBottom:"16
6168px",color:"#ffffff"},children:n.title}),y.jsx("div",{style:{fontSize:"13px",fontWeight:300,color:"var(--text-2)",lineHeight:"1.7"},children:n.desc})]},r))})]}),y.jsxs("section",{style:{borderBottom:"1px solid var(--line-0)",paddingTop:"80px",paddingBottom:"80px",paddingLeft:"60px",paddingRight:"60px"},children:[y.jsx("div",{style:{fontSize:"10px",fontWeight:400,letterSpacing:"0.2em",color:"var(--text-3)",marginBottom:"48px",textTransform:"uppercase"},children:t("Coreference Resolution","æä»£æ¶è§£")}),y.jsxs("div",{style:{maxWidth:"800px"},children:[y.jsx("div",{style:{fontSize:"clamp(18px, 2vw, 26px)",fontWeight:300,marginBottom:"32px",lineHeight:"1.4"},children:t("Resolve pronouns and references","è§£æä»£è¯åæä»£å ³ç³»")}),y.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"20px"},children:[{example:t('"John told Mary that he was late" â correctly identify "he" refers to "John"','"约翰åè¯ç丽ä»è¿å°äº" â æ£ç¡®è¯å«"ä»"æä»£"约翰"')},{example:t("Track entity relationships across multiple turns of conversation","å¨å¤è½®å¯¹è¯ä¸è¿½è¸ªå®ä½å ³ç³»")},{example:t("Maintain semantic consistency in long-context scenarios","å¨é¿ä¸ä¸æåºæ¯ä¸ä¿æè¯ä¹ä¸è´æ§")}].map((n,r)=>y.jsxs("div",{style:{display:"flex",gap:"12px",fontSize:"14px",fontWeight:300,color:"var(--text-2)",lineHeight:"1.6"},children:[y.jsx("span",{style:{color:"var(--text-3)",minWidth:"4px"},children:"â¢"}),y.jsx("span",{children:n.example})]},r))})]})]}),y.jsxs("section",{style:{borderBottom:"1px solid var(--line-0)",paddingTop:"80px",paddingBottom:"80px",paddingLeft:"60px",paddingRight:"60px"},children:[y.jsx("div",{style:{fontSize:"10px",fontWeight:400,letterSpacing:"0.2em",color:"var(--text-3)",marginBottom:"48px",textTransform:"uppercase"},children:t("Supported Infrastructure","æ¯æçåºç¡è®¾æ½")}),y.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(180px, 1fr))",gap:"40px",maxWidth:"1200px"},children:[{category:t("Graph Databases","徿°æ®åº"),items:["Neo4j","TigerGraph"]},{category:t("Vector Databases","åéæ°æ®åº"),items:["Qdrant","Weaviate","Pinecone"]},{category:t("LLM Providers","LLM æä¾å"),items:["OpenAI","Anthropic","Groq"]},{category:t("Embeddings","åµå ¥æ¨¡å"),items:["OpenAI","Nomic","Sentence Transformers"]}].map((n,r)=>y.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[y.jsx("div",{style:{fontSize:"12px",fontWeight:400,color:"var(--text-3)",letterSpacing:"0.1em",textTransform:"uppercase"},children:n.category}),y.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:n.items.map((s,o)=>y.jsx("div",{style:{fontSize:"13px",fontWeight:300,color:"var(--text-2)",paddingBottom:"12px",borderBottom:o===n.items.length-1?"none":"1px solid var(--line-0)"},children:s},o))})]},r))})]}),y.jsx("section",{style:{paddingTop:"80px",paddingBottom:"120px",paddingLeft:"60px",paddingRight:"60px",display:"flex",justifyContent:"center",alignItems:"center"},children:y.jsx("button",{onClick:()=>i==null?void 0:i("contact"),style:{borderRadius:"0",border:"1px solid var(--line-0)",backgroundColor:"transparent",color:"#ffffff",padding:"16px 48px",fontSize:"13px",fontWeight:300,letterSpacing:"0.1em",textTransform:"uppercase",cursor:"pointer",transition:"all 200ms ease",outline:"none"},onMouseEnter:n=>{n.target.style.backgroundColor="rgba(255, 255, 255, 0.05)"},onMouseLeave:n=>{n.target.style.backgroundColor="transparent"},children:t("Start Integrating M-Flow","å¼å§éæ M-Flow")})})]})},DJ=2560,FJ={positionX:1.8,positionY:-2.7,positionZ:-5,rotation:4.9,scaleX:1.33,scaleY:1,baseSize:22.8,opacity:1,blur:.01},NJ={centerX:-4.55,centerY:28.35,innerRadius:34.2,outerRadius:43.56,screenLeft:-18.6,screenRight:19.8,smokeColor:"#F5B642",trailFalloff:3e4,fadeSpeed:1,warpStrength:20,turbulenceSpeed:.1,turbulenceScale:25,scrollSpeed:3e-4,radialFlowSpeed:1.2};function kJ({viewportScale:i}){const{gl:e}=Bi(),[t,n]=X.useState(null),r=X.useRef(null),s=FJ,o=i;if(X.useEffect(()=>(new fl().load("/000.png",u=>{u.colorSpace=Un,u.needsUpdate=!0;const d=u.image,p=d?d.width/d.height:1,m=Math.min((d==null?void 0:d.width)||512,1024),x=Math.min((d==null?void 0:d.height)||512,1024),v=new Gn(m,x,{minFilter:jt,magFilter:jt,format:Ni}),_=new dn({uniforms:{uTexture:{value:u},uOpacity:{value:s.opacity},uBlur:{value:s.blur}},vertexShader:` 6169 varying vec2 vUv; 6170 void main() { 6171 vUv = uv; 6172 gl_Position = vec4(position.xy, 0.0, 1.0); 6173 } 6174 `,fragmentShader:` 6175 uniform sampler2D uTexture; 6176 uniform float uOpacity; 6177 uniform float uBlur; 6178 varying vec2 vUv; 6179 float gaussian(float x, float sigma) { 6180 return exp(-(x * x) / (2.0 * sigma * sigma)); 6181 } 6182 void main() { 6183 vec4 color = vec4(0.0); 6184 float totalWeight = 0.0; 6185 float sigma = 4.0;
6186 for (float x = -6.0; x <= 6.0; x += 1.0) { 6187 for (float y = -6.0; y <= 6.0; y += 1.0) { 6188 vec2 offset = vec2(x, y) * uBlur * 0.15; 6189 vec2 sampleUv = vUv + offset; 6190 if (sampleUv.x >= 0.0 && sampleUv.x <= 1.0 && sampleUv.y >= 0.0 && sampleUv.y <= 1.0) { 6191 float weight = gaussian(length(vec2(x, y)), sigma); 6192 color += texture2D(uTexture, sampleUv) * weight; 6193 totalWeight += weight; 6194 } 6195 } 6196 } 6197 color /= totalWeight; 6198 float fadeRange = 0.08; 6199 float edgeFade = 1.0; 6200 edgeFade *= smoothstep(0.0, fadeRange, vUv.x); 6201 edgeFade *= smoothstep(0.0, fadeRange, 1.0 - vUv.x); 6202 edgeFade *= smoothstep(0.0, fadeRange, vUv.y); 6203 edgeFade *= smoothstep(0.0, fadeRange, 1.0 - vUv.y); 6204 color.a *= uOpacity * edgeFade; 6205 gl_FragColor = color; 6206 } 6207 `}),g=new or(-1,1,1,-1,0,1),S=new Ec,b=new ks(2,2),A=new Kt(b,_);S.add(A),e.setRenderTarget(v),e.render(S,g),e.setRenderTarget(null),r.current=v,n({texture:v.texture,aspect:p}),_.dispose(),b.dispose(),u.dispose()}),()=>{var u;(u=r.current)==null||u.dispose()}),[e]),!t)return null;const a=s.baseSize*s.scaleY*o,l=s.baseSize*t.aspect*s.scaleX*o;return y.jsxs("mesh",{position:[s.positionX*o,s.positionY*o,s.positionZ],rotation:[0,0,Math.PI*s.rotation/180],children:[y.jsx("planeGeometry",{args:[l,a]}),y.jsx("meshBasicMaterial",{map:t.texture,transparent:!0,depthWrite:!1})]})}function OJ(){const{size:i}=Bi(),e=NJ,t=20,n=60*Math.PI/180,r=2*t*Math.tan(n/2),s=r*(i.width/i.height)/2,o=DJ/1440,a=r*o/2,l=Math.min(s/a,1),c=Math.max(e.screenLeft,-s),u=Math.min(e.screenRight,s);return y.jsxs(y.Fragment,{children:[y.jsx(kJ,{viewportScale:l}),y.jsx(QF,{smokeColor:e.smokeColor,centerX:e.centerX*l,centerY:e.centerY*l,innerRadius:e.innerRadius*l,outerRadius:e.outerRadius*l,screenLeft:c,screenRight:u,trailFalloff:e.trailFalloff,fadeSpeed:e.fadeSpeed,warpStrength:e.warpStrength,turbulenceSpeed:e.turbulenceSpeed,turbulenceScale:e.turbulenceScale,scrollSpeed:e.scrollSpeed,scale:1,radialFlowSpeed:e.radialFlowSpeed,fadeScale:l})]})}function UJ(){const{gl:i,size:e}=Bi();return X.useEffect(()=>{var r;const t=i.domElement,n=(r=t.parentElement)==null?void 0:r.parentElement;if(n){const s=n.getBoundingClientRect();s.width>0&&s.height>0&&t.width!==Math.floor(s.width)&&i.setSize(s.width,s.height)}},[i,e]),null}function zJ(){const{gl:i,scene:e,camera:t}=Bi();return X.useEffect(()=>{const n=setInterval(()=>{document.hidden&&i.render(e,t)},100);return()=>clearInterval(n)},[i,e,t]),null}const HJ=({onNavigateToTab:i})=>{const{lang:e}=Cr(),[t,n]=X.useState(null),[r,s]=X.useState(null),[o,a]=X.useState(null),[l,c]=X.useState(!1),[u,d]=X.useState(!1);X.useEffect(()=>{const g=setTimeout(()=>d(!0),600);return()=>{clearTimeout(g),d(!1)}},[]),X.useEffect(()=>{if(!u)return;const g=setTimeout(()=>c(!0),200);return()=>clearTimeout(g)},[u]);const p=(g,S)=>e==="zh"?S:g,m=g=>y.jsx("div",{style:{fontSize:"10px",letterSpacing:"3px",textTransform:"uppercase",color:"rgba(255,255,255,0.3)",marginBottom:"48px",fontWeight:400},children:g}),x=[{number:"01",title:p("Topic Tracking","è¯é¢è¿½è¸ª"),desc:p("Identify and track topic shifts across conversation turns. Maintain hierarchical topic structure and detect implicit theme continuity across sessions.","è¯å«å¹¶è¿½è¸ªå¯¹è¯ä¸çè¯é¢è½¬åãç»´æ¤å±çº§è¯é¢ç»æï¼å¨è·¨ä¼è¯åºæ¯ä¸æ£æµéå«ç主é¢è¿ç»æ§ã"),metric:p("Hierarchical tracking","å±çº§è¿½è¸ª")},{number:"02",title:p("Beat Control","èææ§å¶"),desc:p("Understand conversational rhythm and pacing. Recognize turn-taking patterns, silence gaps, interruptions, and discourse markers for natural flow.","ç解对è¯çèå¥ä¸æ¥è°ãè¯å«è½®æµåè¨æ¨¡å¼ãæ²é»é´éãæè¯åè¯è¯æ è®°ï¼å®ç°èªç¶æµç ã"),metric:p("Real-time rhythm","宿¶èå¥åæ")},{number:"03",title:p("Relationship Dynamics","å ³ç³»å¨æ"),desc:p("Analyze power dynamics, familiarity levels, sentiment trajectory, and interpersonal bonds. Track how relationships evolve through ongoing dialogue.","åææå卿ãçæåº¦ãæ æè½¨è¿¹å人é å ³ç³»ãè¿½è¸ªå ³ç³»å¦ä½å¨æç»å¯¹è¯ä¸æ¼ååå±ã"),metric:p("Continuous tracking","æç»è¿½è¸ª")},{number:"04",title:p("Speech Acts","è¨è¯è¡ä¸º"),desc:p("Classify utterances as requests, assertions, questions, or promises. Extract illocutionary force and perlocutionary effects for deep understanding.","å°è¯è¯å类为请æ±ãéè¿°ãé®é¢ææ¿è¯ºãæåè¨å¤ä¹åä¸è¨åææï¼å®ç°æ·±åº¦çè§£ã"),metric:p("Deep understanding","深度çè§£")}],v=[{step:"01",title:p("Raw Dialogue","åå§å¯¹è¯"),desc:p("Multi-party conversation input via API stream or batch upload","éè¿APIæµå¼ææ¹éä¸ä¼ ç夿¹å¯¹è¯è¾å ¥")},{step:"02",title:p("Semantic Parse","è¯ä¹è§£æ"),desc:p("Deep linguistic analysis with contextual disambiguation","ç»åä¸ä¸ææ¶æ§çæ·±å±è¯è¨åæ")},{step:"03",title:p("Feature Extraction","ç¹å¾æå"),desc:p("Multi-dimensional feature vectors: topic, sentiment, intent","å¤ç»´ç¹å¾åéï¼è¯é¢ãæ æãæå¾")},{step:"04",title:p("Structured Output","ç»æåè¾åº"),desc:p("Actionable JSON output with confidence scores and traces","å¸¦ç½®ä¿¡åº¦åæ°ä¸è¿½è¸ªé¾ç坿ä½JSONè¾åº")}],_=[{title:p("HTTP / REST API","HTTP / REST API"),desc:p("Standard RESTful endpoints with OpenAPI spec. Add dialogue analysis to any stack in minutes.","æ åRESTful端ç¹ï¼é å¤OpenAPIè§èãæ°åéå ä¸ºä»»ä½ææ¯æ æ·»å 对è¯åæã"),icon:y.jsx("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",children:y.jsx("path",{d:"M4 8h20M4 14h20M4 20h12",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round"})})},{title:p("Streaming Analysis","æµå¼åæ"),desc:p("Real-time WebSocket streams for live conversations. Low-latency per turn analysis.","ä¸ºå®æ¶å¯¹è¯æä¾WebSocketæµå¼ä¼ è¾ãä½å»¶è¿éè½®åæã"),icon:y.jsx("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",children:y.jsx("path",{d:"M4 14c3-6 6-6 10 0s7 6 10 0",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round"})})},{title:p("Batch Processing","æ¹éå¤ç"),desc:p("Process conversation archives at scale. Parallel pipeline for efficient batch analysis.","å¤§è§æ¨¡å¤çå¯¹è¯æ¡£æ¡ãå¹¶è¡æµæ°´çº¿å®ç°é«ææ¹éåæã"),icon:y.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",children:[y.jsx("rect",{x:"4",y:"4",width:"8",he
6207ight:"8",rx:"1",stroke:"currentColor",strokeWidth:"1"}),y.jsx("rect",{x:"16",y:"4",width:"8",height:"8",rx:"1",stroke:"currentColor",strokeWidth:"1"}),y.jsx("rect",{x:"4",y:"16",width:"8",height:"8",rx:"1",stroke:"currentColor",strokeWidth:"1"}),y.jsx("rect",{x:"16",y:"16",width:"8",height:"8",rx:"1",stroke:"currentColor",strokeWidth:"1"})]})},{title:p("Multi-language","å¤è¯è¨æ¯æ"),desc:p("Language-agnostic engine with unified output schema across multiple languages.","è¯è¨æ å ³å¼æï¼è·¨å¤è¯è¨ç»ä¸è¾åºæ ¼å¼ã"),icon:y.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",children:[y.jsx("circle",{cx:"14",cy:"14",r:"10",stroke:"currentColor",strokeWidth:"1"}),y.jsx("ellipse",{cx:"14",cy:"14",rx:"5",ry:"10",stroke:"currentColor",strokeWidth:"1"}),y.jsx("path",{d:"M4 14h20",stroke:"currentColor",strokeWidth:"1"})]})}];return y.jsxs("div",{style:{background:"#0b0b0b",color:"#e8e6f0",minHeight:"100vh",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',fontWeight:300},children:[y.jsxs("section",{style:{position:"relative",minHeight:"100vh",display:"flex",alignItems:"center",overflow:"hidden"},children:[y.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,height:"107vh",zIndex:0,overflow:"hidden",background:"#000"},children:[u&&y.jsx("div",{className:"dialogue-hero-canvas",style:{position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",opacity:l?1:0,transition:"opacity 0.8s ease-out"},children:y.jsxs(Nm,{camera:{position:[0,0,20],fov:60},style:{background:"transparent"},gl:{alpha:!0,antialias:!0},frameloop:"always",children:[y.jsx(UJ,{}),y.jsx(zJ,{}),y.jsx(OJ,{})]})}),y.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,height:"200px",background:"linear-gradient(180deg, rgba(0,0,0,0.6) 0%, transparent 100%)",pointerEvents:"none"}})]}),y.jsxs("div",{style:{position:"relative",zIndex:2,maxWidth:"900px",padding:"0 clamp(20px, 6vw, 80px)",marginTop:"10vh"},children:[y.jsx("div",{style:{fontSize:"11px",letterSpacing:"4px",textTransform:"uppercase",color:"rgba(240,181,107,0.55)",marginBottom:"40px",fontWeight:400},children:p("Metacognition Engine","å 认ç¥å¼æ")}),y.jsx("h1",{style:{fontSize:"clamp(44px, 7vw, 76px)",fontWeight:200,lineHeight:1.05,marginBottom:"32px",letterSpacing:"-2px",background:"linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(240,210,170,0.7) 100%)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:p(`Understand Every 6208Conversation`,`çè§£æ¯ä¸æ¬¡ 6209对è¯çæ·±å±å«ä¹`)}),y.jsx("p",{style:{fontSize:"18px",fontWeight:300,color:"rgba(200,195,185,0.55)",maxWidth:"580px",lineHeight:1.7,marginBottom:"48px",whiteSpace:"pre-line"},children:p(`Deep semantic and pragmatic analysis of multi-party conversations. 6210Extract topics, dynamics, intent, and structured output from raw dialogue in real-time.`,`坹夿¹å¯¹è¯è¿è¡æ·±å±è¯ä¹åè¯ç¨åæã 6211ä»åå§å¯¹è¯ä¸å®æ¶æåè¯é¢ã卿ãæå¾ï¼çæç»æåè¾åºã`)})]}),y.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,height:"200px",background:"linear-gradient(to top, #0b0b0b, transparent)",pointerEvents:"none"}})]}),y.jsx("section",{style:{padding:"120px 40px"},children:y.jsxs("div",{style:{maxWidth:"1200px",margin:"0 auto"},children:[m(p("Core Capabilities","æ ¸å¿è½å")),y.jsx("h2",{style:{fontSize:"clamp(32px, 5vw, 52px)",fontWeight:200,lineHeight:1.15,marginBottom:"80px",maxWidth:"700px",letterSpacing:"-1px"},children:p(`Four dimensions of 6212conversation intelligence`,`å¯¹è¯æºè½ç 6213å个维度`)}),y.jsx("div",{style:{display:"flex",flexDirection:"column"},children:x.map((g,S)=>y.jsxs("div",{onMouseEnter:()=>n(S),onMouseLeave:()=>n(null),style:{display:"grid",gridTemplateColumns:"80px 1fr auto",gap:"40px",alignItems:"start",padding:"48px 0",borderTop:"1px solid rgba(255,255,255,0.06)",cursor:"default",transition:"all 0.4s ease",opacity:t!==null&&t!==S?.4:1},children:[y.jsx("div",{style:{fontSize:"14px",color:"rgba(255,255,255,0.2)",fontWeight:400,paddingTop:"4px"},children:g.number}),y.jsxs("div",{children:[y.jsx("h3",{style:{fontSize:"24px",fontWeight:300,marginBottom:"16
6213px",letterSpacing:"-0.5px",transition:"color 0.3s",color:t===S?"rgba(255,255,255,0.95)":"rgba(255,255,255,0.75)"},children:g.title}),y.jsx("p",{style:{fontSize:"14px",fontWeight:300,color:"rgba(255,255,255,0.35)",lineHeight:1.7,maxWidth:"560px"},children:g.desc})]}),y.jsx("div",{style:{fontSize:"13px",color:"rgba(240,181,107,0.5)",fontWeight:400,letterSpacing:"0.5px",whiteSpace:"nowrap",paddingTop:"6px"},children:g.metric})]},S))})]})}),y.jsxs("section",{style:{padding:"120px 40px",borderTop:"1px solid rgba(255,255,255,0.06)",position:"relative",overflow:"hidden"},children:[y.jsx("div",{style:{position:"absolute",width:"600px",height:"600px",borderRadius:"50%",background:"radial-gradient(circle, rgba(240,181,107,0.03) 0%, transparent 70%)",top:"20%",right:"-200px",pointerEvents:"none"}}),y.jsxs("div",{style:{maxWidth:"1200px",margin:"0 auto",position:"relative"},children:[m(p("Processing Pipeline","å¤çæµæ°´çº¿")),y.jsx("h2",{style:{fontSize:"clamp(32px, 5vw, 48px)",fontWeight:200,lineHeight:1.15,marginBottom:"80px",maxWidth:"600px",letterSpacing:"-1px"},children:p(`From raw dialogue 6214to structured output`,`ä»åå§å¯¹è¯ 6215å°ç»æåè¾åº`)}),y.jsx("div",{className:"rsp-grid-4",style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"1px",background:"rgba(255,255,255,0.04)"},children:v.map((g,S)=>y.jsxs("div",{onMouseEnter:()=>s(S),onMouseLeave:()=>s(null),style:{background:r===S?"rgba(255,255,255,0.03)":"#0b0b0b",padding:"48px 32px",transition:"all 0.4s ease",position:"relative"},children:[y.jsx("div",{style:{fontSize:"32px",fontWeight:200,color:r===S?"rgba(240,181,107,0.5)":"rgba(255,255,255,0.08)",marginBottom:"24px",transition:"color 0.3s"},children:g.step}),y.jsx("h4",{style:{fontSize:"16px",fontWeight:400,color:"rgba(255,255,255,0.8)",marginBottom:"12px",letterSpacing:"-0.3px"},children:g.title}),y.jsx("p",{style:{fontSize:"13px",fontWeight:300,color:"rgba(255,255,255,0.3)",lineHeight:1.65},children:g.desc}),S<3&&y.jsx("div",{style:{position:"absolute",right:"-8px",top:"50%",transform:"translateY(-50%)",color:"rgba(240,181,107,0.25)",zIndex:2,fontSize:"16px"},children:"â"})]},S))})]})]}),y.jsx("section",{style:{padding:"120px 40px",borderTop:"1px solid rgba(255,255,255,0.06)"},children:y.jsxs("div",{style:{maxWidth:"1200px",margin:"0 auto"},children:[m(p("Integration","éææ¹å¼")),y.jsxs("div",{className:"rsp-grid-2",style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"80px",alignItems:"start"},children:[y.jsxs("div",{children:[y.jsx("h2",{style:{fontSize:"clamp(28px, 4vw, 40px)",fontWeight:200,lineHeight:1.2,marginBottom:"56px",letterSpacing:"-0.5px"},children:p(`Add dialogue analysis to 6216your pipeline in minutes`,`æ°åéå å°å¯¹è¯åæ 6217æ·»å å°æ¨ç管é`)}),y.jsx("div",{className:"rsp-grid-2",style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"32px"},children:_.map((g,S)=>y.jsxs("div",{onMouseEnter:()=>a(S),onMouseLeave:()=>a(null),style:{padding:"24px 0",transition:"opacity 0.3s",opacity:o!==null&&o!==S?.4:1},children:[y.jsx("div",{style:{color:o===S?"rgba(240,181,107,0.6)":"rgba(255,255,255,0.2)",marginBottom:"16px",transition:"color 0.3s"},children:g.icon}),y.jsx("h4",{style:{fontSize:"14px",fontWeight:400,color:"rgba(255,255,255,0.8)",marginBottom:"8px"},children:g.title}),y.jsx("p",{style:{fontSize:"13px",fontWeight:300,color:"rgba(255,255,255,0.3)",lineHeight:1.6},children:g.desc})]},S))})]}),y.jsxs("div",{style:{border:"1px solid rgba(255,255,255,0.06)",backgroundColor:"rgba(255,255,255,0.015)",padding:"36px",position:"sticky",top:"120px"},children:[y.jsx("div",{style:{fontSize:"10px",letterSpacing:"2px",textTransform:"uppercase",color:"rgba(240,181,107,0.4)",marginBottom:"20px"},children:"API Example"}),y.jsx("pre",{style:{fontSize:"12px",fontFamily:'"SF Mono", "Fira Code", monospace',fontWeight:300,color:"rgba(255,255,255,0.45)",lineHeight:1.8,whiteSpace:"pre-wrap",wordBreak:"break-all",margin:0},children:`POST /api/dialogue-analysis 6218Content-Type: application/json 6219 6220{ 6221 "dialogue": [ 6222 { 6223 "speaker": "user", 6224 "text": "Can you help me..." 6225 }, 6226 { 6227 "speaker": "assistant", 6228 "text": "Of course, I can..." 6229 } 6230 ], 6231 "features": [ 6232 "topic_tracking", 6233 "speech_acts", 6234 "relationship_dynamics" 6235 ] 6236} 6237 6238// Response 6239{ 6240 "topics": [...], 6241 "speech_acts": [...], 6242 "dynamics": {...}, 6243 "confidence": 0.94 6244}`})]})]})]})}),y.jsxs("section",{style:{padding:"160px 40px",position:"relative",overflow:"hidden",borderTop:"1px solid rgba(255,255,255,0.06)"},children:[y.jsx("div",{style:{position:"absolute",width:"500px",height:"500px",borderRadius:"50%",background:"radial-gradient(circle, rgba(240,181,107,0.04) 0%, transparent 70%)",top:"50%",left:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"}}),y.jsxs("div",{style:{maxWidth:"800px",margin:"0 auto",textAlign:"center",position:"relative"},children:[y.jsx("h2",{style:{fontSize:"clamp(36px, 6vw, 56px)",fontWeight:200,lineHeight:1.1,marginBottom:"24px",letterSpacing:"-1px"},children:p(`Ready to decode 6245every conversation?`,`åå¤å¥½è§£ç 6246æ¯ä¸åºå¯¹è¯äºåï¼`)}),y.jsx("p",{style:{fontSize:"16px",color:"rgba(255,255,255,0.3)",marginBottom:"48px",lineHeight:1.6},children:p("Start with our free tier â 1,000 analyses per month. Scale seamlessly as your needs grow.","ä»å è´¹çå¼å§ â æ¯æ1,000次åæãééæ±å¢é¿æ ç¼æ©å±ã")}),y.jsx("span",{style:{background:"rgba(255,255,255,0.9)",color:"#0b0b0b",border:"none",padding:"16px 48px",fontSize:"14px",fontWeight:500,letterSpacing:"0.5px",display:"inline-flex",alignItems:"center",gap:"10px",o
6246pacity:.7},children:p("Coming Soon","å³å°æ¨åº")})]})]})]})},GJ=()=>{const i=X.useRef(null);return X.useEffect(()=>{const e=i.current;if(!e)return;const t=e.getContext("2d");if(!t)return;let n,r=0,s=0,o=1,a=[];const l=5;let c=[];const u=()=>{o=Math.min(window.devicePixelRatio||1,2),r=e.offsetWidth*o,s=e.offsetHeight*o,e.width=r,e.height=s,a=[];const m=Math.min(80,Math.floor(r*s/4e4));for(let x=0;x<m;x++)a.push({x:Math.random()*r,y:Math.random()*s,r:Math.random()*1+.3,baseAlpha:Math.random()*.5+.15,phase:Math.random()*Math.PI*2,twinkleSpeed:Math.random()*8e-4+3e-4});c=[];for(let x=0;x<=l;x++){const v=x/l,_=v*r*1.3-r*.15,g=s*.7-v*s*.4+Math.sin(v*Math.PI)*s*.18;c.push({baseX:_,baseY:g})}};let d=performance.now();const p=m=>{const x=(m-d)/1e3;t.clearRect(0,0,r,s);const v=t.createRadialGradient(r*.55,s*.45,0,r*.55,s*.45,r*.8);v.addColorStop(0,"#0a0e1a"),v.addColorStop(.5,"#060a14"),v.addColorStop(1,"#020408"),t.fillStyle=v,t.fillRect(0,0,r,s);for(const R of a){const E=.5+.5*Math.sin(x*R.twinkleSpeed*1e3+R.phase),L=R.baseAlpha*(.3+.7*E);t.beginPath(),t.arc(R.x,R.y,R.r*o,0,Math.PI*2),t.fillStyle=`rgba(200, 210, 230, ${L})`,t.fill()}const _=1+.08*Math.sin(x*(2*Math.PI/7)),g=Math.sin(x*(2*Math.PI/25))*r*.015,S=Math.cos(x*(2*Math.PI/30))*s*.008,b=[{width:120*o,alpha:.015*_},{width:70*o,alpha:.03*_},{width:40*o,alpha:.06*_},{width:18*o,alpha:.12*_},{width:8*o,alpha:.25*_},{width:3*o,alpha:.55*_},{width:1.2*o,alpha:.8*_}];for(const R of b){t.save(),t.lineWidth=R.width,t.lineCap="round",t.lineJoin="round";const E=t.createLinearGradient(c[0].baseX+g,c[0].baseY+S,c[l].baseX+g,c[l].baseY+S),L=140,N=180,k=240;E.addColorStop(0,`rgba(${L}, ${N}, ${k}, 0)`),E.addColorStop(.15,`rgba(${L}, ${N}, ${k}, ${R.alpha*.4})`),E.addColorStop(.35,`rgba(${L}, ${N}, ${k}, ${R.alpha*.85})`),E.addColorStop(.5,`rgba(190, 210, 255, ${R.alpha})`),E.addColorStop(.65,`rgba(${L}, ${N}, ${k}, ${R.alpha*.85})`),E.addColorStop(.85,`rgba(${L}, ${N}, ${k}, ${R.alpha*.4})`),E.addColorStop(1,`rgba(${L}, ${N}, ${k}, 0)`),t.strokeStyle=E,t.beginPath();const Y=c[0];t.moveTo(Y.baseX+g,Y.baseY+S);for(let W=1;W<c.length-1;W++){const V=c[W],G=c[W+1],Z=V.baseX+g,O=V.baseY+S,ee=(V.baseX+G.baseX)/2+g,le=(V.baseY+G.baseY)/2+S;t.quadraticCurveTo(Z,O,ee,le)}const z=c[c.length-1];t.lineTo(z.baseX+g,z.baseY+S),t.stroke(),t.restore()}const A=.025*_;t.save(),t.lineWidth=50*o,t.lineCap="round";const w=t.createLinearGradient(c[0].baseX+g,0,c[l].baseX+g,0);w.addColorStop(0,"rgba(80, 120, 180, 0)"),w.addColorStop(.3,`rgba(80, 120, 180, ${A})`),w.addColorStop(.7,`rgba(80, 120, 180, ${A})`),w.addColorStop(1,"rgba(80, 120, 180, 0)"),t.strokeStyle=w,t.beginPath();const C=c[0];t.moveTo(C.baseX+g*.6,C.baseY+S+s*.03);for(let R=1;R<c.length-1;R++){const E=c[R],L=c[R+1],N=E.baseX+g*.6,k=E.baseY+S+s*.03,Y=(E.baseX+L.baseX)/2+g*.6,z=(E.baseY+L.baseY)/2+S+s*.03;t.quadraticCurveTo(N,k,Y,z)}const P=c[c.length-1];t.lineTo(P.baseX+g*.6,P.baseY+S+s*.03),t.stroke(),t.restore();const B=t.createRadialGradient(r*.5,s*.5,r*.2,r*.5,s*.5,r*.75);B.addColorStop(0,"rgba(0,0,0,0)"),B.addColorStop(1,"rgba(0,0,0,0.4)"),t.fillStyle=B,t.fillRect(0,0,r,s),n=requestAnimationFrame(p)};return u(),n=requestAnimationFrame(p),window.addEventListener("resize",u),()=>{cancelAnimationFrame(n),window.removeEventListener("resize",u)}},[]),y.jsx("canvas",{ref:i,style:{position:"absolute",inset:0,width:"100%",height:"100%",pointerEvents:"none"}})};function jJ({type:i,hovered:e}){const t=X.useRef(null),n=X.useRef(0),r=X.useRef([]);if(r.current.length===0)for(let a=0;a<60;a++)r.current.push(Math.random());const s=r.current,o=X.useCallback((a,l,c,u,d)=>{a.clearRect(0,0,l,c);const p=l*.5,m=c*.5;if(i==="deploy"){a.setLineDash([4,3]),a.strokeStyle=`rgba(160,200,255,${.12*d})`,a.lineWidth=.8,a.strokeRect(l*.15,c*.12,l*.7,c*.76),a.setLineDash([]);for(let x=0;x<3;x++){const v=l*(.22+x*.22),_=c*.25,g=l*.14,S=c*.5;a.fillStyle=`rgba(160,200,255,${.04*d})`,a.fillRect(v,_,g,S),a.strokeStyle=`rgba(160,200,255,${.1*d})`,a.lineWidth=.5,a.strokeRect(v,_,g,S);for(let b=0;b<4;b++){const A=_+S*(.15+b*.22),w=.6+.4*Math.sin(u*1.5+x*2+b*1.3);a.beginPath(),a.arc(v+g*.25,A,1.5,0,Math.PI*2),a.fillStyle=`rgba(100,220,160,${.3*d*w})`,a.fill(),a.beginPath(),a.moveTo(v+g*.4,A),a.lineTo(v+g*(.5+s[x*4+b]*.4),A),a.strokeStyle=`rgba(160,200,255,${.06*d})`,a.lineWidth=1,a.stroke()}}for(let x=0;x<8;x++){const v=(s[x+30]+u*.08)%1,_=l*.22+l*.56*v,g=c*(.35+s[x+40]*.3)+Math.sin(u*.8+x*2)*3;a.beginPath(),a.arc(_,g,1,0,Math.PI*2),a.fillStyle=`rgba(160,200,255,${.3*d*Math.sin(v*Math.PI)})`,a.fill()}}else if(i==="encrypt"){const x=l*.08,v=m-4;a.fillStyle=`rgba(255,200,120,${.06*d})`,a.fillRect(x,v,l*.16,8),a.strokeStyle=`rgba(255,200,120,${.12*d})`,a.lineWidth=.5,a.strokeRect(x,v,l*.16,8),a.beginPath(),a.arc(x+6,v+4,3,0,Math.PI*2),a.strokeStyle=`rgba(255,200,120,${.2*d})`,a.lineWidth=.8,a.stroke(),a.beginPath(),a.moveTo(x+8.5,v+6.5),a.lineTo(x+11,v+9),a.stroke();const _=l*.78,g=m;a.beginPath(),a.arc(_,g,10,0,Math.PI*2);const S=a.createRadialGradient(_,g,0,_,g,10);S.addColorStop(0,`rgba(100,220,160,${.12*d})`),S.addColorStop(1,`rgba(100,220,160,${.02*d})`),a.fillStyle=S,a.fill(),a.beginPath(),a.arc(_,g,10,0,Math.PI*2),a.strokeStyle=`rgba(100,220,160,${.15*d})`,a.lineWidth=.6,a.stroke(),a.beginPath(),a.arc(_,g,5,0,Math.PI*2),a.strokeStyle=`rgba(100,220,160,${.1*d})`,a.lineWidth=.4,a.stroke(),a.beginPath(),a.arc(_,g,1.5,0,Math.PI*2),a.fillStyle=`rgba(100,220,160,${.25*d})`,a.fill();
6246const b=[{y:m-c*.25,color:"120,200,255",label:"Vec"},{y:m,color:"200,160,255",label:"Graph"},{y:m+c*.25,color:"255,180,100",label:"Time"}];for(let A=0;A<3;A++){const w=b[A],C=p;a.beginPath(),a.moveTo(x+l*.16,v+4),a.quadraticCurveTo(l*.35,w.y,C,w.y),a.strokeStyle=`rgba(${w.color},${.06*d})`,a.lineWidth=.5,a.stroke(),a.beginPath(),a.moveTo(C,w.y),a.quadraticCurveTo(l*.65,w.y,_-10,g),a.strokeStyle=`rgba(${w.color},${.06*d})`,a.stroke(),a.beginPath(),a.arc(C,w.y,4,0,Math.PI*2),a.fillStyle=`rgba(${w.color},${.05*d})`,a.fill(),a.strokeStyle=`rgba(${w.color},${.1*d})`,a.lineWidth=.5,a.stroke(),a.fillStyle=`rgba(${w.color},${.15*d})`,a.font="5px monospace",a.textAlign="center",a.textBaseline="middle",a.fillText(w.label,C,w.y);for(let P=0;P<3;P++){const B=(s[A*3+P+10]+u*.08)%1;let R,E;if(B<.5){const L=B/.5;R=x+l*.16+(C-x-l*.16)*L,E=v+4+(w.y-v-4)*L}else{const L=(B-.5)/.5;R=C+(_-10-C)*L,E=w.y+(g-w.y)*L}a.beginPath(),a.arc(R,E,1,0,Math.PI*2),a.fillStyle=`rgba(${w.color},${.3*d*Math.sin(B*Math.PI)})`,a.fill()}}}else if(i==="scale"){const x=[{label:"Graph",color:"200,160,255",row:0,col:0},{label:"Vector",color:"120,200,255",row:0,col:1},{label:"LLM",color:"100,220,160",row:1,col:0},{label:"Embed",color:"255,200,120",row:1,col:1}],v=l*.28,_=c*.28,g=l*.06,S=c*.06,b=p-(v+g/2),A=m-(_+S/2);a.strokeStyle=`rgba(160,200,255,${.06*d})`,a.lineWidth=.6,a.setLineDash([3,3]),a.beginPath(),a.moveTo(p,A-8),a.lineTo(p,A+_*2+S+8),a.stroke(),a.beginPath(),a.moveTo(b-8,m),a.lineTo(b+v*2+g+8,m),a.stroke(),a.setLineDash([]);for(let w=0;w<x.length;w++){const C=x[w],P=b+C.col*(v+g),B=A+C.row*(_+S),R=.7+.3*Math.sin(u*.8+w*1.8);a.fillStyle=`rgba(${C.color},${.03*d*R})`,a.fillRect(P,B,v,_),a.strokeStyle=`rgba(${C.color},${.1*d*R})`,a.lineWidth=.6,a.strokeRect(P,B,v,_);const E=4;C.col===0?(a.fillStyle=`rgba(${C.color},${.12*d})`,a.fillRect(P+v-1,B+_*.5-E,3,E*2)):(a.fillStyle=`rgba(${C.color},${.12*d})`,a.fillRect(P-2,B+_*.5-E,3,E*2)),C.row===0?(a.fillStyle=`rgba(${C.color},${.12*d})`,a.fillRect(P+v*.5-E,B+_-1,E*2,3)):(a.fillStyle=`rgba(${C.color},${.12*d})`,a.fillRect(P+v*.5-E,B-2,E*2,3)),a.fillStyle=`rgba(${C.color},${.18*d*R})`,a.font="7px monospace",a.textAlign="center",a.textBaseline="middle",a.fillText(C.label,P+v*.5,B+_*.5);const L=P+v*.5,N=B+_*.78,k=3;a.beginPath(),a.arc(L,N,k,-Math.PI*.3,Math.PI*.8),a.strokeStyle=`rgba(${C.color},${.1*d})`,a.lineWidth=.5,a.stroke();const Y=Math.PI*.8;a.beginPath(),a.moveTo(L+Math.cos(Y)*k,N+Math.sin(Y)*k),a.lineTo(L+Math.cos(Y)*k+2,N+Math.sin(Y)*k-1),a.stroke()}for(let w=0;w<8;w++){const C=(s[w+20]+u*.06)%1,P=w<4;let B,R;P?(B=p+(s[w]-.5)*4,R=A-8+C*(_*2+S+16)):(B=b-8+C*(v*2+g+16),R=m+(s[w+4]-.5)*4),a.beginPath(),a.arc(B,R,.8,0,Math.PI*2),a.fillStyle=`rgba(160,200,255,${.25*d*Math.sin(C*Math.PI)})`,a.fill()}}else if(i==="tenant"){const x=[{text:'"..he.."',y:c*.2,color:"255,200,120"},{text:'"..that.."',y:c*.5,color:"200,160,255"},{text:'"..it.."',y:c*.8,color:"120,200,255"}],v=[{text:"Person",y:c*.2,color:"255,200,120"},{text:"Project",y:c*.5,color:"200,160,255"},{text:"Object",y:c*.8,color:"120,200,255"}];for(let _=0;_<3;_++){const g=x[_],S=v[_],b=l*.08;a.fillStyle=`rgba(${g.color},${.03*d})`;const A=l*.22,w=c*.16;a.beginPath(),a.moveTo(b+4,g.y-w/2),a.lineTo(b+A-4,g.y-w/2),a.quadraticCurveTo(b+A,g.y-w/2,b+A,g.y-w/2+4),a.lineTo(b+A,g.y+w/2-4),a.quadraticCurveTo(b+A,g.y+w/2,b+A-4,g.y+w/2),a.lineTo(b+4,g.y+w/2),a.quadraticCurveTo(b,g.y+w/2,b,g.y+w/2-4),a.lineTo(b,g.y-w/2+4),a.quadraticCurveTo(b,g.y-w/2,b+4,g.y-w/2),a.fill(),a.strokeStyle=`rgba(${g.color},${.08*d})`,a.lineWidth=.5,a.stroke(),a.fillStyle=`rgba(${g.color},${.18*d})`,a.font="7px monospace",a.textAlign="center",a.textBaseline="middle",a.fillText(g.text,b+A*.5,g.y);const C=l*.7,P=l*.22,B=c*.16;a.fillStyle=`rgba(${S.color},${.04*d})`,a.fillRect(C,S.y-B/2,P,B),a.strokeStyle=`rgba(${S.color},${.1*d})`,a.lineWidth=.6,a.strokeRect(C,S.y-B/2,P,B),a.beginPath(),a.arc(C+8,S.y,3,0,Math.PI*2),a.fillStyle=`rgba(${S.color},${.15*d})`,a.fill(),a.fillStyle=`rgba(${S.color},${.18*d})`,a.font="7px monospace",a.textAlign="center",a.textBaseline="middle",a.fillText(S.text,C+P*.55,S.y),a.setLineDash([2,2]),a.beginPath(),a.moveTo(b+A,g.y),a.bezierCurveTo(p-10,g.y-8,p+10,S.y+8,C,S.y),a.strokeStyle=`rgba(${g.color},${.1*d})`,a.lineWidth=.7,a.stroke(),a.setLineDash([]),a.beginPath(),a.moveTo(C,S.y),a.lineTo(C-4,S.y-2.5),a.moveTo(C,S.y),a.lineTo(C-4,S.y+2.5),a.strokeStyle=`rgba(${g.color},${.12*d})`,a.lineWidth=.6,a.stroke();const R=(s[_*3+30]+u*.07)%1,E=R,L=1-E,N=L*L*L*(b+A)+3*L*L*E*(p-10)+3*L*E*E*(p+10)+E*E*E*C,k=L*L*L*g.y+3*L*L*E*(g.y-8)+3*L*E*E*(S.y+8)+E*E*E*S.y;a.beginPath(),a.arc(N,k,1.5,0,Math.PI*2),a.fillStyle=`rgba(${g.color},${.35*d*Math.sin(R*Math.PI)})`,a.fill()}}else if(i==="model"){const v=a.createRadialGradient(p,m,0,p,m,20);v.addColorStop(0,`rgba(160,200,255,${.1*d})`),v.addColorStop(1,"rgba(160,200,255,0)"),a.beginPath(),a.arc(p,m,20,0,Math.PI*2),a.fillStyle=v,a.fill(),a.beginPath(),a.arc(p,m,12,0,Math.PI*2),a.strokeStyle=`rgba(160,200,255,${.12*d})`,a.lineWidth=.8,a.stroke(),a.fillStyle=`rgba(160,200,255,${.04*d})`,a.fill(),a.fillStyle=`rgba(160,200,255,${.2*d})`,a.font="10px monospace",a.textAlign="center",a.textBaseline="middle",a.fillText("M",p,m);
6246const _=[{label:"GPT",color:"100,220,160"},{label:"CLD",color:"200,160,255"},{label:"LLM",color:"255,200,120"},{label:"Custom",color:"255,140,160"},{label:"Local",color:"120,200,255"}];for(let g=0;g<_.length;g++){const S=g/_.length*Math.PI*2-Math.PI/2,b=52,A=p+Math.cos(S)*b,w=m+Math.sin(S)*b;a.beginPath(),a.moveTo(p+Math.cos(S)*12,m+Math.sin(S)*12),a.lineTo(A,w),a.strokeStyle=`rgba(${_[g].color},${.06*d})`,a.lineWidth=.5,a.stroke();const C=.7+.3*Math.sin(u*1+g*1.3);a.beginPath(),a.arc(A,w,6,0,Math.PI*2),a.fillStyle=`rgba(${_[g].color},${.04*d*C})`,a.fill(),a.strokeStyle=`rgba(${_[g].color},${.1*d*C})`,a.lineWidth=.5,a.stroke(),a.fillStyle=`rgba(${_[g].color},${.15*d*C})`,a.font="6px monospace",a.textAlign="center",a.textBaseline="middle",a.fillText(_[g].label,A,w);const P=(s[g+10]+u*.08)%1,B=P<.5?P*2:2-P*2,R=p+Math.cos(S)*(12+(b-12)*B),E=m+Math.sin(S)*(12+(b-12)*B);a.beginPath(),a.arc(R,E,1,0,Math.PI*2),a.fillStyle=`rgba(${_[g].color},${.3*d*Math.sin(P*Math.PI)})`,a.fill()}}else if(i==="support"){const x=p;a.setLineDash([3,3]),a.beginPath(),a.moveTo(x,c*.08),a.lineTo(x,c*.92),a.strokeStyle=`rgba(160,200,255,${.06*d})`,a.lineWidth=.5,a.stroke(),a.setLineDash([]),a.fillStyle=`rgba(120,200,255,${.14*d})`,a.font="6px monospace",a.textAlign="center",a.textBaseline="top",a.fillText("Episodic",l*.25,c*.06),a.fillStyle=`rgba(255,180,100,${.14*d})`,a.fillText("Procedural",l*.75,c*.06);for(let v=0;v<4;v++){const _=c*(.22+v*.18),g=l*.06,S=l*.36;a.fillStyle=`rgba(120,200,255,${.02*d})`,a.fillRect(g,_-5,S,10);const b=.7+.3*Math.sin(u*1.2+v*1.8);a.beginPath(),a.arc(g+6,_,2.5*b,0,Math.PI*2),a.fillStyle=`rgba(120,200,255,${.18*d*b})`,a.fill();for(let A=0;A<3;A++){const w=g+14+A*(S-14)/3,C=(S-14)/3*(.4+s[v*3+A]*.5)-2;a.fillStyle=`rgba(120,200,255,${.06*d})`,a.fillRect(w,_-3,C,6)}}for(let v=0;v<3;v++){a.beginPath();const _=c*(.3+v*.22),g=x+l*.04,S=l*.94;for(let A=g;A<=S;A+=2){const w=(A-g)/(S-g),C=Math.sin(w*Math.PI*2+u*.6+v*2)*c*.06+Math.sin(w*Math.PI*3.5+u*.3+v)*c*.03;A===g?a.moveTo(A,_+C):a.lineTo(A,_+C)}const b=.08+.04*Math.sin(u*.5+v*1.5);a.strokeStyle=`rgba(255,180,100,${b*d})`,a.lineWidth=1,a.stroke();for(let A=0;A<3;A++){const w=g+(S-g)*(.2+A*.3),C=(w-g)/(S-g),P=_+Math.sin(C*Math.PI*2+u*.6+v*2)*c*.06+Math.sin(C*Math.PI*3.5+u*.3+v)*c*.03,B=.6+.4*Math.sin(u*1+v*2+A*1.5);a.beginPath(),a.arc(w,P,2*B,0,Math.PI*2),a.fillStyle=`rgba(255,180,100,${.2*d*B})`,a.fill()}}for(let v=0;v<4;v++){const _=(s[v+40]+u*.05)%1,g=c*(.25+s[v]*.5),S=c*(.25+s[v+10]*.5),b=x-l*.15+_*l*.3,A=g+(S-g)*_;a.beginPath(),a.arc(b,A,1,0,Math.PI*2);const w=_<.5?"120,200,255":"255,180,100";a.fillStyle=`rgba(${w},${.2*d*Math.sin(_*Math.PI)})`,a.fill()}}},[s,i]);return X.useEffect(()=>{const a=t.current;if(!a)return;const l=a.getContext("2d");if(!l)return;const c=Math.min(window.devicePixelRatio||1,2),u=()=>{const d=a.getBoundingClientRect();a.width=d.width*c,a.height=d.height*c,l.setTransform(c,0,0,c,0,0),o(l,d.width,d.height,100,.85)};return u(),window.addEventListener("resize",u),()=>{cancelAnimationFrame(n.current),window.removeEventListener("resize",u)}},[o]),X.useEffect(()=>{const a=t.current;if(!a)return;const l=a.getContext("2d");if(!l)return;const c=a.getBoundingClientRect();if(!e){cancelAnimationFrame(n.current),o(l,c.width,c.height,100,.85);return}const u=performance.now(),d=()=>{const p=(performance.now()-u)*.001,m=a.getBoundingClientRect();o(l,m.width,m.height,p,1.8),n.current=requestAnimationFrame(d)};return n.current=requestAnimationFrame(d),()=>{cancelAnimationFrame(n.current)}},[e,o]),y.jsx("canvas",{ref:t,style:{position:"absolute",inset:0,width:"100%",height:"100%"}})}const WJ=()=>y.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:y.jsx("path",{d:"M3 8h10M9 4l4 4-4 4",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})}),VJ=({onNavigateToTab:i})=>{const{lang:e}=Cr(),[t,n]=X.useState(null),[r,s]=X.useState(null),[o,a]=X.useState(null),[l,c]=X.useState(!1),[u,d]=X.useState(null),[p,m]=X.useState(null),x=[{number:"01",title:e==="zh"?"AI Agent èªä¸»æºè½ä½":"AI Agent",desc:e==="zh"?"èªä¸»æºè½ä½éè¦è·¨ä»»å¡çé¿æè®°å¿æ¥ç§¯ç´¯ç»éªä¸è®°ä
6246½ç¨æ·å好ãM-Flow åæ¶åå¨äºå®è®°å¿ä¸æ½è±¡æ¨¡å¼ï¼è®© Agent å
·å¤ç²¾ç¡®åå¿è½åçåæ¶ï¼ä¹è½ä»åå²ç»éªä¸æ³ååºå¯å¤ç¨çæ¹æ³è®ºã":"Autonomous agents need cross-task long-term memory to accumulate experience and remember preferences. M-Flow stores both factual memory and abstract patterns, enabling precise recall alongside generalizable experience.",metrics:e==="zh"?"ç»éªç§¯ç´¯ · 跨任å¡è¿ç» · èªä¸»å³ç":"Experience · Cross-task Continuity · Autonomous Decisions"},{number:"02",title:"AI Coding",desc:e==="zh"?"AI ç¼ç¨å©æä»ç¶ä¾èµä¸ä¸æçªå£ç累积åæè¦ï¼å®æå模ç³çè®°å¿å¯¼è´å¤§æ¨¡åè½å被åå¼±ãM-Flow æä¾ç²¾åçé¿æé¡¹ç®è®°å¿ï¼è®©ç¼ç¨å©æçæ£è®°ä½ä»£ç åºçå
¨è²ï¼èéæ¯æ¬¡ä»é¶å¼å§ã":"AI coding assistants still rely on context window accumulation. Periodically fading memory weakens model capabilities. M-Flow provides precise long-term project memory, letting assistants truly remember the full codebase.",metrics:e==="zh"?"ç²¾åæ£ç´¢ · çªç ´çªå£éå¶ Â· é¿æé¡¹ç®è®°å¿":"Precise Retrieval · Beyond Window Limits · Long-term Project Memory"},{number:"03",title:e==="zh"?"æ°å人 / AI 婿":"Digital Human / AI Assistant",desc:e==="zh"?"C ç«¯åºæ¯è¿½æ±é«æ§ä»·æ¯çè®°å¿æ¹æ¡ï¼ä½ç°æå¼ææç²¾åº¦ä¸è¶³ï¼æå
¥åºæè´µï¼å¯¼è´é¿æè®°å¿ååç½è§ãä¸ä¸ææè¦ä¼è®©é¿æéªä¼´çç¨æ·ä½éªææ¾å¤±çãM-Flow è®©æ¯æ¬¡å¯¹è¯é½å¨ä¸ä¸æ¬¡åºç¡ä¸å»¶ç»ä¸æé¿ã":"Consumer scenarios need cost-effective memory, but current engines either lack precision or are expensive, making long-term memory rare. Context summaries distort long-term companionship. M-Flow ensures every conversation builds upon the last.",metrics:e==="zh"?"æ
æéªä¼´ · ç¨æ·ç»å · é¿æä¸è´æ§":"Companionship · User Profiles · Long-term Consistency"},{number:"04",title:e==="zh"?"æ³å¾ç¥è¯åº":"Legal Knowledge Base",desc:e==="zh"?"æ³å¾æ³è§æ¡æç¹å¤ä¸é¢ç¹æ´æ°ï¼ä¼ ç»æ£ç´¢ä¾èµå
³é®è¯é¾ä»¥å¤çè¯ä¹æ¨¡ç³ä¸æ¡æé´çé»è¾å
³èãM-Flow å°æ³è§ãå¤ä¾ãååæ¡æ¬¾ç»æåå
¥åºï¼æ¯æè·¨ææ¡£çè¯ä¹å
³èæ£ç´¢ï¼è®©å¾å¸ååè§å¢éå¿«éå®ä½ç²¾å便®ã":"Legal regulations are vast and frequently updated. Traditional keyword search struggles with semantic ambiguity and cross-reference logic. M-Flow structures statutes, precedents, and contract clauses with semantic cross-document retrieval, helping legal teams pinpoint precise references.",metrics:e
6246==="zh"?"æ³è§æ£ç´¢ · å¤ä¾å
³è · åè§å®¡æ¥":"Regulation Retrieval · Case Linking · Compliance Review"},{number:"05",title:e==="zh"?"ä¼ä¸ç¥è¯ç®¡ç":"Enterprise Knowledge Management",desc:e==="zh"?"å°ä¼ä¸å
é¨ææ¡£ãä¼è®®è®°å½ã项ç®ç»éªè½¬åä¸ºå¯æ£ç´¢çç»æåè®°å¿ãç³»ç»èªå¨æå»ºå±æ¬¡åç¥è¯å¾è°±ï¼å¤ç²åº¦éç¹ç¡®ä¿ä»ä¸»é¢å°ç»èé½è½ç²¾åå½ä¸ï¼æ°åå·¥ä¹è½å¿«éè·åç»ç»ç¥è¯ã":"Transform internal documents, meeting notes, and project experience into searchable structured memory. Auto-built hierarchical knowledge graphs with multi-granularity anchors ensure precise retrieval from themes to details.",metrics:e==="zh"?"ç¥è¯æ²æ· · ç²¾åæ£ç´¢ · ç»éªä¼ æ¿":"Knowledge · Precise Retrieval · Experience Transfer"}],v=[{title:e==="zh"?"ç§æåé¨ç½²":"Private Deployment",desc:e==="zh"?"æ¯æå®å
¨æ¬å°åé¨ç½²ï¼æ°æ®ä¸åºä¼ä¸è¾¹çãåå¨å
¼å®¹æ¬å°æä»¶ç³»ç»ãAWS S3ãMinIOï¼æ¶æ¯é忝æ RedisãRabbitMQãKafkaï¼æ»¡è¶³ä¸ååè§è¦æ±ã":"Full on-premise deployment keeping data within enterprise boundaries. Compatible with local filesystem, AWS S3, MinIO for storage and Redis, RabbitMQ, Kafka for queues.",canvasType:"deploy"},{title:e==="zh"?"é«ç²¾åº¦è®°å¿æ£ç´¢":"High-precision Memory Retrieval",desc:e==="zh"?"ç¬åçå¤ç»´åº¦èåæ£ç´¢æ¹æ¡ï¼ç»ååéå¬åãå¾è°±æå½±ä¸æ¶é´å¢å¼ºï¼ä¸ä¾èµå
³é®è¯å¹é
ï¼å¨ä¸æçéæä¸è¯ç³»åºæ¯ä¸åæ ·ç²¾åææã":"Proprietary multi-dimensional retrieval combining vector recall, graph projection, and time enhancement. No keyword matching dependency â equally precise for non-Latin languages.",canvasType:"encrypt"},{title:e==="zh"?"模ååææ¯æ ":"Modular Tech Stack",desc:e==="zh"?"æææ ¸å¿ç»ä»¶åå¯é
ç½®æ¿æ¢ââ徿°æ®åºãåéåºãLLMãåµå
¥æ¨¡åèªç±æé
ï¼æ ç¼éé
æ¨ç°æçææ¯æ ï¼æ ééæç³»ç»ã":"All core components are configurable â graph DB, vector DB, LLM, and embedding models mix and match freely. Fits your existing tech stack without refactoring.",canvasType:"scale"},{title:e==="zh"?"èªç¶è¯è¨çè§£":"Natural Language Understanding",desc:e==="zh"?'å
ç½®æä»£æ¶è§£è½åï¼èªå¨å°å¯¹è¯ä¸ç"ä»""é£ä¸ªé¡¹ç®"ç代è¯
6246è¿å为å
·ä½å®ä½ï¼æ¶é¤å 模ç³è¡¨è¾¾å¯¼è´çæ£ç´¢åå·®ï¼æåçå®å¯¹è¯åºæ¯ä¸çè®°å¿åç¡®çã':'Built-in coreference resolution automatically resolves pronouns like "he" and "that project" to concrete entities, eliminating retrieval bias from ambiguous expressions.',canvasType:"tenant"},{title:e==="zh"?"ä¸»æµæ¨¡åå
¨å
¼å®¹":"Universal Model Compatibility",desc:e==="zh"?"å·²æ¯æ OpenAIãAnthropicãDeepSeekãQwenãDoubaoãAzure OpenAIãOllama çä¸»æµ LLMãè®°å¿å±ä¸æ¨çå±å®å
¨è§£è¦ï¼åæ¢æ¨¡åä¸å½±åå·²æè®°å¿æ°æ®ã":"Supports OpenAI, Anthropic, DeepSeek, Qwen, Doubao, Azure OpenAI, Ollama. Memory layer fully decoupled from inference â switch models without losing memory data.",canvasType:"model"},{title:e==="zh"?"åè®°å¿ç±»å":"Dual Memory Types",desc:e==="zh"?"åæ¶æ¯æäºå®è®°å¿ï¼Episodicï¼ä¸æ½è±¡è®°å¿ï¼Proceduralï¼ä¸¤ç§ç±»åãäºå®è®°å¿ç²¾ç¡®å¬åå
·ä½ä¿¡æ¯ï¼æ½è±¡è®°å¿æ²æ·å¯å¤ç¨ç模å¼ä¸æ¹æ³è®ºï¼è¦çä¸åä¸å¡éæ±ã":"Supports both Episodic (factual) and Procedural (abstract) memory types. Factual memory for precise recall, abstract memory for reusable patterns â covering diverse business needs.",canvasType:"support"}],_=[{step:"01",title:e==="zh"?"鿱坹æ¥":"Requirement Alignment",desc:e==="zh"?"䏿们çå¢éæ·±å
¥æ²éä¸å¡åºæ¯ï¼æç¡®è®°å¿è½åçåºç¨æ¹åä¸ææææã":"Work with our team to define your use case, clarify memory requirements, and set expected outcomes."},{step:"02",title:e==="zh"?"æ¹æ¡å®å¶":"Custom Solution Design",desc:e==="zh"?"æ ¹æ®æ¨çææ¯æ ä¸ä¸å¡éæ±ï¼å®å¶è®°å¿çç¥ãæ°æ®æ¶æä¸é¨ç½²æ¹æ¡ã":"Design memory strategy, data architecture, and deployment plan tailored to your tech stack and business needs."},{step:"03",title:e==="zh"?"éæé¨ç½²":"Integration & Deployment",desc:e==="zh"?"å°è®°å¿è½åæ ç¼éæå°æ¨ç°æç AI ç³»ç»ä¸ï¼æ¯æäºç«¯ä¸ç§æåé¨ç½²ã":"Seamlessly integrate memory capabilities into your existing AI systems, with cloud or on-premise deployment options."},{step:"04",title:e==="zh"?"æç»ä¼å":"Continuous Optimization",desc:e==="zh"?"ä¸çº¿åæç»çæ§ä¸è°ä¼ï¼é¥å½¢å¾è°±é交äºä¸æä¸°å¯ï¼è®°å¿æ£ç´¢ç²¾åº¦éæ¥æåã":"Post-launch monitoring and tuning. Conical graph enriches over time, progressively improving retrieval precision."}],g=[{name:"OpenAI",desc:"GPT-4o / o1 / o3"},{name:"Azure OpenAI",desc:e==="zh"?"ä¼ä¸çº§ OpenAI æ¥å
¥":"Enterprise OpenAI access"},{name:"Anthropic",desc:"Claude Opus / Sonnet"},{name:"DeepSeek",desc:"DeepSeek-V3 / R1"},{name:"Qwen",desc:e==="zh"?"éä¹åé®ç³»å":"Qwen series"},{name:"Ollama",desc:e==="zh"?"æ¬å°æ¨¡åé¨ç½²":"Local model deployment"},{name:"Jina AI / Voyage AI",desc:e==="zh"?"åµå
¥æ¨¡å":"Embedding models"},{name:e==="zh"?"ç§ææ¨¡å":"Private Models",desc:e==="zh"?"ä¼ä¸èªç LLM æ¥å
¥":"Custom enterprise LLMs"}],S=[{q:e==="zh"?"è®°å¿æ°æ®åå¨å¨åªéï¼æ¯å¦å®å
¨ï¼":"Where is memory data stored? Is it secure?",a:e==="zh"?"æä»¬æ¯æå¤ç§é¨ç½²æ¹å¼ï¼å
æ¬äºç«¯ä¸å®å
¨æ¬å°åç§æé¨ç½²ãæ°æ®éè¿ Graph DBï¼Neo4j/Memgraphï¼å Vector DBï¼Qdrant/Milvus/Weaviateï¼åååå¨ï¼æä»¶å卿¯ææ¬å°æä»¶ç³»ç»ãAWS S3 æ MinIOï¼æ°æ®å®å
¨ç±æ¨ææ§ã":"We support multiple deployment options including cloud and fully on-premise. Data is dual-written to Graph DB (Neo4j/Memgraph) and Vector DB (Qdrant/Milvus/Weaviate), with file storage on local filesystem, AWS S3, or MinIO â fully under your control."},{q:e==="zh"?"使ç¨å¿æµå
ç´ éè¦ä¿®æ¹ç°æ AI ç³»ç»æ¶æåï¼":"Do I need to modify my existing AI system architecture?",a:e==="zh"?"å¿æµå
ç´ è®¾è®¡ä¸ºç¬ç«çè®°å¿å±ï¼å¯ä¸ç°æ LLM åºç¨è§£è¦éæãæææ ¸å¿ç»ä»¶ï¼å¾æ°æ®åºãåéåºãLLMãåµå
¥æ¨¡åï¼åå¯é
ç½®æ¿æ¢ï¼éé
æ¨çææ¯æ ï¼æ ééæå·²æç³»ç»ã":"Flow Element is an independent memory layer that integrates with existing LLM apps in a decoupled manner. All core components (gra
6246ph DB, vector DB, LLM, embeddings) are configurable and swappable to fit your tech stack."},{q:e==="zh"?"ä¸å ¶ä»è®°å¿æ¹æ¡ç¸æ¯ï¼M-Flow çæ ¸å¿ä¼å¿æ¯ä»ä¹ï¼":"What makes M-Flow different from other memory solutions?",a:e==="zh"?'ä¸ä¸ªå ³é®å·®å¼ï¼ä¸æ¯æ£ç´¢ç²¾åº¦ââæä»¬çå¤ç»´åº¦èåæ£ç´¢ä¸ä¾èµå ³é®è¯å¹é ï¼å¨ä¸æçåºæ¯ä¸åæ ·ç²¾åï¼äºæ¯èªç¶è¯è¨çè§£ââå ç½®æä»£æ¶è§£ï¼ç¨æ·è¯´"ä»""é£ä¸ªé¡¹ç®"ä¹è½åç¡®å¬åï¼ä¸æ¯æ¶æçµæ´»æ§ââæææ ¸å¿ç»ä»¶å¯é ç½®æ¿æ¢ï¼éé æ¨ç°æææ¯æ ã':"Three key differences: precision â our multi-dimensional retrieval works without keyword matching, equally precise for non-Latin languages; understanding â built-in coreference resolution handles pronouns accurately; flexibility â all core components are configurable to fit your tech stack."},{q:e==="zh"?"å¦ä½ä¸ä½ 们åä½ï¼":"How can we work together?",a:e==="zh"?"欢è¿éè¿é¡µé¢ä¸çèç³»æ¹å¼ä¸æä»¬åå¾èç³»ãæä»¬ä¼æ ¹æ®æ¨çä¸å¡åºæ¯è¿è¡æ·±å ¥æ²éï¼å®å¶æéåçè®°å¿è§£å³æ¹æ¡ãç®åæä»¬ä¼å 䏿æç¡® AI åºç¨åºæ¯çä¼ä¸å®¢æ·è¿è¡åä½ã":"Please reach out through the contact options on this page. We'll discuss your business scenario in depth and design the best memory solution. We currently prioritize partnerships with enterprise clients who have clear AI use cases."}],b=A=>y.jsx("div",{style:{fontSize:"10px",letterSpacing:"3px",textTransform:"uppercase",color:"rgba(255,255,255,0.35)",marginBottom:"48px",fontWeight:400},children:A});return y.jsxs("div",{style:{background:"#0b0b0b",color:"var(--text-0, #e8e6f0)",minHeight:"100vh",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',fontWeight:300},children:[y.jsxs("section",{style:{position:"relative",minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",background:"#020408"},children:[y.jsx(GJ,{}),y.jsxs("div",{style:{position:"relative",zIndex:1,textAlign:"center",maxWidth:"950px",padding:"0 40px",marginTop:"-18vh"},children:[y.jsx("div",{style:{fontSize:"11px",letterSpacing:"4px",textTransform:"uppercase",color:"rgba(240,181,107,0.55)",marginBottom:"40px",fontWeight:400},children:e==="zh"?"ä¼ä¸è§£å³æ¹æ¡":"Enterprise Solutions"}),y.jsx("h1",{style:{fontSize:"clamp(48px, 8vw, 84px)",fontWeight:200,lineHeight:1.05,marginBottom:"32px",letterSpacing:"-2px",color:"rgba(255,255,255,0.95)",textShadow:"0 2px 40px rgba(0,0,0,0.6)",whiteSpace:"pre-line"},children:e==="zh"?`ä¸åªæ¯è®°ä½ï¼ 6247èæ¯è®¤ç¥ã`:`Beyond memory. 6248True cognition.`}),y.jsx("p",{style:{fontSize:"17px",fontWeight:300,color:"rgba(220,215,205,0.45)",maxWidth:"500px",margin:"0 auto",lineHeight:1.7,letterSpacing:"0.3px",textShadow:"0 1px 20px rgba(0,0,0,0.5)"},children:e==="zh"?"为ä¼ä¸çº§ AI æå»ºè®¤ç¥åºç¡è®¾æ½":"Building cognitive infrastru
6248cture for enterprise AI"})]}),y.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,height:"250px",background:"linear-gradient(to top, #0b0b0b, transparent)",pointerEvents:"none",zIndex:2}})]}),y.jsx("section",{style:{padding:"120px 40px"},children:y.jsxs("div",{style:{maxWidth:"1200px",margin:"0 auto"},children:[b(e==="zh"?"æ ¸å¿æ¹æ¡":"Core Solutions"),y.jsx("h2",{style:{fontSize:"clamp(32px, 5vw, 52px)",fontWeight:200,lineHeight:1.15,marginBottom:"80px",maxWidth:"700px",letterSpacing:"-1px"},children:e==="zh"?`为æ¯ä¸ªä¸å¡åºæ¯ï¼ 6249æä¾æ·±åº¦è®°å¿è½å`:`Deep memory capabilities 6250for every business scenario`}),y.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"0"},children:x.map((A,w)=>y.jsxs("div",{className:"rsp-grid-2",onMouseEnter:()=>n(w),onMouseLeave:()=>n(null),style:{display:"grid",gridTemplateColumns:"80px 1fr auto",gap:"40px",alignItems:"start",padding:"48px 24px",borderTop:"1px solid rgba(255,255,255,0.06)",cursor:"pointer",transition:"all 0.4s ease",opacity:t!==null&&t!==w?.35:1,position:"relative",background:t===w?"rgba(255,255,255,0.015)":"transparent"},children:[y.jsx("div",{style:{position:"absolute",left:0,top:"48px",bottom:"48px",width:"2px",background:t===w?["rgba(126,200,227,0.4)","rgba(167,139,250,0.4)","rgba(240,181,107,0.4)","rgba(110,210,170,0.4)","rgba(230,140,160,0.4)"][w]||"rgba(240,181,107,0.3)":"transparent",transition:"background 0.4s ease"}}),y.jsx("div",{style:{fontSize:"14px",color:t===w?["rgba(126,200,227,0.6)","rgba(167,139,250,0.6)","rgba(240,181,107,0.6)","rgba(110,210,170,0.6)","rgba(230,140,160,0.6)"][w]||"rgba(240,181,107,0.4)":"rgba(255,255,255,0.15)",fontWeight:400,paddingTop:"4px",transition:"color 0.3s",fontFamily:"monospace",minWidth:"28px"},children:A.number}),y.jsxs("div",{children:[y.jsx("h3",{style:{fontSize:"26px",fontWeight:300,marginBottom:"16px",letterSpacing:"-0.5px",transition:"all 0.3s",color:t===w?"rgba(255,255,255,0.95)":"rgba(255,255,255,0.75)",transform:t===w?"translateX(4px)":"translateX(0)"},children:A.title}),y.jsx("p",{style:{fontSize:"14px",fontWeight:300,color:t===w?"rgba(255,255,255,0.45)":"rgba(255,255,255,0.3)",lineHeight:1.7,maxWidth:"560px",transition:"color 0.3s"},children:A.desc})]}),y.jsx("div",{style:{fontSize:"11px",color:t===w?"rgba(126,200,227,0.6)":"rgba(126,200,227,0.3)",fontWeight:400,letterSpacing:"1px",whiteSpace:"nowrap",paddingTop:"6px",transition:"all 0.3s"},children:A.metrics})]},w))})]})}),y.jsxs("section",{style:{padding:"120px 40px",position:"relative",overflow:"hidden"},children:[y.jsx("div",{style:{position:"absolute",width:"600px",height:"600px",borderRadius:"50%",background:"radial-gradient(circle, rgba(240,181,107,0.04) 0%, transparent 70%)",top:"20%",right:"-200px",pointerEvents:"none"}}),y.jsxs("div",{style:{maxWidth:"1200px",margin:"0 auto",position:"relative"},children:[b(e==="zh"?"ä¼ä¸çº§è½å":"Enterprise Capabilities"),y.jsx("h2",{style:{fontSize:"clamp(32px, 5vw, 48px)",fontWeight:200,lineHeight:1.15,marginBottom:"80px",maxWidth:"600px",letterSpacing:"-1px"},children:e==="zh"?`ç产级é¨ç½²ï¼ 6251ä¼ä¸çº§å®å ¨`:`Production-grade deployment, 6252enterprise-level security`}),y.jsx("div",{className:"rsp-grid-3",style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"1px",background:"rgba(255,255,255,0.04)"},children:v.map((A,w)=>y.jsxs("div",{onMouseEnter:()=>s(w),onMouseLeave:()=>s(null),style:{background:r===w?"rgba(255,255,255,0.03)":"#0b0b0b",padding:"0 36px 36px",transition:"all 0.4s ease",cursor:"default",position:"relative"},children:[y.jsx("div",{style:{position:"relative",width:"100%",height:"140px",marginBottom:"20px"},children:y.jsx(jJ,{type:A.canvasType,hovered:r===w})}),y.jsx("h4",{style:{fontSize:"16px",fontWeight:400,marginBottom:"12px",letterSpacing:"-0.3px",color:"rgba(255,255,255,0.8)"},children:A.title}),y.jsx("p",{style:{fontSize:"13px",fontWeight:300,color:"rgba(255,255,255,0.3)",lineHeight:1.65},children:A.desc})]},w))})]})]}),y.jsx("section",{style:{padding:"120px 40px",borderTop:"1px solid rgba(255,255,255,0.06)"},children:y.jsxs("div",{style:{maxWidth:"1200px",margin:"0 auto"},children:[b(e==="zh"?"å使µç¨":"Collaboration Process"),y.jsx("h2",{style:{fontSize:"clamp(32px, 5vw, 48px)",fontWeight:200,lineHeight:1.15,marginBottom:"80px",maxWidth:"600px",letterSpacing:"-1px"},children:e==="zh"?`忥è½å°ï¼ 6253为ä¸å¡æ³¨å ¥è®°å¿`:`Four steps to bring 6254memory to your business`}),y.jsx("div",{className:"rsp-grid-4",style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"1px",background:"rgba(255,255,255,0.04)"},children:_.map((A,w)=>y.jsxs("div",{onMouseEnter:()=>a(w),onMouseLeave:()=>
6254a(null),style:{background:o===w?"rgba(255,255,255,0.03)":"#0b0b0b",padding:"48px 32px",transition:"all 0.4s ease",cursor:"default",position:"relative"},children:[y.jsxs("div",{style:{fontSize:"11px",color:o===w?"rgba(126, 200, 227, 0.7)":"rgba(126, 200, 227, 0.35)",fontFamily:"monospace",letterSpacing:"2px",marginBottom:"20px",transition:"color 0.3s"},children:["STEP ",A.step]}),y.jsx("h3",{style:{fontSize:"18px",fontWeight:400,color:o===w?"rgba(255,255,255,0.9)":"rgba(255,255,255,0.7)",marginBottom:"14px",transition:"color 0.3s",letterSpacing:"-0.3px"},children:A.title}),y.jsx("p",{style:{fontSize:"13px",color:"rgba(255,255,255,0.3)",lineHeight:1.65,fontWeight:300},children:A.desc}),w<_.length-1&&y.jsx("div",{style:{position:"absolute",top:"58px",right:"-1px",width:"1px",height:"2px",background:"rgba(126, 200, 227, 0.2)",zIndex:1}}),[{top:8,left:8},{top:8,right:8},{bottom:8,left:8},{bottom:8,right:8}].map((C,P)=>y.jsx("div",{style:{position:"absolute",...C,width:"3px",height:"3px",borderRadius:"0.5px",background:o===w?"rgba(255,255,255,0.15)":"rgba(255,255,255,0.06)",transition:"background 0.3s"}},P))]},w))})]})}),y.jsx("section",{style:{padding:"120px 40px",borderTop:"1px solid rgba(255,255,255,0.06)"},children:y.jsxs("div",{style:{maxWidth:"1200px",margin:"0 auto"},children:[b(e==="zh"?"ææ¯çæ":"Technology Ecosystem"),y.jsx("h2",{style:{fontSize:"clamp(32px, 5vw, 48px)",fontWeight:200,lineHeight:1.15,marginBottom:"24px",maxWidth:"700px",letterSpacing:"-1px"},children:e==="zh"?`å ¼å®¹ææä¸»æµ LLMï¼ 6255æ ç¼èå ¥ææ¯æ `:`Compatible with all major LLMs, 6256seamless integration`}),y.jsx("p",{style:{fontSize:"15px",fontWeight:300,color:"rgba(255,255,255,0.35)",lineHeight:1.7,maxWidth:"560px",marginBottom:"64px"},children:e==="zh"?"M-Flow çè®°å¿å±ä¸æ¨çå±å®å ¨è§£è¦ãæ 论æ¨ä½¿ç¨åªå®¶æ¨¡åï¼è®°å¿æ°æ®å¯æ ç¼å ±äº«ãèªç±åæ¢ã":"M-Flow's memory layer is fully decoupled from inference. Regardless of which model you use, memory data is seamlessly shared and freely switchable."}),y.jsx("div",{className:"rsp-grid-4",style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"1px",background:"rgba(255,255,255,0.04)"},children:g.map((A,w)=>y.jsxs("div",{onMouseEnter:()=>m(w),onMouseLeave:()=>m(null),style:{background:p===w?"rgba(255,255,255,0.03)":"#0b0b0b",padding:"36px 28px",cursor:"default",transition:"all 0.3s ease",position:"relative"},children:[y.jsx("div",{style:{position:"absolute",top:0,left:"28px",right:"28px",height:"1px",background:p===w?"rgba(126,200,227,0.3)":"transparent",transition:"background 0.3s"}}),y.jsx("div",{style:{fontSize:"18px",fontWeight:400,color:p===w?"rgba(255,255,255,0.9)":"rgba(255,255,255,0.6)",marginBottom:"8px",letterSpacing:"-0.3px",transition:"color 0.3s"},children:A.name}),y.jsx("div",{style:{fontSize:"12px",color:p===w?"rgba(126,200,227,0.5)":"rgba(255,255,255,0.2)",fontWeight:300,fontFamily:"monospace",letterSpacing:"0.5px",transition:"color 0.3s"},children:A.desc})]},w))})]})}),y.jsx("section",{style:{padding:"120px 40px",borderTop:"1px solid rgba(255,255,255,0.06)"},children:y.jsxs("div",{style:{maxWidth:"1200px",margin:"0 auto"},children:[b(e==="zh"?"常è§é®é¢":"Frequently Asked Questions"),y.jsx("h2",{style:{fontSize:"clamp(32px, 5vw, 48px)",fontWeight:200,lineHeight:1.15,marginBottom:"64px",letterSpacing:"-1px"},children:e==="zh"?"æ¨å¯è½æ³äºè§£ç":"Questions you might have"}),y.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[S.map((A,w)=>y.jsxs("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)",cursor:"pointer"},onClick:()=>d(u===w?null:w),children:[y.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"28px 0"},children:[y.jsx("div",{style:{fontSize:"16px",fontWeight:400,color:u===w?"rgba(255,255,255,0.9)":"rgba(255,255,255,0.6)",transition:"color 0.3s",flex:1,paddingRight:"24px"},children:A.q}),y.jsx("div",{style:{fontSize:"20px",color:u===w?"rgba(126,200,227,0.7)":"rgba(255,255,255,0.2)",transition:"all 0.3s",transform:u===w?"rotate(45deg)":"rotate(0deg)",flexShrink:0,width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"},children:"+"})]}),y.jsx("div",{style:{maxHeight:u===w?"200px":"0",overflow:"hidden",transition:"max-height 0.4s ease, opacity 0.3s ease",opacity:u===w?1:0},children:y.jsx("p",{style:{fontSize:"14px",fontWeight:300,color:"rgba(255,255,255,0.35)",lineHeight:1.75,paddingBottom:"28px",maxWidth:"780px"},children:A.a})})]},w)),y.jsx("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)"}})]})]})}),y.jsxs("section",{style:{padding:"160px 40px",position:"relative",overflow:"hidden",borderTop:"1px solid rgba(255,255,255,0.06)"},children:[y.jsx("div",{style:{position:"absolute",width:"500px",height:"500px",borderRadius:"50%",background:"radial-gradient(circle, rgba(240,181,107,0.05) 0%, transparent 70%)",top:"50%",left:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"}}),y.jsxs("div",{style:{maxWidth:"800px",margin:"0 auto",textAlign:"center",position:"relative"},children:[y.jsx("h2",{style:{fontSize:"clamp(36px, 6vw, 56px)",fontWeight:200,lineHeight:1.1,marginBottom:"24px",letterSpacing:"-1px"},children:e==="zh"?"åå¤å¥½è®©AIè®°ä½ä¸åäºå":"Ready to let AI remember everything?"}),y.jsx("p",{style:{fontSize:"16px",color:"rgba(255,255,255,0.3)",marginBottom:"48px",lineHeight:1.6},children:e==="zh"?"䏿们çå¢éé¢çº¦ä¸æ¬¡30åéçæ·±åº¦æ¼ç¤ºï¼äºè§£M-Flowå¦ä½ä¸ºæ¨çä¸å¡æ³¨å ¥è®°å¿è½åã":"Book a 30-minute deep dive with our team to learn how M-Flow can inject memory into your business."}),y.jsxs("button",{onClick:()=>i==null?void 0:i("contactsales"),onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),style:{background:l?"rgba(255,255,255,1)":"rgba(255,255,255,0.9)",color:"#0b0b0b",border:"none",padding:"16px 48px",fontSize:"14px",fontWeight:500,letterSpacing:"0.5px",cursor:"pointer",transition:"all 0.3s ease",display:"inline-flex",alignItems:"center",gap:"10px"},children:[e==="zh"?"èç³»éå®å¢é":"Contact Sales"," ",y.jsx(WJ,{})]})]})]})]})},XJ=()=>{const i=X.useRef(null);return X.useEffect(()=>{const e=i.current;if(!e)return;const t=e.getContext("2d");if(!t)return;let n;const r=window.devicePixelRatio||1,s=680,o=400;e.width=s*r,e.height=o*r,t.setTransform(r,0,0,r,0,0);const a="#c678dd",l="#61afef",c="#98c379",u="#e5c07b",d="#abb2bf",p="#4ade80",m="#5c6370",x=[{tokens:[{t:"import",c:a},{t:" ",c:d},{t:"m_flow",c:l}],delay:0,prompt:!0},{tokens:[],delay:600,blank:!0}
6256,{tokens:[{t:"await",c:a},{t:" ",c:d},{t:"m_flow",c:l},{t:".",c:d},{t:"add",c:l},{t:"(",c:d},{t:'"Quarterly review showed 15% revenue growth."',c},{t:")",c:d}],delay:1e3,prompt:!0},{tokens:[],delay:1800,blank:!0},{tokens:[{t:"await",c:a},{t:" ",c:d},{t:"m_flow",c:l},{t:".",c:d},{t:"memorize",c:l},{t:"()",c:d}],delay:2200,prompt:!0},{tokens:[],delay:2800,blank:!0},{tokens:[{t:"results",c:u},{t:" = ",c:d},{t:"await",c:a},{t:" ",c:d},{t:"m_flow",c:l},{t:".",c:d},{t:"search",c:l},{t:"(",c:d},{t:"query_text",c:u},{t:"=",c:d},{t:'"What drove revenue?"',c},{t:")",c:d}],delay:3200,prompt:!0},{tokens:[],delay:4200,blank:!0},{tokens:[{t:"# â Memory stored and retrieved â",c:p}],delay:4600}],v=g=>g.map(S=>S.t).join(""),_=g=>{const S=g*.001,b=t.createLinearGradient(0,0,0,o);b.addColorStop(0,"#0c0e14"),b.addColorStop(1,"#080a0f"),t.fillStyle=b,t.fillRect(0,0,s,o),t.strokeStyle="#232732",t.lineWidth=1,t.strokeRect(.5,.5,s-1,o-1);const A=t.createLinearGradient(0,0,0,36);A.addColorStop(0,"#181b24"),A.addColorStop(1,"#14161e"),t.fillStyle=A,t.fillRect(0,0,s,36),t.strokeStyle="#232732",t.beginPath(),t.moveTo(0,36),t.lineTo(s,36),t.stroke(),["#ff5f57","#febc2e","#28c840"].forEach((Y,z)=>{t.beginPath(),t.arc(18+z*22,18,5.5,0,Math.PI*2),t.fillStyle=Y,t.fill()}),t.font='12px "SF Mono", "Fira Code", monospace',t.fillStyle="#5c6370",t.textAlign="center",t.fillText("m_flow â Python 3.11",s/2,22),t.textAlign="left",t.font='13.5px "SF Mono", "Fira Code", "Cascadia Code", monospace';const C=S%12*1e3,P=20,B=24;let R=58;for(const Y of x){if(C<Y.delay)break;if(Y.blank){R+=B;continue}const z=v(Y.tokens),W=C-Y.delay,V=Math.min(z.length,Math.floor(W/22));if(V===0&&Y.tokens.length>0){R+=B;continue}let G=P;const Z=x.indexOf(Y),O=x.slice(0,Z+1).filter(le=>!le.blank).length;t.fillStyle="#3a3f4b",t.font='11.5px "SF Mono", "Fira Code", monospace',t.fillText(String(O).padStart(2," "),P,R),t.font='13.5px "SF Mono", "Fira Code", "Cascadia Code", monospace',G=P+28,Y.prompt&&(t.fillStyle=m,t.fillText(">>> ",G,R),G+=t.measureText(">>> ").width);let ee=0;for(const le of Y.tokens){if(ee>=V)break;const ge=V-ee,Se=le.t.substring(0,ge);t.fillStyle=le.c,t.fillText(Se,G,R),G+=t.measureText(Se).width,ee+=Se.length}V<z.length&&V>0&&Math.sin(S*6)>0&&(t.fillStyle=p,t.globalAlpha=.8,t.fillRect(G+1,R-12,2,16),t.globalAlpha=1),R+=B}t.fillStyle="rgba(255,255,255,0.008)";for(let Y=0;Y<o;Y+=3)t.fillRect(0,Y,s,1);t.fillStyle="#12141a",t.fillRect(0,o-24,s,24),t.strokeStyle="#232732",t.beginPath(),t.moveTo(0,o-24),t.lineTo(s,o-24),t.stroke(),t.font='11px "SF Mono", "Fira Code", monospace',t.fillStyle="#3a3f4b",t.fillText("Python 3.11.8 | UTF-8 | m_flow v0.9",P,o-8);const L=Math.min(1,C/6e3),N=80,k=s-N-20;t.fillStyle="#1e2028",t.fillRect(k,o-16,N,4),t.fillStyle=p,t.globalAlpha=.6,t.fillRect(k,o-16,N*L,4),t.globalAlpha=1,n=requestAnimationFrame(_)};return n=requestAnimationFrame(_),()=>cancelAnimationFrame(n)},[]),y.jsx("canvas",{ref:i,style:{width:"100%",maxWidth:680,aspectRatio:"680/400",borderRadius:12,boxShadow:"0 0 60px rgba(74,222,128,0.06), 0 20px 60px rgba(0,0,0,0.5)"}})},YJ=()=>{const i=X.useRef(null);return X.useEffect(()=>{const e=i.current;if(!e)return;const t=e.getContext("2d");if(!t)return;let n;const r=window.devicePixelRatio||1,s=()=>{const l=e.getBoundingClientRect();e.width=l.width*r,e.height=l.height*r,t.setTransform(r,0,0,r,0,0)};s();const o=[];for(let l=0;l<60;l++)o.push({angle:Math.random()*Math.PI*2,dist:40+Math.random()*260,size:2+Math.random()*5,speed:(Math.random()-.5)*.2,phase:Math.random()*Math.PI*2});const a=l=>{const c=l*.001,u=e.getBoundingClientRect(),d=u.width,p=u.height,m=d/2,x=p/2;t.clearRect(0,0,d,p);for(const v of o){const _=v.angle+c*v.speed,g=v.dist+Math.sin(c+v.phase)*15,S=m+Math.cos(_)*g,b=x+Math.sin(_)*g;t.beginPath(),t.moveTo(m,x),t.lineTo(S,b),t.strokeStyle="rgba(255,255,255,0.08)",t.lineWidth=.5,t.stroke();const A=Math.sin(c*2+v.phase)*.3+.7;t.beginPath(),t.rect(S-v.size/2,b-v.size/2,v.size,v.size),t.fillStyle=`rgba(180,200,255,${.5*A})`,t.fill(),t.strokeStyle=`rgba(180,200,255,${.3*A})`,t.lineWidth=.5,t.stroke()}t.beginPath(),t.arc(m,x,3,0,Math.PI*2),t.fillStyle="rgba(255,255,255,0.9)",t.fill(),n=requestAnimationFrame(a)};return n=requestAnimationFrame(a),window.addEventListener("resize",s),(
6256)=>{cancelAnimationFrame(n),window.removeEventListener("resize",s)}},[]),y.jsx("canvas",{ref:i,style:{position:"absolute",inset:0,width:"100%",height:"100%",pointerEvents:"none"}})},Yd=({icon:i,title:e,desc:t,tag:n})=>{const[r,s]=X.useState(!1);return y.jsxs("div",{onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),style:{position:"relative",padding:"32px 28px",background:r?"#1a1a1a":"#111111",borderLeft:`2px solid ${r?"rgba(255,255,255,0.6)":"rgba(255,255,255,0.12)"}`,transition:"all 0.3s ease",cursor:"pointer",minHeight:180},children:[n&&y.jsx("span",{style:{position:"absolute",top:12,right:16,fontSize:11,fontFamily:"var(--font-mono, monospace)",color:"#888",border:"1px solid #333",borderRadius:20,padding:"2px 10px",letterSpacing:"0.05em"},children:n}),y.jsx("div",{style:{marginBottom:20,opacity:r?1:.7,transition:"opacity 0.3s"},children:i}),y.jsx("h3",{style:{fontSize:18,fontWeight:600,color:"#fff",margin:"0 0 10px",fontFamily:"var(--font-sans, system-ui)"},children:e}),y.jsx("p",{style:{fontSize:14,lineHeight:1.6,color:"rgba(255,255,255,0.5)",margin:0,fontFamily:"var(--font-sans, system-ui)"},children:t})]})},uu=({children:i,primary:e=!1,onClick:t})=>{const[n,r]=X.useState(!1);return y.jsx("button",{onClick:t,onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),style:{display:"inline-flex",alignItems:"center",gap:8,padding:"12px 28px",borderRadius:100,border:e?"none":"1px solid rgba(255,255,255,0.25)",background:e?n?"#fff":"rgba(255,255,255,0.95)":n?"rgba(255,255,255,0.08)":"transparent",color:e?"#000":"#fff",fontSize:13,fontFamily:"var(--font-mono, monospace)",fontWeight:500,letterSpacing:"0.08em",textTransform:"uppercase",cursor:"pointer",transition:"all 0.3s ease",transform:n?"translateY(-1px)":"none"},children:i})},ap=({text:i})=>y.jsxs("div",{style:{fontSize:12,fontFamily:"var(--font-mono, monospace)",color:"rgba(255,255,255,0.4)",letterSpacing:"0.15em",textTransform:"uppercase",marginBottom:20},children:["[ ",i," ]"]}),VS=({title:i,desc:e,cta:t,children:n})=>{const[r,s]=X.useState(!1);return y.jsxs("div",{onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),style:{display:"flex",flexDirection:"column",borderLeft:`1px solid ${r?"rgba(255,255,255,0.4)":"rgba(255,255,255,0.1)"}`,transition:"all 0.4s ease",cursor:"pointer",overflow:"hidden"},children:[y.jsxs("div",{style:{padding:"28px 24px 20px"},children:[y.jsx("h3",{style:{fontSize:20,fontWeight:600,color:"#fff",margin:"0 0 12px",fontFamily:"var(--font-sans, system-ui)"},children:i}),y.jsx("p",{style:{fontSize:14,lineHeight:1.65,color:"rgba(255,255,255,0.45)",margin:0,fontFamily:"var(--font-sans, system-ui)"},children:e})]}),y.jsx("div",{style:{flex:1,minHeight:200,position:"relative",background:"#0a0a0a",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center"},children:n}),t&&y.jsx("div",{style:{padding:"16px 24px 24px"},children:y.jsxs(uu,{children:[t," ",y.jsx("span",{style:{fontSize:14},children:"â"})]})})]})},JJ=()=>{const i=X.useRef(null);return X.useEffect(()=>{const e=i.current;if(!e)return;const t=e.getContext("2d");if(!t)return;let n;const r=window.devicePixelRatio||1;e.width=360*r,e.height=200*r,t.setTransform(r,0,0,r,0,0);const s=[{label:"pip install m-flow",icon:"01"},{label:"from mflow import Engine",icon:"02"},{label:"engine.store(memory)",icon:"03"},{label:"engine.search(query)",icon:"04"}],o=a=>{const l=a*.001;t.fillStyle="#0a0a0a",t.fillRect(0,0,360,200);const c=Math.floor(l*.4)%s.length;s.forEach((u,d)=>{const p=20+d*44,m=d===c,x=d<c;if(d<s.length-1&&(t.strokeStyle=x?"rgba(74,222,128,0.3)":"rgba(255,255,255,0.06)",t.lineWidth=1,t.beginPath(),t.moveTo(28,p+24),t.lineTo(28,p+44),t.stroke()),t.beginPath(),t.arc(28,p+10,10,0,Math.PI*2),x?(t.fillStyle="rgba(74,222,128,0.15)",t.fill(),t.strokeStyle="rgba(74,222,128,0.5)"):m?(t.fillStyle="rgba(96,165,250,0.15)",t.fill(),t.strokeStyle="rgba(96,165,250,0.6)"):(t.fillStyle="rgba(255,255,255,0.03)",t.fill(),t.strokeStyle="rgba(255,255,255,0.1)"),t.lineWidth=1,t.stroke(),t.font="bold 9px var(--font-mono, monospace)",t.fillStyle=x?"rgba(74,222,128,0.8)":m?"rgba(96,165,250,0.9)":"rgba(255,255,255,0.3)",t.textAlign="center",t.fillText(u.icon,28,p+13),t.textAlign="left",t.font="11px var(--font-mono, monospace)",t.fillStyle=m?"rgba(255,255,255,0.8)":x?"rgba(255,255,255,0.4)":"rgba(255,255,255,0.2)",t.f
6256illText(u.label,50,p+14),m){if(Math.floor(l*2)%2===0){const g=t.measureText(u.label).width;t.fillStyle="rgba(96,165,250,0.8)",t.fillRect(52+g,p+4,1.5,14)}const _=l*.4%1;t.fillStyle="rgba(96,165,250,0.1)",t.fillRect(50,p+20,280*_,2)}}),n=requestAnimationFrame(o)};return n=requestAnimationFrame(o),()=>cancelAnimationFrame(n)},[]),y.jsx("canvas",{ref:i,style:{width:"100%",height:"100%",display:"block"}})},KJ=()=>{const i=X.useRef(null);return X.useEffect(()=>{const e=i.current;if(!e)return;const t=e.getContext("2d");if(!t)return;let n;const r=window.devicePixelRatio||1;e.width=360*r,e.height=200*r,t.setTransform(r,0,0,r,0,0);const s=o=>{const a=o*.001;t.fillStyle="#0a0a0a",t.fillRect(0,0,360,200),t.fillStyle="#0e0e0e",t.fillRect(0,0,48,200);for(let l=0;l<4;l++){const c=l===1?.35:.08;t.fillStyle=`rgba(96,165,250,${c})`,t.beginPath(),t.arc(24,28+l*30,4,0,Math.PI*2),t.fill()}t.fillStyle="rgba(255,255,255,0.02)",t.fillRect(48,0,312,22);for(let l=0;l<3;l++){const c=60+l*96;t.fillStyle="rgba(255,255,255,0.02)",t.fillRect(c,32,84,34);const u=30+Math.sin(a*.8+l*1.5)*15;t.fillStyle=`rgba(96,165,250,${.08+l*.03})`,t.fillRect(c+8,52,u,4),t.fillStyle="rgba(255,255,255,0.06)",t.fillRect(c+8,38,40,5)}t.fillStyle="rgba(255,255,255,0.015)",t.fillRect(60,76,288,112),t.beginPath(),t.strokeStyle="rgba(96,165,250,0.15)",t.lineWidth=2;for(let l=0;l<286;l++){const c=61+l,u=140+Math.sin(l*.02+a*.6)*25+Math.sin(l*.04+a*.3)*12;l===0?t.moveTo(c,u):t.lineTo(c,u)}t.stroke(),t.lineTo(347,188),t.lineTo(61,188),t.closePath(),t.fillStyle="rgba(96,165,250,0.03)",t.fill(),t.beginPath(),t.strokeStyle="rgba(74,222,128,0.08)",t.lineWidth=1.5;for(let l=0;l<286;l++){const c=61+l,u=148+Math.sin(l*.025+a*.4+2)*18+Math.sin(l*.05+a*.2)*8;l===0?t.moveTo(c,u):t.lineTo(c,u)}t.stroke();for(let l=0;l<6;l++)for(let c=0;c<3;c++)t.fillStyle="rgba(255,255,255,0.03)",t.beginPath(),t.arc(100+l*48,95+c*35,1,0,Math.PI*2),t.fill();n=requestAnimationFrame(s)};return n=requestAnimationFrame(s),()=>cancelAnimationFrame(n)},[]),y.jsx("canvas",{ref:i,style:{width:"100%",height:"100%",display:"block"}})},qJ=()=>{const i=X.useRef(null);return X.useEffect(()=>{const e=i.current;if(!e)return;const t=e.getContext("2d");if(!t)return;const n=window.devicePixelRatio||1;e.width=360*n,e.height=200*n,t.setTransform(n,0,0,n,0,0);let r;const s=o=>{const a=o*.001;t.fillStyle="#0a0a0a",t.fillRect(0,0,360,200),t.strokeStyle="#333",t.lineWidth=.5,t.strokeRect(40,20,280,165),t.fillStyle="rgba(255,255,255,0.4)",t.fillRect(60,38,120,8),[200,240,180,220,160,200,140,190].forEach((c,u)=>{const d=62+u*16,p=Math.max(0,Math.min(1,a%4-u*.15));t.fillStyle=`rgba(255,255,255,${.12*p})`,t.fillRect(60,d,c*p,4)});for(let c=0;c<5;c++){const u=Math.floor(a*.5)%5===c;t.beginPath(),t.arc(52,42+c*20,2,0,Math.PI*2),t.fillStyle=u?"rgba(255,255,255,0.6)":"rgba(255,255,255,0.15)",t.fill()}r=requestAnimationFrame(s)};return r=requestAnimationFrame(s),()=>cancelAnimationFrame(r)},[]),y.jsx("canvas",{ref:i,style:{width:"100%",height:"100%",display:"block"}})},ZJ=()=>{const i=X.useRef(null);return X.useEffect(()=>{const e=i.current;if(!e)return;const t=e.getContext("2d");if(!t)return;let n,r=0,s=0;const o=window.devicePixelRatio||1,a=()=>{const m=e.getBoundingClientRect();r=m.width,s=m.height,e.width=r*o,e.height=s*o,t.setTransform(o,0,0,o,0,0)};a(),window.addEventListener("resize",a);const l=[],c=7;for(let m=0;m<c;m++){const x=.2+m/c*.6;l.push({points:[],width:1.5+Math.random()*3,speed:.15+Math.random()*.25,hue:240+m*18+Math.random()*20,saturation:50+Math.random()*30,alpha:.06+Math.random()*.12,offset:M
6256ath.random()*100,amplitude:30+Math.random()*80,frequency:.003+Math.random()*.004,yBase:x})}const u=[];for(let m=0;m<60;m++)u.push({x:0,y:0,streamIdx:Math.floor(Math.random()*c),progress:Math.random(),speed:3e-4+Math.random()*8e-4,size:1+Math.random()*2,a:.2+Math.random()*.5});const d=(m,x,v)=>{const _=v*m.speed+m.offset;return m.yBase*s+Math.sin(x*m.frequency+_)*m.amplitude+Math.sin(x*m.frequency*2.3+_*1.7)*m.amplitude*.3},p=m=>{const x=m*.001;t.clearRect(0,0,r,s);for(let v=0;v<l.length;v++){const _=l[v],g=120,S=[];for(let b=0;b<=g;b++){const A=b/g*r*1.2-r*.1,w=d(_,A,x);S.push({x:A,y:w})}t.beginPath(),t.moveTo(S[0].x,S[0].y);for(let b=1;b<S.length-1;b++){const A=(S[b].x+S[b+1].x)/2,w=(S[b].y+S[b+1].y)/2;t.quadraticCurveTo(S[b].x,S[b].y,A,w)}t.strokeStyle=`hsla(${_.hue}, ${_.saturation}%, 65%, ${_.alpha})`,t.lineWidth=_.width,t.stroke(),t.beginPath(),t.moveTo(S[0].x,S[0].y);for(let b=1;b<S.length-1;b++){const A=(S[b].x+S[b+1].x)/2,w=(S[b].y+S[b+1].y)/2;t.quadraticCurveTo(S[b].x,S[b].y,A,w)}t.strokeStyle=`hsla(${_.hue}, ${_.saturation}%, 70%, ${_.alpha*.3})`,t.lineWidth=_.width*6,t.stroke(),t.beginPath(),t.moveTo(S[0].x,S[0].y);for(let b=1;b<S.length-1;b++){const A=(S[b].x+S[b+1].x)/2,w=(S[b].y+S[b+1].y)/2;t.quadraticCurveTo(S[b].x,S[b].y,A,w)}t.strokeStyle=`hsla(${_.hue}, ${_.saturation}%, 50%, ${_.alpha*.08})`,t.lineWidth=_.width*30,t.stroke(),_.points=S}for(const v of u){v.progress+=v.speed,v.progress>1&&(v.progress-=1);const _=l[v.streamIdx],g=v.progress*r*1.2-r*.1,S=d(_,g,x),b=t.createRadialGradient(g,S,0,g,S,v.size*4);b.addColorStop(0,`hsla(${_.hue+30}, 80%, 80%, ${v.a*.5})`),b.addColorStop(1,"transparent"),t.fillStyle=b,t.fillRect(g-v.size*4,S-v.size*4,v.size*8,v.size*8),t.beginPath(),t.arc(g,S,v.size,0,Math.PI*2),t.fillStyle=`hsla(${_.hue+30}, 70%, 85%, ${v.a})`,t.fill()}n=requestAnimationFrame(p)};return n=requestAnimationFrame(p),()=>{cancelAnimationFrame(n),window.removeEventListener("resize",a)}},[]),y.jsx("canvas",{ref:i,style:{position:"absolute",inset:0,width:"100%",height:"100%",pointerEvents:"none"}})},QJ=({onNavigateToTab:i})=>{const{lang:e}=Cr(),t=e==="zh",n={maxWidth:1200,margin:"0 auto",padding:"0 clamp(16px, 4vw, 40px)"};return y.jsxs("div",{style:{background:"#000",color:"#fff",minHeight:"100vh",paddingBottom:120},children:[y.jsxs("section",{style:{position:"relative",minHeight:"100vh",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",overflow:"hidden"},children:[y.jsx("div",{style:{position:"absolute",inset:0,background:"linear-gradient(160deg, #050510 0%, #0a0a1a 40%, #080815 100%)"}}),y.jsx(ZJ,{}),y.jsx("div",{style:{position:"absolute",top:"10%",left:"50%",transform:"translateX(-50%)",width:"80%",height:"50%",background:"radial-gradient(ellipse at center, rgba(100,60,200,0.05) 0%, transparent 70%)",filter:"blur(80px)",pointerEvents:"none"}}),y.jsxs("div",{style:{position:"relative",zIndex:2,textAlign:"center",padding:"0 clamp(16px, 4vw, 40px)",maxWidth:900,width:"100%",boxSizing:"border-box"},children:[y.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:8,background:"rgba(120,80,220,0.08)",border:"1px solid rgba(140,100,240,0.15)",borderRadius:20,padding:"6px 16px",marginBottom:40,backdropFilter:"blur(12px)"},children:[y.jsx("div",{style:{width:6,height:6,borderRadius:"50%",background:"#a78bfa",boxShadow:"0 0 8px rgba(167,139,250,0.5)"}}),y.jsx("span",{style:{fontSize:12,fontFamily:"var(--font-mono, monospace)",color:"#c4b5fd",letterSpacing:"0.05em",fontWeight:500},children:t?"AI è®°å¿åºç¡è®¾æ½":"AI MEMORY INFRASTRUCTURE"})]}),y.jsx("h1",{className:"rsp-title-hero",style:{fontSize:76,fontWeight:200,lineHeight:1.08,color:"#fafafa",margin:"0 0 28px",fontFamily:"var(--font-sans, system-ui)",letterSpacing:"-0.03em"},children:t?y.jsx(y.Fragment,{children:"æå»ºæè®¤ç¥è½åç AI"}):y.jsxs(y.Fragment,{children:["Build AI",y.jsx("br",{}),"that cognizes."]})}),y.jsx("p",{style:{fontSize:18,lineHeight:1.7,color:"rgba(255,255,255,0.4)",margin:"0 auto 48px",fontFamily:"var(--font-sans, system-ui)",fontWeight:300,maxWidth:600},children:t?"弿ºè®¤ç¥å¼æï¼èµäº AI æç¥ãè®°å¿ä¸æ¨çç宿´è½åæ ã":"Open-source cognitive engine â giving AI a full stack of perception, memory, and reasoning."}),y.jsx("div",{className:"rsp-code-snippet",style:{display:"inline-flex",alignItems:"center",gap:12,background:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.08)",borderRadius:8,padding:"18px 32px",marginBottom:36,backdropFilter:"blur(12px)"},children:y.jsxs("code",{style:{color:"rgba(255,255,255,0.5)",fontFamily:"var(--font-mono, monospace)",fontSize:16,letterSpacing:"0.02em"},children:[y.jsx("span",{style:{color:"#c792ea"},children:"await"})," ",y.jsx("span",{style:{color:"#a78bfa"},children:"m_flow"}),y.jsx("span",{style:{color:"rgba(255,255,255,0.3)"},children:".add"}),y.jsx("span",{style:{color:"rgba(255,255,255,0.2)"},children:"("}),y.jsx("span",{style:{color:"#60a5fa"},children:"data"}),y.jsx("span",{style:{color:"rgba(255,255,255,0.2)"},children:")"}),y.jsx("span",{style:{color:"rgba(255,255,255,0.15)"},children:" â "}),y.jsx("span",{style:{color:"#c792ea"},children:"await"})," ",y.jsx("span",{style:{color:"#a78bfa"},children:"m_flow"}),y.jsx("span",{style:{color:"rgba(255,255,255,0.3)"},children:".memorize"}),y.jsx("span",{style:{color:"rgba(255,255,255,0.2)"}
6256,children:"()"}),y.jsx("span",{style:{color:"rgba(255,255,255,0.15)"},children:" â "}),y.jsx("span",{style:{color:"#c792ea"},children:"await"})," ",y.jsx("span",{style:{color:"#a78bfa"},children:"m_flow"}),y.jsx("span",{style:{color:"rgba(255,255,255,0.3)"},children:".search"}),y.jsx("span",{style:{color:"rgba(255,255,255,0.2)"},children:"("}),y.jsx("span",{style:{color:"#4ade80"},children:'"query"'}),y.jsx("span",{style:{color:"rgba(255,255,255,0.2)"},children:")"})]})}),y.jsxs("div",{style:{display:"flex",gap:14,justifyContent:"center",flexWrap:"wrap"},children:[y.jsxs(uu,{primary:!0,onClick:()=>i==null?void 0:i("contactjob"),children:[t?"èç³»æä»¬":"GET IN TOUCH"," ",y.jsx("span",{style:{fontSize:13,marginLeft:4},children:"â"})]}),y.jsxs(uu,{onClick:()=>window.open("https://m-flow.ai","_blank"),children:[t?"äºè§£ææ¯":"LEARN MORE"," ",y.jsx("span",{style:{fontSize:13,marginLeft:4},children:"â"})]})]})]}),y.jsx("div",{style:{position:"absolute",bottom:40,left:"50%",transform:"translateX(-50%)",zIndex:2,fontSize:20,color:"rgba(255,255,255,0.2)"},children:"â"}),y.jsx("div",{style:{position:"absolute",bottom:0,left:0,right:0,height:160,background:"linear-gradient(to top, #000 0%, transparent 100%)",zIndex:3}})]}),y.jsxs("section",{style:{...n,paddingTop:120,paddingBottom:100},children:[y.jsx(ap,{text:t?"å¼å§ä½¿ç¨":"GET STARTED"}),y.jsx("h2",{style:{fontSize:42,fontWeight:300,color:"#fff",margin:"0 0 60px",letterSpacing:"-0.01em",fontFamily:"var(--font-sans, system-ui)"},children:t?"5åéå¿«éå
¥æ":"5-Minute Quick Start"}),y.jsxs("div",{className:"rsp-grid-3",style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:0,alignItems:"stretch"},children:[y.jsx(VS,{title:t?"å¼å¯¼å¼æç¨":"Guided Tutorial",desc:t?"ä»é¶å¼å§ç交äºå¼æç¨ï¼æææå¸¦ä½ å®æç¬¬ä¸ä¸ªè®°å¿å¼æéæãè¦çå®è£
é¨ç½²ãæ ¸å¿æ¦å¿µä¸æä½³å®è·µã":"Interactive step-by-step tutorial guiding you through your first memory engine integration. Covers installation, core concepts, and best practices.",children:y.jsx(JJ,{})}),y.jsx(VS,{title:t?"æ¸
æ°ç¨æ·çé¢":"Clear User Interface",desc:t?"ç´è§çå¯è§å管ç颿¿ï¼å®æ¶æ¥çè®°å¿å¾è°±ãæ£ç´¢æ¥å¿ä¸ç³»ç»ç¶æãé¶é¨æ§ä¸æï¼æè§å³æå¾ã":"Intuitive visual management dashboard for real-time memory graph viewing, retrieval logs, and system status. Zero learning curve, WYSIWYG.",children:y.jsx(KJ,{})}),y.jsx(VS,{title:t?"ææ¯ææ¡£":"Technical Docs",desc:t?"宿´çææ¯ç½ç®ä¹¦ãæ¶æè®¾è®¡ææ¡£ä¸éææåã叮婿¨æ·±å
¥ç解记å¿å¼æçå·¥ä½åçã":"Complete technical whitepaper, architecture docs, and integration guides. Deep-dive into how the memory engine works.",children:y.jsx(qJ,{})})]}),y.jsxs("div",{className:"rsp-grid-3",style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:0,marginTop:"24px"},children:[y.jsx("div",{}),y.jsx("div",{style:{display:"flex",justifyContent:"center"},children:y.jsxs(uu,{onClick:()=>window.open("https://docs.m-flow.ai/","_blank"),children:[t?"é
è¯»ææ¡£":"READ DOCS"," ",y.jsx("span",{style:{fontSize:14},children:"â"})]})}),y.jsx("div",{})]})]}),y.jsxs("section",{style:{...n,paddingBottom:100},children:[y.jsx(ap,{text:t?"è½å":"CAPABILITIES"}),y.jsx("h2",{style:{fontSize:42,fontWeight:300,color:"#fff",margin:"0 0 60px",letterSpacing:"-0.01em",fontFamily:"var(--font-sans, system-ui)"},children:t?"è®°å¿å¼ææ ¸å¿è½å":"Core memory capabilities"}),y.jsxs("div",{className:"rsp-grid-3",style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:1,background:"rgba(255,255,255,0.06)"},children:[y.jsx(Yd,{icon:y.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"rgba(255,255,255,0.8)",strokeWidth:"1.5",children:[y.jsx("circle",{cx:"12",cy:"12",r:"10"}),y.jsx("path",{d:"M8 12l2 2 4-4"})]}),title:t?"Episodic + Procedural åè®°å¿":"Dual Memory Types",desc:t?"Episodic è®°å¿åå¨äºå®ç»´åº¦ï¼Episode â Facet â FacetPoint ä¸å±ç»æï¼ï¼Procedural è®°å¿å卿½è±¡æ¨¡å¼ä¸å¯å¤ç¨æ¹æ³è®ºã":"Episodic memory stores factual dimensions (Episode â Facet â FacetPoint hierarchy). Procedural memory stores abstract patterns and reusable methodologies."}),y.jsx(Yd,{icon:y.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"rgba(255,255,255,0.8)",strokeWidth:"1.5",children:[y.jsx("circle",{cx:"11",cy:"11",r:"8"}),y.jsx("path",{d:"M21 21l-4.3-4.3"})]}),title:t?"Bundle Search æ£ç´¢":"Bundle Search Retrieval",desc:t?"6 个åééåå¹¶è¡æç´¢ï¼ä¸¤é¶æ®µå¾æå½±ç®æ³ï¼èªéåºè¯åèåè¯ä¹ä¸ç»æä¿¡å·ï¼è·¯å¾ä»£ä»·è¯åç¡®ä¿å¤ç²åº¦ç²¾åå½ä¸ã":"Parallel search across 6 vector collections, two-phase graph projection, adaptive scoring fusing semantic and structural signals, with path-cost scoring for multi-granularity precision."}),y.jsx(Yd,{icon:y.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"rgba(255,255,255,0.8)",strokeWidth:"1.5",children:[y.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),y.jsx("path",{d:"M7 7h10M7 12h10M7 17h6"})]}),title:t?"é¥å½¢å¾è°±æ¶æ":"Conical Graph Architecture",desc:t?"Graph DB + Vector DB ååæä¹
åãé¥å½¢å±æ¬¡ç»æå¤©ç¶éå¶å¾éåæ©æ£è·¯å¾ï¼å¤ç²åº¦éç¹ç¡®ä¿æ 论æ¥è¯¢åå主é¢ãäºå®è¿æ¯å®ä½é½è½ç²¾ç¡®å½ä¸ã":"Dual-write to Graph DB + Vector DB. Conical hierarchy naturally limits graph traversal diffusion, with multi-granularity anchors ensuring precise hits regardless of query abstraction level."}),y.jsx(Yd,{icon:y.jsx("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"rgba(255,255,255,0.8)",strokeWidth:"1.5",children:y.jsx("path",{d:"M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83"})}),title:t?"æä»£æ¶è§£ç³»ç»":"Coreference Resolution",desc:t?'纯è§å驱å¨çé¢å¤ç模åï¼æ¯æ 11 ç§ä»£è¯ç±»åä¸ 6 ç§å®ä½ç±»åãæ£ç´¢åå°"ä»""é£ä¸ªé¡¹ç®"æ¿æ¢ä¸ºå
·ä½å®ä½ï¼æ¶é¤ä»£è¯å¯¼è´çæ£ç´¢ç²¾åº¦ä¸éã':"Rule-driven preprocessing module supporting 11 pronoun types and 6 entity types. Resolves pronouns to concrete entities before retrieval, eliminating precision loss from ambiguous references."}),y.jsx(Yd,{icon:y.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"rgba(255,255,255,0.8)",strokeWidth:"1.5",children:[y.jsx("path",{d:"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"}),y.jsx("polyline",{points:"22,6 12,13 2,6"})]}),title:t?"模ååæ¶æ":"Modular Architecture",desc:t?"æææ ¸å¿ç»ä»¶åå¯é
ç½®æ¿æ¢ãæ¯æ Neo4j/Memgraph 徿°æ®åºãQdrant/Milvus/Weaviate åéåºãOpenAI/Anthropic/DeepSeek/Qwen/Doubao/Ollama ç LLMã":"All core components are configurable. Supports Neo4j/Memgraph for graph DB, Qdrant/Milvus/Weaviate for vector DB, and OpenAI/Anthropic/DeepSeek/Qwen/Doubao/Ollama for LLMs."}),y.jsx(Yd,{icon:y.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"rgba(255,255,255,0.8)",strokeWidth:"1.5",children:[y.jsx("path",{d:"M16 18l6-6-6-6"}),y.jsx("path",{d:"M8 6l-6 6 6 6"})]}),title:t?"ç§æåé¨ç½²":"Self-Hosted Deployment",desc:t?"æ¯æäºç«¯ä¸æ¬å°ç§æåé¨ç½²ãå卿¯ææ¬å°æä»¶ç³»ç»ãAWS S3ãMinIOï¼æ¶æ¯é忝æ RedisãRabbitMQãKafkaã":"Cloud and on-premise deployment supported. Storage via local filesystem, AWS S3, or MinIO. Message queues via Redis, RabbitMQ, or Kafka.",tag:t?"æ ¸å¿":"Core"})]})]}),y.jsxs("section",{style:{position:"relative",height:"80vh",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"},children:[y.jsx(YJ,{}),y.jsxs("div",{style:{position:"relative",zIndex:2,textAlign:"center",pointerEvents:"none"},children:[y.jsx("h2",{className:"rsp-title-hero",style:{fontSize:80,fontWeight:200,color:"rgba(255,255,255,0.85)",margin:0,lineHeight:1.15,fontFamily:"var(--font-sans, system-ui)",letterSpacing:"-0.03em"},children:t?y.jsxs(y.Fragment,{children:[y.jsx("span",{style:{color:"rgba(255,255,255,0.4)"},children:"è®°å¿æ¯"}),y.jsx("br",{}),y.jsx("span",{style:{color:"rgba(255,255,255,0.9)"},children:"æºè½çèµ·ç¹"})]}):y.jsxs(y.Fragment,{children:[y.jsx("span",{style:{color:"rgba(255,255,255,0.4)"},children:"Memory is where"}),y.jsx("br",{}),y.jsx("span",{style:{color:"rgba(255,255,255,0.9)"},children:"Intelligence begins"})]})}),y.jsx("p",{style:{fontSize:16,color:"rgba(255,255,255,0.35)",marginTop:24,fontFamily:"var(--font-sans, system-ui)",maxWidth:500,marginLeft:"auto",marginRight:"auto"}
6256,children:t?"æä»¬æ£å¨æå»ºä¸ä¸ä»£ AI è®°å¿åºç¡è®¾æ½ï¼è®©æ¯ä¸ªæºè½ä½é½æ¥æçæ£çé¿æè®°å¿ã":"We are building the next generation of AI memory infrastructure â giving every agent true long-term memory."})]})]}),y.jsx("section",{style:{...n,paddingTop:120,paddingBottom:120},children:y.jsxs("div",{className:"rsp-grid-2 rsp-gap-sm",style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:80,alignItems:"center"},children:[y.jsxs("div",{children:[y.jsx(ap,{text:t?"设计ç念":"DESIGN PHILOSOPHY"}),y.jsx("h2",{style:{fontSize:42,fontWeight:300,color:"#fff",margin:"0 0 24px",letterSpacing:"-0.01em",fontFamily:"var(--font-sans, system-ui)"},children:t?"为ä»ä¹éè¦è®¤ç¥å¼æ":"Why a Cognitive Engine"}),y.jsx("p",{style:{fontSize:16,lineHeight:1.7,color:"rgba(255,255,255,0.5)",margin:"0 0 40px",fontFamily:"var(--font-sans, system-ui)"},children:t?"å½åç LLM æ¯æ¬¡å¯¹è¯é½ä»é¶å¼å§ââæ²¡æè®°å¿ï¼æ²¡æç§¯ç´¯ï¼æ²¡ææé¿ãM-Flow 为 AI æå»ºè®¤ç¥åºç¡è®¾æ½ï¼å°ç¢çåçä¿¡æ¯ç»ç»ä¸ºç»æåçç¥è¯ï¼è®©æ¯ä¸æ¬¡äº¤äºé½æè¿¹å¯å¾ªã":"Current LLMs start every conversation from scratch â no memory, no accumulation, no growth. M-Flow builds cognitive infrastru
6256cture for AI, organizing fragmented information into structured knowledge, making every interaction traceable."}),y.jsx("div",{style:{display:"flex",flexDirection:"column",gap:20},children:[{num:"01",label:t?"ç»æåè®°å¿":"Structured Memory",desc:t?"é¥å½¢å¾è°±æ¶æå°ä¿¡æ¯ç»ç»ä¸ºå¤å±çº§è®¤ç¥ç»æï¼èéæå¹³çææ¬çæ®µ":"Conical graph architecture organizes information into multi-level cognitive structures, not flat text chunks"},{num:"02",label:t?"è¯ä¹çè§£":"Semantic Understanding",desc:t?"åºäºæ·±å±è¯ä¹è¿è¡è®°å¿æ£ç´¢ä¸å ³èï¼è¶ è¶å ³é®è¯å¹é çå±é":"Memory retrieval and association based on deep semantics, going beyond the limits of keyword matching"},{num:"03",label:t?"è®¤ç¥æ¼å":"Cognitive Evolution",desc:t?"è®°å¿éäº¤äºæç»ç§¯ç´¯ä¸æ´æ°ï¼è®© AI ç认ç¥è½å䏿æé¿":"Memory continuously accumulates and evolves through interactions, enabling AI cognition to grow over time"}].map(r=>y.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:16,paddingBottom:20,borderBottom:"1px solid rgba(255,255,255,0.08)"},children:[y.jsx("span",{style:{fontSize:12,color:"rgba(255,255,255,0.3)",fontFamily:"var(--font-mono, monospace)",minWidth:24,paddingTop:2},children:r.num}),y.jsxs("div",{children:[y.jsx("span",{style:{fontSize:15,color:"rgba(255,255,255,0.8)",fontFamily:"var(--font-sans, system-ui)",fontWeight:500},children:r.label}),y.jsx("p",{style:{fontSize:14,color:"rgba(255,255,255,0.4)",margin:"4px 0 0",fontFamily:"var(--font-sans, system-ui)"},children:r.desc})]})]},r.num))}),y.jsx("div",{style:{marginTop:32},children:y.jsxs(uu,{onClick:()=>window.open("https://m-flow.ai/","_blank"),children:[t?"äºè§£æ´å¤":"LEARN MORE"," ",y.jsx("span",{style:{fontSize:14},children:"â"})]})})]}),y.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:y.jsx(XJ,{})})]})}),y.jsxs("section",{style:{...n,paddingTop:100,paddingBottom:100,borderTop:"1px solid rgba(255,255,255,0.06)",borderBottom:"1px solid rgba(255,255,255,0.06)"},children:[y.jsx(ap,{text:t?"è®°å¿ç®¡çº¿":"MEMORY PIPELINE"}),y.jsx("h2",{style:{fontSize:42,fontWeight:300,color:"#fff",margin:"0 0 16px",letterSpacing:"-0.01em",fontFamily:"var(--font-sans, system-ui)"},children:t?"ä»å¯¹è¯å°é¿æè®°å¿":"From Conversation to Long-Term Memory"}),y.jsx("p",{style:{fontSize:16,color:"rgba(255,255,255,0.4)",margin:"0 0 64px",fontFamily:"var(--font-sans, system-ui)",maxWidth:600},children:t?"æ¯ä¸æ¬¡å¯¹è¯é½ç»è¿ M-Flow è®°å¿ç®¡çº¿çåä¸ªé¶æ®µï¼ä»åå§ææ¬æ¼åä¸ºå¯æ£ç´¢çç»æåè®°å¿ã":"Every conversation passes through four stages of the M-Flow memory pipeline, evolving from raw text into retrievable structured memory."}),y.jsxs("div",{style:{position:"relative",padding:"40px 0"},children:[y.jsx("div",{className:"rsp-hide-mobile",style:{position:"absolute",top:34,left:"10%",right:"10%",height:1,background:"linear-gradient(90deg, transparent, rgba(255,255,255,0.15) 20%, rgba(255,255,255,0.15) 80%, transparent)",zIndex:0}}),y.jsx("style",{children:` 6257 @keyframes memPulse { 6258 0% { left: 10%; opacity: 0; } 6259 10% { opacity: 1; } 6260 90% { opacity: 1; } 6261 100% { left: 90%; opacity: 0; } 6262 } 6263 @keyframes memNodeGlow { 6264 0%, 100% { box-shadow: 0 0 20px rgba(255,255,255,0.05); } 6265 50% { box-shadow: 0 0 40px rgba(255,255,255,0.12); } 6266 } 6267 @keyframes memFloat { 6268 0%, 100% { transform: translateY(0); } 6269 50% { transform: translateY(-6px); } 6270 } 6271 `}),y.jsx("div",{className:"rsp-hide-mobile",style:{position:"absolute",top:34,left:"10%",width:60,height:2,borderRadius:1,background:"linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent)",animation:"memPulse 3s ease-in-out infinite",zIndex:1}}),y.jsx("div",{className:"rsp-grid-4",style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:24,position:"relative",zIndex:2},children:[{step:"01",icon:y.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",children:[y.jsx("rect",{x:"4",y:"6",width:"24",height:"20",rx:"2",stroke:"rgba(255,255,255,0.5)",strokeWidth:"1.2"}),y.jsx("line",{x1:"8",y1:"12",x2:"24",y2:"12",stroke:"rgba(255,255,255,0.3)",strokeWidth:"1"}),y.jsx("line",{x1:"8",y1:"16",x2:"20",y2:"16",stroke:"rgba(255,255,255,0.3)",strokeWidth:"1"}),y.jsx("line",{x1:"8",y1:"20",x2:"16",y2:"20",stroke:"rgba(255,255,255,0.3)",strokeWidth:"1"})]}),title:t?"Extract è§£æ":"Extract",desc:t?"æä»£æ¶è§£é¢å¤ç â è¯ä¹åå â åéåãå°éç»æåè¾å ¥è½¬å为å¯å¤ççè¯ä¹ç段ï¼FragmentDigestï¼ã":"Coreference resolution â semantic chunking â vectorization. Transform unstructured input into processable semantic fragments (FragmentDigest).",delay:"0s"},{step:"02",icon:y.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",children:[y.jsx("circle",{cx:"10",cy:"16",r:"3",stroke:"rgba(255,255,255,0.5)",strokeWidth:"1.2"}),y.jsx("circle",{cx:"22",cy:"10",r:"3",stroke:"rgba(255,255,255,0.5)",strokeWidth:"1.2"}),y.jsx("circle",{cx:"22",cy:"22",r:"3",stroke:"rgba(255,255,255,0.5)",strokeWidth:"1.2"}),y.jsx("line",{x1:"13",y1:"15",x2:"19",y2:"11",stroke:"rgba(255,255,255,0.3)",strokeWidth:"1"}),y.jsx("line",{x1:"13",y1:"17",x2:"19",y2:"21",stroke:"rgba(255,255,255,0.3)",strokeWidth:"1"}),y.jsx("line",{x1:"22",y1:"13",x2:"22",y2:"19",stroke:"rgba(255,255,255,0.3)",strokeWidth:"1"})]}),title:t?"Memorize 建æ":"Memorize",desc:t?"Content Route å 容åç±» â Episode Router å¢éæ´æ°å³ç â LLM å¹¶è¡æå EntityãFacetãFacetPointï¼æå»ºé¥å½¢å±æ¬¡ç»æã":"Content routing â Episode Router for incremental update decisions â parallel LLM extraction of Entities, Facets, FacetPoints into conical hierarchy.",delay:"0.5s"},{step:"03",icon:y.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",children:[y.jsx("path",{d:"M16 6 L26 12 L26 22 L16 28 L6 22 L6 12 Z",stroke:"rgba(255,255,255,0.5)",strokeWidth:"1.2",fill:"none"}),y.jsx("path",{d:"M16 6 L16 28",stroke:"rgba(255,255,255,0.15)",strokeWidth:"1"}),y.jsx("path",{d:"M6 12 L26 22",stroke:"rgba(255,255,255,0.15)",strokeWidth:"1"}),y.jsx("path",{d:"M26 12 L6 22",stroke:"rgba(255,255,255,0.15)",strokeWidth:"1"}),y.jsx("circle",{cx:"16",cy:"17",r:"2",fill:"rgba(255,255,255,0.4)"})]}),title:t?"Storage æä¹ å":"Storage",desc:t?"Graph DB (Neo4j) + Vector DB (Qdrant) ååã6 个åééåç´¢å¼ä¸åç²åº¦ï¼Episode_summaryãFacet_search_textãFacetPointãEntity çã":"Dual-write to Graph DB (Neo4j) + Vector DB (Qdrant). 6 vector collections index different granularities: Episode_summary, Facet_search_text, FacetPoint, Entity, etc.",delay:"1s"},{step:"04",icon:y.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",children:[y.jsx("circle",{cx:"16",cy:"16",r:"10",stroke:"rgba(255,255,255,0.5)",strokeWidth:"1.2"}),y.jsx("circle",{cx:"16",cy:"16",r:"5",stroke:"rgba(255,255,255,0.3)",strokeWidth:"1"}),y.jsx("circle",{cx:"16",cy:"16",r:"1.5",fill:"rgba(255,255,255,0.6)"}),y.jsx("line",{x1:"16",y1:"6",x2:"16",y2:"10",stroke:"rgba(255,255,255,0.2)",strokeWidth:"1"}),y.jsx("line",{x1:"16",y1:"22",x2:"16",y2:"26",stroke:"rgba(255,255,255,0.2)",strokeWidth:"1"}),y.jsx("line",{x1:"6",y1:"16",x2:"10",y2:"16",stroke:"rgba(255,255,255,0.2)",strokeWidth:"1"}),y.jsx("line",{x1:"22",y1:"16",x2:"26",y2:"16",stroke:"rgba(255,255,255,0.2)",strokeWidth:"1"})]}),title:t?"Bundle Search æ£ç´¢":"Bundle Search",desc:t?"å¤éååéå¹¶è¡å¬å â 䏤鶿®µå¾æå½± â è·¯å¾ä»£ä»·è¯å â æ¶é´å¢å¼ºãè¾åºä¿ç宿´çå±çº§ç»æä¾ LLM 使ç¨ã":"Multi-collection parallel vector recall â two-phase graph projection â path-cost scoring â time bonus. Output preserves full hierarchy for LLM consumption.",delay:"1.5s"}].map(r=>y.jsxs("div",{style:{background:"rgba(255,255,255,0.02)",border:"1px solid rgba(255,255,255,0.06)",borderRadius:12,padding:"32px 24px",textAlign:"center",animation:`memNodeGlow 4s ease-in-out ${r.delay} infinite`,transition:"border-color 0.3s, background 0.3s"},onMouseEnter:s=>{s.currentTarget.style.borderColor="rgba(255,255,255,0.15)",s.currentTarget.style.background="rgba(255,255,255,0.04)"},onMouseLeave:s=>{s.currentTarget.style.borderColor="rgba(255,255,255,0.06)",s.currentTarget.style.background="rgba(255,255,255,0.02)"},children:[y.jsxs("div",{style:{fontSize:11,color:"rgba(255,255,255,0.25)",fontFamily:"var(--font-mono, monospace)",marginBottom:16,letterSpacing:"0.15em"},children:["STEP ",r.step]}),y.jsx("div",{style:{display:"flex",justifyContent:"center",marginBottom:20,animation:`memFloat 3s ease-in-out ${r.delay} infinite`},children:r.icon}),y.jsx("h3",{style:{fontSize:18,fontWeight:500,color:"#fff",margin:"0 0 10px",fontFamily:"var(--font-sans, system-ui)"},children:r.title}),y.jsx("p",{style:{fontSize:13,lineHeight:1.6,color:"rgba(255,255,255,0.35)",margin:0,fontFamily:"var(--font-sans, system-ui)"},children:r.desc})]},r.step))})]})]}),y.jsxs("section",{style:{...n,paddingTop:100,paddingBottom:100},children:[y.jsx(ap,{text:t?"ææ¯çæ":"ECOSYSTEM"}),y.jsx("h2",{style:{fontSize:42,fontWeight:300,color:"#fff",margin:"0 0 16px",letterSpacing:"-0.01em",fontFamily:"var(--font-sans, system-ui)"},children:t?"é¢åä¸»æµææ¯æ 设计":"Designed for your stack"}),y.jsx("p",{style:{fontSize:16,color:"rgba(255,255,255,0.4)",margin:"0 0 60px",fontFamily:"var(--font-sans, system-ui)"},children:t?"M-Flow çæ¶æè®¾è®¡å ¼å®¹ä»¥ä¸ä¸»æµå¹³å°ä¸å·¥å ·ã":"M-Flow's architecture is designed to be compatible with these platforms and tools."}),y.jsx("div",{className:"rsp-grid-3",style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:1,background:"rgba(255,255,255,0.06)"},children:[{icon:y.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"rgba(255,255,255,0.7)",strokeWidth:"1.5",children:[y.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),y.jsx("path",{d:"M2 17l10 5 10-5"}),y.jsx("path",{d:"M2 12l10 5 10-5"})]}),title:t?"LLM ä¸åµå ¥æ¨¡å":"LLMs & Embeddings",items:["OpenAI / Azure OpenAI","Anthropic Claude","DeepSeek","Qwen","Doubao","Ollama","Jina AI / Voyage AI"]},{icon:y.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"rgba(255,255,255,0.7)",strokeWidth:"1.5",children:[y.jsx("ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}),y.jsx("path",{d:"M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"}),y.jsx("path",{d:"M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"})]}
6271),title:t?"æ°æ®åº":"Databases",items:[t?"Neo4j / Memgraphï¼å¾ï¼":"Neo4j / Memgraph (Graph)",t?"Qdrantï¼åéï¼é»è®¤ï¼":"Qdrant (Vector, default)","Milvus","Weaviate","Pinecone"]},{icon:y.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"rgba(255,255,255,0.7)",strokeWidth:"1.5",children:[y.jsx("path",{d:"M16 18l6-6-6-6"}),y.jsx("path",{d:"M8 6l-6 6 6 6"}),y.jsx("path",{d:"M14 4l-4 16"})]}),title:t?"åºç¡è®¾æ½":"Infrastructure",items:[t?"Redis / RabbitMQ / Kafkaï¼éåï¼":"Redis / RabbitMQ / Kafka (Queue)",t?"AWS S3 / MinIOï¼åå¨ï¼":"AWS S3 / MinIO (Storage)",t?"æ¬å°æä»¶ç³»ç»":"Local Filesystem"]}].map((r,s)=>y.jsxs("div",{style:{background:"#000",padding:"36px 28px"},children:[y.jsx("div",{style:{marginBottom:20,opacity:.8},children:r.icon}),y.jsx("h3",{style:{fontSize:17,fontWeight:600,color:"#fff",margin:"0 0 20px",fontFamily:"var(--font-sans, system-ui)"},children:r.title}),y.jsx("div",{style:{display:"flex",flexDirection:"column",gap:10},children:r.items.map(o=>y.jsx("span",{style:{fontSize:14,color:"rgba(255,255,255,0.45)",fontFamily:"var(--font-mono, monospace)"},children:o},o))})]},s))})]}),y.jsxs("section",{style:{paddingTop:120,paddingBottom:120,textAlign:"center"},children:[y.jsx("p",{style:{fontSize:16,color:"rgba(255,255,255,0.35)",fontFamily:"var(--font-sans, system-ui)",fontStyle:"italic",margin:"0 0 60px"},children:t?'"让æ¯ä¸ä¸ª AI 齿¥æè®°å¿ï¼æ¯æä»¬ç使å½ã"':'"Giving every AI persistent memory is our mission."'}),y.jsx("h2",{style:{fontSize:48,fontWeight:300,color:"#fff",margin:"0 0 20px",letterSpacing:"-0.02em",fontFamily:"var(--font-sans, system-ui)"},children:t?"䏿们ä¸èµ·å®ä¹ AI è®°å¿":"Help us define AI memory"}),y.jsx("p",{style:{fontSize:16,color:"rgba(255,255,255,0.45)",margin:"0 0 40px",maxWidth:520,marginLeft:"auto",marginRight:"auto",fontFamily:"var(--font-sans, system-ui)"},children:t?"M-Flow æ£å¨ç§¯æå¼åä¸ãæä»¬æ¬¢è¿å¼åè
ãç ç©¶è
åææ¯åä½ä¼ä¼´å å
¥ã":"M-Flow is actively under development. We welcome developers, researchers, and technology partners to join us."}),y.jsxs("div",{className:"rsp-col-center",style:{display:"flex",gap:16,justifyContent:"center",flexWrap:"wrap"},children:[y.jsxs(uu,{primary:!0,onClick:()=>i==null?void 0:i("contactjob"),children:[t?"å å
¥æä»¬":"JOIN US"," ",y.jsx("span",{style:{fontSize:14},children:"â"})]}),y.jsxs(uu,{onClick:()=>window.open("https://m-flow.ai","_blank"),children:[t?"äºè§£ææ¯":"LEARN MORE"," ",y.jsx("span",{style:{fontSize:14},children:"â"})]})]})]}),y.jsx("div",{style:{...n,borderTop:"1px solid rgba(255,255,255,0.08)",paddingTop:32,paddingBottom:32,textAlign:"center"},children:y.jsxs("span",{style:{fontSize:13,color:"rgba(255,255,255,0.25)",fontFamily:"var(--font-mono, monospace)"},children:["© 2026 ",t?"å¿æµå
ç´ ":"Flow Element",". All rights reserved."]})})]})};function $J(){const i=X.useRef(null),e=X.useRef(0),t=X.useRef([]),n=X.useRef([]),r=X.useCallback(()=>{const s=i.current;if(!s)return;const o=s.getContext("2d");if(!o)return;const a=window.devicePixelRatio||1,l=s.clientWidth,c=s.clientHeight;if(s.width!==l*a||s.height!==c*a){s.width=l*a,s.height=c*a,o.setTransform(a,0,0,a,0,0);const k=[];for(let z=0;z<160;z++){const W=Math.sin(z*127.1+42)*43758.5453,V=Math.sin(z*269.5+42)*43758.5453,G=Math.sin(z*419.2+42)*43758.5453;k.push({x:(W-Math.floor(W))*l,y:(V-Math.floor(V))*c,r:(G-Math.floor(G))*1.2+.2,speed:1+z%7*.35,phase:z*.9})}t.current=k;const Y=[];for(let z=0;z<60;z++){const W=Math.sin(z*311.7+77)*43758.5453,V=Math.sin(z*523.1+77)*43758.5453;Y.push({x:(W-Math.floor(W))*l,y:(V-Math.floor(V))*c,speed:.15+z%6*.08,phase:z*1.1,size:.5+z%4*.4,drift:(z%2===0?1:-1)*(.3+z%3*.2)})}n.current=Y}const u=performance.now()*.001;o.fillStyle="#030610",o.fillRect(0,0,l,c),o.globalAlpha=.04,o.strokeStyle="rgba(120, 160, 255, 1)",o.lineWidth=.5;const d=60;for(let k=d;k<c;k+=d){const Y=Math.sin(u*.1+k*.005)*3;o.beginPath(),o.moveTo(0,k+Y);for(let z=0;z<=l;z+=40){const W=k+Math.sin(u*.15+z*.003+k*.002)*4+Y;o.lineTo(z,W)}o.stroke()}o.globalAlpha=1;const p=[{yBase:.35,amplitude:40,hue:210,sat:75,light:40,alpha:.22,width:.22,speed:.12},{yBase:.43,amplitude:32,hue:235,sat:65,light:35,alpha:.26,width:.18,speed:.09}
6271,{yBase:.5,amplitude:25,hue:195,sat:80,light:42,alpha:.18,width:.15,speed:.15},{yBase:.58,amplitude:35,hue:255,sat:55,light:32,alpha:.16,width:.2,speed:.11}];for(const k of p){const Y=.75+.25*Math.sin(u*.2+k.hue*.01),z=c*k.width;for(let W=0;W<l;W+=3){const V=W/l,G=Math.sin(V*Math.PI),Z=c*k.yBase+Math.sin(u*k.speed+V*4.5)*k.amplitude+Math.sin(u*k.speed*.6+V*2.2+k.hue)*k.amplitude*.5,O=k.alpha*G*Y;if(O<.003)continue;const ee=o.createLinearGradient(W,Z-z,W,Z+z);ee.addColorStop(0,"transparent"),ee.addColorStop(.2,`hsla(${k.hue}, ${k.sat}%, ${k.light}%, ${O*.3})`),ee.addColorStop(.4,`hsla(${k.hue}, ${k.sat}%, ${k.light+5}%, ${O*.7})`),ee.addColorStop(.5,`hsla(${k.hue}, ${k.sat+5}%, ${k.light+10}%, ${O})`),ee.addColorStop(.6,`hsla(${k.hue}, ${k.sat}%, ${k.light+5}%, ${O*.7})`),ee.addColorStop(.8,`hsla(${k.hue}, ${k.sat}%, ${k.light}%, ${O*.3})`),ee.addColorStop(1,"transparent"),o.fillStyle=ee,o.fillRect(W,Z-z,3,z*2)}}const m=.8+.2*Math.sin(u*.18),x=l*.5+Math.sin(u*.07)*12,v=c*.46+Math.cos(u*.05)*8,_=l*.35,g=o.createRadialGradient(x,v,0,x,v,_);g.addColorStop(0,`rgba(150, 185, 255, ${.22*m})`),g.addColorStop(.2,`rgba(120, 160, 240, ${.14*m})`),g.addColorStop(.45,`rgba(90, 130, 215, ${.07*m})`),g.addColorStop(.7,`rgba(60, 90, 180, ${.03*m})`),g.addColorStop(1,"transparent"),o.fillStyle=g,o.fillRect(x-_,v-_,_*2,_*2);const S=l*.12,b=c*.5+Math.sin(u*.08)*10,A=l*.28,w=.6+.4*Math.sin(u*.14+1),C=o.createRadialGradient(S,b,0,S,b,A);C.addColorStop(0,`rgba(80, 130, 230, ${.12*w})`),C.addColorStop(.4,`rgba(60, 100, 200, ${.06*w})`),C.addColorStop(1,"transparent"),o.fillStyle=C,o.fillRect(S-A,b-A,A*2,A*2);const P=l*.88,B=c*.42+Math.cos(u*.06)*8,R=l*.25,E=.5+.5*Math.sin(u*.16+2),L=o.createRadialGradient(P,B,0,P,B,R);L.addColorStop(0,`rgba(140, 110, 230, ${.1*E})`),L.addColorStop(.4,`rgba(110, 80, 200, ${.05*E})`),L.addColorStop(1,"transparent"),o.fillStyle=L,o.fillRect(P-R,B-R,R*2,R*2);for(const k of t.current){const Y=.35+.65*Math.sin(u*k.speed+k.phase),z=k.r*Y,W=.3+.7*Y;if(z>.8){const V=o.createRadialGradient(k.x,k.y,0,k.x,k.y,z*3);V.addColorStop(0,`rgba(180, 200, 255, ${.1*W})`),V.addColorStop(1,"transparent"),o.fillStyle=V,o.fillRect(k.x-z*3,k.y-z*3,z*6,z*6)}o.beginPath(),o.arc(k.x,k.y,Math.max(z,.25),0,Math.PI*2),o.fillStyle=`rgba(210, 225, 255, ${W*.8})`,o.fill()}for(const k of n.current){const Y=(u*k.speed*20+k.phase*100)%c,z=c-Y,W=k.x+Math.sin(u*k.drift+k.phase)*25,V=Math.min(Y/(c*.1),1),G=Math.min((c-Y)/(c*.15),1),Z=.4*V*G;if(Z<.01)continue;const O=o.createLinearGradient(W,z,W,z+12);O.addColorStop(0,`rgba(150, 190, 255, ${Z})`),O.addColorStop(1,"transparent"),o.fillStyle=O,o.fillRect(W-.4,z,.8,12),o.beginPath(),o.arc(W,z,k.size*.7,0,Math.PI*2),o.fillStyle=`rgba(170, 200, 255, ${Z*1.2})`,o.fill()}const N=o.createRadialGradient(l*.5,c*.46,l*.22,l*.5,c*.46,l*.85);N.addColorStop(0,"transparent"),N.addColorStop(.6,"rgba(3, 6, 16, 0.30)"),N.addColorStop(1,"rgba(3, 6, 16, 0.70)"),o.fillStyle=N,o.fillRect(0,0,l,c),e.current=requestAnimationFrame(r)},[]);return X.useEffect(()=>(e.current=requestAnimationFrame(r),()=>cancelAnimationFrame(e.current)),[r]),y.jsx("canvas",{ref:i,style:{position:"absolute",inset:0,width:"100%",height:"100%"}})}const eK=()=>{const{t:i,lang:e}=Cr(),t=e==="en"?[{id:1,title:"M-Flow 2.0: Next-Generation Memory Architecture",excerpt:"Introducing breakthrough distributed memory system with 3x performance gains",date:"Mar 8, 2026",category:"Product",categoryColor:"rgba(100, 200, 150, 0.15)",categoryTextColor:"rgba(100, 200, 150, 0.9)"},{id:2,title:"Advancing Persistent Memory in Large Language Models",excerpt:"Novel approach to long-term context retention achieving 97.7% accuracy on Evolving Events benchmark",date:"Mar 1, 2026",category:"Research",categoryColor:"rgba(150, 150, 255, 0.15)",categoryTextColor:"rgba(150, 150, 255, 0.9)"},{id:3,title:"Flow Element Community Reaches 10K Developers Milestone",excerpt:"Celebrating our vibrant open source community and welcoming contributions",date:"Feb 22, 2026",category:"Community",categoryColor:"rgba(255, 180, 100, 0.15)",categoryTextColor:"rgba(255, 180, 100, 0.9)"},{id:4,title:"Engineering Deep Dive: Optimizing Memory Access Patterns",excerpt:"Technical analysis of cache strategies and query optimization techniques",date:"Feb 15, 2026",category:"Engineering",categoryColor:"rgba(200, 150, 255, 0.15)",categoryTextColor:"rgba(200, 150, 255, 0.9)"},{id:5,title:"Industry Report: The Future of AI Memory and Personalization",excerpt:"Market analysis and predictions for persistent memory in enterprise AI",date:"Feb 8, 2026",category:"Industry",categoryColor:"rgba(100, 220, 220, 0.15)",categoryTextColor:"rgba(100, 220, 220, 0.9)"},{id:6,title:"Join Us at AI Summit 2026: Memory and Consciousness Panel",excerpt:"Speaking engagement exploring philosophical and technical aspects of AI memory",date:"Jan 30, 2026",category:"Event",categoryColor:"rgba(220, 100, 150, 0.15)",categoryTextColor:"rgba(220, 100, 150, 0.9)"}]:[{id:1,title:"M-Flow 2.0: æ°ä¸ä»£è®°å¿æ¶æ",excerpt:"æ¨åºçªç ´æ§çåå¸å¼è®°å¿ç³»ç»ï¼æ§è½æå 3 åï¼æ¯æç¾ä¸çº§å¹¶å",date:"2026 å¹´ 3 æ 8 æ¥",category:"产å",categoryColor:"rgba(100, 200, 150, 0.15)",categoryTextColor:"rgba(100, 200, 150, 0.9)"},{id:2,title:"æ¨è¿å¤§è¯è¨æ¨¡åä¸çæä¹
è®°å¿",excerpt:"åæ°é¿æä¸ä¸æä¿çæ¹æ³ï¼å¨ Evolving Events åºåæµè¯ä¸è¾¾å° 97.7% åç¡®ç",date:"2026 å¹´ 3 æ 1 æ¥",category:"ç ç©¶",categoryColor:"rgba(150, 150, 255, 0.15)",categoryTextColor:"rgba(150, 150, 255, 0.9)"},{id:3,title:"å¿æµå
ç´ ç¤¾åºè¾¾æ 10000 åå¼åè
éç¨ç¢",excerpt:"åºç¥è¬ååå±ç弿ºç¤¾åºï¼æ¬¢è¿å
¨çå¼åè
çè´¡ç®",date:"2026 å¹´ 2 æ 22 æ¥",category:"社åº",categoryColor:"rgba(255, 180, 100, 0.15)",categoryTextColor:"rgba(255, 180, 100, 0.9)"},{id:4,title:"å·¥ç¨æ·±åº¦åæï¼ä¼åè®°å¿è®¿é®æ¨¡å¼",excerpt:"ç¼åçç¥åæ¥è¯¢ä¼åææ¯çææ¯åæ",date:"2026 å¹´ 2 æ 15 æ¥",category:"å·¥ç¨",categoryColor:"rgba(200, 150, 255, 0.15)",categoryTextColor:"rgba(200, 150, 255, 0.9)"},{id:5,title:"è¡ä¸æ¥åï¼AI è®°å¿å个æ§åçæªæ¥",excerpt:"ä¼ä¸ AI æä¹
è®°å¿å¸åºåæååå±é¢æµ",date:"2026 å¹´ 2 æ 8 æ¥",category:"è¡ä¸",categoryColor:"rgba(100, 220, 220, 0.15)",categoryTextColor:"rgba(100, 220, 220, 0.9)"},{id:6,title:"é请åå AI å³°ä¼ 2026ï¼è®°å¿ä¸æè¯è®ºå",excerpt:"æ¢è®¨ AI è®°å¿å²å¦ä¸ææ¯å±é¢ç䏻颿¼è®²",date:"2026 å¹´ 1 æ 30 æ¥",category:"æ´»å¨",categoryColor:"rgba(220, 100, 150, 0.15)",categoryTextColor:"rgba(220, 100, 150, 0.9)"}];return y.jsxs("div",{style:{minHeight:"100vh",position:"relative"},children:[y.jsxs("section",{style:{position:"relative",minHeight:"100vh",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",padding:"80px 40px",overflow:"hidden",background:"#030610"},children:[y.jsx($J,{}),y.jsxs("div",{style:{position:"relative",zIndex:1,marginTop:"-8vh"},children:[y.jsx("h1",{style:{fontSize:"clamp(40px, 6vw, 80px)",fontWeight:200,marginBottom:"28px",color:"rgba(255, 255, 255, 0.92)",letterSpacing:"-0.02em",lineHeight:1.1},children:i.news.title}),y.jsx("p",{style:{color:"rgba(255, 255, 255, 0.5)",fontSize:"clamp(16px, 1.4vw, 20px)",maxWidth:"600px",lineHeight:1.7,margin:"0 auto"},children:i.news.subtitle})]})]}),y.jsx("section",{style:{padding:"80px 40px",borderTop:"1px solid var(--line-0)",background:"var(--bg-0)"},children:y.jsxs("div",{style:{maxWidth:"var(--container)",margin:"0 auto"},children:[y.jsx("span",{style:{fontSize:"var(--fs-micro)",letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--text-3)",display:"block",marginBottom:"40px"},children:i.news.featured}),y.jsxs("article",{style:{padding:"48px",border:"1px solid var(--line-0)",borderRadius:0,background:"linear-gradient(135deg, rgba(150, 150, 255, 0.05), rgba(100, 200, 150, 0.05)
6271)",cursor:"pointer",transition:"all var(--t-mid) var(--ease)"},onMouseOver:n=>{n.currentTarget.style.borderColor="var(--line-1)",n.currentTarget.style.transform="translateY(-4px)"},onMouseOut:n=>{n.currentTarget.style.borderColor="var(--line-0)",n.currentTarget.style.transform="translateY(0)"},children:[y.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"16px",marginBottom:"20px"},children:[y.jsx("span",{style:{display:"inline-block",padding:"6px 12px",borderRadius:0,background:"rgba(100, 200, 150, 0.15)",color:"rgba(100, 200, 150, 0.9)",fontSize:"var(--fs-micro)",letterSpacing:"0.08em",textTransform:"uppercase"},children:"Product"}),y.jsx("span",{style:{fontSize:"var(--fs-micro)",color:"var(--text-2)"},children:"Mar 8, 2026"})]}),y.jsx("h2",{style:{fontSize:"clamp(24px, 3vw, 42px)",fontWeight:300,color:"var(--text-0)",marginBottom:"16px",lineHeight:1.3},children:t[0].title}),y.jsx("p",{style:{fontSize:"var(--fs-body-lg)",color:"var(--text-1)",lineHeight:1.7,maxWidth:"700px"},children:t[0].excerpt})]})]})}),y.jsx("section",{style:{padding:"80px 40px",borderTop:"1px solid var(--line-0)",background:"var(--bg-0)"},children:y.jsxs("div",{style:{maxWidth:"var(--container)",margin:"0 auto"},children:[y.jsx("span",{style:{fontSize:"var(--fs-micro)",letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--text-3)",display:"block",marginBottom:"40px"},children:i.news.articles}),y.jsx("div",{className:"rsp-grid-3",style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"32px"},children:t.slice(1).map(n=>y.jsxs("article",{style:{padding:"32px",border:"1px solid var(--line-0)",borderRadius:0,background:"linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01))",transition:"all var(--t-mid) var(--ease)",cursor:"pointer",display:"flex",flexDirection:"column"},onMouseOver:r=>{r.currentTarget.style.borderColor="var(--line-1)",r.currentTarget.style.transform="translateY(-4px)"},onMouseOut:r=>{r.currentTarget.style.borderColor="var(--line-0)",r.currentTarget.style.transform="translateY(0)"},children:[y.jsxs("div",{style:{marginBottom:"16px"},children:[y.jsx("span",{style:{display:"inline-block",padding:"4px 10px",borderRadius:0,background:n.categoryColor,color:n.categoryTextColor,fontSize:"var(--fs-micro)",letterSpacing:"0.08em",textTransform:"uppercase",marginBottom:"12px"},children:n.category}),y.jsx("p",{style:{fontSize:"var(--fs-micro)",color:"var(--text-2)",margin:0},children:n.date})]}),y.jsx("h3",{style:{fontSize:"var(--fs-h4)",fontWeight:300,color:"var(--text-0)",marginBottom:"12px",lineHeight:1.4,flex:1},children:n.title}),y.jsx("p",{style:{fontSize:"var(--fs-body)",color:"var(--text-2)",lineHeight:1.6,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:n.excerpt})]},n.id))})]})})]})},tK=()=>{const{t:i}=Cr(),[e,t]=X.useState(null),n=[{id:"mflow",title:i.docs.mflowTitle,subtitle:i.docs.mflowSubtitle,description:i.docs.mflowDesc,status:"available",statusLabel:i.docs.mflowStatus,href:"https://docs.m-flow.ai",accent:"rgba(100, 220, 220, 0.15)",accentBorder:"rgba(100, 220, 220, 0.4)",icon:y.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",children:[y.jsx("path",{d:"M16 4L4 10V22L16 28L28 22V10L16 4Z",stroke:"rgba(100, 220, 220, 0.6)",strokeWidth:"1.5",fill:"none"}),y.jsx("path",{d:"M16 4V16M16 16L4 10M16 16L28 10",stroke:"rgba(100, 220, 220, 0.4)",strokeWidth:"1"}),y.jsx("circle",{cx:"16",cy:"16",r:"3",fill:"rgba(100, 220, 220, 0.3)",stroke:"rgba(100, 220, 220, 0.6)",strokeWidth:"1"})]})},{id:"metacognition",title:i.docs.metaTitle,subtitle:i.docs.metaSubtitle,description:i.docs.metaDesc,status:"coming_soon",statusLabel:i.docs.metaStatus,href:void 0,accent:"rgba(150, 130, 255, 0.12)",accentBorder:"rgba(150, 130, 255, 0.3)",icon:y.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",children:[y.jsx("circle",{cx:"16",cy:"16",r:"11",stroke:"rgba(150, 130, 255, 0.5)",strokeWidth:"1.5",fill:"none"}),y.jsx("path",{d:"M12 14C12 14 13.5 12 16 12C18.5 12 20 14 20 14",stroke:"rgba(150, 130, 255, 0.4)",strokeWidth:"1",strokeLinecap:"round"}),y.jsx("path",{d:"M11 20C11 20 13 22 16 22C19 22 21 20 21 20",stroke:"rgba(150, 130, 255, 0.4)",strokeWidth:"1",strokeLinecap:"round"}),y.jsx("circle",{cx:"16",cy:"16",r:"2",fill:"rgba(150, 130, 255, 0.3)",stroke:"rgba(150, 130, 255, 0.5)",strokeWidth:"1"})]})}];return y.jsx("div",{style:{minHeight:"100vh",position:"relative"},children:y.jsxs("section",{style:{minHeight:"100vh",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"120px 40px 80px",background:` 6272 radial-gradient(600px 400px at 50% 30%, rgba(100, 220, 220, 0.06), transparent 60%), 6273 radial-gradient(400px 300px at 70% 60%, rgba(150, 130, 255, 0.04), transparent 50%), 6274 var(--bg-0) 6275 `},children:[y.jsx("h1",{style:{fontSize:"var(--fs-h1)",fontWeight:300,marginBottom:"16
6275px",color:"var(--text-0)",letterSpacing:"-0.02em",textAlign:"center"},children:i.docs.title}),y.jsx("p",{style:{color:"var(--text-2)",fontSize:"var(--fs-body-lg)",maxWidth:"540px",lineHeight:1.6,textAlign:"center",marginBottom:"72px"},children:i.docs.subtitle}),y.jsx("div",{className:"rsp-grid-2",style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"32px",maxWidth:"900px",width:"100%"},children:n.map(r=>{const s=e===r.id,o=r.status==="available";return y.jsxs("a",{href:r.href,target:o?"_blank":void 0,rel:o?"noopener noreferrer":void 0,onMouseEnter:()=>t(r.id),onMouseLeave:()=>t(null),style:{display:"flex",flexDirection:"column",padding:"48px 40px",border:`1px solid ${s?r.accentBorder:"var(--line-0)"}`,borderRadius:0,background:s?`linear-gradient(135deg, ${r.accent}, transparent 70%)`:"rgba(255,255,255,0.015)",transition:"all 0.35s cubic-bezier(0.4, 0, 0.2, 1)",cursor:o?"pointer":"default",textDecoration:"none",transform:s&&o?"translateY(-6px)":"translateY(0)",position:"relative",overflow:"hidden",minHeight:"320px"},children:[y.jsx("div",{style:{position:"absolute",top:"24px",right:"24px",padding:"4px 12px",fontSize:"11px",letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:500,borderRadius:"2px",border:`1px solid ${o?"rgba(100, 220, 220, 0.3)":"rgba(150, 130, 255, 0.2)"}`,color:o?"rgba(100, 220, 220, 0.8)":"var(--text-3)",background:o?"rgba(100, 220, 220, 0.06)":"rgba(150, 130, 255, 0.04)"},children:r.statusLabel}),y.jsx("div",{style:{marginBottom:"28px",opacity:.9},children:r.icon}),y.jsx("h2",{style:{fontSize:"var(--fs-h3)",fontWeight:400,color:"var(--text-0)",marginBottom:"8px",letterSpacing:"-0.01em"},children:r.title}),y.jsx("span",{style:{fontSize:"var(--fs-body)",color:"var(--text-1)",fontWeight:300,marginBottom:"20px"},children:r.subtitle}),y.jsx("p",{style:{fontSize:"var(--fs-body)",color:"var(--text-2)",lineHeight:1.7,margin:0,flex:1},children:r.description}),o&&y.jsxs("div",{style:{marginTop:"28px",display:"flex",alignItems:"center",gap:"8px",fontSize:"var(--fs-body)",fontWeight:400,color:s?"rgba(100, 220, 220, 0.9)":"var(--text-1)",transition:"color 0.3s ease"},children:[i.docs.viewDocs,y.jsx("span",{style:{display:"inline-block",transition:"transform 0.3s ease",transform:s?"translateX(4px)":"translateX(0)"},children:"â"})]})]},r.id)})})]})})},nK=({state:i})=>{const[e,t]=X.useState("");return X.useEffect(()=>{if(i!=="loading"){t("");return}const n=setInterval(()=>{t(r=>r.length>=3?"":r+".")},300);return()=>clearInterval(n)},[i]),i==="loading"?y.jsx("span",{style:{fontSize:"1.2rem",fontWeight:"bold",letterSpacing:"2px",minWidth:"24px",textAlign:"center"},children:e||"."}):i==="success"?y.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",style:{overflow:"visible"},children:[y.jsx("path",{d:"M4 12 L9 17 L20 6",style:{strokeDasharray:24,strokeDashoffset:0,animation:"checkmarkDraw 0.4s ease-out forwards"}}),y.jsx("style",{children:` 6276 @keyframes checkmarkDraw { 6277 from { 6278 strokeDashoffset: 24; 6279 } 6280 to { 6281 strokeDashoffset: 0; 6282 } 6283 } 6284 `})]}):y.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[y.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),y.jsx("polyline",{points:"12 5 19 12 12 19"})]})};class s0{constructor(e=0,t="Network Error"){this.status=e,this.text=t}}const iK=()=>{if(!(typeof localStorage>"u"))return{get:i=>Promise.resolve(localStorage.getItem(i)),set:(i,e)=>Promise.resolve(localStorage.setItem(i,e)),remove:i=>Promise.resolve(localStorage.removeItem(i))}},tr={origin:"https://api.emailjs.com",blockHeadless:!1,storageProvider:iK()},$w=i=>i?typeof i=="string"?{publicKey:i}:i.toString()==="[object Object]"?i:{}:{},rK=(i,e="https://api.emailjs.com")=>{if(!i)return;const t=$w(i);tr.publicKey=t.publicKey,tr.blockHeadless=t.blockHeadless,tr.storageProvider=t.storageProvider,tr.blockList=t.blockList,tr.limitRate=t.limitRate,tr.origin=t.origin||e},$F=async(i,e,t={})=>{const n=await fetch(tr.origin+i,{method:"POST",headers:t,body:e}),r=await n.text(),s=new s0(n.status,r);if(n.ok)return s;throw s},eN=(i,e,t)=>
6284{if(!i||typeof i!="string")throw"The public key is required. Visit https://dashboard.emailjs.com/admin/account";if(!e||typeof e!="string")throw"The service ID is required. Visit https://dashboard.emailjs.com/admin";if(!t||typeof t!="string")throw"The template ID is required. Visit https://dashboard.emailjs.com/admin/templates"},sK=i=>{if(i&&i.toString()!=="[object Object]")throw"The template params have to be the object. Visit https://www.emailjs.com/docs/sdk/send/"},tN=i=>i.webdriver||!i.languages||i.languages.length===0,nN=()=>new s0(451,"Unavailable For Headless Browser"),oK=(i,e)=>{if(!Array.isArray(i))throw"The BlockList list has to be an array";if(typeof e!="string")throw"The BlockList watchVariable has to be a string"},aK=i=>{var e;return!((e=i.list)!=null&&e.length)||!i.watchVariable},lK=(i,e)=>i instanceof FormData?i.get(e):i[e],iN=(i,e)=>{if(aK(i))return!1;oK(i.list,i.watchVariable);const t=lK(e,i.watchVariable);return typeof t!="string"?!1:i.list.includes(t)},rN=()=>new s0(403,"Forbidden"),cK=(i,e)=>{if(typeof i!="number"||i<0)throw"The LimitRate throttle has to be a positive number";if(e&&typeof e!="string")throw"The LimitRate ID has to be a non-empty string"},uK=async(i,e,t)=>{const n=Number(await t.get(i)||0);return e-Date.now()+n},sN=async(i,e,t)=>{if(!e.throttle||!t)return!1;cK(e.throttle,e.id);const n=e.id||i;return await uK(n,e.throttle,t)>0?!0:(await t.set(n,Date.now().toString()),!1)},oN=()=>new s0(429,"Too Many Requests"),dK=async(i,e,t,n)=>{const r=$w(n),s=r.publicKey||tr.publicKey,o=r.blockHeadless||tr.blockHeadless,a=r.storageProvider||tr.storageProvider,l={...tr.blockList,...r.blockList},c={...tr.limitRate,...r.limitRate};return o&&tN(navigator)?Promise.reject(nN()):(eN(s,i,e),sK(t),t&&iN(l,t)?Promise.reject(rN()):await sN(location.pathname,c,a)?Promise.reject(oN()):$F("/api/v1.0/email/send",JSON.stringify({lib_version:"4.4.1",user_id:s,service_id:i,template_id:e,template_params:t}),{"Content-type":"application/json"}))},fK=i=>{if(!i||i.nodeName!=="FORM")throw"The 3rd parameter is expected to be the HTML form element or the style selector of the form"},hK=i=>typeof i=="string"?document.querySelector(i):i,pK=async(i,e,t,n)=>{const r=$w(n),s=r.publicKey||tr.publicKey,o=r.blockHeadless||tr.blockHeadless,a=tr.storageProvider||r.storageProvider,l={...tr.blockList,...r.blockList},c={...tr.limitRate,...r.limitRate};if(o&&tN(navigator))return Promise.reject(nN());const u=hK(t);eN(s,i,e),fK(u);const d=new FormData(u);return iN(l,d)?Promise.reject(rN()):await sN(location.pathname,c,a)?Promise.reject(oN()):(d.append("lib_version","4.4.1"),d.append("service_id",i),d.append("template_id",e),d.append("user_id",s),$F("/api/v1.0/email/send-form",d))},z3={init:rK,send:dK,sendForm:pK,EmailJSResponseStatus:s0},H3="service_6embhnb",mK="template_dj61c0e",gK="template_or994mn",G3="TSGMjzFpPYCo3dDD8",Oa={width:"100%",padding:"10px 16px",fontSize:"13px",outline:"none",backgroundColor:"rgba(255, 255, 255, 0.04)",border:"1px solid rgba(255, 255, 255, 0.08)",borderRadius:"10px",color:"#fff",fontFamily:"var(--font-sans)",transition:"border-color 0.25s ease"},Bl={fontSize:"11px",color:"rgba(255,255,255,0.35)",letterSpacing:"0.06em",textTransform:"uppercase",fontFamily:"var(--font-mono, monospace)",marginBottom:"6px",display:"block"},xK=({salesMode:i=!1,onSalesModeClose:e,jobMode:t=!1,onJobModeClose:n,onNavigateToTab:r})=>{const{lang:s}=Cr(),[o,a]=X.useState(""),[l,c]=X.useState(""),[u,d]=X.useState("idle"),[p,m]=X.useState(!1),[x,v]=X.useState(!1),[_,g]=X.useState(""),S=X.useRef(null),b=X.useRef(null),[A,w]=X.useState(""),[C,P]=X.useState(""),[B,R]=X.useState(""),[E,L]=X.useState(""),[N,k]=X.useState(""),[Y,z]=X.useState(""),[W,V]=X.useState(!1),[G,Z]=X.useState(""),[O,ee]=X.useState(""),[le,ge]=X.useState(""),[Se,Ye]=X.useState(""),[K,q]=X.useState(!1);X.useEffect(()=>{i&&(q(!1),V(!0),v(!0))},[i]),X.useEffect(()=>{t&&(V(!1),q(!0),v(!0))},[t]);const re=s==="zh",Ce=()=>{V(!1),v(!1),e==null||e()},Te=()=>{q(!1),v(!1),n==null||n()},De=()=>["--- Contact Sales Form ---",`Name: ${A||"-"}`,`Company: ${C||"-"}`,`Role: ${B||"-"}`,`Scale: ${E||"-"}`,`Use Case: ${N||"-"}`,`Note: ${Y||"-"}`].join(` 6285`),tt=()=>["--- Job Application Form ---",`Name: ${G||"-"}`,`Position: ${O||"-"}`,`Portfolio / GitHub: ${le||"-"}`,`Introduction: ${Se||"-"}`].join(` 6286`),Pe=async U=>{if(U.preventDefault(),!o||u==="loading")return;if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o)){g(re?"请è¾å ¥ææçé®ç®±å°å":"Please enter a valid email"),d("error"),setTimeout(()=>{d("idle"),g("")},2500);return}d("loading"),g("");const ne=W?De():K?tt():l||(re?"ï¼ç¨æ·æªçè¨ï¼":"(No message)");try{const se={from_email:o,message:ne,to_name:"Mindflow Team"};await Promise.all([z3.send(H3,mK,se,G3),z3.send(H3,gK,se,G3)]),d("success"),a(""),c(""),w(""),P(""),R(""),L(""),k(""),z(""),Z(""),ee(""),ge(""),Ye(""),v(!1),V(!1),q(!1),e==null||e(),n==null||n(),setTimeout(()=>d("idle"),3e3)}catch{d("error"),g(re?"åé失败ï¼è¯·ç¨åéè¯":"Failed to send. Please try again."),setTimeout(()=>{d("idle"),g("")},3e3)}},me=()=>{m(!0),!x&&!W&&!K&&(v(!0),setTimeout(()=>{var U;return(U=b.current)==null?void 0:U.focus()},350))},Ee=U=>{S.current&&!S.current.contains(U.relatedTarget)&&(m(!1),!o&&!l&&!W&&!K&&v(!1))},be=new Date().getFullYear(),$=re?"æ¯ä¸æ¬¡å¯¹è¯ï¼é½å¼å¾è¢«ååºã":"Every call deserves a response.",J=re?"ä½ çé®ç®±å°å":"Your email address",Ue=re?"æ³å¯¹æä»¬è¯´ç¹ä»ä¹ï¼ï¼å¯éï¼":"Leave us a message (optional)",Ne=re?["AI Agent / æºè½ä½","AI Coding","æ°å人 / AI 婿","客æ / éå®","æè² / å¹è®","æ³å¾ / ç¥è¯åº","å ¶ä»"]:["AI Agent","AI Coding","Digital Human / AI Assistant","Customer Service / Sales","Education / Training","Legal / Knowledge Base","Other"],Ae=W||K?"18vh":x||W||K?"42vh":"50vh";return y.jsxs("div",{id:"get-in-touch",children:[y.jsx("style",{children:` 6287 .get-in-touch-input::placeholder { color: rgba(255,255,255,0.5); opacity: 1; } 6288 .get-in-touch-textarea::placeholder { color: rgba(255,255,255,0.35); opacity: 1; } 6289 .sales-field::placeholder { color: rgba(255,255,255,0.3); opacity: 1; } 6290 .sales-field:focus { border-color: rgba(255,255,255,0.2) !important; } 6291 @keyframes reflectionFloat { 6292 0%, 100% { transform: translateX(-50%) scaleY(-1) perspective(1000px) rotateX(10deg) translateY(0px); } 6293 50% { transform: translateX(-50%) scaleY(-1) perspective(1000px) rotateX(11deg) translateY(2px); } 6294 } 6295 @keyframes waveFlow { from { background-position-y: 0; }
6295 to { background-position-y: 20px; } } 6296 .input-reflection { 6297 animation: reflectionFloat 5s ease-in-out infinite; 6298 filter: url(#waterDistortion) blur(0.5px); 6299 } 6300 .input-reflection::before { 6301 content: ''; position: absolute; inset: -5px; border-radius: inherit; 6302 background: repeating-linear-gradient(180deg, transparent 0px, rgba(255,255,255,0.04) 1px, transparent 4px); 6303 background-size: 100% 8px; animation: waveFlow 3s linear infinite; pointer-events: none; 6304 } 6305 @keyframes shake { 6306 0%, 100% { transform: translateX(0); } 6307 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 6308 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } 6309 } 6310 `}),y.jsx("svg",{style:{position:"absolute",width:0,height:0},children:y.jsx("defs",{children:y.jsxs("filter",{id:"waterDistortion",x:"-20%",y:"-20%",width:"140%",height:"140%",children:[y.jsx("feTurbulence",{type:"fractalNoise",baseFrequency:"0.018 0.08",numOctaves:2,seed:3,result:"turbulence",children:y.jsx("animate",{attributeName:"baseFrequency",dur:"12s",values:"0.015 0.07;0.022 0.10;0.015 0.07",calcMode:"spline",keySplines:"0.4 0 0.6 1; 0.4 0 0.6 1",repeatCount:"indefinite"})}),y.jsx("feDisplacementMap",{in:"SourceGraphic",in2:"turbulence",scale:12,xChannelSelector:"R",yChannelSelector:"G",children:y.jsx("animate",{attributeName:"scale",dur:"8s",values:"12;18;12",calcMode:"spline",keySplines:"0.4 0 0.6 1; 0.4 0 0.6 1",repeatCount:"indefinite"})})]})})}),y.jsxs("section",{style:{position:"fixed",bottom:0,left:0,right:0,height:"100vh",backgroundColor:"#000",color:"#fff",display:"flex",flexDirection:"column",zIndex:1,overflow:"hidden"},children:[y.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:0,pointerEvents:"auto",background:"#000"},children:y.jsx(lJ,{})}),y.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start",paddingTop:Ae,position:"relative",zIndex:1,pointerEvents:"none",transition:"padding-top 0.5s cubic-bezier(0.16, 1, 0.3, 1)",overflowY:"auto"},children:[y.jsxs("form",{ref:S,onSubmit:Pe,onBlur:Ee,style:{width:"100%",maxWidth:W||K?"520px":"480px",pointerEvents:"auto",animation:u==="error"?"shake 0.4s ease":"none",transition:"max-width 0.4s ease"},children:[!W&&!K&&y.jsx("div",{style:{overflow:"hidden",maxHeight:x?"120px":"0",marginBottom:x?"12px":"0",opacity:x?1:0,transition:"all 0.35s cubic-bezier(0.16, 1, 0.3, 1)"},children:y.jsx("textarea",{ref:b,value:l,onChange:U=>c(U.target.value),placeholder:Ue,className:"get-in-touch-textarea",rows:3,style:{...Oa,padding:"14px 20px",borderRadius:"16px",resize:"none",lineHeight:1.6,border:p?"1px solid rgba(255,255,255,0.15)":"1px solid rgba(255,255,255,0.08)"}})}),y.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"var(--s-2)",width:"100%",padding:"6px 6px 6px 20px",borderRadius:"9999px",backgroundColor:"rgba(255,255,255,0.06)",backdropFilter:"blur(20px)",WebkitBackdropFilter:"blur(20px)",border:p?"1px solid rgba(255,255,255,0.2)":"1px solid rgba(255,255,255,0.1)",boxShadow:p?"0 0 0 3px rgba(255,255,255,0.06)":"none",transition:"border-color 0.3s ease, box-shadow 0.3s ease"},children:[y.jsx("input",{type:"email",value:o,onChange:U=>{a(U.target.value),g("")},onFocus:me,placeholder:x||W||K?J:$,disabled:u==="loading",className:"get-in-touch-input",style:{flex:1,padding:"6px 8px",fontSize:"var(--fs-body)",border:"none",outline:"none",backgroundColor:"transparent",color:"#fff",fontFamily:"var(--font-sans)"}}),y.jsx("button",{type:"submit",disabled:u==="loading"||!o,style:{width:"32px",height:"32px",borderRadius:"var(--r-pill)",backgroundColor:u==="success"?"#4ade80":u==="error"?"#f87171":"rgba(255,255,255,0.9)",color:"#000",border:"1px solid rgba(255,255,255,0.1)",cursor:u==="loading"||!o?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"center",opacity:u==="idle"&&!o?.4:1,transition:"all 0.3s ease",flexShrink:0,position:"relative",zIndex:10,transform:u==="success"?"scale(1.05)":"scale(1)"},children:y.jsx(nK,{state:u==="error"?"idle":u})})]}),!W&&!K&&x&&y.jsxs("div",{style:{display:"flex",justifyContent:"center",gap:"10px",marginTop:"14px"},children:[y.jsx("button",{type:"button",onClick:()=>{V(!0),q(!1)},style:{padding:"7px 18px",fontSize:"12px",fontWeight:400,color:"rgba(255,255,255,0.55)",backgroundColor:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:"9999px",cursor:"pointer",fontFamily:"var(--font-sans)",transition:"all 0.25s ease",letterSpacing:"0.02em"},onMouseOver:U=>{U.currentTarget.style.backgroundColor="rgba(255,255,255,0.08)",U.currentTarget.style.color="rgba(255,255,255,0.85)",U.currentTarget.style.borderColor="rgba(255,255,255,0.2)"},onMouseOut:U=>{U.currentTarget.style.backgroundColor="rgba(255,255,255,0.04)",U.currentTarget.style.color="rgba(255,255,255,0.55)",U.currentTarget.style.borderColor="rgba(255,255,255,0.1)"},children:re?"åå¡å¨è¯¢":"Contact Sales"}),y.jsx("button",{type:"button",onClick:()=>{q(!0),V(!1)},style:{padding:"7px 18px",fontSize:"12px",fontWeight:400,color:"rgba(255,255,255,0.55)",backgroundColor:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:"9999px",cursor:"pointer",fontFamily:"var(--font-sans)",transition:"all 0.25s ease",letterSpacing:"0.02em"},onMouseOver:U=>{U.currentTarget.style.backgroundColor="rgba(255,255,255,0.08)",U.currentTarget.style.color="rgba(255,255,255,0.85)",U.currentTarget.style.borderColor="rgba(255,255,255,0.2)"},onMouseOut:U=>{U.currentTarget.style.backgroundColor="rgba(255,255,255,0.04)",U.currentTarget.style.color="rgba(255,255,255,0.55)",U.currentTarget.style.borderColor="rgba(255,255,255,0.1)"},children:re?"å å ¥æä»¬":"Join Us"})]}),y.jsx("div",{style:{overflow:"hidden",maxHeight:W?"600px":"0",opacity:W?1:0,marginTop:W?"16px":"0",transition:"all 0.45s cubic-bezier(0.16, 1, 0.3, 1)"},children:y.jsxs("div",{style:{padding:"24px",backgroundColor:"rgba(255,255,255,0.03)",backdropFilter:"blur(20px)",WebkitBackdropFilter:"blur(20px)",border:"1px solid rgba(255,255,255,0.08)",borderRadius:"16px",position:"relative"},children:[y.jsx("button",{type:"button",onClick:Ce,style:{position:"absolute",top:"12px",right:"12px",background:"none",border:"none",cursor:"pointer",color:"rgba(255,255,255,0.3)",padding:"4px",display:"flex",alignItems:"center",justifyContent:"center",transition:"color 0.2s ease"},onMouseOver:U=>{U.currentTarget.style.color="rgba(255,255,255,0.7)"},onMouseOut:U=>{U.currentTarget.style.color="rgba(255,255,255,0.3)"},children:y.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:y.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})}),y.jsx("div",{style:{fontSize:"14px",fontWeight:500,color:"rgba(255,255,255,0.85)",marginBottom:"4px"},children:re?"é¢çº¦åå¡å¨è¯¢":"Book a Sales Consultation"}),y.jsx("div",{style:{fontSize:"12px",color:"rgba(255,255,255,0.3)",marginBottom:"20px",lineHeight:1.5},children:re?"å¡«å以ä¸ä¿¡æ¯ï¼æä»¬çå¢éå°å¨ 24 å°æ¶å ä¸ä½ èç³»ã":"Fill in the details below and our team will reach out within 24 hours."}),y.jsxs("div",{className:"rsp-grid-2",style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"12px",marginBottom:"12px"},children:[y.jsxs("div",{children:[y.jsx("label",{style:Bl,children:re?"å§å":"Name"}),y.jsx("input",{value:A,onChange:U=>w(U.target.value),placeholder:re?"ä½ çåå":"Your name",className:"sales-field",style:Oa})]}),y.jsxs("div",{children:[y.jsx("label",{style:Bl,children:re?"å ¬å¸":"Company"}),y.jsx("input",{value:C,onChange:U=>P(U.target.value),placeholder:re?"å ¬å¸åç§°":"Company name",className:"sales-field",style:Oa})]})]}),y.jsxs("div",{style:{marginBottom:"12px"},children:[y.jsx("label",{style:Bl,children:re?"使ç¨åºæ¯":"Use Case"}),y.jsxs("select",{value:N,onChange:U=>k(U.target.value),className:"sales-field",style:{...Oa,appearance:"none",backgroundImage:`url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23666' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E")`,backgroundRepeat:"no-repeat",backgroundPosition:"right 12px center",paddingRight:"32px",cursor:"pointer",color:N?"#fff":"rgba(255,255,255,0.3)"},children:[y.jsx("option",{value:"",style:{background:"#1a1a1a"},children:re?"éæ©åºæ¯":"Select use case"}),Ne.map(U=>y.jsx("option",{value:U,style:{background:"#1a1a1a",color:"#fff"},children:U},U))]})]}),y.jsxs("div",{children:[y.jsx("label",{style:Bl,children:re?"è¡¥å 说æï¼å¯éï¼":"Additional Notes (optional)"}),y.jsx("textarea",{value:Y,onChange:U=>z(U.target.value),placeholder:re?"å ³äºä½ çéæ±ï¼æ³è¡¥å çå 容...":"Anything else you'd like us to know...",className:"sales-field",rows:2,style:{...Oa,resize:"none",lineHeight:1.5}})]})]})}),y.jsx("div",{style:{overflow:"hidden",maxHeight:K?"600px":"0",opacity:K?1:0,marginTop:K?"16px":"0",transition:"all 0.45s cubic-bezier(0.16, 1, 0.3, 1)"},children:y.jsxs("div",{style:{padding:"24px",backgroundColor:"rgba(255,255,255,0.03)",backdropFilter:"blur(20px)",WebkitBackdropFilter:"blur(20px)",border:"1px solid rgba(255,255,255,0.08)",borderRadius:"16px",position:"relative"},children:[y.jsx("button",{type:"button",onClick:Te,style:{position:"absolute",top:"12px",right:"12px",background:"none",border:"none",cursor:"pointer",color:"rgba(255,255,255,0.3)",padding:"4px",display:"flex",alignItems:"center",justifyContent:"center",transition:"color 0.2s ease"},onMouseOver:U=>{U.currentTarget.style.color="rgba(255,255,255,0.7)"},onMouseOut:U=>{U.currentTarget.style.color="rgba(255,255,255,0.3)"},children:y.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:y.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})}),y.jsx("div",{style:{fontSize:"14px",fontWeight:500,color:"rgba(255,255,255,0.85)",marginBottom:"4px"},children:re?"å å ¥æä»¬":"Join Our Team"}),y.jsxs("div",{className:"rsp-grid-2",style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"12px",marginBottom:"12px"},children:[y.jsxs("div",{children:[y.jsx("label",{style:Bl,children:re?"å§å":"Name"}),y.jsx("input",{value:G,onChange:U=>Z(U.target.value),placeholder:re?"ä½ çåå":"Your name",className:"sales-field",style:Oa})]}),y.jsxs("div",{children:[y.jsx("label",{style:Bl,children:re?"ç³è¯·èä½":"Position"}),y.jsx("input",{value:O,onChange:U=>ee(U.target.value),placeholder:re?"ä½ æ³ç³è¯·çèä½":"Position you're applying for",className:"sales-field",style:Oa})]})]}),y.jsxs("div",{style:{marginBottom:"12px"},children:[y.jsx("label",{style:Bl,children:re?"ä¸ªäººé¾æ¥":"Portfolio / GitHub"}),y.jsx("input",{value:le,onChange:U=>ge(U.target.value),placeholder:re?"GitHubãLinkedIn æä¸ªäººç½ç«é¾æ¥":"GitHub, LinkedIn, or personal website URL",className:"sales-field",style:Oa})]}),y.jsxs("div",{children:[y.jsx("label",{style:Bl,children:re?"ç®è¦ä»ç»":"Brief Introduction"}),y.jsx("textarea",{value:Se,onChange:U=>Ye(U.target.value),placeholder:re?"ç®åä»ç»ä½ èªå·±ãç¸å ³ç»éªå为ä»ä¹æ³å å ¥...":"Tell us about yourself, your experience, and why you want to join...",className:"sales-field",rows:3,style:{...Oa,resize:"none",lineHeight:1.5}})]})]})}),y.jsxs("div",{style:{textAlign:"center",marginTop:"12px",fontSize:"12px",fontFamily:"var(--font-sans)",minHeight:"18px"},children:[u==="success"&&y.jsx("span",{style:{color:"#4ade80"},children:re?"å·²åéï¼æä»¬ä¼å°½å¿«åå¤ä½ â":"Sent! We'll get back to you soon â"}),u==="error"&&_&&y.jsx("span",{style:{color:"#f87171"},children:_}),u==="idle"&&(x||W||K)&&y.jsx("span",{style:{color:"rgba(255,255,255,0.25)"},children:W?re?"å¡«åé®ç®±åç¹å»åéï¼æä»¬å°å¨ 24 å°æ¶å èç³»ä½ ":"Enter your email and submit â we'll reach out within 24 hours":K?re?"å¡«åé®ç®±åç¹å»åéï¼æä»¬å°å®¡é ä½ çç³è¯·":"Enter your email and submit â we'll review your application":re?"ä½ çä¿¡æ¯å°åéè³æä»¬çå¢éé®ç®±":"Your message will be sent to our team"})]})]}),!W&&!K&&y.jsxs("div",{className:"input-reflection",style:{position:"absolute",top:x?"72%":"74%",left:"50%",width:"100%",maxWidth:"480px",padding:"6px 6px 6px 20px",borderRadius:"9999px",backgroundColor:"rgba(255,255,255,0.06)",border:"1px solid rgba(255,255,255,0.1)",opacity:.66,pointerEvents:"none",zIndex:2,overflow:"hidden",display:"flex",alignItems:"center",gap:"var(--s-2)",transition:"top 0.4s cubic-bezier(0.16, 1, 0.3, 1)"},children:[y.jsx("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,background:"linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0) 100%)",pointerEvents:"none"}}),y.jsx("div",{style:{flex:1,padding:"6px 8px",fontSize:"var(--fs-body)",color:"rgba(255,255,255,0.9)",fontFamily:"var(--font-sans)",opacity:.7},children:o||$}),y.jsx("div",{style:{width:"32px",height:"32px",borderRadius:"var(--r-pill)",backgroundColor:"rgba(255,255,255,0.9)",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,opacity:o?1:.4},children:y.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#000",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:y.jsx("path",{d:"M5 12h14M12 5l7 7-7 7"})})})]})]}),y.jsxs("footer",{style:{padding:"var(--s-5) var(--s-20)",backgroundColor:"rgba(255,255,255,0.03)",backdropFilter:"blur(20px)",WebkitBackdropFilter:"blur(20px)",borderTop:"1px solid rgba(255,255,255,0.08)",display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:"var(--s-4)"},children:[y.jsxs("div",{style:{color:"rgba(255,255,255,0.52)",fontSize:"var(--fs-small)",fontFamily:"var(--font-sans)"},children:["© ",be," ",re?"å¿æµå ç´ ":"Flow Element",". All rights reserved."]}),y.jsx("div",{style:{display:"flex",gap:"var(--s-6)"},children:y.jsx("a",{href:"#",onClick:U=>
6310{U.preventDefault(),r==null||r("company")},style:{color:"rgba(255,255,255,0.72)",fontSize:"var(--fs-small)",textDecoration:"none",fontFamily:"var(--font-sans)",borderBottom:"1px solid transparent",paddingBottom:"2px",transition:"color 0.2s ease, border-color 0.2s ease",cursor:"pointer"},onMouseOver:U=>{U.currentTarget.style.color="rgba(255,255,255,0.92)",U.currentTarget.style.borderBottomColor="rgba(255,255,255,0.24)"},onMouseOut:U=>{U.currentTarget.style.color="rgba(255,255,255,0.72)",U.currentTarget.style.borderBottomColor="transparent"},children:re?"å
³äºæä»¬":"About"})}),y.jsx("div",{style:{display:"flex",gap:"var(--s-4)"},children:[{label:"GitHub",icon:y.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor",children:y.jsx("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})})}].map((U,F)=>y.jsx("a",{href:"#",style:{color:"rgba(255,255,255,0.52)",display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderRadius:"var(--r-sm)",transition:"color 0.2s ease, background 0.2s ease"},"aria-label":U.label,onMouseOver:ne=>{ne.currentTarget.style.color="rgba(255,255,255,0.85)",ne.currentTarget.style.background="rgba(255,255,255,0.06)"},onMouseOut:ne=>{ne.currentTarget.style.color="rgba(255,255,255,0.52)",ne.currentTarget.style.background="transparent"},children:U.icon},F))})]})]})]})};YA.registerPlugin(Jt);const vK=()=>{const[i,e]=X.useState("home"),[t,n]=X.useState("en"),[r,s]=X.useState(null),[o,a]=X.useState(!1),[l,c]=X.useState(!1),[u,d]=X.useState(null),[p,m]=X.useState(null),[x,v]=X.useState(0),_=X.useRef(!1),[g,S]=X.useState(!1),[b,A]=X.useState(!1),[w,C]=X.useState(!1),[P,B]=X.useState(!1),R=X.useRef(null),E=X.useRef(null),L=X.useRef({}),N=X.useRef(null),k=X.useRef(null),Y=X.useRef(null),z=RB[t];X.useEffect(()=>{k.current=new Audio("/æªæ¥ç©¹é¡¶.mp3"),k.current.loop=!0,k.current.volume=.3;const K=setTimeout(()=>{k.current&&k.current.play().catch(()=>{console.log("Auto-play blocked, waiting for user interaction")})},1e3);return()=>{clearTimeout(K),k.current&&(k.current.pause(),k.current=null)}},[]);const W=()=>{k.current&&(b?(k.current.muted=!1,k.current.play().catch(()=>{})):k.current.muted=!0,A(!b))};X.useEffect(()=>{let K=null;const q=()=>{K||(K=requestAnimationFrame(()=>{const re=window.scrollY,Ce=document.documentElement.scrollHeight-window.innerHeight,Te=Ce>0?re/Ce:0,De=Math.min(1,Math.max(0,Te));if(v(De),E.current){const tt=Math.min(1,Math.max(0,(De-.65)/.15));E.current.style.opacity=String(tt),E.current.style.pointerEvents=tt>.1?"auto":"none"}K=null}))};return window.addEventListener("scroll",q,{passive:!0}),()=>{window.removeEventListener("scroll",q),K&&cancelAnimationFrame(K)}},[]),X.useEffect(()=>{_.current?(_.current=!1,requestAnimationFrame(()=>{E.current&&(E.current.style.transition="opacity 0.6s ease",E.current.style.opacity="1",E.current.style.pointerEvents="auto"),window.scrollTo({top:document.documentElement.scrollHeight,behavior:"smooth"})})):(window.scrollTo({top:0,behavior:"instant"}),v(0),E.current&&(E.current.style.transition="none",E.current.style.opacity="0",E.current.style.pointerEvents="none"))},[i]),X.useEffect(()=>{if(u&&L.current[u]){const K=L.current[u].getBoundingClientRect();m({left:K.left,top:K.bottom,width:K.width})}},[u]),X.useEffect(()=>{const K=q=>{N.current&&!N.current.contains(q.target)&&(Object.values(L.current).some(Ce=>Ce&&Ce.contains(q.target))||d(null))};return document.addEventListener("mousedown",K),()=>document.removeEventListener("mousedown",K)},[]);const V=K=>{K.preventDefault(),S(!0)},G=K=>{if(!R.current)return;const q=R.current.getBoundingClientRect(),re=K.clientY-q.top,Ce=q.height,Te=20,De=Ce-Te,tt=Math.min(1,Math.max(0,(re-Te/2)/De)),Pe=document.documentElement.scrollHeight-window.innerHeight;window.scrollTo({top:tt*Pe,behavior:"smooth"})};X.useEffect(()=>{if(!g)return;const K=re=>{if(!R.current)return;const Ce=R.current.getBoundingClientRect(),Te=re.clientY-Ce.top,De=Ce.height,tt=20,Pe=De-tt,me=Math.min(1,Math.max(0,(Te-tt/2)/Pe)),Ee=document.documentElement.scrollHeight-window.innerHeight;window.scrollTo({top:me*Ee,behavior:"auto"})},q=()=>{S(!1)};return window.addEventListener("mousemove",K),window.addEventListener("mouseup",q),()=>{window.removeEventListener("mousemove",K),window.removeEventListener("mouseup",q)}},[g]);const Z=[{id:"products",label:t==="zh"?"产å":"Products",items:[{label:"M-Flow",desc:t==="zh"?"è®°å¿å¼æ":"Memory Engine",icon:"mflow",href:"https://m-flow.ai"},{label:"Metacognition",desc:t==="zh"?"åæå¼æ":"Analysis Engine",icon:"dialogue",tab:"dialogue"}]},{id:"business",label:t==="zh"?"åä¸":"For Business",tab:"business"},{id:"developers",label:t==="zh"?"å¼åè
":"For Developers",tab:"developers"},{id:"company",label:t==="zh"?"å
¬å¸":"Company",tab:"company"},{id:"docs",label:"DOCS",tab:"docs"}],[O,ee]=X.useState(!1),[le,ge]=X.useState(!1),Se=K=>{if(K==="getintouch"){ee(!1),ge(!1),_.current=!0,e("home");return}if(K==="contactsales"){ee(!0),ge(!1),_.current=!0,e("home");return}if(K==="contactjob"){ge(!0),ee(!1),_.current=!0,e("home");return}ee(!1),ge(!1),e(K)},Ye=()=>{switch(i){case"home":return y.jsx(mJ,{onNavigateToProduct:()=>e("mflow"),onNavigateToGetStarted:()=>e("getstarted"),onNavigateToTab:Se});case"products":return y.jsx(SJ,{onNavigateToTab:Se});case"opensource":return y.jsx(bJ,{});case"company":return y.jsx(EJ,{onNavigateToTab:Se});case"resources":return y.jsx(CJ,{});case"career":return y.jsx(RJ,{});case"research":return y.jsx(PJ,{});case"events":return y.jsx(IJ,{});case"getstarted":return y.jsx(LJ,{});case"mflow":return y.jsx(BJ,{onNavigateToTab:Se});case"dialogue":return y.jsx(HJ,{onNavigateToTab:Se});case"business":return y.jsx(VJ,{onNavigateToTab:Se});case"developers":return y.jsx(QJ,{onNavigateToTab:Se});case"news":return y.jsx(eK,{});case"docs":return y.jsx(tK,{});default:return null}};return y.jsx(PB.Provider,{value:{lang:t,t:z},children:y.jsxs("div",{style:{minHeight:"100vh",backgroundColor:"var(--bg-0)",color:"var(--text-0)",fontFamily:"var(--font-sans)",overscrollBehavior:"none"},children:[y.jsx("nav",{style:{position:"fixed",top:0,left:0,right:0,zIndex:100,backdropFilter:"blur(12px) saturate(180%)",WebkitBackdropFilter:"blur(12px) saturate(180%)",background:"linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0) 100%)",maskImage:"linear-gradient(180deg, black 0%, black 60%, transparent 100%)",WebkitMaskImage:"linear-gradient(180deg, black 0%, black 60%, transparent 100%)"},children:y.jsxs("div",{style:{maxWidth:"var(--container)",margin:"0 auto",padding:"0 var(--gutter)",height:"64px",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"var(--s-8)"},children:[y.jsxs("a",{onClick:()=>e("home"),style:{fontWeight:600,letterSpacing:"0.02em",color:"var(--text-0)",textDecoration:"none",cursor:"pointer",fontSize:"1.1rem",display:"flex",alignItems:"center",gap:"8px"},children:[y.jsx("img",{src:"/logo-nav.png",alt:"",style:{height:"22px",width:"auto",filter:"invert(1)",opacity:.9}}),z.brand]}),y.jsx("button",{className:"nav-mobile-toggle",onClick:()=>B(!P),style:{background:"none",border:"none",cursor:"pointer",padding:"8px",display:"none",alignItems:"center",justifyContent:"center",marginLeft:"auto"},children:y.jsx("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-0)",strokeWidth:"1.5",strokeLinecap:"round",children:P?y.jsxs(y.Fragment,{children:[y.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"}),y.jsx("line",{x1:"6",y1:"18",x2:"18",y2:"6"})]}):y.jsxs(y.Fragment,{children:[y.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),y.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),y.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})})}
6310),y.jsx("div",{className:"nav-desktop-links",style:{display:"flex",alignItems:"center",gap:"2px",flex:1,justifyContent:"center"},children:Z.map(K=>y.jsxs("button",{ref:q=>{L.current[K.id]=q},onClick:()=>{K.tab&&e(K.tab)},onMouseEnter:()=>{Y.current&&(clearTimeout(Y.current),Y.current=null),s(K.id),K.items&&d(K.id)},onMouseLeave:()=>{s(null),K.items&&(Y.current=window.setTimeout(()=>{d(null)},400))},style:{background:r===K.id||u===K.id?"rgba(255,255,255,0.06)":"transparent",border:"none",fontSize:"13px",fontWeight:400,letterSpacing:"0",color:r===K.id||u===K.id||K.tab&&i===K.tab?"var(--text-0)":"rgba(255,255,255,0.55)",textDecoration:"none",padding:"6px 12px",borderRadius:"6px",cursor:"pointer",transition:"all 0.2s ease",whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:"4px"},children:[K.label,K.items&&y.jsx("svg",{width:"9",height:"9",viewBox:"0 0 10 10",fill:"none",style:{transform:u===K.id?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease",opacity:.5},children:y.jsx("path",{d:"M2.5 4L5 6.5L7.5 4",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})})]},K.id))}),y.jsxs("div",{className:"nav-right-actions",style:{display:"flex",alignItems:"center",gap:"4px"},children:[y.jsxs("a",{className:"nav-github-btn",href:"https://github.com/FlowElement-ai/m_flow",target:"_blank",rel:"noopener noreferrer",onMouseEnter:()=>s("github"),onMouseLeave:()=>s(null),style:{background:r==="github"?"rgba(255,255,255,0.06)":"rgba(255,255,255,0.03)",border:"1px solid var(--line-0)",fontSize:"11px",fontWeight:500,letterSpacing:"0.04em",color:"var(--text-1)",padding:"5px 10px",borderRadius:"var(--r-pill)",cursor:"pointer",transition:"background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease)",textDecoration:"none",display:"flex",alignItems:"center",gap:"5px",whiteSpace:"nowrap",borderColor:r==="github"?"var(--line-1)":"var(--line-0)"},children:[y.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:y.jsx("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})}),"GitHub"]}),y.jsx("button",{onClick:()=>a(!o),onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),style:{background:"transparent",border:"none",cursor:"pointer",padding:"6px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"var(--r-sm)",transition:"background var(--t-fast) var(--ease)",backgroundColor:l?"rgba(255,255,255,0.04)":"transparent"},children:y.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-1)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[y.jsx("circle",{cx:"12",cy:"12",r:"10"}),y.jsx("path",{d:"M2 12h20"}),y.jsx("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]})}),y.jsx("button",{onClick:W,onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),style:{background:"transparent",border:"none",cursor:"pointer",padding:"6px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"var(--r-sm)",transition:"background var(--t-fast) var(--ease)",backgroundColor:w?"rgba(255,255,255,0.04)":"transparent"},children:b?y.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-1)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[y.jsx("polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5"}),y.jsx("line",{x1:"23",y1:"9",x2:"17",y2:"15"}),y.jsx("line",{x1:"17",y1:"9",x2:"23",y2:"15"})]}):y.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-1)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[y.jsx("polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5"}),y.jsx("path",{d:"M15.54 8.46a5 5 0 0 1 0 7.07"}),y.jsx("path",{d:"M19.07 4.93a10 10 0 0 1 0 14.14"})]})})]})]})}),P&&y.jsxs("div",{className:"mobile-menu-overlay",children:[Z.map(K=>{var q;return y.jsxs("div",{children:[y.jsx("button",{onClick:()=>{K.tab&&(e(K.tab),B(!1))},children:K.label}),(q=K.items)==null?void 0:q.map(re=>y.jsxs("button",{onClick:()=>{re.tab&&(e(re.tab),B(!1)),re.href&&(window.open(re.href,"_blank"),B(!1))},style:{paddingLeft:"24px",fontSize:"14px",color:"rgba(255,255,255,0.5)"},children:[re.label,re.desc&&y.jsx("span",{style:{marginLeft:"8px",fontSize:"12px",color:"rgba(255,255,255,0.25)"},children:re.desc})]},re.label))]},K.id)}),y.jsx("a",{href:"https://github.com/FlowElement-ai/m_flow",target:"_blank",rel:"noopener noreferrer",style:{marginTop:"16px"},children:"GitHub"}),y.jsx("button",{onClick:()=>{n(t==="zh"?"en":"zh"),B(!1)},children:t==="zh"?"English":"䏿"})]}),u&&p&&(()=>{const K=Z.find(re=>re.id===u);if(!(K!=null&&K.items))return null;const q={mflow:y.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.2",children:[y.jsx("circle",{cx:"12",cy:"12",r:"3",opacity:"0.9"}),y.jsx("path",{d:"M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83",opacity:"0.4"})]}),dialogue:y.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.2",children:[y.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",opacity:"0.9"}),y.jsx("line",{x1:"8",y1:"9",x2:"16",y2:"9",opacity:"0.4"}),y.jsx("line",{x1:"8",y1:"13",x2:"13",y2:"13",opacity:"0.4"})]})};return y.jsxs(y.Fragment,{children:[y.jsx("div",{onClick:()=>d(null),style:{position:"fixed",top:"64px",left:0,right:0,bottom:0,zIndex:150}}),y.jsxs("div",{ref:N,onMouseEnter:()=>{Y.current&&(clearTimeout(Y.current),Y.current=null)},onMouseLeave:()=>{Y.current=window.setTimeout(()=>{d(null)},300)},style:{position:"fixed",top:"58px",left:`${p.left+p.width/2}px`,transform:"translateX(-50%)",zIndex:200,animation:"navDropIn 0.25s cubic-bezier(0.16,1,0.3,1)"},children:[y.jsx("style",{children:` 6311 @keyframes navDropIn { 6312 from { opacity: 0; transform: translateX(-50%) translateY(-8px) scale(0.96); } 6313 to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); } 6314 } 6315 .mf-drop-item { position: relative; overflow: hidden; } 6316 .mf-drop-item::before { 6317 content: ''; 6318 position: absolute; inset: 0; 6319 background: radial-gradient(ellipse at 30% 0%, rgba(120,140,255,0.06) 0%, transparent 70%); 6320 opacity: 0; transition: opacity 0.3s ease; 6321 } 6322 .mf-drop-item:hover::before { opacity: 1; } 6323 .mf-drop-item:hover .mf-drop-arrow { opacity: 1; transform: translateX(0); } 6324 `}),y.jsx("div",{style:{width:"1px",height:"6px",background:"linear-gradient(180deg, rgba(255,255,255,0.15), rgba(255,255,255,0.04))",margin:"0 auto"}}),y.jsx("div",{style:{background:"rgba(12, 12, 16, 0.95)",border:"1px solid rgba(255,255,255,0.06)",borderRadius:"12px",overflow:"hidden",backdropFilter:"blur(20px)",WebkitBackdropFilter:"blur(20px)",boxShadow:"0 24px 48px -12px rgba(0,0,0,0.7), 0 0 0 0.5px rgba(255,255,255,0.03) inset"},children:K.items.map((re,Ce)=>y.jsxs("button",{className:"mf-drop-item",onClick:()=>{re.href?window.open(re.href,"_blank"):re.tab&&e(re.tab),d(null)},style:{width:"100%",padding:"14px 20px",background:"transparent",border:"none",borderBottom:Ce<K.items.length-1?"1px solid rgba(255,255,255,0.04)":"none",cursor:"pointer",textAlign:"left",transition:"background 0.2s ease",display:"flex",alignItems:"center",gap:"14px",color:"rgba(255,255,255,0.5)",minWidth:"220px"},onMouseOver:Te=>{Te.currentTarget.style.background="rgba(255,255,255,0.03)"},onMouseOut:Te=>{Te.currentTarget.style.background="transparent"},children:[y.jsx("div",{style:{width:"36px",height:"36px",borderRadius:"8px",background:"rgba(255,255,255,0.03)",border:"1px solid rgba(255,255,255,0.06)",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,color:"rgba(255,255,255,0.5)"},children:re.icon&&q[re.icon]}),y.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:"1px"},children:[y.jsx("span",{style:{fontSize:"13px",fontWeight:500,color:"rgba(255,255,255,0.88)",letterSpacing:"-0.01em"},children:re.label}),re.desc&&y.jsx("span",{style:{fontSize:"11px",fontWeight:400,color:"rgba(255,255,255,0.3)"},children:re.desc})]}),y.jsx("svg",{className:"mf-drop-arrow",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",style:{opacity:0,transform:"translateX(-4px)",transition:"all 0.2s ease",flexShrink:0,color:"rgba(255,255,255,0.3)"},children:y.jsx("path",{d:"M9 18l6-6-6-6"})})]},Ce))})]})]})})(),y.jsxs("div",{style:{position:"fixed",top:"56px",right:"60px",background:"rgba(20, 20, 25, 0.92)",backdropFilter:"blur(16px) saturate(180%)",WebkitBackdropFilter:"blur(16px) saturate(180%)",border:"1px solid var(--line-0)",borderRadius:"var(--r-md)",overflow:"hidden",minWidth:"100px",zIndex:200,opacity:o?1:0,transform:o?"translateY(0)":"translateY(-8px)",pointerEvents:o?"auto":"none",transition:"opacity var(--t-mid) var(--ease), transform var(--t-mid) var(--ease)",boxShadow:"0 8px 32px rgba(0,0,0,0.6)"},children:[y.jsx("button",{onClick:()=>{n("zh"),a(!1)},style:{width:"100%",padding:"10px 14px",background:t==="zh"?"rgba(255,255,255,0.06)":"transparent",border:"none",color:"var(--text-0)",fontSize:"12px",cursor:"pointer",textAlign:"left",transition:"background var(--t-fast) var(--ease)"},onMouseOver:K=>K.currentTarget.style.background="rgba(255,255,255,0.06)",onMouseOut:K=>K.currentTarget.style.background=t==="zh"?"rgba(255,255,255,0.06)":"transparent",children:"䏿"}),y.jsx("button",{onClick:()=>{n("en"),a(!1)},style:{width:"100%",padding:"10px 14px",background:t==="en"?"rgba(255,255,255,0.06)":"transparent",border:"none",color:"var(--text-0)",fontSize:"12px",cursor:"pointer",textAlign:"left",transition:"background var(--t-fast) var(--ease)"},onMouseOver:K=>K.currentTarget.style.background="rgba(255,255,255,0.06)",onMouseOut:K=>K.currentTarget.style.background=t==="en"?"rgba(255,255,255,0.06)":"transparent",children:"English"})]}),(()=>{const K="var(--text-0)",q=g?"0 0 15px rgba(255, 255, 255, 0.6)":"0 0 8px rgba(255, 255, 255, 0.3)";return y.jsx("div",{ref:R,onClick:G,style:{position:"fixed",right:"16px",top:"50%",transform:"translateY(-50%)",width:"4px",height:"80px",backgroundColor:"rgba(0, 0, 0, 0.1)",backdropFilter:"blur(var(--blur))",WebkitBackdropFilter:"blur(var(--blur))",borderRadius:"2px",zIndex:99,border:"1px solid var(--line-0)",overflow:"visible",cursor:"pointer",transition:"border var(--t-mid) var(--ease)"},children:y.jsx("div",{onMouseDown:V,style:{position:"absolute",left:"-2px",right:"-2px",height:"20px",backgroundColor:K,borderRadius:"4px",top:`${x*60}px`,transition:g?"background-color var(--t-mid) var(--ease)":"top 0.1s ease-out, transform var(--t-fast) var(--ease), background-color var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease)",boxShadow:q,cursor:g?"grabbing":"grab",transform:g?"scaleX(1.5)":"scaleX(1)"}})})})(),i==="home"&&y.jsx("div",{ref:E,style:{opacity:0,pointerEvents:"none",willChange:"opacity"},children:y.jsx(xK,{salesMode:O,onSalesModeClose:()=>ee(!1),jobMode:le,onJobModeClose:()=>ge(!1),onNavigateToTab:Se})}),y.jsx("div",{style:{position:"relative",zIndex:10,pointerEvents:"auto",overflowX:"hidden"},children:y.jsxs("div",{style:{backgroundColor:"var(--bg-0)",borderRadius:"0 0 60px 60px"},children:[y.jsx("main",{style:{maxWidth:"100%",margin:"0 auto",paddingTop:"64px"},children:Ye()}),i!=="home"&&y.jsx("footer",{style:{padding:"var(--s-10) var(--s-20)",borderTop:"1px solid var(--line-0)",textAlign:"center",color:"var(--text-3)"},children:y.jsx("p",{children:z.footer.replace("{year}",new Date().getFullYear().toString())})})]})}),i==="home"&&y.jsx("div",{style:{height:"100vh",backgroundColor:"transparent",pointerEvents:"none",position:"relative",zIndex:0}})]})})};T4();XS.createRoot(document.getElementById("root")).render(y.jsx(eP.StrictMode,{children:y.jsx(vK,{})}));
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.